	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_disable_interrupts
	movq	_LCDC_REG@GOTPCREL(%rip), %rax
	movl	$103, (%rax)
	movq	_CLOSED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_doorstate@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_OBP1_REG@GOTPCREL(%rip), %rax
	movl	$228, (%rax)
	movq	_OBP0_REG@GOTPCREL(%rip), %rax
	movl	$228, (%rax)
	movq	_BGP_REG@GOTPCREL(%rip), %rax
	movl	$228, (%rax)
	movq	_std_data@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$252, %edi
	movl	$4, %esi
	callq	_set_bkg_data
	movq	_bkg_data@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	$45, %esi
	callq	_set_bkg_data
	movq	_bkg_tiles@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	xorl	%edi, %edi
	movl	$8, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	xorl	%edi, %edi
	movl	$16, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	xorl	%edi, %edi
	movl	$24, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$8, %edi
	xorl	%esi, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$8, %edi
	movl	$8, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$8, %edi
	movl	$16, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$8, %edi
	movl	$24, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$16, %edi
	xorl	%esi, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$16, %edi
	movl	$8, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$16, %edi
	movl	$16, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$16, %edi
	movl	$24, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$24, %edi
	xorl	%esi, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$24, %edi
	movl	$8, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$24, %edi
	movl	$16, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movl	(%rbx), %r8d
	movl	$24, %edi
	movl	$24, %esi
	movl	$8, %edx
	movl	$8, %ecx
	callq	_set_bkg_tiles
	movq	_bposx@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_SCX_REG@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_bposy@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_SCY_REG@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_bspx@GOTPCREL(%rip), %rax
	movl	$65280, (%rax)                  ## imm = 0xFF00
	movq	_bspy@GOTPCREL(%rip), %rax
	movl	$128, (%rax)
	movq	_frame_data@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$128, %edi
	movl	$33, %esi
	callq	_set_win_data
	movq	_frame_tiles@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$16, %edx
	movl	$10, %ecx
	callq	_set_win_tiles
	movq	_door1_tiles@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$2, %edi
	movl	$2, %esi
	movl	$12, %edx
	movl	$6, %ecx
	callq	_set_win_tiles
	movq	_MAXWNDPOSX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_wposx@GOTPCREL(%rip), %rcx
	movq	%rax, 8(%rcx)
	movq	$0, (%rcx)
	movq	_WX_REG@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_MAXWNDPOSY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_wposy@GOTPCREL(%rip), %rcx
	movq	%rax, 8(%rcx)
	movq	$0, (%rcx)
	movq	_WY_REG@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_wspx@GOTPCREL(%rip), %rax
	movl	$65408, (%rax)                  ## imm = 0xFF80
	movq	_wspy@GOTPCREL(%rip), %rax
	movl	$65472, (%rax)                  ## imm = 0xFFC0
	movq	_earth_data@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	$28, %esi
	callq	_set_sprite_data
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_set_sprite_prop
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_set_sprite_prop
	movq	_sframe@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_sposx@GOTPCREL(%rip), %rax
	movl	$4096, (%rax)                   ## imm = 0x1000
	movq	_sposy@GOTPCREL(%rip), %rax
	movl	$4096, (%rax)                   ## imm = 0x1000
	movq	_sspx@GOTPCREL(%rip), %rax
	movl	$64, (%rax)
	movq	_sspy@GOTPCREL(%rip), %rax
	movl	$64, (%rax)
	xorl	%eax, %eax
	callq	_tile_sprite
	xorl	%eax, %eax
	callq	_place_sprite
	xorl	%eax, %eax
	callq	_enable_interrupts
	movq	_J_B@GOTPCREL(%rip), %r14
	movq	_J_UP@GOTPCREL(%rip), %r13
	movq	_J_DOWN@GOTPCREL(%rip), %r12
	movq	_J_LEFT@GOTPCREL(%rip), %rbx
	movq	_J_RIGHT@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_wait_vbl_done
	xorl	%eax, %eax
	callq	_wait_vbl_done
	xorl	%eax, %eax
	callq	_wait_vbl_done
	xorl	%eax, %eax
	callq	_wait_vbl_done
	movq	_time@GOTPCREL(%rip), %rax
	incl	(%rax)
	xorl	%eax, %eax
	callq	_fade
	xorl	%eax, %eax
	callq	_door
	xorl	%eax, %eax
	callq	_scroll
	xorl	%eax, %eax
	callq	_animate_sprite
	xorl	%eax, %eax
	callq	_joypad
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r13)
	movq	_bspx@GOTPCREL(%rip), %rcx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_bspy@GOTPCREL(%rip), %rdx
	addl	$-16, (%rdx)
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r12)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_bspy@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_J_A@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	movq	_doorstate@GOTPCREL(%rip), %rsi
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r13)
	movq	_wspx@GOTPCREL(%rip), %rcx
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_wspy@GOTPCREL(%rip), %rdx
	addl	$-16, (%rdx)
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r12)
	je	LBB0_7
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_wspy@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_J_SELECT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_STARTFADE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_color@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_J_START@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_24
## %bb.19:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rsi), %rcx
	movq	_CLOSED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_OPENING@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rsi)
	xorl	%ecx, %ecx
	jmp	LBB0_23
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_OPENED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_CLOSING@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rsi)
	movq	_NBDFRAMES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_23:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_doorpos@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
