	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_get_module_eeprom
_bnx2x_get_module_eeprom:               ## @bnx2x_get_module_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
	subq	$24, %rsp
	.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, %rbx
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%rbx), %r12d
	movq	%r15, %rdi
	callq	_bnx2x_is_nvm_accessible
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_bnx2x_get_cur_phy_idx
	movl	%eax, %ebx
	movq	_ETH_MODULE_SFF_8079_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r13d
	subl	%r12d, %r13d
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	jbe	LBB0_3
## %bb.4:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %ecx
	leal	(%rcx,%r12), %edx
	cmpl	%eax, %edx
	cmovbel	%ecx, %r13d
	movq	%r15, %rdi
	callq	_bnx2x_acquire_phy_lock
	movslq	%ebx, %rdi
	shlq	$2, %rdi
	addq	(%r15), %rdi
	movq	_I2C_DEV_ADDR_A0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r9
	callq	_bnx2x_read_sfp_module_eeprom
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_bnx2x_release_phy_lock
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	movq	_BNX2X_MSG_ETHTOOL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_1:
	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	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_3:
	negl	%r14d
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_6:
	movl	%r13d, %eax
	leaq	(%rbx,%rax,4), %rbx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	addl	%r13d, %r12d
	movq	_ETH_MODULE_SFF_8079_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
LBB0_7:
	movl	%r12d, %ebx
	subl	%eax, %ebx
	jb	LBB0_14
## %bb.8:
	movq	_ETH_MODULE_SFF_8472_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	subl	%r12d, %eax
	jbe	LBB0_14
## %bb.9:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	4(%rdx), %r14d
	subl	%r13d, %r14d
	addl	%r14d, %r12d
	cmpl	%ecx, %r12d
	cmoval	%eax, %r14d
	movq	%r15, %rdi
	callq	_bnx2x_acquire_phy_lock
	movslq	-52(%rbp), %rdi                 ## 4-byte Folded Reload
	shlq	$2, %rdi
	addq	(%r15), %rdi
	movq	_I2C_DEV_ADDR_A2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	movl	%ebx, %ecx
	movl	%r14d, %r8d
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	callq	_bnx2x_read_sfp_module_eeprom
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_bnx2x_release_phy_lock
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.11:
	movq	_BNX2X_MSG_ETHTOOL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_12:
	callq	_DP
	xorl	%r14d, %r14d
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_13:
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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
	.comm	_ETH_MODULE_SFF_8079_LEN,4,2    ## @ETH_MODULE_SFF_8079_LEN
	.comm	_I2C_DEV_ADDR_A0,4,2            ## @I2C_DEV_ADDR_A0
L_.str.1:                               ## @.str.1
	.asciz	"Failed reading A0 section\n"

	.comm	_ETH_MODULE_SFF_8472_LEN,4,2    ## @ETH_MODULE_SFF_8472_LEN
	.comm	_I2C_DEV_ADDR_A2,4,2            ## @I2C_DEV_ADDR_A2
L_.str.2:                               ## @.str.2
	.asciz	"Failed reading A2 section\n"

	.no_dead_strip	_bnx2x_get_module_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_get_module_eeprom
_bnx2x_get_module_eeprom:               ; @bnx2x_get_module_eeprom
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x21, x1
	bl	_netdev_priv
	mov	x20, x0
Lloh0:
	adrp	x26, _EINVAL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _EINVAL@GOTPAGEOFF]
	ldr	w25, [x26]
	ldr	w22, [x21]
	bl	_bnx2x_is_nvm_accessible
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_bnx2x_get_cur_phy_idx
	mov	x23, x0
Lloh2:
	adrp	x27, _ETH_MODULE_SFF_8079_LEN@GOTPAGE
Lloh3:
	ldr	x27, [x27, _ETH_MODULE_SFF_8079_LEN@GOTPAGEOFF]
	ldr	w8, [x27]
	subs	w9, w8, w22
	b.ls	LBB0_5
; %bb.2:
	ldr	w10, [x21, #4]
	add	w11, w10, w22
	cmp	w11, w8
	csel	w24, w9, w10, hi
	mov	x0, x20
	bl	_bnx2x_acquire_phy_lock
	ldr	x8, [x20]
	add	x0, x8, w23, sxtw #2
Lloh4:
	adrp	x8, _I2C_DEV_ADDR_A0@GOTPAGE
Lloh5:
	ldr	x8, [x8, _I2C_DEV_ADDR_A0@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x1, x20
	mov	x3, x22
	mov	x4, x24
	mov	x5, x19
	bl	_bnx2x_read_sfp_module_eeprom
	mov	x25, x0
	mov	x0, x20
	bl	_bnx2x_release_phy_lock
	cbz	w25, LBB0_6
; %bb.3:
Lloh7:
	adrp	x8, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_4:
Lloh12:
	adrp	x8, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _BNX2X_MSG_NVM@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BNX2X_MSG_NVM@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP
Lloh20:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	b	LBB0_11
LBB0_5:
	mov	w24, #0
	neg	w0, w25
	subs	w25, w22, w8
	b.hs	LBB0_7
	b	LBB0_12
LBB0_6:
	mov	w0, #0
	add	x19, x19, w24, uxtw #2
	add	w22, w24, w22
	ldr	w8, [x27]
	subs	w25, w22, w8
	b.lo	LBB0_12
LBB0_7:
Lloh23:
	adrp	x8, _ETH_MODULE_SFF_8472_LEN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETH_MODULE_SFF_8472_LEN@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	subs	w9, w8, w22
	b.ls	LBB0_12
; %bb.8:
	ldr	w10, [x21, #4]
	sub	w10, w10, w24
	add	w11, w10, w22
	cmp	w11, w8
	csel	w21, w9, w10, hi
	mov	x0, x20
	bl	_bnx2x_acquire_phy_lock
	ldr	x8, [x20]
	add	x0, x8, w23, sxtw #2
Lloh26:
	adrp	x8, _I2C_DEV_ADDR_A2@GOTPAGE
Lloh27:
	ldr	x8, [x8, _I2C_DEV_ADDR_A2@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x1, x20
	mov	x3, x25
	mov	x4, x21
	mov	x5, x19
	bl	_bnx2x_read_sfp_module_eeprom
	mov	x19, x0
	mov	x0, x20
	bl	_bnx2x_release_phy_lock
	cbz	w19, LBB0_13
; %bb.9:
Lloh29:
	adrp	x8, _BNX2X_MSG_ETHTOOL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BNX2X_MSG_ETHTOOL@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	bl	_DP
	ldr	w8, [x26]
LBB0_11:
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.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
	.comm	_ETH_MODULE_SFF_8079_LEN,4,2    ; @ETH_MODULE_SFF_8079_LEN
	.comm	_I2C_DEV_ADDR_A0,4,2            ; @I2C_DEV_ADDR_A0
l_.str.1:                               ; @.str.1
	.asciz	"Failed reading A0 section\n"

	.comm	_ETH_MODULE_SFF_8472_LEN,4,2    ; @ETH_MODULE_SFF_8472_LEN
	.comm	_I2C_DEV_ADDR_A2,4,2            ; @I2C_DEV_ADDR_A2
l_.str.2:                               ; @.str.2
	.asciz	"Failed reading A2 section\n"

	.no_dead_strip	_bnx2x_get_module_eeprom
.subsections_via_symbols
