// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/hiss/hiss.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 'r':
                randomness = atof(arg);
                argUsed = 1;
                break;
            case 'v':
                printf("%s version %s\n", PROGRAM_NAME, PROGRAM_VERSION);
                exit(0);
                break;
            case 'h':
                printf("hiss 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("  -f N   fade out after N seconds of hiss\n");
                printf("         default is %f\n",hissLength);
                printf("  -F N   controls the speed of the fade out\n");
                printf("         default is %f\n",outSpeed);
                printf("  -s N   fade in the hiss after N seconds\n");
                printf("         default is %f\n",startDelay);
                printf("  -S N   controls the speed of the fade in\n");
                printf("         default is %f\n",inSpeed);
                printf("  -r N   set the randomness of the hiss to N\n");
                printf("         default is %f\n",randomness);
                //printf("  -p     add pops\n");
                //printf("         default is no pops\n");
                //printf("  -c     add crackles\n");
                //printf("         default is no crackles\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 $0x30, %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 0x161b
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 0x1627
jmp 0x184f
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 0x1668
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 0x167c
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
movl %eax, -0x30(%rbp)
subl $0x68, %eax
je 0x16ed
jmp 0x1696
movl -0x30(%rbp), %eax
subl $0x72, %eax
je 0x16ad
jmp 0x16a0
movl -0x30(%rbp), %eax
subl $0x76, %eax
je 0x16ca
jmp 0x1812
movq -0x28(%rbp), %rdi
callq 0x1060
movsd %xmm0, 0x6a7a(%rip)     # 0x8138
movl $0x1, -0x18(%rbp)
jmp 0x182c
movq 0x6a57(%rip), %rsi      # 0x8128
movq 0x6a58(%rip), %rdx      # 0x8130
leaq 0x39dd(%rip), %rdi      # 0x50bc
movb $0x0, %al
callq 0x10a0
xorl %edi, %edi
callq 0x11e0
leaq 0x39d7(%rip), %rdi      # 0x50cb
movb $0x0, %al
callq 0x10a0
leaq 0x39d8(%rip), %rdi      # 0x50da
movb $0x0, %al
callq 0x10a0
leaq 0x39ef(%rip), %rdi      # 0x50ff
movb $0x0, %al
callq 0x10a0
leaq 0x3a08(%rip), %rdi      # 0x5126
movb $0x0, %al
callq 0x10a0
movsd 0x6a13(%rip), %xmm0     # 0x8140
leaq 0x3a19(%rip), %rdi      # 0x514d
movb $0x1, %al
callq 0x10a0
leaq 0x3a23(%rip), %rdi      # 0x5165
movb $0x0, %al
callq 0x10a0
movsd 0x6a17(%rip), %xmm0     # 0x8168
leaq 0x39f5(%rip), %rdi      # 0x514d
movb $0x1, %al
callq 0x10a0
leaq 0x3a2a(%rip), %rdi      # 0x5190
movb $0x0, %al
callq 0x10a0
movsd 0x69d3(%rip), %xmm0     # 0x8148
leaq 0x39d1(%rip), %rdi      # 0x514d
movb $0x1, %al
callq 0x10a0
leaq 0x3a33(%rip), %rdi      # 0x51bd
movb $0x0, %al
callq 0x10a0
movsd 0x69d7(%rip), %xmm0     # 0x8170
leaq 0x39ad(%rip), %rdi      # 0x514d
movb $0x1, %al
callq 0x10a0
leaq 0x3a3a(%rip), %rdi      # 0x51e8
movb $0x0, %al
callq 0x10a0
movsd 0x69bb(%rip), %xmm0     # 0x8178
leaq 0x3989(%rip), %rdi      # 0x514d
movb $0x1, %al
callq 0x10a0
leaq 0x3a42(%rip), %rdi      # 0x5214
movb $0x0, %al
callq 0x10a0
movsd 0x6957(%rip), %xmm0     # 0x8138
leaq 0x3965(%rip), %rdi      # 0x514d
movb $0x1, %al
callq 0x10a0
leaq 0x3a4c(%rip), %rdi      # 0x5242
movb $0x0, %al
callq 0x10a0
leaq 0x3a63(%rip), %rdi      # 0x5267
movb $0x0, %al
callq 0x10a0
xorl %edi, %edi
callq 0x11e0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x3a51(%rip), %rdi      # 0x5276
movb $0x0, %al
callq 0x18a0
cmpl $0x0, -0x1c(%rbp)
je 0x1841
cmpl $0x0, -0x18(%rbp)
je 0x1841
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x15f6
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)