	.file	"extr_e1000_hw.c_e1000_adjust_serdes_amplitude.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	e1000_adjust_serdes_amplitude, @function
e1000_adjust_serdes_amplitude:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 40
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR e1000_media_type_internal_serdes[rip]
	cmp	QWORD PTR [rdi], rax
	jne	.L6
	mov	eax, DWORD PTR 8[rdi]
	add	eax, -128
	cmp	eax, 1
	jbe	.L4
.L6:
	mov	rax, QWORD PTR E1000_SUCCESS[rip]
.L1:
	mov	rsi, QWORD PTR 24[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L13
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	esi, DWORD PTR EEPROM_SERDES_AMPLITUDE[rip]
	lea	rcx, 20[rsp]
	mov	edx, 1
	mov	QWORD PTR 8[rsp], rdi
	call	e1000_read_eeprom@PLT
	test	rax, rax
	jne	.L1
	mov	edx, DWORD PTR 20[rsp]
	cmp	edx, DWORD PTR EEPROM_RESERVED_WORD[rip]
	mov	rdi, QWORD PTR 8[rsp]
	je	.L6
	mov	esi, DWORD PTR M88E1000_PHY_EXT_CTRL[rip]
	and	edx, DWORD PTR EEPROM_SERDES_AMPLITUDE_MASK[rip]
	mov	DWORD PTR 20[rsp], edx
	call	e1000_write_phy_reg@PLT
	test	rax, rax
	je	.L6
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	e1000_adjust_serdes_amplitude, .-e1000_adjust_serdes_amplitude
	.comm	e1000_media_type_internal_serdes,8,8
	.comm	M88E1000_PHY_EXT_CTRL,4,4
	.comm	EEPROM_SERDES_AMPLITUDE_MASK,4,4
	.comm	EEPROM_SERDES_AMPLITUDE,4,4
	.comm	EEPROM_RESERVED_WORD,4,4
	.comm	E1000_SUCCESS,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_e1000_hw.c_e1000_adjust_serdes_amplitude.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_adjust_serdes_amplitude, %function
e1000_adjust_serdes_amplitude:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r3, .L14
	ldr	r2, [r0]
	ldr	r3, [r3]
	ldr	r1, .L14+4
	sub	sp, sp, #8
	cmp	r2, r3
	ldr	r1, [r1]
	str	r1, [sp, #4]
	mov	r1,#0
	bne	.L6
	ldr	r3, [r0, #4]
	mov	r4, r0
	sub	r3, r3, #128
	cmp	r3, #1
	bls	.L4
.L6:
	ldr	r3, .L14+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L4:
	ldr	r2, .L14+12
	mov	r3, sp
	ldr	r1, [r2]
	mov	r2, #1
	bl	e1000_read_eeprom
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L14+16
	ldr	r2, [sp]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L6
	ldr	r1, .L14+20
	ldr	r3, .L14+24
	ldr	r1, [r1]
	mov	r0, r4
	and	r2, r2, r1
	ldr	r1, [r3]
	str	r2, [sp]
	bl	e1000_write_phy_reg
	cmp	r0, #0
	beq	.L6
	b	.L1
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	e1000_media_type_internal_serdes
	.word	.LC0
	.word	E1000_SUCCESS
	.word	EEPROM_SERDES_AMPLITUDE
	.word	EEPROM_RESERVED_WORD
	.word	EEPROM_SERDES_AMPLITUDE_MASK
	.word	M88E1000_PHY_EXT_CTRL
	.size	e1000_adjust_serdes_amplitude, .-e1000_adjust_serdes_amplitude
	.comm	e1000_media_type_internal_serdes,4,4
	.comm	M88E1000_PHY_EXT_CTRL,4,4
	.comm	EEPROM_SERDES_AMPLITUDE_MASK,4,4
	.comm	EEPROM_SERDES_AMPLITUDE,4,4
	.comm	EEPROM_RESERVED_WORD,4,4
	.comm	E1000_SUCCESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
