	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_game_loop                      ## -- Begin function game_loop
	.p2align	4, 0x90
_game_loop:                             ## @game_loop
	.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
	xorl	%eax, %eax
	callq	_wait_vbl_done
	movq	_LYC_REG@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	xorl	%eax, %eax
	callq	_joypad
	movq	_joy@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	xorl	%eax, %eax
	callq	_FadeUpdate
	movq	_stage_type@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_stage_next_type@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_IsFading
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	(%rbx), %rax
	movq	%rax, (%r15)
	movq	_scene_next_index@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_scene_index@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movq	_actors@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	12(%rcx), %edx
	movq	_map_next_pos@GOTPCREL(%rip), %rsi
	movl	%edx, 4(%rsi)
	movl	8(%rcx), %edx
	movl	%edx, (%rsi)
	movl	4(%rcx), %edx
	movq	_map_next_dir@GOTPCREL(%rip), %rsi
	movl	%edx, 4(%rsi)
	movl	(%rcx), %ecx
	movl	%ecx, (%rsi)
	movq	_SCENE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_SceneInit
LBB0_4:
	movq	(%r15), %rax
	movq	_SCENE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_SceneUpdate
LBB0_6:
	movl	(%r14), %eax
	movq	_prev_joy@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_time@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	incq	%rdi
	movq	%rdi, (%rax)
	movq	_rand_seed@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	movl	%edi, (%rax)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_initrand
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gbt_update                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LYC_REG,4,2                    ## @LYC_REG
	.comm	_joy,4,2                        ## @joy
	.comm	_stage_type,8,3                 ## @stage_type
	.comm	_stage_next_type,8,3            ## @stage_next_type
	.comm	_scene_next_index,4,2           ## @scene_next_index
	.comm	_scene_index,4,2                ## @scene_index
	.comm	_actors,8,3                     ## @actors
	.comm	_map_next_pos,8,2               ## @map_next_pos
	.comm	_map_next_dir,8,2               ## @map_next_dir
	.comm	_SCENE,8,3                      ## @SCENE
	.comm	_prev_joy,4,2                   ## @prev_joy
	.comm	_time,8,3                       ## @time
	.comm	_rand_seed,4,2                  ## @rand_seed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_game_loop                      ; -- Begin function game_loop
	.p2align	2
_game_loop:                             ; @game_loop
	.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
	bl	_wait_vbl_done
Lloh0:
	adrp	x8, _LYC_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LYC_REG@GOTPAGEOFF]
Lloh2:
	str	wzr, [x8]
	bl	_joypad
Lloh3:
	adrp	x19, _joy@GOTPAGE
Lloh4:
	ldr	x19, [x19, _joy@GOTPAGEOFF]
	str	w0, [x19]
	bl	_FadeUpdate
Lloh5:
	adrp	x20, _stage_type@GOTPAGE
Lloh6:
	ldr	x20, [x20, _stage_type@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh7:
	adrp	x22, _stage_next_type@GOTPAGE
Lloh8:
	ldr	x22, [x22, _stage_next_type@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh9:
	adrp	x21, _SCENE@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SCENE@GOTPAGEOFF]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.1:
	bl	_IsFading
	cbnz	w0, LBB0_4
; %bb.2:
	ldr	x8, [x22]
Lloh11:
	adrp	x9, _scene_next_index@GOTPAGE
Lloh12:
	ldr	x9, [x9, _scene_next_index@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _scene_index@GOTPAGE
Lloh15:
	ldr	x10, [x10, _scene_index@GOTPAGEOFF]
Lloh16:
	str	w9, [x10]
Lloh17:
	adrp	x9, _actors@GOTPAGE
Lloh18:
	ldr	x9, [x9, _actors@GOTPAGEOFF]
	str	x8, [x20]
Lloh19:
	ldr	x9, [x9]
	ldr	d0, [x9, #8]
Lloh20:
	adrp	x10, _map_next_pos@GOTPAGE
Lloh21:
	ldr	x10, [x10, _map_next_pos@GOTPAGEOFF]
Lloh22:
	str	d0, [x10]
	ldr	d0, [x9]
Lloh23:
	adrp	x9, _map_next_dir@GOTPAGE
Lloh24:
	ldr	x9, [x9, _map_next_dir@GOTPAGEOFF]
Lloh25:
	str	d0, [x9]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	bl	_SceneInit
LBB0_4:
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	bl	_SceneUpdate
LBB0_6:
Lloh26:
	adrp	x8, _prev_joy@GOTPAGE
Lloh27:
	ldr	x8, [x8, _prev_joy@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh28:
	str	w9, [x8]
Lloh29:
	adrp	x8, _time@GOTPAGE
Lloh30:
	ldr	x8, [x8, _time@GOTPAGEOFF]
	ldr	x9, [x8]
	add	x9, x9, #1
	str	x9, [x8]
Lloh31:
	adrp	x8, _rand_seed@GOTPAGE
Lloh32:
	ldr	x8, [x8, _rand_seed@GOTPAGEOFF]
	ldr	w10, [x8]
	add	w0, w10, w9
	str	w0, [x8]
	bl	_initrand
	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
	b	_gbt_update
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_LYC_REG,4,2                    ; @LYC_REG
	.comm	_joy,4,2                        ; @joy
	.comm	_stage_type,8,3                 ; @stage_type
	.comm	_stage_next_type,8,3            ; @stage_next_type
	.comm	_scene_next_index,4,2           ; @scene_next_index
	.comm	_scene_index,4,2                ; @scene_index
	.comm	_actors,8,3                     ; @actors
	.comm	_map_next_pos,8,2               ; @map_next_pos
	.comm	_map_next_dir,8,2               ; @map_next_dir
	.comm	_SCENE,8,3                      ; @SCENE
	.comm	_prev_joy,4,2                   ; @prev_joy
	.comm	_time,8,3                       ; @time
	.comm	_rand_seed,4,2                  ; @rand_seed
.subsections_via_symbols
