	.file	"extr_amphy.c_amphy_status.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	amphy_status, @function
amphy_status:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbx, QWORD PTR [rdi]
	mov	eax, DWORD PTR IFM_AVALID[rip]
	mov	esi, DWORD PTR MII_BMSR[rip]
	mov	DWORD PTR 4[rbx], eax
	mov	eax, DWORD PTR IFM_ETHER[rip]
	mov	r13, QWORD PTR 8[rbx]
	mov	DWORD PTR [rbx], eax
	call	PHY_READ@PLT
	mov	esi, DWORD PTR MII_BMSR[rip]
	mov	rdi, rbp
	mov	r12d, eax
	call	PHY_READ@PLT
	or	r12d, eax
	test	DWORD PTR BMSR_LINK[rip], r12d
	je	.L2
	mov	eax, DWORD PTR IFM_ACTIVE[rip]
	or	DWORD PTR 4[rbx], eax
.L2:
	mov	esi, DWORD PTR MII_BMCR[rip]
	mov	rdi, rbp
	call	PHY_READ@PLT
	test	DWORD PTR BMCR_ISO[rip], eax
	jne	.L33
	test	DWORD PTR BMCR_LOOP[rip], eax
	je	.L5
	mov	edx, DWORD PTR IFM_LOOP[rip]
	or	DWORD PTR [rbx], edx
