	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function srpt_disconnect_ch
_srpt_disconnect_ch:                    ## @srpt_disconnect_ch
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_CH_DISCONNECTING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_srpt_set_ch_state
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpq	$0, 8(%r14)
	je	LBB0_4
## %bb.3:
	movl	4(%r14), %edi
	callq	_rdma_disconnect
LBB0_6:
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_srpt_close_ch
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovnel	%ecx, %ebx
	jmp	LBB0_8
LBB0_1:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	movl	(%r14), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ib_send_cm_dreq
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movl	(%r14), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ib_send_cm_drep
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_CH_DISCONNECTING,4,2           ## @CH_DISCONNECTING
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.no_dead_strip	_srpt_disconnect_ch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function srpt_disconnect_ch
_srpt_disconnect_ch:                    ; @srpt_disconnect_ch
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _CH_DISCONNECTING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CH_DISCONNECTING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_srpt_set_ch_state
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_rdma_disconnect
	mov	x20, x0
	tbz	w0, #31, LBB0_7
	b	LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19]
	mov	x1, #0
	mov	w2, #0
	bl	_ib_send_cm_dreq
	mov	x20, x0
	tbz	w0, #31, LBB0_7
; %bb.5:
	ldr	w0, [x19]
	mov	x1, #0
	mov	w2, #0
	bl	_ib_send_cm_drep
	mov	x20, x0
	tbz	w0, #31, LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_srpt_close_ch
	cmp	x0, #0
	csel	w20, w20, wzr, eq
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CH_DISCONNECTING,4,2           ; @CH_DISCONNECTING
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.no_dead_strip	_srpt_disconnect_ch
.subsections_via_symbols
