// File: /workspace/github_cpp_makefile_star2_O3/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 $0xf8, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movaps 0x3e03(%rip), %xmm0     # 0xa020
leaq 0x80(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x20(%rsp), %rdi
movq %rsp, %rcx
movl $0x4, %edx
callq 0x7304
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3f3b(%rip), %rsi      # 0xa185
leaq 0x3f52(%rip), %rdx      # 0xa1a3
movq %rsp, %rdi
movq %rbx, 0x38(%rsp)
callq 0x74b8
leaq 0x7afb(%rip), %rdx      # 0xdd60
leaq 0x80(%rsp), %rdi
movq %rsp, %rcx
movl $0x5, %esi
movl $0x1, %r8d
callq 0x3680
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6296
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31f0
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x3fb3(%rip), %rsi      # 0xa256
leaq 0x3fb2(%rip), %rdx      # 0xa25c
callq 0x74b8
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x40fd(%rip), %rsi      # 0xa3bd
leaq 0x40fc(%rip), %rdx      # 0xa3c3
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x74b8
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movq %rsp, %rdx
leaq 0x20(%rsp), %r8
movl $0x20, %ecx
movl $0x1, %r9d
pushq $0x2c
pushq %r14
callq 0x8a5a
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 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x6338
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x31f0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x634e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31f0
leaq 0xd8(%rsp), %r12
movq %r12, %rdi
callq 0x681e
movq -0x20(%r12), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x6380
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x31f0
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x63a1
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x31f0
leaq 0x80(%rsp), %rdi
callq 0x669a
movq %rbx, %rdx
subq %r15, %rdx
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
cmpq %rax, %rdx
jne 0x63df
cmpq %r15, %rbx
je 0x64ca
movq %r15, %rdi
callq 0x3200
testl %eax, %eax
je 0x64ca
movq 0x7be2(%rip), %rdi      # 0xdfc8
leaq 0x3e70(%rip), %rsi      # 0xa25d
movl $0x5, %edx
callq 0x3230
movq 0x7bca(%rip), %rdi      # 0xdfc8
movl %ebp, %esi
callq 0x3360
leaq 0x3f51(%rip), %rsi      # 0xa35d
movl $0x27, %edx
movq %rax, %rdi
callq 0x3230
cmpq %rbx, %r15
je 0x6453
movq 0x7ba3(%rip), %r12      # 0xdfc8
leaq 0x3c8e(%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 0x642f
movq 0x7b6e(%rip), %rdi      # 0xdfc8
leaq 0x3f24(%rip), %rsi      # 0xa385
movl $0xc, %edx
callq 0x3230
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %rbp
cmpq %rbp, %rbx
je 0x64ab
movq 0x7b47(%rip), %r12      # 0xdfc8
leaq 0x3c32(%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 0x6488
movq 0x7b16(%rip), %rdi      # 0xdfc8
leaq 0x3cb7(%rip), %rsi      # 0xa170
movl $0x1, %edx
callq 0x3230
movq 0x38(%rsp), %rax
incl (%rax)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x64e1
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x31f0
testq %r15, %r15
je 0x64f4
subq %r15, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x31f0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x652b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x652b
movq %rdx, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x6549
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x6549
movq %rdx, %r14
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x734a
jmp 0x657c
movq %rdx, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x657c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31f0
jmp 0x657c
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x660e
movq %rbx, %rdi
callq 0x30b0
movq %rax, %r14
movq 0x7a30(%rip), %rdi      # 0xdfc8
leaq 0x3cbe(%rip), %rsi      # 0xa25d
movl $0x5, %edx
callq 0x3230
movq 0x7a18(%rip), %rdi      # 0xdfc8
movl %ebp, %esi
callq 0x3360
movq %rax, %r15
leaq 0x3ca2(%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 0x64ca
movq %rax, %rbx
jmp 0x660e
movq %rax, %rbx
callq 0x3320
xorl %r14d, %r14d
xorl %r15d, %r15d
jmp 0x662a
movq %rax, %rdi
callq 0x7390
movq %rax, %rbx
jmp 0x6654
jmp 0x6627
jmp 0x6627
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x6641
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x31f0
testq %r15, %r15
je 0x6654
subq %r15, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x31f0
movq %rbx, %rdi
callq 0x3370