// File: /workspace/github_cpp_makefile_star2_O3/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 $0x98, %rsp
movl %esi, %r15d
movss %xmm0, -0x6c(%rbp)
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
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), %rax
movq %rax, -0x60(%rbp)
leaq 0xa8(%rbx), %rax
movq %rax, -0x68(%rbp)
leaq 0xc0(%rbx), %rax
movq %rax, -0x58(%rbp)
leaq 0xd8(%rbx), %rax
movq %rax, -0x78(%rbp)
leaq 0xf0(%rbx), %rax
movq %rax, -0x80(%rbp)
leaq 0x108(%rbx), %r13
xorl %r12d, %r12d
movl $0xe0, %edx
xorl %esi, %esi
callq 0x20e0
movl $0x1, 0x1c8(%rbx)
leaq 0x1e0(%rbx), %rdi
movl $0xa9, %edx
movq %rdi, -0x88(%rbp)
xorl %esi, %esi
callq 0x20e0
movb $0x1, 0x289(%rbx)
movq %r12, 0x290(%rbx)
xorps %xmm0, %xmm0
cvtss2sd -0x6c(%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)
movq %r12, 0x310(%rbx)
movsd 0x3632(%rip), %xmm1     # 0x7028
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movsd %xmm0, 0x1d0(%rbx)
movl %eax, 0x1d8(%rbx)
movl %r15d, 0x298(%rbx)
cmpl $0x2, %r15d
je 0x3ae5
cmpl $0x1, %r15d
jne 0x3ee4
leaq 0x1c0(%rbx), %r15
movabsq $0x100000065, %rax      # imm = 0x100000065
movq %rax, 0x1c0(%rbx)
movapd %xmm0, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x80(%rbx)
divsd 0x35d9(%rip), %xmm0     # 0x7030
movsd %xmm0, 0x88(%rbx)
movsd 0x35a9(%rip), %xmm0     # 0x7010
divsd %xmm1, %xmm0
callq 0x2180
movsd %xmm0, 0x70(%rbx)
movsd 0x3593(%rip), %xmm0     # 0x7010
divsd 0x88(%rbx), %xmm0
callq 0x2180
movsd %xmm0, 0x78(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x150(%rbx)
movupd %xmm0, 0x160(%rbx)
leaq -0x50(%rbp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %esi, %esi
movq %r15, %rdx
callq 0x4de8
movq -0x48(%rbp), %rsi
movl $0x1, -0x30(%rbp)
cmpq -0x40(%rbp), %rsi
je 0x3bc8
movl $0x1, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x3bd5
movabsq $0x3300000033, %rax     # imm = 0x3300000033
movq %rax, 0x1c0(%rbx)
movapd %xmm0, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x80(%rbx)
divsd 0x3522(%rip), %xmm0     # 0x7030
movsd %xmm0, 0x88(%rbx)
movsd 0x34f2(%rip), %xmm0     # 0x7010
divsd %xmm1, %xmm0
callq 0x2180
movsd %xmm0, 0x70(%rbx)
movsd 0x34dc(%rip), %xmm0     # 0x7010
divsd 0x88(%rbx), %xmm0
callq 0x2180
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 -0x50(%rbp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0x1c4(%rbx), %eax
imull 0x1c0(%rbx), %eax
leaq -0x30(%rbp), %rdx
movl %eax, (%rdx)
xorl %esi, %esi
callq 0x4f2e
movq -0x48(%rbp), %rsi
movl $0x2, -0x30(%rbp)
cmpq -0x40(%rbp), %rsi
movq -0x78(%rbp), %r12
je 0x3d0e
movl $0x2, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x3d1b
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x4f2e
leaq -0xb8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4cfc
leaq -0xb8(%rbp), %rsi
movq %r14, %rdi
callq 0x5002
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x3c05
callq 0x21a0
movq %rbx, %rdi
callq 0x4d7c
cmpl $0x0, (%r15)
je 0x3ed6
xorl %r12d, %r12d
leaq -0x30(%rbp), %r14
movq $0x0, -0x30(%rbp)
movq 0xb0(%rbx), %rsi
cmpq 0xb8(%rbx), %rsi
je 0x3c4a
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xb0(%rbx)
jmp 0x3c56
movq -0x68(%rbp), %rdi
movq %r14, %rdx
callq 0x65f6
movq $0x0, -0x30(%rbp)
movq 0x98(%rbx), %rsi
cmpq 0xa0(%rbx), %rsi
je 0x3c82
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x98(%rbx)
jmp 0x3c8e
movq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0x65f6
movq $0x0, -0x30(%rbp)
movq 0xc8(%rbx), %rsi
cmpq 0xd0(%rbx), %rsi
je 0x3cba
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xc8(%rbx)
jmp 0x3cc6
movq -0x58(%rbp), %rdi
movq %r14, %rdx
callq 0x65f6
movq $0x0, -0x30(%rbp)
movq 0x110(%rbx), %rsi
cmpq 0x118(%rbx), %rsi
je 0x3cf2
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x110(%rbx)
jmp 0x3cfd
movq %r13, %rdi
movq %r14, %rdx
callq 0x65f6
incl %r12d
cmpl (%r15), %r12d
jb 0x3c1e
jmp 0x3ed6
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x4f2e
leaq -0xa0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4cfc
leaq -0xa0(%rbp), %rsi
movq %r14, %rdi
callq 0x5002
movq -0xa0(%rbp), %rdi
testq %rdi, %rdi
je 0x3d4b
callq 0x21a0
movq %rbx, %rdi
callq 0x4d7c
movl 0x1c4(%rbx), %eax
imull 0x1c0(%rbx), %eax
testl %eax, %eax
je 0x3ed6
xorl %r15d, %r15d
leaq -0x30(%rbp), %r14
movq $0x0, -0x30(%rbp)
movq 0xb0(%rbx), %rsi
cmpq 0xb8(%rbx), %rsi
je 0x3d9b
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xb0(%rbx)
jmp 0x3da7
movq -0x68(%rbp), %rdi
movq %r14, %rdx
callq 0x65f6
movq $0x0, -0x30(%rbp)
movq 0x98(%rbx), %rsi
cmpq 0xa0(%rbx), %rsi
je 0x3dd3
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x98(%rbx)
jmp 0x3ddf
movq -0x60(%rbp), %rdi
movq %r14, %rdx
callq 0x65f6
movq $0x0, -0x30(%rbp)
movq 0xc8(%rbx), %rsi
cmpq 0xd0(%rbx), %rsi
je 0x3e0b
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xc8(%rbx)
jmp 0x3e17
movq -0x58(%rbp), %rdi
movq %r14, %rdx
callq 0x65f6
movq $0x0, -0x30(%rbp)
movq 0xe0(%rbx), %rsi
cmpq 0xe8(%rbx), %rsi
je 0x3e43
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xe0(%rbx)
jmp 0x3e4e
movq %r12, %rdi
movq %r14, %rdx
callq 0x65f6
movq $0x0, -0x30(%rbp)
movq 0xf8(%rbx), %rsi
cmpq 0x100(%rbx), %rsi
je 0x3e7a
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xf8(%rbx)
jmp 0x3e86
movq -0x80(%rbp), %rdi
movq %r14, %rdx
callq 0x65f6
movq $0x0, -0x30(%rbp)
movq 0x110(%rbx), %rsi
cmpq 0x118(%rbx), %rsi
je 0x3eb2
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x110(%rbx)
jmp 0x3ebd
movq %r13, %rdi
movq %r14, %rdx
callq 0x65f6
incl %r15d
movl 0x1c4(%rbx), %eax
imull 0x1c0(%rbx), %eax
cmpl %eax, %r15d
jb 0x3d6f
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3ee4
callq 0x21a0
movq 0x60ed(%rip), %r14      # 0x9fd8
leaq 0x320f(%rip), %rsi      # 0x7101
movl $0x15, %edx
movq %r14, %rdi
callq 0x21f0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq 0x60bb(%rip), %rdi      # 0x9fd8
callq 0x2030
movq %rax, %rdi
callq 0x2100
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3f7a
jmp 0x3f7a
movq %rax, %r15
movq -0xa0(%rbp), %rdi
jmp 0x3f56
movq %rax, %r15
movq -0xb8(%rbp), %rdi
testq %rdi, %rdi
je 0x3f7d
callq 0x21a0
jmp 0x3f7d
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
jmp 0x3f7a
movq %rax, %r15
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3f90
callq 0x21a0
jmp 0x3f90
movq %rax, %r15
movq 0x300(%rbx), %rdi
testq %rdi, %rdi
je 0x3fa1
callq 0x21a0
movq 0x2e8(%rbx), %rdi
testq %rdi, %rdi
je 0x3fb2
callq 0x21a0
movq 0x2d0(%rbx), %rdi
testq %rdi, %rdi
je 0x3fc3
callq 0x21a0
leaq 0x2a0(%rbx), %r14
movq 0x2b8(%rbx), %rdi
testq %rdi, %rdi
je 0x3fdb
callq 0x21a0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3fe8
callq 0x21a0
movq 0x270(%rbx), %rdi
testq %rdi, %rdi
je 0x3ff9
callq 0x21a0
movq 0x258(%rbx), %rdi
testq %rdi, %rdi
je 0x400a
callq 0x21a0
movq 0x240(%rbx), %rdi
testq %rdi, %rdi
je 0x401b
callq 0x21a0
movq 0x228(%rbx), %rdi
testq %rdi, %rdi
je 0x402c
callq 0x21a0
movq 0x210(%rbx), %rdi
testq %rdi, %rdi
je 0x403d
callq 0x21a0
movq 0x1f8(%rbx), %rdi
testq %rdi, %rdi
je 0x404e
callq 0x21a0
movq -0x88(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4062
callq 0x21a0
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0x4073
callq 0x21a0
movq 0x120(%rbx), %rdi
testq %rdi, %rdi
je 0x4084
callq 0x21a0
movq (%r13), %rdi
testq %rdi, %rdi
je 0x4092
callq 0x21a0
movq -0x80(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x40a3
callq 0x21a0
movq -0x78(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x40b4
callq 0x21a0
movq -0x58(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x40c5
callq 0x21a0
movq -0x68(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x40d6
callq 0x21a0
movq -0x60(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x40e7
callq 0x21a0
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x40f5
callq 0x21a0
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x4103
callq 0x21a0
movq %rbx, %rdi
callq 0x4dba
movq %r15, %rdi
callq 0x2290
nop