// File: /workspace/github_c_makefile_star2_O3/josch[P]stride/stride.c
// Function: ProcessStrideOptions
void ProcessStrideOptions(char **List, int ListLength, COMMAND *Cmd)
{
  
  int i, InpFile = 0;
  char OPTION;
  BOOLEAN Password = NO;

  if( Uniq(List,ListLength) == 0 ) { 
    fprintf(stderr,"All options must be unique\n"); 
    PrintStrideHelp(Cmd); 
  }
 
  DefaultCmd(Cmd);

  Password = Specified(List,ListLength,'$');

  for( i=1; i<ListLength; i++ ) {
    if( *List[i] == '-' ) {
      
      OPTION = toupper((*(List[i]+1)));

      /*********************** Process public options ************************/
      if(OPTION == 'M') {
	strcpy(Cmd->MolScriptFile,List[i]+2); 
	Cmd->MolScript = YES;
      }
      else if( OPTION == 'O' ) Cmd->ReportSummaryOnly = YES;
      else if( OPTION == 'H' ) Cmd->ReportBonds = YES;
      else if( OPTION == 'R' ) strcpy(Cmd->Active,List[i]+2);
      else if( OPTION == 'C' ) strcpy(Cmd->Processed,List[i]+2);
      else if( OPTION == 'F' ) strcpy(Cmd->OutFile,List[i]+2);
      else if( OPTION == 'Q' ) {
	strcpy(Cmd->SeqFile,List[i]+2);
	Cmd->OutSeq = YES;
      }
      /*********************** Process private options ************************/
      else if( OPTION == 'I' && Password ) Cmd->Info = YES;
      else if( OPTION == 'Z' && Password ) Cmd->Measure = YES;
      else if( OPTION == 'K' && Password ) Cmd->ContactOrder = YES;
      else if( OPTION == 'W' && Password ) Cmd->ContactMap = YES;
      else if( OPTION == 'X' && Password ) strcpy(Cmd->FirstResidue,List[i]+2);
      else if( OPTION == 'Y' && Password ) strcpy(Cmd->LastResidue,List[i]+2);
      else if( OPTION == 'D' && Password ) {
	strcpy(Cmd->DsspFile,List[i]+2);
	Cmd->DsspAsn = YES;
      }
      else if( OPTION == 'B' && Password ) Cmd->BrookhavenAsn = YES;
      else
      if(OPTION == 'P'&& Password ) {
	if( toupper(*(List[i]+2)) == 'H' ) 
	  strcpy(Cmd->MapFileHelix,List[i]+3); 
	else
	if( toupper(*(List[i]+2)) == 'E' ) 
	  strcpy(Cmd->MapFileSheet,List[i]+3); 
	else
	  PrintStrideHelp(Cmd);
      }
      else
      if( OPTION == 'T' && Password ) {
	if( toupper(*(List[i]+2)) == 'H' ) {
	  if( toupper(*(List[i]+3)) == 'A' )
	    Cmd->Treshold_H1 = atof(List[i]+4);
	  else
	  if( toupper(*(List[i]+3)) == 'C' ) 
	    Cmd->Treshold_H3 = atof(List[i]+4);
	  else
	  if( toupper(*(List[i]+3)) == 'D' ) 
	    Cmd->Treshold_H4 = atof(List[i]+4);
	  else
	    PrintStrideHelp(Cmd);
	}
	else
	if( toupper(*(List[i]+2)) == 'E' ) {
	  if( toupper(*(List[i]+3)) == 'A' ) 
	    Cmd->Treshold_E1 = atof(List[i]+4);
	  else
	  if( toupper(*(List[i]+3)) == 'B' ) 
	    Cmd->Treshold_E2 = atof(List[i]+4);
	  else
	  if( toupper(*(List[i]+3)) == 'C' ) 
	    Cmd->Treshold_E3 = atof(List[i]+4);
	  else
	  if( toupper(*(List[i]+3)) == 'D' ) 
	    Cmd->Treshold_E4 = atof(List[i]+4);
	  else
	    PrintStrideHelp(Cmd);
	}
      }
      else if( OPTION == 'S' && Password ) {
	Cmd->Stringent = YES;
	if( (int)strlen(List[i]+2) > MAXCONDITIONS-1 )
	  PrintStrideHelp(Cmd);	
	strcpy(Cmd->Cond,List[i]+2);
      }
      else if( OPTION == 'L' && Password ) {
	if( toupper(*(List[i]+2)) == 'L' ) Cmd->MaxLength = atoi(List[i]+3);
	if( toupper(*(List[i]+2)) == 'G' ) Cmd->MinLength = atoi(List[i]+3);
      }
      else if( OPTION == 'U' && Password ) {
	if( toupper(*(List[i]+2)) == 'L' ) Cmd->MaxResolution = atof(List[i]+3);
	if( toupper(*(List[i]+2)) == 'G' ) Cmd->MinResolution = atof(List[i]+3);
      }
      else
	if( OPTION != '$' )
	  PrintStrideHelp(Cmd);
    }
    else {
      strcpy(Cmd->InputFile,List[i]);
      InpFile++;
    }
  }

  if( InpFile > 1 ) {
    fprintf(stderr,"\nOnly one input file is allowed\n");
    PrintStrideHelp(Cmd); 
  }
  else
  if( !InpFile ) {
    fprintf(stderr,"\nYou must specify input file \n");
    PrintStrideHelp(Cmd); 
  }

  Cmd->NActive = (int)strlen(Cmd->Active);
  Cmd->NProcessed = (int)strlen(Cmd->Processed);

  if( Cmd->Measure ) {
    Cmd->BrookhavenAsn = YES;
    Cmd->DsspAsn = YES;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movl %esi, %r13d
movq %rdi, %r14
callq 0x82b8
testl %eax, %eax
je 0x3248
movq %rbx, %rdi
callq 0x35ed
movq %r14, %rdi
movl %r13d, %esi
movl $0x24, %edx
callq 0x8337
cmpl $0x2, %r13d
jl 0x3240
movl %eax, %r12d
leaq 0x802(%rbx), %rax
movq %rax, 0x58(%rsp)
leaq 0x401(%rbx), %rax
movq %rax, 0x50(%rsp)
leaq 0x1c6d(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x1c08(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x1405(%rbx), %rax
movq %rax, 0x48(%rsp)
leaq 0x1cd2(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x1004(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0xc03(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x1806(%rbx), %rax
movq %rax, 0x30(%rsp)
leaq 0x1cec(%rbx), %rax
movq %rax, 0x38(%rsp)
leaq 0x1ce6(%rbx), %rax
movq %rax, 0x40(%rsp)
movl %r13d, %eax
movq %rax, 0x60(%rsp)
xorl %r15d, %r15d
movl $0x1, %ebp
movq (%r14,%rbp,8), %r13
cmpb $0x2d, (%r13)
jne 0x2d63
movl %r15d, 0x4(%rsp)
movq %r14, %r15
movl %r12d, %r14d
callq 0x2030
movq (%rax), %r12
movsbq 0x1(%r13), %rax
movl (%r12,%rax,4), %eax
shll $0x18, %eax
leal -0x43000000(%rax), %ecx
shrl $0x18, %ecx
cmpl $0xf, %ecx
ja 0x2d76
leaq 0x162b5(%rip), %rdx     # 0x19004
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addq $0x2, %r13
movq 0x10(%rsp), %rdi
jmp 0x2dd2
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2070
incl %r15d
jmp 0x2e1a
movl %r14d, %esi
testl %r14d, %r14d
setne %cl
cmpl $0x49000000, %eax       # imm = 0x49000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2e2d
movl $0x1, 0x1d60(%rbx)
jmp 0x2e8b
addq $0x2, %r13
movq 0x58(%rsp), %rdi
movq %r13, %rsi
callq 0x2070
movl $0x1, 0x1d80(%rbx)
jmp 0x2e0f
addq $0x2, %r13
movq 0x50(%rsp), %rdi
jmp 0x2dd2
addq $0x2, %r13
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x2070
jmp 0x2e0f
movl $0x1, 0x1d70(%rbx)
jmp 0x2e0f
addq $0x2, %r13
movq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x2070
movl $0x1, 0x1d7c(%rbx)
jmp 0x2e0f
movl $0x1, 0x1d6c(%rbx)
movl %r14d, %r12d
movq %r15, %r14
movl 0x4(%rsp), %r15d
incq %rbp
cmpq %rbp, 0x60(%rsp)
jne 0x2d10
jmp 0x31ec
testl %esi, %esi
setne %cl
cmpl $0x5a000000, %eax       # imm = 0x5A000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2e4d
movl $0x1, 0x1d88(%rbx)
jmp 0x2e8b
testl %esi, %esi
setne %cl
cmpl $0x4b000000, %eax       # imm = 0x4B000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2e6d
movl $0x1, 0x1d8c(%rbx)
jmp 0x2e8b
testl %esi, %esi
setne %cl
cmpl $0x57000000, %eax       # imm = 0x57000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2e90
movl $0x1, 0x1d90(%rbx)
movl %esi, %r12d
jmp 0x2e12
testl %esi, %esi
setne %cl
cmpl $0x58000000, %eax       # imm = 0x58000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2eaf
addq $0x2, %r13
movq 0x40(%rsp), %rdi
jmp 0x2ecc
testl %esi, %esi
setne %cl
cmpl $0x59000000, %eax       # imm = 0x59000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2edc
addq $0x2, %r13
movq 0x38(%rsp), %rdi
movl %esi, %r12d
movq %r13, %rsi
callq 0x2070
jmp 0x2e12
testl %esi, %esi
setne %cl
cmpl $0x44000000, %eax       # imm = 0x44000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2f13
addq $0x2, %r13
movq 0x30(%rsp), %rdi
movl %esi, %r12d
movq %r13, %rsi
callq 0x2070
movl $0x1, 0x1d78(%rbx)
jmp 0x2e12
testl %esi, %esi
setne %cl
cmpl $0x42000000, %eax       # imm = 0x42000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2f36
movl $0x1, 0x1d74(%rbx)
jmp 0x2e8b
testl %esi, %esi
setne %cl
cmpl $0x50000000, %eax       # imm = 0x50000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2f76
movsbq 0x2(%r13), %rax
movl (%r12,%rax,4), %eax
cmpl $0x45, %eax
je 0x3029
cmpl $0x48, %eax
jne 0x3258
movl %r14d, %r12d
addq $0x3, %r13
movq 0x20(%rsp), %rdi
jmp 0x2ecf
testl %esi, %esi
setne %cl
cmpl $0x54000000, %eax       # imm = 0x54000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x2fec
movsbq 0x2(%r13), %rax
movl (%r12,%rax,4), %eax
cmpl $0x45, %eax
je 0x3095
cmpl $0x48, %eax
jne 0x2e0f
movsbq 0x3(%r13), %rax
movl (%r12,%rax,4), %eax
cmpl $0x44, %eax
je 0x3178
cmpl $0x43, %eax
movl %r14d, %r12d
je 0x315b
cmpl $0x41, %eax
jne 0x3258
movq %r15, %r14
addq $0x4, %r13
movq %r13, %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d10(%rbx)
jmp 0x2e15
testl %esi, %esi
setne %cl
cmpl $0x53000000, %eax       # imm = 0x53000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x3037
movl $0x1, 0x1d84(%rbx)
addq $0x2, %r13
movq %r13, %rdi
callq 0x20b0
cmpl $0x14, %eax
jge 0x3258
movq 0x18(%rsp), %rdi
jmp 0x2dd2
addq $0x3, %r13
movq 0x28(%rsp), %rdi
jmp 0x2dd2
testl %esi, %esi
setne %cl
cmpl $0x4c000000, %eax       # imm = 0x4C000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x30da
movsbq 0x2(%r13), %rax
movl (%r12,%rax,4), %eax
cmpl $0x4c, %eax
jne 0x3075
leaq 0x3(%r13), %rdi
callq 0x21f0
movl %eax, 0x1d04(%rbx)
movsbq 0x2(%r13), %rax
movl (%r12,%rax,4), %eax
cmpl $0x47, %eax
jne 0x2e0f
addq $0x3, %r13
movq %r13, %rdi
callq 0x21f0
movl %eax, 0x1d00(%rbx)
jmp 0x2e0f
movsbq 0x3(%r13), %rax
movl (%r12,%rax,4), %eax
addl $-0x41, %eax
cmpl $0x3, %eax
ja 0x3258
leaq 0x15f93(%rip), %rcx     # 0x19044
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movl %r14d, %r12d
jmpq *%rax
addq $0x4, %r13
movq %r13, %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d20(%rbx)
jmp 0x2e12
testl %esi, %esi
setne %cl
cmpl $0x55000000, %eax       # imm = 0x55000000
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x3140
movsbq 0x2(%r13), %rax
movl (%r12,%rax,4), %eax
cmpl $0x4c, %eax
jne 0x311a
leaq 0x3(%r13), %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d34(%rbx)
movsbq 0x2(%r13), %rax
movl (%r12,%rax,4), %eax
cmpl $0x47, %eax
jne 0x2e0f
addq $0x3, %r13
movq %r13, %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d30(%rbx)
jmp 0x2e0f
cmpl $0x24000000, %eax       # imm = 0x24000000
movl %r14d, %r12d
movq %r15, %r14
movl 0x4(%rsp), %r15d
je 0x2e1a
jmp 0x3258
addq $0x4, %r13
movq %r13, %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d18(%rbx)
jmp 0x2e12
addq $0x4, %r13
movq %r13, %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d1c(%rbx)
jmp 0x2e0f
addq $0x4, %r13
movq %r13, %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d28(%rbx)
jmp 0x2e12
addq $0x4, %r13
movq %r13, %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d2c(%rbx)
jmp 0x2e12
addq $0x4, %r13
movq %r13, %rdi
callq 0x2080
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x1d24(%rbx)
jmp 0x2e12
cmpl $0x2, %r15d
jge 0x3250
testl %r15d, %r15d
je 0x3240
movq 0x8(%rsp), %rdi
callq 0x20b0
movl %eax, 0x1cf8(%rbx)
movq 0x10(%rsp), %rdi
callq 0x20b0
movl %eax, 0x1cfc(%rbx)
cmpl $0x0, 0x1d88(%rbx)
je 0x3231
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x1d74(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x22b0
movq %rbx, %rdi
callq 0x2300
movq %rbx, %rdi
callq 0x22d8
movq %rbx, %rdi
callq 0x3260