	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000e_get_cable_length_m88    ## -- Begin function e1000e_get_cable_length_m88
	.p2align	4, 0x90
_e1000e_get_cable_length_m88:           ## @e1000e_get_cable_length_m88
	.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	_M88E1000_PHY_SPEC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_e1e_rphy
	testq	%rax, %rax
	jne	LBB0_4
## %bb.1:
	movq	_M88E1000_PSSR_CABLE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	movq	_M88E1000_PSSR_CABLE_LENGTH_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_M88E1000_CABLE_LENGTH_TABLE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	decl	%ecx
	cmpl	%ecx, %eax
	jge	LBB0_2
## %bb.3:
	movq	_e1000_m88_cable_length_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	(%rcx,%rax,8), %edx
	movl	%edx, (%rbx)
	movl	8(%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	_M88E1000_PHY_SPEC_STATUS,4,2   ## @M88E1000_PHY_SPEC_STATUS
	.comm	_M88E1000_PSSR_CABLE_LENGTH,4,2 ## @M88E1000_PSSR_CABLE_LENGTH
	.comm	_M88E1000_PSSR_CABLE_LENGTH_SHIFT,4,2 ## @M88E1000_PSSR_CABLE_LENGTH_SHIFT
	.comm	_M88E1000_CABLE_LENGTH_TABLE_SIZE,4,2 ## @M88E1000_CABLE_LENGTH_TABLE_SIZE
	.comm	_E1000_ERR_PHY,8,3              ## @E1000_ERR_PHY
	.comm	_e1000_m88_cable_length_table,8,3 ## @e1000_m88_cable_length_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000e_get_cable_length_m88    ; -- Begin function e1000e_get_cable_length_m88
	.p2align	2
_e1000e_get_cable_length_m88:           ; @e1000e_get_cable_length_m88
	.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, _M88E1000_PHY_SPEC_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M88E1000_PHY_SPEC_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_e1e_rphy
	cbnz	x0, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _M88E1000_PSSR_CABLE_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M88E1000_PSSR_CABLE_LENGTH@GOTPAGEOFF]
	ldr	w9, [sp, #12]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w9
Lloh6:
	adrp	x9, _M88E1000_PSSR_CABLE_LENGTH_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M88E1000_PSSR_CABLE_LENGTH_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh9:
	adrp	x9, _M88E1000_CABLE_LENGTH_TABLE_SIZE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _M88E1000_CABLE_LENGTH_TABLE_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	sub	w9, w9, #1
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:
	mov	x0, #0
Lloh12:
	adrp	x9, _e1000_m88_cable_length_table@GOTPAGE
Lloh13:
	ldr	x9, [x9, _e1000_m88_cable_length_table@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x8, x9, w8, sxtw #3
	ldr	x9, [x8]
	ldr	w8, [x8, #8]
	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:
Lloh15:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh17:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_M88E1000_PHY_SPEC_STATUS,4,2   ; @M88E1000_PHY_SPEC_STATUS
	.comm	_M88E1000_PSSR_CABLE_LENGTH,4,2 ; @M88E1000_PSSR_CABLE_LENGTH
	.comm	_M88E1000_PSSR_CABLE_LENGTH_SHIFT,4,2 ; @M88E1000_PSSR_CABLE_LENGTH_SHIFT
	.comm	_M88E1000_CABLE_LENGTH_TABLE_SIZE,4,2 ; @M88E1000_CABLE_LENGTH_TABLE_SIZE
	.comm	_E1000_ERR_PHY,8,3              ; @E1000_ERR_PHY
	.comm	_e1000_m88_cable_length_table,8,3 ; @e1000_m88_cable_length_table
.subsections_via_symbols
