	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_screen                    ## -- Begin function init_screen
	.p2align	4, 0x90
_init_screen:                           ## @init_screen
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	__cpu@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CGB_TYPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_bkg_p@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_set_bkg_palette
	movq	(%rbx), %rdx
	addq	$16, %rdx
	movl	$1, %edi
	movl	$1, %esi
	callq	_set_bkg_palette
	movq	(%rbx), %rdx
	addq	$32, %rdx
	movl	$2, %edi
	movl	$1, %esi
	callq	_set_bkg_palette
	movq	(%rbx), %rdx
	addq	$48, %rdx
	movl	$3, %edi
	movl	$1, %esi
	callq	_set_bkg_palette
	movq	(%rbx), %rdx
	addq	$64, %rdx
	movl	$4, %edi
	movl	$1, %esi
	callq	_set_bkg_palette
	movq	(%rbx), %rdx
	addq	$80, %rdx
	movl	$5, %edi
	movl	$1, %esi
	callq	_set_bkg_palette
	movq	(%rbx), %rdx
	addq	$96, %rdx
	movl	$6, %edi
	movl	$1, %esi
	callq	_set_bkg_palette
	movq	(%rbx), %rdx
	addq	$112, %rdx
	movl	$7, %edi
	movl	$1, %esi
	callq	_set_bkg_palette
	movq	_obj_p@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_set_sprite_palette
	movq	(%rbx), %rdx
	addq	$16, %rdx
	movl	$1, %edi
	movl	$1, %esi
	callq	_set_sprite_palette
	movq	(%rbx), %rdx
	addq	$32, %rdx
	movl	$2, %edi
	movl	$1, %esi
	callq	_set_sprite_palette
	movq	(%rbx), %rdx
	addq	$48, %rdx
	movl	$3, %edi
	movl	$1, %esi
	callq	_set_sprite_palette
	movq	(%rbx), %rdx
	addq	$64, %rdx
	movl	$4, %edi
	movl	$1, %esi
	callq	_set_sprite_palette
	movq	(%rbx), %rdx
	addq	$80, %rdx
	movl	$5, %edi
	movl	$1, %esi
	callq	_set_sprite_palette
	movq	(%rbx), %rdx
	addq	$96, %rdx
	movl	$6, %edi
	movl	$1, %esi
	callq	_set_sprite_palette
	movq	(%rbx), %rdx
	addq	$112, %rdx
	movl	$7, %edi
	movl	$1, %esi
	callq	_set_sprite_palette
	movq	_bkg_c@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$20, %edx
	movl	$18, %ecx
	callq	_set_bkg_attr
	jmp	LBB0_3
LBB0_1:
	movq	_bkg_m@GOTPCREL(%rip), %rbx
LBB0_3:
	movl	(%rbx), %r8d
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$20, %edx
	movl	$18, %ecx
	callq	_set_bkg_tiles
	movq	_pw@GOTPCREL(%rip), %rax
	movl	$50, (%rax)
	movq	_bkg@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	$96, %esi
	callq	_set_bkg_data
	movq	_msg_1up@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$3, %edx
	movl	$1, %ecx
	callq	_set_bkg_tiles
	movq	_msg_lv@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$16, %edi
	xorl	%esi, %esi
	movl	$2, %edx
	movl	$1, %ecx
	callq	_set_bkg_tiles
	movq	_fore@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	$128, %esi
	callq	_set_sprite_data
	movq	_DEF_SP@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_set_sprite_tile
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_move_sprite
	incl	%ebx
	cmpl	$40, %ebx
	jne	LBB0_4
## %bb.5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__cpu,8,3                       ## @_cpu
	.comm	_CGB_TYPE,8,3                   ## @CGB_TYPE
	.comm	_bkg_p,8,3                      ## @bkg_p
	.comm	_obj_p,8,3                      ## @obj_p
	.comm	_bkg_c,4,2                      ## @bkg_c
	.comm	_bkg_m,4,2                      ## @bkg_m
	.comm	_pw,4,2                         ## @pw
	.comm	_bkg,4,2                        ## @bkg
	.comm	_msg_1up,4,2                    ## @msg_1up
	.comm	_msg_lv,4,2                     ## @msg_lv
	.comm	_SHOW_BKG,4,2                   ## @SHOW_BKG
	.comm	_SPRITES_8x8,4,2                ## @SPRITES_8x8
	.comm	_fore,4,2                       ## @fore
	.comm	_SHOW_SPRITES,4,2               ## @SHOW_SPRITES
	.comm	_DEF_SP,4,2                     ## @DEF_SP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_screen                    ; -- Begin function init_screen
	.p2align	2
_init_screen:                           ; @init_screen
	.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	x8, __cpu@GOTPAGE
