// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/bare-encseq.c
// Function: gt_bare_encseq_new
GtBareEncseq *gt_bare_encseq_new(GtUchar *sequence,GtUword len,
                                 GtUword numofchars)
{
  GtBareEncseq *bare_encseq = gt_malloc(sizeof *bare_encseq);
  const GtUchar *readptr;
  GtBareSpecialrange *srptr = NULL;
  GtUword lastspecialrange_length = 0;

  bare_encseq->specialcharacters = 0;
  bare_encseq->numofchars = numofchars;
  bare_encseq->charcount = gt_calloc((size_t) bare_encseq->numofchars,
                                     sizeof *bare_encseq->charcount);
  GT_INITARRAY(&bare_encseq->specialranges,GtBareSpecialrange);
  for (readptr = sequence; readptr < sequence + len; readptr++)
  {
    GtUchar cc = *readptr;
    if (GT_ISSPECIAL(cc))
    {
      if (lastspecialrange_length == 0)
      {
        GT_GETNEXTFREEINARRAY(srptr,&bare_encseq->specialranges,
                              GtBareSpecialrange,128UL);
        srptr->start = (GtUword) (readptr - sequence);
      }
      lastspecialrange_length++;
      bare_encseq->specialcharacters++;
    } else
    {
      gt_assert((GtUword) cc < bare_encseq->numofchars);
      bare_encseq->charcount[(int) cc]++;
      if (lastspecialrange_length > 0)
      {
        gt_assert(srptr != NULL);
        srptr->length = lastspecialrange_length;
      }
      lastspecialrange_length = 0;
    }
  }
  if (lastspecialrange_length > 0)
  {
    gt_assert(srptr != NULL);
    srptr->length = lastspecialrange_length;
  }
  bare_encseq->sequence = sequence;
  bare_encseq->totallength = len;
  return bare_encseq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20ace7(%rip), %r12    # 0x33e47f
pushq $0x40
popq %rdi
pushq $0x39
popq %rdx
movq %r12, %rsi
callq 0x93160
movq %rax, %r15
andq $0x0, 0x10(%rax)
movq %r13, 0x18(%rax)
pushq $0x8
popq %rsi
pushq $0x41
popq %rcx
movq %r13, %rdi
movq %r12, %rdx
callq 0x9334a
movq %rax, 0x20(%r15)
movq %rbx, (%rsp)
leaq (%r14,%rbx), %r13
andq $0x0, 0x38(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r15)
xorl %ebp, %ebp
xorl %eax, %eax
xorl %edi, %edi
xorl %ebx, %ebx
xorl %ecx, %ecx
leaq (%r14,%rbp), %rdx
cmpq %r13, %rdx
jae 0x13387c
movzbl (%rdx), %edx
cmpq $0xfe, %rdx
jb 0x133856
testq %rbx, %rbx
jne 0x13384d
movq 0x30(%r15), %rsi
cmpq %rsi, 0x38(%r15)
jb 0x133829
subq $-0x80, %rsi
movq %rsi, 0x30(%r15)
shlq $0x4, %rsi
movq %r12, %rdx
pushq $0x4b
popq %rcx
callq 0x93472
movq %rax, 0x28(%r15)
testq %rax, %rax
je 0x1338ff
movq 0x38(%r15), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x38(%r15)
shlq $0x4, %rdx
leaq (%rax,%rdx), %rcx
movq %rbp, (%rax,%rdx)
movq %rax, %rdi
incq %rbx
incq 0x10(%r15)
jmp 0x133874
cmpq %rdx, 0x18(%r15)
jbe 0x1338ab
movq 0x20(%r15), %rsi
incq (%rsi,%rdx,8)
testq %rbx, %rbx
je 0x133872
testq %rcx, %rcx
je 0x1338d5
movq %rbx, 0x8(%rcx)
xorl %ebx, %ebx
incq %rbp
jmp 0x1337e6
testq %rbx, %rbx
je 0x13388e
testq %rcx, %rcx
je 0x133935
movq %rbx, 0x8(%rcx)
movq %r14, (%r15)
movq (%rsp), %rax
movq %rax, 0x8(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3046b6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b1757(%rip), %rsi    # 0x2e5013
leaq 0x20ac26(%rip), %rdx    # 0x33e4e9
leaq 0x20abcd(%rip), %rcx    # 0x33e497
leaq 0x20abae(%rip), %r8     # 0x33e47f
pushq $0x52
jmp 0x133927
movq 0x30468c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b172d(%rip), %rsi    # 0x2e5013
leaq 0x20ac23(%rip), %rdx    # 0x33e510
leaq 0x20aba3(%rip), %rcx    # 0x33e497
leaq 0x20ab84(%rip), %r8     # 0x33e47f
pushq $0x56
jmp 0x133927
movq 0x304662(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b1703(%rip), %rsi    # 0x2e5013
leaq 0x20ab93(%rip), %rdx    # 0x33e4aa
leaq 0x20ab79(%rip), %rcx    # 0x33e497
leaq 0x20ab5a(%rip), %r8     # 0x33e47f
pushq $0x4b
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x30462c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b16cd(%rip), %rsi    # 0x2e5013
leaq 0x20abc3(%rip), %rdx    # 0x33e510
leaq 0x20ab43(%rip), %rcx    # 0x33e497
leaq 0x20ab24(%rip), %r8     # 0x33e47f
pushq $0x5e
jmp 0x133927