// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/reads2twobit.c
// Function: gt_reads2twobit_write_encseq
int gt_reads2twobit_write_encseq(GtReads2Twobit *r2t, GtError *err)
{
  int had_err = 0;
  gt_error_check(err);
  gt_assert(r2t != NULL);
  if (r2t->nofseqs == 0)
  {
    gt_log_log("read set is empty, no encseq was written");
    return had_err;
  }
  gt_assert(r2t->twobitencoding != NULL);
  gt_log_log("write encseq %s", gt_str_get(r2t->indexname));
  gt_log_log("seqlen_eqlen = "GT_WU"", r2t->seqlen_eqlen);
  if (r2t->seqlen_eqlen > 0)
  {
    had_err = gt_reads2twobit_write_encseq_eqlen(r2t, err);
  }
  else
  {
    had_err = gt_reads2twobit_write_encseq_varlen(r2t, err);
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x1e7353
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1e76c3
testq %rbx, %rbx
je 0x1e76be
cmpq $0x0, 0x40(%rbx)
je 0x1e7475
cmpq $0x0, 0x10(%rbx)
je 0x1e76c8
movq (%rbx), %rdi
callq 0x120d23
leaq 0x1d4905(%rip), %rdi    # 0x3bbc86
movq %rax, %rsi
xorl %eax, %eax
callq 0x108e02
movq 0x48(%rbx), %rsi
leaq 0x1d4900(%rip), %rdi    # 0x3bbc96
xorl %eax, %eax
callq 0x108e02
cmpq $0x0, 0x48(%rbx)
movq %r14, 0x18(%rsp)
je 0x1e748b
leaq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x1e89be
movq %rbx, %rdi
callq 0x1e8b16
movq 0x60(%rbx), %rcx
decq %rcx
movq %rcx, %rax
shrq $0x5, %rax
andl $0x1f, %ecx
cmpq $0x1f, %rcx
je 0x1e73f5
addl %ecx, %ecx
movq 0x10(%rbx), %rdx
movq (%rdx,%rax,8), %rsi
xorb $0x3e, %cl
shrq %cl, %rsi
shlq %cl, %rsi
movq %rsi, (%rdx,%rax,8)
movq 0x10(%rbx), %rcx
movq $0x0, 0x8(%rcx,%rax,8)
movq (%rbx), %rdi
callq 0x120d23
movq %rax, 0x10(%rsp)
movq 0x60(%rbx), %r13
movq 0x48(%rbx), %rbp
decq %rbp
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %r14
movq 0x40(%rbx), %r12
callq 0xd4a9a
movq 0x20(%rsp), %r15
addq $0x18, %rbx
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r14, %rcx
movq %r12, %r8
movq %rax, %r9
pushq 0x18(%rsp)
pushq %rbx
pushq %r15
pushq 0x20(%rsp)
callq 0xeee13
addq $0x20, %rsp
movl %eax, %r13d
movq 0x8(%rsp), %rdi
leaq 0x1d4389(%rip), %rsi    # 0x3bb7f4
movl $0x819, %edx            # imm = 0x819
jmp 0x1e769f
leaq 0x1d47c5(%rip), %rdi    # 0x3bbc41
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x108e02
jmp 0x1e76ac
movq 0x8(%rbx), %rdi
callq 0xd4a9a
cmpq $0x0, 0x38(%rbx)
je 0x1e76cd
movq %rax, %rbp
leaq 0x8(%rsp), %rsi
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1e89be
movq (%r14), %r15
movq %r15, %rdi
callq 0x121e78
xorl %r13d, %r13d
testq %rax, %rax
je 0x1e74f6
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0x121d35
movq %rax, %rdi
callq 0x120d4c
addq %rax, %r13
incq %r13
incq %r12
movq %r15, %rdi
callq 0x121e78
cmpq %rax, %r12
jb 0x1e74cd
movq 0x40(%rbx), %rdx
movq 0x60(%rbx), %rsi
subq $0x8, %rsp
movl $0x2, %eax
movl $0x4, %r14d
movl $0x4, %edi
movq %rbp, %rcx
movq %r13, %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
pushq %r10
pushq %rax
pushq %r14
callq 0xf0cd5
addq $0x20, %rsp
movq %rax, %r12
movq 0x40(%rbx), %rdx
movq 0x60(%rbx), %rsi
subq $0x8, %rsp
movl $0x5, %edi
movq %rbp, %rcx
movq %r13, %r8
xorl %r9d, %r9d
xorl %eax, %eax
pushq %rax
movl $0x2, %eax
pushq %rax
pushq %r14
callq 0xf0cd5
addq $0x20, %rsp
cmpq %r12, %rax
cmovbq %rax, %r12
movq %rbp, %rcx
movl $0x0, %ebp
adcl %r14d, %ebp
movq 0x40(%rbx), %rdx
movq 0x60(%rbx), %rsi
subq $0x8, %rsp
movl $0x6, %edi
movq %rcx, 0x18(%rsp)
movq %r13, %r8
xorl %r9d, %r9d
xorl %eax, %eax
pushq %rax
movl $0x2, %eax
pushq %rax
pushq %r14
callq 0xf0cd5
addq $0x20, %rsp
cmpq %r12, %rax
movl $0x6, %eax
cmovbl %eax, %ebp
movq %rbx, %rdi
callq 0x1e8b16
movq 0x60(%rbx), %rcx
decq %rcx
movq %rcx, %rax
shrq $0x5, %rax
andl $0x1f, %ecx
cmpq $0x1f, %rcx
je 0x1e75e0
addl %ecx, %ecx
movq 0x10(%rbx), %rdx
movq (%rdx,%rax,8), %rsi
xorb $0x3e, %cl
shrq %cl, %rsi
shlq %cl, %rsi
movq %rsi, (%rdx,%rax,8)
movq 0x10(%rbx), %rcx
movq $0x0, 0x8(%rcx,%rax,8)
movq (%rbx), %rdi
callq 0x120d23
movq 0x60(%rbx), %rsi
movq 0x38(%rbx), %rcx
movq 0x40(%rbx), %rdx
movq %rax, %rdi
movq 0x18(%rsp), %r14
movq %r14, %r8
callq 0xf0371
movl %eax, %r13d
testl %eax, %eax
jne 0x1e768e
movq (%rbx), %rdi
callq 0x120d23
movq 0x60(%rbx), %rsi
movq 0x58(%rbx), %r8
decq %r8
movq 0x50(%rbx), %r9
decq %r9
movq 0x10(%rbx), %rcx
movq 0x40(%rbx), %rdx
movq 0x8(%rsp), %rdi
addq $0x18, %rbx
subq $0x50, %rsp
movq %r14, 0x48(%rsp)
movq %rbx, 0x40(%rsp)
movq %r15, 0x38(%rsp)
movq %rdi, 0x30(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r9, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %rax, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0xed956
addq $0x50, %rsp
movl %eax, %r13d
movq 0x8(%rsp), %rdi
leaq 0x1d415a(%rip), %rsi    # 0x3bb7f4
movl $0x849, %edx            # imm = 0x849
callq 0x109670
movq %r15, %rdi
callq 0x121e8b
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x753a8
callq 0x752fd
callq 0x7536f
callq 0x75336