// File: /workspace/github_c_makefile_star2_O0/josch[P]stride/chkchain.c
// Function: CheckChain
int CheckChain(CHAIN *Chain, COMMAND *Cmd)
{

  int Res, HelAlp, HelPI, Hel310, Sheet, Turn, Bound[300][2];
  int i, j, AsnNumb=0, At, SuspCnt, Beg, End;
  float Content;

  if( Cmd->NProcessed && !ChInStr(Cmd->Processed,SpaceToDash(Chain->Id)) ) {
    Chain->Valid = NO;
    return(FAILURE);
  }

  if( Chain->NRes < 5 )
    return(NotValid(Chain,"less than 5 residues"));
    
  if( !Cmd->Stringent ) 
    return(SUCCESS);
  
  for( Res=0; Res<Chain->NRes; Res++ ){
    if( !CheckRes(Chain->Rsd[Res]->ResType) )
      Chain->NonStandRes++;
    for( At=0; At<Chain->Rsd[Res]->NAtom; At++) {
      if( !CheckAtom(Chain->Rsd[Res]->AtomType[At]) ) 
	Chain->NonStandAtom++;
      if(Chain->Rsd[Res]->Coord[At][0] < MIN_X || Chain->Rsd[Res]->Coord[At][0] > MAX_X ||
	 Chain->Rsd[Res]->Coord[At][1] < MIN_Y || Chain->Rsd[Res]->Coord[At][1] > MAX_Y ||
	 Chain->Rsd[Res]->Coord[At][2] < MIN_Z || Chain->Rsd[Res]->Coord[At][2] > MAX_Z ||
	 Chain->Rsd[Res]->Occupancy[At] < MIN_Occupancy || 
	 Chain->Rsd[Res]->Occupancy[At] > MAX_Occupancy ||
	 Chain->Rsd[Res]->TempFactor[At] < MIN_TempFactor || 
	 Chain->Rsd[Res]->TempFactor[At] > MAX_TempFactor )
	break;
    }      
    if( At < Chain->Rsd[Res]->NAtom )
      break;
  }
  
  if( Res < Chain->NRes )
    return(NotValid(Chain,"suspicious coordinates, occupancy or temperature factor"));
  
  if( 100.0*(float)Chain->NonStandRes/(float)Chain->NRes > MAXNONSTAND )
    return(NotValid(Chain,"too many non-standard residues"));
  
  if( Chain->NRes < Cmd->MinLength )
    return(NotValid(Chain,"Short chain"));
  
  if( Chain->NRes > Cmd->MaxLength )
    return(NotValid(Chain,"Long chain"));
  
  if( Chain->Method == XRay && 
     (Chain->Resolution < Cmd->MinResolution || Chain->Resolution > Cmd->MaxResolution ) )
    return(NotValid(Chain,"Resolution out of range"));
  
  if( (int)strlen(Cmd->Cond) != 0 )  {
    
    if( ChInStr(Cmd->Cond,'c') ) {
      for( Res=0; Res<Chain->NRes; Res++ )
	if( FindAtom(Chain,Res,"N",&At) || 
	    FindAtom(Chain,Res,"O",&At) || 
	    FindAtom(Chain,Res,"C",&At) ) 
	  break;
      
      if( Res == Chain->NRes )
	return(NotValid(Chain,"only CA"));
    }
    
    if( Chain->Method == NMR && !ChInStr(Cmd->Cond,'n') )
      return(NotValid(Chain,"NMR chain"));
    
    if( Chain->Method == XRay && !ChInStr(Cmd->Cond,'x') )
      return(NotValid(Chain,"XRay chain"));
    
    if( Chain->Method == Model && !ChInStr(Cmd->Cond,'m') )
      return(NotValid(Chain,"Model chain"));
    
    if( Chain->Published == NO && ChInStr(Cmd->Cond,'p') )
      return(NotValid(Chain,"Not published"));
    
    if( Chain->DsspAssigned == YES && ChInStr(Cmd->Cond,'d') )
      return(NotValid(Chain,"Assigned according to DSSP"));
    
    if( ChInStr(Cmd->Cond,'a') ) {
      
      if( Chain->Valid && Chain->NHelix == 0 && Chain->NSheet == -1 && Chain->NTurn == 0 )
	return(NotValid(Chain,"No assignment"));
      
      if( (Content = SecStrContent(Chain,&HelAlp,&HelPI,&Hel310,&Sheet,&Turn)) < 0.4 || 
	   Content > 0.9 )
	return(NotValid(Chain,"Suspicious content"));
      
      SuspCnt = 0;
      for( Res=1; Res<Chain->NRes-1; Res++ ) {
	if( ( Chain->Rsd[Res]->Prop->PdbAsn != 'H' && Chain->Rsd[Res]->Prop->PdbAsn != 'T' &&
	     Chain->Rsd[Res]->Prop->Phi > -150.0 && Chain->Rsd[Res]->Prop->Phi < 0.0 && 
	     Chain->Rsd[Res]->Prop->Psi > -100.0 && Chain->Rsd[Res]->Prop->Psi < 10.0) )
	  SuspCnt++;
	
      }
      
      if( (float)SuspCnt/(float)Chain->NRes > 0.4 )
	return(NotValid(Chain,"Suspicious assignment"));
      
      for( i=0; i<Chain->NHelix; i++ ) {
	if( !PdbN2SeqN(Chain,Chain->Helix[i]->PDB_ResNumb1,&Beg) ||
	   !PdbN2SeqN(Chain,Chain->Helix[i]->PDB_ResNumb2,&End) ||
	   /*	      !CheckRes(Chain->Helix[i]->PDB_ResNumb1) ||
		      !CheckRes(Chain->Helix[i]->PDB_ResNumb2) || */
	   Chain->Helix[i]->Class > 10 ||
	   Chain->Helix[i]->Class < 1  ||
	   End-Beg > 100 || End-Beg < 0 )
	  break;
	else 
	  if( Chain->Helix[i]->Class == 1 ) {
	    Bound[AsnNumb][0] = Beg;
	    Bound[AsnNumb][1] = End;
	    AsnNumb++;
	  }
      }
      if( i < Chain->NHelix )
	return(NotValid(Chain,"Erraneous helix assignment"));
      
      for( i=0; i<Chain->NSheet; i++ )
	for( j=0; j<Chain->Sheet[i]->NStrand; j++ ) {
	  if( !PdbN2SeqN(Chain,Chain->Sheet[i]->PDB_ResNumb1[j],&Beg) ||
	     !PdbN2SeqN(Chain,Chain->Sheet[i]->PDB_ResNumb2[j],&End) ||
	     /*	        !CheckRes(Chain->Sheet[i]->PDB_ResNumb1[j]) ||
			!CheckRes(Chain->Sheet[i]->PDB_ResNumb2[j]) || */
	     End-Beg > 100 || End-Beg < 0 )
	    break;
	  else
	    if( Chain->Sheet[i]->Sence[j] != 0 ) {
	      Bound[AsnNumb][0] = Beg;
	      Bound[AsnNumb][1] = End;
	      AsnNumb++;
	    }
	  if( j < Chain->Sheet[i]->NStrand )
	    break;
	}
      
      if( i < Chain->NSheet )
	return(NotValid(Chain,"Erraneous sheet assignment"));
      
      for( i=0; i<Chain->NTurn; i++ )
	if( !PdbN2SeqN(Chain,Chain->Turn[i]->PDB_ResNumb1,&Beg) ||
	   !PdbN2SeqN(Chain,Chain->Turn[i]->PDB_ResNumb2,&End) ||
	   End-Beg > 100 || End-Beg < 0 ) 
	  break;
      
      if( i < Chain->NTurn ) 
	NotValid(Chain,"Erraneous turn assignment");
      
      for( i=0; i<AsnNumb-1; i++ ) {
	for( j=i+1; j<AsnNumb; j++ ) {
	  if( Bound[i][0] == Bound[j][0] && Bound[i][1] == Bound[j][1] ) continue;
	  if( (Bound[j][0] > Bound[i][0] && Bound[j][0] < Bound[i][1]) ||
	     (Bound[j][1] > Bound[i][0] && Bound[j][1] < Bound[i][1]) ||
	     (Bound[i][0] > Bound[j][0] && Bound[i][0] < Bound[j][1]) ||
	     (Bound[i][1] > Bound[j][0] && Bound[i][1] < Bound[j][1]) )
	    break;
	}
	if( j < AsnNumb )
	  break;
      }
      
      if( i < AsnNumb-1 )
	return(NotValid(Chain,"Assignment overlap"));
    }
  }

  fprintf(stderr,"ACCEPTED %s %c %4d %7.3f\n",
	  Chain->File,Chain->Id,Chain->NRes,Chain->Resolution);
  return(SUCCESS);
}

// Assembly:
subq $0x9c8, %rsp            # imm = 0x9C8
movq %rdi, 0x9b8(%rsp)
movq %rsi, 0x9b0(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x9b0(%rsp), %rax
cmpl $0x0, 0x1cfc(%rax)
je 0x25fa5
movq 0x9b0(%rsp), %rax
addq $0x1c6d, %rax           # imm = 0x1C6D
movq %rax, 0x8(%rsp)
movq 0x9b8(%rsp), %rax
movsbl 0x40(%rax), %edi
callq 0x6550
movq 0x8(%rsp), %rdi
movsbl %al, %esi
callq 0x6580
cmpl $0x0, %eax
jne 0x25fa5
movq 0x9b8(%rsp), %rax
movl $0x0, 0x58(%rax)
movl $0x0, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
cmpl $0x5, (%rax)
jge 0x25fd2
movq 0x9b8(%rsp), %rdi
leaq 0x6bdf(%rip), %rsi      # 0x2cba0
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b0(%rsp), %rax
cmpl $0x0, 0x1d84(%rax)
jne 0x25ff3
movl $0x1, 0x9c4(%rsp)
jmp 0x26ffc
movl $0x0, 0x9ac(%rsp)
movl 0x9ac(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x2637f
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0xa, %rdi
callq 0x23ce0
cmpl $0x0, %eax
jne 0x2604c
movq 0x9b8(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movq 0x9b8(%rsp), %rcx
movq 0x68(%rcx), %rcx
movslq 0x9ac(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl (%rcx), %eax
jge 0x26345
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x10, %rdi
movslq 0x20(%rsp), %rax
imulq $0x5, %rax, %rax
addq %rax, %rdi
callq 0x23d50
cmpl $0x0, %eax
jne 0x260bb
movq 0x9b8(%rsp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x188, %rax            # imm = 0x188
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x6a8b(%rip), %xmm0     # 0x2cb80
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x188, %rax            # imm = 0x188
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x56d7(%rip), %xmm1     # 0x2b810
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x188, %rax            # imm = 0x188
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x6a02(%rip), %xmm0     # 0x2cb80
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x188, %rax            # imm = 0x188
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x564d(%rip), %xmm1     # 0x2b810
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x188, %rax            # imm = 0x188
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x6978(%rip), %xmm0     # 0x2cb80
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x188, %rax            # imm = 0x188
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x55c3(%rip), %xmm1     # 0x2b810
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x20(%rsp), %rcx
movss 0x50c(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x20(%rsp), %rcx
movss 0x50c(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5538(%rip), %xmm1     # 0x2b7f8
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x20(%rsp), %rcx
movss 0x638(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x26331
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x20(%rsp), %rcx
movss 0x638(%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x57b5(%rip), %xmm1     # 0x2bae0
ucomisd %xmm1, %xmm0
jbe 0x26333
jmp 0x26345
jmp 0x26335
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x26054
movl 0x20(%rsp), %eax
movq 0x9b8(%rsp), %rcx
movq 0x68(%rcx), %rcx
movslq 0x9ac(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl (%rcx), %eax
jge 0x26367
jmp 0x2637f
jmp 0x26369
movl 0x9ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9ac(%rsp)
jmp 0x25ffe
movl 0x9ac(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x263b2
movq 0x9b8(%rsp), %rdi
leaq 0x6814(%rip), %rsi      # 0x2cbb5
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
cvtsi2ssl 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x67bd(%rip), %xmm0     # 0x2cb88
mulsd %xmm1, %xmm0
movq 0x9b8(%rsp), %rax
cvtsi2ssl (%rax), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd 0x62cd(%rip), %xmm1     # 0x2c6b8
ucomisd %xmm1, %xmm0
jbe 0x26411
movq 0x9b8(%rsp), %rdi
leaq 0x67ed(%rip), %rsi      # 0x2cbed
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
movl (%rax), %eax
movq 0x9b0(%rsp), %rcx
cmpl 0x1d00(%rcx), %eax
jge 0x2644b
movq 0x9b8(%rsp), %rdi
leaq 0x67d2(%rip), %rsi      # 0x2cc0c
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
movl (%rax), %eax
movq 0x9b0(%rsp), %rcx
cmpl 0x1d04(%rcx), %eax
jle 0x26485
movq 0x9b8(%rsp), %rdi
leaq 0x67a4(%rip), %rsi      # 0x2cc18
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
cmpl $0x0, 0x54(%rax)
jne 0x264f3
movq 0x9b8(%rsp), %rax
movss 0x50(%rax), %xmm1
movq 0x9b0(%rsp), %rax
movss 0x1d30(%rax), %xmm0
ucomiss %xmm1, %xmm0
ja 0x264d3
movq 0x9b8(%rsp), %rax
movss 0x50(%rax), %xmm0
movq 0x9b0(%rsp), %rax
ucomiss 0x1d34(%rax), %xmm0
jbe 0x264f3
movq 0x9b8(%rsp), %rdi
leaq 0x6741(%rip), %rsi      # 0x2cc23
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b0(%rsp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
callq 0x20b0
cmpl $0x0, %eax
je 0x26fa5
movq 0x9b0(%rsp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x63, %esi
callq 0x6580
cmpl $0x0, %eax
je 0x26612
movl $0x0, 0x9ac(%rsp)
movl 0x9ac(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x265dd
movq 0x9b8(%rsp), %rdi
movl 0x9ac(%rsp), %esi
leaq 0x5310(%rip), %rdx      # 0x2b87a
leaq 0x20(%rsp), %rcx
callq 0x6140
cmpl $0x0, %eax
jne 0x265c3
movq 0x9b8(%rsp), %rdi
movl 0x9ac(%rsp), %esi
leaq 0x530f(%rip), %rdx      # 0x2b89e
leaq 0x20(%rsp), %rcx
callq 0x6140
cmpl $0x0, %eax
jne 0x265c3
movq 0x9b8(%rsp), %rdi
movl 0x9ac(%rsp), %esi
leaq 0x5eda(%rip), %rdx      # 0x2c48e
leaq 0x20(%rsp), %rcx
callq 0x6140
cmpl $0x0, %eax
je 0x265c5
jmp 0x265dd
jmp 0x265c7
movl 0x9ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9ac(%rsp)
jmp 0x2653d
movl 0x9ac(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x26610
movq 0x9b8(%rsp), %rdi
leaq 0x663c(%rip), %rsi      # 0x2cc3b
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
jmp 0x26612
movq 0x9b8(%rsp), %rax
cmpl $0x1, 0x54(%rax)
jne 0x2665e
movq 0x9b0(%rsp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x6e, %esi
callq 0x6580
cmpl $0x0, %eax
jne 0x2665e
movq 0x9b8(%rsp), %rdi
leaq 0x65f6(%rip), %rsi      # 0x2cc43
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
cmpl $0x0, 0x54(%rax)
jne 0x266aa
movq 0x9b0(%rsp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x78, %esi
callq 0x6580
cmpl $0x0, %eax
jne 0x266aa
movq 0x9b8(%rsp), %rdi
leaq 0x65b4(%rip), %rsi      # 0x2cc4d
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
cmpl $0x2, 0x54(%rax)
jne 0x266f6
movq 0x9b0(%rsp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x6d, %esi
callq 0x6580
cmpl $0x0, %eax
jne 0x266f6
movq 0x9b8(%rsp), %rdi
leaq 0x6573(%rip), %rsi      # 0x2cc58
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
cmpl $0x0, 0x5c(%rax)
jne 0x26742
movq 0x9b0(%rsp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x70, %esi
callq 0x6580
cmpl $0x0, %eax
je 0x26742
movq 0x9b8(%rsp), %rdi
leaq 0x6533(%rip), %rsi      # 0x2cc64
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rax
cmpl $0x1, 0x60(%rax)
jne 0x2678e
movq 0x9b0(%rsp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x64, %esi
callq 0x6580
cmpl $0x0, %eax
je 0x2678e
movq 0x9b8(%rsp), %rdi
leaq 0x64f5(%rip), %rsi      # 0x2cc72
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b0(%rsp), %rdi
addq $0x1cd2, %rdi           # imm = 0x1CD2
movl $0x61, %esi
callq 0x6580
cmpl $0x0, %eax
je 0x26fa3
movq 0x9b8(%rsp), %rax
cmpl $0x0, 0x58(%rax)
je 0x26808
movq 0x9b8(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x26808
movq 0x9b8(%rsp), %rax
cmpl $-0x1, 0x20(%rax)
jne 0x26808
movq 0x9b8(%rsp), %rax
cmpl $0x0, 0x24(%rax)
jne 0x26808
movq 0x9b8(%rsp), %rdi
leaq 0x6496(%rip), %rsi      # 0x2cc8d
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movq 0x9b8(%rsp), %rdi
leaq 0x9a8(%rsp), %rsi
leaq 0x9a4(%rsp), %rdx
leaq 0x9a0(%rsp), %rcx
leaq 0x99c(%rsp), %r8
leaq 0x998(%rsp), %r9
callq 0x6800
movss %xmm0, 0x10(%rsp)
cvtss2sd %xmm0, %xmm1
movsd 0x6341(%rip), %xmm0     # 0x2cb90
ucomisd %xmm1, %xmm0
ja 0x2686d
movss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5261(%rip), %xmm1     # 0x2bac8
ucomisd %xmm1, %xmm0
jbe 0x2688d
movq 0x9b8(%rsp), %rdi
leaq 0x641f(%rip), %rsi      # 0x2cc9b
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movl $0x0, 0x1c(%rsp)
movl $0x1, 0x9ac(%rsp)
movl 0x9ac(%rsp), %eax
movq 0x9b8(%rsp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x26a0c
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x768(%rax), %rax
movsbl 0x1d(%rax), %eax
cmpl $0x48, %eax
je 0x269f4
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x768(%rax), %rax
movsbl 0x1d(%rax), %eax
cmpl $0x54, %eax
je 0x269f4
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x768(%rax), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x6255(%rip), %xmm1     # 0x2cb98
ucomisd %xmm1, %xmm0
jbe 0x269f4
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x768(%rax), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x269f4
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x768(%rax), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x61d3(%rip), %xmm1     # 0x2cb80
ucomisd %xmm1, %xmm0
jbe 0x269f4
movq 0x9b8(%rsp), %rax
movq 0x68(%rax), %rax
movslq 0x9ac(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x768(%rax), %rax
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x5cbd(%rip), %xmm0     # 0x2c6a0
ucomisd %xmm1, %xmm0
jbe 0x269f4
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x269f6
movl 0x9ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9ac(%rsp)
jmp 0x268a0
cvtsi2ssl 0x1c(%rsp), %xmm0
movq 0x9b8(%rsp), %rax
cvtsi2ssl (%rax), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x6162(%rip), %xmm1     # 0x2cb90
ucomisd %xmm1, %xmm0
jbe 0x26a54
movq 0x9b8(%rsp), %rdi
leaq 0x626b(%rip), %rsi      # 0x2ccae
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jge 0x26b8a
movq 0x9b8(%rsp), %rdi
movq 0x9b8(%rsp), %rax
movq 0x80(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0xc, %rsi
leaq 0x18(%rsp), %rdx
callq 0x60b0
cmpl $0x0, %eax
je 0x26b31
movq 0x9b8(%rsp), %rdi
movq 0x9b8(%rsp), %rax
movq 0x80(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0x12, %rsi
leaq 0x14(%rsp), %rdx
callq 0x60b0
cmpl $0x0, %eax
je 0x26b31
movq 0x9b8(%rsp), %rax
movq 0x80(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0xa, 0x1c(%rax)
jg 0x26b31
movq 0x9b8(%rsp), %rax
movq 0x80(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x1, 0x1c(%rax)
jl 0x26b31
movl 0x14(%rsp), %eax
subl 0x18(%rsp), %eax
cmpl $0x64, %eax
jg 0x26b31
movl 0x14(%rsp), %eax
subl 0x18(%rsp), %eax
cmpl $0x0, %eax
jge 0x26b33
jmp 0x26b8a
movq 0x9b8(%rsp), %rax
movq 0x80(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x1, 0x1c(%rax)
jne 0x26b76
movl 0x18(%rsp), %ecx
movslq 0x24(%rsp), %rax
movl %ecx, 0x30(%rsp,%rax,8)
movl 0x14(%rsp), %ecx
movslq 0x24(%rsp), %rax
movl %ecx, 0x34(%rsp,%rax,8)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x26b78
jmp 0x26b7a
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x26a5c
movl 0x2c(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jge 0x26bbb
movq 0x9b8(%rsp), %rdi
leaq 0x611a(%rip), %rsi      # 0x2ccc4
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x26d3b
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
movq 0x9b8(%rsp), %rcx
movq 0x88(%rcx), %rcx
movslq 0x2c(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl (%rcx), %eax
jge 0x26d29
movq 0x9b8(%rsp), %rdi
movq 0x9b8(%rsp), %rax
movq 0x88(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0xfa, %rsi
movslq 0x28(%rsp), %rax
imulq $0x6, %rax, %rax
addq %rax, %rsi
leaq 0x18(%rsp), %rdx
callq 0x60b0
cmpl $0x0, %eax
je 0x26ca2
movq 0x9b8(%rsp), %rdi
movq 0x9b8(%rsp), %rax
movq 0x88(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0x172, %rsi            # imm = 0x172
movslq 0x28(%rsp), %rax
imulq $0x6, %rax, %rax
addq %rax, %rsi
leaq 0x14(%rsp), %rdx
callq 0x60b0
cmpl $0x0, %eax
je 0x26ca2
movl 0x14(%rsp), %eax
subl 0x18(%rsp), %eax
cmpl $0x64, %eax
jg 0x26ca2
movl 0x14(%rsp), %eax
subl 0x18(%rsp), %eax
cmpl $0x0, %eax
jge 0x26ca7
jmp 0x26d29
movq 0x9b8(%rsp), %rax
movq 0x88(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x28(%rsp), %rcx
cmpl $0x0, 0x214(%rax,%rcx,4)
je 0x26cf3
movl 0x18(%rsp), %ecx
movslq 0x24(%rsp), %rax
movl %ecx, 0x30(%rsp,%rax,8)
movl 0x14(%rsp), %ecx
movslq 0x24(%rsp), %rax
movl %ecx, 0x34(%rsp,%rax,8)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x26cf5
movl 0x28(%rsp), %eax
movq 0x9b8(%rsp), %rcx
movq 0x88(%rcx), %rcx
movslq 0x2c(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpl (%rcx), %eax
jge 0x26d17
jmp 0x26d29
jmp 0x26d19
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x26be0
jmp 0x26d2b
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x26bc3
movl 0x2c(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x26d6c
movq 0x9b8(%rsp), %rdi
leaq 0x5f84(%rip), %rsi      # 0x2ccdf
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl 0x24(%rcx), %eax
jge 0x26e1d
movq 0x9b8(%rsp), %rdi
movq 0x9b8(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0xc, %rsi
leaq 0x18(%rsp), %rdx
callq 0x60b0
cmpl $0x0, %eax
je 0x26e09
movq 0x9b8(%rsp), %rdi
movq 0x9b8(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0x12, %rsi
leaq 0x14(%rsp), %rdx
callq 0x60b0
cmpl $0x0, %eax
je 0x26e09
movl 0x14(%rsp), %eax
subl 0x18(%rsp), %eax
cmpl $0x64, %eax
jg 0x26e09
movl 0x14(%rsp), %eax
subl 0x18(%rsp), %eax
cmpl $0x0, %eax
jge 0x26e0b
jmp 0x26e1d
jmp 0x26e0d
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x26d74
movl 0x2c(%rsp), %eax
movq 0x9b8(%rsp), %rcx
cmpl 0x24(%rcx), %eax
jge 0x26e42
movq 0x9b8(%rsp), %rdi
leaq 0x5ebd(%rip), %rsi      # 0x2ccfa
callq 0x27010
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl 0x24(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x26f75
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x26f57
movslq 0x2c(%rsp), %rax
movl 0x30(%rsp,%rax,8), %eax
movslq 0x28(%rsp), %rcx
cmpl 0x30(%rsp,%rcx,8), %eax
jne 0x26ea3
movslq 0x2c(%rsp), %rax
movl 0x34(%rsp,%rax,8), %eax
movslq 0x28(%rsp), %rcx
cmpl 0x34(%rsp,%rcx,8), %eax
jne 0x26ea3
jmp 0x26f47
movslq 0x28(%rsp), %rax
movl 0x30(%rsp,%rax,8), %eax
movslq 0x2c(%rsp), %rcx
cmpl 0x30(%rsp,%rcx,8), %eax
jle 0x26ecb
movslq 0x28(%rsp), %rax
movl 0x30(%rsp,%rax,8), %eax
movslq 0x2c(%rsp), %rcx
cmpl 0x34(%rsp,%rcx,8), %eax
jl 0x26f43
movslq 0x28(%rsp), %rax
movl 0x34(%rsp,%rax,8), %eax
movslq 0x2c(%rsp), %rcx
cmpl 0x30(%rsp,%rcx,8), %eax
jle 0x26ef3
movslq 0x28(%rsp), %rax
movl 0x34(%rsp,%rax,8), %eax
movslq 0x2c(%rsp), %rcx
cmpl 0x34(%rsp,%rcx,8), %eax
jl 0x26f43
movslq 0x2c(%rsp), %rax
movl 0x30(%rsp,%rax,8), %eax
movslq 0x28(%rsp), %rcx
cmpl 0x30(%rsp,%rcx,8), %eax
jle 0x26f1b
movslq 0x2c(%rsp), %rax
movl 0x30(%rsp,%rax,8), %eax
movslq 0x28(%rsp), %rcx
cmpl 0x34(%rsp,%rcx,8), %eax
jl 0x26f43
movslq 0x2c(%rsp), %rax
movl 0x34(%rsp,%rax,8), %eax
movslq 0x28(%rsp), %rcx
cmpl 0x30(%rsp,%rcx,8), %eax
jle 0x26f45
movslq 0x2c(%rsp), %rax
movl 0x34(%rsp,%rax,8), %eax
movslq 0x28(%rsp), %rcx
cmpl 0x34(%rsp,%rcx,8), %eax
jge 0x26f45
jmp 0x26f57
jmp 0x26f47
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x26e68
movl 0x28(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x26f63
jmp 0x26f75
jmp 0x26f65
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x26e4a
movl 0x2c(%rsp), %eax
movl 0x24(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x26fa1
movq 0x9b8(%rsp), %rdi
leaq 0x5d81(%rip), %rsi      # 0x2cd14
callq 0x27010
movl %eax, 0x9c4(%rsp)
jmp 0x26ffc
jmp 0x26fa3
jmp 0x26fa5
movq 0x904c(%rip), %rax      # 0x2fff8
movq (%rax), %rdi
movq 0x9b8(%rsp), %rax
movq 0x48(%rax), %rdx
movq 0x9b8(%rsp), %rax
movsbl 0x40(%rax), %ecx
movq 0x9b8(%rsp), %rax
movl (%rax), %r8d
movq 0x9b8(%rsp), %rax
movss 0x50(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x5d3d(%rip), %rsi      # 0x2cd27
movb $0x1, %al
callq 0x2140
movl $0x1, 0x9c4(%rsp)
movl 0x9c4(%rsp), %eax
addq $0x9c8, %rsp            # imm = 0x9C8
retq
nopl (%rax,%rax)