	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MONTHCAL_GetDayFromPos
_MONTHCAL_GetDayFromPos:                ## @MONTHCAL_GetDayFromPos
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	24(%rdi), %edi
	leaq	-48(%rbp), %rsi
	callq	_GetClientRect
	movq	-48(%rbp), %rax
	cmpq	%rbx, %rax
	cmovlq	%rax, %rbx
	movq	16(%r12), %rcx
	leaq	(%r14,%r14,2), %rsi
	movslq	(%rcx,%rsi,4), %rax
	subq	%rax, %rbx
	movslq	(%r12), %rdi
	movq	%rbx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rax
	cqto
	idivq	%rdi
	movq	%rax, %r14
	jmp	LBB0_3
LBB0_1:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %r14d
LBB0_3:
	subl	4(%rcx,%rsi,4), %r15d
	movl	%r15d, %eax
	cltd
	idivl	4(%r12)
	movl	%eax, %r15d
	movl	$1, -40(%rbp)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdi
	callq	_MONTHCAL_CalculateDayOfWeek
                                        ## kill: def $eax killed $eax def $rax
	subl	8(%r12), %eax
	movl	%eax, %ecx
	addl	$6, %ecx
	movslq	%ecx, %rcx
	imulq	$-1840700269, %rcx, %rdx        ## imm = 0x92492493
	shrq	$32, %rdx
	addl	%eax, %edx
	addl	$6, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	sarl	$2, %edx
	addl	%eax, %edx
	leal	(,%rdx,8), %eax
	subl	%edx, %eax
	leal	(,%r15,8), %edx
	subl	%r15d, %edx
	addl	%r14d, %edx
	subl	%ecx, %eax
	addl	%edx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_MONTHCAL_GetDayFromPos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MONTHCAL_GetDayFromPos
_MONTHCAL_GetDayFromPos:                ; @MONTHCAL_GetDayFromPos
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x0, #24]
	mov	x1, sp
	bl	_GetClientRect
	ldr	x8, [sp]
	cmp	x21, x8
	csel	x8, x21, x8, lt
	ldr	x9, [x22, #16]
	mov	w10, #12
	madd	x9, x19, x10, x9
	ldp	w10, w9, [x9]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	sub	x8, x8, x10
	sub	w9, w20, w9
	ldp	w10, w11, [x22]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	sdiv	w19, w9, w11
	mov	w9, #1
	str	w9, [sp, #8]
Lloh0:
	adrp	x9, _FALSE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	sdiv	x20, x8, x10
	add	x0, sp, #8
	bl	_MONTHCAL_CalculateDayOfWeek
	ldr	w8, [x22, #8]
	sub	w8, w0, w8
	add	w8, w8, #6
	mov	w9, #9363
	movk	w9, #37449, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w9, w9, w8
	asr	w10, w9, #2
	add	w9, w10, w9, lsr #31
	lsl	w10, w9, #3
	lsl	w11, w19, #3
	sub	w11, w11, w19
	add	w11, w11, w20
	sub	w9, w10, w9
	sub	w8, w9, w8
	add	w0, w11, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_MONTHCAL_GetDayFromPos
.subsections_via_symbols
