	.file	"extr_phy.c_e1000e_copper_link_setup_m88.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Error committing the PHY changes\n"
	.text
	.p2align 4
	.globl	e1000e_copper_link_setup_m88
	.type	e1000e_copper_link_setup_m88, @function
e1000e_copper_link_setup_m88:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR M88E1000_PHY_SPEC_CTRL[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	r13, 4[rsp]
	mov	rdx, r13
	call	e1e_rphy@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L1
	mov	r8, QWORD PTR 0[rbp]
	mov	rdi, QWORD PTR e1000_phy_bm[rip]
	mov	edx, DWORD PTR 4[rsp]
	cmp	r8, rdi
	je	.L3
	or	edx, DWORD PTR M88E1000_PSCR_ASSERT_CRS_ON_TX[rip]
.L3:
	mov	eax, DWORD PTR M88E1000_PSCR_AUTO_X_MODE[rip]
	mov	ecx, eax
	not	ecx
	mov	esi, ecx
	mov	ecx, DWORD PTR 8[rbp]
	and	esi, edx
	cmp	ecx, 2
	je	.L4
	cmp	ecx, 3
	je	.L5
	or	eax, edx
	cmp	ecx, 1
	je	.L31
.L7:
	mov	ecx, DWORD PTR M88E1000_PSCR_POLARITY_REVERSAL[rip]
	mov	edx, ecx
	not	edx
	and	edx, eax
	cmp	QWORD PTR 40[rbp], 0
	mov	DWORD PTR 4[rsp], edx
	je	.L8
	or	ecx, eax
	mov	DWORD PTR 4[rsp], ecx
	mov	edx, ecx
.L8:
	mov	esi, DWORD PTR M88E1000_PHY_SPEC_CTRL[rip]
	cmp	r8, rdi
	jne	.L9
	mov	eax, DWORD PTR BME1000_PSCR_ENABLE_DOWNSHIFT[rip]
	mov	rbx, QWORD PTR BME1000_E_PHY_ID_R2[rip]
	cmp	QWORD PTR 16[rbp], rbx
	je	.L32
.L10:
	or	edx, eax
	mov	DWORD PTR 4[rsp], edx
.L9:
	mov	rdi, rbp
	call	e1e_wphy@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L1
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR e1000_phy_m88[rip]
	je	.L33
.L12:
	cmp	QWORD PTR e1000_phy_bm[rip], rax
	je	.L16
.L19:
	mov	rax, QWORD PTR 32[rbp]
	test	rax, rax
	je	.L18
	mov	rdi, rbp
	call	rax
	mov	rbx, rax
	test	rax, rax
	jne	.L34
.L18:
	mov	rax, QWORD PTR e1000_phy_82578[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L35
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L36
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	eax, DWORD PTR M88E1000_PSCR_MDI_MANUAL_MODE[rip]
	or	eax, esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR M88E1000_PSCR_AUTO_X_1000T[rip]
	or	eax, esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR M88E1000_PSCR_MDIX_MANUAL_MODE[rip]
	or	eax, esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L35:
	mov	esi, DWORD PTR M88E1000_EXT_PHY_SPEC_CTRL[rip]
	mov	rdx, r13
	mov	rdi, rbp
	call	e1e_rphy@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR I82578_EPSCR_DOWNSHIFT_COUNTER_MASK[rip]
	mov	edx, DWORD PTR 4[rsp]
	mov	rdi, rbp
	or	edx, DWORD PTR I82578_EPSCR_DOWNSHIFT_ENABLE[rip]
	mov	esi, DWORD PTR M88E1000_EXT_PHY_SPEC_CTRL[rip]
	not	eax
	and	edx, eax
	mov	DWORD PTR 4[rsp], edx
	call	e1e_wphy@PLT
	mov	r12, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L33:
	mov	ebx, DWORD PTR E1000_REVISION_4[rip]
	cmp	DWORD PTR 24[rbp], ebx
	jge	.L12
	mov	rbx, QWORD PTR BME1000_E_PHY_ID_R2[rip]
	cmp	QWORD PTR 16[rbp], rbx
	jne	.L37
	cmp	rax, QWORD PTR e1000_phy_bm[rip]
	jne	.L19
.L20:
	mov	edx, 3
	mov	esi, 29
	mov	rdi, rbp
	call	e1e_wphy@PLT
	test	rax, rax
	jne	.L25
	xor	edx, edx
	mov	esi, 30
	mov	rdi, rbp
	call	e1e_wphy@PLT
	test	rax, rax
	je	.L19
	.p2align 4,,10
	.p2align 3
.L25:
	mov	r12, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR BME1000_E_PHY_ID_R2[rip]
	cmp	QWORD PTR 16[rbp], rax
	jne	.L19
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L32:
	not	eax
	mov	rdi, rbp
	and	edx, eax
	mov	DWORD PTR 4[rsp], edx
	call	e1e_wphy@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L1
	mov	rdi, rbp
	call	[QWORD PTR 32[rbp]]
	mov	r12, rax
	test	rax, rax
	jne	.L11
	mov	edx, DWORD PTR 4[rsp]
	mov	eax, DWORD PTR BME1000_PSCR_ENABLE_DOWNSHIFT[rip]
	mov	esi, DWORD PTR M88E1000_PHY_SPEC_CTRL[rip]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L34:
	lea	rdi, .LC0[rip]
	mov	r12, rbx
	call	e_dbg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L37:
	mov	esi, DWORD PTR M88E1000_EXT_PHY_SPEC_CTRL[rip]
	mov	rdx, r13
	mov	rdi, rbp
	call	e1e_rphy@PLT
	test	rax, rax
	jne	.L25
	mov	edx, DWORD PTR 4[rsp]
	mov	ecx, DWORD PTR M88E1000_EPSCR_TX_CLK_25[rip]
	or	ecx, edx
	cmp	DWORD PTR 24[rbp], 2
	je	.L38
.L14:
	mov	edx, DWORD PTR M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK[rip]
	or	edx, DWORD PTR M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK[rip]
	not	edx
	mov	eax, DWORD PTR M88E1000_EPSCR_MASTER_DOWNSHIFT_1X[rip]
	or	eax, DWORD PTR M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X[rip]
	and	edx, ecx
	or	edx, eax
.L15:
	mov	esi, DWORD PTR M88E1000_EXT_PHY_SPEC_CTRL[rip]
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], edx
	call	e1e_wphy@PLT
	test	rax, rax
	jne	.L25
	mov	rax, QWORD PTR 0[rbp]
	jmp	.L12
.L11:
	lea	rdi, .LC0[rip]
	call	e_dbg@PLT
	jmp	.L1
.L38:
	mov	rax, QWORD PTR M88E1111_I_PHY_ID[rip]
	cmp	QWORD PTR 16[rbp], rax
	jne	.L14
	mov	eax, DWORD PTR M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK[rip]
	mov	edx, DWORD PTR M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X[rip]
	not	eax
	and	eax, ecx
	or	edx, eax
	jmp	.L15
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	e1000e_copper_link_setup_m88, .-e1000e_copper_link_setup_m88
	.comm	e1000_phy_m88,8,8
	.comm	e1000_phy_bm,8,8
	.comm	e1000_phy_82578,8,8
	.comm	M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK,4,4
	.comm	M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X,4,4
	.comm	M88E1111_I_PHY_ID,8,8
	.comm	M88E1000_PSCR_POLARITY_REVERSAL,4,4
	.comm	M88E1000_PSCR_MDI_MANUAL_MODE,4,4
	.comm	M88E1000_PSCR_MDIX_MANUAL_MODE,4,4
	.comm	M88E1000_PSCR_AUTO_X_MODE,4,4
	.comm	M88E1000_PSCR_AUTO_X_1000T,4,4
	.comm	M88E1000_PSCR_ASSERT_CRS_ON_TX,4,4
	.comm	M88E1000_PHY_SPEC_CTRL,4,4
	.comm	M88E1000_EXT_PHY_SPEC_CTRL,4,4
	.comm	M88E1000_EPSCR_TX_CLK_25,4,4
	.comm	M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK,4,4
	.comm	M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X,4,4
	.comm	M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK,4,4
	.comm	M88E1000_EPSCR_MASTER_DOWNSHIFT_1X,4,4
	.comm	I82578_EPSCR_DOWNSHIFT_ENABLE,4,4
	.comm	I82578_EPSCR_DOWNSHIFT_COUNTER_MASK,4,4
	.comm	E1000_REVISION_4,4,4
	.comm	BME1000_PSCR_ENABLE_DOWNSHIFT,4,4
	.comm	BME1000_E_PHY_ID_R2,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_phy.c_e1000e_copper_link_setup_m88.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Error committing the PHY changes\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	e1000e_copper_link_setup_m88
	.syntax unified
	.arm
	.fpu softvfp
	.type	e1000e_copper_link_setup_m88, %function
e1000e_copper_link_setup_m88:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L42
	sub	sp, sp, #8
	ldr	r3, .L42+4
	mov	r2, sp
	ldr	r1, [r6]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r5, r0
	bl	e1e_rphy
	subs	r4, r0, #0
	bne	.L1
	ldr	r7, .L42+8
	ldr	ip, [r5]
	ldr	r0, [r7]
	ldr	r1, [sp]
	cmp	ip, r0
	ldrne	r3, .L42+12
	ldr	r2, [r5, #4]
	ldrne	r3, [r3]
	orrne	r1, r1, r3
	ldr	r3, .L42+16
	cmp	r2, #2
	ldr	lr, [r3]
	bic	r3, r1, lr
	beq	.L4
	cmp	r2, #3
	beq	.L5
	cmp	r2, #1
	orrne	r3, lr, r1
	beq	.L34
.L7:
	ldr	r1, .L42+20
	ldr	r2, [r5, #20]
	ldr	r1, [r1]
	cmp	r2, #0
	bic	r2, r3, r1
	str	r2, [sp]
	orrne	r2, r1, r3
	strne	r2, [sp]
	cmp	ip, r0
	ldr	r1, [r6]
	bne	.L9
	ldr	r3, .L42+24
	ldr	r0, [r5, #8]
	ldr	r3, [r3]
	ldr	r8, .L42+28
	cmp	r0, r3
	ldr	r3, [r8]
	beq	.L35
.L10:
	orr	r2, r2, r3
	str	r2, [sp]
.L9:
	mov	r0, r5
	bl	e1e_wphy
	subs	r4, r0, #0
	bne	.L1
	ldr	r2, .L42+32
	ldr	r3, [r5]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L36
.L12:
	ldr	r2, [r7]
	cmp	r2, r3
	beq	.L16
.L19:
	ldr	r3, [r5, #16]
	cmp	r3, #0
	beq	.L18
	mov	r0, r5
	blx	r3
	subs	r3, r0, #0
	bne	.L37
.L18:
	ldr	r3, .L42+36
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L38
.L1:
	ldr	r3, .L42+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L34:
	ldr	r2, .L42+40
	ldr	r2, [r2]
	orr	r3, r3, r2
	b	.L7
.L5:
	ldr	r2, .L42+44
	ldr	r2, [r2]
	orr	r3, r3, r2
	b	.L7
.L4:
	ldr	r2, .L42+48
	ldr	r2, [r2]
	orr	r3, r3, r2
	b	.L7
.L38:
	ldr	r6, .L42+52
	mov	r2, sp
	mov	r0, r5
	ldr	r1, [r6]
	bl	e1e_rphy
	subs	r4, r0, #0
	bne	.L1
	ldr	r2, .L42+56
	ldr	r3, .L42+60
	ldr	r1, [r2]
	ldr	r2, [sp]
	ldr	r3, [r3]
	orr	r2, r2, r1
	bic	r2, r2, r3
	mov	r0, r5
	ldr	r1, [r6]
	str	r2, [sp]
	bl	e1e_wphy
	mov	r4, r0
	b	.L1
.L36:
	ldr	r2, .L42+64
	ldr	r1, [r5, #12]
	ldr	r2, [r2]
	cmp	r1, r2
	bge	.L12
	ldr	r2, .L42+24
	ldr	r1, [r5, #8]
	ldr	r2, [r2]
	cmp	r1, r2
	bne	.L40
	ldr	r2, [r7]
	cmp	r3, r2
	bne	.L19
.L20:
	mov	r2, #3
	mov	r1, #29
	mov	r0, r5
	bl	e1e_wphy
	subs	r2, r0, #0
	movne	r4, r2
	bne	.L1
	mov	r1, #30
	mov	r0, r5
	bl	e1e_wphy
	cmp	r0, #0
	beq	.L19
.L25:
	mov	r4, r0
	b	.L1
.L16:
	ldr	r3, .L42+24
	ldr	r2, [r5, #8]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L19
	b	.L20
.L35:
	bic	r2, r2, r3
	mov	r0, r5
	str	r2, [sp]
	bl	e1e_wphy
	subs	r4, r0, #0
	bne	.L1
	mov	r0, r5
	ldr	r3, [r5, #16]
	blx	r3
	subs	r4, r0, #0
	bne	.L11
	ldr	r3, [r8]
	ldr	r1, [r6]
	ldr	r2, [sp]
	b	.L10
.L37:
	ldr	r0, .L42+68
	mov	r4, r3
	bl	e_dbg
	b	.L1
.L40:
	ldr	r6, .L42+52
	mov	r2, sp
	mov	r0, r5
	ldr	r1, [r6]
	bl	e1e_rphy
	cmp	r0, #0
	bne	.L25
	ldr	r3, .L42+72
	ldr	r1, [r5, #12]
	ldr	r3, [r3]
	ldr	r2, [sp]
	cmp	r1, #2
	orr	r3, r2, r3
	beq	.L41
.L14:
	ldr	r0, .L42+76
	ldr	r1, .L42+80
	ldr	ip, [r0]
	ldr	r2, .L42+84
	ldr	r0, .L42+88
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	r0, [r0]
	orr	r1, r1, ip
	bic	r3, r3, r1
	orr	r2, r2, r0
	orr	r2, r3, r2
.L15:
	mov	r0, r5
	ldr	r1, [r6]
	str	r2, [sp]
	bl	e1e_wphy
	cmp	r0, #0
	bne	.L25
	ldr	r3, [r5]
	b	.L12
.L11:
	ldr	r0, .L42+68
	bl	e_dbg
	b	.L1
.L41:
	ldr	r2, .L42+92
	ldr	r1, [r5, #8]
	ldr	r2, [r2]
	cmp	r1, r2
	bne	.L14
	ldr	r2, .L42+96
	ldr	r1, .L42+100
	ldr	r2, [r2]
	ldr	r1, [r1]
	bic	r3, r3, r2
	orr	r2, r3, r1
	b	.L15
.L39:
	bl	__stack_chk_fail
.L43:
	.align	2
.L42:
	.word	M88E1000_PHY_SPEC_CTRL
	.word	.LC1
	.word	e1000_phy_bm
	.word	M88E1000_PSCR_ASSERT_CRS_ON_TX
	.word	M88E1000_PSCR_AUTO_X_MODE
	.word	M88E1000_PSCR_POLARITY_REVERSAL
	.word	BME1000_E_PHY_ID_R2
	.word	BME1000_PSCR_ENABLE_DOWNSHIFT
	.word	e1000_phy_m88
	.word	e1000_phy_82578
	.word	M88E1000_PSCR_MDI_MANUAL_MODE
	.word	M88E1000_PSCR_AUTO_X_1000T
	.word	M88E1000_PSCR_MDIX_MANUAL_MODE
	.word	M88E1000_EXT_PHY_SPEC_CTRL
	.word	I82578_EPSCR_DOWNSHIFT_ENABLE
	.word	I82578_EPSCR_DOWNSHIFT_COUNTER_MASK
	.word	E1000_REVISION_4
	.word	.LC0
	.word	M88E1000_EPSCR_TX_CLK_25
	.word	M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK
	.word	M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK
	.word	M88E1000_EPSCR_MASTER_DOWNSHIFT_1X
	.word	M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X
	.word	M88E1111_I_PHY_ID
	.word	M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK
	.word	M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X
	.size	e1000e_copper_link_setup_m88, .-e1000e_copper_link_setup_m88
	.comm	e1000_phy_m88,4,4
	.comm	e1000_phy_bm,4,4
	.comm	e1000_phy_82578,4,4
	.comm	M88EC018_EPSCR_DOWNSHIFT_COUNTER_MASK,4,4
	.comm	M88EC018_EPSCR_DOWNSHIFT_COUNTER_5X,4,4
	.comm	M88E1111_I_PHY_ID,4,4
	.comm	M88E1000_PSCR_POLARITY_REVERSAL,4,4
	.comm	M88E1000_PSCR_MDI_MANUAL_MODE,4,4
	.comm	M88E1000_PSCR_MDIX_MANUAL_MODE,4,4
	.comm	M88E1000_PSCR_AUTO_X_MODE,4,4
	.comm	M88E1000_PSCR_AUTO_X_1000T,4,4
	.comm	M88E1000_PSCR_ASSERT_CRS_ON_TX,4,4
	.comm	M88E1000_PHY_SPEC_CTRL,4,4
	.comm	M88E1000_EXT_PHY_SPEC_CTRL,4,4
	.comm	M88E1000_EPSCR_TX_CLK_25,4,4
	.comm	M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK,4,4
	.comm	M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X,4,4
	.comm	M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK,4,4
	.comm	M88E1000_EPSCR_MASTER_DOWNSHIFT_1X,4,4
	.comm	I82578_EPSCR_DOWNSHIFT_ENABLE,4,4
	.comm	I82578_EPSCR_DOWNSHIFT_COUNTER_MASK,4,4
	.comm	E1000_REVISION_4,4,4
	.comm	BME1000_PSCR_ENABLE_DOWNSHIFT,4,4
	.comm	BME1000_E_PHY_ID_R2,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
