// File: /workspace/github_cpp_makefile_star2_O2/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 $0x3d8, %rsp            # imm = 0x3D8
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x2be7(%rip), %rsi      # 0x5004
leaq -0x240(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x2954
leaq 0x2bec(%rip), %rsi      # 0x5020
leaq -0x220(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x2954
leaq -0x298(%rbp), %rdi
leaq -0x240(%rbp), %rsi
leaq -0x220(%rbp), %rdx
callq 0x2990
leaq -0x220(%rbp), %rdi
callq 0x20e0
leaq -0x240(%rbp), %rdi
callq 0x20e0
leaq 0x2ba8(%rip), %rsi      # 0x5028
leaq -0x200(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x2954
leaq 0x2b91(%rip), %rsi      # 0x5028
leaq -0x1e0(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x2954
leaq 0x2b77(%rip), %rsi      # 0x5028
leaq -0x1c0(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x2954
leaq 0x2b68(%rip), %rsi      # 0x5030
leaq -0x1a0(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2954
leaq -0x400(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
leaq -0x1c0(%rbp), %rcx
leaq -0x1a0(%rbp), %r8
callq 0x29d8
leaq -0x258(%rbp), %rdi
leaq -0x400(%rbp), %rsi
callq 0x2e16
leaq -0x400(%rbp), %rdi
callq 0x2a7a
leaq -0x1a0(%rbp), %rdi
callq 0x20e0
leaq -0x1c0(%rbp), %rdi
callq 0x20e0
leaq -0x1e0(%rbp), %rdi
callq 0x20e0
leaq -0x200(%rbp), %rdi
callq 0x20e0
leaq 0x2b01(%rip), %rsi      # 0x5057
leaq -0x180(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x2954
leaq 0x2af6(%rip), %rsi      # 0x5063
leaq -0x160(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x2954
leaq 0x2adf(%rip), %rsi      # 0x5066
leaq -0x140(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x2954
leaq -0x368(%rbp), %rdi
leaq -0x180(%rbp), %rsi
leaq -0x160(%rbp), %rdx
leaq -0x140(%rbp), %rcx
pushq $0x1
popq %r8
movl %r8d, %r9d
callq 0x2ada
leaq -0x298(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x2ab8
leaq -0x368(%rbp), %rdi
callq 0x2b52
leaq -0x140(%rbp), %rdi
callq 0x20e0
leaq -0x160(%rbp), %rdi
callq 0x20e0
leaq -0x180(%rbp), %rdi
callq 0x20e0
leaq 0x2a91(%rip), %rsi      # 0x509a
leaq -0x120(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x2954
leaq 0x2a87(%rip), %rsi      # 0x50a7
leaq -0x100(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x2954
leaq 0x2a70(%rip), %rsi      # 0x50aa
leaq -0xe0(%rbp), %rdi
leaq -0x40(%rbp), %r15
movq %r15, %rdx
callq 0x2954
leaq -0x300(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x100(%rbp), %rdx
leaq -0xe0(%rbp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2ada
leaq -0x298(%rbp), %r12
leaq -0x300(%rbp), %rsi
movq %r12, %rdi
callq 0x2ab8
leaq -0x300(%rbp), %rdi
callq 0x2b52
leaq -0xe0(%rbp), %rdi
callq 0x20e0
leaq -0x100(%rbp), %rdi
callq 0x20e0
leaq -0x120(%rbp), %rdi
callq 0x20e0
movslq %r14d, %rax
leaq -0x78(%rbp), %rcx
andl $0x0, (%rcx)
andq $0x0, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
andq $0x0, 0x20(%rcx)
movq %rax, -0x40(%rbp)
movq %rbx, -0x38(%rbp)
movq %r12, 0x28(%rcx)
movq %r15, 0x30(%rcx)
leaq -0x80(%rbp), %rbx
movq %rbx, %rdi
callq 0x2b7c
testb %al, %al
je 0x27c6
movq 0x58d7(%rip), %rdi      # 0x7fd8
leaq 0x29da(%rip), %rsi      # 0x50e2
callq 0x2180
movq %rax, %rdi
callq 0x20f0
movq 0x58bc(%rip), %rdi      # 0x7fd8
leaq 0x29dd(%rip), %rsi      # 0x5100
callq 0x2180
movq %rax, %rdi
callq 0x20f0
movq -0x68(%rbp), %r12
leaq -0xc0(%rbp), %r14
leaq 0x29df(%rip), %r13      # 0x5121
leaq 0x29dd(%rip), %rbx      # 0x5126
leaq 0x29d4(%rip), %r15      # 0x5124
leaq -0x78(%rbp), %rax
cmpq %rax, %r12
je 0x27e8
leaq 0x20(%r12), %rsi
movq %r14, %rdi
callq 0x2d84
movq 0x5867(%rip), %rdi      # 0x7fd8
movq %r13, %rsi
callq 0x2180
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2180
movq %rax, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2170
movq %rax, %rdi
movq %r15, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x2dbe
movq %r12, %rdi
callq 0x2110
movq %rax, %r12
jmp 0x2750
leaq -0xc0(%rbp), %rdi
movq %r12, (%rdi)
movq %rbx, 0x8(%rdi)
movq %r15, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
callq 0x2c38
movl %eax, %ebx
jmp 0x27ea
xorl %ebx, %ebx
leaq -0x80(%rbp), %rdi
callq 0x49d8
leaq -0x298(%rbp), %rdi
callq 0x2dde
movl %ebx, %eax
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2923
movq %rax, %rbx
leaq -0x300(%rbp), %rdi
callq 0x2b52
jmp 0x282c
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x20e0
jmp 0x283d
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x20e0
jmp 0x284e
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
jmp 0x28ee
jmp 0x28f5
movq %rax, %rbx
leaq -0x368(%rbp), %rdi
callq 0x2b52
jmp 0x2873
movq %rax, %rbx
leaq -0x140(%rbp), %rdi
callq 0x20e0
jmp 0x2884
movq %rax, %rbx
leaq -0x160(%rbp), %rdi
callq 0x20e0
jmp 0x2895
movq %rax, %rbx
leaq -0x180(%rbp), %rdi
jmp 0x28ee
jmp 0x28f5
movq %rax, %rbx
leaq -0x400(%rbp), %rdi
callq 0x2a7a
jmp 0x28b4
movq %rax, %rbx
leaq -0x1a0(%rbp), %rdi
callq 0x20e0
jmp 0x28c5
movq %rax, %rbx
leaq -0x1c0(%rbp), %rdi
callq 0x20e0
jmp 0x28d6
movq %rax, %rbx
leaq -0x1e0(%rbp), %rdi
callq 0x20e0
jmp 0x28e7
movq %rax, %rbx
leaq -0x200(%rbp), %rdi
callq 0x20e0
jmp 0x2940
movq %rax, %rbx
jmp 0x2940
movq %rax, %rbx
leaq -0x220(%rbp), %rdi
callq 0x20e0
jmp 0x290e
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
callq 0x20e0
jmp 0x294c
movq %rax, %rbx
jmp 0x294c
jmp 0x2923
movq %rax, %rbx
jmp 0x2937
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x2dbe
leaq -0x80(%rbp), %rdi
callq 0x49d8
leaq -0x298(%rbp), %rdi
callq 0x2dde
movq %rbx, %rdi
callq 0x2270