	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igb_get_cable_length_82580     ## -- Begin function igb_get_cable_length_82580
	.p2align	4, 0x90
_igb_get_cable_length_82580:            ## @igb_get_cable_length_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_I82580_PHY_DIAG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	*8(%rdi)
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_I82580_DSTATUS_CABLE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	-12(%rbp), %edx
	movq	_I82580_DSTATUS_CABLE_LENGTH_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movq	_E1000_CABLE_LENGTH_UNDEFINED@GOTPCREL(%rip), %rcx
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	subl	(%rsi), %eax
	cmpl	(%rcx), %edx
	cmovnel	%edi, %eax
	movl	%edx, (%rbx)
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I82580_PHY_DIAG_STATUS,4,2     ## @I82580_PHY_DIAG_STATUS
	.comm	_I82580_DSTATUS_CABLE_LENGTH,4,2 ## @I82580_DSTATUS_CABLE_LENGTH
	.comm	_I82580_DSTATUS_CABLE_LENGTH_SHIFT,4,2 ## @I82580_DSTATUS_CABLE_LENGTH_SHIFT
	.comm	_E1000_CABLE_LENGTH_UNDEFINED,4,2 ## @E1000_CABLE_LENGTH_UNDEFINED
	.comm	_E1000_ERR_PHY,4,2              ## @E1000_ERR_PHY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_igb_get_cable_length_82580     ; -- Begin function igb_get_cable_length_82580
	.p2align	2
_igb_get_cable_length_82580:            ; @igb_get_cable_length_82580
	.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
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _I82580_PHY_DIAG_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I82580_PHY_DIAG_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	add	x2, sp, #12
	blr	x8
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _I82580_DSTATUS_CABLE_LENGTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I82580_DSTATUS_CABLE_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _I82580_DSTATUS_CABLE_LENGTH_SHIFT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _I82580_DSTATUS_CABLE_LENGTH_SHIFT@GOTPAGEOFF]
	and	w8, w9, w8
Lloh8:
	ldr	w9, [x10]
	asr	w8, w8, w9
Lloh9:
	adrp	x9, _E1000_CABLE_LENGTH_UNDEFINED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _E1000_CABLE_LENGTH_UNDEFINED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _E1000_ERR_PHY@GOTPAGE
Lloh13:
	ldr	x10, [x10, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w8, w9
	csneg	w0, wzr, w10, ne
	str	w8, [x19]
LBB0_2:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_I82580_PHY_DIAG_STATUS,4,2     ; @I82580_PHY_DIAG_STATUS
	.comm	_I82580_DSTATUS_CABLE_LENGTH,4,2 ; @I82580_DSTATUS_CABLE_LENGTH
	.comm	_I82580_DSTATUS_CABLE_LENGTH_SHIFT,4,2 ; @I82580_DSTATUS_CABLE_LENGTH_SHIFT
	.comm	_E1000_CABLE_LENGTH_UNDEFINED,4,2 ; @E1000_CABLE_LENGTH_UNDEFINED
	.comm	_E1000_ERR_PHY,4,2              ; @E1000_ERR_PHY
.subsections_via_symbols
