// File: /workspace/github_cpp_makefile_star2_O1/ncbi[P]amr/common.cpp
// Function: Common_sp::Json::parse(Common_sp::CharInput&, Common_sp::Token const&, Common_sp::JsonContainer*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Json::parse (CharInput& in,
                  const Token& firstToken,
                  JsonContainer* parent,
                  const string& name)
{
  switch (firstToken. type)
  {
    case Token::eName:
      {
        string tokenName (firstToken. name);
        strLower (tokenName);
        if (   tokenName == "null"
            || tokenName == "nan"
           )
          new JsonNull (parent, name);
        else if (tokenName == "true")
          new JsonBoolean (true, parent, name);
        else if (tokenName == "false")
          new JsonBoolean (false, parent, name);
        else
          new JsonString (firstToken. name, parent, name);
      }
      break;
    case Token::eText: new JsonString (firstToken. name, parent, name); break;
    case Token::eInteger: new JsonInt (firstToken. n, parent, name); break;
    case Token::eDouble: new JsonDouble (firstToken. d, firstToken. decimals, parent, name); break;
    case Token::eDelimiter:
      switch (firstToken. name [0])
      {
        case '{': new JsonMap   (in, parent, name); break;
        case '[': new JsonArray (in, parent, name); break;
        default: in. error ("Bad delimiter", false);
      }
      break;
    default: in. error ("Bad token", false);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r12
movl 0x8(%rsi), %eax
cmpq $0x4, %rax
ja 0x4f4a5
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0x3d440(%rip), %rcx     # 0x8c65c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x2c652
movq 0x8(%r12), %r12
testq %r12, %r12
je 0x4f270
movq 0x8(%rsp), %rbp
xorl %r13d, %r13d
movsbl (%rbp,%r13), %edi
callq 0xa810
movb %al, (%rbp,%r13)
incq %r13
cmpq %r13, %r12
jne 0x4f258
leaq 0x41947(%rip), %rsi     # 0x90bbe
leaq 0x8(%rsp), %rdi
callq 0xa160
testl %eax, %eax
je 0x4f3da
leaq 0x3ea70(%rip), %rsi     # 0x8dd00
leaq 0x8(%rsp), %rdi
callq 0xa160
testl %eax, %eax
je 0x4f3da
leaq 0x40f62(%rip), %rsi     # 0x9020b
leaq 0x8(%rsp), %rdi
callq 0xa160
testl %eax, %eax
je 0x4f44a
leaq 0x3ea42(%rip), %rsi     # 0x8dd04
leaq 0x8(%rsp), %rdi
callq 0xa160
testl %eax, %eax
je 0x4f476
movl $0x28, %edi
callq 0xa590
movq %rax, %r12
addq $0x10, %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x6582c
jmp 0x4f3ff
movl $0x20, %edi
callq 0xa590
movq %rax, %r12
movsd 0x40(%r15), %xmm0
movq 0x48(%r15), %rsi
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x6586e
jmp 0x4f43b
movl $0x28, %edi
callq 0xa590
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4e794
leaq 0x60211(%rip), %rax     # 0xaf558
movq %rax, (%r12)
leaq 0x8(%r12), %rdi
movq %r12, %rax
addq $0x18, %rax
movq %rax, 0x8(%r12)
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
addq %rsi, %rdx
callq 0x2c652
jmp 0x4f43b
movl $0x10, %edi
callq 0xa590
movq %rax, %r12
movq 0x38(%r15), %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4e794
leaq 0x60269(%rip), %rax     # 0xaf600
movq %rax, (%r12)
movq %r15, 0x8(%r12)
jmp 0x4f43b
movq 0x10(%r15), %rax
movzbl (%rax), %eax
cmpl $0x5b, %eax
je 0x4f41d
cmpl $0x7b, %eax
jne 0x4f4d5
movl $0x38, %edi
callq 0xa590
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x65900
jmp 0x4f43b
movl $0x8, %edi
callq 0xa590
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4e794
leaq 0x6000c(%rip), %rax     # 0xaf408
movq %rax, (%r15)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4f43b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x4f43b
movl $0x28, %edi
callq 0xa590
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x4fad6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0xa590
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4e794
leaq 0x60044(%rip), %rax     # 0xaf4b0
movq %rax, (%r15)
movb $0x1, 0x8(%r15)
jmp 0x4f3ff
movl $0x10, %edi
callq 0xa590
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4e794
leaq 0x60018(%rip), %rax     # 0xaf4b0
movq %rax, (%r15)
movb $0x0, 0x8(%r15)
jmp 0x4f3ff
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3e863(%rip), %rsi     # 0x8dd18
leaq 0x3e865(%rip), %rdx     # 0x8dd21
leaq 0x8(%rsp), %rdi
callq 0x2fdd8
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x650c2
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3e825(%rip), %rsi     # 0x8dd0a
leaq 0x3e82b(%rip), %rdx     # 0x8dd17
leaq 0x8(%rsp), %rdi
callq 0x2fdd8
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x650c2
jmp 0x4f507
movq %rax, %rbx
movl $0x10, %esi
jmp 0x4f555
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
jmp 0x4f558
jmp 0x4f522
jmp 0x4f531
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x4f571
jmp 0x4f59f
movq %rax, %rbx
jmp 0x4f59f
movq %rax, %rbx
movl $0x28, %esi
jmp 0x4f548
movq %rax, %rbx
movl $0x38, %esi
movq %r15, %rdi
jmp 0x4f59a
movq %rax, %rbx
movl $0x8, %esi
movq %r15, %rdi
callq 0xa5a0
jmp 0x4f562
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4f59f
movq 0x18(%rsp), %rsi
incq %rsi
jmp 0x4f59a
movq %rax, %rbx
movl $0x10, %esi
jmp 0x4f597
movq %rax, %rbx
movl $0x20, %esi
jmp 0x4f597
movq %rax, %rbx
movl $0x28, %esi
movq %r12, %rdi
callq 0xa5a0
movq %rbx, %rdi
callq 0xaa10
nop