// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xbd1a(%rip), %rsi      # 0xe115
callq 0x2170
cmpl $0x0, %eax
jne 0x2433
movsd 0xbc03(%rip), %xmm0     # 0xe010
movsd %xmm0, 0x10d7b(%rip)    # 0x13190
xorps %xmm0, %xmm0
movsd %xmm0, 0x11018(%rip)    # 0x13438
leaq 0xbcfa(%rip), %rax      # 0xe121
movq %rax, 0x10d6a(%rip)     # 0x13198
jmp 0x2619
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xbce7(%rip), %rsi      # 0xe128
callq 0x2170
cmpl $0x0, %eax
jne 0x247e
movsd 0xbc1d(%rip), %xmm0     # 0xe070
movsd %xmm0, 0x10d35(%rip)    # 0x13190
movsd 0xbc05(%rip), %xmm0     # 0xe068
movsd %xmm0, 0x10fcd(%rip)    # 0x13438
leaq 0xbcaf(%rip), %rax      # 0xe121
movq %rax, 0x10d1f(%rip)     # 0x13198
jmp 0x2617
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xbca9(%rip), %rsi      # 0xe135
callq 0x2170
cmpl $0x0, %eax
jne 0x24c9
movsd 0xbbc2(%rip), %xmm0     # 0xe060
movsd %xmm0, 0x10cea(%rip)    # 0x13190
movsd 0xbbaa(%rip), %xmm0     # 0xe058
movsd %xmm0, 0x10f82(%rip)    # 0x13438
leaq 0xbc85(%rip), %rax      # 0xe142
movq %rax, 0x10cd4(%rip)     # 0x13198
jmp 0x2615
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xbc73(%rip), %rsi      # 0xe14a
callq 0x2170
cmpl $0x0, %eax
jne 0x2524
movsd 0xbb67(%rip), %xmm0     # 0xe050
movsd %xmm0, 0x10c9f(%rip)    # 0x13190
movsd 0xbb4f(%rip), %xmm0     # 0xe048
movsd %xmm0, 0x10c9f(%rip)    # 0x131a0
movsd 0xbb37(%rip), %xmm0     # 0xe040
movsd %xmm0, 0x10f27(%rip)    # 0x13438
leaq 0xbc2a(%rip), %rax      # 0xe142
movq %rax, 0x10c79(%rip)     # 0x13198
jmp 0x2613
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xbc22(%rip), %rsi      # 0xe154
callq 0x2170
cmpl $0x0, %eax
jne 0x256f
movsd 0xbaf4(%rip), %xmm0     # 0xe038
movsd %xmm0, 0x10c44(%rip)    # 0x13190
movsd 0xbadc(%rip), %xmm0     # 0xe030
movsd %xmm0, 0x10edc(%rip)    # 0x13438
leaq 0xbbdf(%rip), %rax      # 0xe142
movq %rax, 0x10c2e(%rip)     # 0x13198
jmp 0x2611
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xbbe0(%rip), %rsi      # 0xe15d
callq 0x2170
cmpl $0x0, %eax
jne 0x25c7
movsd 0xba99(%rip), %xmm0     # 0xe028
movsd %xmm0, 0x10bf9(%rip)    # 0x13190
movsd 0xba81(%rip), %xmm0     # 0xe020
movsd %xmm0, 0x10e91(%rip)    # 0x13438
movsd 0xba69(%rip), %xmm0     # 0xe018
movsd %xmm0, 0x10bf1(%rip)    # 0x131a8
leaq 0xbbac(%rip), %rax      # 0xe16a
movq %rax, 0x10bd3(%rip)     # 0x13198
jmp 0x260f
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0xbb9e(%rip), %rsi      # 0xe173
callq 0x2170
cmpl $0x0, %eax
jne 0x260d
movsd 0xba29(%rip), %xmm0     # 0xe010
movsd %xmm0, 0x10ba1(%rip)    # 0x13190
movsd 0xba11(%rip), %xmm0     # 0xe008
movsd %xmm0, 0x10e39(%rip)    # 0x13438
leaq 0xbb64(%rip), %rax      # 0xe16a
movq %rax, 0x10b8b(%rip)     # 0x13198
jmp 0x260f
jmp 0x2611
jmp 0x2613
jmp 0x2615
jmp 0x2617
jmp 0x2619
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x2780
movl %eax, -0x14(%rbp)
callq 0x2ac0
callq 0x2e80
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x0, %eax
jne 0x265e
movq 0x10994(%rip), %rax     # 0x12fd8
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq 0x1097e(%rip), %rax     # 0x12fd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2702
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x1, %eax
jne 0x2695
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbaf5(%rip), %rsi      # 0xe171
callq 0xa010
movq %rax, -0x20(%rbp)
movq 0x10944(%rip), %rax     # 0x12fd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2700
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x2, %eax
jne 0x26df
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbabe(%rip), %rsi      # 0xe171
callq 0xa010
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbaad(%rip), %rsi      # 0xe181
callq 0xa010
movq %rax, -0x28(%rbp)
jmp 0x26fe
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0xba96(%rip), %rdi      # 0xe183
movb $0x0, %al
callq 0x20c0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2280
jmp 0x2700
jmp 0x2702
callq 0xa4f0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xa9f0
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
jle 0x2733
leaq 0xba8a(%rip), %rdi      # 0xe1b6
movb $0x0, %al
callq 0x9ec0
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq 0xbaaf(%rip), %rdx      # 0xe1f1
xorl %eax, %eax
movl %eax, %ecx
callq 0xb990
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x3c10
movq -0x20(%rbp), %rdi
callq 0x2090
movq -0x28(%rbp), %rdi
callq 0x2090
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)