// File: /workspace/github_c_makefile_star2_O3/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 0xd5f8a
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xd5e4e
movq %rbx, %rdi
callq 0x34fea
testb %al, %al
jne 0xd5f8f
cmpb $0x1, 0xda(%r14)
jne 0xd5ef8
movq 0xc8(%r14), %rdi
testq %rdi, %rdi
je 0xd5f94
cmpq $0x0, 0x20(%r14)
je 0xd5e7d
callq 0x3cbed
testq %rax, %rax
je 0xd5eaa
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0xd5ef8
callq 0x39347
testb %al, %al
jne 0xd5ef8
movq 0xc8(%r14), %rdi
callq 0x3cbed
cmpq $0x1, %rax
jbe 0xd5ec0
leaq 0x3326a(%rip), %rsi     # 0x109112
jmp 0xd5f13
movq 0x20(%r14), %rdi
callq 0x39347
testb %al, %al
je 0xd5ef8
leaq 0x33235(%rip), %rsi     # 0x1090f3
jmp 0xd5f13
movq 0xc8(%r14), %rdi
xorl %esi, %esi
callq 0x3ca6f
movq %rax, %rdi
callq 0x707d0
movq %rax, %r15
movq (%r14), %rdi
movq %rax, %rsi
callq 0x3b81e
leaq 0x32856(%rip), %rsi     # 0x108741
movq %r15, %rdi
movl $0x99, %edx
callq 0x35c27
cmpb $0x0, 0xd0(%r14)
jne 0xd5f24
cmpb $0x0, 0xd2(%r14)
je 0xd5f24
leaq 0x33249(%rip), %rsi     # 0x10915c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x34f1f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xd5f74
movq 0x78(%r14), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0xd5f74
callq 0x39347
testb %al, %al
je 0xd5f74
movq 0x70(%r14), %rdi
testq %rdi, %rdi
je 0xd5f74
callq 0x39347
testb %al, %al
jne 0xd5f74
movq 0x80(%r14), %rdi
testq %rdi, %rdi
je 0xd5f74
callq 0x39347
testb %al, %al
jne 0xd5f74
movq 0x88(%r14), %rdi
testq %rdi, %rdi
je 0xd5f74
callq 0x39347
testb %al, %al
je 0xd5f81
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x331fa(%rip), %rsi     # 0x109182
jmp 0xd5f13
callq 0x3154f
callq 0x314dd
callq 0x31516
nopl (%rax)