	.file	"extr_hns_roce_hw_v2.c_hns_roce_v2_post_srq_recv.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hns_roce_v2_post_srq_recv, @function
hns_roce_v2_post_srq_recv:
.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
	mov	r14, rsi
	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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	edi, DWORD PTR [rdi]
	mov	QWORD PTR 32[rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	to_hr_dev@PLT
	mov	rdi, rbp
	mov	QWORD PTR 40[rsp], rax
	call	to_hr_srq@PLT
	xor	esi, esi
	mov	rbp, rax
	add	rax, 20
	mov	rdi, rax
	mov	QWORD PTR 24[rsp], rax
	call	spin_lock_irqsave@PLT
	mov	eax, DWORD PTR 4[rbp]
	mov	DWORD PTR 20[rsp], 0
	lea	r13d, -1[rax]
	and	r13d, DWORD PTR 0[rbp]
	mov	DWORD PTR 16[rsp], r13d
	test	r14, r14
	je	.L12
	lea	rax, 40[rbp]
	mov	QWORD PTR 8[rsp], rax
	.p2align 4,,10
	.p2align 3
.L9:
	xor	edi, edi
	mov	eax, DWORD PTR 8[rbp]
	cmp	DWORD PTR [r14], eax
	setg	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L22
	xor	edi, edi
	mov	eax, DWORD PTR 12[rbp]
	cmp	DWORD PTR 0[rbp], eax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L20
	mov	esi, DWORD PTR 4[rbp]
	mov	rdi, QWORD PTR 8[rsp]
	call	find_empty_entry@PLT
	movsx	r12, eax
	test	r12d, r12d
	js	.L20
	mov	esi, DWORD PTR 16[rsp]
	mov	rdi, QWORD PTR 8[rsp]
	mov	edx, r12d
	call	fill_idx_queue@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	get_srq_wqe@PLT
	mov	rbx, rax
	mov	eax, DWORD PTR [r14]
	test	eax, eax
	jle	.L13
	xor	r13d, r13d
	xor	r15d, r15d
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR 8[r14]
	add	r15d, 1
	mov	edi, DWORD PTR [rax+r13]
	call	cpu_to_le32@PLT
	mov	QWORD PTR 16[rbx+r13*2], rax
	mov	rax, QWORD PTR 8[r14]
	mov	edi, DWORD PTR 4[rax+r13]
	call	cpu_to_le32@PLT
	mov	QWORD PTR 8[rbx+r13*2], rax
	mov	rax, QWORD PTR 8[r14]
	mov	edi, DWORD PTR 8[rax+r13]
	call	cpu_to_le64@PLT
	mov	QWORD PTR [rbx+r13*2], rax
	add	r13, 12
	cmp	DWORD PTR [r14], r15d
	jg	.L7
.L6:
	cmp	DWORD PTR 8[rbp], r15d
	jg	.L23
.L8:
	mov	edx, DWORD PTR 4[r14]
	mov	rax, QWORD PTR 32[rbp]
	mov	r13d, DWORD PTR 16[rsp]
	mov	r14, QWORD PTR 16[r14]
	mov	DWORD PTR [rax+r12*4], edx
	mov	eax, DWORD PTR 4[rbp]
	add	r13d, 1
	add	DWORD PTR 20[rsp], 1
	sub	eax, 1
	and	eax, r13d
	mov	DWORD PTR 16[rsp], eax
	test	r14, r14
	jne	.L9
.L12:
	xor	r12d, r12d
.L2:
	mov	edi, DWORD PTR 20[rsp]
	call	likely@PLT
	test	rax, rax
	jne	.L24
.L10:
	mov	rdi, QWORD PTR 24[rsp]
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L23:
	.cfi_restore_state
	movsx	rsi, r15d
	mov	edi, 256
	lea	rax, [rsi+rsi*2]
	lea	rbx, [rbx+rax*8]
	mov	QWORD PTR 16[rbx], 0
	call	cpu_to_le32@PLT
	mov	QWORD PTR [rbx], 0
	mov	QWORD PTR 8[rbx], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L13:
	xor	r15d, r15d
	jmp	.L6
.L20:
	mov	rax, QWORD PTR 32[rsp]
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	edi, DWORD PTR 20[rsp]
	mov	QWORD PTR [rax], r14
	neg	r12d
	call	likely@PLT
	test	rax, rax
	je	.L10
.L24:
	mov	eax, DWORD PTR 20[rsp]
	add	DWORD PTR 0[rbp], eax
	xor	eax, eax
	call	wmb@PLT
	mov	ecx, DWORD PTR V2_DB_BYTE_4_CMD_S[rip]
	mov	edi, DWORD PTR HNS_ROCE_V2_SRQ_DB[rip]
	mov	eax, DWORD PTR 16[rbp]
	and	eax, DWORD PTR V2_DB_BYTE_4_TAG_M[rip]
	sal	edi, cl
	or	edi, eax
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	QWORD PTR 56[rsp], rax
	call	cpu_to_le32@PLT
	mov	edx, DWORD PTR 24[rbp]
	mov	rdi, QWORD PTR 40[rsp]
	lea	rsi, 48[rsp]
	mov	QWORD PTR 48[rsp], rax
	call	hns_roce_write64@PLT
	jmp	.L10
.L22:
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	rax, QWORD PTR 32[rsp]
	neg	r12d
	mov	QWORD PTR [rax], r14
	jmp	.L2
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hns_roce_v2_post_srq_recv, .-hns_roce_v2_post_srq_recv
	.comm	V2_DB_BYTE_4_TAG_M,4,4
	.comm	V2_DB_BYTE_4_CMD_S,4,4
	.comm	HNS_ROCE_V2_SRQ_DB,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_v2.c_hns_roce_v2_post_srq_recv.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hns_roce_v2_post_srq_recv, %function
hns_roce_v2_post_srq_recv:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L27
	sub	sp, sp, #44
	str	r2, [sp, #16]
	mov	r4, r0
	ldr	r0, [r0]
	mov	r10, r1
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	to_hr_dev
	mov	r2, r0
	mov	r0, r4
	str	r2, [sp, #20]
	bl	to_hr_srq
	mov	r6, r0
	add	r3, r0, #20
	mov	r0, r3
	mov	r1, #0
	str	r3, [sp, #12]
	bl	spin_lock_irqsave
	ldm	r6, {r2, r9}
	cmp	r10, #0
	sub	r9, r9, #1
	and	r9, r9, r2
	beq	.L12
	mov	r3, #0
	add	fp, r6, #32
	str	r3, [sp]
	mov	r3, fp
	mov	fp, r10
	mov	r10, r3
.L9:
	ldr	r0, [fp]
	ldr	r2, [r6, #8]
	cmp	r0, r2
	movle	r0, #0
	movgt	r0, #1
	bl	unlikely
	cmp	r0, #0
	bne	.L23
	ldr	r0, [r6]
	ldr	r2, [r6, #12]
	sub	r0, r0, r2
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	subs	r3, r0, #0
	str	r3, [sp, #4]
	bne	.L21
	mov	r0, r10
	ldr	r1, [r6, #4]
	bl	find_empty_entry
	subs	r7, r0, #0
	blt	.L21
	mov	r2, r7
	mov	r1, r9
	mov	r0, r10
	bl	fill_idx_queue
	mov	r1, r7
	mov	r0, r6
	bl	get_srq_wqe
	ldr	r2, [fp]
	str	r0, [sp, #8]
	cmp	r2, #0
	ble	.L13
	ldr	r4, [sp, #4]
	mov	r5, r0
	mov	r8, r4
.L7:
	ldr	r3, [fp, #8]
	add	r8, r8, #1
	ldr	r0, [r3, r4]
	bl	cpu_to_le32
	str	r0, [r5, #8]
	ldr	r3, [fp, #8]
	add	r3, r3, r4
	ldr	r0, [r3, #4]
	bl	cpu_to_le32
	str	r0, [r5, #4]
	ldr	r3, [fp, #8]
	add	r3, r3, r4
	ldr	r0, [r3, #8]
	bl	cpu_to_le64
	ldr	r3, [fp]
	add	r4, r4, #12
	cmp	r3, r8
	str	r0, [r5], #12
	bgt	.L7
.L6:
	ldr	r2, [r6, #8]
	cmp	r2, r8
	bgt	.L24
.L8:
	ldr	r1, [fp, #4]
	ldr	r2, [r6, #28]
	ldr	fp, [fp, #12]
	str	r1, [r2, r7, lsl #2]
	ldr	r3, [sp]
	ldr	r2, [r6, #4]
	add	r9, r9, #1
	sub	r2, r2, #1
	add	r3, r3, #1
	cmp	fp, #0
	str	r3, [sp]
	and	r9, r9, r2
	bne	.L9
.L2:
	ldr	r0, [sp]
	bl	likely
	cmp	r0, #0
	bne	.L25
.L10:
	mov	r1, #0
	ldr	r0, [sp, #12]
	bl	spin_unlock_irqrestore
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L26
	ldr	r0, [sp, #4]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L24:
	mov	r3, #0
	add	r4, r8, r8, lsl #1
	ldr	r8, [sp, #8]
	mov	r0, #256
	add	r5, r8, r4, lsl #2
	str	r3, [r5, #8]
	bl	cpu_to_le32
	mov	r3, #0
	str	r0, [r5, #4]
	str	r3, [r8, r4, lsl #2]
	b	.L8
.L13:
	ldr	r8, [sp, #4]
	b	.L6
.L21:
	mov	r10, fp
	ldr	r2, .L27+4
.L20:
	ldr	r8, [r2]
	ldr	r3, [sp, #16]
	ldr	r0, [sp]
	str	r10, [r3]
	rsb	r3, r8, #0
	str	r3, [sp, #4]
	bl	likely
	cmp	r0, #0
	beq	.L10
.L25:
	ldr	r3, [r6]
	ldr	r2, [sp]
	add	r3, r3, r2
	str	r3, [r6]
	bl	wmb
	ldr	r3, .L27+8
	ldr	r0, .L27+12
	ldr	r2, .L27+16
	ldr	r1, [r3]
	ldr	r3, [r6, #16]
	ldr	r2, [r2]
	ldr	r0, [r0]
	and	r3, r3, r1
	orr	r0, r3, r0, lsl r2
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r0, [r6]
	str	r3, [sp, #32]
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r2, [r6, #24]
	ldr	r0, [sp, #20]
	add	r1, sp, #28
	str	r3, [sp, #28]
	bl	hns_roce_write64
	b	.L10
.L23:
	mov	r10, fp
	ldr	r2, .L27+20
	b	.L20
.L12:
	str	r10, [sp]
	str	r10, [sp, #4]
	b	.L2
.L26:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC0
	.word	ENOMEM
	.word	V2_DB_BYTE_4_TAG_M
	.word	HNS_ROCE_V2_SRQ_DB
	.word	V2_DB_BYTE_4_CMD_S
	.word	EINVAL
	.size	hns_roce_v2_post_srq_recv, .-hns_roce_v2_post_srq_recv
	.comm	V2_DB_BYTE_4_TAG_M,4,4
	.comm	V2_DB_BYTE_4_CMD_S,4,4
	.comm	HNS_ROCE_V2_SRQ_DB,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
