	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_send_complete              ## -- Begin function qib_send_complete
	.p2align	4, 0x90
_qib_send_complete:                     ## @qib_send_complete
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	_ib_qib_state_ops@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rdi), %rcx
	movq	_QIB_PROCESS_OR_FLUSH_SEND@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rax,%rcx,4)
	je	LBB0_23
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %r15
	cmpl	$0, 8(%rsi)
	je	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_qib_put_mr
	incq	%rbx
	movl	8(%r12), %eax
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_4:
	movq	64(%r15), %rax
	movq	_IB_QPT_UD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.5:
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_7:
	movl	28(%r12), %edi
	callq	_to_iah
	movq	%rax, %rdi
	callq	_atomic_dec
LBB0_8:
	movq	_QIB_S_SIGNAL_REQ_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_11
## %bb.9:
	movq	_IB_SEND_SIGNALED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r12)
	jne	LBB0_11
## %bb.10:
	movq	_IB_WC_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_14
LBB0_11:
	leaq	64(%r15), %rbx
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	24(%r12), %eax
	movl	%eax, -36(%rbp)
	movl	%r14d, -56(%rbp)
	movq	_ib_qib_wc_opcode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r12), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, -40(%rbp)
	movq	%rbx, -48(%rbp)
	movq	_IB_WC_SUCCESS@GOTPCREL(%rip), %rbx
	cmpl	%r14d, (%rbx)
	jne	LBB0_13
## %bb.12:
	movl	(%r12), %eax
	movl	%eax, -52(%rbp)
LBB0_13:
	movl	72(%r15), %edi
	callq	_to_icq
	xorl	%edx, %edx
	cmpl	%r14d, (%rbx)
	setne	%dl
	leaq	-56(%rbp), %rsi
	movl	%eax, %edi
	callq	_qib_cq_enter
LBB0_14:
	movq	16(%r15), %rcx
	movq	32(%r15), %rdx
	leaq	1(%rcx), %rsi
	xorl	%eax, %eax
	cmpq	24(%r15), %rsi
	cmovlq	%rsi, %rax
	movq	%rax, 16(%r15)
	cmpq	%rcx, %rdx
	jne	LBB0_16
## %bb.15:
	movq	%rax, 32(%r15)
LBB0_16:
	movq	40(%r15), %rdx
	cmpq	%rcx, %rdx
	jne	LBB0_18
## %bb.17:
	movq	%rax, 40(%r15)
	movq	%rax, %rdx
LBB0_18:
	cmpq	%rcx, 48(%r15)
	jne	LBB0_20
## %bb.19:
	movq	%rax, 48(%r15)
LBB0_20:
	movq	(%r15), %rcx
	movq	_IB_QPS_SQD@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_23
## %bb.21:
	cmpq	%rdx, %rax
	jne	LBB0_23
## %bb.22:
	movq	$0, 56(%r15)
LBB0_23:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ib_qib_state_ops,8,3           ## @ib_qib_state_ops
	.comm	_QIB_PROCESS_OR_FLUSH_SEND,4,2  ## @QIB_PROCESS_OR_FLUSH_SEND
	.comm	_IB_QPT_UD,8,3                  ## @IB_QPT_UD
	.comm	_IB_QPT_SMI,8,3                 ## @IB_QPT_SMI
	.comm	_IB_QPT_GSI,8,3                 ## @IB_QPT_GSI
	.comm	_QIB_S_SIGNAL_REQ_WR,4,2        ## @QIB_S_SIGNAL_REQ_WR
	.comm	_IB_SEND_SIGNALED,4,2           ## @IB_SEND_SIGNALED
	.comm	_IB_WC_SUCCESS,4,2              ## @IB_WC_SUCCESS
	.comm	_ib_qib_wc_opcode,8,3           ## @ib_qib_wc_opcode
	.comm	_IB_QPS_SQD,8,3                 ## @IB_QPS_SQD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_send_complete              ; -- Begin function qib_send_complete
	.p2align	2
_qib_send_complete:                     ; @qib_send_complete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, _ib_qib_state_ops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ib_qib_state_ops@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x0]
	ldr	w8, [x8, x9, lsl #2]
Lloh3:
	adrp	x9, _QIB_PROCESS_OR_FLUSH_SEND@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QIB_PROCESS_OR_FLUSH_SEND@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x1, #8]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #32]
	ldr	w0, [x8, x22, lsl #2]
	bl	_qib_put_mr
	add	x22, x22, #1
	ldr	w8, [x21, #8]
	cmp	x22, x8
	b.lo	LBB0_3
LBB0_4:
	mov	x22, x19
	ldr	x8, [x22, #64]!
Lloh6:
	adrp	x9, _IB_QPT_UD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_QPT_UD@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _IB_QPT_SMI@GOTPAGE
Lloh10:
	ldr	x10, [x10, _IB_QPT_SMI@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _IB_QPT_GSI@GOTPAGE
Lloh13:
	ldr	x11, [x11, _IB_QPT_GSI@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x21, #28]
	bl	_to_iah
	bl	_atomic_dec
LBB0_6:
	ldr	w8, [x19, #8]
Lloh15:
	adrp	x9, _QIB_S_SIGNAL_REQ_WR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _QIB_S_SIGNAL_REQ_WR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x23, _IB_WC_SUCCESS@GOTPAGE
Lloh19:
	ldr	x23, [x23, _IB_WC_SUCCESS@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh20:
	adrp	x8, _IB_SEND_SIGNALED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IB_SEND_SIGNALED@GOTPAGEOFF]
	ldr	w9, [x21, #12]
Lloh22:
	ldr	w8, [x8]
	and	w8, w8, w9
	ldr	w9, [x23]
	cmp	w8, #0
	ccmp	w9, w20, #0, eq
	b.eq	LBB0_11
LBB0_8:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x21, #24]
	str	w8, [sp, #28]
	str	w20, [sp, #8]
Lloh23:
	adrp	x8, _ib_qib_wc_opcode@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ib_qib_wc_opcode@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldr	x9, [x21, #16]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [sp, #24]
	str	x22, [sp, #16]
	ldr	w8, [x23]
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.9:
	ldr	w8, [x21]
	str	w8, [sp, #12]
LBB0_10:
	ldr	w0, [x19, #72]
	bl	_to_icq
	ldr	w8, [x23]
	cmp	w8, w20
	cset	w2, ne
	add	x1, sp, #8
	bl	_qib_cq_enter
LBB0_11:
	ldp	x9, x8, [x19, #16]
	add	x10, x9, #1
	cmp	x10, x8
	csinc	x8, xzr, x9, ge
	str	x8, [x19, #16]
	ldr	x10, [x19, #32]
	cmp	x10, x9
	b.ne	LBB0_13
; %bb.12:
	str	x8, [x19, #32]
LBB0_13:
	ldr	x10, [x19, #40]
	cmp	x10, x9
	b.ne	LBB0_15
; %bb.14:
	str	x8, [x19, #40]
	mov	x10, x8
LBB0_15:
	ldr	x11, [x19, #48]
	cmp	x11, x9
	b.ne	LBB0_17
; %bb.16:
	str	x8, [x19, #48]
LBB0_17:
	ldr	x9, [x19]
Lloh26:
	adrp	x11, _IB_QPS_SQD@GOTPAGE
Lloh27:
	ldr	x11, [x11, _IB_QPS_SQD@GOTPAGEOFF]
Lloh28:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_20
; %bb.18:
	cmp	x8, x10
	b.ne	LBB0_20
; %bb.19:
	str	xzr, [x19, #56]
LBB0_20:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ib_qib_state_ops,8,3           ; @ib_qib_state_ops
	.comm	_QIB_PROCESS_OR_FLUSH_SEND,4,2  ; @QIB_PROCESS_OR_FLUSH_SEND
	.comm	_IB_QPT_UD,8,3                  ; @IB_QPT_UD
	.comm	_IB_QPT_SMI,8,3                 ; @IB_QPT_SMI
	.comm	_IB_QPT_GSI,8,3                 ; @IB_QPT_GSI
	.comm	_QIB_S_SIGNAL_REQ_WR,4,2        ; @QIB_S_SIGNAL_REQ_WR
	.comm	_IB_SEND_SIGNALED,4,2           ; @IB_SEND_SIGNALED
	.comm	_IB_WC_SUCCESS,4,2              ; @IB_WC_SUCCESS
	.comm	_ib_qib_wc_opcode,8,3           ; @ib_qib_wc_opcode
	.comm	_IB_QPS_SQD,8,3                 ; @IB_QPS_SQD
.subsections_via_symbols
