// File: /workspace/github_cpp_makefile_star2_O1/Se6[P]CmdLineArgs/test.cpp
// Function: getParamsTest(int, int&)
void getParamsTest(int test_no, int& failures) {

    const char* argv[] = {"test", "--values", "4,3 ", "2", "1" };
    int argc = nelem(argv);
    
    vector<int> values;
    vector<int> zeValues = {4, 3, 2, 1};
    
    try{
        CmdLineArgs cl(argc, const_cast<char**>(argv), "Test of command line arguments");
        values = cl.getParams("values", zeValues, true, "4 ints");
    } catch (const exception& error) {
        cout << "Test " << test_no << ": Unparsed failure: " << error.what() << endl;
        ++failures;
		return;
	}
    
    if( values != zeValues ) {
        cout << "Test " << test_no << ": Vector of int parameter failure. Got ";
        for(auto n: values)
            cout << n << " ";
        cout << " instead of ";
        for(auto n: zeValues)
            cout << n << " ";
        cout << "\n";
        ++failures;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movaps 0x3e17(%rip), %xmm0     # 0xa020
leaq 0x78(%rsp), %rsi
movups %xmm0, (%rsi)
leaq 0x20(%rsp), %rdi
movq %rsp, %rcx
movl $0x4, %edx
callq 0x7296
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3f52(%rip), %rsi      # 0xa185
leaq 0x3f69(%rip), %rdx      # 0xa1a3
movq %rsp, %rdi
movq %rbx, 0x38(%rsp)
callq 0x7446
leaq 0x7b12(%rip), %rdx      # 0xdd60
leaq 0x78(%rsp), %rdi
movq %rsp, %rcx
movl $0x5, %esi
movl $0x1, %r8d
callq 0x3680
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x627c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31f0
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x3fcd(%rip), %rsi      # 0xa256
leaq 0x3fcc(%rip), %rdx      # 0xa25c
callq 0x7446
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4117(%rip), %rsi      # 0xa3bd
leaq 0x4116(%rip), %rdx      # 0xa3c3
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x7446
leaq 0x40(%rsp), %rdi
leaq 0x78(%rsp), %rsi
movq %rsp, %rdx
leaq 0x20(%rsp), %r8
movl $0x20, %ecx
movl $0x1, %r9d
pushq $0x2c
pushq %r14
callq 0x89be
addq $0x10, %rsp
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %rbx
movq 0x50(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x631b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x31f0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6331
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31f0
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
callq 0x6800
movq -0x20(%r12), %rdi
leaq 0xc0(%rsp), %rax
cmpq %rax, %rdi
je 0x6363
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x31f0
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6384
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x31f0
leaq 0x78(%rsp), %rdi
callq 0x667e
movq %rbx, %rdx
subq %r15, %rdx
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
cmpq %rax, %rdx
jne 0x63bf
cmpq %r15, %rbx
je 0x64aa
movq %r15, %rdi
callq 0x3200
testl %eax, %eax
je 0x64aa
movq 0x7c02(%rip), %rdi      # 0xdfc8
leaq 0x3e90(%rip), %rsi      # 0xa25d
movl $0x5, %edx
callq 0x3230
movq 0x7bea(%rip), %rdi      # 0xdfc8
movl %ebp, %esi
callq 0x3360
leaq 0x3f71(%rip), %rsi      # 0xa35d
movl $0x27, %edx
movq %rax, %rdi
callq 0x3230
cmpq %rbx, %r15
je 0x6433
movq 0x7bc3(%rip), %r12      # 0xdfc8
leaq 0x3cae(%rip), %r13      # 0xa0ba
movq %r15, %rbp
movl (%rbp), %esi
movq %r12, %rdi
callq 0x3360
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x3230
addq $0x4, %rbp
cmpq %rbx, %rbp
jne 0x640f
movq 0x7b8e(%rip), %rdi      # 0xdfc8
leaq 0x3f44(%rip), %rsi      # 0xa385
movl $0xc, %edx
callq 0x3230
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %rbp
cmpq %rbp, %rbx
je 0x648b
movq 0x7b67(%rip), %r12      # 0xdfc8
leaq 0x3c52(%rip), %r13      # 0xa0ba
movl (%rbx), %esi
movq %r12, %rdi
callq 0x3360
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x3230
addq $0x4, %rbx
cmpq %rbp, %rbx
jne 0x6468
movq 0x7b36(%rip), %rdi      # 0xdfc8
leaq 0x3cd7(%rip), %rsi      # 0xa170
movl $0x1, %edx
callq 0x3230
movq 0x38(%rsp), %rax
incl (%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x64c1
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x31f0
testq %r15, %r15
je 0x64d4
subq %r15, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x31f0
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x650b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x650b
movq %rdx, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6529
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x6529
movq %rdx, %r14
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x72dc
jmp 0x6559
movq %rdx, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6559
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x6559
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x65eb
movq %rbx, %rdi
callq 0x30b0
movq %rax, %r14
movq 0x7a53(%rip), %rdi      # 0xdfc8
leaq 0x3ce1(%rip), %rsi      # 0xa25d
movl $0x5, %edx
callq 0x3230
movq 0x7a3b(%rip), %rdi      # 0xdfc8
movl %ebp, %esi
callq 0x3360
movq %rax, %r15
leaq 0x3cc5(%rip), %rsi      # 0xa263
movl $0x14, %edx
movq %rax, %rdi
callq 0x3230
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
movq 0x38(%rsp), %rax
incl (%rax)
callq 0x3320
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x64aa
movq %rax, %rbx
jmp 0x65eb
movq %rax, %rbx
callq 0x3320
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x660d
movq %rax, %rdi
callq 0x7322
movq %rax, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x6624
jmp 0x660a
jmp 0x660a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6624
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x31f0
testq %r15, %r15
je 0x6637
subq %r15, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x31f0
movq %rbx, %rdi
callq 0x3370
nop