// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/hcr.c
// Function: gt_hcr_encoder_encode
int gt_hcr_encoder_encode(GtHcrEncoder *hcr_enc, const char *name,
                          GtTimer *timer, GtError *err)
{
  int had_err = 0;
  GtStr *name1;
  gt_error_check(err);
  if (timer != NULL)
    gt_timer_show_progress(timer, "write encoding", stdout);
  if (hcr_enc->encdesc_encoder != NULL) {
    GtCstrIterator *cstr_iterator = gt_fasta_header_iterator_new(hcr_enc->files,
                                                                 err);
    had_err = gt_encdesc_encoder_encode(hcr_enc->encdesc_encoder,
                                        cstr_iterator, name, err);
    gt_cstr_iterator_delete(cstr_iterator);
  }

  if (!had_err)
    had_err = hcr_write_seq_qual_data(name, hcr_enc, timer, err);

  if (!had_err && gt_log_enabled()) {
    name1 = gt_str_new_cstr(name);
    gt_str_append_cstr(name1, HCRFILESUFFIX);
    gt_log_log("sequences with qualities encoding overview:");
    gt_log_log("**>");
    if (hcr_enc->page_sampling)
        gt_log_log("applied sampling technique: sampling every " GT_WU
                   "th page",
                   hcr_enc->sampling_rate);
    else if (hcr_enc->regular_sampling)
        gt_log_log("applied sampling technique: sampling every " GT_WU
                   "th read",
                   hcr_enc->sampling_rate);
    else
        gt_log_log("applied sampling technique: none");

    gt_log_log("total number of encoded nucleotide sequences with qualities: "
               GT_WU, hcr_enc->num_of_reads);
    gt_log_log("total number of encoded nucleotides: " GT_LLU,
               hcr_enc->seq_encoder->total_num_of_symbols);
    gt_log_log("bits per nucleotide encoding: %f",
               (gt_file_estimate_size(gt_str_get(name1)) * 8.0) /
                 hcr_enc->seq_encoder->total_num_of_symbols);
    gt_log_log("<**");
    gt_str_delete(name1);
  }
  return had_err;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x188260
movq 0x28(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x188228
jmp 0x188260
movq 0x4b3d71(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38ddda(%rip), %rsi    # 0x516013
leaq 0x38df7f(%rip), %rdx    # 0x5161bf
leaq 0x3cce14(%rip), %rcx    # 0x55505b
leaq 0x3cca9d(%rip), %r8     # 0x554ceb
movl $0x501, %r9d            # imm = 0x501
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x188262
cmpq $0x0, 0x30(%rsp)
je 0x188285
movq 0x30(%rsp), %rdi
movq 0x4b3cc2(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x3c6186(%rip), %rsi    # 0x54e406
callq 0x121930
movq 0x40(%rsp), %rax
cmpq $0x0, (%rax)
je 0x1882d2
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x490260
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x15f270
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rdi
callq 0x48eb50
cmpl $0x0, 0x24(%rsp)
jne 0x1882f6
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
callq 0x188470
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x188458
callq 0xe7720
testb $0x1, %al
jne 0x18830f
jmp 0x188458
movq 0x38(%rsp), %rdi
callq 0x11d510
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x3ccd47(%rip), %rsi    # 0x555071
callq 0x11d550
leaq 0x3ccd40(%rip), %rdi    # 0x555076
movb $0x0, %al
callq 0xe7740
leaq 0x3ccd5e(%rip), %rdi    # 0x5550a2
movb $0x0, %al
callq 0xe7740
movq 0x40(%rsp), %rax
testb $0x1, 0x38(%rax)
je 0x18836f
movq 0x40(%rsp), %rax
movq 0x28(%rax), %rsi
leaq 0x3c612d(%rip), %rdi    # 0x54e493
movb $0x0, %al
callq 0xe7740
jmp 0x1883a3
movq 0x40(%rsp), %rax
testb $0x1, 0x39(%rax)
je 0x188393
movq 0x40(%rsp), %rax
movq 0x28(%rax), %rsi
leaq 0x3ccd1c(%rip), %rdi    # 0x5550a6
movb $0x0, %al
callq 0xe7740
jmp 0x1883a1
leaq 0x3c612f(%rip), %rdi    # 0x54e4c9
movb $0x0, %al
callq 0xe7740
jmp 0x1883a3
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rsi
leaq 0x3ccd29(%rip), %rdi    # 0x5550dc
xorl %eax, %eax
movb %al, 0xf(%rsp)
callq 0xe7740
movb 0xf(%rsp), %al
movq 0x40(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x28(%rcx), %rsi
leaq 0x3ccd47(%rip), %rdi    # 0x55511d
callq 0xe7740
movq 0x18(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0xdf1d0
cvtsi2sd %rax, %xmm0
movsd 0x3c5e66(%rip), %xmm1   # 0x54e260
mulsd %xmm1, %xmm0
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %xmm1
movaps 0x39051d(%rip), %xmm2   # 0x518930
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x390521(%rip), %xmm2   # 0x518940
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
leaq 0x3ccd0e(%rip), %rdi    # 0x555147
movb $0x1, %al
callq 0xe7740
leaq 0x3ccd21(%rip), %rdi    # 0x555168
movb $0x0, %al
callq 0xe7740
movq 0x18(%rsp), %rdi
callq 0x11f560
movl 0x24(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)