// File: /workspace/github_cpp_makefile_star2_O3/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 0x4c6f
movl 0xc(%r14), %edx
movq %rbx, %rdi
callq 0x3332
movl 0x8(%r15), %ecx
testl %ecx, %ecx
jle 0x4e0b
movl 0xc(%r14), %eax
xorl %ebp, %ebp
testl %eax, %eax
jle 0x4c60
xorl %r12d, %r12d
cmpl $0x0, 0xc(%r15)
jle 0x4c2e
xorps %xmm0, %xmm0
xorl %r13d, %r13d
movss %xmm0, (%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x4e84
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x4e84
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
movss (%rsp), %xmm0
incl %r13d
cmpl 0xc(%r15), %r13d
jl 0x4be4
jmp 0x4c31
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x33ce
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
movl 0xc(%r14), %eax
cmpl %eax, %r12d
jl 0x4bd7
movl 0x8(%r15), %ecx
incl %ebp
cmpl %ecx, %ebp
jl 0x4bcc
jmp 0x4e0b
movl %esi, %edi
xorl %edx, %edi
movl 0xc(%r14), %r8d
orl %ecx, %edi
jne 0x4d41
movq %rbx, %rdi
movl %eax, %esi
movl %r8d, %edx
callq 0x3332
movl 0xc(%r15), %ecx
testl %ecx, %ecx
jle 0x4e0b
movl 0xc(%r14), %eax
xorl %ebp, %ebp
testl %eax, %eax
jle 0x4d32
xorl %r12d, %r12d
cmpl $0x0, 0x8(%r15)
jle 0x4d00
xorps %xmm0, %xmm0
xorl %r13d, %r13d
movss %xmm0, (%rsp)
movq %r15, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x4e84
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x4e84
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
movss (%rsp), %xmm0
incl %r13d
cmpl 0x8(%r15), %r13d
jl 0x4cb6
jmp 0x4d03
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x33ce
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
movl 0xc(%r14), %eax
cmpl %eax, %r12d
jl 0x4ca9
movl 0xc(%r15), %ecx
incl %ebp
cmpl %ecx, %ebp
jl 0x4c9e
jmp 0x4e0b
cmpl $0x1, %ecx
jne 0x4e1d
cmpl %r8d, %eax
jne 0x4e1d
movq %rbx, %rdi
callq 0x3332
movl 0x8(%r15), %ecx
testl %ecx, %ecx
jle 0x4e0b
movl 0x8(%r14), %eax
xorl %ebp, %ebp
testl %eax, %eax
jle 0x4e01
xorl %r12d, %r12d
cmpl $0x0, 0xc(%r14)
jle 0x4dcf
xorps %xmm0, %xmm0
xorl %r13d, %r13d
movss %xmm0, (%rsp)
movq %r15, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x4e84
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x4e84
mulss 0x4(%rsp), %xmm0
movss (%rsp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rsp)
movss (%rsp), %xmm0
incl %r13d
cmpl 0xc(%r14), %r13d
jl 0x4d85
jmp 0x4dd2
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
movq %rbx, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x33ce
movss (%rsp), %xmm0
movss %xmm0, (%rax)
incl %r12d
movl 0x8(%r14), %eax
cmpl %eax, %r12d
jl 0x4d78
movl 0x8(%r15), %ecx
incl %ebp
cmpl %ecx, %ebp
jl 0x4d6d
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 0x12db(%rip), %rsi      # 0x610c
movq %rax, %rdi
callq 0x2220
movq 0x41a0(%rip), %rsi      # 0x8fe0
movq 0x4189(%rip), %rdx      # 0x8fd0
movq %rbx, %rdi
callq 0x21f0
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f0
jmp 0x4e7b
jmp 0x4e60
jmp 0x4e60
movq %rax, %r14
leaq 0x3cae(%rip), %rax      # 0x8b18
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4e7b
callq 0x350c
movq %r14, %rdi
callq 0x2200
nop