	.file	"extr_atl1.c_atl1_nway_reset.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	atl1_nway_reset, @function
atl1_nway_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	netdev_priv@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	netif_running@PLT
	test	rax, rax
	jne	.L17
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdi, r12
	call	atl1_down@PLT
	mov	eax, DWORD PTR [r12]
	cmp	eax, DWORD PTR MEDIA_TYPE_AUTO_SENSOR[rip]
	mov	edx, DWORD PTR MII_CR_RESET[rip]
	je	.L4
	cmp	eax, DWORD PTR MEDIA_TYPE_1000M_FULL[rip]
	je	.L4
	cmp	eax, 129
	je	.L7
	cmp	eax, 130
	je	.L8
	cmp	eax, 128
	je	.L18
	or	edx, DWORD PTR MII_CR_SPEED_10[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	or	edx, DWORD PTR MII_CR_AUTO_NEG_EN[rip]
.L6:
	mov	esi, DWORD PTR MII_BMCR[rip]
	mov	rdi, r12
	call	atl1_write_phy_reg@PLT
	mov	rdi, r12
	call	atl1_up@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	or	edx, DWORD PTR MII_CR_SPEED_100[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L18:
	or	edx, DWORD PTR MII_CR_FULL_DUPLEX[rip]
	or	edx, DWORD PTR MII_CR_SPEED_10[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	or	edx, DWORD PTR MII_CR_FULL_DUPLEX[rip]
	or	edx, DWORD PTR MII_CR_SPEED_100[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	atl1_nway_reset, .-atl1_nway_reset
	.comm	MII_CR_SPEED_100,4,4
	.comm	MII_CR_SPEED_10,4,4
	.comm	MII_CR_RESET,4,4
	.comm	MII_CR_FULL_DUPLEX,4,4
	.comm	MII_CR_AUTO_NEG_EN,4,4
	.comm	MII_BMCR,4,4
	.comm	MEDIA_TYPE_AUTO_SENSOR,4,4
	.comm	MEDIA_TYPE_1000M_FULL,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_atl1.c_atl1_nway_reset.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	atl1_nway_reset, %function
atl1_nway_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	bl	netdev_priv
	mov	r4, r0
	mov	r0, r5
	bl	netif_running
	cmp	r0, #0
	bne	.L17
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L17:
	mov	r0, r4
	bl	atl1_down
	ldr	r2, .L20
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L18
	ldr	r1, .L20+4
	ldr	r2, .L20+8
	ldr	r1, [r1]
	ldr	r2, [r2]
	cmp	r3, r1
	beq	.L4
	cmp	r3, #129
	beq	.L7
	cmp	r3, #130
	beq	.L8
	cmp	r3, #128
	beq	.L19
	ldr	r3, .L20+12
	ldr	r3, [r3]
	orr	r2, r2, r3
	b	.L6
.L18:
	ldr	r3, .L20+8
	ldr	r2, [r3]
.L4:
	ldr	r3, .L20+16
	ldr	r3, [r3]
	orr	r2, r2, r3
.L6:
	ldr	r3, .L20+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	atl1_write_phy_reg
	mov	r0, r4
	bl	atl1_up
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L7:
	ldr	r3, .L20+24
	ldr	r3, [r3]
	orr	r2, r2, r3
	b	.L6
.L19:
	ldr	r3, .L20+28
	ldr	r1, .L20+12
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r2, r2, r3
	orr	r2, r2, r1
	b	.L6
.L8:
	ldr	r3, .L20+28
	ldr	r1, .L20+24
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r2, r2, r3
	orr	r2, r2, r1
	b	.L6
.L21:
	.align	2
.L20:
	.word	MEDIA_TYPE_AUTO_SENSOR
	.word	MEDIA_TYPE_1000M_FULL
	.word	MII_CR_RESET
	.word	MII_CR_SPEED_10
	.word	MII_CR_AUTO_NEG_EN
	.word	MII_BMCR
	.word	MII_CR_SPEED_100
	.word	MII_CR_FULL_DUPLEX
	.size	atl1_nway_reset, .-atl1_nway_reset
	.comm	MII_CR_SPEED_100,4,4
	.comm	MII_CR_SPEED_10,4,4
	.comm	MII_CR_RESET,4,4
	.comm	MII_CR_FULL_DUPLEX,4,4
	.comm	MII_CR_AUTO_NEG_EN,4,4
	.comm	MII_BMCR,4,4
	.comm	MEDIA_TYPE_AUTO_SENSOR,4,4
	.comm	MEDIA_TYPE_1000M_FULL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
