// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/rcr.c
// Function: rcr_initialize_encoders
static int rcr_initialize_encoders(GtRcrEncoder *rcr_enc,
                                   GtTimer *timer,
                                   GtError *err)
{
  bool has_var = true;
  GtUword median;

  if (timer != NULL)
    gt_timer_show_progress(timer, "initializing encoders", stdout);

  median = rcr_get_median(rcr_enc->readpos_distr);
  if (median == GT_UNDEF_UWORD) {
    gt_error_set(err, "no mapped reads present in %s",rcr_enc->samfilename);
    return -1;
  }
  /* parameter m must not be zero in golomb coding */
  if (median == 0)
    median = 1UL;

  rcr_enc->readpos_golomb = gt_golomb_new(median);

  median = rcr_get_median(rcr_enc->varpos_distr);

  /* no variations present -> have only exact matches */
  if (median == GT_UNDEF_UWORD)
    has_var = false;

  if (median == 0)
    median = 1UL;

  if (has_var) {
    rcr_enc->varpos_golomb = gt_golomb_new(median);

  }

  if (!(rcr_enc->cons_readlength)) {
    rcr_enc->readlenghts_huff = gt_huffman_new(rcr_enc->readlength_distr,
                                            rcr_disc_distri_func,
                                            rcr_enc->max_read_length + 1);
  }

  if (rcr_enc->store_all_qual || rcr_enc->store_var_qual) {
    rcr_enc->qual_huff = gt_huffman_new(rcr_enc->qual_distr,
                                     rcr_disc_distri_func, 256UL);
  }

  if (rcr_enc->store_mapping_qual) {

    rcr_enc->qual_mapping_huff = gt_huffman_new(rcr_enc->qual_mapping_distr,
                                             rcr_disc_distri_func, 256UL);
  }

  rcr_enc->cigar_ops_huff = gt_huffman_new(rcr_enc->present_cigar_ops,
                                           rcr_array_func, ENDOFRECORD + 1UL);
  if (!(rcr_enc->cigar_ops_huff)) {
    gt_error_set(err, "unable to initialize GtHuffmanCoding object");
    return -1;
  }

  rcr_enc->bases_huff =
    gt_huffman_new(rcr_enc->ins_bases,
                   rcr_array_func,
                   (GtUword)
                     gt_alphabet_size(gt_encseq_alphabet(rcr_enc->encseq)) + 1);
  if (!(rcr_enc->bases_huff)) {
    gt_error_set(err, "unable to initialize GtHuffmanCoding object");
    return -1;
  }

  return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movb $0x1, 0x17(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x1bcadb
movq 0x20(%rsp), %rdi
movq 0x47f46c(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x3a4c54(%rip), %rsi    # 0x56172a
callq 0x121930
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x1bffa0
movq %rax, 0x8(%rsp)
cmpq $-0x1, 0x8(%rsp)
jne 0x1bcb22
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0xa0(%rax), %rdx
leaq 0x3a4c32(%rip), %rsi    # 0x561740
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x1bcd25
cmpq $0x0, 0x8(%rsp)
jne 0x1bcb33
movq $0x1, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x181260
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x28(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x1bffa0
movq %rax, 0x8(%rsp)
cmpq $-0x1, 0x8(%rsp)
jne 0x1bcb69
movb $0x0, 0x17(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x1bcb7a
movq $0x1, 0x8(%rsp)
testb $0x1, 0x17(%rsp)
je 0x1bcb97
movq 0x8(%rsp), %rdi
callq 0x181260
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x28(%rsp), %rax
testb $0x1, 0x1b8(%rax)
jne 0x1bcbd6
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x28(%rsp), %rax
movq 0x190(%rax), %rdx
addq $0x1, %rdx
leaq 0x347b(%rip), %rsi      # 0x1c0040
callq 0x191820
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x60(%rax)
movq 0x28(%rsp), %rax
testb $0x1, 0x1bb(%rax)
jne 0x1bcbf2
movq 0x28(%rsp), %rax
testb $0x1, 0x1be(%rax)
je 0x1bcc18
movq 0x28(%rsp), %rax
movq 0x38(%rax), %rdi
leaq 0x343e(%rip), %rsi      # 0x1c0040
movl $0x100, %edx            # imm = 0x100
callq 0x191820
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x68(%rax)
movq 0x28(%rsp), %rax
testb $0x1, 0x1bc(%rax)
je 0x1bcc4c
movq 0x28(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x340a(%rip), %rsi      # 0x1c0040
movl $0x100, %edx            # imm = 0x100
callq 0x191820
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x70(%rax)
movq 0x28(%rsp), %rdi
addq $0xf0, %rdi
leaq 0x3411(%rip), %rsi      # 0x1c0070
movl $0xa, %edx
callq 0x191820
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x78(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x1bcca1
movq 0x18(%rsp), %rdi
leaq 0x3a4ad1(%rip), %rsi    # 0x56175e
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x1bcd25
movq 0x28(%rsp), %rax
movq 0xa8(%rax), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movq 0x98(%rax), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7e920
movq (%rsp), %rdi
movl %eax, %eax
movl %eax, %edx
addq $0x1, %rdx
leaq 0x3393(%rip), %rsi      # 0x1c0070
callq 0x191820
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x80(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x1bcd1d
movq 0x18(%rsp), %rdi
leaq 0x3a4a52(%rip), %rsi    # 0x56175e
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x1bcd25
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop