// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/nma.c
// Function: Mass_residue
float Mass_residue(atom *atom){
  char *atom_name=atom->name, aa=atom->aa;

  //modyves: removed some double parentheses below, which gave me some warnings
  if(atom_name[0]=='C'){
    if(atom_name[1]==' '){
      return(12); // 0H
    }else if(atom_name[1]=='A'){
      if(aa!='G')return(13); // Adding 1H mass
    }else if(atom_name[1]=='B'){
      if(aa=='A')return(15);              // Adding 3H mass
      if((aa=='V')||(aa=='T'))return(13); // Adding 1H mass
    }else if((aa=='W')||(aa=='F')||(aa=='Y')||(aa=='H')){
      if(atom_name[1]=='G')return(12); // 0H
      if((atom_name[1]=='Z')&&(aa=='Y'))return(12); // 0H
      return(13); // Adding 1H mass
    }else if(atom_name[1]=='G'){
      if((aa=='I')&&(atom_name[2]=='2'))return(15);  // Adding 3H mass
      if(aa=='V')return(15);      // Adding 3H mass
      if(aa=='L')return(13);      // Adding 1H mass
      if((aa=='N')||(aa=='D'))return(12);  // 0H
    }else if(atom_name[1]=='D'){
      if((aa=='L')||(aa=='I'))return(15);    // Adding 3H mass
      if((aa=='Q')||(aa=='E'))return(12);    // 0H
    }else if(atom_name[1]=='E'){
      if(aa=='M')return(15);      // Adding 3H mass
    }else if(atom_name[1]=='Z'){
      if(aa=='R')return(12);      // 0H mass
    }
    return(14);                 // Adding 2H mass
  }

  if(atom_name[0]=='N'){
    if(atom_name[1]==' '){
      if(aa=='P')return(14);           // 0H
      return(15);                      // Adding 1H
    }else if(atom_name[1]=='D'){
      if(aa=='H')return(14);           // 0H
    }else if(atom_name[1]=='E'){
      if((aa=='H')||(aa=='R'))return(15); // Adding 1H
    }else if(atom_name[1]=='Z'){
      if(aa=='K')return(17); // Adding 3H
    }
    return(16);  // Adding 2H mass
  }

  if(atom_name[0]=='O'){
    if(atom_name[1]==' ')return(16); // 0H
    if((atom_name[1]=='G')||(atom_name[1]=='H'))return(17); // 1H
    return(16); // 0H
  }

  if(atom_name[0]=='S')return(32);  // Adding H mass
  if(atom_name[0]=='H')return(1);
  if(atom_name[0]=='P')return(31);
  if(atom_name[0]=='E')return(79); // Selenium
  printf("WARNING, unusual atom %s\n", atom_name);
  return(14);
}

// Assembly:
movq %rdi, %rsi
movzbl 0x18(%rdi), %ecx
addl $-0x43, %ecx
cmpl $0x10, %ecx
ja 0x26e83
movzbl 0x68(%rsi), %eax
leaq 0x31e07(%rip), %rdx     # 0x58c4c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movzbl 0x19(%rsi), %ecx
movss 0x31e36(%rip), %xmm1    # 0x58c90
cmpl $0x20, %ecx
je 0x27047
cmpl $0x42, %ecx
je 0x26f10
cmpl $0x41, %ecx
jne 0x26f28
cmpl $0x47, %eax
jne 0x26f1f
jmp 0x26f64
pushq %rax
addq $0x18, %rsi
leaq 0x31fa5(%rip), %rdi     # 0x58e34
xorl %eax, %eax
callq 0x20f0
movss 0x31e06(%rip), %xmm0    # 0x58ca4
addq $0x8, %rsp
retq
movss 0x31df1(%rip), %xmm0    # 0x58c9c
retq
movss 0x31de0(%rip), %xmm0    # 0x58c94
retq
movss 0x31ddb(%rip), %xmm0    # 0x58c98
retq
movss 0x2a256(%rip), %xmm0    # 0x5111c
retq
movzbl 0x19(%rsi), %ecx
cmpl $0x45, %ecx
je 0x26f6d
cmpl $0x44, %ecx
je 0x26f5f
cmpl $0x20, %ecx
jne 0x26f89
xorl %ecx, %ecx
cmpl $0x50, %eax
sete %cl
leaq 0x31c5b(%rip), %rax     # 0x58b50
jmp 0x26f83
movb 0x19(%rsi), %al
addb $-0x47, %al
cmpb $0x1, %al
ja 0x26f96
movss 0x31d99(%rip), %xmm0    # 0x58ca8
retq
cmpl $0x41, %eax
je 0x26fd9
andb $-0x3, %al
cmpb $0x54, %al
jne 0x26f64
movss 0x31d89(%rip), %xmm0    # 0x58cb0
retq
leal -0x46(%rax), %edx
cmpl $0x13, %edx
ja 0x26f9f
movl $0xa0005, %edi          # imm = 0xA0005
btl %edx, %edi
jae 0x26f9f
movaps %xmm1, %xmm0
cmpl $0x47, %ecx
je 0x26ea2
xorb $0x59, %al
xorb $0x5a, %cl
xorl %edx, %edx
orb %al, %cl
sete %dl
leaq 0x31bff(%rip), %rax     # 0x58b58
movss (%rax,%rdx,4), %xmm0
retq
cmpl $0x48, %eax
jne 0x26f96
movss 0x31d38(%rip), %xmm0    # 0x58ca4
retq
xorl %ecx, %ecx
cmpl $0x48, %eax
sete %dl
cmpl $0x52, %eax
je 0x26fd9
movb %dl, %cl
leaq 0x31bc5(%rip), %rax     # 0x58b48
movss (%rax,%rcx,4), %xmm0
retq
xorb $0x5a, %cl
xorb $0x4b, %al
orb %cl, %al
je 0x26f07
movss 0x31d02(%rip), %xmm0    # 0x58ca0
retq
cmpl $0x44, %ecx
je 0x26fe2
cmpl $0x45, %ecx
je 0x26fd4
cmpl $0x47, %ecx
jne 0x27002
movss 0x31cf6(%rip), %xmm0    # 0x58cac
cmpl $0x4b, %eax
jle 0x2702a
cmpl $0x4c, %eax
je 0x26f1f
cmpl $0x4e, %eax
je 0x27047
cmpl $0x56, %eax
je 0x26ea2
jmp 0x26f64
cmpl $0x4d, %eax
jne 0x26f64
movss 0x31ccb(%rip), %xmm0    # 0x58cac
retq
movss 0x31cc2(%rip), %xmm0    # 0x58cac
cmpl $0x4b, %eax
jg 0x27017
cmpl $0x45, %eax
je 0x27047
cmpl $0x49, %eax
je 0x26ea2
jmp 0x26f64
xorb $0x5a, %cl
xorb $0x52, %al
orb %cl, %al
movaps %xmm1, %xmm0
je 0x26ea2
jmp 0x26f64
cmpl $0x4c, %eax
je 0x26ea2
cmpl $0x51, %eax
je 0x27047
jmp 0x26f64
cmpl $0x44, %eax
je 0x27047
cmpl $0x49, %eax
jne 0x26f64
cmpb $0x32, 0x1a(%rsi)
je 0x26ea2
jmp 0x26f64
movaps %xmm1, %xmm0
retq