// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/firstcodes.c
// Function: gt_firstcodes_insertsuffixes_merge
static GtUword gt_firstcodes_insertsuffixes_merge(
                                        GtFirstcodesinfo *fci,
                                        const GtUwordPair *querystream_fst,
                                        const GtUword *subjectstream_fst)
{
  GtUword found = 0, idx;
  const GtUwordPair *query = querystream_fst,
                    *querystream_lst = fci->buf.spaceGtUwordPair +
                                       fci->buf.nextfree - 1;
  const GtUword *subject = subjectstream_fst,
                      *subjectstream_lst = fci->allfirstcodes +
                                           fci->currentmaxindex;

  while (query <= querystream_lst && subject <= subjectstream_lst)
  {
    if (query->a <= *subject)
    {
      if (query->a == *subject)
      {
        idx = gt_firstcodes_insertionindex(&fci->tab,
                                           (GtUword)
                                           (subject - fci->allfirstcodes));
        gt_assert(idx < fci->firstcodehits + fci->numofsequences);
        gt_spmsuftab_set(fci->spmsuftab,idx,
                         gt_spmsuftab_usebitsforpositions(fci->spmsuftab)
                           ? gt_seqnumrelpos_decode_pos(fci->buf.snrp,query->b)
                           : query->b);
        found++;
      }
      query++;
    } else
    {
      subject++;
    }
  }
  return found;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rax
movq 0xe8(%rax), %rax
movq 0x60(%rsp), %rcx
movq 0xc0(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $-0x10, %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq 0x98(%rax), %rax
movq 0x60(%rsp), %rcx
movq 0x30(%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rcx
xorl %eax, %eax
cmpq 0x30(%rsp), %rcx
movb %al, 0x1f(%rsp)
ja 0x249c2c
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
setbe %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x249c39
jmp 0x249d85
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rsp), %rcx
cmpq (%rcx), %rax
ja 0x249d72
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rsp), %rcx
cmpq (%rcx), %rax
jne 0x249d62
movq 0x60(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq 0x28(%rsp), %rsi
movq 0x60(%rsp), %rax
movq 0x98(%rax), %rax
subq %rax, %rsi
sarq $0x3, %rsi
callq 0x249d90
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rcx), %rcx
movq 0x60(%rsp), %rdx
addq 0x18(%rdx), %rcx
cmpq %rcx, %rax
jb 0x249ce6
movq 0x3f22eb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cc354(%rip), %rsi    # 0x516013
leaq 0x32ebe7(%rip), %rdx    # 0x5788ad
leaq 0x32ec0f(%rip), %rcx    # 0x5788dc
leaq 0x32e528(%rip), %r8     # 0x5781fc
movl $0xd6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x249ce8
movq 0x60(%rsp), %rax
movq 0x78(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x2eed70
testb $0x1, %al
jne 0x249d14
jmp 0x249d34
movq 0x60(%rsp), %rax
movq 0xf8(%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rsi
callq 0x2b11d0
movq %rax, (%rsp)
jmp 0x249d41
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
movq (%rsp), %rdx
callq 0x249f40
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
movq 0x38(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x38(%rsp)
jmp 0x249d80
movq 0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
jmp 0x249c09
movq 0x48(%rsp), %rax
addq $0x68, %rsp
retq
nop