	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___open_menu_cb                 ## -- Begin function __open_menu_cb
	.p2align	4, 0x90
___open_menu_cb:                        ## @__open_menu_cb
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	8(%r12), %rcx
	movslq	(%r12), %rax
	movq	-8(%rcx,%rax,8), %rdx
	movq	(%rdx), %rsi
	movq	16(%rdx), %rdx
	movq	(%rdx,%rsi,8), %r15
	cmpq	$1, %rax
	jg	LBB0_2
## %bb.1:
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	addq	$4, %rdi
	movq	32(%r12), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,2), %esi
	movl	$1, %edx
	jmp	LBB0_5
LBB0_2:
	leal	-2(%rax), %edx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rcx), %rdx
	movq	16(%rcx), %rcx
	movq	(%rcx,%rdx,8), %rcx
	movq	8(%r15), %rdx
	movq	(%rdx), %rdi
	addq	$4, %rdi
	movq	8(%rcx), %rdx
	movq	(%rdx), %rdx
	movl	4(%rdx), %esi
	movl	8(%rdx), %ebx
	addl	%ebx, %esi
	decl	%esi
	movl	12(%rdx), %edx
	cmpl	$2, %eax
	jne	LBB0_4
## %bb.3:
	addq	(%rcx), %rdx
LBB0_4:
                                        ## kill: def $edx killed $edx killed $rdx
LBB0_5:
	callq	___set_pos
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	___draw_menu
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %rbx
	movq	8(%r15), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edi
	callq	_free
	movq	%rbx, %rdi
	callq	_r_strbuf_drain
	movq	8(%r15), %rcx
	movq	8(%rcx), %rdx
	movl	%eax, 4(%rdx)
	movq	(%rcx), %rsi
	addq	$16, %rsi
	movl	%eax, %edi
	callq	_r_str_bounds
	movq	8(%r15), %rcx
	movq	(%rcx), %rdx
	movl	%eax, 8(%rdx)
	addl	$4, 16(%rdx)
	movq	_PANEL_TYPE_MENU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rcx), %rsi
	movl	%eax, (%rsi)
	movl	$1, (%rdx)
	movq	24(%r12), %rax
	movslq	16(%r12), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 16(%r12)
	movq	%rcx, (%rax,%rdx,8)
	movq	8(%r12), %rax
	movslq	(%r12), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%r12)
	movq	%r15, (%rax,%rcx,8)
LBB0_7:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PANEL_TYPE_MENU,4,2            ## @PANEL_TYPE_MENU
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___open_menu_cb                 ; -- Begin function __open_menu_cb
	.p2align	2
___open_menu_cb:                        ; @__open_menu_cb
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x21, [x8]
	ldr	x9, [x21, #8]
	ldr	w8, [x21]
	subs	w10, w8, #1
	ldr	x10, [x9, w10, sxtw #3]
	ldr	x11, [x10, #16]
	ldr	x10, [x10]
	ldr	x19, [x11, x10, lsl #3]
	b.gt	LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x0, x8, #4
	ldr	x8, [x21, #32]
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #1
	lsl	w1, w8, #1
	mov	w2, #1
	b	LBB0_5
LBB0_2:
	subs	w10, w8, #2
	ldr	x9, [x9, w10, uxtw #3]
	ldr	x10, [x9, #16]
	ldr	x9, [x9]
	ldr	x9, [x10, x9, lsl #3]
	ldr	x10, [x9, #8]
	ldr	x10, [x10]
	ldp	w11, w12, [x10, #4]
	add	w11, w11, w12
	sub	w1, w11, #1
	ldr	x11, [x19, #8]
	ldr	x11, [x11]
	add	x0, x11, #4
	ldr	w2, [x10, #12]
	cmp	w8, #2
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x9]
	add	x2, x8, x2
LBB0_4:
                                        ; kill: def $w2 killed $w2 killed $x2
LBB0_5:
	bl	___set_pos
	mov	x0, x20
	mov	x1, x19
	bl	___draw_menu
	cbz	x0, LBB0_7
; %bb.6:
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	w0, [x8, #4]
	bl	_free
	mov	x0, x20
	bl	_r_strbuf_drain
	ldr	x8, [x19, #8]
	ldp	x8, x9, [x8]
	str	w0, [x9, #4]
	add	x1, x8, #16
	bl	_r_str_bounds
	ldr	x8, [x19, #8]
	ldp	x9, x10, [x8]
	str	w0, [x9, #8]
	ldr	w11, [x9, #16]
	add	w11, w11, #4
	str	w11, [x9, #16]
Lloh0:
	adrp	x11, _PANEL_TYPE_MENU@GOTPAGE
Lloh1:
	ldr	x11, [x11, _PANEL_TYPE_MENU@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	str	w11, [x10]
	mov	w10, #1
	str	w10, [x9]
	ldr	x9, [x21, #24]
	ldrsw	x10, [x21, #16]
	add	w11, w10, #1
	str	w11, [x21, #16]
	str	x8, [x9, x10, lsl #3]
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	add	w10, w9, #1
	str	w10, [x21]
	str	x19, [x8, x9, lsl #3]
LBB0_7:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PANEL_TYPE_MENU,4,2            ; @PANEL_TYPE_MENU
.subsections_via_symbols
