	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_set_eeprom
_bnx2x_set_eeprom:                      ## @bnx2x_set_eeprom
	.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	%rdx, %r13
	movq	%rsi, %r15
	callq	_netdev_priv
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_BP_PORT
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_bnx2x_is_nvm_accessible
	movq	_BNX2X_MSG_ETHTOOL@GOTPCREL(%rip), %rcx
	movq	_BNX2X_MSG_NVM@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	orl	(%rcx), %edi
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r13d
	movl	12(%r15), %edx
	movl	8(%r15), %r8d
	movl	(%r15), %ecx
	movl	4(%r15), %ebx
	leaq	L_.str.1(%rip), %rsi
	movl	%r8d, %r9d
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%rbx
	callq	_DP
	addq	$16, %rsp
	movl	$-256, %eax
	andl	(%r15), %eax
	cmpl	$1346918656, %eax               ## imm = 0x50485900
	jne	LBB0_3
## %bb.2:
	cmpl	$0, 20(%r12)
	je	LBB0_15
LBB0_3:
	movq	_dev_info@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r13d, %ebx
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r12, %rdi
	callq	_SHMEM_RD
	movl	%eax, %r13d
	movl	(%r15), %eax
	cmpl	$1402493251, %eax               ## imm = 0x53985943
	je	LBB0_10
## %bb.4:
	cmpl	$1346918738, %eax               ## imm = 0x50485952
	je	LBB0_12
## %bb.5:
	cmpl	$1346918736, %eax               ## imm = 0x50485950
	jne	LBB0_14
## %bb.6:
	movq	_STATS_EVENT_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_bnx2x_stats_handle
	movq	%r12, %rdi
	callq	_bnx2x_acquire_phy_lock
	leaq	8(%r12), %rdi
	movq	%r12, %rsi
	addq	$16, %rsi
	xorl	%edx, %edx
	callq	_bnx2x_link_reset
	movl	%eax, %r15d
	movl	%r13d, %edi
	callq	_XGXS_EXT_PHY_TYPE
	movq	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_MISC_REGISTERS_GPIO_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MISC_REGISTERS_GPIO_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %ecx
	callq	_bnx2x_set_gpio
LBB0_8:
	movq	%r12, %rdi
	callq	_bnx2x_release_phy_lock
	movq	%r12, %rdi
	callq	_bnx2x_link_report
	jmp	LBB0_17
LBB0_9:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DP
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_10:
	movl	%r13d, %edi
	callq	_XGXS_EXT_PHY_TYPE
	movq	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.11:
	movq	_MISC_REGISTERS_GPIO_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MISC_REGISTERS_GPIO_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%ebx, %ecx
	callq	_bnx2x_set_gpio
	movq	%r12, %rdi
	callq	_bnx2x_acquire_phy_lock
	movq	_EXT_PHY1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	8(%r12), %rsi
	movq	%r12, %rdi
	callq	_bnx2x_sfx7101_sp_sw_reset
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_bnx2x_ext_phy_hw_reset
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
	movq	%r12, %rdi
	callq	_bnx2x_release_phy_lock
	jmp	LBB0_17
LBB0_12:
	movq	(%r12), %rax
	movq	_BNX2X_STATE_OPEN@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.13:
	movq	%r12, %rdi
	callq	_bnx2x_acquire_phy_lock
	leaq	8(%r12), %r14
	movq	%r12, %rbx
	addq	$16, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_bnx2x_link_reset
	movl	%eax, %r13d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bnx2x_phy_init
	movl	%eax, %r15d
	orl	%r13d, %r15d
	movq	%r12, %rdi
	callq	_bnx2x_release_phy_lock
	movq	%r12, %rdi
	callq	_bnx2x_calc_fc_adv
	jmp	LBB0_17
LBB0_14:
	movl	4(%r15), %ecx
	movl	8(%r15), %esi
	movq	%r12, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bnx2x_nvram_write              ## TAILCALL
LBB0_15:
	movl	(%r14), %edi
	movq	_BNX2X_MSG_ETHTOOL@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_DP
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_16:
	subl	(%rax), %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	"cannot access eeprom when the interface is down\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.1:                               ## @.str.1
	.asciz	"ethtool_eeprom: cmd %d\n  magic 0x%x  offset 0x%x (%d)  len 0x%x (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"wrong magic or interface is not pmf\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_dev_info,8,3                   ## @dev_info
	.comm	_STATS_EVENT_STOP,4,2           ## @STATS_EVENT_STOP
	.comm	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101,8,3 ## @PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101
	.comm	_MISC_REGISTERS_GPIO_0,4,2      ## @MISC_REGISTERS_GPIO_0
	.comm	_MISC_REGISTERS_GPIO_HIGH,4,2   ## @MISC_REGISTERS_GPIO_HIGH
	.comm	_BNX2X_STATE_OPEN,8,3           ## @BNX2X_STATE_OPEN
	.comm	_MISC_REGISTERS_GPIO_LOW,4,2    ## @MISC_REGISTERS_GPIO_LOW
	.comm	_EXT_PHY1,8,3                   ## @EXT_PHY1
	.no_dead_strip	_bnx2x_set_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_set_eeprom
_bnx2x_set_eeprom:                      ; @bnx2x_set_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x2
	mov	x22, x1
	bl	_netdev_priv
	mov	x19, x0
	bl	_BP_PORT
	mov	x20, x0
	mov	x0, x19
	bl	_bnx2x_is_nvm_accessible
	mov	x8, x0
Lloh0:
	adrp	x23, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh2:
	adrp	x24, _BNX2X_MSG_NVM@GOTPAGE
Lloh3:
	ldr	x24, [x24, _BNX2X_MSG_NVM@GOTPAGEOFF]
	ldr	w10, [x24]
	orr	w0, w10, w9
	cbz	w8, LBB0_9
; %bb.1:
	ldp	w9, w8, [x22, #8]
	ldp	w10, w11, [x22]
	stp	x11, x11, [sp, #32]
	stp	x9, x9, [sp, #16]
	stp	x8, x10, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DP
	ldr	w8, [x22]
	mov	w9, #18521
	movk	w9, #80, lsl #16
	cmp	w9, w8, lsr #8
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_16
LBB0_3:
Lloh6:
	adrp	x8, _dev_info@GOTPAGE
Lloh7:
	ldr	x8, [x8, _dev_info@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w1, [x8, w20, sxtw #2]
	mov	x0, x19
	bl	_SHMEM_RD
	mov	x23, x0
	ldr	w8, [x22]
	mov	w9, #22851
	movk	w9, #21400, lsl #16
	cmp	w8, w9
	b.eq	LBB0_10
; %bb.4:
	mov	w9, #22866
	movk	w9, #20552, lsl #16
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.5:
	mov	w9, #22864
	movk	w9, #20552, lsl #16
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.6:
Lloh9:
	adrp	x8, _STATS_EVENT_STOP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STATS_EVENT_STOP@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bnx2x_stats_handle
	mov	x0, x19
	bl	_bnx2x_acquire_phy_lock
	add	x0, x19, #8
	add	x1, x19, #16
	mov	w2, #0
	bl	_bnx2x_link_reset
	mov	x21, x0
	mov	x0, x23
	bl	_XGXS_EXT_PHY_TYPE
Lloh12:
	adrp	x8, _PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.7:
Lloh15:
	adrp	x8, _MISC_REGISTERS_GPIO_0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_0@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _MISC_REGISTERS_GPIO_HIGH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_HIGH@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x20
	bl	_bnx2x_set_gpio
LBB0_8:
	mov	x0, x19
	bl	_bnx2x_release_phy_lock
	mov	x0, x19
	bl	_bnx2x_link_report
	b	LBB0_18
LBB0_9:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP
Lloh23:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_17
LBB0_10:
	mov	x0, x23
	bl	_XGXS_EXT_PHY_TYPE
Lloh25:
	adrp	x8, _PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.11:
Lloh28:
	adrp	x8, _MISC_REGISTERS_GPIO_0@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_0@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _MISC_REGISTERS_GPIO_LOW@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MISC_REGISTERS_GPIO_LOW@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x20
	bl	_bnx2x_set_gpio
	mov	x0, x19
	bl	_bnx2x_acquire_phy_lock
	ldr	x8, [x19, #8]
Lloh34:
	adrp	x9, _EXT_PHY1@GOTPAGE
Lloh35:
	ldr	x9, [x9, _EXT_PHY1@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_bnx2x_sfx7101_sp_sw_reset
	mov	w0, #500
	bl	_msleep
	mov	x0, x19
	mov	x1, x20
	bl	_bnx2x_ext_phy_hw_reset
	mov	w0, #500
	bl	_msleep
	mov	x0, x19
	bl	_bnx2x_release_phy_lock
	mov	w21, #0
	b	LBB0_18
LBB0_12:
	ldr	x8, [x19]
Lloh37:
	adrp	x9, _BNX2X_STATE_OPEN@GOTPAGE
Lloh38:
	ldr	x9, [x9, _BNX2X_STATE_OPEN@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_bnx2x_acquire_phy_lock
	add	x20, x19, #8
	add	x21, x19, #16
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_bnx2x_link_reset
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	bl	_bnx2x_phy_init
	orr	w21, w0, w22
	mov	x0, x19
	bl	_bnx2x_release_phy_lock
	mov	x0, x19
	bl	_bnx2x_calc_fc_adv
	b	LBB0_18
LBB0_14:
	mov	w21, #0
	b	LBB0_18
LBB0_15:
	ldp	w3, w1, [x22, #4]
	mov	x0, x19
	mov	x2, x21
	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
	add	sp, sp, #112
	b	_bnx2x_nvram_write
LBB0_16:
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w0, w9, w8
Lloh40:
	adrp	x1, l_.str.2@PAGE
Lloh41:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DP
Lloh42:
	adrp	x8, _EINVAL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_18:
	mov	x0, x21
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.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	"cannot access eeprom when the interface is down\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.1:                               ; @.str.1
	.asciz	"ethtool_eeprom: cmd %d\n  magic 0x%x  offset 0x%x (%d)  len 0x%x (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"wrong magic or interface is not pmf\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_dev_info,8,3                   ; @dev_info
	.comm	_STATS_EVENT_STOP,4,2           ; @STATS_EVENT_STOP
	.comm	_PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101,8,3 ; @PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101
	.comm	_MISC_REGISTERS_GPIO_0,4,2      ; @MISC_REGISTERS_GPIO_0
	.comm	_MISC_REGISTERS_GPIO_HIGH,4,2   ; @MISC_REGISTERS_GPIO_HIGH
	.comm	_BNX2X_STATE_OPEN,8,3           ; @BNX2X_STATE_OPEN
	.comm	_MISC_REGISTERS_GPIO_LOW,4,2    ; @MISC_REGISTERS_GPIO_LOW
	.comm	_EXT_PHY1,8,3                   ; @EXT_PHY1
	.no_dead_strip	_bnx2x_set_eeprom
.subsections_via_symbols
