	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu                           ## -- Begin function menu
	.p2align	4, 0x90
_menu:                                  ## @menu
	.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
	movq	_NB_TOOLS@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_FIRST_TOOL@GOTPCREL(%rip), %r14
	movq	_current_tool@GOTPCREL(%rip), %r15
	movq	_FIRST_COLOR@GOTPCREL(%rip), %r12
	movq	_current_color@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%al, %esi
	movq	%rbx, %rdi
	callq	_set_icon
	incq	%rbx
	movq	_NB_TOOLS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	addq	(%r14), %rcx
	movb	$1, %al
	cmpq	%rcx, %rbx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rcx
	addq	(%r12), %rcx
	cmpq	%rcx, %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_current_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_FIRST_MODE@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	cmpq	%rax, %rbx
	sete	%al
	jmp	LBB0_5
LBB0_6:
	movq	_current_cursor@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_ARROW@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	callq	_set_cursor
	xorl	%eax, %eax
	callq	_move_menu_cursor
	xorl	%eax, %eax
	callq	_waitpadup
	movl	$50, %r15d
	movq	_menu_cursor_pos@GOTPCREL(%rip), %r12
	movq	_icons@GOTPCREL(%rip), %r14
	jmp	LBB0_7
LBB0_31:                                ##   in Loop: Header=BB0_7 Depth=1
	subq	(%rcx), %rax
	movq	%rax, (%r13)
	movq	_SELECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_change_icon
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_J_SELECT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_33
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	%r15, %r13
	xorl	%eax, %eax
	callq	_wait_vbl_done
	xorl	%eax, %eax
	callq	_joypad
	movq	%rax, %rbx
	movq	_J_UP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_J_DOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rdx, %rdi
	orq	%rsi, %rdi
	movq	_J_LEFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_J_RIGHT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	movq	%rax, %rcx
	orq	%r8, %rcx
	orq	%rdi, %rcx
	movl	$50, %r15d
	testq	%rbx, %rcx
	je	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	testq	%rbx, %rsi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rcx
	movq	(%r12), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	movq	(%rcx,%rsi,8), %rcx
	movq	%rcx, (%r12)
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	testq	%rbx, %rdx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rcx
	movq	(%r12), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	movq	8(%rcx,%rdx,8), %rcx
	movq	%rcx, (%r12)
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	testq	%rbx, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rax
	movq	(%r12), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movq	16(%rax,%rcx,8), %rax
	movq	%rax, (%r12)
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	testq	%rbx, %r8
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rax
	movq	(%r12), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movq	24(%rax,%rcx,8), %rax
	movq	%rax, (%r12)
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_move_menu_cursor
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_joypad
	movl	$10, %r15d
	cmpq	%rax, %rbx
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	xorl	%eax, %eax
	callq	_wait_vbl_done
	decq	%r13
	jne	LBB0_17
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_J_A@GOTPCREL(%rip), %rax
	testq	%rbx, (%rax)
	je	LBB0_32
## %bb.20:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r12), %rax
	movq	_LAST_TOOL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jbe	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_FIRST_COLOR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	cmpq	%rdi, %rax
	jb	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_LAST_COLOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	ja	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_current_color@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rdi
	cmpq	%rdi, %rax
	je	LBB0_32
## %bb.26:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_UNSELECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rcx, %r13
	callq	_change_icon
	movq	(%r12), %rdi
	movq	%rdi, %rax
	movq	_FIRST_COLOR@GOTPCREL(%rip), %rcx
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_current_tool@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	cmpq	%rdi, %rax
	je	LBB0_32
