	.file	"extr_hns_roce_hw_v1.c_hns_roce_v1_destroy_cq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Destroy cq 0x%lx timeout!\n"
	.text
	.p2align 4
	.type	hns_roce_v1_destroy_cq, @function
hns_roce_v1_destroy_cq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	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
	xor	ebx, ebx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR 4[rdi]
	call	to_hr_dev@PLT
	mov	rdi, r14
	mov	rbp, rax
	call	to_hr_cq@PLT
	mov	rdi, rbp
	mov	r13, rax
	mov	rax, QWORD PTR 8[rbp]
	mov	rsi, r13
	mov	QWORD PTR 8[rsp], rax
	call	hns_roce_free_cq@PLT
	mov	esi, DWORD PTR ROCEE_SCAEP_WR_CQE_CNT[rip]
	mov	rdi, rbp
	call	roce_read@PLT
	movsx	r12, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, DWORD PTR ROCEE_SCAEP_WR_CQE_CNT[rip]
	mov	rdi, rbp
	call	roce_read@PLT
	cdqe
	sub	rax, r12
	cmp	rax, QWORD PTR HNS_ROCE_MIN_CQE_CNT[rip]
	jge	.L4
	mov	edi, DWORD PTR HNS_ROCE_EACH_FREE_CQ_WAIT_MSECS[rip]
	call	msleep@PLT
	cmp	DWORD PTR HNS_ROCE_MAX_FREE_CQ_WAIT_CNT[rip], ebx
	jl	.L9
	add	ebx, 1
.L5:
	mov	esi, DWORD PTR ROCEE_CAEP_CQE_WCMD_EMPTY[rip]
	mov	rdi, rbp
	call	roce_read@PLT
	test	DWORD PTR HNS_ROCE_CQE_WCMD_EMPTY_BIT[rip], eax
	je	.L10
.L4:
	mov	rdi, rbp
	lea	rsi, 4[r13]
	call	hns_roce_mtt_cleanup@PLT
	mov	edi, DWORD PTR 8[r13]
	call	ib_umem_release@PLT
	test	r15, r15
	je	.L11
	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
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edx, DWORD PTR 12[r13]
	mov	rdi, QWORD PTR 8[rsp]
	lea	rsi, .LC0[rip]
	call	dev_warn@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	mov	esi, DWORD PTR [r14]
	mov	rdx, r13
	mov	rdi, rbp
	add	esi, 1
	imul	esi, DWORD PTR 0[rbp]
	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
	movsx	rsi, esi
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	hns_roce_buf_free@PLT
	.cfi_endproc
.LFE0:
	.size	hns_roce_v1_destroy_cq, .-hns_roce_v1_destroy_cq
	.comm	ROCEE_SCAEP_WR_CQE_CNT,4,4
	.comm	ROCEE_CAEP_CQE_WCMD_EMPTY,4,4
	.comm	HNS_ROCE_MIN_CQE_CNT,8,8
	.comm	HNS_ROCE_MAX_FREE_CQ_WAIT_CNT,4,4
	.comm	HNS_ROCE_EACH_FREE_CQ_WAIT_MSECS,4,4
	.comm	HNS_ROCE_CQE_WCMD_EMPTY_BIT,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_roce_hw_v1.c_hns_roce_v1_destroy_cq.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Destroy cq 0x%lx timeout!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hns_roce_v1_destroy_cq, %function
hns_roce_v1_destroy_cq:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	mov	r4, r0
	str	r0, [sp, #12]
	ldr	r0, [r0, #4]
	str	r1, [sp, #4]
	bl	to_hr_dev
	mov	r5, r0
	mov	r0, r4
	bl	to_hr_cq
	ldr	r7, .L14
	ldr	r3, [r5, #4]
	mov	r1, r0
	str	r0, [sp]
	mov	r0, r5
	str	r3, [sp, #8]
	bl	hns_roce_free_cq
	mov	r0, r5
	ldr	r1, [r7]
	bl	roce_read
	mov	r4, #0
	mov	r6, r0
	ldr	r9, .L14+4
	ldr	r8, .L14+8
	ldr	r10, .L14+12
	ldr	fp, .L14+16
	b	.L5
.L12:
	mov	r0, r5
	ldr	r1, [r7]
	bl	roce_read
	ldr	r3, [r10]
	sub	r0, r0, r6
	cmp	r0, r3
	bge	.L4
	ldr	r3, .L14+20
	ldr	r0, [r3]
	bl	msleep
	ldr	r3, [fp]
	cmp	r3, r4
	blt	.L11
	add	r4, r4, #1
.L5:
	mov	r0, r5
	ldr	r1, [r9]
	bl	roce_read
	ldr	r3, [r8]
	tst	r0, r3
	beq	.L12
.L4:
	ldr	r4, [sp]
	mov	r0, r5
	add	r1, r4, #4
	bl	hns_roce_mtt_cleanup
	ldr	r0, [r4, #8]
	bl	ib_umem_release
	ldr	r3, [sp, #4]
	cmp	r3, #0
	beq	.L13
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r3, [sp]
	ldr	r0, [sp, #8]
	ldr	r2, [r3, #12]
	ldr	r1, .L14+24
	bl	dev_warn
	b	.L4
.L13:
	mov	r0, r5
	ldr	r3, [sp, #12]
	ldr	r1, [r5]
	ldr	r3, [r3]
	ldr	r2, [sp]
	add	r3, r3, #1
	mul	r1, r3, r1
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	hns_roce_buf_free
.L15:
	.align	2
.L14:
	.word	ROCEE_SCAEP_WR_CQE_CNT
	.word	ROCEE_CAEP_CQE_WCMD_EMPTY
	.word	HNS_ROCE_CQE_WCMD_EMPTY_BIT
	.word	HNS_ROCE_MIN_CQE_CNT
	.word	HNS_ROCE_MAX_FREE_CQ_WAIT_CNT
	.word	HNS_ROCE_EACH_FREE_CQ_WAIT_MSECS
	.word	.LC0
	.size	hns_roce_v1_destroy_cq, .-hns_roce_v1_destroy_cq
	.comm	ROCEE_SCAEP_WR_CQE_CNT,4,4
	.comm	ROCEE_CAEP_CQE_WCMD_EMPTY,4,4
	.comm	HNS_ROCE_MIN_CQE_CNT,4,4
	.comm	HNS_ROCE_MAX_FREE_CQ_WAIT_CNT,4,4
	.comm	HNS_ROCE_EACH_FREE_CQ_WAIT_MSECS,4,4
	.comm	HNS_ROCE_CQE_WCMD_EMPTY_BIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
