	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qat_uclo_parse_uof_obj
_qat_uclo_parse_uof_obj:                ## @qat_uclo_parse_uof_obj
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	56(%r12), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r12)
	movq	%rax, 32(%r12)
	movl	$6, (%r12)
	callq	_qat_uclo_get_dev_type
	movl	%eax, 68(%r12)
	movq	_PID_MINOR_REV@GOTPCREL(%rip), %rax
	movq	(%r14), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movq	_PID_MAJOR_REV@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 4(%r12)
	movq	%r12, %rdi
	callq	_qat_uclo_check_uof_compat
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_2:
	movq	_UWORD_CPYBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	movl	%eax, 12(%r12)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_ICP_QAT_UCLO_MAX_USTORE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r12)
	movq	56(%r12), %rdi
	cmpq	$0, (%rdi)
	je	LBB0_6
## %bb.5:
	movq	_ICP_QAT_UOF_STRT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	48(%r12), %rdx
	callq	_qat_uclo_map_str_table
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	16(%r12), %rsi
	movq	_ICP_QAT_UCLO_MAX_AE@GOTPCREL(%rip), %rax
	movq	_ICP_QAT_UCLO_MAX_CTX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	imull	(%rax), %edx
	movq	%r12, %rdi
	callq	_qat_uclo_map_uimage
	movl	%eax, 8(%r12)
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:
	movq	(%r14), %rax
	movl	4(%rax), %esi
	movq	%r14, %rdi
	callq	_qat_uclo_map_ae
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_13:
	movl	12(%r12), %edi
	callq	_kfree
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	32(%r12), %r15
	movq	%r14, %rdi
	callq	_qat_uclo_init_uword_num
	leaq	24(%r12), %rsi
	movq	%r15, %rdi
	callq	_qat_uclo_map_initmem_table
	movq	%r14, %rdi
	callq	_qat_uclo_set_ae_mode
	testq	%rax, %rax
	je	LBB0_16
LBB0_10:
	cmpl	$0, 8(%r12)
	je	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_kfree
	incq	%rbx
	movl	8(%r12), %eax
	cmpq	%rax, %rbx
	jb	LBB0_12
	jmp	LBB0_13
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_PID_MAJOR_REV,4,2              ## @PID_MAJOR_REV
	.comm	_PID_MINOR_REV,4,2              ## @PID_MINOR_REV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QAT: UOF incompatible\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UWORD_CPYBUF_SIZE,4,2          ## @UWORD_CPYBUF_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ICP_QAT_UCLO_MAX_USTORE,4,2    ## @ICP_QAT_UCLO_MAX_USTORE
	.comm	_ICP_QAT_UOF_STRT,4,2           ## @ICP_QAT_UOF_STRT
L_.str.1:                               ## @.str.1
	.asciz	"QAT: UOF doesn't have effective images\n"

	.comm	_ICP_QAT_UCLO_MAX_AE,4,2        ## @ICP_QAT_UCLO_MAX_AE
	.comm	_ICP_QAT_UCLO_MAX_CTX,4,2       ## @ICP_QAT_UCLO_MAX_CTX
L_.str.2:                               ## @.str.2
	.asciz	"QAT: Bad object\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_qat_uclo_parse_uof_obj
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qat_uclo_parse_uof_obj
_qat_uclo_parse_uof_obj:                ; @qat_uclo_parse_uof_obj
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x19, [x0, #8]
	ldr	x8, [x19, #56]
	ldr	x8, [x8]
	mov	x21, x19
	str	x8, [x21, #32]!
	str	x8, [x19, #40]
	mov	w8, #6
	str	w8, [x19]
	bl	_qat_uclo_get_dev_type
	str	w0, [x19, #68]
Lloh0:
	adrp	x8, _PID_MAJOR_REV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PID_MAJOR_REV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PID_MINOR_REV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PID_MINOR_REV@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	x10, [x20]
	ldr	w10, [x10]
	and	w9, w10, w9
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_qat_uclo_check_uof_compat
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
Lloh10:
	adrp	x8, _UWORD_CPYBUF_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _UWORD_CPYBUF_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	str	w0, [x19, #12]
	cbz	w0, LBB0_10
; %bb.3:
Lloh16:
	adrp	x8, _ICP_QAT_UCLO_MAX_USTORE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ICP_QAT_UCLO_MAX_USTORE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #64]
	ldr	x0, [x19, #56]
	ldr	x8, [x0]
	cbz	x8, LBB0_8
; %bb.4:
Lloh19:
	adrp	x8, _ICP_QAT_UOF_STRT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ICP_QAT_UOF_STRT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x2, x19, #48
	bl	_qat_uclo_map_str_table
	cbz	w0, LBB0_8
; %bb.5:
Lloh22:
	adrp	x8, _ICP_QAT_UCLO_MAX_AE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ICP_QAT_UCLO_MAX_AE@GOTPAGEOFF]
	ldr	x1, [x19, #16]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _ICP_QAT_UCLO_MAX_CTX@GOTPAGE
Lloh26:
	ldr	x9, [x9, _ICP_QAT_UCLO_MAX_CTX@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	mul	w2, w9, w8
	mov	x0, x19
	bl	_qat_uclo_map_uimage
	str	w0, [x19, #8]
	cbz	w0, LBB0_9
; %bb.6:
	ldr	x8, [x20]
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_qat_uclo_map_ae
	cbz	x0, LBB0_13
; %bb.7:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	b	LBB0_14
LBB0_8:
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_9:
	ldr	w0, [x19, #12]
	bl	_kfree
Lloh32:
	adrp	x8, _EFAULT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh34:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x20
	bl	_qat_uclo_init_uword_num
	add	x1, x19, #24
	mov	x0, x21
	bl	_qat_uclo_map_initmem_table
	mov	x0, x20
	bl	_qat_uclo_set_ae_mode
	cbz	x0, LBB0_12
LBB0_14:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_9
; %bb.15:
	mov	x20, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x20, lsl #2]
	bl	_kfree
	add	x20, x20, #1
	ldr	w8, [x19, #8]
	cmp	x20, x8
	b.lo	LBB0_16
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_PID_MAJOR_REV,4,2              ; @PID_MAJOR_REV
	.comm	_PID_MINOR_REV,4,2              ; @PID_MINOR_REV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QAT: UOF incompatible\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UWORD_CPYBUF_SIZE,4,2          ; @UWORD_CPYBUF_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ICP_QAT_UCLO_MAX_USTORE,4,2    ; @ICP_QAT_UCLO_MAX_USTORE
	.comm	_ICP_QAT_UOF_STRT,4,2           ; @ICP_QAT_UOF_STRT
l_.str.1:                               ; @.str.1
	.asciz	"QAT: UOF doesn't have effective images\n"

	.comm	_ICP_QAT_UCLO_MAX_AE,4,2        ; @ICP_QAT_UCLO_MAX_AE
	.comm	_ICP_QAT_UCLO_MAX_CTX,4,2       ; @ICP_QAT_UCLO_MAX_CTX
l_.str.2:                               ; @.str.2
	.asciz	"QAT: Bad object\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_qat_uclo_parse_uof_obj
.subsections_via_symbols
