// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/encseq_options.c
// Function: gt_encseq_options_check
static int gt_encseq_options_check(void *oip, GtError *err)
{
  int had_err = 0;
  GtEncseqOptions *oi = (GtEncseqOptions*) oip;
  gt_assert(oi != NULL);
  gt_error_check(err);

  if (oi->withdb) {
    gt_assert(oi->db != NULL);
    /* set default indexname  */
    if (oi->optiondb != NULL
          && gt_str_array_size(oi->db) == 0UL) {
      if (gt_option_is_set(oi->optiondb)) {
        gt_error_set(err, "missing argument to option -db");
        had_err = -1;
      }
    } else {
      if (oi->optionindexname != NULL
            && !gt_option_is_set(oi->optionindexname)) {
        if (gt_str_array_size(oi->db) > 1UL) {
          gt_error_set(err,"if more than one input file is given, then "
                           "option -indexname is mandatory");
          had_err = -1;
        } else {
          char *basenameptr;
          basenameptr = gt_basename(gt_str_array_get(oi->db, 0));
          gt_str_set(oi->indexname, basenameptr);
          gt_free(basenameptr);
        }
      }
    }
  }
  if (!had_err) {
    if (!oi->des && oi->sds) {
      gt_error_set(err, "option \"-sds yes\" requires \"-des yes\"");
      had_err = -1;
    }
  }
  if (!had_err) {
    if (oi->optionplain != NULL && gt_option_is_set(oi->optionplain)) {
      if (oi->optiondna != NULL && !gt_option_is_set(oi->optiondna) &&
          oi->optionprotein != NULL && !gt_option_is_set(oi->optionprotein) &&
          oi->optionsmap != NULL && !gt_option_is_set(oi->optionsmap)) {
        gt_error_set(err,"if option -plain is used, then any of the options "
                         "-dna, -protein, or -smap is mandatory");
        had_err = -1;
      }
    }
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xbce3b
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xbcd01
movq %rbx, %rdi
callq 0xc103
testb %al, %al
jne 0xbce69
cmpb $0x1, 0xda(%r14)
jne 0xbcdab
movq 0xc8(%r14), %rdi
testq %rdi, %rdi
je 0xbce97
cmpq $0x0, 0x20(%r14)
je 0xbcd30
callq 0x157f4
testq %rax, %rax
je 0xbcd5d
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0xbcdab
callq 0x11423
testb %al, %al
jne 0xbcdab
movq 0xc8(%r14), %rdi
callq 0x157f4
cmpq $0x1, %rax
jbe 0xbcd73
leaq 0x35663(%rip), %rsi     # 0xf23be
jmp 0xbcdc6
movq 0x20(%r14), %rdi
callq 0x11423
testb %al, %al
je 0xbcdab
leaq 0x3562e(%rip), %rsi     # 0xf239f
jmp 0xbcdc6
movq 0xc8(%r14), %rdi
xorl %esi, %esi
callq 0x1555e
movq %rax, %rdi
callq 0x4d1c0
movq %rax, %r15
movq (%r14), %rdi
movq %rax, %rsi
callq 0x13e63
leaq 0x34c4f(%rip), %rsi     # 0xf19ed
movq %r15, %rdi
movl $0x99, %edx
callq 0xd249
cmpb $0x0, 0xd0(%r14)
jne 0xbcdd5
cmpb $0x0, 0xd2(%r14)
je 0xbcdd5
leaq 0x35642(%rip), %rsi     # 0xf2408
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc007
pushq $-0x1
popq %rbp
jmp 0xbce25
movq 0x78(%r14), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0xbce25
callq 0x11423
testb %al, %al
je 0xbce25
movq 0x70(%r14), %rdi
testq %rdi, %rdi
je 0xbce25
callq 0x11423
testb %al, %al
jne 0xbce25
movq 0x80(%r14), %rdi
testq %rdi, %rdi
je 0xbce25
callq 0x11423
testb %al, %al
jne 0xbce25
movq 0x88(%r14), %rdi
testq %rdi, %rdi
je 0xbce25
callq 0x11423
testb %al, %al
je 0xbce32
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x355f5(%rip), %rsi     # 0xf242e
jmp 0xbcdc6
movq 0x71176(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xd21a(%rip), %rsi      # 0xca066
leaq 0x3551a(%rip), %rdx     # 0xf236d
leaq 0x3551e(%rip), %rcx     # 0xf2378
leaq 0x34b8c(%rip), %r8      # 0xf19ed
movl $0x82, %r9d
jmp 0xbcec3
movq 0x71148(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xd1ec(%rip), %rsi      # 0xca066
leaq 0xd7d8(%rip), %rdx      # 0xca659
leaq 0x354f0(%rip), %rcx     # 0xf2378
leaq 0x34b5e(%rip), %r8      # 0xf19ed
movl $0x83, %r9d
jmp 0xbcec3
movq 0x7111a(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xd1be(%rip), %rsi      # 0xca066
leaq 0x354e1(%rip), %rdx     # 0xf2390
leaq 0x354c2(%rip), %rcx     # 0xf2378
leaq 0x34b30(%rip), %r8      # 0xf19ed
movl $0x86, %r9d
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
nop