	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igc_copper_link_autoneg
_igc_copper_link_autoneg:               ## @igc_copper_link_autoneg
	.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
	movl	32(%rdi), %eax
	movl	36(%rdi), %ecx
	andl	%eax, %ecx
	cmovel	%eax, %ecx
	movl	%ecx, 36(%rdi)
	leaq	L_.str(%rip), %rdi
	callq	_hw_dbg
	movq	%r14, %rdi
	callq	_igc_phy_setup_autoneg
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rdi
	callq	_hw_dbg
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str.2(%rip), %rdi
	callq	_hw_dbg
	movq	_PHY_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	*24(%r14)
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	movq	_MII_CR_AUTO_NEG_EN@GOTPCREL(%rip), %rax
	movq	_MII_CR_RESTART_AUTO_NEG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	orl	-28(%rbp), %edx
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	*16(%r14)
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	cmpq	$0, 8(%r14)
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_igc_wait_autoneg
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %rdi
	callq	_hw_dbg
	jmp	LBB0_8
LBB0_7:
	movl	$1, (%r14)
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reconfiguring auto-neg advertisement params\n"

L_.str.1:                               ## @.str.1
	.asciz	"Error Setting up Auto-Negotiation\n"

L_.str.2:                               ## @.str.2
	.asciz	"Restarting Auto-Neg\n"

	.comm	_PHY_CONTROL,4,2                ## @PHY_CONTROL
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ## @MII_CR_AUTO_NEG_EN
	.comm	_MII_CR_RESTART_AUTO_NEG,4,2    ## @MII_CR_RESTART_AUTO_NEG
L_.str.3:                               ## @.str.3
	.asciz	"Error while waiting for autoneg to complete\n"

	.no_dead_strip	_igc_copper_link_autoneg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igc_copper_link_autoneg
_igc_copper_link_autoneg:               ; @igc_copper_link_autoneg
	.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
	ldp	w8, w9, [x0, #32]
	ands	w9, w9, w8
	csel	w8, w8, w9, eq
	str	w8, [x0, #36]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_hw_dbg
	mov	x0, x19
	bl	_igc_phy_setup_autoneg
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_hw_dbg
	b	LBB0_8
LBB0_2:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_hw_dbg
	ldr	x8, [x19, #24]
Lloh6:
	adrp	x21, _PHY_CONTROL@GOTPAGE
Lloh7:
	ldr	x21, [x21, _PHY_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbnz	x0, LBB0_8
; %bb.3:
Lloh8:
	adrp	x8, _MII_CR_AUTO_NEG_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MII_CR_AUTO_NEG_EN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _MII_CR_RESTART_AUTO_NEG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MII_CR_RESTART_AUTO_NEG@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	x8, [x19, #16]
	ldr	w1, [x21]
	mov	x0, x19
	blr	x8
	mov	x20, x0
	cbnz	x0, LBB0_8
; %bb.4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_igc_wait_autoneg
	cbz	x0, LBB0_7
; %bb.6:
	mov	x20, x0
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_hw_dbg
	b	LBB0_8
LBB0_7:
	mov	x20, #0
	mov	w8, #1
	str	w8, [x19]
LBB0_8:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reconfiguring auto-neg advertisement params\n"

l_.str.1:                               ; @.str.1
	.asciz	"Error Setting up Auto-Negotiation\n"

l_.str.2:                               ; @.str.2
	.asciz	"Restarting Auto-Neg\n"

	.comm	_PHY_CONTROL,4,2                ; @PHY_CONTROL
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ; @MII_CR_AUTO_NEG_EN
	.comm	_MII_CR_RESTART_AUTO_NEG,4,2    ; @MII_CR_RESTART_AUTO_NEG
l_.str.3:                               ; @.str.3
	.asciz	"Error while waiting for autoneg to complete\n"

	.no_dead_strip	_igc_copper_link_autoneg
.subsections_via_symbols
