	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_siw_sq_flush                   ## -- Begin function siw_sq_flush
	.p2align	4, 0x90
_siw_sq_flush:                          ## @siw_sq_flush
	.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
	movq	%rdi, %r15
	callq	_tx_wqe
	movq	%rax, %r14
	movl	16(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.1:
	movq	(%r15), %rax
	movq	_SIW_WC_WR_FLUSH_ERR@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %r13
	movslq	%ecx, %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	movq	%rdx, %rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ebx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13,%rbx,4), %edi
	callq	_READ_ONCE
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(,%rbx,4), %rbx
	addq	%r13, %rbx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_siw_sqe_complete
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_WRITE_ONCE
	movq	(%r15), %rax
	incq	%rax
	movq	%rax, (%r15)
	movl	16(%r15), %ecx
	testl	%ecx, %ecx
	jne	LBB0_2
LBB0_8:
	movq	(%r14), %rax
	movq	_SIW_WR_IDLE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_15
## %bb.9:
	movq	%r14, %rdi
	callq	_tx_type
	movq	(%r14), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_siw_dbg_qp
	movq	%r14, %rdi
	callq	_tx_type
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_siw_wqe_put_mem
	movq	%r14, %rdi
	callq	_tx_type
	movq	_SIW_OP_READ_RESPONSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.10:
	movq	%r14, %rdi
	callq	_tx_type
	movq	_SIW_OP_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_tx_type
	movq	_SIW_OP_READ_LOCAL_INV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
LBB0_12:
	movq	(%r14), %rax
	movq	_SIW_WR_QUEUED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
LBB0_13:
	movq	%r14, %rsi
	addq	$12, %rsi
	movl	8(%r14), %edx
	movq	_SIW_WC_WR_FLUSH_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_siw_sqe_complete
LBB0_14:
	movq	(%rbx), %rax
	movq	%rax, (%r14)
LBB0_15:
	movslq	20(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_29
## %bb.16:
	movq	8(%r15), %rax
	movq	24(%r15), %r12
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_17
## %bb.18:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rbx
	jmp	LBB0_19
LBB0_17:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ebx
LBB0_19:
	movl	(%r12,%rbx,4), %edi
	callq	_READ_ONCE
	testl	%eax, %eax
	je	LBB0_29
## %bb.20:
	movl	%eax, %r14d
	leaq	(%r12,%rbx,4), %rbx
	movq	_SIW_WC_WR_FLUSH_ERR@GOTPCREL(%rip), %r12
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_25 Depth=1
	xorl	%edx, %edx
	divq	%rsi
LBB0_24:                                ##   in Loop: Header=BB0_25 Depth=1
	leaq	(%rcx,%rdx,4), %rbx
	movl	(%rcx,%rdx,4), %edi
	callq	_READ_ONCE
	testl	%eax, %eax
	je	LBB0_28
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_siw_sqe_complete
	testq	%rax, %rax
	jne	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_WRITE_ONCE
	movq	8(%r15), %rax
	incq	%rax
	movq	%rax, 8(%r15)
	movslq	20(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_27
## %bb.21:                              ##   in Loop: Header=BB0_25 Depth=1
	movq	24(%r15), %rcx
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_25 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_24
LBB0_28:
	testl	%r14d, %r14d
	je	LBB0_29
LBB0_27:
	movq	_IB_EVENT_SQ_DRAINED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_siw_qp_event                   ## TAILCALL
LBB0_29:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIW_WC_WR_FLUSH_ERR,4,2        ## @SIW_WC_WR_FLUSH_ERR
	.comm	_SIW_WR_IDLE,8,3                ## @SIW_WR_IDLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"flush current SQE, type %d, status %d\n"

	.comm	_SIW_OP_READ_RESPONSE,8,3       ## @SIW_OP_READ_RESPONSE
	.comm	_SIW_OP_READ,8,3                ## @SIW_OP_READ
	.comm	_SIW_OP_READ_LOCAL_INV,8,3      ## @SIW_OP_READ_LOCAL_INV
	.comm	_SIW_WR_QUEUED,8,3              ## @SIW_WR_QUEUED
	.comm	_IB_EVENT_SQ_DRAINED,4,2        ## @IB_EVENT_SQ_DRAINED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_siw_sq_flush                   ; -- Begin function siw_sq_flush
	.p2align	2
_siw_sq_flush:                          ; @siw_sq_flush
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	bl	_tx_wqe
	mov	x20, x0
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x22, _SIW_WC_WR_FLUSH_ERR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SIW_WC_WR_FLUSH_ERR@GOTPAGEOFF]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	x9, [x19]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #32]
	sxtw	x8, w8
	udiv	x11, x9, x8
	msub	x8, x11, x8, x9
	add	x21, x10, x8, lsl #2
	ldr	w0, [x21]
	bl	_READ_ONCE
	cbz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_siw_sqe_complete
	cbnz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x21]
	mov	w1, #0
	bl	_WRITE_ONCE
	ldr	x8, [x19]
	add	x9, x8, #1
	str	x9, [x19]
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_2
LBB0_5:
	ldr	x8, [x20]
