// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/rcr.c
// Function: gt_rcr_encoder_init
static inline GtRcrEncoder *gt_rcr_encoder_init(const char *filename,
                                                const GtEncseq *ref)
{
  unsigned alpha_size= gt_alphabet_size(gt_encseq_alphabet(ref));
  GtUword i;

  GtRcrEncoder *rcr_enc = gt_malloc(sizeof (*rcr_enc));

  rcr_enc->encseq = ref;
  rcr_enc->samfilename = filename;
  rcr_enc->not_exact_matches = gt_queue_new();
  rcr_enc->qual_distr = gt_disc_distri_new();
  rcr_enc->qual_mapping_distr = gt_disc_distri_new();
  rcr_enc->readlength_distr = gt_disc_distri_new();
  rcr_enc->readpos_distr = gt_disc_distri_new();
  rcr_enc->varpos_distr = gt_disc_distri_new();
  rcr_enc->sam_align = bam_init1();
  rcr_enc->bases_huff = NULL;
  rcr_enc->cigar_ops_huff = NULL;
  rcr_enc->encdesc_enc = NULL;
  rcr_enc->qual_huff = NULL;
  rcr_enc->qual_mapping_huff = NULL;
  rcr_enc->readlenghts_huff = NULL;
  rcr_enc->readpos_golomb = NULL;
  rcr_enc->sam_iter = NULL;
  rcr_enc->cstr_iterator = NULL;
  rcr_enc->varpos_golomb = NULL;
  rcr_enc->cons_readlength = true;
  rcr_enc->is_verbose = false;
  rcr_enc->store_mapping_qual = false;
  rcr_enc->store_var_qual = false;
  rcr_enc->store_all_qual = false;
  rcr_enc->store_unmmaped_reads = false;
  rcr_enc->cur_read = 0;
  rcr_enc->cur_seq_startpos = 0;
  rcr_enc->max_read_length = 0;
  rcr_enc->numofreads = 0;
  rcr_enc->numofunmappedreads = 0;
  rcr_enc->prev_readpos = 0;
  rcr_enc->readlength = 0;

  rcr_enc->ins_bases = gt_calloc((size_t) (alpha_size + 1),
                              sizeof (GtUint64));
  for (i = 0; i < (GtUword) (alpha_size + 1); i ++)
    rcr_enc->ins_bases[i] = 0;

  for (i = 0; i <= (GtUword) ENDOFRECORD; i++)
    rcr_enc->present_cigar_ops[i] = 0;

  return rcr_enc;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7e920
movl %eax, 0x14(%rsp)
movl $0x1c0, %edi            # imm = 0x1C0
leaq 0x3a4f8f(%rip), %rsi    # 0x5614df
movl $0x3c6, %edx            # imm = 0x3C6
callq 0xe80f0
movq %rax, (%rsp)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x20(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0xa0(%rax)
callq 0xfd150
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0xb0(%rax)
callq 0xa5080
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x38(%rax)
callq 0xa5080
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x40(%rax)
callq 0xa5080
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rax)
callq 0xa5080
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x28(%rax)
callq 0xa5080
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x30(%rax)
movl $0x1, %edi
movl $0x38, %esi
callq 0x194a0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x90(%rax)
movq (%rsp), %rax
movq $0x0, 0x80(%rax)
movq (%rsp), %rax
movq $0x0, 0x78(%rax)
movq (%rsp), %rax
movq $0x0, 0x48(%rax)
movq (%rsp), %rax
movq $0x0, 0x68(%rax)
movq (%rsp), %rax
movq $0x0, 0x70(%rax)
movq (%rsp), %rax
movq $0x0, 0x60(%rax)
movq (%rsp), %rax
movq $0x0, 0x50(%rax)
movq (%rsp), %rax
movq $0x0, 0x88(%rax)
movq (%rsp), %rax
movq $0x0, 0x18(%rax)
movq (%rsp), %rax
movq $0x0, 0x58(%rax)
movq (%rsp), %rax
movb $0x1, 0x1b8(%rax)
movq (%rsp), %rax
movb $0x0, 0x1ba(%rax)
movq (%rsp), %rax
movb $0x0, 0x1bc(%rax)
movq (%rsp), %rax
movb $0x0, 0x1be(%rax)
movq (%rsp), %rax
movb $0x0, 0x1bb(%rax)
movq (%rsp), %rax
movb $0x0, 0x1bd(%rax)
movq (%rsp), %rax
movq $0x0, 0x180(%rax)
movq (%rsp), %rax
movq $0x0, 0x188(%rax)
movq (%rsp), %rax
movq $0x0, 0x190(%rax)
movq (%rsp), %rax
movq $0x0, 0x198(%rax)
movq (%rsp), %rax
movq $0x0, 0x1a0(%rax)
movq (%rsp), %rax
movq $0x0, 0x1a8(%rax)
movq (%rsp), %rax
movq $0x0, 0x1b0(%rax)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
movl $0x8, %esi
leaq 0x3a4da1(%rip), %rdx    # 0x5614df
movl $0x3ea, %ecx            # imm = 0x3EA
callq 0xe83c0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0xa8(%rax)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jae 0x1bc79a
movq (%rsp), %rax
movq 0xa8(%rax), %rax
movq 0x8(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1bc75f
movq $0x0, 0x8(%rsp)
cmpq $0x9, 0x8(%rsp)
ja 0x1bc7d0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq $0x0, 0xf0(%rax,%rcx,8)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x1bc7a3
movq (%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)