// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/rra/rrastrip.c
// Function: main
int main( int argc, char* argv[] ){
        int i;
        int argIndex = processOptions( argc, argv );
        FILE *in, *out;
        char* inFile;
        char buffer[4096];
        /*for( i = argIndex; i < argc; i++){
                in = OpenFile(argv[i], "r");
                sprintf(buffer, "%s%s", "stripped_", argv[i]);
                out = OpenFile(buffer, "w");
                rraStrip( argv[i], in, out );
        }*/
        if( argc-argIndex == 0){
                in = stdin;
                out = stdout;
                inFile = "stdin";
        }else 
        if(argc - argIndex == 1 && !inPlace){
                in = OpenFile(argv[argIndex],"r");
                out = stdout;
                inFile = argv[argIndex];
        }else if(argc - argIndex == 2 && !inPlace){
                in = OpenFile(argv[argIndex],"r");
                out = OpenFile(argv[argIndex+1],"w");
                inFile = argv[argIndex];
        }else if( argc - argIndex >= 1 && inPlace){
                for( i = argIndex; i < argc; i++){
                        sprintf(buffer,"mv %s %s%s",argv[i], argv[i],".temp");
                        system(buffer);
                        sprintf(buffer,"%s%s",argv[i],".temp");
                        in = OpenFile(buffer,"r");
                        out = OpenFile(argv[i],"w");
                        inFile = argv[i];
                        rraStrip( inFile, in, out );
                        if( !badFile ){
                                sprintf(buffer,"rm %s%s",argv[i],".temp");
                                system(buffer);
                        }else{
                                badFile = 0;
                                sprintf(buffer,"mv %s%s %s",argv[i],".temp", argv[i]);
                                printf("Running command: %s\n",buffer);
                                system(buffer);
                        }
                }
                return 0;
        }else{
                printf("usage: rrastrip [-aN ] [ -i ] [<input rra>] [<output rra>]\n");
                exit(0);
        }
        rraStrip( inFile, in, out );
        return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1030, %rsp           # imm = 0x1030
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x1860
movl %eax, -0x18(%rbp)
movl -0x8(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl $0x0, %eax
jne 0x15bf
movq 0x6a3e(%rip), %rax      # 0x7fd8
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq 0x6a28(%rip), %rax      # 0x7fd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x3b2c(%rip), %rax      # 0x50e2
movq %rax, -0x30(%rbp)
jmp 0x1832
movl -0x8(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl $0x1, %eax
jne 0x1612
cmpl $0x0, 0x6b83(%rip)      # 0x8154
jne 0x1612
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x4018(%rip), %rsi      # 0x55fe
callq 0x1b10
movq %rax, -0x20(%rbp)
movq 0x69da(%rip), %rax      # 0x7fd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
jmp 0x1830
movl -0x8(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl $0x2, %eax
jne 0x1678
cmpl $0x0, 0x6b30(%rip)      # 0x8154
jne 0x1678
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3fc5(%rip), %rsi      # 0x55fe
callq 0x1b10
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x3a8e(%rip), %rsi      # 0x50e8
callq 0x1b10
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
jmp 0x182e
movl -0x8(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl $0x1, %eax
jl 0x1819
cmpl $0x0, 0x6ac6(%rip)      # 0x8154
je 0x1819
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x1810
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x3a1e(%rip), %rsi      # 0x50ea
leaq 0x3a22(%rip), %r8       # 0x50f5
movb $0x0, %al
callq 0x11e0
leaq -0x1030(%rbp), %rdi
callq 0x1090
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x39fe(%rip), %rsi      # 0x50fe
leaq 0x39ee(%rip), %rcx      # 0x50f5
movb $0x0, %al
callq 0x11e0
leaq -0x1030(%rbp), %rdi
leaq 0x3ee2(%rip), %rsi      # 0x55fe
callq 0x1b10
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x39b0(%rip), %rsi      # 0x50e8
callq 0x1b10
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1330
cmpl $0x0, 0x69ef(%rip)      # 0x8158
jne 0x17a1
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x3976(%rip), %rsi      # 0x50fb
leaq 0x3969(%rip), %rcx      # 0x50f5
movb $0x0, %al
callq 0x11e0
leaq -0x1030(%rbp), %rdi
callq 0x1090
jmp 0x1800
movl $0x0, 0x69ad(%rip)      # 0x8158
leaq -0x1030(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %r8
leaq 0x3932(%rip), %rsi      # 0x5103
leaq 0x391d(%rip), %rcx      # 0x50f5
movb $0x0, %al
callq 0x11e0
leaq -0x1030(%rbp), %rsi
leaq 0x3921(%rip), %rdi      # 0x510e
movb $0x0, %al
callq 0x10a0
leaq -0x1030(%rbp), %rdi
callq 0x1090
jmp 0x1802
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x169a
movl $0x0, -0x4(%rbp)
jmp 0x184a
leaq 0x3903(%rip), %rdi      # 0x5123
movb $0x0, %al
callq 0x10a0
xorl %edi, %edi
callq 0x11f0
jmp 0x1830
jmp 0x1832
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1330
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1030, %rsp           # imm = 0x1030
popq %rbp
retq
nopw %cs:(%rax,%rax)