// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/pd2img/pd2img.cpp
// Function: main
int main(int argc, char **argv)
{
  // Parse program arguments
  if (!ParseArgs(argc, argv)) exit(-1);
  
  // Open pixel database
  R2PixelDatabase pd;
  if (!pd.OpenFile(input_pixel_database, "r")) exit(-1);

  // Write images
  if (!WriteImages(pd, output_image_directory)) exit(-1);

  // Close pixel database
  if (!pd.CloseFile()) exit(-1);

  // Return success
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x968, %rsp            # imm = 0x968
movq 0x6f4a4(%rip), %r13     # 0x754a8
movq 0x6f4a5(%rip), %r12     # 0x754b0
cmpl $0x2, %edi
jl 0x608d
movq %rsi, %rbx
movl %edi, %ebp
incl %ebp
addq $0x8, %rbx
leaq 0x4dfe2(%rip), %r14     # 0x54004
movq (%rbx), %r15
cmpb $0x2d, (%r15)
jne 0x6055
cmpb $0x76, 0x1(%r15)
jne 0x6039
cmpb $0x0, 0x2(%r15)
je 0x607b
movq %r15, %rdi
movq %r14, %rsi
callq 0x54b0
testl %eax, %eax
jne 0x6322
movb $0x1, 0x6f469(%rip)     # 0x754bc
jmp 0x6082
testq %r13, %r13
je 0x606f
testq %r12, %r12
jne 0x6322
movq %r15, 0x6f446(%rip)     # 0x754b0
movq %r15, %r12
jmp 0x6082
movq %r15, 0x6f432(%rip)     # 0x754a8
movq %r15, %r13
jmp 0x6082
movb $0x1, 0x6f436(%rip)     # 0x754b8
decl %ebp
addq $0x8, %rbx
cmpl $0x2, %ebp
ja 0x6022
testq %r13, %r13
je 0x633d
testq %r12, %r12
je 0x633d
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x10d70
movq 0x6f3f5(%rip), %rsi     # 0x754a8
leaq 0x51259(%rip), %rdx     # 0x57313
movq %rbx, %rdi
callq 0x11770
testl %eax, %eax
je 0x634b
movq 0x6f3df(%rip), %rax     # 0x754b0
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x21744
movq $0x0, (%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x5580
cmpb $0x1, 0x6f3bd(%rip)     # 0x754b8
jne 0x611f
leaq 0x4df5b(%rip), %rdi     # 0x5405f
movq 0x8(%rsp), %rsi
xorl %eax, %eax
callq 0x5060
movq 0x6ee89(%rip), %rax     # 0x74fa0
movq (%rax), %rdi
callq 0x53b0
cmpl $0x0, 0x54(%rsp)
jle 0x62b4
xorl %r15d, %r15d
xorl %r13d, %r13d
movq $0x0, (%rsp)
movq 0x20(%rsp), %rax
movq 0x68(%rsp), %rcx
movq (%rcx,%r15), %rbx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq *0x20(%rax)
movl %eax, %r14d
testl %eax, %eax
js 0x622f
cmpb $0x1, 0x6f359(%rip)     # 0x754bc
jne 0x6176
leaq 0x4df29(%rip), %rdi     # 0x54095
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5060
leaq 0x150(%rsp), %r12
movq %r12, %rdi
leaq 0x4df13(%rip), %rsi     # 0x5409b
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x50b0
leaq 0x550(%rsp), %rbp
movq %rbp, %rdi
leaq 0x4def8(%rip), %rsi     # 0x540a1
movq %r12, %rdx
xorl %eax, %eax
callq 0x50b0
movq %rbp, %rdi
movl $0x2f, %esi
callq 0x5380
testq %rax, %rax
je 0x61c8
movb $0x0, (%rax)
leaq 0x550(%rsp), %rdi
callq 0x52c0
leaq 0x80(%rsp), %r12
cmpl $0x1, %r14d
je 0x6242
testl %r14d, %r14d
jne 0x628b
movq %r12, %rdi
callq 0x1809c
movq 0x20(%rsp), %rax
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq *0x10(%rax)
testl %eax, %eax
je 0x6225
movq %r12, %rdi
leaq 0x150(%rsp), %rsi
callq 0x1a23c
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x18618
jmp 0x629f
leaq 0x4de43(%rip), %rdi     # 0x54079
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2448e
jmp 0x629f
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6390
movq 0x20(%rsp), %rax
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq *0x18(%rax)
testl %eax, %eax
je 0x6281
movq %r12, %rdi
leaq 0x150(%rsp), %rsi
callq 0xf592
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x6fc4
jmp 0x629f
leaq 0x4de1b(%rip), %rdi     # 0x540ad
movl %r14d, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2448e
incq %r13
movslq 0x54(%rsp), %rax
addq $0x20, %r15
cmpq %rax, %r13
jl 0x6138
cmpb $0x0, 0x6f1fd(%rip)     # 0x754b8
je 0x62f6
leaq 0x10(%rsp), %rdi
callq 0x217a6
leaq 0x4ddfe(%rip), %rdi     # 0x540cc
movb $0x1, %al
callq 0x5060
leaq 0x4ddff(%rip), %rdi     # 0x540db
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x5060
movq 0x6ecb2(%rip), %rax     # 0x74fa0
movq (%rax), %rdi
callq 0x53b0
leaq 0x20(%rsp), %rdi
callq 0x1188e
testl %eax, %eax
je 0x634b
leaq 0x20(%rsp), %rdi
callq 0x10e6a
xorl %eax, %eax
addq $0x968, %rsp            # imm = 0x968
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4dce2(%rip), %rdi     # 0x5400b
movq %r15, %rsi
xorl %eax, %eax
callq 0x2448e
movl $0x1, %edi
callq 0x53e0
leaq 0x4dce4(%rip), %rdi     # 0x54028
xorl %eax, %eax
callq 0x2448e
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x53e0
jmp 0x637b
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x6fc4
jmp 0x637e
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x18618
jmp 0x637e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x10e6a
movq %rbx, %rdi
callq 0x55c0