// File: /workspace/github_c_makefile_star2_O3/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_GetGlyphBitmapSubpixel
STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int *width, int *height, int *xoff, int *yoff)
{
   int ix0,iy0,ix1,iy1;
   stbtt__bitmap gbm;
   stbtt_vertex *vertices;   
   int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);

   if (scale_x == 0) scale_x = scale_y;
   if (scale_y == 0) {
      if (scale_x == 0) {
         STBTT_free(vertices, info->userdata);
         return NULL;
      }
      scale_y = scale_x;
   }

   stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,&ix1,&iy1);

   // now we get the size
   gbm.w = (ix1 - ix0);
   gbm.h = (iy1 - iy0);
   gbm.pixels = NULL; // in case we error

   if (width ) *width  = gbm.w;
   if (height) *height = gbm.h;
   if (xoff  ) *xoff   = ix0;
   if (yoff  ) *yoff   = iy0;
   
   if (gbm.w && gbm.h) {
      gbm.pixels = (unsigned char *) STBTT_malloc(gbm.w * gbm.h, info->userdata);
      if (gbm.pixels) {
         gbm.stride = gbm.w;

         stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0, iy0, 1, info->userdata);
      }
   }
   STBTT_free(vertices, info->userdata);
   return gbm.pixels;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rcx, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
movl %esi, %ebx
movss %xmm3, -0x38(%rbp)
movss %xmm2, -0x34(%rbp)
movss %xmm1, -0x2c(%rbp)
movss %xmm0, -0x30(%rbp)
movq %rdi, %r14
leaq -0x40(%rbp), %rdx
callq 0x3889
movss -0x30(%rbp), %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
setp %cl
setne %sil
jne 0x5ffb
movss -0x2c(%rbp), %xmm1
jp 0x6000
movaps %xmm1, %xmm0
jmp 0x6000
movss -0x2c(%rbp), %xmm1
orb %cl, %sil
ucomiss %xmm2, %xmm1
setp %dl
setne %cl
jne 0x6013
jp 0x6013
movaps %xmm0, %xmm1
orb %dl, %cl
orb %cl, %sil
je 0x6122
movq %r12, -0x50(%rbp)
movq %r15, -0x58(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x74(%rbp), %r15
leaq -0x48(%rbp), %rcx
leaq -0x70(%rbp), %r12
leaq -0x6c(%rbp), %r9
movq %r14, %rdi
movl %ebx, %esi
movss %xmm0, -0x30(%rbp)
movss %xmm1, -0x2c(%rbp)
movss -0x34(%rbp), %xmm2
movss -0x38(%rbp), %xmm3
movq %r15, %rdx
movq %r12, %r8
movq %r9, %r14
callq 0x4d75
movl (%r12), %ecx
movl (%r15), %ebx
movl %ecx, %r13d
subl %ebx, %r13d
movl %r13d, -0x90(%rbp)
movl (%r14), %edx
leaq -0x48(%rbp), %rax
movl (%rax), %r14d
movl %edx, %eax
subl %r14d, %eax
movl %eax, -0x8c(%rbp)
movq -0x60(%rbp), %rsi
testq %rsi, %rsi
je 0x6095
movl %r13d, (%rsi)
movq -0x68(%rbp), %r8
testq %r8, %r8
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdi
je 0x60a9
movl %eax, (%r8)
testq %rdi, %rdi
je 0x60b0
movl %ebx, (%rdi)
testq %rsi, %rsi
je 0x60b8
movl %r14d, (%rsi)
cmpl %ebx, %ecx
setne %cl
cmpl %r14d, %edx
setne %dl
testb %dl, %cl
je 0x6130
imull %r13d, %eax
movslq %eax, %rdi
callq 0x1170
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %r12
testq %rax, %rax
je 0x6134
movq %rax, %r15
leaq -0x90(%rbp), %rdi
movl %r13d, 0x8(%rdi)
movss 0x89ce(%rip), %xmm0     # 0xeac4
movq %r12, %rsi
movl -0x44(%rbp), %edx
movss -0x30(%rbp), %xmm1
movss -0x2c(%rbp), %xmm2
movss -0x34(%rbp), %xmm3
movss -0x38(%rbp), %xmm4
movl %ebx, %ecx
movl %r14d, %r8d
movl $0x1, %r9d
callq 0x4f77
jmp 0x6137
movq -0x40(%rbp), %rdi
callq 0x1030
xorl %r15d, %r15d
jmp 0x613f
movq -0x40(%rbp), %r12
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x1030
movq %r15, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq