	.file	"extr_phy.c_phy_mii_ioctl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	phy_mii_ioctl
	.type	phy_mii_ioctl, @function
phy_mii_ioctl:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	mov	rdi, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	if_mii@PLT
	mov	rbp, rax
	cmp	ebx, 130
	je	.L2
	jg	.L3
	cmp	ebx, 128
	je	.L4
	cmp	ebx, 129
	jne	.L6
	mov	rax, QWORD PTR [r12]
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L6
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rsi, r13
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	rax
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	cmp	ebx, 131
	jne	.L6
	mov	edi, DWORD PTR 8[r12]
	mov	DWORD PTR 4[rax], edi
	call	mdio_phy_id_is_c45@PLT
	test	eax, eax
	jne	.L42
.L9:
	mov	r13d, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR 8[rbp]
.L10:
	mov	edi, DWORD PTR 12[r12]
	mov	esi, r13d
	call	mdiobus_read@PLT
	mov	DWORD PTR 12[rbp], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	eax, DWORD PTR EOPNOTSUPP[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[rax]
	call	mdio_phy_id_is_c45@PLT
	test	eax, eax
	je	.L9
.L42:
	mov	edi, DWORD PTR 4[rbp]
	call	mdio_phy_id_prtad@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	r13d, eax
	call	mdio_phy_id_devad@PLT
	mov	edx, DWORD PTR MII_ADDR_C45[rip]
	or	edx, DWORD PTR 8[rbp]
	sal	eax, 16
	or	edx, eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, DWORD PTR 4[rax]
	mov	r14d, DWORD PTR [rax]
	call	mdio_phy_id_is_c45@PLT
	test	eax, eax
	jne	.L43
	mov	r15d, DWORD PTR 4[rbp]
	mov	r13d, DWORD PTR 8[rbp]
.L13:
	cmp	DWORD PTR 8[r12], r15d
	je	.L44
	mov	edi, DWORD PTR 12[r12]
	mov	ecx, r14d
	mov	edx, r13d
	mov	esi, r15d
	call	mdiobus_write@PLT
	cmp	r15d, DWORD PTR 8[r12]
	je	.L45
.L28:
	xor	eax, eax
.L47:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	cmp	r13d, 133
	je	.L15
	cmp	r13d, 134
	je	.L16
	cmp	r13d, 132
	je	.L46
	mov	edi, DWORD PTR 12[r12]
	mov	ecx, r14d
	mov	edx, r13d
	mov	esi, r15d
	call	mdiobus_write@PLT
	xor	eax, eax
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L43:
	mov	edi, DWORD PTR 4[rbp]
	call	mdio_phy_id_prtad@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	r15d, eax
	call	mdio_phy_id_devad@PLT
	mov	r13d, DWORD PTR MII_ADDR_C45[rip]
	or	r13d, DWORD PTR 8[rbp]
	sal	eax, 16
	or	r13d, eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L45:
	cmp	r13d, 133
	jne	.L28
	test	DWORD PTR BMCR_RESET[rip], r14d
	je	.L28
.L29:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	phy_init_hw@PLT
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[r12]
	mov	esi, r14d
	call	mii_ctrl1000_mod_linkmode_adv_t@PLT
.L25:
	mov	edi, DWORD PTR 12[r12]
	mov	ecx, r14d
	mov	edx, r13d
	mov	esi, r15d
	call	mdiobus_write@PLT
.L27:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	phy_start_aneg@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[r12]
	mov	esi, r14d
	call	mii_adv_mod_linkmode_adv_t@PLT
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR BMCR_RESET[rip]
	or	eax, DWORD PTR BMCR_ANENABLE[rip]
	mov	esi, DWORD PTR 20[r12]
	mov	ecx, DWORD PTR AUTONEG_DISABLE[rip]
	mov	edx, DWORD PTR AUTONEG_ENABLE[rip]
	test	eax, r14d
	jne	.L19
	xor	ebx, ebx
	cmp	esi, edx
	mov	eax, DWORD PTR DUPLEX_FULL[rip]
	mov	DWORD PTR 20[r12], ecx
	sete	bl
	test	DWORD PTR BMCR_FULLDPLX[rip], r14d
	cmove	eax, DWORD PTR DUPLEX_HALF[rip]
	mov	DWORD PTR 28[r12], eax
	test	DWORD PTR BMCR_SPEED1000[rip], r14d
	je	.L22
	mov	eax, DWORD PTR SPEED_1000[rip]
	mov	DWORD PTR 24[r12], eax
.L23:
	mov	edi, DWORD PTR 12[r12]
	mov	ecx, r14d
	mov	edx, 133
	mov	esi, r15d
	call	mdiobus_write@PLT
	cmp	DWORD PTR 8[r12], r15d
	je	.L48
.L26:
	test	ebx, ebx
	jne	.L27
	jmp	.L28
.L19:
	xor	ebx, ebx
	cmp	esi, ecx
	mov	DWORD PTR 20[r12], edx
	sete	bl
	jmp	.L23
.L48:
	test	DWORD PTR BMCR_RESET[rip], r14d
	je	.L26
	jmp	.L29
.L22:
	test	DWORD PTR BMCR_SPEED100[rip], r14d
	je	.L24
	mov	eax, DWORD PTR SPEED_100[rip]
	mov	DWORD PTR 24[r12], eax
	jmp	.L23
.L24:
	mov	eax, DWORD PTR SPEED_10[rip]
	mov	DWORD PTR 24[r12], eax
	jmp	.L23
	.cfi_endproc
.LFE0:
	.size	phy_mii_ioctl, .-phy_mii_ioctl
	.comm	SPEED_1000,4,4
	.comm	SPEED_100,4,4
	.comm	SPEED_10,4,4
	.comm	MII_ADDR_C45,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	DUPLEX_HALF,4,4
	.comm	DUPLEX_FULL,4,4
	.comm	BMCR_SPEED1000,4,4
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_RESET,4,4
	.comm	BMCR_FULLDPLX,4,4
	.comm	BMCR_ANENABLE,4,4
	.comm	AUTONEG_ENABLE,4,4
	.comm	AUTONEG_DISABLE,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_phy.c_phy_mii_ioctl.c"
	.text
	.align	2
	.global	phy_mii_ioctl
	.syntax unified
	.arm
	.fpu softvfp
	.type	phy_mii_ioctl, %function
phy_mii_ioctl:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r2
	mov	r6, r0
	mov	r0, r1
	mov	r5, r1
	bl	if_mii
	sub	r2, r4, #128
	mov	r4, r0
	cmp	r2, #3
	ldrls	pc, [pc, r2, asl #2]
	b	.L2
.L4:
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L5:
	ldr	r0, [r0, #4]
	bl	mdio_phy_id_is_c45
	cmp	r0, #0
	bne	.L42
.L9:
	ldr	r5, [r4, #4]
	ldr	r2, [r4, #8]
.L10:
	mov	r1, r5
	ldr	r0, [r6, #8]
	bl	mdiobus_read
	mov	r3, r0
	mov	r0, #0
	str	r3, [r4, #12]
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	ldr	r0, [r6, #4]
	str	r0, [r4, #4]
	bl	mdio_phy_id_is_c45
	cmp	r0, #0
	beq	.L9
.L42:
	ldr	r0, [r4, #4]
	bl	mdio_phy_id_prtad
	mov	r5, r0
	ldr	r0, [r4, #4]
	bl	mdio_phy_id_devad
	ldr	r2, .L48+4
	ldr	r3, [r4, #8]
	ldr	r2, [r2]
	orr	r2, r2, r3
	orr	r2, r2, r0, lsl #16
	b	.L10
.L7:
	ldr	r0, [r0, #4]
	ldr	r7, [r4]
	bl	mdio_phy_id_is_c45
	cmp	r0, #0
	bne	.L43
	ldr	r5, [r4, #4]
	ldr	r4, [r4, #8]
.L13:
	ldr	r3, [r6, #4]
	cmp	r3, r5
	beq	.L44
	mov	r3, r7
	mov	r2, r4
	mov	r1, r5
	ldr	r0, [r6, #8]
	bl	mdiobus_write
	ldr	r3, [r6, #4]
	cmp	r5, r3
	beq	.L45
.L28:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	mov	r1, r5
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	bx	r3
.L44:
	cmp	r4, #133
	beq	.L15
	cmp	r4, #134
	beq	.L16
	cmp	r4, #132
	beq	.L46
	mov	r3, r7
	mov	r2, r4
	mov	r1, r5
	ldr	r0, [r6, #8]
	bl	mdiobus_write
	b	.L28
.L43:
	ldr	r0, [r4, #4]
	bl	mdio_phy_id_prtad
	mov	r5, r0
	ldr	r0, [r4, #4]
	bl	mdio_phy_id_devad
	ldr	r3, .L48+4
	ldr	r2, [r4, #8]
	ldr	r4, [r3]
	orr	r4, r4, r2
	orr	r4, r4, r0, lsl #16
	b	.L13
.L16:
	mov	r1, r7
	ldr	r0, [r6, #12]
	bl	mii_adv_mod_linkmode_adv_t
.L25:
	mov	r3, r7
	mov	r2, r4
	mov	r1, r5
	ldr	r0, [r6, #8]
	bl	mdiobus_write
.L27:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	phy_start_aneg
.L46:
	mov	r1, r7
	ldr	r0, [r6, #12]
	bl	mii_ctrl1000_mod_linkmode_adv_t
	b	.L25
.L45:
	cmp	r4, #133
	bne	.L28
	ldr	r3, .L48+8
	ldr	r3, [r3]
	tst	r7, r3
	beq	.L28
.L29:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	phy_init_hw
.L15:
	ldr	r4, .L48+8
	ldr	r2, .L48+12
	ldr	r3, [r4]
	ldr	r2, [r2]
	ldr	r1, .L48+16
	orr	r3, r3, r2
	ldr	r2, .L48+20
	tst	r3, r7
	ldr	r1, [r1]
	ldr	r3, [r2]
	ldr	r2, [r6, #16]
	bne	.L19
	sub	r8, r2, r3
	clz	r8, r8
	ldr	r0, .L48+24
	str	r1, [r6, #16]
	ldr	r3, [r0]
	lsr	r8, r8, #5
	tst	r7, r3
	ldrne	r3, .L48+28
	ldreq	r3, .L48+32
	ldr	r2, [r3]
	ldr	r3, .L48+36
	str	r2, [r6, #24]
	ldr	r3, [r3]
	tst	r7, r3
	beq	.L22
	ldr	r3, .L48+40
	ldr	r3, [r3]
	str	r3, [r6, #20]
.L23:
	mov	r3, r7
	mov	r2, #133
	mov	r1, r5
	ldr	r0, [r6, #8]
	bl	mdiobus_write
	ldr	r3, [r6, #4]
	cmp	r3, r5
	beq	.L47
.L26:
	cmp	r8, #0
	bne	.L27
	b	.L28
.L19:
	sub	r8, r2, r1
	clz	r8, r8
	str	r3, [r6, #16]
	lsr	r8, r8, #5
	b	.L23
.L47:
	ldr	r3, [r4]
	tst	r7, r3
	beq	.L26
	b	.L29
.L22:
	ldr	r3, .L48+44
	ldr	r3, [r3]
	tst	r7, r3
	ldrne	r3, .L48+48
	ldreq	r3, .L48+52
	ldr	r3, [r3]
	str	r3, [r6, #20]
	b	.L23
.L49:
	.align	2
.L48:
	.word	EOPNOTSUPP
	.word	MII_ADDR_C45
	.word	BMCR_RESET
	.word	BMCR_ANENABLE
	.word	AUTONEG_DISABLE
	.word	AUTONEG_ENABLE
	.word	BMCR_FULLDPLX
	.word	DUPLEX_FULL
	.word	DUPLEX_HALF
	.word	BMCR_SPEED1000
	.word	SPEED_1000
	.word	BMCR_SPEED100
	.word	SPEED_100
	.word	SPEED_10
	.size	phy_mii_ioctl, .-phy_mii_ioctl
	.comm	SPEED_1000,4,4
	.comm	SPEED_100,4,4
	.comm	SPEED_10,4,4
	.comm	MII_ADDR_C45,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	DUPLEX_HALF,4,4
	.comm	DUPLEX_FULL,4,4
	.comm	BMCR_SPEED1000,4,4
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_RESET,4,4
	.comm	BMCR_FULLDPLX,4,4
	.comm	BMCR_ANENABLE,4,4
	.comm	AUTONEG_ENABLE,4,4
	.comm	AUTONEG_DISABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
