	.file	"extr_niu.c_niu_tx_work.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: niu_tx_work() pkt_cnt[%u] cons[%d]\n"
	.text
	.p2align 4
	.type	niu_tx_work, @function
niu_tx_work:
.LFB0:
	.cfi_startproc
	endbr64
	movabs	rax, -6148914691236517205
	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
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	sub	rsi, QWORD PTR 8[rdi]
	mov	rdi, QWORD PTR [rdi]
	sar	rsi, 2
	imul	rsi, rax
	call	netdev_get_tx_queue@PLT
	mov	ebx, DWORD PTR 0[rbp]
	xor	edi, edi
	mov	r14, rax
	mov	eax, DWORD PTR TX_CS_MK[rip]
	or	eax, DWORD PTR TX_CS_MMK[rip]
	test	eax, ebx
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L18
.L2:
	endbr64
	mov	rdi, r14
	call	netif_tx_queue_stopped@PLT
	xor	edi, edi
	test	rax, rax
	jne	.L19
.L5:
	call	unlikely@PLT
	test	rax, rax
	jne	.L20
.L1:
	add	rsp, 8
	.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
.L18:
	.cfi_restore_state
	mov	r15d, DWORD PTR TX_CS_PKT_CNT[rip]
	mov	ecx, DWORD PTR TX_CS_PKT_CNT_SHIFT[rip]
	lea	rsi, .LC0[rip]
	mov	r12d, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR TX_DONE[rip]
	and	ebx, r15d
	sar	r15d, cl
	sar	ebx, cl
	mov	r8d, r12d
	mov	eax, ebx
	sub	eax, DWORD PTR 4[rbp]
	mov	DWORD PTR 4[rbp], ebx
	and	r15d, eax
	mov	rax, QWORD PTR 0[r13]
	mov	ecx, r15d
	lea	ebx, -1[r15]
	mov	edx, DWORD PTR [rax]
	call	niudbg@PLT
	test	r15d, r15d
	je	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, r12d
	mov	rsi, rbp
	mov	rdi, r13
	sub	ebx, 1
	call	release_tx_packet@PLT
	mov	r12d, eax
	cmp	ebx, -1
	jne	.L4
.L3:
	mov	DWORD PTR 8[rbp], r12d
	xor	eax, eax
	call	smp_mb@PLT
	mov	rdi, r14
	call	netif_tx_queue_stopped@PLT
	xor	edi, edi
	test	rax, rax
	je	.L5
.L19:
	mov	rdi, rbp
	call	niu_tx_avail@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	NIU_TX_WAKEUP_THRESH@PLT
	xor	edi, edi
	cmp	rbx, rax
	setg	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L1
.L20:
	xor	eax, eax
	call	smp_processor_id@PLT
	mov	rdi, r14
	mov	esi, eax
	call	__netif_tx_lock@PLT
	mov	rdi, r14
	call	netif_tx_queue_stopped@PLT
	test	rax, rax
	jne	.L21
.L8:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r14
	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
	jmp	__netif_tx_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	rdi, rbp
	call	niu_tx_avail@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	NIU_TX_WAKEUP_THRESH@PLT
	cmp	rbx, rax
	jle	.L8
	mov	rdi, r14
	call	netif_tx_wake_queue@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	niu_tx_work, .-niu_tx_work
	.comm	TX_DONE,4,4
	.comm	TX_CS_PKT_CNT_SHIFT,4,4
	.comm	TX_CS_PKT_CNT,4,4
	.comm	TX_CS_MMK,4,4
	.comm	TX_CS_MK,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_niu.c_niu_tx_work.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: niu_tx_work() pkt_cnt[%u] cons[%d]\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	niu_tx_work, %function
niu_tx_work:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r7, r0
	ldm	r0, {r0, r1}
	sub	r1, r6, r1
	bic	r3, r1, #3
	add	r3, r3, r1, asr #2
	add	r3, r3, r3, lsl #4
	add	r3, r3, r3, lsl #8
	add	r3, r3, r3, lsl #16
	lsl	r3, r3, #1
	add	r1, r3, r1, asr #2
	sub	sp, sp, #8
	bl	netdev_get_tx_queue
	ldr	r3, .L23
	ldr	r2, .L23+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r4, [r6]
	orr	r3, r3, r2
	tst	r3, r4
	mov	r8, r0
	moveq	r0, #1
	movne	r0, #0
	bl	unlikely
	cmp	r0, #0
	beq	.L19
.L2:
	mov	r0, r8
	bl	netif_tx_queue_stopped
	cmp	r0, #0
	bne	.L20
.L5:
	bl	unlikely
	cmp	r0, #0
	bne	.L21
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	ldr	r2, .L23+8
	ldr	r3, .L23+12
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r5, [r6, #4]
	and	r4, r4, r0
	asr	r1, r4, r3
	ldr	r2, [r7]
	ldr	r4, [r6, #8]
	ldr	ip, .L23+16
	sub	r5, r1, r5
	and	r5, r5, r0, asr r3
	ldr	r2, [r2]
	mov	r3, r5
	str	r1, [r6, #4]
	ldr	r0, [ip]
	ldr	r1, .L23+20
	str	r4, [sp]
	bl	niudbg
	cmp	r5, #0
	sub	r5, r5, #1
	beq	.L3
.L4:
	mov	r2, r4
	mov	r1, r6
	mov	r0, r7
	bl	release_tx_packet
	sub	r5, r5, #1
	cmn	r5, #1
	mov	r4, r0
	bne	.L4
.L3:
	str	r4, [r6, #8]
	bl	smp_mb
	mov	r0, r8
	bl	netif_tx_queue_stopped
	cmp	r0, #0
	beq	.L5
.L20:
	mov	r0, r6
	bl	niu_tx_avail
	mov	r4, r0
	mov	r0, r6
	bl	NIU_TX_WAKEUP_THRESH
	cmp	r4, r0
	movle	r0, #0
	movgt	r0, #1
	bl	unlikely
	cmp	r0, #0
	beq	.L1
.L21:
	bl	smp_processor_id
	mov	r1, r0
	mov	r0, r8
	bl	__netif_tx_lock
	mov	r0, r8
	bl	netif_tx_queue_stopped
	cmp	r0, #0
	bne	.L22
.L8:
	mov	r0, r8
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	__netif_tx_unlock
.L22:
	mov	r0, r6
	bl	niu_tx_avail
	mov	r4, r0
	mov	r0, r6
	bl	NIU_TX_WAKEUP_THRESH
	cmp	r4, r0
	ble	.L8
	mov	r0, r8
	bl	netif_tx_wake_queue
	b	.L8
.L24:
	.align	2
.L23:
	.word	TX_CS_MK
	.word	TX_CS_MMK
	.word	TX_CS_PKT_CNT
	.word	TX_CS_PKT_CNT_SHIFT
	.word	TX_DONE
	.word	.LC0
	.size	niu_tx_work, .-niu_tx_work
	.comm	TX_DONE,4,4
	.comm	TX_CS_PKT_CNT_SHIFT,4,4
	.comm	TX_CS_PKT_CNT,4,4
	.comm	TX_CS_MMK,4,4
	.comm	TX_CS_MK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
