// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/processtab/processtab.c
// Function: processOptions
static int
processOptions(int argc, char **argv)
{
    int argIndex;
    int argUsed;
    int separateArg;
    char *arg;

    argIndex = 1;

    while (argIndex < argc && *argv[argIndex] == '-') {

        separateArg = 0;
        argUsed = 0;

        if (argv[argIndex][2] == '\0')
            {
            arg = argv[argIndex+1];
            separateArg = 1;
            }
        else
            arg = argv[argIndex]+2;

        switch (argv[argIndex][1])
            {
            /*
             * when option has an argument, do this
             *
             *     examples are -m4096 or -m 4096
             *
             *     case 'm':
             *         MemorySize = atol(arg);
             *         argUsed = 1;
             *         break;
             *
             *
             * when option does not have an argument, do this
             *
             *     example is -a
             *
             *     case 'a':
             *         PrintActions = 1;
             *         break;
             */
            case 'h':
            	printHelp();
                exit(0);
                break;
            case 'i':
                useStdIn = true;
                break;
            case 'm':
            	if (useStdOut)
            		{
			        printf("option -m cannot be used with -o\n");
			        printHelp();
			        exit(-1);
			        break;
            		}
            	if (skipMakefile)
            		{
			        printf("option -s cannot be used with -m\n");
			        printHelp();
			        exit(-1);
			        break;
            		}
                useStdOutForMakefile = true;
                break;
            case 'n':
                outputProgramName = StringDup(arg);
                argUsed = 1;
                break;
            case 'o':
            	if (useStdOutForMakefile)
            		{
			        printf("option -m cannot be used with -o\n");
			        printHelp();
			        exit(-1);
			        break;
            		}
                useStdOut = true;
                break;
            case 's':
            	if (useStdOutForMakefile)
            		{
			        printf("option -s cannot be used with -m\n");
			        printHelp();
			        exit(-1);
			        break;
            		}
                skipMakefile = true;
                break;
            case 'v':
		        printVersion();
                exit(0);
                break;
            case 'V':
                outputVersion = StringDup(arg);
                argUsed = 1;
                break;
            default:
	            printf("option %s not understood\n", argv[argIndex]);
	            printHelp();
	            exit(-1);
            }

        if (separateArg && argUsed)
            ++argIndex;

        ++argIndex;
        }

    return argIndex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %ecx
xorl %eax, %eax
cmpl -0x4(%rbp), %ecx
movb %al, -0x29(%rbp)
jge 0x15db
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x15e7
jmp 0x17cd
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x1628
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movl $0x1, -0x1c(%rbp)
jmp 0x163c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
addl $-0x56, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x20, %eax
ja 0x1781
movq -0x38(%rbp), %rax
leaq 0x599b(%rip), %rcx      # 0x7004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x2d00
xorl %edi, %edi
callq 0x1180
movb $0x1, 0x9ad3(%rip)      # 0xb158
jmp 0x17aa
testb $0x1, 0x9ac8(%rip)      # 0xb159
je 0x16b0
leaq 0x5b56(%rip), %rdi      # 0x71f0
movb $0x0, %al
callq 0x1080
callq 0x2d00
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1180
testb $0x1, 0x9aa4(%rip)      # 0xb15b
je 0x16d6
leaq 0x5b52(%rip), %rdi      # 0x7212
movb $0x0, %al
callq 0x1080
callq 0x2d00
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1180
movb $0x1, 0x9a7d(%rip)      # 0xb15a
jmp 0x17aa
movq -0x28(%rbp), %rdi
callq 0x65f0
movq %rax, 0x9a56(%rip)      # 0xb148
movl $0x1, -0x18(%rbp)
jmp 0x17aa
testb $0x1, 0x9a55(%rip)      # 0xb15a
je 0x1724
leaq 0x5ae2(%rip), %rdi      # 0x71f0
movb $0x0, %al
callq 0x1080
callq 0x2d00
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1180
movb $0x1, 0x9a2e(%rip)      # 0xb159
jmp 0x17aa
testb $0x1, 0x9a26(%rip)      # 0xb15a
je 0x1753
leaq 0x5ad5(%rip), %rdi      # 0x7212
movb $0x0, %al
callq 0x1080
callq 0x2d00
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1180
movb $0x1, 0x9a01(%rip)      # 0xb15b
jmp 0x17aa
callq 0x2cd0
xorl %edi, %edi
callq 0x1180
movq -0x28(%rbp), %rdi
callq 0x65f0
movq %rax, 0x9978(%rip)      # 0xb0f0
movl $0x1, -0x18(%rbp)
jmp 0x17aa
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x5aa0(%rip), %rdi      # 0x7234
movb $0x0, %al
callq 0x1080
callq 0x2d00
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1180
cmpl $0x0, -0x1c(%rbp)
je 0x17bf
cmpl $0x0, -0x18(%rbp)
je 0x17bf
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x15b6
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)