	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ShutdownEmulatedEnvironment    ## -- Begin function ShutdownEmulatedEnvironment
	.p2align	4, 0x90
_ShutdownEmulatedEnvironment:           ## @ShutdownEmulatedEnvironment
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_new_videl_mode_valid@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_original_videl_settings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_p_str_p@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_load_r@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_Supexec
	movq	$0, (%rbx)
	movq	_Original_Log_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_Original_Phys_base@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edx
	movl	$-1, %ecx
	callq	_VsetScreen
LBB0_2:
	xorl	%eax, %eax
	callq	_restore_original_colors
	movq	_rem_kb@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_Supexec
	movl	$4, %edi
	movl	$8, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_Bconout                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_new_videl_mode_valid,8,3       ## @new_videl_mode_valid
	.comm	_original_videl_settings,8,3    ## @original_videl_settings
	.comm	_p_str_p,8,3                    ## @p_str_p
	.comm	_load_r,4,2                     ## @load_r
	.comm	_Original_Log_base,4,2          ## @Original_Log_base
	.comm	_Original_Phys_base,4,2         ## @Original_Phys_base
	.comm	_rem_kb,4,2                     ## @rem_kb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ShutdownEmulatedEnvironment    ; -- Begin function ShutdownEmulatedEnvironment
	.p2align	2
_ShutdownEmulatedEnvironment:           ; @ShutdownEmulatedEnvironment
	.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
Lloh0:
	adrp	x19, _new_videl_mode_valid@GOTPAGE
Lloh1:
	ldr	x19, [x19, _new_videl_mode_valid@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _original_videl_settings@GOTPAGE
Lloh3:
	ldr	x8, [x8, _original_videl_settings@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _p_str_p@GOTPAGE
Lloh6:
	ldr	x9, [x9, _p_str_p@GOTPAGEOFF]
Lloh7:
	str	x8, [x9]
Lloh8:
	adrp	x8, _load_r@GOTPAGE
Lloh9:
	ldr	x8, [x8, _load_r@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_Supexec
	str	xzr, [x19]
Lloh11:
	adrp	x8, _Original_Log_base@GOTPAGE
Lloh12:
	ldr	x8, [x8, _Original_Log_base@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _Original_Phys_base@GOTPAGE
Lloh15:
	ldr	x8, [x8, _Original_Phys_base@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #-1
	mov	w3, #-1
	bl	_VsetScreen
LBB0_2:
	bl	_restore_original_colors
Lloh17:
	adrp	x8, _rem_kb@GOTPAGE
Lloh18:
	ldr	x8, [x8, _rem_kb@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_Supexec
	mov	w0, #4
	mov	w1, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_Bconout
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_new_videl_mode_valid,8,3       ; @new_videl_mode_valid
	.comm	_original_videl_settings,8,3    ; @original_videl_settings
	.comm	_p_str_p,8,3                    ; @p_str_p
	.comm	_load_r,4,2                     ; @load_r
	.comm	_Original_Log_base,4,2          ; @Original_Log_base
	.comm	_Original_Phys_base,4,2         ; @Original_Phys_base
	.comm	_rem_kb,4,2                     ; @rem_kb
.subsections_via_symbols
