// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/chorus/chorus.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);
                break;
            case 'a':
                AmpFactor = atof(arg);
                argUsed = 1;
                break;
            case 'b':
                Block = atof(arg);
                argUsed = 1;
                break;
            case 'd':
                DelayFactor = atof(arg);
                argUsed = 1;
                break;
            case 'r':
                Range = atof(arg);
                argUsed = 1;
                break;
            case 'R':
                ReadAhead = atoi(arg);
                argUsed = 1;
                break;
            case 'h':
                printf("chorus options:\n");
                printf("  -a N   set amplitude factor to N\n");
                printf("         values > 1 increase loudness\n");
                printf("         values < 1 decrease loudness\n");
                printf("         default is %f\n",AmpFactor);
                printf("  -b N   set Block size to N seconds\n");
                printf("         controls how long voice are unsynchronized\n");
                printf("         default is %f\n",Block);
                printf("  -d N   set DelayFactor to N\n");
                printf("         controls how late voices come in\n");
                printf("         larger values increase lateness\n");
                printf("         smaller values decrease lateness\n");
                printf("         default is %f\n",DelayFactor);
                printf("  -r N   set Range to N\n");
                printf("         controls how much voices are sharp or flat\n");
                printf("         default is %f\n",Range);
                printf("  -R N   set readAhead to N\n");
                printf("         controls how many samples are buffered\n");
                printf("         default is %d\n",ReadAhead);
                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 0x14bb
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 0x14c7
jmp 0x1794
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 0x1508
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 0x151c
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 $-0x52, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x24, %eax
ja 0x1757
movq -0x38(%rbp), %rax
leaq 0x3abb(%rip), %rcx      # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x6bc7(%rip), %rsi      # 0x8120
movq 0x6bc8(%rip), %rdx      # 0x8128
leaq 0x3c14(%rip), %rdi      # 0x517b
movb $0x0, %al
callq 0x1090
xorl %edi, %edi
callq 0x11e0
movq -0x28(%rbp), %rdi
callq 0x1050
movsd %xmm0, 0x6bc2(%rip)     # 0x8148
movl $0x1, -0x18(%rbp)
jmp 0x1771
movq -0x28(%rbp), %rdi
callq 0x1050
movsd %xmm0, 0x6b9d(%rip)     # 0x8140
movl $0x1, -0x18(%rbp)
jmp 0x1771
movq -0x28(%rbp), %rdi
callq 0x1050
movsd %xmm0, 0x6b78(%rip)     # 0x8138
movl $0x1, -0x18(%rbp)
jmp 0x1771
movq -0x28(%rbp), %rdi
callq 0x1050
movsd %xmm0, 0x6b53(%rip)     # 0x8130
movl $0x1, -0x18(%rbp)
jmp 0x1771
movq -0x28(%rbp), %rdi
callq 0x11d0
movl %eax, 0x6b5c(%rip)      # 0x8154
movl $0x1, -0x18(%rbp)
jmp 0x1771
leaq 0x3b7f(%rip), %rdi      # 0x518a
movb $0x0, %al
callq 0x1090
leaq 0x3b82(%rip), %rdi      # 0x519b
movb $0x0, %al
callq 0x1090
leaq 0x3b98(%rip), %rdi      # 0x51bf
movb $0x0, %al
callq 0x1090
leaq 0x3bb1(%rip), %rdi      # 0x51e6
movb $0x0, %al
callq 0x1090
movsd 0x6b04(%rip), %xmm0     # 0x8148
leaq 0x3bc2(%rip), %rdi      # 0x520d
movb $0x1, %al
callq 0x1090
leaq 0x3bcc(%rip), %rdi      # 0x5225
movb $0x0, %al
callq 0x1090
leaq 0x3be4(%rip), %rdi      # 0x524b
movb $0x0, %al
callq 0x1090
movsd 0x6aca(%rip), %xmm0     # 0x8140
leaq 0x3b90(%rip), %rdi      # 0x520d
movb $0x1, %al
callq 0x1090
leaq 0x3bf5(%rip), %rdi      # 0x5280
movb $0x0, %al
callq 0x1090
leaq 0x3c06(%rip), %rdi      # 0x529f
movb $0x0, %al
callq 0x1090
leaq 0x3c23(%rip), %rdi      # 0x52ca
movb $0x0, %al
callq 0x1090
leaq 0x3c3f(%rip), %rdi      # 0x52f4
movb $0x0, %al
callq 0x1090
movsd 0x6a74(%rip), %xmm0     # 0x8138
leaq 0x3b42(%rip), %rdi      # 0x520d
movb $0x1, %al
callq 0x1090
leaq 0x3c46(%rip), %rdi      # 0x531f
movb $0x0, %al
callq 0x1090
leaq 0x3c51(%rip), %rdi      # 0x5338
movb $0x0, %al
callq 0x1090
movsd 0x6a3a(%rip), %xmm0     # 0x8130
leaq 0x3b10(%rip), %rdi      # 0x520d
movb $0x1, %al
callq 0x1090
leaq 0x3c62(%rip), %rdi      # 0x536d
movb $0x0, %al
callq 0x1090
leaq 0x3c71(%rip), %rdi      # 0x538a
movb $0x0, %al
callq 0x1090
movl 0x6a2e(%rip), %esi      # 0x8154
leaq 0x3c8e(%rip), %rdi      # 0x53bb
movb $0x0, %al
callq 0x1090
leaq 0x3c98(%rip), %rdi      # 0x53d3
movb $0x0, %al
callq 0x1090
leaq 0x3caf(%rip), %rdi      # 0x53f8
movb $0x0, %al
callq 0x1090
xorl %edi, %edi
callq 0x11e0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x3c9d(%rip), %rdi      # 0x5407
movb $0x0, %al
callq 0x1e60
cmpl $0x0, -0x1c(%rbp)
je 0x1786
cmpl $0x0, -0x18(%rbp)
je 0x1786
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1496
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)