// File: /workspace/github_cpp_makefile_star2_O2/godofecht[P]Slow-Feature-Analysis/./sfa.h
// Function: SFA::SFA(float, int)
SFA(float RO, int num_invariances)
    {
        ro = RO;
        TOTAL_TIME = 50*ro;


        NUM_INVARIANCES = num_invariances;
        
        if(NUM_INVARIANCES == 1)
        {
            NUM_INPUT_NEURONS_Y = 1;
            NUM_INPUT_NEURONS_X = 101;

            lambda_long = 2.0f * ro;
            lambda_short = ro/31.0f;
            gamma_long = pow(0.5f,(1.0f/(lambda_long)));
            gamma_short = pow(0.5f,(1.0f/(lambda_short)));

            y_tilde = 0.0f;
            y_bar = 0.0f;
            U = 0.000f;
            V = 0.000f;


            vector<unsigned> a;
            a.push_back(NUM_INPUT_NEURONS_X);
            a.push_back(1);
            SetTopology(a);
            InitializeTopology();

            for(int i=0;i<NUM_INPUT_NEURONS_X;i++)
            {
                x_bar_vector.push_back(0.0f);
                x_tilde_vector.push_back(0.0f);
                del_weight_vector.push_back(0.0f);
                input_vector.push_back(0.0f);
            }
/*

            lambda_long = 2.0f * ro;
            lambda_short = ro/31.0f;
            gamma_long = pow(0.5f,(1.0f/(lambda_long)));
            gamma_short = pow(0.5f,(1.0f/(lambda_short)));

            y_tilde = 0.0f;
            y_bar = 0.0f;
            U = 0.000f;
            V = 0.000f;

            vector<unsigned> a;
            a.push_back(NUM_INPUT_NEURONS_X);
            a.push_back(1);
            SetTopology(a);
            InitializeTopology();

            for(int i=0;i<NUM_INPUT_NEURONS_X;i++)
            {
                x_bar_vector.push_back(0.0f);
                x_tilde_vector.push_back(0.0f);
                del_weight_vector.push_back(0.0f);
                input_vector.push_back(0.0f);
            }

*/
        }
        else if(NUM_INVARIANCES == 2)
        {
            NUM_INPUT_NEURONS_Y = 51;
            NUM_INPUT_NEURONS_X = 51;

            lambda_long = 2.0f * ro;
            lambda_short = ro/31.0f;
            gamma_long = pow(0.5f,(1.0f/(lambda_long)));
            gamma_short = pow(0.5f,(1.0f/(lambda_short)));

            y1_tilde = 0.0f;
            y1_bar = 0.0f;
            y2_tilde = 0.0f;
            y2_bar = 0.0f;
            U1 = 0.000f;
            U2 = 0.0f;
            V1 = 0.0f;
            V2 = 0.0f;

            y1 = 0.0f;
            y2 = 0.0f;


            vector<unsigned> a;
            a.push_back(NUM_INPUT_NEURONS_X * NUM_INPUT_NEURONS_Y);
            a.push_back(2);
            SetTopology(a);
            InitializeTopology();

            for(int i=0;i<NUM_INPUT_NEURONS_X * NUM_INPUT_NEURONS_Y;i++)
            {
                x_bar_vector.push_back(0.0f);
                x_tilde_vector.push_back(0.0f);
                del_weight_vector.push_back(0.0f);
                del_weight1_vector.push_back(0.0f);
                del_weight2_vector.push_back(0.0f);
                input_vector.push_back(0.0f);
            }
        }


        cout<<"finished constructing"<<endl;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %esi, %r14d
movss %xmm0, -0x38(%rbp)
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movabsq $0x3f50624de0000000, %rax # imm = 0x3F50624DE0000000
movq %rax, 0x68(%rdi)
leaq 0x70(%rdi), %rdi
leaq 0x90(%rbx), %r13
leaq 0xa8(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0xc0(%rbx), %rax
movq %rax, -0x48(%rbp)
leaq 0xd8(%rbx), %rax
movq %rax, -0x80(%rbp)
leaq 0xf0(%rbx), %rax
movq %rax, -0x78(%rbp)
leaq 0x108(%rbx), %rax
movq %rax, -0x40(%rbp)
movl $0xe0, %edx
xorl %esi, %esi
callq 0x20d0
movl $0x1, 0x1c8(%rbx)
leaq 0x1e0(%rbx), %rdi
movl $0xa9, %edx
movq %rdi, -0xe0(%rbp)
xorl %esi, %esi
callq 0x20d0
movb $0x1, 0x289(%rbx)
andq $0x0, 0x290(%rbx)
cvtss2sd -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
movups %xmm1, 0x2a0(%rbx)
movups %xmm1, 0x2b0(%rbx)
movups %xmm1, 0x2c0(%rbx)
movups %xmm1, 0x2d0(%rbx)
movups %xmm1, 0x2e0(%rbx)
movups %xmm1, 0x2f0(%rbx)
movups %xmm1, 0x300(%rbx)
andq $0x0, 0x310(%rbx)
movsd 0x2ab8(%rip), %xmm1     # 0x6028
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movsd %xmm0, 0x1d0(%rbx)
movl %eax, 0x1d8(%rbx)
movl %r14d, 0x298(%rbx)
cmpl $0x2, %r14d
je 0x36d0
cmpl $0x1, %r14d
jne 0x3854
leaq 0x1c0(%rbx), %r14
movabsq $0x100000065, %rax      # imm = 0x100000065
movq %rax, 0x1c0(%rbx)
movapd %xmm0, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x80(%rbx)
divsd 0x2a5f(%rip), %xmm0     # 0x6030
movsd %xmm0, 0x88(%rbx)
movsd 0x2a2f(%rip), %xmm0     # 0x6010
divsd %xmm1, %xmm0
callq 0x2160
movsd %xmm0, 0x70(%rbx)
movsd 0x2a19(%rip), %xmm0     # 0x6010
divsd 0x88(%rbx), %xmm0
callq 0x2160
movsd %xmm0, 0x78(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x150(%rbx)
movupd %xmm0, 0x160(%rbx)
leaq -0x70(%rbp), %rdi
movapd %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %r14, %rsi
callq 0x41fe
leaq -0x30(%rbp), %rsi
movl $0x1, (%rsi)
leaq -0x70(%rbp), %rdi
callq 0x443c
leaq -0x110(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4224
leaq -0x110(%rbp), %rsi
movq %r15, %rdi
callq 0x4524
leaq -0x110(%rbp), %rdi
callq 0x461e
movq %rbx, %rdi
callq 0x427c
xorl %r12d, %r12d
leaq -0x30(%rbp), %r15
cmpl (%r14), %r12d
jae 0x384b
andq $0x0, -0x30(%rbp)
movq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x5a92
andq $0x0, -0x30(%rbp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x5a92
andq $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x5a92
andq $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x5a92
incl %r12d
jmp 0x367f
movabsq $0x3300000033, %rax     # imm = 0x3300000033
movq %rax, 0x1c0(%rbx)
movapd %xmm0, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x80(%rbx)
divsd 0x2937(%rip), %xmm0     # 0x6030
movsd %xmm0, 0x88(%rbx)
movsd 0x2907(%rip), %xmm0     # 0x6010
divsd %xmm1, %xmm0
callq 0x2160
movsd %xmm0, 0x70(%rbx)
movsd 0x28f1(%rip), %xmm0     # 0x6010
divsd 0x88(%rbx), %xmm0
callq 0x2160
movsd %xmm0, 0x78(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x170(%rbx)
movupd %xmm0, 0x180(%rbx)
movupd %xmm0, 0x190(%rbx)
movupd %xmm0, 0x1a0(%rbx)
movupd %xmm0, 0x1b0(%rbx)
leaq -0x70(%rbp), %rdi
movapd %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movl 0x1c4(%rbx), %eax
imull 0x1c0(%rbx), %eax
leaq -0x30(%rbp), %rsi
movl %eax, (%rsi)
callq 0x443c
leaq -0x30(%rbp), %rsi
movl $0x2, (%rsi)
leaq -0x70(%rbp), %rdi
callq 0x443c
leaq -0xf8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4224
leaq -0xf8(%rbp), %rsi
movq %r15, %rdi
callq 0x4524
leaq -0xf8(%rbp), %rdi
callq 0x461e
movq %rbx, %rdi
callq 0x427c
xorl %r15d, %r15d
leaq -0x30(%rbp), %r14
movl 0x1c4(%rbx), %eax
imull 0x1c0(%rbx), %eax
cmpl %eax, %r15d
jae 0x384b
andq $0x0, -0x30(%rbp)
movq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x5a92
andq $0x0, -0x30(%rbp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x5a92
andq $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x5a92
andq $0x0, -0x30(%rbp)
movq -0x80(%rbp), %rdi
movq %r14, %rsi
callq 0x5a92
andq $0x0, -0x30(%rbp)
movq -0x78(%rbp), %rdi
movq %r14, %rsi
callq 0x5a92
andq $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x5a92
incl %r15d
jmp 0x37cf
leaq -0x70(%rbp), %rdi
callq 0x461e
movq 0x577d(%rip), %rdi      # 0x8fd8
leaq 0x289f(%rip), %rsi      # 0x6101
callq 0x21a0
movq %rax, %rdi
callq 0x20b0
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
leaq -0xf8(%rbp), %rdi
jmp 0x3897
movq %rax, %r12
leaq -0x110(%rbp), %rdi
callq 0x461e
jmp 0x38c2
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
movq %rax, %r12
jmp 0x38cb
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
jmp 0x38bf
movq %rax, %r12
leaq -0x70(%rbp), %rdi
callq 0x461e
leaq 0x2a0(%rbx), %rax
movq %rax, -0x98(%rbp)
leaq 0x300(%rbx), %rdi
leaq 0x2e8(%rbx), %r14
leaq 0x2d0(%rbx), %r15
leaq 0x2b8(%rbx), %rax
movq %rax, -0x88(%rbp)
leaq 0x270(%rbx), %rax
movq %rax, -0x90(%rbp)
leaq 0x258(%rbx), %rax
movq %rax, -0xa0(%rbp)
leaq 0x240(%rbx), %rax
movq %rax, -0xa8(%rbp)
leaq 0x228(%rbx), %rax
movq %rax, -0xb0(%rbp)
leaq 0x210(%rbx), %rax
movq %rax, -0xb8(%rbp)
leaq 0x1f8(%rbx), %rax
movq %rax, -0xc0(%rbp)
leaq 0x138(%rbx), %rax
movq %rax, -0xc8(%rbp)
leaq 0x120(%rbx), %rax
movq %rax, -0xd0(%rbp)
leaq 0x50(%rbx), %rax
movq %rax, -0xd8(%rbp)
leaq 0x38(%rbx), %rax
movq %rax, -0x38(%rbp)
callq 0x5c12
movq %r14, %rdi
callq 0x5c12
movq %r15, %rdi
callq 0x5c12
movq -0x88(%rbp), %rdi
callq 0x5c12
movq -0x98(%rbp), %rdi
callq 0x5c12
movq -0x90(%rbp), %rdi
callq 0x5c12
movq -0xa0(%rbp), %rdi
callq 0x5c12
movq -0xa8(%rbp), %rdi
callq 0x5c12
movq -0xb0(%rbp), %rdi
callq 0x5c12
movq -0xb8(%rbp), %rdi
callq 0x5c12
movq -0xc0(%rbp), %rdi
callq 0x5c12
movq -0xe0(%rbp), %rdi
callq 0x5c12
movq -0xc8(%rbp), %rdi
callq 0x5c12
movq -0xd0(%rbp), %rdi
callq 0x5c12
movq -0x40(%rbp), %rdi
callq 0x5c12
movq -0x78(%rbp), %rdi
callq 0x5c12
movq -0x80(%rbp), %rdi
callq 0x5c12
movq -0x48(%rbp), %rdi
callq 0x5c12
movq -0x50(%rbp), %rdi
callq 0x5c12
movq %r13, %rdi
callq 0x5c12
movq -0xd8(%rbp), %rdi
callq 0x5c12
movq -0x38(%rbp), %rdi
callq 0x5c12
movq %rbx, %rdi
callq 0x42b8
movq %r12, %rdi
callq 0x2280