// File: /workspace/github_c_makefile_star2_O3/ggerganov[P]font-rasterizer/./stb_truetype.h
// Function: stbtt__v_prefilter
static void stbtt__v_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width)
{
   unsigned char buffer[STBTT_MAX_OVERSAMPLE];
   int safe_h = h - kernel_width;
   int j;
   STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze
   for (j=0; j < w; ++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_h; ++i) {
               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];
               pixels[i*stride_in_bytes] = (unsigned char) (total / 2);
            }
            break;
         case 3:
            for (i=0; i <= safe_h; ++i) {
               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];
               pixels[i*stride_in_bytes] = (unsigned char) (total / 3);
            }
            break;
         case 4:
            for (i=0; i <= safe_h; ++i) {
               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];
               pixels[i*stride_in_bytes] = (unsigned char) (total / 4);
            }
            break;
         case 5:
            for (i=0; i <= safe_h; ++i) {
               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];
               pixels[i*stride_in_bytes] = (unsigned char) (total / 5);
            }
            break;
         default:
            for (i=0; i <= safe_h; ++i) {
               total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK];
               buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes];
               pixels[i*stride_in_bytes] = (unsigned char) (total / kernel_width);
            }
            break;
      }

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

      pixels += 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, -0x44(%rbp)
movq $0x0, -0x30(%rbp)
movl %esi, -0x48(%rbp)
testl %esi, %esi
jle 0x6f15
movl %r8d, %ebx
movl -0x44(%rbp), %eax
subl %r8d, %eax
movl %r8d, %r9d
movslq %ecx, %r15
movq %rax, -0x40(%rbp)
leal 0x1(%rax), %r14d
xorl %eax, %eax
leal -0x2(%rbx), %r13d
movq %rdi, -0x38(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movq %r9, %r12
movq %r9, %rdx
callq 0x10d0
cmpl $0x3, %r13d
ja 0x6e6d
leaq 0x6372(%rip), %rcx      # 0xd07c
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x40(%rbp)
movq %r12, %r9
movq -0x38(%rbp), %rdi
js 0x6e67
xorl %eax, %eax
movq %rdi, %rdx
xorl %ecx, %ecx
movzbl (%rdx), %esi
movl %eax, %r8d
andl $0x7, %r8d
movzbl -0x30(%rbp,%r8), %r10d
leal 0x2(%rax), %r8d
andl $0x7, %r8d
movb %sil, -0x30(%rbp,%r8)
subl %r10d, %esi
addl %esi, %ecx
movl %ecx, %esi
shrl %esi
movb %sil, (%rdx)
incq %rax
addq %r15, %rdx
cmpq %rax, %r14
jne 0x6d2b
jmp 0x6eb8
cmpl $0x0, -0x40(%rbp)
movq %r12, %r9
movq -0x38(%rbp), %rdi
js 0x6e67
xorl %eax, %eax
movq %rdi, %rdx
xorl %ecx, %ecx
movzbl (%rdx), %esi
movl %eax, %r10d
andl $0x7, %r10d
movzbl -0x30(%rbp,%r10), %r8d
xorq $0x4, %r10
movb %sil, -0x30(%rbp,%r10)
subl %r8d, %esi
addl %esi, %ecx
movl %ecx, %esi
shrl $0x2, %esi
movb %sil, (%rdx)
incq %rax
addq %r15, %rdx
cmpq %rax, %r14
jne 0x6d7c
jmp 0x6eb8
cmpl $0x0, -0x40(%rbp)
movq %r12, %r9
movq -0x38(%rbp), %rdi
js 0x6e67
xorl %eax, %eax
movq %rdi, %rdx
xorl %ecx, %ecx
movl $0xcccccccd, %r12d      # imm = 0xCCCCCCCD
movzbl (%rdx), %esi
movl %eax, %r8d
andl $0x7, %r8d
movzbl -0x30(%rbp,%r8), %r10d
leal 0x5(%rax), %r8d
andl $0x7, %r8d
movb %sil, -0x30(%rbp,%r8)
subl %r10d, %esi
addl %esi, %ecx
movq %rcx, %rsi
imulq %r12, %rsi
shrq $0x22, %rsi
movb %sil, (%rdx)
incq %rax
addq %r15, %rdx
cmpq %rax, %r14
jne 0x6dd0
jmp 0x6eb8
cmpl $0x0, -0x40(%rbp)
movq %r12, %r9
movq -0x38(%rbp), %rdi
js 0x6e67
xorl %eax, %eax
movq %rdi, %rdx
xorl %ecx, %ecx
movl $0xaaaaaaab, %r12d      # imm = 0xAAAAAAAB
movzbl (%rdx), %esi
movl %eax, %r8d
andl $0x7, %r8d
movzbl -0x30(%rbp,%r8), %r10d
leal 0x3(%rax), %r8d
andl $0x7, %r8d
movb %sil, -0x30(%rbp,%r8)
subl %r10d, %esi
addl %esi, %ecx
movq %rcx, %rsi
imulq %r12, %rsi
shrq $0x21, %rsi
movb %sil, (%rdx)
incq %rax
addq %r15, %rdx
cmpq %rax, %r14
jne 0x6e2a
jmp 0x6eb8
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x6ebb
cmpl $0x0, -0x40(%rbp)
js 0x6f08
xorl %esi, %esi
movq -0x38(%rbp), %rdi
movq %rdi, %r10
xorl %ecx, %ecx
movq %r12, %r9
movzbl (%r10), %eax
movl %esi, %edx
andl $0x7, %edx
movzbl -0x30(%rbp,%rdx), %edx
leal (%r9,%rsi), %r8d
andl $0x7, %r8d
movb %al, -0x30(%rbp,%r8)
subl %edx, %eax
addl %eax, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebx
movb %al, (%r10)
incq %rsi
addq %r15, %r10
cmpq %rsi, %r14
jne 0x6e85
movl %r14d, %eax
movl -0x44(%rbp), %esi
subl %eax, %esi
jle 0x6ef5
movslq %eax, %r10
movq %r15, %r8
imulq %r10, %r8
addq %rdi, %r8
cmpb $0x0, (%r8)
jne 0x6f24
movl %r10d, %eax
andl $0x7, %eax
movzbl -0x30(%rbp,%rax), %eax
subl %eax, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebx
movb %al, (%r8)
incq %r10
addq %r15, %r8
decl %esi
jne 0x6ecf
incq %rdi
movl -0x4c(%rbp), %eax
incl %eax
cmpl -0x48(%rbp), %eax
jne 0x6ce1
jmp 0x6f15
xorl %eax, %eax
xorl %ecx, %ecx
movq %r12, %r9
movq -0x38(%rbp), %rdi
jmp 0x6ebb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8632(%rip), %rdi      # 0xf55d
leaq 0x7d36(%rip), %rsi      # 0xec68
leaq 0x8643(%rip), %rcx      # 0xf57c
movl $0xf6a, %edx            # imm = 0xF6A
callq 0x10c0