	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___handle_mouse_on_menu         ## -- Begin function __handle_mouse_on_menu
	.p2align	4, 0x90
___handle_mouse_on_menu:                ## @__handle_mouse_on_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ecx
	movl	%esi, %edx
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	%rbx, %rsi
	callq	_get_word_from_canvas_for_menu
	movq	%rax, %r13
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %eax
	decl	%eax
	je	LBB0_8
## %bb.1:
	movslq	%eax, %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	___del_menu
	decq	%r15
	testl	%r15d, %r15d
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax,%r15,8), %rbx
	cmpl	$0, (%rbx)
	jle	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rax
	movq	(%rax,%r12,8), %rax
	movl	8(%rax), %esi
	movq	%r13, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	incq	%r12
	movslq	(%rbx), %rax
	cmpq	%rax, %r12
	jl	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movl	%r12d, 4(%rbx)
	movq	8(%rbx), %rax
	movq	(%rax,%r12,8), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	___update_menu_contents
	jmp	LBB0_9
LBB0_8:
	movq	%r14, %rdi
	callq	___clear_panels_menu
	movq	_PANEL_MODE_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	___set_mode
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	___get_cur_panel
	movq	(%rax), %rax
	movl	$1, (%rax)
LBB0_9:
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PANEL_MODE_DEFAULT,4,2         ## @PANEL_MODE_DEFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___handle_mouse_on_menu         ; -- Begin function __handle_mouse_on_menu
	.p2align	2
___handle_mouse_on_menu:                ; @__handle_mouse_on_menu
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x3, x2
	mov	x2, x1
	mov	x20, x0
	ldr	x21, [x0]
	mov	x1, x21
	bl	_get_word_from_canvas_for_menu
	mov	x19, x0
	ldr	x22, [x21]
	ldr	w8, [x22]
	subs	w8, w8, #1
	b.eq	LBB0_8
; %bb.1:
	sxtw	x24, w8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	___del_menu
	sub	x24, x24, #1
	cbz	w24, LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x8, [x22, #8]
	ldr	x23, [x8, x24, lsl #3]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x23, #8]
	ldr	x8, [x8, x25, lsl #3]
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_strcmp
	cbz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.lt	LBB0_5
	b	LBB0_2
LBB0_7:
	str	w25, [x23, #4]
	ldr	x8, [x23, #8]
	ldr	x8, [x8, x25, lsl #3]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	___update_menu_contents
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	bl	___clear_panels_menu
Lloh0:
	adrp	x8, _PANEL_MODE_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PANEL_MODE_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	___set_mode
	mov	x0, x21
	bl	___get_cur_panel
	ldr	x8, [x0]
	mov	w9, #1
	str	w9, [x8]
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PANEL_MODE_DEFAULT,4,2         ; @PANEL_MODE_DEFAULT
.subsections_via_symbols
