// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonnuklear/src/./nuklear/nuklear.h
// Function: stbtt_PackFontRangesRenderIntoRects
STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects)
{
   int i,j,k, missing_glyph = -1, return_value = 1;

   /*  save current values */
   int old_h_over = spc->h_oversample;
   int old_v_over = spc->v_oversample;

   k = 0;
   for (i=0; i < num_ranges; ++i) {
      float fh = ranges[i].font_size;
      float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh);
      float recip_h,recip_v,sub_x,sub_y;
      spc->h_oversample = ranges[i].h_oversample;
      spc->v_oversample = ranges[i].v_oversample;
      recip_h = 1.0f / spc->h_oversample;
      recip_v = 1.0f / spc->v_oversample;
      sub_x = stbtt__oversample_shift(spc->h_oversample);
      sub_y = stbtt__oversample_shift(spc->v_oversample);
      for (j=0; j < ranges[i].num_chars; ++j) {
         stbrp_rect *r = &rects[k];
         if (r->was_packed && r->w != 0 && r->h != 0) {
            stbtt_packedchar *bc = &ranges[i].chardata_for_range[j];
            int advance, lsb, x0,y0,x1,y1;
            int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j];
            int glyph = stbtt_FindGlyphIndex(info, codepoint);
            stbrp_coord pad = (stbrp_coord) spc->padding;

            /*  pad on left and top */
            r->x += pad;
            r->y += pad;
            r->w -= pad;
            r->h -= pad;
            stbtt_GetGlyphHMetrics(info, glyph, &advance, &lsb);
            stbtt_GetGlyphBitmapBox(info, glyph,
                                    scale * spc->h_oversample,
                                    scale * spc->v_oversample,
                                    &x0,&y0,&x1,&y1);
            stbtt_MakeGlyphBitmapSubpixel(info,
                                          spc->pixels + r->x + r->y*spc->stride_in_bytes,
                                          r->w - spc->h_oversample+1,
                                          r->h - spc->v_oversample+1,
                                          spc->stride_in_bytes,
                                          scale * spc->h_oversample,
                                          scale * spc->v_oversample,
                                          0,0,
                                          glyph);

            if (spc->h_oversample > 1)
               stbtt__h_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes,
                                  r->w, r->h, spc->stride_in_bytes,
                                  spc->h_oversample);

            if (spc->v_oversample > 1)
               stbtt__v_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes,
                                  r->w, r->h, spc->stride_in_bytes,
                                  spc->v_oversample);

            bc->x0       = (stbtt_int16)  r->x;
            bc->y0       = (stbtt_int16)  r->y;
            bc->x1       = (stbtt_int16) (r->x + r->w);
            bc->y1       = (stbtt_int16) (r->y + r->h);
            bc->xadvance =                scale * advance;
            bc->xoff     =       (float)  x0 * recip_h + sub_x;
            bc->yoff     =       (float)  y0 * recip_v + sub_y;
            bc->xoff2    =                (x0 + r->w) * recip_h + sub_x;
            bc->yoff2    =                (y0 + r->h) * recip_v + sub_y;

            if (glyph == 0)
               missing_glyph = j;
         } else if (spc->skip_missing) {
            return_value = 0;
         } else if (r->was_packed && r->w == 0 && r->h == 0 && missing_glyph >= 0) {
            ranges[i].chardata_for_range[j] = ranges[i].chardata_for_range[missing_glyph];
         } else {
            return_value = 0; /*  if any fail, report failure */
         }

         ++k;
      }
   }

   /*  restore original values */
   spc->h_oversample = old_h_over;
   spc->v_oversample = old_v_over;

   return return_value;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movl %ecx, 0x8c(%rsp)
