// File: /workspace/github_cpp_makefile_star2_O1/godofecht[P]Slow-Feature-Analysis/./sfa.h
// Function: SFA::GetCorrelationTrace(std::vector<double, std::allocator<double>>, std::vector<double, std::allocator<double>>, int)
double GetCorrelationTrace(vector<double> va, vector<double> vb,int t)
    {
        int time_step = t;
        int lambda_correlation = fmin(11*ro,time_step);
        vector<double> vector_y1;
        vector<double> vector_y2;
        vector_y1.clear();
        vector_y2.clear();


     //       cout<<va.size()<<endl;
     //       cout<<lambda_correlation<<endl;

        for(int i=vb.size()-lambda_correlation;i<vb.size();i++)
        {
            if(i>-1)
            {
             //   cout<<va[i]<<endl;
                vector_y1.push_back(va[i]);
                vector_y2.push_back(vb[i]);
            }
        }
        double val =  pearsoncoeff(va,vb);

  //      cout<<val<<endl;

        if(isnan(val))
            return 0;
        else
            return val;        
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movsd 0x1d0(%rdi), %xmm0
mulsd 0x1c26(%rip), %xmm0     # 0x7060
movq %rsi, %r14
cvtsi2sd %ecx, %xmm1
minsd %xmm1, %xmm0
xorl %eax, %eax
movq %rax, -0x50(%rbp)
xorpd %xmm1, %xmm1
movapd %xmm1, -0x60(%rbp)
movq %rax, -0x30(%rbp)
movapd %xmm1, -0x40(%rbp)
cmpq %rax, -0x58(%rbp)
je 0x546b
movq $0x0, -0x58(%rbp)
cvttsd2si %xmm0, %eax
movq -0x40(%rbp), %rcx
cmpq %rcx, -0x38(%rbp)
je 0x547d
movq %rcx, -0x38(%rbp)
movq 0x8(%rbx), %rcx
subq (%rbx), %rcx
movq %rcx, %rdx
shrq $0x3, %rdx
subl %eax, %edx
movslq %edx, %r13
sarq $0x3, %rcx
cmpq %r13, %rcx
jbe 0x5516
leaq (,%r13,8), %r15
leaq -0x40(%rbp), %r12
testq %r13, %r13
js 0x54ff
movq (%r14), %rdx
addq %r15, %rdx
movq -0x58(%rbp), %rsi
cmpq -0x50(%rbp), %rsi
je 0x54cc
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x58(%rbp)
jmp 0x54d5
leaq -0x60(%rbp), %rdi
callq 0x67d2
movq (%rbx), %rdx
addq %r15, %rdx
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x54f7
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x54ff
movq %r12, %rdi
callq 0x67d2
movq 0x8(%rbx), %rax
subq (%rbx), %rax
incq %r13
sarq $0x3, %rax
addq $0x8, %r15
cmpq %r13, %rax
ja 0x54a5
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x3846
leaq -0x78(%rbp), %rdi
movq %rbx, %rsi
callq 0x3846
leaq -0x90(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x32be
movapd %xmm0, -0xa0(%rbp)
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x5557
callq 0x21a0
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x5568
callq 0x21a0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x5576
callq 0x21a0
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x5584
callq 0x21a0
movapd -0xa0(%rbp), %xmm1
movapd %xmm1, %xmm0
cmpordsd %xmm1, %xmm0
andpd %xmm1, %xmm0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x55be
callq 0x21a0
jmp 0x55be
movq %rax, %rbx
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x55d6
callq 0x21a0
jmp 0x55d6
jmp 0x55d3
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x55e4
callq 0x21a0
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x55f2
callq 0x21a0
movq %rbx, %rdi
callq 0x2290