// File: /workspace/github_c_makefile_star2_O2/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, 0x6eee(%rip)      # 0xbf60
xorps %xmm0, %xmm0
movups %xmm0, 0x6eec(%rip)     # 0xbf68
xorl %eax, %eax
cmpl $0x1, %edi
jne 0x5084
retq
pushq $0x1
popq %rcx
movl %ecx, %r9d
cmpl %edi, %r9d
jge 0x5083
movl %r9d, %edx
movslq %r9d, %r8
movq (%rsi,%r8,8), %r8
cmpb $0x2d, (%r8)
jne 0x5157
cmpb $0x76, 0x1(%r8)
jne 0x50b5
cmpb $0x0, 0x2(%r8)
je 0x514d
cmpb $0x67, 0x1(%r8)
jne 0x50c7
cmpb $0x0, 0x2(%r8)
je 0x5161
cmpb $0x6e, 0x1(%r8)
jne 0x50d9
cmpb $0x0, 0x2(%r8)
je 0x517a
cmpb $0x72, 0x1(%r8)
jne 0x5157
cmpb $0x0, 0x2(%r8)
jne 0x5157
movl $0x2, 0x6e73(%rip)      # 0xbf64
leal 0x1(%rdx), %r9d
cmpl %edi, %r9d
jge 0x508a
movslq %r9d, %r8
movq (%rsi,%r8,8), %r8
movb (%r8), %r10b
addb $-0x30, %r10b
cmpb $0x9, %r10b
ja 0x508a
xorl %r9d, %r9d
xorl %r11d, %r11d
movl %r9d, 0x6e45(%rip)      # 0xbf64
movl %r11d, %r10d
movb (%r8,%r10), %r11b
addb $-0x30, %r11b
cmpb $0x9, %r11b
ja 0x5191
imull $0xa, %r9d, %r9d
movl %r9d, 0x6e29(%rip)      # 0xbf64
leal 0x1(%r10), %r11d
movsbl (%r8,%r10), %r10d
addl %r10d, %r9d
addl $-0x30, %r9d
jmp 0x5118
movl $0x1, 0x6e09(%rip)      # 0xbf60
incl %edx
movl %edx, %r9d
jmp 0x508a
leal 0x1(%rdx), %r8d
cmpl %edi, %r8d
jge 0x519c
movslq %r8d, %r8
movq (%rsi,%r8,8), %r8
movq %r8, 0x6df8(%rip)       # 0xbf70
jmp 0x5191
leal 0x1(%rdx), %r8d
cmpl %edi, %r8d
jge 0x519c
movslq %r8d, %r8
movq (%rsi,%r8,8), %r8
movq %r8, 0x6dd7(%rip)       # 0xbf68
addl $0x2, %edx
movl %edx, %r9d
jmp 0x508a
movl %ecx, %eax
retq