// File: /workspace/github_c_makefile_star2_O2/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
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rcx)
movupd %xmm0, 0x10(%rcx)
movupd %xmm0, (%rcx)
testl %esi, %esi
je 0x289545
movq %rdx, %r13
movl %esi, %r12d
movq %rdi, 0x18(%rsp)
movq (%rdx), %rdi
movzwl 0x8(%rdi), %eax
andl $0x3f, %eax
leaq 0xe892f(%rip), %rcx     # 0x3717f0
movzbl (%rax,%rcx), %eax
decl %eax
cmpl $0x1, %eax
movq %rdx, 0x30(%rsp)
ja 0x289567
callq 0x22442c
movq %rbp, %rdi
callq 0x289880
movq %rbp, 0x10(%rsp)
movslq %r12d, %rax
movq %rax, 0x48(%rsp)
pushq $0x1
popq %r14
leaq 0xe8956(%rip), %rbp     # 0x371850
cmpq 0x48(%rsp), %r14
jge 0x289649
movq (%r13,%r14,8), %rdi
callq 0x2243e3
movq %rax, %r15
movq (%r13,%r14,8), %rdi
callq 0x2243eb
testq %r15, %r15
je 0x28955e
movl $0x1, 0xc(%rsp)
movzbl (%r15), %ebx
leaq 0xe87b8(%rip), %rax     # 0x3716f0
movzbl (%rbx,%rax), %eax
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x2890f2
movq %r15, %r13
pushq $0x1
popq %rdx
movzbl (%r15,%rdx), %r12d
testl %r12d, %r12d
je 0x288f6d
cmpl $0x3a, %r12d
je 0x288f6d
testb $0x1, (%r12,%rbp)
jne 0x288f6d
incq %rdx
incq %r13
jmp 0x288f4e
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
pushq $0x1
popq %rcx
callq 0x23a955
testl %eax, %eax
jle 0x28955e
cmpl $0x3a, %r12d
jne 0x289018
addq $-0x3a, %rbx
cmpq $-0xa, %rbx
movq %r15, %rdi
adcq $0x0, %rdi
xorpd %xmm0, %xmm0
movapd %xmm0, 0x70(%rsp)
movapd %xmm0, 0x60(%rsp)
movapd %xmm0, 0x50(%rsp)
leaq 0x50(%rsp), %rsi
callq 0x2898be
testl %eax, %eax
jne 0x289531
leaq 0x50(%rsp), %rdi
callq 0x2896f4
movq 0x50(%rsp), %rax
addq $-0x2932e00, %rax       # imm = 0xFD6CD200
cqto
movl $0x5265c00, %ecx        # imm = 0x5265C00
idivq %rcx
movq %rdx, %rbx
negq %rbx
cmpb $0x2d, (%r15)
cmovneq %rdx, %rbx
movq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x2896f4
andw $0x0, 0x2a(%r15)
movb $0x0, 0x2c(%r15)
addq %rbx, (%r15)
andl $0x0, 0xc(%rsp)
jmp 0x289531
movzbl 0x1(%r13), %eax
incq %r13
testb $0x1, (%rax,%rbp)
jne 0x289018
movq %r13, %rdi
callq 0x2211ac
movl %eax, %r15d
leal -0xb(%r15), %eax
cmpl $-0x8, %eax
leaq 0x1ae021(%rip), %r12    # 0x437060
jb 0x289531
leal -0x1(%r15), %eax
movb (%r13,%rax), %cl
andb $-0x21, %cl
cmpb $0x53, %cl
cmovel %eax, %r15d
movq 0x10(%rsp), %rdi
callq 0x2896f4
movl $0x1, 0xc(%rsp)
movsd 0x28(%rsp), %xmm2
xorl %eax, %eax
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm0
seta %al
leaq 0xecafc(%rip), %rcx     # 0x375b80
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x40(%rsp)
xorl %ebx, %ebx
movsd %xmm2, 0x20(%rsp)
cmpq $0xc0, %rbx
je 0x289523
movzbl 0x1(%rbx,%r12), %eax
cmpl %eax, %r15d
jne 0x2890ec
movq 0x8(%rbx,%r12), %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x2217ad
movsd 0x20(%rsp), %xmm2
testl %eax, %eax
jne 0x2890ec
movsd 0x10(%rbx,%r12), %xmm0
movapd %xmm0, %xmm1
xorpd 0x66974(%rip), %xmm1    # 0x2efa50
ucomisd %xmm1, %xmm2
jbe 0x2890ec
ucomisd %xmm2, %xmm0
ja 0x2893ba
addq $0x20, %rbx
jmp 0x289097
cmpl $0x2b, %eax
je 0x288f48
cmpl $0x77, %eax
je 0x2892d6
cmpl $0x6c, %eax
je 0x28927d
cmpl $0x73, %eax
je 0x289129
cmpl $0x75, %eax
je 0x2891d8
cmpl $0x2d, %eax
je 0x288f48
jmp 0x289531
movq %r15, %rdi
leaq 0xf14e9(%rip), %rsi     # 0x37a61c
pushq $0x9
popq %rdx
callq 0x2217ad
testl %eax, %eax
jne 0x289531
movq 0x10(%rsp), %rax
cmpb $0x0, 0x28(%rax)
jne 0x289168
movq 0x10(%rsp), %rax
cmpb $0x0, 0x2a(%rax)
jne 0x289168
movq 0x10(%rsp), %rax
cmpb $0x0, 0x2b(%rax)
je 0x289531
addq $0x9, %r15
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x289d92
movw $0x1, 0x2b(%rbx)
andq $0x0, 0x14(%rbx)
andq $0x0, 0x20(%rbx)
andw $0x0, 0x28(%rbx)
movq %r15, %rdi
leaq 0xdfe21(%rip), %rsi     # 0x368fb9
callq 0x221779
testl %eax, %eax
je 0x289494
movq %r15, %rdi
leaq 0xdfe10(%rip), %rsi     # 0x368fbf
callq 0x221779
testl %eax, %eax
je 0x2894a0
movq %r15, %rdi
leaq 0xf13a0(%rip), %rsi     # 0x37a566
callq 0x221779
testl %eax, %eax
jne 0x289531
jmp 0x289538
movq %r15, %rdi
leaq 0xf1427(%rip), %rsi     # 0x37a609
callq 0x221779
testl %eax, %eax
je 0x289400
movq %r15, %rdi
leaq 0x8161b(%rip), %rsi     # 0x30a814
callq 0x221779
testl %eax, %eax
jne 0x289531
movq 0x18(%rsp), %rdi
callq 0x289a72
testl %eax, %eax
je 0x289531
movq 0x10(%rsp), %rax
cmpb $0x0, 0x2d(%rax)
jne 0x289538
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2896f4
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x289c2b
cmpl $0x0, 0xc(%rsp)
jne 0x289274
movq %rax, %r15
subq %rax, (%rbx)
andw $0x0, 0x2a(%rbx)
movb $0x0, 0x2c(%rbx)
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x289c2b
subq %rax, %r15
addq %r15, (%rbx)
movb $0x1, 0x2d(%rbx)
jmp 0x289531
movq %r15, %rdi
leaq 0xf1378(%rip), %rsi     # 0x37a5ff
callq 0x221779
testl %eax, %eax
jne 0x289531
movq 0x18(%rsp), %rdi
callq 0x289a72
testl %eax, %eax
je 0x289531
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2896f4
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
leaq 0xc(%rsp), %rdx
callq 0x289c2b
addq %rax, (%rbx)
andw $0x0, 0x2a(%rbx)
movb $0x0, 0x2c(%rbx)
jmp 0x289531
movq %r15, %rdi
leaq 0xf1333(%rip), %rsi     # 0x37a613
pushq $0x8
popq %rdx
callq 0x2217ad
testl %eax, %eax
jne 0x289531
addq $0x8, %r15
movq %r15, %rdi
callq 0x2211ac
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
movl %eax, %edx
pushq $0x1
popq %rcx
callq 0x23a955
testl %eax, %eax
jle 0x289531
movsd 0x28(%rsp), %xmm0
movsd 0xdc90c(%rip), %xmm1    # 0x365c30
ucomisd %xmm0, %xmm1
jbe 0x289531
cvttsd2si %xmm0, %ebx
testl %ebx, %ebx
js 0x289531
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x289531
jp 0x289531
movq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x289d80
xorl %r12d, %r12d
movb %r12b, 0x2c(%r15)
movb %r12b, 0x28(%r15)
movq %r15, %rdi
callq 0x2896f4
movq (%r15), %rcx
leaq 0x7b98a00(%rcx), %rax
cqto
movl $0x5265c00, %esi        # imm = 0x5265C00
idivq %rsi
cqto
pushq $0x7
popq %rsi
idivq %rsi
movl %ebx, %eax
leaq -0x7(%rdx), %rsi
cmpq %rax, %rdx
cmovgq %rsi, %rdx
subq %rdx, %rax
imulq $0x5265c00, %rax, %rax  # imm = 0x5265C00
addq %rcx, %rax
movq %rax, (%r15)
andw $0x0, 0x2a(%r15)
movb %r12b, 0x2c(%r15)
jmp 0x289538
movzbl (%rbx,%r12), %eax
cmpl $0x2, %eax
je 0x28946e
cmpl $0x1, %eax
jne 0x28948d
cvttsd2si %xmm2, %r15d
movq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x289d80
movl 0xc(%r12), %ecx
addl %r15d, %ecx
jle 0x2894b8
leal -0x1(%rcx), %eax
xorl %edx, %edx
pushq $0xc
popq %rsi
divl %esi
jmp 0x2894c5
movq 0x10(%rsp), %rax
cmpb $0x0, 0x29(%rax)
je 0x2891ef
movq 0x10(%rsp), %rax
movsd 0x20(%rax), %xmm0
mulsd 0x9b297(%rip), %xmm0    # 0x3246b8
addsd 0xec7ff(%rip), %xmm0    # 0x375c28
ucomisd 0x828b7(%rip), %xmm0    # 0x30bce8
jb 0x289531
movsd 0xec7f1(%rip), %xmm1    # 0x375c30
ucomisd %xmm0, %xmm1
jbe 0x289531
movq 0x10(%rsp), %rcx
movb $0x0, 0x2c(%rcx)
addsd 0x6c9fe(%rip), %xmm0    # 0x2f5e58
cvttsd2si %xmm0, %rax
movq %rax, (%rcx)
movl $0x1, 0x28(%rcx)
jmp 0x289538
cvttsd2si %xmm2, %r15d
movq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x289d80
movsd 0x20(%rsp), %xmm1
addl %r15d, 0x8(%r12)
jmp 0x2894df
movq 0x10(%rsp), %r12
jmp 0x2894f4
movl $0x1, 0x10(%rbx)
jmp 0x289538
movq 0x10(%rsp), %rax
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0xc(%rax)
jmp 0x289538
pushq $0xc
popq %rsi
movl %esi, %eax
subl %ecx, %eax
xorl %edx, %edx
divl %esi
negl %eax
movq 0x10(%rsp), %r12
addl %eax, 0x8(%r12)
imull $-0xc, %eax, %eax
addl %ecx, %eax
movl %eax, 0xc(%r12)
movsd 0x20(%rsp), %xmm1
movb $0x0, 0x28(%r12)
cvtsi2sd %r15d, %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
movq %r12, %rdi
callq 0x2896f4
leaq 0x1adb5d(%rip), %rax    # 0x437060
movsd 0x20(%rsp), %xmm0
mulsd 0x18(%rbx,%rax), %xmm0
addsd 0x40(%rsp), %xmm0
cvttsd2si %xmm0, %rax
addq %rax, (%r12)
andl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
andw $0x0, 0x2a(%rax)
movb $0x0, 0x2c(%rax)
cmpl $0x0, 0xc(%rsp)
jne 0x28955e
incq %r14
movq 0x30(%rsp), %r13
jmp 0x288efa
movq %rbp, %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x28982a
pushq $0x1
popq %r14
jmp 0x289674
pushq $0x1
popq %r14
callq 0x2243e3
testq %rax, %rax
je 0x289674
movq %rax, %r15
movb (%rax), %bl
xorl %r14d, %r14d
cmpb $0x2d, %bl
sete %r14b
leaq (%rax,%r14), %rdi
leaq 0xf1019(%rip), %rsi     # 0x37a5ac
leaq 0x28(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x3c(%rsp), %r8
xorl %eax, %eax
callq 0x289af7
cmpl $0x3, %eax
jne 0x2895f6
leaq (%r14,%r15), %r13
addq $0x9, %r13
leaq 0xe8293(%rip), %rax     # 0x371850
movzbl 0x1(%r13), %ecx
incq %r13
cmpq $0x54, %rcx
je 0x2895bd
movb (%rcx,%rax), %cl
andb $0x1, %cl
jne 0x2895bd
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2898be
testl %eax, %eax
je 0x2896b5
cmpb $0x0, (%r13)
movq 0x30(%rsp), %r13
je 0x2896b1
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2898be
testl %eax, %eax
je 0x288ee2
leaq 0xf0f98(%rip), %rsi     # 0x37a5a8
movq %r15, %rdi
callq 0x221779
testl %eax, %eax
je 0x289689
movq %r15, %rdi
callq 0x2211ac
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %r14
movq %r15, %rdi
movl %eax, %edx
movl %r14d, %ecx
callq 0x23a955
testl %eax, %eax
jle 0x289674
movsd 0x50(%rsp), %xmm0
jmp 0x288eda
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2896f4
cmpb $0x0, 0x2e(%rbx)
pushq $0x1
popq %r14
jne 0x289674
movabsq $0x1a6401072fdff, %rax  # imm = 0x1A6401072FDFF
xorl %r14d, %r14d
cmpq %rax, (%rbx)
seta %r14b
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %rdi
callq 0x289a72
testl %eax, %eax
je 0x28961c
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x28982a
testl %eax, %eax
pushq $0x1
popq %r14
jne 0x289674
jmp 0x288ee2
movb $0x0, 0x2b(%rbp)
movb $0x0, 0x28(%rbp)
movb $0x1, 0x2a(%rbp)
movl 0x28(%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 0x3c(%rsp), %eax
movl %eax, 0x10(%rbp)
cmpb $0x0, 0x2c(%rbp)
je 0x2896ea
movq %rbp, %rdi
callq 0x2896f4
movq 0x30(%rsp), %r13
jmp 0x288ee2