	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c4iw_flush_hw_cq               ## -- Begin function c4iw_flush_hw_cq
	.p2align	4, 0x90
_c4iw_flush_hw_cq:                      ## @c4iw_flush_hw_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
	movq	%rsi, %r14
	movq	%rdi, %r13
	movl	16(%rdi), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_t4_next_hw_cqe
	testl	%eax, %eax
	je	LBB0_1
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	-48(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_19
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	24(%r13), %ebx
	movq	-48(%rbp), %rdi
	callq	_CQE_QPID
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_get_qhp
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r14, %r12
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_spin_lock
	cmpl	$1, 8(%r12)
	je	LBB0_15
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	callq	_CQE_OPCODE
	movq	_FW_RI_TERMINATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	callq	_CQE_OPCODE
	movq	_FW_RI_READ_RESP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	callq	_CQE_TYPE
	cmpl	$1, %eax
	je	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	callq	_CQE_WRID_STAG
	cmpl	$1, %eax
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	8(%r12), %rbx
	movq	24(%r12), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	leaq	-56(%rbp), %r15
	movq	%r15, %rdx
	callq	_create_read_req_cqe
	movq	%r15, -48(%rbp)
	movq	%rbx, %rdi
	callq	_advance_oldest_read
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi
	callq	_SQ_TYPE
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	8(%r12), %rbx
	movq	16(%r12), %r15
	movq	-48(%rbp), %rdi
	callq	_CQE_WRID_SQ_IDX
	movq	-48(%rbp), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%r15,%rax,8)
	movl	$1, (%r15,%rax,8)
	leaq	-48(%rbp), %r15
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_flush_completed_wrs
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %r15
	movq	8(%r13), %rbx
	movq	-48(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx,%r15,4)
	movl	$1, %edi
	callq	_CQE_SWCQE_V
	movl	%eax, %edi
	callq	_cpu_to_be32
	orl	%eax, (%rbx,%r15,4)
	leaq	-48(%rbp), %r15
	movq	%r13, %rdi
	callq	_t4_swcq_produce
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_t4_hwcq_consume
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_t4_next_hw_cqe
	movl	%eax, %ebx
	testq	%r12, %r12
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r14, %r12
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_spin_unlock
	jmp	LBB0_18
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_advance_oldest_read
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cqid 0x%x\n"

	.comm	_FW_RI_TERMINATE,8,3            ## @FW_RI_TERMINATE
	.comm	_FW_RI_READ_RESP,8,3            ## @FW_RI_READ_RESP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c4iw_flush_hw_cq               ; -- Begin function c4iw_flush_hw_cq
	.p2align	2
_c4iw_flush_hw_cq:                      ; @c4iw_flush_hw_cq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
	ldr	w1, [x0, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	add	x1, sp, #8
	mov	x0, x20
	bl	_t4_next_hw_cqe
	cbz	w0, LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
Lloh2:
	adrp	x23, _FW_RI_TERMINATE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FW_RI_TERMINATE@GOTPAGEOFF]
Lloh4:
	adrp	x24, _FW_RI_READ_RESP@GOTPAGE
Lloh5:
	ldr	x24, [x24, _FW_RI_READ_RESP@GOTPAGEOFF]
	mov	x25, sp
	mov	w26, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w22, LBB0_1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x20, #24]
	ldr	x0, [sp, #8]
	bl	_CQE_QPID
	mov	x1, x0
	mov	x0, x21
	bl	_get_qhp
	mov	x21, x0
	cbz	x0, LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x21, x19
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_spin_lock
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.eq	LBB0_16
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #8]
	bl	_CQE_OPCODE
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #8]
	bl	_CQE_OPCODE
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #8]
	bl	_CQE_TYPE
	cmp	w0, #1
	b.eq	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #8]
	bl	_CQE_WRID_STAG
	cmp	w0, #1
	b.eq	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #8
	ldr	x8, [x21, #24]
	ldr	w8, [x8]
	cbz	w8, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [sp, #8]
	mov	x2, sp
	mov	x0, x22
	bl	_create_read_req_cqe
	str	x25, [sp, #8]
	mov	x0, x22
	bl	_advance_oldest_read
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [sp, #8]
	bl	_SQ_TYPE
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x21, #8
	ldr	x27, [x21, #16]
	ldr	x0, [sp, #8]
	bl	_CQE_WRID_SQ_IDX
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	add	x9, x27, x0, lsl #3
	stp	w26, w8, [x9]
	mov	x0, x22
	mov	x1, x20
	bl	_flush_completed_wrs
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x8, x22, [x20]
	ldr	x9, [sp, #8]
	lsl	x27, x8, #2
	ldr	w8, [x9]
	str	w8, [x22, x27]
	mov	w0, #1
	bl	_CQE_SWCQE_V
	bl	_cpu_to_be32
	ldr	w8, [x22, x27]
	orr	w8, w8, w0
	str	w8, [x22, x27]
	mov	x0, x20
	bl	_t4_swcq_produce
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_t4_hwcq_consume
	add	x1, sp, #8
	mov	x0, x20
	bl	_t4_next_hw_cqe
	mov	x22, x0
	cmp	x21, #0
	ccmp	x21, x19, #4, ne
	b.eq	LBB0_3
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_spin_unlock
	b	LBB0_3
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_advance_oldest_read
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cqid 0x%x\n"

	.comm	_FW_RI_TERMINATE,8,3            ; @FW_RI_TERMINATE
	.comm	_FW_RI_READ_RESP,8,3            ; @FW_RI_READ_RESP
.subsections_via_symbols