LBB0_24:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r13)
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_sspy@GOTPCREL(%rip), %rcx
	addl	$-16, (%rcx)
LBB0_26:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r12)
	movq	_sspx@GOTPCREL(%rip), %rcx
	je	LBB0_7
## %bb.27:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_sspy@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	$16, (%rdx)
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%rbx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	$-16, (%rcx)
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	addl	$16, (%rcx)
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_DISPLAY_OFF,4,2                ## @DISPLAY_OFF
	.comm	_LCDC_REG,4,2                   ## @LCDC_REG
	.comm	_CLOSED,8,3                     ## @CLOSED
	.comm	_doorstate,8,3                  ## @doorstate
	.comm	_OBP1_REG,4,2                   ## @OBP1_REG
	.comm	_OBP0_REG,4,2                   ## @OBP0_REG
	.comm	_BGP_REG,4,2                    ## @BGP_REG
	.comm	_std_data,4,2                   ## @std_data
	.comm	_bkg_data,4,2                   ## @bkg_data
	.comm	_bkg_tiles,4,2                  ## @bkg_tiles
	.comm	_bposx,8,3                      ## @bposx
	.comm	_SCX_REG,8,3                    ## @SCX_REG
	.comm	_bposy,8,3                      ## @bposy
	.comm	_SCY_REG,8,3                    ## @SCY_REG
	.comm	_bspx,4,2                       ## @bspx
	.comm	_bspy,4,2                       ## @bspy
	.comm	_frame_data,4,2                 ## @frame_data
	.comm	_frame_tiles,4,2                ## @frame_tiles
	.comm	_door1_tiles,4,2                ## @door1_tiles
	.comm	_MAXWNDPOSX,8,3                 ## @MAXWNDPOSX
	.comm	_wposx,16,3                     ## @wposx
	.comm	_WX_REG,8,3                     ## @WX_REG
	.comm	_MAXWNDPOSY,8,3                 ## @MAXWNDPOSY
	.comm	_wposy,16,3                     ## @wposy
	.comm	_WY_REG,8,3                     ## @WY_REG
	.comm	_wspx,4,2                       ## @wspx
	.comm	_wspy,4,2                       ## @wspy
	.comm	_earth_data,4,2                 ## @earth_data
	.comm	_sframe,8,3                     ## @sframe
	.comm	_sposx,4,2                      ## @sposx
	.comm	_sposy,4,2                      ## @sposy
	.comm	_sspx,4,2                       ## @sspx
	.comm	_sspy,4,2                       ## @sspy
	.comm	_DISPLAY_ON,4,2                 ## @DISPLAY_ON
	.comm	_time,4,2                       ## @time
	.comm	_J_B,4,2                        ## @J_B
	.comm	_J_UP,4,2                       ## @J_UP
	.comm	_J_DOWN,4,2                     ## @J_DOWN
	.comm	_J_LEFT,4,2                     ## @J_LEFT
	.comm	_J_RIGHT,4,2                    ## @J_RIGHT
	.comm	_J_A,4,2                        ## @J_A
	.comm	_J_SELECT,4,2                   ## @J_SELECT
	.comm	_STARTFADE,4,2                  ## @STARTFADE
	.comm	_color,4,2                      ## @color
	.comm	_J_START,4,2                    ## @J_START
	.comm	_OPENING,8,3                    ## @OPENING
	.comm	_doorpos,8,3                    ## @doorpos
	.comm	_OPENED,8,3                     ## @OPENED
	.comm	_CLOSING,8,3                    ## @CLOSING
	.comm	_NBDFRAMES,8,3                  ## @NBDFRAMES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	bl	_disable_interrupts
