	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ValidateDate                   ## -- Begin function ValidateDate
	.p2align	4, 0x90
_ValidateDate:                          ## @ValidateDate
	.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
	movq	%r8, %r12
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movl	%edi, %r14d
	movq	_YEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DTK_M
	testl	%ebx, %ebx
	jne	LBB0_12
## %bb.1:
	andl	%r14d, %eax
	je	LBB0_12
## %bb.2:
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.3:
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_22
## %bb.4:
	movl	$1, %ecx
	subl	%eax, %ecx
	movl	%ecx, (%r12)
LBB0_12:
	movq	_DOY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DTK_M
	testl	%r14d, %eax
	je	LBB0_14
## %bb.13:
	movl	(%r12), %edi
	movl	$1, %esi
	movl	$1, %edx
	callq	_date2j
	movq	16(%r12), %rcx
	leaq	(%rax,%rcx), %rdi
	decq	%rdi
	leaq	4(%r12), %rdx
	leaq	8(%r12), %rcx
	movq	%r12, %rsi
	callq	_j2date
LBB0_14:
	movq	_MONTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DTK_M
	testl	%r14d, %eax
	je	LBB0_18
## %bb.15:
	movl	4(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.16:
	movq	_MONTHS_PER_YEAR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_17
LBB0_18:
	movq	_DAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DTK_M
	testl	%r14d, %eax
	je	LBB0_20
## %bb.19:
	movl	8(%r12), %eax
	addl	$-32, %eax
	cmpl	$-32, %eax
	ja	LBB0_20
LBB0_17:
	movq	_DTERR_MD_FIELD_OVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_20:
	movq	_DTK_DATE_M@GOTPCREL(%rip), %rcx
	notl	%r14d
	xorl	%eax, %eax
	testl	%r14d, (%rcx)
	jne	LBB0_24
## %bb.21:
	movl	(%r12), %edi
	movl	8(%r12), %r14d
	movq	_day_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	callq	_isleap
	movq	(%rbx,%rax,8), %rcx
	movslq	4(%r12), %rdx
	xorl	%eax, %eax
	cmpl	-4(%rcx,%rdx,4), %r14d
	jg	LBB0_22
	jmp	LBB0_24
LBB0_5:
	movl	(%r12), %eax
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.6:
	testl	%eax, %eax
	js	LBB0_22
## %bb.7:
	cmpl	$69, %eax
	ja	LBB0_9
## %bb.8:
	addl	$2000, %eax                     ## imm = 0x7D0
	movl	%eax, (%r12)
	jmp	LBB0_12
LBB0_11:
	testl	%eax, %eax
	jg	LBB0_12
LBB0_22:
	movq	_DTERR_FIELD_OVERFLOW@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpl	$99, %eax
	ja	LBB0_12
## %bb.10:
	addl	$1900, %eax                     ## imm = 0x76C
	movl	%eax, (%r12)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_YEAR,4,2                       ## @YEAR
	.comm	_DTERR_FIELD_OVERFLOW,4,2       ## @DTERR_FIELD_OVERFLOW
	.comm	_DOY,4,2                        ## @DOY
	.comm	_MONTH,4,2                      ## @MONTH
	.comm	_MONTHS_PER_YEAR,4,2            ## @MONTHS_PER_YEAR
	.comm	_DTERR_MD_FIELD_OVERFLOW,4,2    ## @DTERR_MD_FIELD_OVERFLOW
	.comm	_DAY,4,2                        ## @DAY
	.comm	_DTK_DATE_M,4,2                 ## @DTK_DATE_M
	.comm	_day_tab,8,3                    ## @day_tab
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ValidateDate                   ; -- Begin function ValidateDate
	.p2align	2
_ValidateDate:                          ; @ValidateDate
	.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	x19, x4
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _YEAR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _YEAR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DTK_M
	cbnz	w23, LBB0_6
; %bb.1:
	and	w8, w0, w20
	cbz	w8, LBB0_6
; %bb.2:
	cbz	w22, LBB0_17
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #0
	b.le	LBB0_22
; %bb.4:
	mov	w9, #1
	sub	w8, w9, w8
LBB0_5:
	str	w8, [x19]
LBB0_6:
Lloh3:
	adrp	x8, _DOY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DOY@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_DTK_M
	tst	w0, w20
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x19]
	mov	w1, #1
	mov	w2, #1
	bl	_date2j
	ldr	x8, [x19, #16]
	add	x8, x0, x8
	sub	x0, x8, #1
	add	x2, x19, #4
	add	x3, x19, #8
	mov	x1, x19
	bl	_j2date
LBB0_8:
Lloh6:
	adrp	x8, _MONTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MONTH@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_DTK_M
	tst	w0, w20
	b.eq	LBB0_11
; %bb.9:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.10:
Lloh9:
	adrp	x9, _MONTHS_PER_YEAR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MONTHS_PER_YEAR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_13
LBB0_11:
Lloh12:
	adrp	x8, _DAY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DAY@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_DTK_M
	tst	w0, w20
	b.eq	LBB0_14
; %bb.12:
	ldr	w8, [x19, #8]
	sub	w8, w8, #32
	cmn	w8, #32
	b.hi	LBB0_14
LBB0_13:
Lloh15:
	adrp	x8, _DTERR_MD_FIELD_OVERFLOW@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DTERR_MD_FIELD_OVERFLOW@GOTPAGEOFF]
	b	LBB0_23
LBB0_14:
Lloh17:
	adrp	x8, _DTK_DATE_M@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DTK_DATE_M@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	bics	wzr, w8, w20
	b.ne	LBB0_16
; %bb.15:
	ldr	w20, [x19, #8]
Lloh20:
	adrp	x8, _day_tab@GOTPAGE
Lloh21:
	ldr	x8, [x8, _day_tab@GOTPAGEOFF]
Lloh22:
	ldr	x21, [x8]
	ldr	w0, [x19]
	bl	_isleap
	ldr	x8, [x21, x0, lsl #3]
	ldrsw	x9, [x19, #4]
	add	x8, x8, x9, lsl #2
	ldur	w8, [x8, #-4]
Lloh23:
	adrp	x9, _DTERR_FIELD_OVERFLOW@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DTERR_FIELD_OVERFLOW@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w20, w8
	csel	w0, w9, wzr, gt
	b	LBB0_24
LBB0_16:
	mov	w0, #0
	b	LBB0_24
LBB0_17:
	ldr	w8, [x19]
	cbz	w21, LBB0_21
; %bb.18:
	tbnz	w8, #31, LBB0_22
; %bb.19:
	cmp	w8, #69
	b.hi	LBB0_25
; %bb.20:
	add	w8, w8, #2000
	b	LBB0_5
LBB0_21:
	cmp	w8, #0
	b.gt	LBB0_6
LBB0_22:
Lloh26:
	adrp	x8, _DTERR_FIELD_OVERFLOW@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DTERR_FIELD_OVERFLOW@GOTPAGEOFF]
LBB0_23:
	ldr	w0, [x8]
LBB0_24:
	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
LBB0_25:
	cmp	w8, #99
	b.hi	LBB0_6
; %bb.26:
	add	w8, w8, #1900
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_YEAR,4,2                       ; @YEAR
	.comm	_DTERR_FIELD_OVERFLOW,4,2       ; @DTERR_FIELD_OVERFLOW
	.comm	_DOY,4,2                        ; @DOY
	.comm	_MONTH,4,2                      ; @MONTH
	.comm	_MONTHS_PER_YEAR,4,2            ; @MONTHS_PER_YEAR
	.comm	_DTERR_MD_FIELD_OVERFLOW,4,2    ; @DTERR_MD_FIELD_OVERFLOW
	.comm	_DAY,4,2                        ; @DAY
	.comm	_DTK_DATE_M,4,2                 ; @DTK_DATE_M
	.comm	_day_tab,8,3                    ; @day_tab
.subsections_via_symbols
