	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phy_init_eee                   ## -- Begin function phy_init_eee
	.p2align	4, 0x90
_phy_init_eee:                          ## @phy_init_eee
	.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	_EPROTONOSUPPORT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	(%rdi), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	_PHY_INTERFACE_MODE_MII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:
	movq	_PHY_INTERFACE_MODE_GMII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.3:
	movq	_PHY_INTERFACE_MODE_RGMII@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
LBB0_5:
	movl	%ebx, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	callq	_phy_read_status
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:
	movl	16(%r15), %ecx
	movl	20(%r15), %edi
	movq	_MDIO_PCS_EEE_ABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MDIO_MMD_PCS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_phy_read_mmd_indirect
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_7
## %bb.9:
	movl	%r12d, %edi
	callq	_mmd_eee_cap_to_ethtool_sup_t
	testl	%eax, %eax
	je	LBB0_5
## %bb.10:
	movl	16(%r15), %ecx
	movl	20(%r15), %edi
	movq	_MDIO_AN_EEE_LPABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MDIO_MMD_AN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_phy_read_mmd_indirect
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_7
## %bb.11:
	movl	16(%r15), %ecx
	movl	20(%r15), %edi
	movq	_MDIO_AN_EEE_ADV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	callq	_phy_read_mmd_indirect
	testl	%eax, %eax
	js	LBB0_18
## %bb.12:
	movl	%eax, %edi
	callq	_mmd_eee_adv_to_ethtool_adv_t
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r12d, %edi
	callq	_mmd_eee_adv_to_ethtool_adv_t
	movl	%eax, %r13d
	movl	24(%r15), %edi
	movq	(%r15), %rsi
	callq	_phy_find_setting
	andl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	movq	_settings@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	%ebx, %r12d
	testl	%r13d, (%rcx,%rax,4)
	je	LBB0_7
## %bb.13:
	xorl	%r12d, %r12d
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.14:
	movl	16(%r15), %ecx
	movl	20(%r15), %edi
	movq	_MDIO_CTRL1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MDIO_MMD_PCS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	callq	_phy_read_mmd_indirect
	testl	%eax, %eax
	js	LBB0_18
## %bb.15:
	movq	_MDIO_PCS_CTRL1_CLKSTOP_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	%eax, %r8d
	movl	16(%r15), %ecx
	movl	20(%r15), %edi
	movl	(%r14), %esi
	movl	(%rbx), %edx
	callq	_phy_write_mmd_indirect
	jmp	LBB0_7
LBB0_18:
	movl	%eax, %r12d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EPROTONOSUPPORT,4,2            ## @EPROTONOSUPPORT
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_PHY_INTERFACE_MODE_MII,8,3     ## @PHY_INTERFACE_MODE_MII
	.comm	_PHY_INTERFACE_MODE_GMII,8,3    ## @PHY_INTERFACE_MODE_GMII
	.comm	_PHY_INTERFACE_MODE_RGMII,8,3   ## @PHY_INTERFACE_MODE_RGMII
	.comm	_MDIO_PCS_EEE_ABLE,4,2          ## @MDIO_PCS_EEE_ABLE
	.comm	_MDIO_MMD_PCS,4,2               ## @MDIO_MMD_PCS
	.comm	_MDIO_AN_EEE_LPABLE,4,2         ## @MDIO_AN_EEE_LPABLE
	.comm	_MDIO_MMD_AN,4,2                ## @MDIO_MMD_AN
	.comm	_MDIO_AN_EEE_ADV,4,2            ## @MDIO_AN_EEE_ADV
	.comm	_settings,8,3                   ## @settings
	.comm	_MDIO_CTRL1,4,2                 ## @MDIO_CTRL1
	.comm	_MDIO_PCS_CTRL1_CLKSTOP_EN,4,2  ## @MDIO_PCS_CTRL1_CLKSTOP_EN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phy_init_eee                   ; -- Begin function phy_init_eee
	.p2align	2
_phy_init_eee:                          ; @phy_init_eee
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _EPROTONOSUPPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPROTONOSUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh6:
	adrp	x9, _PHY_INTERFACE_MODE_MII@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PHY_INTERFACE_MODE_MII@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _PHY_INTERFACE_MODE_GMII@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PHY_INTERFACE_MODE_GMII@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _PHY_INTERFACE_MODE_RGMII@GOTPAGE
Lloh13:
	ldr	x11, [x11, _PHY_INTERFACE_MODE_RGMII@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_12
; %bb.2:
	mov	x20, x1
	mov	x0, x19
	bl	_phy_read_status
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.3:
Lloh15:
	adrp	x8, _MDIO_PCS_EEE_ABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MDIO_PCS_EEE_ABLE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x24, _MDIO_MMD_PCS@GOTPAGE
Lloh19:
	ldr	x24, [x24, _MDIO_MMD_PCS@GOTPAGEOFF]
	ldr	w2, [x24]
	ldp	w3, w0, [x19, #16]
	bl	_phy_read_mmd_indirect
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.4:
	mov	x0, x21
	bl	_mmd_eee_cap_to_ethtool_sup_t
	cbz	w0, LBB0_12
; %bb.5:
Lloh20:
	adrp	x8, _MDIO_AN_EEE_LPABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MDIO_AN_EEE_LPABLE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x22, _MDIO_MMD_AN@GOTPAGE
Lloh24:
	ldr	x22, [x22, _MDIO_MMD_AN@GOTPAGEOFF]
	ldr	w2, [x22]
	ldp	w3, w0, [x19, #16]
	bl	_phy_read_mmd_indirect
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.6:
Lloh25:
	adrp	x8, _MDIO_AN_EEE_ADV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MDIO_AN_EEE_ADV@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldr	w2, [x22]
	ldp	w3, w0, [x19, #16]
	bl	_phy_read_mmd_indirect
	tbnz	w0, #31, LBB0_14
; %bb.7:
	bl	_mmd_eee_adv_to_ethtool_adv_t
	mov	x22, x0
	mov	x0, x21
	bl	_mmd_eee_adv_to_ethtool_adv_t
	mov	x21, x0
	ldr	w0, [x19, #24]
	ldr	x1, [x19]
	bl	_phy_find_setting
Lloh28:
	adrp	x8, _settings@GOTPAGE
Lloh29:
	ldr	x8, [x8, _settings@GOTPAGEOFF]
	and	w9, w21, w22
Lloh30:
	ldr	x8, [x8]
	ldr	w8, [x8, w0, sxtw #2]
	mov	x21, x23
	tst	w9, w8
	b.eq	LBB0_13
; %bb.8:
	cbz	w20, LBB0_11
; %bb.9:
Lloh31:
	adrp	x20, _MDIO_CTRL1@GOTPAGE
Lloh32:
	ldr	x20, [x20, _MDIO_CTRL1@GOTPAGEOFF]
	ldr	w1, [x20]
	ldr	w2, [x24]
	ldp	w3, w0, [x19, #16]
	bl	_phy_read_mmd_indirect
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.10:
Lloh33:
	adrp	x8, _MDIO_PCS_CTRL1_CLKSTOP_EN@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MDIO_PCS_CTRL1_CLKSTOP_EN@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	orr	w4, w8, w21
	ldr	w1, [x20]
	ldr	w2, [x24]
	ldp	w3, w0, [x19, #16]
	bl	_phy_write_mmd_indirect
LBB0_11:
	mov	w21, #0
	b	LBB0_13
LBB0_12:
	mov	x21, x23
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x21, x0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_EPROTONOSUPPORT,4,2            ; @EPROTONOSUPPORT
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_PHY_INTERFACE_MODE_MII,8,3     ; @PHY_INTERFACE_MODE_MII
	.comm	_PHY_INTERFACE_MODE_GMII,8,3    ; @PHY_INTERFACE_MODE_GMII
	.comm	_PHY_INTERFACE_MODE_RGMII,8,3   ; @PHY_INTERFACE_MODE_RGMII
	.comm	_MDIO_PCS_EEE_ABLE,4,2          ; @MDIO_PCS_EEE_ABLE
	.comm	_MDIO_MMD_PCS,4,2               ; @MDIO_MMD_PCS
	.comm	_MDIO_AN_EEE_LPABLE,4,2         ; @MDIO_AN_EEE_LPABLE
	.comm	_MDIO_MMD_AN,4,2                ; @MDIO_MMD_AN
	.comm	_MDIO_AN_EEE_ADV,4,2            ; @MDIO_AN_EEE_ADV
	.comm	_settings,8,3                   ; @settings
	.comm	_MDIO_CTRL1,4,2                 ; @MDIO_CTRL1
	.comm	_MDIO_PCS_CTRL1_CLKSTOP_EN,4,2  ; @MDIO_PCS_CTRL1_CLKSTOP_EN
.subsections_via_symbols
