	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UIOnInteract                   ## -- Begin function UIOnInteract
	.p2align	4, 0x90
_UIOnInteract:                          ## @UIOnInteract
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_J_A@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_JOY_PRESSED
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_text_drawn@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.2:
	movq	_text_count@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.3:
	movq	_menu_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_menu_cancel_on_last_option@GOTPCREL(%rip), %rax
	movq	_menu_index@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	incq	%rcx
	movq	_menu_num_options@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movl	$0, %edx
	cmovneq	%rcx, %rdx
	cmpq	$0, (%rax)
	cmoveq	%rcx, %rdx
	movq	_script_variables@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_menu_flag@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rdx, (%rax,%rcx,8)
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UICloseDialogue                ## TAILCALL
LBB0_6:
	movq	_menu_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.7:
	movq	_J_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_JOY_PRESSED
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	_menu_index@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	decq	%rdi
	xorl	%esi, %esi
	callq	_MAX
	jmp	LBB0_9
LBB0_11:
	movq	_J_DOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_JOY_PRESSED
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_menu_index@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	incq	%rdi
	movq	_menu_num_options@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	decq	%rsi
	callq	_MIN
LBB0_9:
	movq	%rax, (%rbx)
LBB0_10:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UIDrawMenuCursor               ## TAILCALL
LBB0_13:
	movq	_J_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_JOY_PRESSED
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movq	_menu_layout@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_18:
	movq	_J_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_JOY_PRESSED
	testq	%rax, %rax
	je	LBB0_22
## %bb.19:
	movq	_menu_layout@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.21:
	movq	_menu_num_options@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	decq	%rax
	jmp	LBB0_17
LBB0_16:
	movq	_menu_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$-4, %rdi
	xorl	%esi, %esi
	callq	_MAX
	jmp	LBB0_17
LBB0_22:
	movq	_menu_cancel_on_b@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.23:
	movq	_J_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_JOY_PRESSED
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movq	_script_variables@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_menu_flag@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	$0, (%rax,%rcx,8)
	jmp	LBB0_5
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_20:
	movq	_menu_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$4, %rdi
	movq	_menu_num_options@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	decq	%rsi
	callq	_MIN
LBB0_17:
	movq	_menu_index@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_J_A,4,2                        ## @J_A
	.comm	_text_drawn,8,3                 ## @text_drawn
	.comm	_text_count,8,3                 ## @text_count
	.comm	_menu_enabled,8,3               ## @menu_enabled
	.comm	_menu_cancel_on_last_option,8,3 ## @menu_cancel_on_last_option
	.comm	_menu_index,8,3                 ## @menu_index
	.comm	_menu_num_options,8,3           ## @menu_num_options
	.comm	_script_variables,8,3           ## @script_variables
	.comm	_menu_flag,8,3                  ## @menu_flag
	.comm	_J_UP,4,2                       ## @J_UP
	.comm	_J_DOWN,4,2                     ## @J_DOWN
	.comm	_J_LEFT,4,2                     ## @J_LEFT
	.comm	_menu_layout,8,3                ## @menu_layout
	.comm	_J_RIGHT,4,2                    ## @J_RIGHT
	.comm	_menu_cancel_on_b,8,3           ## @menu_cancel_on_b
	.comm	_J_B,4,2                        ## @J_B
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UIOnInteract                   ; -- Begin function UIOnInteract
	.p2align	2
_UIOnInteract:                          ; @UIOnInteract
	.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, _J_A@GOTPAGE
Lloh1:
	ldr	x8, [x8, _J_A@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_JOY_PRESSED
	cbz	x0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _text_drawn@GOTPAGE
Lloh4:
	ldr	x8, [x8, _text_drawn@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _text_count@GOTPAGE
Lloh7:
	ldr	x9, [x9, _text_count@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x9, #0, #4, ne
	b.eq	LBB0_22
; %bb.2:
Lloh9:
	adrp	x8, _menu_enabled@GOTPAGE
Lloh10:
	ldr	x8, [x8, _menu_enabled@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _menu_cancel_on_last_option@GOTPAGE
Lloh13:
	ldr	x8, [x8, _menu_cancel_on_last_option@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _menu_index@GOTPAGE
Lloh16:
	ldr	x9, [x9, _menu_index@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x10, x9, #1
Lloh18:
	adrp	x11, _menu_num_options@GOTPAGE
Lloh19:
	ldr	x11, [x11, _menu_num_options@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
	cmp	x10, x11
	ccmp	x8, #0, #4, eq
	csinc	x8, xzr, x9, ne
Lloh21:
	adrp	x9, _script_variables@GOTPAGE
Lloh22:
	ldr	x9, [x9, _script_variables@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
Lloh24:
	adrp	x10, _menu_flag@GOTPAGE
Lloh25:
	ldr	x10, [x10, _menu_flag@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	str	x8, [x9, x10, lsl #3]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UICloseDialogue
LBB0_5:
Lloh27:
	adrp	x8, _menu_enabled@GOTPAGE
Lloh28:
	ldr	x8, [x8, _menu_enabled@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cbz	x8, LBB0_22
; %bb.6:
Lloh30:
	adrp	x8, _J_UP@GOTPAGE
Lloh31:
	ldr	x8, [x8, _J_UP@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_JOY_PRESSED
	cbz	x0, LBB0_8
; %bb.7:
Lloh33:
	adrp	x19, _menu_index@GOTPAGE
Lloh34:
	ldr	x19, [x19, _menu_index@GOTPAGEOFF]
	ldr	x8, [x19]
	sub	x0, x8, #1
	mov	w1, #0
	bl	_MAX
	b	LBB0_10
LBB0_8:
Lloh35:
	adrp	x8, _J_DOWN@GOTPAGE
Lloh36:
	ldr	x8, [x8, _J_DOWN@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_JOY_PRESSED
	cbz	x0, LBB0_12
; %bb.9:
Lloh38:
	adrp	x19, _menu_index@GOTPAGE
Lloh39:
	ldr	x19, [x19, _menu_index@GOTPAGEOFF]
	ldr	x8, [x19]
	add	x0, x8, #1
Lloh40:
	adrp	x8, _menu_num_options@GOTPAGE
Lloh41:
	ldr	x8, [x8, _menu_num_options@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	sub	x1, x8, #1
	bl	_MIN
LBB0_10:
	str	x0, [x19]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UIDrawMenuCursor
LBB0_12:
Lloh43:
	adrp	x8, _J_LEFT@GOTPAGE
Lloh44:
	ldr	x8, [x8, _J_LEFT@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	bl	_JOY_PRESSED
	cbz	x0, LBB0_15
; %bb.13:
Lloh46:
	adrp	x8, _menu_layout@GOTPAGE
Lloh47:
	ldr	x8, [x8, _menu_layout@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.14:
	mov	x0, #0
	b	LBB0_24
LBB0_15:
Lloh49:
	adrp	x8, _J_RIGHT@GOTPAGE
Lloh50:
	ldr	x8, [x8, _J_RIGHT@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	bl	_JOY_PRESSED
	cbz	x0, LBB0_19
; %bb.16:
Lloh52:
	adrp	x8, _menu_layout@GOTPAGE
Lloh53:
	ldr	x8, [x8, _menu_layout@GOTPAGEOFF]
Lloh54:
	ldr	x8, [x8]
	cbz	x8, LBB0_23
; %bb.17:
Lloh55:
	adrp	x8, _menu_num_options@GOTPAGE
Lloh56:
	ldr	x8, [x8, _menu_num_options@GOTPAGEOFF]
Lloh57:
	ldr	x8, [x8]
	sub	x0, x8, #1
	b	LBB0_24
LBB0_18:
Lloh58:
	adrp	x8, _menu_index@GOTPAGE
Lloh59:
	ldr	x8, [x8, _menu_index@GOTPAGEOFF]
Lloh60:
	ldr	x8, [x8]
	sub	x0, x8, #4
	mov	w1, #0
	bl	_MAX
	b	LBB0_24
LBB0_19:
Lloh61:
	adrp	x8, _menu_cancel_on_b@GOTPAGE
Lloh62:
	ldr	x8, [x8, _menu_cancel_on_b@GOTPAGEOFF]
Lloh63:
	ldr	x8, [x8]
	cbz	x8, LBB0_22
; %bb.20:
Lloh64:
	adrp	x8, _J_B@GOTPAGE
Lloh65:
	ldr	x8, [x8, _J_B@GOTPAGEOFF]
Lloh66:
	ldr	w0, [x8]
	bl	_JOY_PRESSED
	cbz	x0, LBB0_22
; %bb.21:
Lloh67:
	adrp	x8, _script_variables@GOTPAGE
Lloh68:
	ldr	x8, [x8, _script_variables@GOTPAGEOFF]
Lloh69:
	ldr	x8, [x8]
Lloh70:
	adrp	x9, _menu_flag@GOTPAGE
Lloh71:
	ldr	x9, [x9, _menu_flag@GOTPAGEOFF]
Lloh72:
	ldr	x9, [x9]
	str	xzr, [x8, x9, lsl #3]
	b	LBB0_4
LBB0_22:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_23:
Lloh73:
	adrp	x8, _menu_index@GOTPAGE
Lloh74:
	ldr	x8, [x8, _menu_index@GOTPAGEOFF]
Lloh75:
	ldr	x8, [x8]
	add	x0, x8, #4
Lloh76:
	adrp	x8, _menu_num_options@GOTPAGE
Lloh77:
	ldr	x8, [x8, _menu_num_options@GOTPAGEOFF]
Lloh78:
	ldr	x8, [x8]
	sub	x1, x8, #1
	bl	_MIN
LBB0_24:
Lloh79:
	adrp	x8, _menu_index@GOTPAGE
Lloh80:
	ldr	x8, [x8, _menu_index@GOTPAGEOFF]
Lloh81:
	str	x0, [x8]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotStr	Lloh79, Lloh80, Lloh81
	.cfi_endproc
                                        ; -- End function
	.comm	_J_A,4,2                        ; @J_A
	.comm	_text_drawn,8,3                 ; @text_drawn
	.comm	_text_count,8,3                 ; @text_count
	.comm	_menu_enabled,8,3               ; @menu_enabled
	.comm	_menu_cancel_on_last_option,8,3 ; @menu_cancel_on_last_option
	.comm	_menu_index,8,3                 ; @menu_index
	.comm	_menu_num_options,8,3           ; @menu_num_options
	.comm	_script_variables,8,3           ; @script_variables
	.comm	_menu_flag,8,3                  ; @menu_flag
	.comm	_J_UP,4,2                       ; @J_UP
	.comm	_J_DOWN,4,2                     ; @J_DOWN
	.comm	_J_LEFT,4,2                     ; @J_LEFT
	.comm	_menu_layout,8,3                ; @menu_layout
	.comm	_J_RIGHT,4,2                    ; @J_RIGHT
	.comm	_menu_cancel_on_b,8,3           ; @menu_cancel_on_b
	.comm	_J_B,4,2                        ; @J_B
.subsections_via_symbols
