	.file	"extr_r6040.c_r6040_close.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	r6040_close, @function
r6040_close:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	netdev_priv@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	rbp, rax
	mov	r13, QWORD PTR 40[rax]
	call	phy_stop@PLT
	lea	rdi, 32[rbp]
	lea	r12, 28[rbp]
	call	napi_disable@PLT
	mov	rdi, rbx
	call	netif_stop_queue@PLT
	mov	rdi, r12
	call	spin_lock_irq@PLT
	mov	rdi, rbx
	call	r6040_down@PLT
	mov	rdi, rbx
	call	r6040_free_rxbufs@PLT
	mov	rdi, rbx
	call	r6040_free_txbufs@PLT
	mov	rdi, r12
	call	spin_unlock_irq@PLT
	mov	edi, DWORD PTR [rbx]
	mov	rsi, rbx
	call	free_irq@PLT
	mov	rdx, QWORD PTR 16[rbp]
	test	rdx, rdx
	je	.L2
	mov	ecx, DWORD PTR 24[rbp]
	mov	esi, DWORD PTR RX_DESC_SIZE[rip]
	mov	rdi, r13
	call	pci_free_consistent@PLT
	mov	QWORD PTR 16[rbp], 0
.L2:
	mov	rdx, QWORD PTR 0[rbp]
	test	rdx, rdx
	je	.L3
	mov	ecx, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR TX_DESC_SIZE[rip]
	mov	rdi, r13
	call	pci_free_consistent@PLT
	mov	QWORD PTR 0[rbp], 0
.L3:
	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	r6040_close, .-r6040_close
	.comm	TX_DESC_SIZE,4,4
	.comm	RX_DESC_SIZE,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_r6040.c_r6040_close.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	r6040_close, %function
r6040_close:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	bl	netdev_priv
	mov	r4, r0
	ldr	r0, [r5, #4]
	ldr	r7, [r4, #24]
	bl	phy_stop
	add	r0, r4, #20
	bl	napi_disable
	add	r6, r4, #16
	mov	r0, r5
	bl	netif_stop_queue
	mov	r0, r6
	bl	spin_lock_irq
	mov	r0, r5
	bl	r6040_down
	mov	r0, r5
	bl	r6040_free_rxbufs
	mov	r0, r5
	bl	r6040_free_txbufs
	mov	r0, r6
	bl	spin_unlock_irq
	mov	r1, r5
	ldr	r0, [r5]
	bl	free_irq
	ldr	r2, [r4, #8]
	cmp	r2, #0
	beq	.L2
	ldr	r3, .L12
	mov	r0, r7
	ldr	r1, [r3]
	ldr	r3, [r4, #12]
	bl	pci_free_consistent
	mov	r3, #0
	str	r3, [r4, #8]
.L2:
	ldr	r2, [r4]
	cmp	r2, #0
	beq	.L3
	ldr	r3, .L12+4
	mov	r0, r7
	ldr	r1, [r3]
	ldr	r3, [r4, #4]
	bl	pci_free_consistent
	mov	r3, #0
	str	r3, [r4]
.L3:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	RX_DESC_SIZE
	.word	TX_DESC_SIZE
	.size	r6040_close, .-r6040_close
	.comm	TX_DESC_SIZE,4,4
	.comm	RX_DESC_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
