	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_cq_clean                ## -- Begin function __mlx4_cq_clean
	.p2align	4, 0x90
___mlx4_cq_clean:                       ## @__mlx4_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
	movq	%rdx, %r13
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movl	(%rdi), %r15d
	movl	4(%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	8(%r12), %eax
	addl	4(%r12), %eax
	cmpl	%eax, %ebx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%ebx
	movq	%r12, %rdi
	jmp	LBB0_1
LBB0_4:
	cmpl	4(%r12), %ebx
	jle	LBB0_22
## %bb.5:
	xorl	%r14d, %r14d
	cmpl	$64, %r15d
	sete	%r14b
	decl	%ebx
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	shlq	$4, %r14
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_10 Depth=1
	movl	4(%r15,%r14), %edi
	callq	_be16toh
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_mlx4_free_srq_wqe
LBB0_7:                                 ##   in Loop: Header=BB0_10 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
LBB0_8:                                 ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	movl	4(%r12), %eax
	leal	-1(%rbx), %ecx
	cmpl	%eax, %ebx
	movl	%ecx, %ebx
	jle	LBB0_20
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %esi
	andl	%ebx, %esi
	movq	%r12, %rdi
	callq	_get_cqe
	movq	%rax, %r15
	addq	%r14, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, 8(%r13)
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	12(%r15,%r14), %edi
	callq	_be32toh
	movq	_MLX4_CQE_QPN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	(%r13), %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_MLX4_CQE_IS_SEND_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	8(%r15,%r14), %edi
	callq	_be32toh
	movq	_MLX4_CQE_QPN_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	testq	%r13, %r13
	je	LBB0_7
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_MLX4_CQE_IS_SEND_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	jne	LBB0_7
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=1
	leal	(%rbx,%rax), %esi
	andl	8(%r12), %esi
	movq	%r12, %rdi
	callq	_get_cqe
	movq	%rax, %r15
	leaq	(%rax,%r14), %rdi
	movq	_MLX4_CQE_OWNER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	andl	(%r15,%r14), %r13d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	$16, %edx
	callq	_memcpy
	movq	_MLX4_CQE_OWNER_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%r15,%r14), %eax
	orl	%r13d, %eax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, (%r15,%r14)
	jmp	LBB0_9
LBB0_19:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_20:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%ecx, %ecx
	je	LBB0_22
## %bb.21:
	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	_mlx4_update_cons_index         ## TAILCALL
LBB0_22:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_CQE_QPN_MASK,4,2          ## @MLX4_CQE_QPN_MASK
	.comm	_MLX4_CQE_IS_SEND_MASK,4,2      ## @MLX4_CQE_IS_SEND_MASK
	.comm	_MLX4_CQE_OWNER_MASK,4,2        ## @MLX4_CQE_OWNER_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___mlx4_cq_clean                ; -- Begin function __mlx4_cq_clean
	.p2align	2
___mlx4_cq_clean:                       ; @__mlx4_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
	ldp	w23, w22, [x0]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x22
	bl	_get_sw_cqe
	cbz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	w8, w9, [x19, #4]
	add	w8, w9, w8
	cmp	w22, w8
	b.eq	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, #4]
	cmp	w22, w8
	b.le	LBB0_20
; %bb.5:
	mov	w24, #0
	cmp	w23, #64
	cset	w25, eq
	sub	w26, w22, #1
Lloh0:
	adrp	x27, _MLX4_CQE_QPN_MASK@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MLX4_CQE_QPN_MASK@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x23, x25, lsl #4
	ldr	w0, [x8, #4]
	bl	_be16toh
	mov	x1, x0
	mov	x0, x20
	bl	_mlx4_free_srq_wqe
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w24, w24, #1
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x19, #4]
	sub	w9, w26, #1
	cmp	w26, w8
	mov	x26, x9
	b.le	LBB0_18
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #8]
	and	w1, w8, w26
	mov	x0, x19
	bl	_get_cqe
	mov	x23, x0
	add	x22, x0, x25, lsl #4
	cbz	x20, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x23, x25, lsl #4
	ldr	w0, [x8, #12]
	bl	_be32toh
	ldr	w8, [x27]
	and	w8, w8, w0
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _MLX4_CQE_IS_SEND_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLX4_CQE_IS_SEND_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x22, #8]
	bl	_be32toh
	ldr	w8, [x27]
	and	w8, w8, w0
	cmp	w8, w21
	b.ne	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	cbz	x20, LBB0_7
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x22]
Lloh5:
	adrp	x9, _MLX4_CQE_IS_SEND_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MLX4_CQE_IS_SEND_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
	b	LBB0_6
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
	cbz	w24, LBB0_8
; %bb.17:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x19, #8]
	add	w9, w26, w24
	and	w1, w8, w9
	mov	x0, x19
	bl	_get_cqe
	add	x23, x0, x25, lsl #4
	ldr	w8, [x23]
Lloh8:
	adrp	x9, _MLX4_CQE_OWNER_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MLX4_CQE_OWNER_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w28, w9, w8
	mov	x0, x23
	mov	x1, x22
	mov	w2, #16
	bl	_memcpy
	ldr	w8, [x23]
Lloh11:
	adrp	x9, _MLX4_CQE_OWNER_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MLX4_CQE_OWNER_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	bic	w8, w8, w9
	orr	w8, w8, w28
	str	w8, [x23]
	b	LBB0_8
LBB0_18:
	cbz	w24, LBB0_20
; %bb.19:
	add	w8, w8, w24
	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	_mlx4_update_cons_index
LBB0_20:
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_CQE_QPN_MASK,4,2          ; @MLX4_CQE_QPN_MASK
	.comm	_MLX4_CQE_IS_SEND_MASK,4,2      ; @MLX4_CQE_IS_SEND_MASK
	.comm	_MLX4_CQE_OWNER_MASK,4,2        ; @MLX4_CQE_OWNER_MASK
.subsections_via_symbols
