// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, 0x6947(%rip)      # 0xdf90
movq $0x0, 0x694c(%rip) # 0xdfa0
movq $0x0, 0x6939(%rip) # 0xdf98
movl $0x1, 0x692b(%rip)      # 0xdf94
cmpl $0x1, -0x8(%rbp)
jne 0x767b
movl $0x0, -0x4(%rbp)
jmp 0x789f
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x7898
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x2f2d(%rip), %rsi      # 0xa5ce
callq 0x2160
cmpl $0x0, %eax
jne 0x76c3
movl $0x1, 0x68db(%rip)      # 0xdf90
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7893
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x2efb(%rip), %rsi      # 0xa5d1
callq 0x2160
cmpl $0x0, %eax
jne 0x771e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jl 0x76fd
movl $0x1, -0x4(%rbp)
jmp 0x789f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x6890(%rip)      # 0xdfa0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7891
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x2ea3(%rip), %rsi      # 0xa5d4
callq 0x2160
cmpl $0x0, %eax
jne 0x7779
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jl 0x7758
movl $0x1, -0x4(%rbp)
jmp 0x789f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x682d(%rip)      # 0xdf98
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x788f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x2e4b(%rip), %rsi      # 0xa5d7
callq 0x2160
cmpl $0x0, %eax
jne 0x7884
movl $0x2, 0x67f0(%rip)      # 0xdf94
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x7882
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x7880
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jg 0x7880
movl $0x0, -0x18(%rbp)
movl $0x0, 0x679a(%rip)      # 0xdf94
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x18(%rbp), %ecx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x19(%rbp)
jl 0x7833
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x18(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x783c
jmp 0x7877
imull $0xa, 0x6751(%rip), %eax # 0xdf94
movl %eax, 0x674b(%rip)      # 0xdf94
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x18(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x18(%rbp)
movl %ecx, %ecx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
addl 0x6725(%rip), %eax      # 0xdf94
movl %eax, 0x671f(%rip)      # 0xdf94
jmp 0x77fa
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7882
jmp 0x788d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x788f
jmp 0x7891
jmp 0x7893
jmp 0x7682
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)