	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igb_copper_link_setup_82580    ## -- Begin function igb_copper_link_setup_82580
	.p2align	4, 0x90
_igb_copper_link_setup_82580:           ## @igb_copper_link_setup_82580
	.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
	cmpq	$0, 40(%rdi)
	je	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_2:
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_e1000_phy_82580@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	*32(%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_hw_dbg
	jmp	LBB0_14
LBB0_5:
	movq	_I82580_CFG_REG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	*24(%r14)
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.6:
	movq	_I82580_CFG_ASSERT_CRS_ON_TX@GOTPCREL(%rip), %rax
	movl	-28(%rbp), %edx
	orl	(%rax), %edx
	movq	_I82580_CFG_ENABLE_DOWNSHIFT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	*16(%r14)
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.7:
	movq	_I82580_PHY_CTRL_2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	*24(%r14)
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.8:
	movq	_I82580_PHY_CTRL2_MDIX_CFG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	movl	8(%r14), %eax
	cmpl	$1, %eax
	je	LBB0_13
## %bb.9:
	cmpl	$2, %eax
	jne	LBB0_11
## %bb.10:
	movq	_I82580_PHY_CTRL2_MANUAL_MDIX@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_I82580_PHY_CTRL2_AUTO_MDI_MDIX@GOTPCREL(%rip), %rax
LBB0_12:
	orl	(%rax), %edx
	movl	%edx, -28(%rbp)
LBB0_13:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	*16(%r14)
	movq	%rax, %rbx
LBB0_14:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_phy_82580,8,3            ## @e1000_phy_82580
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error resetting the PHY.\n"

	.comm	_I82580_CFG_REG,4,2             ## @I82580_CFG_REG
	.comm	_I82580_CFG_ASSERT_CRS_ON_TX,4,2 ## @I82580_CFG_ASSERT_CRS_ON_TX
	.comm	_I82580_CFG_ENABLE_DOWNSHIFT,4,2 ## @I82580_CFG_ENABLE_DOWNSHIFT
	.comm	_I82580_PHY_CTRL_2,4,2          ## @I82580_PHY_CTRL_2
	.comm	_I82580_PHY_CTRL2_MDIX_CFG_MASK,4,2 ## @I82580_PHY_CTRL2_MDIX_CFG_MASK
	.comm	_I82580_PHY_CTRL2_MANUAL_MDIX,4,2 ## @I82580_PHY_CTRL2_MANUAL_MDIX
	.comm	_I82580_PHY_CTRL2_AUTO_MDI_MDIX,4,2 ## @I82580_PHY_CTRL2_AUTO_MDI_MDIX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igb_copper_link_setup_82580    ; -- Begin function igb_copper_link_setup_82580
	.p2align	2
_igb_copper_link_setup_82580:           ; @igb_copper_link_setup_82580
	.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
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x20, #0
	b	LBB0_14
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _e1000_phy_82580@GOTPAGE
Lloh1:
	ldr	x9, [x9, _e1000_phy_82580@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x19, #32]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_5
; %bb.4:
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hw_dbg
	b	LBB0_14
LBB0_5:
	ldr	x8, [x19, #24]
Lloh5:
	adrp	x21, _I82580_CFG_REG@GOTPAGE
Lloh6:
	ldr	x21, [x21, _I82580_CFG_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbnz	x0, LBB0_14
; %bb.6:
Lloh7:
	adrp	x8, _I82580_CFG_ASSERT_CRS_ON_TX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I82580_CFG_ASSERT_CRS_ON_TX@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
Lloh10:
	adrp	x10, _I82580_CFG_ENABLE_DOWNSHIFT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _I82580_CFG_ENABLE_DOWNSHIFT@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh12:
	ldr	w9, [x10]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x8, [x19, #16]
	ldr	w1, [x21]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbnz	x0, LBB0_14
; %bb.7:
	ldr	x8, [x19, #24]
Lloh13:
	adrp	x21, _I82580_PHY_CTRL_2@GOTPAGE
Lloh14:
	ldr	x21, [x21, _I82580_PHY_CTRL_2@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbnz	x0, LBB0_14
; %bb.8:
Lloh15:
	adrp	x8, _I82580_PHY_CTRL2_MDIX_CFG_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I82580_PHY_CTRL2_MDIX_CFG_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.eq	LBB0_13
; %bb.9:
	cmp	w8, #2
	b.ne	LBB0_11
; %bb.10:
Lloh18:
	adrp	x8, _I82580_PHY_CTRL2_MANUAL_MDIX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _I82580_PHY_CTRL2_MANUAL_MDIX@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh20:
	adrp	x8, _I82580_PHY_CTRL2_AUTO_MDI_MDIX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _I82580_PHY_CTRL2_AUTO_MDI_MDIX@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	orr	w2, w8, w2
	str	w2, [sp, #12]
LBB0_13:
	ldr	x8, [x19, #16]
	ldr	w1, [x21]
	mov	x0, x19
	blr	x8
	mov	x20, x0
LBB0_14:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_phy_82580,8,3            ; @e1000_phy_82580
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error resetting the PHY.\n"

	.comm	_I82580_CFG_REG,4,2             ; @I82580_CFG_REG
	.comm	_I82580_CFG_ASSERT_CRS_ON_TX,4,2 ; @I82580_CFG_ASSERT_CRS_ON_TX
	.comm	_I82580_CFG_ENABLE_DOWNSHIFT,4,2 ; @I82580_CFG_ENABLE_DOWNSHIFT
	.comm	_I82580_PHY_CTRL_2,4,2          ; @I82580_PHY_CTRL_2
	.comm	_I82580_PHY_CTRL2_MDIX_CFG_MASK,4,2 ; @I82580_PHY_CTRL2_MDIX_CFG_MASK
	.comm	_I82580_PHY_CTRL2_MANUAL_MDIX,4,2 ; @I82580_PHY_CTRL2_MANUAL_MDIX
	.comm	_I82580_PHY_CTRL2_AUTO_MDI_MDIX,4,2 ; @I82580_PHY_CTRL2_AUTO_MDI_MDIX
.subsections_via_symbols
