	.file	"extr_xgbe-mdio.c_xgbe_phy_status_aneg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	xgbe_phy_status_aneg, @function
xgbe_phy_status_aneg:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	DWORD PTR 28[rdi], 0
	mov	rax, QWORD PTR AUTONEG_ENABLE[rip]
	cmp	QWORD PTR 8[rdi], rax
	jne	.L2
	cmp	QWORD PTR 40[rdi], 0
	je	.L3
.L2:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	xgbe_phy_status_force@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	eax, DWORD PTR ADVERTISED_Autoneg[rip]
	or	eax, DWORD PTR ADVERTISED_Backplane[rip]
	mov	rdx, QWORD PTR MDIO_AN_ADVERTISE[rip]
	mov	esi, DWORD PTR MDIO_MMD_AN[rip]
	mov	DWORD PTR 28[rdi], eax
	call	XMDIO_READ@PLT
	mov	rdx, QWORD PTR MDIO_AN_LPA[rip]
	mov	esi, DWORD PTR MDIO_MMD_AN[rip]
	mov	rdi, rbp
	mov	ebx, eax
	call	XMDIO_READ@PLT
	mov	edx, eax
	and	edx, 1024
	je	.L4
	mov	ecx, DWORD PTR ADVERTISED_Pause[rip]
	or	DWORD PTR 28[rbp], ecx
.L4:
	test	ah, 8
	je	.L5
	mov	ecx, DWORD PTR ADVERTISED_Asym_Pause[rip]
	or	DWORD PTR 28[rbp], ecx
.L5:
	cmp	QWORD PTR 32[rbp], 0
	je	.L7
	and	eax, ebx
	mov	QWORD PTR 16[rbp], 0
	test	ah, 4
	je	.L8
	movabs	rax, 4294967297
	mov	QWORD PTR 16[rbp], rax
.L7:
	mov	rax, QWORD PTR MDIO_AN_ADVERTISE[rip]
	mov	esi, DWORD PTR MDIO_MMD_AN[rip]
	mov	rdi, rbp
	lea	rdx, 1[rax]
	call	XMDIO_READ@PLT
	mov	esi, DWORD PTR MDIO_MMD_AN[rip]
	mov	rdi, rbp
	mov	ebx, eax
	mov	rax, QWORD PTR MDIO_AN_LPA[rip]
	lea	rdx, 1[rax]
	call	XMDIO_READ@PLT
	test	al, -128
	je	.L11
	mov	edx, DWORD PTR ADVERTISED_10000baseKR_Full[rip]
	or	DWORD PTR 28[rbp], edx
.L11:
	test	al, 32
	je	.L12
	mov	edx, DWORD PTR 0[rbp]
	cmp	edx, 128
	je	.L13
	cmp	edx, 129
	jne	.L12
	mov	edx, DWORD PTR ADVERTISED_1000baseKX_Full[rip]
	or	DWORD PTR 28[rbp], edx
	.p2align 4,,10
	.p2align 3
.L12:
	and	eax, ebx
	test	al, -128
	jne	.L39
	test	al, 32
	je	.L16
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, 128
	je	.L17
	cmp	eax, 129
	jne	.L18
	mov	eax, DWORD PTR SPEED_1000[rip]
	mov	DWORD PTR 24[rbp], eax
.L18:
	mov	esi, DWORD PTR XGBE_MODE_KX[rip]
	mov	rdi, rbp
	call	xgbe_set_mode@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L16:
	mov	eax, DWORD PTR SPEED_UNKNOWN[rip]
	mov	DWORD PTR 24[rbp], eax
