// File: /workspace/github_c_makefile_star2_O1/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 0x15922
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
jmp 0x15940
movq %rbx, %rdi
movl $0x2, %esi
callq 0x8560
testl %eax, %eax
je 0x15953
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %edx
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x15df1
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 0x15a42
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 0x15a20
movq 0x8(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x15a20
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x15a05
xorl %edx, %edx
xorpd %xmm0, %xmm0
testq %rax, %rax
je 0x159f3
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 0x159d9
movsd %xmm0, 0x20(%rsp,%rdx,8)
incq %rdx
addq $0x8, %r14
cmpq %rcx, %rdx
jne 0x159cb
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %rcx, %rdx
movl $0x1, %r8d
callq 0x82e0
jmp 0x15b18
leaq 0x1c16(%rip), %rsi      # 0x1763d
leaq 0x20d2(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x1c0, %ecx            # imm = 0x1C0
xorl %eax, %eax
callq 0x8a80
jmp 0x15b18
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 0x15ae3
cmpl $0x0, 0x4(%rsp)
je 0x15ae3
testq %rdx, %rdx
je 0x15ace
leaq 0x60(%rsp), %rax
xorl %esi, %esi
testq %rcx, %rcx
je 0x15ac2
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 0x15aab
incq %rsi
addq $0x20, %rax
cmpq %rdx, %rsi
jne 0x15a9e
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
movq %rdx, %r8
movq %rcx, %r9
callq 0x84d0
jmp 0x15b18
cmpq %rcx, %rdx
jne 0x15b27
xorpd %xmm0, %xmm0
testq %rdx, %rdx
je 0x15b0b
xorl %eax, %eax
movsd 0x40(%rsp,%rax,8), %xmm1
mulsd 0x20(%rsp,%rax,8), %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq %rax, %rdx
jne 0x15af3
movq %rbx, %rdi
callq 0x87d0
movl $0x1, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x1b0f(%rip), %rsi      # 0x1763d
leaq 0x1fcb(%rip), %rdx      # 0x17b00
movq %rbx, %rdi
movl $0x1dc, %ecx            # imm = 0x1DC
jmp 0x15a36