// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/firstcodes.c
// Function: gt_firstcodes_insertsuffixes_flush
static void gt_firstcodes_insertsuffixes_flush(void *data)
{
  GtFirstcodesinfo *fci = (GtFirstcodesinfo *) data;

  if (fci->buf.nextfree > 0)
  {
    const GtUword *ptr;

    gt_assert(fci->allfirstcodes != NULL);
    fci->codebuffer_total += fci->buf.nextfree;
    gt_radixsort_inplace_sort(fci->radixsort_codepos,fci->buf.nextfree);
    ptr = gt_firstcodes_find_insert(fci,fci->buf.spaceGtUwordPair[0].a);
    if (ptr != NULL)
    {
      fci->firstcodeposhits
        += gt_firstcodes_insertsuffixes_merge(fci,fci->buf.spaceGtUwordPair,
                                              ptr);
    }
    fci->flushcount++;
    fci->buf.nextfree = 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0xc0(%rdi), %rsi
testq %rsi, %rsi
je 0x1b59a3
movq %rdi, %r13
cmpq $0x0, 0x98(%rdi)
je 0x1b59cb
addq %rsi, 0x20(%r13)
movq 0x70(%r13), %rdi
callq 0x115413
movq 0xe8(%r13), %r12
movq 0x28(%r13), %rdx
movq 0x30(%r13), %r8
cmpq %r8, %rdx
jle 0x1b57de
xorl %ebp, %ebp
jmp 0x1b5824
movq (%r12), %rax
movq 0x98(%r13), %rsi
leaq (%rsi,%r8,8), %rcx
leaq (%rsi,%rdx,8), %rdx
xorl %esi, %esi
movq %rcx, %rdi
subq %rdx, %rdi
sarq %rdi
andq $-0x8, %rdi
leaq (%rdx,%rdi), %rbp
cmpq %rax, (%rdx,%rdi)
jbe 0x1b5813
leaq -0x8(%rbp), %rcx
movq %rbp, %rsi
jmp 0x1b581f
jae 0x1b5824
movq %rbp, %rdx
addq $0x8, %rdx
movq %rsi, %rbp
cmpq %rcx, %rdx
jbe 0x1b57f3
testq %rbp, %rbp
je 0x1b5994
movq 0xc0(%r13), %rax
shlq $0x4, %rax
leaq (%r12,%rax), %rdi
addq $-0x10, %rdi
xorl %ebx, %ebx
cmpq %r12, %rdi
jb 0x1b5990
shlq $0x3, %r8
addq 0x98(%r13), %r8
cmpq %rbp, %r8
jb 0x1b5990
xorl %ebx, %ebx
movq %r13, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movq %rdi, (%rsp)
movq (%rbp), %rax
cmpq %rax, (%r12)
jbe 0x1b5882
addq $0x8, %rbp
jmp 0x1b5982
jne 0x1b597e
movq %rbp, %rax
subq 0x98(%r13), %rax
sarq $0x3, %rax
movq 0x190(%r13), %rcx
testq %rcx, %rcx
je 0x1b58bf
movq 0x180(%r13), %rdx
xorl %r14d, %r14d
cmpq %rax, (%rdx,%r14,8)
jae 0x1b58c2
incq %r14
cmpq %r14, %rcx
jne 0x1b58ac
movq %rcx, %r14
jmp 0x1b58c2
xorl %r14d, %r14d
cmpq %rax, 0x110(%r13)
jbe 0x1b59bc
movq 0x140(%r13), %rdx
movl (%rdx,%rax,4), %ecx
testl %ecx, %ecx
je 0x1b58e4
decl %ecx
movl %ecx, (%rdx,%rax,4)
jmp 0x1b5908
testq %r14, %r14
je 0x1b59d0
movq 0x180(%r13), %rcx
incq -0x8(%rcx,%r14,8)
decq %r14
movl $0xffffffff, (%rdx,%rax,4) # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
shlq $0x20, %r14
orq %rcx, %r14
movq 0x18(%r13), %rax
addq (%r13), %rax
cmpq %rax, %r14
jae 0x1b59c1
movq 0x78(%r13), %r15
movq %r15, %rdi
callq 0x2083a2
testb %al, %al
je 0x1b5946
movq 0xf8(%r13), %rdi
movq 0x8(%r12), %rsi
callq 0x1ec4a3
movq %rax, %rdx
jmp 0x1b594b
movq 0x8(%r12), %rdx
subq (%r15), %r14
jb 0x1b59b7
cmpq 0x8(%r15), %r14
jae 0x1b59b2
cmpq %rdx, 0x10(%r15)
jb 0x1b59b2
movq 0x20(%r15), %rdi
testq %rdi, %rdi
je 0x1b59c6
movq %r14, %rsi
callq 0xe8138
incq %rbx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r13
movq (%rsp), %rdi
addq $0x10, %r12
cmpq %rdi, %r12
ja 0x1b5990
cmpq %r8, %rbp
jbe 0x1b586f
addq %rbx, 0x8(%r13)
incl 0x50(%r13)
movq $0x0, 0xc0(%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x65915
callq 0x6594c
callq 0x6586e
callq 0x658a5
callq 0x658de
callq 0x659ba
callq 0x65983