// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../tools/parser.c
// Function: parser_check_options
int parser_check_options(char * strinput, char ** options, int N_options, int* valid){

  int i, j, n_option, string_length, option_length;
  int found;
  char str[_ARGUMENT_LENGTH_MAX_];
  strcpy(str,strinput);

  *valid = _TRUE_;

  for(n_option = 0; n_option < N_options; ++n_option){

    string_length = strlen(str);                // Length of string
    option_length = strlen(options[n_option]);  // Length of option to remove from string

    for(i=0; i <= string_length - option_length; i++){

      /* Match first character */
      if(str[i] == options[n_option][0]){
        found = _TRUE_;
      }
      else{
        found = _FALSE_;
        continue;
      }

      /* Only if first character fits, try all the others */
      for(j=0; j<option_length; j++){
        if(str[i + j] != options[n_option][j]){
          found = _FALSE_;
          break;
        }
      }

      /* If it is not seperated by anything afterwards, it is not its own word */
      if(str[i+j] != ',' && str[i+j] != ' ' && str[i+j] != '\t' && str[i+j] != '\n' && str[i+j] != '\0' && str[i+j] != '.'  && str[i+j] != '&'){
        found = _FALSE_;
      }

      /* If it is not seperated by anything before, it is not its own word */
      if(i>0 && str[i-1] != ',' && str[i-1] != ' ' && str[i-1] != '\t' && str[i-1] != '\n' && str[i-1] != '\0' && str[i-1] != '.'  && str[i-1] != '&'){
        found = _FALSE_;
      }

      /* *
       * If word is found then shift all characters to left
       * and decrement the string length
       * */
      if(found == _TRUE_){

        for(j=i; j<=string_length - option_length; j++){
            str[j] = str[j+option_length];
        }

        string_length = string_length - option_length;

        // We will match the next occurrence of the word from the current index.
        i--;

      }
    }
  }

  string_length = strlen(str);
  /* Check that the remaining characters are exclusively seperators */
  for(i=0;i<string_length;i++){
    if( str[i] != ',' && str[i] != ' ' && str[i] != '\t' && str[i] != '\n' && str[i] != '\0' && str[i] != '.'  && str[i] != '&'){
      *valid = _FALSE_;
    }
  }

  return _SUCCESS_;
}

// Assembly:
subq $0x438, %rsp            # imm = 0x438
movq %rdi, 0x430(%rsp)
movq %rsi, 0x428(%rsp)
movl %edx, 0x424(%rsp)
movq %rcx, 0x418(%rsp)
movq %rsp, %rdi
movq 0x430(%rsp), %rsi
callq 0x8370
movq 0x418(%rsp), %rax
movl $0x1, (%rax)
movl $0x0, 0x40c(%rsp)
movl 0x40c(%rsp), %eax
cmpl 0x424(%rsp), %eax
jge 0x3a8cd
movq %rsp, %rdi
callq 0x8190
movl %eax, 0x408(%rsp)
movq 0x428(%rsp), %rax
movslq 0x40c(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x8190
movl %eax, 0x404(%rsp)
movl $0x0, 0x414(%rsp)
movl 0x414(%rsp), %eax
movl 0x408(%rsp), %ecx
subl 0x404(%rsp), %ecx
cmpl %ecx, %eax
jg 0x3a8b5
movslq 0x414(%rsp), %rax
movsbl (%rsp,%rax), %eax
movq 0x428(%rsp), %rcx
movslq 0x40c(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x3a61e
movl $0x1, 0x400(%rsp)
jmp 0x3a62e
movl $0x0, 0x400(%rsp)
jmp 0x3a89f
movl $0x0, 0x410(%rsp)
movl 0x410(%rsp), %eax
cmpl 0x404(%rsp), %eax
jge 0x3a6a3
movl 0x414(%rsp), %eax
addl 0x410(%rsp), %eax
cltq
movsbl (%rsp,%rax), %eax
movq 0x428(%rsp), %rcx
movslq 0x40c(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq 0x410(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
je 0x3a68e
movl $0x0, 0x400(%rsp)
jmp 0x3a6a3
jmp 0x3a690
movl 0x410(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x410(%rsp)
jmp 0x3a639
movl 0x414(%rsp), %eax
addl 0x410(%rsp), %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x2c, %eax
je 0x3a765
movl 0x414(%rsp), %eax
addl 0x410(%rsp), %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x20, %eax
je 0x3a765
movl 0x414(%rsp), %eax
addl 0x410(%rsp), %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x9, %eax
je 0x3a765
movl 0x414(%rsp), %eax
addl 0x410(%rsp), %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0xa, %eax
je 0x3a765
movl 0x414(%rsp), %eax
addl 0x410(%rsp), %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x0, %eax
je 0x3a765
movl 0x414(%rsp), %eax
addl 0x410(%rsp), %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x2e, %eax
je 0x3a765
movl 0x414(%rsp), %eax
addl 0x410(%rsp), %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x26, %eax
je 0x3a765
movl $0x0, 0x400(%rsp)
cmpl $0x0, 0x414(%rsp)
jle 0x3a815
movl 0x414(%rsp), %eax
subl $0x1, %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x2c, %eax
je 0x3a815
movl 0x414(%rsp), %eax
subl $0x1, %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x20, %eax
je 0x3a815
movl 0x414(%rsp), %eax
subl $0x1, %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x9, %eax
je 0x3a815
movl 0x414(%rsp), %eax
subl $0x1, %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0xa, %eax
je 0x3a815
movl 0x414(%rsp), %eax
subl $0x1, %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x0, %eax
je 0x3a815
movl 0x414(%rsp), %eax
subl $0x1, %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x2e, %eax
je 0x3a815
movl 0x414(%rsp), %eax
subl $0x1, %eax
cltq
movsbl (%rsp,%rax), %eax
cmpl $0x26, %eax
je 0x3a815
movl $0x0, 0x400(%rsp)
cmpl $0x1, 0x400(%rsp)
jne 0x3a89d
movl 0x414(%rsp), %eax
movl %eax, 0x410(%rsp)
movl 0x410(%rsp), %eax
movl 0x408(%rsp), %ecx
subl 0x404(%rsp), %ecx
cmpl %ecx, %eax
jg 0x3a877
movl 0x410(%rsp), %eax
addl 0x404(%rsp), %eax
cltq
movb (%rsp,%rax), %cl
movslq 0x410(%rsp), %rax
movb %cl, (%rsp,%rax)
movl 0x410(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x410(%rsp)
jmp 0x3a82d
movl 0x408(%rsp), %eax
subl 0x404(%rsp), %eax
movl %eax, 0x408(%rsp)
movl 0x414(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x414(%rsp)
jmp 0x3a89f
movl 0x414(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x414(%rsp)
jmp 0x3a5cd
jmp 0x3a8b7
movl 0x40c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c(%rsp)
jmp 0x3a57f
movq %rsp, %rdi
callq 0x8190
movl %eax, 0x408(%rsp)
movl $0x0, 0x414(%rsp)
movl 0x414(%rsp), %eax
cmpl 0x408(%rsp), %eax
jge 0x3a998
movslq 0x414(%rsp), %rax
movsbl (%rsp,%rax), %eax
cmpl $0x2c, %eax
je 0x3a980
movslq 0x414(%rsp), %rax
movsbl (%rsp,%rax), %eax
cmpl $0x20, %eax
je 0x3a980
movslq 0x414(%rsp), %rax
movsbl (%rsp,%rax), %eax
cmpl $0x9, %eax
je 0x3a980
movslq 0x414(%rsp), %rax
movsbl (%rsp,%rax), %eax
cmpl $0xa, %eax
je 0x3a980
movslq 0x414(%rsp), %rax
movsbl (%rsp,%rax), %eax
cmpl $0x0, %eax
je 0x3a980
movslq 0x414(%rsp), %rax
movsbl (%rsp,%rax), %eax
cmpl $0x2e, %eax
je 0x3a980
movslq 0x414(%rsp), %rax
movsbl (%rsp,%rax), %eax
cmpl $0x26, %eax
je 0x3a980
movq 0x418(%rsp), %rax
movl $0x0, (%rax)
jmp 0x3a982
movl 0x414(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x414(%rsp)
jmp 0x3a8e7
xorl %eax, %eax
addq $0x438, %rsp            # imm = 0x438
retq
nopw %cs:(%rax,%rax)