	.file	"extr_phy_device.c_genphy_read_status.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	genphy_read_status
	.type	genphy_read_status, @function
genphy_read_status:
.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	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, DWORD PTR [rdi]
	call	genphy_update_link@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rax, QWORD PTR AUTONEG_ENABLE[rip]
	cmp	QWORD PTR 8[rbp], rax
	jne	.L3
	test	ebx, ebx
	jne	.L20
.L3:
	mov	eax, DWORD PTR SPEED_UNKNOWN[rip]
	mov	QWORD PTR 40[rbp], 0
	mov	rdi, rbp
	mov	QWORD PTR 32[rbp], 0
	mov	DWORD PTR 16[rbp], eax
	mov	eax, DWORD PTR DUPLEX_UNKNOWN[rip]
	mov	DWORD PTR 20[rbp], eax
	call	genphy_read_lpa@PLT
	test	eax, eax
	js	.L11
	mov	rax, QWORD PTR 8[rbp]
	cmp	rax, QWORD PTR AUTONEG_ENABLE[rip]
	je	.L21
.L4:
	cmp	rax, QWORD PTR AUTONEG_DISABLE[rip]
	je	.L22
.L1:
	mov	eax, r12d
	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
.L20:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	je	.L3
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	r12d, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	esi, DWORD PTR MII_BMCR[rip]
	mov	rdi, rbp
	call	phy_read@PLT
	test	eax, eax
	js	.L11
	mov	edx, DWORD PTR DUPLEX_FULL[rip]
	test	DWORD PTR BMCR_FULLDPLX[rip], eax
	cmove	edx, DWORD PTR DUPLEX_HALF[rip]
	mov	DWORD PTR 20[rbp], edx
	test	DWORD PTR BMCR_SPEED1000[rip], eax
	jne	.L23
	and	eax, DWORD PTR BMCR_SPEED100[rip]
	mov	r12d, eax
	je	.L9
	mov	eax, DWORD PTR SPEED_100[rip]
	xor	r12d, r12d
	mov	DWORD PTR 16[rbp], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	cmp	QWORD PTR 24[rbp], 0
	je	.L4
	mov	rdi, rbp
	call	phy_resolve_aneg_linkmode@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	eax, DWORD PTR SPEED_1000[rip]
	mov	DWORD PTR 16[rbp], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR SPEED_10[rip]
	mov	DWORD PTR 16[rbp], eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	genphy_read_status, .-genphy_read_status
	.comm	SPEED_UNKNOWN,4,4
	.comm	SPEED_1000,4,4
	.comm	SPEED_100,4,4
	.comm	SPEED_10,4,4
	.comm	MII_BMCR,4,4
	.comm	DUPLEX_UNKNOWN,4,4
	.comm	DUPLEX_HALF,4,4
	.comm	DUPLEX_FULL,4,4
	.comm	BMCR_SPEED1000,4,4
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_FULLDPLX,4,4
	.comm	AUTONEG_ENABLE,8,8
	.comm	AUTONEG_DISABLE,8,8
	.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_device.c_genphy_read_status.c"
	.text
	.align	2
	.global	genphy_read_status
	.syntax unified
	.arm
	.fpu softvfp
	.type	genphy_read_status, %function
genphy_read_status:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r7, [r0]
	bl	genphy_update_link
	subs	r5, r0, #0
	bne	.L1
	ldr	r6, .L26
	ldr	r3, [r4, #4]
	ldr	r2, [r6]
	cmp	r7, #0
	sub	r3, r3, r2
	clz	r3, r3
	lsr	r3, r3, #5
	moveq	r3, #0
	cmp	r3, #0
	bne	.L23
.L3:
	mov	r3, #0
	ldr	r1, .L26+4
	ldr	r2, .L26+8
	ldr	r1, [r1]
	ldr	r2, [r2]
	mov	r0, r4
	str	r1, [r4, #8]
	str	r2, [r4, #12]
	str	r3, [r4, #24]
	str	r3, [r4, #20]
	bl	genphy_read_lpa
	cmp	r0, #0
	movlt	r5, r0
	blt	.L1
	ldr	r2, [r6]
	ldr	r3, [r4, #4]
	cmp	r3, r2
	beq	.L24
.L4:
	ldr	r2, .L26+12
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L25
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L3
	b	.L1
.L25:
	ldr	r3, .L26+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	phy_read
	subs	r3, r0, #0
	movlt	r5, r3
	blt	.L1
	ldr	r2, .L26+20
	ldr	r2, [r2]
	tst	r3, r2
	ldrne	r2, .L26+24
	ldreq	r2, .L26+28
	ldr	r1, [r2]
	ldr	r2, .L26+32
	str	r1, [r4, #12]
	ldr	r2, [r2]
	ands	r2, r3, r2
	beq	.L8
	ldr	r3, .L26+36
	ldr	r3, [r3]
	str	r3, [r4, #8]
	b	.L1
.L24:
	ldr	r2, [r4, #16]
	cmp	r2, #0
	beq	.L4
	mov	r0, r4
	bl	phy_resolve_aneg_linkmode
	b	.L1
.L8:
	ldr	r1, .L26+40
	ldr	r0, [r1]
	ands	r5, r3, r0
	ldrne	r3, .L26+44
	ldreq	r3, .L26+48
	movne	r5, r2
	ldr	r3, [r3]
	str	r3, [r4, #8]
	b	.L1
.L27:
	.align	2
.L26:
	.word	AUTONEG_ENABLE
	.word	SPEED_UNKNOWN
	.word	DUPLEX_UNKNOWN
	.word	AUTONEG_DISABLE
	.word	MII_BMCR
	.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	genphy_read_status, .-genphy_read_status
	.comm	SPEED_UNKNOWN,4,4
	.comm	SPEED_1000,4,4
	.comm	SPEED_100,4,4
	.comm	SPEED_10,4,4
	.comm	MII_BMCR,4,4
	.comm	DUPLEX_UNKNOWN,4,4
	.comm	DUPLEX_HALF,4,4
	.comm	DUPLEX_FULL,4,4
	.comm	BMCR_SPEED1000,4,4
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_FULLDPLX,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
