// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/utils/lowpass2/lowpass2.c
// Function: main
int
main(int argc,char **argv)
    {
    int argIndex = 1;

    FILE *in,*out;
    RRA *h;

    if (strcmp(argv[0],"rralowpass2") == 0)
        {
        Freq = 8000;
        Style = LOWPASS;
        FType = "cutoff";
        }
    else if (strcmp(argv[0],"rrahighpass2") == 0)
        {
        Freq = 100;
        Style = HIGHPASS;
        FType = "cutoff";
        }
    else if (strcmp(argv[0],"rrabandpass2") == 0)
        {
        Freq = 800;
        Style = BANDPASS;
        FType = "central";
        }
    else if (strcmp(argv[0],"rranotch2") == 0)
        {
        Freq = 2500;
        Quality = 10;
        Style = NOTCH;
        FType = "central";
        }
    else if (strcmp(argv[0],"rrapeak2") == 0)
        {
        Freq = 440;
        Style = PEAK;
        FType = "central";
        }
    else if (strcmp(argv[0],"rralowshelf2") == 0)
        {
        Freq = 350;
        Style = LOWSHELF;
        Gain = -3;                  //default is cut
        FType = "shoulder";
        }
    else if (strcmp(argv[0],"rrahighshelf2") == 0)
        {
        Freq = 8000;
        Style = HIGHSHELF;
        FType = "shoulder";
        }

    argIndex = processOptions(argc,argv);

    computeCoefficients(); //get rid of this?
    computeCoefficients2();

    if (argc-argIndex == 0)
        {
        in = stdin;
        out = stdout;
        }
    else if (argc-argIndex == 1)
        {
        in = OpenFile(argv[argIndex],"r");
        out = stdout;
        }
    else if (argc-argIndex == 2)
        {
        in = OpenFile(argv[argIndex],"r");
        out = OpenFile(argv[argIndex+1],"w");
        }
    else
        {
        printf("usage: %s [<input rra file> [<output wave file>]]\n",argv[0]);
        exit(-1);
        }

    h = newRRAHeader();
    
    readRRAHeader(in,h,0);

    if (h->channels > 1)
        Fatal("lowpass works on mono files, use slowpass for stero files\n");

    writeRRAHeader(out,h,"modifiedBy: lowpass",0);

    processData(in,out,h);

    fclose(in);
    fclose(out);

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, -0x2c(%rbp)
movq (%rsi), %r15
leaq 0x6d2b(%rip), %rsi      # 0xa0c5
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x33c4
movabsq $0x40bf400000000000, %rax # imm = 0x40BF400000000000
movq %rax, 0xbe09(%rip)      # 0xf1c0
movq $0x0, 0xc0a6(%rip) # 0xf468
jmp 0x33f9
leaq 0x6d0d(%rip), %rsi      # 0xa0d8
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x3405
movabsq $0x4059000000000000, %rax # imm = 0x4059000000000000
movq %rax, 0xbdd8(%rip)      # 0xf1c0
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xc06f(%rip)      # 0xf468
leaq 0x6cd1(%rip), %rax      # 0xa0d1
jmp 0x34b6
leaq 0x6cd9(%rip), %rsi      # 0xa0e5
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x3435
movabsq $0x4089000000000000, %rax # imm = 0x4089000000000000
movq %rax, 0xbd97(%rip)      # 0xf1c0
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
jmp 0x34a8
leaq 0x6cbe(%rip), %rsi      # 0xa0fa
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x3476
movabsq $0x40a3880000000000, %rax # imm = 0x40A3880000000000
movq %rax, 0xbd67(%rip)      # 0xf1c0
movabsq $0x4024000000000000, %rax # imm = 0x4024000000000000
movq %rax, 0xbd66(%rip)      # 0xf1d0
movabsq $0x4008000000000000, %rax # imm = 0x4008000000000000
jmp 0x34a8
leaq 0x6c87(%rip), %rsi      # 0xa104
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x35ad
movabsq $0x407b800000000000, %rax # imm = 0x407B800000000000
movq %rax, 0xbd22(%rip)      # 0xf1c0
movabsq $0x4010000000000000, %rax # imm = 0x4010000000000000
movq %rax, 0xbfb9(%rip)      # 0xf468
leaq 0x6c3c(%rip), %rax      # 0xa0f2
movq %rax, 0xbd0b(%rip)      # 0xf1c8
movl $0x1, %r15d
cmpl $0x2, -0x2c(%rbp)
jl 0x358e
movl $0x1, %r15d
leaq 0x6ba6(%rip), %r13      # 0xa080
movslq %r15d, %rax
movq (%rbx,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x358e
movb 0x2(%rsi), %r12b
testb %r12b, %r12b
je 0x34f9
leaq 0x2(%rsi), %rdi
jmp 0x34fe
movq 0x8(%rbx,%rax,8), %rdi
movzbl 0x1(%rsi), %eax
leal -0x61(%rax), %ecx
cmpl $0x7, %ecx
ja 0x3523
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
callq 0x20a0
movsd %xmm0, 0xbcbf(%rip)     # 0xf1e0
jmp 0x356f
cmpl $0x71, %eax
je 0x3562
cmpl $0x76, %eax
je 0x3738
xorl %r14d, %r14d
leaq 0x6d8d(%rip), %rdi      # 0xa2c8
xorl %eax, %eax
callq 0x78fc
jmp 0x3572
callq 0x20a0
movsd %xmm0, 0xbc6f(%rip)     # 0xf1c0
jmp 0x356f
callq 0x20a0
movsd %xmm0, 0xbc78(%rip)     # 0xf1d8
jmp 0x356f
callq 0x20a0
movsd %xmm0, 0xbc61(%rip)     # 0xf1d0
movb $0x1, %r14b
testb %r12b, %r12b
sete %al
andb %r14b, %al
movzbl %al, %eax
addl %eax, %r15d
incl %r15d
cmpl -0x2c(%rbp), %r15d
jl 0x34da
movl %r15d, %edi
movl -0x2c(%rbp), %esi
movq %rbx, %rdx
callq 0x2340
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6b59(%rip), %rsi      # 0xa10d
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x35f5
movabsq $0x4075e00000000000, %rax # imm = 0x4075E00000000000
movq %rax, 0xbbef(%rip)      # 0xf1c0
movabsq $0x4014000000000000, %rax # imm = 0x4014000000000000
movq %rax, 0xbe86(%rip)      # 0xf468
movabsq $-0x3ff8000000000000, %rax # imm = 0xC008000000000000
movq %rax, 0xbbe5(%rip)      # 0xf1d8
jmp 0x362e
leaq 0x6b27(%rip), %rsi      # 0xa123
movq %r15, %rdi
callq 0x21b0
testl %eax, %eax
jne 0x34bd
movabsq $0x40bf400000000000, %rax # imm = 0x40BF400000000000
movq %rax, 0xbba3(%rip)      # 0xf1c0
movabsq $0x4018000000000000, %rax # imm = 0x4018000000000000
movq %rax, 0xbe3a(%rip)      # 0xf468
leaq 0x6ae5(%rip), %rax      # 0xa11a
jmp 0x34b6
movq (%rbx), %rsi
leaq 0x6bc7(%rip), %rdi      # 0xa20b
xorl %eax, %eax
callq 0x20f0
leaq 0x6c90(%rip), %rdi      # 0xa2e2
callq 0x2090
leaq 0x6ca7(%rip), %rdi      # 0xa305
callq 0x2090
leaq 0x6cc1(%rip), %rdi      # 0xa32b
callq 0x2090
movsd 0xbb69(%rip), %xmm0     # 0xf1e0
leaq 0x6b9a(%rip), %rdi      # 0xa218
movb $0x1, %al
callq 0x20f0
movq 0xbb3c(%rip), %rsi      # 0xf1c8
leaq 0x6b9d(%rip), %rdi      # 0xa230
xorl %eax, %eax
callq 0x20f0
movsd 0xbb1e(%rip), %xmm0     # 0xf1c0
leaq 0x6baf(%rip), %rdi      # 0xa258
movb $0x1, %al
callq 0x20f0
movsd 0xbdb0(%rip), %xmm0     # 0xf468
ucomisd 0x6948(%rip), %xmm0     # 0xa008
jne 0x36c4
jnp 0x36dc
ucomisd 0x6944(%rip), %xmm0     # 0xa010
jne 0x36d0
jnp 0x36dc
ucomisd 0x6940(%rip), %xmm0     # 0xa018
jne 0x370a
jp 0x370a
leaq 0x6c6e(%rip), %rdi      # 0xa351
callq 0x2090
leaq 0x6c7f(%rip), %rdi      # 0xa36e
callq 0x2090
movsd 0xbadc(%rip), %xmm0     # 0xf1d8
leaq 0x6b70(%rip), %rdi      # 0xa273
movb $0x1, %al
callq 0x20f0
leaq 0x6c93(%rip), %rdi      # 0xa3a4
callq 0x2090
movsd 0xbd4a(%rip), %xmm0     # 0xf468
ucomisd 0x68fa(%rip), %xmm0     # 0xa020
jne 0x3752
jp 0x3752
leaq 0x6c9a(%rip), %rdi      # 0xa3cb
callq 0x2090
jmp 0x3767
movq (%rbx), %rsi
movq 0xba76(%rip), %rdx      # 0xf1b8
leaq 0x6ab3(%rip), %rdi      # 0xa1fc
xorl %eax, %eax
callq 0x20f0
jmp 0x3795
movq 0xba6f(%rip), %rsi      # 0xf1c8
leaq 0x6b2e(%rip), %rdi      # 0xa28e
xorl %eax, %eax
callq 0x20f0
movsd 0xba61(%rip), %xmm0     # 0xf1d0
leaq 0x6aa2(%rip), %rdi      # 0xa218
movb $0x1, %al
callq 0x20f0
leaq 0x6c8d(%rip), %rdi      # 0xa411
callq 0x2090
leaq 0x6ca5(%rip), %rdi      # 0xa435
callq 0x2090
xorl %edi, %edi
callq 0x22d0