// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/fmi-keyval.c
// Function: gt_computefmkeyvalues
void gt_computefmkeyvalues (Fmindex *fm,
                            const GtSpecialcharinfo *specialcharinfo,
                            GtUword bwtlength,
                            unsigned int log2bsize,
                            unsigned int log2markdist,
                            unsigned int numofchars,
                            unsigned int suffixlength,
                            bool storeindexpos)
{
  fm->mappedptr = NULL;
  fm->log2bsize = log2bsize;
  fm->log2markdist = log2markdist;
  fm->bwtlength = bwtlength;
  fm->log2superbsize = GT_MULT2 (fm->log2bsize);
  fm->bsize = (unsigned int) GT_POW2 (fm->log2bsize);
  fm->bsizehalve = GT_DIV2(fm->bsize);
  fm->superbsize = (unsigned int) GT_POW2 (fm->log2superbsize);
  fm->nofblocks = (GtUword) (fm->bwtlength / fm->bsize) + 1;
  fm->nofsuperblocks = (GtUword) (fm->bwtlength / fm->superbsize) + 2;
  fm->markdist = (GtUword) GT_POW2 (fm->log2markdist);
  fm->markdistminus1 = (GtUword) (fm->markdist - 1);
  fm->negatebsizeones = ~ (GtUword) (fm->bsize - 1);
  fm->negatesuperbsizeones = ~ (GtUword) (fm->superbsize - 1);
  fm->log2superbsizeminuslog2bsize = fm->log2superbsize - fm->log2bsize;
  fm->mapsize = numofchars+1;
  fm->suffixlength = suffixlength;
  if (fm->suffixlength > 0)
  {
    fm->numofcodes = gt_power_for_small_exponents(fm->mapsize-1,
                                                  fm->suffixlength);
  } else
  {
    fm->numofcodes = 0;
  }
  fm->sizeofindex = determinefmindexsize (fm,
                                          specialcharinfo,
                                          suffixlength,
                                          storeindexpos);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r10d
movl %ecx, %eax
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, %rbx
movb 0x38(%rsp), %r15b
movl 0x30(%rsp), %ebp
movq $0x0, 0x70(%rdi)
movl %ecx, 0x88(%rdi)
movl %r10d, 0x94(%rdi)
movq %rdx, 0x10(%rdi)
movl $0x1, %esi
shll %cl, %esi
leal (%rax,%rax), %edx
movl %edx, 0x8c(%rdi)
movl %esi, 0x7c(%rdi)
movl %esi, %ecx
shrl %ecx
movl %ecx, 0x80(%rdi)
movl $0x1, %edi
movl %edx, %ecx
shll %cl, %edi
movq %r8, %r11
movl %eax, %ecx
shrq %cl, %r11
movl $0x1, %r12d
movl %edi, 0x84(%rbx)
incq %r11
movq %r11, 0xa8(%rbx)
movl %edx, %ecx
shrq %cl, %r8
movl %r10d, %ecx
shll %cl, %r12d
addq $0x2, %r8
movq %r8, 0xb0(%rbx)
movq %r12, 0xb8(%rbx)
decq %r12
movq %r12, 0x48(%rbx)
decl %esi
notq %rsi
movq %rsi, 0x38(%rbx)
decl %edi
notq %rdi
movq %rdi, 0x40(%rbx)
movl %eax, 0x90(%rbx)
leal 0x1(%r9), %eax
movl %eax, 0x78(%rbx)
movl %ebp, 0x98(%rbx)
testl %ebp, %ebp
je 0x317c99
movl %r9d, %edi
movl %ebp, %esi
callq 0x105ed6
movq %rax, %rcx
movl 0x78(%rbx), %eax
movq 0xb0(%rbx), %r8
jmp 0x317c9b
xorl %ecx, %ecx
movq %rcx, 0xc0(%rbx)
leal 0x1(%rax), %edx
movl %eax, %esi
imulq %rsi, %r8
addq %rdx, %r8
shlq $0x3, %r8
testb %r15b, %r15b
je 0x317ccf
movq 0x10(%rbx), %rax
decq %rax
xorl %edx, %edx
divq 0xb8(%rbx)
leaq (%r8,%rax,8), %r8
addq $0x8, %r8
shlq $0x4, %rcx
xorl %eax, %eax
testl %ebp, %ebp
cmovneq %rcx, %rax
addq %r8, %rax
testb %r15b, %r15b
je 0x317d1b
movabsq $0xffffffffffffffe, %rcx # imm = 0xFFFFFFFFFFFFFFE
leaq 0x1(%rcx), %rdx
xorl %edi, %edi
cmpq $0x0, 0x18(%r14)
setne %dil
cmovneq %rcx, %rdx
negq %rdi
cmpq $0x0, 0x20(%r14)
cmovneq %rdx, %rdi
addq 0x10(%r14), %rdi
shlq $0x4, %rdi
addq %rdi, %rax
addq $0x10, %rax
imulq 0xa8(%rbx), %rsi
addq %rax, %rsi
movq %rsi, 0xa0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop