// File: myint[P]optparse/test2.cpp
// Function: main
int main(int argc, char *argv[])
{
    const std::string version =
        "%prog 1.0\nCopyright (C) 2017\n"
        "This is free software: you are free to change and redistribute it.\n"
        "There is NO WARRANTY, to the extent permitted by law.";

    optparse::OptionParserExcept parser = optparse::OptionParserExcept().version(version)
          .description("Description")
          .epilog("Epilog");

    parser.add_option("--string")
        .help("This is a really long text... very long indeed! "
              "It must be wrapped on normal terminals.");

    try
    {
        const optparse::Values &options = parser.parse_args(argc, argv);
        const std::vector<std::string> args = parser.args();

        std::cout << "string: " << options["string"] << std::endl;

        std::cout << std::endl << "leftover arguments: " << std::endl;
        for (std::vector<std::string>::const_iterator it = args.begin(); it != args.end(); ++it)
        {
            std::cout << "arg: " << *it << std::endl;
        }
    }
    catch (int ret_code)
    {
        std::cout << "OptionParser has thrown " << ret_code << std::endl;
        return ret_code;
    }

    return 0;
}

// Assembly:
subq $0x688, %rsp            # imm = 0x688
movl $0x0, 0x684(%rsp)
movl %edi, 0x680(%rsp)
movq %rsi, 0x678(%rsp)
leaq 0x657(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0x34c0
movq 0xc8(%rsp), %rdx
leaq 0x1693f(%rip), %rsi     # 0x1a004
leaq 0x658(%rsp), %rdi
callq 0x33b0
jmp 0x36d4
leaq 0x657(%rsp), %rdi
callq 0x3320
leaq 0x1d0(%rsp), %rdi
callq 0x66b0
jmp 0x36f0
leaq 0x1d0(%rsp), %rdi
leaq 0x658(%rsp), %rsi
callq 0x66e0
movq %rax, 0xc0(%rsp)
jmp 0x370f
leaq 0x1af(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x34c0
movq 0xb8(%rsp), %rdx
leaq 0x16967(%rip), %rsi     # 0x1a09a
leaq 0x1b0(%rsp), %rdi
callq 0x33b0
jmp 0x3742
movq 0xc0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x6710
movq %rax, 0xb0(%rsp)
jmp 0x3761
leaq 0x187(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x34c0
movq 0xa8(%rsp), %rdx
leaq 0x16921(%rip), %rsi     # 0x1a0a6
leaq 0x188(%rsp), %rdi
callq 0x33b0
jmp 0x3794
movq 0xb0(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x6740
movq %rax, 0xa0(%rsp)
jmp 0x37b3
movq 0xa0(%rsp), %rsi
leaq 0x408(%rsp), %rdi
callq 0x6780
jmp 0x37ca
leaq 0x188(%rsp), %rdi
callq 0x3548
jmp 0x37d9
leaq 0x187(%rsp), %rdi
callq 0x3320
leaq 0x1b0(%rsp), %rdi
callq 0x3548
jmp 0x37f5
leaq 0x1af(%rsp), %rdi
callq 0x3320
leaq 0x1d0(%rsp), %rdi
callq 0x67d0
jmp 0x3811
leaq 0x15f(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x34c0
movq 0x98(%rsp), %rdx
leaq 0x16878(%rip), %rsi     # 0x1a0ad
leaq 0x160(%rsp), %rdi
callq 0x33b0
jmp 0x3844
leaq 0x408(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x67e0
movq %rax, 0x90(%rsp)
jmp 0x3863
leaq 0x137(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x34c0
movq 0x88(%rsp), %rdx
leaq 0x1682f(%rip), %rsi     # 0x1a0b6
leaq 0x138(%rsp), %rdi
callq 0x33b0
jmp 0x3896
movq 0x90(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x6a50
jmp 0x38ad
leaq 0x138(%rsp), %rdi
callq 0x3548
jmp 0x38bc
leaq 0x137(%rsp), %rdi
callq 0x3320
leaq 0x160(%rsp), %rdi
callq 0x3548
jmp 0x38d8
leaq 0x15f(%rsp), %rdi
callq 0x3320
movl 0x680(%rsp), %esi
movq 0x678(%rsp), %rdx
leaq 0x408(%rsp), %rdi
callq 0x6a90
movq %rax, 0x80(%rsp)
jmp 0x390b
movq 0x80(%rsp), %rax
movq %rax, 0x128(%rsp)
leaq 0x408(%rsp), %rdi
callq 0x6be0
movq %rax, 0x78(%rsp)
jmp 0x392f
movq 0x78(%rsp), %rsi
leaq 0x110(%rsp), %rdi
callq 0x6c00
jmp 0x3943
movq 0x2066e(%rip), %rdi     # 0x23fb8
leaq 0x167bd(%rip), %rsi     # 0x1a10e
callq 0x32d0
movq %rax, 0x70(%rsp)
jmp 0x395d
movq 0x128(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x34c0
movq 0x68(%rsp), %rdx
leaq 0x16727(%rip), %rsi     # 0x1a0af
leaq 0xf0(%rsp), %rdi
callq 0x33b0
jmp 0x3997
movq 0x60(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x6d00
movq %rax, 0x58(%rsp)
jmp 0x39b0
movq 0x58(%rsp), %rsi
movq 0x70(%rsp), %rdi
callq 0x3290
movq %rax, 0x50(%rsp)
jmp 0x39c6
movq 0x50(%rsp), %rdi
movq 0x205ce(%rip), %rsi     # 0x23fa0
callq 0x3310
jmp 0x39d9
leaq 0xf0(%rsp), %rdi
callq 0x3548
jmp 0x39e8
leaq 0xef(%rsp), %rdi
callq 0x3320
movq 0x205bc(%rip), %rdi     # 0x23fb8
movq 0x2059d(%rip), %rsi     # 0x23fa0
callq 0x3310
movq %rax, 0x48(%rsp)
jmp 0x3a0f
movq 0x48(%rsp), %rdi
leaq 0x166fc(%rip), %rsi     # 0x1a117
callq 0x32d0
movq %rax, 0x40(%rsp)
jmp 0x3a27
movq 0x40(%rsp), %rdi
movq 0x2056d(%rip), %rsi     # 0x23fa0
callq 0x3310
jmp 0x3a3a
leaq 0x110(%rsp), %rdi
callq 0x6e20
movq %rax, 0x38(%rsp)
jmp 0x3a4e
movq 0x38(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x6e90
movq %rax, 0x30(%rsp)
jmp 0x3a6f
movq 0x30(%rsp), %rax
movq %rax, 0xd8(%rsp)
leaq 0xe0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x6e50
movb %al, 0x2f(%rsp)
jmp 0x3a97
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x3aa4
jmp 0x3d1f
movq 0x2050d(%rip), %rdi     # 0x23fb8
leaq 0x1667a(%rip), %rsi     # 0x1a12c
callq 0x32d0
movq %rax, 0x20(%rsp)
jmp 0x3abe
leaq 0xe0(%rsp), %rdi
callq 0x6ec0
movq %rax, 0x18(%rsp)
jmp 0x3ad2
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x3290
movq %rax, 0x10(%rsp)
jmp 0x3ae8
movq 0x10(%rsp), %rdi
movq 0x204ac(%rip), %rsi     # 0x23fa0
callq 0x3310
jmp 0x3afb
jmp 0x3afd
leaq 0xe0(%rsp), %rdi
callq 0x6ed0
jmp 0x3b0c
jmp 0x3a5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
leaq 0x657(%rsp), %rdi
callq 0x3320
jmp 0x3e4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3e3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3bfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3bee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3bdd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3bd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
leaq 0x188(%rsp), %rdi
callq 0x3548
jmp 0x3bce
jmp 0x3bd0
leaq 0x187(%rsp), %rdi
callq 0x3320
leaq 0x1b0(%rsp), %rdi
callq 0x3548
jmp 0x3bec
jmp 0x3bee
leaq 0x1af(%rsp), %rdi
callq 0x3320
leaq 0x1d0(%rsp), %rdi
callq 0x67d0
jmp 0x3c0a
jmp 0x3e3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3c94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3c83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3c76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x3548
jmp 0x3c74
jmp 0x3c76
leaq 0x137(%rsp), %rdi
callq 0x3320
leaq 0x160(%rsp), %rdi
callq 0x3548
jmp 0x3c92
jmp 0x3c94
leaq 0x15f(%rsp), %rdi
callq 0x3320
jmp 0x3e2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3d44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3d33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
jmp 0x3d10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x3548
jmp 0x3d0e
jmp 0x3d10
leaq 0xef(%rsp), %rdi
callq 0x3320
jmp 0x3d33
leaq 0x110(%rsp), %rdi
callq 0x6ef0
jmp 0x3d2e
jmp 0x3dec
leaq 0x110(%rsp), %rdi
callq 0x6ef0
jmp 0x3d42
jmp 0x3d44
movl 0x644(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3e2d
movq 0x648(%rsp), %rdi
callq 0x30f0
movl (%rax), %eax
movl %eax, 0xd4(%rsp)
movq 0x20243(%rip), %rdi     # 0x23fb8
leaq 0x163b6(%rip), %rsi     # 0x1a132
callq 0x32d0
movq %rax, 0x8(%rsp)
jmp 0x3d88
movq 0x8(%rsp), %rdi
movl 0xd4(%rsp), %esi
callq 0x3490
movq %rax, (%rsp)
jmp 0x3d9f
movq (%rsp), %rdi
movq 0x201f6(%rip), %rsi     # 0x23fa0
callq 0x3310
jmp 0x3db1
movl 0xd4(%rsp), %eax
movl %eax, 0x684(%rsp)
movl $0x1, 0xd0(%rsp)
callq 0x3440
jmp 0x3e02
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x648(%rsp)
movl %eax, 0x644(%rsp)
callq 0x3440
jmp 0x3e2d
movl $0x0, 0x684(%rsp)
movl $0x1, 0xd0(%rsp)
leaq 0x408(%rsp), %rdi
callq 0x67d0
jmp 0x3e11
leaq 0x658(%rsp), %rdi
callq 0x3548
movl 0x684(%rsp), %eax
addq $0x688, %rsp            # imm = 0x688
retq
leaq 0x408(%rsp), %rdi
callq 0x67d0
jmp 0x3e3c
jmp 0x3e3e
leaq 0x658(%rsp), %rdi
callq 0x3548
jmp 0x3e4d
jmp 0x3e4f
movq 0x648(%rsp), %rdi
callq 0x34b0
movq %rax, %rdi
callq 0x67c0
nopw %cs:(%rax,%rax)