	.file	"extr_hns_dsaf_rcb.c_hns_rcb_wait_fbd_clean.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"queue(%d) wait fbd(%d) clean fail!!\n"
	.text
	.p2align 4
	.globl	hns_rcb_wait_fbd_clean
	.type	hns_rcb_wait_fbd_clean, @function
hns_rcb_wait_fbd_clean:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	QWORD PTR 8[rsp], rdi
	test	esi, esi
	jle	.L1
	mov	r14d, esi
	mov	ebx, edx
	mov	ebp, 10001
	xor	r13d, r13d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L23:
	test	DWORD PTR RCB_INT_FLAG_RX[rip], ebx
	jne	.L5
.L9:
	add	r13d, 1
	xor	r12d, r12d
	sub	ebp, 1
	je	.L10
.L24:
	cmp	r13d, r14d
	jge	.L1
.L2:
	mov	esi, 300
	mov	edi, 200
	mov	r12d, ebx
	call	usleep_range@PLT
	and	r12d, DWORD PTR RCB_INT_FLAG_TX[rip]
	je	.L23
	mov	rcx, QWORD PTR 8[rsp]
	movsx	rax, r13d
	mov	esi, DWORD PTR RCB_RING_TX_RING_FBDNUM_REG[rip]
	lea	r15, [rcx+rax*8]
	mov	rdi, QWORD PTR [r15]
	call	dsaf_read_dev@PLT
	mov	r12d, eax
	test	DWORD PTR RCB_INT_FLAG_RX[rip], ebx
	jne	.L7
.L8:
	test	r12d, r12d
	je	.L9
	sub	ebp, 1
	jne	.L24
.L10:
	cmp	r13d, r14d
	jge	.L1
	mov	rdx, QWORD PTR 8[rsp]
	movsx	rax, r13d
	mov	ecx, r12d
	lea	rsi, .LC0[rip]
	mov	rax, QWORD PTR [rdx+rax*8]
	mov	edx, r13d
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	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
	jmp	dev_err@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdx, QWORD PTR 8[rsp]
	movsx	rax, r13d
	lea	r15, [rdx+rax*8]
.L7:
	mov	esi, DWORD PTR RCB_RING_RX_RING_FBDNUM_REG[rip]
	mov	rdi, QWORD PTR [r15]
	call	dsaf_read_dev@PLT
	add	r12d, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 24
	.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
	.cfi_endproc
.LFE0:
	.size	hns_rcb_wait_fbd_clean, .-hns_rcb_wait_fbd_clean
	.comm	RCB_RING_TX_RING_FBDNUM_REG,4,4
	.comm	RCB_RING_RX_RING_FBDNUM_REG,4,4
	.comm	RCB_INT_FLAG_TX,4,4
	.comm	RCB_INT_FLAG_RX,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_hns_dsaf_rcb.c_hns_rcb_wait_fbd_clean.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"queue(%d) wait fbd(%d) clean fail!!\012\000"
	.text
	.align	2
	.global	hns_rcb_wait_fbd_clean
	.syntax unified
	.arm
	.fpu softvfp
	.type	hns_rcb_wait_fbd_clean, %function
hns_rcb_wait_fbd_clean:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r7, r1, #0
	sub	sp, sp, #4
	ble	.L1
	mov	r8, r0
	mov	r4, r2
	mov	r5, #0
	ldr	r6, .L24
	ldr	r9, .L24+4
	ldr	r10, .L24+8
	b	.L2
.L22:
	ldr	r2, [r10]
	tst	r4, r2
	bne	.L5
.L9:
	subs	r6, r6, #1
	mov	fp, #0
	add	r5, r5, #1
	beq	.L10
.L23:
	cmp	r5, r7
	bge	.L1
.L2:
	mov	r1, #300
	mov	r0, #200
	bl	usleep_range
	ldr	r3, [r9]
	ands	fp, r4, r3
	beq	.L22
	ldr	r3, .L24+12
	ldr	r0, [r8, r5, lsl #2]
	ldr	r1, [r3]
	bl	dsaf_read_dev
	ldr	r2, [r10]
	mov	fp, r0
	tst	r4, r2
	add	r2, r8, r5, lsl #2
	bne	.L7
.L8:
	cmp	fp, #0
	beq	.L9
	subs	r6, r6, #1
	bne	.L23
.L10:
	cmp	r5, r7
	bge	.L1
	ldr	r2, [r8, r5, lsl #2]
	mov	r3, fp
	ldr	r1, [r2]
	mov	r2, r5
	ldr	r0, [r1]
	ldr	r1, .L24+16
	add	sp, sp, #4
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	dev_err
.L5:
	add	r2, r8, r5, lsl #2
.L7:
	ldr	r3, .L24+20
	ldr	r0, [r2]
	ldr	r1, [r3]
	bl	dsaf_read_dev
	add	fp, fp, r0
	b	.L8
.L1:
	add	sp, sp, #4
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	.align	2
.L24:
	.word	10001
	.word	RCB_INT_FLAG_TX
	.word	RCB_INT_FLAG_RX
	.word	RCB_RING_TX_RING_FBDNUM_REG
	.word	.LC0
	.word	RCB_RING_RX_RING_FBDNUM_REG
	.size	hns_rcb_wait_fbd_clean, .-hns_rcb_wait_fbd_clean
	.comm	RCB_RING_TX_RING_FBDNUM_REG,4,4
	.comm	RCB_RING_RX_RING_FBDNUM_REG,4,4
	.comm	RCB_INT_FLAG_TX,4,4
	.comm	RCB_INT_FLAG_RX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
