	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_module_eeprom
_xgbe_phy_module_eeprom:                ## @xgbe_phy_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	%rsp, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_XGBE_SFP_EEPROM_MAX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	movl	(%r13), %r12d
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.2:
	movl	4(%r13), %eax
	addl	%r12d, %eax
	cmpl	(%rbx), %eax
	jbe	LBB0_5
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	jmp	LBB0_4
LBB0_5:
	movq	8(%r15), %rbx
	movq	(%rbx), %rax
	movq	_XGBE_PORT_MODE_SFP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	(%r15), %edi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	cmpq	$0, 8(%rbx)
	jne	LBB0_8
## %bb.10:
	movq	%r15, %rbx
	movq	%r15, %rdi
	callq	_xgbe_phy_get_comm_ownership
	testl	%eax, %eax
	je	LBB0_11
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_29:
	subl	%r12d, (%r13)
	movq	%r14, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.30:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%rbx, %rdi
	callq	_xgbe_phy_sfp_get_mux
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	%rbx, %r15
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_28
LBB0_13:
	movq	$0, -64(%rbp)
	movq	_XGBE_SFP_SERIAL_ID_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XGBE_SFP_EEPROM_BASE_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_xgbe_phy_i2c_read
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	leaq	L_.str.1(%rip), %rsi
LBB0_15:
	movl	(%r15), %edi
	callq	_netdev_err
	movq	%r15, %rdi
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_27:
	movq	%rdi, %r15
	callq	_xgbe_phy_sfp_put_mux
LBB0_28:
	movq	%r15, %rdi
	callq	_xgbe_phy_put_comm_ownership
	jmp	LBB0_29
LBB0_16:
	movq	%rbx, %rdi
	callq	_XGBE_SFP_DIAGS_SUPPORTED
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movq	$0, -64(%rbp)
	movq	_XGBE_SFP_DIAG_INFO_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XGBE_SFP_EEPROM_BASE_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,8), %r8
	movq	_XGBE_SFP_EEPROM_DIAG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movl	$8, %ecx
	callq	_xgbe_phy_i2c_read
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_19:
	movl	(%r13), %r8d
	testl	%r8d, %r8d
	je	LBB0_20
## %bb.21:
	movl	4(%r13), %ebx
	xorl	%eax, %eax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	_XGBE_SFP_EEPROM_BASE_LEN@GOTPCREL(%rip), %rsi
	jmp	LBB0_22
LBB0_25:                                ##   in Loop: Header=BB0_22 Depth=1
	movl	%ecx, %ecx
	movq	(%r9,%rcx,8), %rcx
	movq	%rcx, (%rdx,%rax,8)
	decl	%r12d
	incq	%rax
	movl	%r8d, %ecx
	cmpq	%rcx, %rax
	jae	LBB0_26
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%rax), %rcx
	cmpl	(%rsi), %ecx
	jb	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r9, %rdi
	callq	_XGBE_SFP_DIAGS_SUPPORTED
	testq	%rax, %rax
	je	LBB0_20
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	(%r13), %r8d
	movq	%r15, %rdi
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	_XGBE_SFP_EEPROM_BASE_LEN@GOTPCREL(%rip), %rsi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_20:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	jmp	LBB0_27
LBB0_26:
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_XGBE_SFP_EEPROM_MAX,4,2        ## @XGBE_SFP_EEPROM_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XGBE_PORT_MODE_SFP,8,3         ## @XGBE_PORT_MODE_SFP
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C error setting SFP MUX\n"

	.comm	_XGBE_SFP_SERIAL_ID_ADDRESS,4,2 ## @XGBE_SFP_SERIAL_ID_ADDRESS
	.comm	_XGBE_SFP_EEPROM_BASE_LEN,4,2   ## @XGBE_SFP_EEPROM_BASE_LEN
L_.str.1:                               ## @.str.1
	.asciz	"I2C error reading SFP EEPROM\n"

	.comm	_XGBE_SFP_DIAG_INFO_ADDRESS,4,2 ## @XGBE_SFP_DIAG_INFO_ADDRESS
	.comm	_XGBE_SFP_EEPROM_DIAG_LEN,4,2   ## @XGBE_SFP_EEPROM_DIAG_LEN
L_.str.2:                               ## @.str.2
	.asciz	"I2C error reading SFP DIAGS\n"

	.no_dead_strip	_xgbe_phy_module_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_module_eeprom
_xgbe_phy_module_eeprom:                ; @xgbe_phy_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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x25, [x0, #8]
Lloh3:
	adrp	x12, _XGBE_SFP_EEPROM_MAX@GOTPAGE
Lloh4:
	ldr	x12, [x12, _XGBE_SFP_EEPROM_MAX@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w24, [x1]
	cbz	w24, LBB0_2
; %bb.1:
	ldr	w8, [x19, #4]
	ldr	w9, [x12]
	add	w8, w8, w24
	cmp	w8, w9
	b.ls	LBB0_6
LBB0_2:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	ldr	w8, [x19]
	sub	w8, w8, w24
	str	w8, [x19]
	mov	sp, x23
	ldur	x8, [x29, #-88]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.5:
	mov	x0, x21
	sub	sp, x29, #80
	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_6:
	ldr	x8, [x25]
Lloh12:
	adrp	x9, _XGBE_PORT_MODE_SFP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _XGBE_PORT_MODE_SFP@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
	ldr	w0, [x20]
	bl	_netif_running
	cbz	w0, LBB0_10
; %bb.8:
	ldr	x8, [x25, #8]
	cbnz	x8, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_xgbe_phy_get_comm_ownership
	cbz	w0, LBB0_12
LBB0_10:
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_3
LBB0_11:
Lloh17:
	adrp	x8, _ENXIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_3
LBB0_12:
	mov	x0, x20
	bl	_xgbe_phy_sfp_get_mux
	cbz	w0, LBB0_14
; %bb.13:
	ldr	w0, [x20]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
Lloh21:
	adrp	x8, _EIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_28
LBB0_14:
	stur	xzr, [x29, #-96]
Lloh24:
	adrp	x8, _XGBE_SFP_SERIAL_ID_ADDRESS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _XGBE_SFP_SERIAL_ID_ADDRESS@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x25, _XGBE_SFP_EEPROM_BASE_LEN@GOTPAGE
Lloh28:
	ldr	x25, [x25, _XGBE_SFP_EEPROM_BASE_LEN@GOTPAGEOFF]
	ldr	w5, [x25]
	sub	x2, x29, #96
	mov	x0, x20
	mov	w3, #8
	mov	x4, x22
	bl	_xgbe_phy_i2c_read
	cbz	w0, LBB0_17
; %bb.15:
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	ldr	w0, [x20]
	bl	_netdev_err
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_27
LBB0_17:
	mov	x0, x22
	bl	_XGBE_SFP_DIAGS_SUPPORTED
	cbz	x0, LBB0_20
; %bb.18:
	stur	xzr, [x29, #-96]
Lloh34:
	adrp	x8, _XGBE_SFP_DIAG_INFO_ADDRESS@GOTPAGE
Lloh35:
	ldr	x8, [x8, _XGBE_SFP_DIAG_INFO_ADDRESS@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldrsw	x8, [x25]
	add	x4, x22, x8, lsl #3
Lloh37:
	adrp	x8, _XGBE_SFP_EEPROM_DIAG_LEN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _XGBE_SFP_EEPROM_DIAG_LEN@GOTPAGEOFF]
Lloh39:
	ldr	w5, [x8]
	sub	x2, x29, #96
	mov	x0, x20
	mov	w3, #8
	bl	_xgbe_phy_i2c_read
	cbz	w0, LBB0_20
; %bb.19:
Lloh40:
	adrp	x1, l_.str.2@PAGE
Lloh41:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_20:
	ldr	w8, [x19]
	cbz	w8, LBB0_26
; %bb.21:
	mov	x26, #0
	ldr	w27, [x19, #4]
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	ldr	x9, [x22, w28, uxtw #3]
	str	x9, [x21, x26, lsl #3]
	sub	w24, w24, #1
	add	x26, x26, #1
	cmp	x26, w8, uxtw
	b.hs	LBB0_26
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x25]
	add	x28, x27, x26
	cmp	w28, w9
	b.lo	LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	x0, x22
	bl	_XGBE_SFP_DIAGS_SUPPORTED
	cbz	x0, LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	w8, [x19]
	b	LBB0_22
LBB0_26:
	mov	w21, #0
LBB0_27:
	mov	x0, x20
	bl	_xgbe_phy_sfp_put_mux
LBB0_28:
	mov	x0, x20
	bl	_xgbe_phy_put_comm_ownership
	b	LBB0_4
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_XGBE_SFP_EEPROM_MAX,4,2        ; @XGBE_SFP_EEPROM_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XGBE_PORT_MODE_SFP,8,3         ; @XGBE_PORT_MODE_SFP
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C error setting SFP MUX\n"

	.comm	_XGBE_SFP_SERIAL_ID_ADDRESS,4,2 ; @XGBE_SFP_SERIAL_ID_ADDRESS
	.comm	_XGBE_SFP_EEPROM_BASE_LEN,4,2   ; @XGBE_SFP_EEPROM_BASE_LEN
l_.str.1:                               ; @.str.1
	.asciz	"I2C error reading SFP EEPROM\n"

	.comm	_XGBE_SFP_DIAG_INFO_ADDRESS,4,2 ; @XGBE_SFP_DIAG_INFO_ADDRESS
	.comm	_XGBE_SFP_EEPROM_DIAG_LEN,4,2   ; @XGBE_SFP_EEPROM_DIAG_LEN
l_.str.2:                               ; @.str.2
	.asciz	"I2C error reading SFP DIAGS\n"

	.no_dead_strip	_xgbe_phy_module_eeprom
.subsections_via_symbols
