	.file	"extr_lxt.c_lxt973a2_read_status.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lxt973a2_read_status, @function
lxt973a2_read_status:
.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
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	call	lxt973a2_update_link@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rax, QWORD PTR AUTONEG_ENABLE[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L32
	mov	esi, DWORD PTR MII_BMCR[rip]
	mov	rdi, rbx
	call	phy_read@PLT
	test	eax, eax
	js	.L17
	mov	rdx, QWORD PTR DUPLEX_FULL[rip]
	test	DWORD PTR BMCR_FULLDPLX[rip], eax
	cmove	rdx, QWORD PTR DUPLEX_HALF[rip]
	mov	QWORD PTR 8[rbx], rdx
	test	DWORD PTR BMCR_SPEED1000[rip], eax
	jne	.L33
	test	DWORD PTR BMCR_SPEED100[rip], eax
	je	.L13
	mov	rax, QWORD PTR SPEED_100[rip]
	mov	QWORD PTR 32[rbx], rax
.L12:
	mov	QWORD PTR 16[rbx], 0
	mov	edi, DWORD PTR 24[rbx]
	call	linkmode_zero@PLT
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	mov	esi, DWORD PTR MII_ADVERTISE[rip]
	mov	rdi, rbx
	mov	r14d, 1
	call	phy_read@PLT
	mov	ebp, eax
	test	eax, eax
	js	.L34
.L4:
	mov	esi, DWORD PTR MII_LPA[rip]
	mov	rdi, rbx
	call	phy_read@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L15
	cmp	ebp, eax
	jne	.L18
	test	r14d, r14d
	je	.L18
	xor	r14d, r14d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rax, QWORD PTR SPEED_1000[rip]
	mov	QWORD PTR 32[rbx], rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, DWORD PTR 24[rbx]
	mov	esi, r13d
	and	ebp, r13d
	call	mii_lpa_to_linkmode_lpa_t@PLT
	mov	rax, QWORD PTR SPEED_10[rip]
	mov	edx, DWORD PTR LPA_100FULL[rip]
	mov	QWORD PTR 16[rbx], 0
	mov	ecx, DWORD PTR LPA_100HALF[rip]
	mov	QWORD PTR 32[rbx], rax
	mov	rax, QWORD PTR DUPLEX_HALF[rip]
	or	ecx, edx
	mov	QWORD PTR 8[rbx], rax
	test	ecx, ebp
	je	.L6
	mov	rcx, QWORD PTR SPEED_100[rip]
	mov	QWORD PTR 32[rbx], rcx
	mov	rcx, QWORD PTR DUPLEX_FULL[rip]
	test	edx, ebp
	je	.L7
.L29:
	mov	QWORD PTR 8[rbx], rcx
.L8:
	xor	eax, eax
	test	DWORD PTR LPA_PAUSE_CAP[rip], ebp
	setne	al
	mov	DWORD PTR 16[rbx], eax
	xor	eax, eax
	test	DWORD PTR LPA_PAUSE_ASYM[rip], ebp
	setne	al
	mov	DWORD PTR 20[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L34:
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rcx, QWORD PTR DUPLEX_FULL[rip]
	test	DWORD PTR LPA_10FULL[rip], ebp
	jne	.L29
.L7:
	cmp	rax, rcx
	je	.L8
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	r12d, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	rax, QWORD PTR SPEED_10[rip]
	mov	QWORD PTR 32[rbx], rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	mov	r12d, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	lxt973a2_read_status, .-lxt973a2_read_status
	.comm	SPEED_1000,8,8
	.comm	SPEED_100,8,8
	.comm	SPEED_10,8,8
	.comm	MII_LPA,4,4
	.comm	MII_BMCR,4,4
	.comm	MII_ADVERTISE,4,4
	.comm	LPA_PAUSE_CAP,4,4
	.comm	LPA_PAUSE_ASYM,4,4
	.comm	LPA_10FULL,4,4
	.comm	LPA_100HALF,4,4
	.comm	LPA_100FULL,4,4
	.comm	DUPLEX_HALF,8,8
	.comm	DUPLEX_FULL,8,8
	.comm	BMCR_SPEED1000,4,4
	.comm	BMCR_SPEED100,4,4
	.comm	BMCR_FULLDPLX,4,4
	.comm	AUTONEG_ENABLE,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_lxt.c_lxt973a2_read_status.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lxt973a2_read_status, %function
lxt973a2_read_status:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	bl	lxt973a2_update_link
	subs	r5, r0, #0
	bne	.L1
	ldr	r3, .L29
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L27
	ldr	r3, .L29+4
	mov	r0, r4
	ldr	r1, [r3]
	bl	phy_read
	cmp	r0, #0
	movlt	r5, r0
	blt	.L1
	ldr	r3, .L29+8
	ldr	r3, [r3]
	tst	r0, r3
	ldrne	r3, .L29+12
	ldreq	r3, .L29+16
	ldr	r2, [r3]
	ldr	r3, .L29+20
	str	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L28
	ldr	r3, .L29+24
	ldr	r3, [r3]
	tst	r0, r3
	ldrne	r3, .L29+28
	ldreq	r3, .L29+32
	ldr	r3, [r3]
	str	r3, [r4, #20]
.L11:
	mov	r3, #0
	ldr	r0, [r4, #16]
	str	r3, [r4, #12]
	str	r3, [r4, #8]
	bl	linkmode_zero
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L27:
	ldr	r3, .L29+36
	mov	r0, r4
	ldr	r1, [r3]
	bl	phy_read
	subs	r8, r0, #0
	movlt	r5, r8
	blt	.L1
	mov	r7, #1
	ldr	r9, .L29+40
.L4:
	mov	r0, r4
	ldr	r1, [r9]
	bl	phy_read
	subs	r6, r0, #0
	blt	.L14
	cmp	r8, r6
	movne	r7, #0
	andeq	r7, r7, #1
	cmp	r7, #0
	bne	.L15
	mov	r1, r6
	ldr	r0, [r4, #16]
	bl	mii_lpa_to_linkmode_lpa_t
	ldr	r2, .L29+44
	ldr	r3, .L29+48
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r0, .L29+32
	ldr	r2, .L29+16
	ldr	r0, [r0]
	ldr	r2, [r2]
	and	r6, r6, r8
	orr	r3, r1, r3
	tst	r3, r6
	str	r7, [r4, #12]
	str	r7, [r4, #8]
	str	r0, [r4, #20]
	str	r2, [r4, #4]
	beq	.L5
	ldr	r3, .L29+28
	tst	r1, r6
	ldr	r1, [r3]
	ldr	r3, .L29+12
	str	r1, [r4, #20]
	ldr	r3, [r3]
	beq	.L6
.L24:
	str	r3, [r4, #4]
.L7:
	ldr	r2, .L29+52
	ldr	r3, .L29+56
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r6, r2
	movne	r2, #1
	moveq	r2, #0
	tst	r6, r3
	movne	r3, #1
	moveq	r3, #0
	str	r2, [r4, #8]
	str	r3, [r4, #12]
	b	.L1
.L28:
	ldr	r3, .L29+60
	ldr	r3, [r3]
	str	r3, [r4, #20]
	b	.L11
.L5:
	ldr	r1, .L29+64
	ldr	r3, .L29+12
	ldr	r1, [r1]
	ldr	r3, [r3]
	tst	r6, r1
	bne	.L24
.L6:
	cmp	r2, r3
	beq	.L7
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L15:
	mov	r7, #0
	b	.L4
.L14:
	mov	r5, r6
	b	.L1
.L30:
	.align	2
.L29:
	.word	AUTONEG_ENABLE
	.word	MII_BMCR
	.word	BMCR_FULLDPLX
	.word	DUPLEX_FULL
	.word	DUPLEX_HALF
	.word	BMCR_SPEED1000
	.word	BMCR_SPEED100
	.word	SPEED_100
	.word	SPEED_10
	.word	MII_ADVERTISE
	.word	MII_LPA
	.word	LPA_100FULL
	.word	LPA_100HALF
	.word	LPA_PAUSE_CAP
	.word	LPA_PAUSE_ASYM
	.word	SPEED_1000
	.word	LPA_10FULL
	.size	lxt973a2_read_status, .-lxt973a2_read_status
	.comm	SPEED_1000,4,4
	.comm	SPEED_100,4,4
	.comm	SPEED_10,4,4
	.comm	MII_LPA,4,4
	.comm	MII_BMCR,4,4
	.comm	MII_ADVERTISE,4,4
	.comm	LPA_PAUSE_CAP,4,4
	.comm	LPA_PAUSE_ASYM,4,4
	.comm	LPA_10FULL,4,4
	.comm	LPA_100HALF,4,4
	.comm	LPA_100FULL,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
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
