// File: /workspace/github_cpp_makefile_star2_O3/magmastonealex[P]fbkeyboard/src/Display.cpp
// Function: Display::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Display::write(std::string filename){
	std::ofstream f2(filename, std::ios::binary);
    f2 << "P6" << std::endl;
    f2 << std::to_string(width) << " " << std::to_string(height) << std::endl;
    f2 << "255" << std::endl;
    f2.write((char*)keyboardImage->data, width*height*3);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movl $0x4, %edx
callq 0x22a0
leaq 0x1a0b(%rip), %rsi      # 0x4088
movl $0x2, %edx
movq %r14, %rdi
callq 0x21c0
movq 0x48(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
leaq 0x48(%rsp), %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movl (%rbx), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x2715
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x270c
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2712
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2715
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x26d9
addl $-0x3, %r15d
jmp 0x2715
addl $-0x2, %r15d
jmp 0x2715
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %rdi
movl $0x2d, %edx
callq 0x21d0
addq 0x8(%rsp), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x2f95
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x21c0
movq %rax, %r14
leaq 0x192e(%rip), %rsi      # 0x4093
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movl 0x4(%rbx), %r15d
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x27d3
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x27ca
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x27d0
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x27d3
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2797
addl $-0x3, %r12d
jmp 0x27d3
addl $-0x2, %r12d
jmp 0x27d3
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x21d0
addq 0x28(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x2f95
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x21c0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x2858
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2874
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
leaq 0x1810(%rip), %rsi      # 0x408b
leaq 0x48(%rsp), %r14
movl $0x3, %edx
movq %r14, %rdi
callq 0x21c0
movq 0x48(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
leaq 0x48(%rsp), %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rsi
movl (%rbx), %eax
imull 0x4(%rbx), %eax
leal (%rax,%rax,2), %eax
movslq %eax, %rdx
leaq 0x48(%rsp), %rdi
callq 0x2200
movq 0x36e3(%rip), %rax      # 0x5fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x50(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x48(%rsp,%rcx)
callq 0x2140
leaq 0x140(%rsp), %rdi
callq 0x20b0
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x291e
jmp 0x295b
movq %rax, %rbx
jmp 0x293d
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x293d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21a0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x295e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21a0
jmp 0x295e
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2230
movq %rbx, %rdi
callq 0x2280