// File: /workspace/github_c_makefile_star2_O1/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 0x2851
movl $0x1, %r12d
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x2851
movb 0x2(%rsi), %r15b
testb %r15b, %r15b
je 0x27c6
leaq 0x2(%rsi), %rdi
jmp 0x27cb
movq 0x8(%r14,%rax,8), %rdi
movzbl 0x1(%rsi), %eax
movb $0x1, %r13b
leal -0x61(%rax), %ecx
cmpl $0x7, %ecx
ja 0x27f9
leaq 0x7823(%rip), %rdx      # 0xa004
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
callq 0x20a0
movsd %xmm0, 0xca49(%rip)     # 0xf240
jmp 0x2836
cmpl $0x71, %eax
je 0x2829
cmpl $0x76, %eax
je 0x2b43
xorl %r13d, %r13d
leaq 0x78f3(%rip), %rdi      # 0xa104
xorl %eax, %eax
callq 0x6b88
jmp 0x2836
callq 0x20a0
movsd %xmm0, 0xca21(%rip)     # 0xf248
jmp 0x2836
callq 0x20a0
movsd %xmm0, 0xca1a(%rip)     # 0xf250
testb %r15b, %r15b
sete %al
andb %r13b, %al
movzbl %al, %eax
addl %eax, %r12d
incl %r12d
cmpl %ebx, %r12d
jl 0x27a7
subl %r12d, %ebx
jne 0x2862
movq 0xc77b(%rip), %rax      # 0xefd8
movq (%rax), %r15
jmp 0x2886
cmpl $0x2, %ebx
je 0x2892
cmpl $0x1, %ebx
jne 0x2b62
movslq %r12d, %rax
movq (%r14,%rax,8), %rdi
leaq 0x79ca(%rip), %rsi      # 0xa248
callq 0x6c22
movq %rax, %r15
movq 0xc743(%rip), %rax      # 0xefd0
movq (%rax), %rbx
jmp 0x28bc
movslq %r12d, %rbx
movq (%r14,%rbx,8), %rdi
leaq 0x79a8(%rip), %rsi      # 0xa248
callq 0x6c22
movq %rax, %r15
movq 0x8(%r14,%rbx,8), %rdi
leaq 0x777d(%rip), %rsi      # 0xa031
callq 0x6c22
movq %rax, %rbx
callq 0x6e9f
movq %rax, %r14
movq %r15, -0x40(%rbp)
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x72ac
movq %r14, -0x30(%rbp)
cmpl $0x2, (%r14)
jl 0x28ed
leaq 0x7780(%rip), %rdi      # 0xa066
xorl %eax, %eax
callq 0x6b88
leaq 0x77ad(%rip), %rdx      # 0xa0a1
xorl %r12d, %r12d
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
xorl %ecx, %ecx
callq 0x7cfd
leaq 0xc8a0(%rip), %r13      # 0xf1b0
leaq 0xc8b9(%rip), %rbx      # 0xf1d0
leaq 0xc8e2(%rip), %r14      # 0xf200
leaq 0xcbbb(%rip), %r15      # 0xf4e0
xorps %xmm0, %xmm0
cvtsi2sdl (%r13), %xmm0
callq 0x6047
cvttsd2si %xmm0, %edi
movsd (%r12,%rbx), %xmm0
movsd (%r12,%r14), %xmm1
callq 0x8df6
movq %rax, (%r12,%r15)
addq $0x8, %r12
addq $0x4, %r13
cmpq $0x30, %r12
jne 0x2925
xorps %xmm0, %xmm0
cvtsi2sdl 0xc8cb(%rip), %xmm0 # 0xf230
callq 0x6047
cvttsd2si %xmm0, %edi
movsd 0xc8c2(%rip), %xmm0     # 0xf238
callq 0x8f31
movq %rax, 0xcb8e(%rip)      # 0xf510
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x5639(%rip), %rcx      # 0x7fc9
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq -0x38(%rbp), %r14
movq %r14, %rsi
callq 0x7798
movl %eax, %r12d
movq %rbx, %rdi
callq 0x21f0
testl %eax, %eax
jne 0x2a6e
xorl %r14d, %r14d
xorl %ebx, %ebx
movq (%r14,%r15), %rdi
movl %r12d, %esi
callq 0x8e56
addl %eax, %ebx
addq $0x8, %r14
cmpq $0x30, %r14
jne 0x29bb
movq 0xcb36(%rip), %rdi      # 0xf510
movl %r12d, %esi
callq 0x8f79
addl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0xc84d(%rip), %xmm0     # 0xf240
cvttsd2si %xmm0, %edx
xorl %ebx, %ebx
movq -0x38(%rbp), %r14
movq %r14, %rdi
leaq 0x7d86(%rip), %rsi      # 0xa78d
xorl %eax, %eax
callq 0x21d0
xorl %r13d, %r13d
movq (%rbx,%r15), %rdi
movl %r12d, %esi
callq 0x8e56
addl %eax, %r13d
addq $0x8, %rbx
cmpq $0x30, %rbx
jne 0x2a11
movq 0xcadf(%rip), %rdi      # 0xf510
movl %r13d, %esi
callq 0x8fca
xorl %ebx, %ebx
movq (%rbx,%r15), %rdi
movl %r12d, %esi
callq 0x8ee7
addq $0x8, %rbx
cmpq $0x30, %rbx
jne 0x2a3b
movq -0x30(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x5560(%rip), %rcx      # 0x7fc9
jmp 0x299e
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 0x762b(%rip), %rdi      # 0xa0c4
xorl %eax, %eax
callq 0x20f0
leaq 0x7677(%rip), %rdi      # 0xa11e
callq 0x2090
leaq 0x768e(%rip), %rdi      # 0xa141
callq 0x2090
leaq 0x76a8(%rip), %rdi      # 0xa167
callq 0x2090
movsd 0xc774(%rip), %xmm0     # 0xf240
leaq 0x75fe(%rip), %rbx      # 0xa0d1
movq %rbx, %rdi
movb $0x1, %al
callq 0x20f0
leaq 0x76a9(%rip), %rdi      # 0xa18d
callq 0x2090
movsd 0xc757(%rip), %xmm0     # 0xf248
leaq 0x75f1(%rip), %rdi      # 0xa0e9
movb $0x1, %al
callq 0x20f0
leaq 0x76bc(%rip), %rdi      # 0xa1c2
callq 0x2090
leaq 0x76d7(%rip), %rdi      # 0xa1e9
callq 0x2090
movsd 0xc731(%rip), %xmm0     # 0xf250
movq %rbx, %rdi
movb $0x1, %al
callq 0x20f0
leaq 0x76f6(%rip), %rdi      # 0xa226
callq 0x2090
leaq 0x770e(%rip), %rdi      # 0xa24a
callq 0x2090
jmp 0x2b5b
movq (%r14), %rsi
movq 0xc65b(%rip), %rdx      # 0xf1a8
leaq 0x7561(%rip), %rdi      # 0xa0b5
xorl %eax, %eax
callq 0x20f0
xorl %edi, %edi
callq 0x22c0
movq (%r14), %rsi
leaq 0x74c7(%rip), %rdi      # 0xa033
xorl %eax, %eax
callq 0x20f0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x22c0
nopl (%rax)