movq %r8, 0x80(%rsp)
movl $0xffffffff, 0x70(%rsp) # imm = 0xFFFFFFFF
movl $0x1, 0x6c(%rsp)
movq 0xa0(%rsp), %rax
movl 0x24(%rax), %eax
movl %eax, 0x68(%rsp)
movq 0xa0(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, 0x64(%rsp)
movl $0x0, 0x74(%rsp)
movl $0x0, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
cmpl 0x8c(%rsp), %eax
jge 0x42962
movq 0x90(%rsp), %rax
movslq 0x7c(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
movss %xmm0, 0x60(%rsp)
movss 0x60(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x42344
movq 0x98(%rsp), %rdi
movss 0x60(%rsp), %xmm0
callq 0x131e0
movss %xmm0, 0x10(%rsp)
jmp 0x4236a
movq 0x98(%rsp), %rdi
movss 0x60(%rsp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
callq 0x147d0
movss %xmm0, 0x10(%rsp)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x5c(%rsp)
movq 0x90(%rsp), %rax
movslq 0x7c(%rsp), %rcx
leaq (%rcx,%rcx,4), %rcx
movzbl 0x20(%rax,%rcx,8), %ecx
movq 0xa0(%rsp), %rax
movl %ecx, 0x24(%rax)
movq 0x90(%rsp), %rax
movslq 0x7c(%rsp), %rcx
leaq (%rcx,%rcx,4), %rcx
movzbl 0x21(%rax,%rcx,8), %ecx
movq 0xa0(%rsp), %rax
movl %ecx, 0x28(%rax)
movq 0xa0(%rsp), %rax
movl 0x24(%rax), %eax
cvtsi2ss %rax, %xmm1
movss 0x6b118(%rip), %xmm0    # 0xad4e8
divss %xmm1, %xmm0
movss %xmm0, 0x58(%rsp)
movq 0xa0(%rsp), %rax
movl 0x28(%rax), %eax
cvtsi2ss %rax, %xmm1
movss 0x6b0f6(%rip), %xmm0    # 0xad4e8
divss %xmm1, %xmm0
movss %xmm0, 0x54(%rsp)
movq 0xa0(%rsp), %rax
movl 0x24(%rax), %edi
callq 0x42230
movss %xmm0, 0x50(%rsp)
movq 0xa0(%rsp), %rax
movl 0x28(%rax), %edi
callq 0x42230
movss %xmm0, 0x4c(%rsp)
movl $0x0, 0x78(%rsp)
movl 0x78(%rsp), %eax
movq 0x90(%rsp), %rcx
movslq 0x7c(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jge 0x42950
movq 0x80(%rsp), %rax
movslq 0x74(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
cmpl $0x0, 0x14(%rax)
je 0x4287c
movq 0x40(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x4287c
movq 0x40(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0x4287c
movq 0x90(%rsp), %rax
movslq 0x7c(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq 0x78(%rsp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x90(%rsp), %rax
movslq 0x7c(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x424fc
movq 0x90(%rsp), %rax
movslq 0x7c(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
addl 0x78(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x42520
movq 0x90(%rsp), %rax
movslq 0x7c(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq 0x78(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x98(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x13710
movl %eax, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movl 0x1c(%rax), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %edx
movq 0x40(%rsp), %rax
movl 0xc(%rax), %ecx
addl %edx, %ecx
movl %ecx, 0xc(%rax)
movl 0x14(%rsp), %edx
movq 0x40(%rsp), %rax
movl 0x10(%rax), %ecx
addl %edx, %ecx
movl %ecx, 0x10(%rax)
movl 0x14(%rsp), %edx
movq 0x40(%rsp), %rax
movl 0x4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x4(%rax)
movl 0x14(%rsp), %edx
movq 0x40(%rsp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq 0x98(%rsp), %rdi
movl 0x18(%rsp), %esi
leaq 0x34(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x14510
movq 0x98(%rsp), %rdi
movl 0x18(%rsp), %esi
movss 0x5c(%rsp), %xmm1
movq 0xa0(%rsp), %rax
movl 0x24(%rax), %ecx
movl 0x28(%rax), %eax
cvtsi2ss %rcx, %xmm2
movaps %xmm1, %xmm0
mulss %xmm2, %xmm0
cvtsi2ss %rax, %xmm2
mulss %xmm2, %xmm1
leaq 0x2c(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x24(%rsp), %r8
leaq 0x20(%rsp), %r9
callq 0x13750
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x40(%rsp), %rcx
movslq 0xc(%rcx), %rdx
addq %rdx, %rsi
movl 0x10(%rcx), %r9d
movl 0x18(%rax), %r8d
movl 0x24(%rax), %edx
imull %r8d, %r9d
movslq %r9d, %r9
addq %r9, %rsi
movl %edx, %r9d
movl %r9d, %r10d
movl 0x4(%rcx), %edx
movl 0x8(%rcx), %ecx
subl %r10d, %edx
incl %edx
movl 0x28(%rax), %eax
movl %eax, %r10d
subl %r10d, %ecx
incl %ecx
movss 0x5c(%rsp), %xmm1
cvtsi2ss %r9, %xmm2
movaps %xmm1, %xmm0
mulss %xmm2, %xmm0
cvtsi2ss %rax, %xmm2
mulss %xmm2, %xmm1
movl 0x18(%rsp), %r9d
xorps %xmm3, %xmm3
movaps %xmm3, %xmm2
callq 0x151b0
movq 0xa0(%rsp), %rax
cmpl $0x1, 0x24(%rax)
jbe 0x426e0
movq 0xa0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x40(%rsp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq 0x40(%rsp), %rax
movl 0x10(%rax), %eax
movq 0xa0(%rsp), %rcx
imull 0x18(%rcx), %eax
cltq
addq %rax, %rdi
movq 0x40(%rsp), %rax
movl 0x4(%rax), %esi
movq 0x40(%rsp), %rax
movl 0x8(%rax), %edx
movq 0xa0(%rsp), %rax
movl 0x18(%rax), %ecx
movq 0xa0(%rsp), %rax
movl 0x24(%rax), %r8d
callq 0x41a10
movq 0xa0(%rsp), %rax
cmpl $0x1, 0x28(%rax)
jbe 0x4274b
movq 0xa0(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x40(%rsp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq 0x40(%rsp), %rax
movl 0x10(%rax), %eax
movq 0xa0(%rsp), %rcx
imull 0x18(%rcx), %eax
cltq
addq %rax, %rdi
movq 0x40(%rsp), %rax
movl 0x4(%rax), %esi
movq 0x40(%rsp), %rax
movl 0x8(%rax), %edx
movq 0xa0(%rsp), %rax
movl 0x18(%rax), %ecx
movq 0xa0(%rsp), %rax
movl 0x28(%rax), %r8d
callq 0x41dd0
movq 0x40(%rsp), %rax
movl 0xc(%rax), %eax
movw %ax, %cx
movq 0x38(%rsp), %rax
movw %cx, (%rax)
movq 0x40(%rsp), %rax
movl 0x10(%rax), %eax
movw %ax, %cx
movq 0x38(%rsp), %rax
movw %cx, 0x2(%rax)
movq 0x40(%rsp), %rax
movl 0xc(%rax), %eax
movq 0x40(%rsp), %rcx
addl 0x4(%rcx), %eax
movw %ax, %cx
movq 0x38(%rsp), %rax
movw %cx, 0x4(%rax)
movq 0x40(%rsp), %rax
movl 0x10(%rax), %eax
movq 0x40(%rsp), %rcx
addl 0x8(%rcx), %eax
movw %ax, %cx
movq 0x38(%rsp), %rax
movw %cx, 0x6(%rax)
movss 0x5c(%rsp), %xmm0
cvtsi2ssl 0x34(%rsp), %xmm1
mulss %xmm1, %xmm0
movq 0x38(%rsp), %rax
movss %xmm0, 0x10(%rax)
cvtsi2ssl 0x2c(%rsp), %xmm0
movss 0x58(%rsp), %xmm2
movss 0x50(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x38(%rsp), %rax
movss %xmm0, 0x8(%rax)
cvtsi2ssl 0x28(%rsp), %xmm0
movss 0x54(%rsp), %xmm2
movss 0x4c(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x38(%rsp), %rax
movss %xmm0, 0xc(%rax)
movl 0x2c(%rsp), %eax
movq 0x40(%rsp), %rcx
addl 0x4(%rcx), %eax
cvtsi2ss %eax, %xmm0
movss 0x58(%rsp), %xmm2
movss 0x50(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x38(%rsp), %rax
movss %xmm0, 0x14(%rax)
movl 0x28(%rsp), %eax
movq 0x40(%rsp), %rcx
addl 0x8(%rcx), %eax
cvtsi2ss %eax, %xmm0
movss 0x54(%rsp), %xmm2
movss 0x4c(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x38(%rsp), %rax
movss %xmm0, 0x18(%rax)
cmpl $0x0, 0x18(%rsp)
jne 0x42877
movl 0x78(%rsp), %eax
movl %eax, 0x70(%rsp)
jmp 0x42935
movq 0xa0(%rsp), %rax
cmpl $0x0, 0x20(%rax)
je 0x42897
movl $0x0, 0x6c(%rsp)
jmp 0x42933
movq 0x40(%rsp), %rax
cmpl $0x0, 0x14(%rax)
je 0x42929
movq 0x40(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x42929
movq 0x40(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x42929
cmpl $0x0, 0x70(%rsp)
jl 0x42929
movq 0x90(%rsp), %rax
movslq 0x7c(%rsp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq 0x78(%rsp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movq 0x90(%rsp), %rcx
movslq 0x7c(%rsp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
movslq 0x70(%rsp), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movl 0x18(%rcx), %ecx
movl %ecx, 0x18(%rax)
jmp 0x42931
movl $0x0, 0x6c(%rsp)
jmp 0x42933
jmp 0x42935
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x42430
jmp 0x42952
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0x422ec
movl 0x68(%rsp), %ecx
movq 0xa0(%rsp), %rax
movl %ecx, 0x24(%rax)
movl 0x64(%rsp), %ecx
movq 0xa0(%rsp), %rax
movl %ecx, 0x28(%rax)
movl 0x6c(%rsp), %eax
addq $0xa8, %rsp
retq
nopl (%rax)