// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-opt.c
// Function: parse_options
static GtOPrval parse_options(int *parsed_args,
                              bool doesa,
                              Suffixeratoroptions *so,
                              int argc, const char **argv, GtError *err)
{
  GtOptionParser *op;
  GtOption *option,
           *optionshowprogress,
           *optiongenomediff,
           *optionii;
  GtOPrval oprval;
  gt_error_check(err);

  op = gt_option_parser_new("[option ...] (-db file [...] | -ii index)",
                            doesa ? "Compute enhanced suffix array."
                                  : "Compute packed index.");
  gt_option_parser_set_mail_address(op, "<kurtz@zbh.uni-hamburg.de>");

  /* input info */
  so->indexname = gt_str_new();
  so->inputindex = gt_str_new();
  so->db = gt_str_array_new();

  /* register options for encoded sequence handling */
  so->encopts = gt_encseq_options_register_encoding(op, so->indexname, so->db);
  so->loadopts = gt_encseq_options_register_loading(op, so->indexname);

  /* register options for index handling */
  if (doesa)
    so->idxopts = gt_index_options_register_esa(op, so->encopts);
  else
    so->idxopts = gt_index_options_register_packedidx(op, so->indexname,
                                                      so->encopts);

  /* verbosity */
  option = gt_option_new_verbose(&so->beverbose);
  gt_option_parser_add_option(op, option);

  optionshowprogress = gt_option_new_bool("showprogress",
                                          "show a progress bar",
                                          &so->showprogress,
                                          false);
  gt_option_parser_add_option(op, optionshowprogress);

  optionii = gt_option_new_filename("ii", "specify existing encoded sequence",
                                    so->inputindex);
  gt_option_parser_add_option(op, optionii);
  gt_option_is_mandatory_either(gt_encseq_options_db_option(so->encopts),
                                optionii);
  gt_option_exclude(gt_encseq_options_db_option(so->encopts), optionii);
  gt_option_exclude(optionii, gt_encseq_options_smap_option(so->encopts));
  gt_option_exclude(optionii, gt_encseq_options_dna_option(so->encopts));
  gt_option_exclude(optionii, gt_encseq_options_protein_option(so->encopts));
  gt_option_exclude(optionii, gt_encseq_options_plain_option(so->encopts));
  gt_option_exclude(optionii, gt_encseq_options_sat_option(so->encopts));

  optiongenomediff = gt_option_new_bool("genomediff",
                                   "directly process the lcp intervals using "
                                   "the genomediff algorithm (suffix array and "
                                   "lcp-tables are not output)",
                                   &so->genomediff,
                                   false);
  gt_option_is_extended_option(optiongenomediff);
  if (gt_index_options_outsuftab_option(so->idxopts) != NULL) {
    gt_option_exclude(optiongenomediff,
                      gt_index_options_outsuftab_option(so->idxopts));
  }
  gt_option_parser_add_option(op, optiongenomediff);

  /* suffixerator and friends do not take arguments */
  gt_option_parser_set_min_max_args(op, 0U, 0U);

  oprval = gt_option_parser_parse(op, parsed_args, argc, argv, gt_versionfunc,
                                  err);

  if (gt_str_length(so->indexname) == 0UL) {
    /* we do not have an indexname yet, so there was none given in the
       -indexname option and it could not be derived from the input filenames.
       So it must be in the -ii parameter. */
    char *basenameptr;
    basenameptr = gt_basename(gt_str_get(so->inputindex));
    gt_str_set(so->indexname, basenameptr);
    gt_free(basenameptr);
  }

  if (oprval == GT_OPTION_PARSER_OK &&
      gt_jobs > 1 && gt_index_options_outlcptab_value(so->idxopts)) {
    /* LCP table generation is not implemented in multithreaded
       operation */
    gt_error_set(err, "option -lcp cannot be used when using >1 threads");
    oprval = GT_OPTION_PARSER_ERROR;
  }

  gt_option_parser_delete(op);

  return oprval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, (%rsp)
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
testq %r9, %r9
je 0x329eca
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x32a154
leaq 0xbb588(%rip), %rax     # 0x3e5459
leaq 0xbb5a0(%rip), %rsi     # 0x3e5478
testb %r12b, %r12b
cmovneq %rax, %rsi
leaq 0xbb549(%rip), %rdi     # 0x3e542f
callq 0x107bfe
movq %rax, %r14
leaq 0x1c3d7(%rip), %rsi     # 0x3462cc
movq %rax, %rdi
callq 0x107e5c
callq 0x11ac6c
movq %rax, 0x20(%r15)
callq 0x11ac6c
movq %rax, 0x28(%r15)
callq 0x11be10
movq %rax, 0x30(%r15)
movq 0x20(%r15), %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0xfbfcc
movq %rax, 0x8(%r15)
movq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0xfc63a
movq %rax, 0x10(%r15)
testb %r12b, %r12b
je 0x329f4e
movq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x1b5676
jmp 0x329f5e
movq 0x8(%r15), %rdx
movq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x1b5e54
movq %rax, 0x18(%r15)
movq %r15, %rdi
callq 0x10a257
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
leaq 0x1(%r15), %rdx
leaq 0xbb50e(%rip), %rdi     # 0x3e548e
leaq 0x30b52(%rip), %rsi     # 0x35aad9
xorl %ecx, %ecx
callq 0x10a235
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
movq 0x28(%r15), %rdx
leaq 0x894cf(%rip), %rdi     # 0x3b3473
leaq 0xbb4f0(%rip), %rsi     # 0x3e549b
callq 0x10a7af
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
movq 0x8(%r15), %rdi
callq 0xfc690
movq %rax, %rdi
movq %r12, %rsi
callq 0x10a88b
movq 0x8(%r15), %rdi
callq 0xfc690
movq %rax, %rdi
movq %r12, %rsi
callq 0x10ab96
movq 0x8(%r15), %rdi
callq 0xfc808
movq %r12, %rdi
movq %rax, %rsi
callq 0x10ab96
movq 0x8(%r15), %rdi
callq 0xfc6d5
movq %r12, %rdi
movq %rax, %rsi
callq 0x10ab96
movq 0x8(%r15), %rdi
callq 0xfc7a1
movq %r12, %rdi
movq %rax, %rsi
callq 0x10ab96
movq 0x8(%r15), %rdi
callq 0xfc77f
movq %r12, %rdi
movq %rax, %rsi
callq 0x10ab96
movq 0x8(%r15), %rdi
callq 0xfc7c6
movq %r12, %rdi
movq %rax, %rsi
callq 0x10ab96
leaq 0x2(%r15), %rdx
leaq 0x8eed7(%rip), %rdi     # 0x3b8f2c
leaq 0xbb461(%rip), %rsi     # 0x3e54bd
xorl %ecx, %ecx
callq 0x10a235
movq %rax, %r12
movq %rax, %rdi
callq 0x10a9c4
movq 0x18(%r15), %rdi
callq 0x1b5f61
testq %rax, %rax
je 0x32a090
movq 0x18(%r15), %rdi
callq 0x1b5f61
movq %r12, %rdi
movq %rax, %rsi
callq 0x10ab96
movq %r14, %rdi
movq %r12, %rsi
callq 0x107cc0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10874b
leaq -0x20aaa2(%rip), %r8    # 0x11f60c
movq %r14, %rdi
movq %r13, %rsi
movl %ebp, %edx
movq (%rsp), %rcx
movq %rbx, %r9
callq 0x10875d
movl %eax, %ebp
movq 0x20(%r15), %rdi
callq 0x11b0ca
testq %rax, %rax
jne 0x32a106
movq 0x28(%r15), %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0xd3e84
movq %rax, %r12
movq 0x20(%r15), %rdi
movq %rax, %rsi
callq 0x11ad62
leaq 0xbb322(%rip), %rsi     # 0x3e541b
movq %r12, %rdi
movl $0x75, %edx
callq 0x1045eb
testl %ebp, %ebp
jne 0x32a13b
leaq 0x18fd07(%rip), %rax    # 0x4b9e18
cmpl $0x2, (%rax)
jb 0x32a13b
movq 0x18(%r15), %rdi
callq 0x1b5f52
xorl %ebp, %ebp
testb %al, %al
je 0x32a13b
leaq 0xbb400(%rip), %rsi     # 0x3e552c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xfcb67
movl $0x1, %ebp
movq %r14, %rdi
callq 0x10a0b4
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x95571
nopl (%rax)