	.file	"extr_if_ale.c_ale_miibus_writereg.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"phy write timeout : %d\n"
	.text
	.p2align 4
	.type	ale_miibus_writereg, @function
ale_miibus_writereg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	device_get_softc@PLT
	mov	ecx, DWORD PTR MDIO_DATA_SHIFT[rip]
	and	r13d, DWORD PTR MDIO_DATA_MASK[rip]
	mov	edi, r12d
	mov	ebx, DWORD PTR MDIO_OP_EXECUTE[rip]
	or	ebx, DWORD PTR MDIO_OP_WRITE[rip]
	mov	rbp, rax
	sal	r13d, cl
	or	ebx, DWORD PTR MDIO_SUP_PREAMBLE[rip]
	or	ebx, DWORD PTR MDIO_CLK_25_4[rip]
	call	MDIO_REG_ADDR@PLT
	or	ebx, r13d
	mov	esi, DWORD PTR ALE_MDIO[rip]
	mov	rdi, rbp
	mov	edx, ebx
	or	edx, eax
	call	CSR_WRITE_4@PLT
	mov	ebx, DWORD PTR ALE_PHY_TIMEOUT[rip]
	test	ebx, ebx
	jg	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L11:
	sub	ebx, 1
	je	.L6
.L5:
	mov	edi, 5
	call	DELAY@PLT
	mov	esi, DWORD PTR ALE_MDIO[rip]
	mov	rdi, rbp
	call	CSR_READ_4@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR MDIO_OP_EXECUTE[rip]
	or	eax, DWORD PTR MDIO_OP_BUSY[rip]
	test	eax, r8d
	jne	.L11
.L4:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L2:
	.cfi_restore_state
	jne	.L4
.L6:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	call	device_printf@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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	ale_miibus_writereg, .-ale_miibus_writereg
	.comm	MDIO_SUP_PREAMBLE,4,4
	.comm	MDIO_OP_WRITE,4,4
	.comm	MDIO_OP_EXECUTE,4,4
	.comm	MDIO_OP_BUSY,4,4
	.comm	MDIO_DATA_SHIFT,4,4
	.comm	MDIO_DATA_MASK,4,4
	.comm	MDIO_CLK_25_4,4,4
	.comm	ALE_PHY_TIMEOUT,4,4
	.comm	ALE_MDIO,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_if_ale.c_ale_miibus_writereg.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"phy write timeout : %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ale_miibus_writereg, %function
ale_miibus_writereg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r3
	mov	r7, r2
	bl	device_get_softc
	ldr	r8, .L12
	ldr	r1, .L12+4
	ldr	r2, .L12+8
	ldr	r1, [r1]
	ldr	r4, [r8]
	ldr	r2, [r2]
	ldr	r3, .L12+12
	orr	r4, r4, r1
	ldr	r1, .L12+16
	ldr	r3, [r3]
	orr	r4, r4, r2
	ldr	r2, .L12+20
	ldr	r1, [r1]
	and	r3, r3, r6
	ldr	r2, [r2]
	ldr	r6, .L12+24
	orr	r4, r4, r1
	mov	r5, r0
	mov	r0, r7
	orr	r4, r4, r3, lsl r2
	ldr	r9, [r6]
	bl	MDIO_REG_ADDR
	mov	r1, r9
	orr	r2, r4, r0
	mov	r0, r5
	bl	CSR_WRITE_4
	ldr	r3, .L12+28
	ldr	r4, [r3]
	cmp	r4, #0
	ble	.L2
	ldr	r9, .L12+32
	b	.L5
.L11:
	subs	r4, r4, #1
	beq	.L6
.L5:
	mov	r0, #5
	bl	DELAY
	ldr	r1, [r6]
	mov	r0, r5
	bl	CSR_READ_4
	ldr	r3, [r8]
	ldr	r1, [r9]
	orr	r3, r3, r1
	tst	r3, r0
	bne	.L11
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	bne	.L4
.L6:
	mov	r2, r7
	ldr	r0, [r5]
	ldr	r1, .L12+36
	bl	device_printf
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L13:
	.align	2
.L12:
	.word	MDIO_OP_EXECUTE
	.word	MDIO_OP_WRITE
	.word	MDIO_SUP_PREAMBLE
	.word	MDIO_DATA_MASK
	.word	MDIO_CLK_25_4
	.word	MDIO_DATA_SHIFT
	.word	ALE_MDIO
	.word	ALE_PHY_TIMEOUT
	.word	MDIO_OP_BUSY
	.word	.LC0
	.size	ale_miibus_writereg, .-ale_miibus_writereg
	.comm	MDIO_SUP_PREAMBLE,4,4
	.comm	MDIO_OP_WRITE,4,4
	.comm	MDIO_OP_EXECUTE,4,4
	.comm	MDIO_OP_BUSY,4,4
	.comm	MDIO_DATA_SHIFT,4,4
	.comm	MDIO_DATA_MASK,4,4
	.comm	MDIO_CLK_25_4,4,4
	.comm	ALE_PHY_TIMEOUT,4,4
	.comm	ALE_MDIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
