	.file	"extr_de4x5.c_de4x5_reset_phy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	de4x5_reset_phy, @function
de4x5_reset_phy:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	netdev_priv@PLT
	cmp	QWORD PTR 48[rax], 0
	mov	rbx, rax
	jne	.L2
	mov	rax, QWORD PTR [rax]
	mov	rdi, QWORD PTR 32[rbx]
	lea	rax, [rax+rax*2]
	lea	rax, [rdi+rax*8]
	cmp	QWORD PTR 16[rax], 0
	je	.L11
	cmp	QWORD PTR 8[rbx], 0
	jns	.L8
.L6:
	cmp	QWORD PTR 24[rbx], 0
	jne	.L16
.L11:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	cmp	QWORD PTR 8[rax], 0
	js	.L17
.L8:
	cmp	QWORD PTR 24[rbx], 0
	je	.L11
.L19:
	mov	edx, DWORD PTR MII_CR_RST[rip]
	mov	esi, DWORD PTR MII_CR[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	mov	r8d, 500
	xor	ecx, ecx
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	test_mii_reg@PLT
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rax, QWORD PTR [rbx]
	mov	rsi, QWORD PTR 32[rbx]
	lea	rax, [rax+rax*2]
	lea	rax, [rsi+rax*8]
	mov	rsi, QWORD PTR 8[rax]
	test	rsi, rsi
	jne	.L18
	mov	rsi, QWORD PTR 40[rbx]
	test	rsi, rsi
	je	.L6
	mov	rdi, rbp
	call	srom_exec@PLT
	mov	rsi, QWORD PTR 40[rbx]
	mov	rdi, rbp
	call	srom_exec@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR 32[rbx]
	mov	ecx, DWORD PTR DE4X5_MII[rip]
	mov	esi, DWORD PTR MII_CR[rip]
	lea	rax, [rax+rax*2]
	mov	edi, DWORD PTR MII_CR_RST[rip]
	lea	rax, [rdx+rax*8]
	mov	edx, DWORD PTR [rax]
	call	mii_wr@PLT
	cmp	QWORD PTR 24[rbx], 0
	je	.L11
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbp
	call	srom_exec@PLT
	mov	rax, QWORD PTR [rbx]
	mov	rcx, QWORD PTR 32[rbx]
	mov	rdi, rbp
	lea	rax, [rax+rax*2]
	lea	rax, [rcx+rax*8]
	mov	rsi, QWORD PTR 8[rax]
	call	srom_exec@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	de4x5_reset_phy, .-de4x5_reset_phy
	.comm	PHY_HARD_RESET,4,4
	.comm	MII_CR_RST,4,4
	.comm	MII_CR,4,4
	.comm	DE4X5_MII,4,4
	.comm	DC21140,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_de4x5.c_de4x5_reset_phy.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	de4x5_reset_phy, %function
de4x5_reset_phy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	sub	sp, sp, #12
	mov	r5, r0
	bl	netdev_priv
	ldr	r3, [r0, #24]
	mov	r4, r0
	cmp	r3, #0
	bne	.L2
	ldr	r3, [r0]
	ldr	r2, [r0, #16]
	add	r3, r3, r3, lsl #1
	add	r3, r2, r3, lsl #2
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L3
.L7:
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L2:
	ldr	r3, [r0, #4]
	cmp	r3, #0
	blt	.L21
.L8:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L7
.L22:
	mov	r1, #500
	ldr	r3, .L24
	ldr	r2, .L24+4
	str	r1, [sp]
	ldr	r1, [r3]
	mov	r0, r5
	mov	r3, #0
	ldr	r2, [r2]
	bl	test_mii_reg
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L3:
	ldr	r3, [r0, #4]
	cmp	r3, #0
	bge	.L8
.L6:
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [r4]
	ldr	r2, [r4, #16]
	ldr	ip, .L24+8
	ldr	r1, .L24
	ldr	r0, .L24+4
	add	r3, r3, r3, lsl #1
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, [r1]
	ldr	r3, [ip]
	ldr	r0, [r0]
	bl	mii_wr
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L7
	b	.L22
.L21:
	ldr	r3, [r4]
	ldr	r2, [r4, #16]
	add	r3, r3, r3, lsl #1
	add	r3, r2, r3, lsl #2
	ldr	r1, [r3, #4]
	cmp	r1, #0
	bne	.L23
	ldr	r1, [r4, #20]
	cmp	r1, #0
	beq	.L6
	mov	r0, r5
	bl	srom_exec
	mov	r0, r5
	ldr	r1, [r4, #20]
	bl	srom_exec
	b	.L6
.L23:
	mov	r0, r5
	bl	srom_exec
	ldr	r3, [r4]
	ldr	r2, [r4, #16]
	add	r3, r3, r3, lsl #1
	add	r3, r2, r3, lsl #2
	mov	r0, r5
	ldr	r1, [r3, #4]
	bl	srom_exec
	b	.L6
.L25:
	.align	2
.L24:
	.word	MII_CR
	.word	MII_CR_RST
	.word	DE4X5_MII
	.size	de4x5_reset_phy, .-de4x5_reset_phy
	.comm	PHY_HARD_RESET,4,4
	.comm	MII_CR_RST,4,4
	.comm	MII_CR,4,4
	.comm	DE4X5_MII,4,4
	.comm	DC21140,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
