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

    FILE *in,*out;
    RRA *h;

    argIndex = processOptions(argc,argv);

    if (argc-argIndex == 1)
        {
        Factor = atof(argv[argIndex]);
        in = stdin;
        out = stdout;
        }
    else if (argc-argIndex == 2)
        {
        Factor = atof(argv[argIndex]);
        in = OpenFile(argv[argIndex+1],"r");
        out = stdout;
        }
    else if (argc-argIndex == 3)
        {
        Factor = atof(argv[argIndex]);
        in = OpenFile(argv[argIndex+1],"r");
        out = OpenFile(argv[argIndex+2],"w");
        }
    else
        {
        printf("usage: %s factor [<input rra file> [<output rra file>]]\n",
            argv[0]);
        exit(-1);
        }

    setInterp(3);

    fprintf(stderr,"factor is %f\n",Factor);
    if (Factor == 0.0) exit(0);

    h = resample(readRRA(in,0),Factor);

    writeRRA(out,h,"modifiedBy: tune",0,0);

    fclose(in);
    fclose(out);

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl $0x1, %r15d
cmpl $0x2, %edi
jl 0x27e7
movl %edi, -0x2c(%rbp)
movl %edi, %r12d
movl $0x1, %r15d
leaq 0x6970(%rip), %r13      # 0x90fb
leaq 0x68e0(%rip), %r14      # 0x9072
movq (%rbx,%r15,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x27e4
movzbl 0x1(%rsi), %eax
cmpl $0x68, %eax
je 0x27b9
cmpl $0x76, %eax
je 0x291d
movq %r14, %rdi
xorl %eax, %eax
callq 0x6abc
jmp 0x27d9
leaq 0x68cc(%rip), %rdi      # 0x908c
callq 0x2090
leaq 0x68fd(%rip), %rdi      # 0x90c9
callq 0x2090
movq %r13, %rdi
callq 0x2090
incq %r15
cmpq %r15, %r12
jne 0x2792
movl %r12d, %r15d
movl -0x2c(%rbp), %edi
subl %r15d, %edi
cmpl $0x3, %edi
je 0x2851
cmpl $0x2, %edi
je 0x281d
cmpl $0x1, %edi
jne 0x2940
movslq %r15d, %rax
movq (%rbx,%rax,8), %rdi
callq 0x20a0
movsd %xmm0, 0xa99f(%rip)     # 0xd1b0
movq 0xa7c0(%rip), %rax      # 0xcfd8
movq (%rax), %r14
jmp 0x2845
movslq %r15d, %r14
movq (%rbx,%r14,8), %rdi
callq 0x20a0
movsd %xmm0, 0xa97f(%rip)     # 0xd1b0
movq 0x8(%rbx,%r14,8), %rdi
leaq 0x71bd(%rip), %rsi      # 0x99fa
callq 0x6b56
movq %rax, %r14
movq 0xa784(%rip), %rax      # 0xcfd0
movq (%rax), %rbx
jmp 0x288d
movslq %r15d, %r15
movq (%rbx,%r15,8), %rdi
callq 0x20a0
movsd %xmm0, 0xa94b(%rip)     # 0xd1b0
movq 0x8(%rbx,%r15,8), %rdi
leaq 0x7189(%rip), %rsi      # 0x99fa
callq 0x6b56
movq %rax, %r14
movq 0x10(%rbx,%r15,8), %rdi
leaq 0x6784(%rip), %rsi      # 0x9009
callq 0x6b56
movq %rax, %rbx
movl $0x3, %edi
callq 0x5516
movq 0xa75a(%rip), %rax      # 0xcff8
movq (%rax), %rdi
movsd 0xa907(%rip), %xmm0     # 0xd1b0
leaq 0x6794(%rip), %rsi      # 0x9044
movb $0x1, %al
callq 0x21d0
movsd 0xa8f1(%rip), %xmm0     # 0xd1b0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x28cb
jnp 0x2939
movq %r14, %rdi
xorl %esi, %esi
callq 0x70be
movsd 0xa8d3(%rip), %xmm0     # 0xd1b0
movq %rax, %rdi
callq 0x5e7e
leaq 0x6766(%rip), %rdx      # 0x9052
movq %rbx, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7bf0
movq %r14, %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x20c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xa87c(%rip), %rsi      # 0xd1a0
movq 0xa87d(%rip), %rdx      # 0xd1a8
leaq 0x6731(%rip), %rdi      # 0x9063
xorl %eax, %eax
callq 0x20f0
xorl %edi, %edi
callq 0x22c0
movq (%rbx), %rsi
leaq 0x66c1(%rip), %rdi      # 0x900b
xorl %eax, %eax
callq 0x20f0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x22c0
nop