// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movb %dl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
andb $0x1, %al
movb %al, 0x27(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
testb $0x1, 0x27(%rsp)
je 0x1375bd
movl $0x7f8, %edi            # imm = 0x7F8
leaq 0x4e1c7(%rip), %rsi     # 0x18565e
movl $0x405, %edx            # imm = 0x405
callq 0xd2e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x368(%rax)
movq 0x18(%rsp), %rax
movq 0x368(%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x338(%rax), %rsi
movl $0x7f8, %edx            # imm = 0x7F8
callq 0xb500
movl $0xff, %edi
leaq 0x4e180(%rip), %rsi     # 0x18565e
movl $0x40b, %edx            # imm = 0x40B
callq 0xd2e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x370(%rax)
movq 0x18(%rsp), %rax
movq 0x370(%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x348(%rax), %rsi
movl $0xff, %edx
callq 0xb500
movq 0x18(%rsp), %rax
movq 0x340(%rax), %rdi
shlq $0x0, %rdi
leaq 0x4e12e(%rip), %rsi     # 0x18565e
movl $0x410, %edx            # imm = 0x410
callq 0xd2e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x378(%rax)
movq 0x18(%rsp), %rax
movq 0x378(%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x350(%rax), %rsi
movq 0x18(%rsp), %rax
movq 0x340(%rax), %rdx
shlq $0x0, %rdx
callq 0xb500
movl $0xff, %edi
leaq 0x4e0dc(%rip), %rsi     # 0x18565e
movl $0x415, %edx            # imm = 0x415
callq 0xd2e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x380(%rax)
movq 0x18(%rsp), %rax
movq 0x380(%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x358(%rax), %rsi
movl $0xff, %edx
callq 0xb500
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x368, %rsi            # imm = 0x368
movl $0xff, %edx
callq 0x146940
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x368, %rsi            # imm = 0x368
addq $0x10, %rsi
movq 0x18(%rsp), %rax
movq 0x340(%rax), %rdx
callq 0x146400
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x368, %rsi            # imm = 0x368
addq $0x8, %rsi
movl $0xff, %edx
callq 0x146400
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x368, %rsi            # imm = 0x368
addq $0x18, %rsi
movl $0xff, %edx
callq 0x1465c0
movq 0x18(%rsp), %rax
movzbl 0x360(%rax), %eax
movl %eax, %edi
subq $0x1, %rdi
callq 0x8c6d0
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %edi
movq 0x18(%rsp), %rax
movq 0x1d0(%rax), %rsi
callq 0x11ce50
movq %rax, 0x10(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x13769e
movl 0xc(%rsp), %edi
movq 0x18(%rsp), %rax
movq 0x1d0(%rax), %rsi
xorl %edx, %edx
callq 0x12da90
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x330(%rax)
jmp 0x1376a0
movq 0x18(%rsp), %rax
cmpq $0x0, 0x330(%rax)
jne 0x1376e7
movq 0x7c922(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x269a6(%rip), %rsi     # 0x15e066
leaq 0x52aca(%rip), %rdx     # 0x18a191
leaq 0x52ade(%rip), %rcx     # 0x18a1ac
leaq 0x4df89(%rip), %r8      # 0x18565e
movl $0x431, %r9d            # imm = 0x431
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x1376e9
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x330(%rax), %rsi
movq 0x10(%rsp), %rdx
callq 0x147580
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x2f8, %rsi            # imm = 0x2F8
movq 0x18(%rsp), %rax
movq 0x30(%rax), %r8
movq 0x18(%rsp), %rax
movl 0x388(%rax), %r9d
movl $0x1, %ecx
movl %ecx, %edx
callq 0x12db60
addq $0x38, %rsp
retq
nopl (%rax,%rax)