	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qat_hal_start                  ## -- Begin function qat_hal_start
	.p2align	4, 0x90
_qat_hal_start:                         ## @qat_hal_start
	.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, %r12
	cmpq	$0, (%rdi)
	je	LBB0_5
## %bb.1:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_FCU_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FCU_CTRL_CMD_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_SET_CAP_CSR
	movl	$-1, %ebx
	movq	_FCU_STATUS@GOTPCREL(%rip), %r13
	movq	_FCU_STS_DONE_POS@GOTPCREL(%rip), %r14
	movq	_FW_AUTH_MAX_RETRY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FW_AUTH_WAIT_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_GET_CAP_CSR
	movl	(%r14), %ecx
	btl	%ecx, %eax
	jb	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_2
## %bb.4:
	movzbl	-44(%rbp), %esi                 ## 1-byte Folded Reload
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_5:
	movl	%edx, %r15d
	notl	%edx
	movq	_ICP_QAT_UCLO_AE_ALL_CTX@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movzbl	%sil, %r14d
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$65536, %ecx                    ## imm = 0x10000
	callq	_qat_hal_put_wakeup_event
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qat_hal_enable_ctx             ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FCU_CONTROL,4,2                ## @FCU_CONTROL
	.comm	_FCU_CTRL_CMD_START,4,2         ## @FCU_CTRL_CMD_START
	.comm	_FW_AUTH_WAIT_PERIOD,4,2        ## @FW_AUTH_WAIT_PERIOD
	.comm	_FCU_STATUS,4,2                 ## @FCU_STATUS
	.comm	_FCU_STS_DONE_POS,4,2           ## @FCU_STS_DONE_POS
	.comm	_FW_AUTH_MAX_RETRY,4,2          ## @FW_AUTH_MAX_RETRY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QAT: start error (AE 0x%x FCU_STS = 0x%x)\n"

	.comm	_ICP_QAT_UCLO_AE_ALL_CTX,4,2    ## @ICP_QAT_UCLO_AE_ALL_CTX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qat_hal_start                  ; -- Begin function qat_hal_start
	.p2align	2
_qat_hal_start:                         ; @qat_hal_start
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _FCU_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FCU_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _FCU_CTRL_CMD_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FCU_CTRL_CMD_START@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_SET_CAP_CSR
	mov	w21, #-1
Lloh6:
	adrp	x22, _FW_AUTH_WAIT_PERIOD@GOTPAGE
Lloh7:
	ldr	x22, [x22, _FW_AUTH_WAIT_PERIOD@GOTPAGEOFF]
Lloh8:
	adrp	x23, _FCU_STATUS@GOTPAGE
Lloh9:
	ldr	x23, [x23, _FCU_STATUS@GOTPAGEOFF]
Lloh10:
	adrp	x24, _FCU_STS_DONE_POS@GOTPAGE
Lloh11:
	ldr	x24, [x24, _FCU_STS_DONE_POS@GOTPAGEOFF]
Lloh12:
	adrp	x25, _FW_AUTH_MAX_RETRY@GOTPAGE
Lloh13:
	ldr	x25, [x25, _FW_AUTH_MAX_RETRY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	bl	_msleep
	ldr	w1, [x23]
	mov	x0, x20
	bl	_GET_CAP_CSR
	ldr	w8, [x24]
	lsr	w8, w0, w8
	tbnz	w8, #0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	add	w21, w21, #1
	cmp	w21, w8
	b.lt	LBB0_2
; %bb.4:
	mov	x2, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_pr_err
LBB0_5:
	mov	x21, x2
Lloh16:
	adrp	x8, _ICP_QAT_UCLO_AE_ALL_CTX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ICP_QAT_UCLO_AE_ALL_CTX@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	bic	w2, w8, w2
	mov	x0, x20
	mov	x1, x19
	mov	w3, #65536
	bl	_qat_hal_put_wakeup_event
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_qat_hal_enable_ctx
LBB0_6:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_FCU_CONTROL,4,2                ; @FCU_CONTROL
	.comm	_FCU_CTRL_CMD_START,4,2         ; @FCU_CTRL_CMD_START
	.comm	_FW_AUTH_WAIT_PERIOD,4,2        ; @FW_AUTH_WAIT_PERIOD
	.comm	_FCU_STATUS,4,2                 ; @FCU_STATUS
	.comm	_FCU_STS_DONE_POS,4,2           ; @FCU_STS_DONE_POS
	.comm	_FW_AUTH_MAX_RETRY,4,2          ; @FW_AUTH_MAX_RETRY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QAT: start error (AE 0x%x FCU_STS = 0x%x)\n"

	.comm	_ICP_QAT_UCLO_AE_ALL_CTX,4,2    ; @ICP_QAT_UCLO_AE_ALL_CTX
.subsections_via_symbols
