	.file	"extr_if_ure.c_ure_miibus_readreg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ure_miibus_readreg, @function
ure_miibus_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
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edx
	call	device_get_softc@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	mtx_owned@PLT
	test	eax, eax
	je	.L10
	mov	esi, DWORD PTR URE_GMEDIASTAT[rip]
	cmp	ebx, esi
	je	.L4
	lea	esi, [rbx+rbx]
	mov	rdi, rbp
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	movsx	rsi, esi
	pop	r12
	.cfi_def_cfa_offset 8
	add	rsi, QWORD PTR URE_OCP_BASE_MII[rip]
	jmp	ure_ocp_reg_read@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbp
	call	URE_UNLOCK@PLT
	mov	esi, DWORD PTR URE_GMEDIASTAT[rip]
.L4:
	mov	edx, DWORD PTR URE_MCU_TYPE_PLA[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	ure_read_1@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, rbp
	call	URE_LOCK@PLT
	cmp	ebx, DWORD PTR URE_GMEDIASTAT[rip]
	je	.L11
	lea	esi, [rbx+rbx]
	mov	rdi, rbp
	movsx	rsi, esi
	add	rsi, QWORD PTR URE_OCP_BASE_MII[rip]
	call	ure_ocp_reg_read@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	URE_UNLOCK@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ure_miibus_readreg, .-ure_miibus_readreg
	.comm	URE_OCP_BASE_MII,8,8
	.comm	URE_MCU_TYPE_PLA,4,4
	.comm	URE_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_ure.c_ure_miibus_readreg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ure_miibus_readreg, %function
ure_miibus_readreg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r2
	bl	device_get_softc
	mov	r4, r0
	bl	mtx_owned
	cmp	r0, #0
	beq	.L10
	ldr	r3, .L12
	ldr	r1, [r3]
	cmp	r5, r1
	beq	.L4
	ldr	r3, .L12+4
	mov	r0, r4
	ldr	r1, [r3]
	add	r1, r1, r5, lsl #1
	pop	{r4, r5, r6, lr}
	b	ure_ocp_reg_read
.L11:
	mov	r0, r4
	bl	URE_UNLOCK
	ldr	r1, [r6]
.L4:
	ldr	r3, .L12+8
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	ldr	r2, [r3]
	b	ure_read_1
.L10:
	ldr	r6, .L12
	mov	r0, r4
	bl	URE_LOCK
	ldr	r3, [r6]
	cmp	r5, r3
	beq	.L11
	ldr	r3, .L12+4
	mov	r0, r4
	ldr	r1, [r3]
	add	r1, r1, r5, lsl #1
	bl	ure_ocp_reg_read
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	bl	URE_UNLOCK
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L13:
	.align	2
.L12:
	.word	URE_GMEDIASTAT
	.word	URE_OCP_BASE_MII
	.word	URE_MCU_TYPE_PLA
	.size	ure_miibus_readreg, .-ure_miibus_readreg
	.comm	URE_OCP_BASE_MII,4,4
	.comm	URE_MCU_TYPE_PLA,4,4
	.comm	URE_GMEDIASTAT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
