	.file	"extr_hw.c_alx_stop_mac.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	alx_stop_mac, @function
alx_stop_mac:
.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 ALX_RXQ0[rip]
	call	alx_read_mem32@PLT
	mov	edx, DWORD PTR ALX_RXQ0_EN[rip]
	mov	esi, DWORD PTR ALX_RXQ0[rip]
	mov	rdi, rbp
	not	edx
	and	edx, eax
	call	alx_write_mem32@PLT
	mov	esi, DWORD PTR ALX_TXQ0[rip]
	mov	rdi, rbp
	call	alx_read_mem32@PLT
	mov	edx, DWORD PTR ALX_TXQ0_EN[rip]
	mov	esi, DWORD PTR ALX_TXQ0[rip]
	mov	rdi, rbp
	not	edx
	and	edx, eax
	call	alx_write_mem32@PLT
	mov	edi, 40
	call	udelay@PLT
	mov	edx, DWORD PTR ALX_MAC_CTRL_RX_EN[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR ALX_MAC_CTRL_TX_EN[rip]
	not	edx
	and	edx, DWORD PTR 0[rbp]
	mov	DWORD PTR 0[rbp], edx
	mov	esi, DWORD PTR ALX_MAC_CTRL[rip]
	call	alx_write_mem32@PLT
	cmp	QWORD PTR ALX_DMA_MAC_RST_TO[rip], 0
	jle	.L2
	xor	ebx, ebx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edi, 10
	add	rbx, 1
	call	udelay@PLT
	cmp	QWORD PTR ALX_DMA_MAC_RST_TO[rip], rbx
	jle	.L2
.L4:
	mov	esi, DWORD PTR ALX_MAC_STS[rip]
	mov	rdi, rbp
	call	alx_read_mem32@PLT
	and	eax, DWORD PTR ALX_MAC_STS_IDLE[rip]
	jne	.L11
	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	eax, DWORD PTR ETIMEDOUT[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	alx_stop_mac, .-alx_stop_mac
	.comm	ETIMEDOUT,4,4
	.comm	ALX_TXQ0_EN,4,4
	.comm	ALX_TXQ0,4,4
	.comm	ALX_RXQ0_EN,4,4
	.comm	ALX_RXQ0,4,4
	.comm	ALX_MAC_STS_IDLE,4,4
	.comm	ALX_MAC_STS,4,4
	.comm	ALX_MAC_CTRL_TX_EN,4,4
	.comm	ALX_MAC_CTRL_RX_EN,4,4
	.comm	ALX_MAC_CTRL,4,4
	.comm	ALX_DMA_MAC_RST_TO,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_hw.c_alx_stop_mac.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	alx_stop_mac, %function
alx_stop_mac:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L11
	mov	r5, r0
	ldr	r1, [r6]
	bl	alx_read_mem32
	ldr	r3, .L11+4
	ldr	r4, .L11+8
	ldr	r2, [r3]
	ldr	r1, [r6]
	bic	r2, r0, r2
	mov	r0, r5
	bl	alx_write_mem32
	ldr	r1, [r4]
	mov	r0, r5
	bl	alx_read_mem32
	mov	r3, r0
	ldr	r2, .L11+12
	ldr	r1, [r4]
	ldr	r2, [r2]
	mov	r0, r5
	bic	r2, r3, r2
	bl	alx_write_mem32
	mov	r0, #40
	bl	udelay
	ldr	r2, .L11+16
	ldr	r3, .L11+20
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r5]
	orr	r3, r3, r1
	bic	r2, r2, r3
	ldr	r3, .L11+24
	str	r2, [r5]
	ldr	r6, .L11+28
	ldr	r1, [r3]
	mov	r0, r5
	bl	alx_write_mem32
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L2
	mov	r4, #0
	ldr	r8, .L11+32
	ldr	r7, .L11+36
.L4:
	mov	r0, r5
	ldr	r1, [r8]
	bl	alx_read_mem32
	ldr	r3, [r7]
	add	r4, r4, #1
	ands	r0, r0, r3
	popeq	{r4, r5, r6, r7, r8, pc}
	mov	r0, #10
	bl	udelay
	ldr	r3, [r6]
	cmp	r3, r4
	bgt	.L4
.L2:
	ldr	r3, .L11+40
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	ALX_RXQ0
	.word	ALX_RXQ0_EN
	.word	ALX_TXQ0
	.word	ALX_TXQ0_EN
	.word	ALX_MAC_CTRL_TX_EN
	.word	ALX_MAC_CTRL_RX_EN
	.word	ALX_MAC_CTRL
	.word	ALX_DMA_MAC_RST_TO
	.word	ALX_MAC_STS
	.word	ALX_MAC_STS_IDLE
	.word	ETIMEDOUT
	.size	alx_stop_mac, .-alx_stop_mac
	.comm	ETIMEDOUT,4,4
	.comm	ALX_TXQ0_EN,4,4
	.comm	ALX_TXQ0,4,4
	.comm	ALX_RXQ0_EN,4,4
	.comm	ALX_RXQ0,4,4
	.comm	ALX_MAC_STS_IDLE,4,4
	.comm	ALX_MAC_STS,4,4
	.comm	ALX_MAC_CTRL_TX_EN,4,4
	.comm	ALX_MAC_CTRL_RX_EN,4,4
	.comm	ALX_MAC_CTRL,4,4
	.comm	ALX_DMA_MAC_RST_TO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
