// File: /workspace/github_c_makefile_star2_O2/vlenhart[P]q3bsp/./stb_image_write.h
// Function: outfile(char const*, int, int, int, int, int, int, void*, int, int, char const*, ...)
static int outfile(char const *filename, int rgb_dir, int vdir, int x, int y, int comp, int expand_mono, void *data, int alpha, int pad, const char *fmt, ...)
{
   FILE *f;
   if (y < 0 || x < 0) return 0;
   f = fopen(filename, "wb");
   if (f) {
      va_list v;
      va_start(v, fmt);
      writefv(f, fmt, v);
      va_end(v);
      write_pixels(f,rgb_dir,vdir,x,y,comp,data,alpha,pad,expand_mono);
      fclose(f);
   }
   return f != NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
testb %al, %al
je 0x3922
movaps %xmm0, -0x110(%rbp)
movaps %xmm1, -0x100(%rbp)
movaps %xmm2, -0xf0(%rbp)
movaps %xmm3, -0xe0(%rbp)
movaps %xmm4, -0xd0(%rbp)
movaps %xmm5, -0xc0(%rbp)
movaps %xmm6, -0xb0(%rbp)
movaps %xmm7, -0xa0(%rbp)
movl %r8d, %eax
orl %ecx, %eax
js 0x3bd8
movl %r9d, %r14d
movl %r8d, %ebx
movl %ecx, %r13d
leaq 0xc987(%rip), %rsi      # 0x102c4
callq 0x22a0
movq %rax, %r12
testq %rax, %rax
je 0x3bce
movl %r14d, -0x58(%rbp)
movq 0x30(%rbp), %r15
leaq -0x140(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movabsq $0x3000000030, %rax     # imm = 0x3000000030
movq %rax, -0x50(%rbp)
pushq $0x1
popq %r14
movzbl (%r15), %eax
testl %eax, %eax
je 0x3a49
incq %r15
cmpl $0x20, %eax
je 0x397b
cmpl $0x34, %eax
je 0x39d2
cmpl $0x32, %eax
je 0x39ba
cmpl $0x31, %eax
jne 0x3bec
movl -0x50(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x3a05
movq %rcx, %rax
addq -0x40(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x50(%rbp)
jmp 0x3a11
movl -0x50(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x39ea
movq %rcx, %rax
addq -0x40(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x50(%rbp)
jmp 0x39f6
movl -0x50(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x3a21
movq %rcx, %rax
addq -0x40(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x50(%rbp)
jmp 0x3a2d
movq -0x48(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x48(%rbp)
movzwl (%rax), %eax
movw %ax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rdi
pushq $0x2
jmp 0x3a38
movq -0x48(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x48(%rbp)
movzbl (%rax), %edi
movq %r12, %rsi
callq 0x22e0
jmp 0x397b
movq -0x48(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x48(%rbp)
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rdi
pushq $0x4
popq %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2440
jmp 0x397b
movq %r12, -0x38(%rbp)
andl $0x0, -0x2c(%rbp)
testl %ebx, %ebx
jle 0x3bc2
movslq -0x58(%rbp), %r14
movl 0x28(%rbp), %eax
movq %rax, -0x70(%rbp)
xorl %eax, %eax
testl %r13d, %r13d
cmovgl %r13d, %eax
movq %rax, -0x58(%rbp)
movl %ebx, %eax
movslq %r13d, %rcx
leaq -0x1(%rax), %rbx
movq %r14, %rdx
movq %rcx, -0x68(%rbp)
imulq %rcx, %rdx
imulq %rdx, %rbx
addq 0x18(%rbp), %rbx
negq %rdx
movq %rdx, -0x60(%rbp)
leal -0x1(%r14), %r12d
subq $0x1, %rax
jb 0x3bc2
movq %rax, -0x80(%rbp)
imulq -0x68(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %rbx, -0x78(%rbp)
xorl %r15d, %r15d
cmpq -0x58(%rbp), %r15
je 0x3b9d
movq -0x88(%rbp), %rax
leaq (%r15,%rax), %r13
imulq %r14, %r13
addq 0x18(%rbp), %r13
cmpl $0x3, %r12d
ja 0x3b35
leaq 0xc595(%rip), %rcx      # 0x10078
movslq (%rcx,%r12,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl (%r13), %edi
jmp 0x3b2c
cmpl $0x0, 0x20(%rbp)
je 0x3b55
movzbl 0x2(%r13), %esi
movzbl 0x1(%r13), %edx
movzbl (%r13), %ecx
movq -0x38(%rbp), %rdi
jmp 0x3b25
movsbl (%r13), %edi
cmpl $0x0, 0x10(%rbp)
je 0x3b2c
movzbl %dil, %ecx
movq -0x38(%rbp), %rdi
movl %ecx, %esi
movl %ecx, %edx
callq 0x5a9e
jmp 0x3b35
movq -0x38(%rbp), %rsi
callq 0x22e0
cmpl $0x0, 0x20(%rbp)
jle 0x3b4a
movsbl -0x1(%r13,%r14), %edi
movq -0x38(%rbp), %rsi
callq 0x22e0
incq %r15
addq %r14, %rbx
jmp 0x3ab9
movzbl 0x3(%r13), %ecx
xorl %esi, %esi
cmpq $0x3, %rsi
je 0x3b8c
leaq 0xc66b(%rip), %rax      # 0x101d4
movzbl (%rsi,%rax), %edi
movzbl (%rbx,%rsi), %eax
subl %edi, %eax
imull %ecx, %eax
cltd
movl $0xff, %r8d
idivl %r8d
addb %dil, %al
movb %al, -0x2f(%rbp,%rsi)
incq %rsi
jmp 0x3b5c
movzbl -0x2d(%rbp), %esi
movzbl -0x2e(%rbp), %edx
movzbl -0x2f(%rbp), %ecx
jmp 0x3b08
leaq -0x2c(%rbp), %rdi
movq -0x70(%rbp), %rsi
pushq $0x1
popq %rdx
movq -0x38(%rbp), %rcx
callq 0x2440
movq -0x78(%rbp), %rbx
addq -0x60(%rbp), %rbx
movq -0x80(%rbp), %rax
jmp 0x3a98
movq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x2210
xorl %eax, %eax
testq %r12, %r12
setne %al
jmp 0x3bda
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd470(%rip), %rdi      # 0x11063
leaq 0xc637(%rip), %rsi      # 0x10231
leaq 0xca55(%rip), %rcx      # 0x10656
movl $0x92, %edx
callq 0x2180