	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_control_update
_sdl_control_update:                    ## @sdl_control_update
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edi killed $edi def $rdi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	addl	$-128, %edi
	cmpl	$13, %edi
	ja	LBB0_45
## %bb.1:
	xorl	%eax, %eax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rdi,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_22:
	movq	_config@GOTPCREL(%rip), %rbx
	movl	4(%rbx), %eax
	movl	%eax, %ecx
	incl	%ecx
	movslq	%ecx, %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$33, %rcx
	addl	%edx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	movl	%eax, 4(%rbx)
	xorl	%edi, %edi
	callq	_get_region
	movq	_snd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_audio_init
	movq	_system_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SYSTEM_MCD@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_25
## %bb.23:
	movq	_SYSTEM_SMS@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_27
## %bb.24:
	testb	$1, (%rbx)
	jne	LBB0_25
LBB0_27:
	movq	_SYSTEM_MD@GOTPCREL(%rip), %rdx
	movq	_region_code@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	(%rdx), %ecx
	jne	LBB0_29
## %bb.28:
	movl	(%rbx), %ecx
	andl	$1, %ecx
	orl	%ecx, %eax
	orl	$32, %eax
	jmp	LBB0_30
LBB0_19:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_45
## %bb.20:
	movq	%rax, %r14
	movq	%rsp, %r15
	movq	_STATE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	callq	_state_save
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_fwrite
	movq	%r14, %rdi
	jmp	LBB0_21
LBB0_17:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_45
## %bb.18:
	movq	%rax, %rbx
	movq	%rsp, %r15
	movq	_STATE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fread
	movq	%r14, %rdi
	callq	_state_load
	movq	%rbx, %rdi
LBB0_21:
	callq	_fclose
	movq	%r15, %rsp
	jmp	LBB0_45
LBB0_15:
	movq	_use_sound@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_45
## %bb.16:
	movq	_turbo_mode@GOTPCREL(%rip), %rax
	xorb	$1, (%rax)
	movq	_sdl_sync@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	jmp	LBB0_45
LBB0_14:
	movq	_log_error@GOTPCREL(%rip), %rax
	xorb	$1, (%rax)
	jmp	LBB0_45
LBB0_12:
	movq	_turbo_mode@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_45
## %bb.13:
	movq	_use_sound@GOTPCREL(%rip), %rax
	xorb	$1, (%rax)
	jmp	LBB0_45
LBB0_8:
	movq	_config@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	$3, %ecx
	je	LBB0_11
## %bb.9:
	testl	%ecx, %ecx
	jne	LBB0_45
## %bb.10:
	movl	$3, (%rax)
	jmp	LBB0_45
LBB0_5:
	movq	_fullscreen@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	$0, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	_SDL_FULLSCREEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_7:
	movl	%ecx, (%rax)
	movq	_VIDEO_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VIDEO_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDL_SWSURFACE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	$16, %edx
	callq	_SDL_SetVideoMode
	movq	_sdl_video@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_45
LBB0_39:
	movq	_joynum@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	_MAX_DEVICES@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	_input@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdi
	movq	_NO_DEVICE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	jmp	LBB0_40
	.p2align	4, 0x90
LBB0_42:                                ##   in Loop: Header=BB0_40 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	movq	%rdx, %rax
	cmpl	%ebx, (%rdi,%rax,4)
	jne	LBB0_44
LBB0_40:                                ## =>This Inner Loop Header: Depth=1
	incq	%rax
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	jne	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_40 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
	movl	%edx, %eax
	cmpl	%ebx, (%rdi,%rax,4)
	je	LBB0_40
LBB0_44:
	movq	%rax, (%rcx)
	jmp	LBB0_45
LBB0_38:
	movq	_config@GOTPCREL(%rip), %rax
	movl	8(%rax), %ecx
	incl	%ecx
	movl	%ecx, %edx
	andl	$3, %edx
	movq	_system_hw@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movq	_SYSTEM_GG@GOTPCREL(%rip), %rdi
	xorl	(%rdi), %esi
	movl	%edx, 8(%rax)
	andl	$2, %ecx
	movl	$-48, %edx
	movl	$14, %edi
	cmovel	%edx, %edi
	leal	(,%rcx,8), %edx
	subl	%ecx, %edx
	orl	12(%rax), %esi
	cmovel	%edi, %edx
	movq	_bitmap@GOTPCREL(%rip), %rax
	movl	%edx, (%rax)
	movl	$3, 4(%rax)
	jmp	LBB0_45
