	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gx_video_Stop                  ## -- Begin function gx_video_Stop
	.p2align	4, 0x90
_gx_video_Stop:                         ## @gx_video_Stop
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_VIDEO_WaitVSync
	movq	_sms_ntsc@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
LBB0_2:
	movq	_md_ntsc@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_free
LBB0_4:
	movq	$0, (%r14)
	movq	$0, (%rbx)
	movq	_crosshair@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_gxTextureClose
	movq	(%rbx), %rdi
	addq	$4, %rdi
	callq	_gxTextureClose
	movq	_cd_leds@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_gxTextureClose
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	addq	$4, %rdi
	callq	_gxTextureClose
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	callq	_gxTextureClose
	movq	(%rbx), %rax
	movq	8(%rax), %rdi
	addq	$4, %rdi
	callq	_gxTextureClose
	movl	$1, %edi
	callq	_gxResetRendering
	movq	_vmode@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_GX_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_gxResetMode
	movq	_BLACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gxClearScreen
	movl	$255, %edi
	callq	_gxDrawScreenshot
	xorl	%edi, %edi
	callq	_VIDEO_SetPostRetraceCallback
	movq	_config@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rdi
	movl	%eax, (%rdi)
	movq	_VI_MAX_WIDTH_NTSC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	%eax, 4(%rdi)
	callq	_VIDEO_Configure
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_gxSetScreen                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_sms_ntsc,8,3                   ## @sms_ntsc
	.comm	_md_ntsc,8,3                    ## @md_ntsc
	.comm	_crosshair,8,3                  ## @crosshair
	.comm	_cd_leds,8,3                    ## @cd_leds
	.comm	_vmode,8,3                      ## @vmode
	.comm	_GX_TRUE,4,2                    ## @GX_TRUE
	.comm	_BLACK,8,3                      ## @BLACK
	.comm	_config,4,2                     ## @config
	.comm	_VI_MAX_WIDTH_NTSC,4,2          ## @VI_MAX_WIDTH_NTSC
	.comm	_VI_GM_1_0,4,2                  ## @VI_GM_1_0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gx_video_Stop                  ; -- Begin function gx_video_Stop
	.p2align	2
_gx_video_Stop:                         ; @gx_video_Stop
	.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
	bl	_VIDEO_WaitVSync
Lloh0:
	adrp	x19, _sms_ntsc@GOTPAGE
Lloh1:
	ldr	x19, [x19, _sms_ntsc@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
LBB0_2:
Lloh2:
	adrp	x20, _md_ntsc@GOTPAGE
Lloh3:
	ldr	x20, [x20, _md_ntsc@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free
LBB0_4:
	str	xzr, [x19]
	str	xzr, [x20]
Lloh4:
	adrp	x19, _crosshair@GOTPAGE
Lloh5:
	ldr	x19, [x19, _crosshair@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_gxTextureClose
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_gxTextureClose
Lloh6:
	adrp	x19, _cd_leds@GOTPAGE
Lloh7:
	ldr	x19, [x19, _cd_leds@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_gxTextureClose
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x0, x8, #4
	bl	_gxTextureClose
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	bl	_gxTextureClose
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	add	x0, x8, #4
	bl	_gxTextureClose
	mov	w0, #1
	bl	_gxResetRendering
Lloh8:
	adrp	x19, _vmode@GOTPAGE
Lloh9:
	ldr	x19, [x19, _vmode@GOTPAGEOFF]
	ldr	x0, [x19]
Lloh10:
	adrp	x8, _GX_TRUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GX_TRUE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_gxResetMode
Lloh13:
	adrp	x8, _BLACK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BLACK@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_gxClearScreen
	mov	w0, #255
	bl	_gxDrawScreenshot
	mov	x0, #0
	bl	_VIDEO_SetPostRetraceCallback
Lloh16:
	adrp	x8, _config@GOTPAGE
Lloh17:
	ldr	x8, [x8, _config@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	x0, [x19]
	str	w8, [x0]
Lloh19:
	adrp	x9, _VI_MAX_WIDTH_NTSC@GOTPAGE
Lloh20:
	ldr	x9, [x9, _VI_MAX_WIDTH_NTSC@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	sub	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [x0, #4]
	bl	_VIDEO_Configure
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_gxSetScreen
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_sms_ntsc,8,3                   ; @sms_ntsc
	.comm	_md_ntsc,8,3                    ; @md_ntsc
	.comm	_crosshair,8,3                  ; @crosshair
	.comm	_cd_leds,8,3                    ; @cd_leds
	.comm	_vmode,8,3                      ; @vmode
	.comm	_GX_TRUE,4,2                    ; @GX_TRUE
	.comm	_BLACK,8,3                      ; @BLACK
	.comm	_config,4,2                     ; @config
	.comm	_VI_MAX_WIDTH_NTSC,4,2          ; @VI_MAX_WIDTH_NTSC
	.comm	_VI_GM_1_0,4,2                  ; @VI_GM_1_0
.subsections_via_symbols