.L15:
	mov	rax, QWORD PTR MDIO_AN_ADVERTISE[rip]
	mov	esi, DWORD PTR MDIO_MMD_AN[rip]
	mov	rdi, rbp
	lea	rdx, 2[rax]
	call	XMDIO_READ@PLT
	mov	rax, QWORD PTR MDIO_AN_LPA[rip]
	mov	esi, DWORD PTR MDIO_MMD_AN[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	lea	rdx, 2[rax]
	jmp	XMDIO_READ@PLT
	.p2align 4,,10
	.p2align 3
.L39:
	.cfi_restore_state
	mov	eax, DWORD PTR SPEED_10000[rip]
	mov	esi, DWORD PTR XGBE_MODE_KR[rip]
	mov	rdi, rbp
	mov	DWORD PTR 24[rbp], eax
	call	xgbe_set_mode@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L8:
	test	ah, 8
	je	.L7
	and	bh, 4
	je	.L10
	mov	DWORD PTR 20[rbp], 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, DWORD PTR ADVERTISED_2500baseX_Full[rip]
	or	DWORD PTR 28[rbp], edx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L17:
	mov	eax, DWORD PTR SPEED_2500[rip]
	mov	DWORD PTR 24[rbp], eax
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L10:
	test	edx, edx
	je	.L7
	mov	DWORD PTR 16[rbp], 1
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	xgbe_phy_status_aneg, .-xgbe_phy_status_aneg
	.comm	XGBE_MODE_KX,4,4
	.comm	XGBE_MODE_KR,4,4
	.comm	SPEED_UNKNOWN,4,4
	.comm	SPEED_2500,4,4
	.comm	SPEED_10000,4,4
	.comm	SPEED_1000,4,4
	.comm	MDIO_MMD_AN,4,4
	.comm	MDIO_AN_LPA,8,8
	.comm	MDIO_AN_ADVERTISE,8,8
	.comm	AUTONEG_ENABLE,8,8
	.comm	ADVERTISED_Pause,4,4
	.comm	ADVERTISED_Backplane,4,4
	.comm	ADVERTISED_Autoneg,4,4
	.comm	ADVERTISED_Asym_Pause,4,4
	.comm	ADVERTISED_2500baseX_Full,4,4
	.comm	ADVERTISED_1000baseKX_Full,4,4
	.comm	ADVERTISED_10000baseKR_Full,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_xgbe-mdio.c_xgbe_phy_status_aneg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xgbe_phy_status_aneg, %function
xgbe_phy_status_aneg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r1, #0
	ldr	r3, .L40
	ldr	r2, [r0, #4]
	ldr	r3, [r3]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r2, r3
	mov	r4, r0
	str	r1, [r0, #20]
	bne	.L2
	ldr	r3, [r0, #28]
	cmp	r3, r1
	beq	.L3
.L2:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	xgbe_phy_status_force
.L3:
	ldr	r3, .L40+4
	ldr	r2, .L40+8
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r5, .L40+12
	ldr	r7, .L40+16
	orr	r3, r3, r2
	str	r3, [r0, #20]
	ldr	r2, [r7]
	ldr	r1, [r5]
	bl	XMDIO_READ
	ldr	r6, .L40+20
	ldr	r1, [r5]
	ldr	r2, [r6]
	mov	r8, r0
	mov	r0, r4
	bl	XMDIO_READ
	ands	r1, r0, #1024
	ldrne	r2, .L40+24
	ldrne	r3, [r4, #20]
	ldrne	r2, [r2]
	orrne	r3, r3, r2
	strne	r3, [r4, #20]
	tst	r0, #2048
	ldrne	r2, .L40+28
	ldrne	r3, [r4, #20]
	ldrne	r2, [r2]
	orrne	r3, r3, r2
	strne	r3, [r4, #20]
	ldr	r3, [r4, #24]
	cmp	r3, #0
	beq	.L7
	mov	r2, #0
	and	r3, r8, r0
	tst	r3, #1024
	str	r2, [r4, #8]
	str	r2, [r4, #12]
	beq	.L8
	mov	r3, #1
	str	r3, [r4, #8]
	str	r3, [r4, #12]
.L7:
	ldr	r2, [r7]
	ldr	r1, [r5]
	add	r2, r2, #1
	mov	r0, r4
	bl	XMDIO_READ
	ldr	r2, [r6]
	mov	r8, r0
	add	r2, r2, #1
	mov	r0, r4
	ldr	r1, [r5]
	bl	XMDIO_READ
	tst	r0, #128
	ldrne	r2, .L40+32
	ldrne	r3, [r4, #20]
	ldrne	r2, [r2]
	orrne	r3, r3, r2
	strne	r3, [r4, #20]
	tst	r0, #32
	beq	.L12
	ldr	r3, [r4]
	cmp	r3, #128
	beq	.L13
	cmp	r3, #129
	bne	.L12
	ldr	r2, .L40+36
	ldr	r3, [r4, #20]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r4, #20]
.L12:
	and	r0, r0, r8
	tst	r0, #128
	bne	.L39
	tst	r0, #32
	beq	.L16
	ldr	r3, [r4]
	cmp	r3, #128
	beq	.L17
	cmp	r3, #129
	ldreq	r3, .L40+40
	ldreq	r3, [r3]
	streq	r3, [r4, #16]
.L18:
	ldr	r3, .L40+44
	mov	r0, r4
	ldr	r1, [r3]
	bl	xgbe_set_mode
	b	.L15
.L16:
	ldr	r3, .L40+48
	ldr	r3, [r3]
	str	r3, [r4, #16]
.L15:
	ldr	r2, [r7]
	ldr	r1, [r5]
	mov	r0, r4
	add	r2, r2, #2
	bl	XMDIO_READ
	ldr	r2, [r6]
	mov	r0, r4
	ldr	r1, [r5]
	add	r2, r2, #2
	pop	{r4, r5, r6, r7, r8, lr}
	b	XMDIO_READ
.L39:
	ldr	r3, .L40+52
	ldr	r2, .L40+56
	ldr	r3, [r3]
	mov	r0, r4
	ldr	r1, [r2]
	str	r3, [r4, #16]
	bl	xgbe_set_mode
	b	.L15
.L8:
	tst	r3, #2048
	beq	.L7
	tst	r8, #1024
	movne	r3, #1
	strne	r3, [r4, #12]
	bne	.L7
	cmp	r1, #0
	movne	r3, #1
	strne	r3, [r4, #8]
	b	.L7
.L13:
	ldr	r2, .L40+60
	ldr	r3, [r4, #20]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r4, #20]
	b	.L12
.L17:
	ldr	r3, .L40+64
	ldr	r3, [r3]
	str	r3, [r4, #16]
	b	.L18
.L41:
	.align	2
.L40:
	.word	AUTONEG_ENABLE
	.word	ADVERTISED_Autoneg
	.word	ADVERTISED_Backplane
	.word	MDIO_MMD_AN
	.word	MDIO_AN_ADVERTISE
	.word	MDIO_AN_LPA
	.word	ADVERTISED_Pause
	.word	ADVERTISED_Asym_Pause
	.word	ADVERTISED_10000baseKR_Full
	.word	ADVERTISED_1000baseKX_Full
	.word	SPEED_1000
	.word	XGBE_MODE_KX
	.word	SPEED_UNKNOWN
	.word	SPEED_10000
	.word	XGBE_MODE_KR
	.word	ADVERTISED_2500baseX_Full
	.word	SPEED_2500
	.size	xgbe_phy_status_aneg, .-xgbe_phy_status_aneg
	.comm	XGBE_MODE_KX,4,4
	.comm	XGBE_MODE_KR,4,4
	.comm	SPEED_UNKNOWN,4,4
	.comm	SPEED_2500,4,4
	.comm	SPEED_10000,4,4
	.comm	SPEED_1000,4,4
	.comm	MDIO_MMD_AN,4,4
	.comm	MDIO_AN_LPA,4,4
	.comm	MDIO_AN_ADVERTISE,4,4
	.comm	AUTONEG_ENABLE,4,4
	.comm	ADVERTISED_Pause,4,4
	.comm	ADVERTISED_Backplane,4,4
	.comm	ADVERTISED_Autoneg,4,4
	.comm	ADVERTISED_Asym_Pause,4,4
	.comm	ADVERTISED_2500baseX_Full,4,4
	.comm	ADVERTISED_1000baseKX_Full,4,4
	.comm	ADVERTISED_10000baseKR_Full,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
