	.file	"extr_fm10k_pci.c_fm10k_reset_drop_on_empty.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fm10k_reset_drop_on_empty, @function
fm10k_reset_drop_on_empty:
.LFB0:
	.cfi_startproc
	endbr64
	test	DWORD PTR FM10K_EICR_MAXHOLDTIME[rip], esi
	jne	.L28
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	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
	lea	r13, 8[rdi]
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	mov	edi, 7
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r14d, DWORD PTR FM10K_RXDCTL_WRITE_BACK_MIN_DELAY[rip]
	call	FM10K_MAXHOLDQ@PLT
	mov	rdi, r13
	mov	esi, eax
	call	fm10k_read_reg@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L29
.L3:
	mov	ebx, 255
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, 31
	call	BIT@PLT
	and	eax, r15d
	add	r15d, r15d
	test	eax, eax
	je	.L5
	cmp	DWORD PTR FM10K_MAX_QUEUES_PF[rip], ebx
	jg	.L30
	add	DWORD PTR [r12], 1
.L10:
	mov	edx, ebx
	test	edx, edx
	je	.L1
.L31:
	lea	ebx, -1[rdx]
	test	dl, 31
	jne	.L4
	test	ebx, ebx
	lea	ebp, 30[rdx]
	cmovns	ebp, ebx
	sar	ebp, 5
	mov	edi, ebp
	call	FM10K_MAXHOLDQ@PLT
	mov	rdi, r13
	mov	esi, eax
	call	fm10k_read_reg@PLT
	mov	r15d, eax
	test	eax, eax
	je	.L4
	mov	edi, ebp
	call	FM10K_MAXHOLDQ@PLT
	mov	edx, r15d
	mov	rdi, r13
	mov	esi, eax
	call	fm10k_write_reg@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	test	r15d, r15d
	jne	.L10
	and	ebx, -32
	mov	edx, ebx
	test	edx, edx
	jne	.L31
.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
.L30:
	.cfi_restore_state
	add	DWORD PTR 4[r12], 1
	mov	edi, ebx
	call	FM10K_RXDCTL@PLT
	mov	edx, r14d
	mov	rdi, r13
	mov	esi, eax
	call	fm10k_write_reg@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, 7
	call	FM10K_MAXHOLDQ@PLT
	mov	edx, r15d
	mov	rdi, r13
	mov	esi, eax
	call	fm10k_write_reg@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	fm10k_reset_drop_on_empty, .-fm10k_reset_drop_on_empty
	.comm	FM10K_RXDCTL_WRITE_BACK_MIN_DELAY,4,4
	.comm	FM10K_MAX_QUEUES_PF,4,4
	.comm	FM10K_EICR_MAXHOLDTIME,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_fm10k_pci.c_fm10k_reset_drop_on_empty.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fm10k_reset_drop_on_empty, %function
fm10k_reset_drop_on_empty:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L31
	ldr	r3, [r3]
	tst	r1, r3
	bxeq	lr
	ldr	r3, .L31+4
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	add	r7, r0, #8
	mov	r6, r0
	mov	r0, #7
	ldr	r9, [r3]
	bl	FM10K_MAXHOLDQ
	mov	r1, r0
	mov	r0, r7
	bl	fm10k_read_reg
	subs	r5, r0, #0
	bne	.L28
.L3:
	mov	r10, #255
	ldr	r8, .L31+8
.L4:
	mov	r0, #31
	bl	BIT
	and	r0, r0, r5
	cmp	r0, #0
	lsl	r5, r5, #1
	beq	.L5
	ldr	r3, [r8]
	cmp	r3, r10
	bgt	.L29
	ldr	r3, [r6]
	add	r3, r3, #1
	str	r3, [r6]
.L10:
	mov	r3, r10
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
.L30:
	tst	r3, #31
	sub	r10, r3, #1
	bne	.L4
	cmp	r10, #0
	addlt	r3, r3, #30
	movge	r3, r10
	asr	r4, r3, #5
	mov	r0, r4
	bl	FM10K_MAXHOLDQ
	mov	r1, r0
	mov	r0, r7
	bl	fm10k_read_reg
	subs	r5, r0, #0
	beq	.L4
	mov	r0, r4
	bl	FM10K_MAXHOLDQ
	mov	r2, r5
	mov	r1, r0
	mov	r0, r7
	bl	fm10k_write_reg
	b	.L4
.L5:
	cmp	r5, #0
	bne	.L10
	bic	r3, r10, #31
	cmp	r3, #0
	bne	.L30
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L29:
	ldr	r3, [r6, #4]
	mov	r0, r10
	add	r3, r3, #1
	str	r3, [r6, #4]
	bl	FM10K_RXDCTL
	mov	r2, r9
	mov	r1, r0
	mov	r0, r7
	bl	fm10k_write_reg
	b	.L10
.L28:
	mov	r0, #7
	bl	FM10K_MAXHOLDQ
	mov	r2, r5
	mov	r1, r0
	mov	r0, r7
	bl	fm10k_write_reg
	b	.L3
.L32:
	.align	2
.L31:
	.word	FM10K_EICR_MAXHOLDTIME
	.word	FM10K_RXDCTL_WRITE_BACK_MIN_DELAY
	.word	FM10K_MAX_QUEUES_PF
	.size	fm10k_reset_drop_on_empty, .-fm10k_reset_drop_on_empty
	.comm	FM10K_RXDCTL_WRITE_BACK_MIN_DELAY,4,4
	.comm	FM10K_MAX_QUEUES_PF,4,4
	.comm	FM10K_EICR_MAXHOLDTIME,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
