// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/ft-front-generation.c
// Function: front_trace_add_gen
void front_trace_add_gen(GtFrontTrace *front_trace,GtUword trimleft,
                         GtUword valid)
{
  gt_assert (front_trace != NULL);
  if (front_trace->gen_nextfree >= front_trace->gen_allocated)
  {
    front_trace->gen_allocated
      = front_trace->gen_allocated * 1.2 + 128UL;
    front_trace->gen_table
      = gt_realloc(front_trace->gen_table,
                   sizeof *front_trace->gen_table * front_trace->gen_allocated);
    gt_assert(front_trace->gen_table != NULL);
  }
#ifdef WITHDISTRIBUTION
  distribution_add(front_trace->valid_dist,valid);
#endif
  if (front_trace->gen_nextfree > 0)
  {
    GtUword trimleft_diff;

    gt_assert(front_trace->previoustrimleft <= trimleft);
    trimleft_diff = trimleft - front_trace->previoustrimleft;
#ifdef WITHDISTRIBUTION
    distribution_add(front_trace->trimleft_diff_dist,trimleft_diff);
#endif
    gt_assert(trimleft_diff <= GT_FRONTGENERATION_VALUE_MAX);
    front_trace->gen_table[front_trace->gen_nextfree].trimleft_diff
      = trimleft_diff;
  } else
  {
    front_trace->gen_table[front_trace->gen_nextfree].trimleft_diff = 0;
  }
  front_trace->previoustrimleft = trimleft;
  gt_assert(front_trace->gen_nextfree < front_trace->gen_allocated);
  gt_assert(valid <= GT_FRONTGENERATION_VALUE_MAX);
  front_trace->gen_table[front_trace->gen_nextfree++].valid = valid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2ba5ce
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x50(%rdi), %rax
movq 0x58(%rdi), %rcx
cmpq %rcx, %rax
jb 0x2ba577
movq %rcx, %xmm0
punpckldq 0x2d3da(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x2d3e2(%rip), %xmm0    # 0x2e78f0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x2d7f6(%rip), %xmm1    # 0x2e7d18
addsd 0x8cc86(%rip), %xmm1    # 0x3471b0
cvttsd2si %xmm1, %rax
movq %rax, %rcx
subsd 0x2d7e6(%rip), %xmm1    # 0x2e7d20
sarq $0x3f, %rcx
cvttsd2si %xmm1, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %rsi, 0x58(%r14)
movq 0x20(%r14), %rdi
shlq $0x2, %rsi
leaq 0xc9145(%rip), %rdx     # 0x3836a1
movl $0xa9, %ecx
callq 0x93472
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x2ba6bd
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x2ba5a0
movq %r15, %rdx
subq 0x60(%r14), %rdx
jb 0x2ba661
cmpq $0x10000, %rdx          # imm = 0x10000
jae 0x2ba68f
movq 0x20(%r14), %rcx
movw %dx, (%rcx,%rax,4)
jmp 0x2ba5a8
movq 0x20(%r14), %rcx
andw $0x0, (%rcx)
movq %r15, 0x60(%r14)
cmpq 0x58(%r14), %rax
jae 0x2ba5ff
cmpq $0x10000, %rbx          # imm = 0x10000
jae 0x2ba630
leaq 0x1(%rax), %rdx
movq %rdx, 0x50(%r14)
movw %bx, 0x2(%rcx,%rax,4)
popq %rbx
popq %r14
popq %r15
retq
movq 0x17d993(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2aa34(%rip), %rsi     # 0x2e5013
leaq 0x8fcc5(%rip), %rdx     # 0x34a2ab
leaq 0xc90f6(%rip), %rcx     # 0x3836e3
leaq 0xc90ad(%rip), %r8      # 0x3836a1
movl $0xa2, %r9d
jmp 0x2ba6e9
movq 0x17d962(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2aa03(%rip), %rsi     # 0x2e5013
leaq 0xc9157(%rip), %rdx     # 0x38376e
leaq 0xc90c5(%rip), %rcx     # 0x3836e3
leaq 0xc907c(%rip), %r8      # 0x3836a1
movl $0xc0, %r9d
jmp 0x2ba6e9
movq 0x17d931(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a9d2(%rip), %rsi     # 0x2e5013
leaq 0xc915d(%rip), %rdx     # 0x3837a5
leaq 0xc9094(%rip), %rcx     # 0x3836e3
leaq 0xc904b(%rip), %r8      # 0x3836a1
movl $0xc1, %r9d
jmp 0x2ba6e9
movq 0x17d900(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a9a1(%rip), %rsi     # 0x2e5013
leaq 0xc909d(%rip), %rdx     # 0x383716
leaq 0xc9063(%rip), %rcx     # 0x3836e3
leaq 0xc901a(%rip), %r8      # 0x3836a1
movl $0xb3, %r9d
jmp 0x2ba6e9
movq 0x17d8d2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a973(%rip), %rsi     # 0x2e5013
leaq 0xc9099(%rip), %rdx     # 0x383740
leaq 0xc9035(%rip), %rcx     # 0x3836e3
leaq 0xc8fec(%rip), %r8      # 0x3836a1
movl $0xb8, %r9d
jmp 0x2ba6e9
movq 0x17d8a4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a945(%rip), %rsi     # 0x2e5013
leaq 0xc9022(%rip), %rdx     # 0x3836f7
leaq 0xc9007(%rip), %rcx     # 0x3836e3
leaq 0xc8fbe(%rip), %r8      # 0x3836a1
movl $0xaa, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390