// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_GetGlyphSDF
STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff)
{
   float scale_x = scale, scale_y = scale;
   int ix0,iy0,ix1,iy1;
   int w,h;
   unsigned char *data;

   // if one scale is 0, use same scale for both
   if (scale_x == 0) scale_x = scale_y;
   if (scale_y == 0) {
      if (scale_x == 0) return NULL;  // if both scales are 0, return NULL
      scale_y = scale_x;
   }

   stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale, scale, 0.0f,0.0f, &ix0,&iy0,&ix1,&iy1);

   // if empty, return NULL
   if (ix0 == ix1 || iy0 == iy1)
      return NULL;

   ix0 -= padding;
   iy0 -= padding;
   ix1 += padding;
   iy1 += padding;

   w = (ix1 - ix0);
   h = (iy1 - iy0);

   if (width ) *width  = w;
   if (height) *height = h;
   if (xoff  ) *xoff   = ix0;
   if (yoff  ) *yoff   = iy0;

   // invert for y-downwards bitmaps
   scale_y = -scale_y;
      
   {
      int x,y,i,j;
      float *precompute;
      stbtt_vertex *verts;
      int num_verts = stbtt_GetGlyphShape(info, glyph, &verts);
      data = (unsigned char *) STBTT_malloc(w * h, info->userdata);
      precompute = (float *) STBTT_malloc(num_verts * sizeof(float), info->userdata);

      for (i=0,j=num_verts-1; i < num_verts; j=i++) {
         if (verts[i].type == STBTT_vline) {
            float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;
            float x1 = verts[j].x*scale_x, y1 = verts[j].y*scale_y;
            float dist = (float) STBTT_sqrt((x1-x0)*(x1-x0) + (y1-y0)*(y1-y0));
            precompute[i] = (dist == 0) ? 0.0f : 1.0f / dist;
         } else if (verts[i].type == STBTT_vcurve) {
            float x2 = verts[j].x *scale_x, y2 = verts[j].y *scale_y;
            float x1 = verts[i].cx*scale_x, y1 = verts[i].cy*scale_y;
            float x0 = verts[i].x *scale_x, y0 = verts[i].y *scale_y;
            float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;
            float len2 = bx*bx + by*by;
            if (len2 != 0.0f)
               precompute[i] = 1.0f / (bx*bx + by*by);
            else
               precompute[i] = 0.0f;
         } else
            precompute[i] = 0.0f;
      }

      for (y=iy0; y < iy1; ++y) {
         for (x=ix0; x < ix1; ++x) {
            float val;
            float min_dist = 999999.0f;
            float sx = (float) x + 0.5f;
            float sy = (float) y + 0.5f;
            float x_gspace = (sx / scale_x);
            float y_gspace = (sy / scale_y);

            int winding = stbtt__compute_crossings_x(x_gspace, y_gspace, num_verts, verts); // @OPTIMIZE: this could just be a rasterization, but needs to be line vs. non-tesselated curves so a new path

            for (i=0; i < num_verts; ++i) {
               float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;

               // check against every point here rather than inside line/curve primitives -- @TODO: wrong if multiple 'moves' in a row produce a garbage point, and given culling, probably more efficient to do within line/curve
               float dist2 = (x0-sx)*(x0-sx) + (y0-sy)*(y0-sy);
               if (dist2 < min_dist*min_dist)
                  min_dist = (float) STBTT_sqrt(dist2);

               if (verts[i].type == STBTT_vline) {
                  float x1 = verts[i-1].x*scale_x, y1 = verts[i-1].y*scale_y;

                  // coarse culling against bbox
                  //if (sx > STBTT_min(x0,x1)-min_dist && sx < STBTT_max(x0,x1)+min_dist &&
                  //    sy > STBTT_min(y0,y1)-min_dist && sy < STBTT_max(y0,y1)+min_dist)
                  float dist = (float) STBTT_fabs((x1-x0)*(y0-sy) - (y1-y0)*(x0-sx)) * precompute[i];
                  STBTT_assert(i != 0);
                  if (dist < min_dist) {
                     // check position along line
                     // x' = x0 + t*(x1-x0), y' = y0 + t*(y1-y0)
                     // minimize (x'-sx)*(x'-sx)+(y'-sy)*(y'-sy)
                     float dx = x1-x0, dy = y1-y0;
                     float px = x0-sx, py = y0-sy;
                     // minimize (px+t*dx)^2 + (py+t*dy)^2 = px*px + 2*px*dx*t + t^2*dx*dx + py*py + 2*py*dy*t + t^2*dy*dy
                     // derivative: 2*px*dx + 2*py*dy + (2*dx*dx+2*dy*dy)*t, set to 0 and solve
                     float t = -(px*dx + py*dy) / (dx*dx + dy*dy);
                     if (t >= 0.0f && t <= 1.0f)
                        min_dist = dist;
                  }
               } else if (verts[i].type == STBTT_vcurve) {
                  float x2 = verts[i-1].x *scale_x, y2 = verts[i-1].y *scale_y;
                  float x1 = verts[i  ].cx*scale_x, y1 = verts[i  ].cy*scale_y;
                  float box_x0 = STBTT_min(STBTT_min(x0,x1),x2);
                  float box_y0 = STBTT_min(STBTT_min(y0,y1),y2);
                  float box_x1 = STBTT_max(STBTT_max(x0,x1),x2);
                  float box_y1 = STBTT_max(STBTT_max(y0,y1),y2);
                  // coarse culling against bbox to avoid computing cubic unnecessarily
                  if (sx > box_x0-min_dist && sx < box_x1+min_dist && sy > box_y0-min_dist && sy < box_y1+min_dist) {
                     int num=0;
                     float ax = x1-x0, ay = y1-y0;
                     float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;
                     float mx = x0 - sx, my = y0 - sy;
                     float res[3],px,py,t,it;
                     float a_inv = precompute[i];
                     if (a_inv == 0.0) { // if a_inv is 0, it's 2nd degree so use quadratic formula
                        float a = 3*(ax*bx + ay*by);
                        float b = 2*(ax*ax + ay*ay) + (mx*bx+my*by);
                        float c = mx*ax+my*ay;
                        if (a == 0.0) { // if a is 0, it's linear
                           if (b != 0.0) {
                              res[num++] = -c/b;
                           }
                        } else {
                           float discriminant = b*b - 4*a*c;
                           if (discriminant < 0)
                              num = 0;
                           else {
                              float root = (float) STBTT_sqrt(discriminant);
                              res[0] = (-b - root)/(2*a);
                              res[1] = (-b + root)/(2*a);
                              num = 2; // don't bother distinguishing 1-solution case, as code below will still work
                           }
                        }
                     } else {
                        float b = 3*(ax*bx + ay*by) * a_inv; // could precompute this as it doesn't depend on sample point
                        float c = (2*(ax*ax + ay*ay) + (mx*bx+my*by)) * a_inv;
                        float d = (mx*ax+my*ay) * a_inv;
                        num = stbtt__solve_cubic(b, c, d, res);
                     }
                     if (num >= 1 && res[0] >= 0.0f && res[0] <= 1.0f) {
                        t = res[0], it = 1.0f - t;
                        px = it*it*x0 + 2*t*it*x1 + t*t*x2;
                        py = it*it*y0 + 2*t*it*y1 + t*t*y2;
                        dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);
                        if (dist2 < min_dist * min_dist)
                           min_dist = (float) STBTT_sqrt(dist2);
                     }
                     if (num >= 2 && res[1] >= 0.0f && res[1] <= 1.0f) {
                        t = res[1], it = 1.0f - t;
                        px = it*it*x0 + 2*t*it*x1 + t*t*x2;
                        py = it*it*y0 + 2*t*it*y1 + t*t*y2;
                        dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);
                        if (dist2 < min_dist * min_dist)
                           min_dist = (float) STBTT_sqrt(dist2);
                     }
                     if (num >= 3 && res[2] >= 0.0f && res[2] <= 1.0f) {
                        t = res[2], it = 1.0f - t;
                        px = it*it*x0 + 2*t*it*x1 + t*t*x2;
                        py = it*it*y0 + 2*t*it*y1 + t*t*y2;
                        dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);
                        if (dist2 < min_dist * min_dist)
                           min_dist = (float) STBTT_sqrt(dist2);
                     }
                  }
               }
            }
            if (winding == 0)
               min_dist = -min_dist;  // if outside the shape, value is negative
            val = onedge_value + pixel_dist_scale * min_dist;
            if (val < 0)
               val = 0;
            else if (val > 255)
               val = 255;
            data[(y-iy0)*w+(x-ix0)] = (unsigned char) val;
         }
      }
      STBTT_free(precompute, info->userdata);
      STBTT_free(verts, info->userdata);
   }
   return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
