	.file	"extr_vscphy.c_vsc8501_reset.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vsc8501_reset, @function
vsc8501_reset:
.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
	mov	esi, DWORD PTR VSC8501_EXTCTL1_REG[rip]
	call	vscphy_read@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	ebx, eax
	call	mii_contype_is_rgmii@PLT
	test	rax, rax
	je	.L2
	or	ebx, DWORD PTR VSC8501_EXTCTL1_RGMII_MODE[rip]
	mov	edx, ebx
.L3:
	mov	esi, DWORD PTR VSC8501_EXTCTL1_REG[rip]
	mov	rdi, rbp
	call	vscphy_write@PLT
	lea	rdi, 4[rbp]
	call	mii_phy_reset@PLT
	mov	edi, DWORD PTR 0[rbp]
	call	mii_contype_is_rgmii@PLT
	test	rax, rax
	jne	.L7
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR VSC8501_EXTCTL1_RGMII_MODE[rip]
	not	edx
	and	edx, ebx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	vsc8501_setup_rgmii@PLT
	.cfi_endproc
.LFE0:
	.size	vsc8501_reset, .-vsc8501_reset
	.comm	VSC8501_EXTCTL1_RGMII_MODE,4,4
	.comm	VSC8501_EXTCTL1_REG,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_vscphy.c_vsc8501_reset.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vsc8501_reset, %function
vsc8501_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L7
	mov	r4, r0
	ldr	r1, [r6]
	bl	vscphy_read
	mov	r5, r0
	ldr	r0, [r4]
	bl	mii_contype_is_rgmii
	ldr	r3, .L7+4
	cmp	r0, #0
	ldr	r2, [r3]
	ldr	r1, [r6]
	orrne	r2, r5, r2
	biceq	r2, r5, r2
	mov	r0, r4
	bl	vscphy_write
	add	r0, r4, #4
	bl	mii_phy_reset
	ldr	r0, [r4]
	bl	mii_contype_is_rgmii
	cmp	r0, #0
	popeq	{r4, r5, r6, pc}
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	vsc8501_setup_rgmii
.L8:
	.align	2
.L7:
	.word	VSC8501_EXTCTL1_REG
	.word	VSC8501_EXTCTL1_RGMII_MODE
	.size	vsc8501_reset, .-vsc8501_reset
	.comm	VSC8501_EXTCTL1_RGMII_MODE,4,4
	.comm	VSC8501_EXTCTL1_REG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
