	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MONTHCAL_SetColor
_MONTHCAL_SetColor:                     ## @MONTHCAL_SetColor
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_TRACE
	movq	_MCSC_TRAILINGTEXT@GOTPCREL(%rip), %rax
	movl	$-1, %r14d
	cmpq	%rbx, (%rax)
	jb	LBB0_8
## %bb.1:
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %r14d
	movl	%r12d, (%rax,%rbx,4)
	leaq	-128(%rbx), %rdx
	movq	_BrushLast@GOTPCREL(%rip), %rax
	movq	%rax, %rcx
	cmpq	$2, %rdx
	ja	LBB0_3
## %bb.2:
	leaq	l_switch.table.MONTHCAL_SetColor(%rip), %rcx
	movq	-1024(%rcx,%rbx,8), %rcx
LBB0_3:
	movl	(%rcx), %r13d
	cmpl	(%rax), %r13d
	je	LBB0_5
## %bb.4:
	movq	24(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_DeleteObject
	movl	%r12d, %edi
	callq	_CreateSolidBrush
	movq	24(%r15), %rcx
	movl	%eax, (%rcx,%r13,4)
LBB0_5:
	movq	_MCSC_TEXT@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	16(%r15), %rax
	movq	_PenText@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_DeleteObject
	movq	_PS_SOLID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	movl	$1, %esi
	callq	_CreatePen
	movq	16(%r15), %rcx
	movq	(%r12), %rdx
	movl	%eax, (%rcx,%rdx,4)
LBB0_7:
	movl	8(%r15), %edi
	xorl	%edx, %edx
	cmpq	$130, %rbx
	sete	%dl
	xorl	%esi, %esi
	callq	_InvalidateRect
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p, %d: color %08x\n"

	.comm	_MCSC_TRAILINGTEXT,8,3          ## @MCSC_TRAILINGTEXT
	.comm	_BrushBackground,4,2            ## @BrushBackground
	.comm	_BrushTitle,4,2                 ## @BrushTitle
	.comm	_BrushMonth,4,2                 ## @BrushMonth
	.comm	_BrushLast,4,2                  ## @BrushLast
	.comm	_MCSC_TEXT,8,3                  ## @MCSC_TEXT
	.comm	_PenText,8,3                    ## @PenText
	.comm	_PS_SOLID,4,2                   ## @PS_SOLID
	.no_dead_strip	_MONTHCAL_SetColor
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.MONTHCAL_SetColor
l_switch.table.MONTHCAL_SetColor:
	.quad	_BrushTitle
	.quad	_BrushMonth
	.quad	_BrushBackground

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MONTHCAL_SetColor
_MONTHCAL_SetColor:                     ; @MONTHCAL_SetColor
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	mov	x3, x22
	bl	_TRACE
Lloh2:
	adrp	x8, _MCSC_TRAILINGTEXT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MCSC_TRAILINGTEXT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x19
	b.hs	LBB0_2
; %bb.1:
	mov	w20, #-1
	b	LBB0_9
LBB0_2:
	ldr	x8, [x21]
	lsl	x9, x19, #2
	ldr	w20, [x8, x9]
	str	w22, [x8, x9]
	sub	x9, x19, #128
Lloh5:
	adrp	x8, _BrushLast@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BrushLast@GOTPAGEOFF]
	mov	x10, x8
	cmp	x9, #2
	b.hi	LBB0_4
; %bb.3:
Lloh7:
	adrp	x10, l_switch.table.MONTHCAL_SetColor@PAGE
Lloh8:
	add	x10, x10, l_switch.table.MONTHCAL_SetColor@PAGEOFF
	ldr	x10, [x10, x9, lsl #3]
LBB0_4:
	ldr	w9, [x10]
	ldr	w8, [x8]
	cmp	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x21, #24]
	lsl	x23, x9, #2
	ldr	w0, [x8, x23]
	bl	_DeleteObject
	mov	x0, x22
	bl	_CreateSolidBrush
	ldr	x8, [x21, #24]
	str	w0, [x8, x23]
LBB0_6:
Lloh9:
	adrp	x8, _MCSC_TEXT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MCSC_TEXT@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x21, #16]
Lloh12:
	adrp	x22, _PenText@GOTPAGE
Lloh13:
	ldr	x22, [x22, _PenText@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	w0, [x8, x9, lsl #2]
	bl	_DeleteObject
Lloh14:
	adrp	x8, _PS_SOLID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PS_SOLID@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x8, [x21]
	ldr	w2, [x8, x19, lsl #2]
	mov	w1, #1
	bl	_CreatePen
	ldr	x8, [x21, #16]
	ldr	x9, [x22]
	str	w0, [x8, x9, lsl #2]
LBB0_8:
	ldr	w0, [x21, #8]
	cmp	x19, #130
	cset	w2, eq
	mov	x1, #0
	bl	_InvalidateRect
LBB0_9:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p, %d: color %08x\n"

	.comm	_MCSC_TRAILINGTEXT,8,3          ; @MCSC_TRAILINGTEXT
	.comm	_BrushBackground,4,2            ; @BrushBackground
	.comm	_BrushTitle,4,2                 ; @BrushTitle
	.comm	_BrushMonth,4,2                 ; @BrushMonth
	.comm	_BrushLast,4,2                  ; @BrushLast
	.comm	_MCSC_TEXT,8,3                  ; @MCSC_TEXT
	.comm	_PenText,8,3                    ; @PenText
	.comm	_PS_SOLID,4,2                   ; @PS_SOLID
	.no_dead_strip	_MONTHCAL_SetColor
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.MONTHCAL_SetColor
l_switch.table.MONTHCAL_SetColor:
	.quad	_BrushTitle
	.quad	_BrushMonth
	.quad	_BrushBackground

.subsections_via_symbols
