// File: /workspace/github_c_makefile_star2_O2/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 0x1cbbf
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x1ce3c
testq %r15, %r15
je 0x1ce0e
callq 0xaaf34
testb %al, %al
movb %al, 0x7(%rsp)
je 0x1cc10
leaq 0x2e2711(%rip), %rdi    # 0x2ff2ed
callq 0xaf4a5
movq %rax, %rbp
movq %rax, %rdi
callq 0xaf4d6
testq %rbp, %rbp
je 0x1ce6a
movq 0x41b2b4(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x3126db(%rip), %rsi    # 0x32f2e1
movq %rbp, %rdi
callq 0xaf86f
jmp 0x1cc12
xorl %ebp, %ebp
movq 0x8(%r15), %rdi
callq 0xad289
testq %rax, %rax
jne 0x1cccc
movq %rbp, 0x10(%rsp)
callq 0xab2f4
movq %rax, %r12
movq 0x18(%r15), %rdi
callq 0xad442
movq %rax, %r13
movq %rax, %rdi
callq 0xad1fa
movq %rax, %rbx
movq %r13, 0x8(%rsp)
movq %r13, %rdi
callq 0xad289
pushq $0x2e
popq %rbp
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0xab309
xorl %ebx, %ebx
movq %r12, %rdi
callq 0xab625
decq %rax
cmpq %rax, %rbx
jae 0x1ccb5
movq 0x8(%r15), %r13
movq %r12, %rdi
movq %rbx, %rsi
callq 0xab58d
movq %r13, %rdi
movq %rax, %rsi
callq 0xacbfb
movq %r12, %rdi
callq 0xab625
addq $-0x2, %rax
cmpq %rax, %rbx
jae 0x1ccb0
movq 0x8(%r15), %rdi
movl %ebp, %esi
callq 0xaced9
incq %rbx
jmp 0x1cc6a
movq %r12, %rdi
callq 0xab666
movq 0x8(%rsp), %rdi
callq 0xae103
movq 0x10(%rsp), %rbp
callq 0x791cd
movq %rax, %rbx
movq %rax, %rdi
callq 0x7cee0
movq %rbx, %rdi
callq 0x7d470
movq 0x10(%r15), %rdi
callq 0xad1fa
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x7921d
movq %rax, %r12
movq %rbx, %rdi
callq 0x79f01
testq %r12, %r12
je 0x1cd95
movq %r12, %rdi
callq 0x754dd
movq %rax, %rdi
callq 0x5741b
testb %al, %al
je 0x1cda7
movq 0x18(%r15), %rdi
callq 0xad1fa
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 %rbp
pushq %r10
callq 0x108e9c
addq $0x20, %rsp
movq %rax, %r13
testq %rax, %rax
je 0x1cdc9
cmpb $0x1, (%r15)
jne 0x1cd77
movq %r13, %rdi
callq 0x10af5d
movq 0x8(%r15), %rdi
callq 0xad1fa
movq %r13, %rdi
movq %rax, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x109b71
movl %eax, %ebx
jmp 0x1cdcc
movq 0x10(%r15), %rdi
callq 0xad1fa
leaq 0x2ca971(%rip), %rsi    # 0x2e7716
jmp 0x1cdb7
movq 0x10(%r15), %rdi
callq 0xad1fa
leaq 0x2ca97a(%rip), %rsi    # 0x2e7731
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rbx
jmp 0x1cdd4
pushq $-0x1
popq %rbx
movq %r13, %rdi
callq 0x109a74
movq %r12, %rdi
callq 0x735fd
cmpb $0x0, 0x7(%rsp)
je 0x1cdfd
movq 0x41b0c6(%rip), %rax    # 0x437eb0
movq (%rax), %rsi
movq %rbp, %rdi
callq 0xafb49
movq %rbp, %rdi
callq 0xafc5b
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x41b153(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2c81f4(%rip), %rsi    # 0x2e5013
leaq 0x32b82d(%rip), %rdx    # 0x348653
leaq 0x2ca8c9(%rip), %rcx    # 0x2e76f6
leaq 0x2ca58d(%rip), %r8     # 0x2e73c1
movl $0x9f, %r9d
jmp 0x1ce96
movq 0x41b125(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2c81c6(%rip), %rsi    # 0x2e5013
leaq 0x2c836b(%rip), %rdx    # 0x2e51bf
leaq 0x2ca89b(%rip), %rcx    # 0x2e76f6
leaq 0x2ca55f(%rip), %r8     # 0x2e73c1
movl $0x9e, %r9d
jmp 0x1ce96
movq 0x41b0f7(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2c8198(%rip), %rsi    # 0x2e5013
leaq 0x2e8348(%rip), %rdx    # 0x3051ca
leaq 0x2ca86d(%rip), %rcx    # 0x2e76f6
leaq 0x2ca531(%rip), %r8     # 0x2e73c1
movl $0xa3, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop