// File: /workspace/github_c_makefile_star2_O2/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 0x9b4cb
testb %al, %al
je 0x1ba434
movq 0x18(%rbx), %rdi
callq 0xad289
cmpq $0x4, %rax
jne 0x1ba4f9
movq 0x18(%rbx), %rdi
callq 0xad1fa
movb (%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0x8(%rcx)
movq 0x18(%rbx), %rdi
callq 0xad1fa
movb 0x1(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0x9(%rcx)
movq 0x18(%rbx), %rdi
callq 0xad1fa
movb 0x2(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0xa(%rcx)
movq 0x18(%rbx), %rdi
callq 0xad1fa
movb 0x3(%rax), %al
movq 0xf0(%rbx), %rcx
movb %al, 0xb(%rcx)
movq 0xc8(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
jne 0x1ba434
movq 0xf0(%rbx), %rax
andl $0x0, 0xc(%rax)
andl $0x0, 0xac(%rbx)
movq 0xd0(%rbx), %rdi
callq 0x9b4cb
movb $0x1, %bpl
testb %al, %al
je 0x1ba49f
movq 0x20(%rbx), %rdi
callq 0xad1fa
cmpb $0x6e, (%rax)
jne 0x1ba465
cmpb $0x6f, 0x1(%rax)
jne 0x1ba465
cmpb $0x0, 0x2(%rax)
je 0x1ba512
movq 0x20(%rbx), %rdi
callq 0xad1fa
leaq 0x1a5323(%rip), %rsi    # 0x35f798
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x1ba49f
movq 0x20(%rbx), %rdi
callq 0xad1fa
leaq 0x1a52f5(%rip), %rsi    # 0x35f786
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
jne 0x1ba518
xorl %ebp, %ebp
xorl %eax, %eax
movb %bpl, 0xb4(%rbx)
movb %al, 0xb5(%rbx)
movq 0xd8(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x1ba4c5
movb $0x1, 0xb6(%rbx)
movq 0xe0(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x1ba4dc
movb $0x1, 0xb7(%rbx)
movq 0xe8(%rbx), %rdi
callq 0x9b4cb
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x1ba50d
movb $0x1, 0xb8(%rbx)
jmp 0x1ba50d
leaq 0x1a4f87(%rip), %rsi    # 0x35f487
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
movb $0x1, %al
xorl %ebp, %ebp
jmp 0x1ba4a1
movq 0x27da49(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x12aaea(%rip), %rsi    # 0x2e5013
leaq 0x1547c5(%rip), %rdx    # 0x30ecf5
leaq 0x1a4f80(%rip), %rcx    # 0x35f4b7
leaq 0x1a4b15(%rip), %r8     # 0x35f053
movl $0x223, %r9d            # imm = 0x223
xorl %eax, %eax
callq 0x17a50
callq 0x17390