	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qat_uclo_map_uimage
_qat_uclo_map_uimage:                   ## @qat_uclo_map_uimage
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	leaq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	leaq	56(%rsi), %r15
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	movq	_ICP_QAT_UOF_IMAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	callq	_qat_uclo_find_chunk
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r13
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movq	(%r13), %rdx
	leaq	(%rdx,%rcx), %r14
	movq	16(%rdx,%rcx), %rsi
	movq	(%rax), %rax
	movl	(%rax,%rsi), %edi
	movl	%edi, (%r15)
	leaq	4(%rax,%rsi), %rsi
	movq	%rsi, -8(%r15)
	movq	8(%rdx,%rcx), %rsi
	movl	(%rsi,%rax), %edi
	movl	%edi, -16(%r15)
	leaq	4(%rsi,%rax), %rsi
	movq	%rsi, -24(%r15)
	movq	(%rdx,%rcx), %rcx
	movl	(%rcx,%rax), %edx
	movl	%edx, -32(%r15)
	leaq	4(%rcx,%rax), %rax
	movq	%rax, -40(%r15)
	movq	%r14, -48(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_qat_uclo_check_image_compat
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movl	%eax, -56(%r15)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_qat_uclo_map_image_page
	incq	%r12
	addq	$64, %r15
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r12, %r14
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_3
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_7:
	xorl	%r14d, %r14d
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_kfree
	addq	$64, %rbx
	decq	%r12
	jne	LBB0_9
	jmp	LBB0_11
LBB0_10:
	movl	%r12d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICP_QAT_UOF_IMAG,4,2           ## @ICP_QAT_UOF_IMAG
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_qat_uclo_map_uimage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qat_uclo_map_uimage
_qat_uclo_map_uimage:                   ; @qat_uclo_map_uimage
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	w2, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	mov	x19, #0
	mov	x23, #0
	add	x22, x0, #8
	add	x25, x1, #32
Lloh0:
	adrp	x27, _ICP_QAT_UOF_IMAG@GOTPAGE
Lloh1:
	ldr	x27, [x27, _ICP_QAT_UOF_IMAG@GOTPAGEOFF]
Lloh2:
	adrp	x28, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x28, [x28, _GFP_KERNEL@GOTPAGEOFF]
	mov	w26, w2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #16]
	ldr	w1, [x27]
	mov	x2, x23
	bl	_qat_uclo_find_chunk
	cbz	x0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	ldr	x8, [x0]
	ldp	x10, x9, [x21]
	add	x24, x8, x9
	ldr	x8, [x24, #16]
	ldr	x9, [x10]
	add	x8, x9, x8
	ldr	w10, [x8], #4
	str	w10, [x25, #24]
	str	x8, [x25, #16]
	ldp	x10, x8, [x24]
	add	x8, x8, x9
	ldr	w11, [x8], #4
	str	w11, [x25, #8]
	str	x8, [x25]
	add	x8, x10, x9
	ldr	w9, [x8], #4
	stur	w9, [x25, #-8]
	stp	x24, x8, [x25, #-24]
	mov	x0, x22
	mov	x1, x24
	bl	_qat_uclo_check_image_compat
	cbnz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x28]
	mov	w0, #4
	bl	_kzalloc
	stur	w0, [x25, #-32]
	cbz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x2, x0
	mov	x0, x22
	mov	x1, x24
	bl	_qat_uclo_map_image_page
	add	x19, x19, #1
	add	x25, x25, #64
	cmp	x26, x19
	b.ne	LBB0_2
; %bb.6:
	mov	x19, x26
	b	LBB0_10
LBB0_7:
	mov	w19, #0
	b	LBB0_10
LBB0_8:
	cbz	w19, LBB0_10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20], #64
	bl	_kfree
	subs	x19, x19, #1
	b.ne	LBB0_9
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ICP_QAT_UOF_IMAG,4,2           ; @ICP_QAT_UOF_IMAG
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_qat_uclo_map_uimage
.subsections_via_symbols
