// File: /workspace/github_cpp_makefile_star2_O2/leobru[P]ACPUfont/averager.cc
// Function: Picture::Picture(char const*)
Picture(const char * fname) : weight(1) {
        FILE * f = fopen(fname, "r");
        if (!f) {
            fprintf(stderr, "Cannot open %s\n", fname);
            exit(1);
        }
        int full;
        char p2[3];
        fscanf(f, "%2s", p2);
        if (strcmp("P5", p2)) {
            fprintf(stderr, "Want to see binary PGM (P5)\n");
            exit(1);
        }
        if (3 != fscanf(f, "%d %d %d", &width, &height, &full) || full != 255) {
            fprintf(stderr, "Could not parse PGM header\n");
            exit(1);
        }
        getc(f); // eat linefeed
        reserve(height*width);
        for (int i = 0; i < height; ++i)
            for (int j = 0; j < width; ++j) {
                int pixel = getc(f);
                if (pixel == EOF) {
                    fprintf(stderr, "File ended prematurely\n");
                    exit(1);
                }
                push_back(full-pixel);
                // Now array is in degrees of blackness
            }
        fclose (f);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rdi)
leaq 0x2d04(%rip), %rsi      # 0x50d6
movq %r15, %rdi
callq 0x1110
testq %rax, %rax
je 0x24ef
movq %rax, %r14
leaq 0x2cfb(%rip), %rsi      # 0x50e8
leaq 0x9(%rsp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x11c0
leaq 0x2ce9(%rip), %rdi      # 0x50ec
leaq 0x9(%rsp), %rsi
pushq $0x3
popq %rdx
callq 0x1100
testl %eax, %eax
jne 0x250c
leaq 0x20(%rbx), %r15
leaq 0x24(%rbx), %rcx
leaq 0x2ce5(%rip), %rsi      # 0x510c
leaq 0x4(%rsp), %r8
movq %r14, %rdi
movq %r15, %rdx
movq %rcx, 0x10(%rsp)
xorl %eax, %eax
callq 0x11c0
cmpl $0x3, %eax
jne 0x2521
cmpl $0xff, 0x4(%rsp)
jne 0x2521
movq %r14, %rdi
callq 0x1060
movslq 0x24(%rbx), %rax
movslq 0x20(%rbx), %rsi
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x2f6e
xorl %ebp, %ebp
leaq 0xc(%rsp), %r13
movq 0x10(%rsp), %rax
cmpl (%rax), %ebp
jge 0x24b4
xorl %r12d, %r12d
cmpl (%r15), %r12d
jge 0x24b0
movq %r14, %rdi
callq 0x1060
cmpl $-0x1, %eax
je 0x24cb
movl 0x4(%rsp), %ecx
subl %eax, %ecx
movl %ecx, 0xc(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3004
incl %r12d
jmp 0x2484
incl %ebp
jmp 0x2478
movq %r14, %rdi
callq 0x10d0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6afe(%rip), %rax      # 0x8fd0
movq (%rax), %rcx
leaq 0x2c55(%rip), %rdi      # 0x5131
pushq $0x17
popq %rsi
pushq $0x1
popq %rdx
callq 0x11e0
pushq $0x1
popq %rdi
callq 0x1120
movq 0x6ada(%rip), %rax      # 0x8fd0
movq (%rax), %rdi
leaq 0x2bd8(%rip), %rsi      # 0x50d8
movq %r15, %rdx
xorl %eax, %eax
callq 0x1140
jmp 0x24e7
movq 0x6abd(%rip), %rax      # 0x8fd0
movq (%rax), %rcx
leaq 0x2bd2(%rip), %rdi      # 0x50ef
pushq $0x1c
jmp 0x24de
movq 0x6aa8(%rip), %rax      # 0x8fd0
movq (%rax), %rcx
leaq 0x2be3(%rip), %rdi      # 0x5115
pushq $0x1b
jmp 0x24de
jmp 0x2538
movq %rax, %r14
movq %rbx, %rdi
callq 0x256e
movq %r14, %rdi
callq 0x11b0
nop