// File: /workspace/github_c_makefile_star2_O0/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__tesselate_cubic
static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float objspace_flatness_squared, int n)
{
   // @TODO this "flatness" calculation is just made-up nonsense that seems to work well enough
   float dx0 = x1-x0;
   float dy0 = y1-y0;
   float dx1 = x2-x1;
   float dy1 = y2-y1;
   float dx2 = x3-x2;
   float dy2 = y3-y2;
   float dx = x3-x0;
   float dy = y3-y0;
   float longlen = (float) (STBTT_sqrt(dx0*dx0+dy0*dy0)+STBTT_sqrt(dx1*dx1+dy1*dy1)+STBTT_sqrt(dx2*dx2+dy2*dy2));
   float shortlen = (float) STBTT_sqrt(dx*dx+dy*dy);
   float flatness_squared = longlen*longlen-shortlen*shortlen;

   if (n > 16) // 65536 segments on one curve better be enough!
      return;

   if (flatness_squared > objspace_flatness_squared) {
      float x01 = (x0+x1)/2;
      float y01 = (y0+y1)/2;
      float x12 = (x1+x2)/2;
      float y12 = (y1+y2)/2;
      float x23 = (x2+x3)/2;
      float y23 = (y2+y3)/2;

      float xa = (x01+x12)/2;
      float ya = (y01+y12)/2;
      float xb = (x12+x23)/2;
      float yb = (y12+y23)/2;

      float mx = (xa+xb)/2;
      float my = (ya+yb)/2;

      stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1);
      stbtt__tesselate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1);
   } else {
      stbtt__add_point(points, *num_points,x3,y3);
      *num_points = *num_points+1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movss 0x10(%rbp), %xmm8
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movss %xmm1, -0x18(%rbp)
movss %xmm2, -0x1c(%rbp)
movss %xmm3, -0x20(%rbp)
movss %xmm4, -0x24(%rbp)
movss %xmm5, -0x28(%rbp)
movss %xmm6, -0x2c(%rbp)
movss %xmm7, -0x30(%rbp)
movl %edx, -0x34(%rbp)
movss -0x1c(%rbp), %xmm0
subss -0x14(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x20(%rbp), %xmm0
subss -0x18(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x24(%rbp), %xmm0
subss -0x1c(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x28(%rbp), %xmm0
subss -0x20(%rbp), %xmm0
movss %xmm0, -0x44(%rbp)
movss -0x2c(%rbp), %xmm0
subss -0x24(%rbp), %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x30(%rbp), %xmm0
subss -0x28(%rbp), %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x2c(%rbp), %xmm0
subss -0x14(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
movss -0x30(%rbp), %xmm0
subss -0x18(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
movss -0x38(%rbp), %xmm0
movss -0x38(%rbp), %xmm2
movss -0x3c(%rbp), %xmm1
mulss -0x3c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
movsd %xmm0, -0xa0(%rbp)
movss -0x40(%rbp), %xmm0
movss -0x40(%rbp), %xmm2
movss -0x44(%rbp), %xmm1
mulss -0x44(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
movaps %xmm0, %xmm1
movsd -0xa0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
movss -0x48(%rbp), %xmm0
movss -0x48(%rbp), %xmm2
movss -0x4c(%rbp), %xmm1
mulss -0x4c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
movaps %xmm0, %xmm1
movsd -0x98(%rbp), %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x50(%rbp), %xmm2
movss -0x54(%rbp), %xmm1
mulss -0x54(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x58(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x5c(%rbp), %xmm1
mulss -0x5c(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x60(%rbp)
cmpl $0x10, -0x34(%rbp)
jle 0x11669
jmp 0x11898
movss -0x60(%rbp), %xmm0
ucomiss 0x10(%rbp), %xmm0
jbe 0x11870
movss -0x14(%rbp), %xmm0
addss -0x1c(%rbp), %xmm0
movss 0x4fa2(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x64(%rbp)
movss -0x18(%rbp), %xmm0
addss -0x20(%rbp), %xmm0
movss 0x4f87(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x1c(%rbp), %xmm0
addss -0x24(%rbp), %xmm0
movss 0x4f6c(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x20(%rbp), %xmm0
addss -0x28(%rbp), %xmm0
movss 0x4f51(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x24(%rbp), %xmm0
addss -0x2c(%rbp), %xmm0
movss 0x4f36(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x28(%rbp), %xmm0
addss -0x30(%rbp), %xmm0
movss 0x4f1b(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x78(%rbp)
movss -0x64(%rbp), %xmm0
addss -0x6c(%rbp), %xmm0
movss 0x4f00(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x7c(%rbp)
movss -0x68(%rbp), %xmm0
addss -0x70(%rbp), %xmm0
movss 0x4ee5(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x80(%rbp)
movss -0x6c(%rbp), %xmm0
addss -0x74(%rbp), %xmm0
movss 0x4eca(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x84(%rbp)
movss -0x70(%rbp), %xmm0
addss -0x78(%rbp), %xmm0
movss 0x4eac(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x88(%rbp)
movss -0x7c(%rbp), %xmm0
addss -0x84(%rbp), %xmm0
movss 0x4e8b(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x8c(%rbp)
movss -0x80(%rbp), %xmm0
addss -0x88(%rbp), %xmm0
movss 0x4e6a(%rip), %xmm1     # 0x1662c
divss %xmm1, %xmm0
movss %xmm0, -0x90(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movss -0x14(%rbp), %xmm0
movss -0x18(%rbp), %xmm1
movss -0x64(%rbp), %xmm2
movss -0x68(%rbp), %xmm3
movss -0x7c(%rbp), %xmm4
movss -0x80(%rbp), %xmm5
movss -0x8c(%rbp), %xmm6
movss -0x90(%rbp), %xmm7
movss 0x10(%rbp), %xmm8
movl -0x34(%rbp), %edx
addl $0x1, %edx
movss %xmm8, (%rsp)
callq 0x114a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movss -0x8c(%rbp), %xmm0
movss -0x90(%rbp), %xmm1
movss -0x84(%rbp), %xmm2
movss -0x88(%rbp), %xmm3
movss -0x74(%rbp), %xmm4
movss -0x78(%rbp), %xmm5
movss -0x2c(%rbp), %xmm6
movss -0x30(%rbp), %xmm7
movss 0x10(%rbp), %xmm8
movl -0x34(%rbp), %edx
addl $0x1, %edx
movss %xmm8, (%rsp)
callq 0x114a0
jmp 0x11898
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %esi
movss -0x2c(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
callq 0x11260
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)