// File: /workspace/github_c_makefile_star2_O3/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 0xcea41
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x33e41(%rip), %rcx     # 0x1027b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x280(%r14), %rsi
movq 0x288(%r14), %rdx
movq %rbx, %rdi
callq 0xd6ead
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 0xceb0d
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 0xd6ead
leaq 0x280(%r14), %rsi
movq 0x288(%r14), %rdx
movq %rbx, %rdi
callq 0xd6ead
cmpb $0x1, 0x28(%r14)
jne 0xcea41
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 0xd6e08
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 0xd6a2a
movl %edx, %r12d
movq 0x220(%r14), %rdi
callq 0xba7e4
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
movq 0x2a0(%r14), %rsi
testb %r12b, %r12b
jne 0xceae5
testq %rsi, %rsi
jne 0xceb08
leaq 0x371bf(%rip), %rsi     # 0x105c78
movl $0x18, %edi
movl $0x48, %edx
callq 0x35862
movq %rax, %rsi
testq %rax, %rax
je 0xceade
movq $0x0, (%rsi)
movl %ebp, 0x10(%rsi)
movq %r13, 0x8(%rsi)
movq %rsi, 0x2a0(%r14)
testq %rsi, %rsi
je 0xceb03
movq %rbx, %rdi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd6ff7
callq 0x2e4c6
callq 0x2e48d