// File: /workspace/github_cpp_makefile_star2_O1/moya-lang[P]Arguments/Example2.cpp
// Function: main
int main(int argc, const char **argv)
{
    Syntax syntax("My simple command-line tool", "1.0.0.1");

    syntax.add(Command("ignored", "ignored", "ignored", "General information on my application."));
    syntax.add(Parameter("first-param", "-a", "This is a required parameter with associated value.", true, true));
    syntax.add(Parameter("second-param", "-b", "This is an optional parameter without associated value.", false, false));

    Arguments arguments(argc, argv);
    Parser parser(syntax, arguments);
    if (!parser.parse()) {
        Help help(syntax, parser, arguments);
        return help.run();
    }

    std::cout << "Application started normally." << std::endl;
    std::cout << "Following arguments were parsed:" << std::endl;

    for (auto item : parser)
        std::cout << "   '" << item.first << "' = '" << item.second << "'" << std::endl;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rsi, %rbx
movl %edi, %r12d
leaq -0x1a8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x4c2c(%rip), %rsi      # 0x7004
leaq 0x4c40(%rip), %rdx      # 0x701f
leaq -0x1b8(%rbp), %rdi
callq 0x602c
leaq -0x188(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x4c23(%rip), %rsi      # 0x7020
leaq 0x4c23(%rip), %rdx      # 0x7027
leaq -0x198(%rbp), %rdi
callq 0x602c
leaq -0x250(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
leaq -0x198(%rbp), %rdx
callq 0x2daa
movq -0x198(%rbp), %rdi
cmpq %r15, %rdi
je 0x2445
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x2170
movl %r12d, -0x2c(%rbp)
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0x2464
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x168(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x4bb1(%rip), %rsi      # 0x7028
leaq 0x4bb1(%rip), %rdx      # 0x702f
leaq -0x178(%rbp), %rdi
callq 0x602c
leaq -0x148(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x4b8c(%rip), %rsi      # 0x7028
leaq 0x4b8c(%rip), %rdx      # 0x702f
leaq -0x158(%rbp), %rdi
callq 0x602c
leaq -0x128(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x4b67(%rip), %rsi      # 0x7028
leaq 0x4b67(%rip), %rdx      # 0x702f
leaq -0x138(%rbp), %rdi
callq 0x602c
leaq -0x108(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x4b4a(%rip), %rsi      # 0x7030
leaq 0x4b69(%rip), %rdx      # 0x7056
leaq -0x118(%rbp), %rdi
callq 0x602c
movq %rbx, -0x38(%rbp)
leaq -0x3b8(%rbp), %rdi
leaq -0x178(%rbp), %rsi
leaq -0x158(%rbp), %rdx
leaq -0x138(%rbp), %rcx
leaq -0x118(%rbp), %r8
callq 0x2e2c
leaq -0x210(%rbp), %rbx
leaq -0x3b8(%rbp), %rsi
movq %rbx, %rdi
callq 0x3588
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq -0x200(%rbp)
leaq -0x338(%rbp), %rbx
movq %rbx, %rdi
callq 0x3890
movq -0x20(%rbx), %rdi
leaq -0x348(%rbp), %rax
cmpq %rax, %rdi
je 0x257b
movq -0x348(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x368(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x259a
movq -0x368(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x388(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25b9
movq -0x388(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x3a8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25d8
movq -0x3a8(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0x118(%rbp), %rdi
cmpq %r15, %rdi
je 0x25f3
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0x138(%rbp), %rdi
cmpq %r14, %rdi
je 0x260e
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0x158(%rbp), %rdi
cmpq %r13, %rdi
je 0x2629
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0x178(%rbp), %rdi
cmpq %r12, %rdi
je 0x2644
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0xe8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x4a00(%rip), %rsi      # 0x7057
leaq 0x4a04(%rip), %rdx      # 0x7062
leaq -0xf8(%rbp), %rdi
callq 0x602c
leaq -0xc8(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x49e7(%rip), %rsi      # 0x7063
leaq 0x49e2(%rip), %rdx      # 0x7065
leaq -0xd8(%rbp), %rdi
callq 0x602c
leaq -0xa8(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x49c5(%rip), %rsi      # 0x7066
leaq 0x49f1(%rip), %rdx      # 0x7099
leaq -0xb8(%rbp), %rdi
callq 0x602c
leaq -0x320(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
leaq -0xb8(%rbp), %rcx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x3010
leaq -0x250(%rbp), %rdi
leaq -0x320(%rbp), %rsi
callq 0x2fd4
leaq -0x2d0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2713
movq -0x2d0(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x2f0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2732
movq -0x2f0(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x310(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2751
movq -0x310(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x276c
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x2787
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0xf8(%rbp), %rdi
cmpq %r12, %rdi
je 0x27a2
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x88(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x48e5(%rip), %rsi      # 0x709a
leaq 0x48ea(%rip), %rdx      # 0x70a6
leaq -0x98(%rbp), %rdi
callq 0x602c
leaq -0x68(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x48d0(%rip), %rsi      # 0x70a7
leaq 0x48cb(%rip), %rdx      # 0x70a9
leaq -0x78(%rbp), %rdi
callq 0x602c
leaq -0x48(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x48b4(%rip), %rsi      # 0x70aa
leaq 0x48e4(%rip), %rdx      # 0x70e1
leaq -0x58(%rbp), %rdi
callq 0x602c
leaq -0x2b8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x78(%rbp), %rdx
leaq -0x58(%rbp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3010
leaq -0x250(%rbp), %rbx
leaq -0x2b8(%rbp), %rsi
movq %rbx, %rdi
callq 0x2fd4
leaq -0x268(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x285c
movq -0x268(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x288(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x287b
movq -0x288(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x2a8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x289a
movq -0x2a8(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x28af
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x28c4
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0x98(%rbp), %rdi
cmpq %r12, %rdi
je 0x28df
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2170
movslq -0x2c(%rbp), %rax
leaq -0x408(%rbp), %r15
movq %rax, (%r15)
movq -0x38(%rbp), %rax
movq %rax, 0x8(%r15)
leaq -0x3f0(%rbp), %r12
movl $0x0, (%r12)
xorl %eax, %eax
movq %rax, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
movq %rax, 0x20(%r12)
movq %rbx, 0x28(%r12)
movq %r15, 0x30(%r12)
leaq -0x3f8(%rbp), %r14
movq %r14, %rdi
callq 0x313e
testb %al, %al
je 0x2aed
movq 0x7696(%rip), %rbx      # 0x9fd8
leaq 0x4799(%rip), %rsi      # 0x70e2
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq 0x7664(%rip), %rdi      # 0x9fd8
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq 0x7650(%rip), %rbx      # 0x9fd8
leaq 0x4771(%rip), %rsi      # 0x7100
movl $0x20, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq 0x761e(%rip), %rdi      # 0x9fd8
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq -0x3e0(%rbp), %r15
xorl %r14d, %r14d
cmpq %r12, %r15
je 0x2b0e
movq 0x75f7(%rip), %r13      # 0x9fd8
leaq 0x473c(%rip), %r14      # 0x7124
leaq 0x20(%r15), %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x33e0
movl $0x4, %edx
movq %r13, %rdi
leaq 0x471a(%rip), %rsi      # 0x7121
callq 0x21b0
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
movq %r13, %rdi
callq 0x21b0
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0x46f2(%rip), %rsi      # 0x7126
callq 0x21b0
movq -0x1d8(%rbp), %rsi
movq -0x1d0(%rbp), %rdx
movq %rbx, %rdi
callq 0x21b0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20f0
movq -0x1d8(%rbp), %rdi
leaq -0x1c8(%rbp), %rax
cmpq %rax, %rdi
je 0x2aab
movq -0x1c8(%rbp), %rsi
incq %rsi
callq 0x2170
movq -0x1f8(%rbp), %rdi
leaq -0x1e8(%rbp), %rax
cmpq %rax, %rdi
je 0x2acd
movq -0x1e8(%rbp), %rsi
incq %rsi
callq 0x2170
movq %r15, %rdi
callq 0x2100
movq %rax, %r15
cmpq %r12, %rax
jne 0x29e8
leaq -0x210(%rbp), %rbx
xorl %r14d, %r14d
jmp 0x2b15
leaq -0x1f8(%rbp), %rdi
movq %rbx, (%rdi)
movq %r14, 0x8(%rdi)
movq %r15, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
callq 0x3236
movl %eax, %r14d
leaq -0x210(%rbp), %rbx
leaq -0x3f8(%rbp), %rdi
callq 0x5eb6
movq %rbx, %rdi
callq 0x5f66
leaq -0x220(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b48
movq -0x220(%rbp), %rsi
incq %rsi
callq 0x2170
leaq -0x240(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b67
movq -0x240(%rbp), %rsi
incq %rsi
callq 0x2170
movl %r14d, %eax
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d37
movq %rax, %rbx
leaq -0x2b8(%rbp), %rdi
callq 0x30e0
jmp 0x2b95
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r15, %rdi
je 0x2baf
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2baf
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x2bc9
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2bc9
movq %rax, %rbx
movq -0x98(%rbp), %rdi
cmpq %r12, %rdi
je 0x2d57
movq -0x88(%rbp), %rsi
jmp 0x2ce6
jmp 0x2cf0
movq %rax, %rbx
leaq -0x320(%rbp), %rdi
callq 0x30e0
jmp 0x2bfe
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x2c1e
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2c1e
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x2c3e
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2c3e
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
cmpq %r12, %rdi
je 0x2d57
movq -0xe8(%rbp), %rsi
jmp 0x2ce6
jmp 0x2cf0
movq %rax, %rbx
leaq -0x3b8(%rbp), %rdi
callq 0x2f52
jmp 0x2c73
movq %rax, %rbx
movq -0x118(%rbp), %rdi
cmpq %r15, %rdi
je 0x2c93
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2c93
movq %rax, %rbx
movq -0x138(%rbp), %rdi
cmpq %r14, %rdi
je 0x2cb3
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2cb3
movq %rax, %rbx
movq -0x158(%rbp), %rdi
cmpq %r13, %rdi
je 0x2cd3
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2cd3
movq %rax, %rbx
movq -0x178(%rbp), %rdi
cmpq %r12, %rdi
je 0x2d57
movq -0x168(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2d57
movq %rax, %rbx
jmp 0x2d57
movq %rax, %rbx
movq -0x198(%rbp), %rdi
cmpq %r15, %rdi
je 0x2d18
movq -0x188(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2d18
movq %rax, %rbx
movq -0x1b8(%rbp), %rdi
cmpq %r14, %rdi
je 0x2d63
movq -0x1a8(%rbp), %rsi
incq %rsi
callq 0x2170
jmp 0x2d63
jmp 0x2d37
movq %rax, %rbx
jmp 0x2d4b
movq %rax, %rbx
leaq -0x1f8(%rbp), %rdi
callq 0x344c
leaq -0x3f8(%rbp), %rdi
callq 0x5eb6
leaq -0x250(%rbp), %rdi
callq 0x3492
movq %rbx, %rdi
callq 0x2230
nop