// File: /workspace/github_cpp_makefile_star2_O1/theolepage[P]prophecy/src/model/../layer/../matrix/matrix.hh
// Function: Matrix<float>::dot(Matrix<float> const&, Matrix<float> const&, transpose)
static Matrix<T> dot(const Matrix& left, const Matrix &right, transpose order)
    {
        if (left.cols_ == right.rows_)
        {
            Matrix result(left.rows_, right.cols_);
            float sum = 0.0f;
            for (int y = 0; y < left.rows_; ++y)
            {
                for (int x = 0; x < right.cols_; ++x)
                {
                    for (int k = 0; k < left.cols_; k++)
                        sum += left(y, k) * right(k, x);
                    result(y, x) = sum;
                    sum = 0;
                }
            }
            return result;
        }
        else if (left.rows_ == right.rows_ && order == transpose::LEFT) // Implicit left transpose
        {
            Matrix result(left.cols_, right.cols_);
            float sum = 0.0f;
            for (int x = 0; x < left.cols_; ++x)
            {
                for (int y = 0; y < right.cols_; ++y)
                {
                    for (int k = 0; k < left.rows_; k++)
                        sum += left(k, x) * right(k, y);
                    result(x, y) = sum;
                    sum = 0;
                }
            }
            return result;
        }
        else if (left.cols_ == right.cols_ && order == transpose::RIGHT) // Implicit right transpose
        {
            Matrix result(left.rows_, right.rows_);
            float sum = 0.0f;
            for (int y = 0; y < left.rows_; ++y)
            {
                for (int x = 0; x < right.rows_; ++x)
                {
                    for (int k = 0; k < right.cols_; k++)
                        sum += left(y, k) * right(x, k);
                    result(y, x) = sum;
                    sum = 0;
                }
            }
            return result;
        }
        else
            throw std::invalid_argument("Bad Matrix multiplication");
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rsi), %esi
movl 0xc(%r15), %eax
movl 0x8(%rdx), %edx
cmpl %edx, %eax
jne 0x4e2e
movl 0xc(%r14), %edx
movq %rbx, %rdi
callq 0x32ae
cmpl $0x0, 0x8(%r15)
jle 0x4fb4
xorl %ebp, %ebp
cmpl $0x0, 0xc(%r14)
jle 0x4e1d
xorl %r12d, %r12d
cmpl $0x0, 0xc(%r15)
jle 0x4df6
xorps %xmm0, %xmm0
xorl %r13d, %r13d
movss %xmm0, (%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x502c
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x502c
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
movss (%rsp), %xmm0
incl %r13d
cmpl 0xc(%r15), %r13d
jl 0x4dac
jmp 0x4df9
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x334e
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
cmpl 0xc(%r14), %r12d
jl 0x4d9f
incl %ebp
cmpl 0x8(%r15), %ebp
jl 0x4d91
jmp 0x4fb4
movl %esi, %edi
xorl %edx, %edi
movl 0xc(%r14), %r8d
orl %ecx, %edi
jne 0x4ef5
movq %rbx, %rdi
movl %eax, %esi
movl %r8d, %edx
callq 0x32ae
cmpl $0x0, 0xc(%r15)
jle 0x4fb4
xorl %ebp, %ebp
cmpl $0x0, 0xc(%r14)
jle 0x4ee4
xorl %r12d, %r12d
cmpl $0x0, 0x8(%r15)
jle 0x4ebd
xorps %xmm0, %xmm0
xorl %r13d, %r13d
movss %xmm0, (%rsp)
movq %r15, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x502c
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x502c
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
movss (%rsp), %xmm0
incl %r13d
cmpl 0x8(%r15), %r13d
jl 0x4e73
jmp 0x4ec0
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x334e
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
cmpl 0xc(%r14), %r12d
jl 0x4e66
incl %ebp
cmpl 0xc(%r15), %ebp
jl 0x4e58
jmp 0x4fb4
cmpl $0x1, %ecx
jne 0x4fc6
cmpl %r8d, %eax
jne 0x4fc6
movq %rbx, %rdi
callq 0x32ae
cmpl $0x0, 0x8(%r15)
jle 0x4fb4
xorl %ebp, %ebp
cmpl $0x0, 0x8(%r14)
jle 0x4fa8
xorl %r12d, %r12d
cmpl $0x0, 0xc(%r14)
jle 0x4f81
xorps %xmm0, %xmm0
xorl %r13d, %r13d
movss %xmm0, (%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x502c
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x502c
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
movss (%rsp), %xmm0
incl %r13d
cmpl 0xc(%r14), %r13d
jl 0x4f37
jmp 0x4f84
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x334e
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
cmpl 0x8(%r14), %r12d
jl 0x4f2a
incl %ebp
cmpl 0x8(%r15), %ebp
jl 0x4f1c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20a0
movq %rax, %rbx
leaq 0x1112(%rip), %rsi      # 0x60ec
movq %rax, %rdi
callq 0x2220
movq 0x3ff7(%rip), %rsi      # 0x8fe0
movq 0x3fe0(%rip), %rdx      # 0x8fd0
movq %rbx, %rdi
callq 0x21f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f0
jmp 0x5024
jmp 0x5009
jmp 0x5009
movq %rax, %r14
leaq 0x3acd(%rip), %rax      # 0x8ae0
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x5024
callq 0x349c
movq %r14, %rdi
callq 0x2200