// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/./stb/stb_image_write.h
// Function: stbiw__encode_png_line
static void stbiw__encode_png_line(unsigned char *pixels, int stride_bytes, int width, int height, int y, int n, int filter_type, signed char *line_buffer)
{
   static int mapping[] = { 0,1,2,3,4 };
   static int firstmap[] = { 0,1,0,5,6 };
   int *mymap = (y != 0) ? mapping : firstmap;
   int i;
   int type = mymap[filter_type];
   unsigned char *z = pixels + stride_bytes * (stbi__flip_vertically_on_write ? height-1-y : y);
   int signed_stride = stbi__flip_vertically_on_write ? -stride_bytes : stride_bytes;
   for (i = 0; i < n; ++i) {
      switch (type) {
         case 0: line_buffer[i] = z[i]; break;
         case 1: line_buffer[i] = z[i]; break;
         case 2: line_buffer[i] = z[i] - z[i-signed_stride]; break;
         case 3: line_buffer[i] = z[i] - (z[i-signed_stride]>>1); break;
         case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-signed_stride],0)); break;
         case 5: line_buffer[i] = z[i]; break;
         case 6: line_buffer[i] = z[i]; break;
      }
   }
   for (i=n; i < width*n; ++i) {
      switch (type) {
         case 0: line_buffer[i] = z[i]; break;
         case 1: line_buffer[i] = z[i] - z[i-n]; break;
         case 2: line_buffer[i] = z[i] - z[i-signed_stride]; break;
         case 3: line_buffer[i] = z[i] - ((z[i-n] + z[i-signed_stride])>>1); break;
         case 4: line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-signed_stride], z[i-signed_stride-n]); break;
         case 5: line_buffer[i] = z[i] - (z[i-n]>>1); break;
         case 6: line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movl -0x18(%rbp), %edx
leaq 0x1fe42(%rip), %rax     # 0x28300
leaq 0x1fe1b(%rip), %rcx     # 0x282e0
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq 0x10(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, 0x20271(%rip)     # 0x28764
je 0x8503
movl -0x14(%rbp), %eax
subl $0x1, %eax
subl -0x18(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x8509
movl -0x18(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movl -0x40(%rbp), %ecx
movl -0x4c(%rbp), %edx
imull %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, 0x2023d(%rip)     # 0x28764
je 0x8533
xorl %eax, %eax
subl -0xc(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0x8539
movl -0xc(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x868e
movl -0x30(%rbp), %eax
movq %rax, -0x58(%rbp)
subq $0x6, %rax
ja 0x867e
movq -0x58(%rbp), %rax
leaq 0x18b9e(%rip), %rcx     # 0x2110c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x867e
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x867e
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl -0x3c(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x867e
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl -0x3c(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
sarl %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x867e
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x5c(%rbp)
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
xorl %edx, %edx
movl %edx, %edi
callq 0x1fbb0
movb %al, %cl
movl -0x5c(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x867e
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x867e
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x8680
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8546
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0x10(%rbp), %ecx
imull -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x8871
movl -0x30(%rbp), %eax
movq %rax, -0x68(%rbp)
subq $0x6, %rax
ja 0x8861
movq -0x68(%rbp), %rax
leaq 0x18a2e(%rip), %rcx     # 0x210f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb (%rax,%rcx), %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x8861
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl -0x1c(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x8861
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl -0x3c(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x8861
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl -0x1c(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
movq -0x38(%rbp), %rdx
movl -0x2c(%rbp), %esi
subl -0x3c(%rbp), %esi
movslq %esi, %rsi
movzbl (%rdx,%rsi), %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x8861
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x3c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x3c(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
callq 0x1fbb0
movb %al, %cl
movl -0x6c(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x8861
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
subl -0x1c(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
sarl %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x8861
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x1fbb0
movb %al, %cl
movl -0x70(%rbp), %eax
movzbl %cl, %ecx
subl %ecx, %eax
movb %al, %dl
movq 0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x8863
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x8694
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)