	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_cq_free                   ## -- Begin function mlx4_cq_free
	.p2align	4, 0x90
_mlx4_cq_free:                          ## @mlx4_cq_free
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_mlx4_priv
	movq	%rax, %r15
	movl	(%r12), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mlx4_HW2SW_CQ
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_mlx4_warn
LBB0_2:
	leaq	8(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	%r15, %rdi
	addq	$12, %rdi
	movl	(%r12), %esi
	callq	_radix_tree_delete
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	(%r15), %rbx
	movl	12(%r12), %edi
	callq	_MLX4_CQ_TO_EQ_VECTOR
	movq	(%rbx,%rax,8), %rdi
	callq	_synchronize_irq
	movq	(%r15), %rbx
	movl	12(%r12), %edi
	callq	_MLX4_CQ_TO_EQ_VECTOR
	movq	(%r15), %rcx
	movq	_MLX4_EQ_ASYNC@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rdi
	cmpq	%rdi, (%rbx,%rax,8)
	je	LBB0_4
## %bb.3:
	callq	_synchronize_irq
LBB0_4:
	leaq	8(%r12), %rdi
	callq	_refcount_dec_and_test
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	4(%r12), %rdi
	callq	_complete
LBB0_6:
	leaq	4(%r12), %rdi
	callq	_wait_for_completion
	movl	(%r12), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_cq_free_icm               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HW2SW_CQ failed (%d) for CQN %06x\n"

	.comm	_MLX4_EQ_ASYNC,8,3              ## @MLX4_EQ_ASYNC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_cq_free                   ; -- Begin function mlx4_cq_free
	.p2align	2
_mlx4_cq_free:                          ; @mlx4_cq_free
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_mlx4_priv
	mov	x21, x0
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, #0
	bl	_mlx4_HW2SW_CQ
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	w3, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx4_warn
LBB0_2:
	add	x22, x21, #8
	mov	x0, x22
	bl	_spin_lock
	add	x0, x21, #12
	ldr	w1, [x20]
	bl	_radix_tree_delete
	mov	x0, x22
	bl	_spin_unlock
	ldr	x22, [x21]
	ldr	w0, [x20, #12]
	bl	_MLX4_CQ_TO_EQ_VECTOR
	ldr	x0, [x22, x0, lsl #3]
	bl	_synchronize_irq
	ldr	x22, [x21]
	ldr	w0, [x20, #12]
	bl	_MLX4_CQ_TO_EQ_VECTOR
	ldr	x8, [x22, x0, lsl #3]
	ldr	x9, [x21]
Lloh2:
	adrp	x10, _MLX4_EQ_ASYNC@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MLX4_EQ_ASYNC@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	ldr	x0, [x9, x10, lsl #3]
	cmp	x8, x0
	b.eq	LBB0_4
; %bb.3:
	bl	_synchronize_irq
LBB0_4:
	add	x0, x20, #8
	bl	_refcount_dec_and_test
	cbz	x0, LBB0_6
; %bb.5:
	add	x0, x20, #4
	bl	_complete
LBB0_6:
	add	x0, x20, #4
	bl	_wait_for_completion
	ldr	w1, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mlx4_cq_free_icm
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HW2SW_CQ failed (%d) for CQN %06x\n"

	.comm	_MLX4_EQ_ASYNC,8,3              ; @MLX4_EQ_ASYNC
.subsections_via_symbols
