// File: /workspace/github_c_makefile_star2_O1/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 0xd5822
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xd56e6
movq %rbx, %rdi
callq 0x3566a
testb %al, %al
jne 0xd5827
cmpb $0x1, 0xda(%r14)
jne 0xd5790
movq 0xc8(%r14), %rdi
testq %rdi, %rdi
je 0xd582c
cmpq $0x0, 0x20(%r14)
je 0xd5715
callq 0x3d560
testq %rax, %rax
je 0xd5742
movq 0x28(%r14), %rdi
testq %rdi, %rdi
je 0xd5790
callq 0x39b82
testb %al, %al
jne 0xd5790
movq 0xc8(%r14), %rdi
callq 0x3d560
cmpq $0x1, %rax
jbe 0xd5758
leaq 0x33baa(%rip), %rsi     # 0x1092ea
jmp 0xd57ab
movq 0x20(%r14), %rdi
callq 0x39b82
testb %al, %al
je 0xd5790
leaq 0x33b75(%rip), %rsi     # 0x1092cb
jmp 0xd57ab
movq 0xc8(%r14), %rdi
xorl %esi, %esi
callq 0x3d3e2
movq %rax, %rdi
callq 0x701b4
movq %rax, %r15
movq (%r14), %rdi
movq %rax, %rsi
callq 0x3c0cc
leaq 0x33196(%rip), %rsi     # 0x108919
movq %r15, %rdi
movl $0x99, %edx
callq 0x362a0
cmpb $0x0, 0xd0(%r14)
jne 0xd57bc
cmpb $0x0, 0xd2(%r14)
je 0xd57bc
leaq 0x33b89(%rip), %rsi     # 0x109334
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3559f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xd580c
movq 0x78(%r14), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0xd580c
callq 0x39b82
testb %al, %al
je 0xd580c
movq 0x70(%r14), %rdi
testq %rdi, %rdi
je 0xd580c
callq 0x39b82
testb %al, %al
jne 0xd580c
movq 0x80(%r14), %rdi
testq %rdi, %rdi
je 0xd580c
callq 0x39b82
testb %al, %al
jne 0xd580c
movq 0x88(%r14), %rdi
testq %rdi, %rdi
je 0xd580c
callq 0x39b82
testb %al, %al
je 0xd5819
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33b3a(%rip), %rsi     # 0x10935a
jmp 0xd57ab
callq 0x31b4c
callq 0x31ada
callq 0x31b13
nopl (%rax)