// File: /workspace/github_cpp_makefile_star2_O3/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 $0x98, %rsp
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %r15
movl $0x400000, (%rdi)       # imm = 0x400000
addq $0x8, %rdi
movq %rdi, 0x70(%rsp)
callq 0x6fb8
leaq 0x30(%r15), %rdi
movq %rdi, 0x68(%rsp)
callq 0x6fb8
decl %ebp
addq $0x8, %r12
movq $0x0, 0x30(%rsp)
leaq 0x1eca(%rip), %rbx      # 0x88df
movq 0x557c(%rip), %r14      # 0xbf98
movq $0x0, 0x28(%rsp)
xorl %r13d, %r13d
movl %ebp, %edi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3070
cmpl $0x42, %eax
jne 0x6a3f
movq (%r14), %r13
jmp 0x6a28
cmpl $0x63, %eax
jle 0x6a66
cmpl $0x64, %eax
je 0x6a5c
cmpl $0x6f, %eax
jne 0x6b96
movq (%r14), %rax
movq %rax, 0x28(%rsp)
jmp 0x6a28
movq (%r14), %rax
movq %rax, 0x30(%rsp)
jmp 0x6a28
cmpl $-0x1, %eax
jne 0x6afb
movq 0x28(%rsp), %r12
movq %r12, 0x38(%rsp)
movq 0x30(%rsp), %r14
movq %r14, 0x40(%rsp)
movq 0x5546(%rip), %rax      # 0xbfd0
movl (%rax), %ebx
testq %r13, %r13
je 0x6aa4
movq %r13, %rdi
movq %r15, %rsi
callq 0x696c
testl %eax, %eax
jne 0x6e6e
cmpl $0x0, (%r15)
je 0x6cd9
testq %r14, %r14
je 0x6d3f
testq %r12, %r12
je 0x6da5
cmpl %ebx, %ebp
jne 0x6e0b
leaq 0x40(%rsp), %rsi
movq 0x70(%rsp), %rdi
callq 0x33fc
leaq 0x38(%rsp), %rsi
movq 0x68(%rsp), %rdi
callq 0x33fc
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3a, %eax
jne 0x6b96
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
movq 0x548c(%rip), %rax      # 0xbfb8
movsbl (%rax), %edx
leaq 0x58(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x3290
leaq 0x1ce4(%rip), %rsi      # 0x8832
leaq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x7035
leaq 0x1ced(%rip), %rsi      # 0x8851
leaq 0x78(%rsp), %rdi
callq 0x33a0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6c21
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x6c2e
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
movq 0x53fa(%rip), %rax      # 0xbfb8
movsbl (%rax), %edx
leaq 0x58(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x3290
leaq 0x1c73(%rip), %rsi      # 0x8853
leaq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x7035
leaq 0x1c5b(%rip), %rsi      # 0x8851
leaq 0x78(%rsp), %rdi
callq 0x33a0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6c7d
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x6c8a
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %r12, %rdi
callq 0x32d0
leaq 0x5064(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x502f(%rip), %rsi      # 0xbc98
movq 0x5340(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6ecf
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %r12, %rdi
callq 0x32d0
leaq 0x5008(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x4fd3(%rip), %rsi      # 0xbc98
movq 0x52e4(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6ecf
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1b85(%rip), %rsi      # 0x887b
leaq 0x1b95(%rip), %rdx      # 0x8892
leaq 0x8(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4fa2(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x4f6d(%rip), %rsi      # 0xbc98
movq 0x527e(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6ecf
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1b8b(%rip), %rsi      # 0x88e7
leaq 0x1b95(%rip), %rdx      # 0x88f8
leaq 0x8(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4f3c(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x4f07(%rip), %rsi      # 0xbc98
movq 0x5218(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6ecf
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1af6(%rip), %rsi      # 0x88b8
leaq 0x1b02(%rip), %rdx      # 0x88cb
leaq 0x8(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4ed6(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x4ea1(%rip), %rsi      # 0xbc98
movq 0x51b2(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6ecf
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1aa4(%rip), %rsi      # 0x88cc
leaq 0x1aaf(%rip), %rdx      # 0x88de
leaq 0x8(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4e70(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x4e3b(%rip), %rsi      # 0xbc98
movq 0x514c(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6ecf
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x19da(%rip), %rsi      # 0x8865
leaq 0x19e8(%rip), %rdx      # 0x887a
leaq 0x8(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4e0d(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x4dd8(%rip), %rsi      # 0xbc98
movq 0x50e9(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6eeb
jmp 0x6f91
jmp 0x6eeb
jmp 0x6f91
jmp 0x6eeb
jmp 0x6f91
jmp 0x6eeb
jmp 0x6f91
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6f6a
movq 0x18(%rsp), %rsi
jmp 0x6f62
jmp 0x6f91
movq %rax, %r15
jmp 0x6f9c
jmp 0x6f10
jmp 0x6f2c
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x6f32
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x6f32
movq %rax, %r15
movb $0x1, %bpl
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6f53
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3240
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6f6a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3240
testb %bpl, %bpl
jne 0x6f94
jmp 0x6f9c
jmp 0x6f73
movq %rax, %r15
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6f94
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x6f94
jmp 0x6f91
movq %rax, %r15
movq %r12, %rdi
callq 0x3190
movq 0x68(%rsp), %rdi
callq 0x4bb4
movq 0x70(%rsp), %rdi
callq 0x4bb4
movq %r15, %rdi
callq 0x3370