// File: /workspace/github_c_makefile_star2_O0/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__GetGlyphShapeTT
static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices)
{
   stbtt_int16 numberOfContours;
   stbtt_uint8 *endPtsOfContours;
   stbtt_uint8 *data = info->data;
   stbtt_vertex *vertices=0;
   int num_vertices=0;
   int g = stbtt__GetGlyfOffset(info, glyph_index);

   *pvertices = NULL;

   if (g < 0) return 0;

   numberOfContours = ttSHORT(data + g);

   if (numberOfContours > 0) {
      stbtt_uint8 flags=0,flagcount;
      stbtt_int32 ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0;
      stbtt_int32 x,y,cx,cy,sx,sy, scx,scy;
      stbtt_uint8 *points;
      endPtsOfContours = (data + g + 10);
      ins = ttUSHORT(data + g + 10 + numberOfContours * 2);
      points = data + g + 10 + numberOfContours * 2 + 2 + ins;

      n = 1+ttUSHORT(endPtsOfContours + numberOfContours*2-2);

      m = n + 2*numberOfContours;  // a loose bound on how many vertices we might need
      vertices = (stbtt_vertex *) STBTT_malloc(m * sizeof(vertices[0]), info->userdata);
      if (vertices == 0)
         return 0;

      next_move = 0;
      flagcount=0;

      // in first pass, we load uninterpreted data into the allocated array
      // above, shifted to the end of the array so we won't overwrite it when
      // we create our final data starting from the front

      off = m - n; // starting offset for uninterpreted data, regardless of how m ends up being calculated

      // first load flags

      for (i=0; i < n; ++i) {
         if (flagcount == 0) {
            flags = *points++;
            if (flags & 8)
               flagcount = *points++;
         } else
            --flagcount;
         vertices[off+i].type = flags;
      }

      // now load x coordinates
      x=0;
      for (i=0; i < n; ++i) {
         flags = vertices[off+i].type;
         if (flags & 2) {
            stbtt_int16 dx = *points++;
            x += (flags & 16) ? dx : -dx; // ???
         } else {
            if (!(flags & 16)) {
               x = x + (stbtt_int16) (points[0]*256 + points[1]);
               points += 2;
            }
         }
         vertices[off+i].x = (stbtt_int16) x;
      }

      // now load y coordinates
      y=0;
      for (i=0; i < n; ++i) {
         flags = vertices[off+i].type;
         if (flags & 4) {
            stbtt_int16 dy = *points++;
            y += (flags & 32) ? dy : -dy; // ???
         } else {
            if (!(flags & 32)) {
               y = y + (stbtt_int16) (points[0]*256 + points[1]);
               points += 2;
            }
         }
         vertices[off+i].y = (stbtt_int16) y;
      }

      // now convert them to our format
      num_vertices=0;
      sx = sy = cx = cy = scx = scy = 0;
      for (i=0; i < n; ++i) {
         flags = vertices[off+i].type;
         x     = (stbtt_int16) vertices[off+i].x;
         y     = (stbtt_int16) vertices[off+i].y;

         if (next_move == i) {
            if (i != 0)
               num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);

            // now start the new one               
            start_off = !(flags & 1);
            if (start_off) {
               // if we start off with an off-curve point, then when we need to find a point on the curve
               // where we can start, and we need to save some state for when we wraparound.
               scx = x;
               scy = y;
               if (!(vertices[off+i+1].type & 1)) {
                  // next point is also a curve point, so interpolate an on-point curve
                  sx = (x + (stbtt_int32) vertices[off+i+1].x) >> 1;
                  sy = (y + (stbtt_int32) vertices[off+i+1].y) >> 1;
               } else {
                  // otherwise just use the next point as our start point
                  sx = (stbtt_int32) vertices[off+i+1].x;
                  sy = (stbtt_int32) vertices[off+i+1].y;
                  ++i; // we're using point i+1 as the starting point, so skip it
               }
            } else {
               sx = x;
               sy = y;
            }
            stbtt_setvertex(&vertices[num_vertices++], STBTT_vmove,sx,sy,0,0);
            was_off = 0;
            next_move = 1 + ttUSHORT(endPtsOfContours+j*2);
            ++j;
         } else {
            if (!(flags & 1)) { // if it's a curve
               if (was_off) // two off-curve control points in a row means interpolate an on-curve midpoint
                  stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+x)>>1, (cy+y)>>1, cx, cy);
               cx = x;
               cy = y;
               was_off = 1;
            } else {
               if (was_off)
                  stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, x,y, cx, cy);
               else
                  stbtt_setvertex(&vertices[num_vertices++], STBTT_vline, x,y,0,0);
               was_off = 0;
            }
         }
      }
      num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);
   } else if (numberOfContours == -1) {
      // Compound shapes.
      int more = 1;
      stbtt_uint8 *comp = data + g + 10;
      num_vertices = 0;
      vertices = 0;
      while (more) {
         stbtt_uint16 flags, gidx;
         int comp_num_verts = 0, i;
         stbtt_vertex *comp_verts = 0, *tmp = 0;
         float mtx[6] = {1,0,0,1,0,0}, m, n;
         
         flags = ttSHORT(comp); comp+=2;
         gidx = ttSHORT(comp); comp+=2;

         if (flags & 2) { // XY values
            if (flags & 1) { // shorts
               mtx[4] = ttSHORT(comp); comp+=2;
               mtx[5] = ttSHORT(comp); comp+=2;
            } else {
               mtx[4] = ttCHAR(comp); comp+=1;
               mtx[5] = ttCHAR(comp); comp+=1;
            }
         }
         else {
            // @TODO handle matching point
            STBTT_assert(0);
         }
         if (flags & (1<<3)) { // WE_HAVE_A_SCALE
            mtx[0] = mtx[3] = ttSHORT(comp)/16384.0f; comp+=2;
            mtx[1] = mtx[2] = 0;
         } else if (flags & (1<<6)) { // WE_HAVE_AN_X_AND_YSCALE
            mtx[0] = ttSHORT(comp)/16384.0f; comp+=2;
            mtx[1] = mtx[2] = 0;
            mtx[3] = ttSHORT(comp)/16384.0f; comp+=2;
         } else if (flags & (1<<7)) { // WE_HAVE_A_TWO_BY_TWO
            mtx[0] = ttSHORT(comp)/16384.0f; comp+=2;
            mtx[1] = ttSHORT(comp)/16384.0f; comp+=2;
            mtx[2] = ttSHORT(comp)/16384.0f; comp+=2;
            mtx[3] = ttSHORT(comp)/16384.0f; comp+=2;
         }
         
         // Find transformation scales.
         m = (float) STBTT_sqrt(mtx[0]*mtx[0] + mtx[1]*mtx[1]);
         n = (float) STBTT_sqrt(mtx[2]*mtx[2] + mtx[3]*mtx[3]);

         // Get indexed glyph.
         comp_num_verts = stbtt_GetGlyphShape(info, gidx, &comp_verts);
         if (comp_num_verts > 0) {
            // Transform vertices.
            for (i = 0; i < comp_num_verts; ++i) {
               stbtt_vertex* v = &comp_verts[i];
               stbtt_vertex_type x,y;
               x=v->x; y=v->y;
               v->x = (stbtt_vertex_type)(m * (mtx[0]*x + mtx[2]*y + mtx[4]));
               v->y = (stbtt_vertex_type)(n * (mtx[1]*x + mtx[3]*y + mtx[5]));
               x=v->cx; y=v->cy;
               v->cx = (stbtt_vertex_type)(m * (mtx[0]*x + mtx[2]*y + mtx[4]));
               v->cy = (stbtt_vertex_type)(n * (mtx[1]*x + mtx[3]*y + mtx[5]));
            }
            // Append vertices.
            tmp = (stbtt_vertex*)STBTT_malloc((num_vertices+comp_num_verts)*sizeof(stbtt_vertex), info->userdata);
            if (!tmp) {
               if (vertices) STBTT_free(vertices, info->userdata);
               if (comp_verts) STBTT_free(comp_verts, info->userdata);
               return 0;
            }
            if (num_vertices > 0) STBTT_memcpy(tmp, vertices, num_vertices*sizeof(stbtt_vertex));
            STBTT_memcpy(tmp+num_vertices, comp_verts, comp_num_verts*sizeof(stbtt_vertex));
            if (vertices) STBTT_free(vertices, info->userdata);
            vertices = tmp;
            STBTT_free(comp_verts, info->userdata);
            num_vertices += comp_num_verts;
         }
         // More components ?
         more = flags & (1<<5);
      }
   } else if (numberOfContours < 0) {
      // @TODO other compound variations?
      STBTT_assert(0);
   } else {
      // numberOfCounters == 0, do nothing
   }

   *pvertices = vertices;
   return num_vertices;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x4cd0