## %bb.22:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_UNSELECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_change_icon
	movq	(%r12), %rdi
	movq	_current_tool@GOTPCREL(%rip), %r13
	movq	%rdi, (%r13)
	movq	_SELECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_change_icon
	movq	(%r14), %rax
	movq	(%r13), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movq	32(%rax,%rcx,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_32
LBB0_27:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_FIRST_MODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	cmpq	%rdi, %rax
	jb	LBB0_32
## %bb.28:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_LAST_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	ja	LBB0_32
## %bb.29:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_current_mode@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rdi
	cmpq	%rdi, %rax
	je	LBB0_32
## %bb.30:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_UNSELECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rcx, %r13
	callq	_change_icon
	movq	(%r12), %rdi
	movq	%rdi, %rax
	movq	_FIRST_MODE@GOTPCREL(%rip), %rcx
	jmp	LBB0_31
LBB0_33:
	xorl	%eax, %eax
	callq	_waitpadup
	movq	_NB_TOOLS@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jle	LBB0_36
## %bb.34:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_reset_icon
	incq	%rbx
	cmpq	(%r14), %rbx
	jl	LBB0_35
LBB0_36:
	movq	_current_cursor@GOTPCREL(%rip), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NB_TOOLS,8,3                   ## @NB_TOOLS
	.comm	_FIRST_TOOL,8,3                 ## @FIRST_TOOL
	.comm	_current_tool,8,3               ## @current_tool
	.comm	_FIRST_COLOR,8,3                ## @FIRST_COLOR
	.comm	_current_color,8,3              ## @current_color
	.comm	_FIRST_MODE,8,3                 ## @FIRST_MODE
	.comm	_current_mode,8,3               ## @current_mode
	.comm	_current_cursor,8,3             ## @current_cursor
	.comm	_ARROW,8,3                      ## @ARROW
	.comm	_SHOW_SPRITES,4,2               ## @SHOW_SPRITES
	.comm	_J_UP,8,3                       ## @J_UP
	.comm	_J_DOWN,8,3                     ## @J_DOWN
	.comm	_J_LEFT,8,3                     ## @J_LEFT
	.comm	_J_RIGHT,8,3                    ## @J_RIGHT
	.comm	_icons,8,3                      ## @icons
	.comm	_menu_cursor_pos,8,3            ## @menu_cursor_pos
	.comm	_J_A,8,3                        ## @J_A
	.comm	_LAST_TOOL,8,3                  ## @LAST_TOOL
	.comm	_UNSELECTED,4,2                 ## @UNSELECTED
	.comm	_SELECTED,4,2                   ## @SELECTED
	.comm	_LAST_COLOR,8,3                 ## @LAST_COLOR
	.comm	_LAST_MODE,8,3                  ## @LAST_MODE
	.comm	_J_SELECT,8,3                   ## @J_SELECT
	.comm	_HIDE_SPRITES,4,2               ## @HIDE_SPRITES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu                           ; -- Begin function menu
	.p2align	2
_menu:                                  ; @menu
	.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
Lloh0:
	adrp	x21, _NB_TOOLS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NB_TOOLS@GOTPAGEOFF]
Lloh2:
	adrp	x22, _current_tool@GOTPAGE
Lloh3:
	ldr	x22, [x22, _current_tool@GOTPAGEOFF]
Lloh4:
	adrp	x26, _FIRST_COLOR@GOTPAGE
