// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x38(%rax)
testb %al, %al
jne 0x2bce7
testl $0xfffffffd, 0x8(%rbx)  # imm = 0xFFFFFFFD
jne 0x2bce7
leaq 0x10(%rbx), %r14
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x1c948
testb %al, %al
jne 0x2bce7
movb 0x58fbf(%rip), %al      # 0x84b60
testb %al, %al
je 0x2bd03
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0x58f81(%rip), %rdx     # 0x84b40
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x3c9c8
testb %al, %al
je 0x2bbe3
movl $0x5, 0x8(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x3de36
jmp 0x2bce7
leaq 0x10(%rsp), %rdi
callq 0x3de36
leaq 0x30cd2(%rip), %rsi     # 0x5c8c6
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1b7b6
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x1d2b2
movl %eax, %ebp
leaq 0x10(%rsp), %rdi
callq 0xbb68
testb %bpl, %bpl
je 0x2bc5d
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rdx
pushq $-0x1
popq %rcx
movq %r14, %rsi
callq 0xb5e0
leaq 0x10(%rsp), %rdi
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0x3c9e3
movq %rax, 0x38(%rbx)
leaq 0x10(%rsp), %rdi
callq 0xbb68
movl $0x3, 0x8(%rbx)
jmp 0x2bce7
pushq $0x2e
popq %rsi
movq %r14, %rdi
callq 0x1c948
testb %al, %al
jne 0x2bc8a
pushq $0x65
popq %rsi
movq %r14, %rdi
callq 0x1c948
testb %al, %al
jne 0x2bc8a
pushq $0x45
popq %rsi
movq %r14, %rdi
callq 0x1c948
testb %al, %al
je 0x2bcf2
movq %r14, %rdi
callq 0x1dc1d
movsd %xmm0, 0x40(%rbx)
movl $0x4, 0x8(%rbx)
andq $0x0, 0x48(%rbx)
pushq $0x2e
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xb760
cmpq $-0x1, %rax
je 0x2bcd9
movq %rax, %r15
incq %r15
cmpq 0x18(%rbx), %r15
jae 0x2bcd9
movq (%r14), %rax
movsbl (%rax,%r15), %edi
callq 0x3c2f6
testb %al, %al
je 0x2bcd9
incq 0x48(%rbx)
jmp 0x2bcb9
pushq $0x65
popq %rsi
movq %r14, %rdi
callq 0x1c948
movb %al, 0x50(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x3c9ff
movq %rax, 0x38(%rbx)
jmp 0x2bc51
leaq 0x58e56(%rip), %rdi     # 0x84b60
callq 0xba60
testl %eax, %eax
je 0x2bba9
leaq 0x58e22(%rip), %rdi     # 0x84b40
leaq 0x30b77(%rip), %rsi     # 0x5c89c
pushq $0x10
popq %rdx
callq 0x3c948
leaq 0x10c7a(%rip), %rdi     # 0x3c9ae
leaq 0x58e05(%rip), %rsi     # 0x84b40
leaq 0x58876(%rip), %rdx     # 0x845b8
callq 0xb500
leaq 0x58e12(%rip), %rdi     # 0x84b60
callq 0xb3e0
jmp 0x2bba9
movq %rax, %rbx
leaq 0x58dfe(%rip), %rdi     # 0x84b60
callq 0xb3d0
jmp 0x2bda0
jmp 0x2bd6f
jmp 0x2bd7e
jmp 0x2bd7e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbb68
jmp 0x2bd81
movq %rax, %rbx
movq %rbx, %rdi
callq 0xb270
callq 0xb970
jmp 0x2bce7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3de36
movq %rbx, %rdi
callq 0xba30