	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_copper_link_setup_82577  ## -- Begin function e1000_copper_link_setup_82577
	.p2align	4, 0x90
_e1000_copper_link_setup_82577:         ## @e1000_copper_link_setup_82577
	.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	_I82577_CFG_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-28(%rbp), %rdx
	callq	_e1e_rphy
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	movq	_I82577_CFG_ASSERT_CRS_ON_TX@GOTPCREL(%rip), %rax
	movl	-28(%rbp), %edx
	orl	(%rax), %edx
	movq	_I82577_CFG_ENABLE_DOWNSHIFT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_e1e_wphy
	testq	%rax, %rax
	jne	LBB0_10
## %bb.2:
	movq	_I82577_PHY_CTRL_2@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_e1e_rphy
	testq	%rax, %rax
	jne	LBB0_10
## %bb.3:
	movq	_I82577_PHY_CTRL2_MDIX_CFG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %eax
	cmpl	$1, %eax
	je	LBB0_8
## %bb.4:
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.5:
	movq	_I82577_PHY_CTRL2_MANUAL_MDIX@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_I82577_PHY_CTRL2_AUTO_MDI_MDIX@GOTPCREL(%rip), %rax
LBB0_7:
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
LBB0_8:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_e1e_wphy
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	callq	_e1000_set_master_slave_mode
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I82577_CFG_REG,4,2             ## @I82577_CFG_REG
	.comm	_I82577_CFG_ASSERT_CRS_ON_TX,4,2 ## @I82577_CFG_ASSERT_CRS_ON_TX
	.comm	_I82577_CFG_ENABLE_DOWNSHIFT,4,2 ## @I82577_CFG_ENABLE_DOWNSHIFT
	.comm	_I82577_PHY_CTRL_2,4,2          ## @I82577_PHY_CTRL_2
	.comm	_I82577_PHY_CTRL2_MDIX_CFG_MASK,4,2 ## @I82577_PHY_CTRL2_MDIX_CFG_MASK
	.comm	_I82577_PHY_CTRL2_MANUAL_MDIX,4,2 ## @I82577_PHY_CTRL2_MANUAL_MDIX
	.comm	_I82577_PHY_CTRL2_AUTO_MDI_MDIX,4,2 ## @I82577_PHY_CTRL2_AUTO_MDI_MDIX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_copper_link_setup_82577  ; -- Begin function e1000_copper_link_setup_82577
	.p2align	2
_e1000_copper_link_setup_82577:         ; @e1000_copper_link_setup_82577
	.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, _I82577_CFG_REG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _I82577_CFG_REG@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_e1e_rphy
	cbnz	x0, LBB0_10
; %bb.1:
Lloh2:
	adrp	x8, _I82577_CFG_ASSERT_CRS_ON_TX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I82577_CFG_ASSERT_CRS_ON_TX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
Lloh5:
	adrp	x9, _I82577_CFG_ENABLE_DOWNSHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I82577_CFG_ENABLE_DOWNSHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1e_wphy
	cbnz	x0, LBB0_10
; %bb.2:
Lloh8:
	adrp	x20, _I82577_PHY_CTRL_2@GOTPAGE
Lloh9:
	ldr	x20, [x20, _I82577_PHY_CTRL_2@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_e1e_rphy
	cbnz	x0, LBB0_10
; %bb.3:
Lloh10:
	adrp	x8, _I82577_PHY_CTRL2_MDIX_CFG_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _I82577_PHY_CTRL2_MDIX_CFG_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w8, [x19]
	cmp	w8, #1
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #2
	b.ne	LBB0_6
; %bb.5:
Lloh13:
	adrp	x8, _I82577_PHY_CTRL2_MANUAL_MDIX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I82577_PHY_CTRL2_MANUAL_MDIX@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _I82577_PHY_CTRL2_AUTO_MDI_MDIX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I82577_PHY_CTRL2_AUTO_MDI_MDIX@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	orr	w2, w8, w2
	str	w2, [sp, #12]
LBB0_8:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_e1e_wphy
	cbnz	x0, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_e1000_set_master_slave_mode
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_I82577_CFG_REG,4,2             ; @I82577_CFG_REG
	.comm	_I82577_CFG_ASSERT_CRS_ON_TX,4,2 ; @I82577_CFG_ASSERT_CRS_ON_TX
	.comm	_I82577_CFG_ENABLE_DOWNSHIFT,4,2 ; @I82577_CFG_ENABLE_DOWNSHIFT
	.comm	_I82577_PHY_CTRL_2,4,2          ; @I82577_PHY_CTRL_2
	.comm	_I82577_PHY_CTRL2_MDIX_CFG_MASK,4,2 ; @I82577_PHY_CTRL2_MDIX_CFG_MASK
	.comm	_I82577_PHY_CTRL2_MANUAL_MDIX,4,2 ; @I82577_PHY_CTRL2_MANUAL_MDIX
	.comm	_I82577_PHY_CTRL2_AUTO_MDI_MDIX,4,2 ; @I82577_PHY_CTRL2_AUTO_MDI_MDIX
.subsections_via_symbols
