	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rshutdown                      ## -- Begin function rshutdown
	.p2align	4, 0x90
_rshutdown:                             ## @rshutdown
	.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
	movl	%esi, %r15d
	movl	%edi, %esi
	movq	_idm@GOTPCREL(%rip), %rdi
	callq	_idm_lookup
	testq	%rax, %rax
	je	LBB0_28
## %bb.1:
	movq	%rax, %rbx
	movq	_RS_OPT_SVC_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.2:
	movq	_RS_SVC_REM_KEEPALIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_tcp_svc@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_rs_notify_svc
LBB0_3:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rs_set_nonblocking
LBB0_5:
	movl	8(%rbx), %eax
	movq	_rs_connected@GOTPCREL(%rip), %r13
	xorl	%r14d, %r14d
	testl	%eax, (%r13)
	je	LBB0_19
## %bb.6:
	movq	_SHUT_RDWR@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_8
## %bb.7:
	movq	_RS_CTRL_DISCONNECT@GOTPCREL(%rip), %rcx
	movq	_rs_readable@GOTPCREL(%rip), %rdx
	movq	_rs_writable@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	movl	(%rcx), %r15d
	notl	%esi
	andl	%esi, %eax
	movl	%eax, 8(%rbx)
	jmp	LBB0_14
LBB0_28:
	movq	_EBADF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
LBB0_8:
	movq	_SHUT_WR@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_11
## %bb.9:
	movq	_rs_writable@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 8(%rbx)
	movq	_rs_readable@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.10:
	movq	_RS_CTRL_SHUTDOWN@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_rs_readable@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 8(%rbx)
	movq	_rs_writable@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	testl	%eax, (%rcx)
	jne	LBB0_22
LBB0_12:
	movq	_RS_CTRL_DISCONNECT@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %r15d
LBB0_14:
	movq	%rbx, %rdi
	callq	_rs_ctrl_avail
	testq	%rax, %rax
	je	LBB0_15
LBB0_16:
	movl	(%r13), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_19
## %bb.17:
	movq	%rbx, %rdi
	callq	_rs_ctrl_avail
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	incl	24(%rbx)
	movq	_RS_OP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_rs_msg_set
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_rs_post_msg
	movl	%eax, %r14d
LBB0_19:
	movl	(%r13), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_21
## %bb.20:
	movq	_rs_conn_all_sends_done@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rs_process_cq
LBB0_21:
	movl	%r14d, %r12d
LBB0_22:
	movl	4(%rbx), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_25
## %bb.23:
	movl	(%r13), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_25
## %bb.24:
	movq	%rbx, %rdi
	callq	_rs_set_nonblocking
LBB0_25:
	movq	_rs_disconnected@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_27
## %bb.26:
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_ibv_req_notify_cq
	movq	16(%rbx), %rdi
	callq	_ucma_shutdown
LBB0_27:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_rs_conn_can_send_ctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rs_process_cq
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_idm,4,2                        ## @idm
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_RS_OPT_SVC_ACTIVE,4,2          ## @RS_OPT_SVC_ACTIVE
	.comm	_tcp_svc,4,2                    ## @tcp_svc
	.comm	_RS_SVC_REM_KEEPALIVE,4,2       ## @RS_SVC_REM_KEEPALIVE
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_rs_connected,4,2               ## @rs_connected
	.comm	_SHUT_RDWR,4,2                  ## @SHUT_RDWR
	.comm	_RS_CTRL_DISCONNECT,4,2         ## @RS_CTRL_DISCONNECT
	.comm	_rs_readable,4,2                ## @rs_readable
	.comm	_rs_writable,4,2                ## @rs_writable
	.comm	_SHUT_WR,4,2                    ## @SHUT_WR
	.comm	_RS_CTRL_SHUTDOWN,4,2           ## @RS_CTRL_SHUTDOWN
	.comm	_rs_conn_can_send_ctrl,4,2      ## @rs_conn_can_send_ctrl
	.comm	_RS_OP_CTRL,4,2                 ## @RS_OP_CTRL
	.comm	_rs_conn_all_sends_done,4,2     ## @rs_conn_all_sends_done
	.comm	_rs_disconnected,4,2            ## @rs_disconnected
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rshutdown                      ; -- Begin function rshutdown
	.p2align	2
_rshutdown:                             ; @rshutdown
	.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	x1, x0
Lloh0:
	adrp	x0, _idm@GOTPAGE
Lloh1:
	ldr	x0, [x0, _idm@GOTPAGEOFF]
	bl	_idm_lookup
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh2:
	adrp	x9, _RS_OPT_SVC_ACTIVE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RS_OPT_SVC_ACTIVE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _RS_SVC_REM_KEEPALIVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RS_SVC_REM_KEEPALIVE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x0, _tcp_svc@GOTPAGE
Lloh9:
	ldr	x0, [x0, _tcp_svc@GOTPAGEOFF]
	mov	x1, x19
	bl	_rs_notify_svc
LBB0_3:
	ldr	w8, [x19, #4]
Lloh10:
	adrp	x22, _O_NONBLOCK@GOTPAGE
Lloh11:
	ldr	x22, [x22, _O_NONBLOCK@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_rs_set_nonblocking
LBB0_5:
	ldr	w8, [x19, #8]
Lloh12:
	adrp	x23, _rs_connected@GOTPAGE
Lloh13:
	ldr	x23, [x23, _rs_connected@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.6:
Lloh14:
	adrp	x9, _SHUT_RDWR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SHUT_RDWR@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w9, w20
	b.ne	LBB0_9
; %bb.7:
Lloh17:
	adrp	x9, _RS_CTRL_DISCONNECT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _RS_CTRL_DISCONNECT@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x9]
Lloh20:
	adrp	x9, _rs_readable@GOTPAGE
Lloh21:
	ldr	x9, [x9, _rs_readable@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _rs_writable@GOTPAGE
Lloh24:
	ldr	x10, [x10, _rs_writable@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	orr	w9, w10, w9
	bic	w8, w8, w9
	str	w8, [x19, #8]
	b	LBB0_15
LBB0_8:
Lloh26:
	adrp	x8, _EBADF@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	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	_ERR
LBB0_9:
Lloh29:
	adrp	x9, _SHUT_WR@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SHUT_WR@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	cmp	w9, w20
	b.ne	LBB0_11
; %bb.10:
Lloh32:
	adrp	x9, _rs_writable@GOTPAGE
Lloh33:
	ldr	x9, [x9, _rs_writable@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19, #8]
Lloh35:
	adrp	x9, _rs_readable@GOTPAGE
Lloh36:
	ldr	x9, [x9, _rs_readable@GOTPAGEOFF]
Lloh37:
	adrp	x10, _RS_CTRL_SHUTDOWN@GOTPAGE
Lloh38:
	ldr	x10, [x10, _RS_CTRL_SHUTDOWN@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
Lloh40:
	adrp	x11, _RS_CTRL_DISCONNECT@GOTPAGE
Lloh41:
	ldr	x11, [x11, _RS_CTRL_DISCONNECT@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	b	LBB0_14
LBB0_11:
Lloh42:
	adrp	x9, _rs_readable@GOTPAGE
Lloh43:
	ldr	x9, [x9, _rs_readable@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19, #8]
Lloh45:
	adrp	x9, _rs_writable@GOTPAGE
Lloh46:
	ldr	x9, [x9, _rs_writable@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
	mov	w20, #0
	b	LBB0_22
LBB0_13:
Lloh48:
	adrp	x8, _RS_CTRL_DISCONNECT@GOTPAGE
Lloh49:
	ldr	x8, [x8, _RS_CTRL_DISCONNECT@GOTPAGEOFF]
LBB0_14:
	ldr	w21, [x8]
LBB0_15:
	mov	x0, x19
	bl	_rs_ctrl_avail
	cbz	x0, LBB0_28
LBB0_16:
	ldr	w8, [x19, #8]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_rs_ctrl_avail
	cbz	x0, LBB0_19
; %bb.18:
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
Lloh50:
	adrp	x8, _RS_OP_CTRL@GOTPAGE
Lloh51:
	ldr	x8, [x8, _RS_OP_CTRL@GOTPAGEOFF]
Lloh52:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_rs_msg_set
	mov	x1, x0
	mov	x0, x19
	bl	_rs_post_msg
	mov	x20, x0
	b	LBB0_20
LBB0_19:
	mov	w20, #0
LBB0_20:
	ldr	w8, [x19, #8]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_22
; %bb.21:
Lloh53:
	adrp	x8, _rs_conn_all_sends_done@GOTPAGE
Lloh54:
	ldr	x8, [x8, _rs_conn_all_sends_done@GOTPAGEOFF]
Lloh55:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_rs_process_cq
LBB0_22:
	ldr	w1, [x19, #4]
	ldr	w8, [x22]
	tst	w8, w1
	b.eq	LBB0_25
; %bb.23:
	ldr	w8, [x19, #8]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_25
; %bb.24:
	mov	x0, x19
	bl	_rs_set_nonblocking
LBB0_25:
	ldr	w8, [x19, #8]
Lloh56:
	adrp	x9, _rs_disconnected@GOTPAGE
Lloh57:
	ldr	x9, [x9, _rs_disconnected@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_27
; %bb.26:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_ibv_req_notify_cq
	ldr	x0, [x19, #16]
	bl	_ucma_shutdown
LBB0_27:
	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_28:
Lloh59:
	adrp	x8, _rs_conn_can_send_ctrl@GOTPAGE
Lloh60:
	ldr	x8, [x8, _rs_conn_can_send_ctrl@GOTPAGEOFF]
Lloh61:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_rs_process_cq
	mov	x20, x0
	cbnz	w0, LBB0_22
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh39
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.comm	_idm,4,2                        ; @idm
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_RS_OPT_SVC_ACTIVE,4,2          ; @RS_OPT_SVC_ACTIVE
	.comm	_tcp_svc,4,2                    ; @tcp_svc
	.comm	_RS_SVC_REM_KEEPALIVE,4,2       ; @RS_SVC_REM_KEEPALIVE
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_rs_connected,4,2               ; @rs_connected
	.comm	_SHUT_RDWR,4,2                  ; @SHUT_RDWR
	.comm	_RS_CTRL_DISCONNECT,4,2         ; @RS_CTRL_DISCONNECT
	.comm	_rs_readable,4,2                ; @rs_readable
	.comm	_rs_writable,4,2                ; @rs_writable
	.comm	_SHUT_WR,4,2                    ; @SHUT_WR
	.comm	_RS_CTRL_SHUTDOWN,4,2           ; @RS_CTRL_SHUTDOWN
	.comm	_rs_conn_can_send_ctrl,4,2      ; @rs_conn_can_send_ctrl
	.comm	_RS_OP_CTRL,4,2                 ; @RS_OP_CTRL
	.comm	_rs_conn_all_sends_done,4,2     ; @rs_conn_all_sends_done
	.comm	_rs_disconnected,4,2            ; @rs_disconnected
.subsections_via_symbols