.L5:
	test	DWORD PTR BMCR_AUTOEN[rip], eax
	jne	.L34
	mov	eax, DWORD PTR 0[r13]
	mov	DWORD PTR [rbx], eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	test	DWORD PTR BMSR_ACOMP[rip], r12d
	jne	.L7
	mov	eax, DWORD PTR IFM_NONE[rip]
	or	DWORD PTR [rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L33:
	.cfi_restore_state
	mov	DWORD PTR 4[rbx], 0
	mov	eax, DWORD PTR IFM_NONE[rip]
	or	DWORD PTR [rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, DWORD PTR MII_ANER[rip]
	mov	rdi, rbp
	call	PHY_READ@PLT
	test	DWORD PTR ANER_LPAN[rip], eax
	jne	.L35
	mov	esi, DWORD PTR MII_AMPHY_DSCSR[rip]
	mov	rdi, rbp
	call	PHY_READ@PLT
	mov	ecx, DWORD PTR IFM_FDX[rip]
	test	DWORD PTR DSCSR_100FDX[rip], eax
	je	.L14
	mov	edx, DWORD PTR IFM_100_TX[rip]
	or	edx, ecx
	or	edx, DWORD PTR [rbx]
	mov	DWORD PTR [rbx], edx
.L15:
	test	edx, ecx
	je	.L1
	mov	rdi, rbp
	call	mii_phy_flowstatus@PLT
	or	DWORD PTR [rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	mov	esi, DWORD PTR MII_ANAR[rip]
	mov	rdi, rbp
	call	PHY_READ@PLT
	mov	esi, DWORD PTR MII_ANLPAR[rip]
	mov	rdi, rbp
	mov	r12d, eax
	call	PHY_READ@PLT
	and	eax, r12d
	test	DWORD PTR ANLPAR_TX_FD[rip], eax
	jne	.L36
	mov	edx, DWORD PTR [rbx]
	test	DWORD PTR ANLPAR_T4[rip], eax
	je	.L10
	mov	eax, DWORD PTR IFM_100_T4[rip]
	or	eax, DWORD PTR IFM_HDX[rip]
	or	eax, edx
	mov	DWORD PTR [rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edx, DWORD PTR [rbx]
	test	DWORD PTR DSCSR_100HDX[rip], eax
	jne	.L37
	test	DWORD PTR DSCSR_10FDX[rip], eax
	jne	.L31
	test	DWORD PTR DSCSR_10HDX[rip], eax
	je	.L15
.L31:
	mov	eax, DWORD PTR IFM_10_T[rip]
	or	eax, DWORD PTR IFM_HDX[rip]
	or	edx, eax
	mov	DWORD PTR [rbx], edx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L36:
	mov	eax, DWORD PTR IFM_100_TX[rip]
	or	eax, DWORD PTR IFM_FDX[rip]
	or	DWORD PTR [rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L37:
	mov	eax, DWORD PTR IFM_100_TX[rip]
	or	eax, DWORD PTR IFM_HDX[rip]
	or	edx, eax
	mov	DWORD PTR [rbx], edx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L10:
	test	DWORD PTR ANLPAR_TX[rip], eax
	je	.L11
	mov	eax, DWORD PTR IFM_100_TX[rip]
	or	eax, DWORD PTR IFM_HDX[rip]
	or	eax, edx
	mov	DWORD PTR [rbx], eax
	jmp	.L1
.L11:
	test	DWORD PTR ANLPAR_10_FD[rip], eax
	je	.L12
	mov	eax, DWORD PTR IFM_10_T[rip]
	or	eax, DWORD PTR IFM_FDX[rip]
	or	eax, edx
	mov	DWORD PTR [rbx], eax
	jmp	.L1
.L12:
	test	DWORD PTR ANLPAR_10[rip], eax
	je	.L13
	mov	eax, DWORD PTR IFM_10_T[rip]
	or	eax, DWORD PTR IFM_HDX[rip]
	or	eax, edx
	mov	DWORD PTR [rbx], eax
	jmp	.L1
.L13:
	mov	eax, DWORD PTR IFM_NONE[rip]
	or	eax, edx
	mov	DWORD PTR [rbx], eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	amphy_status, .-amphy_status
	.comm	MII_BMSR,4,4
	.comm	MII_BMCR,4,4
	.comm	MII_ANLPAR,4,4
	.comm	MII_ANER,4,4
	.comm	MII_ANAR,4,4
	.comm	MII_AMPHY_DSCSR,4,4
	.comm	IFM_NONE,4,4
	.comm	IFM_LOOP,4,4
	.comm	IFM_HDX,4,4
	.comm	IFM_FDX,4,4
	.comm	IFM_ETHER,4,4
	.comm	IFM_AVALID,4,4
	.comm	IFM_ACTIVE,4,4
	.comm	IFM_10_T,4,4
	.comm	IFM_100_TX,4,4
	.comm	IFM_100_T4,4,4
	.comm	DSCSR_10HDX,4,4
	.comm	DSCSR_10FDX,4,4
	.comm	DSCSR_100HDX,4,4
	.comm	DSCSR_100FDX,4,4
	.comm	BMSR_LINK,4,4
	.comm	BMSR_ACOMP,4,4
	.comm	BMCR_LOOP,4,4
	.comm	BMCR_ISO,4,4
	.comm	BMCR_AUTOEN,4,4
	.comm	ANLPAR_TX_FD,4,4
	.comm	ANLPAR_TX,4,4
	.comm	ANLPAR_T4,4,4
	.comm	ANLPAR_10_FD,4,4
	.comm	ANLPAR_10,4,4
	.comm	ANER_LPAN,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_amphy.c_amphy_status.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	amphy_status, %function
amphy_status:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L40
	ldr	r3, .L40+4
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r2, [r2]
	ldr	r4, [r0]
	ldr	r3, [r3]
	ldr	r7, .L40+8
	str	r2, [r4, #4]
	str	r3, [r4]
	ldr	r1, [r7]
	mov	r5, r0
	ldr	r8, [r4, #8]
	bl	PHY_READ
	ldr	r1, [r7]
	mov	r6, r0
	mov	r0, r5
	bl	PHY_READ
	ldr	r3, .L40+12
	orr	r6, r6, r0
	ldr	r3, [r3]
	mov	r0, r5
	tst	r6, r3
	ldrne	r2, .L40+16
	ldrne	r3, [r4, #4]
	ldrne	r2, [r2]
	orrne	r3, r3, r2
	strne	r3, [r4, #4]
	ldr	r3, .L40+20
	ldr	r1, [r3]
	bl	PHY_READ
	ldr	r3, .L40+24
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L36
	ldr	r3, .L40+28
	ldr	r3, [r3]
	tst	r0, r3
	ldrne	r2, .L40+32
	ldrne	r3, [r4]
	ldrne	r2, [r2]
	orrne	r3, r3, r2
	strne	r3, [r4]
	ldr	r3, .L40+36
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L6
	ldr	r3, .L40+40
	ldr	r3, [r3]
	tst	r6, r3
	bne	.L7
	ldr	r2, .L40+44
	ldr	r3, [r4]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	ldr	r3, [r8]
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L36:
	mov	r1, #0
	ldr	r2, .L40+44
	ldr	r3, [r4]
	ldr	r2, [r2]
	str	r1, [r4, #4]
	orr	r3, r3, r2
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r3, .L40+48
	mov	r0, r5
	ldr	r1, [r3]
	bl	PHY_READ
	ldr	r3, .L40+52
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L37
	ldr	r3, .L40+56
	mov	r0, r5
	ldr	r1, [r3]
	bl	PHY_READ
	ldr	r3, .L40+60
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L14
	ldr	r2, .L40+64
	ldr	r3, .L40+68
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r4]
	orr	r3, r2, r3
	orr	r3, r3, r1
	str	r3, [r4]
.L15:
	tst	r3, r2
	popeq	{r4, r5, r6, r7, r8, pc}
	mov	r0, r5
	bl	mii_phy_flowstatus
	ldr	r3, [r4]
	orr	r3, r3, r0
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L37:
	ldr	r3, .L40+72
	mov	r0, r5
	ldr	r1, [r3]
	bl	PHY_READ
	mov	r3, r0
	ldr	r2, .L40+76
	mov	r0, r5
	ldr	r1, [r2]
	mov	r5, r3
	bl	PHY_READ
	ldr	r3, .L40+80
	and	r0, r0, r5
	ldr	r3, [r3]
	tst	r0, r3
	bne	.L38
	ldr	r3, .L40+84
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L10
	ldr	r3, .L40+88
.L33:
	ldr	r1, .L40+92
.L34:
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r1
	orr	r3, r3, r2
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r3, .L40+96
	ldr	r2, .L40+64
	ldr	r3, [r3]
	ldr	r2, [r2]
	tst	r0, r3
	ldr	r3, [r4]
	bne	.L39
	ldr	r1, .L40+100
	ldr	r1, [r1]
	tst	r0, r1
	bne	.L32
	ldr	r1, .L40+104
	ldr	r1, [r1]
	tst	r0, r1
	beq	.L15
.L32:
	ldr	r1, .L40+108
.L31:
	ldr	r0, .L40+92
	ldr	r1, [r1]
	ldr	r0, [r0]
	orr	r1, r1, r0
	orr	r3, r3, r1
	str	r3, [r4]
	b	.L15
.L38:
	ldr	r3, .L40+64
	ldr	r2, .L40+68
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r4]
	orr	r2, r2, r1
	orr	r3, r3, r2
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L39:
	ldr	r1, .L40+68
	b	.L31
.L10:
	ldr	r3, .L40+112
	ldr	r3, [r3]
	tst	r0, r3
	ldrne	r3, .L40+68
	bne	.L33
.L11:
	ldr	r3, .L40+116
	ldr	r3, [r3]
	tst	r0, r3
	ldrne	r3, .L40+108
	ldrne	r1, .L40+64
	bne	.L34
.L12:
	ldr	r3, .L40+120
	ldr	r3, [r3]
	tst	r0, r3
	ldrne	r3, .L40+108
	bne	.L33
.L13:
	ldr	r3, .L40+44
	ldr	r3, [r3]
	orr	r3, r3, r2
	str	r3, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L41:
	.align	2
.L40:
	.word	IFM_AVALID
	.word	IFM_ETHER
	.word	MII_BMSR
	.word	BMSR_LINK
	.word	IFM_ACTIVE
	.word	MII_BMCR
	.word	BMCR_ISO
	.word	BMCR_LOOP
	.word	IFM_LOOP
	.word	BMCR_AUTOEN
	.word	BMSR_ACOMP
	.word	IFM_NONE
	.word	MII_ANER
	.word	ANER_LPAN
	.word	MII_AMPHY_DSCSR
	.word	DSCSR_100FDX
	.word	IFM_FDX
	.word	IFM_100_TX
	.word	MII_ANAR
	.word	MII_ANLPAR
	.word	ANLPAR_TX_FD
	.word	ANLPAR_T4
	.word	IFM_100_T4
	.word	IFM_HDX
	.word	DSCSR_100HDX
	.word	DSCSR_10FDX
	.word	DSCSR_10HDX
	.word	IFM_10_T
	.word	ANLPAR_TX
	.word	ANLPAR_10_FD
	.word	ANLPAR_10
	.size	amphy_status, .-amphy_status
	.comm	MII_BMSR,4,4
	.comm	MII_BMCR,4,4
	.comm	MII_ANLPAR,4,4
	.comm	MII_ANER,4,4
	.comm	MII_ANAR,4,4
	.comm	MII_AMPHY_DSCSR,4,4
	.comm	IFM_NONE,4,4
	.comm	IFM_LOOP,4,4
	.comm	IFM_HDX,4,4
	.comm	IFM_FDX,4,4
	.comm	IFM_ETHER,4,4
	.comm	IFM_AVALID,4,4
	.comm	IFM_ACTIVE,4,4
	.comm	IFM_10_T,4,4
	.comm	IFM_100_TX,4,4
	.comm	IFM_100_T4,4,4
	.comm	DSCSR_10HDX,4,4
	.comm	DSCSR_10FDX,4,4
	.comm	DSCSR_100HDX,4,4
	.comm	DSCSR_100FDX,4,4
	.comm	BMSR_LINK,4,4
	.comm	BMSR_ACOMP,4,4
	.comm	BMCR_LOOP,4,4
	.comm	BMCR_ISO,4,4
	.comm	BMCR_AUTOEN,4,4
	.comm	ANLPAR_TX_FD,4,4
	.comm	ANLPAR_TX,4,4
	.comm	ANLPAR_T4,4,4
	.comm	ANLPAR_10_FD,4,4
	.comm	ANLPAR_10,4,4
	.comm	ANER_LPAN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
