// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/encseq.c
// Function: assignoistabmapspecification
static void assignoistabmapspecification(GtMapspec *mapspec,
                                         void *voidinfo,
                                         bool writemode)
{
  GtEncseq *encseq = (GtEncseq *) voidinfo;
  GtUword numofunits;
  unsigned int bitsforsubalpha;

  if (writemode) {
    encseq->exceptionheaderptr.classstartpositionsptr
      = gt_malloc(UCHAR_MAX * sizeof (GtUword));
    memcpy(encseq->exceptionheaderptr.classstartpositionsptr,
           encseq->classstartpositions,
           UCHAR_MAX * sizeof (GtUword));

    encseq->exceptionheaderptr.maxcharsptr
      = gt_malloc(UCHAR_MAX * sizeof (char));
    memcpy(encseq->exceptionheaderptr.maxcharsptr, encseq->maxchars,
            UCHAR_MAX * sizeof (char));

    encseq->exceptionheaderptr.allcharsptr
      = gt_malloc((size_t) encseq->numofallchars * sizeof (char));
    memcpy(encseq->exceptionheaderptr.allcharsptr, encseq->allchars,
           (size_t) encseq->numofallchars * sizeof (char));

    encseq->exceptionheaderptr.subsymbolmapptr
      = gt_malloc((size_t) UCHAR_MAX * sizeof (unsigned char));
    memcpy(encseq->exceptionheaderptr.subsymbolmapptr, encseq->subsymbolmap,
           (size_t) UCHAR_MAX * sizeof (unsigned char));
  }

  gt_mapspec_add_ulong(mapspec,
                       encseq->exceptionheaderptr.classstartpositionsptr,
                       UCHAR_MAX);
  gt_mapspec_add_char(mapspec,
                      encseq->exceptionheaderptr.allcharsptr,
                      encseq->numofallchars);
  gt_mapspec_add_char(mapspec,
                      encseq->exceptionheaderptr.maxcharsptr,
                      (GtUword) UCHAR_MAX);
  gt_mapspec_add_uchar(mapspec,
                       encseq->exceptionheaderptr.subsymbolmapptr,
                       (GtUword) UCHAR_MAX);
  bitsforsubalpha
    = gt_determinebitspervalue((GtUword) encseq->maxsubalphasize-1);
  numofunits
   = (GtUword) sizeofbitarray(bitsforsubalpha,
                       (BitOffset) encseq->specialcharinfo.exceptioncharacters);
  if (!writemode) {
    encseq->exceptions =
      bitpackarray_new(bitsforsubalpha,
                       (BitOffset) encseq->specialcharinfo.exceptioncharacters,
                       false);
  }
  gt_assert(encseq->exceptions != NULL);
  gt_mapspec_add_bitelem(mapspec,
                         BITPACKARRAYSTOREVAR(encseq->exceptions),
                         numofunits);
  addswtabletomapspectable(mapspec, &encseq->exceptiontable, true, true,
                           encseq->totallength, encseq->oissat);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0xb56f4
leaq 0x3655e(%rip), %r15     # 0xebb9a
movl $0x7f8, %edi            # imm = 0x7F8
movq %r15, %rsi
movl $0x405, %edx            # imm = 0x405
callq 0xccb0
movq %rax, 0x368(%r14)
movq 0x338(%r14), %rsi
movl $0x7f8, %edx            # imm = 0x7F8
movq %rax, %rdi
callq 0xb520
movl $0xff, %edi
movq %r15, %rsi
movl $0x40b, %edx            # imm = 0x40B
callq 0xccb0
movq %rax, 0x370(%r14)
movq 0x348(%r14), %rsi
movl $0xff, %edx
movq %rax, %rdi
callq 0xb520
movq 0x340(%r14), %rdi
movq %r15, %rsi
movl $0x410, %edx            # imm = 0x410
callq 0xccb0
movq %rax, 0x378(%r14)
movq 0x340(%r14), %rdx
movq 0x350(%r14), %rsi
movq %rax, %rdi
callq 0xb520
movl $0xff, %edi
movq %r15, %rsi
movl $0x415, %edx            # imm = 0x415
callq 0xccb0
movq %rax, 0x380(%r14)
movq 0x358(%r14), %rsi
movl $0xff, %edx
movq %rax, %rdi
callq 0xb520
leaq 0x368(%r14), %rsi
movl $0xff, %edx
movq %rbx, %rdi
callq 0xbdcf1
leaq 0x378(%r14), %rsi
movq 0x340(%r14), %rdx
movq %rbx, %rdi
callq 0xbda19
leaq 0x370(%r14), %rsi
movl $0xff, %edx
movq %rbx, %rdi
callq 0xbda19
leaq 0x380(%r14), %rsi
movl $0xff, %edx
movq %rbx, %rdi
callq 0xbdb07
movzbl 0x360(%r14), %edi
decq %rdi
callq 0x58fe7
movl %eax, %r12d
movq 0x1d0(%r14), %r15
testb %bpl, %bpl
je 0xb576e
movq 0x330(%r14), %rsi
jmp 0xb5785
movl %r12d, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0xb3a03
movq %rax, %rsi
movq %rax, 0x330(%r14)
testq %rsi, %rsi
je 0xb57d3
movl %r12d, %eax
imulq %rax, %r15
movq %r15, %rdx
shrq $0x3, %rdx
andl $0x7, %r15d
cmpq $0x1, %r15
sbbq $-0x1, %rdx
movq %rbx, %rdi
callq 0xbe3a4
leaq 0x2f8(%r14), %rsi
movq 0x30(%r14), %r8
movl 0x388(%r14), %r9d
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %ecx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb3a92
movq 0x787de(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x14882(%rip), %rsi     # 0xca066
leaq 0x3acc0(%rip), %rdx     # 0xf04ab
leaq 0x3acd4(%rip), %rcx     # 0xf04c6
leaq 0x363a1(%rip), %r8      # 0xebb9a
movl $0x431, %r9d            # imm = 0x431
xorl %eax, %eax
callq 0xb8c0
callq 0xb300