	.file	"extr_if_et.c_et_start_locked.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	et_start_locked, @function
et_start_locked:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rbx, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	mov	rdi, rbx
	call	ET_LOCK_ASSERT@PLT
	mov	edx, DWORD PTR IFF_DRV_RUNNING[rip]
	mov	eax, DWORD PTR IFF_DRV_OACTIVE[rip]
	or	eax, edx
	and	eax, DWORD PTR 0[rbp]
	cmp	edx, eax
	jne	.L1
	mov	edx, DWORD PTR [rbx]
	mov	eax, DWORD PTR ET_FLAG_LINK[rip]
	or	eax, DWORD PTR ET_FLAG_TXRX_ENABLED[rip]
	and	edx, eax
	cmp	eax, edx
	je	.L23
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	mov	eax, DWORD PTR ET_TX_NDESC[rip]
	lea	edx, [rax+rax]
	movsx	rax, edx
	sar	edx, 31
	imul	rax, rax, 1431655766
	shr	rax, 32
	sub	eax, edx
	cmp	DWORD PTR 32[rbx], eax
	jg	.L25
.L6:
	lea	r12, 4[rbp]
	xor	r13d, r13d
	mov	r14, rsp
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	mov	eax, DWORD PTR ET_NSEG_SPARE[rip]
	add	eax, DWORD PTR 32[rbx]
	cmp	eax, DWORD PTR ET_TX_NDESC[rip]
	jge	.L21
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, r12
	call	IFQ_DRV_DEQUEUE@PLT
	cmp	QWORD PTR [rsp], 0
	je	.L9
	mov	rsi, r14
	mov	rdi, rbx
	call	et_encap@PLT
	test	rax, rax
	jne	.L26
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, rbp
	add	r13d, 1
	call	ETHER_BPF_MTAP@PLT
.L7:
	mov	rdi, r12
	call	IFQ_DRV_IS_EMPTY@PLT
	test	eax, eax
	je	.L14
.L9:
	test	r13d, r13d
	je	.L1
	mov	edx, DWORD PTR BUS_DMASYNC_PREWRITE[rip]
	mov	esi, DWORD PTR 24[rbx]
	mov	edi, DWORD PTR 28[rbx]
	call	bus_dmamap_sync@PLT
	mov	edx, DWORD PTR 8[rbx]
	and	edx, DWORD PTR ET_TX_READY_POS_INDEX_MASK[rip]
	cmp	QWORD PTR 16[rbx], 0
	je	.L15
	or	edx, DWORD PTR ET_TX_READY_POS_WRAP[rip]
.L15:
	mov	esi, DWORD PTR ET_TX_READY_POS[rip]
	mov	rdi, rbx
	call	CSR_WRITE_4@PLT
	mov	DWORD PTR 4[rbx], 5
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rdi, rbx
	call	et_txeof@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rsi, QWORD PTR [rsp]
	test	rsi, rsi
	je	.L27
	mov	rdi, r12
	call	IFQ_DRV_PREPEND@PLT
	mov	eax, DWORD PTR 32[rbx]
	test	eax, eax
	jle	.L9
.L21:
	mov	eax, DWORD PTR IFF_DRV_OACTIVE[rip]
	or	DWORD PTR 0[rbp], eax
	jmp	.L9
.L27:
	mov	esi, DWORD PTR IFCOUNTER_OERRORS[rip]
	mov	edx, 1
	mov	rdi, rbp
	call	if_inc_counter@PLT
	jmp	.L9
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	et_start_locked, .-et_start_locked
	.comm	IFF_DRV_RUNNING,4,4
	.comm	IFF_DRV_OACTIVE,4,4
	.comm	IFCOUNTER_OERRORS,4,4
	.comm	ET_TX_READY_POS_WRAP,4,4
	.comm	ET_TX_READY_POS_INDEX_MASK,4,4
	.comm	ET_TX_READY_POS,4,4
	.comm	ET_TX_NDESC,4,4
	.comm	ET_NSEG_SPARE,4,4
	.comm	ET_FLAG_TXRX_ENABLED,4,4
	.comm	ET_FLAG_LINK,4,4
	.comm	BUS_DMASYNC_PREWRITE,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_if_et.c_et_start_locked.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	et_start_locked, %function
