	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_setup_copper_link_ich8lan
_e1000_setup_copper_link_ich8lan:       ## @e1000_setup_copper_link_ich8lan
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_CTRL_SLU@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_E1000_CTRL_FRCSPD@GOTPCREL(%rip), %rcx
	movq	_E1000_CTRL_FRCDPX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_ew32
	movq	_E1000_KMRNCTRLSTA_TIMEOUTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_e1000e_write_kmrn_reg
	testq	%rax, %rax
	jne	LBB0_17
## %bb.1:
	movq	_E1000_KMRNCTRLSTA_INBAND_PARAM@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_e1000e_read_kmrn_reg
	testq	%rax, %rax
	jne	LBB0_17
## %bb.2:
	movl	-28(%rbp), %edx
	orl	$63, %edx
	movl	%edx, -28(%rbp)
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_e1000e_write_kmrn_reg
	testq	%rax, %rax
	jne	LBB0_17
## %bb.3:
	movl	(%r15), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_16
## %bb.4:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	movq	%r15, %rdi
	callq	_e1000e_copper_link_setup_m88
	jmp	LBB0_15
LBB0_7:
	movq	%r15, %rdi
	callq	_e1000_copper_link_setup_82577
	jmp	LBB0_15
LBB0_5:
	movq	%r15, %rdi
	callq	_e1000e_copper_link_setup_igp
	jmp	LBB0_15
LBB0_8:
	movq	_IFE_PHY_MDIX_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_e1e_rphy
	testq	%rax, %rax
	jne	LBB0_17
## %bb.9:
	movq	_IFE_PMC_AUTO_MDIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	notl	%edx
	movl	-28(%rbp), %ecx
	andl	%ecx, %edx
	movl	4(%r15), %esi
	cmpl	$2, %esi
	je	LBB0_12
## %bb.10:
	cmpl	$1, %esi
	jne	LBB0_13
## %bb.11:
	movq	_IFE_PMC_FORCE_MDIX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movl	%edx, -28(%rbp)
	jmp	LBB0_14
LBB0_12:
	movq	_IFE_PMC_FORCE_MDIX@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
	jmp	LBB0_14
LBB0_13:
	orl	%eax, %ecx
	movl	%ecx, -28(%rbp)
	movl	%ecx, %edx
LBB0_14:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_e1e_wphy
LBB0_15:
	testq	%rax, %rax
	jne	LBB0_17
LBB0_16:
	movq	%r15, %rdi
	callq	_e1000e_setup_copper_link
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_6
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_CTRL,4,2                       ## @CTRL
	.comm	_E1000_CTRL_SLU,4,2             ## @E1000_CTRL_SLU
	.comm	_E1000_CTRL_FRCSPD,4,2          ## @E1000_CTRL_FRCSPD
	.comm	_E1000_CTRL_FRCDPX,4,2          ## @E1000_CTRL_FRCDPX
	.comm	_E1000_KMRNCTRLSTA_TIMEOUTS,4,2 ## @E1000_KMRNCTRLSTA_TIMEOUTS
	.comm	_E1000_KMRNCTRLSTA_INBAND_PARAM,4,2 ## @E1000_KMRNCTRLSTA_INBAND_PARAM
	.comm	_IFE_PHY_MDIX_CONTROL,4,2       ## @IFE_PHY_MDIX_CONTROL
	.comm	_IFE_PMC_AUTO_MDIX,4,2          ## @IFE_PMC_AUTO_MDIX
	.comm	_IFE_PMC_FORCE_MDIX,4,2         ## @IFE_PMC_FORCE_MDIX
	.no_dead_strip	_e1000_setup_copper_link_ich8lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_setup_copper_link_ich8lan
_e1000_setup_copper_link_ich8lan:       ; @e1000_setup_copper_link_ich8lan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CTRL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh2:
	adrp	x8, _E1000_CTRL_SLU@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E1000_CTRL_SLU@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh5:
	adrp	x9, _E1000_CTRL_FRCSPD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _E1000_CTRL_FRCSPD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _E1000_CTRL_FRCDPX@GOTPAGE
