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

    FILE *in,*out,*nfp;
    RRA *h;

    argIndex = processOptions(argc,argv);

    if (argc-argIndex == 1)
        {
        nfp = OpenFile(argv[argIndex],"r");
        in = stdin;
        out = stdout;
        }
    else if (argc-argIndex == 2)
        {
        nfp = OpenFile(argv[argIndex],"r");
        in = OpenFile(argv[argIndex+1],"r");
        out = stdout;
        }
    else if (argc-argIndex == 3)
        {
        nfp = OpenFile(argv[argIndex],"r");
        in = OpenFile(argv[argIndex+1],"r");
        out = OpenFile(argv[argIndex+2],"w");
        }
    else
        {
        printf("usage: %s\n [-h] NOTES_FILE [INPUT_RRA [OUTPUT_RRA]\n",argv[0]);
        exit(-1);
        }

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

    SampleRate = h->sampleRate;

    if (h->channels != 1)
        Fatal("%s requires a mono audio file\n",argv[0]);

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

    if (Report) ReportFP = OpenFile("changes.rpt","w");

    readLegalNotes(nfp);

    LongestCycle = SampleRate / 100 * OctavesAllowed;
    ShortestCycle = SampleRate / 1000;

    MinFactor = 1 / (1 + (ST - 1) * Reach * Bias);
    MaxFactor = 1 + (ST - 1) * Reach * Bias;

    WindowSize = (CycleCount + 1) * LongestCycle;

    if (AbsoluteThreshold == 0)
        AbsoluteThreshold = (int) (pow(2,h->bitsPerSample - 1) / 200);
    if (RelativeThreshold == 0.0)
        RelativeThreshold = 0.20;

    //printf("MinFactor is %f\n",MinFactor);
    //printf("MaxFactor is %f\n",MaxFactor);
    //printf("AbsoluteThreshold is %d\n",AbsoluteThreshold);
    //getchar();

    if ((Window = malloc(sizeof(int) * WindowSize)) == 0)
        Fatal("correct: out of memory\n");

    processData(in,out,h);

    fclose(out);
    fclose(in);
    fclose(nfp);

    if (Report)
        {
        fprintf(ReportFP,"%d samples read\n",SamplesRead);
        fprintf(ReportFP,"%d samples written\n",SamplesWritten);
        fprintf(ReportFP,"%.2f%% samples repitched\n",
            100.0 * SamplesRepitched / (double) SamplesRead);
        fprintf(ReportFP,"%d samples (%.3f seconds) %s\n",
            SampleDelta,SampleDelta / (double) SampleRate,
            SampleDelta < 0? "long" : "short");
        fclose(ReportFP);
        assert(SamplesStored == 0);
        }

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movl %edi, %r14d
movl $0x1, %r12d
cmpl $0x2, %edi
jl 0x26ef
movl $0x1, %r12d
movslq %r12d, %rax
movq (%rbx,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x26ef
movb 0x2(%rsi), %r13b
testb %r13b, %r13b
je 0x2637
leaq 0x2(%rsi), %rdi
jmp 0x263c
movq 0x8(%rbx,%rax,8), %rdi
movzbl 0x1(%rsi), %eax
cmpl $0x6b, %eax
jle 0x2665
cmpl $0x71, %eax
jg 0x267e
cmpl $0x6c, %eax
je 0x269e
cmpl $0x6f, %eax
jne 0x26dc
callq 0x2220
movl %eax, 0x727d(%rip)      # 0x98e0
jmp 0x26a9
cmpl $0x52, %eax
je 0x2692
cmpl $0x62, %eax
jne 0x26c9
callq 0x2090
movsd %xmm0, 0x7274(%rip)     # 0x98f0
jmp 0x26a9
cmpl $0x72, %eax
jne 0x26d3
callq 0x2090
movsd %xmm0, 0x7258(%rip)     # 0x98e8
jmp 0x26a9
movb $0x1, 0x728b(%rip)      # 0x9924
xorl %r15d, %r15d
jmp 0x26ac
callq 0x2220
movl %eax, 0x7253(%rip)      # 0x98fc
movb $0x1, %r15b
testb %r13b, %r13b
sete %al
andb %r15b, %al
movzbl %al, %eax
addl %eax, %r12d
incl %r12d
cmpl %r14d, %r12d
jl 0x2618
jmp 0x26ef
cmpl $0x68, %eax
jne 0x26dc
jmp 0x350f
cmpl $0x76, %eax
je 0x34ee
xorl %r15d, %r15d
leaq 0x3fa7(%rip), %rdi      # 0x668d
xorl %eax, %eax
callq 0x3874
jmp 0x26ac
subl %r12d, %r14d
cmpl $0x3, %r14d
je 0x2761
cmpl $0x2, %r14d
je 0x272b
cmpl $0x1, %r14d
jne 0x36a2
movslq %r12d, %rax
movq (%rbx,%rax,8), %rdi
leaq 0x4368(%rip), %rsi      # 0x6a7e
callq 0x390e
movq %rax, -0x78(%rbp)
movq 0x68b2(%rip), %rax      # 0x8fd8
movq (%rax), %r14
jmp 0x2755
movslq %r12d, %r15
movq (%rbx,%r15,8), %rdi
leaq 0x4345(%rip), %r14      # 0x6a7e
movq %r14, %rsi
callq 0x390e
movq %rax, -0x78(%rbp)
movq 0x8(%rbx,%r15,8), %rdi
movq %r14, %rsi
callq 0x390e
movq %rax, %r14
movq 0x6874(%rip), %rax      # 0x8fd0
movq (%rax), %r15
jmp 0x279f
movslq %r12d, %r15
movq (%rbx,%r15,8), %rdi
leaq 0x430f(%rip), %r14      # 0x6a7e
movq %r14, %rsi
callq 0x390e
movq %rax, -0x78(%rbp)
movq 0x8(%rbx,%r15,8), %rdi
movq %r14, %rsi
callq 0x390e
movq %rax, %r14
movq 0x10(%rbx,%r15,8), %rdi
leaq 0x3aa6(%rip), %rsi      # 0x623d
callq 0x390e
movq %rax, %r15
callq 0x3b7f
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x3fa5
movl 0x4(%r12), %eax
movl %eax, 0x7161(%rip)      # 0x9920
movq %r12, -0x50(%rbp)
cmpl $0x1, (%r12)
je 0x27db
movq (%rbx), %rsi
leaq 0x3a9f(%rip), %rdi      # 0x6273
xorl %eax, %eax
callq 0x3874
movq %r14, -0x80(%rbp)
leaq 0x3aac(%rip), %rdx      # 0x6292
movq %r15, -0x48(%rbp)
movq %r15, %rdi
movq -0x50(%rbp), %rsi
xorl %ecx, %ecx
callq 0x4a40
cmpb $0x1, 0x7125(%rip)      # 0x9924
movq -0x78(%rbp), %r15
jne 0x281f
leaq 0x3a9a(%rip), %rdi      # 0x62a6
leaq 0x3a2a(%rip), %rsi      # 0x623d
callq 0x390e
movq %rax, 0x7109(%rip)      # 0x9928
leaq 0x3e07(%rip), %rsi      # 0x662d
leaq -0x90(%rbp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2070
movl $0x0, 0x713b(%rip)      # 0x997c
movq %r15, %rdi
callq 0x2190
testl %eax, %eax
jne 0x2899
leaq 0x793c(%rip), %r14      # 0xa190
leaq 0x3dd2(%rip), %rbx      # 0x662d
leaq -0x90(%rbp), %r13
movq -0x90(%rbp), %rax
movslq 0x710c(%rip), %rcx      # 0x997c
leal 0x1(%rcx), %edx
movl %edx, 0x7103(%rip)      # 0x997c
movq %rax, (%r14,%rcx,8)
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x2070
movq %r15, %rdi
callq 0x2190
testl %eax, %eax
je 0x2862
movl 0x70dc(%rip), %r12d     # 0x997c
testl %r12d, %r12d
jle 0x2908
xorl %ebx, %ebx
leaq 0x78e2(%rip), %rax      # 0xa190
movq (%rax,%rbx,8), %r13
leaq 0x6c07(%rip), %r15      # 0x94c0
xorl %r14d, %r14d
movq (%r15), %rsi
movq %r13, %rdi
callq 0x2150
testl %eax, %eax
je 0x28f2
incq %r14
addq $0x8, %r15
cmpq $0x6c, %r14
jne 0x28bc
leaq 0x3d52(%rip), %rdi      # 0x6631
movq %r13, %rsi
xorl %eax, %eax
callq 0x3874
movl 0x708c(%rip), %r12d     # 0x997c
jmp 0x28fd
leaq 0x7087(%rip), %rax      # 0x9980
movl %r14d, (%rax,%rbx,4)
incq %rbx
movslq %r12d, %rax
cmpq %rax, %rbx
jl 0x28a7
movslq 0x7011(%rip), %rcx      # 0x9920
imulq $0x51eb851f, %rcx, %rax # imm = 0x51EB851F
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rax
addl %edx, %eax
imull 0x6fb6(%rip), %eax      # 0x98e0
movl %eax, 0x7000(%rip)      # 0x9930
imulq $0x10624dd3, %rcx, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
movsd 0x6f9c(%rip), %xmm0     # 0x98e8
mulsd 0x36b4(%rip), %xmm0     # 0x6008
mulsd 0x6f94(%rip), %xmm0     # 0x98f0
movl %ecx, 0x6fd2(%rip)      # 0x9934
movsd 0x36a6(%rip), %xmm1     # 0x6010
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x6fbe(%rip)     # 0x9938
movsd %xmm0, 0x6fbe(%rip)     # 0x9940
leal (%rax,%rax,4), %ecx
leal (%rax,%rcx,2), %eax
movl %eax, 0x6fba(%rip)      # 0x9948
cmpl $0x0, 0x6fb7(%rip)      # 0x994c
movq -0x50(%rbp), %rax
jne 0x29bf
movl 0x8(%rax), %edi
decl %edi
movsd 0x3668(%rip), %xmm0     # 0x6010
callq 0x2050
divsd 0x3663(%rip), %xmm0     # 0x6018
cvttsd2si %xmm0, %eax
movl %eax, 0x6f8d(%rip)      # 0x994c
movsd 0x6f89(%rip), %xmm0     # 0x9950
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movq -0x78(%rbp), %r15
jne 0x29e8
jp 0x29e8
movabsq $0x3fc999999999999a, %rax # imm = 0x3FC999999999999A
movq %rax, 0x6f68(%rip)      # 0x9950
movslq 0x6f59(%rip), %rbx      # 0x9948
movq %rbx, %rdi
shlq $0x2, %rdi
callq 0x21b0
movq %rax, 0x6f56(%rip)      # 0x9958
testq %rax, %rax
jne 0x2a1b
leaq 0x38a4(%rip), %rdi      # 0x62b2
xorl %eax, %eax
callq 0x3874
movl 0x6f2d(%rip), %ebx      # 0x9948
testl %ebx, %ebx
jle 0x2a8b
xorl %r14d, %r14d
leaq 0x22e2(%rip), %rbx      # 0x4d0b
movq -0x80(%rbp), %r12
movq -0x50(%rbp), %rax
movl 0x8(%rax), %edx
movq %r12, %rdi
movq -0x48(%rbp), %rsi
movq %rbx, %rcx
callq 0x44a8
movq 0x6f0e(%rip), %rcx      # 0x9958
movslq 0x6f23(%rip), %rdx      # 0x9974
movl %eax, (%rcx,%rdx,4)
movq %r12, %rdi
callq 0x2190
movl 0x6ee6(%rip), %ecx      # 0x9948
testl %eax, %eax
jne 0x2a83
incl 0x6ef4(%rip)            # 0x9960
incl 0x6efe(%rip)            # 0x9970
movl 0x6efc(%rip), %eax      # 0x9974
incl %eax
cltd
idivl %ecx
movl %edx, 0x6ef1(%rip)      # 0x9974
incl %r14d
cmpl %ecx, %r14d
jl 0x2a2d
movl 0x6edf(%rip), %eax      # 0x9970
addl 0x6ecd(%rip), %eax      # 0x9964
addl 0x6ecf(%rip), %eax      # 0x996c
cmpl 0x6ebd(%rip), %eax      # 0x9960
jne 0x3664
movq -0x80(%rbp), %r14
movq %r14, %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x36bd
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
jne 0x2ae6
movl 0x6e95(%rip), %ecx      # 0x9964
movl 0x6e97(%rip), %eax      # 0x996c
leal (%rax,%rcx), %esi
movl 0x6e82(%rip), %edx      # 0x9960
cmpl %edx, %esi
jne 0x2be8
movq -0x48(%rbp), %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x20b0
movq %r15, %rdi
callq 0x20b0
cmpb $0x1, 0x6e1e(%rip)      # 0x9924
jne 0x2bd7
movq 0x6e15(%rip), %rdi      # 0x9928
movl 0x6e47(%rip), %edx      # 0x9960
leaq 0x37aa(%rip), %rsi      # 0x62ca
xorl %eax, %eax
callq 0x2170
movq 0x6dfa(%rip), %rdi      # 0x9928
movl 0x6e30(%rip), %edx      # 0x9964
leaq 0x37a0(%rip), %rsi      # 0x62db
xorl %eax, %eax
callq 0x2170
xorps %xmm0, %xmm0
cvtsi2sdl 0x6e1b(%rip), %xmm0 # 0x9968
mulsd 0x34eb(%rip), %xmm0     # 0x6040
movq 0x6dcc(%rip), %rdi      # 0x9928
xorps %xmm1, %xmm1
cvtsi2sdl 0x6df9(%rip), %xmm1 # 0x9960
divsd %xmm1, %xmm0
leaq 0x377d(%rip), %rsi      # 0x62ef
movb $0x1, %al
callq 0x2170
movq 0x6da8(%rip), %rdi      # 0x9928
movl 0x6de6(%rip), %edx      # 0x996c
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x6d88(%rip), %xmm1 # 0x9920
divsd %xmm1, %xmm0
testl %edx, %edx
leaq 0x3782(%rip), %rax      # 0x6327
leaq 0x3780(%rip), %rcx      # 0x632c
cmovsq %rax, %rcx
leaq 0x3752(%rip), %rsi      # 0x6309
movb $0x1, %al
callq 0x2170
movq 0x6d63(%rip), %rdi      # 0x9928
callq 0x20b0
cmpl $0x0, 0x6d9f(%rip)      # 0x9970
jne 0x3683
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorpd %xmm6, %xmm6
movapd 0x345c(%rip), %xmm7     # 0x6050
addl %ecx, %eax
addl 0x6d74(%rip), %eax      # 0x9970
cmpl %edx, %eax
jne 0x34b0
movq 0x6d4d(%rip), %rsi      # 0x9958
movl 0x6d67(%rip), %ecx      # 0x9978
movl 0x6d31(%rip), %edi      # 0x9948
movl %ecx, %eax
cltd
idivl %edi
movslq %edx, %rax
cmpl $0x0, (%rsi,%rax,4)
movl -0x3c(%rbp), %r15d
jne 0x3491
incl %ecx
movl %ecx, %eax
cltd
idivl %edi
movslq %edx, %rax
cmpl $0x0, (%rsi,%rax,4)
jle 0x3491
cmpb $0x1, 0x6cdc(%rip)      # 0x9924
jne 0x2c71
movl 0x6ce4(%rip), %edx      # 0x9934
movq 0x6cd1(%rip), %rdi      # 0x9928
leaq 0x37fe(%rip), %rsi      # 0x645c
xorl %eax, %eax
callq 0x2170
movapd 0x33e3(%rip), %xmm7     # 0x6050
xorpd %xmm6, %xmm6
xorpd %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
xorl %r14d, %r14d
xorl %eax, %eax
movl $0x0, -0x3c(%rbp)
movsd 0x3392(%rip), %xmm1     # 0x6020
movsd %xmm1, -0x88(%rbp)
movl %eax, -0x2c(%rbp)
movl %eax, %ebx
movl %ebx, %ecx
incl %ecx
movl 0x6ca3(%rip), %esi      # 0x9948
leal -0x1(%rsi), %eax
xorl %ebx, %ebx
cmpl %ecx, %eax
jle 0x2d14
movq 0x6ca3(%rip), %rdi      # 0x9958
movl 0x6cbc(%rip), %r8d      # 0x9978
movl $0x2, %r9d
subl %esi, %r9d
movl %r14d, %r10d
leal (%r8,%rcx), %eax
incl %eax
cltd
idivl %esi
movslq %edx, %rax
movl (%rdi,%rax,4), %r12d
movl %r12d, %r11d
negl %r11d
cmovsl %r12d, %r11d
cmpl %r10d, %r11d
cmovgl %r11d, %r14d
leal (%r8,%rcx), %eax
cltd
idivl %esi
movslq %edx, %rax
cmpl $0x0, (%rdi,%rax,4)
jne 0x2cfe
testl %r12d, %r12d
jg 0x2d12
incl %ecx
cmpl %r10d, %r11d
cmovgl %r11d, %r10d
leal (%r9,%rcx), %eax
cmpl $0x1, %eax
jne 0x2cc8
jmp 0x2d14
movl %ecx, %ebx
movb 0x6c0a(%rip), %al       # 0x9924
testl %ebx, %ebx
je 0x3118
cmpl 0x6c23(%rip), %r14d     # 0x994c
jl 0x3118
cmpl 0x6bfb(%rip), %ebx      # 0x9930
jge 0x3118
testb $0x1, %al
je 0x2d62
movq 0x6be2(%rip), %rdi      # 0x9928
leaq 0x372d(%rip), %rsi      # 0x647a
movl %ebx, %edx
xorl %eax, %eax
callq 0x2170
movapd 0x32f2(%rip), %xmm7     # 0x6050
xorpd %xmm6, %xmm6
movslq 0x6c13(%rip), %rax      # 0x997c
xorps %xmm0, %xmm0
cvtsi2sdl 0x6bac(%rip), %xmm0 # 0x9920
xorps %xmm8, %xmm8
cvtsi2sd %ebx, %xmm8
divsd %xmm8, %xmm0
testq %rax, %rax
jle 0x2ecc
movl 0x6b4f(%rip), %ecx      # 0x98e0
movsd 0x6b9f(%rip), %xmm1     # 0x9938
movsd 0x6b9f(%rip), %xmm2     # 0x9940
movl %ecx, %esi
negl %esi
xorl %edi, %edi
testl %ecx, %ecx
jle 0x2df9
leaq 0x6bce(%rip), %rdx      # 0x9980
movl (%rdx,%rdi,4), %r12d
movslq %r12d, %r13
leaq 0x63a0(%rip), %rdx      # 0x9160
movsd (%rdx,%r13,8), %xmm3
movl $0x1, %edx
xorps %xmm4, %xmm4
cvtsi2sd %edx, %xmm4
mulsd %xmm0, %xmm4
movapd %xmm3, %xmm5
divsd %xmm4, %xmm5
ucomisd %xmm1, %xmm5
jbe 0x2dea
ucomisd %xmm5, %xmm2
ja 0x2e50
leal (%rsi,%rdx), %r8d
incl %r8d
incl %edx
cmpl $0x1, %r8d
jne 0x2dcb
incq %rdi
cmpq %rax, %rdi
jne 0x2da7
xorpd %xmm5, %xmm5
cmpb $0x1, 0x6b18(%rip)      # 0x9924
jne 0x2fa9
movq 0x6b0f(%rip), %rcx      # 0x9928
movl $0x18, %esi
movl $0x1, %edx
leaq 0x3725(%rip), %rdi      # 0x654f
movsd %xmm8, -0x38(%rbp)
callq 0x2240
xorpd %xmm5, %xmm5
movsd -0x38(%rbp), %xmm8
movapd 0x3209(%rip), %xmm7     # 0x6050
xorpd %xmm6, %xmm6
jmp 0x2fa9
cmpb $0x1, 0x6acd(%rip)      # 0x9924
jne 0x2fa0
movsd %xmm8, -0x38(%rbp)
cmpl $0x2, %edx
movsd %xmm5, -0x70(%rbp)
jb 0x2e87
movq 0x6ab4(%rip), %rdi      # 0x9928
leaq 0x367e(%rip), %rsi      # 0x64f9
xorl %eax, %eax
callq 0x2170
movsd -0x70(%rbp), %xmm5
movq 0x6a9a(%rip), %rdi      # 0x9928
leaq 0x662b(%rip), %rax      # 0x94c0
movq (%rax,%r13,8), %rcx
leaq 0x3679(%rip), %rsi      # 0x6519
movl %ebx, %edx
movapd %xmm5, %xmm0
movb $0x1, %al
callq 0x2170
movsd -0x70(%rbp), %xmm5
movl %r12d, %r15d
xorpd %xmm6, %xmm6
movapd 0x318f(%rip), %xmm7     # 0x6050
movsd -0x38(%rbp), %xmm8
jmp 0x2fa9
movsd 0x6a64(%rip), %xmm1     # 0x9938
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movsd 0x6a5e(%rip), %xmm2     # 0x9940
leaq 0x6277(%rip), %rax      # 0x9160
xorl %ecx, %ecx
movsd 0x312d(%rip), %xmm3     # 0x6020
movsd (%rax), %xmm4
movapd %xmm4, %xmm5
divsd %xmm0, %xmm5
ucomisd %xmm1, %xmm5
jbe 0x2f26
ucomisd %xmm5, %xmm2
jbe 0x2f26
subsd %xmm0, %xmm4
andpd %xmm7, %xmm4
ucomisd %xmm3, %xmm6
ja 0x2f1f
ucomisd %xmm4, %xmm3
jbe 0x2f26
movl %ecx, %r12d
movapd %xmm4, %xmm3
incq %rcx
addq $0x8, %rax
cmpq $0x6c, %rcx
jne 0x2ef3
testl %r12d, %r12d
js 0x2fa5
movl %r12d, %eax
leaq 0x621e(%rip), %rcx      # 0x9160
movsd (%rcx,%rax,8), %xmm1
movapd %xmm1, %xmm5
divsd %xmm0, %xmm5
cmpb $0x1, 0x69ce(%rip)      # 0x9924
jne 0x2fa0
movq 0x69c9(%rip), %rdi      # 0x9928
leaq 0x655a(%rip), %rcx      # 0x94c0
movq (%rcx,%rax,8), %rcx
leaq 0x35f7(%rip), %rsi      # 0x6568
movl %ebx, %edx
movapd %xmm5, %xmm2
movb $0x3, %al
movsd %xmm8, -0x38(%rbp)
movsd %xmm5, -0x70(%rbp)
callq 0x2170
movsd -0x70(%rbp), %xmm5
movsd -0x38(%rbp), %xmm8
movapd 0x30b4(%rip), %xmm7     # 0x6050
xorpd %xmm6, %xmm6
movl %r12d, %r15d
jmp 0x2fa9
xorpd %xmm5, %xmm5
ucomisd %xmm6, %xmm5
jne 0x2fb5
jnp 0x2c9b
movq 0x699c(%rip), %rsi      # 0x9958
movl 0x69b6(%rip), %edi      # 0x9978
movl $0x1, %r8d
xorpd %xmm0, %xmm0
movl 0x6975(%rip), %r9d      # 0x9948
movl %ebx, %r10d
testl %ebx, %ebx
jle 0x3012
movl %edi, %ecx
movl %ebx, %r11d
leal (%r10,%rcx), %eax
cltd
idivl %r9d
movslq %edx, %rax
movl (%rsi,%rax,4), %r12d
movl %ecx, %eax
cltd
idivl %r9d
movslq %edx, %rax
subl (%rsi,%rax,4), %r12d
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incl %ecx
decl %r11d
jne 0x2fdf
incl %r8d
addl %ebx, %r10d
cmpl $0xb, %r8d
jne 0x2fd6
movsd %xmm5, -0x70(%rbp)
mulsd 0x3004(%rip), %xmm8     # 0x6030
divsd %xmm8, %xmm0
movsd 0x2fef(%rip), %xmm1     # 0x6028
callq 0x20a0
movapd %xmm0, %xmm1
divsd 0x2fee(%rip), %xmm1     # 0x6038
cmpl 0x68a7(%rip), %r15d     # 0x98f8
je 0x3057
movapd %xmm0, %xmm1
cmpb $0x1, 0x68c6(%rip)      # 0x9924
jne 0x3085
movq 0x68c1(%rip), %rdi      # 0x9928
leaq 0x3427(%rip), %rsi      # 0x6495
movl %ebx, %edx
movapd %xmm1, %xmm0
movb $0x1, %al
movsd %xmm1, -0x38(%rbp)
callq 0x2170
movsd -0x38(%rbp), %xmm1
xorpd %xmm6, %xmm6
ucomisd -0x88(%rbp), %xmm6
movapd 0x2fb7(%rip), %xmm7     # 0x6050
movsd -0x70(%rbp), %xmm2
ja 0x30b2
movsd -0x88(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2c9b
cmpb $0x1, 0x686b(%rip)      # 0x9924
movl %ebx, %eax
movl %r15d, -0x3c(%rbp)
movsd %xmm2, -0x58(%rbp)
jne 0x2c8e
movq 0x6857(%rip), %rdi      # 0x9928
leaq 0x33e3(%rip), %rsi      # 0x64bb
movl %ebx, %edx
movapd %xmm1, %xmm0
movsd %xmm1, -0x38(%rbp)
movsd -0x88(%rbp), %xmm1
movb $0x2, %al
callq 0x2170
movsd -0x38(%rbp), %xmm1
movapd 0x2f51(%rip), %xmm7     # 0x6050
xorpd %xmm6, %xmm6
movl %ebx, %eax
movl %r15d, -0x3c(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
jmp 0x2c8e
testb $0x1, %al
je 0x3138
movq 0x6805(%rip), %rdi      # 0x9928
leaq 0x33bd(%rip), %rsi      # 0x64e7
movl -0x2c(%rbp), %edx
xorl %eax, %eax
callq 0x2170
xorpd %xmm6, %xmm6
cmpl $0x0, -0x2c(%rbp)
movq -0x78(%rbp), %r15
movq -0x80(%rbp), %r14
je 0x317e
movsd -0x58(%rbp), %xmm0
ucomisd %xmm6, %xmm0
jne 0x31e2
jp 0x31e2
cmpb $0x1, 0x67c2(%rip)      # 0x9924
jne 0x31a4
movq 0x67bd(%rip), %rcx      # 0x9928
movl $0x20, %esi
movl $0x1, %edx
leaq 0x328b(%rip), %rdi      # 0x6407
jmp 0x319f
cmpb $0x1, 0x679f(%rip)      # 0x9924
jne 0x31a4
movq 0x679a(%rip), %rcx      # 0x9928
movl $0x1f, %esi
movl $0x1, %edx
leaq 0x3248(%rip), %rdi      # 0x63e7
callq 0x2240
movq %r14, %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x36bd
movl 0x67aa(%rip), %ecx      # 0x9964
movl 0x67ac(%rip), %eax      # 0x996c
leal (%rax,%rcx), %esi
movl 0x6797(%rip), %edx      # 0x9960
cmpl %edx, %esi
xorpd %xmm6, %xmm6
movapd 0x2e79(%rip), %xmm7     # 0x6050
jne 0x2bf4
jmp 0x2ae6
movl 0x6710(%rip), %ecx      # 0x98f8
testl %ecx, %ecx
je 0x3214
movl -0x3c(%rbp), %edi
cmpl %edi, %ecx
sete %dl
movl 0x6f86(%rip), %eax      # 0xa180
testl %eax, %eax
setg %sil
andb %dl, %sil
cmpb $0x1, %sil
leaq 0x3997(%rip), %r14      # 0x6ba5
jne 0x322c
decl %eax
jmp 0x323f
movl -0x3c(%rbp), %eax
movl %eax, 0x66db(%rip)      # 0x98f8
movl 0x66d9(%rip), %eax      # 0x98fc
leaq 0x397b(%rip), %r14      # 0x6ba5
jmp 0x3247
cmpl %edi, %ecx
je 0x324d
movl -0x3c(%rbp), %eax
movl %eax, 0x66bf(%rip)      # 0x98f8
movl 0x66bd(%rip), %eax      # 0x98fc
movsd 0x2dc9(%rip), %xmm0     # 0x6010
movl %eax, 0x6f33(%rip)      # 0xa180
xorps %xmm1, %xmm1
cvtsi2sdl -0x2c(%rbp), %xmm1
movapd %xmm1, %xmm2
movsd %xmm0, -0x58(%rbp)
divsd %xmm0, %xmm2
addsd 0x2dbe(%rip), %xmm2     # 0x6028
cvttsd2si %xmm2, %ebx
cmpb $0x1, 0x66af(%rip)      # 0x9924
jne 0x32ba
movq 0x66aa(%rip), %rdi      # 0x9928
movslq -0x3c(%rbp), %rax
leaq 0x6237(%rip), %rcx      # 0x94c0
movq (%rcx,%rax,8), %rdx
leaq 0x3319(%rip), %rsi      # 0x65ad
movl -0x2c(%rbp), %ecx
movl %ebx, %r8d
movsd -0x58(%rbp), %xmm0
movb $0x1, %al
movsd %xmm1, -0x38(%rbp)
movapd %xmm2, -0x70(%rbp)
callq 0x2170
movapd -0x70(%rbp), %xmm2
movsd -0x38(%rbp), %xmm1
cvttpd2dq %xmm2, %xmm0
cvtdq2pd %xmm0, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
movq -0x48(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2170
incl 0x6683(%rip)            # 0x9964
cmpl $0x2, %ebx
jl 0x3393
leal -0x1(%rbx), %r14d
movsd -0x38(%rbp), %xmm1
movq -0x48(%rbp), %r12
leaq 0x38a7(%rip), %r13      # 0x6ba5
movapd %xmm1, -0x70(%rbp)
cvttsd2si %xmm1, %ecx
movq 0x664a(%rip), %rsi      # 0x9958
movl 0x6664(%rip), %edi      # 0x9978
leal (%rdi,%rcx), %eax
movl 0x662a(%rip), %r8d      # 0x9948
cltd
idivl %r8d
movslq %edx, %rax
movl (%rsi,%rax,4), %r9d
leal (%rdi,%rcx), %eax
incl %eax
cltd
idivl %r8d
movslq %edx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %r9d, %xmm0
cvttpd2dq %xmm1, %xmm1
movl (%rsi,%rax,4), %eax
cvtdq2pd %xmm1, %xmm1
movapd -0x70(%rbp), %xmm2
subsd %xmm1, %xmm2
subl %r9d, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2170
movapd -0x70(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
incl 0x65e0(%rip)            # 0x9964
addsd %xmm0, %xmm1
decl %r14d
jne 0x32fe
jmp 0x3398
movsd -0x38(%rbp), %xmm1
movsd -0x58(%rbp), %xmm0
ucomisd 0x2c6b(%rip), %xmm0     # 0x6010
movl -0x2c(%rbp), %eax
jne 0x33ac
jnp 0x33b2
addl %eax, 0x65b6(%rip)      # 0x9968
movl -0x2c(%rbp), %eax
subl %ebx, %eax
addl %eax, 0x65af(%rip)      # 0x996c
addsd 0x2c63(%rip), %xmm1     # 0x6028
cvttsd2si %xmm1, %eax
cmpl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %r12d
movq -0x80(%rbp), %r14
jne 0x34cf
testl %r12d, %r12d
jle 0x3454
movl 0x6593(%rip), %eax      # 0x9978
incl %eax
cltd
idivl 0x655a(%rip)            # 0x9948
movl %edx, 0x6584(%rip)      # 0x9978
decl 0x6576(%rip)            # 0x9970
movq -0x50(%rbp), %rax
movl 0x8(%rax), %edx
movq %r14, %rdi
movq -0x48(%rbp), %rsi
leaq 0x18fc(%rip), %rcx      # 0x4d0b
callq 0x44a8
movl %eax, %ebx
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
jne 0x344f
incl 0x6538(%rip)            # 0x9960
incl 0x6542(%rip)            # 0x9970
movq 0x6523(%rip), %rax      # 0x9958
movslq 0x6538(%rip), %rcx      # 0x9974
movl %ebx, (%rax,%rcx,4)
leal 0x1(%rcx), %eax
cltd
idivl 0x64ff(%rip)            # 0x9948
movl %edx, 0x6525(%rip)      # 0x9974
decl %r12d
jne 0x33df
movq %r14, %rdi
callq 0x2190
testl %eax, %eax
movq -0x48(%rbp), %r12
movq -0x50(%rbp), %r13
je 0x31b4
movl 0x64fe(%rip), %ebx      # 0x9970
testl %ebx, %ebx
jle 0x31b4
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x37b7
decl %ebx
jne 0x347a
jmp 0x31b4
leaq 0x2f33(%rip), %rdi      # 0x63cb
leaq 0x2ea6(%rip), %rsi      # 0x6345
leaq 0x2efd(%rip), %rcx      # 0x63a3
movl $0x14c, %edx            # imm = 0x14C
callq 0x20f0
leaq 0x2eb0(%rip), %rdi      # 0x6367
leaq 0x2e87(%rip), %rsi      # 0x6345
leaq 0x2ede(%rip), %rcx      # 0x63a3
movl $0x14b, %edx            # imm = 0x14B
callq 0x20f0
leaq 0x3117(%rip), %rdi      # 0x65ed
leaq 0x2e68(%rip), %rsi      # 0x6345
leaq 0x3122(%rip), %rcx      # 0x6606
movl $0x2aa, %edx            # imm = 0x2AA
callq 0x20f0
movq 0x5c5b(%rip), %rsi      # 0x9150
movq 0x5c5c(%rip), %rdx      # 0x9158
leaq 0x314b(%rip), %rdi      # 0x664e
xorl %eax, %eax
callq 0x20d0
jmp 0x365d
leaq 0x3191(%rip), %rdi      # 0x66a7
callq 0x2080
leaq 0x3198(%rip), %rdi      # 0x66ba
callq 0x2080
leaq 0x31b8(%rip), %rdi      # 0x66e6
callq 0x2080
leaq 0x31c1(%rip), %rdi      # 0x66fb
callq 0x2080
leaq 0x31d2(%rip), %rdi      # 0x6718
callq 0x2080
leaq 0x3208(%rip), %rdi      # 0x675a
callq 0x2080
movsd 0x6391(%rip), %xmm0     # 0x98f0
leaq 0x30f7(%rip), %rbx      # 0x665d
movq %rbx, %rdi
movb $0x1, %al
callq 0x20d0
leaq 0x3224(%rip), %rdi      # 0x679b
callq 0x2080
leaq 0x3232(%rip), %rdi      # 0x67b5
callq 0x2080
leaq 0x326a(%rip), %rdi      # 0x67f9
callq 0x2080
leaq 0x3291(%rip), %rdi      # 0x682c
callq 0x2080
movl 0x6356(%rip), %esi      # 0x98fc
leaq 0x30c8(%rip), %r14      # 0x6675
movq %r14, %rdi
xorl %eax, %eax
callq 0x20d0
leaq 0x32ab(%rip), %rdi      # 0x6869
callq 0x2080
leaq 0x32cf(%rip), %rdi      # 0x6899
callq 0x2080
leaq 0x3300(%rip), %rdi      # 0x68d6
callq 0x2080
leaq 0x3334(%rip), %rdi      # 0x6916
callq 0x2080
movl 0x62f3(%rip), %esi      # 0x98e0
movq %r14, %rdi
xorl %eax, %eax
callq 0x20d0
leaq 0x3355(%rip), %rdi      # 0x6953
callq 0x2080
leaq 0x3376(%rip), %rdi      # 0x6980
callq 0x2080
leaq 0x33a3(%rip), %rdi      # 0x69b9
callq 0x2080
leaq 0x33ca(%rip), %rdi      # 0x69ec
callq 0x2080
leaq 0x33f1(%rip), %rdi      # 0x6a1f
callq 0x2080
movsd 0x62ad(%rip), %xmm0     # 0x98e8
movq %rbx, %rdi
movb $0x1, %al
callq 0x20d0
leaq 0x3410(%rip), %rdi      # 0x6a5c
callq 0x2080
leaq 0x3428(%rip), %rdi      # 0x6a80
callq 0x2080
xorl %edi, %edi
callq 0x2230
leaq 0x2cfc(%rip), %rdi      # 0x6367
leaq 0x2cd3(%rip), %rsi      # 0x6345
leaq 0x2d2a(%rip), %rcx      # 0x63a3
movl $0x13c, %edx            # imm = 0x13C
callq 0x20f0
leaq 0x2ca8(%rip), %rdi      # 0x6332
leaq 0x2cb4(%rip), %rsi      # 0x6345
leaq 0x2cb8(%rip), %rcx      # 0x6350
movl $0x11a, %edx            # imm = 0x11A
callq 0x20f0
movq (%rbx), %rsi
leaq 0x2b93(%rip), %rdi      # 0x623f
xorl %eax, %eax
callq 0x20d0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2230