// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/mat.c
// Function: Mul
static int Mul(lua_State *L)
    {
    size_t i, j, k, nr1, nc1, nr2, nc2;
    mat_t m, m1, m2;
    double s;
    if(lua_isnumber(L, 1))
        return Mxs(L, 1, 2);
    if(lua_isnumber(L, 2))
        return Mxs(L, 2, 1);
    if(testvec(L, 2, NULL, NULL, NULL))
        return Mxv(L);
    /* matrix product  NxK * KxM -> NxM  (with N,K,M  != 1) */
    checkmat(L, 1, m1, &nr1, &nc1);
    checkmat(L, 2, m2, &nr2, &nc2);
    if((nc1 != nr2))
        return luaL_error(L, OPERANDS_ERROR);
    for(i=0; i < nr1; i++)
        for(j=0; j < nc2; j++)
            {
            s = 0;
            for(k=0; k < nc1; k++)
                s += m1[i][k] * m2[k][j];
            m[i][j] = s;
            }
    pushmat(L, m, nr1, nc2, nr1, nc2);
    return 1;
    }

// Assembly:
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, 0x1c8(%rsp)
movq 0x1c8(%rsp), %rdi
movl $0x1, %esi
callq 0x85a0
cmpl $0x0, %eax
je 0x17159
movq 0x1c8(%rsp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x17a70
movl %eax, 0x1d4(%rsp)
jmp 0x173da
movq 0x1c8(%rsp), %rdi
movl $0x2, %esi
callq 0x85a0
cmpl $0x0, %eax
je 0x17193
movq 0x1c8(%rsp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x17a70
movl %eax, 0x1d4(%rsp)
jmp 0x173da
movq 0x1c8(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rdx
movq %r8, %rcx
callq 0x8b00
cmpl $0x0, %eax
je 0x171ce
movq 0x1c8(%rsp), %rdi
callq 0x17bb0
movl %eax, 0x1d4(%rsp)
jmp 0x173da
movq 0x1c8(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movl $0x1, %esi
leaq 0x1a8(%rsp), %rcx
leaq 0x1a0(%rsp), %r8
callq 0x8560
movq 0x1c8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movl $0x2, %esi
leaq 0x198(%rsp), %rcx
leaq 0x190(%rsp), %r8
callq 0x8560
movq 0x1a0(%rsp), %rax
cmpq 0x198(%rsp), %rax
je 0x1725f
movq 0x1c8(%rsp), %rdi
leaq 0xc380(%rip), %rsi      # 0x235c0
leaq 0xc393(%rip), %rdx      # 0x235da
movl $0x28c, %ecx            # imm = 0x28C
movb $0x0, %al
callq 0x8b30
movl %eax, 0x1d4(%rsp)
jmp 0x173da
movq $0x0, 0x1c0(%rsp)
movq 0x1c0(%rsp), %rax
cmpq 0x1a8(%rsp), %rax
jae 0x1739a
movq $0x0, 0x1b8(%rsp)
movq 0x1b8(%rsp), %rax
cmpq 0x190(%rsp), %rax
jae 0x1737f
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movq $0x0, 0x1b0(%rsp)
movq 0x1b0(%rsp), %rax
cmpq 0x1a0(%rsp), %rax
jae 0x1733c
movq 0x1c0(%rsp), %rcx
leaq 0x90(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x1b0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x1b0(%rsp), %rcx
leaq 0x10(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x1b8(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x1b0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1b0(%rsp)
jmp 0x172b8
movsd 0x8(%rsp), %xmm0
movq 0x1c0(%rsp), %rcx
leaq 0x110(%rsp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x1b8(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x1b8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1b8(%rsp)
jmp 0x1728d
jmp 0x17381
movq 0x1c0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1c0(%rsp)
jmp 0x1726b
movq 0x1c8(%rsp), %rdi
leaq 0x110(%rsp), %rsi
movq 0x1a8(%rsp), %rdx
movq 0x190(%rsp), %rcx
movq 0x1a8(%rsp), %r8
movq 0x190(%rsp), %r9
callq 0x8500
movl $0x1, 0x1d4(%rsp)
movl 0x1d4(%rsp), %eax
addq $0x1d8, %rsp            # imm = 0x1D8
retq
nopl (%rax)