// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: isDate
static int isDate(
  sqlite3_context *context, 
  int argc, 
  sqlite3_value **argv, 
  DateTime *p
){
  int i;
  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 ){
    p->iJD = (sqlite3_int64)(sqlite3_value_double(argv[0])*86400000.0 + 0.5);
    p->validJD = 1;
  }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]);
    if( z==0 || parseModifier(context, (char*)z, p) ) return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rcx)
movupd %xmm0, 0x10(%rcx)
movupd %xmm0, (%rcx)
testl %esi, %esi
je 0x659aa
movq %rdx, %r15
movl %esi, %r13d
movq (%rdx), %rdi
movzbl 0x26(%rdi), %eax
decl %eax
cmpl $0x1, %eax
movq %rbx, -0x30(%rbp)
movq %rdx, -0xa0(%rbp)
ja 0x659d0
callq 0xee52
mulsd 0x1390f(%rip), %xmm0    # 0x792a0
addsd 0x138d7(%rip), %xmm0    # 0x79270
cvttsd2si %xmm0, %rax
movq %rax, (%rbx)
movb $0x1, 0x2a(%rbx)
jmp 0x65bc7
movq 0x8(%r14), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x2506a
movl $0x1, %r12d
testl %eax, %eax
jne 0x66390
movb $0x1, 0x2a(%rbx)
jmp 0x66385
movl $0x1, %r12d
movl $0x1, %esi
callq 0xef29
testq %rax, %rax
je 0x66390
movq %rax, %r15
movq %r14, -0x48(%rbp)
movb (%rax), %al
xorl %r14d, %r14d
movb %al, -0x98(%rbp)
cmpb $0x2d, %al
sete %r14b
leaq (%r15,%r14), %rdi
leaq -0x34(%rbp), %r10
movl $0x1, %r11d
movl $0x2, %r12d
leaq -0x78(%rbp), %rbx
leaq -0x70(%rbp), %r9
movl $0x4, %esi
xorl %edx, %edx
movl $0x270f, %ecx           # imm = 0x270F
movl $0x2d, %r8d
xorl %eax, %eax
pushq %r10
pushq $0x0
pushq $0x1f
pushq %r11
pushq %r12
pushq %rbx
pushq $0x2d
pushq $0xc
pushq %r11
pushq %r12
callq 0x666dd
addq $0x50, %rsp
cmpl $0x3, %eax
jne 0x65a9a
leaq (%r14,%r15), %r12
addq $0x9, %r12
leaq 0x1054f(%rip), %rax     # 0x75fb0
movzbl 0x1(%r12), %ecx
incq %r12
cmpq $0x54, %rcx
je 0x65a61
movb (%rcx,%rax), %cl
andb $0x1, %cl
jne 0x65a61
movq %r12, %rdi
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x664dc
testl %eax, %eax
je 0x65b86
cmpb $0x0, (%r12)
je 0x65b7e
movq %r15, %rdi
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x664dc
testl %eax, %eax
movq -0x48(%rbp), %r14
je 0x65bc0
movb (%r15), %sil
testb %sil, %sil
je 0x65af3
movq %r15, %rcx
incq %rcx
leaq 0x17456(%rip), %rax     # 0x7cf20
leaq 0x105df(%rip), %rdx     # 0x760b0
movzbl %sil, %esi
movb (%rsi,%rdx), %dil
movzbl (%rax), %r8d
cmpb (%r8,%rdx), %dil
jne 0x65afc
incq %rax
movb (%rcx), %sil
incq %rcx
testb %sil, %sil
jne 0x65ad1
jmp 0x65afa
leaq 0x17426(%rip), %rax     # 0x7cf20
xorl %esi, %esi
leaq 0x105ad(%rip), %rcx     # 0x760b0
movb (%rsi,%rcx), %dl
movzbl (%rax), %eax
cmpb (%rax,%rcx), %dl
jne 0x65b27
movq 0x8(%r14), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x2506a
testl %eax, %eax
jne 0x6638a
jmp 0x65b78
xorl %eax, %eax
movq %rax, %rdx
incq %rax
cmpb $0x0, (%r15,%rdx)
jne 0x65b29
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
leaq -0xd0(%rbp), %rsi
movq %r15, %rdi
movl $0x1, %ecx
callq 0x243b1
testl %eax, %eax
je 0x6638a
movsd -0xd0(%rbp), %xmm0
mulsd 0x13738(%rip), %xmm0    # 0x792a0
addsd 0x13700(%rip), %xmm0    # 0x79270
cvttsd2si %xmm0, %rax
movq %rax, (%rbx)
movb $0x1, 0x2a(%rbx)
jmp 0x65bc0
movq -0x30(%rbp), %rbx
movb $0x0, 0x29(%rbx)
movb $0x0, 0x2a(%rbx)
movb $0x1, 0x28(%rbx)
movl -0x70(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmpb $0x2d, -0x98(%rbp)
cmovnel %eax, %ecx
movl %ecx, 0x8(%rbx)
movl -0x78(%rbp), %eax
movl %eax, 0xc(%rbx)
movl -0x34(%rbp), %eax
movl %eax, 0x10(%rbx)
cmpb $0x0, 0x2b(%rbx)
movq -0x48(%rbp), %r14
je 0x65bc0
movq %rbx, %rdi
callq 0x663a5
movq -0xa0(%rbp), %r15
cmpl $0x2, %r13d
jl 0x66385
movq %r14, -0x48(%rbp)
movl %r13d, %eax
movq %rax, -0x98(%rbp)
movl $0x1, %r13d
leaq 0x103c4(%rip), %r12     # 0x75fb0
leaq 0x104bd(%rip), %r14     # 0x760b0
movq (%r15,%r13,8), %rdi
movl $0x1, %esi
callq 0xef29
testq %rax, %rax
je 0x6638a
movl $0x1, -0x34(%rbp)
xorl %ecx, %ecx
movzbl (%rax,%rcx), %edx
testq %rdx, %rdx
je 0x65c32
movb (%rdx,%r14), %dl
movb %dl, -0x70(%rbp,%rcx)
incq %rcx
cmpq $0x1d, %rcx
jne 0x65c13
movl $0x1d, %ecx
movl %ecx, %eax
movb $0x0, -0x70(%rbp,%rax)
movzbl -0x70(%rbp), %ebx
cmpl $0x6b, %ebx
jg 0x65e46
leal -0x30(%rbx), %eax
cmpl $0xa, %eax
jae 0x65ee4
movq %r13, %r14
movl $0x1, %edx
leaq -0x70(%rbp), %r15
movq %r15, %rax
movzbl -0x70(%rbp,%rdx), %r13d
testl %r13d, %r13d
je 0x65c85
cmpl $0x3a, %r13d
je 0x65c85
testb $0x1, (%r13,%r12)
jne 0x65c85
incq %rdx
incq %r15
incq %rax
jmp 0x65c61
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x1, %ecx
callq 0x243b1
testl %eax, %eax
je 0x6638a
cmpl $0x3a, %r13d
jne 0x65d6b
addq $-0x3a, %rbx
xorl %eax, %eax
cmpq $-0xa, %rbx
setb %al
leaq (%rax,%rbp), %rdi
addq $-0x70, %rdi
xorpd %xmm0, %xmm0
movapd %xmm0, -0xb0(%rbp)
movapd %xmm0, -0xc0(%rbp)
movapd %xmm0, -0xd0(%rbp)
leaq -0xd0(%rbp), %rsi
callq 0x664dc
testl %eax, %eax
movq %r14, %r13
jne 0x65d5f
leaq -0xd0(%rbp), %rdi
callq 0x663a5
movq -0xd0(%rbp), %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, -0x70(%rbp)
cmovneq %rcx, %rbx
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x663a5
movw $0x0, 0x28(%r15)
movb $0x0, 0x2b(%r15)
addq %rbx, (%r15)
movl $0x0, -0x34(%rbp)
leaq 0x1034a(%rip), %r14     # 0x760b0
jmp 0x66368
movzbl 0x1(%r15), %eax
incq %r15
testb $0x1, (%rax,%r12)
jne 0x65d6b
movl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
xorl %ecx, %ecx
movq %r14, %r13
movq %rcx, %rbx
incl %eax
incq %rcx
cmpb $0x0, (%r15,%rbx)
jne 0x65d84
andl $0x3fffffff, %ebx       # imm = 0x3FFFFFFF
leal -0xb(%rbx), %ecx
cmpl $-0x8, %ecx
leaq 0x1030a(%rip), %r14     # 0x760b0
jb 0x66368
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
decl %eax
cmpb $0x73, (%r15,%rax)
jne 0x65dc1
decl %ebx
movb $0x0, (%r15,%rax)
movq -0x30(%rbp), %rdi
callq 0x663a5
movl $0x0, -0x34(%rbp)
movsd -0x78(%rbp), %xmm1
xorl %eax, %eax
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
seta %cl
addl $-0x3, %ebx
cmpl $0x3, %ebx
ja 0x661d3
movapd %xmm1, -0x90(%rbp)
movb %cl, %al
leaq 0x135c0(%rip), %rcx     # 0x793c0
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, -0x40(%rbp)
leaq 0x1017f(%rip), %rcx     # 0x75f90
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
leaq 0x170ba(%rip), %rsi     # 0x7cede
callq 0x8530
testl %eax, %eax
movapd -0x90(%rbp), %xmm0
jne 0x661d3
mulsd 0x1345f(%rip), %xmm0    # 0x792a0
jmp 0x6625c
cmpl $0x74, %ebx
jg 0x65efb
cmpl $0x6c, %ebx
je 0x66036
cmpl $0x73, %ebx
jne 0x66368
movq -0x70(%rbp), %rax
movabsq $0x666f207472617473, %rcx # imm = 0x666F207472617473
xorq %rcx, %rax
movzbl -0x68(%rbp), %ecx
xorq $0x20, %rcx
orq %rax, %rcx
jne 0x66368
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x66a08
movw $0x1, 0x29(%rbx)
xorl %eax, %eax
movq %rax, 0x14(%rbx)
movq %rax, 0x20(%rbx)
movb $0x0, 0x2b(%rbx)
movl -0x67(%rbp), %eax
movl $0x746e6f6d, %ecx       # imm = 0x746E6F6D
xorl %ecx, %eax
movzwl -0x63(%rbp), %ecx
xorl $0x68, %ecx
orl %eax, %ecx
je 0x6626f
movl -0x67(%rbp), %eax
movl $0x72616579, %ecx       # imm = 0x72616579
xorl %ecx, %eax
movzbl -0x63(%rbp), %ecx
orl %eax, %ecx
je 0x662ce
cmpl $0x796164, -0x67(%rbp)  # imm = 0x796164
jne 0x66368
jmp 0x6636e
cmpl $0x2b, %ebx
je 0x65c52
cmpl $0x2d, %ebx
je 0x65c52
jmp 0x66368
cmpl $0x75, %ebx
je 0x66086
cmpl $0x77, %ebx
jne 0x66368
movabsq $0x207961646b656577, %rax # imm = 0x207961646B656577
cmpq %rax, -0x70(%rbp)
jne 0x66368
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
leaq -0x68(%rbp), %rax
incl %edx
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x65f2a
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
leaq -0x68(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x1, %ecx
callq 0x243b1
testl %eax, %eax
je 0x66368
movsd -0x78(%rbp), %xmm0
movsd 0x133b6(%rip), %xmm1    # 0x79318
ucomisd %xmm0, %xmm1
jbe 0x66368
cvttsd2si %xmm0, %ebx
testl %ebx, %ebx
js 0x66368
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x66368
jp 0x66368
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x66a08
movq %r15, %rdi
callq 0x66b15
xorl %eax, %eax
movw %ax, 0x2a(%r15)
movq %r15, %rdi
callq 0x663a5
movq (%r15), %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, (%r15)
xorl %eax, %eax
movw %ax, 0x28(%r15)
movb $0x0, 0x2b(%r15)
jmp 0x6636e
movq -0x70(%rbp), %rax
movabsq $0x6d69746c61636f6c, %rcx # imm = 0x6D69746C61636F6C
xorq %rcx, %rax
movzwl -0x68(%rbp), %ecx
xorq $0x65, %rcx
orq %rax, %rcx
jne 0x66368
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x663a5
movq %rbx, %rdi
movq -0x48(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x6687e
addq %rax, (%rbx)
movw $0x0, 0x28(%rbx)
movb $0x0, 0x2b(%rbx)
jmp 0x66368
movq -0x70(%rbp), %rax
movabsq $0x636f706578696e75, %rcx # imm = 0x636F706578696E75
xorq %rcx, %rax
movzwl -0x68(%rbp), %ecx
xorq $0x68, %rcx
orq %rax, %rcx
je 0x661e3
cmpl $0x637475, -0x70(%rbp)  # imm = 0x637475
jne 0x66368
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x663a5
movq %rbx, %rdi
movq -0x48(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x6687e
cmpl $0x0, -0x34(%rbp)
jne 0x6638a
movq %rax, %r15
movq -0x30(%rbp), %rbx
subq %rax, (%rbx)
movw $0x0, 0x28(%rbx)
movb $0x0, 0x2b(%rbx)
movq %rbx, %rdi
movq -0x48(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x6687e
subq %rax, %r15
addq %r15, (%rbx)
jmp 0x66368
movq %r15, %rdi
leaq 0x16e24(%rip), %rsi     # 0x7cf38
callq 0x8530
testl %eax, %eax
jne 0x661d3
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x66a08
movq %r15, %rdi
callq 0x66b15
cvttsd2si -0x90(%rbp), %ebx
movl 0xc(%r15), %eax
addl %ebx, %eax
jle 0x662ed
leal -0x1(%rax), %ecx
movl $0xaaaaaaab, %edx       # imm = 0xAAAAAAAB
imulq %rdx, %rcx
shrq $0x23, %rcx
jmp 0x66303
movq %r15, %rdi
leaq 0x16de0(%rip), %rsi     # 0x7cf48
callq 0x8530
testl %eax, %eax
je 0x6623a
movq %r15, %rdi
leaq 0x16dd0(%rip), %rsi     # 0x7cf4f
callq 0x8530
testl %eax, %eax
movapd -0x90(%rbp), %xmm0
jne 0x661d3
mulsd 0x13160(%rip), %xmm0    # 0x792f8
jmp 0x6625c
movq %r15, %rdi
leaq 0x16d9c(%rip), %rsi     # 0x7cf43
callq 0x8530
testl %eax, %eax
je 0x6624c
movq %r15, %rdi
leaq 0x16d80(%rip), %rsi     # 0x7cf3e
callq 0x8530
testl %eax, %eax
movapd -0x90(%rbp), %xmm0
je 0x6627b
movl $0x1, -0x34(%rbp)
movq -0x30(%rbp), %r15
jmp 0x6635c
movq -0x30(%rbp), %rax
cmpb $0x0, 0x2a(%rax)
je 0x660a8
movq -0x30(%rbp), %rcx
movq (%rcx), %rax
movl $0xa8c0, %edx           # imm = 0xA8C0
addq %rdx, %rax
movabsq $0x1845c8a0ce512957, %rdx # imm = 0x1845C8A0CE512957
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0xd, %rdx
addq %rax, %rdx
movabsq $0xbfc83e532200, %rax   # imm = 0xBFC83E532200
addq %rax, %rdx
movq %rdx, (%rcx)
movw $0x0, 0x28(%rcx)
movb $0x0, 0x2b(%rcx)
jmp 0x6636e
movapd -0x90(%rbp), %xmm0
mulsd 0x130b6(%rip), %xmm0    # 0x79300
jmp 0x6625c
movapd -0x90(%rbp), %xmm0
mulsd 0x130b4(%rip), %xmm0    # 0x79310
addsd -0x40(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq -0x30(%rbp), %r15
jmp 0x66359
movl $0x1, 0x10(%rbx)
jmp 0x6636e
cvttsd2si %xmm0, %ebx
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x66a08
movq %r15, %rdi
callq 0x66b15
addl %ebx, 0x8(%r15)
movb $0x0, 0x2a(%r15)
movq %r15, %rdi
callq 0x663a5
movapd -0x90(%rbp), %xmm1
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x662c0
jnp 0x6635c
subsd %xmm0, %xmm1
mulsd 0x1303c(%rip), %xmm1    # 0x79308
jmp 0x66347
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x66a08
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xc(%rbx)
jmp 0x6636e
movl $0xc, %ecx
subl %eax, %ecx
movl $0xaaaaaaab, %edx       # imm = 0xAAAAAAAB
imulq %rdx, %rcx
shrq $0x23, %rcx
negl %ecx
movq -0x30(%rbp), %r15
addl %ecx, 0x8(%r15)
shll $0x2, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
movl %eax, 0xc(%r15)
movb $0x0, 0x2a(%r15)
movq %r15, %rdi
callq 0x663a5
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movapd -0x90(%rbp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x6633b
jnp 0x6635c
subsd %xmm0, %xmm1
mulsd 0x12fa9(%rip), %xmm1    # 0x792f0
mulsd 0x12f51(%rip), %xmm1    # 0x792a0
addsd -0x40(%rbp), %xmm1
cvttsd2si %xmm1, %rax
addq %rax, (%r15)
movw $0x0, 0x28(%r15)
movb $0x0, 0x2b(%r15)
cmpl $0x0, -0x34(%rbp)
jne 0x6638a
incq %r13
cmpq -0x98(%rbp), %r13
movq -0xa0(%rbp), %r15
jne 0x65bf3
xorl %r12d, %r12d
jmp 0x66390
movl $0x1, %r12d
movl %r12d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq