// File: /workspace/github_cpp_makefile_star2_O1/atfrank[P]PCASA/lib/PDB.cpp
// Function: PDB::readPDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, bool)
Molecule* PDB::readPDB(const std::string ifile, const int model, const std::string format, const bool hetFlag, const bool remFlag){
  std::ifstream pdbFile;
  std::istream* inp;
  std::string line;
  int currModel=0;
  bool modelFlag=true;
  bool firstModelFlag=false;
  Molecule *mol;
  Chain *chnEntry=new Chain;
  Residue *resEntry=new Residue;
  Atom *atmEntry; //Created in heap by processAtomLine
  Atom *lastAtom;
  PDB pdb;
  std::string PDBID;
  unsigned int year;

  if (format.compare("CHARMM") == 0){
    mol=new MoleculeCHARMM;
  }
  else{
    mol=new Molecule;
  }

  atmEntry=NULL;
  lastAtom=NULL;
  mol->setCopyFlag(false);

  if (ifile.compare("-") == 0){ //Input from pipe
    inp=&std::cin;
  }
  else{ //Input from file
    pdbFile.open((ifile).c_str(), std::ios::in);
    inp=&pdbFile;
    PDBID=Misc::toupper(ifile.substr(0,4));
    mol->setTag(PDBID);
  }

  while (inp->good() && !(inp->eof())){

    getline(*inp,line);
    if (line.compare(0,6,"HEADER") == 0){
      std::stringstream(line.substr(57,2)) >> year;
      if (year < 71){
        mol->setYear(year+2000);
      }
      else{
        mol->setYear(year+1900);
      }
      if (Misc::trim(line.substr(62,4)).length() == 4){
        PDBID=Misc::toupper(Misc::trim(line.substr(62,4)));
      }
    }
    else if (line.compare(0,6,"EXPDTA") == 0){
      mol->setExp(Misc::trim(line.substr(10,60)));
    }
    else if (line.size() > 6 && line.compare(0,6,"MODEL ") == 0){
      std::stringstream(line.substr(10,4)) >> currModel;
      if ((model==0 && firstModelFlag==false) || currModel==model){
        firstModelFlag=true; //Processed first model
        modelFlag=true;
      }
      else{
        modelFlag=false;
      }
    }
    else if (line.size() > 6 && line.compare(0,6,"REMARK") == 0 && remFlag == true){
      mol->addRemark(line);
    }
    else if (modelFlag && line.size() >= 54 && (line.compare(0,4,"ATOM") == 0 || (line.compare(0,6,"HETATM") == 0 && hetFlag == true) || (line.compare(0,5,"HETAT") == 0 && hetFlag == true))){
      //Atom
      atmEntry=pdb.processAtomLine(line, lastAtom);
      atmEntry->setTag(PDBID);
      if (lastAtom != NULL && lastAtom->getResId() == atmEntry->getResId()){
        if (lastAtom->getResName().compare(atmEntry->getResName()) == 0 && (lastAtom->getAlt().compare(0,1," ") == 0 || lastAtom->getAlt().compare(0,1,atmEntry->getAlt(),0,1) == 0)){
          //Eliminate other alternate locations besides first
          mol->addAtom(atmEntry);
        }
        else{
          continue;
        }
      }
      else{
        mol->addAtom(atmEntry);
      }

      //Residue/Chain
      if (lastAtom != NULL && atmEntry->getChainId().compare(lastAtom->getChainId()) != 0) {
        //Store last
        chnEntry->addResidue(resEntry);
        mol->addResidue(resEntry);
        mol->addChain(chnEntry);
        //Create new
        chnEntry=new Chain;
        resEntry=new Residue;
      }
      else if (lastAtom != NULL && lastAtom->getResId() != atmEntry->getResId()){
        chnEntry->addResidue(resEntry);
        mol->addResidue(resEntry);
        resEntry=new Residue;
      }
      else{
        //Do nothing
      }
      
      atmEntry->setResidue(resEntry);
      atmEntry->setChain(chnEntry);
      resEntry->addAtom(atmEntry);
      chnEntry->addAtom(atmEntry);

      //Update for next atom
      lastAtom=atmEntry;
    }
    else{
      continue;
    }
  }
  //Add remaining residues and chains
  if (resEntry->getAtmVecSize() > 0){
    chnEntry->addResidue(resEntry);
    mol->addResidue(resEntry);
    mol->addChain(chnEntry);
  }
  
  if (ifile.compare("-") != 0 && pdbFile.is_open()){
    pdbFile.close();
  }

  if (mol->getAtmVecSize() == 0){
    std::cerr << std::endl << "Error: The PDB file \"" << ifile << "\" ";
    std::cerr << "did not contain any valid atoms" << std::endl << std::endl;
    exit(1);
  }

  mol->setICodeFlag(mol->checkICode());

  return mol;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x528, %rsp            # imm = 0x528
movl %r8d, 0x3c(%rsp)
movl %ecx, 0x88(%rsp)
movq %rdx, %rbx
movl %esi, 0x90(%rsp)
movq %rdi, %r13
leaq 0x320(%rsp), %rdi
callq 0x4330
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movl $0x0, 0x8c(%rsp)
movl $0x30, %edi
callq 0x42d0
movq %rax, %r14
movq %rax, %rdi
callq 0x20514
movl $0x18, %edi
callq 0x42d0
movq %r14, 0x10(%rsp)
movq %rax, (%rsp)
movq %rax, %rdi
callq 0x2f72c
leaq 0x150(%rsp), %rax
movl $0x0, (%rax)
xorl %r15d, %r15d
movq %r15, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r15, 0x20(%rax)
leaq 0x188(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r15, -0x8(%rax)
movb %r15b, (%rax)
leaq 0x148(%rsp), %r14
movq %r14, %rdi
callq 0x2ccba
movq %r15, 0x38(%r14)
movq 0x30(%r14), %rax
movb %r15b, (%rax)
leaq 0x70(%rsp), %r14
movq %r14, -0x10(%r14)
movq %r15, -0x8(%r14)
movb %r15b, (%r14)
leaq 0x12f32(%rip), %rsi     # 0x3d59a
movq %rbx, %rdi
callq 0x40e0
testl %eax, %eax
je 0x2a68b
movl $0x1a0, %edi            # imm = 0x1A0
callq 0x42d0
movq %rax, %r15
movq %rax, %rdi
callq 0x23600
jmp 0x2a6ae
movl $0x1a0, %edi            # imm = 0x1A0
callq 0x42d0
movq %rax, %r15
movq %rax, %rdi
callq 0x23600
leaq 0x3c66b1(%rip), %rax    # 0x3f0d58
addq $0x10, %rax
movq %rax, (%r15)
movq %r15, 0x8(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x23f30
leaq 0x12d76(%rip), %rsi     # 0x3d43a
movq %r13, %rdi
callq 0x40e0
testl %eax, %eax
je 0x2a777
movq (%r13), %rsi
leaq 0x320(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x41c0
leaq 0x18(%rsp), %rdi
movl $0x4, %ecx
movq %r13, %rsi
xorl %edx, %edx
callq 0x4300
leaq 0x198(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x22186
leaq 0x60(%rsp), %rdi
leaq 0x198(%rsp), %r15
movq %r15, %rsi
callq 0x4370
movq (%r15), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2a748
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
movq 0x8(%rsp), %r15
je 0x2a768
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x60(%rsp), %rsi
movq %r15, %rdi
callq 0x23f7e
jmp 0x2a77e
movq 0x3c685a(%rip), %rbx    # 0x3f0fd8
movq %r13, 0x120(%rsp)
movq (%rbx), %rax
movq -0x18(%rax), %rdi
cmpl $0x0, 0x20(%rbx,%rdi)
jne 0x2af91
addq %rbx, %rdi
leaq 0x198(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x98(%rsp)
movb $0x1, %r14b
xorl %r13d, %r13d
leaq 0x40(%rsp), %r15
movl 0x3c(%rsp), %eax
xorb $0x1, %al
movl %eax, 0x3c(%rsp)
movl $0x0, 0x84(%rsp)
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4570
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12eac(%rip), %rcx     # 0x3d6a6
callq 0x43c0
testl %eax, %eax
je 0x2aaab
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12e95(%rip), %rcx     # 0x3d6ad
callq 0x43c0
testl %eax, %eax
je 0x2ab58
cmpq $0x7, 0x48(%rsp)
jb 0x2a84b
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12e76(%rip), %rcx     # 0x3d6b4
callq 0x43c0
testl %eax, %eax
je 0x2ae2d
cmpq $0x7, 0x48(%rsp)
jb 0x2a878
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12e57(%rip), %rcx     # 0x3d6bb
callq 0x43c0
testl %eax, %eax
setne %al
orb 0x3c(%rsp), %al
je 0x2aee9
testb $0x1, %r14b
je 0x2af7b
cmpq $0x36, 0x48(%rsp)
jb 0x2af7b
movl $0x4, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x11db1(%rip), %rcx     # 0x3c650
callq 0x43c0
testl %eax, %eax
je 0x2a8f9
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12e09(%rip), %rcx     # 0x3d6c2
callq 0x43c0
testl %eax, %eax
sete %al
testb %al, 0x88(%rsp)
jne 0x2a8f9
movl $0x5, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12dec(%rip), %rcx     # 0x3d6c9
callq 0x43c0
testl %eax, %eax
setne %al
movl 0x88(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x2af7b
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x6486
leaq 0x148(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
movq %r13, %rdx
callq 0x2b3a8
movq %rax, %rbp
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2a963
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq %rbp, %rdi
leaq 0x60(%rsp), %rsi
callq 0x14ec2
testq %r13, %r13
je 0x2aa0f
movq %r13, %rdi
callq 0x14aae
movl (%rax), %r12d
movq %rbp, %rdi
callq 0x14aae
cmpl (%rax), %r12d
jne 0x2aa0f
movq %r13, %rdi
callq 0x14a8e
movq %rax, %r12
movq %rbp, %rdi
callq 0x14a8e
movq %r12, %rdi
movq %rax, %rsi
callq 0x4050
testl %eax, %eax
jne 0x2af7b
movq %r13, %rdi
callq 0x14a7e
movl $0x1, %edx
movq %rax, %rdi
xorl %esi, %esi
leaq 0x12cd0(%rip), %rcx     # 0x3d6a0
callq 0x43c0
testl %eax, %eax
je 0x2aa0f
movq %r13, %rdi
callq 0x14a7e
movq %rax, %r12
movq %rbp, %rdi
callq 0x14a7e
movl $0x1, %edx
movl $0x1, %r9d
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x4070
testl %eax, %eax
jne 0x2af7b
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x23b68
testq %r13, %r13
je 0x2af46
movq %rbp, %rdi
callq 0x14a9e
movq %rax, %r12
movq %r13, %rdi
callq 0x14a9e
movq %r12, %rdi
movq %rax, %rsi
callq 0x4050
testl %eax, %eax
je 0x2aefb
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x2055c
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x23fb4
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x23ffe
movl $0x30, %edi
callq 0x42d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x20514
movl $0x18, %edi
callq 0x42d0
movq %rax, (%rsp)
movq (%rsp), %rdi
callq 0x2f72c
jmp 0x2af46
movl $0x39, %edx
movl $0x2, %ecx
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x4300
leaq 0x198(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
movl $0x18, %edx
callq 0x4490
movq %r12, %rdi
leaq 0x94(%rsp), %rsi
callq 0x4540
movq %r12, %rdi
movq 0x3c64b1(%rip), %rsi    # 0x3f0fa8
callq 0x4240
movq 0x98(%rsp), %rdi
callq 0x4110
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2ab25
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42e0
movl 0x94(%rsp), %eax
cmpl $0x46, %eax
ja 0x2ac29
addl $0x7d0, %eax            # imm = 0x7D0
movl %eax, 0x198(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x23f36
jmp 0x2ac47
movl $0xa, %edx
movl $0x3c, %ecx
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x4300
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0xc0(%rsp), %rbp
movq %rbp, %rdi
leaq 0x12b0f(%rip), %rsi     # 0x3d6a0
leaq 0x12b09(%rip), %rdx     # 0x3d6a1
callq 0x6516
leaq 0x198(%rsp), %r12
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
movq %rbp, %rdx
callq 0x21f22
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x23f48
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2abe7
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x2ac0c
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2af7b
movq 0x28(%rsp), %rsi
jmp 0x2ae20
addl $0x76c, %eax            # imm = 0x76C
movl %eax, 0x198(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x23f36
movl $0x3e, %edx
movl $0x4, %ecx
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x4300
leaq 0x110(%rsp), %rax
movq %rax, 0x100(%rsp)
leaq 0x100(%rsp), %r12
movq %r12, %rdi
leaq 0x12a20(%rip), %rsi     # 0x3d6a0
leaq 0x12a1a(%rip), %rdx     # 0x3d6a1
callq 0x6516
leaq 0x198(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %r12, %rdx
callq 0x21f22
movq 0x198(%rsp), %rdi
movq 0x1a0(%rsp), %r12
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2acce
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x2acf3
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2ad0f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42e0
cmpq $0x4, %r12
jne 0x2af7b
movl $0x3e, %edx
movl $0x4, %ecx
leaq 0x128(%rsp), %rdi
movq %r15, %rsi
callq 0x4300
leaq 0xf0(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0xe0(%rsp), %r12
movq %r12, %rdi
leaq 0x1294b(%rip), %rsi     # 0x3d6a0
leaq 0x12945(%rip), %rdx     # 0x3d6a1
callq 0x6516
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
leaq 0x128(%rsp), %rsi
movq %r12, %rdx
callq 0x21f22
leaq 0x198(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x22186
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x4370
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2adbe
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2adda
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x2adff
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x2af7b
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2af7b
movl $0xa, %edx
movl $0x4, %ecx
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x4300
leaq 0x198(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movl $0x18, %edx
callq 0x4490
movq %r14, %rdi
leaq 0x8c(%rsp), %rsi
callq 0x41b0
movq %r14, %rdi
movq 0x3c612f(%rip), %rsi    # 0x3f0fa8
callq 0x4240
movq 0x98(%rsp), %rdi
callq 0x4110
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2aea7
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42e0
movl 0x90(%rsp), %edx
testl %edx, %edx
sete %al
movl 0x84(%rsp), %esi
testb $0x1, %sil
sete %cl
andb %al, %cl
cmpl %edx, 0x8c(%rsp)
sete %r14b
orb %cl, %r14b
movzbl %sil, %esi
movl $0x1, %eax
cmovnel %eax, %esi
movl %esi, 0x84(%rsp)
jmp 0x2af7b
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x26cd0
jmp 0x2af7b
movq %r13, %rdi
callq 0x14aae
movl (%rax), %r12d
movq %rbp, %rdi
callq 0x14aae
cmpl (%rax), %r12d
je 0x2af46
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x2055c
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x23fb4
movl $0x18, %edi
callq 0x42d0
movq %rax, (%rsp)
movq (%rsp), %rdi
callq 0x2f72c
movq %rbp, %rdi
movq (%rsp), %rsi
callq 0x14f52
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
callq 0x14f88
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x2f758
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x205a2
movq %rbp, %r13
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
cmpl $0x0, 0x20(%rbx,%rax)
je 0x2a7d1
movq (%rsp), %rdi
leaq 0x50(%rsp), %r12
leaq 0x70(%rsp), %r14
callq 0x2f884
movq 0x120(%rsp), %r15
testl %eax, %eax
je 0x2afdb
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x2055c
movq 0x8(%rsp), %rdi
movq (%rsp), %rsi
callq 0x23fb4
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x23ffe
leaq 0x12458(%rip), %rsi     # 0x3d43a
movq %r15, %rdi
callq 0x40e0
testl %eax, %eax
je 0x2b00c
leaq 0x398(%rsp), %rdi
callq 0x40b0
testb %al, %al
je 0x2b00c
leaq 0x320(%rsp), %rdi
callq 0x4090
movq 0x8(%rsp), %rdi
callq 0x24830
testl %eax, %eax
je 0x2b0bc
movq 0x8(%rsp), %rdi
callq 0x24074
movzbl %al, %esi
movq 0x8(%rsp), %rdi
callq 0x2406c
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b04c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
movq 0x8(%rsp), %rbx
je 0x2b076
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x148(%rsp), %rdi
callq 0x2cc42
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b09a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x320(%rsp), %rdi
callq 0x40c0
movq %rbx, %rax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3c5f2d(%rip), %rdi    # 0x3f0ff0
callq 0x4150
movq %rax, %rbx
leaq 0x125fd(%rip), %rsi     # 0x3d6cf
movl $0x15, %edx
movq %rax, %rdi
callq 0x4340
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x125f0(%rip), %rsi     # 0x3d6e5
movl $0x2, %edx
movq %rax, %rdi
callq 0x4340
movq 0x3c5ee7(%rip), %rdi    # 0x3f0ff0
leaq 0x125d8(%rip), %rsi     # 0x3d6e8
movl $0x1f, %edx
callq 0x4340
movq 0x3c5ecf(%rip), %rdi    # 0x3f0ff0
callq 0x4150
movq %rax, %rdi
callq 0x4150
movl $0x1, %edi
callq 0x4360
jmp 0x2b13a
movq %rax, %rbx
movl $0x18, %esi
movq (%rsp), %rdi
jmp 0x2b33f
movq %rax, %rbx
movl $0x30, %esi
movq 0x10(%rsp), %rdi
jmp 0x2b33f
jmp 0x2b273
jmp 0x2b299
jmp 0x2b34b
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2b190
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2b190
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x2b1ba
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2b1ba
movq %rax, %rbx
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x2b34e
movq 0x138(%rsp), %rsi
jmp 0x2b33c
jmp 0x2b34b
jmp 0x2b34b
jmp 0x2b34b
movq %rax, %rbx
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2b21c
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2b21c
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x2b29c
movq 0xd0(%rsp), %rsi
jmp 0x2b262
jmp 0x2b299
jmp 0x2b34b
movq %rax, %rbx
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x2b29c
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2b29c
jmp 0x2b299
jmp 0x2b34b
movq %rax, %rbx
movq 0x3c5d2b(%rip), %rsi    # 0x3f0fa8
leaq 0x198(%rsp), %rdi
callq 0x4240
leaq 0x218(%rsp), %rdi
callq 0x4110
jmp 0x2b29c
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x2b34e
movq 0x28(%rsp), %rsi
jmp 0x2b33c
jmp 0x2b34b
jmp 0x2b2e1
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b358
movq 0x28(%rsp), %rsi
incq %rsi
jmp 0x2b2ec
jmp 0x2b346
movq %rax, %rbx
movl $0x1a0, %esi            # imm = 0x1A0
movq %r15, %rdi
callq 0x42e0
jmp 0x2b358
movq %rax, %rbx
movl $0x18, %esi
movq (%rsp), %rdi
jmp 0x2b30e
jmp 0x2b315
movq %rax, %rbx
movl $0x30, %esi
movq %r14, %rdi
callq 0x42e0
jmp 0x2b37c
movq %rax, %rbx
jmp 0x2b37c
jmp 0x2b34b
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2b34e
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2b34e
movq %rax, %rbx
jmp 0x2b358
movq %rax, %rbx
leaq 0x50(%rsp), %r12
leaq 0x70(%rsp), %r14
movq 0x60(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b36f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x148(%rsp), %rdi
callq 0x2cba0
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b393
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x320(%rsp), %rdi
callq 0x40c0
movq %rbx, %rdi
callq 0x4550