// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonglmath/src/quat.c
// Function: Mul
static int Mul(lua_State *L)
    {
    quat_t q, p, r; 
    if(lua_isnumber(L, 1))
        return Qxs(L, 1, 2);
    if(lua_isnumber(L, 2))
        return Qxs(L, 2, 1);
    checkquat(L, 1, q);
    checkquat(L, 2, p);
    r[0] = q[0]*p[0] - q[1]*p[1] - q[2]*p[2] - q[3]*p[3];
    r[1] = q[0]*p[1] + q[1]*p[0] + q[2]*p[3] - q[3]*p[2];
    r[2] = q[0]*p[2] + q[2]*p[0] + q[3]*p[1] - q[1]*p[3];
    r[3] = q[0]*p[3] + q[3]*p[0] + q[1]*p[2] - q[2]*p[1];
    return pushquat(L, r);
    }

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movl $0x1, %esi
callq 0x85a0
cmpl $0x0, %eax
je 0x1a77a
movq 0x68(%rsp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x1abf0
movl %eax, 0x74(%rsp)
jmp 0x1a9a5
movq 0x68(%rsp), %rdi
movl $0x2, %esi
callq 0x85a0
cmpl $0x0, %eax
je 0x1a7ab
movq 0x68(%rsp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x1abf0
movl %eax, 0x74(%rsp)
jmp 0x1a9a5
movq 0x68(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movl $0x1, %esi
callq 0x8260
movq 0x68(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movl $0x2, %esi
callq 0x8260
movsd 0x40(%rsp), %xmm0
movsd 0x20(%rsp), %xmm2
movsd 0x48(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x50(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x58(%rsp), %xmm0
movsd 0x38(%rsp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
movsd 0x48(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x50(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x58(%rsp), %xmm0
movsd 0x30(%rsp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x30(%rsp), %xmm2
movsd 0x50(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x58(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x48(%rsp), %xmm0
movsd 0x38(%rsp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm2
movsd 0x58(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x48(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x50(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x68(%rsp), %rdi
movq %rsp, %rsi
callq 0x8300
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nop