// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x128, %rsp            # imm = 0x128
movl %edi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movb $0x0, 0x107(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x5bc52b(%rip), %rsi    # 0x636300
movl $0x78, %edx
callq 0x19610
cmpl $0x0, 0x120(%rsp)
je 0x79e0f
movq 0x110(%rsp), %rdi
leaq 0x4a71f9(%rip), %rsi    # 0x520ff1
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x124(%rsp) # imm = 0xFFFFFFFF
jmp 0x7a4a1
movq 0x108(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xf74a0
testb $0x1, %al
jne 0x79e29
jmp 0x7a162
movq $0x0, 0x78(%rsp)
movq 0x108(%rsp), %rax
movq (%rax), %rdi
callq 0x11fcc0
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x79e72
movq 0x110(%rsp), %rdi
leaq 0x4b4108(%rip), %rsi    # 0x52df66
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x107(%rsp)
jmp 0x79fbd
movq 0x68(%rsp), %rdi
shlq $0x3, %rdi
leaq 0x4b3a8f(%rip), %rsi    # 0x52d911
movl $0x1ca, %edx            # imm = 0x1CA
callq 0xe80f0
movq %rax, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x68(%rsp), %rax
jae 0x79fbb
movq 0x108(%rsp), %rax
movq (%rax), %rdi
movq 0x70(%rsp), %rsi
callq 0x11f8c0
movq %rax, %rdi
leaq 0x4d49a6(%rip), %rsi    # 0x54e86f
leaq 0x60(%rsp), %rdx
movb $0x0, %al
callq 0x19770
cmpl $0x1, %eax
jne 0x79ee2
cmpq $0x0, 0x60(%rsp)
jg 0x79f27
movq 0x110(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x108(%rsp), %rax
movq (%rax), %rdi
movq 0x70(%rsp), %rsi
callq 0x11f8c0
movq 0x38(%rsp), %rdi
movq %rax, %rdx
leaq 0x4b4079(%rip), %rsi    # 0x52df8c
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x107(%rsp)
jmp 0x79fbb
movq 0x60(%rsp), %rdx
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, 0x70(%rsp)
jbe 0x79fa6
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jb 0x79fa6
movq 0x110(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x108(%rsp), %rax
movq (%rax), %rdi
movq 0x70(%rsp), %rsi
callq 0x11f8c0
movq 0x30(%rsp), %rdi
movq %rax, %rdx
leaq 0x4b403d(%rip), %rsi    # 0x52dfd2
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x107(%rsp)
jmp 0x79fbb
jmp 0x79fa8
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0x79e9a
jmp 0x79fbd
testb $0x1, 0x107(%rsp)
jne 0x7a147
jmp 0x79fcd
cmpq $0x0, 0x78(%rsp)
jne 0x7a00d
movq 0x5c1fc4(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x49c02d(%rip), %rsi    # 0x516013
leaq 0x4b403a(%rip), %rdx    # 0x52e027
leaq 0x4b4044(%rip), %rcx    # 0x52e038
leaq 0x4b3916(%rip), %r8     # 0x52d911
movl $0x1e5, %r9d            # imm = 0x1E5
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x7a00f
movq 0x78(%rsp), %rax
movq (%rax), %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x78(%rsp), %rax
movq 0x68(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x108(%rsp), %rax
movq 0x28(%rax), %rax
addq $0x1, %rax
shrq $0x6, %rax
cmpq $0x0, %rax
jne 0x7a067
movl $0x1, %eax
movq %rax, 0x28(%rsp)
jmp 0x7a088
movq 0x108(%rsp), %rax
movq 0x28(%rax), %rax
addq $0x1, %rax
subq $0x1, %rax
shrq $0x6, %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rsi
shlq $0x3, %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0x4b386b(%rip), %rdx    # 0x52d911
movl $0x1e8, %ecx            # imm = 0x1E8
callq 0xe8540
movq %rax, %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x108(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x58(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x19360
movq $0x0, 0x70(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x68(%rsp), %rax
jae 0x7a145
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq 0x108(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rsi
movq (%rcx,%rsi,8), %rcx
shrq $0x6, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0x7a0e4
jmp 0x7a147
movq 0x78(%rsp), %rdi
leaq 0x4b37be(%rip), %rsi    # 0x52d911
movl $0x1ee, %edx            # imm = 0x1EE
callq 0xe88c0
jmp 0x7a377
movq 0x108(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x7a18f
movq 0x110(%rsp), %rdi
leaq 0x4b3ed8(%rip), %rsi    # 0x52e058
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x107(%rsp)
testb $0x1, 0x107(%rsp)
jne 0x7a1c8
movq 0x108(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x7a1c6
movq 0x110(%rsp), %rdi
leaq 0x4b3ee7(%rip), %rsi    # 0x52e09e
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x107(%rsp)
jmp 0x7a1c8
testb $0x1, 0x107(%rsp)
jne 0x7a20c
movq 0x108(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x108(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jbe 0x7a20a
movq 0x110(%rsp), %rdi
leaq 0x4b3ee9(%rip), %rsi    # 0x52e0e4
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x107(%rsp)
jmp 0x7a20c
testb $0x1, 0x107(%rsp)
jne 0x7a25c
movq 0x108(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x108(%rsp), %rcx
addq 0x30(%rcx), %rax
movq 0x108(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jbe 0x7a25a
movq 0x110(%rsp), %rdi
leaq 0x4b3ed3(%rip), %rsi    # 0x52e11e
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x107(%rsp)
jmp 0x7a25c
testb $0x1, 0x107(%rsp)
jne 0x7a375
movq 0x108(%rsp), %rax
movq 0x28(%rax), %rax
addq $0x1, %rax
shrq $0x6, %rax
cmpq $0x0, %rax
jne 0x7a290
movl $0x1, %eax
movq %rax, 0x20(%rsp)
jmp 0x7a2b1
movq 0x108(%rsp), %rax
movq 0x28(%rax), %rax
addq $0x1, %rax
subq $0x1, %rax
shrq $0x6, %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rsi
shlq $0x3, %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0x4b3642(%rip), %rdx    # 0x52d911
movl $0x216, %ecx            # imm = 0x216
callq 0xe8540
movq %rax, %rcx
movq 0x108(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x108(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x48(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x19360
movq 0x108(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq 0x108(%rsp), %rcx
cmpq 0x28(%rcx), %rax
ja 0x7a373
movq 0x50(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq 0x108(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x50(%rsp), %rcx
shrq $0x6, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x108(%rsp), %rax
movq 0x30(%rax), %rax
addq 0x50(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x7a315
jmp 0x7a375
jmp 0x7a377
testb $0x1, 0x107(%rsp)
jne 0x7a436
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x108(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11fcc0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x7a434
leaq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x108(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x10(%rsp)
movq 0x108(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x11f8c0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %r8
movq 0x110(%rsp), %r9
movl $0x5, %esi
leaq 0x4a7967(%rip), %rcx    # 0x521d72
callq 0x261300
cmpl $0x0, %eax
je 0x7a41f
movb $0x1, 0x107(%rsp)
jmp 0x7a434
jmp 0x7a421
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x7a38e
jmp 0x7a436
testb $0x1, 0x107(%rsp)
jne 0x7a486
movq 0x108(%rsp), %rax
movl 0x40(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x7a484
movq 0x108(%rsp), %rax
movl 0x40(%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x7a484
movq 0x110(%rsp), %rdi
leaq 0x4b3cf3(%rip), %rsi    # 0x52e168
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x107(%rsp)
jmp 0x7a486
movb 0x107(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x124(%rsp)
movl 0x124(%rsp), %eax
addq $0x128, %rsp            # imm = 0x128
retq