// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/ltr/gt_ltrharvest.c
// Function: gt_ltrharvest_arguments_check
static int gt_ltrharvest_arguments_check(GT_UNUSED int rest_argc,
                                           void *tool_arguments,
                                           GtError *err)
{
  LTRharvestArguments *arguments = tool_arguments;
  int had_err = 0;

  /* init */
  arguments->motif->firstleft   = (GtUchar) 't';
  arguments->motif->secondleft  = (GtUchar) 'g';
  arguments->motif->firstright  = (GtUchar) 'c';
  arguments->motif->secondright = (GtUchar) 'a';
  arguments->motif->allowedmismatches = arguments->allowedmismatches;

  if (gt_option_is_set(arguments->optionmotif))
  {
    if (gt_str_length(arguments->str_motif) != 4UL)
    {
      gt_error_set(err,
          "argument of -motif has not exactly 4 characters");
      had_err = -1;
    }
    if (!had_err) {
      arguments->motif->firstleft =
        (GtUchar) gt_str_get(arguments->str_motif)[0];
      arguments->motif->secondleft =
        (GtUchar) gt_str_get(arguments->str_motif)[1];
      arguments->motif->firstright =
        (GtUchar)  gt_str_get(arguments->str_motif)[2];
      arguments->motif->secondright =
        (GtUchar)  gt_str_get(arguments->str_motif)[3];
      /* default if motif specified */
      if (!gt_option_is_set(arguments->optionmotifmis))
      {
        arguments->motif->allowedmismatches = 0;
        arguments->allowedmismatches = 0;
      }
    }
  }
  if (!had_err) {
    if (gt_option_is_set(arguments->optionoverlaps))
    {
      if (strcmp(gt_str_get(arguments->str_overlaps), "no") == 0)
      {
        arguments->bestoverlaps = false;
        arguments->nooverlaps = true;
      }
      else if (strcmp(gt_str_get(arguments->str_overlaps), "best") == 0 )
      {
        arguments->bestoverlaps = true;
        arguments->nooverlaps = false;
      }
      else if (strcmp(gt_str_get(arguments->str_overlaps), "all") == 0 )
      {
        arguments->bestoverlaps = false;
        arguments->nooverlaps = false;
      }
      else
      {
        gt_assert(0); /* cannot happen */
      }
    }
    else
    {
      /* default is "best" */
      arguments->bestoverlaps = true;  /* take best prediction
                                          if overlap occurs, default */
      arguments->nooverlaps = false; /* overlapping predictions (not) allowed*/
    }
    /* if FASTA output is set */
    if (gt_option_is_set(arguments->optionout))
    {
      arguments->fastaoutput = true;
    }
    /* if FASTA output inner region is set */
    if (gt_option_is_set(arguments->optionoutinner))
    {
      arguments->fastaoutputinnerregion = true;
    }
    /* if GFF3 output is set */
    if (gt_option_is_set(arguments->optiongff3))
    {
      arguments->gff3output = true;
    }
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq 0xf0(%rsi), %rax
movl $0x61636774, 0x8(%rax)  # imm = 0x61636774
movl 0xac(%rsi), %ecx
movl %ecx, 0xc(%rax)
movq 0xc0(%rsi), %rdi
callq 0x10ac3f
testb %al, %al
je 0x206111
movq 0x18(%rbx), %rdi
callq 0x11b0ca
cmpq $0x4, %rax
jne 0x2061d6
movq 0x18(%rbx), %rdi
callq 0x11b0a1
movb (%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0x8(%rcx)
movq 0x18(%rbx), %rdi
callq 0x11b0a1
movb 0x1(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0x9(%rcx)
movq 0x18(%rbx), %rdi
callq 0x11b0a1
movb 0x2(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0xa(%rcx)
movq 0x18(%rbx), %rdi
callq 0x11b0a1
movb 0x3(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0xb(%rcx)
movq 0xc8(%rbx), %rdi
callq 0x10ac3f
testb %al, %al
jne 0x206111
movq 0xf0(%rbx), %rax
xorl %ecx, %ecx
movl %ecx, 0xc(%rax)
movl %ecx, 0xac(%rbx)
movq 0xd0(%rbx), %rdi
callq 0x10ac3f
movb $0x1, %bpl
testb %al, %al
je 0x20617c
movq 0x20(%rbx), %rdi
callq 0x11b0a1
cmpb $0x6e, (%rax)
jne 0x206142
cmpb $0x6f, 0x1(%rax)
jne 0x206142
cmpb $0x0, 0x2(%rax)
je 0x2061f1
movq 0x20(%rbx), %rdi
callq 0x11b0a1
leaq 0x1b91f6(%rip), %rsi    # 0x3bf348
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
je 0x20617c
movq 0x20(%rbx), %rdi
callq 0x11b0a1
leaq 0x1b91c8(%rip), %rsi    # 0x3bf336
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
jne 0x2061f7
xorl %ebp, %ebp
xorl %eax, %eax
movb %bpl, 0xb4(%rbx)
movb %al, 0xb5(%rbx)
movq 0xd8(%rbx), %rdi
callq 0x10ac3f
testb %al, %al
je 0x2061a2
movb $0x1, 0xb6(%rbx)
movq 0xe0(%rbx), %rdi
callq 0x10ac3f
testb %al, %al
je 0x2061b9
movb $0x1, 0xb7(%rbx)
movq 0xe8(%rbx), %rdi
callq 0x10ac3f
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x2061ec
movb $0x1, 0xb8(%rbx)
jmp 0x2061ec
leaq 0x1b8e5a(%rip), %rsi    # 0x3bf037
movq %r14, %rdi
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
xorl %ebp, %ebp
jmp 0x20617e
callq 0x800ce