// File: ncbi[P]amr/common.cpp
// Function: Common_sp::Token::readInput(Common_sp::CharInput&, bool, bool)
void Token::readInput (CharInput &in,
                       bool dashInName_arg,
                       bool consecutiveQuotesInText)
{
	ASSERT (empty ());


  // Skip spaces
	char c = '\0';
	do { c = in. get (); }
	  while (! in. eof && isSpace (c));
	if (in. eof)
		return;  
		
	tp = in. tp;

	if (   c == '\'' 
	    || c == '\"'
	   )
	{
		type = eText;
		quote = c;
		bool prevQuote = false;  // Valid if consecutiveQuotesInText
		for (;;)
		{ 
			c = in. get (); 
			if (in. eof && (! consecutiveQuotesInText || ! prevQuote))
		    in. error ("Text is not finished: end of file", false);
			if (in. tp. eol ())
		    continue;
			if (c == quote)
			{
			  if (consecutiveQuotesInText)
  			{
  		    if (prevQuote)
  		      prevQuote = false;
  		    else
  		    {
  		      prevQuote = true;
  		      continue;
  		    }
  		  }
  		  else 
  		    break;
  		}
		  else
		    if (consecutiveQuotesInText && prevQuote)
		    {
		      in. unget ();
		      break;
		    }
			name += c;
		}
	}
	else if (isDigit (c) || c == '-')
	{
	  bool minusPossible = true;
		while (   ! in. eof 
		       && (   isDigit (c)
		           || c == '.'
		           || toUpper (c) == 'E'
		           || (c == '-' && minusPossible)
		           || c == 'x'
		           || isHex (c)
		          )
		      )
		{ 
			name += c;
			c = in. get (); 
			minusPossible = (toUpper (c) == 'E');
		}
		if (! in. eof)
			in. unget ();
	  if (name == "-")
	    type = eDelimiter;
	  else 
	  {
	    type = eText;
	    toNumberDate ();
	  /*QC_ASSERT (   type == eInteger
	               || type == eDouble
	              );*/
	  }
	}
	else if (isLetter (c))
	{
		type = eName;
		dashInName = dashInName_arg;
		while (! in. eof && (isLetter (c) || (dashInName && c == '-')))
		{ 
			name += c;
			c = in. get (); 
		}
		if (! in. eof)
			in. unget ();
	}
	else if (Common_sp::isDelimiter (c))
	{
	  type = eDelimiter;
		name = c;
	}	
	else
	  in. error ("Unknown token starting with ASCII " + to_string ((int) c), false);
	  	    
	ASSERT (! empty ());
  qc ();

  if (verbose ())
  	cout << tp. str () << type2str (type) << ' ' << *this << endl;
}

// Assembly:
subq $0x378, %rsp            # imm = 0x378
movb %cl, %al
movb %dl, %cl
movq %rdi, 0x370(%rsp)
movq %rsi, 0x368(%rsp)
andb $0x1, %cl
movb %cl, 0x367(%rsp)
andb $0x1, %al
movb %al, 0x366(%rsp)
movq 0x370(%rsp), %rax
movq %rax, 0x80(%rsp)
callq 0xc090
movq 0x80(%rsp), %rdi
movl $0x0, (%rax)
movq (%rdi), %rax
callq *0x38(%rax)
testb $0x1, %al
jne 0x51256
callq 0xc8c0
cmpl $0x0, %eax
jne 0x5124c
leaq 0x2bf(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0xcd00
movq 0x78(%rsp), %rdx
leaq 0x7ca1e(%rip), %rsi     # 0xcda19
leaq 0x2c0(%rsp), %rdi
callq 0x29fd0
jmp 0x5100a
leaq 0x288(%rsp), %rdi
movl $0x92d, %esi            # imm = 0x92D
callq 0x2ded0
jmp 0x5101e
leaq 0x2e0(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
leaq 0x288(%rsp), %rdx
callq 0x2dde0
jmp 0x5103d
leaq 0x7ab5d(%rip), %rdx     # 0xcbba1
leaq 0x300(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x2a2f0
jmp 0x5105b
leaq 0x247(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0xcd00
movq 0x70(%rsp), %rdx
leaq 0x7d75e(%rip), %rsi     # 0xce7d7
leaq 0x248(%rsp), %rdi
callq 0x29fd0
jmp 0x51088
leaq 0x7c987(%rip), %rdx     # 0xcda16
leaq 0x268(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x2a2f0
jmp 0x510a6
leaq 0x320(%rsp), %rdi
leaq 0x300(%rsp), %rsi
leaq 0x268(%rsp), %rdx
callq 0x2dde0
jmp 0x510c5
leaq 0x7d78c(%rip), %rdx     # 0xce858
leaq 0x340(%rsp), %rdi
leaq 0x320(%rsp), %rsi
callq 0x2a2f0
jmp 0x510e3
leaq 0x340(%rsp), %rdi
callq 0x3e9b0
jmp 0x510f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5123a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x5122d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51220
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51213
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x511f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x511ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x511df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x511d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x340(%rsp), %rdi
callq 0xce98
leaq 0x320(%rsp), %rdi
callq 0xce98
leaq 0x268(%rsp), %rdi
callq 0xce98
leaq 0x248(%rsp), %rdi
callq 0xce98
leaq 0x247(%rsp), %rdi
callq 0xc7a0
leaq 0x300(%rsp), %rdi
callq 0xce98
leaq 0x2e0(%rsp), %rdi
callq 0xce98
leaq 0x288(%rsp), %rdi
callq 0xce98
leaq 0x2c0(%rsp), %rdi
callq 0xce98
leaq 0x2bf(%rsp), %rdi
callq 0xc7a0
jmp 0x51bee
movl $0x1, %edi
callq 0xc8d0
movb $0x0, 0x246(%rsp)
movq 0x368(%rsp), %rdi
callq 0x50020
movb %al, 0x246(%rsp)
movq 0x368(%rsp), %rcx
xorl %eax, %eax
testb $0x1, 0x218(%rcx)
movb %al, 0x6f(%rsp)
jne 0x5129a
movsbl 0x246(%rsp), %edi
callq 0x73840
movb %al, 0x6f(%rsp)
movb 0x6f(%rsp), %al
testb $0x1, %al
jne 0x5125e
movq 0x368(%rsp), %rax
testb $0x1, 0x218(%rax)
je 0x512b8
jmp 0x51be6
movq 0x80(%rsp), %rax
movq 0x368(%rsp), %rcx
movq 0x260(%rcx), %rcx
movq %rcx, 0x54(%rax)
movsbl 0x246(%rsp), %eax
cmpl $0x27, %eax
je 0x512f1
movsbl 0x246(%rsp), %eax
cmpl $0x22, %eax
jne 0x5149e
movq 0x80(%rsp), %rax
movl $0x2, 0x8(%rax)
movb 0x246(%rsp), %cl
movb %cl, 0x30(%rax)
movb $0x0, 0x245(%rsp)
movq 0x368(%rsp), %rdi
callq 0x50020
movb %al, 0x246(%rsp)
movq 0x368(%rsp), %rax
testb $0x1, 0x218(%rax)
je 0x513ec
testb $0x1, 0x366(%rsp)
je 0x51353
testb $0x1, 0x245(%rsp)
jne 0x513ec
movq 0x368(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x21f(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xcd00
movq 0x60(%rsp), %rdx
leaq 0x7d493(%rip), %rsi     # 0xce811
leaq 0x220(%rsp), %rdi
callq 0x29fd0
jmp 0x5138d
movq 0x58(%rsp), %rdi
leaq 0x220(%rsp), %rsi
xorl %edx, %edx
callq 0x748c0
jmp 0x513a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x513da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x220(%rsp), %rdi
callq 0xce98
leaq 0x21f(%rsp), %rdi
callq 0xc7a0
jmp 0x51bee
movq 0x368(%rsp), %rdi
addq $0x260, %rdi            # imm = 0x260
callq 0x747d0
testb $0x1, %al
jne 0x51406
jmp 0x5140b
jmp 0x51312
movq 0x80(%rsp), %rcx
movsbl 0x246(%rsp), %eax
movsbl 0x30(%rcx), %ecx
cmpl %ecx, %eax
jne 0x51454
testb $0x1, 0x366(%rsp)
je 0x51450
testb $0x1, 0x245(%rsp)
je 0x51441
movb $0x0, 0x245(%rsp)
jmp 0x5144e
movb $0x1, 0x245(%rsp)
jmp 0x51312
jmp 0x51452
jmp 0x51499
jmp 0x51479
testb $0x1, 0x366(%rsp)
je 0x51477
testb $0x1, 0x245(%rsp)
je 0x51477
movq 0x368(%rsp), %rdi
callq 0x50650
jmp 0x51499
jmp 0x51479
movq 0x80(%rsp), %rdi
movb 0x246(%rsp), %al
addq $0x10, %rdi
movsbl %al, %esi
callq 0xc4c0
jmp 0x51312
jmp 0x51812
movsbl 0x246(%rsp), %edi
callq 0x73780
testb $0x1, %al
jne 0x514c0
movsbl 0x246(%rsp), %eax
cmpl $0x2d, %eax
jne 0x51637
movb $0x1, 0x21e(%rsp)
movq 0x368(%rsp), %rcx
xorl %eax, %eax
testb $0x1, 0x218(%rcx)
movb %al, 0x57(%rsp)
jne 0x51574
movsbl 0x246(%rsp), %edi
callq 0x73780
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x56(%rsp)
jne 0x5156c
movsbl 0x246(%rsp), %ecx
movb $0x1, %al
cmpl $0x2e, %ecx
movb %al, 0x56(%rsp)
je 0x5156c
movsbl 0x246(%rsp), %edi
callq 0x738e0
movsbl %al, %ecx
movb $0x1, %al
cmpl $0x45, %ecx
movb %al, 0x56(%rsp)
je 0x5156c
movsbl 0x246(%rsp), %eax
cmpl $0x2d, %eax
jne 0x51548
movb $0x1, %al
testb $0x1, 0x21e(%rsp)
movb %al, 0x56(%rsp)
jne 0x5156c
movsbl 0x246(%rsp), %ecx
movb $0x1, %al
cmpl $0x78, %ecx
movb %al, 0x56(%rsp)
je 0x5156c
movsbl 0x246(%rsp), %edi
callq 0x73bd0
movb %al, 0x56(%rsp)
movb 0x56(%rsp), %al
movb %al, 0x57(%rsp)
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x5157e
jmp 0x515d1
movq 0x80(%rsp), %rdi
movb 0x246(%rsp), %al
addq $0x10, %rdi
movsbl %al, %esi
callq 0xc4c0
movq 0x368(%rsp), %rdi
callq 0x50020
movb %al, 0x246(%rsp)
movsbl 0x246(%rsp), %edi
callq 0x738e0
movsbl %al, %eax
cmpl $0x45, %eax
sete %al
andb $0x1, %al
movb %al, 0x21e(%rsp)
jmp 0x514c8
movq 0x368(%rsp), %rax
testb $0x1, 0x218(%rax)
jne 0x515ef
movq 0x368(%rsp), %rdi
callq 0x50650
movq 0x80(%rsp), %rdi
addq $0x10, %rdi
leaq 0x7b8fe(%rip), %rsi     # 0xccf00
callq 0x2e1b0
testb $0x1, %al
jne 0x5160d
jmp 0x5161e
movq 0x80(%rsp), %rax
movl $0x1, 0x8(%rax)
jmp 0x51632
movq 0x80(%rsp), %rdi
movl $0x2, 0x8(%rdi)
callq 0x51c00
jmp 0x51810
movsbl 0x246(%rsp), %edi
callq 0x73730
testb $0x1, %al
jne 0x5164d
jmp 0x51731
movq 0x80(%rsp), %rax
movl $0x0, 0x8(%rax)
movb 0x367(%rsp), %cl
andb $0x1, %cl
movb %cl, 0xc(%rax)
movq 0x368(%rsp), %rcx
xorl %eax, %eax
testb $0x1, 0x218(%rcx)
movb %al, 0x55(%rsp)
jne 0x516d0
movsbl 0x246(%rsp), %edi
callq 0x73730
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x54(%rsp)
jne 0x516c8
movq 0x80(%rsp), %rcx
xorl %eax, %eax
testb $0x1, 0xc(%rcx)
movb %al, 0x53(%rsp)
je 0x516c0
movsbl 0x246(%rsp), %eax
cmpl $0x2d, %eax
sete %al
movb %al, 0x53(%rsp)
movb 0x53(%rsp), %al
movb %al, 0x54(%rsp)
movb 0x54(%rsp), %al
movb %al, 0x55(%rsp)
movb 0x55(%rsp), %al
testb $0x1, %al
jne 0x516da
jmp 0x5170e
movq 0x80(%rsp), %rdi
movb 0x246(%rsp), %al
addq $0x10, %rdi
movsbl %al, %esi
callq 0xc4c0
movq 0x368(%rsp), %rdi
callq 0x50020
movb %al, 0x246(%rsp)
jmp 0x51669
movq 0x368(%rsp), %rax
testb $0x1, 0x218(%rax)
jne 0x5172c
movq 0x368(%rsp), %rdi
callq 0x50650
jmp 0x5180e
movsbl 0x246(%rsp), %edi
callq 0x74960
testb $0x1, %al
jne 0x51744
jmp 0x5176b
movq 0x80(%rsp), %rdi
movl $0x1, 0x8(%rdi)
movb 0x246(%rsp), %al
addq $0x10, %rdi
movsbl %al, %esi
callq 0xcc00
jmp 0x5180c
movq 0x368(%rsp), %rax
movq %rax, 0x40(%rsp)
movsbl 0x246(%rsp), %esi
leaq 0x1d8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x2ded0
movq 0x48(%rsp), %rdx
leaq 0x7d095(%rip), %rsi     # 0xce833
leaq 0x1f8(%rsp), %rdi
callq 0x2a340
jmp 0x517ad
movq 0x40(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
xorl %edx, %edx
callq 0x748c0
jmp 0x517c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x517fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0xce98
leaq 0x1d8(%rsp), %rdi
callq 0xce98
jmp 0x51bee
jmp 0x5180e
jmp 0x51810
jmp 0x51812
callq 0xc090
movq 0x80(%rsp), %rdi
movl $0x0, (%rax)
movq (%rdi), %rax
callq *0x38(%rax)
testb $0x1, %al
jne 0x51834
jmp 0x51abb
callq 0xc8c0
cmpl $0x0, %eax
jne 0x51ab1
leaq 0x137(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xcd00
movq 0x38(%rsp), %rdx
leaq 0x7c1b9(%rip), %rsi     # 0xcda19
leaq 0x138(%rsp), %rdi
callq 0x29fd0
jmp 0x5186f
leaq 0x110(%rsp), %rdi
movl $0x991, %esi            # imm = 0x991
callq 0x2ded0
jmp 0x51883
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rsi
leaq 0x110(%rsp), %rdx
callq 0x2dde0
jmp 0x518a2
leaq 0x7a2f8(%rip), %rdx     # 0xcbba1
leaq 0x178(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x2a2f0
jmp 0x518c0
leaq 0xcf(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xcd00
movq 0x30(%rsp), %rdx
leaq 0x7cef9(%rip), %rsi     # 0xce7d7
leaq 0xd0(%rsp), %rdi
callq 0x29fd0
jmp 0x518ed
leaq 0x7c122(%rip), %rdx     # 0xcda16
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x2a2f0
jmp 0x5190b
leaq 0x198(%rsp), %rdi
leaq 0x178(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x2dde0
jmp 0x5192a
leaq 0x7cf25(%rip), %rdx     # 0xce856
leaq 0x1b8(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x2a2f0
jmp 0x51948
leaq 0x1b8(%rsp), %rdi
callq 0x3e9b0
jmp 0x51957
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51a9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51a92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51a85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51a78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51a5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51a51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51a44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51a37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0xce98
leaq 0x198(%rsp), %rdi
callq 0xce98
leaq 0xf0(%rsp), %rdi
callq 0xce98
leaq 0xd0(%rsp), %rdi
callq 0xce98
leaq 0xcf(%rsp), %rdi
callq 0xc7a0
leaq 0x178(%rsp), %rdi
callq 0xce98
leaq 0x158(%rsp), %rdi
callq 0xce98
leaq 0x110(%rsp), %rdi
callq 0xce98
leaq 0x138(%rsp), %rdi
callq 0xce98
leaq 0x137(%rsp), %rdi
callq 0xc7a0
jmp 0x51bee
movl $0x1, %edi
callq 0xc8d0
movq 0x80(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
xorl %edi, %edi
callq 0x4a800
testb $0x1, %al
jne 0x51ad9
jmp 0x51be6
movq 0x80(%rsp), %rsi
addq $0x54, %rsi
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4ebf0
movq 0x20(%rsp), %rsi
movq 0xb448d(%rip), %rdi     # 0x105f90
callq 0xc660
movq %rax, 0x28(%rsp)
jmp 0x51b0f
movq 0x80(%rsp), %rax
movl 0x8(%rax), %esi
leaq 0x88(%rsp), %rdi
callq 0x749e0
jmp 0x51b29
movq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xc660
movq %rax, 0x18(%rsp)
jmp 0x51b42
movq 0x18(%rsp), %rdi
movl $0x20, %esi
callq 0xc870
movq %rax, 0x10(%rsp)
jmp 0x51b58
movq 0x80(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x749b0
movq %rax, 0x8(%rsp)
jmp 0x51b71
movq 0x8(%rsp), %rdi
movq 0xb43c3(%rip), %rsi     # 0x105f40
callq 0xc760
jmp 0x51b84
leaq 0x88(%rsp), %rdi
callq 0xce98
leaq 0xa8(%rsp), %rdi
callq 0xce98
jmp 0x51be6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x51bd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xce98
leaq 0xa8(%rsp), %rdi
callq 0xce98
jmp 0x51bee
addq $0x378, %rsp            # imm = 0x378
retq
movq 0x2b0(%rsp), %rdi
callq 0xccf0
nopl (%rax,%rax)