// File: btbujiangjun[P]abcdl/example/algebra/Matrix.cpp
// Function: main
int main(int argc,char** argv){
    abcdl::utils::log::set_min_log_level(abcdl::utils::log::INFO);
    abcdl::utils::log::initialize_log(argc, argv);
    
	abcdl::algebra::MatrixHelper<real> helper;
    
	real d1[6] = {1,2,-3,4,5,6};
    Mat m1(d1, 2, 3);

	auto m = helper.dot(m1, m1);
	m.display("^");	

	m1.display();

    auto m3 = m1 * m1;
    m3.display();

    m1 += m1;
    m1.display();

    m1.sigmoid();
    m1.display();

    Mat m2;
    helper.sigmoid_derivative(m2, m1);
    m2.display();

    m1 *= -1;
    m1.display();
    auto m4 = m2 * m1;
    m4.display();
}

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movl %edi, 0x2a4(%rsp)
movq %rsi, 0x298(%rsp)
xorl %edi, %edi
callq 0x78a40
movl 0x2a4(%rsp), %edi
movq 0x298(%rsp), %rsi
callq 0x78530
leaq 0x288(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x147b0
movabsq $0x40c0000040a00000, %rax # imm = 0x40C0000040A00000
movq %rax, 0x280(%rsp)
movaps 0x74434(%rip), %xmm0    # 0x7d0d0
movaps %xmm0, 0x270(%rsp)
leaq 0x248(%rsp), %rdi
movq %rdi, 0x50(%rsp)
leaq 0x270(%rsp), %rsi
movl $0x2, %edx
movl $0x3, %ecx
callq 0x22cb0
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rcx
leaq 0x220(%rsp), %rdi
movq %rcx, %rdx
callq 0x594c0
jmp 0x8ce4
leaq 0x1ef(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x8510
movq 0x40(%rsp), %rdx
leaq 0x74392(%rip), %rsi     # 0x7d094
leaq 0x1f0(%rsp), %rdi
callq 0x8410
jmp 0x8d11
leaq 0x220(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
movl $0x1, %edx
callq 0x24a90
jmp 0x8d2d
leaq 0x1f0(%rsp), %rdi
callq 0x81b0
leaq 0x1ef(%rsp), %rdi
callq 0x8370
leaq 0x1c7(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x8510
movq 0x38(%rsp), %rdx
leaq 0x74331(%rip), %rsi     # 0x7d096
leaq 0x1c8(%rsp), %rdi
callq 0x8410
jmp 0x8d74
leaq 0x248(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
movl $0x1, %edx
callq 0x24a90
jmp 0x8d90
leaq 0x1c8(%rsp), %rdi
callq 0x81b0
leaq 0x1c7(%rsp), %rdi
callq 0x8370
leaq 0x198(%rsp), %rdi
leaq 0x248(%rsp), %rdx
movq %rdx, %rsi
callq 0x33600
jmp 0x8dc4
leaq 0x177(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x8510
movq 0x30(%rsp), %rdx
leaq 0x742b4(%rip), %rsi     # 0x7d096
leaq 0x178(%rsp), %rdi
callq 0x8410
jmp 0x8df1
leaq 0x198(%rsp), %rdi
leaq 0x178(%rsp), %rsi
movl $0x1, %edx
callq 0x24a90
jmp 0x8e0d
leaq 0x178(%rsp), %rdi
callq 0x81b0
leaq 0x177(%rsp), %rdi
callq 0x8370
leaq 0x248(%rsp), %rsi
movq %rsi, %rdi
callq 0x324c0
jmp 0x8e39
leaq 0x14f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x8510
movq 0x28(%rsp), %rdx
leaq 0x7423f(%rip), %rsi     # 0x7d096
leaq 0x150(%rsp), %rdi
callq 0x8410
jmp 0x8e66
leaq 0x248(%rsp), %rdi
leaq 0x150(%rsp), %rsi
movl $0x1, %edx
callq 0x24a90
jmp 0x8e82
leaq 0x150(%rsp), %rdi
callq 0x81b0
leaq 0x14f(%rsp), %rdi
callq 0x8370
leaq 0x248(%rsp), %rdi
callq 0x4c390
jmp 0x8eab
leaq 0x127(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x8510
movq 0x20(%rsp), %rdx
leaq 0x741cd(%rip), %rsi     # 0x7d096
leaq 0x128(%rsp), %rdi
callq 0x8410
jmp 0x8ed8
leaq 0x248(%rsp), %rdi
leaq 0x128(%rsp), %rsi
movl $0x1, %edx
callq 0x24a90
jmp 0x8ef4
leaq 0x128(%rsp), %rdi
callq 0x81b0
leaq 0x127(%rsp), %rdi
callq 0x8370
leaq 0xf8(%rsp), %rdi
callq 0x229b0
jmp 0x8f1d
leaq 0x288(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x248(%rsp), %rdx
callq 0x5aad0
jmp 0x8f3c
leaq 0xd7(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x8510
movq 0x18(%rsp), %rdx
leaq 0x7413c(%rip), %rsi     # 0x7d096
leaq 0xd8(%rsp), %rdi
callq 0x8410
jmp 0x8f69
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
movl $0x1, %edx
callq 0x24a90
jmp 0x8f85
leaq 0xd8(%rsp), %rdi
callq 0x81b0
leaq 0xd7(%rsp), %rdi
callq 0x8370
movl $0xbf800000, 0xd0(%rsp) # imm = 0xBF800000
leaq 0x248(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x33ad0
jmp 0x8fc1
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x8510
movq 0x10(%rsp), %rdx
leaq 0x740b7(%rip), %rsi     # 0x7d096
leaq 0xb0(%rsp), %rdi
callq 0x8410
jmp 0x8fee
leaq 0x248(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
movl $0x1, %edx
callq 0x24a90
jmp 0x900a
leaq 0xb0(%rsp), %rdi
callq 0x81b0
leaq 0xaf(%rsp), %rdi
callq 0x8370
leaq 0x80(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x248(%rsp), %rdx
callq 0x33600
jmp 0x9043
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8510
movq 0x8(%rsp), %rdx
leaq 0x74038(%rip), %rsi     # 0x7d096
leaq 0x60(%rsp), %rdi
callq 0x8410
jmp 0x906a
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
movl $0x1, %edx
callq 0x24a90
jmp 0x9083
leaq 0x60(%rsp), %rdi
callq 0x81b0
leaq 0x5f(%rsp), %rdi
callq 0x8370
leaq 0x80(%rsp), %rdi
callq 0x22e40
leaq 0xf8(%rsp), %rdi
callq 0x22e40
leaq 0x198(%rsp), %rdi
callq 0x22e40
leaq 0x220(%rsp), %rdi
callq 0x22e40
leaq 0x248(%rsp), %rdi
callq 0x22e40
xorl %eax, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x93b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x9132
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0x81b0
leaq 0x1ef(%rsp), %rdi
callq 0x8370
jmp 0x93a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x917b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0x81b0
leaq 0x1c7(%rsp), %rdi
callq 0x8370
jmp 0x93a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x93a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x91dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x81b0
leaq 0x177(%rsp), %rdi
callq 0x8370
jmp 0x939a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x939a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x923f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x81b0
leaq 0x14f(%rsp), %rdi
callq 0x8370
jmp 0x939a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x9288
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x81b0
leaq 0x127(%rsp), %rdi
callq 0x8370
jmp 0x939a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x938d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x92ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x81b0
leaq 0xd7(%rsp), %rdi
callq 0x8370
jmp 0x938d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x9333
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x81b0
leaq 0xaf(%rsp), %rdi
callq 0x8370
jmp 0x938d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
jmp 0x9376
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x218(%rsp)
movl %eax, 0x214(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x81b0
leaq 0x5f(%rsp), %rdi
callq 0x8370
leaq 0x80(%rsp), %rdi
callq 0x22e40
leaq 0xf8(%rsp), %rdi
callq 0x22e40
leaq 0x198(%rsp), %rdi
callq 0x22e40
leaq 0x220(%rsp), %rdi
callq 0x22e40
leaq 0x248(%rsp), %rdi
callq 0x22e40
movq 0x218(%rsp), %rdi
callq 0x8500
nop