	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MONTHCAL_SetRange
_MONTHCAL_SetRange:                     ## @MONTHCAL_SetRange
	.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	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movq	_GDTR_MIN@GOTPCREL(%rip), %r13
	testl	%r14d, (%r13)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_MONTHCAL_ValidateDate
	testl	%eax, %eax
	je	LBB0_8
LBB0_2:
	movq	_GDTR_MAX@GOTPCREL(%rip), %r12
	testl	%r14d, (%r12)
	je	LBB0_4
## %bb.3:
	leaq	8(%rbx), %rdi
	callq	_MONTHCAL_ValidateDate
	testl	%eax, %eax
	je	LBB0_8
LBB0_4:
	movl	$0, (%r15)
	movq	_st_null@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r15)
	movq	%rax, 8(%r15)
	testl	%r14d, (%r13)
	je	LBB0_9
## %bb.5:
	movq	%rbx, %rdi
	callq	_MONTHCAL_ValidateTime
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	leaq	24(%r15), %rdi
	movq	%rbx, %rsi
	callq	_MONTHCAL_CopyTime
LBB0_7:
	movq	(%rbx), %rax
	movq	%rax, 8(%r15)
	movl	(%r15), %eax
	orl	(%r13), %eax
	movl	%eax, (%r15)
	jmp	LBB0_10
LBB0_8:
	movq	_FALSE@GOTPCREL(%rip), %rbx
	jmp	LBB0_24
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	movl	(%r12), %ecx
	testl	%r14d, %ecx
	je	LBB0_14
## %bb.11:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_MONTHCAL_ValidateTime
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	leaq	24(%r15), %rdi
	movq	%rbx, %rsi
	callq	_MONTHCAL_CopyTime
LBB0_13:
	movq	(%rbx), %rax
	movq	%rax, 16(%r15)
	movl	(%r15), %eax
	orl	(%r12), %eax
	movl	%eax, (%r15)
	movl	(%r12), %ecx
LBB0_14:
	orl	(%r13), %ecx
	notl	%eax
	movq	_TRUE@GOTPCREL(%rip), %rbx
	testl	%eax, %ecx
	jne	LBB0_24
## %bb.15:
	leaq	16(%r15), %rdi
	leaq	8(%r15), %r13
	leaq	-44(%rbp), %rsi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_SystemTimeToFileTime
	leaq	-68(%rbp), %r12
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_SystemTimeToFileTime
	movq	%r12, %rdi
	leaq	-44(%rbp), %rsi
	callq	_CompareFileTime
	testq	%rax, %rax
	js	LBB0_24
## %bb.16:
	movq	_GDTR_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GDTR_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	orl	%ecx, %edx
	movl	%r14d, %esi
	notl	%esi
	testl	%esi, %edx
	jne	LBB0_19
## %bb.17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movdqu	(%rax), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, (%rax)
	jmp	LBB0_24
LBB0_19:
	testl	%r14d, %ecx
	movq	_st_null@GOTPCREL(%rip), %rsi
	je	LBB0_21
## %bb.20:
	movq	(%rsi), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdx, (%rdi)
LBB0_21:
	testl	%r14d, %eax
	je	LBB0_23
## %bb.22:
	movq	(%rsi), %rdx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rdx, (%rsi)
LBB0_23:
	testl	%r14d, %ecx
	cmovel	%ecx, %eax
	notl	%eax
	andl	%eax, (%r15)
LBB0_24:
	movl	(%rbx), %eax
	addq	$40, %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	"%x %p\n"

	.comm	_GDTR_MIN,4,2                   ## @GDTR_MIN
	.comm	_GDTR_MAX,4,2                   ## @GDTR_MAX
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_st_null,8,3                    ## @st_null
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_MONTHCAL_SetRange
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MONTHCAL_SetRange
_MONTHCAL_SetRange:                     ; @MONTHCAL_SetRange
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
Lloh2:
	adrp	x24, _GDTR_MIN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GDTR_MIN@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x23
	bl	_MONTHCAL_ValidateDate
	cbz	w0, LBB0_8
LBB0_2:
Lloh4:
	adrp	x26, _GDTR_MAX@GOTPAGE
Lloh5:
	ldr	x26, [x26, _GDTR_MAX@GOTPAGEOFF]
	ldr	w8, [x26]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	add	x0, x23, #8
	bl	_MONTHCAL_ValidateDate
	cbz	w0, LBB0_8
LBB0_4:
Lloh6:
	adrp	x25, _st_null@GOTPAGE
Lloh7:
	ldr	x25, [x25, _st_null@GOTPAGEOFF]
	ldr	x8, [x25]
	mov	x22, x19
	str	x8, [x22, #16]!
	str	wzr, [x19]
	mov	x21, x19
	str	x8, [x21, #8]!
	ldr	w8, [x24]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.5:
	mov	x0, x23
	bl	_MONTHCAL_ValidateTime
	cbnz	w0, LBB0_7
; %bb.6:
	add	x0, x19, #24
	mov	x1, x23
	bl	_MONTHCAL_CopyTime
LBB0_7:
	ldr	x8, [x23]
	str	x8, [x19, #8]
	ldr	w8, [x24]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_10
LBB0_8:
Lloh8:
	adrp	x8, _FALSE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_24
LBB0_9:
	mov	w8, #0
LBB0_10:
	ldr	w9, [x26]
	tst	w9, w20
	b.eq	LBB0_14
; %bb.11:
	add	x23, x23, #8
	mov	x0, x23
	bl	_MONTHCAL_ValidateTime
	cbnz	w0, LBB0_13
; %bb.12:
	add	x0, x19, #24
	mov	x1, x23
	bl	_MONTHCAL_CopyTime
LBB0_13:
	ldr	x8, [x23]
	str	x8, [x19, #16]
	ldr	w8, [x26]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w9, [x26]
LBB0_14:
	ldr	w10, [x24]
	orr	w9, w9, w10
	bics	wzr, w9, w8
	b.ne	LBB0_23
; %bb.15:
	add	x1, sp, #8
	mov	x0, x22
	bl	_SystemTimeToFileTime
	add	x1, sp, #12
	mov	x0, x21
	bl	_SystemTimeToFileTime
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_CompareFileTime
	tbnz	x0, #63, LBB0_23
; %bb.16:
	ldr	w8, [x24]
	ldr	w9, [x26]
	orr	w10, w9, w8
	bics	wzr, w10, w20
	b.ne	LBB0_18
; %bb.17:
	ldr	x8, [x21]
	ldr	x9, [x22]
	str	x9, [x21]
	str	x8, [x22]
	b	LBB0_23
LBB0_18:
	ands	w10, w8, w20
	b.eq	LBB0_20
; %bb.19:
	ldr	x11, [x25]
	str	x11, [x22]
LBB0_20:
	tst	w9, w20
	b.eq	LBB0_22
; %bb.21:
	ldr	x11, [x25]
	str	x11, [x21]
LBB0_22:
	cmp	w10, #0
	csel	w8, w8, w9, eq
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_23:
Lloh10:
	adrp	x8, _TRUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_24:
	ldr	w0, [x8]
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%x %p\n"

	.comm	_GDTR_MIN,4,2                   ; @GDTR_MIN
	.comm	_GDTR_MAX,4,2                   ; @GDTR_MAX
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_st_null,8,3                    ; @st_null
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_MONTHCAL_SetRange
.subsections_via_symbols