Lloh1:
	ldr	x8, [x8, __cpu@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _CGB_TYPE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CGB_TYPE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x19, _bkg_p@GOTPAGE
Lloh7:
	ldr	x19, [x19, _bkg_p@GOTPAGEOFF]
	ldr	x2, [x19]
	mov	w0, #0
	mov	w1, #1
	bl	_set_bkg_palette
	ldr	x8, [x19]
	add	x2, x8, #16
	mov	w0, #1
	mov	w1, #1
	bl	_set_bkg_palette
	ldr	x8, [x19]
	add	x2, x8, #32
	mov	w0, #2
	mov	w1, #1
	bl	_set_bkg_palette
	ldr	x8, [x19]
	add	x2, x8, #48
	mov	w0, #3
	mov	w1, #1
	bl	_set_bkg_palette
	ldr	x8, [x19]
	add	x2, x8, #64
	mov	w0, #4
	mov	w1, #1
	bl	_set_bkg_palette
	ldr	x8, [x19]
	add	x2, x8, #80
	mov	w0, #5
	mov	w1, #1
	bl	_set_bkg_palette
	ldr	x8, [x19]
	add	x2, x8, #96
	mov	w0, #6
	mov	w1, #1
	bl	_set_bkg_palette
	ldr	x8, [x19]
	add	x2, x8, #112
	mov	w0, #7
	mov	w1, #1
	bl	_set_bkg_palette
Lloh8:
	adrp	x19, _obj_p@GOTPAGE
Lloh9:
	ldr	x19, [x19, _obj_p@GOTPAGEOFF]
	ldr	x2, [x19]
	mov	w0, #0
	mov	w1, #1
	bl	_set_sprite_palette
	ldr	x8, [x19]
	add	x2, x8, #16
	mov	w0, #1
	mov	w1, #1
	bl	_set_sprite_palette
	ldr	x8, [x19]
	add	x2, x8, #32
	mov	w0, #2
	mov	w1, #1
	bl	_set_sprite_palette
	ldr	x8, [x19]
	add	x2, x8, #48
	mov	w0, #3
	mov	w1, #1
	bl	_set_sprite_palette
	ldr	x8, [x19]
	add	x2, x8, #64
	mov	w0, #4
	mov	w1, #1
	bl	_set_sprite_palette
	ldr	x8, [x19]
	add	x2, x8, #80
	mov	w0, #5
	mov	w1, #1
	bl	_set_sprite_palette
	ldr	x8, [x19]
	add	x2, x8, #96
	mov	w0, #6
	mov	w1, #1
	bl	_set_sprite_palette
	ldr	x8, [x19]
	add	x2, x8, #112
	mov	w0, #7
	mov	w1, #1
	bl	_set_sprite_palette
Lloh10:
	adrp	x19, _bkg_c@GOTPAGE
Lloh11:
	ldr	x19, [x19, _bkg_c@GOTPAGEOFF]
	ldr	w4, [x19]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #20
	mov	w3, #18
	bl	_set_bkg_attr
	b	LBB0_3
LBB0_2:
Lloh12:
	adrp	x19, _bkg_m@GOTPAGE
Lloh13:
	ldr	x19, [x19, _bkg_m@GOTPAGEOFF]
LBB0_3:
	ldr	w4, [x19]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #20
	mov	w3, #18
	bl	_set_bkg_tiles
Lloh14:
	adrp	x8, _pw@GOTPAGE
Lloh15:
	ldr	x8, [x8, _pw@GOTPAGEOFF]
	mov	w9, #50
Lloh16:
	str	w9, [x8]
Lloh17:
	adrp	x8, _bkg@GOTPAGE
Lloh18:
	ldr	x8, [x8, _bkg@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w0, #0
	mov	w1, #96
	bl	_set_bkg_data
Lloh20:
	adrp	x8, _msg_1up@GOTPAGE
Lloh21:
	ldr	x8, [x8, _msg_1up@GOTPAGEOFF]
Lloh22:
	ldr	w4, [x8]
	mov	w0, #0
	mov	w1, #0
	mov	w2, #3
	mov	w3, #1
	bl	_set_bkg_tiles
Lloh23:
	adrp	x8, _msg_lv@GOTPAGE
Lloh24:
	ldr	x8, [x8, _msg_lv@GOTPAGEOFF]
Lloh25:
	ldr	w4, [x8]
	mov	w0, #16
	mov	w1, #0
	mov	w2, #2
	mov	w3, #1
	bl	_set_bkg_tiles
Lloh26:
	adrp	x8, _fore@GOTPAGE
Lloh27:
	ldr	x8, [x8, _fore@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	w0, #0
	mov	w1, #128
	bl	_set_sprite_data
	mov	w19, #0
Lloh29:
	adrp	x20, _DEF_SP@GOTPAGE
Lloh30:
	ldr	x20, [x20, _DEF_SP@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_set_sprite_tile
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_move_sprite
	add	w19, w19, #1
	cmp	w19, #40
	b.ne	LBB0_4
; %bb.5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	__cpu,8,3                       ; @_cpu
	.comm	_CGB_TYPE,8,3                   ; @CGB_TYPE
	.comm	_bkg_p,8,3                      ; @bkg_p
	.comm	_obj_p,8,3                      ; @obj_p
	.comm	_bkg_c,4,2                      ; @bkg_c
	.comm	_bkg_m,4,2                      ; @bkg_m
	.comm	_pw,4,2                         ; @pw
	.comm	_bkg,4,2                        ; @bkg
	.comm	_msg_1up,4,2                    ; @msg_1up
	.comm	_msg_lv,4,2                     ; @msg_lv
	.comm	_SHOW_BKG,4,2                   ; @SHOW_BKG
	.comm	_SPRITES_8x8,4,2                ; @SPRITES_8x8
	.comm	_fore,4,2                       ; @fore
	.comm	_SHOW_SPRITES,4,2               ; @SHOW_SPRITES
	.comm	_DEF_SP,4,2                     ; @DEF_SP
.subsections_via_symbols
