// File: /workspace/github_c_makefile_star2_O3/josch[P]stride/report.c
// Function: ReportShort
void ReportShort(CHAIN **Chain, int NChain, FILE *Out, COMMAND *Cmd)
{
  
  register int Cn, i;
  BUFFER Bf, Tmp;
  char *Asn;
  static char *StrTypes = "HGIE";
  int Bound[MAX_ASSIGN][2], NStr;

  if( !ExistsSecStr(Chain,NChain) )
    return;

  PrepareBuffer(Bf,Chain);

  Glue(Bf,"REM",Out);
  Glue(Bf,"REM",Out);
  Glue(Bf,"REM",Out);

  for( ; *StrTypes!= '\0'; StrTypes++ ) {

    for( Cn=0; Cn<NChain; Cn++ ) {

      if( !Chain[Cn]->Valid )
	continue;

      Asn = (char *)ckalloc(Chain[Cn]->NRes*sizeof(char));
      ExtractAsn(Chain,Cn,Asn);
      NStr = Boundaries(Asn,Chain[Cn]->NRes,(*StrTypes),Bound);

      for( i=0; i<NStr; i++ ) {
	sprintf(Tmp,"LOC  %-10s   %3s  %4s %c      %3s   %4s %c",Translate(*StrTypes),
		Chain[Cn]->Rsd[Bound[i][0]]->ResType,
		Chain[Cn]->Rsd[Bound[i][0]]->PDB_ResNumb,
		SpaceToDash(Chain[Cn]->Id),
		Chain[Cn]->Rsd[Bound[i][1]]->ResType,
		Chain[Cn]->Rsd[Bound[i][1]]->PDB_ResNumb,
		SpaceToDash(Chain[Cn]->Id));
	Glue(Bf,Tmp,Out);
      }
      
      free(Asn);
    }    
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1808, %rsp           # imm = 0x1808
movq %rdx, 0x10(%rsp)
movq %rdi, %r14
movl %esi, (%rsp)
callq 0x51b7
testl %eax, %eax
je 0x109d7
movaps 0x9a13(%rip), %xmm0     # 0x1a1d0
leaq 0x49b(%rsp), %r15
movaps %xmm0, -0xb(%r15)
movaps %xmm0, -0x1b(%r15)
movaps %xmm0, -0x2b(%r15)
movaps %xmm0, -0x3b(%r15)
movaps %xmm0, -0x4b(%r15)
movl $0xb0, %esi
addq (%r14), %rsi
movq %r15, %rdi
callq 0x2070
movw $0xa, 0x4(%r15)
leaq 0x9a4b(%rip), %r15      # 0x1a247
movq %r14, 0x8(%rsp)
leaq 0x450(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %r14
movq %r14, %rdx
callq 0x114b3
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x114b3
movq %r12, %rdi
movq 0x8(%rsp), %rbp
movq %r15, %rsi
movq %r14, %rdx
callq 0x114b3
movq 0x1134c(%rip), %rax     # 0x21b90
cmpb $0x0, (%rax)
je 0x109d7
movl (%rsp), %ecx
movq %rcx, 0x18(%rsp)
leaq 0x9f0f(%rip), %r12      # 0x1a76b
leaq 0x40(%rsp), %r15
cmpl $0x0, (%rsp)
jle 0x109bf
xorl %ebx, %ebx
movq (%rbp,%rbx,8), %rax
cmpl $0x0, 0x58(%rax)
je 0x109aa
movslq (%rax), %rdi
callq 0x5880
movq %rax, %r14
movq %rbp, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x5118
movq (%rbp,%rbx,8), %rax
movl (%rax), %esi
movq 0x112ee(%rip), %rax     # 0x21b90
movsbl (%rax), %edx
movq %r14, 0x20(%rsp)
movq %r14, %rdi
leaq 0x860(%rsp), %rcx
callq 0x4f0a
testl %eax, %eax
jle 0x109a0
movl %eax, %eax
movq %rax, 0x28(%rsp)
xorl %r14d, %r14d
movq 0x112bd(%rip), %rax     # 0x21b90
movsbl (%rax), %edi
callq 0x4fec
movq %rax, %r13
movq (%rbp,%rbx,8), %rax
movq 0x68(%rax), %rcx
movslq 0x860(%rsp,%r14,8), %rdx
movq %rbp, %r15
movq (%rcx,%rdx,8), %rbp
leaq 0xa(%rbp), %rcx
movq %rcx, 0x38(%rsp)
addq $0x4, %rbp
movsbl 0x40(%rax), %edi
callq 0x50a2
movsbl %al, %eax
movl %eax, 0x4(%rsp)
movq (%r15,%rbx,8), %rax
movq 0x68(%rax), %rcx
movslq 0x864(%rsp,%r14,8), %rdx
movq (%rcx,%rdx,8), %r15
leaq 0xa(%r15), %rcx
movq %rcx, 0x30(%rsp)
addq $0x4, %r15
movsbl 0x40(%rax), %edi
callq 0x50a2
movsbl %al, %r10d
subq $0x8, %rsp
leaq 0x48(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq 0x40(%rsp), %rcx
movq %rbp, %r8
movl 0xc(%rsp), %r9d
xorl %eax, %eax
pushq %r10
pushq %r15
leaq 0x468(%rsp), %r15
pushq 0x48(%rsp)
movq 0x28(%rsp), %rbp
callq 0x2220
addq $0x20, %rsp
movq %r15, %rdi
leaq 0x40(%rsp), %r15
movq %r15, %rsi
movq 0x10(%rsp), %rdx
callq 0x114b3
incq %r14
cmpq %r14, 0x28(%rsp)
jne 0x108cc
movq 0x20(%rsp), %rdi
callq 0x2040
incq %rbx
cmpq 0x18(%rsp), %rbx
jne 0x1086d
movq 0x111d1(%rip), %rax     # 0x21b90
leaq 0x1(%rax), %rcx
movq %rcx, 0x111c6(%rip)     # 0x21b90
cmpb $0x0, 0x1(%rax)
movq %rcx, %rax
jne 0x10861
addq $0x1808, %rsp           # imm = 0x1808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq