// File: /workspace/github_cpp_makefile_star2_O2/Se6[P]CmdLineArgs/example.cpp
// Function: main
int main(int argc, char **argv){
	
	string name;
	bool help;
    int number;
	float ratio;
	string usage;

    vector<int> values;
    vector<int> default_numbers = {1, 2, 3};

    vector<string> some_strings;
    vector<string> default_strings  = {"one", "two", "three"};

    vector<string> remaining;
	
	try{
        CmdLineArgs cl(argc, argv, "Example of command line arguments");

        help            = cl.getFlag("help", "Getting usage");
        name            = cl.getParam("name", "stone", "The name of something");
        number          = cl.getParam("number", 'n', 5, "Number of whatever");

        cl.addUsageSeparator("  == Advanced options:");
        some_strings    = cl.getParams("some_strings", default_strings, false, "some strings separated by comma");
        ratio           = cl.getParam("ratio", 0.2f, "The ratio");
        values          = cl.getParams("values", default_numbers, true, "A comma separated list of 3 values");

        cl.addUsageOutro("\nSome examples....\n");

        usage           = cl.usage();
        remaining       = cl.getRemaining();

        cl.throwIfUnparsed();
        
    } catch (const exception& error) {
		cerr << usage << error.what() << endl;
		return 1;
	}
	
	if(argc==1 || help)
		cout << usage;

	cout << endl;
	cout << "name=" << name << endl;
    cout << "some_stings=";
    for(auto &st: some_strings)
        cout << st << ",";
	cout << endl;
    cout << "number=" << number << endl;
	cout << "ratio=" << ratio << endl;
	cout << "numbers=";
    for(auto num: values)
        cout << num << ",";
	cout << endl;
	
	if(!remaining.empty()){
		cout << "remaining: ";
		for(auto rem: remaining)
			cout << rem << " ";
	}else
		cout << "no arg remaining";
	
	cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %r14
movl %edi, %ebx
leaq 0x1a8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x158(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
andq $0x0, 0xd0(%rsp)
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq 0xd8(%rsp), %rsi
movq %rax, (%rsi)
movl $0x3, 0x8(%rsi)
leaq 0x180(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x18(%rsp), %rcx
callq 0x5706
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
andq $0x0, 0xb0(%rsp)
leaq 0x3650(%rip), %rsi      # 0x8136
leaq 0xd8(%rsp), %r15
leaq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x53e4
leaq 0xf8(%rsp), %r12
leaq 0x35e6(%rip), %rsi      # 0x80f0
leaq 0x38(%rsp), %rdx
movq %r12, %rdi
callq 0x53e4
leaq 0x118(%rsp), %r12
leaq 0x35ce(%rip), %rsi      # 0x80f4
leaq 0x80(%rsp), %rdx
movq %r12, %rdi
callq 0x53e4
leaq 0x168(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
pushq $0x3
popq %rdx
leaq 0x60(%rsp), %rcx
callq 0x573c
pushq $0x40
popq %r15
leaq (%rsp,%r15), %rdi
addq $0xd8, %rdi
callq 0x30e0
addq $-0x20, %r15
cmpq $-0x20, %r15
jne 0x4b57
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
leaq 0x3574(%rip), %rsi      # 0x80fa
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x53e4
leaq 0xd8(%rsp), %rdi
leaq 0x18(%rsp), %rcx
pushq $0x1
popq %r8
movl %ebx, %esi
movq %r14, %rdx
callq 0x35e8
leaq 0x18(%rsp), %rdi
callq 0x30e0
leaq 0x355b(%rip), %rsi      # 0x811c
leaq 0x18(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x53e4
leaq 0x3547(%rip), %rsi      # 0x8121
leaq 0x38(%rsp), %rdi
leaq 0x16(%rsp), %rdx
callq 0x53e4
leaq 0xd8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x38(%rsp), %rdx
callq 0x3b30
movl %eax, %r14d
leaq 0x38(%rsp), %rdi
callq 0x30e0
leaq 0x18(%rsp), %rdi
callq 0x30e0
leaq 0x3511(%rip), %rsi      # 0x812f
leaq 0x38(%rsp), %rdi
leaq 0x16(%rsp), %rdx
callq 0x53e4
leaq 0x3506(%rip), %rsi      # 0x813a
leaq 0x80(%rsp), %rdi
leaq 0x17(%rsp), %rdx
callq 0x53e4
leaq 0x34e7(%rip), %rcx      # 0x8134
leaq 0x18(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x80(%rsp), %r8
callq 0x3ef8
leaq 0x198(%rsp), %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0x3260
movq %r15, %rdi
callq 0x30e0
leaq 0x80(%rsp), %rdi
callq 0x30e0
leaq 0x38(%rsp), %rdi
callq 0x30e0
leaq 0x34a9(%rip), %rsi      # 0x8150
leaq 0x18(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x53e4
leaq 0x3497(%rip), %rsi      # 0x8157
leaq 0x38(%rsp), %rdi
leaq 0x16(%rsp), %rdx
callq 0x53e4
leaq 0xd8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
pushq $0x6e
popq %rdx
pushq $0x5
popq %rcx
leaq 0x38(%rsp), %r8
callq 0x5776
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x30e0
leaq 0x18(%rsp), %rdi
callq 0x30e0
leaq 0x3461(%rip), %rsi      # 0x816a
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x53e4
leaq 0xd8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x457a
leaq 0x18(%rsp), %rdi
callq 0x30e0
leaq 0x3446(%rip), %rsi      # 0x8181
leaq 0x18(%rsp), %rdi
leaq 0x16(%rsp), %rdx
callq 0x53e4
leaq 0x343d(%rip), %rsi      # 0x818e
leaq 0x38(%rsp), %rdi
leaq 0x17(%rsp), %rdx
callq 0x53e4
movl $0x2c, (%rsp)
leaq 0x80(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x168(%rsp), %rcx
leaq 0x38(%rsp), %r9
xorl %r8d, %r8d
callq 0x4554
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %r15
movq %r15, %rsi
callq 0x64ae
movq %r15, %rdi
callq 0x53c2
leaq 0x38(%rsp), %rdi
callq 0x30e0
leaq 0x18(%rsp), %rdi
callq 0x30e0
leaq 0x33e6(%rip), %rsi      # 0x81b2
leaq 0x18(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x53e4
leaq 0x33c9(%rip), %rsi      # 0x81ae
leaq 0x38(%rsp), %rdi
leaq 0x16(%rsp), %rdx
callq 0x53e4
leaq 0xd8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movss 0x3217(%rip), %xmm0     # 0x8020
leaq 0x38(%rsp), %rdx
callq 0x5ca8
movss %xmm0, 0x5c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x30e0
leaq 0x18(%rsp), %rdi
callq 0x30e0
leaq 0x33a0(%rip), %rsi      # 0x81d4
leaq 0x18(%rsp), %rdi
leaq 0x16(%rsp), %rdx
callq 0x53e4
leaq 0x336e(%rip), %rsi      # 0x81b8
leaq 0x38(%rsp), %rdi
leaq 0x17(%rsp), %rdx
callq 0x53e4
movl $0x2c, (%rsp)
leaq 0x80(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x180(%rsp), %rcx
pushq $0x1
popq %r8
leaq 0x38(%rsp), %r9
callq 0x5cb4
leaq 0xc0(%rsp), %rdi
leaq 0x80(%rsp), %r15
movq %r15, %rsi
callq 0x781a
movq %r15, %rdi
callq 0x678a
leaq 0x38(%rsp), %rdi
callq 0x30e0
leaq 0x18(%rsp), %rdi
callq 0x30e0
leaq 0x3315(%rip), %rsi      # 0x81db
leaq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x53e4
leaq 0x110(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x33e0
leaq 0x18(%rsp), %rdi
callq 0x30e0
leaq 0x18(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x45dc
leaq 0x148(%rsp), %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0x3260
movq %r15, %rdi
callq 0x30e0
leaq 0x18(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x55e6
leaq 0x60(%rsp), %rdi
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0x64ae
movq %r15, %rdi
callq 0x53c2
leaq 0xd8(%rsp), %rdi
callq 0x490a
leaq 0xd8(%rsp), %rdi
callq 0x5cda
cmpl $0x1, %ebx
je 0x4f70
testl %r14d, %r14d
je 0x4f84
movq 0x7051(%rip), %rdi      # 0xbfc8
leaq 0x148(%rsp), %rsi
callq 0x3200
movq 0x703d(%rip), %rdi      # 0xbfc8
callq 0x3100
movq 0x7031(%rip), %rdi      # 0xbfc8
leaq 0x3251(%rip), %rsi      # 0x81ef
callq 0x3210
leaq 0x198(%rsp), %rsi
movq %rax, %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3100
movq 0x7006(%rip), %rdi      # 0xbfc8
leaq 0x322c(%rip), %rsi      # 0x81f5
callq 0x3210
movq 0xa0(%rsp), %rbx
movq 0xa8(%rsp), %r12
movq 0x6fe3(%rip), %r14      # 0xbfc8
leaq 0x308d(%rip), %r15      # 0x8079
cmpq %r12, %rbx
je 0x500d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3200
movq %rax, %rdi
movq %r15, %rsi
callq 0x3210
addq $0x20, %rbx
jmp 0x4fec
movq 0x6fb4(%rip), %rdi      # 0xbfc8
callq 0x3100
movq 0x6fa8(%rip), %rdi      # 0xbfc8
leaq 0x31db(%rip), %rsi      # 0x8202
callq 0x3210
movq %rax, %rdi
movl %ebp, %esi
callq 0x3380
movq %rax, %rdi
callq 0x3100
movq 0x6f83(%rip), %rdi      # 0xbfc8
leaq 0x31be(%rip), %rsi      # 0x820a
callq 0x3210
movq %rax, %rdi
movss 0x5c(%rsp), %xmm0
callq 0x31a0
movq %rax, %rdi
callq 0x3100
movq 0x6f5a(%rip), %rdi      # 0xbfc8
leaq 0x319c(%rip), %rsi      # 0x8211
callq 0x3210
movq 0xc0(%rsp), %r15
movq 0xc8(%rsp), %r12
movq 0x6f37(%rip), %rbx      # 0xbfc8
leaq 0x2fe1(%rip), %r14      # 0x8079
cmpq %r12, %r15
je 0x50b9
movl (%r15), %esi
movq %rbx, %rdi
callq 0x3380
movq %rax, %rdi
movq %r14, %rsi
callq 0x3210
addq $0x4, %r15
jmp 0x5098
movq 0x6f08(%rip), %rdi      # 0xbfc8
callq 0x3100
movq 0x60(%rsp), %rax
cmpq 0x68(%rsp), %rax
je 0x5138
movq 0x6ef0(%rip), %rdi      # 0xbfc8
leaq 0x313b(%rip), %rsi      # 0x821a
callq 0x3210
movq 0x60(%rsp), %rbx
movq 0x68(%rsp), %r13
leaq 0xd8(%rsp), %r14
movq 0x6ecb(%rip), %r15      # 0xbfc8
leaq 0x2fa6(%rip), %r12      # 0x80aa
cmpq %r13, %rbx
je 0x514b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32a0
movq %r15, %rdi
movq %r14, %rsi
callq 0x3200
movq %rax, %rdi
movq %r12, %rsi
callq 0x3210
movq %r14, %rdi
callq 0x30e0
addq $0x20, %rbx
jmp 0x5104
movq 0x6e89(%rip), %rdi      # 0xbfc8
leaq 0x30e0(%rip), %rsi      # 0x8226
callq 0x3210
xorl %ebx, %ebx
movq 0x6e74(%rip), %rdi      # 0xbfc8
callq 0x3100
leaq 0x60(%rsp), %rdi
callq 0x53c2
leaq 0x168(%rsp), %rdi
callq 0x53c2
leaq 0xa0(%rsp), %rdi
callq 0x53c2
leaq 0x180(%rsp), %rdi
callq 0x678a
leaq 0xc0(%rsp), %rdi
callq 0x678a
leaq 0x148(%rsp), %rdi
callq 0x30e0
leaq 0x198(%rsp), %rdi
callq 0x30e0
movl %ebx, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5233
jmp 0x5233
jmp 0x5233
jmp 0x5221
jmp 0x5233
jmp 0x520f
jmp 0x5221
jmp 0x5233
jmp 0x520f
jmp 0x5221
jmp 0x5233
jmp 0x520f
jmp 0x5221
jmp 0x5233
jmp 0x5221
jmp 0x5233
jmp 0x520f
jmp 0x5221
jmp 0x5233
movq %rdx, %r14
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x30e0
jmp 0x5206
movq %rdx, %r14
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x522c
jmp 0x5233
movq %rdx, %r14
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x30e0
jmp 0x5227
movq %rdx, %r14
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x30e0
jmp 0x5239
movq %rdx, %r14
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x5cda
cmpl $0x1, %r14d
jne 0x5335
movq %rbx, %rdi
callq 0x30b0
movq %rax, %rbx
movq 0x6d86(%rip), %rdi      # 0xbfe8
leaq 0x148(%rsp), %rsi
callq 0x3200
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x3210
movq %rax, %rdi
callq 0x3100
callq 0x3340
pushq $0x1
popq %rbx
jmp 0x5159
jmp 0x5332
movq %rax, %rbx
callq 0x3340
jmp 0x5335
movq %rax, %rdi
callq 0x5d02
movq %rdx, %r14
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x30e0
jmp 0x5246
movq %rdx, %r14
movq %rax, %rbx
jmp 0x5246
movq %rax, %rbx
pushq $0x40
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xd8, %rdi
callq 0x30e0
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x52dc
jmp 0x534c
jmp 0x52fa
movq %rax, %rbx
addq $-0x20, %r12
movq %r12, %rdi
callq 0x30e0
cmpq %r15, %r12
jne 0x52fd
jmp 0x534c
movq %rax, %rbx
jmp 0x534c
movq %rax, %rbx
jmp 0x5366
jmp 0x5332
jmp 0x5332
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x30e0
jmp 0x5335
jmp 0x5332
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x53c2
leaq 0x168(%rsp), %rdi
callq 0x53c2
leaq 0xa0(%rsp), %rdi
callq 0x53c2
leaq 0x180(%rsp), %rdi
callq 0x678a
leaq 0xc0(%rsp), %rdi
callq 0x678a
leaq 0x148(%rsp), %rdi
callq 0x30e0
leaq 0x198(%rsp), %rdi
callq 0x30e0
movq %rbx, %rdi
callq 0x3390
nop