	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidResetMode
_vidResetMode:                          ## @vidResetMode
	.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
	movl	$1, %edi
	callq	_fb_lock
	movq	_giz_screen@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	movq	_PicoOpt@GOTPCREL(%rip), %r15
	testb	$16, (%r15)
	jne	LBB0_2
## %bb.1:
	movq	_currentConfig@GOTPCREL(%rip), %rax
	testb	$-128, (%rax)
	movq	_PDF_RGB555@GOTPCREL(%rip), %rax
	cmoveq	_PDF_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EmuScanBegin16@GOTPCREL(%rip), %rbx
	cmoveq	_EmuScanBegin8@GOTPCREL(%rip), %rbx
	xorl	%esi, %esi
	callq	_PicoDrawSetOutFormat
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_PicoDrawSetCallbacks
LBB0_2:
	testb	$16, (%r15)
	jne	LBB0_4
## %bb.3:
	movq	_currentConfig@GOTPCREL(%rip), %rax
	testb	$-128, (%rax)
	jne	LBB0_5
LBB0_4:
	movq	_localPal@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1536, 768(%rax)                ## imm = 0x600
	movl	$49152, 832(%rax)               ## imm = 0xC000
	movl	$0, 896(%rax)
	movl	$65535, 960(%rax)               ## imm = 0xFFFF
LBB0_5:
	movq	_Pico@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	(%r14), %rdi
	xorl	%esi, %esi
	movl	$38520, %edx                    ## imm = 0x9678
	callq	_memset32
	movq	_currentConfig@GOTPCREL(%rip), %rax
	testb	$-128, 1(%rax)
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	callq	_fb_unlock
	xorl	%edi, %edi
	callq	_fb_lock
	movq	%rax, (%r14)
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$38520, %edx                    ## imm = 0x9678
	callq	_memset32
LBB0_7:
	xorl	%eax, %eax
	callq	_fb_unlock
	movq	$0, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_giz_screen,8,3                 ## @giz_screen
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_currentConfig,4,2              ## @currentConfig
	.comm	_PDF_RGB555,4,2                 ## @PDF_RGB555
	.comm	_EmuScanBegin16,4,2             ## @EmuScanBegin16
	.comm	_PDF_NONE,4,2                   ## @PDF_NONE
	.comm	_EmuScanBegin8,4,2              ## @EmuScanBegin8
	.comm	_localPal,8,3                   ## @localPal
	.comm	_Pico,4,2                       ## @Pico
	.no_dead_strip	_vidResetMode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidResetMode
_vidResetMode:                          ; @vidResetMode
	.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	w0, #1
	bl	_fb_lock
Lloh0:
	adrp	x19, _giz_screen@GOTPAGE
Lloh1:
	ldr	x19, [x19, _giz_screen@GOTPAGEOFF]
	str	x0, [x19]
Lloh2:
	adrp	x21, _PicoOpt@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PicoOpt@GOTPAGEOFF]
	ldrb	w8, [x21]
Lloh4:
	adrp	x20, _currentConfig@GOTPAGE
Lloh5:
	ldr	x20, [x20, _currentConfig@GOTPAGEOFF]
	tbnz	w8, #4, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _PDF_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PDF_NONE@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh8:
	adrp	x10, _PDF_RGB555@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PDF_RGB555@GOTPAGEOFF]
	tst	w9, #0x80
	csel	x8, x8, x10, eq
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _EmuScanBegin8@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EmuScanBegin8@GOTPAGEOFF]
Lloh12:
	adrp	x9, _EmuScanBegin16@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EmuScanBegin16@GOTPAGEOFF]
	csel	x22, x8, x9, eq
	mov	w1, #0
	bl	_PicoDrawSetOutFormat
	ldr	w0, [x22]
	mov	x1, #0
	bl	_PicoDrawSetCallbacks
LBB0_2:
	ldrb	w8, [x21]
	tbnz	w8, #4, LBB0_4
; %bb.3:
	ldrb	w8, [x20]
	tbnz	w8, #7, LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _localPal@GOTPAGE
Lloh15:
	ldr	x8, [x8, _localPal@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	mov	w9, #1536
	str	w9, [x8, #768]
	mov	w9, #49152
	str	w9, [x8, #832]
	str	wzr, [x8, #896]
	mov	w9, #65535
	str	w9, [x8, #960]
LBB0_5:
Lloh17:
	adrp	x8, _Pico@GOTPAGE
Lloh18:
	ldr	x8, [x8, _Pico@GOTPAGEOFF]
	mov	w9, #1
Lloh19:
	str	w9, [x8]
	ldr	x0, [x19]
	mov	w1, #0
	mov	w2, #38520
	bl	_memset32
	ldrb	w8, [x20, #1]
	tbz	w8, #7, LBB0_7
; %bb.6:
	bl	_fb_unlock
	mov	w0, #0
	bl	_fb_lock
	str	x0, [x19]
	mov	w1, #0
	mov	w2, #38520
	bl	_memset32
LBB0_7:
	bl	_fb_unlock
	str	xzr, [x19]
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_giz_screen,8,3                 ; @giz_screen
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_currentConfig,4,2              ; @currentConfig
	.comm	_PDF_RGB555,4,2                 ; @PDF_RGB555
	.comm	_EmuScanBegin16,4,2             ; @EmuScanBegin16
	.comm	_PDF_NONE,4,2                   ; @PDF_NONE
	.comm	_EmuScanBegin8,4,2              ; @EmuScanBegin8
	.comm	_localPal,8,3                   ; @localPal
	.comm	_Pico,4,2                       ; @Pico
	.no_dead_strip	_vidResetMode
.subsections_via_symbols
