// File: /workspace/github_c_makefile_star2_O0/josch[P]stride/dssp.c
// Function: GetDsspAsn
void GetDsspAsn(CHAIN **Chain, int NChain, COMMAND *Cmd)
{
  DSSP **Dssp;

  int NDsspChain=0, DsspCn, Cn, i;

  Dssp  = (DSSP **)ckalloc(MAX_CHAIN*sizeof(DSSP *));
  
  if( (NDsspChain = ReadDSSP(Chain,Dssp,Cmd)) == 0 )
    die("NODSSP Dssp file for %s not found\n",Chain[0]->File);
  
  for( Cn=0; Cn<NChain; Cn++ ) {
    
    if( !Chain[Cn]->Valid )
      continue;
    
    for( DsspCn=0; DsspCn<NDsspChain; DsspCn++ )
      if( SpaceToDash(Chain[Cn]->Id) == Dssp[DsspCn]->Id )
	break;

    if( DsspCn == NDsspChain ) {
      fprintf(stderr,"No DSSP chain corresponding to %s%c\n",
	      Chain[Cn]->File,SpaceToDash(Chain[Cn]->Id));
      continue;
    }

    if( !CompPdbDssp(Chain[Cn],Dssp[DsspCn]) )
      die("PDBDSSPDIF Chain %s%c differs from %s%c\n",
	  Dssp[DsspCn]->File,Dssp[DsspCn]->Id,Chain[Cn]->File,SpaceToDash(Chain[Cn]->Id));
    
    for( i=0; i<Chain[Cn]->NRes; i++ ) {
      Chain[Cn]->Rsd[i]->Prop->DsspAsn  = Dssp[DsspCn]->SecondStr[i];
      Chain[Cn]->Rsd[i]->Prop->DsspSolv = Dssp[DsspCn]->Accessibility[i];
    }
  }

  if( Cmd->DsspAsn ) {
    for( i=0; i<NDsspChain; i++ ) free(Dssp[i]);
    free(Dssp);
  }
  
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq %rdx, 0x40(%rsp)
movl $0x0, 0x34(%rsp)
movl $0x320, %edi            # imm = 0x320
callq 0x7360
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x250b0
movl %eax, 0x34(%rsp)
cmpl $0x0, %eax
jne 0x25a70
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq 0x48(%rax), %rsi
leaq 0x706f(%rip), %rdi      # 0x2cad8
movb $0x0, %al
callq 0xc970
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0x25cc6
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x0, 0x58(%rax)
jne 0x25a9f
jmp 0x25cb6
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0x25af5
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x40(%rax), %edi
callq 0x6550
movsbl %al, %eax
movq 0x38(%rsp), %rcx
movslq 0x30(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl 0x401(%rcx), %ecx
cmpl %ecx, %eax
jne 0x25ae6
jmp 0x25af5
jmp 0x25ae8
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x25aa7
movl 0x30(%rsp), %eax
cmpl 0x34(%rsp), %eax
jne 0x25b5c
movq 0xa4f2(%rip), %rax      # 0x2fff8
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x48(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x40(%rax), %edi
callq 0x6550
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movsbl %al, %ecx
leaq 0x6fab(%rip), %rsi      # 0x2cafb
movb $0x0, %al
callq 0x2140
jmp 0x25cb6
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x256f0
cmpl $0x0, %eax
jne 0x25bfa
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x401(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x48(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x40(%rax), %edi
callq 0x6550
movq (%rsp), %rsi
movl 0xc(%rsp), %edx
movq 0x10(%rsp), %rcx
movsbl %al, %r8d
leaq 0x6f2d(%rip), %rdi      # 0x2cb20
movb $0x0, %al
callq 0xc970
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
movq 0x50(%rsp), %rcx
movslq 0x2c(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl (%rcx), %eax
jge 0x25cb4
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x410(%rax), %rax
movslq 0x28(%rsp), %rcx
movb (%rax,%rcx), %cl
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0x68(%rax), %rax
movslq 0x28(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq 0x768(%rax), %rax
movb %cl, 0x1e(%rax)
movq 0x38(%rsp), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x420(%rax), %rax
movslq 0x28(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movq 0x50(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rax), %rax
movslq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x768(%rax), %rax
movss %xmm0, 0x18(%rax)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x25c02
jmp 0x25cb6
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x25a78
movq 0x40(%rsp), %rax
cmpl $0x0, 0x1d78(%rax)
je 0x25d10
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0x25d06
movq 0x38(%rsp), %rax
movslq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2030
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x25cdc
movq 0x38(%rsp), %rdi
callq 0x2030
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop