	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_copper_link_preconfig
_e1000_copper_link_preconfig:           ## @e1000_copper_link_preconfig
	.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, %r14
	movq	_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	(%r14), %rcx
	movq	_e1000_82543@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rcx
	jle	LBB0_2
## %bb.1:
	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
	jmp	LBB0_3
LBB0_2:
	movq	_E1000_CTRL_FRCSPD@GOTPCREL(%rip), %rcx
	movq	_E1000_CTRL_FRCDPX@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	_E1000_CTRL_SLU@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_ew32
	movq	%r14, %rdi
	callq	_e1000_phy_hw_reset
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_16
LBB0_3:
	movq	%r14, %rdi
	callq	_e1000_detect_gig_phy
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_e_dbg
	jmp	LBB0_16
LBB0_5:
	movl	12(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_e_dbg
	movq	%r14, %rdi
	callq	_e1000_set_phy_mode
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_16
## %bb.6:
	movq	(%r14), %rax
	movq	_e1000_82545_rev_3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_e1000_82546_rev_3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_8:
	movq	_M88E1000_PHY_SPEC_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_e1000_read_phy_reg
	movl	-28(%rbp), %edx
	orl	$8, %edx
	movl	%edx, -28(%rbp)
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_e1000_write_phy_reg
	movq	(%r14), %rax
LBB0_9:
	cmpq	(%r15), %rax
	jle	LBB0_14
## %bb.10:
	movq	_e1000_82541@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.11:
	movq	_e1000_82547@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.12:
	movq	_e1000_82541_rev_2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.13:
	movq	_e1000_82547_rev_2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
LBB0_14:
	movl	$0, 8(%r14)
LBB0_15:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_16:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTRL,4,2                       ## @CTRL
	.comm	_e1000_82543,8,3                ## @e1000_82543
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error, did not detect valid phy.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Phy ID = %x\n"

	.comm	_e1000_82545_rev_3,8,3          ## @e1000_82545_rev_3
	.comm	_e1000_82546_rev_3,8,3          ## @e1000_82546_rev_3
	.comm	_M88E1000_PHY_SPEC_CTRL,4,2     ## @M88E1000_PHY_SPEC_CTRL
	.comm	_e1000_82541,8,3                ## @e1000_82541
	.comm	_e1000_82547,8,3                ## @e1000_82547
	.comm	_e1000_82541_rev_2,8,3          ## @e1000_82541_rev_2
	.comm	_e1000_82547_rev_2,8,3          ## @e1000_82547_rev_2
	.comm	_E1000_SUCCESS,8,3              ## @E1000_SUCCESS
	.no_dead_strip	_e1000_copper_link_preconfig
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_copper_link_preconfig
_e1000_copper_link_preconfig:           ; @e1000_copper_link_preconfig
	.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, _CTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CTRL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
	ldr	x8, [x19]
Lloh2:
	adrp	x21, _e1000_82543@GOTPAGE
Lloh3:
	ldr	x21, [x21, _e1000_82543@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.le	LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _E1000_CTRL_SLU@GOTPAGE
Lloh5:
	ldr	x8, [x8, _E1000_CTRL_SLU@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh7:
	adrp	x9, _E1000_CTRL_FRCSPD@GOTPAGE
Lloh8:
	ldr	x9, [x9, _E1000_CTRL_FRCSPD@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _E1000_CTRL_FRCDPX@GOTPAGE
Lloh11:
	ldr	x10, [x10, _E1000_CTRL_FRCDPX@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w1, w8, w9
	ldr	w0, [x20]
	bl	_ew32
	b	LBB0_3
LBB0_2:
Lloh13:
	adrp	x8, _E1000_CTRL_FRCSPD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _E1000_CTRL_FRCSPD@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _E1000_CTRL_FRCDPX@GOTPAGE
Lloh17:
	ldr	x9, [x9, _E1000_CTRL_FRCDPX@GOTPAGEOFF]
Lloh18:
	adrp	x10, _E1000_CTRL_SLU@GOTPAGE
Lloh19:
	ldr	x10, [x10, _E1000_CTRL_SLU@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w1, w8, w10
	ldr	w0, [x20]
	bl	_ew32
	mov	x0, x19
	bl	_e1000_phy_hw_reset
	mov	x20, x0
	cbnz	x0, LBB0_15
LBB0_3:
	mov	x0, x19
	bl	_e1000_detect_gig_phy
	cbz	x0, LBB0_5
; %bb.4:
	mov	x20, x0
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
	b	LBB0_15
LBB0_5:
	ldr	w8, [x19, #12]
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
	mov	x0, x19
	bl	_e1000_set_phy_mode
	mov	x20, x0
	cbnz	x0, LBB0_15
; %bb.6:
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _e1000_82545_rev_3@GOTPAGE
Lloh27:
	ldr	x9, [x9, _e1000_82545_rev_3@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
Lloh29:
	adrp	x10, _e1000_82546_rev_3@GOTPAGE
Lloh30:
	ldr	x10, [x10, _e1000_82546_rev_3@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.7:
Lloh32:
	adrp	x20, _M88E1000_PHY_SPEC_CTRL@GOTPAGE
Lloh33:
	ldr	x20, [x20, _M88E1000_PHY_SPEC_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1000_read_phy_reg
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1000_write_phy_reg
	ldr	x8, [x19]
LBB0_8:
	ldr	x9, [x21]
	cmp	x8, x9
	b.le	LBB0_13
; %bb.9:
Lloh34:
	adrp	x9, _e1000_82541@GOTPAGE
Lloh35:
	ldr	x9, [x9, _e1000_82541@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.10:
Lloh37:
	adrp	x9, _e1000_82547@GOTPAGE
Lloh38:
	ldr	x9, [x9, _e1000_82547@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.11:
Lloh40:
	adrp	x9, _e1000_82541_rev_2@GOTPAGE
Lloh41:
	ldr	x9, [x9, _e1000_82541_rev_2@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.12:
Lloh43:
	adrp	x9, _e1000_82547_rev_2@GOTPAGE
Lloh44:
	ldr	x9, [x9, _e1000_82547_rev_2@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
LBB0_13:
	str	wzr, [x19, #8]
LBB0_14:
Lloh46:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh47:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh48:
	ldr	x20, [x8]
LBB0_15:
	mov	x0, x20
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_CTRL,4,2                       ; @CTRL
	.comm	_e1000_82543,8,3                ; @e1000_82543
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error, did not detect valid phy.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Phy ID = %x\n"

	.comm	_e1000_82545_rev_3,8,3          ; @e1000_82545_rev_3
	.comm	_e1000_82546_rev_3,8,3          ; @e1000_82546_rev_3
	.comm	_M88E1000_PHY_SPEC_CTRL,4,2     ; @M88E1000_PHY_SPEC_CTRL
	.comm	_e1000_82541,8,3                ; @e1000_82541
	.comm	_e1000_82547,8,3                ; @e1000_82547
	.comm	_e1000_82541_rev_2,8,3          ; @e1000_82541_rev_2
	.comm	_e1000_82547_rev_2,8,3          ; @e1000_82547_rev_2
	.comm	_E1000_SUCCESS,8,3              ; @E1000_SUCCESS
	.no_dead_strip	_e1000_copper_link_preconfig
.subsections_via_symbols
