// File: /workspace/github_c_makefile_star2_O3/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 0xd01ff
leaq 0x327d3(%rip), %r15     # 0x10291a
movl $0x7f8, %edi            # imm = 0x7F8
movq %r15, %rsi
movl $0x405, %edx            # imm = 0x405
callq 0x35862
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 0x35862
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 0x35862
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 0x35862
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 0xd6b74
leaq 0x378(%r14), %rsi
movq 0x340(%r14), %rdx
movq %rbx, %rdi
callq 0xd6985
leaq 0x370(%r14), %rsi
movl $0xff, %edx
movq %rbx, %rdi
callq 0xd6985
leaq 0x380(%r14), %rsi
movl $0xff, %edx
movq %rbx, %rdi
callq 0xd6a2a
movzbl 0x360(%r14), %edi
decq %rdi
callq 0x7a629
movl %eax, %r15d
movq 0x1d0(%r14), %r12
testb %bpl, %bpl
je 0xd0279
movq 0x330(%r14), %rsi
jmp 0xd02ad
leaq 0x359f8(%rip), %rsi     # 0x105c78
movl $0x18, %edi
movl $0x48, %edx
callq 0x35862
movq %rax, %rsi
testq %rax, %rax
je 0xd02a6
movq $0x0, (%rsi)
movl %r15d, 0x10(%rsi)
movq %r12, 0x8(%rsi)
movq %rsi, 0x330(%r14)
testq %rsi, %rsi
je 0xd0300
movl %r15d, %eax
imulq %rax, %r12
movq %r12, %rdx
shrq $0x3, %rdx
andl $0x7, %r12d
cmpq $0x1, %r12
sbbq $-0x1, %rdx
movq %rbx, %rdi
callq 0xd6ff7
leaq 0x2f8(%r14), %rsi
movq 0x30(%r14), %r8
movl 0x388(%r14), %r9d
movq %rbx, %rdi
movl $0x1, %edx
movl $0x1, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xceb0d
callq 0x2ebd2