// File: /workspace/github_c_makefile_star2_O3/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
movq $0x0, -0x30(%rbp)
movl %edx, -0x44(%rbp)
testl %edx, %edx
jle 0x6c6f
movl %r8d, %ebx
movl %esi, %r15d
movq %rdi, %r12
movl %esi, %eax
subl %r8d, %eax
movl %r8d, %r8d
movslq %ecx, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x40(%rbp)
leal 0x1(%rax), %r14d
xorl %eax, %eax
leal -0x2(%rbx), %r13d
movq %r8, -0x38(%rbp)
movl %eax, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movq %r8, %rdx
callq 0x10d0
cmpl $0x3, %r13d
ja 0x6be4
leaq 0x65b9(%rip), %rcx      # 0xd06c
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %r8
js 0x6bde
xorl %eax, %eax
xorl %ecx, %ecx
movzbl (%r12,%rax), %edx
movl %eax, %esi
andl $0x7, %esi
movzbl -0x30(%rbp,%rsi), %esi
leal 0x2(%rax), %edi
andl $0x7, %edi
movb %dl, -0x30(%rbp,%rdi)
subl %esi, %edx
addl %edx, %ecx
movl %ecx, %edx
shrl %edx
movb %dl, (%r12,%rax)
incq %rax
cmpq %rax, %r14
jne 0x6ace
jmp 0x6c22
cmpl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %r8
js 0x6bde
xorl %eax, %eax
xorl %ecx, %ecx
movzbl (%r12,%rax), %edx
movl %eax, %esi
andl $0x7, %esi
movzbl -0x30(%rbp,%rsi), %edi
xorq $0x4, %rsi
movb %dl, -0x30(%rbp,%rsi)
subl %edi, %edx
addl %edx, %ecx
movl %ecx, %edx
shrl $0x2, %edx
movb %dl, (%r12,%rax)
incq %rax
cmpq %rax, %r14
jne 0x6b12
jmp 0x6c22
cmpl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %r8
js 0x6bde
xorl %eax, %eax
xorl %ecx, %ecx
movl $0xcccccccd, %r10d      # imm = 0xCCCCCCCD
movzbl (%r12,%rax), %edx
movl %eax, %esi
andl $0x7, %esi
movzbl -0x30(%rbp,%rsi), %esi
leal 0x5(%rax), %edi
andl $0x7, %edi
movb %dl, -0x30(%rbp,%rdi)
subl %esi, %edx
addl %edx, %ecx
movq %rcx, %rdx
imulq %r10, %rdx
shrq $0x22, %rdx
movb %dl, (%r12,%rax)
incq %rax
cmpq %rax, %r14
jne 0x6b5b
jmp 0x6c22
cmpl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %r8
movl $0xaaaaaaab, %r10d      # imm = 0xAAAAAAAB
js 0x6bde
xorl %eax, %eax
xorl %ecx, %ecx
movzbl (%r12,%rax), %edx
movl %eax, %esi
andl $0x7, %esi
movzbl -0x30(%rbp,%rsi), %esi
leal 0x3(%rax), %edi
andl $0x7, %edi
movb %dl, -0x30(%rbp,%rdi)
subl %esi, %edx
addl %edx, %ecx
movq %rcx, %rdx
imulq %r10, %rdx
shrq $0x21, %rdx
movb %dl, (%r12,%rax)
incq %rax
cmpq %rax, %r14
jne 0x6ba8
jmp 0x6c22
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x6c25
cmpl $0x0, -0x40(%rbp)
js 0x6c65
xorl %esi, %esi
xorl %ecx, %ecx
movq -0x38(%rbp), %r8
movzbl (%r12,%rsi), %eax
movl %esi, %edx
andl $0x7, %edx
movzbl -0x30(%rbp,%rdx), %edx
leal (%r8,%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, (%r12,%rsi)
incq %rsi
cmpq %rsi, %r14
jne 0x6bf2
movl %r14d, %eax
cmpl %r15d, %eax
jge 0x6c51
movl %eax, %esi
cmpb $0x0, (%r12,%rsi)
jne 0x6c7e
movl %esi, %eax
andl $0x7, %eax
movzbl -0x30(%rbp,%rax), %eax
subl %eax, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebx
movb %al, (%r12,%rsi)
incq %rsi
cmpl %r15d, %esi
jl 0x6c2c
addq -0x50(%rbp), %r12
movl -0x48(%rbp), %eax
incl %eax
cmpl -0x44(%rbp), %eax
jne 0x6a91
jmp 0x6c6f
xorl %eax, %eax
xorl %ecx, %ecx
movq -0x38(%rbp), %r8
jmp 0x6c25
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8883(%rip), %rdi      # 0xf508
leaq 0x7fdc(%rip), %rsi      # 0xec68
leaq 0x8884(%rip), %rcx      # 0xf517
movl $0xf2c, %edx            # imm = 0xF2C
callq 0x10c0