// File: /workspace/github_c_makefile_star2_O3/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 0xe3e95
testq %r13, %r13
je 0x16a81c
movq %rax, %r14
testq %rbx, %rbx
je 0x16a26a
movq 0x34ec80(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x224b4d(%rip), %rsi    # 0x38edaf
movq %rbx, %rdi
callq 0x11cc90
testq %r15, %r15
je 0x16a27f
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0x16a821
movq %r12, %rdi
callq 0xebcd9
movq %rax, %rdi
callq 0xd1749
testb %al, %al
je 0x16a3ca
movq %r14, 0x28(%rsp)
movq %r12, %rdi
callq 0xebcd9
movq %rax, %rdi
callq 0xd11cf
movl %eax, %ebx
leaq 0x224a1e(%rip), %rbp    # 0x38ecd3
movl $0xe8, %edi
movq %rbp, %rsi
movl $0x81f, %edx            # imm = 0x81F
callq 0x104226
movq %rax, %r14
movq %r13, 0x58(%rax)
movq %r13, %rdi
callq 0x11acc9
movq %rax, 0x48(%r14)
leaq 0x224cb8(%rip), %rsi    # 0x38ef99
movq %rax, %rdi
callq 0x11acf3
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 0x10436a
movq %rax, 0x60(%r14)
movq 0x48(%r14), %rdi
callq 0x11b0a1
leaq 0x23b3f2(%rip), %rsi    # 0x3a571d
movq %rax, %rdi
movq %rbp, %rdx
movl $0x830, %ecx            # imm = 0x830
movq %r15, %r8
callq 0xfcdbb
movq %rax, %rbx
movq %rax, (%r14)
testq %rax, %rax
jne 0x16a354
movq %r14, %rdi
callq 0x16b64d
xorl %r14d, %r14d
leaq 0xb8(%r14), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a826
leaq 0xe0(%r14), %rbx
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a82b
cmpb $0x1, (%rbx)
jne 0x16a3e3
leaq 0xd0(%r14), %rdi
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x11f848
cmpq $0x1, %rax
je 0x16a4be
callq 0x4fd22
leaq 0x224945(%rip), %rsi    # 0x38ed16
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0xfcb67
jmp 0x16a7ec
callq 0xe54e0
movq %rax, %r15
movq (%r14), %rcx
leaq 0x8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a867
movq (%r14), %rcx
leaq 0x30(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a86c
cmpq $0x0, 0x8(%rsp)
je 0x16a49b
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a80d
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a808
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0xe5505
incq %rbx
cmpq 0x8(%rsp), %rbx
jb 0x16a441
movq 0x30(%rsp), %rdx
incq %rdx
leaq 0x12a7(%rip), %rsi      # 0x16b751
movq %r15, %rdi
callq 0x153ff8
movq %rax, 0x20(%r14)
movq %r15, %rdi
callq 0xe5a93
leaq 0xe1(%r14), %rbx
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a830
leaq 0xe2(%r14), %r15
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %r15, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a835
cmpb $0x0, (%rbx)
jne 0x16a519
cmpb $0x1, (%r15)
jne 0x16a5d0
callq 0xe54e0
movq %rax, %r15
movq (%r14), %rcx
leaq 0x8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a862
cmpq $0x0, 0x8(%rsp)
je 0x16a5b0
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a803
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a7fe
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0xe5505
incq %rbx
cmpq 0x8(%rsp), %rbx
jb 0x16a556
leaq 0x119a(%rip), %rsi      # 0x16b751
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
callq 0x153ff8
movq %rax, 0x28(%r14)
movq %r15, %rdi
callq 0xe5a93
leaq 0xe3(%r14), %rbx
movq (%r14), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a83a
cmpb $0x1, (%rbx)
jne 0x16a6b6
callq 0xe54e0
movq %rax, %r15
movq (%r14), %rcx
leaq 0x8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a871
cmpq $0x0, 0x8(%rsp)
je 0x16a696
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a817
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a812
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0xe5505
incq %rbx
cmpq 0x8(%rsp), %rbx
jb 0x16a63c
leaq 0x10b4(%rip), %rsi      # 0x16b751
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
callq 0x153ff8
movq %rax, 0x30(%r14)
movq %r15, %rdi
callq 0xe5a93
movq (%r14), %rcx
leaq 0x20(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a83f
leaq 0x20(%rsp), %rbx
movq (%rbx), %rdi
callq 0x14c39c
movq %rax, 0x10(%r14)
movq (%r14), %rcx
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x11f848
cmpq $0x1, %rax
jne 0x16a844
movq 0x20(%rsp), %rdi
cmpq $-0x1, %rdi
je 0x16a71b
callq 0x14c39c
movq %rax, 0x18(%r14)
leaq 0x68(%r14), %rbx
movq (%r14), %rcx
movl $0x8, %esi
movl $0xa, %edx
movq %rbx, %rdi
callq 0x11f848
cmpq $0xa, %rax
jne 0x16a849
leaq 0x1011(%rip), %rsi      # 0x16b756
movl $0xa, %edx
movq %rbx, %rdi
callq 0x153ff8
movq %rax, 0x38(%r14)
movq 0x50(%r14), %rdi
callq 0xebcd9
movq %rax, %rdi
callq 0xd11cf
movl %eax, %ebx
movq (%r14), %rcx
movq 0x60(%r14), %rdi
incl %ebx
movl $0x8, %esi
movq %rbx, %rdx
callq 0x11f848
cmpq %rbx, %rax
jne 0x16a84e
movq 0x60(%r14), %rdi
leaq 0xfc3(%rip), %rsi       # 0x16b756
movq %rbx, %rdx
callq 0x153ff8
movq %rax, 0x40(%r14)
testq %rax, %rax
je 0x16a853
movq (%r14), %rdi
testq %rdi, %rdi
je 0x16a858
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 0x16a85d
movq %rax, 0xd8(%r14)
movq (%r14), %rdi
callq 0xfd018
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4fe3f
callq 0x4fe06
callq 0x4fce9
callq 0x4fcb0
callq 0x4ff23
callq 0x4feea
callq 0x500df
callq 0x4fb93
callq 0x4fbcc
callq 0x4fc05
callq 0x4fd5b
callq 0x4fd94
callq 0x4fe78
callq 0x4ff5c
callq 0x4ff95
callq 0x4ffce
callq 0x50007
callq 0x500a6
callq 0x5006d
callq 0x50040
callq 0x4fdcd
callq 0x4fc3e
callq 0x4fc77
callq 0x4feb1