// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/hcr.c
// Function: hcr_huffman_write_base_qual_freq
static int hcr_huffman_write_base_qual_freq(GtUword symbol,
                                            GtUint64 freq,
                                            GT_UNUSED GtBitsequence code,
                                            GT_UNUSED unsigned code_length,
                                            void *pt)
{
  GtUchar base,
          qual;
  WriteNodeInfo *info = (WriteNodeInfo*)pt;

  gt_safe_assign(base, (symbol % gt_alphabet_size(info->alpha)));
  if (base == (GtUchar) gt_alphabet_size(info->alpha) - 1)
    base = (GtUchar) GT_WILDCARD;
  gt_safe_assign(base, (toupper(gt_alphabet_decode(info->alpha, base))));

  gt_xfwrite_one(&base, info->output);

  gt_safe_assign(qual,
                 (symbol / gt_alphabet_size(info->alpha) + info->qual_offset));

  gt_xfwrite_one(&qual, info->output);
  gt_xfwrite_one(&freq, info->output);
  return 0;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movl %ecx, 0x7c(%rsp)
movq %r8, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x7e920
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, 0x58(%rsp)
movq 0x58(%rsp), %rax
movb %al, 0x57(%rsp)
movq 0x58(%rsp), %rax
movzbl 0x57(%rsp), %ecx
cmpq %rcx, %rax
jne 0x18a15b
cmpq $0x1, 0x58(%rsp)
setb %al
andb $0x1, %al
movzbl %al, %eax
movzbl 0x57(%rsp), %ecx
cmpl $0x1, %ecx
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x18a15b
movb 0x57(%rsp), %al
movb %al, 0x6f(%rsp)
xorl %eax, %eax
movl %eax, 0x24(%rsp)
jmp 0x18a166
movl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x18a166
movl 0x24(%rsp), %eax
movl %eax, 0x50(%rsp)
cmpl $0x0, 0x50(%rsp)
je 0x18a1a3
movq 0x4b1e24(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38de9f(%rip), %rsi    # 0x518025
leaq 0x3cab5e(%rip), %rdx    # 0x554ceb
movl $0x1dd, %ecx            # imm = 0x1DD
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
jmp 0x18a1a5
movzbl 0x6f(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x7e920
movl %eax, %ecx
movl 0x20(%rsp), %eax
movzbl %cl, %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x18a1d1
movb $-0x2, 0x6f(%rsp)
jmp 0x18a1d3
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
movzbl 0x6f(%rsp), %esi
callq 0x7f7b0
movsbl %al, %edi
callq 0x19dd0
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movb %al, 0x4b(%rsp)
movl 0x4c(%rsp), %eax
movzbl 0x4b(%rsp), %ecx
cmpl %ecx, %eax
jne 0x18a239
cmpl $0x1, 0x4c(%rsp)
setl %al
andb $0x1, %al
movzbl %al, %eax
movzbl 0x4b(%rsp), %ecx
cmpl $0x1, %ecx
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x18a239
movb 0x4b(%rsp), %al
movb %al, 0x6f(%rsp)
xorl %eax, %eax
movl %eax, 0x1c(%rsp)
jmp 0x18a244
movl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x18a244
movl 0x1c(%rsp), %eax
movl %eax, 0x44(%rsp)
cmpl $0x0, 0x44(%rsp)
je 0x18a281
movq 0x4b1d46(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38ddc1(%rip), %rsi    # 0x518025
leaq 0x3caa80(%rip), %rdx    # 0x554ceb
movl $0x1e0, %ecx            # imm = 0x1E0
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
jmp 0x18a283
movq 0x60(%rsp), %rax
movq (%rax), %rcx
leaq 0x6f(%rsp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x126d30
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x7e920
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movq 0x60(%rsp), %rcx
movl 0x10(%rcx), %ecx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movb %al, 0x37(%rsp)
movq 0x38(%rsp), %rax
movzbl 0x37(%rsp), %ecx
cmpq %rcx, %rax
jne 0x18a321
cmpq $0x1, 0x38(%rsp)
setb %al
andb $0x1, %al
movzbl %al, %eax
movzbl 0x37(%rsp), %ecx
cmpl $0x1, %ecx
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x18a321
movb 0x37(%rsp), %al
movb %al, 0x6e(%rsp)
xorl %eax, %eax
movl %eax, 0xc(%rsp)
jmp 0x18a32c
movl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x18a32c
movl 0xc(%rsp), %eax
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
je 0x18a369
movq 0x4b1c5e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38dcd9(%rip), %rsi    # 0x518025
leaq 0x3ca998(%rip), %rdx    # 0x554ceb
movl $0x1e5, %ecx            # imm = 0x1E5
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
jmp 0x18a36b
movq 0x60(%rsp), %rax
movq (%rax), %rcx
leaq 0x6e(%rsp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x126d30
movq 0x60(%rsp), %rax
movq (%rax), %rcx
leaq 0x88(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x126d30
xorl %eax, %eax
addq $0x98, %rsp
retq
nop