// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/flanger/flanger.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 'a':
                attenuation = atof(arg);
                argUsed = 1;
                break;
            case 'd':
                depthFactor = atof(arg);
                argUsed = 1;
                break;
            case 'f':
                feedback = atof(arg);
                argUsed = 1;
                break;
            case 'm':
                minDelayFactor = atof(arg);
                argUsed = 1;
                break;
            case 'o':
                offsetFactor = atof(arg);
                argUsed = 1;
                break;
            case 's':
                speedFactor = atof(arg);
                argUsed = 1;
                break;
            case 'v':
                printf("%s version %s\n", PROGRAM_NAME, PROGRAM_VERSION);
                exit(0);
                break;
            case 'h':
                printf("flanger options:\n");
                printf("  -a N   attenuates the output by N\n");
                printf("         values > 1 increase loudness\n");
                printf("         values < 1 decrease loudness\n");
                printf("         default is %f\n",attenuation);
                printf("  -d N   set maximum flanging delay to N\n");
                printf("         good values range from 0 to 5\n");
                printf("         default is %f\n",depthFactor);
                printf("  -f N   set feedback gain to N\n");
                printf("         good values range from -0.9..0.9\n");
                printf("         default is %f\n",feedback);
                printf("  -m N   set minimum value of the delay to N\n");
                printf("         default is %f\n",minDelayFactor);
                printf("  -o N   set offset into flanging cycle to N\n");
                printf("         good values range from 0 to max delay\n");
                printf("         default is %f\n",offsetFactor);
                printf("  -s N   set speed of a full delay cycle to N\n");
                printf("         default is %f\n",speedFactor);
                printf("  -v     display the version number\n");
                printf("  -h     help\n");
                exit(0);
                break;
            default:
                Fatal("%s: option %s not understood\n",
                    PROGRAM_NAME,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 0x27cb
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 0x27d7
jmp 0x2ac6
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 0x2818
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 0x282c
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 $-0x61, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x15, %eax
ja 0x2a82
movq -0x38(%rbp), %rax
leaq 0x97c7(%rip), %rcx      # 0xc020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rdi
callq 0x2070
movsd %xmm0, 0xe925(%rip)     # 0x11198
movl $0x1, -0x18(%rbp)
jmp 0x2aa3
movq -0x28(%rbp), %rdi
callq 0x2070
movsd %xmm0, 0xe8f0(%rip)     # 0x11180
movl $0x1, -0x18(%rbp)
jmp 0x2aa3
movq -0x28(%rbp), %rdi
callq 0x2070
movsd %xmm0, 0xebab(%rip)     # 0x11458
movl $0x1, -0x18(%rbp)
jmp 0x2aa3
movq -0x28(%rbp), %rdi
callq 0x2070
movsd %xmm0, 0xeb5e(%rip)     # 0x11428
movl $0x1, -0x18(%rbp)
jmp 0x2aa3
movq -0x28(%rbp), %rdi
callq 0x2070
movsd %xmm0, 0xeb59(%rip)     # 0x11440
movl $0x1, -0x18(%rbp)
jmp 0x2aa3
movq -0x28(%rbp), %rdi
callq 0x2070
movsd %xmm0, 0xe884(%rip)     # 0x11188
movl $0x1, -0x18(%rbp)
jmp 0x2aa3
movq 0xe859(%rip), %rsi      # 0x11170
movq 0xe85a(%rip), %rdx      # 0x11178
leaq 0x97e7(%rip), %rdi      # 0xc10c
movb $0x0, %al
callq 0x20c0
xorl %edi, %edi
callq 0x2270
leaq 0x97e1(%rip), %rdi      # 0xc11b
movb $0x0, %al
callq 0x20c0
leaq 0x97e5(%rip), %rdi      # 0xc12d
movb $0x0, %al
callq 0x20c0
leaq 0x97fc(%rip), %rdi      # 0xc152
movb $0x0, %al
callq 0x20c0
leaq 0x9815(%rip), %rdi      # 0xc179
movb $0x0, %al
callq 0x20c0
movsd 0xe825(%rip), %xmm0     # 0x11198
leaq 0x9826(%rip), %rdi      # 0xc1a0
movb $0x1, %al
callq 0x20c0
leaq 0x9830(%rip), %rdi      # 0xc1b8
movb $0x0, %al
callq 0x20c0
leaq 0x984c(%rip), %rdi      # 0xc1e2
movb $0x0, %al
callq 0x20c0
movsd 0xe7db(%rip), %xmm0     # 0x11180
leaq 0x97f4(%rip), %rdi      # 0xc1a0
movb $0x1, %al
callq 0x20c0
leaq 0x9850(%rip), %rdi      # 0xc20a
movb $0x0, %al
callq 0x20c0
leaq 0x9863(%rip), %rdi      # 0xc22b
movb $0x0, %al
callq 0x20c0
movsd 0xea81(%rip), %xmm0     # 0x11458
leaq 0x97c2(%rip), %rdi      # 0xc1a0
movb $0x1, %al
callq 0x20c0
leaq 0x986a(%rip), %rdi      # 0xc256
movb $0x0, %al
callq 0x20c0
movsd 0xea2d(%rip), %xmm0     # 0x11428
leaq 0x979e(%rip), %rdi      # 0xc1a0
movb $0x1, %al
callq 0x20c0
leaq 0x9874(%rip), %rdi      # 0xc284
movb $0x0, %al
callq 0x20c0
leaq 0x9894(%rip), %rdi      # 0xc2b2
movb $0x0, %al
callq 0x20c0
movsd 0xea13(%rip), %xmm0     # 0x11440
leaq 0x976c(%rip), %rdi      # 0xc1a0
movb $0x1, %al
callq 0x20c0
leaq 0x98a0(%rip), %rdi      # 0xc2e2
movb $0x0, %al
callq 0x20c0
movsd 0xe737(%rip), %xmm0     # 0x11188
leaq 0x9748(%rip), %rdi      # 0xc1a0
movb $0x1, %al
callq 0x20c0
leaq 0x98ab(%rip), %rdi      # 0xc311
movb $0x0, %al
callq 0x20c0
leaq 0x98c2(%rip), %rdi      # 0xc336
movb $0x0, %al
callq 0x20c0
xorl %edi, %edi
callq 0x2270
movq 0xe6e7(%rip), %rsi      # 0x11170
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x98a9(%rip), %rdi      # 0xc345
movb $0x0, %al
callq 0x8d30
cmpl $0x0, -0x1c(%rbp)
je 0x2ab8
cmpl $0x0, -0x18(%rbp)
je 0x2ab8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x27a6
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop