// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/rcr.c
// Function: gt_rcr_encoder_new
GtRcrEncoder *gt_rcr_encoder_new(const GtEncseq *ref,
                                 const char *filename,
                                 bool vquals,
                                 bool mquals,
                                 bool quals,
                                 bool ureads,
                                 bool descs,
                                 GtTimer *timer,
                                 GtError *err)
{
  int had_err = 0;
  GtRcrEncoder *rcr_enc;

  gt_error_check(err);
  gt_assert(ref && filename);

  if (timer != NULL)
    gt_timer_show_progress(timer, "Initializing RcrEncoder", stdout);

  rcr_enc = gt_rcr_encoder_init(filename, ref);

  if (quals) {
    gt_assert(!vquals);
    rcr_enc->store_all_qual = true;
  }
  if (vquals) {
    gt_assert(!quals);
    rcr_enc->store_var_qual = true;
  }
  if (mquals)
    rcr_enc->store_mapping_qual = true;
  if (ureads)
    rcr_enc->store_unmmaped_reads = true;

  if (!(gt_alphabet_is_dna(gt_encseq_alphabet(ref)))) {
    gt_error_set(err, "alphabet has to be DNA");
    had_err = -1;
  }

  if (!had_err)
    had_err = gt_rcr_analyse_alignment_data(rcr_enc, timer, err);

  if (!had_err)
    had_err = rcr_initialize_encoders(rcr_enc, timer, err);

  if (!had_err && descs)
    had_err = gt_rcr_init_desc_encoding(rcr_enc, timer, err);

  if (!had_err)
    return rcr_enc;
  else {
    gt_rcr_encoder_delete(rcr_enc);
    return NULL;
  }
}

// Assembly:
subq $0x48, %rsp
movl %r9d, 0xc(%rsp)
movl %r8d, 0x10(%rsp)
movl %ecx, %eax
movl 0xc(%rsp), %ecx
movl %eax, 0x14(%rsp)
movl %edx, %eax
movl 0x10(%rsp), %edx
movq %rsi, %r8
movl 0x14(%rsp), %esi
movq %rdi, %r9
movb %al, %dil
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %rax
movb 0x50(%rsp), %al
movq %r9, 0x38(%rsp)
movq %r8, 0x30(%rsp)
andb $0x1, %dil
movb %dil, 0x2f(%rsp)
andb $0x1, %sil
movb %sil, 0x2e(%rsp)
andb $0x1, %dl
movb %dl, 0x2d(%rsp)
andb $0x1, %cl
movb %cl, 0x2c(%rsp)
andb $0x1, %al
movb %al, 0x2b(%rsp)
movl $0x0, 0x24(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x1bc301
movq 0x60(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1bc2c9
jmp 0x1bc301
movq 0x47fcd0(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x359d39(%rip), %rsi    # 0x516013
leaq 0x359ede(%rip), %rdx    # 0x5161bf
leaq 0x3a51e4(%rip), %rcx    # 0x5614cc
leaq 0x3a51f0(%rip), %r8     # 0x5614df
movl $0x44e, %r9d            # imm = 0x44E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bc303
jmp 0x1bc305
cmpq $0x0, 0x38(%rsp)
je 0x1bc315
cmpq $0x0, 0x30(%rsp)
jne 0x1bc34d
movq 0x47fc84(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x359ced(%rip), %rsi    # 0x516013
leaq 0x3a51c5(%rip), %rdx    # 0x5614f2
leaq 0x3a5198(%rip), %rcx    # 0x5614cc
leaq 0x3a51a4(%rip), %r8     # 0x5614df
movl $0x44f, %r9d            # imm = 0x44F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bc34f
cmpq $0x0, 0x58(%rsp)
je 0x1bc372
movq 0x58(%rsp), %rdi
movq 0x47fbd5(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x3a5195(%rip), %rsi    # 0x561502
callq 0x121930
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x1bc520
movq %rax, 0x18(%rsp)
testb $0x1, 0x2d(%rsp)
je 0x1bc3dc
jmp 0x1bc38f
testb $0x1, 0x2f(%rsp)
je 0x1bc3ce
movq 0x47fc03(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x359c6c(%rip), %rsi    # 0x516013
leaq 0x3a516c(%rip), %rdx    # 0x56151a
leaq 0x3a5117(%rip), %rcx    # 0x5614cc
leaq 0x3a5123(%rip), %r8     # 0x5614df
movl $0x457, %r9d            # imm = 0x457
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bc3d0
movq 0x18(%rsp), %rax
movb $0x1, 0x1bb(%rax)
testb $0x1, 0x2f(%rsp)
je 0x1bc432
jmp 0x1bc3e5
testb $0x1, 0x2d(%rsp)
je 0x1bc424
movq 0x47fbad(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x359c16(%rip), %rsi    # 0x516013
leaq 0x3a511e(%rip), %rdx    # 0x561522
leaq 0x3a50c1(%rip), %rcx    # 0x5614cc
leaq 0x3a50cd(%rip), %r8     # 0x5614df
movl $0x45b, %r9d            # imm = 0x45B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bc426
movq 0x18(%rsp), %rax
movb $0x1, 0x1be(%rax)
testb $0x1, 0x2e(%rsp)
je 0x1bc445
movq 0x18(%rsp), %rax
movb $0x1, 0x1bc(%rax)
testb $0x1, 0x2c(%rsp)
je 0x1bc458
movq 0x18(%rsp), %rax
movb $0x1, 0x1bd(%rax)
movq 0x38(%rsp), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7f400
testb $0x1, %al
jne 0x1bc489
movq 0x60(%rsp), %rdi
leaq 0x3a50af(%rip), %rsi    # 0x561529
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x24(%rsp)
jne 0x1bc4a8
movq 0x18(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x1bc7e0
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x1bc4c7
movq 0x18(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x1bcaa0
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x1bc4ed
testb $0x1, 0x2b(%rsp)
je 0x1bc4ed
movq 0x18(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x1bcd30
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x1bc500
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x1bc513
movq 0x18(%rsp), %rdi
callq 0x1bce30
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)