et_start_locked:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r4, [r0, #8]
	ldr	r2, .L31
	sub	sp, sp, #8
	mov	r0, r4
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	ldr	r10, .L31+4
	str	r3, [sp]
	bl	ET_LOCK_ASSERT
	ldr	r2, .L31+8
	ldr	r3, [r10]
	ldr	r2, [r2]
	ldr	r1, [r5]
	orr	r3, r2, r3
	and	r3, r3, r1
	cmp	r2, r3
	bne	.L1
	ldr	r2, .L31+12
	ldr	r3, .L31+16
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r4]
	orr	r3, r3, r1
	bics	r3, r3, r2
	beq	.L26
.L1:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L26:
	ldr	r8, .L31+20
	ldr	r3, .L31+24
	ldr	r2, [r8]
	ldr	r1, [r4, #24]
	lsl	r2, r2, #1
	smull	r0, r3, r2, r3
	sub	r3, r3, r2, asr #31
	cmp	r1, r3
	bgt	.L28
.L6:
	mov	r7, #0
	ldr	r9, .L31+28
	add	r6, r5, #4
	b	.L7
.L14:
	ldr	r3, [r4, #24]
	ldr	r1, [r9]
	ldr	r2, [r8]
	add	r3, r3, r1
	cmp	r3, r2
	bge	.L24
	mov	r0, r6
	ldr	r1, [sp]
	bl	IFQ_DRV_DEQUEUE
	ldr	r3, [sp]
	cmp	r3, #0
	beq	.L9
	mov	r1, sp
	mov	r0, r4
	bl	et_encap
	cmp	r0, #0
	ldr	r1, [sp]
	bne	.L29
	mov	r0, r5
	add	r7, r7, #1
	bl	ETHER_BPF_MTAP
.L7:
	mov	r0, r6
	bl	IFQ_DRV_IS_EMPTY
	cmp	r0, #0
	beq	.L14
.L9:
	cmp	r7, #0
	beq	.L1
	ldr	r3, .L31+32
	ldr	r1, [r4, #16]
	ldr	r2, [r3]
	ldr	r0, [r4, #20]
	bl	bus_dmamap_sync
	ldr	r3, .L31+36
	ldr	r1, [r4, #12]
	ldr	r3, [r3]
	ldr	r2, [r4, #8]
	cmp	r1, #0
	and	r2, r2, r3
	ldrne	r3, .L31+40
	mov	r0, r4
	ldrne	r3, [r3]
	orrne	r2, r2, r3
	ldr	r3, .L31+44
	ldr	r1, [r3]
	bl	CSR_WRITE_4
	mov	r3, #5
	str	r3, [r4, #4]
	b	.L1
.L28:
	mov	r0, r4
	bl	et_txeof
	b	.L6
.L29:
	cmp	r1, #0
	beq	.L30
	mov	r0, r6
	bl	IFQ_DRV_PREPEND
	ldr	r3, [r4, #24]
	cmp	r3, #0
	ble	.L9
.L24:
	ldr	r2, [r10]
	ldr	r3, [r5]
	orr	r3, r3, r2
	str	r3, [r5]
	b	.L9
.L30:
	ldr	r3, .L31+48
	mov	r0, r5
	mov	r2, #1
	ldr	r1, [r3]
	bl	if_inc_counter
	b	.L9
.L27:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	.LC0
	.word	IFF_DRV_OACTIVE
	.word	IFF_DRV_RUNNING
	.word	ET_FLAG_TXRX_ENABLED
	.word	ET_FLAG_LINK
	.word	ET_TX_NDESC
	.word	1431655766
	.word	ET_NSEG_SPARE
	.word	BUS_DMASYNC_PREWRITE
	.word	ET_TX_READY_POS_INDEX_MASK
	.word	ET_TX_READY_POS_WRAP
	.word	ET_TX_READY_POS
	.word	IFCOUNTER_OERRORS
	.size	et_start_locked, .-et_start_locked
	.comm	IFF_DRV_RUNNING,4,4
	.comm	IFF_DRV_OACTIVE,4,4
	.comm	IFCOUNTER_OERRORS,4,4
	.comm	ET_TX_READY_POS_WRAP,4,4
	.comm	ET_TX_READY_POS_INDEX_MASK,4,4
	.comm	ET_TX_READY_POS,4,4
	.comm	ET_TX_NDESC,4,4
	.comm	ET_NSEG_SPARE,4,4
	.comm	ET_FLAG_TXRX_ENABLED,4,4
	.comm	ET_FLAG_LINK,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
