	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_mad_complete_send_wr        ## -- Begin function ib_mad_complete_send_wr
	.p2align	4, 0x90
_ib_mad_complete_send_wr:               ## @ib_mad_complete_send_wr
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	32(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	leaq	8(%r15), %r12
	movq	%r12, %rdi
	callq	_ib_mad_kernel_rmpp_agent
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ib_process_rmpp_send_wc
	movl	%eax, %r13d
	movq	_IB_RMPP_RESULT_CONSUMED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_4
	jmp	LBB0_2
LBB0_3:
	movq	_IB_RMPP_RESULT_UNHANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_4:
	movq	(%r14), %rax
	movq	_IB_WC_SUCCESS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_7
## %bb.5:
	cmpq	%rcx, (%rbx)
	jne	LBB0_7
## %bb.6:
	movq	%rax, (%rbx)
	xorl	%eax, %eax
	cmpq	$0, 16(%rbx)
	setg	%al
	subl	%eax, 8(%rbx)
LBB0_7:
	movl	8(%rbx), %ecx
	leal	-1(%rcx), %eax
	movl	%eax, 8(%rbx)
	cmpl	$2, %ecx
	jl	LBB0_12
## %bb.8:
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.9:
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.10:
	movq	(%rbx), %rax
	cmpq	(%rdx), %rax
	jne	LBB0_2
## %bb.11:
	movq	%rbx, %rdi
	callq	_wait_for_response
LBB0_2:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_12:
	leaq	24(%rbx), %rdi
	callq	_list_del
	movq	%r15, %rdi
	callq	_adjust_timeout
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%rbx), %rax
	movq	_IB_WC_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.13:
	movq	%rax, (%r14)
LBB0_14:
	movq	_IB_RMPP_RESULT_INTERNAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	callq	_ib_rmpp_send_handler
	jmp	LBB0_17
LBB0_16:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	*(%r12)
LBB0_17:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_deref_mad_agent                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_RMPP_RESULT_CONSUMED,4,2    ## @IB_RMPP_RESULT_CONSUMED
	.comm	_IB_RMPP_RESULT_UNHANDLED,4,2   ## @IB_RMPP_RESULT_UNHANDLED
	.comm	_IB_WC_SUCCESS,8,3              ## @IB_WC_SUCCESS
	.comm	_IB_RMPP_RESULT_INTERNAL,4,2    ## @IB_RMPP_RESULT_INTERNAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_mad_complete_send_wr        ; -- Begin function ib_mad_complete_send_wr
	.p2align	2
_ib_mad_complete_send_wr:               ; @ib_mad_complete_send_wr
	.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	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #32]
	mov	x0, x19
	bl	_spin_lock_irqsave
	add	x22, x19, #8
	mov	x0, x22
	bl	_ib_mad_kernel_rmpp_agent
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	bl	_ib_process_rmpp_send_wc
	mov	x23, x0
Lloh0:
	adrp	x8, _IB_RMPP_RESULT_CONSUMED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_RMPP_RESULT_CONSUMED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
	b	LBB0_11
LBB0_2:
Lloh3:
	adrp	x8, _IB_RMPP_RESULT_UNHANDLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_RMPP_RESULT_UNHANDLED@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
LBB0_3:
	ldr	x8, [x20]
Lloh6:
	adrp	x24, _IB_WC_SUCCESS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _IB_WC_SUCCESS@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.4:
	ldr	x10, [x21]
	cmp	x10, x9
	b.ne	LBB0_6
; %bb.5:
	str	x8, [x21]
	ldr	x8, [x21, #16]
	cmp	x8, #0
	cset	w8, gt
	ldr	w9, [x21, #8]
	sub	w8, w9, w8
	str	w8, [x21, #8]
LBB0_6:
	ldr	w9, [x21, #8]
	sub	w8, w9, #1
	str	w8, [x21, #8]
	cmp	w9, #2
	b.lt	LBB0_12
; %bb.7:
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.8:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_11
; %bb.9:
	ldr	x8, [x21]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_wait_for_response
LBB0_11:
	mov	x0, x19
	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
	b	_spin_unlock_irqrestore
LBB0_12:
	add	x0, x21, #24
	bl	_list_del
	mov	x0, x19
	bl	_adjust_timeout
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	x8, [x21]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.13:
	str	x8, [x20]
LBB0_14:
Lloh8:
	adrp	x8, _IB_RMPP_RESULT_INTERNAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IB_RMPP_RESULT_INTERNAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x20
	bl	_ib_rmpp_send_handler
	b	LBB0_17
LBB0_16:
	ldr	x8, [x22]
	mov	x0, x22
	mov	x1, x20
	blr	x8
LBB0_17:
	mov	x0, x19
	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
	b	_deref_mad_agent
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_RMPP_RESULT_CONSUMED,4,2    ; @IB_RMPP_RESULT_CONSUMED
	.comm	_IB_RMPP_RESULT_UNHANDLED,4,2   ; @IB_RMPP_RESULT_UNHANDLED
	.comm	_IB_WC_SUCCESS,8,3              ; @IB_WC_SUCCESS
	.comm	_IB_RMPP_RESULT_INTERNAL,4,2    ; @IB_RMPP_RESULT_INTERNAL
.subsections_via_symbols
