	.file	"extr_b44.c_b44_check_phy.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Remote fault detected in PHY\n"
.LC1:
	.string	"Jabber detected in PHY\n"
	.text
	.p2align 4
	.type	b44_check_phy, @function
b44_check_phy:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR B44_FLAG_EXTERNAL_PHY[rip], eax
	jne	.L33
	mov	esi, DWORD PTR MII_BMSR[rip]
	lea	rdx, 8[rsp]
	call	b44_readphy@PLT
	test	eax, eax
	je	.L34
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L35
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	mov	esi, DWORD PTR B44_MII_AUXCTRL[rip]
	lea	rdx, 12[rsp]
	mov	rdi, rbp
	call	b44_readphy@PLT
	test	eax, eax
	jne	.L1
	cmp	DWORD PTR 8[rsp], 65535
	je	.L1
	mov	edx, DWORD PTR B44_FLAG_100_BASE_T[rip]
	mov	eax, DWORD PTR 0[rbp]
	mov	ecx, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR 4[rbp]
	mov	esi, edx
	not	edx
	or	esi, eax
	and	edx, eax
	test	DWORD PTR MII_AUXCTRL_SPEED[rip], ecx
	mov	eax, esi
	cmove	eax, edx
	mov	edx, DWORD PTR B44_FLAG_FULL_DUPLEX[rip]
	mov	esi, edx
	not	edx
	or	esi, eax
	and	eax, edx
	test	DWORD PTR MII_AUXCTRL_DUPLEX[rip], ecx
	cmovne	eax, esi
	mov	DWORD PTR 0[rbp], eax
	call	netif_carrier_ok@PLT
	test	rax, rax
	jne	.L12
	mov	eax, DWORD PTR 8[rsp]
	test	DWORD PTR BMSR_LSTATUS[rip], eax
	je	.L12
	mov	esi, DWORD PTR B44_TX_CTRL[rip]
	mov	rdi, rbp
	call	br32@PLT
	mov	edx, DWORD PTR 0[rbp]
	test	DWORD PTR B44_FLAG_FULL_DUPLEX[rip], edx
	je	.L13
	or	eax, DWORD PTR TX_CTRL_DUPLEX[rip]
	mov	edx, eax
.L14:
	mov	esi, DWORD PTR B44_TX_CTRL[rip]
	mov	rdi, rbp
	call	bw32@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR B44_FLAG_FORCE_LINK[rip], eax
	je	.L36
.L16:
	mov	edi, DWORD PTR 4[rbp]
	call	netif_carrier_on@PLT
	mov	rdi, rbp
	call	b44_link_report@PLT
	mov	eax, DWORD PTR 8[rsp]
.L18:
	test	DWORD PTR BMSR_RFAULT[rip], eax
	jne	.L37
.L20:
	test	DWORD PTR BMSR_JCD[rip], eax
	je	.L1
	mov	edi, DWORD PTR 4[rbp]
	lea	rsi, .LC1[rip]
	call	netdev_warn@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L33:
	or	eax, DWORD PTR B44_FLAG_100_BASE_T[rip]
	mov	DWORD PTR [rdi], eax
	mov	edi, DWORD PTR 4[rdi]
	call	netif_carrier_ok@PLT
	test	rax, rax
	jne	.L1
	mov	esi, DWORD PTR B44_TX_CTRL[rip]
	mov	rdi, rbp
	call	br32@PLT
	mov	edx, eax
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR B44_FLAG_FULL_DUPLEX[rip], eax
	je	.L5
	or	edx, DWORD PTR TX_CTRL_DUPLEX[rip]
.L6:
	mov	esi, DWORD PTR B44_TX_CTRL[rip]
	mov	rdi, rbp
	call	bw32@PLT
	mov	edi, DWORD PTR 4[rbp]
	call	netif_carrier_on@PLT
	mov	rdi, rbp
	call	b44_link_report@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR 4[rbp]
	call	netif_carrier_ok@PLT
	test	rax, rax
	mov	eax, DWORD PTR 8[rsp]
	je	.L18
	test	DWORD PTR BMSR_LSTATUS[rip], eax
	jne	.L18
	mov	edi, DWORD PTR 4[rbp]
	call	netif_carrier_off@PLT
	mov	rdi, rbp
	call	b44_link_report@PLT
	mov	eax, DWORD PTR 8[rsp]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR TX_CTRL_DUPLEX[rip]
	not	eax
	and	edx, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L37:
	mov	edi, DWORD PTR 4[rbp]
	lea	rsi, .LC0[rip]
	call	netdev_warn@PLT
	mov	eax, DWORD PTR 8[rsp]
	jmp	.L20
