	.file	"extr_3c515.c_corkscrew_start_xmit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: Trying to send a packet, Tx index %d.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%s: Tx error, status %2.2x.\n"
	.text
	.p2align 4
	.type	corkscrew_start_xmit, @function
corkscrew_start_xmit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	rdi, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	netdev_priv@PLT
	mov	rdi, r12
	movsx	rbx, DWORD PTR [r12]
	mov	r13, rax
	call	netif_stop_queue@PLT
	cmp	QWORD PTR 56[r13], 0
	je	.L2
	mov	eax, DWORD PTR 4[r13]
	test	eax, eax
	je	.L3
	mov	eax, DWORD PTR NETDEV_TX_BUSY[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	r15d, DWORD PTR 0[r13]
	mov	ecx, DWORD PTR TX_RING_SIZE[rip]
	xor	r14d, r14d
	test	r15d, r15d
	jne	.L55
	cmp	DWORD PTR corkscrew_debug[rip], 3
	jg	.L56
.L6:
	mov	eax, r15d
	mov	r15, QWORD PTR 40[r13]
	cdq
	idiv	ecx
	mov	rax, QWORD PTR 48[r13]
	movsx	rdi, edx
	mov	QWORD PTR [rax+rdi*8], rbp
	sal	rdi, 4
	add	r15, rdi
	mov	QWORD PTR 8[rsp], rdi
	mov	rdi, QWORD PTR 8[rbp]
	mov	DWORD PTR [r15], 0
	call	isa_virt_to_bus@PLT
	mov	rdx, QWORD PTR 8[rsp]
	add	rdx, QWORD PTR 40[r13]
	xor	esi, esi
	mov	DWORD PTR 4[r15], eax
	mov	eax, DWORD PTR 0[rbp]
	lea	r15, 32[r13]
	mov	ebp, 21
	mov	rdi, r15
	or	eax, -2147483648
	mov	DWORD PTR 8[rdx], eax
	mov	DWORD PTR 12[rdx], eax
	call	spin_lock_irqsave@PLT
	mov	rsi, QWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR DownStall[rip]
	add	rsi, rbx
	call	outw@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L57:
	sub	ebp, 1
	je	.L7
.L8:
	mov	rdi, QWORD PTR EL3_STATUS[rip]
	add	rdi, rbx
	call	inw@PLT
	test	DWORD PTR CmdInProgress[rip], eax
	jne	.L57
.L7:
	test	r14, r14
	je	.L9
	mov	rdi, QWORD PTR 8[rsp]
	add	rdi, QWORD PTR 40[r13]
	call	isa_virt_to_bus@PLT
	mov	DWORD PTR [r14], eax
.L9:
	mov	rdi, QWORD PTR DownListPtr[rip]
	add	rdi, rbx
	call	inl@PLT
	test	rax, rax
	je	.L58
.L10:
	add	rbx, QWORD PTR EL3_CMD[rip]
	mov	edi, DWORD PTR DownUnstall[rip]
	mov	rsi, rbx
	call	outw@PLT
	xor	esi, esi
	mov	rdi, r15
	call	spin_unlock_irqrestore@PLT
	mov	eax, DWORD PTR 0[r13]
	add	eax, 1
	mov	DWORD PTR 0[r13], eax
	sub	eax, DWORD PTR 8[r13]
	cmp	eax, DWORD PTR TX_RING_SIZE[rip]
	jge	.L59
	test	r14, r14
	je	.L13
	and	DWORD PTR 12[r14], 2147483647
.L13:
	mov	rdi, r12
	call	netif_wake_queue@PLT
.L12:
	mov	rax, QWORD PTR jiffies[rip]
	mov	QWORD PTR 24[r12], rax
	mov	eax, DWORD PTR NETDEV_TX_OK[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rsi, QWORD PTR TX_FIFO[rip]
	mov	edi, DWORD PTR 0[rbp]
	add	rsi, rbx
	call	outl@PLT
	mov	edx, DWORD PTR 0[rbp]
	add	DWORD PTR 4[r12], edx
	mov	rdi, QWORD PTR TX_FIFO[rip]
	mov	rsi, QWORD PTR 8[rbp]
	add	edx, 3
	sar	edx, 2
	add	rdi, rbx
	call	outsl@PLT
	mov	rdi, rbp
	call	dev_kfree_skb@PLT
	mov	rdi, QWORD PTR TxFree[rip]
	add	rdi, rbx
	call	inw@PLT
	cmp	eax, 1536
	jle	.L14
	mov	rdi, r12
	call	netif_wake_queue@PLT
.L15:
	mov	rax, QWORD PTR jiffies[rip]
	mov	r13d, 3
	lea	r14, .LC1[rip]
	mov	QWORD PTR 24[r12], rax
.L16:
	mov	rdi, QWORD PTR TxStatus[rip]
	add	rdi, rbx
	call	inb@PLT
	mov	ebp, eax
	test	ax, ax
	jle	.L25
	test	bpl, 60
	je	.L17
	cmp	DWORD PTR corkscrew_debug[rip], 2
	jg	.L60
.L18:
	test	bpl, 4
	je	.L19
	add	DWORD PTR 12[r12], 1
.L19:
	test	bpl, 56
	je	.L20
	add	DWORD PTR 8[r12], 1
.L20:
	mov	rsi, QWORD PTR EL3_CMD[rip]
	add	rsi, rbx
	and	ebp, 48
	jne	.L61
.L21:
	mov	edi, DWORD PTR TxEnable[rip]
	call	outw@PLT
.L17:
	mov	rsi, QWORD PTR TxStatus[rip]
	xor	edi, edi
	add	rsi, rbx
	call	outb@PLT
	sub	r13d, 1
	jne	.L16
.L25:
	mov	eax, DWORD PTR NETDEV_TX_OK[rip]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	.cfi_restore_state
	lea	eax, -1[r15]
	cdq
	idiv	ecx
	movsx	rdx, edx
	sal	rdx, 4
	add	rdx, QWORD PTR 40[r13]
	cmp	DWORD PTR corkscrew_debug[rip], 3
	mov	r14, rdx
	jle	.L6
.L56:
	mov	esi, DWORD PTR 16[r12]
	movsx	edx, r15w
	lea	rdi, .LC0[rip]
	mov	DWORD PTR 8[rsp], ecx
	call	pr_debug@PLT
	mov	ecx, DWORD PTR 8[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L59:
	mov	DWORD PTR 4[r13], 1
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rsi, QWORD PTR EL3_CMD[rip]
	mov	eax, DWORD PTR SetTxThreshold[rip]
	add	rsi, rbx
	lea	edi, 384[rax]
	call	outw@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L60:
	mov	esi, DWORD PTR 16[r12]
	movsx	edx, bp
	mov	rdi, r14
	call	pr_debug@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L58:
	mov	rbp, QWORD PTR DownListPtr[rip]
	mov	rdi, QWORD PTR 8[rsp]
	add	rdi, QWORD PTR 40[r13]
	call	isa_virt_to_bus@PLT
	add	rbp, rbx
	mov	edi, eax
	mov	rsi, rbp
	call	outl@PLT
	add	DWORD PTR queued_packet[rip], 1
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L61:
	mov	edi, DWORD PTR TxReset[rip]
	mov	ebp, 21
	call	outw@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L22:
	sub	ebp, 1
	je	.L53
.L23:
	mov	rdi, QWORD PTR EL3_STATUS[rip]
	add	rdi, rbx
	call	inw@PLT
	test	DWORD PTR CmdInProgress[rip], eax
	jne	.L22
.L53:
	mov	rsi, QWORD PTR EL3_CMD[rip]
	add	rsi, rbx
	jmp	.L21
	.cfi_endproc
.LFE0:
	.size	corkscrew_start_xmit, .-corkscrew_start_xmit
	.comm	queued_packet,4,4
	.comm	jiffies,8,8
	.comm	corkscrew_debug,4,4
	.comm	Wn7_MasterLen,8,8
	.comm	Wn7_MasterAddr,8,8
	.comm	TxStatus,8,8
	.comm	TxReset,4,4
	.comm	TxFree,8,8
	.comm	TxEnable,4,4
	.comm	TX_RING_SIZE,4,4
	.comm	TX_FIFO,8,8
	.comm	StartDMADown,4,4
	.comm	SetTxThreshold,4,4
	.comm	NETDEV_TX_OK,4,4
	.comm	NETDEV_TX_BUSY,4,4
	.comm	EL3_STATUS,8,8
	.comm	EL3_CMD,8,8
	.comm	DownUnstall,4,4
	.comm	DownStall,4,4
	.comm	DownListPtr,8,8
	.comm	CmdInProgress,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_3c515.c_corkscrew_start_xmit.c"
	.text
	.global	__aeabi_idivmod
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: Trying to send a packet, Tx index %d.\012\000"
	.align	2
.LC1:
	.ascii	"%s: Tx error, status %2.2x.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	corkscrew_start_xmit, %function
corkscrew_start_xmit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	sub	sp, sp, #12
	mov	r0, r1
	mov	r6, r1
	bl	netdev_priv
	mov	r7, r0
	mov	r0, r6
	ldr	r5, [r6]
	bl	netif_stop_queue
	ldr	r3, [r7, #32]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r7, #4]
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L61
	ldr	r0, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldr	r10, [r7]
	ldr	r3, .L61+4
	cmp	r10, #0
	moveq	r8, r10
	ldr	fp, [r3]
	bne	.L54
	ldr	r3, .L61+8
	ldr	r3, [r3]
	cmp	r3, #3
	bgt	.L55
.L6:
	mov	r1, fp
	mov	r0, r10
	bl	__aeabi_idivmod
	mov	r3, #0
	ldr	r2, [r7, #24]
	ldr	r0, [r7, #28]
	lsl	r10, r1, #4
	str	r4, [r0, r1, lsl #2]
	ldr	r0, [r4, #4]
	str	r3, [r2, r1, lsl #4]
	add	r9, r2, r1, lsl #4
	str	r10, [sp, #4]
	bl	isa_virt_to_bus
	ldr	r1, [r4]
	ldr	r3, [r7, #24]
	orr	r1, r1, #-2147483648
	add	r3, r3, r10
	add	r10, r7, #20
	str	r0, [r9, #4]
	str	r1, [r3, #8]
	str	r1, [r3, #12]
	mov	r0, r10
	mov	r1, #0
	bl	spin_lock_irqsave
	ldr	r3, .L61+12
	mov	r4, #21
	ldr	r1, [r3]
	ldr	r3, .L61+16
	add	r1, r5, r1
	ldr	r0, [r3]
	bl	outw
	ldr	fp, .L61+20
	ldr	r9, .L61+24
	b	.L8
.L56:
	subs	r4, r4, #1
	beq	.L7
.L8:
	ldr	r0, [fp]
	add	r0, r5, r0
	bl	inw
	ldr	r3, [r9]
	tst	r0, r3
	bne	.L56
.L7:
	cmp	r8, #0
	beq	.L9
	ldr	r0, [r7, #24]
	ldr	r3, [sp, #4]
	add	r0, r0, r3
	bl	isa_virt_to_bus
	str	r0, [r8]
.L9:
	ldr	r4, .L61+28
	ldr	r0, [r4]
	add	r0, r5, r0
	bl	inl
	cmp	r0, #0
	beq	.L57
.L10:
	ldr	r3, .L61+12
	ldr	r1, [r3]
	ldr	r3, .L61+32
	add	r1, r5, r1
	ldr	r0, [r3]
	bl	outw
	mov	r1, #0
	mov	r0, r10
	bl	spin_unlock_irqrestore
	ldr	r3, [r7]
	ldr	r1, .L61+4
	ldr	r2, [r7, #8]
	add	r3, r3, #1
	ldr	r1, [r1]
	sub	r2, r3, r2
	cmp	r2, r1
	str	r3, [r7]
	movge	r3, #1
	strge	r3, [r7, #4]
	bge	.L12
	cmp	r8, #0
	ldrne	r3, [r8, #12]
	mov	r0, r6
	bicne	r3, r3, #-2147483648
	strne	r3, [r8, #12]
	bl	netif_wake_queue
.L12:
	ldr	r2, .L61+36
	ldr	r3, .L61+40
	ldr	r0, [r2]
	ldr	r3, [r3]
	str	r3, [r6, #20]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r7, .L61+44
	ldr	r0, [r4]
	ldr	r1, [r7]
	add	r1, r5, r1
	bl	outl
	ldr	r2, [r4]
	ldr	r3, [r6, #4]
	ldr	r0, [r7]
	add	r3, r3, r2
	add	r2, r2, #3
	ldr	r1, [r4, #4]
	str	r3, [r6, #4]
	asr	r2, r2, #2
	add	r0, r5, r0
	bl	outsl
	mov	r0, r4
	bl	dev_kfree_skb
	ldr	r3, .L61+48
	ldr	r0, [r3]
	add	r0, r5, r0
	bl	inw
	cmp	r0, #1536
	bgt	.L58
	ldr	r2, .L61+12
	ldr	r3, .L61+52
	ldr	r1, [r2]
	ldr	r0, [r3]
	add	r1, r5, r1
	add	r0, r0, #384
	bl	outw
.L15:
	mov	r4, #3
	ldr	r3, .L61+40
	ldr	r7, .L61+56
	ldr	r3, [r3]
	ldr	fp, .L61+12
	ldr	r10, .L61+20
	ldr	r9, .L61+24
	str	r3, [r6, #20]
.L16:
	ldr	r0, [r7]
	add	r0, r5, r0
	bl	inb
	subs	r2, r0, #0
	ble	.L25
	lsl	r8, r2, #16
	tst	r2, #60
	lsr	r8, r8, #16
	beq	.L17
	ldr	r3, .L61+8
	ldr	r3, [r3]
	cmp	r3, #2
	bgt	.L59
.L18:
	tst	r8, #4
	ldrne	r3, [r6, #12]
	ldr	r1, [fp]
	addne	r3, r3, #1
	strne	r3, [r6, #12]
	tst	r8, #56
	ldrne	r3, [r6, #8]
	add	r1, r5, r1
	addne	r3, r3, #1
	strne	r3, [r6, #8]
	tst	r8, #48
	bne	.L60
.L21:
	ldr	r3, .L61+60
	ldr	r0, [r3]
	bl	outw
.L17:
	ldr	r1, [r7]
	mov	r0, #0
	add	r1, r5, r1
	bl	outb
	subs	r4, r4, #1
	bne	.L16
.L25:
	ldr	r3, .L61+36
	ldr	r0, [r3]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L54:
	mov	r1, fp
	sub	r0, r10, #1
	bl	__aeabi_idivmod
	ldr	r3, .L61+8
	ldr	r8, [r7, #24]
	ldr	r3, [r3]
	add	r8, r8, r1, lsl #4
	cmp	r3, #3
	ble	.L6
.L55:
	lsl	r2, r10, #16
	ldr	r1, [r6, #16]
	asr	r2, r2, #16
	ldr	r0, .L61+64
	bl	pr_debug
	b	.L6
.L58:
	mov	r0, r6
	bl	netif_wake_queue
	b	.L15
.L59:
	ldr	r1, [r6, #16]
	ldr	r0, .L61+68
	bl	pr_debug
	b	.L18
.L57:
	ldr	r3, [sp, #4]
	ldr	r0, [r7, #24]
	add	r0, r0, r3
	bl	isa_virt_to_bus
	ldr	r1, [r4]
	add	r1, r5, r1
	bl	outl
	ldr	r2, .L61+72
	ldr	r3, [r2]
	add	r3, r3, #1
	str	r3, [r2]
	b	.L10
.L60:
	ldr	r3, .L61+76
	mov	r8, #21
	ldr	r0, [r3]
	bl	outw
	b	.L23
.L22:
	subs	r8, r8, #1
	beq	.L52
.L23:
	ldr	r0, [r10]
	add	r0, r5, r0
	bl	inw
	ldr	r3, [r9]
	tst	r0, r3
	bne	.L22
.L52:
	ldr	r1, [fp]
	add	r1, r5, r1
	b	.L21
.L62:
	.align	2
.L61:
	.word	NETDEV_TX_BUSY
	.word	TX_RING_SIZE
	.word	corkscrew_debug
	.word	EL3_CMD
	.word	DownStall
	.word	EL3_STATUS
	.word	CmdInProgress
	.word	DownListPtr
	.word	DownUnstall
	.word	NETDEV_TX_OK
	.word	jiffies
	.word	TX_FIFO
	.word	TxFree
	.word	SetTxThreshold
	.word	TxStatus
	.word	TxEnable
	.word	.LC0
	.word	.LC1
	.word	queued_packet
	.word	TxReset
	.size	corkscrew_start_xmit, .-corkscrew_start_xmit
	.comm	queued_packet,4,4
	.comm	jiffies,4,4
	.comm	corkscrew_debug,4,4
	.comm	Wn7_MasterLen,4,4
	.comm	Wn7_MasterAddr,4,4
	.comm	TxStatus,4,4
	.comm	TxReset,4,4
	.comm	TxFree,4,4
	.comm	TxEnable,4,4
	.comm	TX_RING_SIZE,4,4
	.comm	TX_FIFO,4,4
	.comm	StartDMADown,4,4
	.comm	SetTxThreshold,4,4
	.comm	NETDEV_TX_OK,4,4
	.comm	NETDEV_TX_BUSY,4,4
	.comm	EL3_STATUS,4,4
	.comm	EL3_CMD,4,4
	.comm	DownUnstall,4,4
	.comm	DownStall,4,4
	.comm	DownListPtr,4,4
	.comm	CmdInProgress,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
