	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_sc_qp_flush_wqes
_i40iw_sc_qp_flush_wqes:                ## @i40iw_sc_qp_flush_wqes
	.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, %r12
	movq	%rdi, %r15
	xorl	%r13d, %r13d
	cmpq	$0, 40(%rsi)
	je	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	cmpl	$0, (%r15)
	sete	%r14b
	movl	%r14d, %edi
	jmp	LBB0_3
LBB0_1:
	xorl	%r14d, %r14d
	xorl	%edi, %edi
LBB0_3:
	cmpq	$0, 32(%r12)
	setne	%bl
	movl	4(%r15), %esi
	testl	%esi, %esi
	sete	%al
	andb	%bl, %al
	movzbl	%al, %ebx
	orl	%ebx, %esi
	movl	%esi, 4(%r15)
	orl	%edi, (%r15)
	testb	%r14b, %r14b
	jne	LBB0_5
## %bb.4:
	testb	%al, %al
	je	LBB0_16
LBB0_5:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %esi
	callq	_i40iw_sc_cqp_get_next_send_wqe
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %rbx
	cmpl	$0, (%r12)
	movl	$0, %r13d
	je	LBB0_12
## %bb.8:
	xorl	%r13d, %r13d
	testb	%r14b, %r14b
	je	LBB0_10
## %bb.9:
	movl	4(%r12), %edi
	movq	_I40IW_CQPSQ_FWQE_RQMNERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %r14d
	movl	8(%r12), %edi
	movq	_I40IW_CQPSQ_FWQE_RQMJERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %r13d
	orl	%r14d, %r13d
LBB0_10:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:
	movl	12(%r12), %edi
	movq	_I40IW_CQPSQ_FWQE_SQMNERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movq	%rbx, %r14
	movl	%eax, %ebx
	movl	16(%r12), %edi
	movq	_I40IW_CQPSQ_FWQE_SQMJERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%r13d, %ebx
	orl	%eax, %ebx
	movl	%ebx, %r13d
	movq	%r14, %rbx
LBB0_12:
	movq	%rbx, %rdi
	movl	$16, %esi
	movl	%r13d, %edx
	callq	_set_64bit_val
	cmpl	$0, 20(%r12)
	movl	$0, %edx
	je	LBB0_14
## %bb.13:
	movq	%rbx, %r14
	movl	24(%r12), %ebx
	movl	28(%r12), %edi
	movq	_I40IW_CQPSQ_FWQE_AESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %edx
	orl	%ebx, %edx
	movq	%r14, %rbx
LBB0_14:
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_set_64bit_val
	movq	%rbx, %r13
	movl	8(%r15), %ebx
	movq	_I40IW_CQP_OP_FLUSH_WQES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_I40IW_CQPSQ_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %ebx
	movl	20(%r12), %edi
	movq	_I40IW_CQPSQ_FWQE_GENERATE_AE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	movl	%eax, %r15d
	movl	(%r12), %edi
	movq	_I40IW_CQPSQ_FWQE_USERFLCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %r15d
	orl	%ebx, %r15d
	movq	_I40IW_CQPSQ_FWQE_FLUSHSQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_LS_64
	movl	%eax, %ebx
	movq	_I40IW_CQPSQ_FWQE_FLUSHRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_LS_64
	orl	%eax, %ebx
	orl	%r15d, %ebx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edi
	movq	_I40IW_CQPSQ_WQEVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LS_64
	orl	%eax, %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_i40iw_insert_wqe_hdr
	movl	4(%r14), %edi
	movq	_I40IW_DEBUG_WQE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I40IW_CQP_WQE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	shll	$3, %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rcx
	callq	_i40iw_debug_buf
	xorl	%r13d, %r13d
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	callq	_i40iw_sc_cqp_post_sq
	jmp	LBB0_16
LBB0_6:
	movq	_I40IW_ERR_RING_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_ERR_RING_FULL,4,2        ## @I40IW_ERR_RING_FULL
	.comm	_I40IW_CQPSQ_FWQE_RQMNERR,4,2   ## @I40IW_CQPSQ_FWQE_RQMNERR
	.comm	_I40IW_CQPSQ_FWQE_RQMJERR,4,2   ## @I40IW_CQPSQ_FWQE_RQMJERR
	.comm	_I40IW_CQPSQ_FWQE_SQMNERR,4,2   ## @I40IW_CQPSQ_FWQE_SQMNERR
	.comm	_I40IW_CQPSQ_FWQE_SQMJERR,4,2   ## @I40IW_CQPSQ_FWQE_SQMJERR
	.comm	_I40IW_CQPSQ_FWQE_AESOURCE,4,2  ## @I40IW_CQPSQ_FWQE_AESOURCE
	.comm	_I40IW_CQP_OP_FLUSH_WQES,4,2    ## @I40IW_CQP_OP_FLUSH_WQES
	.comm	_I40IW_CQPSQ_OPCODE,4,2         ## @I40IW_CQPSQ_OPCODE
	.comm	_I40IW_CQPSQ_FWQE_GENERATE_AE,4,2 ## @I40IW_CQPSQ_FWQE_GENERATE_AE
	.comm	_I40IW_CQPSQ_FWQE_USERFLCODE,4,2 ## @I40IW_CQPSQ_FWQE_USERFLCODE
	.comm	_I40IW_CQPSQ_FWQE_FLUSHSQ,4,2   ## @I40IW_CQPSQ_FWQE_FLUSHSQ
	.comm	_I40IW_CQPSQ_FWQE_FLUSHRQ,4,2   ## @I40IW_CQPSQ_FWQE_FLUSHRQ
	.comm	_I40IW_CQPSQ_WQEVALID,4,2       ## @I40IW_CQPSQ_WQEVALID
	.comm	_I40IW_DEBUG_WQE,4,2            ## @I40IW_DEBUG_WQE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QP_FLUSH WQE"

	.comm	_I40IW_CQP_WQE_SIZE,4,2         ## @I40IW_CQP_WQE_SIZE
	.no_dead_strip	_i40iw_sc_qp_flush_wqes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_sc_qp_flush_wqes
