// File: /workspace/github_cpp_makefile_star2_O1/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, %r12
movl %esi, %ebp
movq %rdi, %r15
movl $0x400000, (%rdi)       # imm = 0x400000
addq $0x8, %rdi
movq %rdi, 0x40(%rsp)
callq 0x6efc
leaq 0x30(%r15), %rdi
movq %rdi, 0x38(%rsp)
callq 0x6efc
decl %ebp
addq $0x8, %r12
xorl %r13d, %r13d
movq %r13, 0x30(%rsp)
movq %r13, 0x28(%rsp)
leaq 0x1f2c(%rip), %rbx      # 0x88df
movq 0x55de(%rip), %r14      # 0xbf98
movl %ebp, %edi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3070
cmpl $0x63, %eax
jg 0x69df
cmpl $-0x1, %eax
je 0x6a01
cmpl $0x42, %eax
jne 0x6a7f
movq (%r14), %r13
jmp 0x69ba
cmpl $0x64, %eax
je 0x69f7
cmpl $0x6f, %eax
jne 0x6b03
movq (%r14), %rax
movq %rax, 0x28(%rsp)
jmp 0x69ba
movq (%r14), %rax
movq %rax, 0x30(%rsp)
jmp 0x69ba
movq 0x55c8(%rip), %rax      # 0xbfd0
movl (%rax), %ebx
testq %r13, %r13
je 0x6a22
movq %r13, %rdi
movq %r15, %rsi
callq 0x6906
testl %eax, %eax
jne 0x6dcb
cmpl $0x0, (%r15)
je 0x6bde
cmpq $0x0, 0x30(%rsp)
je 0x6c43
cmpq $0x0, 0x28(%rsp)
je 0x6ca8
cmpl %ebx, %ebp
jne 0x6d0d
leaq 0x30(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0x33fe
leaq 0x28(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x33fe
movq %r15, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3a, %eax
jne 0x6b03
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
movq 0x5520(%rip), %rax      # 0xbfb8
movsbl (%rax), %edx
leaq 0x58(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x3290
leaq 0x1d78(%rip), %rsi      # 0x8832
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x6f79
leaq 0x1d81(%rip), %rsi      # 0x8851
leaq 0x68(%rsp), %rdi
callq 0x33a0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6b82
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x6b8f
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
movq 0x54a1(%rip), %rax      # 0xbfb8
movsbl (%rax), %edx
leaq 0x58(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x3290
leaq 0x1d1a(%rip), %rsi      # 0x8853
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x6f79
leaq 0x1d02(%rip), %rsi      # 0x8851
leaq 0x68(%rsp), %rdi
callq 0x33a0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x6d72
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x6d7f
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 0x5103(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x50ce(%rip), %rsi      # 0xbc98
movq 0x53df(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6e2b
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1c80(%rip), %rsi      # 0x887b
leaq 0x1c90(%rip), %rdx      # 0x8892
leaq 0x8(%rsp), %rdi
callq 0x41c2
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x509e(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebx, %ebx
leaq 0x5069(%rip), %rsi      # 0xbc98
movq 0x537a(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6e2b
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1c87(%rip), %rsi      # 0x88e7
leaq 0x1c91(%rip), %rdx      # 0x88f8
leaq 0x8(%rsp), %rdi
callq 0x41c2
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x5039(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebx, %ebx
leaq 0x5004(%rip), %rsi      # 0xbc98
movq 0x5315(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6e2b
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1bf3(%rip), %rsi      # 0x88b8
leaq 0x1bff(%rip), %rdx      # 0x88cb
leaq 0x8(%rsp), %rdi
callq 0x41c2
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4fd4(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebx, %ebx
leaq 0x4f9f(%rip), %rsi      # 0xbc98
movq 0x52b0(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6e2b
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1ba2(%rip), %rsi      # 0x88cc
leaq 0x1bad(%rip), %rdx      # 0x88de
leaq 0x8(%rsp), %rdi
callq 0x41c2
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4f6f(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebx, %ebx
leaq 0x4f3a(%rip), %rsi      # 0xbc98
movq 0x524b(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6e2b
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 0x4f13(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebp, %ebp
leaq 0x4ede(%rip), %rsi      # 0xbc98
movq 0x51ef(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6e2b
movl $0x10, %edi
callq 0x3130
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1a7d(%rip), %rsi      # 0x8865
leaq 0x1a8b(%rip), %rdx      # 0x887a
leaq 0x8(%rsp), %rdi
callq 0x41c2
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4eb1(%rip), %rax      # 0xbcc0
movq %rax, (%r12)
xorl %ebx, %ebx
leaq 0x4e7c(%rip), %rsi      # 0xbc98
movq 0x518d(%rip), %rdx      # 0xbfb0
movq %r12, %rdi
callq 0x3360
jmp 0x6e3b
jmp 0x6e57
jmp 0x6e3b
jmp 0x6e57
jmp 0x6e3b
jmp 0x6e57
jmp 0x6e3b
jmp 0x6e57
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x6e5c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x6e5c
movq %rax, %r15
movb $0x1, %bl
testb %bl, %bl
jne 0x6ed8
jmp 0x6ee0
jmp 0x6e6b
jmp 0x6e87
movq %rax, %r15
jmp 0x6ee0
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x6e8d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x6e8d
movq %rax, %r15
movb $0x1, %bpl
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6eb2
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x6eb2
jmp 0x6eac
movq %rax, %r15
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6ed3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x6ed3
jmp 0x6ecd
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0x6ee0
movq %r12, %rdi
callq 0x3190
movq 0x38(%rsp), %rdi
callq 0x4bb2
movq 0x40(%rsp), %rdi
callq 0x4bb2
movq %r15, %rdi
callq 0x3370