// File: xbai0624[P]dnn/src/Matrix.cpp
// Function: Matrix::operator*(Matrix&)
Matrix Matrix::operator*(Matrix &B)
{
    // matrix multiply operation *: A*B = C
    if(this->size() == 0 || B.size() == 0) {
        std::cout<<__func__<<" Error: 0 Matrix."<<std::endl;
        std::cout<<"    "<<this->size()<<" rows in left Matrix [times] "<<B.size()<<" rows in right Matrix."<<std::endl;
        exit(0);
    }

    if((*this)[0].size() != B.size() ) {
        std::cout<<__func__<<" Error: Matrix not match."<<std::endl;
        std::cout<<"    "<<(*this)[0].size()<<" collums in left Matrix [times] "<<B.size()<<" rows in right Matrix."<<std::endl;
        exit(0);
    }

    Matrix _r((*this).size(), B[0].size());

    _mul_Multiply(B, _r);

    return _r;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x68(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x3be40
cmpq $0x0, %rax
je 0x3bbf9
movq 0x60(%rsp), %rdi
callq 0x3be40
cmpq $0x0, %rax
jne 0x3bca9
movq 0x2f3d8(%rip), %rdi     # 0x6afd8
leaq 0x192b2(%rip), %rsi     # 0x54eb9
callq 0x4230
movq %rax, %rdi
leaq 0x192ad(%rip), %rsi     # 0x54ec3
callq 0x4230
movq %rax, %rdi
movq 0x2f38b(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x2f3a7(%rip), %rdi     # 0x6afd8
leaq 0x1a18e(%rip), %rsi     # 0x55dc6
callq 0x4230
movq 0x40(%rsp), %rdi
movq %rax, 0x20(%rsp)
callq 0x3be40
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x4080
movq %rax, %rdi
leaq 0x19272(%rip), %rsi     # 0x54ed5
callq 0x4230
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rdi
callq 0x3be40
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x4080
movq %rax, %rdi
leaq 0x19265(%rip), %rsi     # 0x54ef3
callq 0x4230
movq %rax, %rdi
movq 0x2f313(%rip), %rsi     # 0x6afb0
callq 0x4260
xorl %edi, %edi
callq 0x4290
movq 0x40(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rdi
callq 0x3be40
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
je 0x3bd9b
movq 0x2f2f2(%rip), %rdi     # 0x6afd8
leaq 0x191cc(%rip), %rsi     # 0x54eb9
callq 0x4230
movq %rax, %rdi
leaq 0x1920e(%rip), %rsi     # 0x54f0a
callq 0x4230
movq %rax, %rdi
movq 0x2f2a5(%rip), %rsi     # 0x6afb0
callq 0x4260
movq 0x2f2c1(%rip), %rdi     # 0x6afd8
leaq 0x1a0a8(%rip), %rsi     # 0x55dc6
callq 0x4230
movq 0x40(%rsp), %rdi
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x4080
movq %rax, %rdi
leaq 0x191cf(%rip), %rsi     # 0x54f24
callq 0x4230
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
callq 0x3be40
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x4080
movq %rax, %rdi
leaq 0x19173(%rip), %rsi     # 0x54ef3
callq 0x4230
movq %rax, %rdi
movq 0x2f221(%rip), %rsi     # 0x6afb0
callq 0x4260
xorl %edi, %edi
callq 0x4290
movq 0x40(%rsp), %rdi
movb $0x0, 0x5f(%rsp)
callq 0x3be40
movq %rax, (%rsp)
movq 0x60(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3be50
movq %rax, %rdi
callq 0x21e20
movq (%rsp), %rsi
movq 0x30(%rsp), %rdi
movq %rax, %rdx
callq 0x3b3b0
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x60(%rsp), %rsi
callq 0x3be80
jmp 0x3bdeb
movb $0x1, 0x5f(%rsp)
testb $0x1, 0x5f(%rsp)
jne 0x3be1d
jmp 0x3be13
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
callq 0x3bb80
jmp 0x3be27
movq 0x30(%rsp), %rdi
callq 0x3bb80
movq 0x38(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x50(%rsp), %rdi
callq 0x43f0
nopw %cs:(%rax,%rax)