	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_get_cable_length_80003es2lan
_e1000_get_cable_length_80003es2lan:    ## @e1000_get_cable_length_80003es2lan
	.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	_GG82563_PHY_DSP_DISTANCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_e1e_rphy
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movq	_GG82563_DSPD_CABLE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	movq	_GG82563_CABLE_LENGTH_TABLE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	$-5, %ecx
	cmpl	%ecx, %eax
	jge	LBB0_2
## %bb.3:
	cltq
	movq	_e1000_gg82563_cable_length_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,8), %edx
	movl	%edx, (%rbx)
	movl	40(%rcx,%rax,8), %eax
	movl	%eax, 4(%rbx)
	addl	%edx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, 8(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GG82563_PHY_DSP_DISTANCE,4,2   ## @GG82563_PHY_DSP_DISTANCE
	.comm	_GG82563_DSPD_CABLE_LENGTH,4,2  ## @GG82563_DSPD_CABLE_LENGTH
	.comm	_GG82563_CABLE_LENGTH_TABLE_SIZE,4,2 ## @GG82563_CABLE_LENGTH_TABLE_SIZE
	.comm	_E1000_ERR_PHY,8,3              ## @E1000_ERR_PHY
	.comm	_e1000_gg82563_cable_length_table,8,3 ## @e1000_gg82563_cable_length_table
	.no_dead_strip	_e1000_get_cable_length_80003es2lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_get_cable_length_80003es2lan
_e1000_get_cable_length_80003es2lan:    ; @e1000_get_cable_length_80003es2lan
	.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	x8, _GG82563_PHY_DSP_DISTANCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GG82563_PHY_DSP_DISTANCE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_e1e_rphy
	cbnz	x0, LBB0_4
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _GG82563_DSPD_CABLE_LENGTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GG82563_DSPD_CABLE_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh6:
	adrp	x9, _GG82563_CABLE_LENGTH_TABLE_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GG82563_CABLE_LENGTH_TABLE_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sub	w9, w9, #5
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:
	mov	x0, #0
Lloh9:
	adrp	x9, _e1000_gg82563_cable_length_table@GOTPAGE
Lloh10:
	ldr	x9, [x9, _e1000_gg82563_cable_length_table@GOTPAGEOFF]
	sxtw	x8, w8
Lloh11:
	ldr	x9, [x9]
	add	x8, x9, x8, lsl #3
	ldr	x9, [x8]
	ldr	w8, [x8, #40]
	stp	w9, w8, [x19]
	add	w8, w8, w9
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [x19, #8]
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_4:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GG82563_PHY_DSP_DISTANCE,4,2   ; @GG82563_PHY_DSP_DISTANCE
	.comm	_GG82563_DSPD_CABLE_LENGTH,4,2  ; @GG82563_DSPD_CABLE_LENGTH
	.comm	_GG82563_CABLE_LENGTH_TABLE_SIZE,4,2 ; @GG82563_CABLE_LENGTH_TABLE_SIZE
	.comm	_E1000_ERR_PHY,8,3              ; @E1000_ERR_PHY
	.comm	_e1000_gg82563_cable_length_table,8,3 ; @e1000_gg82563_cable_length_table
	.no_dead_strip	_e1000_get_cable_length_80003es2lan
.subsections_via_symbols
