	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __hns_roce_v2_cq_clean
___hns_roce_v2_cq_clean:                ## @__hns_roce_v2_cq_clean
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	(%rdi), %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %esi
	callq	_get_sw_cqe_v2
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%r12), %eax
	addl	(%r12), %eax
	cmpl	%eax, %ebx
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	movq	%r12, %rdi
	jmp	LBB0_1
LBB0_4:
	cmpl	(%r12), %ebx
	jle	LBB0_18
## %bb.5:
	decl	%ebx
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r12), %eax
	leal	-1(%rbx), %ecx
	cmpl	%eax, %ebx
	movl	%ecx, %ebx
	jle	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r12), %esi
	andl	%ebx, %esi
	movq	%r12, %rdi
	callq	_get_cqe_v2
	movq	%rax, %r13
	movl	4(%rax), %edi
	movq	_V2_CQE_BYTE_16_LCL_QPN_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_V2_CQE_BYTE_16_LCL_QPN_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_roce_get_field
	movq	_HNS_ROCE_V2_CQE_QPN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	%r15d, %eax
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	testq	%r14, %r14
	je	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r13), %edi
	movq	_V2_CQE_BYTE_4_S_R_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_roce_get_bit
	testq	%rax, %rax
	je	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r13), %edi
	movq	_V2_CQE_BYTE_4_WQE_INDX_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_V2_CQE_BYTE_4_WQE_INDX_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_roce_get_field
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_hns_roce_free_srq_wqe
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	leal	(%rbx,%rax), %esi
	andl	4(%r12), %esi
	movq	%r12, %rdi
	callq	_get_cqe_v2
	movq	%rax, %r14
	movl	(%rax), %edi
	movq	_V2_CQE_BYTE_4_OWNER_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_roce_get_bit
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_memcpy
	movl	(%r14), %edi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	_V2_CQE_BYTE_4_OWNER_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	callq	_roce_set_bit
	jmp	LBB0_8
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_16:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%ecx, %ecx
	je	LBB0_18
## %bb.17:
	addl	%ecx, %eax
	movl	%eax, (%r12)
	xorl	%eax, %eax
	callq	_wmb
	movl	(%r12), %esi
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hns_roce_v2_cq_set_ci          ## TAILCALL
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V2_CQE_BYTE_16_LCL_QPN_M,4,2   ## @V2_CQE_BYTE_16_LCL_QPN_M
	.comm	_V2_CQE_BYTE_16_LCL_QPN_S,4,2   ## @V2_CQE_BYTE_16_LCL_QPN_S
	.comm	_HNS_ROCE_V2_CQE_QPN_MASK,4,2   ## @HNS_ROCE_V2_CQE_QPN_MASK
	.comm	_V2_CQE_BYTE_4_S_R_S,4,2        ## @V2_CQE_BYTE_4_S_R_S
	.comm	_V2_CQE_BYTE_4_WQE_INDX_M,4,2   ## @V2_CQE_BYTE_4_WQE_INDX_M
	.comm	_V2_CQE_BYTE_4_WQE_INDX_S,4,2   ## @V2_CQE_BYTE_4_WQE_INDX_S
	.comm	_V2_CQE_BYTE_4_OWNER_S,4,2      ## @V2_CQE_BYTE_4_OWNER_S
	.no_dead_strip	___hns_roce_v2_cq_clean
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __hns_roce_v2_cq_clean
___hns_roce_v2_cq_clean:                ; @__hns_roce_v2_cq_clean
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w22, [x0]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x22
	bl	_get_sw_cqe_v2
	cbz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	w8, w9, [x19]
	add	w8, w9, w8
	cmp	w22, w8
	b.gt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w22, w22, #1
	mov	x0, x19
	b	LBB0_1
LBB0_4:
	ldr	w8, [x19]
	cmp	w22, w8
	b.le	LBB0_16
; %bb.5:
	mov	w28, #0
	sub	w26, w22, #1
Lloh0:
	adrp	x23, _V2_CQE_BYTE_16_LCL_QPN_M@GOTPAGE
Lloh1:
	ldr	x23, [x23, _V2_CQE_BYTE_16_LCL_QPN_M@GOTPAGEOFF]
