// File: /workspace/github_cpp_makefile_star2_O2/jansucan[P]diff-dd/src/options.cpp
// Function: Options::Parser::parseRestore(int, char**)
Restore
Parser::parseRestore(int argc, char **argv)
{
    Restore opts;

    argc -= 1;
    argv += 1;

    int ch;
    const char *arg_buffer_size = NULL;
    const char *arg_diff_file = NULL;
    const char *arg_output_file = NULL;

    while ((ch = getopt(argc, argv, ":B:d:o:")) != -1) {
        switch (ch) {
        case 'B':
            arg_buffer_size = optarg;
            break;

        case 'd':
            arg_diff_file = optarg;
            break;

        case 'o':
            arg_output_file = optarg;
            break;

        case ':':
            throw Error("missing argument for option '-" +
                        std::string(1, optopt) + "'");
        default:
            throw Error("unknown option '-" + std::string(1, optopt) + "'");
        }
    }

    argc -= optind;

    /* Convert numbers in the arguments */
    if ((arg_buffer_size != NULL) &&
        parseUnsigned(arg_buffer_size, &(opts.m_buffer_size))) {
        throw Error("incorrect buffer size");
    } else if (opts.m_buffer_size == 0) {
        throw Error("buffer size cannot be 0");
    }

    if (arg_diff_file == NULL) {
        throw Error("missing diff file");
    } else if (arg_output_file == NULL) {
        throw Error("missing output file");
    } else if (argc != 0) {
        throw Error("too many arguments");
    }

    opts.m_diff_file_path = arg_diff_file;
    opts.m_out_file_path = arg_output_file;

    return opts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, 0x40(%rsp)
callq 0x5bd2
decl %ebp
addq $0x8, %r14
movq $0x0, 0x28(%rsp)
leaq 0x26fb(%rip), %r12      # 0x88c3
movq 0x6dd1(%rip), %r13      # 0xcfa0
xorl %ebx, %ebx
xorl %r15d, %r15d
movl %ebp, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3060
cmpl $0x42, %eax
jne 0x61ec
movq (%r13), %r15
jmp 0x61d4
cmpl $-0x1, %eax
je 0x6210
cmpl $0x64, %eax
je 0x6205
cmpl $0x6f, %eax
jne 0x629f
movq (%r13), %rbx
jmp 0x61d4
movq (%r13), %rax
movq %rax, 0x28(%rsp)
jmp 0x61d4
movq %rbx, 0x30(%rsp)
movq 0x28(%rsp), %r13
movq %r13, 0x38(%rsp)
movq 0x6daa(%rip), %rax      # 0xcfd0
movl (%rax), %r14d
testq %r15, %r15
movq 0x40(%rsp), %r12
je 0x6246
movq %r15, %rdi
movq %r12, %rsi
callq 0x613a
testl %eax, %eax
jne 0x64fd
cmpl $0x0, (%r12)
je 0x63cc
testq %r13, %r13
je 0x6419
testq %rbx, %rbx
je 0x6466
cmpl %r14d, %ebp
jne 0x64b3
leaq 0x8(%r12), %rdi
leaq 0x38(%rsp), %rsi
callq 0x6678
leaq 0x30(%r12), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6678
movq %r12, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3a, %eax
jne 0x633a
movq %rbx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
pushq $0x10
popq %rdi
callq 0x3130
movq %rax, %r15
movq 0x6cef(%rip), %rax      # 0xcfb8
movsbl (%rax), %edx
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x68(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x3240
leaq 0x252d(%rip), %rsi      # 0x8816
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x663d
leaq 0x2536(%rip), %rdx      # 0x8835
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x661e
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x6662
xorl %ebx, %ebx
leaq 0x697a(%rip), %rsi      # 0xcca0
movq 0x6c83(%rip), %rdx      # 0xcfb0
movq %r15, %rdi
callq 0x3330
jmp 0x6545
movq %rbx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
pushq $0x10
popq %rdi
callq 0x3130
movq %rax, %r15
movq 0x6c5d(%rip), %rax      # 0xcfb8
movsbl (%rax), %edx
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x68(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x3240
leaq 0x24bc(%rip), %rsi      # 0x8837
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x663d
leaq 0x24a4(%rip), %rdx      # 0x8835
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x661e
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x6662
xorl %ebx, %ebx
leaq 0x68e8(%rip), %rsi      # 0xcca0
movq 0x6bf1(%rip), %rdx      # 0xcfb0
movq %r15, %rdi
callq 0x3330
jmp 0x6545
pushq $0x10
popq %rdi
callq 0x3130
movq %rax, %r15
leaq 0x2481(%rip), %rsi      # 0x885f
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x3e0e
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x6662
xorl %ebx, %ebx
leaq 0x689b(%rip), %rsi      # 0xcca0
movq 0x6ba4(%rip), %rdx      # 0xcfb0
movq %r15, %rdi
callq 0x3330
jmp 0x6545
pushq $0x10
popq %rdi
callq 0x3130
movq %rax, %r15
leaq 0x24a0(%rip), %rsi      # 0x88cb
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x3e0e
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x6662
xorl %ebx, %ebx
leaq 0x684e(%rip), %rsi      # 0xcca0
movq 0x6b57(%rip), %rdx      # 0xcfb0
movq %r15, %rdi
callq 0x3330
jmp 0x6545
pushq $0x10
popq %rdi
callq 0x3130
movq %rax, %r15
leaq 0x2424(%rip), %rsi      # 0x889c
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x3e0e
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x6662
xorl %ebx, %ebx
leaq 0x6801(%rip), %rsi      # 0xcca0
movq 0x6b0a(%rip), %rdx      # 0xcfb0
movq %r15, %rdi
callq 0x3330
jmp 0x6545
pushq $0x10
popq %rdi
callq 0x3130
movq %rax, %r15
leaq 0x23eb(%rip), %rsi      # 0x88b0
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x3e0e
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x6662
xorl %ebx, %ebx
leaq 0x67b4(%rip), %rsi      # 0xcca0
movq 0x6abd(%rip), %rdx      # 0xcfb0
movq %r15, %rdi
callq 0x3330
jmp 0x6545
pushq $0x10
popq %rdi
callq 0x3130
movq %rax, %r15
leaq 0x233a(%rip), %rsi      # 0x8849
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x3e0e
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x6662
xorl %ebx, %ebx
leaq 0x676a(%rip), %rsi      # 0xcca0
movq 0x6a73(%rip), %rdx      # 0xcfb0
movq %r15, %rdi
callq 0x3330
jmp 0x6555
jmp 0x65a3
jmp 0x6555
jmp 0x65a3
jmp 0x6555
jmp 0x65a3
jmp 0x6555
jmp 0x65a3
movq %rax, %r14
leaq 0x8(%rsp), %rdi
jmp 0x6596
jmp 0x65a3
movq %rax, %r14
jmp 0x65ae
jmp 0x656a
jmp 0x6579
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3398
jmp 0x657e
movq %rax, %r14
movb $0x1, %bl
leaq 0x48(%rsp), %rdi
callq 0x3398
jmp 0x6591
jmp 0x658c
movq %rax, %r14
movb $0x1, %bl
leaq 0x68(%rsp), %rdi
callq 0x3398
testb %bl, %bl
jne 0x65a6
jmp 0x65ae
jmp 0x65a3
movq %rax, %r14
movq %r15, %rdi
callq 0x3180
movq 0x40(%rsp), %rdi
callq 0x5a5e
movq %r14, %rdi
callq 0x3340