// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/index_options.c
// Function: gt_index_options_check_set_out_opts
static int gt_index_options_check_set_out_opts(void *oip, GtError *err)
{
  int had_err = 0;
  GtIndexOptions *oi = (GtIndexOptions*) oip;
  gt_assert(oi != NULL && oi->type != GT_INDEX_OPTIONS_UNDEFINED);
  gt_error_check(err);

  if (!had_err) {
    int retval;
    retval = gt_readmode_parse(gt_str_get(oi->dir), err);
    if (retval < 0) {
      had_err = -1;
    } else {
      oi->readmode = (GtReadmode) retval;
      if (oi->type == GT_INDEX_OPTIONS_PACKED
            && (oi->readmode == GT_READMODE_COMPL
                  || oi->readmode == GT_READMODE_REVCOMPL)) {
        gt_error_set(err,"construction of packed index not possible for "
                         "complemented and for reverse complemented sequences");
        had_err = -1;
      }
    }
  }
  if (!had_err && oi->type == GT_INDEX_OPTIONS_PACKED) {
#ifndef S_SPLINT_S
    gt_computePackedIndexDefaults(&oi->bwtIdxParams, BWTBaseFeatures);
#endif
  }
  if (!had_err && gt_option_is_set(oi->optionkys)) {
    oi->outkystab = true;
    if (strcmp(gt_str_get(oi->kysargumentstring), "sort") == 0) {
      oi->outkyssort = true;
    } else {
      if (strcmp(gt_str_get(oi->kysargumentstring),"nosort") != 0) {
        gt_error_set(err,"illegal argument to option -kys: either use no "
                         "argument or argument \"sort\"");
        had_err = -1;
      }
    }
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x164948
movq %rdi, %r14
cmpl $0x0, 0x88(%rdi)
je 0x164948
movq %rsi, %rbx
testq %rsi, %rsi
je 0x164877
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x164976
movq 0x38(%r14), %rdi
callq 0xad1fa
movq %rax, %rdi
movq %rbx, %rsi
callq 0xa45d3
pushq $-0x1
popq %r15
testl %eax, %eax
js 0x1648c0
movl %eax, 0x18(%r14)
movl 0x88(%r14), %ecx
movl %ecx, %edx
xorl $0x2, %edx
andl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
xorl $0x2, %eax
orl %edx, %eax
jne 0x1648d0
leaq 0x1e483e(%rip), %rsi    # 0x3490f4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %ecx
jne 0x1648e3
leaq 0x118(%r14), %rdi
xorl %esi, %esi
callq 0x14627d
movq 0x110(%r14), %rdi
callq 0x9b4cb
xorl %ebp, %ebp
testb %al, %al
je 0x1648c3
movb $0x1, 0x20(%r14)
movq 0x28(%r14), %rdi
callq 0xad1fa
leaq 0x1e429d(%rip), %rsi    # 0x348ba7
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x16493e
movq 0x28(%r14), %rdi
callq 0xad1fa
leaq 0x1e469b(%rip), %rsi    # 0x348fc1
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x1648c3
leaq 0x1e481d(%rip), %rsi    # 0x349156
jmp 0x1648b6
movb $0x1, 0x21(%r14)
jmp 0x1648c3
movq 0x2d3619(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1806ba(%rip), %rsi    # 0x2e5013
leaq 0x1e4506(%rip), %rdx    # 0x348e66
leaq 0x1e4769(%rip), %rcx    # 0x3490d0
leaq 0x1e3dd6(%rip), %r8     # 0x348744
movl $0xea, %r9d
jmp 0x1649a2
movq 0x2d35eb(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18068c(%rip), %rsi    # 0x2e5013
leaq 0x180831(%rip), %rdx    # 0x2e51bf
leaq 0x1e473b(%rip), %rcx    # 0x3490d0
leaq 0x1e3da8(%rip), %r8     # 0x348744
movl $0xeb, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop