// File: /workspace/github_c_makefile_star2_O0/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt_PackFontRangesGatherRects
STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects)
{
   int i,j,k;

   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);
      ranges[i].h_oversample = (unsigned char) spc->h_oversample;
      ranges[i].v_oversample = (unsigned char) spc->v_oversample;
      for (j=0; j < ranges[i].num_chars; ++j) {
         int 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);
         if (glyph == 0 && spc->skip_missing) {
            rects[k].w = rects[k].h = 0;
         } else {
            stbtt_GetGlyphBitmapBoxSubpixel(info,glyph,
                                            scale * spc->h_oversample,
                                            scale * spc->v_oversample,
                                            0,0,
                                            &x0,&y0,&x1,&y1);
            rects[k].w = (stbrp_coord) (x1-x0 + spc->padding + spc->h_oversample-1);
            rects[k].h = (stbrp_coord) (y1-y0 + spc->padding + spc->v_oversample-1);
         }
         ++k;
      }
   }

   return k;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x86f3
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movss (%rax), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x850f
movq -0x10(%rbp), %rdi
movss -0x38(%rbp), %xmm0
callq 0x6c40
movss %xmm0, -0x58(%rbp)
jmp 0x852f
movq -0x10(%rbp), %rdi
movss -0x38(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
callq 0x6cb0
movss %xmm0, -0x58(%rbp)
movss -0x58(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movl 0x24(%rax), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x20(%rax)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movb %cl, 0x21(%rax)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x18(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jge 0x86e3
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x85c1
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x85de
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
movl -0x50(%rbp), %esi
callq 0x4450
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jne 0x8634
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x8634
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0xc(%rax)
jmp 0x86cc
movq -0x10(%rbp), %rdi
movl -0x54(%rbp), %esi
movss -0x3c(%rbp), %xmm1
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
movl 0x28(%rax), %eax
cvtsi2ss %rcx, %xmm2
movaps %xmm1, %xmm0
mulss %xmm2, %xmm0
cvtsi2ss %rax, %xmm2
mulss %xmm2, %xmm1
xorps %xmm3, %xmm3
leaq -0x40(%rbp), %rdx
leaq -0x44(%rbp), %rcx
leaq -0x48(%rbp), %r8
leaq -0x4c(%rbp), %r9
movaps %xmm3, %xmm2
callq 0x6d20
movl -0x48(%rbp), %ecx
subl -0x40(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x24(%rax), %ecx
subl $0x1, %ecx
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl -0x4c(%rbp), %ecx
subl -0x44(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x28(%rax), %ecx
subl $0x1, %ecx
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8576
jmp 0x86e5
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x84c9
movl -0x34(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)