	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___update_menu_contents         ## -- Begin function __update_menu_contents
	.p2align	4, 0x90
___update_menu_contents:                ## @__update_menu_contents
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdx), %r12
	movq	%rdx, %rsi
	callq	___draw_menu
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	8(%r12), %rax
	movl	4(%rax), %edi
	callq	_free
	movq	%rbx, %rdi
	callq	_r_strbuf_drain
	movq	8(%r12), %rcx
	movl	%eax, 4(%rcx)
	movq	(%r12), %rsi
	addq	$4, %rsi
	movl	%eax, %edi
	callq	_r_str_bounds
	movl	%eax, %ebx
	movq	(%r12), %rax
	cmpl	8(%rax), %ebx
	jge	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	___set_refresh_all
	movq	(%r12), %rax
LBB0_3:
	movl	%ebx, 8(%rax)
	addl	$4, 4(%rax)
	movq	_PANEL_TYPE_MENU@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	8(%r12), %rdx
	movl	%ecx, (%rdx)
	movl	$1, (%rax)
	movq	8(%r14), %rax
	movslq	(%r14), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%r14)
	movq	%r12, (%rax,%rcx,8)
LBB0_4:
	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	___update_menu_contents         ; -- Begin function __update_menu_contents
	.p2align	2
___update_menu_contents:                ; @__update_menu_contents
	.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	x19, x1
	mov	x20, x0
	ldr	x22, [x2]
	mov	x1, x2
	bl	___draw_menu
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	x8, [x22, #8]
	ldr	w0, [x8, #4]
	bl	_free
	mov	x0, x21
	bl	_r_strbuf_drain
	ldp	x9, x8, [x22]
	str	w0, [x8, #4]
	add	x1, x9, #4
	bl	_r_str_bounds
	mov	x21, x0
	ldr	x8, [x22]
	ldr	w9, [x8, #8]
	cmp	w0, w9
	b.ge	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	___set_refresh_all
	ldr	x8, [x22]
LBB0_3:
	str	w21, [x8, #8]
Lloh0:
	adrp	x9, _PANEL_TYPE_MENU@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PANEL_TYPE_MENU@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	x10, [x22, #8]
	str	w9, [x10]
	ldr	w9, [x8, #4]
	add	w9, w9, #4
	mov	w10, #1
	stp	w10, w9, [x8]
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	w10, w9, #1
	str	w10, [x19]
	str	x22, [x8, x9, lsl #3]
LBB0_4:
	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
