	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MONTHCAL_RButtonUp
_MONTHCAL_RButtonUp:                    ## @MONTHCAL_RButtonUp
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_CreatePopupMenu
	movl	%eax, -196(%rbp)                ## 4-byte Spill
	movq	_COMCTL32_hModule@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_IDM_GOTODAY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-176(%rbp), %r14
	movq	%r14, %rdi
	callq	_ARRAY_SIZE
	movl	%r13d, %edi
	movl	%ebx, %esi
	movq	%r14, %rdx
	movl	%eax, %ecx
	callq	_LoadStringW
	movq	_MF_STRING@GOTPCREL(%rip), %rax
	movq	_MF_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	-196(%rbp), %ebx                ## 4-byte Reload
	movl	%ebx, %edi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_AppendMenuW
	movl	%r15d, %edi
	callq	_LOWORD
	movw	%ax, -192(%rbp)
	movl	%r15d, %edi
	callq	_HIWORD
	movw	%ax, -190(%rbp)
	movl	8(%r12), %edi
	leaq	-192(%rbp), %rsi
	callq	_ClientToScreen
	movq	_TPM_RIGHTBUTTON@GOTPCREL(%rip), %rax
	movq	_TPM_NONOTIFY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_TPM_RETURNCMD@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movswl	-192(%rbp), %edx
	movswl	-190(%rbp), %ecx
	movl	8(%r12), %r9d
	movq	$0, (%rsp)
	movl	%ebx, %edi
	xorl	%r8d, %r8d
	callq	_TrackPopupMenu
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_MCS_MULTISELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.2:
	movl	4(%r12), %eax
	movl	%eax, -180(%rbp)
	movl	%eax, -184(%rbp)
	leaq	-184(%rbp), %rsi
	movq	%r12, %rdi
	callq	_MONTHCAL_SetSelRange
	jmp	LBB0_4
LBB0_3:
	leaq	4(%r12), %rsi
	movq	%r12, %rdi
	callq	_MONTHCAL_SetCurSel
LBB0_4:
	movq	%r12, %rdi
	callq	_MONTHCAL_NotifySelectionChange
	movq	%r12, %rdi
	callq	_MONTHCAL_NotifySelect
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_COMCTL32_hModule,4,2           ## @COMCTL32_hModule
	.comm	_IDM_GOTODAY,4,2                ## @IDM_GOTODAY
	.comm	_MF_STRING,4,2                  ## @MF_STRING
	.comm	_MF_ENABLED,4,2                 ## @MF_ENABLED
	.comm	_TPM_RIGHTBUTTON,4,2            ## @TPM_RIGHTBUTTON
	.comm	_TPM_NONOTIFY,4,2               ## @TPM_NONOTIFY
	.comm	_TPM_RETURNCMD,4,2              ## @TPM_RETURNCMD
	.comm	_MCS_MULTISELECT,4,2            ## @MCS_MULTISELECT
	.no_dead_strip	_MONTHCAL_RButtonUp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MONTHCAL_RButtonUp
_MONTHCAL_RButtonUp:                    ; @MONTHCAL_RButtonUp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_CreatePopupMenu
	mov	x20, x0
Lloh3:
	adrp	x8, _COMCTL32_hModule@GOTPAGE
Lloh4:
	ldr	x8, [x8, _COMCTL32_hModule@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _IDM_GOTODAY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IDM_GOTODAY@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	mov	x3, x0
	add	x2, sp, #24
	mov	x0, x22
	mov	x1, x23
	bl	_LoadStringW
Lloh9:
	adrp	x8, _MF_STRING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MF_STRING@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _MF_ENABLED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MF_ENABLED@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w9, w8
	add	x3, sp, #24
	mov	x0, x20
	mov	w2, #1
	bl	_AppendMenuW
	mov	x0, x21
	bl	_LOWORD
	strh	w0, [sp, #8]
	mov	x0, x21
	bl	_HIWORD
	strh	w0, [sp, #10]
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_ClientToScreen
Lloh15:
	adrp	x8, _TPM_RIGHTBUTTON@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TPM_RIGHTBUTTON@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _TPM_NONOTIFY@GOTPAGE
Lloh19:
	ldr	x9, [x9, _TPM_NONOTIFY@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _TPM_RETURNCMD@GOTPAGE
Lloh22:
	ldr	x10, [x10, _TPM_RETURNCMD@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh23:
	ldr	w9, [x10]
	orr	w1, w8, w9
	ldrsh	w2, [sp, #8]
	ldrsh	w3, [sp, #10]
	ldr	w5, [x19, #8]
	mov	x0, x20
	mov	w4, #0
	mov	x6, #0
	bl	_TrackPopupMenu
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x19]
Lloh24:
	adrp	x9, _MCS_MULTISELECT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MCS_MULTISELECT@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x19, #4]
	stp	w8, w8, [sp, #16]
	add	x1, sp, #16
	mov	x0, x19
	bl	_MONTHCAL_SetSelRange
	b	LBB0_4
LBB0_3:
	add	x1, x19, #4
	mov	x0, x19
	bl	_MONTHCAL_SetCurSel
LBB0_4:
	mov	x0, x19
	bl	_MONTHCAL_NotifySelectionChange
	mov	x0, x19
	bl	_MONTHCAL_NotifySelect
LBB0_5:
	ldur	x8, [x29, #-56]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_COMCTL32_hModule,4,2           ; @COMCTL32_hModule
	.comm	_IDM_GOTODAY,4,2                ; @IDM_GOTODAY
	.comm	_MF_STRING,4,2                  ; @MF_STRING
	.comm	_MF_ENABLED,4,2                 ; @MF_ENABLED
	.comm	_TPM_RIGHTBUTTON,4,2            ; @TPM_RIGHTBUTTON
	.comm	_TPM_NONOTIFY,4,2               ; @TPM_NONOTIFY
	.comm	_TPM_RETURNCMD,4,2              ; @TPM_RETURNCMD
	.comm	_MCS_MULTISELECT,4,2            ; @MCS_MULTISELECT
	.no_dead_strip	_MONTHCAL_RButtonUp
.subsections_via_symbols
