// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_tallymer.c
// Function: gt_tyr_occratio_arguments_check
static int gt_tyr_occratio_arguments_check(int rest_argc,
                                           void *tool_arguments,
                                           GtError *err)
{
  Tyr_occratio_options *arguments = tool_arguments;
  bool haserr = false;

  Optionargmodedesc outputmodedesctable[] =
  {
    {"unique","number of unique mers",TYROCC_OUTPUTUNIQUE},
    {"nonunique","number of nonunique mers (single count)",
                 TYROCC_OUTPUTNONUNIQUE},
    {"nonuniquemulti","number of nonunique mers (multi count)",
                 TYROCC_OUTPUTNONUNIQUEMULTI},
    {"relative","fraction of unique/non-unique mers relative to all mers",
                 TYROCC_OUTPUTRELATIVE},
    {"total","number of all mers",TYROCC_OUTPUTTOTAL}
  };
  if (rest_argc != 0)
  {
    gt_error_set(err,"superfluous arguments");
    return -1;
  }
  if (gt_option_is_set(arguments->refoptionmersizes))
  {
    GtUword *mersizes = NULL;
    GtUword idx,
                  numofmersizes = gt_str_array_size(arguments->mersizesstrings);
    if (numofmersizes == 0)
    {
      gt_error_set(err,"missing argument to option -mersizes:");
      haserr = true;
    } else
    {
      mersizes = gt_malloc(sizeof (*mersizes) * numofmersizes);
      for (idx=0; idx<numofmersizes; idx++)
      {
        GtWord readnum;

        if (sscanf(gt_str_array_get(arguments->mersizesstrings,idx),
                   ""GT_WD"",&readnum) != 1 || readnum <= 0)
        {
          gt_error_set(err,"invalid argument \"%s\" of option -mersizes: "
                       "must be a positive integer",
                       gt_str_array_get(arguments->mersizesstrings,idx));
          haserr = true;
          break;
        }
        mersizes[idx] = (GtUword) readnum;
        if (idx > 0 && mersizes[idx-1] >= mersizes[idx])
        {
          gt_error_set(err,"invalid argumnt %s to option -mersizes: "
                       "positive numbers must be strictly increasing",
                       gt_str_array_get(arguments->mersizesstrings,idx));
          haserr = true;
          break;
        }
      }
    }
    if (!haserr)
    {
      gt_assert(mersizes != NULL);
      arguments->minmersize = mersizes[0];
      arguments->maxmersize = mersizes[numofmersizes-1];
      GT_INITBITTAB(arguments->outputvector,arguments->maxmersize+1);
      for (idx=0; idx<numofmersizes; idx++)
      {
        GT_SETIBIT(arguments->outputvector,mersizes[idx]);
      }
    }
    gt_free(mersizes);
  } else
  {
    if (arguments->minmersize == 0)
    {
      gt_error_set(err,"if option -mersizes is not used, then option "
                       "-minmersize is mandatory");
      haserr = true;
    }
    if (!haserr)
    {
      if (arguments->maxmersize == 0)
      {
        gt_error_set(err,"if option -mersizes is not used, then option "
                         "-maxmersize is mandatory");
        haserr = true;
      }
    }
    if (!haserr)
    {
      if (arguments->minmersize > arguments->maxmersize)
      {
        gt_error_set(err,"minimum mer size must not be larger than "
                         "maximum mer size");
        haserr = true;
      }
    }
    if (!haserr)
    {
      if (arguments->minmersize+arguments->stepmersize > arguments->maxmersize)
      {
        gt_error_set(err,"minimum mer size + step value must be smaller or "
                         "equal to maximum mersize");
        haserr = true;
      }
    }
    if (!haserr)
    {
      GtUword outputval;

      GT_INITBITTAB(arguments->outputvector,arguments->maxmersize+1);
      for (outputval = arguments->minmersize;
           outputval <= arguments->maxmersize;
           outputval += arguments->stepmersize)
      {
        GT_SETIBIT(arguments->outputvector,outputval);
      }
    }
  }
  if (!haserr)
  {
    GtUword idx;
    for (idx=0; idx<gt_str_array_size(arguments->outputspec); idx++)
    {
      if (gt_optionargaddbitmask(outputmodedesctable,
                           sizeof (outputmodedesctable)/
                           sizeof (outputmodedesctable[0]),
                           &arguments->outputmode,
                           "-output",
                           gt_str_array_get(arguments->outputspec,idx),
                           err) != 0)
      {
        haserr = true;
        break;
      }
    }
  }
  if (!haserr)
  {
    if ((arguments->outputmode & TYROCC_OUTPUTRELATIVE) &&
        !(arguments->outputmode &
            (TYROCC_OUTPUTUNIQUE | TYROCC_OUTPUTNONUNIQUE |
                                   TYROCC_OUTPUTNONUNIQUEMULTI)))
    {
      gt_error_set(err,"argument relative to option -output requires that one "
                   "of the arguments unique, nonunique, or nonuniquemulti "
                   "is used");
      haserr = true;
    }
  }
  return haserr ? - 1: 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r13
movq %rsi, %r14
movl %edi, %eax
leaq 0x3de7ae(%rip), %rsi    # 0x432670
pushq $0xf
popq %rcx
leaq 0x10(%rsp), %rdi
rep  movsq (%rsi), %es:(%rdi)
testl %eax, %eax
je 0x53eea
leaq 0x29c0c1(%rip), %rsi    # 0x2eff99
movq %r13, %rdi
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rax
jmp 0x54155
movq 0x18(%r14), %rdi
callq 0x9b4cb
testb %al, %al
je 0x53f91
movq (%r14), %rdi
callq 0xae61c
testq %rax, %rax
je 0x53fbc
movq %rax, %r12
movq %r13, (%rsp)
leaq (,%rax,8), %rdi
leaq 0x2a87f7(%rip), %rsi    # 0x2fc719
movl $0x1ca, %edx            # imm = 0x1CA
callq 0x93160
movq %rax, %r15
leaq 0x2c8799(%rip), %r13    # 0x31c6cf
leaq 0x8(%rsp), %rbx
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x53fe1
movq (%r14), %rdi
movq %rbp, %rsi
callq 0xae386
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x177b0
cmpl $0x1, %eax
jne 0x54070
movq 0x8(%rsp), %rax
testq %rax, %rax
jle 0x54070
movq %rax, (%r15,%rbp,8)
testq %rbp, %rbp
je 0x53f8c
cmpq %rax, -0x8(%r15,%rbp,8)
jae 0x5409e
incq %rbp
jmp 0x53f3d
movq 0x20(%r14), %rcx
testq %rcx, %rcx
je 0x53fd5
movq 0x28(%r14), %rax
testq %rax, %rax
je 0x54079
cmpq %rax, %rcx
jbe 0x54085
leaq 0x2a8f03(%rip), %rsi    # 0x2fceba
jmp 0x54144
leaq 0x2a8d79(%rip), %rsi    # 0x2fcd3c
xorl %r15d, %r15d
movq %r13, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x540c4
leaq 0x2a8e52(%rip), %rsi    # 0x2fce2e
jmp 0x54144
testq %r15, %r15
je 0x541df
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movq (%r15), %rax
movq %rax, 0x20(%r14)
movq -0x8(%r15,%r12,8), %rax
movq %rax, 0x28(%r14)
leaq 0x1(%rax), %rcx
shrq $0x6, %rax
cmpq $0x40, %rcx
leaq 0x8(,%rax,8), %rax
pushq $0x8
popq %rbx
cmovaeq %rax, %rbx
leaq 0x2a86f3(%rip), %rdx    # 0x2fc719
xorl %ebp, %ebp
xorl %edi, %edi
movq %rbx, %rsi
movl $0x1e8, %ecx            # imm = 0x1E8
callq 0x93472
movq %rax, 0x38(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x17380
movq 0x38(%r14), %rax
cmpq %rbp, %r12
je 0x54068
movq (%r15,%rbp,8), %rcx
movq %r13, %rdx
shrq %cl, %rdx
shrq $0x6, %rcx
orq %rdx, (%rax,%rcx,8)
incq %rbp
jmp 0x5404c
xorl %ebx, %ebx
movq (%rsp), %r13
jmp 0x540c6
leaq 0x2a8ceb(%rip), %rbx    # 0x2fcd62
jmp 0x540a5
leaq 0x2a8df4(%rip), %rsi    # 0x2fce74
jmp 0x54144
addq 0x30(%r14), %rcx
cmpq %rax, %rcx
jbe 0x54167
leaq 0x2a8e5b(%rip), %rsi    # 0x2fcef4
jmp 0x54144
leaq 0x2a8d03(%rip), %rbx    # 0x2fcda8
movq (%r14), %rdi
movq %rbp, %rsi
callq 0xae386
movq (%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
movb $0x1, %bl
leaq 0x2a864c(%rip), %rsi    # 0x2fc719
movq %r15, %rdi
movl $0x1ee, %edx            # imm = 0x1EE
callq 0x936f9
testb %bl, %bl
jne 0x54150
movl %ebx, (%rsp)
leaq 0x40(%r14), %rbx
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
pushq $0x5
popq %rbp
movq 0x8(%r14), %rdi
callq 0xae61c
cmpq %rax, %r15
jae 0x5412e
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0xae386
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
leaq 0x29cbed(%rip), %rcx    # 0x2f0d07
movq %rax, %r8
movq %r13, %r9
callq 0x166988
incq %r15
testl %eax, %eax
je 0x540f0
jmp 0x5414e
movl 0x40(%r14), %eax
andl $0xf, %eax
cmpl $0x8, %eax
movl (%rsp), %ebx
jne 0x54150
leaq 0x2a8dfa(%rip), %rsi    # 0x2fcf3e
movq %r13, %rdi
xorl %eax, %eax
callq 0x89dbb
movb $0x1, %bl
movzbl %bl, %eax
negl %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq 0x1(%rax), %rcx
shrq $0x6, %rax
cmpq $0x40, %rcx
leaq 0x8(,%rax,8), %rax
pushq $0x8
popq %rbx
cmovaeq %rax, %rbx
leaq 0x2a8586(%rip), %rdx    # 0x2fc719
xorl %edi, %edi
movq %rbx, %rsi
movl $0x216, %ecx            # imm = 0x216
callq 0x93472
movq %rax, 0x38(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x17380
movq 0x20(%r14), %rcx
cmpq 0x28(%r14), %rcx
ja 0x541d8
movq %r15, %rax
shrq %cl, %rax
movq 0x38(%r14), %rdx
movq %rcx, %rsi
shrq $0x6, %rsi
orq %rax, (%rdx,%rsi,8)
addq 0x30(%r14), %rcx
jmp 0x541b7
xorl %ebx, %ebx
jmp 0x540de
movq 0x3e3d82(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x290e23(%rip), %rsi    # 0x2e5013
leaq 0x2a8c06(%rip), %rdx    # 0x2fcdfd
leaq 0x2a8c10(%rip), %rcx    # 0x2fce0e
leaq 0x2a8514(%rip), %r8     # 0x2fc719
movl $0x1e5, %r9d            # imm = 0x1E5
xorl %eax, %eax
callq 0x17a50
callq 0x17390