// File: /workspace/github_c_makefile_star2_O2/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 0x159f1e
movq %rdi, %rbx
cmpq $0x0, 0x98(%rdi)
je 0x159f2d
addq %rsi, 0x20(%rbx)
movq 0x70(%rbx), %rdi
callq 0xa0ea4
movq 0xe8(%rbx), %r13
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x1577ec
testq %rax, %rax
je 0x159f13
movq %rax, %r14
movq 0x30(%rbx), %rbp
movq 0xc0(%rbx), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %r12
addq $-0x10, %r12
shlq $0x3, %rbp
addq 0x98(%rbx), %rbp
xorl %esi, %esi
movq %r14, %rax
cmpq %r12, %r13
ja 0x159f0f
cmpq %rbp, %r14
ja 0x159f0f
movq (%r14), %rcx
cmpq %rcx, (%r13)
jbe 0x159e11
addq $0x8, %r14
addq $0x8, %rax
jmp 0x159dec
jne 0x159f06
subq 0x98(%rbx), %rax
sarq $0x3, %rax
movq 0x190(%rbx), %r15
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x159e45
movq 0x180(%rbx), %rdx
cmpq %rax, (%rdx,%rcx,8)
jae 0x159e42
incq %rcx
jmp 0x159e2b
movq %rcx, %r15
cmpq %rax, 0x110(%rbx)
jbe 0x159f8b
movq 0x140(%rbx), %rdx
movl (%rdx,%rax,4), %ecx
testl %ecx, %ecx
je 0x159e67
decl %ecx
movl %ecx, (%rdx,%rax,4)
jmp 0x159e88
testq %r15, %r15
je 0x15a03d
movq 0x180(%rbx), %rcx
incq -0x8(%rcx,%r15,8)
decq %r15
orl $-0x1, (%rdx,%rax,4)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rsi, 0x8(%rsp)
shlq $0x20, %r15
orq %rcx, %r15
movq 0x18(%rbx), %rax
addq (%rbx), %rax
cmpq %rax, %r15
jae 0x15a00f
movq 0x78(%rbx), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1b2640
testb %al, %al
je 0x159ecb
movq 0xf8(%rbx), %rdi
movq 0x8(%r13), %rsi
callq 0x191c81
movq %rax, %rdx
jmp 0x159ecf
movq 0x8(%r13), %rdx
movq 0x10(%rsp), %rax
subq (%rax), %r15
jb 0x159fb8
cmpq 0x8(%rax), %r15
jae 0x159f5e
cmpq %rdx, 0x10(%rax)
jb 0x159f5e
movq 0x20(%rax), %rdi
testq %rdi, %rdi
je 0x159fe5
movq %r15, %rsi
callq 0x6bc0a
movq 0x8(%rsp), %rsi
incq %rsi
addq $0x10, %r13
jmp 0x159de9
addq %rsi, 0x8(%rbx)
incl 0x50(%rbx)
andq $0x0, 0xc0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2de034(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18b0d5(%rip), %rsi    # 0x2e5013
leaq 0x1ec192(%rip), %rdx    # 0x3460d7
leaq 0x1ec4f6(%rip), %rcx    # 0x346442
leaq 0x1ebe61(%rip), %r8     # 0x345db4
movl $0xee, %r9d
jmp 0x15a067
movq 0x2de003(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18b0a4(%rip), %rsi    # 0x2e5013
leaq 0x1ec5d1(%rip), %rdx    # 0x346547
leaq 0x1ec5b9(%rip), %rcx    # 0x346536
leaq 0x1f2bc8(%rip), %r8     # 0x34cb4c
pushq $0x26
jmp 0x15a065
movq 0x2ddfd6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18b077(%rip), %rsi    # 0x2e5013
leaq 0x1ec514(%rip), %rdx    # 0x3464b7
leaq 0x1ec527(%rip), %rcx    # 0x3464d1
leaq 0x1ec53d(%rip), %r8     # 0x3464ee
pushq $0x4d
jmp 0x15a065
movq 0x2ddfa9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18b04a(%rip), %rsi    # 0x2e5013
leaq 0x1ec549(%rip), %rdx    # 0x346519
leaq 0x1ec55f(%rip), %rcx    # 0x346536
leaq 0x1f2b6e(%rip), %r8     # 0x34cb4c
pushq $0x24
jmp 0x15a065
movq 0x2ddf7c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18b01d(%rip), %rsi    # 0x2e5013
leaq 0x1ec588(%rip), %rdx    # 0x346585
leaq 0x1ec532(%rip), %rcx    # 0x346536
leaq 0x1f2b41(%rip), %r8     # 0x34cb4c
pushq $0x27
jmp 0x15a065
movq 0x2ddf52(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18aff3(%rip), %rsi    # 0x2e5013
leaq 0x1ec43e(%rip), %rdx    # 0x346465
leaq 0x1ec466(%rip), %rcx    # 0x346494
leaq 0x1ebd7f(%rip), %r8     # 0x345db4
movl $0xd6, %r9d
jmp 0x15a067
movq 0x2ddf24(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18afc5(%rip), %rsi    # 0x2e5013
leaq 0x1ec4b4(%rip), %rdx    # 0x346509
leaq 0x1ec475(%rip), %rcx    # 0x3464d1
leaq 0x1ec48b(%rip), %r8     # 0x3464ee
pushq $0x54
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390