// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rsi, %rbx
movl %edi, %ebp
testq %rdx, %rdx
je 0xabfca
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0xac12a
testq %rbx, %rbx
je 0xac125
testl %ebp, %ebp
je 0xac015
movq 0x58(%rbx), %rdi
callq 0x120d23
leaq 0x2b6c9b(%rip), %rdi    # 0x362c82
movq %rax, %rsi
callq 0x17a40
testl %eax, %eax
je 0xac028
movq 0x58(%rbx), %rdi
callq 0x120d23
leaq 0x2aa7db(%rip), %rdi    # 0x3567de
movq %rax, %rsi
callq 0x17a40
testl %eax, %eax
jne 0xac02c
movb $0x1, 0x3(%rbx)
jmp 0xac02c
leaq 0x2aa770(%rip), %rsi    # 0x35678c
movq %r14, %rdi
xorl %eax, %eax
callq 0x1019cf
jmp 0xac02c
movb $0x1, 0x2(%rbx)
movb $0x1, %r12b
cmpb $0x0, 0x2(%rbx)
jne 0xac039
movb 0x3(%rbx), %r12b
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %ebp, %ebp
je 0xac0a6
cmpl $-0x1, 0x8(%rbx)
je 0xac05d
cmpb $0x0, 0x3(%rbx)
jne 0xac05d
leaq 0x2aa759(%rip), %rdi    # 0x3567af
xorl %eax, %eax
callq 0x125448
testb %r12b, %r12b
je 0xac07d
movq 0x38(%rbx), %rdi
callq 0x1015d5
testb %al, %al
je 0xac07d
leaq 0x2aa76c(%rip), %rdi    # 0x3567e2
xorl %eax, %eax
callq 0x125448
cmpl $0x2, %ebp
setl %al
xorb $0x1, %r12b
xorl %r15d, %r15d
orb %al, %r12b
jne 0xac0a6
leaq 0x2aa77f(%rip), %rsi    # 0x356815
movq %r14, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x1, %ebp
jne 0xac0d0
movq 0x50(%rbx), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xac0d0
leaq 0x2aa798(%rip), %rsi    # 0x356858
movq %r14, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %r15d, %r15d
setne %al
cmpl $0x2, %ebp
setl %cl
orb %al, %cl
jne 0xac108
movq 0x50(%rbx), %rdi
callq 0x120d4c
xorl %r15d, %r15d
testq %rax, %rax
jne 0xac108
leaq 0x2aa7d1(%rip), %rsi    # 0x3568c9
movq %r14, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %r15d, %r15d
jne 0xac119
movq 0x48(%rbx), %rdi
callq 0x10fe52
movb %al, 0x4(%rbx)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1b636
callq 0x1b5fd