// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/diagbandseed.c
// Function: gt_seed_extend_numofkmers
static GtUword gt_seed_extend_numofkmers(const GtEncseq *encseq,
                                         unsigned int seedlength,
                                         GtUword seqrange_start,
                                         GtUword seqrange_end)
{
  GtUword lastpos, numofpos, subtract, ratioofspecial;
  const GtUword totalnumofspecial = gt_encseq_specialcharacters(encseq),
                totalnumofpos = gt_encseq_total_length(encseq),
                firstpos = gt_encseq_seqstartpos(encseq, seqrange_start),
                numofseq = seqrange_end - seqrange_start + 1;

  lastpos = (seqrange_end + 1 == gt_encseq_num_of_sequences(encseq)
             ? totalnumofpos
             : gt_encseq_seqstartpos(encseq, seqrange_end + 1) - 1);
  gt_assert(lastpos >= firstpos);
  numofpos = lastpos - firstpos;

  subtract = GT_MIN(seedlength - 1, gt_encseq_min_seq_length(encseq)) + 1;
  gt_assert(numofpos + 1 >= numofseq * subtract);
  ratioofspecial = GT_MIN(totalnumofspecial * numofpos / totalnumofpos,
                          numofpos);
  gt_assert(numofpos >= ratioofspecial);
  return numofpos - GT_MAX(numofseq * subtract - 1, ratioofspecial);
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movl %esi, 0x8c(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq 0x90(%rsp), %rdi
callq 0xb2530
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x48(%rsp)
movq 0x90(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0xb0530
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
subq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x90(%rsp), %rdi
callq 0xa9d50
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jne 0x211a4b
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x211a6a
movq 0x90(%rsp), %rdi
movq 0x78(%rsp), %rsi
addq $0x1, %rsi
callq 0xb0530
subq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x211ab8
movq 0x42a519(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x304582(%rip), %rsi    # 0x516013
leaq 0x360894(%rip), %rdx    # 0x57232c
leaq 0x3608a1(%rip), %rcx    # 0x572340
leaq 0x3604ee(%rip), %r8     # 0x571f94
movl $0x186, %r9d            # imm = 0x186
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x211aba
movq 0x70(%rsp), %rax
subq 0x40(%rsp), %rax
movq %rax, 0x68(%rsp)
movl 0x8c(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rdi
callq 0xb1050
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x211b07
movl 0x8c(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, 0x18(%rsp)
jmp 0x211b19
movq 0x90(%rsp), %rdi
callq 0xb1050
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq 0x38(%rsp), %rcx
imulq 0x60(%rsp), %rcx
cmpq %rcx, %rax
jae 0x211b78
movq 0x42a459(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3044c2(%rip), %rsi    # 0x516013
leaq 0x360802(%rip), %rdx    # 0x57235a
leaq 0x3607e1(%rip), %rcx    # 0x572340
leaq 0x36042e(%rip), %r8     # 0x571f94
movl $0x18a, %r9d            # imm = 0x18A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x211b7a
movq 0x50(%rsp), %rax
imulq 0x68(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x48(%rsp)
cmpq 0x68(%rsp), %rax
jae 0x211bb0
movq 0x50(%rsp), %rax
imulq 0x68(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x48(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x211bba
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x211c08
movq 0x42a3c9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x304432(%rip), %rsi    # 0x516013
leaq 0x360796(%rip), %rdx    # 0x57237e
leaq 0x360751(%rip), %rcx    # 0x572340
leaq 0x36039e(%rip), %r8     # 0x571f94
movl $0x18d, %r9d            # imm = 0x18D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x211c0a
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
imulq 0x60(%rsp), %rax
subq $0x1, %rax
cmpq 0x58(%rsp), %rax
jbe 0x211c3f
movq 0x38(%rsp), %rax
imulq 0x60(%rsp), %rax
subq $0x1, %rax
movq %rax, (%rsp)
jmp 0x211c48
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
subq %rcx, %rax
addq $0x98, %rsp
retq
nopl (%rax)