Lloh0:
	adrp	x8, _LCDC_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LCDC_REG@GOTPAGEOFF]
	mov	w9, #103
Lloh2:
	adrp	x10, _CLOSED@GOTPAGE
Lloh3:
	ldr	x10, [x10, _CLOSED@GOTPAGEOFF]
Lloh4:
	str	w9, [x8]
Lloh5:
	ldr	x8, [x10]
Lloh6:
	adrp	x10, _doorstate@GOTPAGE
Lloh7:
	ldr	x10, [x10, _doorstate@GOTPAGEOFF]
Lloh8:
	adrp	x9, _OBP1_REG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OBP1_REG@GOTPAGEOFF]
Lloh10:
	str	x8, [x10]
	mov	w8, #228
Lloh11:
	str	w8, [x9]
Lloh12:
	adrp	x9, _OBP0_REG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _OBP0_REG@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
Lloh15:
	adrp	x9, _BGP_REG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BGP_REG@GOTPAGEOFF]
Lloh17:
	str	w8, [x9]
Lloh18:
	adrp	x8, _std_data@GOTPAGE
Lloh19:
	ldr	x8, [x8, _std_data@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	w0, #252
	mov	w1, #4
	bl	_set_bkg_data
Lloh21:
	adrp	x8, _bkg_data@GOTPAGE
Lloh22:
	ldr	x8, [x8, _bkg_data@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	w0, #0
	mov	w1, #45
	bl	_set_bkg_data
Lloh24:
	adrp	x19, _bkg_tiles@GOTPAGE
Lloh25:
	ldr	x19, [x19, _bkg_tiles@GOTPAGEOFF]
	ldr	w4, [x19]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #0
	mov	w1, #8
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #0
	mov	w1, #16
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #0
	mov	w1, #24
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #8
	mov	w1, #0
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #8
	mov	w1, #8
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #8
	mov	w1, #16
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #8
	mov	w1, #24
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #16
	mov	w1, #0
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #16
	mov	w1, #8
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #16
	mov	w1, #16
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #16
	mov	w1, #24
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #24
	mov	w1, #0
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #24
	mov	w1, #8
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #24
	mov	w1, #16
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
	ldr	w4, [x19]
	mov	w0, #24
	mov	w1, #24
	mov	w2, #8
	mov	w3, #8
	bl	_set_bkg_tiles
Lloh26:
	adrp	x8, _bposx@GOTPAGE
Lloh27:
	ldr	x8, [x8, _bposx@GOTPAGEOFF]
Lloh28:
	str	xzr, [x8]
Lloh29:
	adrp	x8, _SCX_REG@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SCX_REG@GOTPAGEOFF]
Lloh31:
	str	xzr, [x8]
Lloh32:
	adrp	x8, _bposy@GOTPAGE
Lloh33:
	ldr	x8, [x8, _bposy@GOTPAGEOFF]
Lloh34:
	str	xzr, [x8]
Lloh35:
	adrp	x8, _SCY_REG@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SCY_REG@GOTPAGEOFF]
Lloh37:
	str	xzr, [x8]
Lloh38:
	adrp	x21, _bspx@GOTPAGE
Lloh39:
	ldr	x21, [x21, _bspx@GOTPAGEOFF]
	mov	w8, #65280
Lloh40:
	adrp	x22, _bspy@GOTPAGE
Lloh41:
	ldr	x22, [x22, _bspy@GOTPAGEOFF]
	str	w8, [x21]
	mov	w8, #128
	str	w8, [x22]
Lloh42:
	adrp	x8, _frame_data@GOTPAGE
Lloh43:
	ldr	x8, [x8, _frame_data@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	w0, #128
	mov	w1, #33
	bl	_set_win_data
Lloh45:
	adrp	x8, _frame_tiles@GOTPAGE
Lloh46:
	ldr	x8, [x8, _frame_tiles@GOTPAGEOFF]
Lloh47:
	ldr	w4, [x8]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #16
	mov	w3, #10
	bl	_set_win_tiles
Lloh48:
	adrp	x8, _door1_tiles@GOTPAGE
Lloh49:
	ldr	x8, [x8, _door1_tiles@GOTPAGEOFF]
Lloh50:
	ldr	w4, [x8]
	mov	w0, #2
	mov	w1, #2
	mov	w2, #12
	mov	w3, #6
	bl	_set_win_tiles
Lloh51:
	adrp	x8, _MAXWNDPOSX@GOTPAGE
Lloh52:
	ldr	x8, [x8, _MAXWNDPOSX@GOTPAGEOFF]
Lloh53:
	ldr	x8, [x8]
Lloh54:
	adrp	x9, _wposx@GOTPAGE
Lloh55:
	ldr	x9, [x9, _wposx@GOTPAGEOFF]
	stp	xzr, x8, [x9]
Lloh56:
	adrp	x9, _WX_REG@GOTPAGE
Lloh57:
	ldr	x9, [x9, _WX_REG@GOTPAGEOFF]
Lloh58:
	str	x8, [x9]
Lloh59:
	adrp	x8, _MAXWNDPOSY@GOTPAGE
Lloh60:
	ldr	x8, [x8, _MAXWNDPOSY@GOTPAGEOFF]
Lloh61:
	ldr	x8, [x8]
Lloh62:
	adrp	x9, _wposy@GOTPAGE
Lloh63:
	ldr	x9, [x9, _wposy@GOTPAGEOFF]
	stp	xzr, x8, [x9]
Lloh64:
	adrp	x9, _WY_REG@GOTPAGE
Lloh65:
	ldr	x9, [x9, _WY_REG@GOTPAGEOFF]
Lloh66:
	str	x8, [x9]
Lloh67:
	adrp	x23, _wspx@GOTPAGE
Lloh68:
	ldr	x23, [x23, _wspx@GOTPAGEOFF]
	mov	w8, #65408
Lloh69:
	adrp	x24, _wspy@GOTPAGE
Lloh70:
	ldr	x24, [x24, _wspy@GOTPAGEOFF]
	str	w8, [x23]
	mov	w8, #65472
	str	w8, [x24]
Lloh71:
	adrp	x8, _earth_data@GOTPAGE
Lloh72:
	ldr	x8, [x8, _earth_data@GOTPAGEOFF]
Lloh73:
	ldr	w2, [x8]
	mov	w0, #0
	mov	w1, #28
	bl	_set_sprite_data
	mov	w0, #0
	mov	w1, #0
	bl	_set_sprite_prop
	mov	w0, #1
	mov	w1, #0
	bl	_set_sprite_prop
Lloh74:
	adrp	x8, _sframe@GOTPAGE
Lloh75:
	ldr	x8, [x8, _sframe@GOTPAGEOFF]
Lloh76:
	str	xzr, [x8]
Lloh77:
	adrp	x8, _sposx@GOTPAGE
Lloh78:
	ldr	x8, [x8, _sposx@GOTPAGEOFF]
	mov	w9, #4096
Lloh79:
	str	w9, [x8]
Lloh80:
	adrp	x8, _sposy@GOTPAGE
Lloh81:
	ldr	x8, [x8, _sposy@GOTPAGEOFF]
Lloh82:
	adrp	x10, _sspx@GOTPAGE
Lloh83:
	ldr	x10, [x10, _sspx@GOTPAGEOFF]
Lloh84:
	str	w9, [x8]
	mov	w8, #64
Lloh85:
	str	w8, [x10]
Lloh86:
	adrp	x9, _sspy@GOTPAGE
Lloh87:
	ldr	x9, [x9, _sspy@GOTPAGEOFF]
Lloh88:
	str	w8, [x9]
	bl	_tile_sprite
	bl	_place_sprite
	bl	_enable_interrupts
Lloh89:
	adrp	x27, _time@GOTPAGE
Lloh90:
	ldr	x27, [x27, _time@GOTPAGEOFF]
Lloh91:
	adrp	x28, _J_B@GOTPAGE
Lloh92:
	ldr	x28, [x28, _J_B@GOTPAGEOFF]
Lloh93:
	adrp	x20, _J_UP@GOTPAGE
Lloh94:
	ldr	x20, [x20, _J_UP@GOTPAGEOFF]
Lloh95:
	adrp	x25, _J_DOWN@GOTPAGE
Lloh96:
	ldr	x25, [x25, _J_DOWN@GOTPAGEOFF]
Lloh97:
	adrp	x26, _J_LEFT@GOTPAGE
Lloh98:
	ldr	x26, [x26, _J_LEFT@GOTPAGEOFF]
Lloh99:
	adrp	x19, _J_RIGHT@GOTPAGE
Lloh100:
	ldr	x19, [x19, _J_RIGHT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_wait_vbl_done
	bl	_wait_vbl_done
	bl	_wait_vbl_done
	bl	_wait_vbl_done
	ldr	w8, [x27]
	add	w8, w8, #1
	str	w8, [x27]
	bl	_fade
	bl	_door
	bl	_scroll
	bl	_animate_sprite
	bl	_joypad
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x22]
	sub	w8, w8, #16
	str	w8, [x22]
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x22]
	add	w8, w8, #16
	str	w8, [x22]
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x21]
	sub	w8, w8, #16
	str	w8, [x21]
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w9, [x19]
	mov	x8, x21
	tst	w9, w0
	b.ne	LBB0_32
	b	LBB0_1
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
Lloh101:
	adrp	x8, _J_A@GOTPAGE
