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

 switch (encseq->sat) {
    case  GT_ACCESS_TYPE_DIRECTACCESS:
      numofunits = encseq->totallength;
      gt_mapspec_add_uchar(mapspec, encseq->plainseq, numofunits);
      break;
    case GT_ACCESS_TYPE_BYTECOMPRESS:
      bitspersymbol = gt_alphabet_bits_per_symbol(encseq->alpha);
      numofunits
        = (GtUword) sizeofbitarray(bitspersymbol,
                                         (BitOffset) encseq->totallength);
      if (!writemode) {
        gt_assert(encseq->bitpackarray == NULL);
        encseq->bitpackarray
          = bitpackarray_new(bitspersymbol, (BitOffset) encseq->totallength,
                             false);
      }
      gt_assert(encseq->bitpackarray != NULL);
      gt_mapspec_add_bitelem(mapspec,
                             BITPACKARRAYSTOREVAR(encseq->bitpackarray),
                             numofunits);
      break;
    case GT_ACCESS_TYPE_EQUALLENGTH:
      gt_mapspec_add_twobitencoding(mapspec, encseq->twobitencoding,
                                    encseq->unitsoftwobitencoding);
      break;
    case GT_ACCESS_TYPE_BITACCESS:
      gt_mapspec_add_twobitencoding(mapspec, encseq->twobitencoding,
                                    encseq->unitsoftwobitencoding);
      if (encseq->has_specialranges) {
        numofunits = (GtUword)
                      GT_NUMOFINTSFORBITS(encseq->totallength + GT_INTWORDSIZE);
        gt_mapspec_add_bitsequence(mapspec, encseq->specialbits, numofunits);
      }
      break;
    case GT_ACCESS_TYPE_UCHARTABLES:
    case GT_ACCESS_TYPE_USHORTTABLES:
    case GT_ACCESS_TYPE_UINT32TABLES:
      gt_mapspec_add_twobitencoding(mapspec, encseq->twobitencoding,
                                    encseq->unitsoftwobitencoding);
      addswtabletomapspectable(mapspec,
                               &encseq->wildcardrangetable,
                               true,
                               false,
                               encseq->totallength,
                               encseq->sat);
      break;
    default: break;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rsi), %eax
cmpq $0x6, %rax
ja 0xcdb16
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x34dfc(%rip), %rcx     # 0x102848
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x280(%r14), %rsi
movq 0x288(%r14), %rdx
movq %rbx, %rdi
callq 0xd67a4
leaq 0x2b8(%r14), %rsi
movq 0x30(%r14), %r8
movl (%r14), %r9d
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcdbe4
movq 0x288(%r14), %rdx
addq $0x280, %r14            # imm = 0x280
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd67a4
leaq 0x280(%r14), %rsi
movq 0x288(%r14), %rdx
movq %rbx, %rdi
callq 0xd67a4
cmpb $0x1, 0x28(%r14)
jne 0xcdb16
movq 0x30(%r14), %rax
leaq 0x3f(%rax), %rcx
shrq $0x6, %rcx
incq %rcx
cmpq $-0x40, %rax
movl $0x1, %edx
cmovbq %rcx, %rdx
addq $0x2b0, %r14            # imm = 0x2B0
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd6705
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%r14), %rdx
addq $0x290, %r14            # imm = 0x290
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd634b
movl %edx, %r12d
movq 0x220(%r14), %rdi
callq 0xb96f9
movl %eax, %ebp
movq 0x30(%r14), %r13
movl %eax, %eax
imulq %r13, %rax
movq %rax, %r15
shrq $0x3, %r15
andl $0x7, %eax
cmpq $0x1, %rax
sbbq $-0x1, %r15
testb %r12b, %r12b
jne 0xcdbb5
cmpq $0x0, 0x2a0(%r14)
jne 0xcdbdf
leaq 0x38251(%rip), %rsi     # 0x105ddd
movl $0x18, %edi
movl $0x48, %edx
callq 0x35ee2
testq %rax, %rax
je 0xcdbae
movq $0x0, (%rax)
movl %ebp, 0x10(%rax)
movq %r13, 0x8(%rax)
movq %rax, 0x2a0(%r14)
movq 0x2a0(%r14), %rsi
testq %rsi, %rsi
je 0xcdbda
movq %rbx, %rdi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd68e2
callq 0x2e96d
callq 0x2e934