// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/zero/zero.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':
                Amplify = atof(arg);
                argUsed = 1;
                break;
            case 'f':
                Factor = atof(arg);
                argUsed = 1;
                break;
            case 'v':
                printf("%s version %s\n", PROGRAM_NAME, PROGRAM_VERSION);
                exit(0);
                break;
            case 'h':
                printf("zero:\n");
                printf("    forces zero crossings to be exactly at zero -\n");
                printf("    nearby values are adjusted to smooth out the\n");
                printf("    dislocation\n");
                printf("\n");
                printf("zero options:\n");
                printf("  -a N     set amplification factor to N\n");
                printf("           amplification happens after compression\n");
                printf("           default value is %f\n",Amplify);
                printf("\n");
                printf("  -f N.N   set diminish factor to N.N\n");
                printf("           lower factor means more aggressive\n");
                printf("           movement of nearby values\n");
                printf("\n");
                printf("  -v       display this program's version number\n");
                printf("\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 0x153b
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 0x1547
jmp 0x1769
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 0x1588
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 0x159c
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 0x172c
movq -0x38(%rbp), %rax
leaq 0x3a3b(%rip), %rcx      # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rdi
callq 0x1050
movsd %xmm0, 0x6b4d(%rip)     # 0x8130
movl $0x1, -0x18(%rbp)
jmp 0x1746
movq -0x28(%rbp), %rdi
callq 0x1050
movsd %xmm0, 0x6b38(%rip)     # 0x8138
movl $0x1, -0x18(%rbp)
jmp 0x1746
movq 0x6b05(%rip), %rsi      # 0x8118
movq 0x6b06(%rip), %rdx      # 0x8120
leaq 0x3aa8(%rip), %rdi      # 0x50c9
movb $0x0, %al
callq 0x1090
xorl %edi, %edi
callq 0x11d0
leaq 0x3aa2(%rip), %rdi      # 0x50d8
movb $0x0, %al
callq 0x1090
leaq 0x3a9b(%rip), %rdi      # 0x50df
movb $0x0, %al
callq 0x1090
leaq 0x3ac0(%rip), %rdi      # 0x5112
movb $0x0, %al
callq 0x1090
leaq 0x3ae4(%rip), %rdi      # 0x5144
movb $0x0, %al
callq 0x1090
leaq 0x4006(%rip), %rdi      # 0x5674
movb $0x0, %al
callq 0x1090
leaq 0x3ad9(%rip), %rdi      # 0x5155
movb $0x0, %al
callq 0x1090
leaq 0x3ada(%rip), %rdi      # 0x5164
movb $0x0, %al
callq 0x1090
leaq 0x3af6(%rip), %rdi      # 0x518e
movb $0x0, %al
callq 0x1090
movsd 0x6a89(%rip), %xmm0     # 0x8130
leaq 0x3b14(%rip), %rdi      # 0x51c2
movb $0x1, %al
callq 0x1090
leaq 0x3fb8(%rip), %rdi      # 0x5674
movb $0x0, %al
callq 0x1090
leaq 0x3b18(%rip), %rdi      # 0x51e2
movb $0x0, %al
callq 0x1090
leaq 0x3b31(%rip), %rdi      # 0x5209
movb $0x0, %al
callq 0x1090
leaq 0x3b52(%rip), %rdi      # 0x5238
movb $0x0, %al
callq 0x1090
leaq 0x3f80(%rip), %rdi      # 0x5674
movb $0x0, %al
callq 0x1090
leaq 0x3b5c(%rip), %rdi      # 0x525e
movb $0x0, %al
callq 0x1090
leaq 0x3f64(%rip), %rdi      # 0x5674
movb $0x0, %al
callq 0x1090
leaq 0x3b72(%rip), %rdi      # 0x5290
movb $0x0, %al
callq 0x1090
xorl %edi, %edi
callq 0x11d0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x3b62(%rip), %rdi      # 0x52a1
movb $0x0, %al
callq 0x1d90
cmpl $0x0, -0x1c(%rbp)
je 0x175b
cmpl $0x0, -0x18(%rbp)
je 0x175b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1516
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)