// File: atfrank[P]PCASA/lib/PDB.cpp
// Function: PDB::formatCHARMMResName[abi:cxx11](Atom*)
std::string PDB::formatCHARMMResName (Atom* atmEntry){
  if (atmEntry->getResName().compare("HIE") == 0){
    return "HSE";
  }
  else if (atmEntry->getResName().compare("HID") == 0){
    return "HSD";
  }
  else if (atmEntry->getResName().compare("HIP") == 0){
    return "HSP";
  }
  else if (atmEntry->getResName().compare("AHE") == 0){
    return "CT2";
  }
  else if (atmEntry->getResName().compare("NME") == 0){
    return "CT3";
  }
  else if (atmEntry->getResName().compare("CYX") == 0){
    std::cerr << "Warning: " << atmEntry->getSummary() << " has a disulfide bond" << std::endl;
    return "CYS";
  }
  else if (atmEntry->getResName().compare("FOR") == 0 || atmEntry->getResName().compare("CSO") == 0 || atmEntry->getResName().compare("CME") == 0 ){
    std::cerr << "Warning: " << atmEntry->getSummary() << " has no matching residue name in CHARMM" << std::endl;
    return atmEntry->getResName();
  }
  else{
    return atmEntry->getResName();
  }
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x48(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x24d02(%rip), %rsi     # 0x7b437
callq 0x5140
cmpl $0x0, %eax
jne 0x56792
leaq 0x77(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x5730
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rdx
leaq 0x24c7a(%rip), %rsi     # 0x7b3d9
callq 0x7900
jmp 0x56766
leaq 0x77(%rsp), %rdi
callq 0x5480
jmp 0x56aef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x77(%rsp), %rdi
callq 0x5480
jmp 0x56afc
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x24c8d(%rip), %rsi     # 0x7b433
callq 0x5140
cmpl $0x0, %eax
jne 0x56803
leaq 0x63(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x5730
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0x24c05(%rip), %rsi     # 0x7b3d5
callq 0x7900
jmp 0x567d7
leaq 0x63(%rsp), %rdi
callq 0x5480
jmp 0x56aef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x63(%rsp), %rdi
callq 0x5480
jmp 0x56afc
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x24c24(%rip), %rsi     # 0x7b43b
callq 0x5140
cmpl $0x0, %eax
jne 0x56874
leaq 0x62(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x5730
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x24b9c(%rip), %rsi     # 0x7b3dd
callq 0x7900
jmp 0x56848
leaq 0x62(%rsp), %rdi
callq 0x5480
jmp 0x56aef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x62(%rsp), %rdi
callq 0x5480
jmp 0x56afc
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x25c19(%rip), %rsi     # 0x7c4a1
callq 0x5140
cmpl $0x0, %eax
jne 0x568e5
leaq 0x61(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x5730
movq 0x48(%rsp), %rdi
movq 0x28(%rsp), %rdx
leaq 0x25d4e(%rip), %rsi     # 0x7c600
callq 0x7900
jmp 0x568b9
leaq 0x61(%rsp), %rdi
callq 0x5480
jmp 0x56aef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x61(%rsp), %rdi
callq 0x5480
jmp 0x56afc
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x25bac(%rip), %rsi     # 0x7c4a5
callq 0x5140
cmpl $0x0, %eax
jne 0x56956
leaq 0x60(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x5730
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x25ce1(%rip), %rsi     # 0x7c604
callq 0x7900
jmp 0x5692a
leaq 0x60(%rsp), %rdi
callq 0x5480
jmp 0x56aef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x5480
jmp 0x56afc
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x25b13(%rip), %rsi     # 0x7c47d
callq 0x5140
cmpl $0x0, %eax
jne 0x56a18
movq 0x3e4671(%rip), %rdi    # 0x43aff0
leaq 0x25afb(%rip), %rsi     # 0x7c481
callq 0x53f0
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rdi
callq 0x1f7a0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x5390
movq %rax, %rdi
leaq 0x25ada(%rip), %rsi     # 0x7c48b
callq 0x53f0
movq %rax, %rdi
movq 0x3e45e8(%rip), %rsi    # 0x43afa8
callq 0x5460
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5730
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x24db6(%rip), %rsi     # 0x7b79b
callq 0x7900
jmp 0x569ec
leaq 0x5f(%rsp), %rdi
callq 0x5480
jmp 0x56aef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x5f(%rsp), %rdi
callq 0x5480
jmp 0x56afc
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x2642b(%rip), %rsi     # 0x7ce57
callq 0x5140
cmpl $0x0, %eax
je 0x56a72
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x25a63(%rip), %rsi     # 0x7c4ad
callq 0x5140
cmpl $0x0, %eax
je 0x56a72
movq 0x78(%rsp), %rdi
callq 0x1f620
movq %rax, %rdi
leaq 0x25a49(%rip), %rsi     # 0x7c4b1
callq 0x5140
cmpl $0x0, %eax
jne 0x56ad8
movq 0x3e4577(%rip), %rdi    # 0x43aff0
leaq 0x25a01(%rip), %rsi     # 0x7c481
callq 0x53f0
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rdi
callq 0x1f7a0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x5390
movq %rax, %rdi
leaq 0x25a0a(%rip), %rsi     # 0x7c4b5
callq 0x53f0
movq %rax, %rdi
movq 0x3e44ee(%rip), %rsi    # 0x43afa8
callq 0x5460
movq 0x78(%rsp), %rdi
callq 0x1f620
movq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0x51b0
jmp 0x56aef
movq 0x78(%rsp), %rdi
callq 0x1f620
movq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0x51b0
movq 0x50(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0x5720
nopw %cs:(%rax,%rax)