// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %ebx
movl $0x1, %r12d
cmpl $0x2, %edi
jl 0x2831
movl $0x1, %r12d
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x2831
movb 0x2(%rsi), %r15b
testb %r15b, %r15b
je 0x27a6
leaq 0x2(%rsi), %rdi
jmp 0x27ab
movq 0x8(%r14,%rax,8), %rdi
movzbl 0x1(%rsi), %eax
movb $0x1, %r13b
leal -0x61(%rax), %ecx
cmpl $0x7, %ecx
ja 0x27d9
leaq 0x7843(%rip), %rdx      # 0xa004
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
callq 0x20a0
movsd %xmm0, 0xca69(%rip)     # 0xf240
jmp 0x2816
cmpl $0x71, %eax
je 0x2809
cmpl $0x76, %eax
je 0x2b23
xorl %r13d, %r13d
leaq 0x7913(%rip), %rdi      # 0xa104
xorl %eax, %eax
callq 0x6cc0
jmp 0x2816
callq 0x20a0
movsd %xmm0, 0xca41(%rip)     # 0xf248
jmp 0x2816
callq 0x20a0
movsd %xmm0, 0xca3a(%rip)     # 0xf250
testb %r15b, %r15b
sete %al
andb %r13b, %al
movzbl %al, %eax
addl %eax, %r12d
incl %r12d
cmpl %ebx, %r12d
jl 0x2787
subl %r12d, %ebx
jne 0x2842
movq 0xc79b(%rip), %rax      # 0xefd8
movq (%rax), %r15
jmp 0x2866
cmpl $0x2, %ebx
je 0x2872
cmpl $0x1, %ebx
jne 0x2b42
movslq %r12d, %rax
movq (%r14,%rax,8), %rdi
leaq 0x79ea(%rip), %rsi      # 0xa248
callq 0x6d5a
movq %rax, %r15
movq 0xc763(%rip), %rax      # 0xefd0
movq (%rax), %rbx
jmp 0x289c
movslq %r12d, %rbx
movq (%r14,%rbx,8), %rdi
leaq 0x79c8(%rip), %rsi      # 0xa248
callq 0x6d5a
movq %rax, %r15
movq 0x8(%r14,%rbx,8), %rdi
leaq 0x779d(%rip), %rsi      # 0xa031
callq 0x6d5a
movq %rax, %rbx
callq 0x6fcb
movq %rax, %r14
movq %r15, -0x40(%rbp)
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x73f1
movq %r14, -0x30(%rbp)
cmpl $0x2, (%r14)
jl 0x28cd
leaq 0x77a0(%rip), %rdi      # 0xa066
xorl %eax, %eax
callq 0x6cc0
leaq 0x77cd(%rip), %rdx      # 0xa0a1
xorl %r12d, %r12d
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
xorl %ecx, %ecx
callq 0x7e8c
leaq 0xc8c0(%rip), %r13      # 0xf1b0
leaq 0xc8d9(%rip), %rbx      # 0xf1d0
leaq 0xc902(%rip), %r14      # 0xf200
leaq 0xcbdb(%rip), %r15      # 0xf4e0
xorps %xmm0, %xmm0
cvtsi2sdl (%r13), %xmm0
callq 0x6138
cvttsd2si %xmm0, %edi
movsd (%r12,%rbx), %xmm0
movsd (%r12,%r14), %xmm1
callq 0x8f97
movq %rax, (%r12,%r15)
addq $0x8, %r12
addq $0x4, %r13
cmpq $0x30, %r12
jne 0x2905
xorps %xmm0, %xmm0
cvtsi2sdl 0xc8eb(%rip), %xmm0 # 0xf230
callq 0x6138
cvttsd2si %xmm0, %edi
movsd 0xc8e2(%rip), %xmm0     # 0xf238
callq 0x90d2
movq %rax, 0xcbae(%rip)      # 0xf510
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x57e7(%rip), %rcx      # 0x8157
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq -0x38(%rbp), %r14
movq %r14, %rsi
callq 0x78f4
movl %eax, %r12d
movq %rbx, %rdi
callq 0x21f0
testl %eax, %eax
jne 0x2a4e
xorl %r14d, %r14d
xorl %ebx, %ebx
movq (%r14,%r15), %rdi
movl %r12d, %esi
callq 0x8ff7
addl %eax, %ebx
addq $0x8, %r14
cmpq $0x30, %r14
jne 0x299b
movq 0xcb56(%rip), %rdi      # 0xf510
movl %r12d, %esi
callq 0x911a
addl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0xc86d(%rip), %xmm0     # 0xf240
cvttsd2si %xmm0, %edx
xorl %ebx, %ebx
movq -0x38(%rbp), %r14
movq %r14, %rdi
leaq 0x7de6(%rip), %rsi      # 0xa7cd
xorl %eax, %eax
callq 0x21d0
xorl %r13d, %r13d
movq (%rbx,%r15), %rdi
movl %r12d, %esi
callq 0x8ff7
addl %eax, %r13d
addq $0x8, %rbx
cmpq $0x30, %rbx
jne 0x29f1
movq 0xcaff(%rip), %rdi      # 0xf510
movl %r13d, %esi
callq 0x916b
xorl %ebx, %ebx
movq (%rbx,%r15), %rdi
movl %r12d, %esi
callq 0x9088
addq $0x8, %rbx
cmpq $0x30, %rbx
jne 0x2a1b
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x570e(%rip), %rcx      # 0x8157
jmp 0x297e
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x20c0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rsi
leaq 0x764b(%rip), %rdi      # 0xa0c4
xorl %eax, %eax
callq 0x20f0
leaq 0x7697(%rip), %rdi      # 0xa11e
callq 0x2090
leaq 0x76ae(%rip), %rdi      # 0xa141
callq 0x2090
leaq 0x76c8(%rip), %rdi      # 0xa167
callq 0x2090
movsd 0xc794(%rip), %xmm0     # 0xf240
leaq 0x761e(%rip), %rbx      # 0xa0d1
movq %rbx, %rdi
movb $0x1, %al
callq 0x20f0
leaq 0x76c9(%rip), %rdi      # 0xa18d
callq 0x2090
movsd 0xc777(%rip), %xmm0     # 0xf248
leaq 0x7611(%rip), %rdi      # 0xa0e9
movb $0x1, %al
callq 0x20f0
leaq 0x76dc(%rip), %rdi      # 0xa1c2
callq 0x2090
leaq 0x76f7(%rip), %rdi      # 0xa1e9
callq 0x2090
movsd 0xc751(%rip), %xmm0     # 0xf250
movq %rbx, %rdi
movb $0x1, %al
callq 0x20f0
leaq 0x7716(%rip), %rdi      # 0xa226
callq 0x2090
leaq 0x772e(%rip), %rdi      # 0xa24a
callq 0x2090
jmp 0x2b3b
movq (%r14), %rsi
movq 0xc67b(%rip), %rdx      # 0xf1a8
leaq 0x7581(%rip), %rdi      # 0xa0b5
xorl %eax, %eax
callq 0x20f0
xorl %edi, %edi
callq 0x22c0
movq (%r14), %rsi
leaq 0x74e7(%rip), %rdi      # 0xa033
xorl %eax, %eax
callq 0x20f0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x22c0
nopl (%rax)