// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
callq 0xe837d
testq %r13, %r13
je 0x17289c
movq %rax, %r14
testq %rbx, %rbx
je 0x1722ed
movq 0x351c0d(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x225ef1(%rip), %rsi    # 0x3981d6
movq %rbx, %rdi
callq 0x1229c8
testq %r15, %r15
je 0x172302
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1728a1
movq %r12, %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3c75
testb %al, %al
je 0x17244a
movq %r14, 0x28(%rsp)
movq %r12, %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3724
movl %eax, %ebx
leaq 0x225dbb(%rip), %rbp    # 0x3980f3
movl $0xe8, %edi
movq %rbp, %rsi
movl $0x81f, %edx            # imm = 0x81F
callq 0x1092b2
movq %rax, %r14
movq %r13, 0x58(%rax)
movq %r13, %rdi
callq 0x120955
movq %rax, 0x48(%r14)
leaq 0x22605c(%rip), %rsi    # 0x3983c0
movq %rax, %rdi
callq 0x12097f
movq %r12, 0x50(%r14)
incq %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x28(%r14)
movl $0x8, %esi
movq %rbx, %rdi
movq %rbp, %rdx
movl $0x82d, %ecx            # imm = 0x82D
callq 0x1093ef
movq %rax, 0x60(%r14)
movq 0x48(%r14), %rdi
callq 0x120d23
leaq 0x23c911(%rip), %rsi    # 0x3aecbf
movq %rax, %rdi
movq %rbp, %rdx
movl $0x830, %ecx            # imm = 0x830
movq %r15, %r8
callq 0x101c23
movq %rax, (%r14)
testq %rax, %rax
jne 0x1723d4
movq %r14, %rdi
callq 0x17380d
xorl %r14d, %r14d
leaq 0xb8(%r14), %rdi
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x125604
cmpq $0x1, %rax
jne 0x1728a6
leaq 0xe0(%r14), %rbx
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x1728ab
cmpb $0x1, (%rbx)
jne 0x172463
leaq 0xd0(%r14), %rdi
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x125604
cmpq $0x1, %rax
je 0x17253e
callq 0x50c50
leaq 0x225cec(%rip), %rsi    # 0x39813d
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x1019cf
jmp 0x17286c
callq 0xe99dc
movq %rax, %r15
movq (%r14), %rcx
leaq 0x8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x125604
cmpq $0x1, %rax
jne 0x1728e7
movq (%r14), %rcx
leaq 0x30(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x125604
cmpq $0x1, %rax
jne 0x1728ec
cmpq $0x0, 0x8(%rsp)
je 0x17251b
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x17288d
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x172888
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0xe9a01
incq %rbx
cmpq 0x8(%rsp), %rbx
jb 0x1724c1
movq 0x30(%rsp), %rdx
incq %rdx
leaq 0x13e7(%rip), %rsi      # 0x173911
movq %r15, %rdi
callq 0x15b8c0
movq %rax, 0x20(%r14)
movq %r15, %rdi
callq 0xe9ff6
leaq 0xe1(%r14), %rbx
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x1728b0
leaq 0xe2(%r14), %r15
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x1728b5
cmpb $0x0, (%rbx)
jne 0x172599
cmpb $0x1, (%r15)
jne 0x172650
callq 0xe99dc
movq %rax, %r15
movq (%r14), %rcx
leaq 0x8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x125604
cmpq $0x1, %rax
jne 0x1728e2
cmpq $0x0, 0x8(%rsp)
je 0x172630
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x172883
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x17287e
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0xe9a01
incq %rbx
cmpq 0x8(%rsp), %rbx
jb 0x1725d6
leaq 0x12da(%rip), %rsi      # 0x173911
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
callq 0x15b8c0
movq %rax, 0x28(%r14)
movq %r15, %rdi
callq 0xe9ff6
leaq 0xe3(%r14), %rbx
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x1728ba
cmpb $0x1, (%rbx)
jne 0x172736
callq 0xe99dc
movq %rax, %r15
movq (%r14), %rcx
leaq 0x8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x125604
cmpq $0x1, %rax
jne 0x1728f1
cmpq $0x0, 0x8(%rsp)
je 0x172716
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x172897
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x172892
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0xe9a01
incq %rbx
cmpq 0x8(%rsp), %rbx
jb 0x1726bc
leaq 0x11f4(%rip), %rsi      # 0x173911
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
callq 0x15b8c0
movq %rax, 0x30(%r14)
movq %r15, %rdi
callq 0xe9ff6
movq (%r14), %rcx
leaq 0x20(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x125604
cmpq $0x1, %rax
jne 0x1728bf
leaq 0x20(%rsp), %rbx
movq (%rbx), %rdi
callq 0x15397c
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x125604
cmpq $0x1, %rax
jne 0x1728c4
movq 0x20(%rsp), %rdi
cmpq $-0x1, %rdi
je 0x17279b
callq 0x15397c
movq %rax, 0x18(%r14)
leaq 0x68(%r14), %rbx
movq (%r14), %rcx
movl $0x8, %esi
movl $0xa, %edx
movq %rbx, %rdi
callq 0x125604
cmpq $0xa, %rax
jne 0x1728c9
leaq 0x1151(%rip), %rsi      # 0x173916
movl $0xa, %edx
movq %rbx, %rdi
callq 0x15b8c0
movq %rax, 0x38(%r14)
movq 0x50(%r14), %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3724
movl %eax, %ebx
movq (%r14), %rcx
movq 0x60(%r14), %rdi
incl %ebx
movl $0x8, %esi
movq %rbx, %rdx
callq 0x125604
cmpq %rbx, %rax
jne 0x1728ce
movq 0x60(%r14), %rdi
leaq 0x1103(%rip), %rsi      # 0x173916
movq %rbx, %rdx
callq 0x15b8c0
movq %rax, 0x40(%r14)
testq %rax, %rax
je 0x1728d3
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1728d8
callq 0x17030
movq %rax, %rcx
xorl %edx, %edx
movq 0x28(%rsp), %rsi
divq %rsi
incq %rax
imulq %rsi, %rax
testq %rdx, %rdx
cmoveq %rcx, %rax
testq %rax, %rax
js 0x1728dd
movq %rax, 0xd8(%r14)
movq (%r14), %rdi
callq 0x101e80
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x50d6d
callq 0x50d34
callq 0x50c17
callq 0x50bde
callq 0x50e51
callq 0x50e18
callq 0x5100d
callq 0x50ac1
callq 0x50afa
callq 0x50b33
callq 0x50c89
callq 0x50cc2
callq 0x50da6
callq 0x50e8a
callq 0x50ec3
callq 0x50efc
callq 0x50f35
callq 0x50fd4
callq 0x50f9b
callq 0x50f6e
callq 0x50cfb
callq 0x50b6c
callq 0x50ba5
callq 0x50ddf