// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglmath/src/vec.c
// Function: Mul
static int Mul(lua_State *L)
    {
    vec_t v, v1; 
    size_t size, size1, i; 
    unsigned int isrow, isrow1;
    double r = 0;
    if(lua_isnumber(L, 1))
        return Vxs(L, 1, 2);
    if(lua_isnumber(L, 2))
        return Vxs(L, 2, 1);
    if(testmat(L, 2, NULL, NULL, NULL))
        return Vxm(L);
    checkvec(L, 1, v, &size, &isrow);
    checkvec(L, 2, v1, &size1, &isrow1);
    if((!isrow) && isrow1) /* Nx1 * 1xM = NxM */
        return Vxv(L, v, size, v1, size1);
    if(size != size1)
        return luaL_error(L, OPERANDS_ERROR);
    /* dot product:  1*N * Nx1, but also Nx1 * Nx1 and 1xN * 1*N are admitted */
    for(i=0; i < size; i++) 
        r += (v[i]*v1[i]);
    lua_pushnumber(L, r);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x8560
testl %eax, %eax
je 0x15987
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
jmp 0x159a5
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8560
testl %eax, %eax
je 0x159b8
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x15e6b
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8990
leaq 0x40(%rsp), %rdx
testl %eax, %eax
je 0x15aa7
leaq 0x8(%rsp), %rcx
leaq 0x4(%rsp), %r15
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %r8
callq 0x8670
leaq 0x60(%rsp), %r14
leaq 0x18(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movl $0x2, %esi
movq %r14, %rdx
callq 0x8520
cmpl $0x0, (%r15)
je 0x15a85
movq 0x8(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x15a85
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x15a6a
xorl %edx, %edx
xorpd %xmm0, %xmm0
testq %rax, %rax
je 0x15a58
movq %r14, %rsi
xorl %edi, %edi
movsd 0x40(%rsp,%rdi,8), %xmm1
mulsd (%rsi), %xmm1
addsd %xmm1, %xmm0
incq %rdi
addq $0x20, %rsi
cmpq %rdi, %rax
jne 0x15a3e
movsd %xmm0, 0x20(%rsp,%rdx,8)
incq %rdx
addq $0x8, %r14
cmpq %rcx, %rdx
jne 0x15a30
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
movl $0x1, %r8d
callq 0x82e0
jmp 0x15b7d
leaq 0x1bb1(%rip), %rsi      # 0x1763d
leaq 0x206d(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x1c0, %ecx            # imm = 0x1C0
xorl %eax, %eax
callq 0x8a80
jmp 0x15b7d
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rcx
movq %r15, %r8
callq 0x8670
leaq 0x20(%rsp), %rdx
leaq 0x10(%rsp), %r12
leaq 0x4(%rsp), %r8
movq %rbx, %rdi
movl $0x2, %esi
movq %r12, %rcx
callq 0x8670
cmpl $0x0, (%r15)
movq (%r14), %rdx
movq (%r12), %rcx
jne 0x15b48
cmpl $0x0, 0x4(%rsp)
je 0x15b48
testq %rdx, %rdx
je 0x15b33
leaq 0x60(%rsp), %rax
xorl %esi, %esi
testq %rcx, %rcx
je 0x15b27
movsd 0x40(%rsp,%rsi,8), %xmm0
xorl %edi, %edi
movsd 0x20(%rsp,%rdi,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rdi,8)
incq %rdi
cmpq %rdi, %rcx
jne 0x15b10
incq %rsi
addq $0x20, %rax
cmpq %rdx, %rsi
jne 0x15b03
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
movq %rdx, %r8
movq %rcx, %r9
callq 0x84d0
jmp 0x15b7d
cmpq %rcx, %rdx
jne 0x15b8c
xorpd %xmm0, %xmm0
testq %rdx, %rdx
je 0x15b70
xorl %eax, %eax
movsd 0x40(%rsp,%rax,8), %xmm1
mulsd 0x20(%rsp,%rax,8), %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq %rax, %rdx
jne 0x15b58
movq %rbx, %rdi
callq 0x87d0
movl $0x1, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1aaa(%rip), %rsi      # 0x1763d
leaq 0x1f66(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x1dc, %ecx            # imm = 0x1DC
jmp 0x15a9b