// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_compreads_refcompress.c
// Function: gt_compreads_refcompress_runner
static int gt_compreads_refcompress_runner(GT_UNUSED int argc,
                                    GT_UNUSED const char **argv,
                                    GT_UNUSED int parsed_args,
                                    void *tool_arguments, GtError *err)
{
  GtCsrRcrEncodeArguments *arguments = tool_arguments;
  int had_err = 0;
  GtTimer *timer = NULL;
  GtEncseq *encseq = NULL;
  GtRcrEncoder *rcre = NULL;
  GtEncseqLoader *el = NULL;
  GtSplitter *splitter = NULL;
  GtStr *buffer;
  GtUword i;
  gt_error_check(err);
  gt_assert(arguments);
  if (gt_showtime_enabled()) {
    timer = gt_timer_new_with_progress_description("start");
    gt_timer_start(timer);
    gt_assert(timer);
  }
  if (!had_err) {
    if (timer != NULL)
      gt_timer_show_progress(timer, "encoding", stdout);

    if (gt_str_length(arguments->name) == 0) {
      splitter = gt_splitter_new();
      buffer = gt_str_clone(arguments->align);
      gt_splitter_split(splitter, gt_str_get(buffer), gt_str_length(buffer),
                        '.');
      for (i = 0; i < gt_splitter_size(splitter) - 1; i++) {
        gt_str_append_cstr(arguments->name,
                           gt_splitter_get_token(splitter, i));
        if (i < gt_splitter_size(splitter) - 2)
          gt_str_append_char(arguments->name, '.');
      }
      gt_splitter_delete(splitter);
      gt_str_delete(buffer);
    }
    el = gt_encseq_loader_new();
    gt_encseq_loader_enable_autosupport(el);
    gt_encseq_loader_require_description_support(el);
    encseq = gt_encseq_loader_load(el, gt_str_get(arguments->ref), err);
    gt_encseq_loader_delete(el);
    if (!encseq) {
      gt_error_set(err, "could not load GtEncseq %s",
                   gt_str_get(arguments->ref));
      had_err = -1;
    }

    if (!had_err) {
      if (!gt_alphabet_is_dna(gt_encseq_alphabet(encseq))) {
        gt_error_set(err, "alphabet in %s has to be DNA",
                     gt_str_get(arguments->ref));
        had_err = -1;
      }
      if (!had_err) {

        rcre = gt_rcr_encoder_new(encseq, gt_str_get(arguments->align),
                                  arguments->vquals, arguments->mquals,
                                  arguments->quals, arguments->ureads,
                                  arguments->descs, timer, err);
        if (!rcre)
          had_err = -1;
        else {
          if (arguments->verbose)
            gt_rcr_encoder_enable_verbosity(rcre);
          had_err = gt_rcr_encoder_encode(rcre, gt_str_get(arguments->name),
                                          timer, err);
        }
        gt_rcr_encoder_delete(rcre);
      }
    }
    gt_encseq_delete(encseq);
  }
  if (timer != NULL) {
    gt_timer_show_progress_final(timer, stdout);
    gt_timer_delete(timer);
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
testq %r8, %r8
je 0x9e01b
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x9e274
testq %r15, %r15
je 0x9e26f
callq 0x11ed94
testb %al, %al
je 0x9e04e
leaq 0x30d6bd(%rip), %rdi    # 0x3ab6f1
callq 0x1226d6
movq %rax, %rbx
movq %rax, %rdi
callq 0x122733
testq %rbx, %rbx
jne 0x9e050
callq 0x18b26
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x9e06e
movq 0x425e8c(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x2fa342(%rip), %rsi    # 0x3983a8
movq %rbx, %rdi
callq 0x1229c8
movq 0x8(%r15), %rdi
callq 0x120d4c
testq %rax, %rax
jne 0x9e12b
callq 0x11f0ac
movq %rax, %r12
movq 0x18(%r15), %rdi
callq 0x120e13
movq %rax, %r13
movq %rax, %rdi
callq 0x120d23
movq %rax, %rbp
movq %r13, (%rsp)
movq %r13, %rdi
callq 0x120d4c
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movl $0x2e, %ecx
callq 0x11f0c7
movq %r12, %rdi
callq 0x11f2e4
cmpq $0x1, %rax
je 0x9e11a
xorl %ebp, %ebp
movq 0x8(%r15), %r13
movq %r12, %rdi
movq %rbp, %rsi
callq 0x11f2a8
movq %r13, %rdi
movq %rax, %rsi
callq 0x12097f
movq %r12, %rdi
callq 0x11f2e4
addq $-0x2, %rax
cmpq %rax, %rbp
jae 0x9e107
movq 0x8(%r15), %rdi
movl $0x2e, %esi
callq 0x120ba5
incq %rbp
movq %r12, %rdi
callq 0x11f2e4
decq %rax
cmpq %rax, %rbp
jb 0x9e0ce
movq %r12, %rdi
callq 0x11f2f4
movq (%rsp), %rdi
callq 0x121b03
callq 0xf36ef
movq %rax, %r13
movq %rax, %rdi
callq 0xf6932
movq %r13, %rdi
callq 0xf6ac6
movq 0x10(%r15), %rdi
callq 0x120d23
movq %r13, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xf374b
movq %rax, %r12
movq %r13, %rdi
callq 0xf424d
testq %r12, %r12
je 0x9e1f4
movq %r12, %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3c75
testb %al, %al
je 0x9e206
movq 0x18(%r15), %rdi
callq 0x120d23
movzbl 0x1(%r15), %edx
movzbl 0x2(%r15), %ecx
movzbl 0x3(%r15), %r8d
movzbl 0x4(%r15), %r9d
movzbl 0x5(%r15), %r10d
subq $0x8, %rsp
movq %r12, %rdi
movq %rax, %rsi
pushq %r14
pushq %rbx
pushq %r10
callq 0x17006c
addq $0x20, %rsp
movq %rax, %r13
testq %rax, %rax
je 0x9e22a
cmpb $0x1, (%r15)
jne 0x9e1d6
movq %r13, %rdi
callq 0x17227e
movq 0x8(%r15), %rdi
callq 0x120d23
movq %r13, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x170dcd
movl %eax, %ebp
jmp 0x9e22f
movq 0x10(%r15), %rdi
callq 0x120d23
leaq 0x2b2512(%rip), %rsi    # 0x350716
jmp 0x9e216
movq 0x10(%r15), %rdi
callq 0x120d23
leaq 0x2b251b(%rip), %rsi    # 0x350731
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x9e237
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r13, %rdi
callq 0x170cd0
movq %r12, %rdi
callq 0xee90c
testq %rbx, %rbx
je 0x9e25e
movq 0x425c9d(%rip), %rax    # 0x4c3ee8
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x122c67
movq %rbx, %rdi
callq 0x122d79
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x18b5f
callq 0x18aed
nopl (%rax)