	.file	"extr_e1000_i210.c_igb_pll_workaround_i210.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	igb_pll_workaround_i210
	.type	igb_pll_workaround_i210, @function
igb_pll_workaround_i210:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	edi, DWORD PTR E1000_WUC[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	rd32@PLT
	mov	edi, DWORD PTR E1000_MDICNFG[rip]
	mov	r14d, eax
	call	rd32@PLT
	mov	esi, DWORD PTR E1000_MDICNFG_EXT_MDIO[rip]
	mov	edi, DWORD PTR E1000_MDICNFG[rip]
	mov	DWORD PTR 12[rsp], eax
	not	esi
	and	esi, eax
	call	wr32@PLT
	mov	esi, DWORD PTR E1000_INVM_AUTOLOAD[rip]
	lea	rdx, 28[rsp]
	mov	rdi, rbp
	call	igb_read_invm_word_i210@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L2
	mov	eax, DWORD PTR 28[rsp]
.L3:
	mov	edx, DWORD PTR E1000_PHY_PLL_FREQ_PAGE[rip]
	mov	esi, DWORD PTR I347AT4_PAGE_SELECT[rip]
	mov	rdi, rbp
	or	eax, DWORD PTR E1000_INVM_PLL_WO_VAL[rip]
	mov	ebx, eax
	call	igb_write_phy_reg_82580@PLT
	mov	eax, DWORD PTR E1000_PHY_PLL_UNCONF[rip]
	mov	DWORD PTR 32[rsp], eax
	mov	eax, DWORD PTR E1000_MAX_PLL_TRIES[rip]
	test	eax, eax
	jle	.L4
	sal	ebx, 16
	xor	r12d, r12d
	lea	r15, 32[rsp]
	mov	DWORD PTR 8[rsp], ebx
	lea	rbx, 36[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR E1000_CTRL[rip]
	mov	r13d, DWORD PTR E1000_ERR_PHY[rip]
	add	r12d, 1
	call	rd32@PLT
	mov	edi, DWORD PTR E1000_CTRL[rip]
	or	eax, DWORD PTR E1000_CTRL_PHY_RST[rip]
	mov	esi, eax
	call	wr32@PLT
	mov	edi, DWORD PTR E1000_CTRL_EXT[rip]
	call	rd32@PLT
	mov	esi, DWORD PTR E1000_CTRL_EXT_PHYPDEN[rip]
	mov	edi, DWORD PTR E1000_CTRL_EXT[rip]
	or	esi, DWORD PTR E1000_CTRL_EXT_SDLPE[rip]
	or	esi, eax
	call	wr32@PLT
	mov	edi, DWORD PTR E1000_WUC[rip]
	xor	esi, esi
	call	wr32@PLT
	mov	esi, DWORD PTR E1000_INVM_AUTOLOAD[rip]
	mov	edi, DWORD PTR E1000_EEARBC_I210[rip]
	sal	esi, 4
	or	esi, DWORD PTR 8[rsp]
	call	wr32@PLT
	mov	esi, DWORD PTR E1000_PCI_PMCSR[rip]
	mov	rdx, rbx
	mov	rdi, rbp
	call	igb_read_pci_cfg@PLT
	mov	esi, DWORD PTR E1000_PCI_PMCSR[rip]
	mov	rdx, rbx
	mov	rdi, rbp
	mov	eax, DWORD PTR E1000_PCI_PMCSR_D3[rip]
	or	DWORD PTR 36[rsp], eax
	call	igb_write_pci_cfg@PLT
	mov	esi, 2000
	mov	edi, 1000
	call	usleep_range@PLT
	mov	eax, DWORD PTR E1000_PCI_PMCSR_D3[rip]
	mov	rdx, rbx
	mov	rdi, rbp
	mov	esi, DWORD PTR E1000_PCI_PMCSR[rip]
	not	eax
	and	DWORD PTR 36[rsp], eax
	call	igb_write_pci_cfg@PLT
	mov	esi, DWORD PTR E1000_INVM_AUTOLOAD[rip]
	mov	eax, DWORD PTR 28[rsp]
	mov	edi, DWORD PTR E1000_EEARBC_I210[rip]
	sal	eax, 16
	sal	esi, 4
	or	esi, eax
	call	wr32@PLT
	mov	edi, DWORD PTR E1000_WUC[rip]
	mov	esi, r14d
	call	wr32@PLT
	cmp	DWORD PTR E1000_MAX_PLL_TRIES[rip], r12d
	jle	.L11
.L5:
	mov	esi, DWORD PTR E1000_PHY_PLL_FREQ_REG[rip]
	mov	rdx, r15
	mov	rdi, rbp
	call	igb_read_phy_reg_82580@PLT
	mov	eax, DWORD PTR E1000_PHY_PLL_UNCONF[rip]
	mov	edx, DWORD PTR 32[rsp]
	and	edx, eax
	cmp	eax, edx
	je	.L12
	xor	r13d, r13d
.L4:
	mov	esi, DWORD PTR I347AT4_PAGE_SELECT[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	igb_write_phy_reg_82580@PLT
	mov	esi, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR E1000_MDICNFG[rip]
	call	wr32@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR E1000_INVM_DEFAULT_AL[rip]
	mov	DWORD PTR 28[rsp], eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L11:
	neg	r13d
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	igb_pll_workaround_i210, .-igb_pll_workaround_i210
	.comm	I347AT4_PAGE_SELECT,4,4
	.comm	E1000_WUC,4,4
	.comm	E1000_PHY_PLL_UNCONF,4,4
	.comm	E1000_PHY_PLL_FREQ_REG,4,4
	.comm	E1000_PHY_PLL_FREQ_PAGE,4,4
	.comm	E1000_PCI_PMCSR_D3,4,4
	.comm	E1000_PCI_PMCSR,4,4
	.comm	E1000_MDICNFG_EXT_MDIO,4,4
	.comm	E1000_MDICNFG,4,4
	.comm	E1000_MAX_PLL_TRIES,4,4
	.comm	E1000_INVM_PLL_WO_VAL,4,4
	.comm	E1000_INVM_DEFAULT_AL,4,4
	.comm	E1000_INVM_AUTOLOAD,4,4
	.comm	E1000_ERR_PHY,4,4
	.comm	E1000_EEARBC_I210,4,4
	.comm	E1000_CTRL_PHY_RST,4,4
	.comm	E1000_CTRL_EXT_SDLPE,4,4
	.comm	E1000_CTRL_EXT_PHYPDEN,4,4
	.comm	E1000_CTRL_EXT,4,4
	.comm	E1000_CTRL,4,4
	.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_i210.c_igb_pll_workaround_i210.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	igb_pll_workaround_i210
	.syntax unified
	.arm
	.fpu softvfp
	.type	igb_pll_workaround_i210, %function
igb_pll_workaround_i210:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L14
	mov	r4, r0
	ldr	r0, [r3]
	ldr	r3, .L14+4
	sub	sp, sp, #36
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	rd32
	ldr	r5, .L14+8
	str	r0, [sp]
	ldr	r0, [r5]
	bl	rd32
	mov	r2, r0
	ldr	r3, .L14+12
	ldr	r8, .L14+16
	ldr	r1, [r3]
	str	r0, [sp, #12]
	bic	r1, r2, r1
	ldr	r0, [r5]
	bl	wr32
	ldr	r1, [r8]
	add	r2, sp, #16
	mov	r0, r4
	bl	igb_read_invm_word_i210
	subs	r6, r0, #0
	ldrne	r3, .L14+20
	ldr	r2, .L14+24
	ldrne	r5, [r3]
	ldr	r3, .L14+28
	ldr	r1, .L14+32
	ldreq	r5, [sp, #16]
	ldr	r3, [r3]
	ldr	fp, .L14+36
	ldr	r2, [r2]
	mov	r0, r4
	ldr	r1, [r1]
	ldr	r10, .L14+40
	strne	r5, [sp, #16]
	orr	r5, r5, r3
	bl	igb_write_phy_reg_82580
	ldr	r2, [fp]
	ldr	r3, [r10]
	cmp	r2, #0
	str	r3, [sp, #20]
	ble	.L4
	lsl	r3, r5, #16
	mov	r6, #0
	str	r3, [sp, #4]
	b	.L5
.L12:
	ldr	r3, .L14+44
	ldr	r5, .L14+48
	ldr	r3, [r3]
	ldr	r0, [r5]
	str	r3, [sp, #8]
	bl	rd32
	mov	r1, r0
	ldr	r3, .L14+52
	ldr	r0, [r5]
	ldr	r3, [r3]
	ldr	r5, .L14+56
	orr	r1, r1, r3
	bl	wr32
	ldr	r0, [r5]
	bl	rd32
	mov	r1, r0
	ldr	r3, .L14+60
	ldr	r2, .L14+64
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r0, [r5]
	orr	r3, r3, r2
	orr	r1, r3, r1
	bl	wr32
	ldr	r3, .L14
	mov	r1, #0
	ldr	r0, [r3]
	bl	wr32
	ldr	r7, .L14+68
	ldr	r2, [sp, #4]
	ldr	r1, [r8]
	ldr	r5, .L14+72
	orr	r1, r2, r1, lsl #4
	ldr	r9, .L14+76
	ldr	r0, [r7]
	bl	wr32
	ldr	r1, [r5]
	add	r2, sp, #24
	mov	r0, r4
	bl	igb_read_pci_cfg
	ldr	r1, [r9]
	ldr	ip, [sp, #24]
	add	r2, sp, #24
	orr	ip, ip, r1
	mov	r0, r4
	ldr	r1, [r5]
	str	ip, [sp, #24]
	bl	igb_write_pci_cfg
	mov	r1, #2000
	mov	r0, #1000
	bl	usleep_range
	ldr	r0, [r9]
	ldr	r3, [sp, #24]
	add	r2, sp, #24
	bic	r3, r3, r0
	ldr	r1, [r5]
	mov	r0, r4
	str	r3, [sp, #24]
	bl	igb_write_pci_cfg
	ldr	r3, [sp, #16]
	ldr	r1, [r8]
	lsl	r3, r3, #16
	orr	r1, r3, r1, lsl #4
	ldr	r0, [r7]
	bl	wr32
	ldr	r3, .L14
	ldr	r1, [sp]
	ldr	r0, [r3]
	bl	wr32
	ldr	r3, [fp]
	add	r6, r6, #1
	cmp	r3, r6
	ble	.L11
.L5:
	ldr	r3, .L14+80
	add	r2, sp, #20
	ldr	r1, [r3]
	mov	r0, r4
	bl	igb_read_phy_reg_82580
	ldr	r3, [r10]
	ldr	r2, [sp, #20]
	bics	r3, r3, r2
	beq	.L12
	mov	r6, #0
.L4:
	ldr	r3, .L14+32
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r4
	bl	igb_write_phy_reg_82580
	ldr	r3, .L14+8
	ldr	r1, [sp, #12]
	ldr	r0, [r3]
	bl	wr32
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r6
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r3, [sp, #8]
	rsb	r6, r3, #0
	b	.L4
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	E1000_WUC
	.word	.LC0
	.word	E1000_MDICNFG
	.word	E1000_MDICNFG_EXT_MDIO
	.word	E1000_INVM_AUTOLOAD
	.word	E1000_INVM_DEFAULT_AL
	.word	E1000_PHY_PLL_FREQ_PAGE
	.word	E1000_INVM_PLL_WO_VAL
	.word	I347AT4_PAGE_SELECT
	.word	E1000_MAX_PLL_TRIES
	.word	E1000_PHY_PLL_UNCONF
	.word	E1000_ERR_PHY
	.word	E1000_CTRL
	.word	E1000_CTRL_PHY_RST
	.word	E1000_CTRL_EXT
	.word	E1000_CTRL_EXT_PHYPDEN
	.word	E1000_CTRL_EXT_SDLPE
	.word	E1000_EEARBC_I210
	.word	E1000_PCI_PMCSR
	.word	E1000_PCI_PMCSR_D3
	.word	E1000_PHY_PLL_FREQ_REG
	.size	igb_pll_workaround_i210, .-igb_pll_workaround_i210
	.comm	I347AT4_PAGE_SELECT,4,4
	.comm	E1000_WUC,4,4
	.comm	E1000_PHY_PLL_UNCONF,4,4
	.comm	E1000_PHY_PLL_FREQ_REG,4,4
	.comm	E1000_PHY_PLL_FREQ_PAGE,4,4
	.comm	E1000_PCI_PMCSR_D3,4,4
	.comm	E1000_PCI_PMCSR,4,4
	.comm	E1000_MDICNFG_EXT_MDIO,4,4
	.comm	E1000_MDICNFG,4,4
	.comm	E1000_MAX_PLL_TRIES,4,4
	.comm	E1000_INVM_PLL_WO_VAL,4,4
	.comm	E1000_INVM_DEFAULT_AL,4,4
	.comm	E1000_INVM_AUTOLOAD,4,4
	.comm	E1000_ERR_PHY,4,4
	.comm	E1000_EEARBC_I210,4,4
	.comm	E1000_CTRL_PHY_RST,4,4
	.comm	E1000_CTRL_EXT_SDLPE,4,4
	.comm	E1000_CTRL_EXT_PHYPDEN,4,4
	.comm	E1000_CTRL_EXT,4,4
	.comm	E1000_CTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
