	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MONTHCAL_DrawDay
_MONTHCAL_DrawDay:                      ## @MONTHCAL_DrawDay
	.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	%r8, %rbx
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-68(%rbp), %r12
	movq	%rdx, %rsi
	movq	%r12, %rdx
	movl	$-1, %ecx
	callq	_MONTHCAL_GetDayRect
	leaq	-76(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_IntersectRect
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	leaq	28(%r13), %rsi
	movq	%r15, %rdi
	callq	_MONTHCAL_CompareDate
	movb	$1, %bl
	xorl	%r12d, %r12d
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	leaq	24(%r13), %rsi
	movq	%r15, %rdi
	callq	_MONTHCAL_CompareDate
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
	testq	%rax, %rax
	jg	LBB0_5
## %bb.4:
	movl	(%r15), %esi
	movl	24(%r13), %ecx
	movl	28(%r13), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_TRACE
	leaq	-68(%rbp), %rdi
	callq	_wine_dbgstr_rect
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movq	16(%r13), %rax
	movq	_MCSC_MONTHBK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	%r14d, %edi
	callq	_SetTextColor
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	16(%r13), %rax
	movq	_MCSC_TRAILINGTEXT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	%r14d, %edi
	callq	_SetBkColor
	movl	%eax, %r12d
	movq	8(%r13), %rax
	movq	_BrushTitle@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	movl	%r14d, %edi
	leaq	-68(%rbp), %rsi
	callq	_FillRect
	jmp	LBB0_5
LBB0_2:
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
LBB0_5:
	xorl	%eax, %eax
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	setne	%al
	movl	(%r13,%rax,4), %esi
	movl	%r14d, %edi
	callq	_SelectObject
	movq	_TRANSPARENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_SetBkMode
	movl	%ebx, %r13d
	movl	%eax, %ebx
	movl	(%r15), %edx
	leaq	_MONTHCAL_DrawDay.fmtW(%rip), %rsi
	leaq	-58(%rbp), %r15
	movq	%r15, %rdi
	callq	_wsprintfW
	movq	_DT_CENTER@GOTPCREL(%rip), %rax
	movq	_DT_VCENTER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	movq	_DT_SINGLELINE@GOTPCREL(%rip), %rax
	orl	(%rax), %r8d
	leaq	-68(%rbp), %rcx
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	$-1, %edx
	callq	_DrawTextW
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_SetBkMode
	testb	%r13b, %r13b
	jne	LBB0_7
## %bb.6:
	movl	%r14d, %edi
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	callq	_SetTextColor
	movl	%r14d, %edi
	movl	%r12d, %esi
	callq	_SetBkColor
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_MONTHCAL_DrawDay.fmtW:                 ## @MONTHCAL_DrawDay.fmtW
	.asciz	"%d"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d %d %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s\n"

	.comm	_MCSC_MONTHBK,8,3               ## @MCSC_MONTHBK
	.comm	_MCSC_TRAILINGTEXT,8,3          ## @MCSC_TRAILINGTEXT
	.comm	_BrushTitle,8,3                 ## @BrushTitle
	.comm	_TRANSPARENT,4,2                ## @TRANSPARENT
	.comm	_DT_CENTER,4,2                  ## @DT_CENTER
	.comm	_DT_VCENTER,4,2                 ## @DT_VCENTER
	.comm	_DT_SINGLELINE,4,2              ## @DT_SINGLELINE
	.no_dead_strip	_MONTHCAL_DrawDay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MONTHCAL_DrawDay
_MONTHCAL_DrawDay:                      ; @MONTHCAL_DrawDay
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x23, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	add	x2, sp, #24
	mov	x1, x20
	mov	w3, #-1
	bl	_MONTHCAL_GetDayRect
	add	x0, sp, #20
	add	x2, sp, #24
	mov	x1, x23
	bl	_IntersectRect
	cbz	w0, LBB0_7
; %bb.1:
	add	x1, x22, #28
	mov	x0, x20
	bl	_MONTHCAL_CompareDate
	tbnz	x0, #63, LBB0_3
; %bb.2:
	add	x1, x22, #24
	mov	x0, x20
	bl	_MONTHCAL_CompareDate
	cmp	x0, #0
	b.le	LBB0_4
LBB0_3:
	mov	w24, #0
	mov	w23, #0
	mov	w25, #1
	b	LBB0_5
LBB0_4:
	ldr	w1, [x20]
	ldp	w9, w8, [x22, #24]
	stp	x8, x9, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	add	x0, sp, #24
	bl	_wine_dbgstr_rect
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	x8, [x22, #16]
Lloh7:
	adrp	x9, _MCSC_MONTHBK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MCSC_MONTHBK@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_SetTextColor
	mov	x23, x0
	ldr	x8, [x22, #16]
Lloh10:
	adrp	x9, _MCSC_TRAILINGTEXT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MCSC_TRAILINGTEXT@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_SetBkColor
	mov	x24, x0
	ldr	x8, [x22, #8]
Lloh13:
	adrp	x9, _BrushTitle@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BrushTitle@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	ldr	w2, [x8, x9, lsl #2]
	add	x1, sp, #24
	mov	x0, x19
	bl	_FillRect
	mov	w25, #0
LBB0_5:
	cmp	w21, #0
	cset	w8, ne
	ldr	w1, [x22, w8, uxtw #2]
	mov	x0, x19
	bl	_SelectObject
Lloh16:
	adrp	x8, _TRANSPARENT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TRANSPARENT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_SetBkMode
	mov	x21, x0
	ldr	w2, [x20]
Lloh19:
	adrp	x1, _MONTHCAL_DrawDay.fmtW@PAGE
Lloh20:
	add	x1, x1, _MONTHCAL_DrawDay.fmtW@PAGEOFF
	add	x0, sp, #30
	bl	_wsprintfW
Lloh21:
	adrp	x8, _DT_CENTER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DT_CENTER@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _DT_VCENTER@GOTPAGE
Lloh25:
	ldr	x9, [x9, _DT_VCENTER@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh27:
	adrp	x9, _DT_SINGLELINE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _DT_SINGLELINE@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w4, w8, w9
	add	x1, sp, #30
	add	x3, sp, #24
	mov	x0, x19
	mov	w2, #-1
	bl	_DrawTextW
	mov	x0, x19
	mov	x1, x21
	bl	_SetBkMode
	tbnz	w25, #0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x23
	bl	_SetTextColor
	mov	x0, x19
	mov	x1, x24
	bl	_SetBkColor
LBB0_7:
	ldr	x8, [sp, #40]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_MONTHCAL_DrawDay.fmtW:                 ; @MONTHCAL_DrawDay.fmtW
	.asciz	"%d"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d %d %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s\n"

	.comm	_MCSC_MONTHBK,8,3               ; @MCSC_MONTHBK
	.comm	_MCSC_TRAILINGTEXT,8,3          ; @MCSC_TRAILINGTEXT
	.comm	_BrushTitle,8,3                 ; @BrushTitle
	.comm	_TRANSPARENT,4,2                ; @TRANSPARENT
	.comm	_DT_CENTER,4,2                  ; @DT_CENTER
	.comm	_DT_VCENTER,4,2                 ; @DT_VCENTER
	.comm	_DT_SINGLELINE,4,2              ; @DT_SINGLELINE
	.no_dead_strip	_MONTHCAL_DrawDay
.subsections_via_symbols
