	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_warpcore_read_sfp_module_eeprom
_bnx2x_warpcore_read_sfp_module_eeprom: ## @bnx2x_warpcore_read_sfp_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SFP_EEPROM_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpq	%r8, (%rax)
	jge	LBB0_2
## %bb.1:
	movq	_NETIF_MSG_LINK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DP
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_2:
	movq	%rsi, %rbx
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	(%rsi), %r14
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r15d
	andl	$-4, %r15d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 16(%rbp)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_I2C_WA_PWR_ITER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_bnx2x_warpcore_power_module
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_bnx2x_warpcore_power_module
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	-64(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	callq	_bnx2x_bsc_read
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r12d
	incq	%r13
	movq	_I2C_WA_RETRY_CNT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jl	LBB0_3
	jmp	LBB0_10
LBB0_8:
	xorl	%r12d, %r12d
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	jle	LBB0_10
## %bb.9:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	andl	$3, %ecx
	addq	%rcx, %rdx
	leaq	-64(,%rcx,8), %rsi
	addq	%rbp, %rsi
	leaq	1(%rcx), %rax
	cmpq	%rax, %rdx
	cmovleq	%rax, %rdx
	subq	%rcx, %rdx
	shlq	$3, %rdx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_memcpy
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SFP_EEPROM_PAGE_SIZE,8,3       ## @SFP_EEPROM_PAGE_SIZE
	.comm	_NETIF_MSG_LINK,4,2             ## @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reading from eeprom is limited to 16 bytes\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_WA_PWR_ITER,8,3            ## @I2C_WA_PWR_ITER
	.comm	_I2C_WA_RETRY_CNT,8,3           ## @I2C_WA_RETRY_CNT
	.no_dead_strip	_bnx2x_warpcore_read_sfp_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_warpcore_read_sfp_module_eeprom
_bnx2x_warpcore_read_sfp_module_eeprom: ; @bnx2x_warpcore_read_sfp_module_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _SFP_EEPROM_PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SFP_EEPROM_PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x4
	b.ge	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _NETIF_MSG_LINK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NETIF_MSG_LINK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DP
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_2:
	mov	x22, x6
	mov	x20, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	str	x5, [sp]                        ; 8-byte Folded Spill
	mov	x27, #0
	ldr	x25, [x1]
	and	w26, w3, #0xfffffffc
Lloh14:
	adrp	x28, _I2C_WA_PWR_ITER@GOTPAGE
Lloh15:
	ldr	x28, [x28, _I2C_WA_PWR_ITER@GOTPAGEOFF]
Lloh16:
	adrp	x19, _I2C_WA_RETRY_CNT@GOTPAGE
Lloh17:
	ldr	x19, [x19, _I2C_WA_RETRY_CNT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	x22, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x28]
	cmp	x27, x8
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x24
	mov	w1, #0
	bl	_bnx2x_warpcore_power_module
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	mov	x0, x24
	mov	w1, #1
	bl	_bnx2x_warpcore_power_module
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x6, sp, #8
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	mov	x3, x26
	mov	w4, #0
	mov	x5, x20
	bl	_bnx2x_bsc_read
	cbz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x27, #1
	ldr	x8, [x19]
	cmp	x27, x8
	b.lt	LBB0_3
	b	LBB0_11
LBB0_8:
	cmp	x20, #1
	b.lt	LBB0_10
; %bb.9:
	and	w8, w21, #0x3
	add	x9, sp, #8
	add	x1, x9, w8, uxtw #3
	add	x9, x8, #1
	add	x10, x8, x20
	cmp	x10, x9
	csinc	x9, x10, x8, gt
	sub	x8, x9, x8
	lsl	x2, x8, #3
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_memcpy
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldr	x8, [sp, #24]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SFP_EEPROM_PAGE_SIZE,8,3       ; @SFP_EEPROM_PAGE_SIZE
	.comm	_NETIF_MSG_LINK,4,2             ; @NETIF_MSG_LINK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reading from eeprom is limited to 16 bytes\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_WA_PWR_ITER,8,3            ; @I2C_WA_PWR_ITER
	.comm	_I2C_WA_RETRY_CNT,8,3           ; @I2C_WA_RETRY_CNT
	.no_dead_strip	_bnx2x_warpcore_read_sfp_module_eeprom
.subsections_via_symbols
