// File: atfrank[P]PCASA/lib/Molecule.cpp
// Function: Molecule::renameHis()
void Molecule::renameHis(){
  Residue* res;
  Atom* atm;

  std::map<std::string, bool> hisNames;

  hisNames.insert(std::pair<std::string,bool>("HSD",true));
  hisNames.insert(std::pair<std::string,bool>("HSE",true));
  hisNames.insert(std::pair<std::string,bool>("HSP",true));
  hisNames.insert(std::pair<std::string,bool>("HID",true));
  hisNames.insert(std::pair<std::string,bool>("HIE",true));

  for (unsigned int i=0; i< this->getResVecSize(); i++){
    res=this->getResidue(i);
    if (hisNames.find(res->getResName()) != hisNames.end()){
      for (unsigned int j=0; j< res->getAtmVecSize(); j++){
        atm=res->getAtom(j);
        atm->setResName("HIS");
      }
    }
  }
}

// Assembly:
subq $0x298, %rsp            # imm = 0x298
movq %rdi, 0x290(%rsp)
movq 0x290(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x47aa0
movb $0x1, 0x227(%rsp)
leaq 0x3593a(%rip), %rsi     # 0x7b3d5
leaq 0x228(%rsp), %rdi
leaq 0x227(%rsp), %rdx
callq 0x47b00
jmp 0x45ab2
leaq 0x250(%rsp), %rdi
leaq 0x228(%rsp), %rsi
callq 0x47ab0
movb %dl, 0x87(%rsp)
movq %rax, 0x88(%rsp)
jmp 0x45ad8
movb 0x87(%rsp), %al
movq 0x88(%rsp), %rcx
movq %rcx, 0x200(%rsp)
movb %al, 0x208(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x47b90
movb $0x1, 0x1d7(%rsp)
leaq 0x358c7(%rip), %rsi     # 0x7b3d9
leaq 0x1d8(%rsp), %rdi
leaq 0x1d7(%rsp), %rdx
callq 0x47b00
jmp 0x45b29
leaq 0x250(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x47ab0
movb %dl, 0x77(%rsp)
movq %rax, 0x78(%rsp)
jmp 0x45b49
movb 0x77(%rsp), %al
movq 0x78(%rsp), %rcx
movq %rcx, 0x1c0(%rsp)
movb %al, 0x1c8(%rsp)
leaq 0x1d8(%rsp), %rdi
callq 0x47b90
movb $0x1, 0x197(%rsp)
leaq 0x35860(%rip), %rsi     # 0x7b3dd
leaq 0x198(%rsp), %rdi
leaq 0x197(%rsp), %rdx
callq 0x47b00
jmp 0x45b94
leaq 0x250(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x47ab0
movb %dl, 0x67(%rsp)
movq %rax, 0x68(%rsp)
jmp 0x45bb4
movb 0x67(%rsp), %al
movq 0x68(%rsp), %rcx
movq %rcx, 0x180(%rsp)
movb %al, 0x188(%rsp)
leaq 0x198(%rsp), %rdi
callq 0x47b90
movb $0x1, 0x157(%rsp)
leaq 0x3584b(%rip), %rsi     # 0x7b433
leaq 0x158(%rsp), %rdi
leaq 0x157(%rsp), %rdx
callq 0x47b00
jmp 0x45bff
leaq 0x250(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x47ab0
movb %dl, 0x57(%rsp)
movq %rax, 0x58(%rsp)
jmp 0x45c1f
movb 0x57(%rsp), %al
movq 0x58(%rsp), %rcx
movq %rcx, 0x140(%rsp)
movb %al, 0x148(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x47b90
movb $0x1, 0x117(%rsp)
leaq 0x357e4(%rip), %rsi     # 0x7b437
leaq 0x118(%rsp), %rdi
leaq 0x117(%rsp), %rdx
callq 0x47b00
jmp 0x45c6a
leaq 0x250(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x47ab0
movb %dl, 0x47(%rsp)
movq %rax, 0x48(%rsp)
jmp 0x45c8a
movb 0x47(%rsp), %al
movq 0x48(%rsp), %rcx
movq %rcx, 0x100(%rsp)
movb %al, 0x108(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x47b90
movl $0x0, 0xfc(%rsp)
movq 0x90(%rsp), %rdi
movl 0xfc(%rsp), %eax
movl %eax, 0x40(%rsp)
callq 0x43bc0
movl %eax, %ecx
movl 0x40(%rsp), %eax
cmpl %ecx, %eax
jae 0x45fcb
movq 0x90(%rsp), %rdi
leaq 0xfc(%rsp), %rsi
callq 0x43be0
movq %rax, 0x38(%rsp)
jmp 0x45cfc
movq 0x38(%rsp), %rax
movq %rax, 0x288(%rsp)
movq 0x288(%rsp), %rsi
leaq 0xd0(%rsp), %rdi
callq 0x5dfa0
jmp 0x45d20
leaq 0x250(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x47bc0
movq %rax, 0x30(%rsp)
jmp 0x45d3c
movq 0x30(%rsp), %rax
movq %rax, 0xf0(%rsp)
leaq 0x250(%rsp), %rdi
callq 0x47bf0
movq %rax, 0xc8(%rsp)
leaq 0xf0(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x47ba0
movb %al, 0x2f(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x5250
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x45d91
jmp 0x45fb3
movl $0x0, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0x288(%rsp), %rdi
callq 0x5e110
movl %eax, 0x28(%rsp)
jmp 0x45dba
movl 0x24(%rsp), %eax
movl 0x28(%rsp), %ecx
cmpl %ecx, %eax
jae 0x45fb1
movq 0x288(%rsp), %rdi
leaq 0xc4(%rsp), %rsi
callq 0x5df30
movq %rax, 0x18(%rsp)
jmp 0x45de6
movq 0x18(%rsp), %rax
movq %rax, 0x280(%rsp)
movq 0x280(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x5730
movq 0x10(%rsp), %rdx
leaq 0x359cd(%rip), %rsi     # 0x7b7eb
leaq 0xa0(%rsp), %rdi
callq 0x7900
jmp 0x45e2d
movq 0x8(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1fda0
jmp 0x45e41
leaq 0xa0(%rsp), %rdi
callq 0x5250
leaq 0x9f(%rsp), %rdi
callq 0x5480
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0x45d9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x45fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x228(%rsp), %rdi
callq 0x47b90
jmp 0x45fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x1d8(%rsp), %rdi
callq 0x47b90
jmp 0x45fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x198(%rsp), %rdi
callq 0x47b90
jmp 0x45fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x47b90
jmp 0x45fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x47b90
jmp 0x45fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x5250
jmp 0x45fe0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x45fa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x5250
leaq 0x9f(%rsp), %rdi
callq 0x5480
jmp 0x45fe0
jmp 0x45fb3
jmp 0x45fb5
movl 0xfc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xfc(%rsp)
jmp 0x45cba
leaq 0x250(%rsp), %rdi
callq 0x47c20
addq $0x298, %rsp            # imm = 0x298
retq
leaq 0x250(%rsp), %rdi
callq 0x47c20
movq 0x218(%rsp), %rdi
callq 0x5720
nopw (%rax,%rax)