	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qat_uclo_auth_fw
_qat_uclo_auth_fw:                      ## @qat_uclo_auth_fw
	.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	(%rsi), %eax
	movl	4(%rsi), %edi
	movl	%eax, %esi
	callq	_ADD_ADDR
                                        ## kill: def $eax killed $eax def $rax
	leal	-4(%rax), %ebx
	movq	_FCU_DRAM_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BITS_IN_DWORD@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %edx
	sarl	%cl, %edx
	movq	%r14, %rdi
	callq	_SET_CAP_CSR
	movq	_FCU_DRAM_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_SET_CAP_CSR
	movq	_FCU_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FCU_CTRL_CMD_AUTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_SET_CAP_CSR
	movl	$-1, %ebx
	movq	_FCU_STS_VERI_FAIL@GOTPCREL(%rip), %r15
	movq	_FCU_STS_AUTHFWLD_POS@GOTPCREL(%rip), %r12
	movq	_FW_AUTH_MAX_RETRY@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	cmpl	(%r13), %ebx
	jae	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FW_AUTH_WAIT_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movq	_FCU_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_GET_CAP_CSR
	movq	_FCU_AUTH_STS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%eax, %esi
	cmpl	(%r15), %esi
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %ecx
	btl	%ecx, %eax
	jae	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_FCU_STS_VERI_DONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_6:
	incl	%ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FCU_DRAM_ADDR_HI,4,2           ## @FCU_DRAM_ADDR_HI
	.comm	_BITS_IN_DWORD,4,2              ## @BITS_IN_DWORD
	.comm	_FCU_DRAM_ADDR_LO,4,2           ## @FCU_DRAM_ADDR_LO
	.comm	_FCU_CONTROL,4,2                ## @FCU_CONTROL
	.comm	_FCU_CTRL_CMD_AUTH,4,2          ## @FCU_CTRL_CMD_AUTH
	.comm	_FW_AUTH_WAIT_PERIOD,4,2        ## @FW_AUTH_WAIT_PERIOD
	.comm	_FCU_STATUS,4,2                 ## @FCU_STATUS
	.comm	_FCU_AUTH_STS_MASK,4,2          ## @FCU_AUTH_STS_MASK
	.comm	_FCU_STS_VERI_FAIL,4,2          ## @FCU_STS_VERI_FAIL
	.comm	_FCU_STS_AUTHFWLD_POS,4,2       ## @FCU_STS_AUTHFWLD_POS
	.comm	_FCU_STS_VERI_DONE,4,2          ## @FCU_STS_VERI_DONE
	.comm	_FW_AUTH_MAX_RETRY,4,2          ## @FW_AUTH_MAX_RETRY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QAT: authentication error (FCU_STATUS = 0x%x),retry = %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_qat_uclo_auth_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qat_uclo_auth_fw
_qat_uclo_auth_fw:                      ; @qat_uclo_auth_fw
	.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
	mov	x19, x0
	ldp	w1, w0, [x1]
	bl	_ADD_ADDR
Lloh0:
	adrp	x8, _FCU_DRAM_ADDR_HI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FCU_DRAM_ADDR_HI@GOTPAGEOFF]
	sub	w20, w0, #4
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _BITS_IN_DWORD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BITS_IN_DWORD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	asr	w2, w20, w8
	mov	x0, x19
	bl	_SET_CAP_CSR
Lloh6:
	adrp	x8, _FCU_DRAM_ADDR_LO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FCU_DRAM_ADDR_LO@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_SET_CAP_CSR
Lloh9:
	adrp	x8, _FCU_CONTROL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FCU_CONTROL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _FCU_CTRL_CMD_AUTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FCU_CTRL_CMD_AUTH@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_SET_CAP_CSR
	mov	w20, #-1
Lloh15:
	adrp	x21, _FW_AUTH_WAIT_PERIOD@GOTPAGE
Lloh16:
	ldr	x21, [x21, _FW_AUTH_WAIT_PERIOD@GOTPAGEOFF]
Lloh17:
	adrp	x22, _FCU_STATUS@GOTPAGE
Lloh18:
	ldr	x22, [x22, _FCU_STATUS@GOTPAGEOFF]
Lloh19:
	adrp	x23, _FCU_AUTH_STS_MASK@GOTPAGE
Lloh20:
	ldr	x23, [x23, _FCU_AUTH_STS_MASK@GOTPAGEOFF]
Lloh21:
	adrp	x24, _FCU_STS_VERI_FAIL@GOTPAGE
Lloh22:
	ldr	x24, [x24, _FCU_STS_VERI_FAIL@GOTPAGEOFF]
Lloh23:
	adrp	x25, _FCU_STS_AUTHFWLD_POS@GOTPAGE
Lloh24:
	ldr	x25, [x25, _FCU_STS_AUTHFWLD_POS@GOTPAGEOFF]
Lloh25:
	adrp	x26, _FCU_STS_VERI_DONE@GOTPAGE
Lloh26:
	ldr	x26, [x26, _FCU_STS_VERI_DONE@GOTPAGEOFF]
Lloh27:
	adrp	x27, _FW_AUTH_MAX_RETRY@GOTPAGE
Lloh28:
	ldr	x27, [x27, _FW_AUTH_MAX_RETRY@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x27]
	add	w20, w20, #1
	cmp	w20, w8
	b.hs	LBB0_6
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_msleep
	ldr	w1, [x22]
	mov	x0, x19
	bl	_GET_CAP_CSR
	ldr	w8, [x23]
	and	w1, w8, w0
	ldr	w8, [x24]
	cmp	w1, w8
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	cmp	w1, w8
	b.ne	LBB0_1
; %bb.5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	add	w2, w20, #1
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_FCU_DRAM_ADDR_HI,4,2           ; @FCU_DRAM_ADDR_HI
	.comm	_BITS_IN_DWORD,4,2              ; @BITS_IN_DWORD
	.comm	_FCU_DRAM_ADDR_LO,4,2           ; @FCU_DRAM_ADDR_LO
	.comm	_FCU_CONTROL,4,2                ; @FCU_CONTROL
	.comm	_FCU_CTRL_CMD_AUTH,4,2          ; @FCU_CTRL_CMD_AUTH
	.comm	_FW_AUTH_WAIT_PERIOD,4,2        ; @FW_AUTH_WAIT_PERIOD
	.comm	_FCU_STATUS,4,2                 ; @FCU_STATUS
	.comm	_FCU_AUTH_STS_MASK,4,2          ; @FCU_AUTH_STS_MASK
	.comm	_FCU_STS_VERI_FAIL,4,2          ; @FCU_STS_VERI_FAIL
	.comm	_FCU_STS_AUTHFWLD_POS,4,2       ; @FCU_STS_AUTHFWLD_POS
	.comm	_FCU_STS_VERI_DONE,4,2          ; @FCU_STS_VERI_DONE
	.comm	_FW_AUTH_MAX_RETRY,4,2          ; @FW_AUTH_MAX_RETRY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QAT: authentication error (FCU_STATUS = 0x%x),retry = %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_qat_uclo_auth_fw
.subsections_via_symbols
