	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_loopback_cleanup
_e1000_loopback_cleanup:                ## @e1000_loopback_cleanup
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_RCTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_er32
	movq	_E1000_RCTL_LBM_TCVR@GOTPCREL(%rip), %rcx
	movq	_E1000_RCTL_LBM_MAC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r14), %edi
	callq	_ew32
	movl	24(%rbx), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_3
## %bb.1:
	leal	-130(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_7
## %bb.2:
	cmpl	$132, %eax
	je	LBB0_4
	jmp	LBB0_9
LBB0_3:
	movq	_FEXTNVM11@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_er32
	movq	_E1000_FEXTNVM11_DISABLE_MULR_FIX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r14), %edi
	callq	_ew32
	xorl	%edi, %edi
	callq	_TARC
	movl	%eax, %edi
	callq	_er32
	movl	%eax, %r14d
	andl	$-805306369, %r14d              ## imm = 0xCFFFFFFF
	xorl	%edi, %edi
	callq	_TARC
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_ew32
LBB0_4:
	movl	20(%rbx), %eax
	movq	_e1000_media_type_fiber@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movq	_e1000_media_type_internal_serdes@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
LBB0_6:
	movq	_CTRL_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_ew32
	movl	$0, (%rbx)
LBB0_7:
	movl	20(%rbx), %eax
	movq	_e1000_media_type_fiber@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_15
## %bb.8:
	movq	_e1000_media_type_internal_serdes@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_15
LBB0_9:
	leaq	8(%rbx), %r14
	movl	$1, 28(%rbx)
	movl	16(%rbx), %eax
	movq	_e1000_phy_gg82563@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.10:
	movq	_GG82563_PHY_KMRN_MODE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$384, %edx                      ## imm = 0x180
	callq	_e1e_wphy
LBB0_11:
	movq	_MII_BMCR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1e_rphy
	movl	-20(%rbp), %edx
	movq	_BMCR_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%edx, %eax
	je	LBB0_14
## %bb.12:
	notl	%eax
	andl	%eax, %edx
	movl	%edx, -20(%rbp)
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_e1e_wphy
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r14, %rdi
	callq	*%rax
LBB0_14:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_15:
	movq	_SCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_E1000_SCTL_DISABLE_SERDES_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ew32
	xorl	%eax, %eax
	callq	_e1e_flush
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_usleep_range                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RCTL,4,2                       ## @RCTL
	.comm	_E1000_RCTL_LBM_TCVR,4,2        ## @E1000_RCTL_LBM_TCVR
	.comm	_E1000_RCTL_LBM_MAC,4,2         ## @E1000_RCTL_LBM_MAC
	.comm	_FEXTNVM11,4,2                  ## @FEXTNVM11
	.comm	_E1000_FEXTNVM11_DISABLE_MULR_FIX,4,2 ## @E1000_FEXTNVM11_DISABLE_MULR_FIX
	.comm	_e1000_media_type_fiber,4,2     ## @e1000_media_type_fiber
	.comm	_e1000_media_type_internal_serdes,4,2 ## @e1000_media_type_internal_serdes
	.comm	_CTRL_EXT,4,2                   ## @CTRL_EXT
	.comm	_SCTL,4,2                       ## @SCTL
	.comm	_E1000_SCTL_DISABLE_SERDES_LOOPBACK,4,2 ## @E1000_SCTL_DISABLE_SERDES_LOOPBACK
	.comm	_e1000_phy_gg82563,4,2          ## @e1000_phy_gg82563
	.comm	_GG82563_PHY_KMRN_MODE_CTRL,4,2 ## @GG82563_PHY_KMRN_MODE_CTRL
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_LOOPBACK,4,2              ## @BMCR_LOOPBACK
	.no_dead_strip	_e1000_loopback_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_loopback_cleanup
_e1000_loopback_cleanup:                ; @e1000_loopback_cleanup
	.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
Lloh0:
	adrp	x20, _RCTL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RCTL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh2:
	adrp	x8, _E1000_RCTL_LBM_TCVR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E1000_RCTL_LBM_TCVR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _E1000_RCTL_LBM_MAC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _E1000_RCTL_LBM_MAC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w1, w0, w8
	ldr	w0, [x20]
	bl	_ew32
	ldr	w8, [x19, #24]
	sub	w9, w8, #128
Lloh8:
	adrp	x21, _e1000_media_type_fiber@GOTPAGE
Lloh9:
	ldr	x21, [x21, _e1000_media_type_fiber@GOTPAGEOFF]
Lloh10:
	adrp	x22, _e1000_media_type_internal_serdes@GOTPAGE
Lloh11:
	ldr	x22, [x22, _e1000_media_type_internal_serdes@GOTPAGEOFF]
	cmp	w9, #2
	b.lo	LBB0_3
; %bb.1:
	sub	w9, w8, #130
	cmp	w9, #2
	b.lo	LBB0_6
; %bb.2:
	cmp	w8, #132
	b.eq	LBB0_4
	b	LBB0_8
LBB0_3:
Lloh12:
	adrp	x20, _FEXTNVM11@GOTPAGE
Lloh13:
	ldr	x20, [x20, _FEXTNVM11@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh14:
	adrp	x8, _E1000_FEXTNVM11_DISABLE_MULR_FIX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _E1000_FEXTNVM11_DISABLE_MULR_FIX@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x20]
	bl	_ew32
	mov	w0, #0
	bl	_TARC
	bl	_er32
	and	w20, w0, #0xcfffffff
	mov	w0, #0
	bl	_TARC
	mov	x1, x20
	bl	_ew32
LBB0_4:
	ldr	w8, [x19, #20]
	ldr	w9, [x21]
	ldr	w10, [x22]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_6
; %bb.5:
Lloh17:
	adrp	x8, _CTRL_EXT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CTRL_EXT@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_ew32
	str	wzr, [x19]
LBB0_6:
	ldr	w8, [x19, #20]
	ldr	w9, [x21]
	ldr	w10, [x22]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_8
; %bb.7:
Lloh20:
	adrp	x8, _SCTL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SCTL@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _E1000_SCTL_DISABLE_SERDES_LOOPBACK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _E1000_SCTL_DISABLE_SERDES_LOOPBACK@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_ew32
	bl	_e1e_flush
	mov	w0, #10000
	mov	w1, #11000
	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
	b	_usleep_range
LBB0_8:
	add	x20, x19, #8
	mov	w8, #1
	str	w8, [x19, #28]
	ldr	w8, [x19, #16]
Lloh26:
	adrp	x9, _e1000_phy_gg82563@GOTPAGE
Lloh27:
	ldr	x9, [x9, _e1000_phy_gg82563@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.9:
Lloh29:
	adrp	x8, _GG82563_PHY_KMRN_MODE_CTRL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _GG82563_PHY_KMRN_MODE_CTRL@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #384
	bl	_e1e_wphy
LBB0_10:
Lloh32:
	adrp	x19, _MII_BMCR@GOTPAGE
Lloh33:
	ldr	x19, [x19, _MII_BMCR@GOTPAGEOFF]
	ldr	w1, [x19]
	add	x2, sp, #12
	mov	x0, x20
	bl	_e1e_rphy
	ldr	w8, [sp, #12]
Lloh34:
	adrp	x9, _BMCR_LOOPBACK@GOTPAGE
Lloh35:
	ldr	x9, [x9, _BMCR_LOOPBACK@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.11:
	bic	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w1, [x19]
	mov	x0, x20
	bl	_e1e_wphy
	ldr	x8, [x20]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x20
	blr	x8
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_RCTL,4,2                       ; @RCTL
	.comm	_E1000_RCTL_LBM_TCVR,4,2        ; @E1000_RCTL_LBM_TCVR
	.comm	_E1000_RCTL_LBM_MAC,4,2         ; @E1000_RCTL_LBM_MAC
	.comm	_FEXTNVM11,4,2                  ; @FEXTNVM11
	.comm	_E1000_FEXTNVM11_DISABLE_MULR_FIX,4,2 ; @E1000_FEXTNVM11_DISABLE_MULR_FIX
	.comm	_e1000_media_type_fiber,4,2     ; @e1000_media_type_fiber
	.comm	_e1000_media_type_internal_serdes,4,2 ; @e1000_media_type_internal_serdes
	.comm	_CTRL_EXT,4,2                   ; @CTRL_EXT
	.comm	_SCTL,4,2                       ; @SCTL
	.comm	_E1000_SCTL_DISABLE_SERDES_LOOPBACK,4,2 ; @E1000_SCTL_DISABLE_SERDES_LOOPBACK
	.comm	_e1000_phy_gg82563,4,2          ; @e1000_phy_gg82563
	.comm	_GG82563_PHY_KMRN_MODE_CTRL,4,2 ; @GG82563_PHY_KMRN_MODE_CTRL
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_LOOPBACK,4,2              ; @BMCR_LOOPBACK
	.no_dead_strip	_e1000_loopback_cleanup
.subsections_via_symbols
