// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/rcr.c
// Function: gt_rcr_decoder_new
GtRcrDecoder *gt_rcr_decoder_new(const char *name, const GtEncseq *ref,
                                 GtTimer *timer, GtError *err)
{
  bool is_not_at_pageborder;
  GtUword pagesize = gt_pagesize();
  GtWord filepos;
  GtRcrDecoder *rcr_dec;

  gt_assert(name);

  if (timer != NULL)
    gt_timer_show_progress(timer, "initializing RcrDecoder", stdout);
  gt_error_check(err);
  if (!(gt_alphabet_is_dna(gt_encseq_alphabet(ref)))) {
    gt_error_set(err, "alphabet has to be DNA");
    return NULL;
  }
  rcr_dec = gt_rcr_decoder_init(name, ref, err);

  rcr_read_header(rcr_dec);

  gt_assert(rcr_dec != NULL && rcr_dec->fp != NULL);
  filepos = ftell(rcr_dec->fp);
  is_not_at_pageborder = (filepos % pagesize) != 0;
  if (is_not_at_pageborder)
    filepos = (filepos / pagesize + 1) * pagesize;

  gt_safe_assign(rcr_dec->startofencoding, filepos);
  gt_fa_fclose(rcr_dec->fp);
  return rcr_dec;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
callq 0xa2640
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x1bd462
movq 0x47eb6f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x358bd8(%rip), %rsi    # 0x516013
leaq 0x3979bc(%rip), %rdx    # 0x554dfe
leaq 0x3a4166(%rip), %rcx    # 0x5615af
leaq 0x3a408f(%rip), %r8     # 0x5614df
movl $0x840, %r9d            # imm = 0x840
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bd464
cmpq $0x0, 0x48(%rsp)
je 0x1bd487
movq 0x48(%rsp), %rdi
movq 0x47eac0(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x3a4140(%rip), %rsi    # 0x5615c2
callq 0x121930
jmp 0x1bd489
cmpq $0x0, 0x40(%rsp)
je 0x1bd4d9
movq 0x40(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1bd4a1
jmp 0x1bd4d9
movq 0x47eaf8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x358b61(%rip), %rsi    # 0x516013
leaq 0x358d06(%rip), %rdx    # 0x5161bf
leaq 0x3a40ef(%rip), %rcx    # 0x5615af
leaq 0x3a4018(%rip), %r8     # 0x5614df
movl $0x844, %r9d            # imm = 0x844
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bd4db
movq 0x50(%rsp), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7f400
testb $0x1, %al
jne 0x1bd512
movq 0x40(%rsp), %rdi
leaq 0x3a402c(%rip), %rsi    # 0x561529
movb $0x0, %al
callq 0xd88c0
movq $0x0, 0x60(%rsp)
jmp 0x1bd690
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x1bd6a0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1bd820
cmpq $0x0, 0x20(%rsp)
je 0x1bd548
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1bd580
movq 0x47ea51(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x358aba(%rip), %rsi    # 0x516013
leaq 0x3a407a(%rip), %rdx    # 0x5615da
leaq 0x3a4048(%rip), %rcx    # 0x5615af
leaq 0x3a3f71(%rip), %r8     # 0x5614df
movl $0x84d, %r9d            # imm = 0x84D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1bd582
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x19030
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x30(%rsp)
cmpq $0x0, %rdx
setne %al
andb $0x1, %al
movb %al, 0x3f(%rsp)
testb $0x1, 0x3f(%rsp)
je 0x1bd5d3
movq 0x28(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x30(%rsp)
addq $0x1, %rax
imulq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x1bd5d5
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x1bd62f
cmpq $0x1, 0x18(%rsp)
setl %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x1, 0x10(%rsp)
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x1bd62f
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0xd8(%rax)
xorl %eax, %eax
movl %eax, 0x8(%rsp)
jmp 0x1bd63a
movl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x1bd63a
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x1bd677
movq 0x47e950(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x35a9cb(%rip), %rsi    # 0x518025
leaq 0x3a3e7e(%rip), %rdx    # 0x5614df
movl $0x853, %ecx            # imm = 0x853
movb $0x0, %al
callq 0x199f0
movl $0x1, %edi
callq 0x19890
jmp 0x1bd679
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0xd9390
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nopw (%rax,%rax)