	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_sfp_read_eeprom
_xgbe_phy_sfp_read_eeprom:              ## @xgbe_phy_sfp_read_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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	callq	_xgbe_phy_sfp_get_mux
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movl	4(%r14), %r14d
	callq	_netdev_name
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_dev_err_once
	jmp	LBB0_14
LBB0_2:
	movq	$0, -48(%rbp)
	movq	_XGBE_SFP_SERIAL_ID_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %r8
	movq	%r14, %rdi
	movl	$8, %ecx
	movl	$16, %r9d
	callq	_xgbe_phy_i2c_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movl	(%r14), %edi
	movl	4(%r14), %r15d
	callq	_netdev_name
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	callq	_dev_err_once
	jmp	LBB0_13
LBB0_4:
	movq	-32(%rbp), %rsi
	movq	_XGBE_SFP_BASE_CC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rsi,%rax,4), %edi
	movl	$7, %edx
	callq	_xgbe_phy_sfp_verify_eeprom
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	-40(%rbp), %rsi
	movq	_XGBE_SFP_EXTD_CC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rsi,%rax,4), %edi
	movl	$7, %edx
	callq	_xgbe_phy_sfp_verify_eeprom
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	leaq	4(%r15), %rbx
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movl	$1, (%r15)
	movq	%r14, %rdi
	callq	_netif_msg_drv
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_xgbe_phy_sfp_eeprom_info
LBB0_10:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	%r14, %rdi
	callq	_xgbe_phy_free_phy_device
	jmp	LBB0_12
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_11:
	movl	$0, (%r15)
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_xgbe_phy_sfp_put_mux
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: I2C error setting SFP MUX\n"

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

	.comm	_XGBE_SFP_BASE_CC,8,3           ## @XGBE_SFP_BASE_CC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XGBE_SFP_EXTD_CC,8,3           ## @XGBE_SFP_EXTD_CC
	.no_dead_strip	_xgbe_phy_sfp_read_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_sfp_read_eeprom
_xgbe_phy_sfp_read_eeprom:              ; @xgbe_phy_sfp_read_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_xgbe_phy_sfp_get_mux
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldp	w0, w21, [x19]
	bl	_netdev_name
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err_once
	b	LBB0_13
LBB0_2:
	str	xzr, [sp, #8]
Lloh2:
	adrp	x8, _XGBE_SFP_SERIAL_ID_ADDRESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XGBE_SFP_SERIAL_ID_ADDRESS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #8
	add	x4, sp, #16
	mov	x0, x19
	mov	w3, #8
	mov	w5, #16
	bl	_xgbe_phy_i2c_read
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
	ldp	w0, w21, [x19]
	bl	_netdev_name
	mov	x2, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err_once
	b	LBB0_12
LBB0_4:
	ldr	x1, [sp, #24]
Lloh7:
	adrp	x8, _XGBE_SFP_BASE_CC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _XGBE_SFP_BASE_CC@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	w0, [x1, x8, lsl #2]
	mov	w2, #7
	bl	_xgbe_phy_sfp_verify_eeprom
	cbz	w0, LBB0_10
; %bb.5:
	ldr	x1, [sp, #16]
Lloh10:
	adrp	x8, _XGBE_SFP_EXTD_CC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _XGBE_SFP_EXTD_CC@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w0, [x1, x8, lsl #2]
	mov	w2, #7
	bl	_xgbe_phy_sfp_verify_eeprom
	cbz	w0, LBB0_10
; %bb.6:
	add	x20, x21, #4
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #16
	bl	_memcmp
	cbz	x0, LBB0_11
; %bb.7:
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x19
	bl	_netif_msg_drv
	cbz	x0, LBB0_9
; %bb.8:
	add	x1, sp, #16
	mov	x0, x19
	bl	_xgbe_phy_sfp_eeprom_info
LBB0_9:
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #16
	bl	_memcpy
	mov	x0, x19
	bl	_xgbe_phy_free_phy_device
	mov	w20, #0
	b	LBB0_12
LBB0_10:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_11:
	mov	w20, #0
	str	wzr, [x21]
LBB0_12:
	mov	x0, x19
	bl	_xgbe_phy_sfp_put_mux
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: I2C error setting SFP MUX\n"

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

	.comm	_XGBE_SFP_BASE_CC,8,3           ; @XGBE_SFP_BASE_CC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XGBE_SFP_EXTD_CC,8,3           ; @XGBE_SFP_EXTD_CC
	.no_dead_strip	_xgbe_phy_sfp_read_eeprom
.subsections_via_symbols
