	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx5_cq_clean                ## -- Begin function __mlx5_cq_clean
	.p2align	4, 0x90
___mlx5_cq_clean:                       ## @__mlx5_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.1:
	movq	%rdi, %r12
	movq	_MLX5_CQ_FLAGS_DV_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_17
## %bb.2:
	movq	%rdx, %r15
	movl	%esi, %r13d
	movl	4(%r12), %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_get_sw_cqe
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	12(%r12), %eax
	addl	4(%r12), %eax
	cmpl	%eax, %ebx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	jmp	LBB0_3
LBB0_6:
	movl	16(%r12), %edi
	callq	_to_mctx
	cmpl	4(%r12), %ebx
	jle	LBB0_17
## %bb.7:
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	decl	%ebx
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
LBB0_9:                                 ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	4(%r12), %eax
	leal	-1(%rbx), %ecx
	cmpl	%eax, %ebx
	movl	%ecx, %ebx
	jle	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	12(%r12), %esi
	andl	%ebx, %esi
	movq	%r12, %rdi
	callq	_get_cqe
	xorl	%edi, %edi
	cmpl	$64, 8(%r12)
	movq	%rax, %r14
	setne	%dil
	shlq	$6, %rdi
	addq	%rax, %rdi
	movl	%r13d, %esi
	movq	%r15, %rdx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	callq	_free_res_cqe
	testq	%rax, %rax
	jne	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	leal	(%rbx,%rax), %esi
	andl	12(%r12), %esi
	movq	%r12, %rdi
	callq	_get_cqe
	movq	%rax, %rcx
	movl	8(%r12), %edx
	xorl	%r13d, %r13d
	cmpl	$64, %edx
	setne	%r13b
	shlq	$6, %r13
	movq	_MLX5_CQE_OWNER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	andl	(%rcx,%r13), %r15d
	movq	%rcx, %rdi
	movq	%r14, %rsi
	callq	_memcpy
	movq	_MLX5_CQE_OWNER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	andl	(%rcx,%r13), %eax
	orl	%r15d, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, (%rcx,%r13)
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_10
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_15:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.16:
	addl	%ecx, %eax
	movl	%eax, 4(%r12)
	xorl	%eax, %eax
	callq	_udma_to_device_barrier
	movq	%r12, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_update_cons_index              ## TAILCALL
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_CQ_FLAGS_DV_OWNED,4,2     ## @MLX5_CQ_FLAGS_DV_OWNED
	.comm	_MLX5_CQE_OWNER_MASK,4,2        ## @MLX5_CQE_OWNER_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx5_cq_clean                ; -- Begin function __mlx5_cq_clean
	.p2align	2
___mlx5_cq_clean:                       ; @__mlx5_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
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MLX5_CQ_FLAGS_DV_OWNED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX5_CQ_FLAGS_DV_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.2:
	mov	x20, x2
	mov	x21, x1
	ldr	w23, [x19, #4]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_get_sw_cqe
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19, #4]
	ldr	w9, [x19, #12]
	add	w8, w9, w8
	cmp	w23, w8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	b	LBB0_3
LBB0_6:
	ldr	w0, [x19, #16]
	bl	_to_mctx
	ldr	w8, [x19, #4]
	cmp	w23, w8
	b.le	LBB0_15
; %bb.7:
	mov	w25, #0
	ldr	w22, [x0]
	sub	w26, w23, #1
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w25, w25, #1
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19, #4]
	sub	w9, w26, #1
	cmp	w26, w8
	mov	x26, x9
	b.le	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #12]
	and	w1, w8, w26
	mov	x0, x19
	bl	_get_cqe
	mov	x23, x0
	ldr	w8, [x19, #8]
	cmp	w8, #64
	cset	w8, ne
	add	x0, x0, x8, lsl #6
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	bl	_free_res_cqe
	cbnz	x0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	cbz	w25, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19, #12]
	add	w9, w26, w25
	and	w1, w8, w9
	mov	x0, x19
	bl	_get_cqe
	mov	x24, x0
	ldr	w2, [x19, #8]
	cmp	w2, #64
	cset	w8, ne
	lsl	x28, x8, #6
	ldr	w8, [x0, x28]
Lloh3:
	adrp	x9, _MLX5_CQE_OWNER_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX5_CQE_OWNER_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w27, w9, w8
	mov	x1, x23
	bl	_memcpy
	ldr	w8, [x24, x28]
Lloh6:
	adrp	x9, _MLX5_CQE_OWNER_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLX5_CQE_OWNER_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	bic	w8, w8, w9
	orr	w8, w8, w27
	str	w8, [x24, x28]
	b	LBB0_9
LBB0_13:
	cbz	w25, LBB0_15
; %bb.14:
	add	w8, w8, w25
	str	w8, [x19, #4]
	bl	_udma_to_device_barrier
	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	_update_cons_index
LBB0_15:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_CQ_FLAGS_DV_OWNED,4,2     ; @MLX5_CQ_FLAGS_DV_OWNED
	.comm	_MLX5_CQE_OWNER_MASK,4,2        ; @MLX5_CQE_OWNER_MASK
.subsections_via_symbols
