// File: /workspace/github_c_makefile_star2_O0/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__compute_crossings_x
static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex *verts)
{
   int i;
   float orig[2], ray[2] = { 1, 0 };
   float y_frac;
   int winding = 0;

   orig[0] = x;
   orig[1] = y;

   // make sure y never passes through a vertex of the shape
   y_frac = (float) STBTT_fmod(y, 1.0f);
   if (y_frac < 0.01f)
      y += 0.01f;
   else if (y_frac > 0.99f)
      y -= 0.01f;
   orig[1] = y;

   // test a ray from (-infinity,y) to (x,y)
   for (i=0; i < nverts; ++i) {
      if (verts[i].type == STBTT_vline) {
         int x0 = (int) verts[i-1].x, y0 = (int) verts[i-1].y;
         int x1 = (int) verts[i  ].x, y1 = (int) verts[i  ].y;
         if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) {
            float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0;
            if (x_inter < x)  
               winding += (y0 < y1) ? 1 : -1;
         }
      }
      if (verts[i].type == STBTT_vcurve) {
         int x0 = (int) verts[i-1].x , y0 = (int) verts[i-1].y ;
         int x1 = (int) verts[i  ].cx, y1 = (int) verts[i  ].cy;
         int x2 = (int) verts[i  ].x , y2 = (int) verts[i  ].y ;
         int ax = STBTT_min(x0,STBTT_min(x1,x2)), ay = STBTT_min(y0,STBTT_min(y1,y2));
         int by = STBTT_max(y0,STBTT_max(y1,y2));
         if (y > ay && y < by && x > ax) {
            float q0[2],q1[2],q2[2];
            float hits[2][2];
            q0[0] = (float)x0;
            q0[1] = (float)y0;
            q1[0] = (float)x1;
            q1[1] = (float)y1;
            q2[0] = (float)x2;
            q2[1] = (float)y2;
            if (equal(q0,q1) || equal(q1,q2)) {
               x0 = (int)verts[i-1].x;
               y0 = (int)verts[i-1].y;
               x1 = (int)verts[i  ].x;
               y1 = (int)verts[i  ].y;
               if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) {
                  float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0;
                  if (x_inter < x)  
                     winding += (y0 < y1) ? 1 : -1;
               }
            } else {
               int num_hits = stbtt__ray_intersect_bezier(orig, ray, q0, q1, q2, hits);
               if (num_hits >= 1)
                  if (hits[0][0] < 0)
                     winding += (hits[0][1] < 0 ? -1 : 1);
               if (num_hits >= 2)
                  if (hits[1][0] < 0)
                     winding += (hits[1][1] < 0 ? -1 : 1);
            }
         } 
      }
   }
   return winding;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movss %xmm0, -0x4(%rbp)
