// File: /workspace/github_c_makefile_star2_O2/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, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
testq %rcx, %rcx
je 0xeb4db
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
jne 0xebbfe
testq %r14, %r14
je 0xeb4f9
movq 0x34c9c9(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x230d75(%rip), %rsi    # 0x31c266
movq %r14, %rdi
callq 0xaf86f
cmpq $0x0, (%r13)
movq %r13, (%rsp)
je 0xeb544
movq 0x10(%r13), %rdi
movq %r12, %rsi
callq 0x29b14f
movq %r12, %r13
movq %rax, %r12
movq (%rsp), %rax
movq (%rax), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0xd149a
movl %eax, %ebp
movq %r12, %rdi
movq %r13, %r12
movq (%rsp), %r13
callq 0x29a166
testl %ebp, %ebp
jne 0xebbed
andq $0x0, 0x58(%rsp)
testq %r12, %r12
je 0xeb55f
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
jne 0xebc2c
leaq 0x237878(%rip), %rsi    # 0x322dde
leaq 0x20a584(%rip), %rdx    # 0x2f5af1
leaq 0x2374e4(%rip), %rcx    # 0x322a58
movq %r15, %rdi
movl $0x217, %r8d            # imm = 0x217
movq %r12, %r9
callq 0x8a449
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0xebad8
movq %r12, 0x8(%rsp)
movq %r15, 0x38(%rsp)
testq %r14, %r14
je 0xeb5bb
movq 0x34c907(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x237b1b(%rip), %rsi    # 0x3230ce
movq %r14, %rdi
callq 0xaf86f
leaq 0x20(%r13), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rdi, 0x10(%rsp)
movq 0x18(%rsp), %rcx
callq 0xb302c
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rsp), %r13
pushq $0x8
popq %rbp
pushq $0x1
popq %r14
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %rax
cmpq (%rax), %r12
jae 0xeb634
movq 0x8(%r13), %rax
movq 0x8(%rax), %rax
leaq (%rax,%r15), %rdi
addq $0x8, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xb302c
movq 0x8(%r13), %rax
movq 0x8(%rax), %rdi
addq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xb302c
incq %r12
addq $0x10, %r15
jmp 0xeb5ea
leaq 0x23741d(%rip), %r14    # 0x322a58
pushq $0x1
popq %rbp
pushq $0x18
popq %rsi
movq %rbp, %rdi
movq %r14, %rdx
movl $0x1f2, %ecx            # imm = 0x1F2
callq 0x9334a
movq %rax, %r13
movq (%rsp), %rbx
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x8(%r13)
movl 0x48(%rax), %ecx
movl %ecx, 0x10(%r13)
movq 0x18(%rsp), %r12
movq %r12, (%r13)
movq 0x18(%rax), %rdi
callq 0xf0c0c
leaq 0x28(%rsp), %rdi
movq %rax, (%rdi)
pushq $0x8
popq %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0xb302c
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rdi
leaq 0x8ee(%rip), %rsi       # 0xebf90
movq %r13, %rdx
callq 0xf094c
movl %eax, %ebp
movq %r13, %rdi
movq %rbx, %r13
movq %r14, %rsi
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x936f9
testl %ebp, %ebp
movq 0x38(%rsp), %r15
jne 0xebad0
movq %r12, %rdi
callq 0x17030
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
callq 0xb302c
movq %r12, %rdi
callq 0x17030
xorl %edx, %edx
divq 0x30(%r13)
movq %rdx, %r14
movq %r12, %rdi
callq 0x17030
testq %r14, %r14
je 0xeb71a
movq 0x30(%r13), %rcx
xorl %edx, %edx
divq %rcx
incq %rax
imulq %rcx, %rax
movq 0x8(%rsp), %r12
movq 0x8(%r13), %rcx
movq %rax, 0x40(%rcx)
cmpb $0x1, 0x38(%r13)
jne 0xeb73c
movq 0x28(%r13), %rdi
movq %rax, %rsi
callq 0x113f23
jmp 0xeb74f
cmpb $0x1, 0x39(%r13)
jne 0xeb757
movq 0x28(%r13), %rdi
movq %rax, %rsi
callq 0x113e0c
movq 0x8(%r13), %rcx
movq %rax, 0x20(%rcx)
testq %r12, %r12
je 0xeb770
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
jne 0xebc64
movq 0x8(%r13), %rcx
movq 0x30(%r13), %r14
movq 0x40(%rcx), %rsi
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xb2fec
movq %rbx, %rdi
callq 0x297168
movq %rax, %rbx
movq 0x10(%r13), %rdi
movq %r12, %rsi
callq 0xa6e33
movq %rax, %rbp
testq %rax, %rax
je 0xeb955
shlq $0x3, %r14
leaq 0x40(%rsp), %rsi
movq %rbp, %rdi
callq 0xa6240
movq 0x8(%r13), %rax
movq 0x10(%rax), %rdi
callq 0x56c48
movq %rbp, %r15
movq %rbp, %rdi
movq %rax, %rsi
callq 0xa61a8
movq 0x8(%r13), %rax
andq $0x0, 0x28(%rax)
pushq $0x1
popq %rax
movl %eax, 0x24(%rsp)
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movq $0x0, 0x8(%rsp)
movq %rbx, 0x30(%rsp)
movb $0x1, %r13b
testb $0x1, %r13b
je 0xeb99a
movq %r15, %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movq %r12, %r8
callq 0xa62e5
cmpl $0x1, %eax
jne 0xeb996
movq (%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x20(%rdi), %r13
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %rbx, %r8
pushq $0x1
popq %r9
callq 0xec0ef
testq %r13, %r13
je 0xeb8c5
movq %r13, %rdi
movq %rbp, %rsi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
movq %r14, %r8
callq 0x114887
testb %al, %al
je 0xeb8c5
leaq 0x237888(%rip), %rdi    # 0x323104
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x92a82
movq %rbx, %rdi
callq 0x29733e
movq %rbx, %rdi
callq 0x297395
testq %rax, %rax
jns 0xeb8d0
callq 0x17060
movl (%rax), %edi
callq 0x17220
xorl %r13d, %r13d
movq %r12, %rdi
leaq 0x237860(%rip), %rsi    # 0x323116
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
jmp 0xeb802
incq 0x8(%rsp)
movq (%rsp), %rbx
jmp 0xeb8f6
movq %r13, %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
callq 0x1146f3
movq (%rsp), %rbx
movq 0x30(%rbx), %r14
shlq $0x3, %r14
xorl %ebp, %ebp
pushq $0x1
popq %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
xorl %r9d, %r9d
callq 0xec0ef
movq %r14, %rcx
subq %rax, %r14
jae 0xeb931
incq %rbp
subq %rcx, %rax
movq 0x30(%rbx), %rcx
shlq $0x3, %rcx
movq %rcx, %r14
jmp 0xeb919
cmpq $0x1, %rbp
adcq $0x0, %rbp
movq 0x28(%rsp), %rax
movq 0x8(%rbx), %rcx
addq %rax, 0x28(%rcx)
incq 0x10(%rsp)
movq 0x30(%rsp), %rbx
jmp 0xeb7ff
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
jne 0xebabb
movq 0x34c5fc(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f969d(%rip), %rsi    # 0x2e5013
leaq 0x21d0f8(%rip), %rdx    # 0x308a75
leaq 0x237771(%rip), %rcx    # 0x3230f5
leaq 0x2370cd(%rip), %r8     # 0x322a58
movl $0x175, %r9d            # imm = 0x175
jmp 0xebc58
movl %eax, 0x24(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq %rcx, 0x18(%rax)
jne 0xebc92
movq %r15, %rbp
cmpl $0x0, 0x24(%rsp)
sete %al
movl %r13d, %ecx
notb %cl
orb %al, %cl
testb $0x1, %cl
movq 0x38(%rsp), %r15
jne 0xeba0e
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
movq (%rsp), %r13
jne 0xebabb
movq 0x34c584(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f9625(%rip), %rsi    # 0x2e5013
leaq 0x21d080(%rip), %rdx    # 0x308a75
leaq 0x2376f9(%rip), %rcx    # 0x3230f5
leaq 0x237055(%rip), %r8     # 0x322a58
movl $0x1ba, %r9d            # imm = 0x1BA
jmp 0xebc58
testb $0x1, %r13b
movq (%rsp), %r13
je 0xebabb
movq %rbx, %rdi
callq 0x2972cc
movq %rbx, %rdi
callq 0x297395
testq %rax, %rax
js 0xeba9b
movq 0x8(%r13), %rcx
movq %rax, 0x38(%rcx)
leaq 0x23770b(%rip), %rdi    # 0x32314b
movq %rax, %rsi
xorl %eax, %eax
callq 0x92a82
movq 0x8(%r13), %rax
movq 0x20(%rax), %rdi
testq %rdi, %rdi
movq 0x18(%rsp), %r12
je 0xeba64
movq %r12, %rsi
callq 0x113f9e
movq %rbx, %rdi
callq 0x29739d
movq %rbp, %rdi
callq 0xa6389
movq %r12, %rdi
movq 0x50(%rsp), %rsi
xorl %edx, %edx
callq 0xb2fec
movq 0x8(%r13), %rdi
addq $0x38, %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
callq 0xb302c
jmp 0xebad0
callq 0x17060
movl (%rax), %edi
callq 0x17220
leaq 0x237668(%rip), %rsi    # 0x323116
movq %r12, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
movq %rbx, %rdi
callq 0x29739d
movq %rbp, %rdi
callq 0xa6389
movq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x8a5e5
xorl %ebp, %ebp
callq 0x92a76
testb %al, %al
je 0xebbed
movq %r15, %rdi
callq 0xacbd1
movq %rax, %r14
leaq 0x2372e5(%rip), %rsi    # 0x322dde
movq %rax, %rdi
callq 0xacbfb
leaq 0x2372db(%rip), %rdi    # 0x322de3
xorl %eax, %eax
callq 0x92a82
leaq 0x2372f9(%rip), %rdi    # 0x322e0f
xorl %eax, %eax
callq 0x92a82
cmpb $0x1, 0x38(%r13)
jne 0xebb31
movq 0x28(%r13), %rsi
leaq 0x2307c4(%rip), %rdi    # 0x31c2f3
jmp 0xebb43
cmpb $0x1, 0x39(%r13)
jne 0xebb4c
movq 0x28(%r13), %rsi
leaq 0x2372d0(%rip), %rdi    # 0x322e13
xorl %eax, %eax
callq 0x92a82
jmp 0xebb5a
leaq 0x2307d6(%rip), %rdi    # 0x31c329
xorl %eax, %eax
callq 0x92a82
movq 0x18(%r13), %rsi
leaq 0x2372e4(%rip), %rdi    # 0x322e49
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x92a82
movq 0x8(%r13), %rax
movq 0x28(%rax), %rsi
leaq 0x23730d(%rip), %rdi    # 0x322e8a
xorl %eax, %eax
callq 0x92a82
movq %r14, %rdi
callq 0xad1fa
movq %rax, %rdi
callq 0x8e013
cvtsi2sd %rax, %xmm0
mulsd 0x23051f(%rip), %xmm0   # 0x31c0c0
movq 0x8(%r13), %rax
movsd 0x28(%rax), %xmm1
unpcklps 0x1fbd2f(%rip), %xmm1   # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1fbd37(%rip), %xmm1   # 0x2e78f0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x2372e4(%rip), %rdi    # 0x322eb4
movb $0x1, %al
callq 0x92a82
leaq 0x2372f7(%rip), %rdi    # 0x322ed5
xorl %eax, %eax
callq 0x92a82
movq %r14, %rdi
callq 0xae103
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x34c363(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f9404(%rip), %rsi    # 0x2e5013
leaq 0x1f95a9(%rip), %rdx    # 0x2e51bf
leaq 0x2371ab(%rip), %rcx    # 0x322dc8
leaq 0x236e34(%rip), %r8     # 0x322a58
movl $0x501, %r9d            # imm = 0x501
jmp 0xebc58
movq 0x34c335(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f93d6(%rip), %rsi    # 0x2e5013
leaq 0x1f957b(%rip), %rdx    # 0x2e51bf
leaq 0x23746b(%rip), %rcx    # 0x3230b6
leaq 0x236e06(%rip), %r8     # 0x322a58
movl $0x215, %r9d            # imm = 0x215
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x34c2fd(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f939e(%rip), %rsi    # 0x2e5013
leaq 0x1f9543(%rip), %rdx    # 0x2e51bf
leaq 0x237472(%rip), %rcx    # 0x3230f5
leaq 0x236dce(%rip), %r8     # 0x322a58
movl $0x16c, %r9d            # imm = 0x16C
jmp 0xebc58
movq 0x34c2cf(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f9370(%rip), %rsi    # 0x2e5013
leaq 0x23747f(%rip), %rdx    # 0x323129
leaq 0x237444(%rip), %rcx    # 0x3230f5
leaq 0x236da0(%rip), %r8     # 0x322a58
movl $0x1b7, %r9d            # imm = 0x1B7
jmp 0xebc58