// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq %rax
movl (%rsi), %eax
cmpq $0x6, %rax
ja 0xb3907
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x381eb(%rip), %rcx     # 0xeba38
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x280(%r14), %rsi
movq 0x288(%r14), %rdx
movq %rbx, %rdi
callq 0xbe1ba
leaq 0x2b8(%r14), %rsi
movq 0x30(%r14), %r8
movl (%r14), %r9d
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xb3a92
movq 0x288(%r14), %rdx
addq $0x280, %r14            # imm = 0x280
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xbe1ba
leaq 0x280(%r14), %rsi
movq 0x288(%r14), %rdx
movq %rbx, %rdi
callq 0xbe1ba
cmpb $0x1, 0x28(%r14)
jne 0xb3907
movq 0x30(%r14), %rax
leaq 0x3f(%rax), %rcx
shrq $0x6, %rcx
incq %rcx
cmpq $-0x40, %rax
pushq $0x1
popq %rdx
cmovbq %rcx, %rdx
addq $0x2b0, %r14            # imm = 0x2B0
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xbe0c5
addq $0x8, %rsp
popq %rbx
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 %r14
popq %r15
popq %rbp
jmp 0xbdb07
movl %edx, %ebp
movq 0x220(%r14), %rdi
callq 0x9b6a8
movq 0x30(%r14), %rsi
movl %eax, %ecx
imulq %rsi, %rcx
movq %rcx, %r15
shrq $0x3, %r15
andl $0x7, %ecx
cmpq $0x1, %rcx
sbbq $-0x1, %r15
movq 0x2a0(%r14), %rcx
testb %bpl, %bpl
jne 0xb3980
testq %rcx, %rcx
jne 0xb39cb
movl %eax, %edi
xorl %edx, %edx
callq 0xb3a03
movq %rax, %rcx
movq %rax, 0x2a0(%r14)
testq %rcx, %rcx
je 0xb399d
movq %rbx, %rdi
movq %rcx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xbe3a4
movq 0x7a614(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x166b8(%rip), %rsi     # 0xca066
leaq 0x3b640(%rip), %rdx     # 0xeeff5
leaq 0x3b617(%rip), %rcx     # 0xeefd3
leaq 0x381d7(%rip), %r8      # 0xebb9a
movl $0x55b, %r9d            # imm = 0x55B
jmp 0xb39f7
movq 0x7a5e6(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x1668a(%rip), %rsi     # 0xca066
leaq 0x3b5d3(%rip), %rdx     # 0xeefb6
leaq 0x3b5e9(%rip), %rcx     # 0xeefd3
leaq 0x381a9(%rip), %r8      # 0xebb9a
movl $0x556, %r9d            # imm = 0x556
xorl %eax, %eax
callq 0xb8c0
callq 0xb300