// File: /workspace/github_c_makefile_star2_O3/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, 0x6791(%rip)      # 0xbf60
xorps %xmm0, %xmm0
movups %xmm0, 0x678f(%rip)     # 0xbf68
xorl %eax, %eax
cmpl $0x2, %edi
jl 0x5917
movl $0x1, %ecx
movslq %ecx, %rdx
movq (%rsi,%rdx,8), %rdx
cmpb $0x2d, (%rdx)
jne 0x58d3
cmpb $0x76, 0x1(%rdx)
jne 0x5809
cmpb $0x0, 0x2(%rdx)
je 0x58c9
cmpb $0x67, 0x1(%rdx)
jne 0x5819
cmpb $0x0, 0x2(%rdx)
je 0x58e6
cmpb $0x6e, 0x1(%rdx)
jne 0x5829
cmpb $0x0, 0x2(%rdx)
je 0x58fd
cmpb $0x72, 0x1(%rdx)
jne 0x58d3
cmpb $0x0, 0x2(%rdx)
jne 0x58d3
movl $0x2, 0x671d(%rip)      # 0xbf64
leal 0x1(%rcx), %r8d
cmpl %edi, %r8d
jge 0x58d8
movslq %r8d, %rdx
movq (%rsi,%rdx,8), %rdx
movb (%rdx), %r9b
addb $-0x30, %r9b
cmpb $0x9, %r9b
ja 0x58d8
movl $0x0, 0x66f2(%rip)      # 0xbf64
movb (%rdx), %r8b
addb $-0x30, %r8b
cmpb $0x9, %r8b
ja 0x5912
xorl %r9d, %r9d
movl $0x1, %r8d
movq %rdx, %r10
addl %r9d, %r9d
leal (%r9,%r9,4), %r9d
movl %r9d, 0x66c7(%rip)      # 0xbf64
movsbl (%r10), %r10d
addl %r10d, %r9d
addl $-0x30, %r9d
movl %r9d, 0x66b5(%rip)      # 0xbf64
movl %r8d, %r11d
leaq (%rdx,%r11), %r10
movb (%rdx,%r11), %r11b
addb $-0x30, %r11b
incl %r8d
cmpb $0xa, %r11b
jb 0x588f
jmp 0x5912
movl $0x1, 0x668d(%rip)      # 0xbf60
incl %ecx
movl %ecx, %r8d
movl %r8d, %ecx
cmpl %edi, %r8d
jl 0x57e9
jmp 0x5917
leal 0x1(%rcx), %edx
cmpl %edi, %edx
jge 0x5918
movslq %edx, %rdx
movq (%rsi,%rdx,8), %rdx
movq %rdx, 0x6675(%rip)      # 0xbf70
jmp 0x5912
leal 0x1(%rcx), %edx
cmpl %edi, %edx
jge 0x5918
movslq %edx, %rdx
movq (%rsi,%rdx,8), %rdx
movq %rdx, 0x6656(%rip)      # 0xbf68
addl $0x2, %ecx
jmp 0x58d5
retq
movl $0x1, %eax
retq