// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: isDate
static int isDate(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv,
  DateTime *p
){
  int i, n;
  const unsigned char *z;
  int eType;
  memset(p, 0, sizeof(*p));
  if( argc==0 ){
    return setDateTimeToCurrent(context, p);
  }
  if( (eType = sqlite3_value_type(argv[0]))==SQLITE_FLOAT
                   || eType==SQLITE_INTEGER ){
    setRawDateNumber(p, sqlite3_value_double(argv[0]));
  }else{
    z = sqlite3_value_text(argv[0]);
    if( !z || parseDateOrTime(context, (char*)z, p) ){
      return 1;
    }
  }
  for(i=1; i<argc; i++){
    z = sqlite3_value_text(argv[i]);
    n = sqlite3_value_bytes(argv[i]);
    if( z==0 || parseModifier(context, (char*)z, n, p) ) return 1;
  }
  computeJD(p);
  if( p->isError || !validJulianDay(p->iJD) ) return 1;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %rbp
movq %rdi, %r15
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rcx)
movupd %xmm0, 0x10(%rcx)
movupd %xmm0, (%rcx)
testl %esi, %esi
je 0x2eeaa4
movq %rdx, %r14
movl %esi, %r12d
movq (%rdx), %rdi
movzwl 0x8(%rdi), %eax
andl $0x3f, %eax
leaq 0xe29a1(%rip), %rcx     # 0x3d13e0
movzbl (%rax,%rcx), %eax
decl %eax
cmpl $0x1, %eax
movq %rdx, 0x28(%rsp)
movq %r15, 0x10(%rsp)
ja 0x2eeac0
callq 0x278267
movsd %xmm0, 0x20(%rbp)
movb $0x1, 0x29(%rbp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2eec34
movsd 0xe6d90(%rip), %xmm1    # 0x3d5808
ucomisd %xmm0, %xmm1
jbe 0x2eec34
mulsd 0xe6d3e(%rip), %xmm0    # 0x3d57c8
addsd 0x673b6(%rip), %xmm0    # 0x355e48
cvttsd2si %xmm0, %rax
movq %rax, (%rbp)
movb $0x1, 0x28(%rbp)
jmp 0x2eec34
movq %r15, %rdi
movq %rbp, %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2ef626
movl $0x1, %esi
callq 0x278305
testq %rax, %rax
je 0x2ef48c
movq %rax, %r13
movb (%rax), %bl
xorl %r14d, %r14d
cmpb $0x2d, %bl
sete %r14b
leaq (%rax,%r14), %rdi
leaq 0xeb69f(%rip), %rsi     # 0x3da18c
leaq 0x18(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x34(%rsp), %r8
xorl %eax, %eax
callq 0x2ef8da
cmpl $0x3, %eax
jne 0x2eeb4f
leaq (%r14,%r13), %r15
addq $0x9, %r15
leaq 0xe2929(%rip), %rax     # 0x3d1440
movzbl 0x1(%r15), %ecx
incq %r15
cmpq $0x54, %rcx
je 0x2eeb17
movb (%rcx,%rax), %cl
andb $0x1, %cl
jne 0x2eeb17
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2ef67e
testl %eax, %eax
je 0x2eebfa
cmpb $0x0, (%r15)
movq 0x10(%rsp), %r15
je 0x2eebf6
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2ef67e
testl %eax, %eax
movq 0x28(%rsp), %r14
je 0x2eec34
xorl %eax, %eax
leaq 0xeb618(%rip), %rcx     # 0x3da188
leaq 0xe2769(%rip), %rdx     # 0x3d12e0
movzbl (%r13,%rax), %esi
movzbl (%rax,%rcx), %edi
cmpb %dil, %sil
jne 0x2eeb8d
testq %rsi, %rsi
jne 0x2eeb97
jmp 0x2eeb9c
movb (%rsi,%rdx), %sil
cmpb (%rdi,%rdx), %sil
jne 0x2eebc2
incq %rax
jmp 0x2eeb77
movq %r15, %rdi
callq 0x2ef83f
testl %eax, %eax
je 0x2eebc2
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2ef626
testl %eax, %eax
movl $0x1, %eax
jne 0x2ef4b9
jmp 0x2eec34
movq %r13, %rdi
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
movl %eax, %edx
movl $0x1, %ecx
callq 0x292288
testl %eax, %eax
jle 0x2ef48c
movsd 0x50(%rsp), %xmm0
jmp 0x2eea59
movb $0x0, 0x2b(%rbp)
movb $0x0, 0x28(%rbp)
movb $0x1, 0x2a(%rbp)
movl 0x18(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmpb $0x2d, %bl
cmovnel %eax, %ecx
movl %ecx, 0x8(%rbp)
movl 0xc(%rsp), %eax
movl %eax, 0xc(%rbp)
movl 0x34(%rsp), %eax
movl %eax, 0x10(%rbp)
cmpb $0x0, 0x2c(%rbp)
je 0x2eec2f
movq %rbp, %rdi
callq 0x2ef4cb
movq 0x28(%rsp), %r14
cmpl $0x2, %r12d
jl 0x2ef493
movl %r12d, %eax
movq %rax, 0x40(%rsp)
movl $0x1, %r13d
leaq 0xe268d(%rip), %r15     # 0x3d12e0
movq (%r14,%r13,8), %rdi
movl $0x1, %esi
callq 0x278305
movq %rax, %r12
movq (%r14,%r13,8), %rdi
movl $0x1, %esi
callq 0x278229
testq %r12, %r12
je 0x2ef48c
movl $0x1, 0xc(%rsp)
movb (%r12), %al
movzbl %al, %ebx
movzbl (%rbx,%r15), %ecx
cmpl $0x6b, %ecx
movq %r13, 0x48(%rsp)
jg 0x2eeef1
leal -0x30(%rcx), %eax
cmpl $0xa, %eax
jae 0x2eef54
movq %rbp, %r14
movl $0x1, %edx
movq %r12, %r13
leaq 0xe2785(%rip), %rax     # 0x3d1440
movzbl (%r12,%rdx), %ebp
testl %ebp, %ebp
je 0x2eecd8
cmpl $0x3a, %ebp
je 0x2eecd8
testb $0x1, (%rbp,%rax)
jne 0x2eecd8
incq %rdx
incq %r13
jmp 0x2eecbb
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
movl $0x1, %ecx
callq 0x292288
testl %eax, %eax
jle 0x2ef48c
cmpl $0x3a, %ebp
leaq 0xe2744(%rip), %rcx     # 0x3d1440
jne 0x2eedad
addq $-0x3a, %rbx
cmpq $-0xa, %rbx
movq %r12, %rdi
adcq $0x0, %rdi
xorpd %xmm0, %xmm0
movapd %xmm0, 0x70(%rsp)
movapd %xmm0, 0x60(%rsp)
movapd %xmm0, 0x50(%rsp)
leaq 0x50(%rsp), %rsi
callq 0x2ef67e
testl %eax, %eax
movq %r14, %rbp
jne 0x2eeda3
leaq 0x50(%rsp), %rdi
callq 0x2ef4cb
movq 0x50(%rsp), %rcx
addq $-0x2932e00, %rcx       # imm = 0xFD6CD200
movq %rcx, %rax
movabsq $0x636ba875fd33dc87, %rdx # imm = 0x636BA875FD33DC87
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x19, %rdx
addq %rax, %rdx
imulq $0x5265c00, %rdx, %rax  # imm = 0x5265C00
subq %rax, %rcx
movq %rcx, %rbx
negq %rbx
cmpb $0x2d, (%r12)
cmovneq %rcx, %rbx
movq %rbp, %rdi
callq 0x2ef4cb
movw $0x0, 0x2a(%rbp)
movb $0x0, 0x2c(%rbp)
addq %rbx, (%rbp)
movl $0x0, 0xc(%rsp)
movq 0x28(%rsp), %r14
jmp 0x2eeece
movzbl 0x1(%r13), %eax
incq %r13
testb $0x1, (%rax,%rcx)
jne 0x2eedad
movq %r13, %rdi
callq 0x172f0
movq %rax, %r12
andl $0x3fffffff, %r12d      # imm = 0x3FFFFFFF
leal -0xb(%r12), %eax
cmpl $-0x8, %eax
movq %r14, %rbp
movq 0x28(%rsp), %r14
jb 0x2eeece
leal -0x1(%r12), %eax
movb (%r13,%rax), %cl
andb $-0x21, %cl
cmpb $0x53, %cl
cmovel %eax, %r12d
movq %rbp, %rdi
callq 0x2ef4cb
leaq 0x1c926a(%rip), %r10    # 0x4b8070
movsd 0x18(%rsp), %xmm2
xorl %eax, %eax
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm0
seta %al
movl $0x1, 0xc(%rsp)
leaq 0xe6938(%rip), %rcx     # 0x3d5760
movsd (%rcx,%rax,8), %xmm3
leal 0x1(%r12), %eax
xorl %ecx, %ecx
movq %rcx, %rbx
shlq $0x5, %rbx
movzbl 0x1(%rbx,%r10), %edx
cmpl %edx, %r12d
jne 0x2eeeb7
addq %r10, %rbx
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x2eeeb7
xorl %esi, %esi
movl %eax, %edi
movzbl (%rdx,%rsi), %r8d
testq %r8, %r8
je 0x2eee80
movzbl (%r8,%r15), %r8d
movzbl (%r13,%rsi), %r9d
movb (%r9,%r15), %r9b
cmpb %r9b, %r8b
jne 0x2eee8d
decl %edi
incq %rsi
cmpl $0x1, %edi
ja 0x2eee56
jmp 0x2eee96
movzbl (%r13,%rsi), %edx
movb (%rdx,%r15), %r9b
xorl %r8d, %r8d
movzbl %r9b, %edx
cmpl %edx, %r8d
jne 0x2eeeb7
movsd 0x10(%rbx), %xmm0
movapd %xmm0, %xmm1
xorpd 0x60ba9(%rip), %xmm1    # 0x34fa50
ucomisd %xmm1, %xmm2
jbe 0x2eeeb7
ucomisd %xmm2, %xmm0
ja 0x2ef036
incq %rcx
cmpq $0x6, %rcx
jne 0x2eee34
movw $0x0, 0x2a(%rbp)
movb $0x0, 0x2c(%rbp)
cmpl $0x0, 0xc(%rsp)
jne 0x2ef48c
movq 0x48(%rsp), %r13
incq %r13
cmpq 0x40(%rsp), %r13
jne 0x2eec53
jmp 0x2ef493
cmpl $0x74, %ecx
jg 0x2eef6b
cmpl $0x6c, %ecx
je 0x2eefb1
cmpl $0x73, %ecx
jne 0x2eeece
xorl %edx, %edx
testb %al, %al
je 0x2ef162
xorl %ecx, %ecx
movzbl %al, %eax
movzbl (%rax,%r15), %edx
leaq 0xeb2dd(%rip), %rax     # 0x3da1fc
movzbl (%rcx,%rax), %eax
cmpb (%rax,%r15), %dl
jne 0x2ef307
cmpq $0x8, %rcx
je 0x2ef321
movb 0x1(%r12,%rcx), %al
incq %rcx
testb %al, %al
jne 0x2eef10
leaq 0xeb2b2(%rip), %rax     # 0x3da1fc
addq %rax, %rcx
xorl %edx, %edx
jmp 0x2ef311
cmpl $0x2b, %ecx
je 0x2eeca9
cmpl $0x2d, %ecx
je 0x2eeca9
jmp 0x2eeece
cmpl $0x77, %ecx
je 0x2eefe6
cmpl $0x75, %ecx
jne 0x2eeece
xorl %ecx, %ecx
movl %eax, %edx
leaq 0xeb265(%rip), %rdi     # 0x3da1e9
movzbl (%rcx,%rdi), %esi
cmpb %sil, %dl
jne 0x2eef96
testb %dl, %dl
jne 0x2eefa7
jmp 0x2ef0c8
movzbl %dl, %edx
movb (%rdx,%r15), %dl
cmpb (%rsi,%r15), %dl
jne 0x2ef124
movb 0x1(%r12,%rcx), %dl
incq %rcx
jmp 0x2eef84
xorl %ecx, %ecx
leaq 0xeb225(%rip), %rdx     # 0x3da1df
movzbl (%rcx,%rdx), %edx
cmpb %dl, %al
jne 0x2eefcb
testb %al, %al
jne 0x2eefdc
jmp 0x2ef093
movzbl %al, %eax
movb (%rax,%r15), %al
cmpb (%rdx,%r15), %al
jne 0x2eeece
movb 0x1(%r12,%rcx), %al
incq %rcx
jmp 0x2eefb3
xorl %edx, %edx
testb %al, %al
je 0x2ef156
xorl %ecx, %ecx
movzbl %al, %eax
movzbl (%rax,%r15), %edx
leaq 0xeb1f2(%rip), %rax     # 0x3da1f3
movzbl (%rcx,%rax), %eax
cmpb (%rax,%r15), %dl
jne 0x2ef1de
cmpq $0x7, %rcx
je 0x2ef1f8
movb 0x1(%r12,%rcx), %al
incq %rcx
testb %al, %al
jne 0x2eeff2
leaq 0xeb1c7(%rip), %rax     # 0x3da1f3
addq %rax, %rcx
xorl %edx, %edx
jmp 0x2ef1e8
movzbl (%rbx), %eax
cmpl $0x2, %eax
movsd %xmm2, 0x20(%rsp)
movsd %xmm3, 0x38(%rsp)
je 0x2ef3bb
cmpl $0x1, %eax
jne 0x2ef45d
movq %rbp, %rdi
callq 0x2efbb3
movq %rbp, %rdi
callq 0x2efce6
movsd 0x20(%rsp), %xmm1
cvttsd2si %xmm1, %r12d
movl 0xc(%rbp), %eax
addl %r12d, %eax
jle 0x2ef423
leal -0x1(%rax), %ecx
movl $0xaaaaaaab, %edx       # imm = 0xAAAAAAAB
imulq %rdx, %rcx
shrq $0x23, %rcx
jmp 0x2ef439
movq 0x10(%rsp), %rdi
callq 0x2ef83f
testl %eax, %eax
je 0x2eeece
movq %rbp, %rdi
callq 0x2ef4cb
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x2efa21
addq %rax, (%rbp)
jmp 0x2eeec4
cmpb $0x0, 0x29(%rbp)
je 0x2ef124
movsd 0x20(%rbp), %xmm0
mulsd 0x951d5(%rip), %xmm0    # 0x3842b0
addsd 0xe672d(%rip), %xmm0    # 0x3d5810
ucomisd 0x7cca5(%rip), %xmm0    # 0x36bd90
jb 0x2eeece
movsd 0xe671f(%rip), %xmm1    # 0x3d5818
ucomisd %xmm0, %xmm1
jbe 0x2eeece
movb $0x0, 0x2c(%rbp)
addsd 0x66d39(%rip), %xmm0    # 0x355e48
cvttsd2si %xmm0, %rax
movq %rax, (%rbp)
movl $0x1, 0x28(%rbp)
jmp 0x2eeed9
xorl %ecx, %ecx
leaq 0x7b787(%rip), %rdx     # 0x36a8b4
movzbl (%rcx,%rdx), %edx
cmpb %dl, %al
jne 0x2ef13b
testb %al, %al
jne 0x2ef14c
jmp 0x2ef16e
movzbl %al, %eax
movb (%rax,%r15), %al
cmpb (%rdx,%r15), %al
jne 0x2eeece
movb 0x1(%r12,%rcx), %al
incq %rcx
jmp 0x2ef126
leaq 0xeb096(%rip), %rcx     # 0x3da1f3
jmp 0x2ef1e8
leaq 0xeb093(%rip), %rcx     # 0x3da1fc
jmp 0x2ef311
movq 0x10(%rsp), %rdi
callq 0x2ef83f
testl %eax, %eax
je 0x2eeece
cmpb $0x0, 0x2d(%rbp)
jne 0x2eeed9
movq %rbp, %rdi
callq 0x2ef4cb
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x2efa21
cmpl $0x0, 0xc(%rsp)
jne 0x2ef1d5
movq %rax, %r12
subq %rax, (%rbp)
movw $0x0, 0x2a(%rbp)
movb $0x0, 0x2c(%rbp)
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x2efa21
subq %rax, %r12
addq %r12, (%rbp)
movb $0x1, 0x2d(%rbp)
jmp 0x2eeece
leaq 0xeb00e(%rip), %rax     # 0x3da1f3
addq %rax, %rcx
movzbl (%rcx), %eax
movzbl (%rax,%r15), %eax
cmpl %eax, %edx
jne 0x2eeece
addq $0x8, %r12
movq %r12, %rdi
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
movl %eax, %edx
movl $0x1, %ecx
callq 0x292288
testl %eax, %eax
jle 0x2eeece
movsd 0x18(%rsp), %xmm0
movsd 0xd65ed(%rip), %xmm1    # 0x3c5820
ucomisd %xmm0, %xmm1
jbe 0x2eeece
cvttsd2si %xmm0, %ebx
testl %ebx, %ebx
js 0x2eeece
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2eeece
jp 0x2eeece
movq %rbp, %rdi
callq 0x2efbb3
movq %rbp, %rdi
callq 0x2efce6
xorl %r12d, %r12d
movb %r12b, 0x2c(%rbp)
movb %r12b, 0x28(%rbp)
movq %rbp, %rdi
callq 0x2ef4cb
movq (%rbp), %rsi
leaq 0x7b98a00(%rsi), %rax
movabsq $0x636ba875fd33dc87, %rcx # imm = 0x636BA875FD33DC87
imulq %rcx
movq %rdx, %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x19, %rcx
addq %rax, %rcx
movq %rcx, %rax
movabsq $0x4924924924924925, %rdx # imm = 0x4924924924924925
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq %rdx
addq %rax, %rdx
leaq (,%rdx,8), %rax
subq %rax, %rdx
leaq (%rcx,%rdx), %rax
movl %ebx, %edi
cmpq %rdi, %rax
leaq -0x7(%rdx,%rcx), %rcx
cmovleq %rax, %rcx
subq %rcx, %rdi
imulq $0x5265c00, %rdi, %rax  # imm = 0x5265C00
addq %rsi, %rax
movq %rax, (%rbp)
movw $0x0, 0x2a(%rbp)
movb %r12b, 0x2c(%rbp)
jmp 0x2eeed9
leaq 0xeaeee(%rip), %rax     # 0x3da1fc
addq %rax, %rcx
movzbl (%rcx), %eax
movzbl (%rax,%r15), %eax
cmpl %eax, %edx
jne 0x2eeece
cmpb $0x0, 0x28(%rbp)
jne 0x2ef337
cmpb $0x0, 0x2a(%rbp)
jne 0x2ef337
cmpb $0x0, 0x2b(%rbp)
je 0x2eeece
movq %rbp, %rdi
callq 0x2efbb3
movw $0x1, 0x2b(%rbp)
xorl %eax, %eax
movq %rax, 0x14(%rbp)
movq %rax, 0x20(%rbp)
movw $0x0, 0x28(%rbp)
xorl %eax, %eax
leaq 0xd985b(%rip), %rsi     # 0x3c8bb9
leaq 0xd985a(%rip), %rdi     # 0x3c8bbf
movzbl 0x9(%r12,%rax), %ecx
movzbl (%rax,%rsi), %edx
cmpb %dl, %cl
jne 0x2ef37a
testq %rcx, %rcx
jne 0x2ef384
jmp 0x2ef389
movb (%rcx,%r15), %cl
cmpb (%rdx,%r15), %cl
jne 0x2ef395
incq %rax
jmp 0x2ef365
movl $0x1, 0x10(%rbp)
jmp 0x2eeed9
xorl %eax, %eax
movzbl 0x9(%r12,%rax), %ecx
movzbl (%rax,%rdi), %edx
cmpb %dl, %cl
jne 0x2ef3ac
testq %rcx, %rcx
jne 0x2ef3b6
jmp 0x2ef3dc
movb (%rcx,%r15), %cl
cmpb (%rdx,%r15), %cl
jne 0x2ef3ef
incq %rax
jmp 0x2ef397
cvttsd2si %xmm2, %r12d
movq %rbp, %rdi
callq 0x2efbb3
movq %rbp, %rdi
callq 0x2efce6
movsd 0x20(%rsp), %xmm1
addl %r12d, 0x8(%rbp)
jmp 0x2ef447
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xc(%rbp)
jmp 0x2eeed9
xorl %eax, %eax
movzbl 0x9(%r12,%rax), %ecx
leaq 0xead48(%rip), %rdx     # 0x3da146
movzbl (%rax,%rdx), %edx
cmpb %dl, %cl
jne 0x2ef410
testq %rcx, %rcx
jne 0x2ef41e
jmp 0x2eeed9
movb (%rcx,%r15), %cl
cmpb (%rdx,%r15), %cl
jne 0x2eeece
incq %rax
jmp 0x2ef3f1
movl $0xc, %ecx
subl %eax, %ecx
movl $0xaaaaaaab, %edx       # imm = 0xAAAAAAAB
imulq %rdx, %rcx
shrq $0x23, %rcx
negl %ecx
addl %ecx, 0x8(%rbp)
shll $0x2, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
movl %eax, 0xc(%rbp)
movb $0x0, 0x28(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
movq %rbp, %rdi
callq 0x2ef4cb
movsd 0x20(%rsp), %xmm0
mulsd 0x18(%rbx), %xmm0
addsd 0x38(%rsp), %xmm0
cvttsd2si %xmm0, %rax
addq %rax, (%rbp)
movl $0x0, 0xc(%rsp)
jmp 0x2eeec4
movl $0x1, %eax
jmp 0x2ef4b9
movq %rbp, %rdi
callq 0x2ef4cb
movl $0x1, %eax
cmpb $0x0, 0x2e(%rbp)
jne 0x2ef4b9
movabsq $0x1a6401072fdff, %rcx  # imm = 0x1A6401072FDFF
xorl %eax, %eax
cmpq %rcx, (%rbp)
seta %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq