	.file	"extr_plat_sdl.c_plat_video_loop_prepare.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	plat_video_loop_prepare
	.type	plat_video_loop_prepare, @function
plat_video_loop_prepare:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	esi, DWORD PTR g_screen_height[rip]
	mov	edi, DWORD PTR g_screen_width[rip]
	xor	edx, edx
	call	plat_sdl_change_video_mode@PLT
	cmp	QWORD PTR plat_sdl_overlay[rip], 0
	je	.L11
.L2:
	mov	edi, DWORD PTR shadow_fb[rip]
	mov	DWORD PTR g_screen_ptr[rip], edi
.L4:
	mov	eax, DWORD PTR g_screen_width[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	lea	esi, [rax+rax]
	jmp	PicoDrawSetOutBuf@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	cmp	QWORD PTR plat_sdl_gl_active[rip], 0
	jne	.L2
	mov	rdi, QWORD PTR plat_sdl_screen[rip]
	call	SDL_MUSTLOCK@PLT
	test	rax, rax
	jne	.L12
.L5:
	mov	rax, QWORD PTR plat_sdl_screen[rip]
	mov	edi, DWORD PTR [rax]
	mov	DWORD PTR g_screen_ptr[rip], edi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, QWORD PTR plat_sdl_screen[rip]
	call	SDL_LockSurface@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	plat_video_loop_prepare, .-plat_video_loop_prepare
	.comm	shadow_fb,4,4
	.comm	plat_sdl_screen,8,8
	.comm	plat_sdl_overlay,8,8
	.comm	plat_sdl_gl_active,8,8
	.comm	g_screen_width,4,4
	.comm	g_screen_ptr,4,4
	.comm	g_screen_height,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_plat_sdl.c_plat_video_loop_prepare.c"
	.text
	.align	2
	.global	plat_video_loop_prepare
	.syntax unified
	.arm
	.fpu softvfp
	.type	plat_video_loop_prepare, %function
plat_video_loop_prepare:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, lr}
	ldr	r4, .L13+4
	ldr	r1, [r3]
	mov	r2, #0
	ldr	r0, [r4]
	bl	plat_sdl_change_video_mode
	ldr	r3, .L13+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
.L2:
	ldr	r2, .L13+12
	ldr	r3, .L13+16
	ldr	r0, [r2]
	str	r0, [r3]
.L4:
	ldr	r1, [r4]
	pop	{r4, r5, r6, lr}
	lsl	r1, r1, #1
	b	PicoDrawSetOutBuf
.L11:
	ldr	r3, .L13+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L2
	ldr	r5, .L13+24
	ldr	r0, [r5]
	bl	SDL_MUSTLOCK
	cmp	r0, #0
	bne	.L12
.L5:
	ldr	r2, [r5]
	ldr	r3, .L13+16
	ldr	r0, [r2]
	str	r0, [r3]
	b	.L4
.L12:
	ldr	r0, [r5]
	bl	SDL_LockSurface
	b	.L5
.L14:
	.align	2
.L13:
	.word	g_screen_height
	.word	g_screen_width
	.word	plat_sdl_overlay
	.word	shadow_fb
	.word	g_screen_ptr
	.word	plat_sdl_gl_active
	.word	plat_sdl_screen
	.size	plat_video_loop_prepare, .-plat_video_loop_prepare
	.comm	shadow_fb,4,4
	.comm	plat_sdl_screen,4,4
	.comm	plat_sdl_overlay,4,4
	.comm	plat_sdl_gl_active,4,4
	.comm	g_screen_width,4,4
	.comm	g_screen_ptr,4,4
	.comm	g_screen_height,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