_i40iw_sc_qp_flush_wqes:                ; @i40iw_sc_qp_flush_wqes
	.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, x3
	mov	x23, x1
	mov	x25, x0
	ldr	x8, [x1, #40]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x25]
	cmp	w8, #0
	cset	w22, eq
	b	LBB0_3
LBB0_2:
	mov	w22, #0
LBB0_3:
	ldr	x8, [x23, #32]
	cmp	x8, #0
	ldp	w9, w8, [x25]
	ccmp	w8, #0, #0, ne
	cset	w24, eq
	orr	w8, w8, w24
	orr	w9, w9, w22
	stp	w9, w8, [x25]
	tbnz	w22, #0, LBB0_5
; %bb.4:
	cbz	w24, LBB0_18
LBB0_5:
	ldr	x8, [x25, #16]
	ldr	x8, [x8]
	ldr	x20, [x8]
	mov	x0, x20
	mov	x1, x2
	bl	_i40iw_sc_cqp_get_next_send_wqe
	cbz	x0, LBB0_9
; %bb.6:
	mov	x21, x0
	ldr	w8, [x23]
	cbz	w8, LBB0_10
; %bb.7:
	cbz	w22, LBB0_11
; %bb.8:
	ldr	w0, [x23, #4]
Lloh0:
	adrp	x8, _I40IW_CQPSQ_FWQE_RQMNERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_RQMNERR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x26, x0
	ldr	w0, [x23, #8]
Lloh3:
	adrp	x8, _I40IW_CQPSQ_FWQE_RQMJERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_RQMJERR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w26, w0, w26
	cbnz	w24, LBB0_12
	b	LBB0_13
LBB0_9:
Lloh6:
	adrp	x8, _I40IW_ERR_RING_FULL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I40IW_ERR_RING_FULL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_19
LBB0_10:
	mov	w26, #0
	b	LBB0_13
LBB0_11:
	mov	w26, #0
	cbz	w24, LBB0_13
LBB0_12:
	ldr	w0, [x23, #12]
Lloh9:
	adrp	x8, _I40IW_CQPSQ_FWQE_SQMNERR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_SQMNERR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_LS_64
	mov	x27, x0
	ldr	w0, [x23, #16]
Lloh12:
	adrp	x8, _I40IW_CQPSQ_FWQE_SQMJERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_SQMJERR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w8, w27, w26
	orr	w26, w8, w0
LBB0_13:
	mov	x0, x21
	mov	w1, #16
	mov	x2, x26
	bl	_set_64bit_val
	ldr	w8, [x23, #20]
	cbz	w8, LBB0_15
; %bb.14:
	ldp	w26, w0, [x23, #24]
Lloh15:
	adrp	x8, _I40IW_CQPSQ_FWQE_AESOURCE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_AESOURCE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w2, w0, w26
	b	LBB0_16
LBB0_15:
	mov	w2, #0
LBB0_16:
	mov	x0, x21
	mov	w1, #8
	bl	_set_64bit_val
	ldr	w25, [x25, #8]
Lloh18:
	adrp	x8, _I40IW_CQP_OP_FLUSH_WQES@GOTPAGE
Lloh19:
	ldr	x8, [x8, _I40IW_CQP_OP_FLUSH_WQES@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x8, _I40IW_CQPSQ_OPCODE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _I40IW_CQPSQ_OPCODE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w25, w0, w25
	ldr	w0, [x23, #20]
Lloh24:
	adrp	x8, _I40IW_CQPSQ_FWQE_GENERATE_AE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_GENERATE_AE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w25, w25, w0
	ldr	w0, [x23]
Lloh27:
	adrp	x8, _I40IW_CQPSQ_FWQE_USERFLCODE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_USERFLCODE@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w23, w25, w0
Lloh30:
	adrp	x8, _I40IW_CQPSQ_FWQE_FLUSHSQ@GOTPAGE
Lloh31:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_FLUSHSQ@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_LS_64
	orr	w23, w23, w0
Lloh33:
	adrp	x8, _I40IW_CQPSQ_FWQE_FLUSHRQ@GOTPAGE
Lloh34:
	ldr	x8, [x8, _I40IW_CQPSQ_FWQE_FLUSHRQ@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_LS_64
	orr	w22, w23, w0
	ldr	w0, [x20]
Lloh36:
	adrp	x8, _I40IW_CQPSQ_WQEVALID@GOTPAGE
Lloh37:
	ldr	x8, [x8, _I40IW_CQPSQ_WQEVALID@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	bl	_LS_64
	orr	w1, w22, w0
	mov	x0, x21
	bl	_i40iw_insert_wqe_hdr
Lloh39:
	adrp	x8, _I40IW_DEBUG_WQE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _I40IW_DEBUG_WQE@GOTPAGEOFF]
	ldr	w0, [x20, #4]
Lloh41:
	ldr	w1, [x8]
Lloh42:
	adrp	x8, _I40IW_CQP_WQE_SIZE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _I40IW_CQP_WQE_SIZE@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	lsl	w4, w8, #3
Lloh45:
	adrp	x2, l_.str@PAGE
Lloh46:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x21
	bl	_i40iw_debug_buf
	cbz	w19, LBB0_18
; %bb.17:
	mov	x0, x20
	bl	_i40iw_sc_cqp_post_sq
LBB0_18:
	mov	w0, #0
LBB0_19:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_ERR_RING_FULL,4,2        ; @I40IW_ERR_RING_FULL
	.comm	_I40IW_CQPSQ_FWQE_RQMNERR,4,2   ; @I40IW_CQPSQ_FWQE_RQMNERR
	.comm	_I40IW_CQPSQ_FWQE_RQMJERR,4,2   ; @I40IW_CQPSQ_FWQE_RQMJERR
	.comm	_I40IW_CQPSQ_FWQE_SQMNERR,4,2   ; @I40IW_CQPSQ_FWQE_SQMNERR
	.comm	_I40IW_CQPSQ_FWQE_SQMJERR,4,2   ; @I40IW_CQPSQ_FWQE_SQMJERR
	.comm	_I40IW_CQPSQ_FWQE_AESOURCE,4,2  ; @I40IW_CQPSQ_FWQE_AESOURCE
	.comm	_I40IW_CQP_OP_FLUSH_WQES,4,2    ; @I40IW_CQP_OP_FLUSH_WQES
	.comm	_I40IW_CQPSQ_OPCODE,4,2         ; @I40IW_CQPSQ_OPCODE
	.comm	_I40IW_CQPSQ_FWQE_GENERATE_AE,4,2 ; @I40IW_CQPSQ_FWQE_GENERATE_AE
	.comm	_I40IW_CQPSQ_FWQE_USERFLCODE,4,2 ; @I40IW_CQPSQ_FWQE_USERFLCODE
	.comm	_I40IW_CQPSQ_FWQE_FLUSHSQ,4,2   ; @I40IW_CQPSQ_FWQE_FLUSHSQ
	.comm	_I40IW_CQPSQ_FWQE_FLUSHRQ,4,2   ; @I40IW_CQPSQ_FWQE_FLUSHRQ
	.comm	_I40IW_CQPSQ_WQEVALID,4,2       ; @I40IW_CQPSQ_WQEVALID
	.comm	_I40IW_DEBUG_WQE,4,2            ; @I40IW_DEBUG_WQE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QP_FLUSH WQE"

	.comm	_I40IW_CQP_WQE_SIZE,4,2         ; @I40IW_CQP_WQE_SIZE
	.no_dead_strip	_i40iw_sc_qp_flush_wqes
.subsections_via_symbols