Lloh102:
	ldr	x8, [x8, _J_A@GOTPAGEOFF]
Lloh103:
	ldr	w8, [x8]
	tst	w8, w0
Lloh104:
	adrp	x10, _doorstate@GOTPAGE
Lloh105:
	ldr	x10, [x10, _doorstate@GOTPAGEOFF]
	b.eq	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x24]
	sub	w8, w8, #16
	str	w8, [x24]
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x24]
	add	w8, w8, #16
	str	w8, [x24]
LBB0_14:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x23]
	sub	w8, w8, #16
	str	w8, [x23]
LBB0_16:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w9, [x19]
	mov	x8, x23
	tst	w9, w0
	b.ne	LBB0_32
	b	LBB0_1
LBB0_17:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh106:
	adrp	x8, _J_SELECT@GOTPAGE
Lloh107:
	ldr	x8, [x8, _J_SELECT@GOTPAGEOFF]
Lloh108:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_1 Depth=1
Lloh109:
	adrp	x8, _STARTFADE@GOTPAGE
Lloh110:
	ldr	x8, [x8, _STARTFADE@GOTPAGEOFF]
Lloh111:
	ldr	w8, [x8]
Lloh112:
	adrp	x9, _color@GOTPAGE
Lloh113:
	ldr	x9, [x9, _color@GOTPAGEOFF]
