	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_run                            ## -- Begin function run
	.p2align	4, 0x90
_run:                                   ## @run
	.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	_set_cursor
	xorl	%eax, %eax
	callq	_move_cursor
	movl	$10, %r15d
	xorl	%r14d, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	xorl	%eax, %eax
	callq	_wait_vbl_done
	xorl	%eax, %eax
	callq	_joypad
	movl	%eax, %ebx
	movq	_J_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_J_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %edi
	orl	%esi, %edi
	movq	_J_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_J_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r9d, %ecx
	orl	%r8d, %ecx
	orl	%edi, %ecx
	movl	$10, %r12d
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	testl	%ebx, %ecx
	je	LBB0_12
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %esi
	setne	%cl
	movq	_cursor_y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%esi, %esi
	setg	%al
	andb	%cl, %al
	movzbl	%al, %eax
	subl	%eax, %esi
	testl	%ebx, %edx
	setne	%cl
	cmpl	$143, %esi
	setl	%dl
	andb	%cl, %dl
	testb	%al, %al
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	%dl, %dl
	je	LBB0_5
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movzbl	%dl, %eax
	addl	%eax, %esi
	movq	_cursor_y@GOTPCREL(%rip), %rax
	movl	%esi, (%rax)
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %r9d
	setne	%al
	movq	_cursor_x@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	setg	%dl
	andb	%al, %dl
	movzbl	%dl, %edx
	subl	%edx, %ecx
	testl	%ebx, %r8d
	setne	%sil
	cmpl	$159, %ecx
	setl	%al
	andb	%sil, %al
	testb	%dl, %dl
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	%al, %al
	je	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movzbl	%al, %eax
	addl	%eax, %ecx
	movq	_cursor_x@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_move_cursor
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_joypad
	movl	$1, %r12d
	cmpl	%eax, %ebx
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_wait_vbl_done
	movl	$0, %r13d
	decl	%r15d
	jne	LBB0_9
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r13d, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_J_SELECT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_menu
	xorl	%eax, %eax
	callq	_set_cursor
	xorl	%eax, %eax
	callq	_move_cursor
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_J_A@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_J_B@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	orl	%edx, %ecx
	andl	%ebx, %ecx
	cmpl	%edx, %ecx
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	jmp	LBB0_20
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_cursor_x@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_cursor_y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_colors@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_current_color@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	movq	_modes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_current_mode@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	callq	_plot
	movq	_J_B@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_J_A@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	andl	%ebx, %ecx
LBB0_19:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %r14d
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%r12d, %r15d
	cmpl	%eax, %ecx
	jne	LBB0_1
## %bb.21:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movl	%r12d, %r15d
	testl	%r13d, %r13d
	jne	LBB0_1
## %bb.22:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_cursor_x@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_cursor_y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WHITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SOLID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_plot
	movl	%r12d, %r15d
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_SHOW_SPRITES,4,2               ## @SHOW_SPRITES
	.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	_cursor_y,4,2                   ## @cursor_y
	.comm	_cursor_x,4,2                   ## @cursor_x
	.comm	_J_SELECT,4,2                   ## @J_SELECT
	.comm	_HIDE_SPRITES,4,2               ## @HIDE_SPRITES
	.comm	_J_A,4,2                        ## @J_A
	.comm	_J_B,4,2                        ## @J_B
	.comm	_colors,8,3                     ## @colors
	.comm	_current_color,8,3              ## @current_color
	.comm	_modes,8,3                      ## @modes
	.comm	_current_mode,8,3               ## @current_mode
	.comm	_WHITE,4,2                      ## @WHITE
	.comm	_SOLID,4,2                      ## @SOLID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_run                            ; -- Begin function run
	.p2align	2
_run:                                   ; @run
	.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	_set_cursor
	bl	_move_cursor
	mov	w21, #0
	mov	w22, #0
	mov	w20, #10
Lloh0:
	adrp	x24, _J_SELECT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _J_SELECT@GOTPAGEOFF]
Lloh2:
	adrp	x25, _J_A@GOTPAGE
Lloh3:
	ldr	x25, [x25, _J_A@GOTPAGEOFF]
Lloh4:
	adrp	x26, _J_B@GOTPAGE
Lloh5:
	ldr	x26, [x26, _J_B@GOTPAGEOFF]
Lloh6:
	adrp	x27, _cursor_x@GOTPAGE
Lloh7:
	ldr	x27, [x27, _cursor_x@GOTPAGEOFF]
Lloh8:
	adrp	x28, _cursor_y@GOTPAGE
Lloh9:
	ldr	x28, [x28, _cursor_y@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	bl	_wait_vbl_done
	bl	_joypad
	mov	x19, x0
Lloh10:
	adrp	x8, _J_UP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _J_UP@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x8]
Lloh13:
	adrp	x8, _J_DOWN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _J_DOWN@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x8]
	orr	w8, w10, w11
Lloh16:
	adrp	x9, _J_LEFT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _J_LEFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w12, w8, w9
Lloh19:
	adrp	x8, _J_RIGHT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _J_RIGHT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	orr	w12, w12, w8
	tst	w12, w0
	b.eq	LBB0_12
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	tst	w11, w19
	ldr	w11, [x28]
	ccmp	w11, #0, #4, ne
	cset	w12, gt
	sub	w11, w11, w12
	tst	w10, w19
	mov	w10, #143
	ccmp	w11, w10, #0, ne
	cset	w10, lt
	tbnz	w12, #0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w10, LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	w10, w11, w10
	str	w10, [x28]
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	tst	w9, w19
	ldr	w9, [x27]
	ccmp	w9, #0, #4, ne
	cset	w10, gt
	sub	w9, w9, w10
	tst	w8, w19
	mov	w8, #159
	ccmp	w9, w8, #0, ne
	cset	w8, lt
	tbnz	w10, #0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w8, LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	w8, w9, w8
	str	w8, [x27]
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_move_cursor
LBB0_9:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_joypad
	cmp	w19, w0
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	bl	_wait_vbl_done
	subs	w20, w20, #1
	b.ne	LBB0_9
LBB0_11:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w21, #0
	mov	w23, #0
	mov	w20, #1
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w20, #10
	mov	x23, x22
LBB0_13:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x24]
	tst	w8, w19
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_1 Depth=1
	bl	_menu
	bl	_set_cursor
	bl	_move_cursor
LBB0_15:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w10, [x25]
	ldr	w8, [x26]
	orr	w9, w8, w10
	and	w9, w9, w19
	cmp	w9, w10
	b.ne	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_1 Depth=1
	cbnz	w21, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x27]
	ldr	w1, [x28]
Lloh22:
	adrp	x8, _colors@GOTPAGE
Lloh23:
	ldr	x8, [x8, _colors@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
Lloh25:
	adrp	x9, _current_color@GOTPAGE
Lloh26:
	ldr	x9, [x9, _current_color@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	ldr	w2, [x8, x9, lsl #2]
Lloh28:
	adrp	x8, _modes@GOTPAGE
Lloh29:
	ldr	x8, [x8, _modes@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
Lloh31:
	adrp	x9, _current_mode@GOTPAGE
Lloh32:
	ldr	x9, [x9, _current_mode@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	ldr	w3, [x8, x9, lsl #2]
	bl	_plot
	ldr	w9, [x25]
	ldr	w8, [x26]
	orr	w9, w8, w9
	and	w9, w9, w19
LBB0_18:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w21, #1
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w21, #0
LBB0_20:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w22, #0
	cmp	w9, w8
	b.ne	LBB0_1
; %bb.21:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	w22, #1
	cbnz	w23, LBB0_1
; %bb.22:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x27]
	ldr	w1, [x28]
Lloh34:
	adrp	x8, _WHITE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _WHITE@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
Lloh37:
	adrp	x8, _SOLID@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SOLID@GOTPAGEOFF]
Lloh39:
	ldr	w3, [x8]
	bl	_plot
	mov	w22, #1
	b	LBB0_1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_SHOW_SPRITES,4,2               ; @SHOW_SPRITES
	.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	_cursor_y,4,2                   ; @cursor_y
	.comm	_cursor_x,4,2                   ; @cursor_x
	.comm	_J_SELECT,4,2                   ; @J_SELECT
	.comm	_HIDE_SPRITES,4,2               ; @HIDE_SPRITES
	.comm	_J_A,4,2                        ; @J_A
	.comm	_J_B,4,2                        ; @J_B
	.comm	_colors,8,3                     ; @colors
	.comm	_current_color,8,3              ; @current_color
	.comm	_modes,8,3                      ; @modes
	.comm	_current_mode,8,3               ; @current_mode
	.comm	_WHITE,4,2                      ; @WHITE
	.comm	_SOLID,4,2                      ; @SOLID
.subsections_via_symbols
