	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_nvram_write
_bnx2x_nvram_write:                     ## @bnx2x_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r14
	cmpl	$1, %ecx
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bnx2x_nvram_write1             ## TAILCALL
LBB0_2:
	movl	%ecx, %r12d
	testb	$3, %bl
	je	LBB0_6
LBB0_3:
	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
	xorl	%r13d, %r13d
	movl	%ebx, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_DP
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.7:
	movl	%r12d, %eax
	andl	$3, %eax
	jne	LBB0_3
## %bb.8:
	leal	(%r12,%rbx), %eax
	movl	(%r14), %r8d
	cmpl	%r8d, %eax
	jle	LBB0_10
## %bb.9:
	movq	_BNX2X_MSG_ETHTOOL@GOTPCREL(%rip), %rax
	movq	_BNX2X_MSG_NVM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r13d, %r13d
	movl	%ebx, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_DP
	jmp	LBB0_4
LBB0_10:
	movq	%r14, %rdi
	callq	_bnx2x_acquire_nvram_lock
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.11:
	movq	%r14, %rdi
	callq	_bnx2x_enable_nvram_access
	testl	%r12d, %r12d
	jle	LBB0_15
## %bb.12:
	movq	_MCPR_NVM_COMMAND_FIRST@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r12d, %eax
	addq	$-4, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_16
## %bb.13:
	leal	4(%rbx), %esi
	movq	_BNX2X_NVRAM_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	%esi, %eax
	cltd
	idivl	(%rcx)
	testl	%edx, %edx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_17
## %bb.14:
	movq	_MCPR_NVM_COMMAND_LAST@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	jmp	LBB0_17
LBB0_15:
	xorl	%r13d, %r13d
	jmp	LBB0_30
LBB0_16:
	movq	_MCPR_NVM_COMMAND_LAST@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	leal	4(%rbx), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_17:
	leaq	-44(%rbp), %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r13d, %ecx
	callq	_bnx2x_nvram_write_dword
	movl	%eax, %r13d
	cmpl	$5, %r12d
	jb	LBB0_30
## %bb.18:
	testl	%r13d, %r13d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_30
## %bb.19:
	addq	$16, %r15
	movl	$4, %ebx
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rax
	cmpq	%rax, -72(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_MCPR_NVM_COMMAND_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	leal	4(%rsi), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_27
LBB0_22:                                ##   in Loop: Header=BB0_20 Depth=1
	leal	4(%rsi), %edi
	movq	_BNX2X_NVRAM_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	movl	%edi, -60(%rbp)                 ## 4-byte Spill
	je	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%rsi, %r13
	movl	%esi, %eax
	cltd
	idivl	%ecx
	xorl	%eax, %eax
	testl	%edx, %edx
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	_MCPR_NVM_COMMAND_FIRST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_25:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_28
LBB0_26:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	_MCPR_NVM_COMMAND_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
LBB0_27:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%rsi, %r13
LBB0_28:                                ##   in Loop: Header=BB0_20 Depth=1
	leaq	-44(%rbp), %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	callq	_bnx2x_nvram_write_dword
	movl	%eax, %r13d
	addl	$4, %ebx
	cmpl	%r12d, %ebx
	jge	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_20 Depth=1
	addq	$16, %r15
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %esi
	testl	%r13d, %r13d
	je	LBB0_20
LBB0_30:
	movq	%r14, %rdi
	callq	_bnx2x_disable_nvram_access
	movq	%r14, %rdi
	callq	_bnx2x_release_nvram_lock
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.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	"Invalid parameter: offset 0x%x  buf_size 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Invalid parameter: offset (0x%x) + buf_size (0x%x) > flash_size (0x%x)\n"

	.comm	_MCPR_NVM_COMMAND_FIRST,4,2     ## @MCPR_NVM_COMMAND_FIRST
	.comm	_MCPR_NVM_COMMAND_LAST,4,2      ## @MCPR_NVM_COMMAND_LAST
	.comm	_BNX2X_NVRAM_PAGE_SIZE,4,2      ## @BNX2X_NVRAM_PAGE_SIZE
	.no_dead_strip	_bnx2x_nvram_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_nvram_write
_bnx2x_nvram_write:                     ; @bnx2x_nvram_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
	cmp	w3, #1
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_bnx2x_nvram_write1
LBB0_2:
	mov	x19, x3
	tst	w21, #0x3
	b.eq	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BNX2X_MSG_NVM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BNX2X_MSG_NVM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x2, x21
	mov	x3, x19
	bl	_DP
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_5:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	cbz	w19, LBB0_3
; %bb.7:
	and	w8, w19, #0x3
	cbnz	w8, LBB0_3
; %bb.8:
	ldr	w8, [x20]
	add	w9, w19, w21
	cmp	w9, w8
	b.le	LBB0_10
; %bb.9:
Lloh11:
	adrp	x9, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _BNX2X_MSG_NVM@GOTPAGE
Lloh15:
	ldr	x10, [x10, _BNX2X_MSG_NVM@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w0, w10, w9
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_10:
	mov	x0, x20
	bl	_bnx2x_acquire_nvram_lock
	mov	x24, x0
	cbnz	w0, LBB0_5
; %bb.11:
	mov	x0, x20
	bl	_bnx2x_enable_nvram_access
	cmp	w19, #1
	b.lt	LBB0_15
; %bb.12:
Lloh19:
	adrp	x8, _MCPR_NVM_COMMAND_FIRST@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MCPR_NVM_COMMAND_FIRST@GOTPAGEOFF]
Lloh21:
	ldr	w24, [x8]
	mov	w8, w19
Lloh22:
	adrp	x9, _BNX2X_NVRAM_PAGE_SIZE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _BNX2X_NVRAM_PAGE_SIZE@GOTPAGEOFF]
	subs	x27, x8, #4
	b.eq	LBB0_16
