	.file	"extr_netsec.c_netsec_phy_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	netsec_phy_write, @function
netsec_phy_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	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
	mov	ebx, edx
	mov	edx, ecx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r12, QWORD PTR [rdi]
	mov	esi, DWORD PTR GMAC_REG_GDR[rip]
	mov	rdi, r12
	call	netsec_mac_write@PLT
	test	rax, rax
	je	.L2
.L6:
	mov	r12d, DWORD PTR ETIMEDOUT[rip]
	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
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	ecx, DWORD PTR NETSEC_GMAC_GAR_REG_SHIFT_GR[rip]
	mov	eax, DWORD PTR NETSEC_GMAC_GAR_REG_GW[rip]
	mov	edx, r13d
	or	eax, DWORD PTR NETSEC_GMAC_GAR_REG_GB[rip]
	mov	edi, DWORD PTR [r12]
	sal	ebx, cl
	mov	ecx, DWORD PTR NETSEC_GMAC_GAR_REG_SHIFT_PA[rip]
	or	ebx, eax
	sal	edx, cl
	or	ebx, edx
	call	netsec_clk_type@PLT
	mov	ecx, DWORD PTR GMAC_REG_SHIFT_CR_GAR[rip]
	mov	esi, DWORD PTR GMAC_REG_GAR[rip]
	mov	rdi, r12
	sal	eax, cl
	or	eax, ebx
	mov	edx, eax
	call	netsec_mac_write@PLT
	test	rax, rax
	jne	.L6
	mov	edx, DWORD PTR NETSEC_GMAC_GAR_REG_GB[rip]
	mov	esi, DWORD PTR GMAC_REG_GAR[rip]
	mov	rdi, r12
	call	netsec_mac_wait_while_busy@PLT
	mov	edx, DWORD PTR MII_PHYSID1[rip]
	mov	esi, r13d
	mov	rdi, rbp
	mov	r12d, eax
	call	netsec_phy_read@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.cfi_endproc
.LFE0:
	.size	netsec_phy_write, .-netsec_phy_write
	.comm	NETSEC_GMAC_GAR_REG_SHIFT_PA,4,4
	.comm	NETSEC_GMAC_GAR_REG_SHIFT_GR,4,4
	.comm	NETSEC_GMAC_GAR_REG_GW,4,4
	.comm	NETSEC_GMAC_GAR_REG_GB,4,4
	.comm	MII_PHYSID1,4,4
	.comm	GMAC_REG_SHIFT_CR_GAR,4,4
	.comm	GMAC_REG_GDR,4,4
	.comm	GMAC_REG_GAR,4,4
	.comm	ETIMEDOUT,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_netsec.c_netsec_phy_write.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	netsec_phy_write, %function
netsec_phy_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r7, [r0]
	mov	r6, r1
	ldr	r1, .L8
	mov	r4, r0
	mov	r5, r2
	mov	r0, r7
	mov	r2, r3
	ldr	r1, [r1]
	bl	netsec_mac_write
	cmp	r0, #0
	beq	.L2
.L6:
	ldr	r3, .L8+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r3, .L8+8
	ldr	r8, .L8+12
	ldr	r1, .L8+16
	ldr	r2, [r8]
	ldr	r3, [r3]
	ldr	r0, .L8+20
	ldr	r1, [r1]
	orr	r3, r3, r2
	ldr	r9, .L8+24
	ldr	r2, [r0]
	orr	r5, r3, r5, lsl r1
	ldr	r0, [r7]
	orr	r5, r5, r6, lsl r2
	ldr	r10, [r9]
	bl	netsec_clk_type
	mov	r2, r0
	ldr	r3, .L8+28
	mov	r1, r10
	ldr	r3, [r3]
	mov	r0, r7
	orr	r2, r5, r2, lsl r3
	bl	netsec_mac_write
	cmp	r0, #0
	bne	.L6
	ldr	r2, [r8]
	ldr	r1, [r9]
	mov	r0, r7
	bl	netsec_mac_wait_while_busy
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	ldr	r2, .L8+32
	mov	r1, r6
	ldr	r2, [r2]
	bl	netsec_phy_read
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	.align	2
.L8:
	.word	GMAC_REG_GDR
	.word	ETIMEDOUT
	.word	NETSEC_GMAC_GAR_REG_GW
	.word	NETSEC_GMAC_GAR_REG_GB
	.word	NETSEC_GMAC_GAR_REG_SHIFT_GR
	.word	NETSEC_GMAC_GAR_REG_SHIFT_PA
	.word	GMAC_REG_GAR
	.word	GMAC_REG_SHIFT_CR_GAR
	.word	MII_PHYSID1
	.size	netsec_phy_write, .-netsec_phy_write
	.comm	NETSEC_GMAC_GAR_REG_SHIFT_PA,4,4
	.comm	NETSEC_GMAC_GAR_REG_SHIFT_GR,4,4
	.comm	NETSEC_GMAC_GAR_REG_GW,4,4
	.comm	NETSEC_GMAC_GAR_REG_GB,4,4
	.comm	MII_PHYSID1,4,4
	.comm	GMAC_REG_SHIFT_CR_GAR,4,4
	.comm	GMAC_REG_GDR,4,4
	.comm	GMAC_REG_GAR,4,4
	.comm	ETIMEDOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