Lloh2:
	adrp	x21, _SIW_WR_IDLE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SIW_WR_IDLE@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.6:
	mov	x0, x20
	bl	_tx_type
	mov	x2, x0
	ldr	x3, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_siw_dbg_qp
	mov	x0, x20
	bl	_tx_type
	mov	x1, x0
	mov	x0, x20
	bl	_siw_wqe_put_mem
	mov	x0, x20
	bl	_tx_type
Lloh6:
	adrp	x8, _SIW_OP_READ_RESPONSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SIW_OP_READ_RESPONSE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_11
; %bb.7:
	mov	x0, x20
	bl	_tx_type
Lloh9:
	adrp	x8, _SIW_OP_READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SIW_OP_READ@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_tx_type
Lloh12:
	adrp	x8, _SIW_OP_READ_LOCAL_INV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SIW_OP_READ_LOCAL_INV@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_9:
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _SIW_WR_QUEUED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SIW_WR_QUEUED@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_10:
	add	x1, x20, #12
	ldr	w2, [x20, #8]
	ldr	w3, [x22]
	mov	x0, x19
	bl	_siw_sqe_complete
LBB0_11:
	ldr	x8, [x21]
	str	x8, [x20]
LBB0_12:
	ldrsw	x8, [x19, #20]
	cbz	w8, LBB0_20
; %bb.13:
	ldr	x9, [x19, #8]
	ldr	x10, [x19, #24]
	udiv	x11, x9, x8
	msub	x8, x11, x8, x9
	add	x21, x10, x8, lsl #2
	ldr	w0, [x21]
	bl	_READ_ONCE
	cbz	w0, LBB0_20
; %bb.14:
	mov	x20, x0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x22]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_siw_sqe_complete
	cbnz	x0, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w0, [x21]
	mov	w1, #0
	bl	_WRITE_ONCE
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	ldrsw	x9, [x19, #20]
	cbz	w9, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x10, [x19, #24]
	udiv	x11, x8, x9
	msub	x8, x11, x9, x8
	add	x21, x10, x8, lsl #2
	ldr	w0, [x21]
	bl	_READ_ONCE
	cbnz	w0, LBB0_15
; %bb.18:
	cbz	w20, LBB0_20
LBB0_19:
Lloh18:
	adrp	x8, _IB_EVENT_SQ_DRAINED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IB_EVENT_SQ_DRAINED@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_siw_qp_event
LBB0_20:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SIW_WC_WR_FLUSH_ERR,4,2        ; @SIW_WC_WR_FLUSH_ERR
	.comm	_SIW_WR_IDLE,8,3                ; @SIW_WR_IDLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"flush current SQE, type %d, status %d\n"

	.comm	_SIW_OP_READ_RESPONSE,8,3       ; @SIW_OP_READ_RESPONSE
	.comm	_SIW_OP_READ,8,3                ; @SIW_OP_READ
	.comm	_SIW_OP_READ_LOCAL_INV,8,3      ; @SIW_OP_READ_LOCAL_INV
	.comm	_SIW_WR_QUEUED,8,3              ; @SIW_WR_QUEUED
	.comm	_IB_EVENT_SQ_DRAINED,4,2        ; @IB_EVENT_SQ_DRAINED
.subsections_via_symbols
