// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/tools/gt_genomediff.c
// Function: gt_genomediff_arguments_check
static int gt_genomediff_arguments_check(int rest_argc,
                                         void *tool_arguments,
                                         GtError *err)
{
  GtGenomediffArguments *arguments = tool_arguments;
  bool prepared_index;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(arguments);

  if (rest_argc == 0) {
    gt_error_set(err, "give at least one file (base)name!");
    had_err = -1;
  }
  if (!had_err) {
    if (strcmp("esa", gt_str_get(arguments->indextype)) == 0)
      arguments->with_esa = true;
    else if (strcmp("pck", gt_str_get(arguments->indextype)) == 0)
      arguments->with_pck = true;
  }
  prepared_index = (arguments->with_esa || arguments->with_pck);

  if (!had_err && arguments->user_max_depth != -1 && !arguments->with_pck)
    gt_warning("option -maxdepth does only apply to -indextype pck");

  if (!had_err &&
      prepared_index && gt_encseq_options_mirrored_value(arguments->loadopts))
    gt_warning("option -mirrored is ignored with esa and pck index");

  if (!had_err && prepared_index && rest_argc > 1) {
    gt_error_set(err, "there should be only one basename argument with "
                 "-indextype esa|pck");
    had_err = -1;
  }
  if (rest_argc == 1 && gt_str_length(arguments->indexname) != 0) {
    gt_error_set(err, "Option -indexname is only needed with sequence files, "
                 "if one file is given as argument, this should be an index.");
    had_err = -1;
  }
  if (!had_err && rest_argc > 1 && gt_str_length(arguments->indexname) == 0) {
    gt_error_set(err, "more than one input file given, please use -indexname "
                 "for basename of indices created during run.");
    had_err = -1;
  }

  if (!had_err)
    arguments->with_units = gt_option_is_set(arguments->ref_unitfile);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
testq %rdx, %rdx
je 0xa9c06
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0xa9d42
testq %r14, %r14
je 0xa9d3d
testl %ebp, %ebp
je 0xa9c52
movq 0x58(%r14), %rdi
callq 0x11b0a1
leaq 0x2b0002(%rip), %rdi    # 0x359c25
movq %rax, %rsi
callq 0x17a40
testl %eax, %eax
je 0xa9c65
movq 0x58(%r14), %rdi
callq 0x11b0a1
leaq 0x2a3b6f(%rip), %rdi    # 0x34d7ae
movq %rax, %rsi
callq 0x17a40
testl %eax, %eax
jne 0xa9c6a
movb $0x1, 0x3(%r14)
jmp 0xa9c6a
leaq 0x2a3b03(%rip), %rsi    # 0x34d75c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xfcb67
jmp 0xa9c6a
movb $0x1, 0x2(%r14)
movb $0x1, %r12b
cmpb $0x0, 0x2(%r14)
jne 0xa9c78
movb 0x3(%r14), %r12b
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %ebp, %ebp
je 0xa9d31
cmpl $-0x1, 0x8(%r14)
je 0xa9ca2
cmpb $0x0, 0x3(%r14)
jne 0xa9ca2
leaq 0x2a3ae4(%rip), %rdi    # 0x34d77f
xorl %eax, %eax
callq 0x11f68c
testb %r12b, %r12b
je 0xa9cda
movq 0x38(%r14), %rdi
callq 0xfc76d
testb %al, %al
je 0xa9cc2
leaq 0x2a3af7(%rip), %rdi    # 0x34d7b2
xorl %eax, %eax
callq 0x11f68c
cmpl $0x2, %ebp
setge %al
andb %al, %r12b
cmpb $0x1, %r12b
jne 0xa9ce0
leaq 0x2a3b0d(%rip), %rsi    # 0x34d7e5
jmp 0xa9d27
cmpl $0x2, %ebp
setge %al
cmpl $0x1, %ebp
jne 0xa9cfc
movq 0x50(%r14), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xa9d0e
leaq 0x2a3b2e(%rip), %rsi    # 0x34d828
jmp 0xa9d27
testb %al, %al
je 0xa9d0e
movq 0x50(%r14), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xa9d20
movq 0x48(%r14), %rdi
callq 0x10ac3f
movb %al, 0x4(%r14)
xorl %r15d, %r15d
jmp 0xa9d31
leaq 0x2a3b72(%rip), %rsi    # 0x34d899
movq %rbx, %rdi
xorl %eax, %eax
callq 0xfcb67
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1b53a
callq 0x1b501