Lloh114:
	str	w8, [x9]
LBB0_19:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh115:
	adrp	x8, _J_START@GOTPAGE
Lloh116:
	ldr	x8, [x8, _J_START@GOTPAGEOFF]
Lloh117:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_25
; %bb.20:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x10]
Lloh118:
	adrp	x9, _CLOSED@GOTPAGE
Lloh119:
	ldr	x9, [x9, _CLOSED@GOTPAGEOFF]
Lloh120:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x8, #0
Lloh121:
	adrp	x9, _OPENING@GOTPAGE
Lloh122:
	ldr	x9, [x9, _OPENING@GOTPAGEOFF]
Lloh123:
	ldr	x9, [x9]
	str	x9, [x10]
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh124:
	adrp	x9, _OPENED@GOTPAGE
Lloh125:
	ldr	x9, [x9, _OPENED@GOTPAGEOFF]
Lloh126:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_25
; %bb.23:                               ;   in Loop: Header=BB0_1 Depth=1
Lloh127:
	adrp	x8, _CLOSING@GOTPAGE
Lloh128:
	ldr	x8, [x8, _CLOSING@GOTPAGEOFF]
Lloh129:
	ldr	x8, [x8]
	str	x8, [x10]
Lloh130:
	adrp	x8, _NBDFRAMES@GOTPAGE
Lloh131:
	ldr	x8, [x8, _NBDFRAMES@GOTPAGEOFF]
Lloh132:
	ldr	x8, [x8]
LBB0_24:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh133:
	adrp	x9, _doorpos@GOTPAGE
Lloh134:
	ldr	x9, [x9, _doorpos@GOTPAGEOFF]
Lloh135:
	str	x8, [x9]
LBB0_25:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_1 Depth=1
Lloh136:
	adrp	x9, _sspy@GOTPAGE
Lloh137:
	ldr	x9, [x9, _sspy@GOTPAGEOFF]
	ldr	w8, [x9]
	sub	w8, w8, #16
	str	w8, [x9]
LBB0_27:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x25]
	tst	w8, w0
Lloh138:
	adrp	x10, _sspx@GOTPAGE
Lloh139:
	ldr	x10, [x10, _sspx@GOTPAGEOFF]
	b.eq	LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_1 Depth=1
Lloh140:
	adrp	x9, _sspy@GOTPAGE
Lloh141:
	ldr	x9, [x9, _sspy@GOTPAGEOFF]
	ldr	w8, [x9]
	add	w8, w8, #16
	str	w8, [x9]
LBB0_29:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_31
; %bb.30:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x10]
	sub	w8, w8, #16
	str	w8, [x10]
LBB0_31:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w9, [x19]
	mov	x8, x10
	tst	w9, w0
	b.eq	LBB0_1
