	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_cq_event                 ## -- Begin function mthca_cq_event
	.p2align	4, 0x90
_mthca_cq_event:                        ## @mthca_cq_event
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_spin_lock
	leaq	4(%rbx), %rdi
	movl	12(%rbx), %esi
	decl	%esi
	andl	%r12d, %esi
	callq	_mthca_array_get
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	incl	4(%rax)
	movq	%rbx, %rdi
	callq	_spin_unlock
	leaq	8(%rbx), %rax
	movq	%rax, -40(%rbp)
	movl	%r15d, -56(%rbp)
	movq	%r14, %rcx
	addq	$8, %rcx
	movq	%rcx, -48(%rbp)
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%rcx), %esi
	leaq	-56(%rbp), %rdi
	callq	*%rax
LBB0_3:
	movq	%rbx, %rdi
	callq	_spin_lock
	decl	4(%r14)
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_wake_up
LBB0_5:
	movq	%rbx, %rdi
	callq	_spin_unlock
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	callq	_spin_unlock
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mthca_warn                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Async event for bogus CQ %08x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_cq_event                 ; -- Begin function mthca_cq_event
	.p2align	2
_mthca_cq_event:                        ; @mthca_cq_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_spin_lock
	add	x0, x19, #4
	ldr	w8, [x19, #12]
	sub	w8, w8, #1
	and	w1, w8, w22
	bl	_mthca_array_get
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0, #4]
	add	w8, w8, #1
	str	w8, [x0, #4]
	mov	x0, x19
	bl	_spin_unlock
	add	x8, x19, #8
	str	w21, [sp, #8]
	add	x9, x20, #8
	stp	x9, x8, [sp, #16]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	w1, [x9]
	add	x0, sp, #8
	blr	x8
LBB0_3:
	mov	x0, x19
	bl	_spin_lock
	ldr	w8, [x20, #4]
	subs	w8, w8, #1
	str	w8, [x20, #4]
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_wake_up
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_mthca_warn
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Async event for bogus CQ %08x\n"

.subsections_via_symbols
