	.file	"extr_skge.c___gm_phy_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__gm_phy_read, @function
__gm_phy_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	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	edi, DWORD PTR [rdi]
	call	GM_SMI_CT_PHY_AD@PLT
	mov	edi, r14d
	mov	ebx, eax
	call	GM_SMI_CT_REG_AD@PLT
	mov	edx, DWORD PTR GM_SMI_CTRL[rip]
	mov	ecx, ebx
	mov	esi, r12d
	or	ecx, eax
	mov	rdi, rbp
	or	ecx, DWORD PTR GM_SMI_CT_OP_RD[rip]
	call	gma_write16@PLT
	mov	eax, DWORD PTR PHY_RETRIES[rip]
	test	eax, eax
	jle	.L2
	xor	ebx, ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	add	ebx, 1
	cmp	DWORD PTR PHY_RETRIES[rip], ebx
	jle	.L2
.L5:
	mov	edi, 1
	call	udelay@PLT
	mov	edx, DWORD PTR GM_SMI_CTRL[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	gma_read16@PLT
	test	DWORD PTR GM_SMI_CT_RD_VAL[rip], eax
	je	.L3
	mov	edx, DWORD PTR GM_SMI_DATA[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	gma_read16@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	DWORD PTR 0[r13], eax
	pop	r12
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR ETIMEDOUT[rip]
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	__gm_phy_read, .-__gm_phy_read
	.comm	PHY_RETRIES,4,4
	.comm	GM_SMI_DATA,4,4
	.comm	GM_SMI_CT_RD_VAL,4,4
	.comm	GM_SMI_CT_OP_RD,4,4
	.comm	GM_SMI_CTRL,4,4
	.comm	ETIMEDOUT,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_skge.c___gm_phy_read.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__gm_phy_read, %function
__gm_phy_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, .L9
	mov	r5, r0
	ldr	r0, [r0]
	mov	r8, r2
	mov	r6, r1
	mov	r9, r3
	ldr	r10, [r7]
	bl	GM_SMI_CT_PHY_AD
	mov	r4, r0
	mov	r0, r8
	bl	GM_SMI_CT_REG_AD
	ldr	r2, .L9+4
	orr	r4, r4, r0
	ldr	r3, [r2]
	ldr	r8, .L9+8
	orr	r3, r4, r3
	mov	r2, r10
	mov	r1, r6
	mov	r0, r5
	bl	gma_write16
	ldr	r3, [r8]
	cmp	r3, #0
	ble	.L2
	mov	r4, #0
	ldr	r10, .L9+12
	b	.L5
.L3:
	ldr	r3, [r8]
	cmp	r3, r4
	ble	.L2
.L5:
	mov	r0, #1
	bl	udelay
	ldr	r2, [r7]
	mov	r1, r6
	mov	r0, r5
	bl	gma_read16
	ldr	r2, [r10]
	add	r4, r4, #1
	tst	r0, r2
	beq	.L3
	ldr	r3, .L9+16
	mov	r1, r6
	ldr	r2, [r3]
	mov	r0, r5
	bl	gma_read16
	mov	r3, r0
	mov	r0, #0
	str	r3, [r9]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, .L9+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	.align	2
.L9:
	.word	GM_SMI_CTRL
	.word	GM_SMI_CT_OP_RD
	.word	PHY_RETRIES
	.word	GM_SMI_CT_RD_VAL
	.word	GM_SMI_DATA
	.word	ETIMEDOUT
	.size	__gm_phy_read, .-__gm_phy_read
	.comm	PHY_RETRIES,4,4
	.comm	GM_SMI_DATA,4,4
	.comm	GM_SMI_CT_RD_VAL,4,4
	.comm	GM_SMI_CT_OP_RD,4,4
	.comm	GM_SMI_CTRL,4,4
	.comm	ETIMEDOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
