// File: /workspace/github_c_makefile_star2_O0/josch[P]stride/hydrbond.c
// Function: FindDnr
int FindDnr(CHAIN *Chain, DONOR **Dnr, int *NDnr, COMMAND *Cmd)
{

  int Res, dc;
  char Rsd[RES_FIELD];
  
  dc = *NDnr;

  for( Res=0; Res<Chain->NRes; Res++ ) {

    strcpy(Rsd,Chain->Rsd[Res]->ResType);

    DefineDnr(Chain,Dnr,&dc,Res,Nsp2,Peptide,1.90,0);

    if( !Cmd->SideChainHBond ) continue;

    if( !strcmp(Rsd,"TRP") ) 
      DefineDnr(Chain,Dnr,&dc,Res,Nsp2,Trp,1.90,0); 
    else if( !strcmp(Rsd,"ASN") ) DefineDnr(Chain,Dnr,&dc,Res,Nsp2,Asn,1.90,0); 
    else if( !strcmp(Rsd,"GLN") ) DefineDnr(Chain,Dnr,&dc,Res,Nsp2,Gln,1.90,0); 
    else if( !strcmp(Rsd,"ARG") ) {
      DefineDnr(Chain,Dnr,&dc,Res,Nsp2,Arg,1.90,1);
      DefineDnr(Chain,Dnr,&dc,Res,Nsp2,Arg,1.90,2);
      DefineDnr(Chain,Dnr,&dc,Res,Nsp2,Arg,1.90,3);
    }
    else if( !strcmp(Rsd,"HIS") ) {
      DefineDnr(Chain,Dnr,&dc,Res,Nsp2,His,1.90,1);
      DefineDnr(Chain,Dnr,&dc,Res,Nsp2,His,1.90,2);
    }
    else if( !strcmp(Rsd,"LYS") ) DefineDnr(Chain,Dnr,&dc,Res,Nsp3,Lys,2.10,0); 
    else if( !strcmp(Rsd,"SER") ) DefineDnr(Chain,Dnr,&dc,Res,Osp3,Ser,1.70,0);
    else if( !strcmp(Rsd,"THR") ) DefineDnr(Chain,Dnr,&dc,Res,Osp3,Thr,1.70,0);
    else if( !strcmp(Rsd,"TYR") ) DefineDnr(Chain,Dnr,&dc,Res,Osp2,Tyr,1.70,0); 
  }

  *NDnr = dc;
  return(dc);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x20(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xce21
leaq 0xa(%rsp), %rdi
movq 0x30(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0xa, %rsi
callq 0x2060
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r9d, %r9d
movss 0x1f352(%rip), %xmm0    # 0x2bdec
movl %r9d, %r8d
movl $0x0, (%rsp)
callq 0xce40
movq 0x18(%rsp), %rax
cmpl $0x0, 0x1d48(%rax)
jne 0xcabc
jmp 0xce11
leaq 0xa(%rsp), %rdi
leaq 0x1ede4(%rip), %rsi     # 0x2b8ac
callq 0x2130
cmpl $0x0, %eax
jne 0xcb07
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r8d, %r8d
movl $0x1, %r9d
movss 0x1f2f6(%rip), %xmm0    # 0x2bdec
movl $0x0, (%rsp)
callq 0xce40
jmp 0xce0f
leaq 0xa(%rsp), %rdi
leaq 0x1ed55(%rip), %rsi     # 0x2b868
callq 0x2130
cmpl $0x0, %eax
jne 0xcb52
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r8d, %r8d
movl $0x2, %r9d
movss 0x1f2ab(%rip), %xmm0    # 0x2bdec
movl $0x0, (%rsp)
callq 0xce40
jmp 0xce0d
leaq 0xa(%rsp), %rdi
leaq 0x1ed1a(%rip), %rsi     # 0x2b878
callq 0x2130
cmpl $0x0, %eax
jne 0xcb9d
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r8d, %r8d
movl $0x3, %r9d
movss 0x1f260(%rip), %xmm0    # 0x2bdec
movl $0x0, (%rsp)
callq 0xce40
jmp 0xce0b
leaq 0xa(%rsp), %rdi
leaq 0x1ecbb(%rip), %rsi     # 0x2b864
callq 0x2130
cmpl $0x0, %eax
jne 0xcc4c
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r8d, %r8d
movl $0x4, %r9d
movss 0x1f211(%rip), %xmm0    # 0x2bdec
movl $0x1, (%rsp)
callq 0xce40
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r8d, %r8d
movl $0x4, %r9d
movss 0x1f1e1(%rip), %xmm0    # 0x2bdec
movl $0x2, (%rsp)
callq 0xce40
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r8d, %r8d
movl $0x4, %r9d
movss 0x1f1b1(%rip), %xmm0    # 0x2bdec
movl $0x3, (%rsp)
callq 0xce40
jmp 0xce09
leaq 0xa(%rsp), %rdi
leaq 0x1ec30(%rip), %rsi     # 0x2b888
callq 0x2130
cmpl $0x0, %eax
jne 0xccc7
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r8d, %r8d
movl $0x5, %r9d
movss 0x1f166(%rip), %xmm0    # 0x2bdec
movl $0x1, (%rsp)
callq 0xce40
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
xorl %r8d, %r8d
movl $0x5, %r9d
movss 0x1f136(%rip), %xmm0    # 0x2bdec
movl $0x2, (%rsp)
callq 0xce40
jmp 0xce07
leaq 0xa(%rsp), %rdi
leaq 0x1ebc1(%rip), %rsi     # 0x2b894
callq 0x2130
cmpl $0x0, %eax
jne 0xcd17
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
movl $0x1, %r8d
movl $0x6, %r9d
movss 0x1f0ec(%rip), %xmm0    # 0x2bdf0
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0xce40
jmp 0xce05
leaq 0xa(%rsp), %rdi
leaq 0x1eb81(%rip), %rsi     # 0x2b8a4
callq 0x2130
cmpl $0x0, %eax
jne 0xcd67
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
movl $0x3, %r8d
movl $0x7, %r9d
movss 0x1f0a0(%rip), %xmm0    # 0x2bdf4
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0xce40
jmp 0xce03
leaq 0xa(%rsp), %rdi
leaq 0x1eb35(%rip), %rsi     # 0x2b8a8
callq 0x2130
cmpl $0x0, %eax
jne 0xcdb4
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
movl $0x3, %r8d
movl $0x8, %r9d
movss 0x1f050(%rip), %xmm0    # 0x2bdf4
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0xce40
jmp 0xce01
leaq 0xa(%rsp), %rdi
leaq 0x1eaf0(%rip), %rsi     # 0x2b8b0
callq 0x2130
cmpl $0x0, %eax
jne 0xcdff
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x14(%rsp), %ecx
leaq 0x10(%rsp), %rdx
movl $0x2, %r8d
movl $0x9, %r9d
movss 0x1f003(%rip), %xmm0    # 0x2bdf4
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0xce40
jmp 0xce01
jmp 0xce03
jmp 0xce05
jmp 0xce07
jmp 0xce09
jmp 0xce0b
jmp 0xce0d
jmp 0xce0f
jmp 0xce11
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xca4b
movl 0x10(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movl 0x10(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)