// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r12
movl 0x8(%rsi), %eax
cmpq $0x4, %rax
ja 0x30aac
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0x2ad79(%rip), %rcx     # 0x5b65c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x10, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xb7b0
movq %r12, %rdi
callq 0x23f44
leaq 0x2f25f(%rip), %rsi     # 0x5fb6e
movq %r12, %rdi
callq 0x1cba2
testb %al, %al
jne 0x30934
leaq 0x2c3d3(%rip), %rsi     # 0x5ccf5
leaq 0x8(%rsp), %rdi
callq 0x1cba2
testb %al, %al
je 0x30a20
pushq $0x8
popq %rdi
callq 0xb5a0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3ced8
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x30a14
pushq $0x20
popq %rdi
callq 0xb5a0
movq %rax, %r12
movsd 0x40(%r15), %xmm0
movq 0x48(%r15), %rsi
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3cf7a
jmp 0x30a14
pushq $0x28
popq %rdi
callq 0xb5a0
movq %rax, %r12
addq $0x10, %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3cf18
jmp 0x30a14
pushq $0x10
popq %rdi
callq 0xb5a0
movq %rax, %r12
movq 0x38(%r15), %rsi
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3cf4e
jmp 0x30a14
movq 0x10(%r15), %rax
movzbl (%rax), %eax
cmpl $0x5b, %eax
je 0x309f8
cmpl $0x7b, %eax
jne 0x30ad1
pushq $0x38
popq %rdi
callq 0xb5a0
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3cfd0
jmp 0x30a14
pushq $0x28
popq %rdi
callq 0xb5a0
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x30fc6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2e790(%rip), %rsi     # 0x5f1b7
leaq 0x8(%rsp), %rdi
callq 0x1cba2
testb %al, %al
je 0x30a56
pushq $0x10
popq %rdi
callq 0xb5a0
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3ceee
jmp 0x3094d
leaq 0x2c29c(%rip), %rsi     # 0x5ccf9
leaq 0x8(%rsp), %rdi
callq 0x1cba2
testb %al, %al
je 0x30a8b
pushq $0x10
popq %rdi
callq 0xb5a0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3ceee
jmp 0x3094d
pushq $0x28
popq %rdi
callq 0xb5a0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3cf18
jmp 0x3094d
leaq 0x2c25a(%rip), %rsi     # 0x5cd0d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x3c836
leaq 0x2c227(%rip), %rsi     # 0x5ccff
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x3c836
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r12, %rdi
jmp 0x30b30
jmp 0x30b03
movq %rax, %rbx
pushq $0x10
jmp 0x30b2c
jmp 0x30b37
jmp 0x30b10
jmp 0x30b37
movq %rax, %rbx
jmp 0x30b62
movq %rax, %rbx
pushq $0x28
jmp 0x30b21
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r15, %rdi
jmp 0x30b5d
movq %rax, %rbx
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0xb5b0
jmp 0x30b3a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x30b62
movq %rax, %rbx
pushq $0x10
jmp 0x30b59
movq %rax, %rbx
pushq $0x28
jmp 0x30b59
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r12, %rdi
callq 0xb5b0
movq %rbx, %rdi
callq 0xba30