	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_phy_eee_adjust
_tg3_phy_eee_adjust:                    ## @tg3_phy_eee_adjust
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_TG3_PHYFLG_EEE_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_11
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	$0, 4(%rdi)
	testl	%esi, %esi
	je	LBB0_13
## %bb.2:
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, 16(%rbx)
	jne	LBB0_13
## %bb.3:
	movq	24(%rbx), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.4:
	movq	32(%rbx), %rax
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rdx), %rax
	je	LBB0_6
## %bb.5:
	cmpq	%rcx, %rax
	je	LBB0_6
LBB0_13:
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.14:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_tg3_phy_toggle_auxctl_smdsp
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movq	_MII_TG3_DSP_TAP26@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_tg3_phydsp_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tg3_phy_toggle_auxctl_smdsp
LBB0_16:
	movq	_TG3_CPMU_EEE_MODE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_tr32
	movl	(%rbx), %edi
	movq	_TG3_CPMU_EEEMD_LPI_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tw32                           ## TAILCALL
LBB0_6:
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.8:
	movq	_TG3_CPMU_EEE_CTRL_EXIT_16_5_US@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_TG3_CPMU_EEE_CTRL_EXIT_36_US@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movq	_TG3_CPMU_EEE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tw32
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tg3_eee_pull_config
	cmpq	$0, 8(%rbx)
	je	LBB0_12
## %bb.10:
	movl	$2, 4(%rbx)
	jmp	LBB0_11
LBB0_12:
	cmpl	$0, 4(%rbx)
	je	LBB0_13
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TG3_PHYFLG_EEE_CAP,4,2         ## @TG3_PHYFLG_EEE_CAP
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_TG3_CPMU_EEE_CTRL_EXIT_16_5_US,4,2 ## @TG3_CPMU_EEE_CTRL_EXIT_16_5_US
	.comm	_TG3_CPMU_EEE_CTRL_EXIT_36_US,4,2 ## @TG3_CPMU_EEE_CTRL_EXIT_36_US
	.comm	_TG3_CPMU_EEE_CTRL,4,2          ## @TG3_CPMU_EEE_CTRL
	.comm	_MII_TG3_DSP_TAP26,4,2          ## @MII_TG3_DSP_TAP26
	.comm	_TG3_CPMU_EEE_MODE,4,2          ## @TG3_CPMU_EEE_MODE
	.comm	_TG3_CPMU_EEEMD_LPI_ENABLE,4,2  ## @TG3_CPMU_EEEMD_LPI_ENABLE
	.no_dead_strip	_tg3_phy_eee_adjust
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_phy_eee_adjust
_tg3_phy_eee_adjust:                    ; @tg3_phy_eee_adjust
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _TG3_PHYFLG_EEE_CAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TG3_PHYFLG_EEE_CAP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	str	wzr, [x0, #4]
	cbz	w1, LBB0_9
; %bb.2:
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	ldr	x8, [x19, #24]
Lloh6:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.4:
	ldr	x8, [x19, #32]
Lloh9:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x9]
Lloh12:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_9
; %bb.5:
Lloh15:
	adrp	x10, _TG3_CPMU_EEE_CTRL_EXIT_16_5_US@GOTPAGE
Lloh16:
	ldr	x10, [x10, _TG3_CPMU_EEE_CTRL_EXIT_16_5_US@GOTPAGEOFF]
Lloh17:
	adrp	x11, _TG3_CPMU_EEE_CTRL_EXIT_36_US@GOTPAGE
Lloh18:
	ldr	x11, [x11, _TG3_CPMU_EEE_CTRL_EXIT_36_US@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _TG3_CPMU_EEE_CTRL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TG3_CPMU_EEE_CTRL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_tw32
	mov	x0, x19
	mov	x1, #0
	bl	_tg3_eee_pull_config
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	w8, #2
	str	w8, [x19, #4]
	b	LBB0_8
LBB0_7:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_9
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	cbz	w20, LBB0_12
; %bb.10:
	mov	x0, x19
	mov	w1, #1
	bl	_tg3_phy_toggle_auxctl_smdsp
	cbnz	w0, LBB0_12
; %bb.11:
Lloh22:
	adrp	x8, _MII_TG3_DSP_TAP26@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MII_TG3_DSP_TAP26@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_tg3_phydsp_write
	mov	x0, x19
	mov	w1, #0
	bl	_tg3_phy_toggle_auxctl_smdsp
LBB0_12:
Lloh25:
	adrp	x19, _TG3_CPMU_EEE_MODE@GOTPAGE
Lloh26:
	ldr	x19, [x19, _TG3_CPMU_EEE_MODE@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_tr32
	ldr	w8, [x19]
Lloh27:
	adrp	x9, _TG3_CPMU_EEEMD_LPI_ENABLE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _TG3_CPMU_EEEMD_LPI_ENABLE@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	bic	w1, w0, w9
	mov	x0, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tw32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_TG3_PHYFLG_EEE_CAP,4,2         ; @TG3_PHYFLG_EEE_CAP
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_TG3_CPMU_EEE_CTRL_EXIT_16_5_US,4,2 ; @TG3_CPMU_EEE_CTRL_EXIT_16_5_US
	.comm	_TG3_CPMU_EEE_CTRL_EXIT_36_US,4,2 ; @TG3_CPMU_EEE_CTRL_EXIT_36_US
	.comm	_TG3_CPMU_EEE_CTRL,4,2          ; @TG3_CPMU_EEE_CTRL
	.comm	_MII_TG3_DSP_TAP26,4,2          ; @MII_TG3_DSP_TAP26
	.comm	_TG3_CPMU_EEE_MODE,4,2          ; @TG3_CPMU_EEE_MODE
	.comm	_TG3_CPMU_EEEMD_LPI_ENABLE,4,2  ; @TG3_CPMU_EEEMD_LPI_ENABLE
	.no_dead_strip	_tg3_phy_eee_adjust
.subsections_via_symbols
