	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cm_rep_handler
_cm_rep_handler:                        ## @cm_rep_handler
	.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, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movl	16(%r15), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_cm_acquire_id
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	60(%rax), %esi
	movq	%r14, %rdi
	callq	_cm_format_rep_event
	movq	%r13, %rdi
	callq	_spin_lock_irq
	movl	72(%r13), %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_3
## %bb.5:
	movl	8(%r15), %eax
	movq	80(%r13), %rcx
	movl	%eax, 28(%rcx)
	movl	12(%r15), %eax
	movl	%eax, 24(%rcx)
	movl	60(%r13), %esi
	movq	%r15, %rdi
	callq	_cm_rep_get_qpn
	movq	80(%r13), %rcx
	movq	%rax, 16(%rcx)
	movq	_cm@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	movq	80(%r13), %rdi
	callq	_cm_insert_remote_id
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_cm@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
LBB0_3:
	movq	%r13, %rdi
	callq	_spin_unlock_irq
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_cm_deref_id
	jmp	LBB0_13
LBB0_1:
	movq	%r14, %rdi
	callq	_cm_dup_rep_handler
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	80(%r13), %rdi
	callq	_cm_insert_remote_qpn
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	80(%r13), %rdi
	addq	$8, %rdi
	leaq	4(%r12), %rsi
	callq	_rb_erase
	movq	80(%r13), %rax
	movq	$0, (%rax)
	movq	%r12, %rdi
	callq	_spin_unlock
	movq	%r13, %rdi
	callq	_spin_unlock_irq
	movl	16(%r14), %edi
	movq	8(%r14), %rsi
	movq	_IB_CM_REJ_STALE_CONN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CM_MSG_RESPONSE_REP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_cm_issue_rej
	jmp	LBB0_4
LBB0_9:
	movq	_cm@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movq	_IB_CM_REP_RCVD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r13)
	movl	8(%r15), %eax
	movl	%eax, 76(%r13)
	movl	60(%r13), %esi
	movq	%r15, %rdi
	callq	_cm_rep_get_qpn
	movq	%rax, 64(%r13)
	movl	4(%r15), %eax
	movl	%eax, 56(%r13)
	movl	(%r15), %eax
	movl	%eax, 52(%r13)
	movq	%r15, %rdi
	callq	_cm_rep_get_starting_psn
	movl	%eax, 48(%r13)
	movq	%r15, %rdi
	callq	_cm_rep_get_rnr_retry_count
	movl	%eax, 44(%r13)
	movq	%r15, %rdi
	callq	_cm_rep_get_target_ack_delay
	movl	%eax, 40(%r13)
	movq	24(%r13), %rsi
	decq	%rsi
	movl	%eax, %edi
	callq	_cm_ack_timeout
	movq	%rax, 24(%r13)
	movl	40(%r13), %edi
	movq	32(%r13), %rsi
	decq	%rsi
	callq	_cm_ack_timeout
	movq	%rax, 32(%r13)
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movl	12(%r13), %esi
	callq	_ib_cancel_mad
	leaq	8(%r13), %rdi
	callq	_atomic_inc_and_test
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	%r13, %rdi
	callq	_spin_unlock_irq
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_cm_process_work
	jmp	LBB0_12
LBB0_10:
	movq	%r13, %rsi
	addq	$4, %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	movq	%r13, %rdi
	callq	_spin_unlock_irq
	movq	%r13, %rdi
	callq	_cm_deref_id
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cm,8,2                         ## @cm
	.comm	_IB_CM_REJ_STALE_CONN,4,2       ## @IB_CM_REJ_STALE_CONN
	.comm	_CM_MSG_RESPONSE_REP,4,2        ## @CM_MSG_RESPONSE_REP
	.comm	_IB_CM_REP_RCVD,4,2             ## @IB_CM_REP_RCVD
	.no_dead_strip	_cm_rep_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cm_rep_handler
_cm_rep_handler:                        ; @cm_rep_handler
	.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	x20, x0
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
	ldr	w0, [x21, #16]
	mov	w1, #0
	bl	_cm_acquire_id
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w1, [x0, #60]
	mov	x0, x20
	bl	_cm_format_rep_event
	mov	x0, x19
	bl	_spin_lock_irq
	ldr	w8, [x19, #72]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x19, #80]
	ldr	d0, [x21, #8]
	rev64.2s	v0, v0
	str	d0, [x8, #24]
	ldr	w1, [x19, #60]
	mov	x0, x21
	bl	_cm_rep_get_qpn
	ldr	x8, [x19, #80]
	str	x0, [x8, #16]
Lloh0:
	adrp	x22, _cm@GOTPAGE
Lloh1:
	ldr	x22, [x22, _cm@GOTPAGEOFF]
	mov	x0, x22
	bl	_spin_lock
	ldr	x0, [x19, #80]
	bl	_cm_insert_remote_id
	cbz	x0, LBB0_8
; %bb.3:
Lloh2:
	adrp	x0, _cm@GOTPAGE
Lloh3:
	ldr	x0, [x0, _cm@GOTPAGEOFF]
	bl	_spin_unlock
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irq
LBB0_5:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_cm_deref_id
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_cm_dup_rep_handler
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	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
LBB0_8:
	ldr	x0, [x19, #80]
	bl	_cm_insert_remote_qpn
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x8, [x19, #80]
	add	x0, x8, #8
	add	x1, x22, #4
	bl	_rb_erase
	ldr	x8, [x19, #80]
	str	xzr, [x8]
	mov	x0, x22
	bl	_spin_unlock
	mov	x0, x19
	bl	_spin_unlock_irq
	ldr	w0, [x20, #16]
	ldr	x1, [x20, #8]
Lloh10:
	adrp	x8, _IB_CM_REJ_STALE_CONN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IB_CM_REJ_STALE_CONN@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _CM_MSG_RESPONSE_REP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CM_MSG_RESPONSE_REP@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x4, #0
	mov	w5, #0
	bl	_cm_issue_rej
	b	LBB0_5
LBB0_10:
Lloh16:
	adrp	x0, _cm@GOTPAGE
Lloh17:
	ldr	x0, [x0, _cm@GOTPAGEOFF]
	bl	_spin_unlock
Lloh18:
	adrp	x8, _IB_CM_REP_RCVD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IB_CM_REP_RCVD@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x21, #8]
	stp	w8, w9, [x19, #72]
	ldr	w1, [x19, #60]
	mov	x0, x21
	bl	_cm_rep_get_qpn
	str	x0, [x19, #64]
	ldr	d0, [x21]
	stur	d0, [x19, #52]
	mov	x0, x21
	bl	_cm_rep_get_starting_psn
	str	w0, [x19, #48]
	mov	x0, x21
	bl	_cm_rep_get_rnr_retry_count
	str	w0, [x19, #44]
	mov	x0, x21
	bl	_cm_rep_get_target_ack_delay
	str	w0, [x19, #40]
	ldr	x8, [x19, #24]
	sub	x1, x8, #1
	bl	_cm_ack_timeout
	str	x0, [x19, #24]
	ldr	w0, [x19, #40]
	ldr	x8, [x19, #32]
	sub	x1, x8, #1
	bl	_cm_ack_timeout
	str	x0, [x19, #32]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	w1, [x19, #12]
	bl	_ib_cancel_mad
	add	x0, x19, #8
	bl	_atomic_inc_and_test
	cbz	w0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	x0, x19
	mov	x1, x20
	bl	_cm_process_work
	b	LBB0_13
LBB0_12:
	add	x1, x19, #4
	mov	x0, x20
	bl	_list_add_tail
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	x0, x19
	bl	_cm_deref_id
LBB0_13:
	mov	w20, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cm,8,2                         ; @cm
	.comm	_IB_CM_REJ_STALE_CONN,4,2       ; @IB_CM_REJ_STALE_CONN
	.comm	_CM_MSG_RESPONSE_REP,4,2        ; @CM_MSG_RESPONSE_REP
	.comm	_IB_CM_REP_RCVD,4,2             ; @IB_CM_REP_RCVD
	.no_dead_strip	_cm_rep_handler
.subsections_via_symbols