movss %xmm1, -0x8(%rbp)
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq 0xb34d(%rip), %rax      # 0x166c0
movq %rax, -0x2c(%rbp)
movl $0x0, -0x34(%rbp)
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xb2ed(%rip), %xmm1     # 0x16690
callq 0x10c0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movss 0xb287(%rip), %xmm0     # 0x16640
ucomiss -0x30(%rbp), %xmm0
jbe 0xb3d3
movss 0xb279(%rip), %xmm0     # 0x16640
addss -0x8(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
jmp 0xb3fd
movss -0x30(%rbp), %xmm0
movss 0xb264(%rip), %xmm1     # 0x16644
ucomiss %xmm1, %xmm0
jbe 0xb3fb
movss -0x8(%rbp), %xmm0
movss 0xb24e(%rip), %xmm1     # 0x16640
subss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
jmp 0xb3fd
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xbaa8
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movzbl 0xc(%rax), %eax
cmpl $0x2, %eax
jne 0xb5c4
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
movl %eax, -0x44(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0xb4b6
movl -0x3c(%rbp), %eax
movl %eax, -0xb0(%rbp)
jmp 0xb4bf
movl -0x44(%rbp), %eax
movl %eax, -0xb0(%rbp)
movss -0xac(%rbp), %xmm0
movl -0xb0(%rbp), %eax
cvtsi2ss %eax, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xb5c2
movss -0x8(%rbp), %xmm0
movss %xmm0, -0xb4(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0xb4fa
movl -0x44(%rbp), %eax
movl %eax, -0xb8(%rbp)
jmp 0xb503
movl -0x3c(%rbp), %eax
movl %eax, -0xb8(%rbp)
movss -0xb4(%rbp), %xmm1
movl -0xb8(%rbp), %eax
cvtsi2ss %eax, %xmm0
ucomiss %xmm1, %xmm0
jbe 0xb5c2
movss -0x4(%rbp), %xmm0
movss %xmm0, -0xbc(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xb53e
movl -0x38(%rbp), %eax
movl %eax, -0xc0(%rbp)
jmp 0xb547
movl -0x40(%rbp), %eax
movl %eax, -0xc0(%rbp)
movss -0xbc(%rbp), %xmm0
movl -0xc0(%rbp), %eax
cvtsi2ss %eax, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xb5c2
movss -0x8(%rbp), %xmm0
cvtsi2ssl -0x3c(%rbp), %xmm1
subss %xmm1, %xmm0
movl -0x44(%rbp), %eax
subl -0x3c(%rbp), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movl -0x40(%rbp), %eax
subl -0x38(%rbp), %eax
cvtsi2ss %eax, %xmm2
cvtsi2ssl -0x38(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x48(%rbp), %xmm1
movss -0x4(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xb5c0
movl -0x3c(%rbp), %edx
movl -0x44(%rbp), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl %esi, %edx
cmovll %ecx, %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xb5c2
jmp 0xb5c4
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movzbl 0xc(%rax), %eax
cmpl $0x3, %eax
jne 0xba98
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x4(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x6(%rax), %eax
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x5c(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0xc4(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0xb688
movl -0x54(%rbp), %eax
movl %eax, -0xc8(%rbp)
jmp 0xb691
movl -0x5c(%rbp), %eax
movl %eax, -0xc8(%rbp)
movl -0xc4(%rbp), %eax
movl -0xc8(%rbp), %ecx
cmpl %ecx, %eax
jge 0xb6ac
movl -0x4c(%rbp), %eax
movl %eax, -0xcc(%rbp)
jmp 0xb6d4
movl -0x54(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0xb6bf
movl -0x54(%rbp), %eax
movl %eax, -0xd0(%rbp)
jmp 0xb6c8
movl -0x5c(%rbp), %eax
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x60(%rbp), %eax
jge 0xb6f9
movl -0x58(%rbp), %eax
movl %eax, -0xd8(%rbp)
jmp 0xb702
movl -0x60(%rbp), %eax
movl %eax, -0xd8(%rbp)
movl -0xd4(%rbp), %eax
movl -0xd8(%rbp), %ecx
cmpl %ecx, %eax
jge 0xb71d
movl -0x50(%rbp), %eax
movl %eax, -0xdc(%rbp)
jmp 0xb745
movl -0x58(%rbp), %eax
cmpl -0x60(%rbp), %eax
jge 0xb730
movl -0x58(%rbp), %eax
movl %eax, -0xe0(%rbp)
jmp 0xb739
movl -0x60(%rbp), %eax
movl %eax, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0xe4(%rbp)
movl -0x58(%rbp), %eax
cmpl -0x60(%rbp), %eax
jge 0xb76a
movl -0x60(%rbp), %eax
movl %eax, -0xe8(%rbp)
jmp 0xb773
movl -0x58(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0xe4(%rbp), %eax
movl -0xe8(%rbp), %ecx
cmpl %ecx, %eax
jge 0xb7ad
movl -0x58(%rbp), %eax
cmpl -0x60(%rbp), %eax
jge 0xb796
movl -0x60(%rbp), %eax
movl %eax, -0xec(%rbp)
jmp 0xb79f
movl -0x58(%rbp), %eax
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %eax
movl %eax, -0xf0(%rbp)
jmp 0xb7b6
movl -0x50(%rbp), %eax
movl %eax, -0xf0(%rbp)
movl -0xf0(%rbp), %eax
movl %eax, -0x6c(%rbp)
movss -0x8(%rbp), %xmm0
cvtsi2ssl -0x68(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0xba96
movss -0x8(%rbp), %xmm1
cvtsi2ssl -0x6c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xba96
movss -0x4(%rbp), %xmm0
cvtsi2ssl -0x64(%rbp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0xba96
cvtsi2ssl -0x4c(%rbp), %xmm0
movss %xmm0, -0x74(%rbp)
cvtsi2ssl -0x50(%rbp), %xmm0
movss %xmm0, -0x70(%rbp)
cvtsi2ssl -0x54(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
cvtsi2ssl -0x58(%rbp), %xmm0
movss %xmm0, -0x78(%rbp)
cvtsi2ssl -0x5c(%rbp), %xmm0
movss %xmm0, -0x84(%rbp)
cvtsi2ssl -0x60(%rbp), %xmm0
movss %xmm0, -0x80(%rbp)
leaq -0x74(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
callq 0x13460
cmpl $0x0, %eax
jne 0xb862
leaq -0x7c(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0x13460
cmpl $0x0, %eax
je 0xb9f9
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
movl %eax, -0x58(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0xf4(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0xb8e2
movl -0x50(%rbp), %eax
movl %eax, -0xf8(%rbp)
jmp 0xb8eb
movl -0x58(%rbp), %eax
movl %eax, -0xf8(%rbp)
movss -0xf4(%rbp), %xmm0
movl -0xf8(%rbp), %eax
cvtsi2ss %eax, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xb9f4
movss -0x8(%rbp), %xmm0
movss %xmm0, -0xfc(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0xb926
movl -0x58(%rbp), %eax
movl %eax, -0x100(%rbp)
jmp 0xb92f
movl -0x50(%rbp), %eax
movl %eax, -0x100(%rbp)
movss -0xfc(%rbp), %xmm1
movl -0x100(%rbp), %eax
cvtsi2ss %eax, %xmm0
ucomiss %xmm1, %xmm0
jbe 0xb9f4
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x104(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0xb96a
movl -0x4c(%rbp), %eax
movl %eax, -0x108(%rbp)
jmp 0xb973
movl -0x54(%rbp), %eax
movl %eax, -0x108(%rbp)
movss -0x104(%rbp), %xmm0
movl -0x108(%rbp), %eax
cvtsi2ss %eax, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xb9f4
movss -0x8(%rbp), %xmm0
cvtsi2ssl -0x50(%rbp), %xmm1
subss %xmm1, %xmm0
movl -0x58(%rbp), %eax
subl -0x50(%rbp), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movl -0x54(%rbp), %eax
subl -0x4c(%rbp), %eax
cvtsi2ss %eax, %xmm2
cvtsi2ssl -0x4c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xa4(%rbp)
movss -0xa4(%rbp), %xmm1
movss -0x4(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xb9f2
movl -0x50(%rbp), %edx
movl -0x58(%rbp), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl %esi, %edx
cmovll %ecx, %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xb9f4
jmp 0xba94
leaq -0x24(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
leaq -0x74(%rbp), %rdx
leaq -0x7c(%rbp), %rcx
leaq -0x84(%rbp), %r8
leaq -0xa0(%rbp), %r9
callq 0x134b0
movl %eax, -0xa8(%rbp)
cmpl $0x1, -0xa8(%rbp)
jl 0xba5a
xorps %xmm0, %xmm0
ucomiss -0xa0(%rbp), %xmm0
jbe 0xba58
movss -0x9c(%rbp), %xmm1
xorps %xmm0, %xmm0
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
ucomiss %xmm1, %xmm0
cmoval %ecx, %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xba5a
cmpl $0x2, -0xa8(%rbp)
jl 0xba92
xorps %xmm0, %xmm0
ucomiss -0x98(%rbp), %xmm0
jbe 0xba90
movss -0x94(%rbp), %xmm1
xorps %xmm0, %xmm0
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
ucomiss %xmm1, %xmm0
cmoval %ecx, %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xba92
jmp 0xba94
jmp 0xba96
jmp 0xba98
jmp 0xba9a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb40e
movl -0x34(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)