	.file	"extr_netmap_kloop.c_netmap_sync_kloop_rx_ring.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"pre rxsync"
.LC1:
	.string	"rxsync() failed"
.LC2:
	.string	"post rxsync"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"nr_hwtail: %d rhead: %d dry_cycles: %d"
	.text
	.p2align 4
	.type	netmap_sync_kloop_rx_ring, @function
netmap_sync_kloop_rx_ring:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	edx, edx
	mov	esi, 1
	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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rbp, QWORD PTR 40[rdi]
	mov	r14, QWORD PTR 32[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	r15, QWORD PTR 24[rdi]
	mov	rdi, rbp
	call	nm_kr_tryget@PLT
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	jne	.L1
	mov	eax, DWORD PTR 16[rbx]
	mov	r13, QWORD PTR 0[rbp]
	test	eax, eax
	je	.L32
.L4:
	lea	r12, 16[rsp]
	mov	rdx, r13
	mov	rdi, r14
	mov	rsi, r12
	call	sync_kloop_kernel_read@PLT
	mov	DWORD PTR 4[rsp], 0
.L5:
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, rbp
	mov	rsi, r12
	mov	QWORD PTR 16[rsp], rax
	call	nm_rxsync_prologue@PLT
	xor	edi, edi
	cmp	rax, r13
	setge	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L33
	mov	edi, DWORD PTR netmap_debug[rip]
	and	edi, DWORD PTR NM_DEBUG_RXSYNC[rip]
	call	unlikely@PLT
	test	rax, rax
	jne	.L34
.L9:
	mov	rdi, rbp
	mov	esi, DWORD PTR 28[rsp]
	call	[QWORD PTR 16[rbp]]
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	jne	.L35
	mov	edi, DWORD PTR 32[rbp]
	call	NM_ACCESS_ONCE@PLT
	mov	esi, DWORD PTR 36[rbp]
	mov	rdi, r15
	mov	rdx, rax
	mov	QWORD PTR 8[rsp], rax
	call	sync_kloop_kernel_write@PLT
	add	DWORD PTR 4[rsp], 1
	mov	rdx, QWORD PTR 8[rsp]
	cmp	QWORD PTR 8[rbp], rdx
	je	.L13
	mov	QWORD PTR 8[rbp], rdx
	mov	DWORD PTR 4[rsp], 0
.L13:
	mov	edi, DWORD PTR netmap_debug[rip]
	and	edi, DWORD PTR NM_DEBUG_RXSYNC[rip]
	call	unlikely@PLT
	test	rax, rax
	jne	.L36
.L14:
	mov	rsi, r12
	mov	rdi, r14
	mov	rdx, r13
	call	sync_kloop_kernel_read@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	rdi, rbp
	call	sync_kloop_norxslots@PLT
	test	rax, rax
	je	.L15
	cmp	QWORD PTR 8[rbx], 0
	jne	.L8
	mov	esi, 1
	mov	rdi, r15
	call	csb_ktoa_kick_enable@PLT
	xor	eax, eax
	call	nm_stld_barrier@PLT
	mov	rsi, r12
	mov	rdi, r14
	mov	rdx, r13
	call	sync_kloop_kernel_read@PLT
	mov	esi, DWORD PTR 24[rsp]
	mov	rdi, rbp
	call	sync_kloop_norxslots@PLT
	test	rax, rax
	je	.L37
.L8:
	mov	rdi, rbp
	call	nm_kr_put@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L38
	add	rsp, 56
	.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
.L32:
	.cfi_restore_state
	xor	esi, esi
	mov	rdi, r15
	call	csb_ktoa_kick_enable@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rsi, rbp
	lea	rdi, .LC0[rip]
	call	sync_kloop_kring_dump@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR 32[rbp]
	call	NM_ACCESS_ONCE@PLT
	mov	edi, 1
	mov	rdx, rax
	cmp	QWORD PTR 24[rbp], rax
	je	.L18
	xor	edi, edi
	mov	eax, DWORD PTR 4[rsp]
	cmp	DWORD PTR SYNC_LOOP_RX_DRY_CYCLES_MAX[rip], eax
	setle	dil
.L18:
	mov	QWORD PTR 8[rsp], rdx
	call	unlikely@PLT
	mov	rdx, QWORD PTR 8[rsp]
	test	rax, rax
	je	.L5
	mov	rcx, QWORD PTR 24[rbp]
	mov	r8d, DWORD PTR 4[rsp]
	mov	edi, 1
	lea	rsi, .LC3[rip]
	call	nm_prdis@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L36:
	mov	rsi, rbp
	lea	rdi, .LC2[rip]
	call	sync_kloop_kring_dump@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	xor	esi, esi
	mov	rdi, r15
	call	csb_ktoa_kick_enable@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L33:
	mov	rdi, rbp
	call	netmap_ring_reinit@PLT
	cmp	QWORD PTR 8[rbx], 0
	jne	.L8
	mov	esi, 1
	mov	rdi, r15
	call	csb_ktoa_kick_enable@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L35:
	cmp	QWORD PTR 8[rbx], 0
	je	.L39
.L11:
	lea	rdi, .LC1[rip]
	call	nm_prerr@PLT
	jmp	.L8
.L39:
	mov	esi, 1
	mov	rdi, r15
	call	csb_ktoa_kick_enable@PLT
	jmp	.L11
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	netmap_sync_kloop_rx_ring, .-netmap_sync_kloop_rx_ring
	.comm	netmap_debug,4,4
	.comm	SYNC_LOOP_RX_DRY_CYCLES_MAX,4,4
	.comm	NM_DEBUG_RXSYNC,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_netmap_kloop.c_netmap_sync_kloop_rx_ring.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pre rxsync\000"
	.align	2
.LC1:
	.ascii	"rxsync() failed\000"
	.align	2
.LC2:
	.ascii	"post rxsync\000"
	.align	2
.LC3:
	.ascii	"nr_hwtail: %d rhead: %d dry_cycles: %d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	netmap_sync_kloop_rx_ring, %function
netmap_sync_kloop_rx_ring:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	ldr	r4, [r0, #20]
	ldr	r3, .L43
	sub	sp, sp, #36
	mov	r2, #0
	mov	r1, #1
	mov	r0, r4
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	ldr	r8, [r5, #16]
	ldr	r9, [r5, #12]
	bl	nm_kr_tryget
	bl	unlikely
	subs	r6, r0, #0
	bne	.L1
	ldr	r3, [r5, #8]
	ldr	r7, [r4]
	cmp	r3, #0
	beq	.L34
.L4:
	mov	r2, r7
	mov	r0, r8
	add	r1, sp, #16
	ldr	fp, .L43+4
	ldr	r10, .L43+8
	bl	sync_kloop_kernel_read
	str	r6, [sp, #8]
	str	r5, [sp, #12]
.L5:
	ldr	r3, [r4, #4]
	add	r1, sp, #16
	mov	r0, r4
	str	r3, [sp, #16]
	bl	nm_rxsync_prologue
	cmp	r0, r7
	movlt	r0, #0
	movge	r0, #1
	bl	unlikely
	cmp	r0, #0
	bne	.L35
	ldr	r0, [fp]
	ldr	r3, [r10]
	and	r0, r0, r3
	bl	unlikely
	cmp	r0, #0
	bne	.L36
.L9:
	ldr	r3, [r4, #8]
	ldr	r1, [sp, #24]
	mov	r0, r4
	blx	r3
	bl	unlikely
	subs	r5, r0, #0
	bne	.L37
	ldr	r0, [r4, #16]
	bl	NM_ACCESS_ONCE
	mov	r6, r0
	mov	r2, r0
	ldr	r1, [r4, #20]
	mov	r0, r9
	bl	sync_kloop_kernel_write
	ldr	r3, [r4, #4]
	ldr	r0, [fp]
	cmp	r3, r6
	ldreq	r3, [sp, #8]
	strne	r6, [r4, #4]
	addeq	r5, r3, #1
	ldr	r3, [r10]
	and	r0, r0, r3
	bl	unlikely
	cmp	r0, #0
	bne	.L38
.L14:
	mov	r2, r7
	add	r1, sp, #16
	mov	r0, r8
	bl	sync_kloop_kernel_read
	mov	r0, r4
	ldr	r1, [sp, #20]
	bl	sync_kloop_norxslots
	cmp	r0, #0
	beq	.L15
	ldr	r3, [sp, #12]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L8
	mov	r1, #1
	mov	r0, r9
	bl	csb_ktoa_kick_enable
	bl	nm_stld_barrier
	mov	r2, r7
	add	r1, sp, #16
	mov	r0, r8
	bl	sync_kloop_kernel_read
	ldr	r1, [sp, #20]
	mov	r0, r4
	bl	sync_kloop_norxslots
	subs	r1, r0, #0
	beq	.L39
.L8:
	mov	r0, r4
	bl	nm_kr_put
.L1:
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L40
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L34:
	mov	r1, r6
	mov	r0, r9
	bl	csb_ktoa_kick_enable
	b	.L4
.L36:
	mov	r1, r4
	ldr	r0, .L43+12
	bl	sync_kloop_kring_dump
	b	.L9
.L15:
	ldr	r0, [r4, #16]
	bl	NM_ACCESS_ONCE
	ldr	r3, [r4, #12]
	mov	r6, r0
	cmp	r3, r0
	moveq	r0, #1
	beq	.L18
	ldr	r3, .L43+16
	ldr	r0, [r3]
	cmp	r0, r5
	movgt	r0, #0
	movle	r0, #1
.L18:
	bl	unlikely
	cmp	r0, #0
	bne	.L41
.L17:
	str	r5, [sp, #8]
	b	.L5
.L38:
	mov	r1, r4
	ldr	r0, .L43+20
	bl	sync_kloop_kring_dump
	b	.L14
.L39:
	mov	r0, r9
	bl	csb_ktoa_kick_enable
	b	.L17
.L35:
	ldr	r5, [sp, #12]
	mov	r0, r4
	bl	netmap_ring_reinit
	ldr	r3, [r5, #4]
	cmp	r3, #0
	bne	.L8
	mov	r0, r9
	mov	r1, #1
	bl	csb_ktoa_kick_enable
	b	.L8
.L37:
	ldr	r5, [sp, #12]
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L42
.L11:
	ldr	r0, .L43+24
	bl	nm_prerr
	b	.L8
.L42:
	mov	r0, r9
	mov	r1, #1
	bl	csb_ktoa_kick_enable
	b	.L11
.L41:
	ldr	r3, [r4, #12]
	mov	r2, r6
	ldr	r1, .L43+28
	str	r5, [sp]
	mov	r0, #1
	bl	nm_prdis
	b	.L8
.L40:
	bl	__stack_chk_fail
.L44:
	.align	2
.L43:
	.word	.LC4
	.word	netmap_debug
	.word	NM_DEBUG_RXSYNC
	.word	.LC0
	.word	SYNC_LOOP_RX_DRY_CYCLES_MAX
	.word	.LC2
	.word	.LC1
	.word	.LC3
	.size	netmap_sync_kloop_rx_ring, .-netmap_sync_kloop_rx_ring
	.comm	netmap_debug,4,4
	.comm	SYNC_LOOP_RX_DRY_CYCLES_MAX,4,4
	.comm	NM_DEBUG_RXSYNC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
