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

    argIndex = processOptions(argc,argv);

    if (argc-argIndex == 1)
        {
        filter(OpenFile(argv[argIndex],"r"),stdout);
        }
    else if (argc-argIndex >= 2 && strstr(argv[argIndex+1],".wav") != 0)
        {
        batch(argc-argIndex,argv+argIndex);
        }
    else if (argc-argIndex == 2)
        {
        filter(OpenFile(argv[argIndex],"r"),OpenFile(argv[argIndex+1],"w"));
        }
    else
        {
        printf("usage: wav2rra <input wav file> [<output rra file>]\n");
        printf("       wav2rra <input wav file1> <input wav file2> ...\n");
        exit(-1);
        }

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movl %edi, %r14d
pushq $0x1
popq %r12
movl %r14d, %r13d
movslq %r12d, %rax
subl %r12d, %r13d
jle 0x143d
movq (%rbx,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x143d
movb 0x2(%rsi), %r13b
testb %r13b, %r13b
je 0x13d1
leaq 0x2(%rsi), %rdi
jmp 0x13d6
movq 0x8(%rbx,%rax,8), %rdi
movzbl 0x1(%rsi), %eax
cmpl $0x61, %eax
je 0x1409
cmpl $0x74, %eax
je 0x1418
cmpl $0x76, %eax
je 0x158c
cmpl $0x68, %eax
je 0x15aa
xorl %r15d, %r15d
leaq 0x2cbd(%rip), %rdi      # 0x40bd
xorl %eax, %eax
callq 0x1764
jmp 0x1426
callq 0x1090
movsd %xmm0, 0x5d5a(%rip)     # 0x7170
jmp 0x1423
callq 0x1210
movl %eax, 0x5d45(%rip)      # 0x7168
movb $0x1, %r15b
testb %r13b, %r13b
sete %al
andb %r15b, %al
movzbl %al, %eax
addl %eax, %r12d
incl %r12d
jmp 0x13aa
cmpl $0x1, %r13d
jne 0x1465
movq (%rbx,%rax,8), %rdi
leaq 0x33c4(%rip), %rsi      # 0x4812
callq 0x1894
movq 0x5b7e(%rip), %rcx      # 0x6fd8
movq (%rcx), %rsi
movq %rax, %rdi
jmp 0x1573
jle 0x15c6
leaq (%rbx,%rax,8), %r12
movq 0x8(%r12), %rdi
leaq 0x2b8e(%rip), %rsi      # 0x4009
callq 0x1270
testq %rax, %rax
je 0x1543
movl %r13d, %eax
xorl %ebx, %ebx
movq %rax, -0x30(%rbp)
cmpq %rbx, %rax
je 0x1578
movq 0x5b56(%rip), %rax      # 0x6ff8
movq (%rax), %rdi
movq (%r12,%rbx,8), %rdx
leaq 0x2ba1(%rip), %rsi      # 0x4051
xorl %eax, %eax
callq 0x1150
movq (%r12,%rbx,8), %rdi
leaq 0x3350(%rip), %rsi      # 0x4812
callq 0x1894
movq %rax, %r15
movq (%r12,%rbx,8), %rdi
leaq 0x2c6b(%rip), %rsi      # 0x4140
callq 0x11e0
movq %rax, %r13
movq %rax, %rdi
callq 0x10b0
cmpq $0x1fb, %rax            # imm = 0x1FB
jb 0x14fb
leaq 0x2b73(%rip), %rdi      # 0x4067
xorl %eax, %eax
callq 0x1764
leaq -0x230(%rbp), %r14
movq %r14, %rdi
leaq 0x2b6f(%rip), %rsi      # 0x407b
movq %r13, %rdx
leaq 0x2b36(%rip), %rcx      # 0x404c
xorl %eax, %eax
callq 0x1220
movq %r14, %rdi
leaq 0x2ae7(%rip), %rsi      # 0x400e
callq 0x1894
movq %r15, %rdi
movq %rax, %rsi
callq 0x15e6
incq %rbx
movq -0x30(%rbp), %rax
jmp 0x1492
cmpl $0x2, %r13d
jne 0x15c6
movq (%r12), %rdi
leaq 0x32be(%rip), %rsi      # 0x4812
callq 0x1894
movq %rax, %rbx
movq 0x8(%r12), %rdi
leaq 0x2aa6(%rip), %rsi      # 0x400e
callq 0x1894
movq %rbx, %rdi
movq %rax, %rsi
callq 0x15e6
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5bc5(%rip), %rsi      # 0x7158
movq 0x5bc6(%rip), %rdx      # 0x7160
leaq 0x2b0d(%rip), %rdi      # 0x40ae
xorl %eax, %eax
callq 0x10c0
jmp 0x15bf
movq 0x5ba7(%rip), %rsi      # 0x7158
leaq 0x2ac8(%rip), %rdi      # 0x4080
xorl %eax, %eax
callq 0x10c0
xorl %edi, %edi
callq 0x1230
leaq 0x2b0a(%rip), %rdi      # 0x40d7
callq 0x1070
leaq 0x2b32(%rip), %rdi      # 0x410b
callq 0x1070
pushq $-0x1
popq %rdi
callq 0x1230