; %bb.13:
	add	w22, w21, #4
	ldr	w8, [x9]
	sdiv	w9, w22, w8
	msub	w8, w9, w8, w22
	cbnz	w8, LBB0_17
; %bb.14:
Lloh24:
	adrp	x8, _MCPR_NVM_COMMAND_LAST@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MCPR_NVM_COMMAND_LAST@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w24, w8, w24
	b	LBB0_17
LBB0_15:
	mov	w24, #0
	b	LBB0_27
LBB0_16:
Lloh27:
	adrp	x8, _MCPR_NVM_COMMAND_LAST@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MCPR_NVM_COMMAND_LAST@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	orr	w24, w8, w24
	add	w22, w21, #4
LBB0_17:
	add	x0, sp, #12
	mov	x1, x23
	mov	w2, #4
	bl	_memcpy
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x24
	bl	_bnx2x_nvram_write_dword
	mov	x24, x0
	cmp	w19, #5
	b.lo	LBB0_27
; %bb.18:
	cbnz	w24, LBB0_27
; %bb.19:
	add	x21, x23, #16
	mov	w28, #4
Lloh30:
	adrp	x25, _MCPR_NVM_COMMAND_LAST@GOTPAGE
Lloh31:
	ldr	x25, [x25, _MCPR_NVM_COMMAND_LAST@GOTPAGEOFF]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	cmp	x27, w28, sxtw
	b.ne	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	w23, [x25]
	add	w26, w22, #4
	b	LBB0_25
LBB0_22:                                ;   in Loop: Header=BB0_20 Depth=1
	add	w26, w22, #4
Lloh32:
	adrp	x8, _BNX2X_NVRAM_PAGE_SIZE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BNX2X_NVRAM_PAGE_SIZE@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	sdiv	w9, w26, w8
	msub	w9, w9, w8, w26
	cbz	w9, LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=1
	sdiv	w9, w22, w8
	msub	w8, w9, w8, w22
Lloh35:
	adrp	x9, _MCPR_NVM_COMMAND_FIRST@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MCPR_NVM_COMMAND_FIRST@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w23, w9, wzr, eq
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	w23, [x25]
LBB0_25:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x0, sp, #12
	mov	x1, x21
	mov	w2, #4
	bl	_memcpy
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x23
	bl	_bnx2x_nvram_write_dword
	mov	x24, x0
	add	w28, w28, #4
	cmp	w28, w19
	b.ge	LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x21, x21, #16
	mov	x22, x26
	cbz	w24, LBB0_20
LBB0_27:
	mov	x0, x20
	bl	_bnx2x_disable_nvram_access
	mov	x0, x20
	bl	_bnx2x_release_nvram_lock
	b	LBB0_5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.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	"Invalid parameter: offset 0x%x  buf_size 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Invalid parameter: offset (0x%x) + buf_size (0x%x) > flash_size (0x%x)\n"

	.comm	_MCPR_NVM_COMMAND_FIRST,4,2     ; @MCPR_NVM_COMMAND_FIRST
	.comm	_MCPR_NVM_COMMAND_LAST,4,2      ; @MCPR_NVM_COMMAND_LAST
	.comm	_BNX2X_NVRAM_PAGE_SIZE,4,2      ; @BNX2X_NVRAM_PAGE_SIZE
	.no_dead_strip	_bnx2x_nvram_write
.subsections_via_symbols