LBB0_37:
	xorl	%edi, %edi
	callq	_gen_reset
	jmp	LBB0_45
LBB0_2:
	movl	$-1, %edi
	callq	_SDL_ShowCursor
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	callq	_SDL_ShowCursor
	jmp	LBB0_45
LBB0_25:
	xorl	%eax, %eax
	callq	_system_init
LBB0_26:
	xorl	%eax, %eax
	callq	_system_reset
LBB0_45:
	movl	$1, %eax
LBB0_46:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_48
## %bb.47:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$1, %edi
	callq	_SDL_ShowCursor
	jmp	LBB0_45
LBB0_11:
	movl	$1, (%rax)
	jmp	LBB0_45
LBB0_29:
	sarl	%eax
	orl	$128, %eax
LBB0_30:
	movq	_io_reg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	_vdp_pal@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_status@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	$-2, %edx
	xorl	%esi, %esi
	testq	%rax, %rax
	movl	$262, %edi                      ## imm = 0x106
	movl	$313, %ebx                      ## imm = 0x139
	cmovel	%edi, %ebx
	setne	%sil
	orl	%edx, %esi
	movl	%esi, (%rcx)
	movq	_lines_per_frame@GOTPCREL(%rip), %rcx
	movl	%ebx, (%rcx)
	movq	_bitmap@GOTPCREL(%rip), %rcx
	movl	8(%rcx), %ecx
	cmpl	$240, %ecx
	je	LBB0_36
## %bb.31:
	cmpl	$224, %ecx
	je	LBB0_35
## %bb.32:
	cmpl	$192, %ecx
	jne	LBB0_45
## %bb.33:
	movq	_vc_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_34
LBB0_36:
	movq	_vc_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	24(%rcx), %rcx
	jmp	LBB0_34
LBB0_35:
	movq	_vc_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	8(%rcx), %rcx
LBB0_34:
	movl	(%rcx,%rax,4), %eax
	movq	_vc_max@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_45
LBB0_48:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_39, LBB0_39-LJTI0_0
.set L0_0_set_38, LBB0_38-LJTI0_0
.set L0_0_set_37, LBB0_37-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_46, LBB0_46-LJTI0_0
LJTI0_0:
	.long	L0_0_set_26
	.long	L0_0_set_22
	.long	L0_0_set_19
	.long	L0_0_set_17
	.long	L0_0_set_15
	.long	L0_0_set_14
	.long	L0_0_set_12
	.long	L0_0_set_8
	.long	L0_0_set_5
	.long	L0_0_set_39
	.long	L0_0_set_38
	.long	L0_0_set_37
	.long	L0_0_set_2
	.long	L0_0_set_46
	.end_data_region
                                        ## -- End function
	.comm	_fullscreen,4,2                 ## @fullscreen
	.comm	_SDL_FULLSCREEN,4,2             ## @SDL_FULLSCREEN
	.comm	_VIDEO_WIDTH,4,2                ## @VIDEO_WIDTH
	.comm	_VIDEO_HEIGHT,4,2               ## @VIDEO_HEIGHT
	.comm	_SDL_SWSURFACE,4,2              ## @SDL_SWSURFACE
	.comm	_sdl_video,4,2                  ## @sdl_video
	.comm	_config,16,2                    ## @config
	.comm	_turbo_mode,4,2                 ## @turbo_mode
	.comm	_use_sound,4,2                  ## @use_sound
	.comm	_log_error,4,2                  ## @log_error
	.comm	_sdl_sync,4,2                   ## @sdl_sync
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"game.gp0"

L_.str.1:                               ## @.str.1
	.asciz	"rb"

	.comm	_STATE_SIZE,4,2                 ## @STATE_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"wb"

	.comm	_snd,4,2                        ## @snd
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_SYSTEM_MCD,4,2                 ## @SYSTEM_MCD
	.comm	_SYSTEM_SMS,4,2                 ## @SYSTEM_SMS
	.comm	_SYSTEM_MD,4,2                  ## @SYSTEM_MD
	.comm	_region_code,4,2                ## @region_code
	.comm	_io_reg,8,3                     ## @io_reg
	.comm	_vdp_pal,8,3                    ## @vdp_pal
	.comm	_status,4,2                     ## @status
	.comm	_lines_per_frame,4,2            ## @lines_per_frame
	.comm	_bitmap,12,2                    ## @bitmap
	.comm	_vc_table,8,3                   ## @vc_table
	.comm	_vc_max,4,2                     ## @vc_max
	.comm	_SYSTEM_GG,4,2                  ## @SYSTEM_GG
	.comm	_joynum,8,3                     ## @joynum
	.comm	_MAX_DEVICES,8,3                ## @MAX_DEVICES
	.comm	_input,8,3                      ## @input
	.comm	_NO_DEVICE,4,2                  ## @NO_DEVICE
	.no_dead_strip	_sdl_control_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_control_update
_sdl_control_update:                    ; @sdl_control_update
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	sub	w8, w0, #128
	cmp	w8, #13
	b.hi	LBB0_41
