	.file	"extr_bnx2.c_bnx2_write_phy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bnx2_write_phy, @function
bnx2_write_phy:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING[rip], eax
	jne	.L17
.L2:
	mov	edx, DWORD PTR BNX2_EMAC_MDIO_COMM_COMMAND_WRITE[rip]
	mov	eax, DWORD PTR 4[rbp]
	sal	ebx, 16
	mov	rdi, rbp
	or	edx, DWORD PTR BNX2_EMAC_MDIO_COMM_START_BUSY[rip]
	or	edx, DWORD PTR BNX2_EMAC_MDIO_COMM_DISEXT[rip]
	or	edx, r12d
	sal	eax, 21
	mov	esi, DWORD PTR BNX2_EMAC_MDIO_COMM[rip]
	mov	r12d, 50
	or	edx, ebx
	or	edx, eax
	call	BNX2_WR@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	sub	r12d, 1
	je	.L4
.L6:
	mov	edi, 10
	call	udelay@PLT
	mov	esi, DWORD PTR BNX2_EMAC_MDIO_COMM[rip]
	mov	rdi, rbp
	call	BNX2_RD@PLT
	mov	ebx, eax
	test	DWORD PTR BNX2_EMAC_MDIO_COMM_START_BUSY[rip], eax
	jne	.L3
	mov	edi, 5
	call	udelay@PLT
	and	ebx, DWORD PTR BNX2_EMAC_MDIO_COMM_START_BUSY[rip]
	mov	r12d, ebx
	jne	.L4
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING[rip], eax
	jne	.L18
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	r12d, DWORD PTR EBUSY[rip]
	mov	eax, DWORD PTR 0[rbp]
	neg	r12d
	test	DWORD PTR BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING[rip], eax
	je	.L1
.L18:
	mov	esi, DWORD PTR BNX2_EMAC_MDIO_MODE[rip]
	mov	rdi, rbp
	call	BNX2_RD@PLT
	mov	esi, DWORD PTR BNX2_EMAC_MDIO_MODE[rip]
	or	eax, DWORD PTR BNX2_EMAC_MDIO_MODE_AUTO_POLL[rip]
	mov	rdi, rbp
	mov	edx, eax
	call	BNX2_WR@PLT
	mov	esi, DWORD PTR BNX2_EMAC_MDIO_MODE[rip]
	mov	rdi, rbp
	call	BNX2_RD@PLT
	mov	edi, 40
	call	udelay@PLT
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	esi, DWORD PTR BNX2_EMAC_MDIO_MODE[rip]
	call	BNX2_RD@PLT
	mov	edx, DWORD PTR BNX2_EMAC_MDIO_MODE_AUTO_POLL[rip]
	mov	esi, DWORD PTR BNX2_EMAC_MDIO_MODE[rip]
	mov	rdi, rbp
	not	edx
	and	edx, eax
	call	BNX2_WR@PLT
	mov	esi, DWORD PTR BNX2_EMAC_MDIO_MODE[rip]
	mov	rdi, rbp
	call	BNX2_RD@PLT
	mov	edi, 40
	call	udelay@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	bnx2_write_phy, .-bnx2_write_phy
	.comm	EBUSY,4,4
	.comm	BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING,4,4
	.comm	BNX2_EMAC_MDIO_MODE_AUTO_POLL,4,4
	.comm	BNX2_EMAC_MDIO_MODE,4,4
	.comm	BNX2_EMAC_MDIO_COMM_START_BUSY,4,4
	.comm	BNX2_EMAC_MDIO_COMM_DISEXT,4,4
	.comm	BNX2_EMAC_MDIO_COMM_COMMAND_WRITE,4,4
	.comm	BNX2_EMAC_MDIO_COMM,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_bnx2.c_bnx2_write_phy.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bnx2_write_phy, %function
bnx2_write_phy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, .L19
	ldr	ip, [r0]
	ldr	r3, [r7]
	mov	r6, r0
	tst	ip, r3
	mov	r4, r1
	mov	r5, r2
	bne	.L17
.L2:
	ldr	r3, .L19+4
	ldr	r8, .L19+8
	ldr	r1, .L19+12
	ldr	r2, [r8]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r2
	orr	r3, r3, r1
	ldr	r2, [r6, #4]
	orr	r3, r3, r5
	ldr	r9, .L19+16
	orr	r3, r3, r4, lsl #16
	mov	r0, r6
	ldr	r1, [r9]
	orr	r2, r3, r2, lsl #21
	bl	BNX2_WR
	mov	r5, #50
	b	.L6
.L3:
	subs	r5, r5, #1
	beq	.L4
.L6:
	mov	r0, #10
	bl	udelay
	mov	r0, r6
	ldr	r1, [r9]
	bl	BNX2_RD
	ldr	r3, [r8]
	mov	r4, r0
	tst	r0, r3
	bne	.L3
	mov	r0, #5
	bl	udelay
	ldr	r3, [r8]
	ands	r4, r4, r3
	bne	.L4
	ldr	r3, [r7]
	ldr	r2, [r6]
	tst	r2, r3
	bne	.L18
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r3, .L19+20
	ldr	r2, [r6]
	ldr	r4, [r3]
	ldr	r3, [r7]
	rsb	r4, r4, #0
	tst	r2, r3
	beq	.L1
.L18:
	ldr	r5, .L19+24
	mov	r0, r6
	ldr	r1, [r5]
	bl	BNX2_RD
	mov	r2, r0
	ldr	r3, .L19+28
	ldr	r1, [r5]
	ldr	r3, [r3]
	mov	r0, r6
	orr	r2, r2, r3
	bl	BNX2_WR
	ldr	r1, [r5]
	mov	r0, r6
	bl	BNX2_RD
	mov	r0, #40
	bl	udelay
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	ldr	r8, .L19+24
	ldr	r1, [r8]
	bl	BNX2_RD
	mov	r3, r0
	ldr	r2, .L19+28
	ldr	r1, [r8]
	ldr	r2, [r2]
	mov	r0, r6
	bic	r2, r3, r2
	bl	BNX2_WR
	mov	r0, r6
	ldr	r1, [r8]
	bl	BNX2_RD
	mov	r0, #40
	bl	udelay
	b	.L2
.L20:
	.align	2
.L19:
	.word	BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING
	.word	BNX2_EMAC_MDIO_COMM_COMMAND_WRITE
	.word	BNX2_EMAC_MDIO_COMM_START_BUSY
	.word	BNX2_EMAC_MDIO_COMM_DISEXT
	.word	BNX2_EMAC_MDIO_COMM
	.word	EBUSY
	.word	BNX2_EMAC_MDIO_MODE
	.word	BNX2_EMAC_MDIO_MODE_AUTO_POLL
	.size	bnx2_write_phy, .-bnx2_write_phy
	.comm	EBUSY,4,4
	.comm	BNX2_PHY_FLAG_INT_MODE_AUTO_POLLING,4,4
	.comm	BNX2_EMAC_MDIO_MODE_AUTO_POLL,4,4
	.comm	BNX2_EMAC_MDIO_MODE,4,4
	.comm	BNX2_EMAC_MDIO_COMM_START_BUSY,4,4
	.comm	BNX2_EMAC_MDIO_COMM_DISEXT,4,4
	.comm	BNX2_EMAC_MDIO_COMM_COMMAND_WRITE,4,4
	.comm	BNX2_EMAC_MDIO_COMM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
