	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_arm_cq                    ## -- Begin function mlx4_arm_cq
	.p2align	4, 0x90
_mlx4_arm_cq:                           ## @mlx4_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, %r13d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_to_mcq
	movq	%rax, %r12
	movl	(%rax), %ebx
	movl	$16777215, %r15d                ## imm = 0xFFFFFF
	andl	4(%rax), %r15d
	testl	%r13d, %r13d
	jne	LBB0_1
## %bb.2:
	movq	_MLX4_CQ_DB_REQ_NOT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_MLX4_CQ_DB_REQ_NOT_SOL@GOTPCREL(%rip), %rax
LBB0_3:
	andl	$3, %ebx
	shll	$28, %ebx
	orl	(%rax), %ebx
	movl	%ebx, %edi
	orl	%r15d, %edi
	callq	_htobe32
	movq	16(%r12), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	callq	_udma_to_device_barrier
	orl	8(%r12), %ebx
	movl	%ebx, %edi
	callq	_htobe32
	movl	%eax, -56(%rbp)
	movl	%r15d, %edi
	callq	_htobe32
	movl	%eax, -52(%rbp)
	movl	(%r14), %edi
	callq	_to_mctx
	movq	_MLX4_CQ_DOORBELL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-56(%rbp), %rdi
	movl	%eax, %esi
	callq	_mlx4_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	_MLX4_CQ_DB_REQ_NOT_SOL,4,2     ## @MLX4_CQ_DB_REQ_NOT_SOL
	.comm	_MLX4_CQ_DB_REQ_NOT,4,2         ## @MLX4_CQ_DB_REQ_NOT
	.comm	_MLX4_CQ_DOORBELL,4,2           ## @MLX4_CQ_DOORBELL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_arm_cq                    ; -- Begin function mlx4_arm_cq
	.p2align	2
_mlx4_arm_cq:                           ; @mlx4_arm_cq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x20, 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, w9, [x0]
	and	w22, w9, #0xffffff
Lloh3:
	adrp	x9, _MLX4_CQ_DB_REQ_NOT_SOL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_CQ_DB_REQ_NOT_SOL@GOTPAGEOFF]
Lloh5:
	adrp	x10, _MLX4_CQ_DB_REQ_NOT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MLX4_CQ_DB_REQ_NOT@GOTPAGEOFF]
	cmp	w19, #0
	csel	x9, x10, x9, eq
	ldr	w9, [x9]
	ubfiz	w8, w8, #28, #2
	orr	w19, w9, w8
	orr	w0, w19, w22
	bl	_htobe32
	ldr	x8, [x21, #16]
	str	x0, [x8]
	bl	_udma_to_device_barrier
	ldr	w8, [x21, #8]
	orr	w0, w8, w19
	bl	_htobe32
	str	w0, [sp]
	mov	x0, x22
	bl	_htobe32
	str	w0, [sp, #4]
	ldr	w0, [x20]
	bl	_to_mctx
	mov	x1, x0
Lloh7:
	adrp	x8, _MLX4_CQ_DOORBELL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MLX4_CQ_DOORBELL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, sp
	bl	_mlx4_write64
	ldr	x8, [sp, #8]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_CQ_DB_REQ_NOT_SOL,4,2     ; @MLX4_CQ_DB_REQ_NOT_SOL
	.comm	_MLX4_CQ_DB_REQ_NOT,4,2         ; @MLX4_CQ_DB_REQ_NOT
	.comm	_MLX4_CQ_DOORBELL,4,2           ; @MLX4_CQ_DOORBELL
.subsections_via_symbols
