	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_rc_completion               ## -- Begin function do_rc_completion
	.p2align	4, 0x90
_do_rc_completion:                      ## @do_rc_completion
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	88(%rdi), %r13
	addq	$80, %rdi
	callq	_lockdep_assert_held
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_trace_hfi1_rc_completion
	movl	4(%r14), %edi
	movl	76(%rbx), %esi
	callq	_cmp_psn
	testq	%rax, %rax
	js	LBB0_2
## %bb.1:
	movl	72(%rbx), %esi
	movl	76(%rbx), %edi
	callq	_cmp_psn
	testq	%rax, %rax
	jle	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_trdma_clean_swqe
	movl	68(%rbx), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_trace_hfi1_qp_send_completion
	movq	_ib_hfi1_wc_opcode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	movl	(%rax,%rcx,4), %edx
	movq	_IB_WC_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_rvt_qp_complete_swqe
LBB0_5:
	movl	56(%rbx), %eax
	movl	%eax, 60(%rbx)
	movq	8(%r14), %rax
	movq	_IB_WR_TID_RDMA_WRITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_update_last_psn
LBB0_7:
	movq	(%rbx), %rcx
	leaq	1(%rcx), %rdx
	xorl	%esi, %esi
	cmpq	16(%rbx), %rdx
	movq	8(%rbx), %rax
	cmovlq	%rdx, %rsi
	cmpq	%rax, %rcx
	jne	LBB0_10
## %bb.8:
	movq	%rsi, 8(%rbx)
	movq	%rsi, (%rbx)
	movq	%rbx, %rdi
	callq	_rvt_get_swqe_ptr
	movq	%rax, %r14
	movq	(%rbx), %rax
	cmpq	24(%rbx), %rax
	je	LBB0_14
## %bb.9:
	movq	_SEND_LAST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OP
	movl	%eax, 52(%rbx)
	movl	(%r14), %eax
	movl	%eax, 48(%rbx)
	jmp	LBB0_14
LBB0_10:
	movq	%rsi, (%rbx)
	movq	32(%rbx), %rcx
	movq	_IB_QPS_SQD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.11:
	cmpq	%rax, %rsi
	jne	LBB0_13
## %bb.12:
	movq	$0, 40(%rbx)
LBB0_13:
	movq	%rbx, %rdi
	callq	_rvt_get_swqe_ptr
	movq	%rax, %r14
LBB0_14:
	movl	(%r13), %eax
	movq	_HFI1_S_TID_WAIT_INTERLCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_16
## %bb.15:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	callq	_hfi1_schedule_send
LBB0_16:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_ppd_from_ibp
	movq	%rax, %r12
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_this_cpu_inc
	movq	(%r12), %rax
	movq	_HFI1_HAS_SEND_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	64(%rbx), %rdi
	callq	_rdma_ah_get_sl
	movq	(%r15), %rcx
	movq	(%rcx,%rax,8), %rsi
	movq	%rbx, %rdi
	callq	_qp_to_sdma_engine
	movq	%rax, %rdi
	callq	_sdma_engine_progress_schedule
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ib_hfi1_wc_opcode,8,3          ## @ib_hfi1_wc_opcode
	.comm	_IB_WC_SUCCESS,4,2              ## @IB_WC_SUCCESS
	.comm	_HFI1_HAS_SEND_DMA,4,2          ## @HFI1_HAS_SEND_DMA
	.comm	_IB_WR_TID_RDMA_WRITE,8,3       ## @IB_WR_TID_RDMA_WRITE
	.comm	_SEND_LAST,4,2                  ## @SEND_LAST
	.comm	_IB_QPS_SQD,8,3                 ## @IB_QPS_SQD
	.comm	_HFI1_S_TID_WAIT_INTERLCK,4,2   ## @HFI1_S_TID_WAIT_INTERLCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_rc_completion               ; -- Begin function do_rc_completion
	.p2align	2
_do_rc_completion:                      ; @do_rc_completion
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #88]
	add	x0, x0, #80
	bl	_lockdep_assert_held
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_trace_hfi1_rc_completion
	ldr	w0, [x20, #4]
	ldr	w1, [x19, #76]
	bl	_cmp_psn
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldp	w1, w0, [x19, #72]
	bl	_cmp_psn
	cmp	x0, #1
	b.lt	LBB0_15
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_trdma_clean_swqe
	ldr	w2, [x19, #68]
	mov	x0, x19
	mov	x1, x20
	bl	_trace_hfi1_qp_send_completion
Lloh0:
	adrp	x8, _ib_hfi1_wc_opcode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ib_hfi1_wc_opcode@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	ldr	w2, [x8, x9, lsl #2]
Lloh3:
	adrp	x8, _IB_WC_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_WC_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_rvt_qp_complete_swqe
LBB0_3:
	ldr	w8, [x19, #56]
	str	w8, [x19, #60]
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _IB_WR_TID_RDMA_WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_WR_TID_RDMA_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_update_last_psn
LBB0_5:
	ldp	x9, x8, [x19]
	add	x10, x9, #1
	ldr	x11, [x19, #16]
	cmp	x10, x11
	csinc	x1, xzr, x9, ge
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.6:
	stp	x1, x1, [x19]
	mov	x0, x19
	bl	_rvt_get_swqe_ptr
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x9, [x19, #24]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.7:
Lloh9:
	adrp	x8, _SEND_LAST@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEND_LAST@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_OP
	ldr	w8, [x20]
	stp	w8, w0, [x19, #48]
	b	LBB0_12
LBB0_8:
	str	x1, [x19]
	ldr	x9, [x19, #32]
Lloh12:
	adrp	x10, _IB_QPS_SQD@GOTPAGE
Lloh13:
	ldr	x10, [x10, _IB_QPS_SQD@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.9:
	cmp	x1, x8
	b.ne	LBB0_11
; %bb.10:
	str	xzr, [x19, #40]
LBB0_11:
	mov	x0, x19
	bl	_rvt_get_swqe_ptr
	mov	x20, x0
LBB0_12:
	ldr	w8, [x23]
Lloh15:
	adrp	x9, _HFI1_S_TID_WAIT_INTERLCK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _HFI1_S_TID_WAIT_INTERLCK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	bic	w8, w8, w9
	str	w8, [x23]
	mov	x0, x19
	bl	_hfi1_schedule_send
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x21
	bl	_ppd_from_ibp
	mov	x22, x0
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_this_cpu_inc
	ldr	x8, [x22]
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _HFI1_HAS_SEND_DMA@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HFI1_HAS_SEND_DMA@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.16:
	add	x0, x19, #64
	bl	_rdma_ah_get_sl
	ldr	x8, [x21]
	ldr	x1, [x8, x0, lsl #3]
	mov	x0, x19
	bl	_qp_to_sdma_engine
	bl	_sdma_engine_progress_schedule
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.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	_ib_hfi1_wc_opcode,8,3          ; @ib_hfi1_wc_opcode
	.comm	_IB_WC_SUCCESS,4,2              ; @IB_WC_SUCCESS
	.comm	_HFI1_HAS_SEND_DMA,4,2          ; @HFI1_HAS_SEND_DMA
	.comm	_IB_WR_TID_RDMA_WRITE,8,3       ; @IB_WR_TID_RDMA_WRITE
	.comm	_SEND_LAST,4,2                  ; @SEND_LAST
	.comm	_IB_QPS_SQD,8,3                 ; @IB_QPS_SQD
	.comm	_HFI1_S_TID_WAIT_INTERLCK,4,2   ; @HFI1_S_TID_WAIT_INTERLCK
.subsections_via_symbols
