// File: timothyqiu[P]ssoaag/main.cc
// Function: main
int main(int argc, char *argv[])
{
    char const *filename = nullptr;

    if (argc < 2) {
        printf("Some Sort Of Ascii Art Generator\n");
        printf("usage: %s <bitmap filename>\n", argv[0]);
        printf("using default image: %s\n", DEFAULT_IMAGE);

        filename = DEFAULT_IMAGE;
    } else {
        filename = argv[1];
    }

    ImageWriter    image_writer(filename);
    image_writer.WriteFile(MOSAIC_OUTPUT);

    AsciiArtWriter ascii_writer(filename);
    ascii_writer.WriteFile(ASCII_OUTPUT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x25ec
leaq 0x3a56(%rip), %rdi      # 0x6004
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x3a63(%rip), %rdi      # 0x6026
movb $0x0, %al
callq 0x2070
leaq 0x3a72(%rip), %rdi      # 0x6043
leaq 0x3a84(%rip), %rsi      # 0x605c
movb $0x0, %al
callq 0x2070
leaq 0x3a76(%rip), %rax      # 0x605c
movq %rax, -0x18(%rbp)
jmp 0x25f8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x2390
movq -0x198(%rbp), %rsi
movq -0x190(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x28d0
jmp 0x2632
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x30a0
jmp 0x2644
leaq -0x88(%rbp), %rdi
callq 0x23f8
leaq -0x89(%rbp), %rdi
callq 0x2250
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x2390
movq -0x1a0(%rbp), %rdx
leaq 0x39f5(%rip), %rsi      # 0x6072
leaq -0xc0(%rbp), %rdi
callq 0x28d0
jmp 0x268b
leaq -0x68(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x2db0
jmp 0x269d
leaq -0xc0(%rbp), %rdi
callq 0x23f8
leaq -0xc1(%rbp), %rdi
callq 0x2250
movq -0x18(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x159(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x2390
movq -0x1b0(%rbp), %rsi
movq -0x1a8(%rbp), %rdx
leaq -0x158(%rbp), %rdi
callq 0x28d0
jmp 0x26ef
leaq 0x6b22(%rip), %rdx      # 0x9218
leaq -0x138(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x3440
jmp 0x270b
leaq -0x158(%rbp), %rdi
callq 0x23f8
leaq -0x159(%rbp), %rdi
callq 0x2250
leaq -0x181(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x2390
movq -0x1b8(%rbp), %rdx
leaq 0x393a(%rip), %rsi      # 0x607e
leaq -0x180(%rbp), %rdi
callq 0x28d0
jmp 0x2752
leaq -0x138(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x2db0
jmp 0x2767
leaq -0x180(%rbp), %rdi
callq 0x23f8
leaq -0x181(%rbp), %rdi
callq 0x2250
leaq -0x138(%rbp), %rdi
callq 0x2980
leaq -0x68(%rbp), %rdi
callq 0x29c0
movl -0x4(%rbp), %eax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x27d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x23f8
leaq -0x89(%rbp), %rdi
callq 0x2250
jmp 0x28b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x2815
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x23f8
leaq -0xc1(%rbp), %rdi
callq 0x2250
jmp 0x28b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x2858
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x23f8
leaq -0x159(%rbp), %rdi
callq 0x2250
jmp 0x28b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x2898
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x23f8
leaq -0x181(%rbp), %rdi
callq 0x2250
leaq -0x138(%rbp), %rdi
callq 0x2980
leaq -0x68(%rbp), %rdi
callq 0x29c0
movq -0x98(%rbp), %rdi
callq 0x2380
nopw %cs:(%rax,%rax)
nop