// File: /workspace/github_c_makefile_star2_O2/josch[P]stride/report.c
// Function: ReportDetailed
void ReportDetailed(CHAIN **Chain, int NChain, FILE *Out, COMMAND *Cmd)
{
  register int i, Cn;
  RESIDUE *p;
  BUFFER Bf, Tmp, Tmp1;

  PrepareBuffer(Bf,Chain);

  Glue(Bf,"REM",Out);
  sprintf(Tmp,"REM  --------------- ");
  strcat(Tmp,"Detailed secondary structure assignment");
  strcat(Tmp,"-------------");
  Glue(Bf,Tmp,Out);
  Glue(Bf,"REM",Out);
  Glue(Bf,"REM  |---Residue---|    |--Structure--|   |-Phi-|   |-Psi-|  |-Area-|      ",Out);

  for( Cn=0; Cn<NChain; Cn++ ) {

    if( !Chain[Cn]->Valid )
      continue;
    
    for( i=0; i<Chain[Cn]->NRes; i++ ) {
      p = Chain[Cn]->Rsd[i];
      sprintf(Tmp,"ASG  %3s %c %4s %4d    %c   %11s   %7.2f   %7.2f   %7.1f",
	      p->ResType,SpaceToDash(Chain[Cn]->Id),p->PDB_ResNumb,i+1,
	      p->Prop->Asn,Translate(p->Prop->Asn),p->Prop->Phi,
	      p->Prop->Psi,p->Prop->Solv);

      if( Cmd->BrookhavenAsn ) {
	Tmp[26] = p->Prop->PdbAsn;
	Tmp[25] = ' ';
	Tmp[27] = ' ';
      }

      if( Cmd->DsspAsn ) {
	Tmp[28] = p->Prop->DsspAsn;
	Tmp[27] = ' ';
	Tmp[29] = ' ';
	sprintf(Tmp1," %6.1f ",p->Prop->DsspSolv);
	strcat(Tmp,Tmp1);
      }
      Glue(Bf,Tmp,Out);
    }
  }
  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc58, %rsp            # imm = 0xC58
movq %rcx, 0x10(%rsp)
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %rsi
leaq 0x440(%rsp), %r12
movq %r12, %rdi
movq %rsi, 0x8(%rsp)
callq 0x111b7
leaq 0x871b(%rip), %r15      # 0x19217
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x111f1
movabsq $0x202d2d2d2d2d2d, %rax # imm = 0x202D2D2D2D2D2D
leaq 0x30(%rsp), %r13
movq %rax, 0xe(%r13)
movups 0x88fc(%rip), %xmm0     # 0x19420
movaps %xmm0, (%r13)
movq %r13, %rdi
callq 0x20b0
movabsq $0x746e656d6e6769, %rcx # imm = 0x746E656D6E6769
movq %rcx, 0x50(%rsp,%rax)
movups 0x88ef(%rip), %xmm0     # 0x19436
movups %xmm0, 0x30(%rsp,%rax)
movups 0x88f3(%rip), %xmm0     # 0x19446
movups %xmm0, 0x40(%rsp,%rax)
movq %r13, %rdi
callq 0x20b0
movabsq $0x2d2d2d2d2d2d2d2d, %rcx # imm = 0x2D2D2D2D2D2D2D2D
movq %rcx, 0x30(%rsp,%rax)
movabsq $0x2d2d2d2d2d2d2d, %rcx # imm = 0x2D2D2D2D2D2D2D
movq %rcx, 0x36(%rsp,%rax)
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x111f1
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x111f1
leaq 0x88bd(%rip), %rsi      # 0x1945e
movq %r12, %rdi
movq %rbx, 0x20(%rsp)
movq %rbx, %rdx
callq 0x111f1
xorl %edx, %edx
testl %r14d, %r14d
cmovlel %edx, %r14d
movq %r14, 0x18(%rsp)
cmpq 0x18(%rsp), %rdx
je 0x10d0c
movq 0x8(%rsp), %rax
movq (%rax,%rdx,8), %rax
cmpl $0x0, 0x58(%rax)
je 0x10d04
xorl %ebp, %ebp
movq %rdx, 0x28(%rsp)
movslq (%rax), %rcx
cmpq %rcx, %rbp
jge 0x10d04
movq 0x68(%rax), %rcx
movq (%rcx,%rbp,8), %rbx
leaq 0xa(%rbx), %r15
movsbl 0x40(%rax), %edi
callq 0x4969
movsbl %al, %r13d
leaq 0x4(%rbx), %r14
movq 0x768(%rbx), %rax
movsbl 0x1c(%rax), %r12d
movl %r12d, %edi
callq 0x48b3
movq 0x768(%rbx), %rcx
cvtss2sd (%rcx), %xmm0
cvtss2sd 0x4(%rcx), %xmm1
movq %rax, %r10
cvtss2sd 0x14(%rcx), %xmm2
leal 0x1(%rbp), %r9d
leaq 0x30(%rsp), %rdi
leaq 0x8861(%rip), %rsi      # 0x194aa
movq %r15, %rdx
movl %r13d, %ecx
movq %r14, %r8
movb $0x3, %al
pushq %r10
pushq %r12
callq 0x2230
popq %rcx
popq %rdx
movq 0x10(%rsp), %rax
cmpl $0x0, 0x1d74(%rax)
je 0x10c85
movq 0x768(%rbx), %rax
movb 0x1d(%rax), %al
movb %al, 0x4a(%rsp)
movb $0x20, %al
movb %al, 0x49(%rsp)
movb %al, 0x4b(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x1d78(%rax)
leaq 0x30(%rsp), %r14
je 0x10cd9
movq 0x768(%rbx), %rax
movb 0x1e(%rax), %cl
movb %cl, 0x4c(%rsp)
movb $0x20, %cl
movb %cl, 0x4b(%rsp)
movb %cl, 0x4d(%rsp)
cvtss2sd 0x18(%rax), %xmm0
leaq 0x850(%rsp), %rbx
movq %rbx, %rdi
leaq 0x89e6(%rip), %rsi      # 0x196ad
movb $0x1, %al
callq 0x2230
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2210
leaq 0x440(%rsp), %rdi
movq %r14, %rsi
movq 0x20(%rsp), %rdx
callq 0x111f1
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %rdx
movq (%rax,%rdx,8), %rax
incq %rbp
jmp 0x10be4
incq %rdx
jmp 0x10bbf
addq $0xc58, %rsp            # imm = 0xC58
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq