// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl -0x10(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x10b0
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x8df3
movl -0x18(%rbp), %eax
movl %eax, %edx
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x10b0
movl $0x0, -0x30(%rbp)
movl -0x18(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x3, %eax
ja 0x8cdd
movq -0x38(%rbp), %rax
leaq 0xc594(%rip), %rcx      # 0x15060
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x8b4f
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x2c(%rbp), %ecx
andl $0x7, %ecx
movslq %ecx, %rcx
movzbl -0x20(%rbp,%rcx), %ecx
subl %ecx, %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movl -0x2c(%rbp), %eax
addl -0x18(%rbp), %eax
andl $0x7, %eax
movl %eax, %eax
movb %cl, -0x20(%rbp,%rax)
movl -0x30(%rbp), %eax
shrl %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8adc
jmp 0x8d5c
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x8bd5
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x2c(%rbp), %ecx
andl $0x7, %ecx
movslq %ecx, %rcx
movzbl -0x20(%rbp,%rcx), %ecx
subl %ecx, %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movl -0x2c(%rbp), %eax
addl -0x18(%rbp), %eax
andl $0x7, %eax
movl %eax, %eax
movb %cl, -0x20(%rbp,%rax)
movl -0x30(%rbp), %eax
movl $0x3, %ecx
xorl %edx, %edx
divl %ecx
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8b5b
jmp 0x8d5c
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x8c55
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x2c(%rbp), %ecx
andl $0x7, %ecx
movslq %ecx, %rcx
movzbl -0x20(%rbp,%rcx), %ecx
subl %ecx, %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movl -0x2c(%rbp), %eax
addl -0x18(%rbp), %eax
andl $0x7, %eax
movl %eax, %eax
movb %cl, -0x20(%rbp,%rax)
movl -0x30(%rbp), %eax
shrl $0x2, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8be1
jmp 0x8d5c
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x8cdb
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x2c(%rbp), %ecx
andl $0x7, %ecx
movslq %ecx, %rcx
movzbl -0x20(%rbp,%rcx), %ecx
subl %ecx, %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movl -0x2c(%rbp), %eax
addl -0x18(%rbp), %eax
andl $0x7, %eax
movl %eax, %eax
movb %cl, -0x20(%rbp,%rax)
movl -0x30(%rbp), %eax
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8c61
jmp 0x8d5c
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x8d5a
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x2c(%rbp), %ecx
andl $0x7, %ecx
movslq %ecx, %rcx
movzbl -0x20(%rbp,%rcx), %ecx
subl %ecx, %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movl -0x2c(%rbp), %eax
addl -0x18(%rbp), %eax
andl $0x7, %eax
movl %eax, %eax
movb %cl, -0x20(%rbp,%rax)
movl -0x30(%rbp), %eax
xorl %edx, %edx
divl -0x18(%rbp)
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8ce4
jmp 0x8d5c
jmp 0x8d5e
movl -0x2c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x8dd9
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x8d7f
jmp 0x8d9e
leaq 0xe5cd(%rip), %rdi      # 0x17353
leaq 0xda2a(%rip), %rsi      # 0x167b7
movl $0xf6a, %edx            # imm = 0xF6A
leaq 0xe5d9(%rip), %rcx      # 0x17372
callq 0x10a0
movl -0x2c(%rbp), %eax
andl $0x7, %eax
cltq
movzbl -0x20(%rbp,%rax), %ecx
movl -0x30(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
xorl %edx, %edx
divl -0x18(%rbp)
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8d5e
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8a89
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)