// File: /workspace/github_c_makefile_star2_O2/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__h_prefilter
static void stbtt__h_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width)
{
   unsigned char buffer[STBTT_MAX_OVERSAMPLE];
   int safe_w = w - kernel_width;
   int j;
   STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze
   for (j=0; j < h; ++j) {
      int i;
      unsigned int total;
      STBTT_memset(buffer, 0, kernel_width);

      total = 0;

      // make kernel_width a constant in common cases so compiler can optimize out the divide
      switch (kernel_width) {
         case 2:
            for (i=0; i <= safe_w; ++i) {
               total += pixels[i] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];
               pixels[i] = (unsigned char) (total / 2);
            }
            break;
         case 3:
            for (i=0; i <= safe_w; ++i) {
               total += pixels[i] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];
               pixels[i] = (unsigned char) (total / 3);
            }
            break;
         case 4:
            for (i=0; i <= safe_w; ++i) {
               total += pixels[i] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];
               pixels[i] = (unsigned char) (total / 4);
            }
            break;
         case 5:
            for (i=0; i <= safe_w; ++i) {
               total += pixels[i] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];
               pixels[i] = (unsigned char) (total / 5);
            }
            break;
         default:
            for (i=0; i <= safe_w; ++i) {
               total += pixels[i] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i];
               pixels[i] = (unsigned char) (total / kernel_width);
            }
            break;
      }

      for (; i < w; ++i) {
         STBTT_assert(pixels[i] == 0);
         total -= buffer[i & STBTT__OVER_MASK];
         pixels[i] = (unsigned char) (total / kernel_width);
      }

      pixels += stride_in_bytes;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rdi, %r15
movslq %esi, %r12
leaq -0x30(%rbp), %rax
andq $0x0, (%rax)
subl %r8d, %esi
movl %r8d, %r9d
movslq %ecx, %rax
movq %rax, -0x48(%rbp)
movslq %esi, %r14
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movl %edx, -0x3c(%rbp)
leal -0x2(%rbx), %r13d
movq %r9, -0x38(%rbp)
cmpl -0x3c(%rbp), %eax
je 0x67f3
movl %eax, -0x40(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movq %r9, %rdx
callq 0x10d0
cmpl $0x3, %r13d
ja 0x6782
leaq 0x59e8(%rip), %rcx      # 0xc06c
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
pushq $0x3
popq %r10
jmpq *%rax
xorl %esi, %esi
xorl %ecx, %ecx
movq -0x38(%rbp), %r9
cmpq %r14, %rsi
jg 0x67bc
movzbl (%r15,%rsi), %eax
movl %esi, %edx
andl $0x7, %edx
movzbl -0x30(%rbp,%rdx), %edx
leal 0x2(%rsi), %edi
andl $0x7, %edi
movb %al, -0x30(%rbp,%rdi)
subl %edx, %eax
addl %eax, %ecx
movl %ecx, %eax
shrl %eax
movb %al, (%r15,%rsi)
incq %rsi
jmp 0x6699
xorl %esi, %esi
xorl %ecx, %ecx
movq -0x38(%rbp), %r9
cmpq %r14, %rsi
jg 0x67bc
movzbl (%r15,%rsi), %eax
movl %esi, %edx
andl $0x7, %edx
movzbl -0x30(%rbp,%rdx), %edi
xorq $0x4, %rdx
movb %al, -0x30(%rbp,%rdx)
subl %edi, %eax
addl %eax, %ecx
movl %ecx, %eax
shrl $0x2, %eax
movb %al, (%r15,%rsi)
incq %rsi
jmp 0x66d4
xorl %esi, %esi
xorl %ecx, %ecx
movq -0x38(%rbp), %r9
pushq $0x5
popq %r10
cmpq %r14, %rsi
jg 0x67bc
movzbl (%r15,%rsi), %eax
movl %esi, %edx
andl $0x7, %edx
movzbl -0x30(%rbp,%rdx), %edx
leal 0x5(%rsi), %edi
andl $0x7, %edi
movb %al, -0x30(%rbp,%rdi)
subl %edx, %eax
addl %eax, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r10d
movb %al, (%r15,%rsi)
incq %rsi
jmp 0x6712
xorl %esi, %esi
xorl %ecx, %ecx
movq -0x38(%rbp), %r9
cmpq %r14, %rsi
jg 0x67bc
movzbl (%r15,%rsi), %eax
movl %esi, %edx
andl $0x7, %edx
movzbl -0x30(%rbp,%rdx), %edx
leal 0x3(%rsi), %edi
andl $0x7, %edi
movb %al, -0x30(%rbp,%rdi)
subl %edx, %eax
addl %eax, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r10d
movb %al, (%r15,%rsi)
incq %rsi
jmp 0x6750
xorl %esi, %esi
xorl %ecx, %ecx
movq -0x38(%rbp), %r9
cmpq %r14, %rsi
jg 0x67bc
movzbl (%r15,%rsi), %eax
movl %esi, %edx
andl $0x7, %edx
movzbl -0x30(%rbp,%rdx), %edx
leal (%r9,%rsi), %edi
andl $0x7, %edi
movb %al, -0x30(%rbp,%rdi)
subl %edx, %eax
addl %eax, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebx
movb %al, (%r15,%rsi)
incq %rsi
jmp 0x678a
movl %esi, %esi
cmpq %r12, %rsi
jge 0x67e5
cmpb $0x0, (%r15,%rsi)
jne 0x6802
movl %esi, %eax
andl $0x7, %eax
movzbl -0x30(%rbp,%rax), %eax
subl %eax, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebx
movb %al, (%r15,%rsi)
incq %rsi
jmp 0x67be
addq -0x48(%rbp), %r15
movl -0x40(%rbp), %eax
incl %eax
jmp 0x6659
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7cff(%rip), %rdi      # 0xe508
leaq 0x7458(%rip), %rsi      # 0xdc68
leaq 0x7d00(%rip), %rcx      # 0xe517
movl $0xf2c, %edx            # imm = 0xF2C
callq 0x10c0