// File: /workspace/github_c_makefile_star2_O3/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, %rbp
movq %rsi, %r14
movl %edi, %eax
leaq 0x3e4d2c(%rip), %rsi    # 0x4b3660
leaq 0x10(%rsp), %rdi
movl $0xf, %ecx
rep  movsq (%rsi), %es:(%rdi)
testl %eax, %eax
je 0xce96d
leaq 0x281645(%rip), %rsi    # 0x34ff91
movq %rbp, %rdi
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r14), %rdi
callq 0x10ac3f
testb %al, %al
je 0xceb20
movq (%r14), %rdi
callq 0x11c131
testq %rax, %rax
je 0xceb43
movq %rax, %r12
movq %rbp, (%rsp)
leaq (,%rax,8), %rdi
leaq 0x28de1e(%rip), %rsi    # 0x35c7c3
movl $0x1ca, %edx            # imm = 0x1CA
callq 0x104226
movq %rax, %r15
leaq 0x2ad90b(%rip), %r13    # 0x37c2c4
leaq 0x8(%rsp), %rbx
xorl %ebp, %ebp
movq (%r14), %rdi
movq %rbp, %rsi
callq 0x11bfb3
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
jne 0xceb65
movq 0x8(%rsp), %rax
testq %rax, %rax
jle 0xceb65
movq %rax, (%r15,%rbp,8)
testq %rbp, %rbp
je 0xcea06
cmpq %rax, -0x8(%r15,%rbp,8)
jae 0xceb8f
incq %rbp
cmpq %rbp, %r12
jne 0xce9c0
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
movl $0x8, %ebx
cmovaeq %rax, %rbx
leaq 0x28dd77(%rip), %rdx    # 0x35c7c3
xorl %ebp, %ebp
xorl %edi, %edi
movq %rbx, %rsi
movl $0x1e8, %ecx            # imm = 0x1E8
callq 0x104461
movq %rax, 0x38(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x173a0
movq 0x38(%r14), %rax
movq (%r15,%rbp,8), %rcx
movq %r13, %rdx
shrq %cl, %rdx
shrq $0x6, %rcx
orq %rdx, (%rax,%rcx,8)
incq %rbp
cmpq %rbp, %r12
jne 0xcea72
leaq 0x28dd30(%rip), %rsi    # 0x35c7c3
movq %r15, %rdi
movl $0x1ee, %edx            # imm = 0x1EE
callq 0x1045eb
movq (%rsp), %rbp
movq 0x8(%r14), %rdi
callq 0x11c131
testq %rax, %rax
je 0xceb02
leaq 0x40(%r14), %r15
xorl %ebx, %ebx
leaq 0x282235(%rip), %r12    # 0x350cf4
leaq 0x10(%rsp), %r13
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x11bfb3
movl $0x5, %esi
movq %r13, %rdi
movq %r15, %rdx
movq %r12, %rcx
movq %rax, %r8
movq %rbp, %r9
callq 0x1b7e64
testl %eax, %eax
jne 0xce956
incq %rbx
movq 0x8(%r14), %rdi
callq 0x11c131
cmpq %rax, %rbx
jb 0xceac4
movl 0x40(%r14), %ecx
andl $0xf, %ecx
xorl %eax, %eax
cmpl $0x8, %ecx
jne 0xce95b
leaq 0x28e49c(%rip), %rsi    # 0x35cfb7
jmp 0xce94c
movq 0x20(%r14), %rcx
testq %rcx, %rcx
je 0xceb59
movq 0x28(%r14), %rax
testq %rax, %rax
je 0xceb6e
cmpq %rax, %rcx
jbe 0xceb7a
leaq 0x28e3f5(%rip), %rsi    # 0x35cf33
jmp 0xce94c
leaq 0x28e29c(%rip), %rsi    # 0x35cde6
xorl %r15d, %r15d
movq %rbp, %rdi
xorl %eax, %eax
callq 0xfcb67
jmp 0xcebb2
leaq 0x28e347(%rip), %rsi    # 0x35cea7
jmp 0xce94c
leaq 0x28e2a0(%rip), %rbx    # 0x35ce0c
jmp 0xceb96
leaq 0x28e378(%rip), %rsi    # 0x35ceed
jmp 0xce94c
addq 0x30(%r14), %rcx
cmpq %rax, %rcx
jbe 0xcebcb
leaq 0x28e3e3(%rip), %rsi    # 0x35cf6d
jmp 0xce94c
leaq 0x28e2bc(%rip), %rbx    # 0x35ce52
movq (%r14), %rdi
movq %rbp, %rsi
callq 0x11bfb3
movq (%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfcb67
leaq 0x28dc0a(%rip), %rsi    # 0x35c7c3
movq %r15, %rdi
movl $0x1ee, %edx            # imm = 0x1EE
callq 0x1045eb
jmp 0xce956
leaq 0x1(%rax), %rcx
shrq $0x6, %rax
cmpq $0x40, %rcx
leaq 0x8(,%rax,8), %rax
movl $0x8, %ebx
cmovaeq %rax, %rbx
leaq 0x28dbd4(%rip), %rdx    # 0x35c7c3
xorl %edi, %edi
movq %rbx, %rsi
movl $0x216, %ecx            # imm = 0x216
callq 0x104461
movq %rax, 0x38(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x173a0
movq 0x20(%r14), %rcx
cmpq 0x28(%r14), %rcx
ja 0xceaa4
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq 0x38(%r14), %rdx
movq %rax, %rsi
shrq %cl, %rsi
movq %rcx, %rdi
shrq $0x6, %rdi
orq %rsi, (%rdx,%rdi,8)
addq 0x30(%r14), %rcx
cmpq 0x28(%r14), %rcx
jbe 0xcec2b
jmp 0xceaa4