	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_acquire_nvram_lock
_bnx2x_acquire_nvram_lock:              ## @bnx2x_acquire_nvram_lock
	.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, %r15
	callq	_BP_PORT
	movl	%eax, %r14d
	movq	_HW_LOCK_RESOURCE_NVRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_bnx2x_acquire_hw_lock
	movq	_BNX2X_NVRAM_TIMEOUT_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_CHIP_REV_IS_SLOW
	imull	$100, %r12d, %ebx
	testq	%rax, %rax
	cmovel	%r12d, %ebx
	movq	_MCP_REG_MCPR_NVM_SW_ARB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MCPR_NVM_SW_ARB_ARB_REQ_SET1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %ecx
	shll	%cl, %edx
	movq	%r15, %rdi
	callq	_REG_WR
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.2:
	addl	%ebx, %ebx
	leal	(%rbx,%rbx,4), %eax
	cmpl	$2, %eax
	movl	$1, %ebx
	cmovgel	%eax, %ebx
	movq	_MCPR_NVM_SW_ARB_ARB_ARB1@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MCP_REG_MCPR_NVM_SW_ARB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_RD
	movl	%eax, %r13d
	movl	(%r12), %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	testl	%r13d, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$5, %edi
	callq	_udelay
	decl	%ebx
	jne	LBB0_3
	jmp	LBB0_5
LBB0_1:
                                        ## implicit-def: $r13d
LBB0_5:
	movq	_MCPR_NVM_SW_ARB_ARB_ARB1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %ecx
	shll	%cl, %edx
	xorl	%eax, %eax
	testl	%r13d, %edx
	jne	LBB0_7
## %bb.6:
	movq	_BNX2X_MSG_ETHTOOL@GOTPCREL(%rip), %rax
	movq	_BNX2X_MSG_NVM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DP
	movq	_EBUSY@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	_HW_LOCK_RESOURCE_NVRAM,4,2     ## @HW_LOCK_RESOURCE_NVRAM
	.comm	_BNX2X_NVRAM_TIMEOUT_COUNT,4,2  ## @BNX2X_NVRAM_TIMEOUT_COUNT
	.comm	_MCP_REG_MCPR_NVM_SW_ARB,4,2    ## @MCP_REG_MCPR_NVM_SW_ARB
	.comm	_MCPR_NVM_SW_ARB_ARB_REQ_SET1,4,2 ## @MCPR_NVM_SW_ARB_ARB_REQ_SET1
	.comm	_MCPR_NVM_SW_ARB_ARB_ARB1,4,2   ## @MCPR_NVM_SW_ARB_ARB_ARB1
	.comm	_BNX2X_MSG_ETHTOOL,4,2          ## @BNX2X_MSG_ETHTOOL
	.comm	_BNX2X_MSG_NVM,4,2              ## @BNX2X_MSG_NVM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot get access to nvram interface\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_acquire_nvram_lock
_bnx2x_acquire_nvram_lock:              ; @bnx2x_acquire_nvram_lock
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_BP_PORT
	mov	x19, x0
Lloh0:
	adrp	x8, _HW_LOCK_RESOURCE_NVRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HW_LOCK_RESOURCE_NVRAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_bnx2x_acquire_hw_lock
Lloh3:
	adrp	x8, _BNX2X_NVRAM_TIMEOUT_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BNX2X_NVRAM_TIMEOUT_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_CHIP_REV_IS_SLOW
	mov	w8, #100
	mul	w8, w21, w8
	cmp	x0, #0
Lloh6:
	adrp	x22, _MCP_REG_MCPR_NVM_SW_ARB@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MCP_REG_MCPR_NVM_SW_ARB@GOTPAGEOFF]
	csel	w21, w21, w8, eq
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _MCPR_NVM_SW_ARB_ARB_REQ_SET1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MCPR_NVM_SW_ARB_ARB_REQ_SET1@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsl	w2, w8, w19
	mov	x0, x20
	bl	_REG_WR
Lloh11:
	adrp	x23, _MCPR_NVM_SW_ARB_ARB_ARB1@GOTPAGE
Lloh12:
	ldr	x23, [x23, _MCPR_NVM_SW_ARB_ARB_ARB1@GOTPAGEOFF]
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.1:
	add	w8, w21, w21, lsl #2
	lsl	w8, w8, #1
	cmp	w8, #1
	csinc	w24, w8, wzr, gt
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x20
	bl	_REG_RD
	mov	x21, x0
	ldr	w8, [x23]
	lsl	w8, w8, w19
	tst	w8, w0
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #5
	bl	_udelay
	subs	w24, w24, #1
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
                                        ; implicit-def: $w21
LBB0_5:
	ldr	w8, [x23]
	lsl	w8, w8, w19
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _BNX2X_MSG_NVM@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BNX2X_MSG_NVM@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP
Lloh21:
	adrp	x8, _EBUSY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_LOCK_RESOURCE_NVRAM,4,2     ; @HW_LOCK_RESOURCE_NVRAM
	.comm	_BNX2X_NVRAM_TIMEOUT_COUNT,4,2  ; @BNX2X_NVRAM_TIMEOUT_COUNT
	.comm	_MCP_REG_MCPR_NVM_SW_ARB,4,2    ; @MCP_REG_MCPR_NVM_SW_ARB
	.comm	_MCPR_NVM_SW_ARB_ARB_REQ_SET1,4,2 ; @MCPR_NVM_SW_ARB_ARB_REQ_SET1
	.comm	_MCPR_NVM_SW_ARB_ARB_ARB1,4,2   ; @MCPR_NVM_SW_ARB_ARB_ARB1
	.comm	_BNX2X_MSG_ETHTOOL,4,2          ; @BNX2X_MSG_ETHTOOL
	.comm	_BNX2X_MSG_NVM,4,2              ; @BNX2X_MSG_NVM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot get access to nvram interface\n"

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