.L13:
	mov	edx, DWORD PTR TX_CTRL_DUPLEX[rip]
	not	edx
	and	edx, eax
	jmp	.L14
.L36:
	mov	esi, DWORD PTR MII_ADVERTISE[rip]
	lea	rdx, 16[rsp]
	mov	rdi, rbp
	call	b44_readphy@PLT
	test	eax, eax
	jne	.L16
	mov	esi, DWORD PTR MII_LPA[rip]
	lea	rdx, 20[rsp]
	mov	rdi, rbp
	call	b44_readphy@PLT
	test	eax, eax
	jne	.L16
	mov	edx, DWORD PTR 20[rsp]
	mov	esi, DWORD PTR 16[rsp]
	mov	rdi, rbp
	call	b44_set_flow_ctrl@PLT
	jmp	.L16
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	b44_check_phy, .-b44_check_phy
	.comm	TX_CTRL_DUPLEX,4,4
	.comm	MII_LPA,4,4
	.comm	MII_BMSR,4,4
	.comm	MII_AUXCTRL_SPEED,4,4
	.comm	MII_AUXCTRL_DUPLEX,4,4
	.comm	MII_ADVERTISE,4,4
	.comm	BMSR_RFAULT,4,4
	.comm	BMSR_LSTATUS,4,4
	.comm	BMSR_JCD,4,4
	.comm	B44_TX_CTRL,4,4
	.comm	B44_MII_AUXCTRL,4,4
	.comm	B44_FLAG_FULL_DUPLEX,4,4
	.comm	B44_FLAG_FORCE_LINK,4,4
	.comm	B44_FLAG_EXTERNAL_PHY,4,4
	.comm	B44_FLAG_100_BASE_T,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_b44.c_b44_check_phy.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Remote fault detected in PHY\012\000"
	.align	2
.LC1:
	.ascii	"Jabber detected in PHY\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	b44_check_phy, %function
