// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
testq %rcx, %rcx
je 0x157735
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0x157e45
testq %r14, %r14
je 0x157753
movq 0x36c7a7(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x22daeb(%rip), %rsi    # 0x385236
movq %r14, %rdi
callq 0x1229c8
cmpq $0x0, (%rbx)
je 0x157785
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x307ed6
movq %rax, %r12
movq (%rbx), %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x14185a
movl %eax, %ebp
movq %r12, %rdi
callq 0x30717a
jmp 0x157787
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x157ca2
movq $0x0, 0x58(%rsp)
testq %r15, %r15
je 0x1577ad
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0x157e4a
leaq 0x2345e1(%rip), %rsi    # 0x38bd95
leaq 0x207352(%rip), %rdx    # 0x35eb0d
leaq 0x23424d(%rip), %rcx    # 0x38ba0f
movq %r13, %rdi
movl $0x217, %r8d            # imm = 0x217
movq %r15, %r9
callq 0x101dff
testq %rax, %rax
je 0x157ca0
movq %rax, %r12
movq %r13, 0x28(%rsp)
testq %r14, %r14
je 0x157802
movq 0x36c6f8(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x23488b(%rip), %rsi    # 0x38c085
movq %r14, %rdi
callq 0x1229c8
leaq 0x20(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
cmpq $0x0, 0x20(%rbx)
je 0x157871
xorl %r14d, %r14d
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
leaq (%rax,%r14), %rdi
addq $0x8, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
addq %r14, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
incq %r13
addq $0x10, %r14
cmpq 0x20(%rbx), %r13
jb 0x157825
leaq 0x234197(%rip), %r14    # 0x38ba0f
movl $0x1, %edi
movl $0x18, %esi
movq %r14, %rdx
movl $0x1f2, %ecx            # imm = 0x1F2
callq 0x1093ef
movq %rax, %r13
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%r13)
movl 0x48(%rax), %ecx
movl %ecx, 0x10(%r13)
movq %r12, (%r13)
movq 0x18(%rax), %rdi
callq 0x15bde0
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rdi
leaq 0x7cb(%rip), %rsi       # 0x1580a6
movq %r13, %rdx
callq 0x15bc2f
movl %eax, %ebp
movq %r13, %rdi
movq %r14, %rsi
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x109670
testl %ebp, %ebp
je 0x157905
xorl %ebp, %ebp
movq 0x28(%rsp), %r13
jmp 0x157c6c
movq %r12, %rdi
callq 0x17030
movq %rax, 0x20(%rsp)
leaq 0x58(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
movq %r12, %rdi
callq 0x17030
xorl %edx, %edx
divq 0x30(%rbx)
movq %rdx, %r14
movq %r12, %rdi
callq 0x17030
testq %r14, %r14
je 0x157957
movq 0x30(%rbx), %rcx
xorl %edx, %edx
divq %rcx
incq %rax
imulq %rcx, %rax
movq 0x8(%rbx), %rcx
movq %rax, 0x40(%rcx)
cmpb $0x1, 0x38(%rbx)
jne 0x157978
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rdi
movq 0x40(%rax), %rsi
callq 0x179058
jmp 0x15798f
cmpb $0x1, 0x39(%rbx)
jne 0x157997
movq 0x8(%rbx), %rax
movq 0x28(%rbx), %rdi
movq 0x40(%rax), %rsi
callq 0x178fb0
movq 0x8(%rbx), %rcx
movq %rax, 0x20(%rcx)
testq %r15, %r15
je 0x1579ac
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0x157e4f
movq 0x8(%rbx), %rax
movq 0x30(%rbx), %r13
movq 0x40(%rax), %rsi
xorl %r14d, %r14d
movq %r12, %rdi
xorl %edx, %edx
callq 0x125636
movq %r12, %rdi
callq 0x304b94
movq %rax, 0x10(%rsp)
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x11a3d9
testq %rax, %rax
movq %rax, 0x48(%rsp)
je 0x157be3
movq %rax, %rbp
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x1199ce
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0xd3700
movq %rbp, %rdi
movq %rax, %rsi
callq 0x119998
movq 0x8(%rbx), %rax
movq $0x0, 0x28(%rax)
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movq %rbp, %rdi
movq %r15, %r8
callq 0x119a11
cmpl $0x1, %eax
jne 0x157bff
shlq $0x3, %r13
movq $0x0, 0x8(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x30(%rsp)
movq %r15, 0x40(%rsp)
movq 0x8(%rbx), %rdi
movq 0x20(%rdi), %r14
movq 0x38(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %r8
movl $0x1, %r9d
callq 0x1581cc
movb $0x1, %cl
movl %ecx, 0x4(%rsp)
testq %r14, %r14
je 0x157b0f
movq %r14, %rdi
movq %rbp, %rsi
movq 0x30(%rsp), %rdx
movq %rax, %rcx
movq %r13, %r8
callq 0x1796d3
testb %al, %al
je 0x157b0f
leaq 0x234608(%rip), %rdi    # 0x38c0bb
movq 0x8(%rsp), %rsi
movq %rsi, 0x8(%rsp)
xorl %eax, %eax
callq 0x108e02
movq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x304d26
movq %r15, %rdi
callq 0x304dad
testq %rax, %rax
js 0x157bab
movq %r14, %rdi
movq %rax, %rsi
movq 0x8(%rsp), %rdx
callq 0x1795e2
movq 0x30(%rbx), %r13
shlq $0x3, %r13
xorl %ebp, %ebp
movq $0x0, 0x30(%rsp)
xorl %r14d, %r14d
movq 0x40(%rsp), %r15
jmp 0x157b12
xorl %r14d, %r14d
cmpb $0x0, 0x4(%rsp)
je 0x157b79
movq 0x8(%rbx), %rdi
movq 0x38(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %r8
xorl %r9d, %r9d
callq 0x1581cc
cmpq %rax, %r13
jae 0x157b57
movq 0x30(%rbx), %rcx
shlq $0x3, %rcx
subq %r13, %rax
incq %rbp
movq %rcx, %r13
cmpq %rax, %rcx
jb 0x157b46
movq %rcx, %r13
subq %rax, %r13
cmpq $0x1, %rbp
adcq $0x0, %rbp
incq 0x30(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rbx), %rcx
addq %rax, 0x28(%rcx)
incq 0x8(%rsp)
cmpb $0x0, 0x4(%rsp)
je 0x157c09
movq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movq %r15, %r8
callq 0x119a11
cmpl $0x1, %eax
je 0x157a60
jmp 0x157c0e
callq 0x17060
movl (%rax), %edi
callq 0x17240
movl $0x0, 0x4(%rsp)
movq 0x40(%rsp), %r15
movq %r15, %rdi
leaq 0x2344ff(%rip), %rsi    # 0x38c0cd
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x157b12
movq %r15, %rdi
callq 0x101a9a
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testb %al, %al
movq 0x28(%rsp), %r13
jne 0x157c48
callq 0x487b1
movb $0x1, %cl
movl %ecx, 0x4(%rsp)
xorl %ecx, %ecx
jmp 0x157c13
movl $0x1, %eax
movq 0x8(%rsp), %rcx
cmpq %rcx, 0x18(%rbx)
movq 0x28(%rsp), %r13
jne 0x157e54
testl %eax, %eax
sete %al
movl 0x4(%rsp), %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x157c48
movq %r15, %rdi
callq 0x101a9a
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testb %al, %al
je 0x157e59
testl %r14d, %r14d
je 0x157dca
xorl %ebp, %ebp
movq 0x20(%rsp), %r14
movq 0x10(%rsp), %rdi
callq 0x304db5
movq 0x48(%rsp), %rdi
callq 0x119a53
testb %bpl, %bpl
je 0x157c98
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x125636
movq 0x8(%rbx), %rdi
addq $0x38, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x125658
movq %r12, %rdi
callq 0x101f02
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x157db9
callq 0x108df6
testb %al, %al
je 0x157db9
movq %r13, %rdi
callq 0x120955
movq %rax, %r14
leaq 0x2340cc(%rip), %rsi    # 0x38bd95
movq %rax, %rdi
callq 0x12097f
leaq 0x2340c2(%rip), %rdi    # 0x38bd9a
xorl %eax, %eax
callq 0x108e02
leaq 0x2340e0(%rip), %rdi    # 0x38bdc6
xorl %eax, %eax
callq 0x108e02
cmpb $0x1, 0x38(%rbx)
jne 0x157d00
movq 0x28(%rbx), %rsi
leaq 0x22d5c5(%rip), %rdi    # 0x3852c3
jmp 0x157d11
cmpb $0x1, 0x39(%rbx)
jne 0x157d1a
movq 0x28(%rbx), %rsi
leaq 0x2340b9(%rip), %rdi    # 0x38bdca
xorl %eax, %eax
callq 0x108e02
jmp 0x157d28
leaq 0x22d5d8(%rip), %rdi    # 0x3852f9
xorl %eax, %eax
callq 0x108e02
movq 0x18(%rbx), %rsi
leaq 0x2340cd(%rip), %rdi    # 0x38be00
xorl %eax, %eax
callq 0x108e02
movq 0x8(%rbx), %rax
movq 0x28(%rax), %rsi
leaq 0x2340f8(%rip), %rdi    # 0x38be41
xorl %eax, %eax
callq 0x108e02
movq %r14, %rdi
callq 0x120d23
movq %rax, %rdi
callq 0x1045d1
cvtsi2sd %rax, %xmm0
mulsd 0x22d323(%rip), %xmm0   # 0x385090
movq 0x8(%rbx), %rax
movsd 0x28(%rax), %xmm1
unpcklps 0x1f8b63(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1f8b6b(%rip), %xmm1   # 0x3508f0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x2340cf(%rip), %rdi    # 0x38be6b
movb $0x1, %al
callq 0x108e02
leaq 0x2340e2(%rip), %rdi    # 0x38be8c
xorl %eax, %eax
callq 0x108e02
movq %r14, %rdi
callq 0x121b03
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x304cde
movq %r14, %rdi
callq 0x304dad
testq %rax, %rax
js 0x157e1e
movq 0x8(%rbx), %rcx
movq %rax, 0x38(%rcx)
leaq 0x23430f(%rip), %rdi    # 0x38c102
movq %rax, %rsi
xorl %eax, %eax
callq 0x108e02
movq 0x8(%rbx), %rax
movq 0x20(%rax), %rdi
movb $0x1, %bpl
testq %rdi, %rdi
je 0x157c53
movq %r12, %rsi
callq 0x1790a7
jmp 0x157c53
callq 0x17060
movl (%rax), %edi
callq 0x17240
leaq 0x23429c(%rip), %rsi    # 0x38c0cd
xorl %ebp, %ebp
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
jmp 0x157c53
callq 0x48694
callq 0x486cd
callq 0x48706
callq 0x4873f
callq 0x48778