// File: /workspace/github_c_makefile_star2_O1/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 0x6eb2
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 0x6e2c
leaq 0x6371(%rip), %rcx      # 0xd06c
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %r8
js 0x6e26
xorl %esi, %esi
xorl %ecx, %ecx
movzbl (%r12,%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, (%r12,%rsi)
incq %rsi
cmpq %rsi, %r14
jne 0x6d16
jmp 0x6e74
cmpl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %r8
js 0x6e26
xorl %esi, %esi
xorl %ecx, %ecx
movzbl (%r12,%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, (%r12,%rsi)
incq %rsi
cmpq %rsi, %r14
jne 0x6d5a
jmp 0x6e74
cmpl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %r8
js 0x6e26
xorl %esi, %esi
xorl %ecx, %ecx
movl $0xcccccccd, %r10d      # imm = 0xCCCCCCCD
movzbl (%r12,%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
movq %rcx, %rax
imulq %r10, %rax
shrq $0x22, %rax
movb %al, (%r12,%rsi)
incq %rsi
cmpq %rsi, %r14
jne 0x6da3
jmp 0x6e74
cmpl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %r8
movl $0xaaaaaaab, %r10d      # imm = 0xAAAAAAAB
js 0x6e26
xorl %esi, %esi
xorl %ecx, %ecx
movzbl (%r12,%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
movq %rcx, %rax
imulq %r10, %rax
shrq $0x21, %rax
movb %al, (%r12,%rsi)
incq %rsi
cmpq %rsi, %r14
jne 0x6df0
jmp 0x6e74
xorl %esi, %esi
xorl %ecx, %ecx
jmp 0x6e74
cmpl $0x0, -0x40(%rbp)
js 0x6e6c
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 0x6e3a
jmp 0x6e74
xorl %esi, %esi
xorl %ecx, %ecx
movq -0x38(%rbp), %r8
cmpl %r15d, %esi
jge 0x6ea0
movl %esi, %esi
cmpb $0x0, (%r12,%rsi)
jne 0x6ec1
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 0x6e7b
addq -0x50(%rbp), %r12
movl -0x48(%rbp), %eax
incl %eax
cmpl -0x44(%rbp), %eax
jne 0x6cd9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8674(%rip), %rdi      # 0xf53c
leaq 0x7d99(%rip), %rsi      # 0xec68
leaq 0x8675(%rip), %rcx      # 0xf54b
movl $0xf2c, %edx            # imm = 0xF2C
callq 0x10c0