	.file	"extr_if_re.c_re_gmii_readreg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"PHY read failed\n"
	.text
	.p2align 4
	.type	re_gmii_readreg, @function
re_gmii_readreg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	device_get_softc@PLT
	cmp	DWORD PTR RL_GMEDIASTAT[rip], ebp
	mov	r12, rax
	je	.L12
	mov	edx, ebp
	mov	esi, DWORD PTR RL_PHYAR[rip]
	mov	rdi, rax
	xor	ebp, ebp
	sal	edx, 16
	call	CSR_WRITE_4@PLT
	mov	eax, DWORD PTR RL_PHY_TIMEOUT[rip]
	test	eax, eax
	jg	.L5
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, 25
	add	ebp, 1
	call	DELAY@PLT
	mov	eax, DWORD PTR RL_PHY_TIMEOUT[rip]
	cmp	eax, ebp
	jle	.L3
.L5:
	mov	esi, DWORD PTR RL_PHYAR[rip]
	mov	rdi, r12
	call	CSR_READ_4@PLT
	mov	ebx, eax
	test	DWORD PTR RL_PHYAR_BUSY[rip], eax
	je	.L4
	mov	eax, DWORD PTR RL_PHY_TIMEOUT[rip]
.L3:
	cmp	eax, ebp
	je	.L13
	mov	edi, 20
	call	DELAY@PLT
	mov	eax, DWORD PTR RL_PHYAR_PHYDATA[rip]
	and	eax, ebx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	esi, ebp
	mov	rdi, rax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	CSR_READ_1@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	edi, DWORD PTR [r12]
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	re_gmii_readreg, .-re_gmii_readreg
	.comm	RL_PHY_TIMEOUT,4,4
	.comm	RL_PHYAR_PHYDATA,4,4
	.comm	RL_PHYAR_BUSY,4,4
	.comm	RL_PHYAR,4,4
	.comm	RL_GMEDIASTAT,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_if_re.c_re_gmii_readreg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"PHY read failed\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	re_gmii_readreg, %function
re_gmii_readreg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r2
	bl	device_get_softc
	ldr	r3, .L14
	ldr	r1, [r3]
	cmp	r1, r5
	beq	.L12
	ldr	r8, .L14+4
	ldr	r7, .L14+8
	lsl	r2, r5, #16
	ldr	r1, [r8]
	mov	r6, r0
	bl	CSR_WRITE_4
	ldr	r3, [r7]
	mov	r5, #0
	cmp	r3, #0
	ble	.L3
	ldr	r9, .L14+12
	b	.L5
.L4:
	mov	r0, #25
	bl	DELAY
	ldr	r3, [r7]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L3
.L5:
	mov	r0, r6
	ldr	r1, [r8]
	bl	CSR_READ_4
	ldr	r3, [r9]
	mov	r4, r0
	tst	r0, r3
	beq	.L4
	ldr	r3, [r7]
.L3:
	cmp	r3, r5
	beq	.L13
	mov	r0, #20
	bl	DELAY
	ldr	r3, .L14+16
	ldr	r0, [r3]
	and	r0, r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	CSR_READ_1
.L13:
	ldr	r0, [r6]
	ldr	r1, .L14+20
	bl	device_printf
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L15:
	.align	2
.L14:
	.word	RL_GMEDIASTAT
	.word	RL_PHYAR
	.word	RL_PHY_TIMEOUT
	.word	RL_PHYAR_BUSY
	.word	RL_PHYAR_PHYDATA
	.word	.LC0
	.size	re_gmii_readreg, .-re_gmii_readreg
	.comm	RL_PHY_TIMEOUT,4,4
	.comm	RL_PHYAR_PHYDATA,4,4
	.comm	RL_PHYAR_BUSY,4,4
	.comm	RL_PHYAR,4,4
	.comm	RL_GMEDIASTAT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
