	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_arbel_arm_cq             ## -- Begin function mthca_arbel_arm_cq
	.p2align	4, 0x90
_mthca_arbel_arm_cq:                    ## @mthca_arbel_arm_cq
	.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, %r12d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_to_mcq
	movq	%rax, %r15
	movl	(%rax), %r13d
	movl	4(%rax), %edi
	andl	$3, %r13d
	callq	_cpu_to_be32
	movl	%eax, -56(%rbp)
	movl	8(%r15), %eax
	shll	$8, %eax
	leal	(%rax,%r13,8), %edi
	movq	_IB_CQ_SOLICITED_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	movq	_IB_CQ_SOLICITED@GOTPCREL(%rip), %rbx
	xorl	%ecx, %ecx
	cmpl	(%rbx), %eax
	sete	%cl
	subl	%ecx, %edi
	addl	$2, %edi
	orl	$64, %edi
	callq	_cpu_to_be32
	movl	%eax, -52(%rbp)
	movl	12(%r15), %esi
	leaq	-56(%rbp), %rdi
	callq	_mthca_write_db_rec
	xorl	%eax, %eax
	callq	_wmb
	shll	$28, %r13d
	movq	_IB_CQ_SOLICITED_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	cmpl	(%rbx), %r12d
	jne	LBB0_1
## %bb.2:
	movq	_MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MTHCA_ARBEL_CQ_DB_REQ_NOT@GOTPCREL(%rip), %rax
LBB0_3:
	orl	(%rax), %r13d
	orl	8(%r15), %r13d
	movl	4(%r15), %r15d
	movl	(%r14), %edi
	callq	_to_mdev
	movq	_MTHCA_CQ_DOORBELL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	addq	8(%rax), %rbx
	movl	(%r14), %edi
	callq	_to_mdev
	movq	%rax, %rdi
	callq	_MTHCA_GET_DOORBELL_LOCK
	movl	%r13d, %edi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_mthca_write64
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_CQ_SOLICITED_MASK,4,2       ## @IB_CQ_SOLICITED_MASK
	.comm	_IB_CQ_SOLICITED,4,2            ## @IB_CQ_SOLICITED
	.comm	_MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL,4,2 ## @MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL
	.comm	_MTHCA_ARBEL_CQ_DB_REQ_NOT,4,2  ## @MTHCA_ARBEL_CQ_DB_REQ_NOT
	.comm	_MTHCA_CQ_DOORBELL,8,3          ## @MTHCA_CQ_DOORBELL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_arbel_arm_cq             ; -- Begin function mthca_arbel_arm_cq
	.p2align	2
_mthca_arbel_arm_cq:                    ; @mthca_arbel_arm_cq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_to_mcq
	mov	x21, x0
	ldp	w8, w0, [x0]
	and	w22, w8, #0x3
	bl	_cpu_to_be32
	str	w0, [sp]
	ldr	w8, [x21, #8]
	lsl	w9, w22, #3
	bfi	w9, w8, #8, #24
Lloh3:
	adrp	x23, _IB_CQ_SOLICITED_MASK@GOTPAGE
Lloh4:
	ldr	x23, [x23, _IB_CQ_SOLICITED_MASK@GOTPAGEOFF]
	ldr	w8, [x23]
	and	w8, w8, w20
Lloh5:
	adrp	x24, _IB_CQ_SOLICITED@GOTPAGE
Lloh6:
	ldr	x24, [x24, _IB_CQ_SOLICITED@GOTPAGEOFF]
	ldr	w10, [x24]
	cmp	w8, w10
	mov	w8, #1
	cinc	w8, w8, ne
	orr	w8, w8, w9
	orr	w0, w8, #0x40
	bl	_cpu_to_be32
	str	w0, [sp, #4]
	ldr	w1, [x21, #12]
	mov	x0, sp
	bl	_mthca_write_db_rec
	bl	_wmb
	ldr	w8, [x23]
	and	w8, w8, w20
	ldr	w9, [x24]
Lloh7:
	adrp	x10, _MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL@GOTPAGE
Lloh8:
	ldr	x10, [x10, _MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL@GOTPAGEOFF]
Lloh9:
	adrp	x11, _MTHCA_ARBEL_CQ_DB_REQ_NOT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MTHCA_ARBEL_CQ_DB_REQ_NOT@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	orr	w8, w8, w22, lsl #28
	ldp	w20, w9, [x21, #4]
	orr	w21, w8, w9
	ldr	w0, [x19]
	bl	_to_mdev
	ldr	x8, [x0, #8]
Lloh11:
	adrp	x9, _MTHCA_CQ_DOORBELL@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MTHCA_CQ_DOORBELL@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x22, x9, x8
	ldr	w0, [x19]
	bl	_to_mdev
	bl	_MTHCA_GET_DOORBELL_LOCK
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_mthca_write64
	ldr	x8, [sp, #8]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_CQ_SOLICITED_MASK,4,2       ; @IB_CQ_SOLICITED_MASK
	.comm	_IB_CQ_SOLICITED,4,2            ; @IB_CQ_SOLICITED
	.comm	_MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL,4,2 ; @MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL
	.comm	_MTHCA_ARBEL_CQ_DB_REQ_NOT,4,2  ; @MTHCA_ARBEL_CQ_DB_REQ_NOT
	.comm	_MTHCA_CQ_DOORBELL,8,3          ; @MTHCA_CQ_DOORBELL
.subsections_via_symbols
