// File: Jiro-iwai[P]yuv2psnr/yuv2psnr.cpp
// Function: parse_option(int, char**, Option&)
void parse_option
( int argc
, char* argv[]
, Option& opt
)
{
  for( int i = 1; i < argc; i++ ) {

    string op = argv[i];
    
    if( op == "-w" ) {
      i++;
      opt.width = boost::lexical_cast<int>(argv[i]);
    } else if( op == "-h" ) {
      i++;
      opt.height = boost::lexical_cast<int>(argv[i]);
    } else if( op == "-i0" ) {
      i++;
      opt.file0 = argv[i];
    } else if( op == "-i1" ) {
      i++;
      opt.file1 = argv[i];
    } else if( op == "-v" ) {
      opt.showFrame = true;
    }
  }
}

// Assembly:
subq $0x88, %rsp
movl %edi, 0x84(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movl $0x1, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x84(%rsp), %eax
jge 0x5af8
movq 0x78(%rsp), %rax
movslq 0x6c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x5590
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x48(%rsp), %rdi
callq 0x5440
jmp 0x5929
leaq 0x47(%rsp), %rdi
callq 0x5340
leaq 0xe9f2(%rip), %rsi      # 0x1432c
leaq 0x48(%rsp), %rdi
callq 0x65a0
movb %al, 0x1f(%rsp)
jmp 0x594a
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x5954
jmp 0x59c1
movl 0x6c(%rsp), %eax
incl %eax
movl %eax, 0x6c(%rsp)
movq 0x78(%rsp), %rax
movslq 0x6c(%rsp), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0x65d0
movl %eax, 0x18(%rsp)
jmp 0x5977
movl 0x18(%rsp), %ecx
movq 0x70(%rsp), %rax
movl %ecx, (%rax)
jmp 0x5ade
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x47(%rsp), %rdi
callq 0x5340
jmp 0x5b00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x5230
jmp 0x5b00
leaq 0xe967(%rip), %rsi      # 0x1432f
leaq 0x48(%rsp), %rdi
callq 0x65a0
movb %al, 0x17(%rsp)
jmp 0x59d8
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x59e2
jmp 0x5a16
movl 0x6c(%rsp), %eax
incl %eax
movl %eax, 0x6c(%rsp)
movq 0x78(%rsp), %rax
movslq 0x6c(%rsp), %rcx
leaq (%rax,%rcx,8), %rdi
callq 0x65d0
movl %eax, 0x10(%rsp)
jmp 0x5a05
movl 0x10(%rsp), %ecx
movq 0x70(%rsp), %rax
movl %ecx, 0x4(%rax)
jmp 0x5adc
leaq 0xe915(%rip), %rsi      # 0x14332
leaq 0x48(%rsp), %rdi
callq 0x65a0
movb %al, 0xf(%rsp)
jmp 0x5a2d
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x5a37
jmp 0x5a61
movl 0x6c(%rsp), %eax
incl %eax
movl %eax, 0x6c(%rsp)
movq 0x78(%rsp), %rax
movslq 0x6c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x70(%rsp), %rdi
addq $0x8, %rdi
callq 0x5430
jmp 0x5a5f
jmp 0x5ada
leaq 0xe8ce(%rip), %rsi      # 0x14336
leaq 0x48(%rsp), %rdi
callq 0x65a0
movb %al, 0xe(%rsp)
jmp 0x5a78
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x5a82
jmp 0x5aac
movl 0x6c(%rsp), %eax
incl %eax
movl %eax, 0x6c(%rsp)
movq 0x78(%rsp), %rax
movslq 0x6c(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x70(%rsp), %rdi
addq $0x28, %rdi
callq 0x5430
jmp 0x5aaa
jmp 0x5ad8
leaq 0xe887(%rip), %rsi      # 0x1433a
leaq 0x48(%rsp), %rdi
callq 0x65a0
movb %al, 0xd(%rsp)
jmp 0x5ac3
movb 0xd(%rsp), %al
testb $0x1, %al
jne 0x5acd
jmp 0x5ad6
movq 0x70(%rsp), %rax
movb $0x1, 0x48(%rax)
jmp 0x5ad8
jmp 0x5ada
jmp 0x5adc
jmp 0x5ade
leaq 0x48(%rsp), %rdi
callq 0x5230
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x58e0
addq $0x88, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x5580
nopw (%rax,%rax)