// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_simreads.c
// Function: gt_simreads_arguments_check
static int gt_simreads_arguments_check(GT_UNUSED int rest_argc,
                                       void *tool_arguments, GtError *err)
{
  GtSimreadsArguments *arguments = tool_arguments;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);

  arguments->dl = (gt_str_length(arguments->dlfilename) > 0);
  arguments->ds = (gt_str_length(arguments->dsfilename) > 0);

  if ((arguments->maxlen != GT_UNDEF_UWORD) &&
      (arguments->minlen > arguments->maxlen)) {
    gt_error_set(err,
      "argument to option '-minlen' must be <= argument to option '-maxlen'");
    had_err = -1;
  }

  /* cannot use imply with outputfile_register_options registered options: */
  if (!had_err && arguments->show_progressbar && !arguments->outfp)
  {
    gt_error_set(err, "option \"-p\" requires option \"-o\"");
    had_err = -1;
  }

  if (!had_err && gt_str_length(arguments->distlen_filename) > 0)
  {
    if (gt_file_exists(gt_str_get(arguments->distlen_filename)))
    {
      arguments->distlen_file =
        gt_fa_fopen(gt_str_get(arguments->distlen_filename), "rb", err);
      if (arguments->distlen_file == NULL)
        had_err = -1;
    }
    else
    {
      gt_error_set(err, "file %s not found",
          gt_str_get(arguments->distlen_filename));
      had_err = -1;
    }
  }

  if (had_err != 0)
    gt_file_delete(arguments->outfp);

  return had_err;
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x6f494
movq 0x20(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x6f45c
jmp 0x6f494
movq 0x5ccb3d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4a6ba6(%rip), %rsi    # 0x516013
leaq 0x4a6d4b(%rip), %rdx    # 0x5161bf
leaq 0x4bc8b3(%rip), %rcx    # 0x52bd2e
leaq 0x4bc689(%rip), %r8     # 0x52bb0b
movl $0xb4, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6f496
jmp 0x6f498
cmpq $0x0, 0x18(%rsp)
jne 0x6f4d8
movq 0x5ccaf9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4a6b62(%rip), %rsi    # 0x516013
leaq 0x50b6a7(%rip), %rdx    # 0x57ab5f
leaq 0x4bc86f(%rip), %rcx    # 0x52bd2e
leaq 0x4bc645(%rip), %r8     # 0x52bb0b
movl $0xb5, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6f4da
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
seta %cl
movq 0x18(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x23(%rax)
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
seta %cl
movq 0x18(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x22(%rax)
movq 0x18(%rsp), %rax
cmpq $-0x1, 0x10(%rax)
je 0x6f555
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x6f555
movq 0x20(%rsp), %rdi
leaq 0x4bc804(%rip), %rsi    # 0x52bd4a
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x14(%rsp)
jne 0x6f58e
movq 0x18(%rsp), %rax
testb $0x1, 0x20(%rax)
je 0x6f58e
movq 0x18(%rsp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x6f58e
movq 0x20(%rsp), %rdi
leaq 0x4bc810(%rip), %rsi    # 0x52bd8f
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x14(%rsp)
jne 0x6f655
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jbe 0x6f655
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0xde820
testb $0x1, %al
jne 0x6f5cd
jmp 0x6f61d
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x20(%rsp), %r8
leaq 0x5088fb(%rip), %rsi    # 0x577ee5
leaq 0x4bc51a(%rip), %rdx    # 0x52bb0b
movl $0xcd, %ecx
callq 0xd8df0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x6f61b
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x6f653
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dee0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x4bc76c(%rip), %rsi    # 0x52bdb0
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x6f655
cmpl $0x0, 0x14(%rsp)
je 0x6f66a
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0xde430
movl 0x14(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)