// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/phrases/phrases.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 'v':
                printf("%s version %s\n", PROGRAM_NAME, PROGRAM_VERSION);
                exit(0);
                printf("%s\n",arg);
                break;
            case 'c':
                Comments = 0;
                break;
            case 's':
                Silent = 1;
                break;
            case 't':
                Take = atoi(arg);
                argUsed = 1;
                break;
            case 'h':
printf("phrases usage:\n");
printf("  phrases TAKE_PREFIX_1 [TAKE_PREFIX_2 ...]\n");
printf("phrases options:\n");
printf("  -c     turn off asking for comments\n");
printf("  -s     do not play the phrases, just prompt for the choice\n");
printf("  -t N   always choose the given take\n");
printf("  -v     display the version number\n");
printf("  -h     help\n");
                exit(0);
                break;
            default:
                Fatal("option %s not understood\n",argv[argIndex]);
            }

        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 0x1a3b
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 0x1a47
jmp 0x1be2
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 0x1a88
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 0x1a9c
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 $-0x63, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x13, %eax
ja 0x1ba5
movq -0x38(%rbp), %rax
leaq 0x153b(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x45ff(%rip), %rsi      # 0x60d8
movq 0x4600(%rip), %rdx      # 0x60e0
leaq 0x1ae5(%rip), %rdi      # 0x35cc
movb $0x0, %al
callq 0x1080
xorl %edi, %edi
callq 0x1170
movl $0x0, 0x45e9(%rip)      # 0x60e8
jmp 0x1bbf
movl $0x1, 0x45f6(%rip)      # 0x6104
jmp 0x1bbf
movq -0x28(%rbp), %rdi
callq 0x1150
movl %eax, 0x45ca(%rip)      # 0x60ec
movl $0x1, -0x18(%rbp)
jmp 0x1bbf
leaq 0x1aa6(%rip), %rdi      # 0x35db
movb $0x0, %al
callq 0x1080
leaq 0x1aa8(%rip), %rdi      # 0x35eb
movb $0x0, %al
callq 0x1080
leaq 0x1ac7(%rip), %rdi      # 0x3618
movb $0x0, %al
callq 0x1080
leaq 0x1acb(%rip), %rdi      # 0x362a
movb $0x0, %al
callq 0x1080
leaq 0x1ae4(%rip), %rdi      # 0x3651
movb $0x0, %al
callq 0x1080
leaq 0x1b14(%rip), %rdi      # 0x368f
movb $0x0, %al
callq 0x1080
leaq 0x1b2d(%rip), %rdi      # 0x36b6
movb $0x0, %al
callq 0x1080
leaq 0x1b44(%rip), %rdi      # 0x36db
movb $0x0, %al
callq 0x1080
xorl %edi, %edi
callq 0x1170
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b32(%rip), %rdi      # 0x36ea
movb $0x0, %al
callq 0x28a0
cmpl $0x0, -0x1c(%rbp)
je 0x1bd4
cmpl $0x0, -0x18(%rbp)
je 0x1bd4
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1a16
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)