	.file	"extr_marvell.c_marvell_config_aneg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	marvell_config_aneg, @function
marvell_config_aneg:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR BMCR_RESET[rip]
	mov	esi, DWORD PTR MII_BMCR[rip]
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	call	phy_write@PLT
	test	eax, eax
	js	.L1
	mov	edx, 31
	mov	esi, 29
	mov	rdi, rbp
	call	phy_write@PLT
	test	eax, eax
	js	.L1
	mov	edx, 8204
	mov	esi, 30
	mov	rdi, rbp
	call	phy_write@PLT
	test	eax, eax
	js	.L1
	mov	edx, 5
	mov	esi, 29
	mov	rdi, rbp
	call	phy_write@PLT
	test	eax, eax
	js	.L1
	xor	edx, edx
	mov	esi, 30
	mov	rdi, rbp
	call	phy_write@PLT
	test	eax, eax
	js	.L1
	mov	edx, 256
	mov	esi, 30
	mov	rdi, rbp
	call	phy_write@PLT
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR MII_M1011_PHY_SCR_AUTO_CROSS[rip]
	mov	esi, DWORD PTR MII_M1011_PHY_SCR[rip]
	mov	rdi, rbp
	call	phy_write@PLT
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR MII_M1111_PHY_LED_DIRECT[rip]
	mov	esi, DWORD PTR MII_M1111_PHY_LED_CONTROL[rip]
	mov	rdi, rbp
	call	phy_write@PLT
	test	eax, eax
	js	.L1
	mov	rdi, rbp
	call	genphy_config_aneg@PLT
	test	eax, eax
	js	.L1
	mov	rcx, QWORD PTR AUTONEG_ENABLE[rip]
	xor	eax, eax
	cmp	QWORD PTR 0[rbp], rcx
	je	.L1
	mov	esi, DWORD PTR MII_BMCR[rip]
	mov	rdi, rbp
	call	phy_read@PLT
	test	eax, eax
	js	.L1
	or	eax, DWORD PTR BMCR_RESET[rip]
	mov	esi, DWORD PTR MII_BMCR[rip]
	mov	rdi, rbp
	mov	edx, eax
	call	phy_write@PLT
	mov	edx, 0
	test	eax, eax
	cmovg	eax, edx
.L1:
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	marvell_config_aneg, .-marvell_config_aneg
	.comm	MII_M1111_PHY_LED_DIRECT,4,4
	.comm	MII_M1111_PHY_LED_CONTROL,4,4
	.comm	MII_M1011_PHY_SCR_AUTO_CROSS,4,4
	.comm	MII_M1011_PHY_SCR,4,4
	.comm	MII_BMCR,4,4
	.comm	BMCR_RESET,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_marvell.c_marvell_config_aneg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	marvell_config_aneg, %function
marvell_config_aneg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L6
	ldr	r5, .L6+4
	ldr	r2, [r6]
	ldr	r1, [r5]
	mov	r4, r0
	bl	phy_write
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r2, #31
	mov	r1, #29
	mov	r0, r4
	bl	phy_write
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r1, #30
	mov	r0, r4
	ldr	r2, .L6+8
	bl	phy_write
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r2, #5
	mov	r1, #29
	mov	r0, r4
	bl	phy_write
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r2, #0
	mov	r1, #30
	mov	r0, r4
	bl	phy_write
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r2, #256
	mov	r1, #30
	mov	r0, r4
	bl	phy_write
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	ldr	r3, .L6+12
	ldr	r2, .L6+16
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	phy_write
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	ldr	r3, .L6+20
	ldr	r2, .L6+24
	mov	r0, r4
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	phy_write
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	mov	r0, r4
	bl	genphy_config_aneg
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	ldr	r3, .L6+28
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L3
	mov	r0, r4
	ldr	r1, [r5]
	bl	phy_read
	cmp	r0, #0
	poplt	{r4, r5, r6, pc}
	ldr	r2, [r6]
	ldr	r1, [r5]
	orr	r2, r0, r2
	mov	r0, r4
	bl	phy_write
	and	r0, r0, r0, asr #31
	pop	{r4, r5, r6, pc}
.L3:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L7:
	.align	2
.L6:
	.word	BMCR_RESET
	.word	MII_BMCR
	.word	8204
	.word	MII_M1011_PHY_SCR
	.word	MII_M1011_PHY_SCR_AUTO_CROSS
	.word	MII_M1111_PHY_LED_CONTROL
	.word	MII_M1111_PHY_LED_DIRECT
	.word	AUTONEG_ENABLE
	.size	marvell_config_aneg, .-marvell_config_aneg
	.comm	MII_M1111_PHY_LED_DIRECT,4,4
	.comm	MII_M1111_PHY_LED_CONTROL,4,4
	.comm	MII_M1011_PHY_SCR_AUTO_CROSS,4,4
	.comm	MII_M1011_PHY_SCR,4,4
	.comm	MII_BMCR,4,4
	.comm	BMCR_RESET,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
