	.file	"extr_es2lan.c_e1000_get_cable_length_80003es2lan.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	e1000_get_cable_length_80003es2lan, @function
e1000_get_cable_length_80003es2lan:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	esi, DWORD PTR GG82563_PHY_DSP_DISTANCE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rdx, 4[rsp]
	call	e1e_rphy@PLT
	test	rax, rax
	jne	.L1
	mov	esi, DWORD PTR GG82563_CABLE_LENGTH_TABLE_SIZE[rip]
	mov	edx, DWORD PTR 4[rsp]
	and	edx, DWORD PTR GG82563_DSPD_CABLE_LENGTH[rip]
	lea	ecx, -5[rsi]
	cmp	ecx, edx
	jle	.L7
	mov	rsi, QWORD PTR e1000_gg82563_cable_length_table[rip]
	movsx	rdx, edx
	mov	rcx, QWORD PTR [rsi+rdx*8]
	mov	rdx, QWORD PTR 40[rsi+rdx*8]
	mov	DWORD PTR [rbx], ecx
	add	ecx, edx
	mov	DWORD PTR 4[rbx], edx
	mov	edx, ecx
	shr	edx, 31
	add	edx, ecx
	sar	edx
	mov	DWORD PTR 8[rbx], edx
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rax, QWORD PTR E1000_ERR_PHY[rip]
	neg	rax
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	e1000_get_cable_length_80003es2lan, .-e1000_get_cable_length_80003es2lan
	.comm	e1000_gg82563_cable_length_table,8,8
	.comm	GG82563_PHY_DSP_DISTANCE,4,4
	.comm	GG82563_DSPD_CABLE_LENGTH,4,4
	.comm	GG82563_CABLE_LENGTH_TABLE_SIZE,4,4
	.comm	E1000_ERR_PHY,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_es2lan.c_e1000_get_cable_length_80003es2lan.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	e1000_get_cable_length_80003es2lan, %function
e1000_get_cable_length_80003es2lan:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r3, .L9
	sub	sp, sp, #8
	ldr	r1, [r3]
	ldr	r3, .L9+4
	mov	r2, sp
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r4, r0
	bl	e1e_rphy
	cmp	r0, #0
	bne	.L1
	ldr	r2, .L9+8
	ldr	r3, .L9+12
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [sp]
	sub	r3, r3, #5
	and	r2, r2, r1
	cmp	r3, r2
	ble	.L7
	ldr	r3, .L9+16
	ldr	r1, [r3]
	add	r3, r1, r2, lsl #2
	ldr	r3, [r3, #20]
	ldr	r2, [r1, r2, lsl #2]
	str	r3, [r4, #4]
	add	r3, r2, r3
	add	r3, r3, r3, lsr #31
	asr	r3, r3, #1
	str	r3, [r4, #8]
	str	r2, [r4]
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L7:
	ldr	r3, .L9+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	GG82563_PHY_DSP_DISTANCE
	.word	.LC0
	.word	GG82563_DSPD_CABLE_LENGTH
	.word	GG82563_CABLE_LENGTH_TABLE_SIZE
	.word	e1000_gg82563_cable_length_table
	.word	E1000_ERR_PHY
	.size	e1000_get_cable_length_80003es2lan, .-e1000_get_cable_length_80003es2lan
	.comm	e1000_gg82563_cable_length_table,4,4
	.comm	GG82563_PHY_DSP_DISTANCE,4,4
	.comm	GG82563_DSPD_CABLE_LENGTH,4,4
	.comm	GG82563_CABLE_LENGTH_TABLE_SIZE,4,4
	.comm	E1000_ERR_PHY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
