	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MONTHCAL_SetCurSel
_MONTHCAL_SetCurSel:                    ## @MONTHCAL_SetCurSel
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	80(%rdi), %rax
	movq	%rax, -112(%rbp)
	movups	48(%rdi), %xmm0
	movups	64(%rdi), %xmm1
	movaps	%xmm1, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	_FALSE@GOTPCREL(%rip), %r13
	testq	%r14, %r14
	je	LBB0_14
## %bb.1:
	movq	_MCS_MULTISELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_2
LBB0_14:
	movl	(%r13), %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r14, %rdi
	callq	_MONTHCAL_ValidateDate
	testl	%eax, %eax
	je	LBB0_14
## %bb.3:
	leaq	48(%r15), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_MONTHCAL_IsDateEqual
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_TRUE@GOTPCREL(%rip), %r13
	jmp	LBB0_14
LBB0_5:
	movq	(%r14), %rax
	movq	%rax, -80(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -72(%rbp)
	movups	%xmm0, -56(%rbp)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-80(%rbp), %r12
	movq	%r12, %rdi
	callq	_MONTHCAL_CalculateDayOfWeek
	movq	_FALSE@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_MONTHCAL_IsDateInValidRange
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	88(%r15), %rbx
	movq	%r15, %rdi
	callq	_MONTHCAL_GetCalCount
	leaq	(%rbx,%rax,4), %rdi
	addq	$-4, %rdi
	movq	%r14, %rsi
	callq	_MONTHCAL_MonthDiff
	movq	%rax, %r12
	testq	%rax, %rax
	jg	LBB0_8
## %bb.7:
	movq	88(%r15), %rdi
	movq	%r14, %rsi
	callq	_MONTHCAL_MonthDiff
	xorl	%r12d, %r12d
	testq	%rax, %rax
	cmovsq	%rax, %r12
	jns	LBB0_11
LBB0_8:
	movq	%r15, %rdi
	callq	_MONTHCAL_GetCalCount
	testq	%rax, %rax
	jle	LBB0_11
## %bb.9:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	88(%r15), %rdi
	addq	%r13, %rdi
	movq	%r12, %rsi
	callq	_MONTHCAL_GetMonth
	incq	%rbx
	movq	%r15, %rdi
	callq	_MONTHCAL_GetCalCount
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_10
LBB0_11:
	movq	32(%r14), %rax
	movq	%rax, -48(%rbp)
	movups	(%r14), %xmm0
	movups	16(%r14), %xmm1
	movaps	%xmm1, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	_TRUE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-80(%rbp), %rdi
	callq	_MONTHCAL_CalculateDayOfWeek
	movq	-48(%rbp), %rax
	movq	%rax, 40(%r15)
	movaps	-80(%rbp), %xmm0
	movaps	-64(%rbp), %xmm1
	movups	%xmm1, 24(%r15)
	movups	%xmm0, 8(%r15)
	movq	-48(%rbp), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 32(%rcx)
	movaps	-80(%rbp), %xmm0
	movaps	-64(%rbp), %xmm1
	movups	%xmm1, 16(%rcx)
	movups	%xmm0, (%rcx)
	movl	-144(%rbp), %ebx
	movl	(%r14), %eax
	movl	%eax, -144(%rbp)
	leaq	-144(%rbp), %rdi
	movq	%r14, %rsi
	callq	_MONTHCAL_IsDateEqual
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	%ebx, -144(%rbp)
	leaq	-144(%rbp), %rsi
	leaq	-96(%rbp), %r13
	movq	%r15, %rdi
	movq	%r13, %rdx
	movl	$-1, %ecx
	callq	_MONTHCAL_GetDayRect
	leaq	-92(%rbp), %r12
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	$-1, %ecx
	callq	_MONTHCAL_GetDayRect
	movl	4(%r15), %edi
	movq	_FALSE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r13, %rsi
	callq	_InvalidateRect
	movl	4(%r15), %edi
	movl	(%rbx), %edx
	movq	%r12, %rsi
	callq	_InvalidateRect
	movq	_TRUE@GOTPCREL(%rip), %r13
	jmp	LBB0_14
LBB0_13:
	movl	4(%r15), %edi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_InvalidateRect
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_MCS_MULTISELECT,4,2            ## @MCS_MULTISELECT
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_MONTHCAL_SetCurSel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MONTHCAL_SetCurSel
_MONTHCAL_SetCurSel:                    ; @MONTHCAL_SetCurSel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x20, x1
	mov	x19, x0
	ldp	q0, q1, [x0, #48]
	stp	q0, q1, [sp, #64]
	ldr	x8, [x0, #80]
	str	x8, [sp, #96]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	cbz	x20, LBB0_2
; %bb.1:
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _MCS_MULTISELECT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MCS_MULTISELECT@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_2:
Lloh5:
	adrp	x24, _FALSE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _FALSE@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x24]
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_4:
	mov	x0, x20
	bl	_MONTHCAL_ValidateDate
Lloh7:
	adrp	x23, _FALSE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _FALSE@GOTPAGEOFF]
	cbz	w0, LBB0_14
; %bb.5:
	add	x21, x19, #48
	mov	x0, x21
	mov	x1, x20
	bl	_MONTHCAL_IsDateEqual
Lloh9:
	adrp	x24, _TRUE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _TRUE@GOTPAGEOFF]
	cbnz	x0, LBB0_3
; %bb.6:
	ldr	x8, [x20]
	str	x8, [sp, #16]
	movi.2d	v0, #0000000000000000
	stur	q0, [sp, #24]
	stur	q0, [sp, #40]
	ldr	w1, [x24]
	add	x0, sp, #16
	bl	_MONTHCAL_CalculateDayOfWeek
	ldr	w2, [x23]
	add	x1, sp, #16
	mov	x0, x19
	bl	_MONTHCAL_IsDateInValidRange
	cbz	w0, LBB0_14
; %bb.7:
	ldr	x22, [x19, #88]
	mov	x0, x19
	bl	_MONTHCAL_GetCalCount
	add	x8, x22, x0, lsl #2
	sub	x0, x8, #4
	mov	x1, x20
	bl	_MONTHCAL_MonthDiff
	mov	x22, x0
	cmp	x0, #0
	b.gt	LBB0_9
; %bb.8:
	ldr	x0, [x19, #88]
	mov	x1, x20
	bl	_MONTHCAL_MonthDiff
	cmp	x0, #0
	csel	x22, x0, xzr, lt
	tbz	x0, #63, LBB0_12
LBB0_9:
	mov	x0, x19
	bl	_MONTHCAL_GetCalCount
	cmp	x0, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x25, #0
	mov	x26, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #88]
	add	x0, x8, x25
	mov	x1, x22
	bl	_MONTHCAL_GetMonth
	add	x26, x26, #1
	mov	x0, x19
	bl	_MONTHCAL_GetCalCount
	add	x25, x25, #4
	cmp	x26, x0
	b.lt	LBB0_11
LBB0_12:
	ldp	q0, q1, [x20]
	stp	q0, q1, [sp, #16]
	ldr	x8, [x20, #32]
	str	x8, [sp, #48]
	ldr	w1, [x24]
	add	x0, sp, #16
	bl	_MONTHCAL_CalculateDayOfWeek
	ldp	q0, q1, [sp, #16]
	stur	q0, [x19, #8]
	stur	q1, [x19, #24]
	ldr	x8, [sp, #48]
	str	x8, [x19, #40]
	stp	q0, q1, [x21]
	str	x8, [x21, #32]
	ldr	w21, [sp, #64]
	ldr	w8, [x20]
	str	w8, [sp, #64]
	add	x0, sp, #64
	mov	x1, x20
	bl	_MONTHCAL_IsDateEqual
	cbz	x0, LBB0_15
; %bb.13:
	str	w21, [sp, #64]
	add	x1, sp, #64
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #-1
	bl	_MONTHCAL_GetDayRect
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #-1
	bl	_MONTHCAL_GetDayRect
	ldr	w0, [x19, #4]
	ldr	w2, [x23]
	add	x1, sp, #12
	bl	_InvalidateRect
	ldr	w0, [x19, #4]
	ldr	w2, [x23]
	add	x1, sp, #8
	b	LBB0_16
LBB0_14:
	mov	x24, x23
	b	LBB0_3
LBB0_15:
	ldr	w0, [x19, #4]
	ldr	w2, [x23]
	mov	x1, #0
LBB0_16:
	bl	_InvalidateRect
Lloh11:
	adrp	x24, _TRUE@GOTPAGE
Lloh12:
	ldr	x24, [x24, _TRUE@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_MCS_MULTISELECT,4,2            ; @MCS_MULTISELECT
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_MONTHCAL_SetCurSel
.subsections_via_symbols
