// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
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 0x10fe52
xorl %ebp, %ebp
movb $0x1, %r15b
testb %al, %al
je 0x20f8cc
movq 0x18(%rbx), %rdi
callq 0x120d4c
cmpq $0x4, %rax
jne 0x20f8b3
movq 0x18(%rbx), %rdi
callq 0x120d23
movb (%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0x8(%rcx)
movq 0x18(%rbx), %rdi
callq 0x120d23
movb 0x1(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0x9(%rcx)
movq 0x18(%rbx), %rdi
callq 0x120d23
movb 0x2(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0xa(%rcx)
movq 0x18(%rbx), %rdi
callq 0x120d23
movb 0x3(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0xb(%rcx)
movq 0xc8(%rbx), %rdi
callq 0x10fe52
testb %al, %al
jne 0x20f8cc
movq 0xf0(%rbx), %rax
xorl %ebp, %ebp
movl %ebp, 0xc(%rax)
movl %ebp, 0xac(%rbx)
jmp 0x20f8cc
leaq 0x1b8dfd(%rip), %rsi    # 0x3c86b7
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %r15b, %r15b
je 0x20f996
movq 0xd0(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0x20f941
movq 0x20(%rbx), %rdi
callq 0x120d23
leaq 0x1b90e6(%rip), %rsi    # 0x3c89db
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
je 0x20f9a3
movq 0x20(%rbx), %rdi
callq 0x120d23
leaq 0x1b90b3(%rip), %rsi    # 0x3c89c8
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
je 0x20f941
movq 0x20(%rbx), %rdi
callq 0x120d23
leaq 0x1b9085(%rip), %rsi    # 0x3c89b6
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
jne 0x20f9a9
xorl %eax, %eax
jmp 0x20f943
movb $0x1, %al
xorl %ecx, %ecx
movb %al, 0xb4(%rbx)
movb %cl, 0xb5(%rbx)
movq 0xd8(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0x20f968
movb $0x1, 0xb6(%rbx)
movq 0xe0(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0x20f97f
movb $0x1, 0xb7(%rbx)
movq 0xe8(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0x20f996
movb $0x1, 0xb8(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %cl
xorl %eax, %eax
jmp 0x20f945
callq 0x81f83