// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/tools/gt_paircmp.c
// Function: parse_options
static GtOPrval parse_options(int *parsed_args,
                              Cmppairwiseopt *pw,
                              int argc, const char **argv, GtError *err)
{
  GtOptionParser *op;
  GtOption *optionstrings,
         *optionfiles,
         *optioncharlistlen,
         *optiontext,
         *optionshowedist,
         *optionprint;
  GtStrArray *charlistlen;
  GtOPrval oprval;

  gt_error_check(err);
  charlistlen = gt_str_array_new();
  pw->strings = gt_str_array_new();
  pw->files = gt_str_array_new();
  pw->text = gt_str_new();
  pw->charlistlen = NULL;
  pw->fastasequences0 = NULL;
  pw->fastasequences1 = NULL;
  pw->showedist = false;
  pw->print = false;
  pw->fasta = false;
  op = gt_option_parser_new("options", "Apply function to pairs of strings.");
  gt_option_parser_set_mail_address(op, "<kurtz@zbh.uni-hamburg.de>");

  optionstrings = gt_option_new_string_array("ss", "use two strings",
                                             pw->strings);
  gt_option_parser_add_option(op, optionstrings);

  optionfiles = gt_option_new_filename_array("ff", "use two files",
                                             pw->files);
  gt_option_parser_add_option(op, optionfiles);

  optioncharlistlen = gt_option_new_string_array("a",
                                             "use character list and length",
                                             charlistlen);
  gt_option_parser_add_option(op, optioncharlistlen);

  optiontext = gt_option_new_string("t", "use text", pw->text, NULL);
  gt_option_parser_add_option(op, optiontext);

  optionshowedist = gt_option_new_bool("e", "output unit edit distance",
                      &pw->showedist, false);
  gt_option_parser_add_option(op, optionshowedist);

  optionprint = gt_option_new_bool("p", "print edist alignment",
                      &pw->print, false);
  gt_option_parser_add_option(op, optionprint);

  gt_option_exclude(optionstrings, optionfiles);
  gt_option_exclude(optionstrings, optioncharlistlen);
  gt_option_exclude(optionstrings, optiontext);
  gt_option_exclude(optionfiles, optioncharlistlen);
  gt_option_exclude(optionfiles, optiontext);
  gt_option_exclude(optioncharlistlen, optiontext);
  gt_option_imply(optionshowedist, optionstrings);
  gt_option_imply(optionprint, optionstrings);

  oprval = gt_option_parser_parse(op, parsed_args, argc, argv, gt_versionfunc,
                                  err);
  if (oprval == GT_OPTION_PARSER_OK)
  {
    if (gt_option_is_set(optionstrings))
    {
      if (gt_str_array_size(pw->strings) != 2UL)
      {
        gt_error_set(err, "option -ss requires two string arguments");
        oprval = GT_OPTION_PARSER_ERROR;
      }
    } else
    {
      if (gt_option_is_set(optionfiles))
      {
        if (gt_str_array_size(pw->files) != 2UL)
        {
          if (gt_str_array_size(pw->files) == 3UL &&
              !strcmp(gt_str_array_get(pw->files,0),"fasta"))
          {
            pw->fasta = true;
          }
          if (!pw->fasta)
          {
            gt_error_set(err, "option -ff requires two filename arguments or "
                              "keyword fasta and two filename arguments in "
                              "FASTA format");
            oprval = GT_OPTION_PARSER_ERROR;
          }
        }
      } else
      {
        if (gt_option_is_set(optioncharlistlen))
        {
          GtWord readint;
          if (gt_str_array_size(charlistlen) != 2UL)
          {
            gt_error_set(err,
                         "option -a requires charlist and length argument");
            oprval = GT_OPTION_PARSER_ERROR;
          }else
          {
            pw->charlistlen = gt_malloc(sizeof *pw->charlistlen);
            pw->charlistlen->charlist =
              gt_str_ref(gt_str_array_get_str(charlistlen,
                                                                    0));
            if (sscanf(gt_str_array_get(charlistlen,1UL), GT_WD, &readint) != 1
                || readint < 1L)
            {
              gt_error_set(err,
                           "option -a requires charlist and length argument");
              oprval = GT_OPTION_PARSER_ERROR;
            }
            pw->charlistlen->len = (GtUword) readint;
          }
        } else
        {
          if (!gt_option_is_set(optiontext))
          {
            gt_error_set(err,
                         "use exactly one of the options -ss, -ff, -a, -t");
            oprval = GT_OPTION_PARSER_ERROR;
          }
        }
      }
    }
  }
  gt_option_parser_delete(op);
  if (oprval == GT_OPTION_PARSER_OK && *parsed_args != argc)
  {
    gt_error_set(err, "superfluous program parameters");
    oprval = GT_OPTION_PARSER_ERROR;
  }
  gt_str_array_delete(charlistlen);
  return oprval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movq %rcx, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movq %rsi, %r13
movq %rdi, 0x28(%rsp)
testq %r8, %r8
je 0xb332e
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0xb374a
callq 0x11be10
movq %rbx, 0x38(%rsp)
movq %rax, %rbx
callq 0x11be10
movq %rax, (%r13)
callq 0x11be10
movq %rax, 0x8(%r13)
callq 0x11ac6c
movq %rax, 0x28(%r13)
leaq 0x31(%r13), %rax
movq %rax, 0x10(%rsp)
leaq 0x32(%r13), %rax
movq %rax, 0x18(%rsp)
movb $0x0, 0x32(%r13)
movw $0x0, 0x30(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movq $0x0, 0x20(%r13)
leaq 0x29620d(%rip), %rdi    # 0x349598
leaq 0x29ec4e(%rip), %rsi    # 0x351fe0
callq 0x107bfe
movq %rax, %r14
leaq 0x292f2b(%rip), %rsi    # 0x3462cc
movq %rax, %rdi
callq 0x107e5c
movq (%r13), %rdx
leaq 0x32de41(%rip), %rdi    # 0x3e11f5
leaq 0x29c9d6(%rip), %rsi    # 0x34fd91
callq 0x10a7a1
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
movq 0x8(%r13), %rdx
leaq 0x2b798c(%rip), %rdi    # 0x36ad65
leaq 0x29c9c8(%rip), %rsi    # 0x34fda8
callq 0x10a7df
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
leaq 0x2af3ff(%rip), %rdi    # 0x3627f9
leaq 0x29ec03(%rip), %rsi    # 0x352004
movq %rbx, 0x20(%rsp)
movq %rbx, %rdx
callq 0x10a7a1
movq %r13, %rbx
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
movq %rbx, 0x30(%rsp)
movq 0x28(%rbx), %rdx
leaq 0x31164c(%rip), %rdi    # 0x3c4a7b
leaq 0x29ebec(%rip), %rsi    # 0x352022
xorl %ecx, %ecx
callq 0x10a770
movq %rax, %rbp
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
leaq 0x2be4ad(%rip), %rdi    # 0x3718ff
leaq 0x29ebd2(%rip), %rsi    # 0x35202b
movq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x10a235
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
leaq 0x2e2359(%rip), %rdi    # 0x3957d5
leaq 0x29ebc2(%rip), %rsi    # 0x352045
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x10a235
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x107cc0
movq %r15, %rdi
movq %r12, %rsi
callq 0x10ab96
movq %r15, %rdi
movq %r13, %rsi
callq 0x10ab96
movq %r15, %rdi
movq %rbp, %rsi
callq 0x10ab96
movq %r12, %rdi
movq %r13, %rsi
callq 0x10ab96
movq %r12, 0x18(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x10ab96
movq %r13, %rdi
movq %rbp, %rsi
callq 0x10ab96
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %r12
movq %r15, %rsi
callq 0x10a9e4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10a9e4
leaq 0x6c104(%rip), %r8      # 0x11f60c
movq %r14, %rdi
movq 0x28(%rsp), %rsi
movl 0x4(%rsp), %edx
movq 0x8(%rsp), %rcx
movq %r12, %r9
callq 0x10875d
movl %eax, %ebx
testl %eax, %eax
je 0xb354d
movq %r14, %rdi
callq 0x10a0b4
movq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x11c144
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, 0x10(%rsp)
movq 0x30(%rsp), %rbx
movq 0x18(%rsp), %rbp
movq %r14, 0x8(%rsp)
movq %r15, %rdi
callq 0x10ac3f
testb %al, %al
je 0xb35a1
movq (%rbx), %rdi
callq 0x11c131
cmpq $0x2, %rax
movl 0x4(%rsp), %r15d
je 0xb36c4
leaq 0x29ca1c(%rip), %rsi    # 0x34ffa7
movq %r12, %rdi
xorl %eax, %eax
callq 0xfcb67
movl $0x1, %ebx
movq 0x8(%rsp), %r14
jmp 0xb3527
movq %rbp, %rdi
callq 0x10ac3f
testb %al, %al
movl 0x4(%rsp), %r15d
je 0xb3609
movq 0x8(%rbx), %rdi
callq 0x11c131
cmpq $0x2, %rax
je 0xb36c4
movq 0x8(%rbx), %rdi
callq 0x11c131
cmpq $0x3, %rax
jne 0xb35f6
movq 0x8(%rbx), %rdi
xorl %esi, %esi
callq 0x11bfb3
leaq 0x2c652a(%rip), %rsi    # 0x379b10
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
jne 0xb35f6
movb $0x1, 0x30(%rbx)
cmpb $0x0, 0x30(%rbx)
jne 0xb36c4
leaq 0x29ea54(%rip), %rsi    # 0x35205b
jmp 0xb358b
movq %r13, %rdi
callq 0x10ac3f
testb %al, %al
je 0xb36b6
movq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x11c131
cmpq $0x2, %rax
jne 0xb36f6
leaq 0x29e81f(%rip), %rsi    # 0x351e56
movl $0x10, %edi
movl $0xc3, %edx
callq 0x104226
movq %rbx, %r13
movq %rax, 0x20(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x11bfee
movq %rax, %rdi
callq 0x11b1f3
movq 0x20(%rbx), %rcx
movq %rax, (%rcx)
movl $0x1, %esi
movq %r14, %rdi
callq 0x11bfb3
leaq 0x2c8c4a(%rip), %rsi    # 0x37c2c4
leaq 0x40(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
sete %cl
movq (%rbx), %rax
testq %rax, %rax
setg %dl
testb %dl, %cl
movq 0x8(%rsp), %rbx
je 0xb371a
movq 0x20(%r13), %rcx
movq %rax, 0x8(%rcx)
movq %rbx, %rdi
callq 0x10a0b4
jmp 0xb36d3
movq 0x10(%rsp), %rdi
callq 0x10ac3f
testb %al, %al
je 0xb370e
movq 0x8(%rsp), %rdi
callq 0x10a0b4
movq 0x20(%rsp), %r14
xorl %ebx, %ebx
movq 0x28(%rsp), %rax
cmpl %r15d, (%rax)
je 0xb3534
leaq 0x29ea38(%rip), %rsi    # 0x352122
movq %r12, %rdi
xorl %eax, %eax
callq 0xfcb67
jmp 0xb3740
leaq 0x29e9c5(%rip), %rsi    # 0x3520c2
movq %r12, %rdi
xorl %eax, %eax
callq 0xfcb67
movq 0x8(%rsp), %rdi
jmp 0xb373b
leaq 0x29e9dd(%rip), %rsi    # 0x3520f2
jmp 0xb358b
leaq 0x29e9a1(%rip), %rsi    # 0x3520c2
movq %r12, %rdi
xorl %eax, %eax
callq 0xfcb67
movq 0x40(%rsp), %rax
movq 0x20(%r13), %rcx
movq %rax, 0x8(%rcx)
movq %rbx, %rdi
callq 0x10a0b4
movl $0x1, %ebx
jmp 0xb3534
callq 0x1d22a