// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_seed_extend.c
// Function: gt_seed_extend_arguments_check
static int gt_seed_extend_arguments_check(int rest_argc, void *tool_arguments,
                                          GtError *err)
{
  GtSeedExtendArguments *arguments = tool_arguments;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(arguments != NULL);

  /* -t parameter as alias for maxfreq := t - 1 */
  if (arguments->dbs_suppress < GT_UWORD_MAX) {
    arguments->dbs_maxfreq = arguments->dbs_suppress - 1;
  }

  /* parse memlimit argument */
  arguments->dbs_memlimit = GT_UWORD_MAX;
  if (arguments->histogram == true) {
    arguments->dbs_memlimit -= 1;
  }
  if (strcmp(gt_str_get(arguments->dbs_memlimit_str), "") != 0) {
    had_err = gt_option_parse_spacespec(&arguments->dbs_memlimit,
                                        "memlimit",
                                        arguments->dbs_memlimit_str,
                                        err);
    if (!had_err && arguments->dbs_memlimit == 0) {
      gt_error_set(err,
                   "argument to option \"-memlimit\" must be at least 1MB");
      had_err = -1;
    }
  }
#ifdef GT_THREADS_ENABLED
  if (!had_err && arguments->compute_ani && gt_jobs > 1)
  {
    gt_error_set(err,"option -ani does not work with multiple threads");
    had_err = -1;
  }
#endif

  /* minimum maxfreq value for 1 input file */
  if (!had_err && arguments->dbs_maxfreq == 1 &&
      strcmp(gt_str_get(arguments->dbs_queryname), "") == 0) {
    if (arguments->dbs_suppress == GT_UWORD_MAX) {
      gt_error_set(err, "argument to option \"-maxfreq\" must be >= 2 to "
                   "find matching k-mers");
    } else {
      gt_error_set(err, "argument to option \"-t\" must be >= 3 to find "
                   "matching k-mers");
    }
    had_err = -1;
  }

  if (!gt_option_is_set(arguments->se_ref_op_evalue))
  {
    arguments->se_evalue_threshold = DBL_MAX;
  }
  if (!gt_option_is_set(arguments->se_ref_op_maxmat))
  {
    arguments->maxmat = 0;
  }
  if (!gt_option_is_set(arguments->ref_diagband_statistics))
  {
    gt_str_set(arguments->diagband_statistics_arg,"");
  }
  /* no extra arguments */
  if (!had_err && rest_argc > 0) {
    gt_error_set(err, "too many arguments (-help shows correct usage)");
    had_err = -1;
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
testq %rdx, %rdx
je 0xc1b3c
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0xc1cc1
testq %r14, %r14
je 0xc1cbc
movq 0x30(%r14), %rax
cmpq $-0x1, %rax
je 0xc1b56
decq %rax
movq %rax, 0x28(%r14)
movzbl 0xf4(%r14), %eax
notq %rax
movq %rax, 0x38(%r14)
movq 0x70(%r14), %rdi
callq 0x120d23
xorl %r15d, %r15d
cmpb $0x0, (%rax)
je 0xc1bbb
leaq 0x38(%r14), %r12
movq 0x70(%r14), %rdx
leaq 0x32c787(%rip), %rsi    # 0x3ee30c
movq %r12, %rdi
movq %rbx, %rcx
callq 0x10fe61
movl %eax, %r15d
testl %eax, %eax
jne 0xc1bbb
cmpq $0x0, (%r12)
movl $0x0, %r15d
jne 0xc1bbb
leaq 0x29df52(%rip), %rsi    # 0x35fafd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %r15d, %r15d
jne 0xc1bf0
xorl %r15d, %r15d
cmpb $0x1, 0xf9(%r14)
jne 0xc1bf0
leaq 0x403244(%rip), %rax    # 0x4c4e18
cmpl $0x2, (%rax)
jb 0xc1bf0
leaq 0x29df51(%rip), %rsi    # 0x35fb31
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %r15d, %r15d
jne 0xc1c34
xorl %r15d, %r15d
cmpq $0x1, 0x28(%r14)
jne 0xc1c34
movq 0x8(%r14), %rdi
callq 0x120d23
cmpb $0x0, (%rax)
jne 0xc1c34
cmpq $-0x1, 0x30(%r14)
leaq 0x29df48(%rip), %rax    # 0x35fb61
leaq 0x29df84(%rip), %rsi    # 0x35fba4
cmoveq %rax, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq 0x108(%r14), %rdi
callq 0x10fe52
testb %al, %al
jne 0xc1c55
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rax, 0xe0(%r14)
movq 0x118(%r14), %rdi
callq 0x10fe52
testb %al, %al
jne 0xc1c70
movq $0x0, 0x100(%r14)
movq 0x120(%r14), %rdi
callq 0x10fe52
testb %al, %al
jne 0xc1c90
movq 0x60(%r14), %rdi
leaq 0x311c05(%rip), %rsi    # 0x3d3890
callq 0x1209e4
testl %ebp, %ebp
jle 0xc1cb0
testl %r15d, %r15d
jne 0xc1cb0
leaq 0x29df41(%rip), %rsi    # 0x35fbe1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1ea80
callq 0x1ea47