	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_state_wait
_bnx2x_state_wait:                      ## @bnx2x_state_wait
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_CHIP_REV_IS_EMUL
	testq	%rax, %rax
	movl	$5001, %eax                     ## imm = 0x1389
	movl	$100001, %ebx                   ## imm = 0x186A1
	cmovel	%eax, %ebx
	movq	_BNX2X_MSG_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_DP
	xorl	%eax, %eax
	callq	_might_sleep
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	cmpq	$0, (%r12)
	je	LBB0_1
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	callq	_BNX2X_ERR
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_3:
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2X_MSG_SP,4,2               ## @BNX2X_MSG_SP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waiting for state to become %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"timeout waiting for state %d\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_bnx2x_state_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_state_wait
_bnx2x_state_wait:                      ; @bnx2x_state_wait
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	bl	_CHIP_REV_IS_EMUL
	cmp	x0, #0
	mov	w8, #34465
	movk	w8, #1, lsl #16
	mov	w9, #5001
	csel	w22, w9, w8, eq
Lloh0:
	adrp	x8, _BNX2X_MSG_SP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNX2X_MSG_SP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_DP
	bl	_might_sleep
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	subs	w22, w22, #1
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_test_bit
	cbz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	x8, [x21]
	cbz	x8, LBB0_1
; %bb.4:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_BNX2X_ERR
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2X_MSG_SP,4,2               ; @BNX2X_MSG_SP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waiting for state to become %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"timeout waiting for state %d\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_bnx2x_state_wait
.subsections_via_symbols