Lloh9:
	ldr	x10, [x10, _E1000_CTRL_FRCDPX@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w1, w8, w9
	ldr	w0, [x20]
	bl	_ew32
Lloh11:
	adrp	x8, _E1000_KMRNCTRLSTA_TIMEOUTS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E1000_KMRNCTRLSTA_TIMEOUTS@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #65535
	bl	_e1000e_write_kmrn_reg
	cbnz	x0, LBB0_16
; %bb.1:
Lloh14:
	adrp	x20, _E1000_KMRNCTRLSTA_INBAND_PARAM@GOTPAGE
Lloh15:
	ldr	x20, [x20, _E1000_KMRNCTRLSTA_INBAND_PARAM@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000e_read_kmrn_reg
	cbnz	x0, LBB0_16
; %bb.2:
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x3f
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1000e_write_kmrn_reg
	cbnz	x0, LBB0_16
; %bb.3:
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_15
; %bb.4:
Lloh16:
	adrp	x9, lJTI0_0@PAGE
Lloh17:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	mov	x0, x19
	bl	_e1000e_copper_link_setup_m88
	cbnz	x0, LBB0_16
	b	LBB0_15
LBB0_6:
	mov	x0, x19
	bl	_e1000_copper_link_setup_82577
	cbnz	x0, LBB0_16
	b	LBB0_15
LBB0_7:
	mov	x0, x19
	bl	_e1000e_copper_link_setup_igp
	cbnz	x0, LBB0_16
	b	LBB0_15
LBB0_8:
Lloh18:
	adrp	x20, _IFE_PHY_MDIX_CONTROL@GOTPAGE
Lloh19:
	ldr	x20, [x20, _IFE_PHY_MDIX_CONTROL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1e_rphy
	cbnz	x0, LBB0_16
; %bb.9:
Lloh20:
	adrp	x8, _IFE_PMC_AUTO_MDIX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IFE_PMC_AUTO_MDIX@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x8]
	ldr	w10, [sp, #12]
	bic	w8, w10, w9
	ldr	w11, [x19, #4]
	cmp	w11, #2
	b.eq	LBB0_12
; %bb.10:
	cmp	w11, #1
	b.ne	LBB0_13
; %bb.11:
Lloh23:
	adrp	x9, _IFE_PMC_FORCE_MDIX@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IFE_PMC_FORCE_MDIX@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	bic	w2, w8, w9
	b	LBB0_14
LBB0_12:
Lloh26:
	adrp	x9, _IFE_PMC_FORCE_MDIX@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IFE_PMC_FORCE_MDIX@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w2, w9, w8
	b	LBB0_14
LBB0_13:
	orr	w2, w10, w9
LBB0_14:
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1e_wphy
	cbnz	x0, LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_e1000e_setup_copper_link
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
                                        ; -- End function
	.comm	_CTRL,4,2                       ; @CTRL
	.comm	_E1000_CTRL_SLU,4,2             ; @E1000_CTRL_SLU
	.comm	_E1000_CTRL_FRCSPD,4,2          ; @E1000_CTRL_FRCSPD
	.comm	_E1000_CTRL_FRCDPX,4,2          ; @E1000_CTRL_FRCDPX
	.comm	_E1000_KMRNCTRLSTA_TIMEOUTS,4,2 ; @E1000_KMRNCTRLSTA_TIMEOUTS
	.comm	_E1000_KMRNCTRLSTA_INBAND_PARAM,4,2 ; @E1000_KMRNCTRLSTA_INBAND_PARAM
	.comm	_IFE_PHY_MDIX_CONTROL,4,2       ; @IFE_PHY_MDIX_CONTROL
	.comm	_IFE_PMC_AUTO_MDIX,4,2          ; @IFE_PMC_AUTO_MDIX
	.comm	_IFE_PMC_FORCE_MDIX,4,2         ; @IFE_PMC_FORCE_MDIX
	.no_dead_strip	_e1000_setup_copper_link_ich8lan
.subsections_via_symbols
