	.file	"extr_e100.c_mdio_ctrl_phy_82552_v.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mdio_ctrl_phy_82552_v, @function
mdio_ctrl_phy_82552_v:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	cmp	QWORD PTR MII_BMCR[rip], rcx
	je	.L14
.L3:
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	mdio_ctrl_hw@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	cmp	QWORD PTR mdi_write[rip], rdx
	jne	.L3
	mov	eax, DWORD PTR BMCR_ANRESTART[rip]
	or	eax, DWORD PTR BMCR_ANENABLE[rip]
	test	eax, r8d
	je	.L3
	mov	edi, DWORD PTR 4[rdi]
	mov	edx, DWORD PTR MII_ADVERTISE[rip]
	mov	DWORD PTR 12[rsp], r8d
	mov	esi, DWORD PTR 0[rbp]
	mov	QWORD PTR [rsp], rcx
	call	mdio_read@PLT
	test	DWORD PTR ADVERTISE_100FULL[rip], eax
	mov	rcx, QWORD PTR [rsp]
	mov	r8d, DWORD PTR 12[rsp]
	je	.L5
	mov	eax, DWORD PTR BMCR_SPEED100[rip]
	or	eax, DWORD PTR BMCR_FULLDPLX[rip]
	or	r8d, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	test	DWORD PTR ADVERTISE_100HALF[rip], eax
	je	.L3
	or	r8d, DWORD PTR BMCR_SPEED100[rip]
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	mdio_ctrl_phy_82552_v, .-mdio_ctrl_phy_82552_v
	.comm	mdi_write,8,8
	.comm	MII_BMCR,8,8
	.comm	MII_ADVERTISE,4,4
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_FULLDPLX,4,4
	.comm	BMCR_ANRESTART,4,4
	.comm	BMCR_ANENABLE,4,4
	.comm	ADVERTISE_100HALF,4,4
	.comm	ADVERTISE_100FULL,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_e100.c_mdio_ctrl_phy_82552_v.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mdio_ctrl_phy_82552_v, %function
mdio_ctrl_phy_82552_v:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	ip, .L15
	mov	r6, r0
	ldr	r0, [ip]
	sub	sp, sp, #12
	cmp	r0, r3
	mov	r7, r1
	mov	r4, r2
	ldr	r5, [sp, #32]
	beq	.L14
.L3:
	mov	r2, r4
	mov	r1, r7
	mov	r0, r6
	str	r5, [sp, #32]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	mdio_ctrl_hw
.L14:
	ldr	r2, .L15+4
	ldr	r2, [r2]
	cmp	r2, r4
	bne	.L3
	ldr	r2, .L15+8
	ldr	r1, .L15+12
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r1
	tst	r2, r5
	beq	.L3
	ldr	r2, .L15+16
	ldr	r1, [r6]
	ldr	r2, [r2]
	ldr	r0, [r6, #4]
	str	r3, [sp, #4]
	bl	mdio_read
	ldr	r2, .L15+20
	ldr	r3, [sp, #4]
	ldr	r2, [r2]
	tst	r0, r2
	beq	.L5
	ldr	r2, .L15+24
	ldr	r1, .L15+28
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r1
	orr	r5, r5, r2
	b	.L3
.L5:
	ldr	r2, .L15+32
	ldr	r2, [r2]
	tst	r0, r2
	ldrne	r2, .L15+24
	ldrne	r2, [r2]
	orrne	r5, r5, r2
	b	.L3
.L16:
	.align	2
.L15:
	.word	MII_BMCR
	.word	mdi_write
	.word	BMCR_ANRESTART
	.word	BMCR_ANENABLE
	.word	MII_ADVERTISE
	.word	ADVERTISE_100FULL
	.word	BMCR_SPEED100
	.word	BMCR_FULLDPLX
	.word	ADVERTISE_100HALF
	.size	mdio_ctrl_phy_82552_v, .-mdio_ctrl_phy_82552_v
	.comm	mdi_write,4,4
	.comm	MII_BMCR,4,4
	.comm	MII_ADVERTISE,4,4
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_FULLDPLX,4,4
	.comm	BMCR_ANRESTART,4,4
	.comm	BMCR_ANENABLE,4,4
	.comm	ADVERTISE_100HALF,4,4
	.comm	ADVERTISE_100FULL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
