// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %r15
testq %r8, %r8
je 0x9bdf6
movq %r14, %rdi
callq 0xfcc32
testb %al, %al
jne 0x9c061
testq %r15, %r15
je 0x9c05c
callq 0x119160
movl %eax, %ebx
testb %al, %al
je 0x9be45
leaq 0x306380(%rip), %rdi    # 0x3a2191
callq 0x11c986
movq %rax, %r13
movq %rax, %rdi
callq 0x11c9e3
testq %r13, %r13
je 0x9c066
movq 0x41d0a7(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x2f3146(%rip), %rsi    # 0x38ef81
movq %r13, %rdi
callq 0x11cc90
jmp 0x9be48
xorl %r13d, %r13d
movb %bl, 0xf(%rsp)
movq 0x8(%r15), %rdi
callq 0x11b0ca
testq %rax, %rax
jne 0x9bf0e
movq %r13, 0x10(%rsp)
callq 0x119478
movq %rax, %r12
movq 0x18(%r15), %rdi
callq 0x11b191
movq %rax, %r13
movq %rax, %rdi
callq 0x11b0a1
movq %rax, %rbp
movq %r13, %rdi
callq 0x11b0ca
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movl $0x2e, %ecx
callq 0x119493
movq %r12, %rdi
callq 0x1196b0
cmpq $0x1, %rax
je 0x9bef9
xorl %ebp, %ebp
movq 0x8(%r15), %rbx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x119674
movq %rbx, %rdi
movq %rax, %rsi
callq 0x11acf3
movq %r12, %rdi
callq 0x1196b0
addq $-0x2, %rax
cmpq %rax, %rbp
jae 0x9bee6
movq 0x8(%r15), %rdi
movl $0x2e, %esi
callq 0x11af23
incq %rbp
movq %r12, %rdi
callq 0x1196b0
decq %rax
cmpq %rax, %rbp
jb 0x9bead
movq %r12, %rdi
callq 0x1196c0
movq %r13, %rdi
callq 0x11bdbf
movq 0x10(%rsp), %r13
callq 0xef0cd
movq %rax, %rbx
movq %rax, %rdi
callq 0xf22f1
movq %rbx, %rdi
callq 0xf2485
movq 0x10(%r15), %rdi
callq 0x11b0a1
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0xef129
movq %rax, %r12
movq %rbx, %rdi
callq 0xefbe3
testq %r12, %r12
je 0x9bfdb
movq %r12, %rdi
callq 0xebcd9
movq %rax, %rdi
callq 0xd1749
testb %al, %al
je 0x9bfed
movq 0x18(%r15), %rdi
callq 0x11b0a1
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
movq %r13, %rbx
pushq %r13
pushq %r10
callq 0x168124
addq $0x20, %rsp
movq %rax, %r13
testq %rax, %rax
je 0x9c011
cmpb $0x1, (%r15)
jne 0x9bfbd
movq %r13, %rdi
callq 0x16a1fb
movq 0x8(%r15), %rdi
callq 0x11b0a1
movq %r13, %rdi
movq %rax, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x168e06
movl %eax, %ebp
jmp 0x9c016
movq 0x10(%r15), %rdi
callq 0x11b0a1
leaq 0x2ab72b(%rip), %rsi    # 0x347716
jmp 0x9bffd
movq 0x10(%r15), %rdi
callq 0x11b0a1
leaq 0x2ab734(%rip), %rsi    # 0x347731
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x9c021
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r13, %rdi
callq 0x168d09
movq %rbx, %r13
movb 0xf(%rsp), %bl
movq %r12, %rdi
callq 0xea375
testb %bl, %bl
je 0x9c04b
movq 0x41cea0(%rip), %rax    # 0x4b8ed8
movq (%rax), %rsi
movq %r13, %rdi
callq 0x11cf39
movq %r13, %rdi
callq 0x11d054
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x18b5f
callq 0x18aed
callq 0x18b26
nop