	.file	"extr_es2lan.c_e1000_read_phy_reg_gg82563_80003es2lan.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	e1000_read_phy_reg_gg82563_80003es2lan, @function
e1000_read_phy_reg_gg82563_80003es2lan:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	e1000_acquire_phy_80003es2lan@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR MAX_PHY_REG_ADDRESS[rip]
	mov	r14d, DWORD PTR GG82563_PHY_PAGE_SELECT_ALT[rip]
	and	eax, ebx
	cmp	eax, DWORD PTR GG82563_MIN_ALT_REG[rip]
	jl	.L12
.L4:
	mov	ecx, DWORD PTR GG82563_PAGE_SHIFT[rip]
	mov	edx, ebx
	mov	esi, r14d
	mov	rdi, rbp
	sar	edx, cl
	mov	DWORD PTR 4[rsp], edx
	call	e1000e_write_phy_reg_mdic@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L8
	cmp	QWORD PTR 0[rbp], 0
	je	.L6
	mov	esi, 400
	mov	edi, 200
	call	usleep_range@PLT
	lea	rdx, 4[rsp]
	mov	esi, r14d
	mov	rdi, rbp
	call	e1000e_read_phy_reg_mdic@PLT
	mov	ecx, DWORD PTR GG82563_PAGE_SHIFT[rip]
	mov	eax, ebx
	sar	eax, cl
	cmp	eax, DWORD PTR 4[rsp]
	je	.L7
	mov	rdi, rbp
	call	e1000_release_phy_80003es2lan@PLT
	mov	r12, QWORD PTR E1000_ERR_PHY[rip]
	neg	r12
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	and	ebx, DWORD PTR MAX_PHY_REG_ADDRESS[rip]
	mov	rdx, r13
	mov	rdi, rbp
	mov	esi, ebx
	call	e1000e_read_phy_reg_mdic@PLT
	mov	r12, rax
.L8:
	mov	rdi, rbp
	call	e1000_release_phy_80003es2lan@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	r14d, DWORD PTR GG82563_PHY_PAGE_SELECT[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, 400
	mov	edi, 200
	call	usleep_range@PLT
	and	ebx, DWORD PTR MAX_PHY_REG_ADDRESS[rip]
	mov	rdx, r13
	mov	rdi, rbp
	mov	esi, ebx
	call	e1000e_read_phy_reg_mdic@PLT
	mov	esi, 400
	mov	edi, 200
	mov	r12, rax
	call	usleep_range@PLT
	mov	rdi, rbp
	call	e1000_release_phy_80003es2lan@PLT
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	e1000_read_phy_reg_gg82563_80003es2lan, .-e1000_read_phy_reg_gg82563_80003es2lan
	.comm	MAX_PHY_REG_ADDRESS,4,4
	.comm	GG82563_PHY_PAGE_SELECT_ALT,4,4
	.comm	GG82563_PHY_PAGE_SELECT,4,4
	.comm	GG82563_PAGE_SHIFT,4,4
	.comm	GG82563_MIN_ALT_REG,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_read_phy_reg_gg82563_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_read_phy_reg_gg82563_80003es2lan, %function
e1000_read_phy_reg_gg82563_80003es2lan:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L13
	sub	sp, sp, #8
	mov	r6, r1
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r5, r0
	bl	e1000_acquire_phy_80003es2lan
	subs	r4, r0, #0
	bne	.L1
	ldr	r8, .L13+4
	ldr	r2, .L13+8
	ldr	r3, [r8]
	ldr	r2, [r2]
	and	r3, r3, r6
	cmp	r3, r2
	ldrlt	r3, .L13+12
	ldrge	r3, .L13+16
	ldr	r9, .L13+20
	ldr	r10, [r3]
	ldr	r2, [r9]
	mov	r1, r10
	asr	r2, r6, r2
	mov	r0, r5
	str	r2, [sp]
	bl	e1000e_write_phy_reg_mdic
	subs	r4, r0, #0
	bne	.L8
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L6
	mov	r1, #400
	mov	r0, #200
	bl	usleep_range
	mov	r2, sp
	mov	r1, r10
	mov	r0, r5
	bl	e1000e_read_phy_reg_mdic
	ldr	r2, [r9]
	ldr	r3, [sp]
	cmp	r3, r6, asr r2
	beq	.L7
	mov	r0, r5
	bl	e1000_release_phy_80003es2lan
	ldr	r3, .L13+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L13
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	ldr	r1, [r8]
	mov	r2, r7
	mov	r0, r5
	and	r1, r1, r6
	bl	e1000e_read_phy_reg_mdic
	mov	r4, r0
.L8:
	mov	r0, r5
	bl	e1000_release_phy_80003es2lan
	b	.L1
.L7:
	mov	r1, #400
	mov	r0, #200
	bl	usleep_range
	ldr	r1, [r8]
	mov	r2, r7
	and	r1, r1, r6
	mov	r0, r5
	bl	e1000e_read_phy_reg_mdic
	mov	r1, #400
	mov	r4, r0
	mov	r0, #200
	bl	usleep_range
	mov	r0, r5
	bl	e1000_release_phy_80003es2lan
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	MAX_PHY_REG_ADDRESS
	.word	GG82563_MIN_ALT_REG
	.word	GG82563_PHY_PAGE_SELECT
	.word	GG82563_PHY_PAGE_SELECT_ALT
	.word	GG82563_PAGE_SHIFT
	.word	E1000_ERR_PHY
	.size	e1000_read_phy_reg_gg82563_80003es2lan, .-e1000_read_phy_reg_gg82563_80003es2lan
	.comm	MAX_PHY_REG_ADDRESS,4,4
	.comm	GG82563_PHY_PAGE_SELECT_ALT,4,4
	.comm	GG82563_PHY_PAGE_SELECT,4,4
	.comm	GG82563_PAGE_SHIFT,4,4
	.comm	GG82563_MIN_ALT_REG,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