movl %eax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
cmpl $0x0, -0x50(%rbp)
jge 0x4fbe
movl $0x0, -0xc(%rbp)
jmp 0x5eaf
movq -0x40(%rbp), %rdi
movslq -0x50(%rbp), %rax
addq %rax, %rdi
callq 0x49b0
movw %ax, -0x2a(%rbp)
movswl -0x2a(%rbp), %eax
cmpl $0x0, %eax
jle 0x5718
movb $0x0, -0x51(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x70(%rbp)
movl $0x0, -0x78(%rbp)
movq -0x40(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
addq $0xa, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x50(%rbp), %rax
addq %rax, %rdi
addq $0xa, %rdi
movswl -0x2a(%rbp), %eax
shll %eax
cltq
addq %rax, %rdi
callq 0x4990
movzwl %ax, %eax
movl %eax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
addq $0xa, %rax
movswl -0x2a(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rax
addq $0x2, %rax
movslq -0x58(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0x38(%rbp), %rdi
movswl -0x2a(%rbp), %eax
shll %eax
cltq
addq %rax, %rdi
addq $-0x2, %rdi
callq 0x4990
movzwl %ax, %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
movswl -0x2a(%rbp), %ecx
shll %ecx
addl %ecx, %eax
movl %eax, -0x64(%rbp)
movslq -0x64(%rbp), %rax
imulq $0xe, %rax, %rdi
callq 0x1140
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x50b0
movl $0x0, -0xc(%rbp)
jmp 0x5eaf
movl $0x0, -0x6c(%rbp)
movb $0x0, -0x52(%rbp)
movl -0x64(%rbp), %eax
subl -0x68(%rbp), %eax
movl %eax, -0x74(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x514b
movzbl -0x52(%rbp), %eax
cmpl $0x0, %eax
jne 0x511e
movq -0xa0(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa0(%rbp)
movb (%rax), %al
movb %al, -0x51(%rbp)
movzbl -0x51(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x511c
movq -0xa0(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa0(%rbp)
movb (%rax), %al
movb %al, -0x52(%rbp)
jmp 0x5126
movb -0x52(%rbp), %al
addb $-0x1, %al
movb %al, -0x52(%rbp)
movb -0x51(%rbp), %cl
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %edx
addl -0x5c(%rbp), %edx
movslq %edx, %rdx
imulq $0xe, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0xc(%rax)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x50cb
movl $0x0, -0x7c(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x5254
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movb 0xc(%rax), %al
movb %al, -0x51(%rbp)
movzbl -0x51(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x51e4
movq -0xa0(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa0(%rbp)
movzbl (%rax), %eax
movw %ax, -0xa2(%rbp)
movzbl -0x51(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x51c5
movswl -0xa2(%rbp), %eax
movl %eax, -0x108(%rbp)
jmp 0x51d6
movswl -0xa2(%rbp), %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x108(%rbp)
movl -0x108(%rbp), %eax
addl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x5229
movzbl -0x51(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x5227
movl -0x7c(%rbp), %eax
movq -0xa0(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x8, %ecx
movq -0xa0(%rbp), %rdx
movzbl 0x1(%rdx), %edx
addl %edx, %ecx
movswl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x7c(%rbp)
movq -0xa0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xa0(%rbp)
jmp 0x5229
movl -0x7c(%rbp), %eax
movw %ax, %cx
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %edx
addl -0x5c(%rbp), %edx
movslq %edx, %rdx
imulq $0xe, %rdx, %rdx
addq %rdx, %rax
movw %cx, (%rax)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x5159
movl $0x0, -0x80(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x535e
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movb 0xc(%rax), %al
movb %al, -0x51(%rbp)
movzbl -0x51(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x52ed
movq -0xa0(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xa0(%rbp)
movzbl (%rax), %eax
movw %ax, -0xa4(%rbp)
movzbl -0x51(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x52ce
movswl -0xa4(%rbp), %eax
movl %eax, -0x10c(%rbp)
jmp 0x52df
movswl -0xa4(%rbp), %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x10c(%rbp)
movl -0x10c(%rbp), %eax
addl -0x80(%rbp), %eax
movl %eax, -0x80(%rbp)
jmp 0x5332
movzbl -0x51(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x5330
movl -0x80(%rbp), %eax
movq -0xa0(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x8, %ecx
movq -0xa0(%rbp), %rdx
movzbl 0x1(%rdx), %edx
addl %edx, %ecx
movswl %cx, %ecx
addl %ecx, %eax
movl %eax, -0x80(%rbp)
movq -0xa0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xa0(%rbp)
jmp 0x5332
movl -0x80(%rbp), %eax
movw %ax, %cx
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %edx
addl -0x5c(%rbp), %edx
movslq %edx, %rdx
imulq $0xe, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x2(%rax)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x5262
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x98(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x84(%rbp)
movl $0x0, -0x90(%rbp)
movl $0x0, -0x8c(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x56c5
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movb 0xc(%rax), %al
movb %al, -0x51(%rbp)
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x7c(%rbp)
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
movl %eax, -0x80(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jne 0x55cd
cmpl $0x0, -0x5c(%rbp)
je 0x5463
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %esi
movl -0x70(%rbp), %edx
movl -0x78(%rbp), %ecx
movl -0x8c(%rbp), %r8d
movl -0x90(%rbp), %r9d
movl -0x94(%rbp), %ebx
movl -0x98(%rbp), %r11d
movl -0x84(%rbp), %r10d
movl -0x88(%rbp), %eax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x10d90
movl %eax, -0x4c(%rbp)
movzbl -0x51(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x78(%rbp)
cmpl $0x0, -0x78(%rbp)
je 0x5556
movl -0x7c(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x98(%rbp)
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x5c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movzbl 0xc(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x550a
movl -0x7c(%rbp), %eax
movq -0x48(%rbp), %rcx
movl -0x74(%rbp), %edx
addl -0x5c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0xe, %rdx, %rdx
addq %rdx, %rcx
movswl (%rcx), %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x8c(%rbp)
movl -0x80(%rbp), %eax
movq -0x48(%rbp), %rcx
movl -0x74(%rbp), %edx
addl -0x5c(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0xe, %rdx, %rdx
addq %rdx, %rcx
movswl 0x2(%rcx), %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x90(%rbp)
jmp 0x5554
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x5c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x8c(%rbp)
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x5c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xe, %rcx, %rcx
addq %rcx, %rax
movswl 0x2(%rax), %eax
movl %eax, -0x90(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x5568
movl -0x7c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x90(%rbp)
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x4c(%rbp)
cltq
imulq $0xe, %rax, %rax
addq %rax, %rdi
movl -0x8c(%rbp), %edx
movl -0x90(%rbp), %ecx
movl $0x1, %esi
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x10900
movl $0x0, -0x70(%rbp)
movq -0x38(%rbp), %rdi
movl -0x60(%rbp), %eax
shll %eax
cltq
addq %rax, %rdi
callq 0x4990
movzwl %ax, %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x56b5
movzbl -0x51(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x5640
cmpl $0x0, -0x70(%rbp)
je 0x5625
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x4c(%rbp)
cltq
imulq $0xe, %rax, %rax
addq %rax, %rdi
movl -0x84(%rbp), %edx
addl -0x7c(%rbp), %edx
sarl %edx
movl -0x88(%rbp), %ecx
addl -0x80(%rbp), %ecx
sarl %ecx
movl -0x84(%rbp), %r8d
movl -0x88(%rbp), %r9d
movl $0x3, %esi
callq 0x10900
movl -0x7c(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x88(%rbp)
movl $0x1, -0x70(%rbp)
jmp 0x56b3
cmpl $0x0, -0x70(%rbp)
je 0x567e
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x4c(%rbp)
cltq
imulq $0xe, %rax, %rax
addq %rax, %rdi
movl -0x7c(%rbp), %edx
movl -0x80(%rbp), %ecx
movl -0x84(%rbp), %r8d
movl -0x88(%rbp), %r9d
movl $0x3, %esi
callq 0x10900
jmp 0x56ac
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x4c(%rbp)
cltq
imulq $0xe, %rax, %rax
addq %rax, %rdi
movl -0x7c(%rbp), %edx
movl -0x80(%rbp), %ecx
movl $0x2, %esi
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x10900
movl $0x0, -0x70(%rbp)
jmp 0x56b5
jmp 0x56b7
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x53a8
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %esi
movl -0x70(%rbp), %edx
movl -0x78(%rbp), %ecx
movl -0x8c(%rbp), %r8d
movl -0x90(%rbp), %r9d
movl -0x94(%rbp), %ebx
movl -0x98(%rbp), %r11d
movl -0x84(%rbp), %r10d
movl -0x88(%rbp), %eax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x10d90
movl %eax, -0x4c(%rbp)
jmp 0x5e9e
movswl -0x2a(%rbp), %eax
cmpl $-0x1, %eax
jne 0x5e70
movl $0x1, -0xa8(%rbp)
movq -0x40(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
addq $0xa, %rax
movq %rax, -0xb0(%rbp)
movl $0x0, -0x4c(%rbp)
movq $0x0, -0x48(%rbp)
cmpl $0x0, -0xa8(%rbp)
je 0x5e6e
movl $0x0, -0xb8(%rbp)
movq $0x0, -0xc8(%rbp)
movq $0x0, -0xd0(%rbp)
movq 0x10e58(%rip), %rax     # 0x165e0
movq %rax, -0xf0(%rbp)
movq 0x10e52(%rip), %rax     # 0x165e8
movq %rax, -0xe8(%rbp)
movq 0x10e4c(%rip), %rax     # 0x165f0
movq %rax, -0xe0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x49b0
movw %ax, -0xb2(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x49b0
movw %ax, -0xb4(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
movzwl -0xb2(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x58c0
movzwl -0xb2(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x586f
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss %xmm0, -0xe0(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss %xmm0, -0xdc(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
jmp 0x58be
movq -0xb0(%rbp), %rax
movsbl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0xe0(%rbp)
movq -0xb0(%rbp), %rax
incq %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movsbl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0xdc(%rbp)
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x58df
leaq 0x10fee(%rip), %rdi     # 0x168b5
leaq 0x10ee9(%rip), %rsi     # 0x167b7
movl $0x6fa, %edx            # imm = 0x6FA
leaq 0x1160e(%rip), %rcx     # 0x16ee8
callq 0x10a0
movzwl -0xb2(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x5948
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss 0x10d19(%rip), %xmm1    # 0x16620
divss %xmm1, %xmm0
movss %xmm0, -0xe4(%rbp)
movss %xmm0, -0xf0(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xe8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xec(%rbp)
jmp 0x5ad9
movzwl -0xb2(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x59e4
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss 0x10cac(%rip), %xmm1    # 0x16620
divss %xmm1, %xmm0
movss %xmm0, -0xf0(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xe8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xec(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss 0x10c5f(%rip), %xmm1    # 0x16620
divss %xmm1, %xmm0
movss %xmm0, -0xe4(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
jmp 0x5ad7
movzwl -0xb2(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x5ad5
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss 0x10c0e(%rip), %xmm1    # 0x16620
divss %xmm1, %xmm0
movss %xmm0, -0xf0(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss 0x10bd7(%rip), %xmm1    # 0x16620
divss %xmm1, %xmm0
movss %xmm0, -0xec(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss 0x10ba0(%rip), %xmm1    # 0x16620
divss %xmm1, %xmm0
movss %xmm0, -0xe8(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x49b0
cwtl
cvtsi2ss %eax, %xmm0
movss 0x10b69(%rip), %xmm1    # 0x16620
divss %xmm1, %xmm0
movss %xmm0, -0xe4(%rbp)
movq -0xb0(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xb0(%rbp)
jmp 0x5ad7
jmp 0x5ad9
movss -0xf0(%rbp), %xmm0
movss -0xf0(%rbp), %xmm2
movss -0xec(%rbp), %xmm1
mulss -0xec(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xf4(%rbp)
movss -0xe8(%rbp), %xmm0
movss -0xe8(%rbp), %xmm2
movss -0xe4(%rbp), %xmm1
mulss -0xe4(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xf8(%rbp)
movq -0x18(%rbp), %rdi
movzwl -0xb4(%rbp), %esi
leaq -0xc8(%rbp), %rdx
callq 0x4a50
movl %eax, -0xb8(%rbp)
cmpl $0x0, -0xb8(%rbp)
jle 0x5e59
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jge 0x5d88
movq -0xc8(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movq %rcx, %rdx
addq %rdx, %rdx
shlq $0x4, %rcx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x102(%rbp)
movq -0x100(%rbp), %rax
movw 0x2(%rax), %ax
movw %ax, -0x104(%rbp)
movss -0xf4(%rbp), %xmm0
movswl -0x102(%rbp), %eax
cvtsi2ss %eax, %xmm3
movss -0xf0(%rbp), %xmm1
movss -0xe8(%rbp), %xmm2
movswl -0x104(%rbp), %eax
cvtsi2ss %eax, %xmm4
mulss %xmm4, %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movss -0xe0(%rbp), %xmm2
addss %xmm2, %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x100(%rbp), %rax
movw %cx, (%rax)
movss -0xf8(%rbp), %xmm0
movswl -0x102(%rbp), %eax
cvtsi2ss %eax, %xmm3
movss -0xec(%rbp), %xmm1
movss -0xe4(%rbp), %xmm2
movswl -0x104(%rbp), %eax
cvtsi2ss %eax, %xmm4
mulss %xmm4, %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movss -0xdc(%rbp), %xmm2
addss %xmm2, %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x100(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x100(%rbp), %rax
movw 0x4(%rax), %ax
movw %ax, -0x102(%rbp)
movq -0x100(%rbp), %rax
movw 0x6(%rax), %ax
movw %ax, -0x104(%rbp)
movss -0xf4(%rbp), %xmm0
movswl -0x102(%rbp), %eax
cvtsi2ss %eax, %xmm3
movss -0xf0(%rbp), %xmm1
movss -0xe8(%rbp), %xmm2
movswl -0x104(%rbp), %eax
cvtsi2ss %eax, %xmm4
mulss %xmm4, %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movss -0xe0(%rbp), %xmm2
addss %xmm2, %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x100(%rbp), %rax
movw %cx, 0x4(%rax)
movss -0xf8(%rbp), %xmm0
movswl -0x102(%rbp), %eax
cvtsi2ss %eax, %xmm3
movss -0xec(%rbp), %xmm1
movss -0xe4(%rbp), %xmm2
movswl -0x104(%rbp), %eax
cvtsi2ss %eax, %xmm4
mulss %xmm4, %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
movss -0xdc(%rbp), %xmm2
addss %xmm2, %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movw %ax, %cx
movq -0x100(%rbp), %rax
movw %cx, 0x6(%rax)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x5b87
movl -0x4c(%rbp), %eax
addl -0xb8(%rbp), %eax
cltq
imulq $0xe, %rax, %rdi
callq 0x1140
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0xd0(%rbp)
jne 0x5ddf
cmpq $0x0, -0x48(%rbp)
je 0x5dbd
movq -0x48(%rbp), %rdi
callq 0x1030
cmpq $0x0, -0xc8(%rbp)
je 0x5dd3
movq -0xc8(%rbp), %rdi
callq 0x1030
movl $0x0, -0xc(%rbp)
jmp 0x5eaf
cmpl $0x0, -0x4c(%rbp)
jle 0x5dfd
movq -0xd0(%rbp), %rdi
movq -0x48(%rbp), %rsi
movslq -0x4c(%rbp), %rax
imulq $0xe, %rax, %rdx
callq 0x1130
movq -0xd0(%rbp), %rdi
movslq -0x4c(%rbp), %rax
imulq $0xe, %rax, %rax
addq %rax, %rdi
movq -0xc8(%rbp), %rsi
movslq -0xb8(%rbp), %rax
imulq $0xe, %rax, %rdx
callq 0x1130
cmpq $0x0, -0x48(%rbp)
je 0x5e36
movq -0x48(%rbp), %rdi
callq 0x1030
movq -0xd0(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0xc8(%rbp), %rdi
callq 0x1030
movl -0xb8(%rbp), %eax
addl -0x4c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movzwl -0xb2(%rbp), %eax
andl $0x20, %eax
movl %eax, -0xa8(%rbp)
jmp 0x5754
jmp 0x5e9c
movswl -0x2a(%rbp), %eax
cmpl $0x0, %eax
jge 0x5e98
leaq 0x10a35(%rip), %rdi     # 0x168b5
leaq 0x10930(%rip), %rsi     # 0x167b7
movl $0x72f, %edx            # imm = 0x72F
leaq 0x11055(%rip), %rcx     # 0x16ee8
callq 0x10a0
jmp 0x5e9a
jmp 0x5e9c
jmp 0x5e9e
movq -0x48(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x4c(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %rbp
retq
nopl (%rax)