	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocrdma_discard_cqes
_ocrdma_discard_cqes:                   ## @ocrdma_discard_cqes
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	8(%rsi), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movl	(%r15), %r13d
	leaq	16(%r14), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	4(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_1
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	callq	_ocrdma_hwq_inc_tail
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	incl	%r13d
	movl	%r13d, %eax
	cltd
	idivl	4(%r15)
	movl	%edx, %r13d
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	je	LBB0_14
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_is_hw_sq_empty
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 8(%r14)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_is_hw_rq_empty
	testq	%rax, %rax
	jne	LBB0_14
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r15), %r12
	movslq	%r13d, %rbx
	movq	_OCRDMA_CQE_QPN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r12,%rbx,8), %eax
	je	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	(%r14), %eax
	jne	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%r12,%rbx,8), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_is_cqe_for_sq
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 8(%r14)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%r12,%rbx,8), %edi
	callq	_le32_to_cpu
	movl	%eax, %r12d
	movq	_OCRDMA_CQE_BUFTAG_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	sarl	%cl, %r12d
	movq	8(%r14), %rax
	xorl	%edi, %edi
	andl	4(%rax), %r12d
	setle	%dil
	callq	_BUG_ON
	movq	8(%r14), %rdi
	callq	_spin_lock_irqsave
	movq	8(%r14), %rdi
	addq	$4, %rdi
	callq	_ocrdma_hwq_inc_tail
	movq	8(%r14), %rdi
	decl	%r12d
	movl	%r12d, %esi
	callq	_ocrdma_srq_toggle_bit
	movq	8(%r14), %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_12
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OCRDMA_CQE_QPN_MASK,4,2        ## @OCRDMA_CQE_QPN_MASK
	.comm	_OCRDMA_CQE_BUFTAG_SHIFT,4,2    ## @OCRDMA_CQE_BUFTAG_SHIFT
	.no_dead_strip	_ocrdma_discard_cqes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocrdma_discard_cqes
_ocrdma_discard_cqes:                   ; @ocrdma_discard_cqes
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x21, x0
	add	x20, x1, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w26, [x19]
	add	x22, x21, #16
	add	x23, x21, #4
Lloh0:
	adrp	x27, _OCRDMA_CQE_QPN_MASK@GOTPAGE
Lloh1:
	ldr	x27, [x27, _OCRDMA_CQE_QPN_MASK@GOTPAGEOFF]
	mov	x28, x26
	b	LBB0_5
LBB0_1:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_ocrdma_hwq_inc_tail
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	wzr, [x24]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w28, #1
	ldr	w9, [x19, #4]
	sdiv	w10, w8, w9
	msub	w28, w10, w9, w8
	cmp	w28, w26
	b.eq	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_is_hw_sq_empty
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	bl	_is_hw_rq_empty
	cbnz	x0, LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x25, [x19, #16]
	add	x24, x25, w28, sxtw #3
	ldr	w8, [x24]
	ldr	w9, [x27]
	ands	w8, w9, w8
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x21]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	bl	_is_cqe_for_sq
	cbnz	x0, LBB0_1
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x8, w28
	add	x8, x25, x8, lsl #3
	ldr	w0, [x8, #4]
	bl	_le32_to_cpu
Lloh2:
	adrp	x8, _OCRDMA_CQE_BUFTAG_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OCRDMA_CQE_BUFTAG_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	asr	w8, w0, w8
	ldr	x9, [x21, #8]
	ldr	w9, [x9, #4]
	and	w8, w9, w8
	subs	w25, w8, #1
	cset	w0, lt
	bl	_BUG_ON
	ldr	x0, [x21, #8]
	bl	_spin_lock_irqsave
	ldr	x8, [x21, #8]
	add	x0, x8, #4
	bl	_ocrdma_hwq_inc_tail
	ldr	x0, [x21, #8]
	mov	x1, x25
	bl	_ocrdma_srq_toggle_bit
	ldr	x0, [x21, #8]
	bl	_spin_unlock_irqrestore
	b	LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	b	LBB0_2
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_OCRDMA_CQE_QPN_MASK,4,2        ; @OCRDMA_CQE_QPN_MASK
	.comm	_OCRDMA_CQE_BUFTAG_SHIFT,4,2    ; @OCRDMA_CQE_BUFTAG_SHIFT
	.no_dead_strip	_ocrdma_discard_cqes
.subsections_via_symbols
