	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_enable_nvram_write
_bnx2_enable_nvram_write:               ## @bnx2_enable_nvram_write
	.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, %r13
	movq	_BNX2_MISC_CFG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_BNX2_RD
	movl	(%rbx), %esi
	movq	_BNX2_MISC_CFG_NVM_WR_EN_PCI@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_BNX2_WR
	movq	(%r13), %rax
	movq	_BNX2_NV_WREN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.1:
	movq	_BNX2_NVM_COMMAND@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_BNX2_NVM_COMMAND_DONE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r13, %rdi
	callq	_BNX2_WR
	movl	(%r15), %esi
	movq	_BNX2_NVM_COMMAND_WREN@GOTPCREL(%rip), %rax
	movq	_BNX2_NVM_COMMAND_DOIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r13, %rdi
	callq	_BNX2_WR
	movq	_NVRAM_TIMEOUT_COUNT@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	$0, %ebx
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$5, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_BNX2_RD
	testl	%eax, (%r12)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jl	LBB0_3
LBB0_6:
	cmpl	%eax, %ebx
	jge	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movl	(%r14), %eax
	cmpl	%eax, %ebx
	jl	LBB0_8
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_MISC_CFG,4,2              ## @BNX2_MISC_CFG
	.comm	_BNX2_MISC_CFG_NVM_WR_EN_PCI,4,2 ## @BNX2_MISC_CFG_NVM_WR_EN_PCI
	.comm	_BNX2_NV_WREN,4,2               ## @BNX2_NV_WREN
	.comm	_BNX2_NVM_COMMAND,4,2           ## @BNX2_NVM_COMMAND
	.comm	_BNX2_NVM_COMMAND_DONE,4,2      ## @BNX2_NVM_COMMAND_DONE
	.comm	_BNX2_NVM_COMMAND_WREN,4,2      ## @BNX2_NVM_COMMAND_WREN
	.comm	_BNX2_NVM_COMMAND_DOIT,4,2      ## @BNX2_NVM_COMMAND_DOIT
	.comm	_NVRAM_TIMEOUT_COUNT,4,2        ## @NVRAM_TIMEOUT_COUNT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_bnx2_enable_nvram_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_enable_nvram_write
_bnx2_enable_nvram_write:               ; @bnx2_enable_nvram_write
	.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	x19, x0
Lloh0:
	adrp	x20, _BNX2_MISC_CFG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BNX2_MISC_CFG@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_BNX2_RD
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _BNX2_MISC_CFG_NVM_WR_EN_PCI@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BNX2_MISC_CFG_NVM_WR_EN_PCI@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x19
	bl	_BNX2_WR
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _BNX2_NV_WREN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BNX2_NV_WREN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.1:
Lloh8:
	adrp	x20, _BNX2_NVM_COMMAND@GOTPAGE
Lloh9:
	ldr	x20, [x20, _BNX2_NVM_COMMAND@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh10:
	adrp	x21, _BNX2_NVM_COMMAND_DONE@GOTPAGE
Lloh11:
	ldr	x21, [x21, _BNX2_NVM_COMMAND_DONE@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_BNX2_WR
Lloh12:
	adrp	x8, _BNX2_NVM_COMMAND_WREN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BNX2_NVM_COMMAND_WREN@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _BNX2_NVM_COMMAND_DOIT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BNX2_NVM_COMMAND_DOIT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_BNX2_WR
Lloh18:
	adrp	x23, _NVRAM_TIMEOUT_COUNT@GOTPAGE
Lloh19:
	ldr	x23, [x23, _NVRAM_TIMEOUT_COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #5
	bl	_udelay
	ldr	w1, [x20]
	mov	x0, x19
	bl	_BNX2_RD
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	ldr	w8, [x23]
	cmp	w22, w8
	b.lt	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w22, #0
LBB0_6:
	cmp	w22, w8
	b.ge	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	ldr	w8, [x23]
	cmp	w22, w8
	b.lt	LBB0_7
LBB0_9:
Lloh20:
	adrp	x8, _EBUSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_MISC_CFG,4,2              ; @BNX2_MISC_CFG
	.comm	_BNX2_MISC_CFG_NVM_WR_EN_PCI,4,2 ; @BNX2_MISC_CFG_NVM_WR_EN_PCI
	.comm	_BNX2_NV_WREN,4,2               ; @BNX2_NV_WREN
	.comm	_BNX2_NVM_COMMAND,4,2           ; @BNX2_NVM_COMMAND
	.comm	_BNX2_NVM_COMMAND_DONE,4,2      ; @BNX2_NVM_COMMAND_DONE
	.comm	_BNX2_NVM_COMMAND_WREN,4,2      ; @BNX2_NVM_COMMAND_WREN
	.comm	_BNX2_NVM_COMMAND_DOIT,4,2      ; @BNX2_NVM_COMMAND_DOIT
	.comm	_NVRAM_TIMEOUT_COUNT,4,2        ; @NVRAM_TIMEOUT_COUNT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_bnx2_enable_nvram_write
.subsections_via_symbols
