// File: Ciaxur[P]yagb-emu/include/imgui/imstb_truetype.h
// Function: stbtt__v_prefilter(unsigned char*, int, int, int, unsigned int)
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 0xd2f0
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x122887
movl -0x18(%rbp), %eax
movl %eax, %edx
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xd2f0
movl $0x0, -0x30(%rbp)
movl -0x18(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x3, %eax
ja 0x12276d
movq -0x38(%rbp), %rax
leaq 0x615b8(%rip), %rcx     # 0x183b14
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x1225df
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 0x12256c
jmp 0x1227ec
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x122665
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 0x1225eb
jmp 0x1227ec
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x1226e5
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 0x122671
jmp 0x1227ec
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x12276b
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 0x1226f1
jmp 0x1227ec
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x1227ea
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 0x122774
jmp 0x1227ec
jmp 0x1227ee
movl -0x2c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x12286d
jmp 0x1227f8
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
imull -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x122811
jmp 0x122830
leaq 0x68f9f(%rip), %rdi     # 0x18b7b7
leaq 0x687cb(%rip), %rsi     # 0x18afea
movl $0xf7f, %edx            # imm = 0xF7F
leaq 0x68fab(%rip), %rcx     # 0x18b7d6
callq 0xd180
jmp 0x122832
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 0x1227ee
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x122519
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)