	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_arm_cq                  ## -- Begin function ocrdma_arm_cq
	.p2align	4, 0x90
_ocrdma_arm_cq:                         ## @ocrdma_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	callq	_get_ocrdma_cq
	movq	%rax, %rbx
	movl	(%rax), %r14d
	movq	32(%rax), %r12
	movq	%rax, %r15
	addq	$20, %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_IB_CQ_NEXT_COMP@GOTPCREL(%rip), %rcx
	movq	_IB_CQ_SOLICITED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r13d, (%rcx)
	je	LBB0_1
## %bb.3:
	movl	$1, 4(%rbx)
	testl	%r13d, %eax
	jne	LBB0_4
	jmp	LBB0_5
LBB0_1:
	testl	%r13d, %eax
	je	LBB0_5
## %bb.2:
	movl	$1, 4(%rbx)
LBB0_4:
	movl	$1, 8(%rbx)
LBB0_5:
	movslq	12(%rbx), %rsi
	shlq	$2, %rsi
	addq	24(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_is_cqe_valid
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	cmpl	$0, 16(%rbx)
	je	LBB0_8
LBB0_7:
	movl	$0, 16(%rbx)
	movl	4(%rbx), %edx
	movl	8(%rbx), %ecx
	movq	%r12, %rdi
	movl	%r14d, %esi
	xorl	%r8d, %r8d
	callq	_ocrdma_ring_cq_db
LBB0_8:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_CQ_NEXT_COMP,4,2            ## @IB_CQ_NEXT_COMP
	.comm	_IB_CQ_SOLICITED,4,2            ## @IB_CQ_SOLICITED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_arm_cq                  ; -- Begin function ocrdma_arm_cq
	.p2align	2
_ocrdma_arm_cq:                         ; @ocrdma_arm_cq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x1
	bl	_get_ocrdma_cq
	mov	x21, x0
	ldr	w20, [x0]
	ldr	x22, [x0, #32]
	add	x19, x0, #20
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _IB_CQ_NEXT_COMP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_CQ_NEXT_COMP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _IB_CQ_SOLICITED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_CQ_SOLICITED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w23
	tst	w9, w23
	b.eq	LBB0_2
; %bb.1:
	mov	w9, #1
	str	w9, [x21, #4]
	cbnz	w8, LBB0_4
	b	LBB0_5
LBB0_2:
	cbz	w8, LBB0_5
; %bb.3:
	mov	w8, #1
	str	w8, [x21, #4]
LBB0_4:
	mov	w8, #1
	str	w8, [x21, #8]
LBB0_5:
	ldrsw	x8, [x21, #12]
	ldr	x9, [x21, #24]
	add	x1, x9, x8, lsl #2
	mov	x0, x21
	bl	_is_cqe_valid
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_8
LBB0_7:
	str	wzr, [x21, #16]
	ldp	w2, w3, [x21, #4]
	mov	x0, x22
	mov	x1, x20
	mov	w4, #0
	bl	_ocrdma_ring_cq_db
LBB0_8:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_CQ_NEXT_COMP,4,2            ; @IB_CQ_NEXT_COMP
	.comm	_IB_CQ_SOLICITED,4,2            ; @IB_CQ_SOLICITED
.subsections_via_symbols