; %bb.1:
	mov	w0, #0
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrh	w11, [x9, x8, lsl #1]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	bl	_system_reset
	b	LBB0_41
LBB0_3:
Lloh5:
	adrp	x19, _config@GOTPAGE
Lloh6:
	ldr	x19, [x19, _config@GOTPAGEOFF]
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x9, w8, w9
	lsr	x10, x9, #63
	asr	x9, x9, #33
	add	w9, w9, w10
	add	w9, w9, w9, lsl #2
	sub	w8, w8, w9
	str	w8, [x19, #4]
	mov	w0, #0
	bl	_get_region
Lloh7:
	adrp	x8, _snd@GOTPAGE
Lloh8:
	ldr	x8, [x8, _snd@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_audio_init
Lloh10:
	adrp	x8, _system_hw@GOTPAGE
Lloh11:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _SYSTEM_MCD@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SYSTEM_MCD@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_30
; %bb.4:
Lloh16:
	adrp	x9, _SYSTEM_SMS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SYSTEM_SMS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldrb	w9, [x19]
	tbnz	w9, #0, LBB0_30
LBB0_6:
Lloh19:
	adrp	x9, _SYSTEM_MD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SYSTEM_MD@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x9]
Lloh22:
	adrp	x9, _region_code@GOTPAGE
Lloh23:
	ldr	x9, [x9, _region_code@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w10
	b.ne	LBB0_33
; %bb.7:
	ldr	w8, [x19]
	and	w8, w8, #0x1
	orr	w8, w9, w8
	orr	w8, w8, #0x20
	b	LBB0_34
LBB0_8:
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_41
; %bb.9:
	mov	x19, x0
	mov	x21, sp
Lloh29:
	adrp	x8, _STATE_SIZE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _STATE_SIZE@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh32:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh33:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	mov	x0, x20
	bl	_state_save
	mov	x1, x0
	mov	x0, x20
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	b	LBB0_12
LBB0_10:
Lloh34:
	adrp	x0, l_.str@PAGE
Lloh35:
	add	x0, x0, l_.str@PAGEOFF
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_41
; %bb.11:
	mov	x19, x0
	mov	x21, sp
Lloh38:
	adrp	x12, _STATE_SIZE@GOTPAGE
Lloh39:
	ldr	x12, [x12, _STATE_SIZE@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh40:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh41:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	w1, [x12]
	mov	x0, x20
	mov	w2, #1
	mov	x3, x19
	bl	_fread
	mov	x0, x20
	bl	_state_load
LBB0_12:
	mov	x0, x19
	bl	_fclose
	mov	sp, x21
	b	LBB0_41
LBB0_13:
Lloh42:
	adrp	x8, _use_sound@GOTPAGE
Lloh43:
	ldr	x8, [x8, _use_sound@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	cbnz	w8, LBB0_41
; %bb.14:
Lloh45:
	adrp	x8, _turbo_mode@GOTPAGE
Lloh46:
	ldr	x8, [x8, _turbo_mode@GOTPAGEOFF]
	ldr	w9, [x8]
	eor	w9, w9, #0x1
	str	w9, [x8]
Lloh47:
	adrp	x8, _sdl_sync@GOTPAGE
Lloh48:
	ldr	x8, [x8, _sdl_sync@GOTPAGEOFF]
Lloh49:
	str	wzr, [x8]
	b	LBB0_41
LBB0_15:
Lloh50:
	adrp	x8, _log_error@GOTPAGE
Lloh51:
	ldr	x8, [x8, _log_error@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
Lloh52:
	adrp	x8, _turbo_mode@GOTPAGE
Lloh53:
	ldr	x8, [x8, _turbo_mode@GOTPAGEOFF]
Lloh54:
	ldr	w8, [x8]
	cbnz	w8, LBB0_41
; %bb.17:
Lloh55:
	adrp	x8, _use_sound@GOTPAGE
Lloh56:
	ldr	x8, [x8, _use_sound@GOTPAGEOFF]
LBB0_18:
	ldr	w9, [x8]
	eor	w9, w9, #0x1
	str	w9, [x8]
	b	LBB0_41
LBB0_19:
Lloh57:
	adrp	x8, _config@GOTPAGE
Lloh58:
	ldr	x8, [x8, _config@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #3
	b.eq	LBB0_32
; %bb.20:
	cbnz	w9, LBB0_41
; %bb.21:
	mov	w9, #3
	str	w9, [x8]
	b	LBB0_41
LBB0_22:
Lloh59:
	adrp	x8, _fullscreen@GOTPAGE
Lloh60:
	ldr	x8, [x8, _fullscreen@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh61:
	adrp	x10, _SDL_FULLSCREEN@GOTPAGE
Lloh62:
	ldr	x10, [x10, _SDL_FULLSCREEN@GOTPAGEOFF]
Lloh63:
	ldr	w10, [x10]
	cmp	w9, #0
	csel	w9, w10, wzr, eq
	str	w9, [x8]
Lloh64:
	adrp	x8, _VIDEO_WIDTH@GOTPAGE
Lloh65:
	ldr	x8, [x8, _VIDEO_WIDTH@GOTPAGEOFF]
Lloh66:
	adrp	x10, _VIDEO_HEIGHT@GOTPAGE
Lloh67:
	ldr	x10, [x10, _VIDEO_HEIGHT@GOTPAGEOFF]
Lloh68:
	ldr	w0, [x8]
Lloh69:
	ldr	w1, [x10]
Lloh70:
	adrp	x8, _SDL_SWSURFACE@GOTPAGE
Lloh71:
	ldr	x8, [x8, _SDL_SWSURFACE@GOTPAGEOFF]
Lloh72:
	ldr	w8, [x8]
	orr	w3, w8, w9
	mov	w2, #16
	bl	_SDL_SetVideoMode
Lloh73:
	adrp	x8, _sdl_video@GOTPAGE
Lloh74:
	ldr	x8, [x8, _sdl_video@GOTPAGEOFF]
Lloh75:
	str	w0, [x8]
	b	LBB0_41
LBB0_23:
Lloh76:
	adrp	x8, _joynum@GOTPAGE
Lloh77:
	ldr	x8, [x8, _joynum@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh78:
	adrp	x10, _MAX_DEVICES@GOTPAGE
Lloh79:
	ldr	x10, [x10, _MAX_DEVICES@GOTPAGEOFF]
Lloh80:
	ldr	x10, [x10]
Lloh81:
	adrp	x11, _input@GOTPAGE
Lloh82:
	ldr	x11, [x11, _input@GOTPAGEOFF]
Lloh83:
	ldr	x11, [x11]
Lloh84:
	adrp	x12, _NO_DEVICE@GOTPAGE
Lloh85:
	ldr	x12, [x12, _NO_DEVICE@GOTPAGEOFF]
Lloh86:
	ldr	w12, [x12]
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	add	x9, x9, #1
	udiv	x13, x9, x10
	msub	x9, x13, x10, x9
	ldr	w13, [x11, x9, lsl #2]
	cmp	w13, w12
	b.eq	LBB0_24
; %bb.25:
	str	x9, [x8]
	b	LBB0_41
LBB0_26:
Lloh87:
	adrp	x8, _config@GOTPAGE
Lloh88:
	ldr	x8, [x8, _config@GOTPAGEOFF]
	ldp	w9, w10, [x8, #8]
	add	w9, w9, #1
	and	w11, w9, #0x3
	str	w11, [x8, #8]
Lloh89:
	adrp	x8, _system_hw@GOTPAGE
Lloh90:
	ldr	x8, [x8, _system_hw@GOTPAGEOFF]
Lloh91:
	ldr	w8, [x8]
Lloh92:
	adrp	x11, _SYSTEM_GG@GOTPAGE
Lloh93:
	ldr	x11, [x11, _SYSTEM_GG@GOTPAGEOFF]
Lloh94:
	ldr	w11, [x11]
	ands	w9, w9, #0x2
	mov	w12, #14
	mov	w13, #-48
	csel	w12, w13, w12, eq
	lsl	w13, w9, #3
	sub	w9, w13, w9
	cmp	w10, #0
	ccmp	w8, w11, #0, eq
	csel	w8, w9, w12, ne
Lloh95:
	adrp	x9, _bitmap@GOTPAGE
Lloh96:
	ldr	x9, [x9, _bitmap@GOTPAGEOFF]
	mov	w10, #3
	stp	w8, w10, [x9]
	b	LBB0_41
LBB0_27:
	mov	w0, #0
	bl	_gen_reset
	b	LBB0_41
LBB0_28:
	mov	w0, #-1
	bl	_SDL_ShowCursor
	cbz	w0, LBB0_31
; %bb.29:
	mov	w0, #0
	bl	_SDL_ShowCursor
	b	LBB0_41
LBB0_30:
	bl	_system_init
	bl	_system_reset
	b	LBB0_41
LBB0_31:
	mov	w0, #1
	bl	_SDL_ShowCursor
	b	LBB0_41
LBB0_32:
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_41
LBB0_33:
	asr	w8, w9, #1
	orr	w8, w8, #0x80
LBB0_34:
Lloh97:
	adrp	x9, _io_reg@GOTPAGE
Lloh98:
	ldr	x9, [x9, _io_reg@GOTPAGEOFF]
Lloh99:
	ldr	x9, [x9]
	str	w8, [x9]
Lloh100:
	adrp	x8, _vdp_pal@GOTPAGE
Lloh101:
	ldr	x8, [x8, _vdp_pal@GOTPAGEOFF]
Lloh102:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w9, ne
Lloh103:
	adrp	x10, _status@GOTPAGE
Lloh104:
	ldr	x10, [x10, _status@GOTPAGEOFF]
	ldr	w11, [x10]
	and	w11, w11, #0xfffffffe
	orr	w9, w11, w9
	mov	w11, #313
	mov	w12, #262
	csel	w11, w12, w11, eq
Lloh105:
	adrp	x12, _lines_per_frame@GOTPAGE
Lloh106:
	ldr	x12, [x12, _lines_per_frame@GOTPAGEOFF]
	str	w9, [x10]
Lloh107:
	str	w11, [x12]
Lloh108:
	adrp	x9, _bitmap@GOTPAGE
Lloh109:
	ldr	x9, [x9, _bitmap@GOTPAGEOFF]
Lloh110:
	ldr	w9, [x9, #8]
	cmp	w9, #240
	b.eq	LBB0_38
; %bb.35:
	cmp	w9, #224
	b.eq	LBB0_39
; %bb.36:
	cmp	w9, #192
	b.ne	LBB0_41
; %bb.37:
Lloh111:
	adrp	x9, _vc_table@GOTPAGE
Lloh112:
	ldr	x9, [x9, _vc_table@GOTPAGEOFF]
Lloh113:
	ldr	x9, [x9]
	ldr	x9, [x9]
	b	LBB0_40
LBB0_38:
Lloh114:
	adrp	x9, _vc_table@GOTPAGE
Lloh115:
	ldr	x9, [x9, _vc_table@GOTPAGEOFF]
Lloh116:
	ldr	x9, [x9]
	ldr	x9, [x9, #24]
	b	LBB0_40
LBB0_39:
Lloh117:
	adrp	x9, _vc_table@GOTPAGE
Lloh118:
	ldr	x9, [x9, _vc_table@GOTPAGEOFF]
Lloh119:
	ldr	x9, [x9]
	ldr	x9, [x9, #8]
LBB0_40:
	ldr	w8, [x9, x8, lsl #2]
Lloh120:
	adrp	x9, _vc_max@GOTPAGE
Lloh121:
	ldr	x9, [x9, _vc_max@GOTPAGEOFF]
Lloh122:
	str	w8, [x9]
LBB0_41:
	mov	w0, #1
LBB0_42:
	ldur	x8, [x29, #-40]
Lloh123:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh124:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh125:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_44
; %bb.43:
	sub	sp, x29, #32
	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
LBB0_44:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGotStr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh68
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGot	Lloh95, Lloh96
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGot	Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh108, Lloh109, Lloh110
	.loh AdrpLdrGotStr	Lloh105, Lloh106, Lloh107
	.loh AdrpLdrGot	Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh100, Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh97, Lloh98, Lloh99
	.loh AdrpLdrGotLdr	Lloh111, Lloh112, Lloh113
	.loh AdrpLdrGotLdr	Lloh114, Lloh115, Lloh116
	.loh AdrpLdrGotLdr	Lloh117, Lloh118, Lloh119
	.loh AdrpLdrGotStr	Lloh120, Lloh121, Lloh122
	.loh AdrpLdrGotLdr	Lloh123, Lloh124, Lloh125
	.cfi_endproc
	.section	__TEXT,__const
	.p2align	1
lJTI0_0:
	.short	(LBB0_2-LBB0_2)>>2
	.short	(LBB0_3-LBB0_2)>>2
	.short	(LBB0_8-LBB0_2)>>2
	.short	(LBB0_10-LBB0_2)>>2
	.short	(LBB0_13-LBB0_2)>>2
	.short	(LBB0_15-LBB0_2)>>2
	.short	(LBB0_16-LBB0_2)>>2
	.short	(LBB0_19-LBB0_2)>>2
	.short	(LBB0_22-LBB0_2)>>2
	.short	(LBB0_23-LBB0_2)>>2
	.short	(LBB0_26-LBB0_2)>>2
	.short	(LBB0_27-LBB0_2)>>2
	.short	(LBB0_28-LBB0_2)>>2
	.short	(LBB0_42-LBB0_2)>>2
                                        ; -- End function
	.comm	_fullscreen,4,2                 ; @fullscreen
	.comm	_SDL_FULLSCREEN,4,2             ; @SDL_FULLSCREEN
	.comm	_VIDEO_WIDTH,4,2                ; @VIDEO_WIDTH
	.comm	_VIDEO_HEIGHT,4,2               ; @VIDEO_HEIGHT
	.comm	_SDL_SWSURFACE,4,2              ; @SDL_SWSURFACE
	.comm	_sdl_video,4,2                  ; @sdl_video
	.comm	_config,16,2                    ; @config
	.comm	_turbo_mode,4,2                 ; @turbo_mode
	.comm	_use_sound,4,2                  ; @use_sound
	.comm	_log_error,4,2                  ; @log_error
	.comm	_sdl_sync,4,2                   ; @sdl_sync
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"game.gp0"

l_.str.1:                               ; @.str.1
	.asciz	"rb"

	.comm	_STATE_SIZE,4,2                 ; @STATE_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"wb"

	.comm	_snd,4,2                        ; @snd
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_SYSTEM_MCD,4,2                 ; @SYSTEM_MCD
	.comm	_SYSTEM_SMS,4,2                 ; @SYSTEM_SMS
	.comm	_SYSTEM_MD,4,2                  ; @SYSTEM_MD
	.comm	_region_code,4,2                ; @region_code
	.comm	_io_reg,8,3                     ; @io_reg
	.comm	_vdp_pal,8,3                    ; @vdp_pal
	.comm	_status,4,2                     ; @status
	.comm	_lines_per_frame,4,2            ; @lines_per_frame
	.comm	_bitmap,12,2                    ; @bitmap
	.comm	_vc_table,8,3                   ; @vc_table
	.comm	_vc_max,4,2                     ; @vc_max
	.comm	_SYSTEM_GG,4,2                  ; @SYSTEM_GG
	.comm	_joynum,8,3                     ; @joynum
	.comm	_MAX_DEVICES,8,3                ; @MAX_DEVICES
	.comm	_input,8,3                      ; @input
	.comm	_NO_DEVICE,4,2                  ; @NO_DEVICE
	.no_dead_strip	_sdl_control_update
.subsections_via_symbols
