// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/stereo/stereo.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 'c':
                LeftDelay = 0;
                LeftAttenuation = 1.0;
                RightDelay = 0;
                RightAttenuation = 1.0;
                break;
            case 'l':
                LeftDelay = atoi(arg);
                argUsed = 1;
                break;
            case 'L':
                LeftAttenuation = atof(arg);
                argUsed = 1;
                break;
            case 'r':
                RightDelay = atoi(arg);
                argUsed = 1;
                break;
            case 'R':
                RightAttenuation = atof(arg);
                argUsed = 1;
                break;
            case 'h':
                printf("stereo options:\n");
                printf("  -l N    set the left channel delay to N milliseconds\n");
                printf("          default is %d\n",LeftDelay);
                printf("  -L N.N  set the attenuation of the left track to N.N\n");
                printf("          default is %f\n",LeftAttenuation);
                printf("  -r N    set the right channel delay to N milliseconds\n");
                printf("          default is %d\n",RightDelay);
                printf("  -R N.N  set the attenuation of the right track to N.N\n");
                printf("          default is %f\n",RightAttenuation);
                printf("  -c      set both channels as equals\n");
                printf("          sets delays to zero, attenuations to one\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 0x16db
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 0x16e7
jmp 0x1938
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 0x1728
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 0x173c
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 $-0x4c, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x2a, %eax
ja 0x18fb
movq -0x38(%rbp), %rax
leaq 0x38b7(%rip), %rcx      # 0x5020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x699f(%rip), %rsi      # 0x8118
movq 0x69a0(%rip), %rdx      # 0x8120
leaq 0x39d9(%rip), %rdi      # 0x5160
movb $0x0, %al
callq 0x1090
xorl %edi, %edi
callq 0x11d0
movl $0x0, 0x69ad(%rip)      # 0x814c
movsd 0x3871(%rip), %xmm0     # 0x5018
movsd %xmm0, 0x6979(%rip)     # 0x8128
movl $0x0, 0x6997(%rip)      # 0x8150
movsd 0x3857(%rip), %xmm0     # 0x5018
movsd %xmm0, 0x6967(%rip)     # 0x8130
jmp 0x1915
movq -0x28(%rbp), %rdi
callq 0x11c0
movl %eax, 0x696f(%rip)      # 0x814c
movl $0x1, -0x18(%rbp)
jmp 0x1915
movq -0x28(%rbp), %rdi
callq 0x1050
movsd %xmm0, 0x692e(%rip)     # 0x8128
movl $0x1, -0x18(%rbp)
jmp 0x1915
movq -0x28(%rbp), %rdi
callq 0x11c0
movl %eax, 0x693b(%rip)      # 0x8150
movl $0x1, -0x18(%rbp)
jmp 0x1915
movq -0x28(%rbp), %rdi
callq 0x1050
movsd %xmm0, 0x68fe(%rip)     # 0x8130
movl $0x1, -0x18(%rbp)
jmp 0x1915
leaq 0x392a(%rip), %rdi      # 0x516f
movb $0x0, %al
callq 0x1090
leaq 0x392d(%rip), %rdi      # 0x5180
movb $0x0, %al
callq 0x1090
movl 0x68ec(%rip), %esi      # 0x814c
leaq 0x3951(%rip), %rdi      # 0x51b8
movb $0x0, %al
callq 0x1090
leaq 0x395c(%rip), %rdi      # 0x51d1
movb $0x0, %al
callq 0x1090
movsd 0x68a4(%rip), %xmm0     # 0x8128
leaq 0x397e(%rip), %rdi      # 0x5209
movb $0x1, %al
callq 0x1090
leaq 0x3989(%rip), %rdi      # 0x5222
movb $0x0, %al
callq 0x1090
movl 0x68aa(%rip), %esi      # 0x8150
leaq 0x390b(%rip), %rdi      # 0x51b8
movb $0x0, %al
callq 0x1090
leaq 0x39a0(%rip), %rdi      # 0x525b
movb $0x0, %al
callq 0x1090
movsd 0x6866(%rip), %xmm0     # 0x8130
leaq 0x3938(%rip), %rdi      # 0x5209
movb $0x1, %al
callq 0x1090
leaq 0x39b5(%rip), %rdi      # 0x5294
movb $0x0, %al
callq 0x1090
leaq 0x39ce(%rip), %rdi      # 0x52bb
movb $0x0, %al
callq 0x1090
xorl %edi, %edi
callq 0x11d0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x39e1(%rip), %rdi      # 0x52ef
movb $0x0, %al
callq 0x1950
cmpl $0x0, -0x1c(%rbp)
je 0x192a
cmpl $0x0, -0x18(%rbp)
je 0x192a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x16b6
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)