// File: /workspace/github_c_makefile_star2_O1/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, -0x30(%rbp)
movss %xmm0, -0x2c(%rbp)
movq %rdi, %r14
leaq -0x40(%rbp), %rdx
callq 0x38d3
xorps %xmm0, %xmm0
movss -0x2c(%rbp), %xmm1
ucomiss %xmm0, %xmm1
setp %cl
setne %sil
jne 0x6241
movss -0x30(%rbp), %xmm1
jp 0x6246
movss %xmm1, -0x2c(%rbp)
jmp 0x6246
movss -0x30(%rbp), %xmm1
orb %cl, %sil
ucomiss %xmm0, %xmm1
setp %dl
setne %cl
jne 0x625b
jp 0x625b
movss -0x2c(%rbp), %xmm1
orb %dl, %cl
orb %cl, %sil
je 0x6383
movq %r13, -0x50(%rbp)
movq %r12, -0x58(%rbp)
movq %r15, -0x60(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %r15
leaq -0x8c(%rbp), %rcx
leaq -0x88(%rbp), %r12
leaq -0x84(%rbp), %r13
movq %r14, %rdi
movl %ebx, %esi
movss -0x2c(%rbp), %xmm0
movss %xmm1, -0x30(%rbp)
movss -0x34(%rbp), %xmm2
movss -0x38(%rbp), %xmm3
movq %r15, %rdx
movq %rcx, %r14
movq %r12, %r8
movq %r13, %r9
callq 0x4f19
movl (%r12), %ecx
movl (%r15), %ebx
movl %ecx, %r15d
subl %ebx, %r15d
movl %r15d, -0x80(%rbp)
movl (%r13), %edx
movl (%r14), %r14d
movl %edx, %eax
subl %r14d, %eax
movl %eax, -0x7c(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x68(%rbp), %rsi
testq %rsi, %rsi
je 0x62ef
movl %r15d, (%rsi)
movq -0x50(%rbp), %r8
testq %r8, %r8
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdi
je 0x6303
movl %eax, (%r8)
testq %rdi, %rdi
je 0x630a
movl %ebx, (%rdi)
testq %rsi, %rsi
je 0x6312
movl %r14d, (%rsi)
cmpl %ebx, %ecx
setne %cl
cmpl %r14d, %edx
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x6374
imull %r15d, %eax
movslq %eax, %rdi
callq 0x1170
movq %rax, -0x70(%rbp)
testq %rax, %rax
je 0x6374
leaq -0x80(%rbp), %rdi
movl %r15d, 0x8(%rdi)
movq -0x40(%rbp), %rsi
movss 0x877b(%rip), %xmm0     # 0xeac8
movl -0x44(%rbp), %edx
movss -0x2c(%rbp), %xmm1
movss -0x30(%rbp), %xmm2
movss -0x34(%rbp), %xmm3
movss -0x38(%rbp), %xmm4
movl %ebx, %ecx
movl %r14d, %r8d
movl $0x1, %r9d
callq 0x511b
movq -0x40(%rbp), %rdi
callq 0x1030
movq -0x70(%rbp), %rax
jmp 0x638e
movq -0x40(%rbp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq