// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x98, %rsp
movb %sil, %al
movq %rdi, 0x90(%rsp)
andb $0x1, %al
movb %al, 0x8f(%rsp)
movq %rdx, 0x80(%rsp)
movl %ecx, 0x7c(%rsp)
movq %r8, 0x70(%rsp)
movq %r9, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0x4e3f81
movq 0x68(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x4e3f49
jmp 0x4e3f81
movq 0x158050(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x320b9(%rip), %rsi     # 0x516013
leaq 0x3225e(%rip), %rdx     # 0x5161bf
leaq 0xb0f2a(%rip), %rcx     # 0x594e92
leaq 0xd6e3c(%rip), %r8      # 0x5badab
movl $0x2e, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4e3f83
movb 0x8f(%rsp), %cl
leaq 0xd6e77(%rip), %rsi     # 0x5bae08
leaq 0xd6e51(%rip), %rax     # 0x5bade9
testb $0x1, %cl
cmovneq %rax, %rsi
leaq 0xd6e19(%rip), %rdi     # 0x5badbf
callq 0xf1420
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x33328(%rip), %rsi     # 0x5172e4
callq 0xf1a10
callq 0x11d4a0
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x20(%rax)
callq 0x11d4a0
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x28(%rax)
callq 0x11f5c0
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x60(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x80(%rsp), %rax
movq 0x30(%rax), %rdx
callq 0xd6b20
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x60(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0xd7350
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x10(%rax)
testb $0x1, 0x8f(%rsp)
je 0x4e4084
movq 0x60(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x25baf0
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x4e40b5
movq 0x60(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdx
callq 0x25c700
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x80(%rsp), %rdi
callq 0xf5f90
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xf1600
movq 0x80(%rsp), %rdx
addq $0x1, %rdx
leaq 0xd6d35(%rip), %rdi     # 0x5bae1e
leaq 0x47b6e(%rip), %rsi     # 0x52bc5e
xorl %ecx, %ecx
callq 0xf5f20
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xf1600
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rdx
leaq 0xa21af(%rip), %rdi     # 0x5862cd
leaq 0xd6d06(%rip), %rsi     # 0x5bae2b
callq 0xf6aa0
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xf1600
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xd7450
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0xf6cf0
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xd7450
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0xf7320
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xd7be0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xf7320
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xd75b0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xf7320
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xd79d0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xf7320
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xd7920
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xf7320
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xd7a90
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0xf7320
movq 0x80(%rsp), %rdx
addq $0x2, %rdx
leaq 0xa7ca7(%rip), %rdi     # 0x58befc
leaq 0xd6bf1(%rip), %rsi     # 0x5bae4d
xorl %ecx, %ecx
callq 0xf5f20
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0xf6ff0
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x25caf0
cmpq $0x0, %rax
je 0x4e42af
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x25caf0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xf7320
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xf1600
movq 0x60(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xf2a40
movq 0x60(%rsp), %rdi
movq 0x90(%rsp), %rsi
movl 0x7c(%rsp), %edx
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %r9
leaq -0x3bdbbe(%rip), %r8    # 0x126730
callq 0xf2ab0
movl %eax, 0x3c(%rsp)
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x4e4358
movq 0x80(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0x83ee0
movq %rax, 0x30(%rsp)
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x11d650
movq 0x30(%rsp), %rdi
leaq 0xd6a5d(%rip), %rsi     # 0x5badab
movl $0x75, %edx
callq 0xe88c0
cmpl $0x0, 0x3c(%rsp)
jne 0x4e439d
leaq 0x159012(%rip), %rax    # 0x63d378
cmpl $0x1, (%rax)
jbe 0x4e439d
movq 0x80(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x25ca90
testb $0x1, %al
jne 0x4e4382
jmp 0x4e439d
movq 0x68(%rsp), %rdi
leaq 0xd6b2e(%rip), %rsi     # 0x5baebc
movb $0x0, %al
callq 0xd88c0
movl $0x1, 0x3c(%rsp)
movq 0x60(%rsp), %rdi
callq 0xf5cf0
movl 0x3c(%rsp), %eax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)