// File: /workspace/github_c_makefile_star2_O2/aremmell[P]libsir/tests/tests_shared.c
// Function: parse_cmd_line
bool parse_cmd_line(int argc, char** argv, const sir_cl_arg* args, size_t num_args,
    sir_test* tests, size_t num_tests, sir_cl_config* config) {

    if (!argv || !args || !tests || !config)
        return false;

    (void)memset(config, 0, sizeof(sir_cl_config));

    for (int n = 1; n < argc; n++) {
        const sir_cl_arg* this_arg = find_cl_arg(argv[n], args, num_args);
        if (!this_arg) {
            ERROR_MSG("unknown option '%s'", argv[n]);
            print_usage_info(args, num_args);
            return false;
        }
        if (_sir_strsame(this_arg->flag, SIR_CL_PERFFLAG, strlen(SIR_CL_PERFFLAG))) {
            config->only = mark_test_to_run(SIR_CL_PERFNAME, tests, num_tests);
            if (config->only)
                config->to_run = 1;
        } else if (_sir_strsame(this_arg->flag, SIR_CL_ONLYFLAG, strlen(SIR_CL_ONLYFLAG))) {
            while (++n < argc) {
                if (!_sir_validstrnofail(argv[n]))
                    continue;
                if (*argv[n] == '-' || !mark_test_to_run(argv[n], tests, num_tests)) {
                    ERROR_MSG("invalid argument to %s: '%s'", SIR_CL_ONLYFLAG, argv[n]);
                    print_usage_info(args, num_args);
                    return false;
                }
                config->to_run++;
            }
            if (0 == config->to_run) {
                ERROR_MSG("value expected for '%s'", SIR_CL_ONLYFLAG);
                print_usage_info(args, num_args);
                return false;
            }
            config->only = true;
        } else if (_sir_strsame(this_arg->flag, SIR_CL_LISTFLAG, strlen(SIR_CL_LISTFLAG))) {
            print_test_list(tests, num_tests);
            return false;
        } else if (_sir_strsame(this_arg->flag, SIR_CL_LEAVELOGSFLAG, strlen(SIR_CL_LEAVELOGSFLAG))) {
            config->leave_logs = true;
        } else if (_sir_strsame(this_arg->flag, SIR_CL_WAITFLAG, strlen(SIR_CL_WAITFLAG))) {
            config->wait = true;
        } else if (_sir_strsame(this_arg->flag, SIR_CL_VERSIONFLAG, strlen(SIR_CL_VERSIONFLAG))) {
            print_libsir_version();
            return false;
        } else if (_sir_strsame(this_arg->flag, SIR_CL_HELPFLAG, strlen(SIR_CL_HELPFLAG))) {
            print_usage_info(args, num_args);
            return false;
        } else {
            ERROR_MSG("unknown option '%s'", this_arg->flag);
            return false;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x70(%rsp), %r12
movq %rdx, %xmm0
movq %rsi, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %r12, %xmm0
movq %r8, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm3
shufps $0xdd, %xmm2, %xmm3     # xmm3 = xmm3[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm3, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
je 0x3c28
xorl %ebp, %ebp
jmp 0x3e22
movq %rsi, %r13
movq %r8, 0x20(%rsp)
movq %r9, 0x28(%rsp)
movdqu %xmm0, (%r12)
movslq %edi, %rax
movq %rax, 0x30(%rsp)
pushq $0x1
popq %rbp
pushq $0x6
popq %r14
movq %rdx, 0x18(%rsp)
movq %rcx, 0x8(%rsp)
movl %edi, 0x4(%rsp)
cmpl %edi, %ebp
jge 0x3df8
movslq %ebp, %r15
movq (%r13,%r15,8), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x3b78
testq %rax, %rax
je 0x3dfd
movl %ebp, 0x14(%rsp)
movq (%rax), %rbx
movq %rbx, %rdi
leaq 0xc662(%rip), %rsi      # 0x102f2
movq %r14, %rbp
movq %r14, %rdx
callq 0x38a0
testb %al, %al
je 0x3cd0
leaq 0xc653(%rip), %rdi      # 0x102f9
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x383c
movb %al, 0x2(%r12)
testb %al, %al
je 0x3d78
movq $0x1, 0x8(%r12)
jmp 0x3d78
movq %rbx, %rdi
leaq 0xc62b(%rip), %rsi      # 0x10305
movq %rbp, %rdx
callq 0x38a0
testb %al, %al
je 0x3d40
incq %r15
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %rbp
movq 0x30(%rsp), %rdx
cmpq %rdx, %r15
jge 0x3d87
movq (%r13,%r15,8), %rcx
testq %rcx, %rcx
je 0x3d3b
movzbl (%rcx), %eax
testl %eax, %eax
je 0x3d3b
cmpl $0x2d, %eax
je 0x3ddc
movq %rcx, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x383c
testb %al, %al
je 0x3dd7
incq 0x8(%r12)
movq 0x30(%rsp), %rdx
incq %r15
jmp 0x3cf8
movq %rbx, %rdi
leaq 0xc632(%rip), %rsi      # 0x1037c
movq %rbp, %rdx
callq 0x38a0
testb %al, %al
jne 0x3e33
movq %rbp, %r14
movq %rbx, %rdi
leaq 0xc61c(%rip), %rsi      # 0x10383
pushq $0xc
popq %rdx
callq 0x38a0
testb %al, %al
je 0x3d9e
movb $0x1, (%r12)
movq 0x8(%rsp), %rcx
movl 0x4(%rsp), %edi
movl 0x14(%rsp), %ebp
jmp 0x3dcb
cmpq $0x0, 0x8(%r12)
je 0x3e47
movb $0x1, 0x2(%r12)
movl %r15d, %ebp
jmp 0x3dc2
movq %rbx, %rdi
leaq 0xc5e8(%rip), %rsi      # 0x10390
movq %r14, %rdx
callq 0x38a0
testb %al, %al
movl 0x14(%rsp), %ebp
je 0x3e5c
movb $0x1, 0x1(%r12)
movq 0x8(%rsp), %rcx
movl 0x4(%rsp), %edi
incl %ebp
movq 0x18(%rsp), %rdx
jmp 0x3c58
movq (%r13,%r15,8), %rcx
leaq 0xc538(%rip), %rsi      # 0x1031b
leaq 0xc51b(%rip), %rdx      # 0x10305
xorl %ebp, %ebp
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x3410
jmp 0x3e13
movb $0x1, %bpl
jmp 0x3e22
leaq 0xc4c4(%rip), %rsi      # 0x102c8
xorl %ebp, %ebp
pushq $0x1
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3410
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x39aa
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x38ad
jmp 0x3c21
leaq 0xc500(%rip), %rsi      # 0x1034e
leaq 0xc4b0(%rip), %rdx      # 0x10305
xorl %ebp, %ebp
pushq $0x1
popq %rdi
jmp 0x3e0c
leaq 0xc534(%rip), %rsi      # 0x10397
pushq $0x9
popq %rdx
movq %rbx, %rdi
callq 0x38a0
testb %al, %al
je 0x3e7c
callq 0x3b41
jmp 0x3c21
leaq 0xc51e(%rip), %rsi      # 0x103a1
pushq $0x6
popq %rdx
movq %rbx, %rdi
callq 0x38a0
testb %al, %al
je 0x3ea6
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x39aa
jmp 0x3c21
leaq 0xc41b(%rip), %rsi      # 0x102c8
xorl %ebp, %ebp
pushq $0x1
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3410
jmp 0x3e22