// File: /workspace/github_c_makefile_star2_O1/jeff-1amstudios[P]carmageddon-1-cheat-code-disassembly/src/test/framework/unity_fixture.c
// Function: UnityGetCommandLineOptions
int UnityGetCommandLineOptions(int argc, const char* argv[])
{
    int i;
    UnityFixture.Verbose = 0;
    UnityFixture.GroupFilter = 0;
    UnityFixture.NameFilter = 0;
    UnityFixture.RepeatCount = 1;

    if (argc == 1)
        return 0;

    for (i = 1; i < argc; )
    {
        if (strcmp(argv[i], "-v") == 0)
        {
            UnityFixture.Verbose = 1;
            i++;
        }
        else if (strcmp(argv[i], "-g") == 0)
        {
            i++;
            if (i >= argc)
                return 1;
            UnityFixture.GroupFilter = argv[i];
            i++;
        }
        else if (strcmp(argv[i], "-n") == 0)
        {
            i++;
            if (i >= argc)
                return 1;
            UnityFixture.NameFilter = argv[i];
            i++;
        }
        else if (strcmp(argv[i], "-r") == 0)
        {
            UnityFixture.RepeatCount = 2;
            i++;
            if (i < argc)
            {
                if (*(argv[i]) >= '0' && *(argv[i]) <= '9')
                {
                    unsigned int digit = 0;
                    UnityFixture.RepeatCount = 0;
                    while (argv[i][digit] >= '0' && argv[i][digit] <= '9')
                    {
                        UnityFixture.RepeatCount *= 10;
                        UnityFixture.RepeatCount += (unsigned int)argv[i][digit++] - '0';
                    }
                    i++;
                }
            }
        }
        else
        {
            /* ignore unknown parameter */
            i++;
        }
    }
    return 0;
}

// Assembly:
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x67e9(%rip)      # 0xbf60
xorps %xmm0, %xmm0
movups %xmm0, 0x67e7(%rip)     # 0xbf68
xorl %eax, %eax
cmpl $0x2, %edi
jl 0x58e9
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movl $0x1, %r13d
leaq 0x2de5(%rip), %r15      # 0x858e
leaq 0x2de1(%rip), %r12      # 0x8591
movslq %r13d, %rax
movq (%r14,%rax,8), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2160
testl %eax, %eax
je 0x5885
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2160
testl %eax, %eax
je 0x5894
movq %rbx, %rdi
leaq 0x2dad(%rip), %rsi      # 0x8594
callq 0x2160
testl %eax, %eax
je 0x58ab
movq %rbx, %rdi
leaq 0x2d99(%rip), %rsi      # 0x8597
callq 0x2160
testl %eax, %eax
jne 0x588f
movl $0x2, 0x674f(%rip)      # 0xbf64
leal 0x1(%r13), %ecx
cmpl %ebp, %ecx
jge 0x58c7
movslq %ecx, %rax
movq (%r14,%rax,8), %rax
movb (%rax), %dl
addb $-0x30, %dl
cmpb $0x9, %dl
ja 0x58c7
movl $0x0, 0x6724(%rip)      # 0xbf64
movb (%rax), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x58c0
xorl %edx, %edx
movl $0x1, %ecx
movq %rax, %rsi
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
movl %edx, 0x6705(%rip)      # 0xbf64
movsbl (%rsi), %esi
addl %esi, %edx
addl $-0x30, %edx
movl %edx, 0x66f7(%rip)      # 0xbf64
movl %ecx, %edi
leaq (%rax,%rdi), %rsi
movb (%rax,%rdi), %dil
addb $-0x30, %dil
incl %ecx
cmpb $0xa, %dil
jb 0x5854
jmp 0x58c0
movl $0x1, 0x66d1(%rip)      # 0xbf60
incl %r13d
jmp 0x58c4
leal 0x1(%r13), %eax
cmpl %ebp, %eax
jge 0x58d6
cltq
movq (%r14,%rax,8), %rax
movq %rax, 0x66c7(%rip)      # 0xbf70
jmp 0x58c0
leal 0x1(%r13), %eax
cmpl %ebp, %eax
jge 0x58d6
cltq
movq (%r14,%rax,8), %rax
movq %rax, 0x66a8(%rip)      # 0xbf68
addl $0x2, %r13d
movl %r13d, %ecx
movl %ecx, %r13d
cmpl %ebp, %ecx
jl 0x57b0
xorl %eax, %eax
jmp 0x58db
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq