	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function frontend_ctr_deinit
_frontend_ctr_deinit:                   ## @frontend_ctr_deinit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	$255, -4(%rbp)
	xorl	%eax, %eax
	callq	_retro_main_log_file_deinit
	xorl	%eax, %eax
	callq	_verbosity_enable
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_retro_main_log_file_init
	movq	_gfxBottomFramebuffers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_currentConsole@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_ctr_fork_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_FRONTEND_FORK_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_wait_for_input
LBB0_3:
	leaq	-12(%rbp), %rdi
	callq	_CFGU_GetModelNintendo2DS
	cmpl	$0, -12(%rbp)
	je	LBB0_6
## %bb.4:
	leaq	L_.str(%rip), %rsi
	leaq	-8(%rbp), %rdi
	callq	_srvGetServiceHandle
	testq	%rax, %rax
	js	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_getThreadCommandBuffer
	movabsq	$8591048768, %rcx               ## imm = 0x200110040
	movq	%rcx, (%rax)
	movl	-8(%rbp), %edi
	callq	_svcSendSyncRequest
	movl	-8(%rbp), %edi
	callq	_svcCloseHandle
LBB0_6:
	leaq	-4(%rbp), %rdi
	callq	_CFGU_GetSystemModel
	cmpl	$1, -4(%rbp)
	ja	LBB0_8
## %bb.7:
	xorps	%xmm0, %xmm0
	ucomiss	536350848, %xmm0
	setnp	%al
	sete	%cl
	xorl	%edx, %edx
	testb	%al, %cl
	movl	$65537, %eax                    ## imm = 0x10001
	cmovnel	%edx, %eax
	movl	%eax, -16(%rbp)
	leaq	-16(%rbp), %rsi
	movl	$2105344, %edi                  ## imm = 0x202000
	movl	$4, %edx
	callq	_GSPGPU_WriteHWRegs
LBB0_8:
	xorl	%eax, %eax
	callq	_mcuHwcExit
	xorl	%eax, %eax
	callq	_ptmuExit
	xorl	%eax, %eax
	callq	_cfguExit
	xorl	%eax, %eax
	callq	_ndspExit
	xorl	%eax, %eax
	callq	_csndExit
	movq	_gfxTopRightFramebuffers@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	$0, (%rcx)
	movq	(%rax), %rax
	movq	$0, 8(%rax)
	xorl	%eax, %eax
	callq	_gfxExit
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gfxBottomFramebuffers,8,3      ## @gfxBottomFramebuffers
	.comm	_ctr_fork_mode,8,3              ## @ctr_fork_mode
	.comm	_FRONTEND_FORK_NONE,8,3         ## @FRONTEND_FORK_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gsp::Lcd"

	.comm	_gfxTopRightFramebuffers,8,3    ## @gfxTopRightFramebuffers
	.no_dead_strip	_frontend_ctr_deinit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function frontend_ctr_deinit
lCPI0_0:
	.long	1114176                         ; 0x110040
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_frontend_ctr_deinit:                   ; @frontend_ctr_deinit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
	mov	w8, #255
	str	w8, [sp]
	bl	_retro_main_log_file_deinit
	bl	_verbosity_enable
	mov	x0, #0
	mov	w1, #0
	bl	_retro_main_log_file_init
Lloh0:
	adrp	x8, _gfxBottomFramebuffers@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gfxBottomFramebuffers@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _currentConsole@GOTPAGE
Lloh4:
	ldr	x9, [x9, _currentConsole@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _ctr_fork_mode@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ctr_fork_mode@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _FRONTEND_FORK_NONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FRONTEND_FORK_NONE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	bl	_wait_for_input
LBB0_3:
	add	x0, sp, #4
	bl	_CFGU_GetModelNintendo2DS
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_6
; %bb.4:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	sub	x0, x29, #4
	bl	_srvGetServiceHandle
	tbnz	x0, #63, LBB0_6
; %bb.5:
	bl	_getThreadCommandBuffer
Lloh14:
	adrp	x8, lCPI0_0@PAGE
Lloh15:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x0]
	ldur	w0, [x29, #-4]
	bl	_svcSendSyncRequest
	ldur	w0, [x29, #-4]
	bl	_svcCloseHandle
LBB0_6:
	mov	x0, sp
	bl	_CFGU_GetSystemModel
	ldr	w8, [sp]
	cmp	w8, #1
	b.hi	LBB0_8
; %bb.7:
	mov	w8, #4224
	movk	w8, #8184, lsl #16
	ldr	s0, [x8]
	fcmp	s0, #0.0
	mov	w8, #65537
	csel	w8, wzr, w8, eq
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	w0, #8192
	movk	w0, #32, lsl #16
	mov	w2, #4
	bl	_GSPGPU_WriteHWRegs
LBB0_8:
	bl	_mcuHwcExit
	bl	_ptmuExit
	bl	_cfguExit
	bl	_ndspExit
	bl	_csndExit
Lloh16:
	adrp	x8, _gfxTopRightFramebuffers@GOTPAGE
Lloh17:
	ldr	x8, [x8, _gfxTopRightFramebuffers@GOTPAGEOFF]
	ldr	x9, [x8]
	str	xzr, [x9]
	ldr	x8, [x8]
	str	xzr, [x8, #8]
	bl	_gfxExit
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_gfxBottomFramebuffers,8,3      ; @gfxBottomFramebuffers
	.comm	_ctr_fork_mode,8,3              ; @ctr_fork_mode
	.comm	_FRONTEND_FORK_NONE,8,3         ; @FRONTEND_FORK_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gsp::Lcd"

	.comm	_gfxTopRightFramebuffers,8,3    ; @gfxTopRightFramebuffers
	.no_dead_strip	_frontend_ctr_deinit
.subsections_via_symbols
