// File: /workspace/github_c_makefile_star2_O2/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, %r13
movq %rdx, -0x68(%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 0x37da
movss -0x30(%rbp), %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
setp %cl
setne %sil
jne 0x5d01
movss -0x2c(%rbp), %xmm1
jp 0x5d06
movaps %xmm1, %xmm0
jmp 0x5d06
movss -0x2c(%rbp), %xmm1
orb %cl, %sil
ucomiss %xmm2, %xmm1
setp %dl
setne %cl
jne 0x5d19
jp 0x5d19
movaps %xmm0, %xmm1
orb %dl, %cl
orb %cl, %sil
je 0x5e2a
movq %r13, -0x50(%rbp)
movq %r12, -0x58(%rbp)
movq %r15, -0x60(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x78(%rbp), %r15
leaq -0x74(%rbp), %rcx
leaq -0x70(%rbp), %r12
leaq -0x6c(%rbp), %r13
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 %rcx, %r14
movq %r12, %r8
movq %r13, %r9
callq 0x4bd7
movl (%r12), %ecx
movl (%r15), %ebx
movl %ecx, %r12d
subl %ebx, %r12d
movl %r12d, -0x90(%rbp)
movl (%r13), %edx
movl (%r14), %r14d
movl %edx, %eax
subl %r14d, %eax
movl %eax, -0x8c(%rbp)
movq -0x68(%rbp), %rsi
testq %rsi, %rsi
je 0x5d9f
movl %r12d, (%rsi)
movq -0x50(%rbp), %r8
testq %r8, %r8
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdi
je 0x5db3
movl %eax, (%r8)
testq %rdi, %rdi
je 0x5dba
movl %ebx, (%rdi)
testq %rsi, %rsi
je 0x5dc2
movl %r14d, (%rsi)
cmpl %ebx, %ecx
setne %cl
cmpl %r14d, %edx
setne %dl
testb %dl, %cl
je 0x5e38
imull %r12d, %eax
movslq %eax, %rdi
callq 0x1170
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %r13
testq %rax, %rax
je 0x5e3c
movq %rax, %r15
leaq -0x90(%rbp), %rdi
movl %r12d, 0x8(%rdi)
movss 0x7cc8(%rip), %xmm0     # 0xdac8
pushq $0x1
popq %r9
movq %r13, %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
callq 0x4d74
jmp 0x5e3f
movq -0x40(%rbp), %rdi
callq 0x1030
xorl %r15d, %r15d
jmp 0x5e47
movq -0x40(%rbp), %r13
xorl %r15d, %r15d
movq %r13, %rdi
callq 0x1030
movq %r15, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq