	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_plat_sdl_finish                ## -- Begin function plat_sdl_finish
	.p2align	4, 0x90
_plat_sdl_finish:                       ## @plat_sdl_finish
	.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	_plat_sdl_overlay@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_SDL_FreeYUVOverlay
	movq	$0, (%rbx)
LBB0_2:
	movq	_plat_sdl_gl_active@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_gl_finish
	movq	$0, (%rbx)
LBB0_4:
	movq	_vid_drv_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_fs_w@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_fs_h@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDL_SWSURFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$16, %edx
	callq	_SDL_SetVideoMode
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_SDL_Quit                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_plat_sdl_overlay,8,3           ## @plat_sdl_overlay
	.comm	_plat_sdl_gl_active,8,3         ## @plat_sdl_gl_active
	.comm	_vid_drv_name,4,2               ## @vid_drv_name
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"x11"

	.comm	_fs_w,4,2                       ## @fs_w
	.comm	_fs_h,4,2                       ## @fs_h
	.comm	_SDL_SWSURFACE,4,2              ## @SDL_SWSURFACE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_plat_sdl_finish                ; -- Begin function plat_sdl_finish
	.p2align	2
_plat_sdl_finish:                       ; @plat_sdl_finish
	.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, _plat_sdl_overlay@GOTPAGE
Lloh1:
	ldr	x19, [x19, _plat_sdl_overlay@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_SDL_FreeYUVOverlay
	str	xzr, [x19]
LBB0_2:
Lloh2:
	adrp	x19, _plat_sdl_gl_active@GOTPAGE
Lloh3:
	ldr	x19, [x19, _plat_sdl_gl_active@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
	bl	_gl_finish
	str	xzr, [x19]
LBB0_4:
Lloh4:
	adrp	x8, _vid_drv_name@GOTPAGE
Lloh5:
	ldr	x8, [x8, _vid_drv_name@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _fs_w@GOTPAGE
Lloh10:
	ldr	x8, [x8, _fs_w@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _fs_h@GOTPAGE
Lloh13:
	ldr	x8, [x8, _fs_h@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _SDL_SWSURFACE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SDL_SWSURFACE@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	w2, #16
	bl	_SDL_SetVideoMode
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SDL_Quit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_plat_sdl_overlay,8,3           ; @plat_sdl_overlay
	.comm	_plat_sdl_gl_active,8,3         ; @plat_sdl_gl_active
	.comm	_vid_drv_name,4,2               ; @vid_drv_name
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"x11"

	.comm	_fs_w,4,2                       ; @fs_w
	.comm	_fs_h,4,2                       ; @fs_h
	.comm	_SDL_SWSURFACE,4,2              ; @SDL_SWSURFACE
.subsections_via_symbols
