// File: /workspace/github_c_makefile_star2_O1/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 %rcx, %r15
movq 0x70(%rsp), %rcx
movq %rdx, %xmm0
movq %rsi, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %rcx, %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 0x3c65
xorl %ebx, %ebx
jmp 0x3c75
movdqu %xmm0, (%rcx)
movl %edi, 0xc(%rsp)
cmpl $0x2, %edi
setl %bl
jge 0x3c89
andb $0x1, %bl
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r12
movq %rsi, %rbp
movq %r8, 0x10(%rsp)
movq %r9, 0x18(%rsp)
movl $0x1, %r13d
movq %r15, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, 0x30(%rsp)
movslq %r13d, %rax
movq (%rbp,%rax,8), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3bb7
testq %rax, %rax
je 0x3db1
movq (%rax), %r14
movl $0x6, %edx
movq %r14, %rdi
leaq 0xd613(%rip), %rsi      # 0x112f2
callq 0x30a0
testl %eax, %eax
je 0x3dd9
movl $0x6, %edx
movq %r14, %rdi
leaq 0xd60a(%rip), %rsi      # 0x11305
callq 0x30a0
testl %eax, %eax
je 0x3e0f
movl $0x6, %edx
movq %r14, %rdi
leaq 0xd665(%rip), %rsi      # 0x1137c
callq 0x30a0
testl %eax, %eax
je 0x3e7f
movl $0xc, %edx
movq %r14, %rdi
leaq 0xd650(%rip), %rsi      # 0x11383
callq 0x30a0
testl %eax, %eax
je 0x3e92
movl $0x6, %edx
movq %r14, %rdi
leaq 0xd641(%rip), %rsi      # 0x11390
callq 0x30a0
testl %eax, %eax
je 0x3ec7
movl $0x9, %edx
movq %r14, %rdi
leaq 0xd62c(%rip), %rsi      # 0x11397
callq 0x30a0
testl %eax, %eax
je 0x3f25
movl $0x6, %edx
movq %r14, %rdi
leaq 0xd61a(%rip), %rsi      # 0x113a1
callq 0x30a0
testl %eax, %eax
je 0x3f2f
xorl %ebp, %ebp
movl $0x1, %edi
leaq 0xd526(%rip), %rsi      # 0x112c8
movq %r14, %rdx
xorl %eax, %eax
callq 0x3400
jmp 0x3ed3
xorl %ebp, %ebp
movl $0x1, %edi
leaq 0xd509(%rip), %rsi      # 0x112c8
movq %r14, %rdx
xorl %eax, %eax
callq 0x3400
movq %r12, %rdi
movq %r15, %rsi
callq 0x39c1
jmp 0x3ed3
leaq 0xd519(%rip), %rdi      # 0x112f9
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x3838
movq 0x70(%rsp), %rcx
movb %al, 0x2(%rcx)
movb $0x1, %bpl
testb %al, %al
je 0x3ed3
movq $0x1, 0x8(%rcx)
jmp 0x3ed3
incl %r13d
cmpl 0xc(%rsp), %r13d
jge 0x3e6d
movslq %r13d, %rax
leaq (,%rax,8), %r14
addq %rbp, %r14
movl 0xc(%rsp), %ebp
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3e61
cmpb $0x0, (%rdi)
je 0x3e61
cmpb $0x2d, (%rdi)
je 0x3f01
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x3838
testb %al, %al
je 0x3f01
movq 0x70(%rsp), %rax
incq 0x8(%rax)
addq $0x8, %r14
incl %r13d
cmpl %r13d, %ebp
jne 0x3e2b
movq 0x70(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x3e9c
movb $0x1, 0x2(%rax)
jmp 0x3ed0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x38ba
xorl %ebp, %ebp
jmp 0x3ed3
movq 0x70(%rsp), %rax
movb $0x1, (%rax)
jmp 0x3ed0
xorl %ebp, %ebp
movl $0x1, %edi
leaq 0xd4a4(%rip), %rsi      # 0x1134e
leaq 0xd454(%rip), %rdx      # 0x11305
xorl %eax, %eax
callq 0x3400
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
jmp 0x3dcf
movq 0x70(%rsp), %rax
movb $0x1, 0x1(%rax)
movb $0x1, %bpl
testb %bpl, %bpl
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %r12
movq 0x30(%rsp), %rbp
je 0x3c75
incl %r13d
cmpl 0xc(%rsp), %r13d
setge %bl
jl 0x3cae
jmp 0x3c75
movq (%r14), %rcx
xorl %ebp, %ebp
movl $0x1, %edi
leaq 0xd409(%rip), %rsi      # 0x1131b
leaq 0xd3ec(%rip), %rdx      # 0x11305
xorl %eax, %eax
callq 0x3400
jmp 0x3dc9
callq 0x3b7e
jmp 0x3e8e
movq %r12, %rdi
movq %r15, %rsi
callq 0x39c1
jmp 0x3e8e