// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_matstat.c
// Function: gt_matstat_arguments_check
static int gt_matstat_arguments_check(GT_UNUSED int rest_argc,
                                      void *tool_arguments, GtError *err)
{
  Gfmsubcallinfo *arguments = tool_arguments;
  int had_err = 0;
  const Optionargmodedesc msgfmsubmodedesctable[] =
  {
    {"sequence","matching sequence",SHOWSEQUENCE},
    {"querypos","position in query sequence",SHOWQUERYPOS},
    {"subjectpos","position in subject sequence",SHOWSUBJECTPOS}
  };
  const Optionargmodedesc gfmsubmodedesctable[] =
  {
    {"sequence","matching sequence",SHOWSEQUENCE},
    {"querypos","position in query sequence",SHOWQUERYPOS}
  };
  gt_error_check(err);
  gt_assert(arguments);

  if (gt_option_is_set(arguments->optionfmindex))
    {
      arguments->indextype = Fmindextype;
    } else
    {
      if (gt_option_is_set(arguments->optionesaindex))
      {
        arguments->indextype = Esaindextype;
      } else
      {
        if (gt_option_is_set(arguments->optionpckindex))
        {
          arguments->indextype = Packedindextype;
        } else
        {
          gt_error_set(err,"one of the options -esa, -pck must be used");
          return -1;
        }
      }
    }
    if (gt_option_is_set(arguments->optionmin))
    {
       arguments->minlength.defined = true;
    }
    if (gt_option_is_set(arguments->optionmax))
    {
       arguments->maxlength.defined = true;
    }
    if (!gt_option_is_set(arguments->optionmin) &&
          !gt_option_is_set(arguments->optionmax))
    {
      gt_error_set(err,"one of the options -min or -max must be set");
      return -1;
    }
    if (arguments->minlength.defined &&
        arguments->maxlength.defined)
    {
      if (arguments->maxlength.valueunsignedlong <
          arguments->minlength.valueunsignedlong)
      {
        gt_error_set(err,"minvalue must be smaller or equal than maxvalue");
        return -1;
      }
    }
    if (gt_option_is_set(arguments->optionoutput))
    {
      if (gt_str_array_size(arguments->flagsoutputoption) == 0)
      {
        gt_error_set(err,"missing arguments to option -output");
        return -1;
      } else
      {
        GtUword i;
        for (i=0; i<gt_str_array_size(arguments->flagsoutputoption); i++)
        {
          if (arguments->doms)
          {
            if (gt_optionargaddbitmask(msgfmsubmodedesctable,
                                 sizeof (msgfmsubmodedesctable)/
                                 sizeof (msgfmsubmodedesctable[0]),
                                 &arguments->showmode,
                                 "-output",
                                 gt_str_array_get(arguments->flagsoutputoption,
                                                  i),
                                 err) != 0)
            {
              return -1;
            }
          } else
          {
            if (gt_optionargaddbitmask(gfmsubmodedesctable,
                                  sizeof (gfmsubmodedesctable)/
                                  sizeof (gfmsubmodedesctable[0]),
                                  &arguments->showmode,
                                  "-output",
                                  gt_str_array_get(arguments->flagsoutputoption,
                                                   i),
                                  err) != 0)
            {
              return -1;
            }
          }
        }
      }
    }

  return had_err;
}

// Assembly:
subq $0xd8, %rsp
movl %edi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movl $0x0, 0xb4(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x5f0e6b(%rip), %rsi    # 0x636040
movl $0x48, %edx
callq 0x19610
leaq 0x30(%rsp), %rdi
leaq 0x5f0ea5(%rip), %rsi    # 0x636090
movl $0x30, %edx
callq 0x19610
cmpq $0x0, 0xc0(%rsp)
je 0x4524b
movq 0xc0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x45213
jmp 0x4524b
movq 0x5f6d86(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4d0def(%rip), %rsi    # 0x516013
leaq 0x4d0f94(%rip), %rdx    # 0x5161bf
leaq 0x4dca82(%rip), %rcx    # 0x521cb4
leaq 0x4dc872(%rip), %r8     # 0x521aab
movl $0xbc, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4524d
jmp 0x4524f
cmpq $0x0, 0xb8(%rsp)
jne 0x45292
movq 0x5f6d3f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4d0da8(%rip), %rsi    # 0x516013
leaq 0x5358ed(%rip), %rdx    # 0x57ab5f
leaq 0x4dca3b(%rip), %rcx    # 0x521cb4
leaq 0x4dc82b(%rip), %r8     # 0x521aab
movl $0xbd, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x45294
movq 0xb8(%rsp), %rax
movq 0x60(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x452ab
jmp 0x452bc
movq 0xb8(%rsp), %rax
movl $0x0, 0x40(%rax)
jmp 0x45336
movq 0xb8(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x452d3
jmp 0x452e4
movq 0xb8(%rsp), %rax
movl $0x1, 0x40(%rax)
jmp 0x45334
movq 0xb8(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x452fb
jmp 0x4530c
movq 0xb8(%rsp), %rax
movl $0x2, 0x40(%rax)
jmp 0x45332
movq 0xc0(%rsp), %rdi
leaq 0x4dc9b4(%rip), %rsi    # 0x521ccf
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
jmp 0x455c0
jmp 0x45334
jmp 0x45336
movq 0xb8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x4534d
jmp 0x45358
movq 0xb8(%rsp), %rax
movb $0x1, (%rax)
movq 0xb8(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x4536f
jmp 0x4537b
movq 0xb8(%rsp), %rax
movb $0x1, 0x10(%rax)
movq 0xb8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x453cb
movq 0xb8(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x453cb
movq 0xc0(%rsp), %rdi
leaq 0x4dc946(%rip), %rsi    # 0x521cfa
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
jmp 0x455c0
movq 0xb8(%rsp), %rax
testb $0x1, (%rax)
je 0x45428
movq 0xb8(%rsp), %rax
testb $0x1, 0x10(%rax)
je 0x45428
movq 0xb8(%rsp), %rax
movq 0x18(%rax), %rax
movq 0xb8(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x45426
movq 0xc0(%rsp), %rdi
leaq 0x4dc917(%rip), %rsi    # 0x521d26
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
jmp 0x455c0
jmp 0x45428
movq 0xb8(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x45442
jmp 0x455b2
movq 0xb8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jne 0x4547f
movq 0xc0(%rsp), %rdi
leaq 0x4dc8ee(%rip), %rsi    # 0x521d56
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
jmp 0x455c0
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xb8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11fcc0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x455ae
movq 0xb8(%rsp), %rax
testb $0x1, 0x44(%rax)
je 0x45530
leaq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xb8(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x18(%rsp)
movq 0xb8(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x11f8c0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq %rax, %r8
movq 0xc0(%rsp), %r9
movl $0x3, %esi
leaq 0x4dc85e(%rip), %rcx    # 0x521d72
callq 0x261300
cmpl $0x0, %eax
je 0x4552e
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
jmp 0x455c0
jmp 0x45599
leaq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0xb8(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x8(%rsp)
movq 0xb8(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x11f8c0
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %r8
movq 0xc0(%rsp), %r9
movl $0x2, %esi
leaq 0x4dc7f2(%rip), %rcx    # 0x521d72
callq 0x261300
cmpl $0x0, %eax
je 0x45597
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
jmp 0x455c0
jmp 0x45599
jmp 0x4559b
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x45488
jmp 0x455b0
jmp 0x455b2
movl 0xb4(%rsp), %eax
movl %eax, 0xd4(%rsp)
movl 0xd4(%rsp), %eax
addq $0xd8, %rsp
retq
nop