	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___libctru_exit                 ## -- Begin function __libctru_exit
	.p2align	4, 0x90
___libctru_exit:                        ## @__libctru_exit
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$0, -20(%rbp)
	movq	___system_argv@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
LBB0_2:
	movq	___linear_heap@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	___linear_heap_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_MEMOP_FREE@GOTPCREL(%rip), %r14
	movl	(%r14), %r8d
	leaq	-20(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_svcControlMemory
	movq	___heapBase@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	___heap_size@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%r14), %r8d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_svcControlMemory
	movq	___stack_size_extra@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	movq	___stack_bottom@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %r8d
	leaq	-20(%rbp), %rdi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_svcControlMemory
LBB0_4:
	xorl	%eax, %eax
	callq	_envDestroyHandles
	xorl	%eax, %eax
	callq	___sync_fini
	xorl	%eax, %eax
	callq	___system_retAddr
	xorl	%eax, %eax
	callq	_svcExitProcess
	ud2
	.cfi_endproc
                                        ## -- End function
	.comm	___system_argv,8,3              ## @__system_argv
	.comm	___linear_heap,4,2              ## @__linear_heap
	.comm	___linear_heap_size,8,3         ## @__linear_heap_size
	.comm	_MEMOP_FREE,4,2                 ## @MEMOP_FREE
	.comm	___heapBase,4,2                 ## @__heapBase
	.comm	___heap_size,8,3                ## @__heap_size
	.comm	___stack_size_extra,8,3         ## @__stack_size_extra
	.comm	___stack_bottom,4,2             ## @__stack_bottom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___libctru_exit                 ; -- Begin function __libctru_exit
	.p2align	2
___libctru_exit:                        ; @__libctru_exit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, ___system_argv@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___system_argv@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
LBB0_2:
Lloh3:
	adrp	x8, ___linear_heap@GOTPAGE
Lloh4:
	ldr	x8, [x8, ___linear_heap@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, ___linear_heap_size@GOTPAGE
Lloh7:
	ldr	x8, [x8, ___linear_heap_size@GOTPAGEOFF]
Lloh8:
	ldr	x3, [x8]
Lloh9:
	adrp	x19, _MEMOP_FREE@GOTPAGE
Lloh10:
	ldr	x19, [x19, _MEMOP_FREE@GOTPAGEOFF]
	ldr	w4, [x19]
	add	x0, sp, #12
	mov	w2, #0
	mov	w5, #0
	bl	_svcControlMemory
Lloh11:
	adrp	x8, ___heapBase@GOTPAGE
Lloh12:
	ldr	x8, [x8, ___heapBase@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, ___heap_size@GOTPAGE
Lloh15:
	ldr	x8, [x8, ___heap_size@GOTPAGEOFF]
Lloh16:
	ldr	x3, [x8]
	ldr	w4, [x19]
	add	x0, sp, #12
	mov	w2, #0
	mov	w5, #0
	bl	_svcControlMemory
Lloh17:
	adrp	x8, ___stack_size_extra@GOTPAGE
Lloh18:
	ldr	x8, [x8, ___stack_size_extra@GOTPAGEOFF]
Lloh19:
	ldr	x3, [x8]
	cbz	x3, LBB0_4
; %bb.3:
Lloh20:
	adrp	x8, ___stack_bottom@GOTPAGE
Lloh21:
	ldr	x8, [x8, ___stack_bottom@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	w4, [x19]
	add	x0, sp, #12
	mov	w2, #0
	mov	w5, #0
	bl	_svcControlMemory
LBB0_4:
	bl	_envDestroyHandles
	bl	___sync_fini
	bl	___system_retAddr
	bl	_svcExitProcess
	brk	#0x1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	___system_argv,8,3              ; @__system_argv
	.comm	___linear_heap,4,2              ; @__linear_heap
	.comm	___linear_heap_size,8,3         ; @__linear_heap_size
	.comm	_MEMOP_FREE,4,2                 ; @MEMOP_FREE
	.comm	___heapBase,4,2                 ; @__heapBase
	.comm	___heap_size,8,3                ; @__heap_size
	.comm	___stack_size_extra,8,3         ; @__stack_size_extra
	.comm	___stack_bottom,4,2             ; @__stack_bottom
.subsections_via_symbols
