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

    FILE *in,*out;
    RRA *h;

    argIndex = processOptions(argc,argv);

    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);

    int i;
    for (i = 0; i < COMBS; ++i)
        early[i] = newLPC(millisecondsToSamples(earlyDelays[i]),
            earlyCombGains[i],earlyLowpassGains[i]);
    late = newDAP(millisecondsToSamples(lateDelay),lateGain);
    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, %r14
movl %edi, %ebx
pushq $0x1
popq %r12
movslq %r12d, %r13
cmpl %r12d, %ebx
jle 0x24d2
movq (%r14,%r13,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x24d2
movb 0x2(%rsi), %r15b
testb %r15b, %r15b
je 0x244b
leaq 0x2(%rsi), %rdi
jmp 0x2450
movq 0x8(%r14,%r13,8), %rdi
movzbl 0x1(%rsi), %eax
movb $0x1, %r13b
leal -0x61(%rax), %ecx
cmpl $0x7, %ecx
ja 0x247e
leaq 0x6b9e(%rip), %rdx      # 0x9004
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
callq 0x20a0
movsd %xmm0, 0xbdc4(%rip)     # 0xe240
jmp 0x24bb
cmpl $0x71, %eax
je 0x24ae
cmpl $0x76, %eax
je 0x2761
xorl %r13d, %r13d
leaq 0x6c6e(%rip), %rdi      # 0x9104
xorl %eax, %eax
callq 0x6378
jmp 0x24bb
callq 0x20a0
movsd %xmm0, 0xbd9c(%rip)     # 0xe248
jmp 0x24bb
callq 0x20a0
movsd %xmm0, 0xbd95(%rip)     # 0xe250
testb %r15b, %r15b
sete %al
andb %r13b, %al
movzbl %al, %eax
addl %eax, %r12d
incl %r12d
jmp 0x2423
subl %r12d, %ebx
jne 0x24e3
movq 0xbafa(%rip), %rax      # 0xdfd8
movq (%rax), %rbx
jmp 0x2504
cmpl $0x2, %ebx
je 0x2510
cmpl $0x1, %ebx
jne 0x2780
movq (%r14,%r13,8), %rdi
leaq 0x6d4c(%rip), %rsi      # 0x9248
callq 0x64a8
movq %rax, %rbx
movq 0xbac5(%rip), %rax      # 0xdfd0
movq (%rax), %r14
jmp 0x2537
movq (%r14,%r13,8), %rdi
leaq 0x6d2d(%rip), %rsi      # 0x9248
callq 0x64a8
movq %rax, %rbx
movq 0x8(%r14,%r13,8), %rdi
leaq 0x6b02(%rip), %rsi      # 0x9031
callq 0x64a8
movq %rax, %r14
callq 0x6704
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x6a69
movq %r15, -0x30(%rbp)
cmpl $0x2, (%r15)
jl 0x2564
leaq 0x6b09(%rip), %rdi      # 0x9066
xorl %eax, %eax
callq 0x6378
leaq 0x6b36(%rip), %rdx      # 0x90a1
xorl %r12d, %r12d
movq %r14, %rdi
movq -0x30(%rbp), %rsi
xorl %ecx, %ecx
callq 0x7478
leaq 0xbc2d(%rip), %r13      # 0xe1b0
leaq 0xbf56(%rip), %r15      # 0xe4e0
cmpq $0x30, %r12
je 0x25cc
cvtsi2sdl (%r13), %xmm0
callq 0x58cb
cvttsd2si %xmm0, %edi
leaq 0xbc2a(%rip), %rax      # 0xe1d0
movsd (%r12,%rax), %xmm0
leaq 0xbc4d(%rip), %rax      # 0xe200
movsd (%r12,%rax), %xmm1
callq 0x8503
movq %rax, (%r12,%r15)
addq $0x8, %r12
addq $0x4, %r13
jmp 0x258a
cvtsi2sdl 0xbc5c(%rip), %xmm0 # 0xe230
callq 0x58cb
cvttsd2si %xmm0, %edi
movsd 0xbc53(%rip), %xmm0     # 0xe238
callq 0x862b
movq %rax, 0xbf1f(%rip)      # 0xe510
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x5100(%rip), %rcx      # 0x7705
callq 0x6f3e
movl %eax, %r13d
movq %rbx, %rdi
callq 0x21f0
testl %eax, %eax
jne 0x268c
movl %r13d, %edi
callq 0x2799
movl %eax, %r12d
movq 0xbee5(%rip), %rdi      # 0xe510
movl %r13d, %esi
callq 0x8671
addl %r12d, %eax
cvtsi2sd %eax, %xmm0
mulsd 0xbbfe(%rip), %xmm0     # 0xe240
cvttsd2si %xmm0, %edx
movq %r14, %rdi
leaq 0x716d(%rip), %rsi      # 0x97bd
xorl %eax, %eax
callq 0x21d0
movl %r13d, %edi
callq 0x2799
movq 0xbeaa(%rip), %rdi      # 0xe510
movl %eax, %esi
callq 0x86bf
xorl %r12d, %r12d
cmpq $0x30, %r12
je 0x25f1
movq (%r12,%r15), %rdi
movl %r13d, %esi
callq 0x85fe
addq $0x8, %r12
jmp 0x2670
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x20c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rsi
leaq 0x6a0d(%rip), %rdi      # 0x90c4
xorl %eax, %eax
callq 0x20f0
leaq 0x6a59(%rip), %rdi      # 0x911e
callq 0x2090
leaq 0x6a70(%rip), %rdi      # 0x9141
callq 0x2090
leaq 0x6a8a(%rip), %rdi      # 0x9167
callq 0x2090
movsd 0xbb56(%rip), %xmm0     # 0xe240
leaq 0x69e0(%rip), %rbx      # 0x90d1
movq %rbx, %rdi
movb $0x1, %al
callq 0x20f0
leaq 0x6a8b(%rip), %rdi      # 0x918d
callq 0x2090
movsd 0xbb39(%rip), %xmm0     # 0xe248
leaq 0x69d3(%rip), %rdi      # 0x90e9
movb $0x1, %al
callq 0x20f0
leaq 0x6a9e(%rip), %rdi      # 0x91c2
callq 0x2090
leaq 0x6ab9(%rip), %rdi      # 0x91e9
callq 0x2090
movsd 0xbb13(%rip), %xmm0     # 0xe250
movq %rbx, %rdi
movb $0x1, %al
callq 0x20f0
leaq 0x6ad8(%rip), %rdi      # 0x9226
callq 0x2090
leaq 0x6af0(%rip), %rdi      # 0x924a
callq 0x2090
jmp 0x2779
movq (%r14), %rsi
movq 0xba3d(%rip), %rdx      # 0xe1a8
leaq 0x6943(%rip), %rdi      # 0x90b5
xorl %eax, %eax
callq 0x20f0
xorl %edi, %edi
callq 0x22b0
movq (%r14), %rsi
leaq 0x68a9(%rip), %rdi      # 0x9033
xorl %eax, %eax
callq 0x20f0
pushq $-0x1
popq %rdi
callq 0x22b0