jne 0x7705
jnp 0x7768
movq %r8, %rbx
movl %ecx, %r13d
movl %edx, %r12d
movq %rdi, %r14
movq %r9, -0xa0(%rbp)
movss %xmm1, -0x114(%rbp)
leaq -0x44(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x90(%rbp), %r15
leaq -0x4c(%rbp), %r9
xorps %xmm3, %xmm3
movl %esi, -0x80(%rbp)
movaps %xmm0, -0xf0(%rbp)
movaps %xmm0, %xmm1
movq %r15, %r8
callq 0x4bd7
leaq -0x44(%rbp), %rax
movl (%rax), %ecx
movl (%r15), %edi
cmpl %edi, %ecx
je 0x7768
movl %r13d, -0x60(%rbp)
movl -0x40(%rbp), %eax
movl -0x4c(%rbp), %r13d
cmpl %r13d, %eax
jne 0x7780
xorl %r13d, %r13d
movq %r13, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %r12d, %ecx
movl %ecx, -0x44(%rbp)
subl %r12d, %eax
movl %eax, -0x40(%rbp)
addl %r12d, %edi
movl %edi, -0x90(%rbp)
addl %r12d, %r13d
movl %r13d, -0x4c(%rbp)
subl %ecx, %edi
testq %rbx, %rbx
je 0x77a5
movl %edi, (%rbx)
movq 0x10(%rbp), %rdx
subl %eax, %r13d
movq -0xa0(%rbp), %rsi
testq %rsi, %rsi
movaps -0xf0(%rbp), %xmm0
je 0x77c2
movl %r13d, (%rsi)
movq 0x18(%rbp), %rsi
testq %rdx, %rdx
je 0x77cd
movl %ecx, (%rdx)
movl %edi, -0x84(%rbp)
testq %rsi, %rsi
je 0x77da
movl %eax, (%rsi)
movaps 0x634f(%rip), %xmm1     # 0xdb30
xorps %xmm0, %xmm1
movaps %xmm1, -0x140(%rbp)
leaq -0x1a8(%rbp), %r15
movq %r14, %rdi
movl -0x80(%rbp), %esi
movq %r15, %rdx
callq 0x37da
movl %eax, %r14d
imull -0x84(%rbp), %r13d
movslq %r13d, %rdi
callq 0x1170
movq %rax, %r13
movslq %r14d, %r12
leaq (,%r12,4), %rdi
callq 0x1170
movaps -0x140(%rbp), %xmm10
movaps -0xf0(%rbp), %xmm7
movq %rax, -0xb8(%rbp)
leal -0x1(%r12), %edx
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
movq (%r15), %r15
movss 0x6236(%rip), %xmm8     # 0xda8c
xorps %xmm0, %xmm0
movq %r15, %rcx
cmpq %rax, %r12
je 0x7980
movzbl 0xc(%rcx), %esi
movslq %edx, %rdx
cmpl $0x3, %esi
je 0x78e0
xorps %xmm2, %xmm2
cmpl $0x2, %esi
jne 0x7966
movswl (%rcx), %esi
cvtsi2ss %esi, %xmm1
movswl 0x2(%rcx), %esi
cvtsi2ss %esi, %xmm2
mulss %xmm7, %xmm1
imulq $0xe, %rdx, %rdx
movswl (%r15,%rdx), %esi
cvtsi2ss %esi, %xmm3
mulss %xmm7, %xmm3
movswl 0x2(%r15,%rdx), %edx
cvtsi2ss %edx, %xmm4
subss %xmm1, %xmm3
mulss %xmm7, %xmm2
mulss %xmm7, %xmm4
subss %xmm4, %xmm2
mulss %xmm2, %xmm2
mulss %xmm3, %xmm3
addss %xmm2, %xmm3
sqrtss %xmm3, %xmm2
movaps %xmm8, %xmm1
divss %xmm2, %xmm1
cmpeqss %xmm0, %xmm2
andnps %xmm1, %xmm2
jmp 0x7966
imulq $0xe, %rdx, %rdx
movswl (%r15,%rdx), %esi
cvtsi2ss %esi, %xmm2
mulss %xmm7, %xmm2
movswl 0x2(%r15,%rdx), %edx
cvtsi2ss %edx, %xmm3
movswl 0x4(%rcx), %edx
cvtsi2ss %edx, %xmm4
mulss %xmm7, %xmm4
movswl 0x6(%rcx), %edx
cvtsi2ss %edx, %xmm5
movswl (%rcx), %edx
cvtsi2ss %edx, %xmm1
movswl 0x2(%rcx), %edx
cvtsi2ss %edx, %xmm6
mulss %xmm10, %xmm5
mulss %xmm7, %xmm1
mulss %xmm10, %xmm6
addss %xmm4, %xmm4
subss %xmm4, %xmm1
addss %xmm2, %xmm1
addss %xmm5, %xmm5
subss %xmm5, %xmm6
mulss %xmm7, %xmm3
subss %xmm3, %xmm6
mulss %xmm6, %xmm6
mulss %xmm1, %xmm1
addss %xmm6, %xmm1
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jne 0x795e
jnp 0x7966
movaps %xmm8, %xmm2
divss %xmm1, %xmm2
movq -0xb8(%rbp), %rdx
movss %xmm2, (%rdx,%rax,4)
movl %eax, %edx
incq %rax
addq $0xe, %rcx
jmp 0x785c
movl -0x40(%rbp), %esi
movzbl -0x60(%rbp), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x110(%rbp)
imulq $0xe, %r12, %rbx
leaq -0xe(%r15), %rax
movq %rax, -0x170(%rbp)
movq %r13, -0x168(%rbp)
cmpl -0x4c(%rbp), %esi
jge 0x89b4
movl -0x44(%rbp), %edi
cvtsi2ss %esi, %xmm6
addss 0x60e7(%rip), %xmm6     # 0xdaa8
movaps %xmm6, %xmm0
divss %xmm10, %xmm0
cvtss2sd %xmm0, %xmm1
movsd %xmm1, -0x178(%rbp)
movaps %xmm0, %xmm1
addss 0x60ec(%rip), %xmm1     # 0xdacc
movss %xmm1, -0x104(%rbp)
movss %xmm0, -0x10c(%rbp)
addss 0x60d8(%rip), %xmm0     # 0xdad0
movss %xmm0, -0x118(%rbp)
movl %esi, -0x88(%rbp)
movss %xmm6, -0x30(%rbp)
cmpl -0x90(%rbp), %edi
jge 0x89ad
movaps %xmm7, -0x70(%rbp)
movl %edi, -0x8c(%rbp)
cvtsi2ss %edi, %xmm0
addss 0x607b(%rip), %xmm0     # 0xdaa8
movss %xmm0, -0x2c(%rbp)
movsd -0x178(%rbp), %xmm0
movsd 0x6116(%rip), %xmm1     # 0xdb58
callq 0x10e0
cvtsd2ss %xmm0, %xmm0
movss 0x607d(%rip), %xmm1     # 0xdad0
ucomiss %xmm0, %xmm1
movss -0x118(%rbp), %xmm8
ja 0x7a7c
ucomiss 0x606c(%rip), %xmm0     # 0xdad4
movss -0x10c(%rbp), %xmm8
jbe 0x7a7c
movss -0x104(%rbp), %xmm8
movss -0x2c(%rbp), %xmm5
movaps %xmm5, %xmm3
movaps -0xf0(%rbp), %xmm9
divss %xmm9, %xmm3
movaps %xmm3, %xmm4
xorps %xmm12, %xmm12
mulss %xmm12, %xmm4
movaps %xmm8, %xmm0
mulss %xmm12, %xmm0
addss %xmm3, %xmm0
movss %xmm0, -0x11c(%rbp)
subss %xmm8, %xmm4
xorl %r14d, %r14d
movl $0x0, -0x3c(%rbp)
movaps -0x140(%rbp), %xmm10
movss 0x5fba(%rip), %xmm14    # 0xda8c
movss -0x30(%rbp), %xmm6
movaps -0x70(%rbp), %xmm7
movss %xmm3, -0x38(%rbp)
movss %xmm4, -0x48(%rbp)
cmpq %r14, %rbx
je 0x8015
movzbl 0xc(%r15,%r14), %eax
cmpl $0x3, %eax
je 0x7b96
cmpl $0x2, %eax
jne 0x800c
movswl -0xc(%r15,%r14), %eax
movswl 0x2(%r15,%r14), %ecx
cmpw %cx, %ax
movl %ecx, %edx
cmovll %eax, %edx
cvtsi2ss %edx, %xmm0
ucomiss %xmm0, %xmm8
jbe 0x800c
cmpw %cx, %ax
movl %ecx, %edx
cmovgl %eax, %edx
cvtsi2ss %edx, %xmm0
ucomiss %xmm8, %xmm0
jbe 0x800c
movswl -0xe(%r15,%r14), %edx
movswl (%r15,%r14), %esi
cmpl %esi, %edx
movl %esi, %edi
cmovll %edx, %edi
cvtsi2ss %edi, %xmm0
ucomiss %xmm0, %xmm3
jbe 0x800c
xorl %edi, %edi
cmpw %cx, %ax
cvtsi2ss %eax, %xmm0
setl %dil
movaps %xmm8, %xmm1
subss %xmm0, %xmm1
subl %eax, %ecx
cvtsi2ss %ecx, %xmm0
divss %xmm0, %xmm1
subl %edx, %esi
cvtsi2ss %esi, %xmm0
mulss %xmm1, %xmm0
cvtsi2ss %edx, %xmm1
addss %xmm0, %xmm1
ucomiss %xmm1, %xmm3
jmp 0x7ce7
movswl -0xe(%r15,%r14), %eax
movzwl 0x4(%r15,%r14), %edi
movzwl 0x6(%r15,%r14), %r8d
movswl (%r15,%r14), %ecx
cmpw %cx, %di
movl %edi, %r9d
cmovgel %ecx, %r9d
movswl 0x2(%r15,%r14), %edx
cmpw %ax, %r9w
cmovgel %eax, %r9d
cmpw %dx, %r8w
movl %edx, %r11d
cmovll %r8d, %r11d
movswl -0xc(%r15,%r14), %esi
movl %r8d, %r10d
cmovlel %edx, %r10d
cmpw %r11w, %si
cmovll %esi, %r11d
cmpw %r10w, %si
movswl %r11w, %r11d
cvtsi2ss %r11d, %xmm0
cmovgl %esi, %r10d
ucomiss %xmm0, %xmm8
jbe 0x800c
movswl %r10w, %r10d
cvtsi2ss %r10d, %xmm0
ucomiss %xmm8, %xmm0
jbe 0x800c
movswl %r9w, %r9d
cvtsi2ss %r9d, %xmm0
ucomiss %xmm0, %xmm3
jbe 0x800c
cvtsi2ss %eax, %xmm13
cvtsi2ss %esi, %xmm2
movswl %di, %edi
cvtsi2ss %edi, %xmm15
movswl %r8w, %edi
cvtsi2ss %edi, %xmm0
ucomiss %xmm15, %xmm13
jne 0x7c4d
jp 0x7c4d
ucomiss %xmm0, %xmm2
jne 0x7c4d
jnp 0x7c7a
cvtsi2ss %ecx, %xmm11
cvtsi2ss %edx, %xmm1
movaps %xmm11, -0x80(%rbp)
ucomiss %xmm11, %xmm15
jne 0x7cfb
jp 0x7cfb
ucomiss %xmm1, %xmm0
jne 0x7cfb
jp 0x7cfb
cmpw %dx, %si
movl %edx, %edi
cmovll %esi, %edi
cvtsi2ss %edi, %xmm0
ucomiss %xmm0, %xmm8
jbe 0x800c
cmpw %dx, %si
movl %edx, %edi
cmovgl %esi, %edi
cvtsi2ss %edi, %xmm0
ucomiss %xmm8, %xmm0
jbe 0x800c
cmpl %ecx, %eax
movl %ecx, %edi
cmovll %eax, %edi
cvtsi2ss %edi, %xmm0
ucomiss %xmm0, %xmm3
jbe 0x800c
xorl %edi, %edi
cmpw %dx, %si
setl %dil
subl %esi, %edx
cvtsi2ss %edx, %xmm0
movaps %xmm8, %xmm1
subss %xmm2, %xmm1
divss %xmm0, %xmm1
subl %eax, %ecx
cvtsi2ss %ecx, %xmm0
mulss %xmm1, %xmm0
addss %xmm13, %xmm0
ucomiss %xmm0, %xmm3
leal -0x1(%rdi,%rdi), %eax
movl $0x0, %ecx
cmovbel %ecx, %eax
addl %eax, -0x3c(%rbp)
jmp 0x800c
movaps %xmm13, -0x160(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm0, %xmm11
movaps %xmm13, %xmm1
movaps 0x5e17(%rip), %xmm0     # 0xdb30
movaps %xmm2, %xmm13
movaps %xmm0, %xmm2
xorps %xmm0, %xmm1
andps %xmm0, %xmm1
movaps %xmm13, -0xb0(%rbp)
addss %xmm13, %xmm1
movaps %xmm15, -0x150(%rbp)
movaps %xmm15, %xmm13
xorps %xmm0, %xmm13
andps %xmm0, %xmm13
movaps %xmm11, -0xd0(%rbp)
addss %xmm11, %xmm13
movaps -0x80(%rbp), %xmm0
xorps %xmm2, %xmm0
andps %xmm2, %xmm0
addss -0xa0(%rbp), %xmm0
movaps %xmm13, %xmm2
addss %xmm13, %xmm2
movaps %xmm1, %xmm15
subss %xmm2, %xmm15
addss %xmm0, %xmm15
subss %xmm1, %xmm13
addss %xmm4, %xmm1
ucomiss %xmm12, %xmm15
jne 0x7d8e
jnp 0x7db1
mulss %xmm15, %xmm1
movaps %xmm13, %xmm0
mulss %xmm13, %xmm0
subss %xmm1, %xmm0
ucomiss %xmm12, %xmm0
jbe 0x7dde
jb 0x7de7
sqrtss %xmm0, %xmm0
jmp 0x7e49
movaps %xmm13, %xmm0
mulss 0x5d1b(%rip), %xmm0     # 0xdad8
divss %xmm0, %xmm1
xorl %eax, %eax
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jb 0x7de0
movss 0x5cb9(%rip), %xmm0     # 0xda8c
ucomiss %xmm1, %xmm0
jae 0x7ebe
jmp 0x7de0
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x7fc3
movss %xmm8, -0x108(%rbp)
movaps %xmm13, -0x1a0(%rbp)
movaps %xmm15, -0x190(%rbp)
callq 0x1160
movaps -0x190(%rbp), %xmm15
movaps -0x1a0(%rbp), %xmm13
movss -0x108(%rbp), %xmm8
movss -0x2c(%rbp), %xmm5
movaps -0x70(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss 0x5c57(%rip), %xmm14    # 0xda8c
xorps %xmm12, %xmm12
movaps -0x140(%rbp), %xmm10
movaps -0xf0(%rbp), %xmm9
movss 0x5c8b(%rip), %xmm3     # 0xdadc
divss %xmm15, %xmm3
movaps %xmm13, %xmm1
addss %xmm0, %xmm1
mulss %xmm3, %xmm1
movaps %xmm13, %xmm2
subss %xmm0, %xmm2
mulss %xmm3, %xmm2
movaps %xmm1, %xmm3
cmpleps %xmm14, %xmm3
xorps %xmm4, %xmm4
cmpleps %xmm1, %xmm4
andps %xmm3, %xmm4
movd %xmm4, %ecx
ucomiss %xmm12, %xmm0
jbe 0x7ea9
ucomiss %xmm12, %xmm2
jb 0x7ea9
movss 0x5bf4(%rip), %xmm0     # 0xda8c
ucomiss %xmm2, %xmm0
jb 0x7ea9
testb $0x1, %cl
jne 0x7ea5
movaps %xmm2, %xmm1
movl %ecx, %eax
jmp 0x7ebe
xorl %eax, %eax
testb $0x1, %cl
movss -0x38(%rbp), %xmm3
movss -0x48(%rbp), %xmm4
je 0x7de0
movaps 0x5c6b(%rip), %xmm0     # 0xdb30
movaps %xmm13, %xmm14
movaps -0xb0(%rbp), %xmm13
andps %xmm0, %xmm13
addss -0x160(%rbp), %xmm13
movaps -0xd0(%rbp), %xmm11
andps %xmm0, %xmm11
addss -0x150(%rbp), %xmm11
movaps -0xa0(%rbp), %xmm7
andps %xmm0, %xmm7
addss -0x80(%rbp), %xmm7
subss %xmm13, %xmm11
subss %xmm13, %xmm7
subss -0x11c(%rbp), %xmm13
movaps %xmm1, %xmm0
addss %xmm1, %xmm0
movss 0x5bbc(%rip), %xmm4     # 0xdae0
movaps %xmm4, %xmm3
subss %xmm0, %xmm3
mulss %xmm1, %xmm3
mulss %xmm11, %xmm3
addss %xmm13, %xmm3
movaps %xmm15, %xmm0
mulss %xmm1, %xmm0
mulss %xmm1, %xmm1
mulss %xmm7, %xmm1
addss %xmm3, %xmm1
movss %xmm1, -0x34(%rbp)
addss %xmm14, %xmm0
movaps %xmm0, -0x60(%rbp)
testb $0x1, %al
je 0x7fa8
movaps %xmm2, %xmm0
addss %xmm2, %xmm0
movaps %xmm4, %xmm1
subss %xmm0, %xmm1
mulss %xmm2, %xmm1
mulss %xmm11, %xmm1
addss %xmm13, %xmm1
mulss %xmm2, %xmm15
mulss %xmm2, %xmm2
mulss %xmm7, %xmm2
addss %xmm1, %xmm2
addss %xmm14, %xmm15
movb $0x1, %al
movss %xmm15, -0x124(%rbp)
movss %xmm2, -0x120(%rbp)
movb $0x1, %cl
jmp 0x7fac
movb $0x1, %al
xorl %ecx, %ecx
movss -0x38(%rbp), %xmm3
movss -0x48(%rbp), %xmm4
movaps -0x70(%rbp), %xmm7
movss 0x5ac9(%rip), %xmm14    # 0xda8c
xorl %edx, %edx
ucomiss -0x60(%rbp), %xmm12
setbe %dl
ucomiss -0x34(%rbp), %xmm12
leal -0x1(%rdx,%rdx), %edx
movl $0x0, %esi
cmovbel %esi, %edx
testb %al, %al
cmovel %esi, %edx
addl -0x3c(%rbp), %edx
xorl %eax, %eax
ucomiss -0x124(%rbp), %xmm12
setbe %al
ucomiss -0x120(%rbp), %xmm12
leal -0x1(%rax,%rax), %eax
cmovbel %esi, %eax
testb %cl, %cl
cmovel %esi, %eax
addl %edx, %eax
movl %eax, -0x3c(%rbp)
addq $0xe, %r14
jmp 0x7ae5
movq -0x170(%rbp), %r14
xorl %r13d, %r13d
movss 0x5abd(%rip), %xmm4     # 0xdae4
cmpq %r13, %r12
je 0x893b
movswl 0xe(%r14), %eax
cvtsi2ss %eax, %xmm0
mulss %xmm9, %xmm0
movswl 0x10(%r14), %eax
cvtsi2ss %eax, %xmm1
mulss %xmm10, %xmm1
movss %xmm0, -0x80(%rbp)
subss %xmm5, %xmm0
movss %xmm1, -0xa0(%rbp)
subss %xmm6, %xmm1
movaps %xmm1, %xmm2
mulss %xmm1, %xmm2
movaps %xmm0, %xmm3
mulss %xmm0, %xmm3
addss %xmm2, %xmm3
movaps %xmm4, %xmm2
mulss %xmm4, %xmm2
movaps %xmm4, %xmm8
sqrtss %xmm3, %xmm4
cmpltss %xmm2, %xmm3
andps %xmm3, %xmm4
andnps %xmm8, %xmm3
orps %xmm4, %xmm3
movaps %xmm3, %xmm4
movzbl 0x1a(%r14), %eax
cmpl $0x3, %eax
je 0x8165
cmpl $0x2, %eax
jne 0x8885
testq %r13, %r13
je 0x89cd
movswl (%r14), %eax
cvtsi2ss %eax, %xmm2
mulss %xmm9, %xmm2
movswl 0x2(%r14), %eax
movaps %xmm4, %xmm8
cvtsi2ss %eax, %xmm4
mulss %xmm10, %xmm4
subss -0x80(%rbp), %xmm2
subss -0xa0(%rbp), %xmm4
movaps %xmm0, %xmm5
mulss %xmm4, %xmm5
movaps %xmm2, %xmm3
mulss %xmm1, %xmm3
subss %xmm5, %xmm3
andps 0x5a47(%rip), %xmm3     # 0xdb40
movq -0xb8(%rbp), %rax
mulss (%rax,%r13,4), %xmm3
ucomiss %xmm3, %xmm8
jbe 0x8339
mulss %xmm4, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
xorps 0x5a0d(%rip), %xmm0     # 0xdb30
mulss %xmm4, %xmm4
mulss %xmm2, %xmm2
addss %xmm4, %xmm2
divss %xmm2, %xmm0
xorps %xmm1, %xmm1
cmpless %xmm0, %xmm1
cmpless 0x5948(%rip), %xmm0     # 0xda8c
andps %xmm0, %xmm3
andnps %xmm8, %xmm0
orps %xmm3, %xmm0
andps %xmm1, %xmm0
andnps %xmm8, %xmm1
orps %xmm0, %xmm1
movaps %xmm1, %xmm4
movss -0x2c(%rbp), %xmm5
jmp 0x8885
movswl (%r14), %eax
cvtsi2ss %eax, %xmm8
movswl 0x12(%r14), %eax
cvtsi2ss %eax, %xmm11
mulss %xmm9, %xmm8
mulss %xmm9, %xmm11
movss -0x80(%rbp), %xmm3
movaps %xmm3, %xmm2
minss %xmm11, %xmm2
minss %xmm8, %xmm2
subss %xmm4, %xmm2
ucomiss %xmm2, %xmm5
jbe 0x8885
movss %xmm11, -0x60(%rbp)
maxss %xmm3, %xmm11
movaps %xmm8, %xmm3
maxss %xmm11, %xmm3
addss %xmm4, %xmm3
ucomiss %xmm5, %xmm3
jbe 0x8885
movss %xmm8, -0x34(%rbp)
movswl 0x2(%r14), %eax
cvtsi2ss %eax, %xmm11
movswl 0x14(%r14), %eax
cvtsi2ss %eax, %xmm13
mulss %xmm10, %xmm11
mulss %xmm10, %xmm13
movss -0xa0(%rbp), %xmm8
movaps %xmm8, %xmm2
minss %xmm13, %xmm2
minss %xmm11, %xmm2
subss %xmm4, %xmm2
ucomiss %xmm2, %xmm6
jbe 0x8885
movaps %xmm13, %xmm2
maxss %xmm8, %xmm2
movaps %xmm11, %xmm3
maxss %xmm2, %xmm3
addss %xmm4, %xmm3
ucomiss %xmm6, %xmm3
jbe 0x8885
movaps %xmm4, -0x160(%rbp)
movaps %xmm7, -0x70(%rbp)
movss -0x60(%rbp), %xmm5
movaps %xmm5, %xmm2
movss -0x80(%rbp), %xmm4
subss %xmm4, %xmm2
movaps %xmm13, %xmm3
subss %xmm8, %xmm3
addss %xmm5, %xmm5
subss %xmm5, %xmm4
addss -0x34(%rbp), %xmm4
movss %xmm13, -0xb0(%rbp)
addss %xmm13, %xmm13
movaps %xmm8, %xmm6
subss %xmm13, %xmm6
addss %xmm11, %xmm6
movq -0xb8(%rbp), %rax
movss (%rax,%r13,4), %xmm5
ucomiss %xmm12, %xmm5
movaps %xmm3, %xmm7
mulss %xmm6, %xmm7
movaps %xmm2, %xmm13
mulss %xmm4, %xmm13
addss %xmm7, %xmm13
mulss 0x5843(%rip), %xmm13    # 0xdae8
movaps %xmm3, %xmm7
mulss %xmm3, %xmm7
movaps %xmm2, %xmm15
mulss %xmm2, %xmm15
jne 0x8347
jp 0x8347
addss %xmm7, %xmm15
mulss %xmm1, %xmm6
mulss %xmm0, %xmm4
addss %xmm6, %xmm4
addss %xmm15, %xmm15
addss %xmm4, %xmm15
mulss %xmm1, %xmm3
mulss %xmm0, %xmm2
addss %xmm3, %xmm2
ucomiss %xmm12, %xmm13
jne 0x8424
jp 0x8424
ucomiss %xmm12, %xmm15
movss -0x30(%rbp), %xmm6
movaps -0x100(%rbp), %xmm4
movaps -0x70(%rbp), %xmm7
movss -0x2c(%rbp), %xmm5
movss -0xb0(%rbp), %xmm3
jne 0x8321
jnp 0x8464
xorps 0x5808(%rip), %xmm2     # 0xdb30
divss %xmm15, %xmm2
movb $0x1, %dl
xorl %ecx, %ecx
movaps %xmm2, %xmm4
jmp 0x8468
movss -0x2c(%rbp), %xmm5
movaps %xmm8, %xmm4
jmp 0x8885
mulss %xmm5, %xmm13
addss %xmm7, %xmm15
mulss %xmm1, %xmm6
mulss %xmm0, %xmm4
addss %xmm6, %xmm4
addss %xmm15, %xmm15
addss %xmm4, %xmm15
mulss %xmm5, %xmm15
mulss %xmm1, %xmm3
mulss %xmm0, %xmm2
addss %xmm3, %xmm2
mulss %xmm5, %xmm2
movaps %xmm13, %xmm4
movss 0x5764(%rip), %xmm3     # 0xdaec
divss %xmm3, %xmm4
movaps %xmm13, %xmm0
mulss %xmm13, %xmm0
divss %xmm3, %xmm0
addss %xmm15, %xmm0
movaps %xmm13, %xmm5
addss %xmm13, %xmm5
mulss 0x5740(%rip), %xmm15    # 0xdaf0
mulss %xmm13, %xmm5
addss %xmm15, %xmm5
mulss %xmm13, %xmm5
movss 0x572d(%rip), %xmm1     # 0xdaf4
divss %xmm1, %xmm5
addss %xmm2, %xmm5
movaps %xmm0, %xmm6
mulss %xmm0, %xmm6
mulss %xmm0, %xmm6
movaps %xmm6, %xmm2
mulss 0x5713(%rip), %xmm2     # 0xdaf8
divss %xmm1, %xmm2
movaps %xmm5, -0xd0(%rbp)
movaps %xmm5, %xmm1
mulss %xmm5, %xmm1
addss %xmm2, %xmm1
ucomiss %xmm12, %xmm1
movaps %xmm4, -0x100(%rbp)
movss %xmm11, -0x150(%rbp)
jae 0x8474
divss %xmm3, %xmm0
ucomiss %xmm12, %xmm0
jb 0x848f
sqrtss %xmm0, %xmm0
jmp 0x84a4
movaps %xmm13, %xmm0
mulss 0x56d4(%rip), %xmm0     # 0xdb04
mulss %xmm0, %xmm2
movaps %xmm15, %xmm0
mulss %xmm15, %xmm0
addss %xmm2, %xmm0
ucomiss %xmm0, %xmm12
movss -0x30(%rbp), %xmm6
movaps -0x100(%rbp), %xmm4
movaps -0x70(%rbp), %xmm7
movss -0x2c(%rbp), %xmm5
movss -0xb0(%rbp), %xmm3
jbe 0x847c
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
movss -0x60(%rbp), %xmm0
jmp 0x8668
jb 0x84d0
sqrtss %xmm1, %xmm0
jmp 0x84d8
ucomiss %xmm12, %xmm0
jb 0x8891
sqrtss %xmm0, %xmm0
jmp 0x8906
movss %xmm6, -0xe0(%rbp)
callq 0x1160
movss -0xe0(%rbp), %xmm6
movss %xmm0, -0x70(%rbp)
movss 0x564b(%rip), %xmm0     # 0xdafc
divss %xmm6, %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd 0x56af(%rip), %xmm0     # 0xdb70
jb 0x8562
sqrtsd %xmm0, %xmm0
jmp 0x8567
movaps %xmm1, %xmm0
callq 0x1160
movaps %xmm0, %xmm1
movaps -0xd0(%rbp), %xmm3
subss %xmm3, %xmm1
xorps 0x5643(%rip), %xmm3     # 0xdb30
movss 0x55b3(%rip), %xmm2     # 0xdaa8
mulss %xmm2, %xmm1
subss %xmm0, %xmm3
mulss %xmm2, %xmm3
movaps %xmm3, -0xd0(%rbp)
movaps %xmm1, %xmm0
callq 0xb8fd
movss %xmm0, -0x38(%rbp)
movaps -0xd0(%rbp), %xmm0
callq 0xb8fd
movaps -0x100(%rbp), %xmm4
addss -0x38(%rbp), %xmm4
addss %xmm0, %xmm4
movb $0x1, %dl
xorl %ecx, %ecx
xorl %eax, %eax
movaps -0xf0(%rbp), %xmm9
movaps -0x140(%rbp), %xmm10
xorps %xmm12, %xmm12
movss 0x5538(%rip), %xmm14    # 0xda8c
movss -0x30(%rbp), %xmm6
movaps -0x70(%rbp), %xmm7
jmp 0x8644
callq 0x1210
cvtss2sd -0xd0(%rbp), %xmm1
mulsd %xmm0, %xmm1
mulsd 0x55e5(%rip), %xmm1     # 0xdb60
movapd %xmm1, %xmm0
callq 0x1100
cvtsd2ss %xmm0, %xmm0
divss 0x5558(%rip), %xmm0     # 0xdae8
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xe0(%rbp)
callq 0x10f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xd0(%rbp)
movsd -0xe0(%rbp), %xmm0
addsd 0x55ab(%rip), %xmm0     # 0xdb68
callq 0x10f0
cvtsd2ss %xmm0, %xmm0
mulss 0x5532(%rip), %xmm0     # 0xdb00
movss -0x70(%rbp), %xmm5
movaps %xmm5, %xmm1
addss %xmm5, %xmm1
movss -0xd0(%rbp), %xmm6
mulss %xmm6, %xmm1
movaps -0x100(%rbp), %xmm3
addss %xmm3, %xmm1
movaps %xmm0, %xmm2
addss %xmm6, %xmm2
mulss %xmm5, %xmm2
movaps %xmm3, %xmm4
subss %xmm2, %xmm4
movaps %xmm4, -0xe0(%rbp)
subss %xmm0, %xmm6
mulss %xmm5, %xmm6
subss %xmm6, %xmm3
movb $0x1, %dl
movaps %xmm3, %xmm7
movaps %xmm1, %xmm4
movb $0x1, %cl
movb $0x1, %al
movaps -0xf0(%rbp), %xmm9
movaps -0x140(%rbp), %xmm10
xorps %xmm12, %xmm12
movss 0x544d(%rip), %xmm14    # 0xda8c
movss -0x30(%rbp), %xmm6
movss -0x2c(%rbp), %xmm5
movss -0xa0(%rbp), %xmm8
movss -0x60(%rbp), %xmm0
movss -0x150(%rbp), %xmm11
movss -0xb0(%rbp), %xmm3
testb %dl, %dl
movaps %xmm4, -0x100(%rbp)
je 0x871a
ucomiss %xmm12, %xmm4
jb 0x871a
movss 0x5403(%rip), %xmm1     # 0xda8c
ucomiss %xmm4, %xmm1
jb 0x871a
movss 0x53f2(%rip), %xmm1     # 0xda8c
subss %xmm4, %xmm1
movaps %xmm4, %xmm2
addss %xmm4, %xmm2
mulss %xmm1, %xmm2
mulss %xmm1, %xmm1
mulss %xmm2, %xmm0
movaps %xmm1, %xmm3
mulss -0x80(%rbp), %xmm3
addss %xmm0, %xmm3
mulss %xmm4, %xmm4
movaps %xmm4, %xmm0
mulss -0x34(%rbp), %xmm0
addss %xmm3, %xmm0
movss -0xb0(%rbp), %xmm3
mulss %xmm3, %xmm2
mulss %xmm8, %xmm1
addss %xmm2, %xmm1
mulss %xmm11, %xmm4
addss %xmm1, %xmm4
subss %xmm5, %xmm0
subss %xmm6, %xmm4
mulss %xmm4, %xmm4
mulss %xmm0, %xmm0
addss %xmm4, %xmm0
movaps -0x160(%rbp), %xmm1
mulss %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x871a
sqrtss %xmm0, %xmm0
movaps %xmm0, -0x160(%rbp)
movaps -0xe0(%rbp), %xmm4
movaps %xmm4, %xmm0
cmpleps %xmm14, %xmm0
xorps %xmm1, %xmm1
cmpleps %xmm4, %xmm1
andps %xmm0, %xmm1
movd %xmm1, %edx
andb %dl, %cl
cmpb $0x1, %cl
jne 0x87cd
movss 0x5342(%rip), %xmm1     # 0xda8c
subss %xmm4, %xmm1
movaps %xmm4, %xmm2
addss %xmm4, %xmm2
mulss %xmm1, %xmm2
mulss %xmm1, %xmm1
movss -0x60(%rbp), %xmm0
mulss %xmm2, %xmm0
movaps %xmm1, %xmm3
mulss -0x80(%rbp), %xmm3
addss %xmm0, %xmm3
mulss %xmm4, %xmm4
movaps %xmm4, %xmm0
mulss -0x34(%rbp), %xmm0
addss %xmm3, %xmm0
movss -0xb0(%rbp), %xmm3
mulss %xmm3, %xmm2
mulss %xmm8, %xmm1
addss %xmm2, %xmm1
mulss %xmm11, %xmm4
addss %xmm1, %xmm4
subss %xmm5, %xmm0
subss %xmm6, %xmm4
mulss %xmm4, %xmm4
mulss %xmm0, %xmm0
addss %xmm4, %xmm0
movaps -0x160(%rbp), %xmm4
movaps %xmm4, %xmm1
mulss %xmm4, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x87d4
sqrtss %xmm0, %xmm4
jmp 0x87d4
movaps -0x160(%rbp), %xmm4
movaps %xmm7, %xmm0
cmpleps %xmm14, %xmm0
xorps %xmm1, %xmm1
cmpleps %xmm7, %xmm1
andps %xmm0, %xmm1
movd %xmm1, %ecx
andb %cl, %al
cmpb $0x1, %al
jne 0x8885
movss 0x5290(%rip), %xmm0     # 0xda8c
movaps %xmm11, %xmm12
subss %xmm7, %xmm0
movaps %xmm7, %xmm13
addss %xmm7, %xmm13
mulss %xmm0, %xmm13
mulss %xmm0, %xmm0
movss -0x60(%rbp), %xmm1
mulss %xmm13, %xmm1
movaps %xmm3, %xmm11
movss -0x80(%rbp), %xmm3
mulss %xmm0, %xmm3
addss %xmm1, %xmm3
movaps %xmm7, %xmm2
mulss %xmm7, %xmm2
movss -0x34(%rbp), %xmm1
mulss %xmm2, %xmm1
addss %xmm3, %xmm1
mulss %xmm13, %xmm11
mulss %xmm8, %xmm0
addss %xmm11, %xmm0
mulss %xmm12, %xmm2
addss %xmm0, %xmm2
subss %xmm5, %xmm1
subss %xmm6, %xmm2
mulss %xmm2, %xmm2
mulss %xmm1, %xmm1
addss %xmm2, %xmm1
movaps %xmm4, %xmm0
mulss %xmm4, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x8881
sqrtss %xmm1, %xmm4
xorps %xmm12, %xmm12
incq %r13
addq $0xe, %r14
jmp 0x8027
movss %xmm11, -0x150(%rbp)
movss %xmm13, -0x100(%rbp)
movaps %xmm15, -0xe0(%rbp)
callq 0x1160
movaps -0xe0(%rbp), %xmm15
movss -0x100(%rbp), %xmm13
movss -0xb0(%rbp), %xmm3
movss -0x150(%rbp), %xmm11
movss -0xa0(%rbp), %xmm8
movss -0x2c(%rbp), %xmm5
movaps -0x70(%rbp), %xmm7
movss -0x30(%rbp), %xmm6
movss 0x519a(%rip), %xmm14    # 0xda8c
xorps %xmm12, %xmm12
movaps -0x140(%rbp), %xmm10
movaps -0xf0(%rbp), %xmm9
movaps %xmm15, %xmm4
xorps 0x521f(%rip), %xmm4     # 0xdb30
subss %xmm0, %xmm4
addss %xmm13, %xmm13
divss %xmm13, %xmm4
subss %xmm15, %xmm0
divss %xmm13, %xmm0
movaps %xmm0, -0xe0(%rbp)
movb $0x1, %dl
xorl %eax, %eax
movb $0x1, %cl
jmp 0x846a
cmpl $0x0, -0x3c(%rbp)
jne 0x8948
xorps 0x51e8(%rip), %xmm4     # 0xdb30
movq -0x168(%rbp), %r13
movl -0x88(%rbp), %esi
movl -0x8c(%rbp), %edi
mulss -0x114(%rbp), %xmm4
addss -0x110(%rbp), %xmm4
xorps %xmm0, %xmm0
ucomiss %xmm4, %xmm0
ja 0x8987
ucomiss 0x5146(%rip), %xmm4     # 0xdac0
movaps %xmm4, %xmm0
jbe 0x8987
movss 0x5139(%rip), %xmm0     # 0xdac0
cvttss2si %xmm0, %eax
movl %esi, %ecx
subl -0x40(%rbp), %ecx
imull -0x84(%rbp), %ecx
movl %edi, %edx
subl -0x44(%rbp), %edx
addl %ecx, %edx
movslq %edx, %rcx
movb %al, (%r13,%rcx)
incl %edi
jmp 0x7a0b
incl %esi
jmp 0x79a9
movq -0xb8(%rbp), %rdi
callq 0x1030
movq %r15, %rdi
callq 0x1030
jmp 0x776b
leaq 0x538d(%rip), %rdi      # 0xdd61
leaq 0x528d(%rip), %rsi      # 0xdc68
leaq 0x5386(%rip), %rcx      # 0xdd68
movl $0x117b, %edx           # imm = 0x117B
callq 0x10c0