// File: /workspace/github_cpp_makefile_star2_O2/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 0x440f
movl 0xc(%r14), %edx
movq %rbx, %rdi
callq 0x2e1a
xorl %ebp, %ebp
cmpl 0x8(%r15), %ebp
jge 0x4540
xorl %r12d, %r12d
cmpl 0xc(%r14), %r12d
jge 0x440b
xorl %r13d, %r13d
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
cmpl 0xc(%r15), %r13d
jge 0x43f0
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x45a6
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x45a6
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
incl %r13d
jmp 0x43b0
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x2e9c
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
jmp 0x439f
incl %ebp
jmp 0x4392
movl %esi, %edi
xorl %edx, %edi
movl 0xc(%r14), %r8d
orl %ecx, %edi
jne 0x44ab
movq %rbx, %rdi
movl %eax, %esi
movl %r8d, %edx
callq 0x2e1a
xorl %ebp, %ebp
cmpl 0xc(%r15), %ebp
jge 0x4540
xorl %r12d, %r12d
cmpl 0xc(%r14), %r12d
jge 0x44a7
xorl %r13d, %r13d
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
cmpl 0x8(%r15), %r13d
jge 0x448c
movq %r15, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x45a6
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x45a6
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
incl %r13d
jmp 0x444c
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x2e9c
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
jmp 0x443b
incl %ebp
jmp 0x442e
cmpl $0x1, %ecx
jne 0x4552
cmpl %r8d, %eax
jne 0x4552
movq %rbx, %rdi
callq 0x2e1a
xorl %ebp, %ebp
cmpl 0x8(%r15), %ebp
jge 0x4540
xorl %r12d, %r12d
cmpl 0x8(%r14), %r12d
jge 0x453c
xorl %r13d, %r13d
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
cmpl 0xc(%r14), %r13d
jge 0x4521
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x45a6
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x45a6
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
incl %r13d
jmp 0x44e1
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x2e9c
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
jmp 0x44d0
incl %ebp
jmp 0x44c7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x20a0
movq %rax, %rbx
leaq 0xb88(%rip), %rsi       # 0x50ec
movq %rax, %rdi
callq 0x2200
movq 0x4a6d(%rip), %rsi      # 0x8fe0
movq 0x4a56(%rip), %rdx      # 0x8fd0
movq %rbx, %rdi
callq 0x21d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d0
jmp 0x459e
jmp 0x4593
jmp 0x4593
movq %rax, %r14
movq %rbx, %rdi
callq 0x2d7e
movq %r14, %rdi
callq 0x21e0