LBB0_32:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w9, [x8]
	add	w9, w9, #16
	str	w9, [x8]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh99, Lloh100
	.loh AdrpLdrGot	Lloh97, Lloh98
	.loh AdrpLdrGot	Lloh95, Lloh96
	.loh AdrpLdrGot	Lloh93, Lloh94
	.loh AdrpLdrGot	Lloh91, Lloh92
	.loh AdrpLdrGot	Lloh89, Lloh90
	.loh AdrpLdrGotStr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotStr	Lloh82, Lloh83, Lloh85
	.loh AdrpLdrGotStr	Lloh80, Lloh81, Lloh84
	.loh AdrpLdrGotStr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotStr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGot	Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGotStr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotStr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotStr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotStr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh104, Lloh105
	.loh AdrpLdrGotLdr	Lloh101, Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh106, Lloh107, Lloh108
	.loh AdrpLdrGotStr	Lloh112, Lloh113, Lloh114
	.loh AdrpLdrGotLdr	Lloh109, Lloh110, Lloh111
	.loh AdrpLdrGotLdr	Lloh115, Lloh116, Lloh117
	.loh AdrpLdrGotLdr	Lloh118, Lloh119, Lloh120
	.loh AdrpLdrGotLdr	Lloh121, Lloh122, Lloh123
	.loh AdrpLdrGotLdr	Lloh124, Lloh125, Lloh126
	.loh AdrpLdrGotLdr	Lloh130, Lloh131, Lloh132
	.loh AdrpLdrGotLdr	Lloh127, Lloh128, Lloh129
	.loh AdrpLdrGotStr	Lloh133, Lloh134, Lloh135
	.loh AdrpLdrGot	Lloh136, Lloh137
	.loh AdrpLdrGot	Lloh138, Lloh139
	.loh AdrpLdrGot	Lloh140, Lloh141
	.cfi_endproc
                                        ; -- End function
	.comm	_DISPLAY_OFF,4,2                ; @DISPLAY_OFF
	.comm	_LCDC_REG,4,2                   ; @LCDC_REG
	.comm	_CLOSED,8,3                     ; @CLOSED
	.comm	_doorstate,8,3                  ; @doorstate
	.comm	_OBP1_REG,4,2                   ; @OBP1_REG
	.comm	_OBP0_REG,4,2                   ; @OBP0_REG
	.comm	_BGP_REG,4,2                    ; @BGP_REG
	.comm	_std_data,4,2                   ; @std_data
	.comm	_bkg_data,4,2                   ; @bkg_data
	.comm	_bkg_tiles,4,2                  ; @bkg_tiles
	.comm	_bposx,8,3                      ; @bposx
	.comm	_SCX_REG,8,3                    ; @SCX_REG
	.comm	_bposy,8,3                      ; @bposy
	.comm	_SCY_REG,8,3                    ; @SCY_REG
	.comm	_bspx,4,2                       ; @bspx
	.comm	_bspy,4,2                       ; @bspy
	.comm	_frame_data,4,2                 ; @frame_data
	.comm	_frame_tiles,4,2                ; @frame_tiles
	.comm	_door1_tiles,4,2                ; @door1_tiles
	.comm	_MAXWNDPOSX,8,3                 ; @MAXWNDPOSX
	.comm	_wposx,16,3                     ; @wposx
	.comm	_WX_REG,8,3                     ; @WX_REG
	.comm	_MAXWNDPOSY,8,3                 ; @MAXWNDPOSY
	.comm	_wposy,16,3                     ; @wposy
	.comm	_WY_REG,8,3                     ; @WY_REG
	.comm	_wspx,4,2                       ; @wspx
	.comm	_wspy,4,2                       ; @wspy
	.comm	_earth_data,4,2                 ; @earth_data
	.comm	_sframe,8,3                     ; @sframe
	.comm	_sposx,4,2                      ; @sposx
	.comm	_sposy,4,2                      ; @sposy
	.comm	_sspx,4,2                       ; @sspx
	.comm	_sspy,4,2                       ; @sspy
	.comm	_DISPLAY_ON,4,2                 ; @DISPLAY_ON
	.comm	_time,4,2                       ; @time
	.comm	_J_B,4,2                        ; @J_B
	.comm	_J_UP,4,2                       ; @J_UP
	.comm	_J_DOWN,4,2                     ; @J_DOWN
	.comm	_J_LEFT,4,2                     ; @J_LEFT
	.comm	_J_RIGHT,4,2                    ; @J_RIGHT
	.comm	_J_A,4,2                        ; @J_A
	.comm	_J_SELECT,4,2                   ; @J_SELECT
	.comm	_STARTFADE,4,2                  ; @STARTFADE
	.comm	_color,4,2                      ; @color
	.comm	_J_START,4,2                    ; @J_START
	.comm	_OPENING,8,3                    ; @OPENING
	.comm	_doorpos,8,3                    ; @doorpos
	.comm	_OPENED,8,3                     ; @OPENED
	.comm	_CLOSING,8,3                    ; @CLOSING
	.comm	_NBDFRAMES,8,3                  ; @NBDFRAMES
.subsections_via_symbols