b44_check_phy:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r2, .L39
	ldr	r3, [r0]
	ldr	r2, [r2]
	ldr	r1, .L39+4
	sub	sp, sp, #24
	tst	r3, r2
	mov	r4, r0
	ldr	r1, [r1]
	str	r1, [sp, #20]
	mov	r1,#0
	bne	.L34
	ldr	r3, .L39+8
	add	r2, sp, #4
	ldr	r1, [r3]
	bl	b44_readphy
	cmp	r0, #0
	beq	.L35
.L1:
	ldr	r3, .L39+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L36
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, pc}
.L35:
	ldr	r3, .L39+12
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #8
	bl	b44_readphy
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L39+16
	ldr	r2, [sp, #4]
	cmp	r2, r3
	beq	.L1
	ldr	r3, .L39+20
	ldr	r2, [sp, #8]
	ldr	r1, [r3]
	ldr	r3, .L39+24
	tst	r2, r1
	ldr	r1, [r3]
	ldr	r3, [r4]
	ldr	r6, .L39+28
	orrne	r3, r1, r3
	biceq	r3, r3, r1
	ldr	r1, .L39+32
	ldr	r0, [r6]
	ldr	r1, [r1]
	tst	r2, r1
	orrne	r3, r0, r3
	biceq	r3, r3, r0
	str	r3, [r4]
	ldr	r0, [r4, #4]
	bl	netif_carrier_ok
	cmp	r0, #0
	bne	.L12
	ldr	r3, .L39+36
	ldr	r2, [sp, #4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L12
	ldr	r5, .L39+40
	mov	r0, r4
	ldr	r1, [r5]
	bl	br32
	ldr	r3, [r6]
	ldr	r2, [r4]
	ldr	r1, [r5]
	tst	r2, r3
	ldr	r3, .L39+44
	ldr	r2, [r3]
	orrne	r2, r0, r2
	biceq	r2, r0, r2
	mov	r0, r4
	bl	bw32
	ldr	r3, .L39+48
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L37
.L16:
	ldr	r0, [r4, #4]
	bl	netif_carrier_on
	mov	r0, r4
	bl	b44_link_report
	ldr	r3, [sp, #4]
.L18:
	ldr	r2, .L39+52
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L38
.L20:
	ldr	r2, .L39+56
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L1
	ldr	r0, [r4, #4]
	ldr	r1, .L39+60
	bl	netdev_warn
	b	.L1
.L34:
	ldr	r2, .L39+24
	ldr	r0, [r0, #4]
	ldr	r2, [r2]
	orr	r3, r2, r3
	str	r3, [r4]
	bl	netif_carrier_ok
	cmp	r0, #0
	bne	.L1
	ldr	r5, .L39+40
	mov	r0, r4
	ldr	r1, [r5]
	bl	br32
	ldr	r3, .L39+28
	ldr	r2, [r4]
	ldr	r3, [r3]
	ldr	r1, [r5]
	tst	r2, r3
	ldr	r3, .L39+44
	ldr	r2, [r3]
	orrne	r2, r0, r2
	biceq	r2, r0, r2
	mov	r0, r4
	bl	bw32
	ldr	r0, [r4, #4]
	bl	netif_carrier_on
	mov	r0, r4
	bl	b44_link_report
	b	.L1
.L12:
	ldr	r0, [r4, #4]
	bl	netif_carrier_ok
	cmp	r0, #0
	beq	.L32
	ldr	r2, .L39+36
	ldr	r3, [sp, #4]
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L18
	ldr	r0, [r4, #4]
	bl	netif_carrier_off
	mov	r0, r4
	bl	b44_link_report
.L32:
	ldr	r3, [sp, #4]
	b	.L18
.L38:
	ldr	r1, .L39+64
	ldr	r0, [r4, #4]
	bl	netdev_warn
	ldr	r3, [sp, #4]
	b	.L20
.L37:
	ldr	r3, .L39+68
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #12
	bl	b44_readphy
	cmp	r0, #0
	bne	.L16
	ldr	r3, .L39+72
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #16
	bl	b44_readphy
	cmp	r0, #0
	bne	.L16
	mov	r0, r4
	ldr	r2, [sp, #16]
	ldr	r1, [sp, #12]
	bl	b44_set_flow_ctrl
	b	.L16
.L36:
	bl	__stack_chk_fail
.L40:
	.align	2
.L39:
	.word	B44_FLAG_EXTERNAL_PHY
	.word	.LC2
	.word	MII_BMSR
	.word	B44_MII_AUXCTRL
	.word	65535
	.word	MII_AUXCTRL_SPEED
	.word	B44_FLAG_100_BASE_T
	.word	B44_FLAG_FULL_DUPLEX
	.word	MII_AUXCTRL_DUPLEX
	.word	BMSR_LSTATUS
	.word	B44_TX_CTRL
	.word	TX_CTRL_DUPLEX
	.word	B44_FLAG_FORCE_LINK
	.word	BMSR_RFAULT
	.word	BMSR_JCD
	.word	.LC1
	.word	.LC0
	.word	MII_ADVERTISE
	.word	MII_LPA
	.size	b44_check_phy, .-b44_check_phy
	.comm	TX_CTRL_DUPLEX,4,4
	.comm	MII_LPA,4,4
	.comm	MII_BMSR,4,4
	.comm	MII_AUXCTRL_SPEED,4,4
	.comm	MII_AUXCTRL_DUPLEX,4,4
	.comm	MII_ADVERTISE,4,4
	.comm	BMSR_RFAULT,4,4
	.comm	BMSR_LSTATUS,4,4
	.comm	BMSR_JCD,4,4
	.comm	B44_TX_CTRL,4,4
	.comm	B44_MII_AUXCTRL,4,4
	.comm	B44_FLAG_FULL_DUPLEX,4,4
	.comm	B44_FLAG_FORCE_LINK,4,4
	.comm	B44_FLAG_EXTERNAL_PHY,4,4
	.comm	B44_FLAG_100_BASE_T,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
