// File: /workspace/github_c_makefile_star2_O0/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: velacctoWH3
void velacctoWH3(int jtype, int a, real qp, real qpp, POINT O, MAT4 W,
		 MAT4 H)
{
	VECTOR vel,acc,omega,omegapto,a_norm;
	int x,y,z;

	clear4(W); clear4(H);
	velacctoWH2(jtype,a,qp,qpp,W,H);
	if (jtype == Rev)
	{
		x=(a+1)%3; y=(a+2)%3; z=a;
		clearv(omega); clearv(omegapto);
		omega[z]=qp; omegapto[z]=qpp;
		cross(omega,O,vel);
		cross(omega,vel,a_norm); /* normal composition of the acceleration vector */
		cross(omegapto,O,acc); /* tangential composition of the acceleration vector */
		sumv(acc,a_norm,acc);
		W[x][U]=-vel[x]; W[y][U]=-vel[y]; W[z][U]=-vel[z];
		H[x][U]=-acc[x]; H[y][U]=-acc[y]; H[z][U]=-acc[z];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movl $0x4, %edx
movl %edx, %esi
callq 0x2410
movq -0x30(%rbp), %rdi
movl $0x4, %edx
movl %edx, %esi
callq 0x2410
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x2090
cmpl $0x0, -0x4(%rbp)
jne 0x6d25
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %edx, -0xd4(%rbp)
movl -0x8(%rbp), %eax
addl $0x2, %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %edx, -0xd8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xdc(%rbp)
leaq -0x90(%rbp), %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0x2410
leaq -0xb0(%rbp), %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0x2410
movsd -0x10(%rbp), %xmm0
movslq -0xdc(%rbp), %rax
movsd %xmm0, -0x90(%rbp,%rax,8)
movsd -0x18(%rbp), %xmm0
movslq -0xdc(%rbp), %rax
movsd %xmm0, -0xb0(%rbp,%rax,8)
leaq -0x90(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x23b0
leaq -0x90(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x23b0
leaq -0xb0(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x23b0
leaq -0x70(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x70(%rbp), %rdx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x21f0
movslq -0xd4(%rbp), %rax
movsd -0x50(%rbp,%rax,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x28(%rbp), %rax
movslq -0xd4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
movslq -0xd8(%rbp), %rax
movsd -0x50(%rbp,%rax,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x28(%rbp), %rax
movslq -0xd8(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
movslq -0xdc(%rbp), %rax
movsd -0x50(%rbp,%rax,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x28(%rbp), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
movslq -0xd4(%rbp), %rax
movsd -0x70(%rbp,%rax,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x30(%rbp), %rax
movslq -0xd4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
movslq -0xd8(%rbp), %rax
movsd -0x70(%rbp,%rax,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x30(%rbp), %rax
movslq -0xd8(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
movslq -0xdc(%rbp), %rax
movsd -0x70(%rbp,%rax,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x30(%rbp), %rax
movslq -0xdc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
addq $0xe0, %rsp
popq %rbp
retq
nop