// File: /workspace/github_c_makefile_star2_O1/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 0x528f
testl %eax, %eax
je 0x10820
movaps 0x9bd7(%rip), %xmm0     # 0x1a1e0
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 0x9c0f(%rip), %r15      # 0x1a257
movq %r14, 0x8(%rsp)
leaq 0x450(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %r14
movq %r14, %rdx
callq 0x112df
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x112df
movq %r12, %rdi
movq 0x8(%rsp), %rbp
movq %r15, %rsi
movq %r14, %rdx
callq 0x112df
movq 0x11500(%rip), %rax     # 0x21b90
cmpb $0x0, (%rax)
je 0x10820
movl (%rsp), %eax
movq %rax, 0x18(%rsp)
leaq 0xa0d3(%rip), %r12      # 0x1a77b
leaq 0x40(%rsp), %r15
cmpl $0x0, (%rsp)
jle 0x10804
xorl %ebx, %ebx
movq (%rbp,%rbx,8), %rax
cmpl $0x0, 0x58(%rax)
je 0x107f6
movslq (%rax), %rdi
callq 0x595c
movq %rax, %r14
movq %rbp, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x51f0
movq (%rbp,%rbx,8), %rax
movl (%rax), %esi
movq 0x114a2(%rip), %rax     # 0x21b90
movsbl (%rax), %edx
movq %r14, 0x20(%rsp)
movq %r14, %rdi
leaq 0x860(%rsp), %rcx
callq 0x4fe2
testl %eax, %eax
jle 0x107ec
movl %eax, %eax
movq %rax, 0x28(%rsp)
xorl %r14d, %r14d
movq 0x11471(%rip), %rax     # 0x21b90
movsbl (%rax), %edi
callq 0x50c4
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 0x517a
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 0x517a
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 0x112df
incq %r14
cmpq %r14, 0x28(%rsp)
jne 0x10718
movq 0x20(%rsp), %rdi
callq 0x2040
incq %rbx
cmpq 0x18(%rsp), %rbx
jne 0x106b9
movq 0x11385(%rip), %rax     # 0x21b90
leaq 0x1(%rax), %rcx
movq %rcx, 0x1137a(%rip)     # 0x21b90
cmpb $0x0, 0x1(%rax)
jne 0x106ad
addq $0x1808, %rsp           # imm = 0x1808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq