// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
testq %rdx, %rdx
je 0x4e0b3
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x4e1ce
testq %rbx, %rbx
je 0x4e1a0
movq 0x40(%rbx), %rdi
callq 0xad289
testq %rax, %rax
setne 0x23(%rbx)
movq 0x38(%rbx), %rdi
callq 0xad289
testq %rax, %rax
setne 0x22(%rbx)
movq 0x10(%rbx), %rax
cmpq $-0x1, %rax
je 0x4e0f8
cmpq %rax, 0x8(%rbx)
jbe 0x4e0f8
leaq 0x2acaaa(%rip), %rsi    # 0x2fab9d
jmp 0x4e17d
cmpb $0x1, 0x20(%rbx)
jne 0x4e105
cmpq $0x0, 0x30(%rbx)
je 0x4e176
movq 0x48(%rbx), %rdi
callq 0xad289
xorl %ebp, %ebp
testq %rax, %rax
je 0x4e193
movq 0x48(%rbx), %rdi
callq 0xad1fa
movq %rax, %rdi
callq 0x8da98
movl %eax, %r15d
movq 0x48(%rbx), %rdi
callq 0xad1fa
testb %r15b, %r15b
je 0x4e160
leaq 0x2f795f(%rip), %rsi    # 0x345a9d
leaq 0x2ac819(%rip), %rdx    # 0x2fa95e
movq %rax, %rdi
movl $0xcd, %ecx
movq %r14, %r8
callq 0x8a156
movq %rax, 0x50(%rbx)
testq %rax, %rax
jne 0x4e193
jmp 0x4e187
leaq 0x2aca9c(%rip), %rsi    # 0x2fac03
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
jmp 0x4e187
leaq 0x2aca65(%rip), %rsi    # 0x2fabe2
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
movq 0x30(%rbx), %rdi
callq 0x8da06
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x3e9dc1(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x296e62(%rip), %rsi    # 0x2e5013
leaq 0x2fa49b(%rip), %rdx    # 0x348653
leaq 0x2ac9c2(%rip), %rcx    # 0x2fab81
leaq 0x2ac798(%rip), %r8     # 0x2fa95e
movl $0xb5, %r9d
jmp 0x4e1fa
movq 0x3e9d93(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x296e34(%rip), %rsi    # 0x2e5013
leaq 0x296fd9(%rip), %rdx    # 0x2e51bf
leaq 0x2ac994(%rip), %rcx    # 0x2fab81
leaq 0x2ac76a(%rip), %r8     # 0x2fa95e
movl $0xb4, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390