	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __hns_roce_v1_cq_clean
___hns_roce_v1_cq_clean:                ## @__hns_roce_v1_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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	(%rdi), %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %esi
	callq	_get_sw_cqe
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%r15), %eax
	addl	(%r15), %eax
	cmpl	%eax, %ebx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	movq	%r15, %rdi
	jmp	LBB0_1
LBB0_4:
	cmpl	(%r15), %ebx
	jle	LBB0_13
## %bb.5:
	decl	%ebx
	xorl	%r13d, %r13d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r13d
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r15), %eax
	leal	-1(%rbx), %ecx
	cmpl	%eax, %ebx
	movl	%ecx, %ebx
	jle	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %esi
	andl	%ebx, %esi
	movq	%r15, %rdi
	callq	_get_cqe
	movq	%rax, %r12
	movl	4(%rax), %edi
	movq	_CQE_BYTE_16_LOCAL_QPN_M@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CQE_BYTE_16_LOCAL_QPN_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_roce_get_field
	movq	_HNS_ROCE_CQE_QPN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	%r14d, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	testl	%r13d, %r13d
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	leal	(%rbx,%r13), %esi
	andl	4(%r15), %esi
	movq	%r15, %rdi
	callq	_get_cqe
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r13
	movl	(%rax), %edi
	movq	_CQE_BYTE_4_OWNER_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_roce_get_bit
	movl	%eax, %r14d
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	$8, %edx
	callq	_memcpy
	movl	(%r13), %edi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	_CQE_BYTE_4_OWNER_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	callq	_roce_set_bit
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_12:
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.14:
	addl	%r13d, %eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
	callq	_wmb
	movl	(%r15), %esi
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hns_roce_v1_cq_set_ci          ## TAILCALL
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CQE_BYTE_16_LOCAL_QPN_M,4,2    ## @CQE_BYTE_16_LOCAL_QPN_M
	.comm	_CQE_BYTE_16_LOCAL_QPN_S,4,2    ## @CQE_BYTE_16_LOCAL_QPN_S
	.comm	_HNS_ROCE_CQE_QPN_MASK,4,2      ## @HNS_ROCE_CQE_QPN_MASK
	.comm	_CQE_BYTE_4_OWNER_S,4,2         ## @CQE_BYTE_4_OWNER_S
	.no_dead_strip	___hns_roce_v1_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_v1_cq_clean
___hns_roce_v1_cq_clean:                ; @__hns_roce_v1_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, x1
	mov	x19, x0
	ldr	w21, [x0]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x21
	bl	_get_sw_cqe
	cbz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	w8, w9, [x19]
	add	w8, w9, w8
	cmp	w21, w8
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w21, w21, #1
	mov	x0, x19
	b	LBB0_1
LBB0_4:
	ldr	w8, [x19]
	cmp	w21, w8
	b.le	LBB0_13
; %bb.5:
	mov	w24, #0
	sub	w25, w21, #1
Lloh0:
	adrp	x27, _CQE_BYTE_16_LOCAL_QPN_M@GOTPAGE
Lloh1:
	ldr	x27, [x27, _CQE_BYTE_16_LOCAL_QPN_M@GOTPAGEOFF]
Lloh2:
	adrp	x28, _CQE_BYTE_16_LOCAL_QPN_S@GOTPAGE
Lloh3:
	ldr	x28, [x28, _CQE_BYTE_16_LOCAL_QPN_S@GOTPAGEOFF]
Lloh4:
	adrp	x26, _HNS_ROCE_CQE_QPN_MASK@GOTPAGE
Lloh5:
	ldr	x26, [x26, _HNS_ROCE_CQE_QPN_MASK@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w24, w24, #1
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x19]
	sub	w9, w25, #1
	cmp	w25, w8
	mov	x25, x9
	b.le	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	and	w1, w8, w25
	mov	x0, x19
	bl	_get_cqe
	mov	x21, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x27]
	ldr	w2, [x28]
	bl	_roce_get_field
	ldr	w8, [x26]
	and	w8, w8, w0
	cmp	w8, w20
	b.eq	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cbz	w24, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x19, #4]
	add	w9, w25, w24
	and	w1, w8, w9
	mov	x0, x19
	bl	_get_cqe
	mov	x22, x0
	ldr	w0, [x0]
Lloh6:
	adrp	x8, _CQE_BYTE_4_OWNER_S@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CQE_BYTE_4_OWNER_S@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_roce_get_bit
	mov	x23, x0
	mov	x0, x22
	mov	x1, x21
	mov	w2, #8
	bl	_memcpy
	ldr	w0, [x22]
Lloh9:
	adrp	x8, _CQE_BYTE_4_OWNER_S@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CQE_BYTE_4_OWNER_S@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, x23
	bl	_roce_set_bit
	b	LBB0_7
LBB0_11:
	cbz	w24, LBB0_13
; %bb.12:
	add	w8, w8, w24
	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_v1_cq_set_ci
LBB0_13:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CQE_BYTE_16_LOCAL_QPN_M,4,2    ; @CQE_BYTE_16_LOCAL_QPN_M
	.comm	_CQE_BYTE_16_LOCAL_QPN_S,4,2    ; @CQE_BYTE_16_LOCAL_QPN_S
	.comm	_HNS_ROCE_CQE_QPN_MASK,4,2      ; @HNS_ROCE_CQE_QPN_MASK
	.comm	_CQE_BYTE_4_OWNER_S,4,2         ; @CQE_BYTE_4_OWNER_S
	.no_dead_strip	___hns_roce_v1_cq_clean
.subsections_via_symbols
