	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qat_hal_batch_wr_lm            ## -- Begin function qat_hal_batch_wr_lm
	.p2align	4, 0x90
_qat_hal_batch_wr_lm:                   ## @qat_hal_batch_wr_lm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$1, -44(%rbp)
	movq	24(%rdx), %rbx
	movl	(%rdx), %eax
	movq	(%rdi), %rcx
	movl	(%rcx), %edi
	cmpl	%edi, %eax
	cmovbl	%eax, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kmalloc_array
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r15
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.2:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r12d
	movzbl	4(%rbx), %r13d
	movl	8(%rbx), %ecx
	movq	16(%rbx), %r8
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_qat_hal_concat_micro_code
	addl	%r12d, %eax
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_3
## %bb.4:
	testl	%eax, %eax
	jle	LBB0_8
## %bb.5:
	movl	%eax, %ecx
	incl	%eax
	movl	$65536, (%r15,%rcx,4)           ## imm = 0x10000
	movzbl	%r13b, %esi
	leaq	-44(%rbp), %rcx
	movq	%r14, %rdi
	xorl	%edx, %edx
	movq	%r15, %r8
	movl	%eax, %r9d
	callq	_qat_hal_exec_micro_init_lm
	movl	%eax, %r14d
	jmp	LBB0_9
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_10
LBB0_8:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%r15, %rdi
	callq	_kfree
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qat_hal_batch_wr_lm            ; -- Begin function qat_hal_batch_wr_lm
	.p2align	2
_qat_hal_batch_wr_lm:                   ; @qat_hal_batch_wr_lm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	mov	w8, #1
	str	w8, [sp, #12]
	ldr	x23, [x2, #24]
	ldr	w8, [x2]
	ldr	x9, [x0]
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w0, w8, w9, lo
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kmalloc_array
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	cbz	x23, LBB0_7
; %bb.2:
	mov	w22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w21, [x23, #4]
	ldr	w3, [x23, #8]
	ldr	x4, [x23, #16]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x22
	bl	_qat_hal_concat_micro_code
	add	w22, w22, w0
	ldr	x23, [x23, #24]
	cbnz	x23, LBB0_3
; %bb.4:
	cmp	w22, #1
	b.lt	LBB0_7
; %bb.5:
	add	w5, w22, #1
	mov	w8, #65536
	str	w8, [x19, w22, uxtw #2]
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	mov	x4, x19
	bl	_qat_hal_exec_micro_init_lm
	mov	x20, x0
	b	LBB0_8
LBB0_6:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x19
	bl	_kfree
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
