	.file	"extr_phylink.c_phylink_phy_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	phylink_phy_write, @function
phylink_phy_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	r13, QWORD PTR [rdi]
	mov	edi, esi
	mov	ebx, edx
	call	mdio_phy_id_is_c45@PLT
	test	rax, rax
	jne	.L21
	cmp	QWORD PTR 8[r13], 0
	je	.L4
	cmp	ebx, 132
	ja	.L5
	cmp	ebx, 130
	ja	.L6
	je	.L7
	cmp	ebx, 127
	ja	.L6
.L8:
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r14d, ebp
	mov	edx, ebx
.L3:
	mov	edi, DWORD PTR 0[r13]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	ecx, r12d
	mov	esi, r14d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	mdiobus_write@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	cmp	ebx, 133
	jne	.L8
	mov	eax, DWORD PTR MDIO_DEVS_AN[rip]
	test	DWORD PTR 4[r13], eax
	je	.L8
	mov	edx, DWORD PTR MDIO_MMD_AN[rip]
	mov	ebx, DWORD PTR MDIO_AN_ADVERTISE[rip]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edi, ebp
	call	mdio_phy_id_prtad@PLT
	mov	edi, ebp
	mov	r14d, eax
	call	mdio_phy_id_devad@PLT
	mov	edx, DWORD PTR MII_ADDR_C45[rip]
	sal	eax, 16
	or	edx, eax
	or	edx, ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, DWORD PTR 4[r13]
	call	__ffs@PLT
	mov	edx, eax
.L10:
	sal	edx, 16
	or	edx, DWORD PTR MII_ADDR_C45[rip]
	mov	r14d, ebp
	or	edx, ebx
	jmp	.L3
.L7:
	mov	eax, DWORD PTR 4[r13]
	test	DWORD PTR MDIO_DEVS_AN[rip], eax
	je	.L8
	mov	edx, DWORD PTR MDIO_MMD_AN[rip]
	mov	ebx, DWORD PTR MDIO_AN_LPA[rip]
	jmp	.L10
	.cfi_endproc
.LFE0:
	.size	phylink_phy_write, .-phylink_phy_write
	.comm	MII_ADDR_C45,4,4
	.comm	MDIO_MMD_AN,4,4
	.comm	MDIO_DEVS_AN,4,4
	.comm	MDIO_AN_LPA,4,4
	.comm	MDIO_AN_ADVERTISE,4,4
	.comm	EINVAL,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_phylink.c_phylink_phy_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	phylink_phy_write, %function
phylink_phy_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r1, r0
	mov	r0, r5
	mov	r4, r2
	mov	r7, r3
	ldr	r6, [r1]
	bl	mdio_phy_id_is_c45
	cmp	r0, #0
	bne	.L15
	ldr	r3, [r6, #8]
	cmp	r3, #0
	bne	.L16
	mov	r2, r4
.L3:
	mov	r3, r7
	mov	r1, r5
	ldr	r0, [r6]
	pop	{r4, r5, r6, r7, r8, lr}
	b	mdiobus_write
.L16:
	sub	r2, r4, #128
	cmp	r2, #5
	ldrls	pc, [pc, r2, asl #2]
	b	.L5
.L7:
	.word	.L8
	.word	.L8
	.word	.L6
	.word	.L8
	.word	.L8
	.word	.L6
.L15:
	mov	r0, r5
	bl	mdio_phy_id_prtad
	mov	r1, r0
	mov	r0, r5
	mov	r5, r1
	bl	mdio_phy_id_devad
	ldr	r3, .L17
	ldr	r2, [r3]
	orr	r2, r2, r0, lsl #16
	orr	r2, r2, r4
	b	.L3
.L6:
	ldr	r3, .L17+4
	ldr	r2, [r6, #4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L5
	ldr	r3, .L17+8
	cmp	r4, #133
	ldr	r0, [r3]
	ldreq	r3, .L17+12
	ldrne	r3, .L17+16
	ldr	r4, [r3]
.L9:
	ldr	r3, .L17
	ldr	r2, [r3]
	orr	r2, r2, r0, lsl #16
	orr	r2, r2, r4
	b	.L3
.L8:
	ldr	r0, [r6, #4]
	bl	__ffs
	b	.L9
.L5:
	ldr	r3, .L17+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	.align	2
.L17:
	.word	MII_ADDR_C45
	.word	MDIO_DEVS_AN
	.word	MDIO_MMD_AN
	.word	MDIO_AN_ADVERTISE
	.word	MDIO_AN_LPA
	.word	EINVAL
	.size	phylink_phy_write, .-phylink_phy_write
	.comm	MII_ADDR_C45,4,4
	.comm	MDIO_MMD_AN,4,4
	.comm	MDIO_DEVS_AN,4,4
	.comm	MDIO_AN_LPA,4,4
	.comm	MDIO_AN_ADVERTISE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
