	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_smartspeed
_e1000_smartspeed:                      ## @e1000_smartspeed
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	_e1000_phy_igp@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, 20(%rdi)
	je	LBB0_15
## %bb.2:
	movq	_ADVERTISE_1000_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_15
## %bb.3:
	leaq	8(%rbx), %r14
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.10:
	movq	_E1000_SMARTSPEED_DOWNSHIFT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.11:
	movq	_PHY_1000T_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_phy_reg
	movq	_CR_1000T_MS_ENABLE@GOTPCREL(%rip), %rax
	movl	-36(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -36(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_e1000_write_phy_reg
	movq	%r14, %rdi
	callq	_e1000_phy_setup_autoneg
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	_PHY_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_phy_reg
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	_MII_CR_AUTO_NEG_EN@GOTPCREL(%rip), %rax
	movq	_MII_CR_RESTART_AUTO_NEG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	orl	-36(%rbp), %edx
	movl	%edx, -36(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_e1000_write_phy_reg
LBB0_14:
	movq	(%rbx), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%rbx)
	movq	_E1000_SMARTSPEED_MAX@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpq	(%rdx), %rax
	cmovneq	%rcx, %rsi
	movq	%rsi, (%rbx)
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_PHY_1000T_STATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_phy_reg
	movq	_SR_1000T_MS_CONFIG_FAULT@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, -40(%rbp)
	je	LBB0_15
## %bb.5:
	movl	(%r15), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_phy_reg
	movl	(%r12), %eax
	testl	%eax, -40(%rbp)
	je	LBB0_15
## %bb.6:
	movq	_PHY_1000T_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_phy_reg
	movl	-36(%rbp), %edx
	movq	_CR_1000T_MS_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, %eax
	je	LBB0_15
## %bb.7:
	notl	%eax
	andl	%eax, %edx
	movl	%edx, -36(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_e1000_write_phy_reg
	incq	(%rbx)
	movq	%r14, %rdi
	callq	_e1000_phy_setup_autoneg
	testl	%eax, %eax
	jne	LBB0_15
## %bb.8:
	movq	_PHY_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_phy_reg
	testl	%eax, %eax
	jne	LBB0_15
## %bb.9:
	movq	_MII_CR_AUTO_NEG_EN@GOTPCREL(%rip), %rax
	movq	_MII_CR_RESTART_AUTO_NEG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	orl	-36(%rbp), %edx
	movl	%edx, -36(%rbp)
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_e1000_write_phy_reg
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_phy_igp,8,3              ## @e1000_phy_igp
	.comm	_ADVERTISE_1000_FULL,4,2        ## @ADVERTISE_1000_FULL
	.comm	_PHY_1000T_STATUS,4,2           ## @PHY_1000T_STATUS
	.comm	_SR_1000T_MS_CONFIG_FAULT,4,2   ## @SR_1000T_MS_CONFIG_FAULT
	.comm	_PHY_1000T_CTRL,4,2             ## @PHY_1000T_CTRL
	.comm	_CR_1000T_MS_ENABLE,4,2         ## @CR_1000T_MS_ENABLE
	.comm	_PHY_CTRL,4,2                   ## @PHY_CTRL
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ## @MII_CR_AUTO_NEG_EN
	.comm	_MII_CR_RESTART_AUTO_NEG,4,2    ## @MII_CR_RESTART_AUTO_NEG
	.comm	_E1000_SMARTSPEED_DOWNSHIFT,8,3 ## @E1000_SMARTSPEED_DOWNSHIFT
	.comm	_E1000_SMARTSPEED_MAX,8,3       ## @E1000_SMARTSPEED_MAX
	.no_dead_strip	_e1000_smartspeed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_smartspeed
_e1000_smartspeed:                      ; @e1000_smartspeed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x19, #8]!
Lloh0:
	adrp	x9, _e1000_phy_igp@GOTPAGE
Lloh1:
	ldr	x9, [x9, _e1000_phy_igp@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0, #20]
	cbz	w8, LBB0_9
; %bb.2:
	ldr	w8, [x20, #16]
Lloh3:
	adrp	x9, _ADVERTISE_1000_FULL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ADVERTISE_1000_FULL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.3:
	ldr	x8, [x20]
	cbz	x8, LBB0_10
; %bb.4:
Lloh6:
	adrp	x9, _E1000_SMARTSPEED_DOWNSHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _E1000_SMARTSPEED_DOWNSHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
Lloh9:
	adrp	x21, _PHY_1000T_CTRL@GOTPAGE
Lloh10:
	ldr	x21, [x21, _PHY_1000T_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
Lloh11:
	adrp	x8, _CR_1000T_MS_ENABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CR_1000T_MS_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	orr	w2, w9, w8
	str	w2, [sp, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_e1000_write_phy_reg
	mov	x0, x19
	bl	_e1000_phy_setup_autoneg
	cbnz	w0, LBB0_8
; %bb.6:
Lloh14:
	adrp	x21, _PHY_CTRL@GOTPAGE
Lloh15:
	ldr	x21, [x21, _PHY_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
	cbnz	w0, LBB0_8
; %bb.7:
Lloh16:
	adrp	x8, _MII_CR_AUTO_NEG_EN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MII_CR_AUTO_NEG_EN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _MII_CR_RESTART_AUTO_NEG@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MII_CR_RESTART_AUTO_NEG@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #8]
	orr	w2, w8, w9
	str	w2, [sp, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_e1000_write_phy_reg
LBB0_8:
	ldr	x8, [x20]
	add	x9, x8, #1
	str	x9, [x20]
Lloh22:
	adrp	x9, _E1000_SMARTSPEED_MAX@GOTPAGE
Lloh23:
	ldr	x9, [x9, _E1000_SMARTSPEED_MAX@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	csinc	x8, xzr, x8, eq
	str	x8, [x20]
LBB0_9:
	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
	add	sp, sp, #64
	ret
LBB0_10:
Lloh25:
	adrp	x21, _PHY_1000T_STATUS@GOTPAGE
Lloh26:
	ldr	x21, [x21, _PHY_1000T_STATUS@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_phy_reg
	ldr	w8, [sp, #12]
Lloh27:
	adrp	x22, _SR_1000T_MS_CONFIG_FAULT@GOTPAGE
Lloh28:
	ldr	x22, [x22, _SR_1000T_MS_CONFIG_FAULT@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.11:
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_phy_reg
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.12:
Lloh29:
	adrp	x21, _PHY_1000T_CTRL@GOTPAGE
Lloh30:
	ldr	x21, [x21, _PHY_1000T_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
	ldr	w8, [sp, #8]
Lloh31:
	adrp	x9, _CR_1000T_MS_ENABLE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _CR_1000T_MS_ENABLE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.13:
	bic	w2, w8, w9
	str	w2, [sp, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_e1000_write_phy_reg
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
	mov	x0, x19
	bl	_e1000_phy_setup_autoneg
	cbnz	w0, LBB0_9
; %bb.14:
Lloh34:
	adrp	x20, _PHY_CTRL@GOTPAGE
Lloh35:
	ldr	x20, [x20, _PHY_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #8
	mov	x0, x19
	bl	_e1000_read_phy_reg
	cbnz	w0, LBB0_9
; %bb.15:
Lloh36:
	adrp	x8, _MII_CR_AUTO_NEG_EN@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MII_CR_AUTO_NEG_EN@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _MII_CR_RESTART_AUTO_NEG@GOTPAGE
Lloh40:
	ldr	x9, [x9, _MII_CR_RESTART_AUTO_NEG@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #8]
	orr	w2, w8, w9
	str	w2, [sp, #8]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1000_write_phy_reg
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_phy_igp,8,3              ; @e1000_phy_igp
	.comm	_ADVERTISE_1000_FULL,4,2        ; @ADVERTISE_1000_FULL
	.comm	_PHY_1000T_STATUS,4,2           ; @PHY_1000T_STATUS
	.comm	_SR_1000T_MS_CONFIG_FAULT,4,2   ; @SR_1000T_MS_CONFIG_FAULT
	.comm	_PHY_1000T_CTRL,4,2             ; @PHY_1000T_CTRL
	.comm	_CR_1000T_MS_ENABLE,4,2         ; @CR_1000T_MS_ENABLE
	.comm	_PHY_CTRL,4,2                   ; @PHY_CTRL
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ; @MII_CR_AUTO_NEG_EN
	.comm	_MII_CR_RESTART_AUTO_NEG,4,2    ; @MII_CR_RESTART_AUTO_NEG
	.comm	_E1000_SMARTSPEED_DOWNSHIFT,8,3 ; @E1000_SMARTSPEED_DOWNSHIFT
	.comm	_E1000_SMARTSPEED_MAX,8,3       ; @E1000_SMARTSPEED_MAX
	.no_dead_strip	_e1000_smartspeed
.subsections_via_symbols
