// File: /workspace/github_c_makefile_star2_O1/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 0xcf394
leaq 0x3374e(%rip), %r15     # 0x102a2a
movl $0x7f8, %edi            # imm = 0x7F8
movq %r15, %rsi
movl $0x405, %edx            # imm = 0x405
callq 0x35ee2
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 0x35ee2
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 0x35ee2
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 0x35ee2
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 0xd6489
leaq 0x378(%r14), %rsi
movq 0x340(%r14), %rdx
movq %rbx, %rdi
callq 0xd62ac
leaq 0x370(%r14), %rsi
movl $0xff, %edx
movq %rbx, %rdi
callq 0xd62ac
leaq 0x380(%r14), %rsi
movl $0xff, %edx
movq %rbx, %rdi
callq 0xd634b
movzbl 0x360(%r14), %edi
decq %rdi
callq 0x7a294
movl %eax, %r15d
movq 0x1d0(%r14), %r12
testb %bpl, %bpl
jne 0xcf436
leaq 0x369d1(%rip), %rsi     # 0x105ddd
movl $0x18, %edi
movl $0x48, %edx
callq 0x35ee2
testq %rax, %rax
je 0xcf42f
movq $0x0, (%rax)
movl %r15d, 0x10(%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x330(%r14)
movq 0x330(%r14), %rsi
testq %rsi, %rsi
je 0xcf490
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 0xd68e2
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 0xcdbe4
callq 0x2f1cf