// File: /workspace/github_c_makefile_star2_O1/josch[P]stride/sheet.c
// Function: Sheet
void Sheet(CHAIN **Chain, int Cn1, int Cn2, HBOND **HBond, COMMAND *Cmd, float **PhiPsiMap)
{
  PATTERN **PatN, **PatP;
  RESIDUE *Res1, *Res3, *Res2, *Res4, *ResA, *ResB, *Res1m1, *Res3p1;
  int R1, R3, R2, R4, RA, RB, PatCntN = 0, PatCntP = 0, Beg;
  char *AntiPar1, *Par1, *AntiPar2, *Par2;
  register int i;

  PatN = (PATTERN **)ckalloc(MAXHYDRBOND*sizeof(PATTERN *));
  PatP = (PATTERN **)ckalloc(MAXHYDRBOND*sizeof(PATTERN *));

  AntiPar1  = (char *)ckalloc(Chain[Cn1]->NRes*sizeof(char)); /* Antiparallel strands */
  Par1      = (char *)ckalloc(Chain[Cn1]->NRes*sizeof(char)); /* Parallel strands */
  AntiPar2  = (char *)ckalloc(Chain[Cn2]->NRes*sizeof(char)); /* Antiparallel strands */
  Par2      = (char *)ckalloc(Chain[Cn2]->NRes*sizeof(char)); /* Parallel strands */

  for( i=0; i<Chain[Cn1]->NRes; i++ ) { 
    AntiPar1[i] = 'C'; 
    Par1[i] = 'C'; 
  }

  for( i=0; i<Chain[Cn2]->NRes; i++ ) { 
    AntiPar2[i] = 'C'; 
    Par2[i] = 'C'; 
  }

  for( R1=0; R1<Chain[Cn1]->NRes; R1++ ) {

    Res1   = Chain[Cn1]->Rsd[R1];

    if( (!Res1->Inv->NBondDnr && !Res1->Inv->NBondAcc) ||
        ((Cn1 != Cn2) && !Res1->Inv->InterchainHBonds) )
      continue;

    RA     = R1+1;
    R2     = R1+2;
    Res1m1 = Chain[Cn1]->Rsd[R1-1];
    ResA   = Chain[Cn1]->Rsd[RA];
    Res2   = Chain[Cn1]->Rsd[R2]; 

    if( R2 >= Chain[Cn1]->NRes || 
        Res1->Prop->PhiZn == ERR || Res1->Prop->PsiZn == ERR ||
        Res2->Prop->PhiZn == ERR || Res2->Prop->PsiZn == ERR ||
        ResA->Prop->PhiZn == ERR || ResA->Prop->PsiZn == ERR ) 
      continue;

    if( Cn1 != Cn2 ) 
      Beg = 0;
    else
      Beg = R1+1;

    for( R3=Beg; R3<Chain[Cn2]->NRes; R3++ ) {

      /* Process anti-parallel strands */

      Res3   = Chain[Cn2]->Rsd[R3];

      if( (!Res3->Inv->NBondAcc && !Res3->Inv->NBondDnr ) || 
	  ((Cn1 != Cn2) && !Res3->Inv->InterchainHBonds) ) 
	continue;

      RB     = R3-1;
      R4     = R3-2;
      Res3p1 = Chain[Cn2]->Rsd[R3+1];
      ResB   = Chain[Cn2]->Rsd[RB];
      Res4   = Chain[Cn2]->Rsd[R4];
      
      if( Cn1 != Cn2 || R3 - R1 >= 3  )
	Link(HBond,Chain,Cn1,Cn2,Res1,Res3,Res3,Res1,Res1,Res3,
	     PhiPsiMap,PatN,&PatCntN,"1331",Cmd->Treshold_E1,Cmd,0);
      
      if( R2 < Chain[Cn1]->NRes && ((Cn1 != Cn2 && R4 >= 0) || R4-R2 >=2 ) )
	Link(HBond,Chain,Cn2,Cn1,Res3,Res1,Res2,Res4,ResB,ResA,
	     PhiPsiMap,PatN,&PatCntN,"3124",Cmd->Treshold_E1,Cmd,0);
      
      if( ((Cn1 != Cn2 && RB >= 0 ) || RB-R1 > 4) && 
	 ( RA >= Chain[Cn1]->NRes || (Cn1 == Cn2 && R3-RA <= 4 ) ||
	  !Link(HBond,Chain,Cn1,Cn2,Res1,Res3,Res3,ResA,NULL,Res3,
		PhiPsiMap,PatN,&PatCntN,"133A",Cmd->Treshold_E1,Cmd,1))
	 &&
	 ( R1-1 < 0 ||
	  !Link(HBond,Chain,Cn1,Cn2,Res1m1,ResB,ResB,Res1,NULL,ResB,
		PhiPsiMap,PatN,&PatCntN,"1-BB1",Cmd->Treshold_E1,Cmd,1)))
	Link(HBond,Chain,Cn1,Cn2,Res1,Res3,ResB,Res1,Res1,NULL,
	     PhiPsiMap,PatN,&PatCntN,"13B1",Cmd->Treshold_E1,Cmd,0);
      
      if( (RA < Chain[Cn1]->NRes && (Cn1 != Cn2 || R3-RA > 4)) &&
	 ( (Cn1 == Cn2 && RB-R1 <= 4 ) || (Cn1 != Cn2 && RB < 0 ) || 
	  !Link(HBond,Chain,Cn1,Cn2,Res1,Res3,ResB,Res1,Res1,NULL,
	        PhiPsiMap,PatN,&PatCntN,"13B1",Cmd->Treshold_E1,Cmd,1))
	 &&
	 ( R3+1 >= Chain[Cn2]->NRes ||
	  !Link(HBond,Chain,Cn1,Cn2,ResA,Res3p1,Res3,ResA,ResA,NULL,
		PhiPsiMap,PatN,&PatCntN,"A3+3A",Cmd->Treshold_E1,Cmd,1)))
	Link(HBond,Chain,Cn1,Cn2,Res1,Res3,Res3,ResA,NULL,Res3,
	     PhiPsiMap,PatN,&PatCntN,"133A",Cmd->Treshold_E1,Cmd,0);
      
      /* Process parallel strands */

      R4 = R3+2; 
      RB = R3+1;
      ResB   = Chain[Cn2]->Rsd[RB];
      Res4   = Chain[Cn2]->Rsd[R4];

      if( (Cn1 == Cn2 && abs(R3-R1) <= 3) || R4 >= Chain[Cn2]->NRes ) continue;
      
      if( R2 < Chain[Cn1]->NRes && (Cn1 != Cn2 || abs(R2-R3) > 3) )
	Link(HBond,Chain,Cn2,Cn1,Res3,Res1,Res2,Res3,Res3,ResA,
	     PhiPsiMap,PatP,&PatCntP,"3123",Cmd->Treshold_E2,Cmd,0);
      
      if( R4 < Chain[Cn2]->NRes && (Cn1 != Cn2 || abs(R4-R1) > 3) )
	Link(HBond,Chain,Cn1,Cn2,Res1,Res3,Res4,Res1,Res1,ResB,
	     PhiPsiMap,PatP,&PatCntP,"1341",Cmd->Treshold_E2,Cmd,0);
    }
  }
    
  FilterAntiPar(PatN,PatCntN);
  FilterPar(PatP,PatCntP);

  MergePatternsAntiPar(PatN,PatCntN);
  MergePatternsPar(PatP,PatCntP);

  if( Cmd->Info )  {
    PrintPatterns(PatN,PatCntN,Chain,Cn1,Cn2);
    PrintPatterns(PatP,PatCntP,Chain,Cn1,Cn2);
  }

  FillAsnAntiPar(AntiPar1,AntiPar2,Chain,Cn1,Cn2,PatN,PatCntN,Cmd);
  FillAsnPar(Par1,Par2,Chain,Cn1,Cn2,PatP,PatCntP,Cmd);

  Bridge(AntiPar1,AntiPar2,Chain,Cn1,Cn2,PatN,PatCntN);
  Bridge(Par1,Par2,Chain,Cn1,Cn2,PatP,PatCntP);

  for( i=0; i<Chain[Cn1]->NRes; i++ )
    if( AntiPar1[i] == 'N' || Par1[i] == 'P' ) 
      Chain[Cn1]->Rsd[i]->Prop->Asn = 'E';
    else
    if( AntiPar1[i] == 'B' || Par1[i] == 'B' )
      Chain[Cn1]->Rsd[i]->Prop->Asn = 'B';
    else
    if( AntiPar1[i] == 'b' || Par1[i] == 'b' )
      Chain[Cn1]->Rsd[i]->Prop->Asn = 'b';

  for( i=0; i<Chain[Cn2]->NRes; i++ )
    if( Chain[Cn2]->Rsd[i]->Prop->Asn == 'E' )
      continue;
    else
    if( AntiPar2[i] == 'N' || Par2[i] == 'P' ) 
      Chain[Cn2]->Rsd[i]->Prop->Asn = 'E';
    else
    if( AntiPar2[i] == 'B' || Par2[i] == 'B' ) 
      Chain[Cn2]->Rsd[i]->Prop->Asn = 'B';
    else
    if( AntiPar2[i] == 'b' || Par2[i] == 'b' ) 
      Chain[Cn2]->Rsd[i]->Prop->Asn = 'b';

/*
  for( i=0; i<PatCntN; i++ )
    free(PatN[i]);
  for( i=0; i<PatCntP; i++ )
    free(PatP[i]);
*/
  free(PatN);
  free(PatP);
  free(AntiPar1);
  free(Par1);
  free(AntiPar2);
  free(Par2);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r9, 0x40(%rsp)
movq %r8, 0x10(%rsp)
movq %rcx, 0x38(%rsp)
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
xorl %ebx, %ebx
movl %ebx, 0x4(%rsp)
movl %ebx, 0x54(%rsp)
movl $0x61a80, %edi          # imm = 0x61A80
callq 0x595c
movq %rax, 0x28(%rsp)
movl $0x61a80, %edi          # imm = 0x61A80
callq 0x595c
movq %rax, 0x58(%rsp)
movl %r12d, (%rsp)
movslq %r12d, %r15
movq (%r14,%r15,8), %rax
movslq (%rax), %rdi
callq 0x595c
movq %rax, %r12
movq (%r14,%r15,8), %rax
movslq (%rax), %rdi
callq 0x595c
movq %rax, %r13
movl %ebp, 0x8(%rsp)
movslq %ebp, %rbp
movq (%r14,%rbp,8), %rax
movslq (%rax), %rdi
callq 0x595c
movq %rax, 0x78(%rsp)
movq %rbp, 0x68(%rsp)
movq (%r14,%rbp,8), %rax
movslq (%rax), %rdi
callq 0x595c
movq %r15, %r11
movq %rax, 0x80(%rsp)
movq (%r14,%r15,8), %rax
cmpl %ebx, (%rax)
jle 0x6851
xorl %eax, %eax
movb $0x43, %cl
movb %cl, (%r12,%rax)
movb %cl, (%r13,%rax)
incq %rax
movq (%r14,%r11,8), %rdx
movslq (%rdx), %rdx
cmpq %rdx, %rax
jl 0x6839
movq %r13, 0x90(%rsp)
movq %r12, 0xb0(%rsp)
movq 0x68(%rsp), %r8
movq (%r14,%r8,8), %rax
cmpl $0x0, (%rax)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdi
jle 0x6895
xorl %eax, %eax
movb $0x43, %cl
movb %cl, (%rsi,%rax)
movb %cl, (%rdi,%rax)
incq %rax
movq (%r14,%r8,8), %rdx
movslq (%rdx), %rdx
cmpq %rdx, %rax
jl 0x6880
movq (%r14,%r11,8), %rax
movl (%rax), %ecx
testl %ecx, %ecx
movl 0x8(%rsp), %r9d
movl (%rsp), %r10d
movq %r11, 0x20(%rsp)
jle 0x7040
movl $0x2, %r13d
xorl %r15d, %r15d
xorl %ebx, %ebx
movq 0x68(%rax), %rax
movq (%rax,%rbx,8), %r12
movq 0x770(%r12), %rdx
cmpl $0x0, 0x30(%rdx)
jne 0x68dc
cmpl $0x0, 0x34(%rdx)
je 0x7027
cmpl %r9d, %r10d
je 0x68eb
cmpl $0x0, 0x38(%rdx)
je 0x7027
leaq 0x2(%rbx), %rsi
movslq %ecx, %rcx
cmpq %rcx, %rsi
jge 0x7027
movq 0x768(%r12), %rcx
cmpl $-0x1, 0xc(%rcx)
je 0x7027
cmpl $-0x1, 0x10(%rcx)
je 0x7027
movq 0x10(%rax,%rbx,8), %rcx
movq %rcx, 0x98(%rsp)
movq 0x768(%rcx), %rcx
cmpl $-0x1, 0xc(%rcx)
je 0x7027
cmpl $-0x1, 0x10(%rcx)
je 0x7027
movq 0x8(%rax,%rbx,8), %rcx
movq %rcx, 0x70(%rsp)
movq 0x768(%rcx), %rcx
cmpl $-0x1, 0xc(%rcx)
je 0x7027
cmpl $-0x1, 0x10(%rcx)
je 0x7027
leaq 0x1(%rbx), %rcx
cmpl %r9d, %r10d
movq %rcx, 0xa0(%rsp)
movl %ecx, %edx
movl $0x0, %ecx
cmovnel %ecx, %edx
movq (%r14,%r8,8), %rcx
cmpl (%rcx), %edx
jge 0x7027
movq -0x8(%rax,%rbx,8), %rax
movq %rax, 0xa8(%rsp)
movl %edx, %ebp
movl %r13d, %eax
subl %edx, %eax
movl %eax, %edx
movq %rsi, 0x30(%rsp)
movq 0x68(%rcx), %rax
movq (%rax,%rbp,8), %rcx
movq %rcx, 0x18(%rsp)
movq 0x770(%rcx), %rcx
cmpl $0x0, 0x34(%rcx)
jne 0x69c8
cmpl $0x0, 0x30(%rcx)
je 0x7012
cmpl %r9d, %r10d
je 0x69d7
cmpl $0x0, 0x38(%rcx)
je 0x7012
movl %edx, 0x50(%rsp)
movq 0x8(%rax,%rbp,8), %rcx
movq %rcx, 0x88(%rsp)
movq -0x10(%rax,%rbp,8), %rcx
movq %rcx, 0x48(%rsp)
movq -0x8(%rax,%rbp,8), %rax
movq %rax, 0x60(%rsp)
cmpl %r9d, %r10d
jne 0x6a0b
leaq (%r15,%rbp), %rax
cmpq $0x3, %rax
jl 0x6a6f
movq 0x10(%rsp), %rax
movss 0x1d20(%rax), %xmm0
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r10d, %edx
movl %r9d, %ecx
movq %r12, %r8
movq 0x18(%rsp), %r9
pushq $0x0
pushq %rax
leaq 0x13198(%rip), %rax     # 0x19bd0
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
pushq 0x48(%rsp)
pushq 0x68(%rsp)
pushq %r9
pushq %r12
pushq %r12
pushq %r9
callq 0x729d
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
addq $0x50, %rsp
movq (%r14,%r11,8), %rax
movslq (%rax), %rax
cmpq %rax, %rsi
jge 0x6b16
cmpl %r9d, %r10d
setne %al
cmpq $0x2, %rbp
setae %cl
testb %cl, %al
jne 0x6a9e
leaq (%r15,%rbp), %rax
addq $-0x4, %rax
cmpq $0x2, %rax
jl 0x6b16
movq 0x10(%rsp), %rax
movss 0x1d20(%rax), %xmm0
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r9d, %edx
movl %r10d, %ecx
movq 0x18(%rsp), %r8
movq %r12, %r9
pushq $0x0
pushq %rax
leaq 0x1310a(%rip), %rax     # 0x19bd5
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
pushq 0x48(%rsp)
pushq 0x68(%rsp)
pushq 0xa0(%rsp)
pushq 0x98(%rsp)
pushq 0x88(%rsp)
pushq 0xe0(%rsp)
callq 0x729d
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
addq $0x50, %rsp
cmpl %r9d, %r10d
setne %al
testq %rbp, %rbp
setne %cl
andb %al, %cl
leaq (%r15,%rbp), %rdi
decq %rdi
cmpq $0x5, %rdi
setge %al
orb %cl, %al
cmpb $0x1, %al
jne 0x6cc5
movq (%r14,%r11,8), %rax
movslq (%rax), %rax
cmpq %rax, 0xa0(%rsp)
movq %rdi, 0x48(%rsp)
jge 0x6bda
cmpl %r9d, %r10d
jne 0x6b61
cmpq $0x5, %rdi
jl 0x6bda
movq 0x10(%rsp), %rax
movss 0x1d20(%rax), %xmm0
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r10d, %edx
movl %r9d, %ecx
movq %r12, %r8
movq 0x18(%rsp), %r9
pushq $0x1
pushq %rax
leaq 0x1304c(%rip), %rax     # 0x19bda
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
pushq 0x48(%rsp)
pushq 0x68(%rsp)
pushq %r9
pushq $0x0
pushq 0xb0(%rsp)
pushq %r9
callq 0x729d
movq 0x98(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
addq $0x50, %rsp
testl %eax, %eax
jne 0x6cc5
testq %rbx, %rbx
je 0x6c54
movq 0x10(%rsp), %rax
movss 0x1d20(%rax), %xmm0
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r10d, %edx
movl %r9d, %ecx
movq 0xa8(%rsp), %r8
movq 0x60(%rsp), %r9
pushq $0x1
pushq %rax
leaq 0x12fce(%rip), %rax     # 0x19bdf
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
pushq 0x48(%rsp)
pushq 0x68(%rsp)
pushq %r9
pushq $0x0
pushq %r12
pushq %r9
callq 0x729d
movq 0x98(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
addq $0x50, %rsp
testl %eax, %eax
jne 0x6cc5
movq 0x10(%rsp), %rax
movss 0x1d20(%rax), %xmm0
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r10d, %edx
movl %r9d, %ecx
movq %r12, %r8
movq 0x18(%rsp), %r9
pushq $0x0
pushq %rax
leaq 0x12f64(%rip), %rax     # 0x19be5
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
pushq 0x48(%rsp)
pushq 0x68(%rsp)
pushq $0x0
pushq %r12
pushq %r12
pushq 0xa8(%rsp)
callq 0x729d
movq 0x98(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
addq $0x50, %rsp
movq (%r14,%r11,8), %rax
movslq (%rax), %rax
cmpq %rax, 0xa0(%rsp)
jge 0x6e67
cmpl %r9d, %r10d
jne 0x6ce9
cmpq $0x5, %rdi
jl 0x6e67
cmpl %r9d, %r10d
sete %al
setne %dl
cmpq $0x5, %rdi
setl %cl
testq %rbp, %rbp
sete %sil
testb %sil, %dl
jne 0x6d7a
andb %cl, %al
jne 0x6d7a
movq 0x10(%rsp), %rax
movss 0x1d20(%rax), %xmm0
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r10d, %edx
movl %r9d, %ecx
movq %r12, %r8
movq 0x18(%rsp), %r9
pushq $0x1
pushq %rax
leaq 0x12eaf(%rip), %rax     # 0x19be5
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
pushq 0x48(%rsp)
pushq 0x68(%rsp)
pushq $0x0
pushq %r12
pushq %r12
pushq 0xa8(%rsp)
callq 0x729d
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
addq $0x50, %rsp
testl %eax, %eax
jne 0x6e67
leaq 0x1(%rbp), %rax
movq 0x68(%rsp), %rcx
movq (%r14,%rcx,8), %rcx
movslq (%rcx), %rcx
cmpq %rcx, %rax
jge 0x6dfe
movq 0x10(%rsp), %rax
movss 0x1d20(%rax), %xmm0
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r10d, %edx
movl %r9d, %ecx
movq 0x70(%rsp), %r8
movq 0x88(%rsp), %r9
pushq $0x1
pushq %rax
leaq 0x12e29(%rip), %rax     # 0x19bea
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
pushq 0x48(%rsp)
pushq 0x68(%rsp)
pushq $0x0
pushq %r8
pushq %r8
pushq 0x60(%rsp)
callq 0x729d
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
addq $0x50, %rsp
testl %eax, %eax
jne 0x6e67
movq 0x10(%rsp), %rax
movss 0x1d20(%rax), %xmm0
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r10d, %edx
movl %r9d, %ecx
movq %r12, %r8
movq 0x18(%rsp), %r9
pushq $0x0
pushq %rax
leaq 0x12daf(%rip), %rax     # 0x19bda
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
pushq 0x48(%rsp)
pushq 0x68(%rsp)
pushq %r9
pushq $0x0
pushq 0xb0(%rsp)
pushq %r9
callq 0x729d
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
addq $0x50, %rsp
leal (%r15,%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movq 0x68(%rsp), %r8
movq (%r14,%r8,8), %rax
movq 0x68(%rax), %rdx
movq 0x8(%rdx,%rbp,8), %rdi
movq %rdi, 0x60(%rsp)
movq 0x10(%rdx,%rbp,8), %rdi
cmpl %r9d, %r10d
movl 0x50(%rsp), %edx
jne 0x6ea0
cmpl $0x4, %ecx
jb 0x7012
leaq 0x2(%rbp), %rcx
movslq (%rax), %rax
cmpq %rax, %rcx
jge 0x7012
movq (%r14,%r11,8), %rax
movslq (%rax), %rax
cmpq %rax, %rsi
jge 0x6f6f
cmpl %r9d, %r10d
jne 0x6ed5
movl %edx, %eax
negl %eax
cmovsl %edx, %eax
cmpl $0x4, %eax
jb 0x6f6f
movq 0x10(%rsp), %rax
movss 0x1d24(%rax), %xmm0
movq %rdi, 0x48(%rsp)
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r9d, %edx
movq %rcx, 0x88(%rsp)
movl %r10d, %ecx
movq 0x18(%rsp), %r8
movq %r12, %r9
pushq $0x0
pushq %rax
leaq 0x12ce1(%rip), %rax     # 0x19bf0
pushq %rax
leaq 0x6c(%rsp), %rax
pushq %rax
pushq 0x78(%rsp)
pushq 0x68(%rsp)
pushq 0xa0(%rsp)
pushq %r8
pushq %r8
pushq 0xe0(%rsp)
callq 0x729d
movq 0xd8(%rsp), %rcx
movq 0x98(%rsp), %rdi
movl 0xa0(%rsp), %edx
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
movq 0xb8(%rsp), %r8
addq $0x50, %rsp
movq (%r14,%r8,8), %rax
movslq (%rax), %rax
cmpq %rax, %rcx
jge 0x7012
cmpl %r9d, %r10d
jne 0x6f97
leal (%r15,%rbp), %eax
addl $0x2, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x4, %ecx
jb 0x7012
movq 0x10(%rsp), %rax
movss 0x1d24(%rax), %xmm0
movq %rdi, %r11
movq 0x38(%rsp), %rdi
movq %r14, %rsi
movl %r10d, %edx
movl %r9d, %ecx
movq %r12, %r8
movq 0x18(%rsp), %r9
pushq $0x0
pushq %rax
leaq 0x12c2e(%rip), %rax     # 0x19bf5
pushq %rax
leaq 0x6c(%rsp), %rax
pushq %rax
pushq 0x78(%rsp)
pushq 0x68(%rsp)
pushq 0x90(%rsp)
pushq %r12
pushq %r12
pushq %r11
callq 0x729d
movl 0xa0(%rsp), %edx
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %r11
movl 0x50(%rsp), %r10d
movl 0x58(%rsp), %r9d
movq 0xb8(%rsp), %r8
addq $0x50, %rsp
incq %rbp
movq (%r14,%r8,8), %rcx
movslq (%rcx), %rax
decl %edx
cmpq %rax, %rbp
jl 0x69a4
incq %rbx
movq (%r14,%r11,8), %rax
movslq (%rax), %rcx
incl %r13d
decq %r15
cmpq %rcx, %rbx
jl 0x68bc
movl 0x4(%rsp), %ebp
movq 0x28(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
movl %r9d, %r13d
callq 0xe750
movl 0x54(%rsp), %ebx
movq 0x58(%rsp), %r12
movq %r12, %rdi
movl %ebx, %esi
callq 0xe98a
movq %r15, %rdi
movl %ebp, %esi
callq 0xa660
movq %r12, %rdi
movl %ebx, %esi
callq 0xb7e2
movq 0x10(%rsp), %rax
cmpl $0x0, 0x1d60(%rax)
je 0x70b7
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movl (%rsp), %r12d
movl %r12d, %ecx
movl %r13d, %r8d
callq 0x76c5
movq 0x58(%rsp), %rdi
movl %ebx, %esi
movq %r14, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
callq 0x76c5
movl (%rsp), %r12d
movq %rbp, %rax
movq %rbp, 0x8(%rsp)
movq 0xb0(%rsp), %rbp
movq %rbp, %rdi
movq 0x78(%rsp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
movq %r15, %r9
movq %rbx, 0x18(%rsp)
movq 0x10(%rsp), %rbx
pushq %rbx
pushq %rax
callq 0xc930
addq $0x10, %rsp
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %r15
movq %r15, %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
movq 0x58(%rsp), %r9
pushq %rbx
pushq 0x20(%rsp)
callq 0xd996
addq $0x8, %rsp
movq %rbp, %rdi
movq 0x80(%rsp), %rsi
movq %r15, %rbx
movq %r14, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
movq 0x30(%rsp), %r9
pushq 0x10(%rsp)
movq 0xa0(%rsp), %r15
callq 0x7a1e
addq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl %r13d, %r8d
movq 0x60(%rsp), %r13
movq %r13, %r9
pushq 0x20(%rsp)
callq 0x7a1e
addq $0x10, %rsp
movq 0x20(%rsp), %rax
movq (%r14,%rax,8), %rax
movslq (%rax), %rcx
testq %rcx, %rcx
jle 0x71e0
xorl %edx, %edx
movb (%rbp,%rdx), %dil
movb $0x45, %sil
cmpb $0x4e, %dil
je 0x71a3
movb (%r15,%rdx), %r8b
cmpb $0x50, %r8b
jne 0x71c0
movq 0x68(%rax), %rdi
movq (%rdi,%rdx,8), %rdi
movq 0x768(%rdi), %rdi
movb %sil, 0x1c(%rdi)
incq %rdx
cmpq %rdx, %rcx
jne 0x718b
jmp 0x71e0
movb $0x42, %sil
cmpb $0x42, %dil
je 0x71a3
cmpb $0x42, %r8b
je 0x71a3
movb $0x62, %sil
cmpb $0x62, %dil
je 0x71a3
cmpb $0x62, %r8b
jne 0x71b6
jmp 0x71a3
movq 0x68(%rsp), %rax
movq (%r14,%rax,8), %rcx
movslq (%rcx), %rax
testq %rax, %rax
movq 0x78(%rsp), %rbx
movq 0x80(%rsp), %r14
jle 0x725a
movq 0x68(%rcx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movq 0x768(%rsi), %rsi
cmpb $0x45, 0x1c(%rsi)
je 0x7230
movb (%rbx,%rdx), %r8b
movb $0x45, %dil
cmpb $0x4e, %r8b
je 0x722c
movb (%r14,%rdx), %r9b
cmpb $0x50, %r9b
jne 0x723a
movb %dil, 0x1c(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x7204
jmp 0x725a
movb $0x42, %dil
cmpb $0x42, %r8b
je 0x722c
cmpb $0x42, %r9b
je 0x722c
movb $0x62, %dil
cmpb $0x62, %r8b
je 0x722c
cmpb $0x62, %r9b
jne 0x7230
jmp 0x722c
movq 0x28(%rsp), %rdi
callq 0x2040
movq %r13, %rdi
callq 0x2040
movq %rbp, %rdi
callq 0x2040
movq %r15, %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
movq %r14, %rdi
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040