Lloh5:
	ldr	x26, [x26, _FIRST_COLOR@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh6:
	adrp	x23, _current_mode@GOTPAGE
Lloh7:
	ldr	x23, [x23, _current_mode@GOTPAGEOFF]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, #0
Lloh8:
	adrp	x20, _FIRST_TOOL@GOTPAGE
Lloh9:
	ldr	x20, [x20, _FIRST_TOOL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w1, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_set_icon
	add	x19, x19, #1
	ldr	x8, [x21]
	cmp	x19, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x8, x9, x8
	cmp	x19, x8
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26]
Lloh10:
	adrp	x9, _current_color@GOTPAGE
Lloh11:
	ldr	x9, [x9, _current_color@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x8, x9, x8
	cmp	x19, x8
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh13:
	adrp	x8, _FIRST_MODE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FIRST_MODE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	x9, [x23]
	add	x8, x9, x8
	cmp	x19, x8
	cset	w1, eq
	b	LBB0_3
LBB0_7:
Lloh16:
	adrp	x9, _current_cursor@GOTPAGE
Lloh17:
	ldr	x9, [x9, _current_cursor@GOTPAGEOFF]
	ldr	x27, [x9]
Lloh18:
	adrp	x8, _ARROW@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ARROW@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	str	x8, [x9]
	bl	_set_cursor
	bl	_move_menu_cursor
	bl	_waitpadup
Lloh21:
	adrp	x23, _J_UP@GOTPAGE
Lloh22:
	ldr	x23, [x23, _J_UP@GOTPAGEOFF]
Lloh23:
	adrp	x24, _J_DOWN@GOTPAGE
Lloh24:
	ldr	x24, [x24, _J_DOWN@GOTPAGEOFF]
Lloh25:
	adrp	x25, _J_LEFT@GOTPAGE
Lloh26:
	ldr	x25, [x25, _J_LEFT@GOTPAGEOFF]
Lloh27:
	adrp	x22, _menu_cursor_pos@GOTPAGE
Lloh28:
	ldr	x22, [x22, _menu_cursor_pos@GOTPAGEOFF]
	mov	w28, #50
	mov	w20, #40
Lloh29:
	adrp	x21, _icons@GOTPAGE
Lloh30:
	ldr	x21, [x21, _icons@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x27, x23
	mov	x23, x24
	mov	x24, x25
Lloh31:
	adrp	x25, _J_LEFT@GOTPAGE
Lloh32:
	ldr	x25, [x25, _J_LEFT@GOTPAGEOFF]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
Lloh33:
	adrp	x8, _J_SELECT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _J_SELECT@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	cmp	x19, x8
	b.eq	LBB0_35
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	bl	_wait_vbl_done
	bl	_joypad
	mov	x19, x0
	ldr	x11, [x23]
	ldr	x10, [x24]
	orr	x8, x10, x11
	ldr	x9, [x25]
	orr	x12, x8, x9
Lloh36:
	adrp	x8, _J_RIGHT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _J_RIGHT@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	orr	x12, x12, x8
	tst	x12, x0
	b.eq	LBB0_23
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	tst	x11, x19
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x11, [x21]
	ldr	x12, [x22]
	mul	x12, x12, x20
	ldr	x11, [x11, x12]
	str	x11, [x22]
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	tst	x10, x19
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x10, [x21]
	ldr	x11, [x22]
	madd	x10, x11, x20, x10
	ldr	x10, [x10, #8]
	str	x10, [x22]
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	tst	x9, x19
	b.eq	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x21]
	ldr	x10, [x22]
	madd	x9, x10, x20, x9
	ldr	x9, [x9, #16]
	str	x9, [x22]
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	tst	x8, x19
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x22]
	madd	x8, x9, x20, x8
	ldr	x8, [x8, #24]
	str	x8, [x22]
LBB0_19:                                ;   in Loop: Header=BB0_10 Depth=1
	bl	_move_menu_cursor
LBB0_20:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_joypad
	cmp	x19, x0
	b.ne	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	bl	_wait_vbl_done
	subs	x28, x28, #1
	b.ne	LBB0_20
LBB0_22:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w28, #10
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w28, #50
LBB0_24:                                ;   in Loop: Header=BB0_10 Depth=1
Lloh39:
	adrp	x8, _J_A@GOTPAGE
Lloh40:
	ldr	x8, [x8, _J_A@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	tst	x8, x19
	b.eq	LBB0_9
; %bb.25:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x22]
Lloh42:
	adrp	x9, _LAST_TOOL@GOTPAGE
Lloh43:
	ldr	x9, [x9, _LAST_TOOL@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ls	LBB0_31
; %bb.26:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x26]
Lloh45:
	adrp	x10, _LAST_COLOR@GOTPAGE
Lloh46:
	ldr	x10, [x10, _LAST_COLOR@GOTPAGEOFF]
Lloh47:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #2, hs
	b.ls	LBB0_33
; %bb.27:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh48:
	adrp	x9, _FIRST_MODE@GOTPAGE
Lloh49:
	ldr	x9, [x9, _FIRST_MODE@GOTPAGEOFF]
Lloh50:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lo	LBB0_9
; %bb.28:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh51:
	adrp	x10, _LAST_MODE@GOTPAGE
Lloh52:
	ldr	x10, [x10, _LAST_MODE@GOTPAGEOFF]
Lloh53:
	ldr	x10, [x10]
	cmp	x8, x10
	b.hi	LBB0_9
; %bb.29:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x25, x24
	mov	x24, x23
	mov	x23, x27
Lloh54:
	adrp	x27, _current_mode@GOTPAGE
Lloh55:
	ldr	x27, [x27, _current_mode@GOTPAGEOFF]
	ldr	x10, [x27]
	add	x0, x10, x9
	cmp	x8, x0
	b.eq	LBB0_8
; %bb.30:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh56:
	adrp	x8, _UNSELECTED@GOTPAGE
Lloh57:
	ldr	x8, [x8, _UNSELECTED@GOTPAGEOFF]
Lloh58:
	ldr	w1, [x8]
	bl	_change_icon
	ldr	x0, [x22]
Lloh59:
	adrp	x8, _FIRST_MODE@GOTPAGE
Lloh60:
	ldr	x8, [x8, _FIRST_MODE@GOTPAGEOFF]
Lloh61:
	ldr	x8, [x8]
	sub	x8, x0, x8
	str	x8, [x27]
Lloh62:
	adrp	x8, _SELECTED@GOTPAGE
Lloh63:
	ldr	x8, [x8, _SELECTED@GOTPAGEOFF]
Lloh64:
	ldr	w1, [x8]
	bl	_change_icon
	b	LBB0_8
LBB0_31:                                ;   in Loop: Header=BB0_10 Depth=1
Lloh65:
	adrp	x9, _current_tool@GOTPAGE
Lloh66:
	ldr	x9, [x9, _current_tool@GOTPAGEOFF]
Lloh67:
	ldr	x0, [x9]
	cmp	x8, x0
	b.eq	LBB0_9
; %bb.32:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh68:
	adrp	x8, _UNSELECTED@GOTPAGE
Lloh69:
	ldr	x8, [x8, _UNSELECTED@GOTPAGEOFF]
Lloh70:
	ldr	w1, [x8]
	bl	_change_icon
	ldr	x0, [x22]
Lloh71:
	adrp	x27, _current_tool@GOTPAGE
Lloh72:
	ldr	x27, [x27, _current_tool@GOTPAGEOFF]
	str	x0, [x27]
Lloh73:
	adrp	x8, _SELECTED@GOTPAGE
Lloh74:
	ldr	x8, [x8, _SELECTED@GOTPAGEOFF]
Lloh75:
	ldr	w1, [x8]
	bl	_change_icon
	ldr	x8, [x21]
	ldr	x9, [x27]
	madd	x8, x9, x20, x8
	ldr	x27, [x8, #32]
	b	LBB0_9
LBB0_33:                                ;   in Loop: Header=BB0_10 Depth=1
Lloh76:
	adrp	x10, _current_color@GOTPAGE
Lloh77:
	ldr	x10, [x10, _current_color@GOTPAGEOFF]
Lloh78:
	ldr	x10, [x10]
	add	x0, x10, x9
	cmp	x8, x0
	b.eq	LBB0_9
; %bb.34:                               ;   in Loop: Header=BB0_10 Depth=1
Lloh79:
	adrp	x8, _UNSELECTED@GOTPAGE
Lloh80:
	ldr	x8, [x8, _UNSELECTED@GOTPAGEOFF]
Lloh81:
	ldr	w1, [x8]
	bl	_change_icon
	ldr	x0, [x22]
	ldr	x8, [x26]
	sub	x8, x0, x8
Lloh82:
	adrp	x9, _current_color@GOTPAGE
Lloh83:
	ldr	x9, [x9, _current_color@GOTPAGEOFF]
Lloh84:
	str	x8, [x9]
Lloh85:
	adrp	x8, _SELECTED@GOTPAGE
Lloh86:
	ldr	x8, [x8, _SELECTED@GOTPAGEOFF]
Lloh87:
	ldr	w1, [x8]
	bl	_change_icon
	b	LBB0_9
LBB0_35:
	bl	_waitpadup
Lloh88:
	adrp	x20, _NB_TOOLS@GOTPAGE
Lloh89:
	ldr	x20, [x20, _NB_TOOLS@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_38
; %bb.36:
	mov	x19, #0
LBB0_37:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_reset_icon
	add	x19, x19, #1
	ldr	x8, [x20]
	cmp	x19, x8
	b.lt	LBB0_37
LBB0_38:
Lloh90:
	adrp	x8, _current_cursor@GOTPAGE
Lloh91:
	ldr	x8, [x8, _current_cursor@GOTPAGEOFF]
Lloh92:
	str	x27, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGotStr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGot	Lloh88, Lloh89
	.loh AdrpLdrGotStr	Lloh90, Lloh91, Lloh92
	.cfi_endproc
                                        ; -- End function
	.comm	_NB_TOOLS,8,3                   ; @NB_TOOLS
	.comm	_FIRST_TOOL,8,3                 ; @FIRST_TOOL
	.comm	_current_tool,8,3               ; @current_tool
	.comm	_FIRST_COLOR,8,3                ; @FIRST_COLOR
	.comm	_current_color,8,3              ; @current_color
	.comm	_FIRST_MODE,8,3                 ; @FIRST_MODE
	.comm	_current_mode,8,3               ; @current_mode
	.comm	_current_cursor,8,3             ; @current_cursor
	.comm	_ARROW,8,3                      ; @ARROW
	.comm	_SHOW_SPRITES,4,2               ; @SHOW_SPRITES
	.comm	_J_UP,8,3                       ; @J_UP
	.comm	_J_DOWN,8,3                     ; @J_DOWN
	.comm	_J_LEFT,8,3                     ; @J_LEFT
	.comm	_J_RIGHT,8,3                    ; @J_RIGHT
	.comm	_icons,8,3                      ; @icons
	.comm	_menu_cursor_pos,8,3            ; @menu_cursor_pos
	.comm	_J_A,8,3                        ; @J_A
	.comm	_LAST_TOOL,8,3                  ; @LAST_TOOL
	.comm	_UNSELECTED,4,2                 ; @UNSELECTED
	.comm	_SELECTED,4,2                   ; @SELECTED
	.comm	_LAST_COLOR,8,3                 ; @LAST_COLOR
	.comm	_LAST_MODE,8,3                  ; @LAST_MODE
	.comm	_J_SELECT,8,3                   ; @J_SELECT
	.comm	_HIDE_SPRITES,4,2               ; @HIDE_SPRITES
.subsections_via_symbols
