	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function OnMenuSelect
_OnMenuSelect:                          ## @OnMenuSelect
	.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
	subq	$416, %rsp                      ## imm = 0x1A0
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %ebx
	movl	%esi, %r12d
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	l_.str(%rip), %rsi
	leaq	-448(%rbp), %rdi
	callq	_wcscpy
	movq	_MF_POPUP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.1:
	movl	%r15d, %edi
	callq	_GetMenu
	cmpq	%r14, %rax
	je	LBB0_3
## %bb.2:
	cmpl	$2, %r12d
	movl	$5, %eax
	cmovel	%eax, %r12d
LBB0_3:
	movq	_hInst@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-448(%rbp), %rdx
	movl	%r12d, %esi
	movl	$100, %ecx
	callq	_LoadStringW
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	leaq	-448(%rbp), %rdi
	movl	$10, %esi
	callq	_wcschr
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	$0, (%rax)
LBB0_6:
	movq	_hStatusBar@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SB_SETTEXTW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-448(%rbp), %rcx
	xorl	%edx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_SendMessageW
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$416, %rsp                      ## imm = 0x1A0
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.space	4

	.comm	_MF_POPUP,4,2                   ## @MF_POPUP
	.comm	_hInst,4,2                      ## @hInst
	.comm	_hStatusBar,4,2                 ## @hStatusBar
	.comm	_SB_SETTEXTW,4,2                ## @SB_SETTEXTW
	.no_dead_strip	_OnMenuSelect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function OnMenuSelect
_OnMenuSelect:                          ; @OnMenuSelect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #480
	.cfi_def_cfa_offset 480
	stp	x28, x27, [sp, #416]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #432]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #448]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #464]            ; 16-byte Folded Spill
	add	x29, sp, #464
	.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 w27, -56
	.cfi_offset w28, -64
	mov	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_wcscpy
Lloh5:
	adrp	x8, _MF_POPUP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MF_POPUP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_GetMenu
	mov	w8, #5
	cmp	w19, #2
	csel	w8, w8, w19, eq
	cmp	x0, x20
	csel	w19, w19, w8, eq
LBB0_2:
Lloh8:
	adrp	x8, _hInst@GOTPAGE
Lloh9:
	ldr	x8, [x8, _hInst@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x2, sp, #8
	mov	x1, x19
	mov	w3, #100
	bl	_LoadStringW
	cbz	x0, LBB0_5
; %bb.3:
	add	x0, sp, #8
	mov	w1, #10
	bl	_wcschr
	cbz	x0, LBB0_5
; %bb.4:
	str	wzr, [x0]
LBB0_5:
Lloh11:
	adrp	x8, _hStatusBar@GOTPAGE
Lloh12:
	ldr	x8, [x8, _hStatusBar@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _SB_SETTEXTW@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SB_SETTEXTW@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	add	x3, sp, #8
	mov	w2, #0
	bl	_SendMessageW
	ldur	x8, [x29, #-56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #464]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #448]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #432]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #416]            ; 16-byte Folded Reload
	add	sp, sp, #480
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.space	4

	.comm	_MF_POPUP,4,2                   ; @MF_POPUP
	.comm	_hInst,4,2                      ; @hInst
	.comm	_hStatusBar,4,2                 ; @hStatusBar
	.comm	_SB_SETTEXTW,4,2                ; @SB_SETTEXTW
	.no_dead_strip	_OnMenuSelect
.subsections_via_symbols
