	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_nvram_erase_page
_bnx2_nvram_erase_page:                 ## @bnx2_nvram_erase_page
	.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), %rax
	movq	_BNX2_NV_BUFFERED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r14d, %r14d
	testl	%ecx, (%rax)
	jne	LBB0_8
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	_BNX2_NVM_COMMAND_ERASE@GOTPCREL(%rip), %rax
	movq	_BNX2_NVM_COMMAND_WR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	(%rax), %r14d
	movq	_BNX2_NVM_COMMAND_DOIT@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	_BNX2_NVM_COMMAND@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_BNX2_NVM_COMMAND_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_BNX2_WR
	movq	_BNX2_NVM_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BNX2_NVM_ADDR_NVM_ADDR_VALUE@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_BNX2_WR
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_BNX2_WR
	movq	_NVRAM_TIMEOUT_COUNT@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	xorl	%r14d, %r14d
	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	(%r12), %esi
	movq	%r13, %rdi
	callq	_BNX2_RD
	movq	_BNX2_NVM_COMMAND_DONE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jl	LBB0_3
LBB0_6:
	cmpl	%eax, %ebx
	jl	LBB0_8
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jge	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_BNX2_NV_BUFFERED,4,2           ## @BNX2_NV_BUFFERED
	.comm	_BNX2_NVM_COMMAND_ERASE,4,2     ## @BNX2_NVM_COMMAND_ERASE
	.comm	_BNX2_NVM_COMMAND_WR,4,2        ## @BNX2_NVM_COMMAND_WR
	.comm	_BNX2_NVM_COMMAND_DOIT,4,2      ## @BNX2_NVM_COMMAND_DOIT
	.comm	_BNX2_NVM_COMMAND,4,2           ## @BNX2_NVM_COMMAND
	.comm	_BNX2_NVM_COMMAND_DONE,4,2      ## @BNX2_NVM_COMMAND_DONE
	.comm	_BNX2_NVM_ADDR,4,2              ## @BNX2_NVM_ADDR
	.comm	_BNX2_NVM_ADDR_NVM_ADDR_VALUE,4,2 ## @BNX2_NVM_ADDR_NVM_ADDR_VALUE
	.comm	_NVRAM_TIMEOUT_COUNT,4,2        ## @NVRAM_TIMEOUT_COUNT
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_bnx2_nvram_erase_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_nvram_erase_page
_bnx2_nvram_erase_page:                 ; @bnx2_nvram_erase_page
	.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
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _BNX2_NV_BUFFERED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BNX2_NV_BUFFERED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh3:
	adrp	x8, _BNX2_NVM_COMMAND_ERASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BNX2_NVM_COMMAND_ERASE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _BNX2_NVM_COMMAND_WR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BNX2_NVM_COMMAND_WR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _BNX2_NVM_COMMAND_DOIT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BNX2_NVM_COMMAND_DOIT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w21, w8, w9
Lloh12:
	adrp	x22, _BNX2_NVM_COMMAND@GOTPAGE
Lloh13:
	ldr	x22, [x22, _BNX2_NVM_COMMAND@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh14:
	adrp	x23, _BNX2_NVM_COMMAND_DONE@GOTPAGE
Lloh15:
	ldr	x23, [x23, _BNX2_NVM_COMMAND_DONE@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_BNX2_WR
Lloh16:
	adrp	x8, _BNX2_NVM_ADDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BNX2_NVM_ADDR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _BNX2_NVM_ADDR_NVM_ADDR_VALUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BNX2_NVM_ADDR_NVM_ADDR_VALUE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w2, w8, w20
	mov	x0, x19
	bl	_BNX2_WR
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_BNX2_WR
Lloh22:
	adrp	x21, _NVRAM_TIMEOUT_COUNT@GOTPAGE
Lloh23:
	ldr	x21, [x21, _NVRAM_TIMEOUT_COUNT@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w20, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #5
	bl	_udelay
	ldr	w1, [x22]
	mov	x0, x19
	bl	_BNX2_RD
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	cmp	w20, w8
	b.ge	LBB0_10
LBB0_7:
	mov	w0, #0
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
LBB0_9:
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_7
LBB0_10:
Lloh24:
	adrp	x8, _EBUSY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_BNX2_NV_BUFFERED,4,2           ; @BNX2_NV_BUFFERED
	.comm	_BNX2_NVM_COMMAND_ERASE,4,2     ; @BNX2_NVM_COMMAND_ERASE
	.comm	_BNX2_NVM_COMMAND_WR,4,2        ; @BNX2_NVM_COMMAND_WR
	.comm	_BNX2_NVM_COMMAND_DOIT,4,2      ; @BNX2_NVM_COMMAND_DOIT
	.comm	_BNX2_NVM_COMMAND,4,2           ; @BNX2_NVM_COMMAND
	.comm	_BNX2_NVM_COMMAND_DONE,4,2      ; @BNX2_NVM_COMMAND_DONE
	.comm	_BNX2_NVM_ADDR,4,2              ; @BNX2_NVM_ADDR
	.comm	_BNX2_NVM_ADDR_NVM_ADDR_VALUE,4,2 ; @BNX2_NVM_ADDR_NVM_ADDR_VALUE
	.comm	_NVRAM_TIMEOUT_COUNT,4,2        ; @NVRAM_TIMEOUT_COUNT
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_bnx2_nvram_erase_page
.subsections_via_symbols
