// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/bare-encseq.c
// Function: gt_bare_encseq_parse_new
GtBareEncseq *gt_bare_encseq_parse_new(GtUchar *filecontents,size_t numofbytes,
                                       const GtAlphabet *alphabet,
                                       GtError *err)
{
  GtUchar *writeptr = filecontents, *readptr = filecontents;
  const GtUchar *endptr = filecontents + numofbytes;
  bool firstline = true, haserr = false;
  GtUword lastspecialrange_length = 0;
  GtBareSpecialrange *srptr = NULL;
  GtBareEncseq *bare_encseq = gt_malloc(sizeof *bare_encseq);
  const GtUchar *smap = gt_alphabet_symbolmap(alphabet);

  bare_encseq->specialcharacters = 0;
  bare_encseq->numofchars = (GtUword) gt_alphabet_num_of_chars(alphabet);
  bare_encseq->charcount = gt_calloc((size_t) bare_encseq->numofchars,
                                     sizeof *bare_encseq->charcount);
  GT_INITARRAY(&bare_encseq->specialranges,GtBareSpecialrange);
  readptr = filecontents;
  while (!haserr && readptr < endptr)
  {
    if (*readptr == '>')
    {
      if (!firstline)
      {
        if (lastspecialrange_length == 0)
        {
          GT_GETNEXTFREEINARRAY(srptr,&bare_encseq->specialranges,
                                GtBareSpecialrange,128UL);
          srptr->start = (GtUword) (writeptr - filecontents);
        }
        lastspecialrange_length++;
        *writeptr++ = GT_SEPARATOR;
        bare_encseq->specialcharacters++;
      } else
      {
        firstline = false;
      }
      while (readptr < endptr && *readptr != '\n')
      {
        readptr++;
      }
      readptr++;
    } else
    {
      while (readptr < endptr && *readptr != '\n')
      {
        if (!isspace(*readptr))
        {
          GtUchar cc = smap[*readptr];
          if (cc == GT_UNDEFCHAR)
          {
            gt_error_set(err,"illegal input characters %c\n",*readptr);
            haserr = true;
            break;
          }
          if (GT_ISSPECIAL(cc))
          {
            if (lastspecialrange_length == 0)
            {
              GT_GETNEXTFREEINARRAY(srptr,&bare_encseq->specialranges,
                                    GtBareSpecialrange,128UL);
              srptr->start = (GtUword) (writeptr - filecontents);
            }
            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;
          }
          *writeptr++ = cc;
        }
        readptr++;
      }
      readptr++;
    }
  }
  if (lastspecialrange_length > 0)
  {
    gt_assert(srptr != NULL);
    srptr->length = lastspecialrange_length;
  }
  bare_encseq->sequence = filecontents;
  bare_encseq->totallength = (GtUword) (writeptr - filecontents);
  if (haserr)
  {
    gt_bare_encseq_delete(bare_encseq);
    return NULL;
  }
  return bare_encseq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
addq %rdi, %r12
leaq 0x20aafa(%rip), %r13    # 0x33e47f
pushq $0x40
popq %rdi
pushq $0x6f
popq %rdx
movq %r13, %rsi
callq 0x93160
movq %rax, %rbx
movq %r15, %rdi
callq 0x56c48
movq %rax, 0x30(%rsp)
andq $0x0, 0x10(%rbx)
movq %r15, %rdi
movq %rbx, %r15
callq 0x56c8e
movl %eax, %edi
movq %rdi, 0x18(%rbx)
pushq $0x8
popq %rsi
pushq $0x75
popq %rcx
movq %r13, %rdx
callq 0x9334a
movq %rax, 0x20(%rbx)
leaq 0x28(%rbx), %rax
movq %rax, 0x20(%rsp)
xorps %xmm0, %xmm0
andq $0x0, 0x38(%rbx)
movups %xmm0, 0x28(%rbx)
movb $0x1, %al
movl %eax, 0xc(%rsp)
movq $0x0, (%rsp)
movq $0x0, 0x10(%rsp)
xorl %eax, %eax
movq %r14, %rbp
movq %r14, 0x18(%rsp)
testb $0x1, %al
jne 0x133c20
cmpq %r12, %rbp
jae 0x133c20
cmpb $0x3e, (%rbp)
jne 0x133a4b
testb $0x1, 0xc(%rsp)
jne 0x133bfe
movq (%rsp), %rax
testq %rax, %rax
jne 0x133bec
movq 0x30(%r15), %rsi
cmpq %rsi, 0x38(%r15)
jae 0x133b95
movq 0x20(%rsp), %rax
movq (%rax), %rax
jmp 0x133bba
cmpq %r12, %rbp
jae 0x133b6a
movq %r15, %r13
movzbl (%rbp), %r15d
cmpq $0xa, %r15
je 0x133b71
callq 0x17820
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r15,2)
jne 0x133ab6
movq 0x30(%rsp), %rax
movzbl (%rax,%r15), %ebx
cmpq $0xfd, %rbx
je 0x133b75
cmpb $-0x2, %bl
jb 0x133abe
movq (%rsp), %rax
testq %rax, %rax
movq %r13, %r15
jne 0x133b51
movq 0x30(%r15), %rsi
cmpq %rsi, 0x38(%r15)
jae 0x133afa
movq 0x20(%rsp), %rax
movq (%rax), %rax
jmp 0x133b1f
movq %r13, %r15
jmp 0x133b62
cmpq %rbx, 0x18(%r13)
jbe 0x133c6b
movq %r13, %r15
movq 0x20(%r13), %rax
incq (%rax,%rbx,8)
cmpq $0x0, (%rsp)
je 0x133af0
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x133c99
movq (%rsp), %rax
movq %rax, 0x8(%rcx)
movq $0x0, (%rsp)
jmp 0x133b5c
subq $-0x80, %rsi
movq %rsi, 0x30(%r15)
movq 0x28(%r15), %rdi
shlq $0x4, %rsi
leaq 0x20a96e(%rip), %rdx    # 0x33e47f
movl $0xa2, %ecx
callq 0x93472
movq %rax, 0x28(%r15)
testq %rax, %rax
je 0x133cc7
movq 0x38(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%r15)
shlq $0x4, %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq %r14, %rdx
subq 0x18(%rsp), %rdx
movq %rdx, (%rax,%rcx)
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
incq 0x10(%r15)
movb %bl, (%r14)
incq %r14
incq %rbp
jmp 0x133a4b
xorl %eax, %eax
jmp 0x133c18
xorl %eax, %eax
jmp 0x133b8d
movq 0x28(%rsp), %rdi
leaq 0x20a9b6(%rip), %rsi    # 0x33e537
movl %r15d, %edx
xorl %eax, %eax
callq 0x89dbb
movb $0x1, %al
movq %r13, %r15
jmp 0x133c18
subq $-0x80, %rsi
movq %rsi, 0x30(%r15)
movq 0x28(%r15), %rdi
shlq $0x4, %rsi
leaq 0x20a8d3(%rip), %rdx    # 0x33e47f
movl $0x81, %ecx
callq 0x93472
movq %rax, 0x28(%r15)
testq %rax, %rax
je 0x133cff
movq 0x38(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x38(%r15)
shlq $0x4, %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq %r14, %rdx
subq 0x18(%rsp), %rdx
movq %rdx, (%rax,%rcx)
movq (%rsp), %rax
incq %rax
movq %rax, (%rsp)
movb $-0x1, (%r14)
incq %r14
incq 0x10(%r15)
cmpq %r12, %rbp
jae 0x133c0e
cmpb $0xa, (%rbp)
je 0x133c0e
incq %rbp
jmp 0x133bfe
xorl %eax, %eax
movl $0x0, 0xc(%rsp)
incq %rbp
jmp 0x133a01
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x133c3b
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
je 0x133d2d
movq %rcx, 0x8(%rdx)
movq 0x18(%rsp), %rcx
movq %rcx, (%r15)
subq %rcx, %r14
movq %r14, 0x8(%r15)
testb $0x1, %al
je 0x133c59
movq %r15, %rdi
callq 0x13371c
xorl %r15d, %r15d
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3042f6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b1397(%rip), %rsi    # 0x2e5013
leaq 0x20a866(%rip), %rdx    # 0x33e4e9
leaq 0x20a894(%rip), %rcx    # 0x33e51e
leaq 0x20a7ee(%rip), %r8     # 0x33e47f
movl $0xa9, %r9d
jmp 0x133cf3
movq 0x3042c8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b1369(%rip), %rsi    # 0x2e5013
leaq 0x20a85f(%rip), %rdx    # 0x33e510
leaq 0x20a866(%rip), %rcx    # 0x33e51e
leaq 0x20a7c0(%rip), %r8     # 0x33e47f
movl $0xad, %r9d
jmp 0x133cf3
movq 0x30429a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b133b(%rip), %rsi    # 0x2e5013
leaq 0x20a7cb(%rip), %rdx    # 0x33e4aa
leaq 0x20a838(%rip), %rcx    # 0x33e51e
leaq 0x20a792(%rip), %r8     # 0x33e47f
movl $0xa2, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x304262(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b1303(%rip), %rsi    # 0x2e5013
leaq 0x20a793(%rip), %rdx    # 0x33e4aa
leaq 0x20a800(%rip), %rcx    # 0x33e51e
leaq 0x20a75a(%rip), %r8     # 0x33e47f
movl $0x81, %r9d
jmp 0x133cf3
movq 0x304234(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b12d5(%rip), %rsi    # 0x2e5013
leaq 0x20a7cb(%rip), %rdx    # 0x33e510
leaq 0x20a7d2(%rip), %rcx    # 0x33e51e
leaq 0x20a72c(%rip), %r8     # 0x33e47f
movl $0xbb, %r9d
jmp 0x133cf3