	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_for_reset_state
_wait_for_reset_state:                  ## @wait_for_reset_state
	.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
	testq	%rsi, %rsi
	jle	LBB0_5
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_EFA_REGS_DEV_STS_RESET_IN_PROGRESS_MASK@GOTPCREL(%rip), %r13
	movq	_EFA_POLL_INTERVAL_MS@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_EFA_REGS_DEV_STS_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_efa_com_reg_read32
	movq	(%r13), %rcx
	andq	%rax, %rcx
	cmpq	%r14, %rcx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdx
	callq	_ibdev_dbg
	movl	(%r12), %edi
	callq	_msleep
	decq	%rbx
	jne	LBB0_2
LBB0_5:
	movq	_ETIME@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFA_REGS_DEV_STS_OFF,4,2       ## @EFA_REGS_DEV_STS_OFF
	.comm	_EFA_REGS_DEV_STS_RESET_IN_PROGRESS_MASK,8,3 ## @EFA_REGS_DEV_STS_RESET_IN_PROGRESS_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reset indication val %d\n"

	.comm	_EFA_POLL_INTERVAL_MS,4,2       ## @EFA_POLL_INTERVAL_MS
	.comm	_ETIME,4,2                      ## @ETIME
	.no_dead_strip	_wait_for_reset_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_for_reset_state
_wait_for_reset_state:                  ; @wait_for_reset_state
	.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
	cmp	x1, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _EFA_REGS_DEV_STS_OFF@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EFA_REGS_DEV_STS_OFF@GOTPAGEOFF]
Lloh2:
	adrp	x24, _EFA_REGS_DEV_STS_RESET_IN_PROGRESS_MASK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _EFA_REGS_DEV_STS_RESET_IN_PROGRESS_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
Lloh6:
	adrp	x25, _EFA_POLL_INTERVAL_MS@GOTPAGE
Lloh7:
	ldr	x25, [x25, _EFA_POLL_INTERVAL_MS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x21
	bl	_efa_com_reg_read32
	ldr	x8, [x24]
	and	x8, x8, x0
	cmp	x8, x19
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x2, x0
	ldr	w0, [x21]
	mov	x1, x22
	bl	_ibdev_dbg
	ldr	w0, [x25]
	bl	_msleep
	subs	x20, x20, #1
	b.ne	LBB0_2
LBB0_4:
Lloh8:
	adrp	x8, _ETIME@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
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	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EFA_REGS_DEV_STS_OFF,4,2       ; @EFA_REGS_DEV_STS_OFF
	.comm	_EFA_REGS_DEV_STS_RESET_IN_PROGRESS_MASK,8,3 ; @EFA_REGS_DEV_STS_RESET_IN_PROGRESS_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reset indication val %d\n"

	.comm	_EFA_POLL_INTERVAL_MS,4,2       ; @EFA_POLL_INTERVAL_MS
	.comm	_ETIME,4,2                      ; @ETIME
	.no_dead_strip	_wait_for_reset_state
.subsections_via_symbols
