	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qat_hal_init_gpr               ## -- Begin function qat_hal_init_gpr
	.p2align	4, 0x90
_qat_hal_init_gpr:                      ## @qat_hal_init_gpr
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movb	%dl, -42(%rbp)
	movb	$0, -41(%rbp)
	movq	_ICP_QAT_UCLO_MAX_GPR_REG@GOTPCREL(%rip), %rax
	cmpw	%r14w, (%rax)
	jbe	LBB0_7
## %bb.1:
	movl	%r9d, %r12d
	movl	%ecx, %r15d
	movq	%rdi, %r13
	leal	-1(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testb	%dl, %dl
	sete	%al
	xorl	%ecx, %ecx
	movzbl	%sil, %ebx
	movzwl	%r14w, %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testb	$1, %al
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	leaq	-44(%rbp), %rcx
	leaq	-41(%rbp), %r8
	callq	_qat_hal_convert_abs_to_rel
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movw	%r14w, -44(%rbp)
	movzbl	%cl, %edi
	leaq	-42(%rbp), %rsi
	callq	_test_bit
	movl	%r15d, %ecx
	testl	%eax, %eax
	je	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	-41(%rbp), %edx
	movzwl	-44(%rbp), %r8d
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r12d, %r9d
	callq	_qat_hal_wr_rel_reg
	testl	%eax, %eax
	jne	LBB0_6
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, -42(%rbp)
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movzbl	-41(%rbp), %edx
	leal	1(%rdx), %ecx
	movb	%cl, -41(%rbp)
	xorl	%eax, %eax
	movq	_ICP_QAT_UCLO_MAX_CTX@GOTPCREL(%rip), %rsi
	cmpl	%edx, (%rsi)
	jg	LBB0_2
	jmp	LBB0_11
LBB0_9:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICP_QAT_UCLO_MAX_GPR_REG,2,1   ## @ICP_QAT_UCLO_MAX_GPR_REG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QAT: write gpr fail\n"

	.comm	_ICP_QAT_UCLO_MAX_CTX,4,2       ## @ICP_QAT_UCLO_MAX_CTX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qat_hal_init_gpr               ; -- Begin function qat_hal_init_gpr
	.p2align	2
_qat_hal_init_gpr:                      ; @qat_hal_init_gpr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	strb	w2, [sp, #15]
	strb	wzr, [sp, #11]
Lloh0:
	adrp	x8, _ICP_QAT_UCLO_MAX_GPR_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICP_QAT_UCLO_MAX_GPR_REG@GOTPAGEOFF]
	ldrh	w8, [x8]
	cmp	w8, w4
	b.ls	LBB0_10
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
	mov	x23, x0
	mov	w8, #0
	sub	w24, w3, #1
	cmp	w2, #0
	cset	w9, eq
Lloh2:
	adrp	x25, _ICP_QAT_UCLO_MAX_CTX@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ICP_QAT_UCLO_MAX_CTX@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	tbz	w9, #0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x3, sp, #12
	add	x4, sp, #11
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	bl	_qat_hal_convert_abs_to_rel
	mov	x3, x24
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	strh	w20, [sp, #12]
	and	w0, w8, #0xff
	add	x1, sp, #15
	bl	_test_bit
	mov	x3, x21
	cbz	w0, LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w2, [sp, #11]
	ldrh	w4, [sp, #12]
	mov	x0, x23
	mov	x1, x22
	mov	x5, x19
	bl	_qat_hal_wr_rel_reg
	cbnz	w0, LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [sp, #15]
	cbz	w8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w9, #0
	ldrb	w10, [sp, #11]
	add	w8, w10, #1
	strb	w8, [sp, #11]
	ldr	w11, [x25]
	cmp	w11, w10
	b.gt	LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_10:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ICP_QAT_UCLO_MAX_GPR_REG,2,1   ; @ICP_QAT_UCLO_MAX_GPR_REG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QAT: write gpr fail\n"

	.comm	_ICP_QAT_UCLO_MAX_CTX,4,2       ; @ICP_QAT_UCLO_MAX_CTX
.subsections_via_symbols
