	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igc_get_auto_rd_done           ## -- Begin function igc_get_auto_rd_done
	.p2align	4, 0x90
_igc_get_auto_rd_done:                  ## @igc_get_auto_rd_done
	.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	_AUTO_READ_DONE_TIMEOUT@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jle	LBB0_5
## %bb.1:
	movq	_IGC_EECD@GOTPCREL(%rip), %r15
	movq	_IGC_EECD_AUTO_RD@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_rd32
	testl	%eax, (%r12)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	incq	%rbx
	movq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_5:
	cmpq	%rax, %rbx
	jne	LBB0_6
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_hw_dbg
	movq	_IGC_ERR_RESET@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
	jmp	LBB0_8
LBB0_3:
	movq	(%r14), %rax
	cmpq	%rax, %rbx
	je	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTO_READ_DONE_TIMEOUT,8,3     ## @AUTO_READ_DONE_TIMEOUT
	.comm	_IGC_EECD,4,2                   ## @IGC_EECD
	.comm	_IGC_EECD_AUTO_RD,4,2           ## @IGC_EECD_AUTO_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Auto read by HW from NVM has not completed.\n"

	.comm	_IGC_ERR_RESET,8,3              ## @IGC_ERR_RESET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igc_get_auto_rd_done           ; -- Begin function igc_get_auto_rd_done
	.p2align	2
_igc_get_auto_rd_done:                  ; @igc_get_auto_rd_done
	.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
Lloh0:
	adrp	x20, _AUTO_READ_DONE_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AUTO_READ_DONE_TIMEOUT@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, #0
Lloh2:
	adrp	x21, _IGC_EECD@GOTPAGE
Lloh3:
	ldr	x21, [x21, _IGC_EECD@GOTPAGEOFF]
Lloh4:
	adrp	x22, _IGC_EECD_AUTO_RD@GOTPAGE
Lloh5:
	ldr	x22, [x22, _IGC_EECD_AUTO_RD@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_rd32
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	add	x19, x19, #1
	ldr	x8, [x20]
	cmp	x19, x8
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x19, #0
LBB0_5:
	cmp	x19, x8
	b.ne	LBB0_8
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hw_dbg
Lloh8:
	adrp	x8, _IGC_ERR_RESET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IGC_ERR_RESET@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	neg	x0, x8
	b	LBB0_9
LBB0_7:
	ldr	x8, [x20]
	cmp	x19, x8
	b.eq	LBB0_6
LBB0_8:
	mov	x0, #0
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTO_READ_DONE_TIMEOUT,8,3     ; @AUTO_READ_DONE_TIMEOUT
	.comm	_IGC_EECD,4,2                   ; @IGC_EECD
	.comm	_IGC_EECD_AUTO_RD,4,2           ; @IGC_EECD_AUTO_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Auto read by HW from NVM has not completed.\n"

	.comm	_IGC_ERR_RESET,8,3              ; @IGC_ERR_RESET
.subsections_via_symbols