Lloh2:
	adrp	x24, _V2_CQE_BYTE_16_LCL_QPN_S@GOTPAGE
Lloh3:
	ldr	x24, [x24, _V2_CQE_BYTE_16_LCL_QPN_S@GOTPAGEOFF]
Lloh4:
	adrp	x27, _HNS_ROCE_V2_CQE_QPN_MASK@GOTPAGE
Lloh5:
	ldr	x27, [x27, _HNS_ROCE_V2_CQE_QPN_MASK@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w28, w28, #1
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x19]
	sub	w9, w26, #1
	cmp	w26, w8
	mov	x26, x9
	b.le	LBB0_14
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	and	w1, w8, w26
	mov	x0, x19
	bl	_get_cqe_v2
	mov	x22, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x23]
	ldr	w2, [x24]
	bl	_roce_get_field
	ldr	w8, [x27]
	and	w8, w8, w0
	cmp	w8, w21
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cbz	x20, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x22]
Lloh6:
	adrp	x8, _V2_CQE_BYTE_4_S_R_S@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V2_CQE_BYTE_4_S_R_S@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_roce_get_bit
	cbz	x0, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x22]
Lloh9:
	adrp	x8, _V2_CQE_BYTE_4_WQE_INDX_M@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V2_CQE_BYTE_4_WQE_INDX_M@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _V2_CQE_BYTE_4_WQE_INDX_S@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V2_CQE_BYTE_4_WQE_INDX_S@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_roce_get_field
	mov	x1, x0
	mov	x0, x20
	bl	_hns_roce_free_srq_wqe
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	cbz	w28, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x19, #4]
	add	w9, w26, w28
	and	w1, w8, w9
	mov	x0, x19
	bl	_get_cqe_v2
	mov	x23, x0
	ldr	w0, [x0]
Lloh15:
	adrp	x8, _V2_CQE_BYTE_4_OWNER_S@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V2_CQE_BYTE_4_OWNER_S@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_roce_get_bit
	mov	x25, x21
	mov	x21, x20
	mov	x20, x27
	mov	x27, x24
	mov	x24, x0
	mov	x0, x23
	mov	x1, x22
	mov	w2, #8
	bl	_memcpy
	ldr	w0, [x23]
Lloh18:
	adrp	x23, _V2_CQE_BYTE_16_LCL_QPN_M@GOTPAGE
Lloh19:
	ldr	x23, [x23, _V2_CQE_BYTE_16_LCL_QPN_M@GOTPAGEOFF]
Lloh20:
	adrp	x8, _V2_CQE_BYTE_4_OWNER_S@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V2_CQE_BYTE_4_OWNER_S@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x2, x24
	mov	x24, x27
	mov	x27, x20
	mov	x20, x21
	mov	x21, x25
	bl	_roce_set_bit
	b	LBB0_7
LBB0_14:
	cbz	w28, LBB0_16
; %bb.15:
	add	w8, w8, w28
	str	w8, [x19]
	bl	_wmb
	ldr	w1, [x19]
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_hns_roce_v2_cq_set_ci
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_V2_CQE_BYTE_16_LCL_QPN_M,4,2   ; @V2_CQE_BYTE_16_LCL_QPN_M
	.comm	_V2_CQE_BYTE_16_LCL_QPN_S,4,2   ; @V2_CQE_BYTE_16_LCL_QPN_S
	.comm	_HNS_ROCE_V2_CQE_QPN_MASK,4,2   ; @HNS_ROCE_V2_CQE_QPN_MASK
	.comm	_V2_CQE_BYTE_4_S_R_S,4,2        ; @V2_CQE_BYTE_4_S_R_S
	.comm	_V2_CQE_BYTE_4_WQE_INDX_M,4,2   ; @V2_CQE_BYTE_4_WQE_INDX_M
	.comm	_V2_CQE_BYTE_4_WQE_INDX_S,4,2   ; @V2_CQE_BYTE_4_WQE_INDX_S
	.comm	_V2_CQE_BYTE_4_OWNER_S,4,2      ; @V2_CQE_BYTE_4_OWNER_S
	.no_dead_strip	___hns_roce_v2_cq_clean
.subsections_via_symbols
