	.file	"extr_pxa168_eth.c_pxa168_smi_read.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"pxa168_eth: SMI bus busy timeout\n"
	.align 8
.LC1:
	.string	"pxa168_eth: SMI bus read not valid\n"
	.text
	.p2align 4
	.type	pxa168_smi_read, @function
pxa168_smi_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbp, QWORD PTR [rdi]
	mov	ebx, edx
	mov	rdi, rbp
	call	smi_wait_ready@PLT
	test	rax, rax
	jne	.L9
	mov	edx, ebx
	mov	esi, DWORD PTR SMI[rip]
	sal	r12d, 16
	mov	rdi, rbp
	sal	edx, 21
	or	edx, DWORD PTR SMI_OP_R[rip]
	xor	ebx, ebx
	or	edx, r12d
	call	wrl@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	DWORD PTR PHY_WAIT_ITERATIONS[rip], ebx
	je	.L10
	mov	edi, 10
	add	ebx, 1
	call	msleep@PLT
.L4:
	mov	esi, DWORD PTR SMI[rip]
	mov	rdi, rbp
	call	rdl@PLT
	test	DWORD PTR SMI_R_VALID[rip], eax
	je	.L6
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movzx	eax, ax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC0[rip]
	call	netdev_warn@PLT
	mov	eax, DWORD PTR ETIMEDOUT[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	lea	rsi, .LC1[rip]
	call	netdev_warn@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	pxa168_smi_read, .-pxa168_smi_read
	.comm	SMI_R_VALID,4,4
	.comm	SMI_OP_R,4,4
	.comm	SMI,4,4
	.comm	PHY_WAIT_ITERATIONS,4,4
	.comm	ETIMEDOUT,4,4
	.comm	ENODEV,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_pxa168_eth.c_pxa168_smi_read.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pxa168_eth: SMI bus busy timeout\012\000"
	.align	2
.LC1:
	.ascii	"pxa168_eth: SMI bus read not valid\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pxa168_smi_read, %function
pxa168_smi_read:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [r0]
	mov	r7, r1
	mov	r0, r5
	mov	r8, r2
	bl	smi_wait_ready
	subs	r4, r0, #0
	bne	.L9
	ldr	r3, .L11
	ldr	r6, .L11+4
	ldr	r2, [r3]
	mov	r0, r5
	orr	r2, r2, r8, lsl #21
	orr	r2, r2, r7, lsl #16
	ldr	r1, [r6]
	bl	wrl
	ldr	r7, .L11+8
	ldr	r8, .L11+12
	b	.L4
.L6:
	ldr	r3, [r8]
	cmp	r3, r4
	beq	.L10
	mov	r0, #10
	bl	msleep
	add	r4, r4, #1
.L4:
	mov	r0, r5
	ldr	r1, [r6]
	bl	rdl
	ldr	r3, [r7]
	tst	r0, r3
	beq	.L6
	lsl	r0, r0, #16
	lsr	r0, r0, #16
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r0, [r5]
	ldr	r1, .L11+16
	bl	netdev_warn
	ldr	r3, .L11+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r0, [r5]
	ldr	r1, .L11+24
	bl	netdev_warn
	ldr	r3, .L11+28
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	SMI_OP_R
	.word	SMI
	.word	SMI_R_VALID
	.word	PHY_WAIT_ITERATIONS
	.word	.LC0
	.word	ETIMEDOUT
	.word	.LC1
	.word	ENODEV
	.size	pxa168_smi_read, .-pxa168_smi_read
	.comm	SMI_R_VALID,4,4
	.comm	SMI_OP_R,4,4
	.comm	SMI,4,4
	.comm	PHY_WAIT_ITERATIONS,4,4
	.comm	ETIMEDOUT,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
