	.file	"extr_fman_memac_mii_acc.c_write_phy_reg_1g.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	write_phy_reg_1g, @function
write_phy_reg_1g:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	lea	rbx, 4[rdi]
	mov	rdi, rbx
	call	ioread32be@PLT
	mov	edi, DWORD PTR MDIO_CFG_CLK_DIV_MASK[rip]
	mov	rsi, rbx
	or	edi, DWORD PTR MDIO_CFG_HOLD_MASK[rip]
	and	edi, eax
	call	iowrite32be@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, 1
	call	udelay@PLT
.L2:
	mov	rdi, rbx
	call	ioread32be@PLT
	test	DWORD PTR MDIO_CFG_BSY[rip], eax
	jne	.L3
	mov	ecx, DWORD PTR MDIO_CTL_PHY_ADDR_SHIFT[rip]
	mov	edi, r12d
	lea	rsi, 8[rbp]
	sal	edi, cl
	or	edi, r14d
	call	iowrite32be@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, 1
	call	udelay@PLT
.L4:
	mov	rdi, rbx
	call	ioread32be@PLT
	test	DWORD PTR MDIO_CFG_BSY[rip], eax
	jne	.L5
	mov	rsi, rbp
	mov	edi, r13d
	call	iowrite32be@PLT
	xor	eax, eax
	call	wmb@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, 1
	call	udelay@PLT
.L6:
	mov	rdi, rbp
	call	ioread32be@PLT
	test	DWORD PTR MDIO_DATA_BSY[rip], eax
	jne	.L7
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	write_phy_reg_1g, .-write_phy_reg_1g
	.comm	MDIO_DATA_BSY,4,4
	.comm	MDIO_CTL_PHY_ADDR_SHIFT,4,4
	.comm	MDIO_CFG_HOLD_MASK,4,4
	.comm	MDIO_CFG_CLK_DIV_MASK,4,4
	.comm	MDIO_CFG_BSY,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_fman_memac_mii_acc.c_write_phy_reg_1g.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_phy_reg_1g, %function
write_phy_reg_1g:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	add	r4, r0, #4
	mov	r6, r0
	mov	r0, r4
	mov	r9, r1
	mov	r8, r2
	mov	r7, r3
	bl	ioread32be
	ldr	r3, .L11
	ldr	r2, .L11+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r1, r4
	orr	r3, r3, r2
	and	r0, r0, r3
	bl	iowrite32be
	ldr	r5, .L11+8
	b	.L2
.L3:
	mov	r0, #1
	bl	udelay
.L2:
	mov	r0, r4
	bl	ioread32be
	ldr	ip, [r5]
	tst	r0, ip
	bne	.L3
	ldr	r3, .L11+12
	add	r1, r6, #8
	ldr	r0, [r3]
	orr	r0, r8, r9, lsl r0
	bl	iowrite32be
	b	.L4
.L5:
	mov	r0, #1
	bl	udelay
.L4:
	mov	r0, r4
	bl	ioread32be
	ldr	r2, [r5]
	tst	r0, r2
	bne	.L5
	mov	r0, r7
	mov	r1, r6
	bl	iowrite32be
	ldr	r4, .L11+16
	bl	wmb
.L6:
	mov	r0, r6
	bl	ioread32be
	ldr	r3, [r4]
	tst	r0, r3
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r0, #1
	bl	udelay
	b	.L6
.L12:
	.align	2
.L11:
	.word	MDIO_CFG_CLK_DIV_MASK
	.word	MDIO_CFG_HOLD_MASK
	.word	MDIO_CFG_BSY
	.word	MDIO_CTL_PHY_ADDR_SHIFT
	.word	MDIO_DATA_BSY
	.size	write_phy_reg_1g, .-write_phy_reg_1g
	.comm	MDIO_DATA_BSY,4,4
	.comm	MDIO_CTL_PHY_ADDR_SHIFT,4,4
	.comm	MDIO_CFG_HOLD_MASK,4,4
	.comm	MDIO_CFG_CLK_DIV_MASK,4,4
	.comm	MDIO_CFG_BSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
