// File: /workspace/github_cpp_makefile_star2_O3/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, 0x40(%rsp)
movl %ecx, 0x48(%rsp)
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r13
leaq 0x320(%rsp), %rdi
callq 0x4330
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0x0, 0x4c(%rsp)
movl $0x30, %edi
callq 0x42d0
movq %rax, %r14
movq %rax, %rdi
callq 0x203b4
movl $0x18, %edi
callq 0x42d0
movq %r14, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0x2f47c
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 0x2ca1e
movq %r15, 0x38(%r14)
movq 0x30(%r14), %rax
movb %r15b, (%rax)
leaq 0x90(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r15, -0x8(%rax)
movb %r15b, (%rax)
leaq 0x1219b(%rip), %rsi     # 0x3c57a
movq %rbx, %rdi
callq 0x40e0
testl %eax, %eax
je 0x2a402
movl $0x1a0, %edi            # imm = 0x1A0
callq 0x42d0
movq %rax, %r14
movq %rax, %rdi
callq 0x23410
jmp 0x2a425
movl $0x1a0, %edi            # imm = 0x1A0
callq 0x42d0
movq %rax, %r14
movq %rax, %rdi
callq 0x23410
leaq 0x3c593a(%rip), %rax    # 0x3efd58
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x23d3c
leaq 0x11fe4(%rip), %rsi     # 0x3c41a
movq %r13, %rdi
callq 0x40e0
testl %eax, %eax
je 0x2a4ea
movq (%r13), %rsi
leaq 0x320(%rsp), %r12
movq %r12, %rdi
movl $0x8, %edx
callq 0x41c0
leaq 0x20(%rsp), %rdi
movl $0x4, %ecx
movq %r13, %rsi
xorl %edx, %edx
callq 0x4300
leaq 0x198(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x21fea
leaq 0x80(%rsp), %rdi
leaq 0x198(%rsp), %rbx
movq %rbx, %rsi
callq 0x4370
movq (%rbx), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2a4bd
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a4d8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x80(%rsp), %rsi
movq %r14, %rdi
callq 0x23d8a
jmp 0x2a4f1
movq 0x3c5ae7(%rip), %r12    # 0x3effd8
movq %r13, 0x120(%rsp)
movq (%r12), %rax
movq -0x18(%rax), %rdi
cmpl $0x0, 0x20(%r12,%rdi)
jne 0x2acfd
movl %ebp, 0x58(%rsp)
addq %r12, %rdi
leaq 0x198(%rsp), %rax
addq $0x80, %rax
movq %rax, 0x50(%rsp)
movb $0x1, 0xf(%rsp)
xorl %ebp, %ebp
leaq 0x60(%rsp), %r15
movl 0x40(%rsp), %eax
xorb $0x1, %al
movl %eax, 0x40(%rsp)
movl $0x0, 0x44(%rsp)
movl $0xa, %esi
callq 0x42a0
movsbl %al, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4570
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12118(%rip), %rcx     # 0x3c686
callq 0x43c0
testl %eax, %eax
je 0x2a799
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12101(%rip), %rcx     # 0x3c68d
callq 0x43c0
testl %eax, %eax
je 0x2a83b
cmpq $0x7, 0x68(%rsp)
jb 0x2ace5
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x120de(%rip), %rcx     # 0x3c694
callq 0x43c0
testl %eax, %eax
je 0x2ab0f
cmpq $0x7, 0x68(%rsp)
jb 0x2ace5
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x120bb(%rip), %rcx     # 0x3c69b
callq 0x43c0
testl %eax, %eax
setne %al
orb 0x40(%rsp), %al
je 0x2abbb
cmpq $0x36, 0x68(%rsp)
setae %al
andb 0xf(%rsp), %al
cmpb $0x1, %al
jne 0x2ace5
movl $0x4, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x11036(%rip), %rcx     # 0x3b650
callq 0x43c0
testl %eax, %eax
je 0x2a66e
movl $0x6, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x1206e(%rip), %rcx     # 0x3c6a2
callq 0x43c0
testl %eax, %eax
sete %al
testb %al, 0x48(%rsp)
jne 0x2a66e
movl $0x5, %edx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x12054(%rip), %rcx     # 0x3c6a9
callq 0x43c0
testl %eax, %eax
setne %al
movl 0x48(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x2ace5
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x647c
leaq 0x148(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
movq %rbp, %rdx
callq 0x2b0fa
movq %rax, %r13
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2a6d8
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq %r13, %rdi
leaq 0x80(%rsp), %rsi
callq 0x14d50
testq %rbp, %rbp
je 0x2abcb
movq %rbp, %rdi
callq 0x14936
movl (%rax), %ebx
movq %r13, %rdi
callq 0x14936
cmpl (%rax), %ebx
jne 0x2abcb
movq %rbp, %rdi
callq 0x14916
movq %rax, %rbx
movq %r13, %rdi
callq 0x14916
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4050
testl %eax, %eax
jne 0x2ace5
movq %rbp, %rdi
callq 0x14906
movl $0x1, %edx
movq %rax, %rdi
xorl %esi, %esi
leaq 0x11f36(%rip), %rcx     # 0x3c680
callq 0x43c0
testl %eax, %eax
je 0x2a789
movq %rbp, %rdi
callq 0x14906
movq %rax, %rbx
movq %r13, %rdi
callq 0x14906
movl $0x1, %edx
movl $0x1, %r9d
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x4070
testl %eax, %eax
jne 0x2ace5
movq %r14, %rdi
movq %r13, %rsi
callq 0x23978
jmp 0x2abdf
movl $0x39, %edx
movl $0x2, %ecx
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x4300
leaq 0x198(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movl $0x18, %edx
callq 0x4490
movq %rbx, %rdi
leaq 0x5c(%rsp), %rsi
callq 0x4540
movq %rbx, %rdi
movq 0x3c57c6(%rip), %rsi    # 0x3effa8
callq 0x4240
movq 0x50(%rsp), %rdi
callq 0x4110
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2a80d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42e0
movl 0x5c(%rsp), %eax
cmpl $0x46, %eax
ja 0x2a90a
addl $0x7d0, %eax            # imm = 0x7D0
movl %eax, 0x198(%rsp)
movq %r14, %rdi
leaq 0x198(%rsp), %rsi
callq 0x23d42
jmp 0x2a926
movl $0xa, %edx
movl $0x3c, %ecx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x4300
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0xc0(%rsp), %r13
movq %r13, %rdi
leaq 0x11e0c(%rip), %rsi     # 0x3c680
leaq 0x11e06(%rip), %rdx     # 0x3c681
callq 0x6512
leaq 0x198(%rsp), %rbx
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
movq %r13, %rdx
callq 0x21d86
movq %r14, %rdi
movq %rbx, %rsi
callq 0x23d54
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2a8c8
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x2a8ed
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2ace5
movq 0x30(%rsp), %rsi
jmp 0x2ab02
addl $0x76c, %eax            # imm = 0x76C
movl %eax, 0x198(%rsp)
movq %r14, %rdi
leaq 0x198(%rsp), %rsi
callq 0x23d42
movl $0x3e, %edx
movl $0x4, %ecx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x4300
leaq 0x110(%rsp), %rax
movq %rax, 0x100(%rsp)
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
leaq 0x11d21(%rip), %rsi     # 0x3c680
leaq 0x11d1b(%rip), %rdx     # 0x3c681
callq 0x6512
leaq 0x198(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x21d86
movq 0x198(%rsp), %rdi
movq 0x1a0(%rsp), %rbx
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2a9ad
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x2a9d2
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2a9ee
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42e0
cmpq $0x4, %rbx
jne 0x2ace5
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), %rbx
movq %rbx, %rdi
leaq 0x11c4c(%rip), %rsi     # 0x3c680
leaq 0x11c46(%rip), %rdx     # 0x3c681
callq 0x6512
leaq 0x20(%rsp), %r13
movq %r13, %rdi
leaq 0x128(%rsp), %rsi
movq %rbx, %rdx
callq 0x21d86
leaq 0x198(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21fea
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
callq 0x4370
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2aaa0
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2aabc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x2aae1
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x2ace5
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2ace5
movl $0xa, %edx
movl $0x4, %ecx
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x4300
leaq 0x198(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movl $0x18, %edx
callq 0x4490
movq %rbx, %rdi
leaq 0x4c(%rsp), %rsi
callq 0x41b0
movq %rbx, %rdi
movq 0x3c5450(%rip), %rsi    # 0x3effa8
callq 0x4240
movq 0x50(%rsp), %rdi
callq 0x4110
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2ab83
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42e0
movl 0x58(%rsp), %edx
testl %edx, %edx
sete %al
movl 0x44(%rsp), %esi
testb $0x1, %sil
sete %cl
andb %al, %cl
cmpl %edx, 0x4c(%rsp)
sete %al
orb %cl, %al
movb %al, 0xf(%rsp)
movzbl %sil, %esi
movl $0x1, %eax
cmovnel %eax, %esi
movl %esi, 0x44(%rsp)
jmp 0x2ace5
movq %r14, %rdi
movq %r15, %rsi
callq 0x26a54
jmp 0x2ace5
movq %r14, %rdi
movq %r13, %rsi
callq 0x23978
testq %rbp, %rbp
je 0x2aca9
movq %r13, %rdi
callq 0x14926
movq %rax, %rbx
movq %rbp, %rdi
callq 0x14926
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4050
testl %eax, %eax
je 0x2ac5e
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x203e0
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x23dc0
movq %r14, %rdi
movq 0x18(%rsp), %rsi
callq 0x23e06
movl $0x30, %edi
callq 0x42d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x203b4
movl $0x18, %edi
callq 0x42d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2f47c
jmp 0x2aca9
movq %rbp, %rdi
callq 0x14936
movl (%rax), %ebx
movq %r13, %rdi
callq 0x14936
cmpl (%rax), %ebx
je 0x2aca9
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x203e0
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x23dc0
movl $0x18, %edi
callq 0x42d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2f47c
movq %r13, %rdi
movq 0x10(%rsp), %rsi
callq 0x14de0
movq %r13, %rdi
movq 0x18(%rsp), %rsi
callq 0x14e16
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x2f49a
movb $0x1, 0xf(%rsp)
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x20422
movq %r13, %rbp
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
cmpl $0x0, 0x20(%r12,%rax)
je 0x2a545
movq 0x10(%rsp), %rdi
callq 0x2f5c2
movq 0x120(%rsp), %r15
testl %eax, %eax
je 0x2ad3c
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x203e0
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x23dc0
movq %r14, %rdi
movq 0x18(%rsp), %rsi
callq 0x23e06
leaq 0x116d7(%rip), %rsi     # 0x3c41a
movq %r15, %rdi
callq 0x40e0
testl %eax, %eax
je 0x2ad6d
leaq 0x398(%rsp), %rdi
callq 0x40b0
testb %al, %al
je 0x2ad6d
leaq 0x320(%rsp), %rdi
callq 0x4090
movq %r14, %rdi
callq 0x24632
testl %eax, %eax
je 0x2ae25
movq %r14, %rdi
callq 0x23e82
movzbl %al, %esi
movq %r14, %rdi
callq 0x23e7a
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2adb5
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x42e0
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x2adda
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x148(%rsp), %rdi
callq 0x2c9a6
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2ae03
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x320(%rsp), %rdi
callq 0x40c0
movq %r14, %rax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3c51c4(%rip), %rdi    # 0x3efff0
callq 0x4150
movq %rax, %rbx
leaq 0x11874(%rip), %rsi     # 0x3c6af
movl $0x15, %edx
movq %rax, %rdi
callq 0x4340
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x4340
leaq 0x11867(%rip), %rsi     # 0x3c6c5
movl $0x2, %edx
movq %rax, %rdi
callq 0x4340
movq 0x3c517e(%rip), %rdi    # 0x3efff0
leaq 0x1184f(%rip), %rsi     # 0x3c6c8
movl $0x1f, %edx
callq 0x4340
movq 0x3c5166(%rip), %rdi    # 0x3efff0
callq 0x4150
movq %rax, %rdi
callq 0x4150
movl $0x1, %edi
callq 0x4360
jmp 0x2aea3
movq %rax, %rbx
movl $0x18, %esi
movq 0x10(%rsp), %rdi
jmp 0x2b08b
movq %rax, %rbx
movl $0x30, %esi
movq 0x18(%rsp), %rdi
jmp 0x2b08b
jmp 0x2afdd
jmp 0x2b000
jmp 0x2b094
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2aefa
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2aefa
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x2af24
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2af24
movq %rax, %rbx
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x2b097
movq 0x138(%rsp), %rsi
jmp 0x2b088
jmp 0x2b094
jmp 0x2b094
jmp 0x2b094
movq %rax, %rbx
movq 0x198(%rsp), %rdi
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdi
je 0x2af86
movq 0x1a8(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2af86
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x2b003
movq 0xd0(%rsp), %rsi
jmp 0x2afcc
jmp 0x2b000
jmp 0x2b094
movq %rax, %rbx
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x2b003
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2b003
jmp 0x2b000
jmp 0x2b094
movq %rax, %rbx
movq 0x3c4fc1(%rip), %rsi    # 0x3effa8
leaq 0x198(%rsp), %rdi
callq 0x4240
movq 0x50(%rsp), %rdi
callq 0x4110
jmp 0x2b003
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2b097
movq 0x30(%rsp), %rsi
jmp 0x2b088
jmp 0x2b094
jmp 0x2b031
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x2b00d
jmp 0x2b094
movq %rax, %rbx
movl $0x1a0, %esi            # imm = 0x1A0
movq %r14, %rdi
jmp 0x2b08b
movq %rax, %rbx
movl $0x18, %esi
movq 0x10(%rsp), %rdi
jmp 0x2b05a
jmp 0x2b061
movq %rax, %rbx
movl $0x30, %esi
movq %r14, %rdi
callq 0x42e0
jmp 0x2b0c9
movq %rax, %rbx
jmp 0x2b0c9
jmp 0x2b094
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2b097
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x42e0
jmp 0x2b097
jmp 0x2b094
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2b0bc
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x148(%rsp), %rdi
callq 0x2c904
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2b0e5
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x42e0
leaq 0x320(%rsp), %rdi
callq 0x40c0
movq %rbx, %rdi
callq 0x4550