	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MONTHCAL_PaintLeadTrailMonths
_MONTHCAL_PaintLeadTrailMonths:         ## @MONTHCAL_PaintLeadTrailMonths
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MCS_NOTRAILINGDATES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	jne	LBB0_7
## %bb.1:
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	_MCSC_TRAILINGTEXT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	%r15d, %edi
	callq	_SetTextColor
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_MONTHCAL_GetMinDate
	movl	-64(%rbp), %r13d
	movq	16(%rbx), %rax
	movq	8(%rax), %rdi
	decq	%rdi
	movl	4(%rax), %esi
	callq	_MONTHCAL_MonthLength
	cmpl	%eax, -64(%rbp)
	jg	LBB0_4
## %bb.2:
	movl	%eax, %r12d
	decb	%r13b
	movl	$1, %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	movslq	%eax, %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	andq	%r13, %rcx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %r8
	callq	_MONTHCAL_DrawDay
	addq	%r13, %r13
	movl	-64(%rbp), %eax
	leal	1(%rax), %ecx
	movl	%ecx, -64(%rbp)
	cmpl	%r12d, %eax
	jl	LBB0_3
LBB0_4:
	movq	16(%rbx), %r12
	movq	%rbx, %rdi
	callq	_MONTHCAL_GetCalCount
	cltq
	shlq	$4, %rax
	movups	-16(%rax,%r12), %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	$1, -64(%rbp)
	leaq	-64(%rbp), %rdi
	callq	_MONTHCAL_GetNextMonth
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_MONTHCAL_GetMaxDate
	movq	_GMR_DAYSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_MONTHCAL_GetMonthRange
	movl	-64(%rbp), %ecx
	cmpl	-80(%rbp), %ecx
	jg	LBB0_7
## %bb.5:
	decl	%eax
	movslq	%eax, %r13
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	(%rax,%r13,8), %rcx
	andq	%r12, %rcx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %r8
	callq	_MONTHCAL_DrawDay
	addq	%r12, %r12
	movl	-64(%rbp), %eax
	leal	1(%rax), %ecx
	movl	%ecx, -64(%rbp)
	cmpl	-80(%rbp), %eax
	jl	LBB0_6
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MCS_NOTRAILINGDATES,4,2        ## @MCS_NOTRAILINGDATES
	.comm	_MCSC_TRAILINGTEXT,8,3          ## @MCSC_TRAILINGTEXT
	.comm	_GMR_DAYSTATE,4,2               ## @GMR_DAYSTATE
	.no_dead_strip	_MONTHCAL_PaintLeadTrailMonths
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MONTHCAL_PaintLeadTrailMonths
_MONTHCAL_PaintLeadTrailMonths:         ; @MONTHCAL_PaintLeadTrailMonths
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MCS_NOTRAILINGDATES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MCS_NOTRAILINGDATES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #24]
Lloh3:
	adrp	x9, _MCSC_TRAILINGTEXT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MCSC_TRAILINGTEXT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_SetTextColor
	mov	x1, sp
	mov	x0, x21
	bl	_MONTHCAL_GetMinDate
	ldr	w23, [sp]
	ldr	x8, [x21, #16]
	ldr	x9, [x8, #8]
	sub	x0, x9, #1
	ldr	w1, [x8, #4]
	bl	_MONTHCAL_MonthLength
	ldr	w8, [sp]
	cmp	w8, w0
	b.gt	LBB0_4
; %bb.2:
	mov	x22, x0
	sub	w8, w23, #1
	mov	w9, #1
	lsl	w8, w9, w8
	sxtw	x23, w8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	and	x3, x8, x23
	mov	x2, sp
	mov	x0, x21
	mov	x1, x20
	mov	x4, x19
	bl	_MONTHCAL_DrawDay
	lsl	x23, x23, #1
	ldr	w8, [sp]
	add	w9, w8, #1
	str	w9, [sp]
	cmp	w8, w22
	b.lt	LBB0_3
LBB0_4:
	ldr	x22, [x21, #16]
	mov	x0, x21
	bl	_MONTHCAL_GetCalCount
	add	x8, x22, w0, sxtw #4
	ldur	q0, [x8, #-16]
	str	q0, [sp]
	mov	w8, #1
	str	w8, [sp]
	mov	x0, sp
	bl	_MONTHCAL_GetNextMonth
	add	x1, sp, #16
	mov	x0, x21
	bl	_MONTHCAL_GetMaxDate
Lloh6:
	adrp	x8, _GMR_DAYSTATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GMR_DAYSTATE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_MONTHCAL_GetMonthRange
	ldr	w8, [sp]
	ldr	w9, [sp, #16]
	cmp	w8, w9
	b.gt	LBB0_7
; %bb.5:
	sub	w8, w0, #1
	sxtw	x22, w8
	mov	w23, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	x8, [x8, x22, lsl #3]
	and	x3, x8, x23
	mov	x2, sp
	mov	x0, x21
	mov	x1, x20
	mov	x4, x19
	bl	_MONTHCAL_DrawDay
	lsl	x23, x23, #1
	ldr	w8, [sp]
	add	w9, w8, #1
	str	w9, [sp]
	ldr	w9, [sp, #16]
	cmp	w8, w9
	b.lt	LBB0_6
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MCS_NOTRAILINGDATES,4,2        ; @MCS_NOTRAILINGDATES
	.comm	_MCSC_TRAILINGTEXT,8,3          ; @MCSC_TRAILINGTEXT
	.comm	_GMR_DAYSTATE,4,2               ; @GMR_DAYSTATE
	.no_dead_strip	_MONTHCAL_PaintLeadTrailMonths
.subsections_via_symbols
