// File: /workspace/github_c_makefile_star2_O1/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 $0x98, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %eax
leaq 0x3ed7dd(%rip), %rsi    # 0x4be670
leaq 0x20(%rsp), %rdi
movl $0xf, %ecx
rep  movsq (%rsi), %es:(%rdi)
testl %eax, %eax
je 0xd0ebf
leaq 0x288116(%rip), %rsi    # 0x358fc1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xd1238
movq 0x18(%r14), %rdi
callq 0x10fe52
testb %al, %al
je 0xd0fb0
movq (%r14), %rdi
callq 0x121e78
movq %rax, %rbp
testq %rax, %rax
je 0xd0fc3
movq %rbx, 0x8(%rsp)
leaq (,%rbp,8), %rdi
leaq 0x29496b(%rip), %rsi    # 0x365863
movl $0x1ca, %edx            # imm = 0x1CA
callq 0x1092b2
movq %rax, %r12
movq %rbp, 0x10(%rsp)
leaq -0x1(%rbp), %r13
xorl %ebp, %ebp
xorl %r15d, %r15d
movq (%r14), %rdi
movq %r15, %rsi
callq 0x121cfa
movq %rax, %rdi
leaq 0x2b470c(%rip), %rsi    # 0x385634
leaq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
setne %cl
movq 0x18(%rsp), %rax
testq %rax, %rax
setle %dl
orb %cl, %dl
leaq 0x294f5e(%rip), %rbx    # 0x365eac
jne 0xd0f6b
movq %rax, (%r12,%r15,8)
testq %r15, %r15
je 0xd0f67
leaq 0x294f92(%rip), %rbx    # 0x365ef2
cmpq %rax, -0x8(%r12,%r15,8)
jae 0xd0f6b
xorl %eax, %eax
jmp 0xd0f8d
movq (%r14), %rdi
movq %r15, %rsi
callq 0x121cfa
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %al
movb $0x1, %bpl
testb %al, %al
jne 0xd0fa1
leaq 0x1(%r15), %rax
cmpq %r15, %r13
movq %rax, %r15
jne 0xd0f13
movq 0x8(%rsp), %rbx
movq %rbp, %r13
movq 0x10(%rsp), %rbp
jmp 0xd0fda
cmpq $0x0, 0x20(%r14)
je 0xd1090
xorl %r13d, %r13d
jmp 0xd10a4
leaq 0x294ebc(%rip), %rsi    # 0x365e86
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
testb $0x1, %r13b
jne 0xd1077
testq %r12, %r12
je 0xd124a
movq %rbx, %r15
movq (%r12), %rax
movq %rax, 0x20(%r14)
movq -0x8(%r12,%rbp,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 0x29483e(%rip), %rdx    # 0x365863
xorl %edi, %edi
movq %rbx, %rsi
movl $0x1e8, %ecx            # imm = 0x1E8
callq 0x1094e6
movq %rax, 0x38(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x173a0
testq %rbp, %rbp
movq %r15, %rbx
je 0xd1077
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq 0x38(%r14), %rdx
xorl %esi, %esi
movq (%r12,%rsi,8), %rcx
movq %rax, %rdi
shrq %cl, %rdi
shrq $0x6, %rcx
orq %rdi, (%rdx,%rcx,8)
incq %rsi
cmpq %rsi, %rbp
jne 0xd105d
leaq 0x2947e5(%rip), %rsi    # 0x365863
movq %r12, %rdi
movl $0x1ee, %edx            # imm = 0x1EE
callq 0x109670
jmp 0xd1198
leaq 0x294ee1(%rip), %rsi    # 0x365f78
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
testb %r13b, %r13b
jne 0xd10c4
cmpq $0x0, 0x28(%r14)
jne 0xd10c4
leaq 0x294f07(%rip), %rsi    # 0x365fbe
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
testb %r13b, %r13b
jne 0xd10e7
movq 0x20(%r14), %rax
cmpq 0x28(%r14), %rax
jbe 0xd10e7
leaq 0x294f2a(%rip), %rsi    # 0x366004
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
testb %r13b, %r13b
jne 0xd110e
movq 0x30(%r14), %rax
addq 0x20(%r14), %rax
cmpq 0x28(%r14), %rax
jbe 0xd110e
leaq 0x294f3d(%rip), %rsi    # 0x36603e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
testb %r13b, %r13b
jne 0xd1198
movq %rbx, %r15
movq 0x28(%r14), %rax
leaq 0x1(%rax), %rcx
shrq $0x6, %rax
cmpq $0x40, %rcx
leaq 0x8(,%rax,8), %rax
movl $0x8, %ebx
cmovaeq %rax, %rbx
leaq 0x294721(%rip), %rdx    # 0x365863
xorl %edi, %edi
movq %rbx, %rsi
movl $0x216, %ecx            # imm = 0x216
callq 0x1094e6
movq %rax, 0x38(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x173a0
movq 0x20(%r14), %rcx
cmpq 0x28(%r14), %rcx
ja 0xd1195
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 0xd117a
movq %r15, %rbx
testb $0x1, %r13b
jne 0xd1208
movq 0x8(%r14), %rdi
callq 0x121e78
testq %rax, %rax
je 0xd1208
movq %r13, 0x8(%rsp)
leaq 0x40(%r14), %r15
xorl %r12d, %r12d
leaq 0x288b70(%rip), %r13    # 0x359d2f
leaq 0x20(%rsp), %rbp
movq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x121cfa
movl $0x5, %esi
movq %rbp, %rdi
movq %r15, %rdx
movq %r13, %rcx
movq %rax, %r8
movq %rbx, %r9
callq 0x1c094c
testl %eax, %eax
jne 0xd1205
incq %r12
movq 0x8(%r14), %rdi
callq 0x121e78
cmpq %rax, %r12
jb 0xd11c4
movq 0x8(%rsp), %r13
jmp 0xd1208
movb $0x1, %r13b
testb $0x1, %r13b
jne 0xd122e
movl 0x40(%r14), %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0xd122e
leaq 0x294e67(%rip), %rsi    # 0x366088
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r13b
andb $0x1, %r13b
movzbl %r13b, %eax
negl %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x21a53