	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_close_instance                 ## -- Begin function close_instance
	.p2align	4, 0x90
_close_instance:                        ## @close_instance
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_do_close_event_set
	movq	(%rbx), %rax
	movq	_CM_P2P@GOTPCREL(%rip), %r14
	movq	_CM_TOP@GOTPCREL(%rip), %r15
	cmpq	(%r14), %rax
	je	LBB0_5
## %bb.1:
	movq	_CM_CHILD_TCP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.2:
	movq	_CM_CHILD_UDP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	cmpq	(%r15), %rax
	je	LBB0_5
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_do_close_check_if_restart_permitted
	movq	%rbx, %rdi
	callq	_do_close_free_buf
	movq	%rbx, %rdi
	callq	_do_close_tls
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	sete	%cl
	cmpq	(%r15), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %esi
	movq	%rbx, %rdi
	callq	_do_close_free_key_schedule
	movq	%rbx, %rdi
	callq	_restore_ncp_options
	movq	%rbx, %rdi
	callq	_do_close_link_socket
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_do_close_tun
	movq	%rbx, %rdi
	callq	_do_close_packet_id
	movq	%rbx, %rdi
	callq	_do_close_status_output
	movq	%rbx, %rdi
	callq	_do_close_ifconfig_pool_persist
	movq	%rbx, %rdi
	callq	_do_env_set_destroy
	movq	%rbx, %rdi
	callq	_uninit_proxy
	addq	$8, %rbx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gc_free                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CM_P2P,8,3                     ## @CM_P2P
	.comm	_CM_CHILD_TCP,8,3               ## @CM_CHILD_TCP
	.comm	_CM_CHILD_UDP,8,3               ## @CM_CHILD_UDP
	.comm	_CM_TOP,8,3                     ## @CM_TOP
	.comm	_management,8,3                 ## @management
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_close_instance                 ; -- Begin function close_instance
	.p2align	2
_close_instance:                        ; @close_instance
	.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	x19, x0
	bl	_do_close_event_set
	ldr	x8, [x19]
Lloh0:
	adrp	x21, _CM_P2P@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CM_P2P@GOTPAGEOFF]
Lloh2:
	adrp	x9, _CM_CHILD_TCP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CM_CHILD_TCP@GOTPAGEOFF]
	ldr	x10, [x21]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x11, _CM_CHILD_UDP@GOTPAGE
Lloh6:
	ldr	x11, [x11, _CM_CHILD_UDP@GOTPAGEOFF]
Lloh7:
	adrp	x22, _CM_TOP@GOTPAGE
Lloh8:
	ldr	x22, [x22, _CM_TOP@GOTPAGEOFF]
Lloh9:
	ldr	x11, [x11]
	ldr	x12, [x22]
	cmp	x8, x10
	ccmp	x8, x9, #4, ne
	ccmp	x8, x11, #4, ne
	ccmp	x8, x12, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_do_close_check_if_restart_permitted
	mov	x0, x19
	bl	_do_close_free_buf
	mov	x0, x19
	bl	_do_close_tls
	mov	x20, x19
	ldr	x8, [x20], #8
	ldr	x9, [x21]
	cmp	x8, x9
	ldr	x9, [x22]
	ccmp	x8, x9, #4, ne
	cset	w1, eq
	mov	x0, x19
	bl	_do_close_free_key_schedule
	mov	x0, x19
	bl	_restore_ncp_options
	mov	x0, x19
	bl	_do_close_link_socket
	mov	x0, x19
	mov	w1, #0
	bl	_do_close_tun
	mov	x0, x19
	bl	_do_close_packet_id
	mov	x0, x19
	bl	_do_close_status_output
	mov	x0, x19
	bl	_do_close_ifconfig_pool_persist
	mov	x0, x19
	bl	_do_env_set_destroy
	mov	x0, x19
	bl	_uninit_proxy
	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
	b	_gc_free
LBB0_2:
	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
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CM_P2P,8,3                     ; @CM_P2P
	.comm	_CM_CHILD_TCP,8,3               ; @CM_CHILD_TCP
	.comm	_CM_CHILD_UDP,8,3               ; @CM_CHILD_UDP
	.comm	_CM_TOP,8,3                     ; @CM_TOP
	.comm	_management,8,3                 ; @management
.subsections_via_symbols
