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

    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: ereverb -a<N> -d<N> "
            "[<input rra file> [<output rra file>]]\n");
        exit(-1);
        }

    songInit();

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

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

    //convert from milliseconds to samples
    delay1 = delay1 * h->sampleRate / 1000;
    delay2 = delay2 * h->sampleRate / 1000;

    size = 2 * delay1 + delay2;

    processData(in,out,h);

    fclose(in);
    fclose(out);

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x25a0
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x0, %eax
jne 0x241e
movq 0xdbda(%rip), %rax      # 0xffd8
movq (%rax), %rax
movq %rax, 0xe020(%rip)      # 0x10428
movq 0xdbc1(%rip), %rax      # 0xffd0
movq (%rax), %rax
movq %rax, 0xe017(%rip)      # 0x10430
jmp 0x24c7
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x1, %eax
jne 0x245b
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa68c(%rip), %rsi      # 0xcac8
callq 0x8e80
movq %rax, 0xdfe0(%rip)      # 0x10428
movq 0xdb81(%rip), %rax      # 0xffd0
movq (%rax), %rax
movq %rax, 0xdfd7(%rip)      # 0x10430
jmp 0x24c5
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x2, %eax
jne 0x24ab
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa64f(%rip), %rsi      # 0xcac8
callq 0x8e80
movq %rax, 0xdfa3(%rip)      # 0x10428
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x9b80(%rip), %rsi      # 0xc01d
callq 0x8e80
movq %rax, 0xdf87(%rip)      # 0x10430
jmp 0x24c3
leaq 0x9b6d(%rip), %rdi      # 0xc01f
movb $0x0, %al
callq 0x20c0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2270
jmp 0x24c5
jmp 0x24c7
callq 0x2b60
callq 0x9360
movq %rax, 0xdf60(%rip)      # 0x10438
movq 0xdf49(%rip), %rdi      # 0x10428
movq 0xdf52(%rip), %rsi      # 0x10438
xorl %eax, %eax
movl %eax, %edx
callq 0x9860
movq 0xdf3a(%rip), %rdi      # 0x10430
movq 0xdf3b(%rip), %rsi      # 0x10438
leaq 0x9b5e(%rip), %rdx      # 0xc062
xorl %eax, %eax
movl %eax, %ecx
callq 0xa800
movl 0xdc6d(%rip), %eax      # 0x10180
movq 0xdf1e(%rip), %rcx      # 0x10438
imull 0x4(%rcx), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movl %eax, 0xdc54(%rip)      # 0x10180
movl 0xdc52(%rip), %eax      # 0x10184
movq 0xdeff(%rip), %rcx      # 0x10438
imull 0x4(%rcx), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movl %eax, 0xdc39(%rip)      # 0x10184
movl 0xdc2f(%rip), %eax      # 0x10180
shll %eax
addl 0xdc2b(%rip), %eax      # 0x10184
movl %eax, 0xdc29(%rip)      # 0x10188
movq 0xdec2(%rip), %rdi      # 0x10428
movq 0xdec3(%rip), %rsi      # 0x10430
movq 0xdec4(%rip), %rdx      # 0x10438
callq 0x2830
movq 0xdea8(%rip), %rdi      # 0x10428
callq 0x2090
movq 0xdea4(%rip), %rdi      # 0x10430
callq 0x2090
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)