// File: /workspace/github_cpp_makefile_star2_O1/ncbi[P]amr/common.cpp
// Function: Common_sp::Token::toNumberDate()
void Token::toNumberDate ()
{
  if (empty ())
    return;
	if (   type != eName
	    && type != eText
	   )
	  return;	 
	if (contains (name, ' '))
	  return;
	
	{  
  	static const regex date_time_re {R"(\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\d)"};   // Example: 2018-08-13T16:12:54.487
  	smatch sm;
  	if (regex_match (name, sm, date_time_re))
  	{
  	  type = eDateTime;
  	  return;
  	}
  }	
	  
  try
  {
    if (isLeft (name, "0x"))
	  {
 		  n = (long long) std::stoull (name. substr (2), nullptr, 16); 
   		type = eInteger;
    }
    else if (   contains (name, '.') 
    	       || contains (name, 'e') 
    	       || contains (name, 'E') 
    	      )
	  {
		  d = str2<double> (name);
  		type = eDouble;
      decimals = 0;
      size_t pos = name. find ('.');
      if (pos != string::npos)
      {
        pos++;
        while (   pos < name. size () 
               && isDigit (name [pos])
              )
        {
          pos++;
          decimals++;
        }
      }
      scientific = contains (name, 'e');
	  }
	  else
	  {
	    n = str2<long long> (name);
  		type = eInteger;
		}
  }
  catch (...) {}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x38(%rax)
testb %al, %al
jne 0x46a80
testl $0xfffffffd, 0x8(%rbx)  # imm = 0xFFFFFFFD
jne 0x46a80
leaq 0x10(%rbx), %r14
movq %r14, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0xa740
cmpq $-0x1, %rax
jne 0x46a80
movb 0x6a31b(%rip), %al      # 0xb0b40
testb %al, %al
je 0x46a9d
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
addq %rdi, %rsi
leaq 0x6a2d4(%rip), %rcx     # 0xb0b20
xorl %r8d, %r8d
callq 0x72863
movl %eax, %ebp
testb %al, %al
je 0x46861
movl $0x5, 0x8(%rbx)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x46877
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5a0
testb %bpl, %bpl
jne 0x46a80
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x47041(%rip), %rsi     # 0x8d8d1
leaq 0x4703c(%rip), %rdx     # 0x8d8d3
leaq 0x28(%rsp), %rdi
callq 0x2fdd8
movq 0x30(%rsp), %rcx
movq %rsp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xa5d0
movq 0x8(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x468da
testq %rdx, %rdx
je 0x468de
movq 0x28(%rsp), %rsi
movq (%rsp), %rdi
callq 0xa5c0
testl %eax, %eax
sete %bpl
jmp 0x468e1
xorl %ebp, %ebp
jmp 0x468e1
movb $0x1, %bpl
leaq 0x10(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x468fc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x46913
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
testb %bpl, %bpl
je 0x46982
movq %rsp, %rdi
movl $0x2, %edx
movq %r14, %rsi
movq $-0x1, %rcx
callq 0xa5d0
movq (%rsp), %r15
callq 0xa070
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0x10, %edx
callq 0xa770
cmpq %r15, (%r12)
je 0x46af4
movl (%r14), %ecx
testl %ecx, %ecx
je 0x46a5c
cmpl $0x22, %ecx
jne 0x46a5f
leaq 0x48586(%rip), %rdi     # 0x8ef03
callq 0xa800
movq %r14, %rdi
movl $0x2e, %esi
xorl %edx, %edx
callq 0xa740
cmpq $-0x1, %rax
jne 0x469c5
movq %r14, %rdi
movl $0x65, %esi
xorl %edx, %edx
callq 0xa740
cmpq $-0x1, %rax
jne 0x469c5
movq %r14, %rdi
movl $0x45, %esi
xorl %edx, %edx
callq 0xa740
cmpq $-0x1, %rax
je 0x46a8f
movq %r14, %rdi
callq 0x2ef34
movsd %xmm0, 0x40(%rbx)
movl $0x4, 0x8(%rbx)
movq $0x0, 0x48(%rbx)
movq %r14, %rdi
movl $0x2e, %esi
xorl %edx, %edx
callq 0xa740
cmpq $-0x1, %rax
je 0x46a43
movq 0x18(%rbx), %r12
leaq 0x1(%rax), %rcx
cmpq %r12, %rcx
jae 0x46a43
movq 0x48(%rbx), %r13
subq %rax, %r12
movq 0x10(%rbx), %rbp
addq %rax, %rbp
movl $0x1, %r15d
movsbl (%rbp,%r15), %esi
movl $0xb, %edx
leaq 0x48483(%rip), %rdi     # 0x8eeac
callq 0xa610
testq %rax, %rax
je 0x46a43
leaq (%r15,%r13), %rax
movq %rax, 0x48(%rbx)
incq %r15
cmpq %r15, %r12
jne 0x46a17
movq %r14, %rdi
movl $0x65, %esi
xorl %edx, %edx
callq 0xa740
cmpq $-0x1, %rax
setne 0x50(%rbx)
jmp 0x46a80
movl %ebp, (%r14)
movq %rax, 0x38(%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x46a79
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
movl $0x3, 0x8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x652b1
movq %rax, 0x38(%rbx)
jmp 0x46a79
leaq 0x6a09c(%rip), %rdi     # 0xb0b40
callq 0xaa40
testl %eax, %eax
je 0x4682d
leaq 0x6a068(%rip), %rdi     # 0xb0b20
leaq 0x46de8(%rip), %rsi     # 0x8d8a7
movl $0x10, %edx
callq 0x6522a
leaq 0x1e7c2(%rip), %rdi     # 0x65292
leaq 0x6a049(%rip), %rsi     # 0xb0b20
leaq 0x69aba(%rip), %rdx     # 0xb0598
callq 0xa4f0
leaq 0x6a056(%rip), %rdi     # 0xb0b40
callq 0xa3b0
jmp 0x4682d
leaq 0x48408(%rip), %rdi     # 0x8ef03
callq 0xa360
movq %rax, %rbx
leaq 0x6a036(%rip), %rdi     # 0xb0b40
callq 0xa3a0
jmp 0x46b7b
jmp 0x46b4d
jmp 0x46b4d
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x46b21
movl %ebp, (%r14)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x46b50
movq 0x10(%rsp), %rsi
jmp 0x46b43
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x46b50
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x46b50
movq %rax, %rbx
movq %rbx, %rdi
callq 0xa240
callq 0xa960
jmp 0x46a80
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x46b7b
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5a0
movq %rbx, %rdi
callq 0xaa10
nop