LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: frame4V
void frame4V(POINT P1, VECTOR v1, VECTOR v2, int a1, int a2, MAT4 m)
{
	int i;

	frameV(v1,v2, a1, a2, M m,4);
	for(i=X;i<=U;i++)
		m[i][U]=P1[i];
	m[U][X]=m[U][Y]=m[U][Z]=0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
movq %r9, %r8
movl $0x4, %r9d
callq 0x2260
xorl %eax, %eax
movsd (%r14,%rax), %xmm0
movsd %xmm0, 0x18(%rbx,%rax,4)
addq $0x8, %rax
cmpq $0x20, %rax
jne 0x4e35
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movq $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: angle
real angle(POINT P1, POINT P2, POINT P3)
{
	VECTOR a,b;

	vect(P1,P2,a);  unitv(a,a);
	vect(P3,P2,b);  unitv(b,b);
	return acos(dot(a,b));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r14
movsd (%rdi), %xmm0
subsd (%rsi), %xmm0
leaq 0x20(%rsp), %rbx
movsd %xmm0, (%rbx)
movsd 0x8(%rdi), %xmm0
subsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x8(%rbx)
movsd 0x10(%rdi), %xmm0
subsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%rbx)
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2110
movsd (%r15), %xmm0
subsd (%r14), %xmm0
movq %rsp, %r12
movsd %xmm0, (%r12)
movsd 0x8(%r15), %xmm0
subsd 0x8(%r14), %xmm0
movsd %xmm0, 0x8(%r12)
movsd 0x10(%r15), %xmm0
subsd 0x10(%r14), %xmm0
movsd %xmm0, 0x10(%r12)
movq %r12, %rdi
movq %r12, %rsi
callq 0x2110
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2030
callq 0x2160
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: dist
real dist(POINT P1, POINT P2)
{
	real d;

	d= (real) sqrt((P1[X]-P2[X])*(P1[X]-P2[X])
	  +(P1[Y]-P2[Y])*(P1[Y]-P2[Y])
	  +(P1[Z]-P2[Z])*(P1[Z]-P2[Z]));

	return d;
}

// Assembly:
movsd (%rdi), %xmm1
movsd 0x8(%rdi), %xmm0
subsd (%rsi), %xmm1
subsd 0x8(%rsi), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd 0x10(%rdi), %xmm0
subsd 0x10(%rsi), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x23e0
sqrtsd %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: middle
void middle(POINT P1, POINT P2, POINT P)
{
	P[X]=(real) 0.5 * (P1[X]+P2[X]);
	P[Y]=(real) 0.5 * (P1[Y]+P2[Y]);
	P[Z]=(real) 0.5 * (P1[Z]+P2[Z]);
	P[U]=1;
}

// Assembly:
movsd (%rdi), %xmm0
addsd (%rsi), %xmm0
movsd 0x510d(%rip), %xmm1     # 0xa098
mulsd %xmm1, %xmm0
movsd %xmm0, (%rdx)
movsd 0x8(%rdi), %xmm0
addsd 0x8(%rsi), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rdx)
movsd 0x10(%rdi), %xmm0
addsd 0x10(%rsi), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rdx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: prmat
void prmat(FILE *grpout, char str[], MAT4 m)
{
	int i,j;
	real rr;

	fprintf(grpout,"\n%s\n",str);

	for(j=0;j<4;j++)
	{
		if (j!=2)
		{
			for(i=0;i<3;i++)
			{
				rr = m[i][j];
				/*if(j==3) rr = rr*100/1.8;*/ /* debug only */
				fprintf(grpout,"%8.3f ",rr);
			}
		}
		fprintf(grpout,"\n");
	}
	fprintf(grpout,"\n\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x51ca(%rip), %rsi      # 0xa230
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x21c0
leaq 0x51be(%rip), %r15      # 0xa235
cmpq $0x2, %r12
je 0x509e
movq $-0x60, %r13
movsd 0x60(%r14,%r13), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x21c0
addq $0x20, %r13
jne 0x5084
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2150
incq %r12
addq $0x8, %r14
cmpq $0x4, %r12
jne 0x5077
leaq 0x5549(%rip), %rdi      # 0xa608
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x23c0
nop
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: rotat34
void rotat34(int a, real q, POINT P, MAT4 m)
{
	MAT3 R;
	POINT O;

	rotat24(a,q,P,m);
	mmcopy(M m,M R,4,3,3,3);
	moltmv3(M R,P,O);
	vmcopy(M O,3,4,Col,M m,4,4);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
movq %rsi, %r14
callq 0x22f0
leaq 0x20(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x4, %edx
movl $0x3, %ecx
movl $0x3, %r8d
movl $0x3, %r9d
callq 0x21a0
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
movl $0x3, %ecx
movl $0x3, %r8d
movl $0x1, %r9d
callq 0x20c0
xorl %eax, %eax
movsd (%rsp,%rax), %xmm0
movsd %xmm0, 0x18(%rbx,%rax,4)
addq $0x8, %rax
cmpq $0x18, %rax
jne 0x5137
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: Gtomegapto
void Gtomegapto(MAT3 G, VECTOR omegapto)
{
	MAT3 Gt;              /* transpose of matrix G */
	MAT3 OMEGAPTO;        /* angular velocity matrix */

	transp3(G,Gt);
	sub3(G,Gt,OMEGAPTO);
	rmolt3(OMEGAPTO,0.5,OMEGAPTO); /* OMEGAPTO=1/2(G-G(t)) (t)= transp. */
	mtov3(omegapto,OMEGAPTO);      /* a. v. matrix to vector */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x50(%rsp), %r15
movq %r15, %rsi
movl $0x3, %edx
movl $0x3, %ecx
callq 0x2080
movq %rsp, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x3, %ecx
movl $0x3, %r8d
callq 0x2410
movsd 0x4e4f(%rip), %xmm0     # 0xa098
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
movl $0x3, %ecx
callq 0x2420
movq %r12, %rdi
movl $0x3, %esi
movq %rbx, %rdx
callq 0x23d0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movl %esi, %r12d
movl %edi, %ebp
movq %rcx, %rdi
movl $0x4, %esi
movl $0x4, %edx
callq 0x2400
movq %rbx, %rdi
movl $0x4, %esi
movl $0x4, %edx
callq 0x2400
movl %ebp, %edi
movl %r12d, %esi
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2090
testl %ebp, %ebp
jne 0x546a
leal 0x1(%r12), %eax
cltq
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
leal (%rax,%rax,2), %eax
negl %eax
addl %r12d, %eax
incl %eax
movl %eax, 0xc(%rsp)
leal 0x2(%r12), %eax
cltq
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
leal (%rax,%rax,2), %eax
negl %eax
addl %r12d, %eax
addl $0x2, %eax
movl %eax, 0x8(%rsp)
leaq 0x80(%rsp), %r13
movq %r13, %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0x2400
leaq 0x60(%rsp), %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0x2400
movq %r15, %rbp
movslq %r12d, %r15
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp,%r15,8)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp,%r15,8)
leaq 0x40(%rsp), %r12
movq %r13, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x2390
leaq 0xa0(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rsi
movq %rdx, %r13
callq 0x2390
leaq 0x20(%rsp), %r12
leaq 0x60(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x2390
movq %r12, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x2210
movslq 0xc(%rsp), %rax
movsd 0x40(%rsp,%rax,8), %xmm0
movaps 0x4c03(%rip), %xmm1     # 0xa000
xorps %xmm1, %xmm0
movq %rax, %rcx
shlq $0x5, %rcx
movlps %xmm0, 0x18(%r14,%rcx)
movslq 0x8(%rsp), %rdx
movsd 0x40(%rsp,%rdx,8), %xmm0
xorps %xmm1, %xmm0
movq %rdx, %rsi
shlq $0x5, %rsi
movlps %xmm0, 0x18(%r14,%rsi)
movsd 0x40(%rsp,%r15,8), %xmm0
xorps %xmm1, %xmm0
movq %r15, %rdi
shlq $0x5, %rdi
movlps %xmm0, 0x18(%r14,%rdi)
movsd 0x20(%rsp,%rax,8), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, 0x18(%rbx,%rcx)
movsd 0x20(%rsp,%rdx,8), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, 0x18(%rbx,%rsi)
movsd 0x20(%rsp,%r15,8), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, 0x18(%rbx,%rdi)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: Mtocardan
int Mtocardan(MAT4 m, int i, int j, int k, real q1[3], real q2[3])
{
	MAT3 R;

	if (i<X || i>Z || j<X || j>Z || k<X || k>Z || i==j || j==k)
	{
		fprintf(stderr,"Error (Mtocardan) : illegal axis\n");
		return(NOTOK);
	}
	mcopy43(m,R);
	rtocardan3(R,i,j,k,q1,q2);
					/* sing. config. */
	if ( ((i!=k) && ((cos(q1[1])==0) || (cos(q2[1])==0))) ||
	     ((i==k) && ((sin(q1[1])==0) || (sin(q2[1])==0))) )
	{
		fprintf(stderr,"Error (Mtocardan) : there is a singularity\n");
		return(NOTOK);
	}
	else
		return(OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpl %ecx, %edx
je 0x557a
movl %edx, %r12d
movl %esi, %r15d
cmpl %edx, %esi
je 0x557a
cmpl $0x2, %r15d
ja 0x557a
cmpl $0x2, %r12d
ja 0x557a
movl %ecx, %ebp
cmpl $0x3, %ecx
jae 0x557a
movq %r9, %rbx
movq %r8, %r14
leaq 0x10(%rsp), %r13
movq %r13, %rsi
movl $0x4, %edx
movl $0x3, %ecx
movl $0x3, %r8d
movl $0x3, %r9d
callq 0x21a0
movq %rbx, (%rsp)
movq %r13, %rdi
movl $0x3, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
movq %r14, %r9
callq 0x22d0
cmpl %ebp, %r15d
je 0x5541
movsd 0x8(%r14), %xmm0
callq 0x2140
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5521
jnp 0x5573
movsd 0x8(%rbx), %xmm0
callq 0x2140
ucomisd 0x4d0d(%rip), %xmm0     # 0xa240
jne 0x5537
jnp 0x5573
movl $0x1, %eax
cmpl %ebp, %r15d
jne 0x5581
movsd 0x8(%r14), %xmm0
callq 0x2370
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5558
jnp 0x5573
movsd 0x8(%rbx), %xmm0
callq 0x2370
movl $0x1, %eax
ucomisd 0x4cd1(%rip), %xmm0     # 0xa240
jne 0x5581
jp 0x5581
callq 0x25e8
jmp 0x557f
callq 0x260a
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: WPRODtocardan
void WPRODtocardan(real alpha, real beta, int sig, int i, int j, int k,
		   MAT3 Atil)
{
	int l;
	real sa,ca,sb,cb;     /* sine and cosine of two Euler/Cardan angles */

	sa = (real) sin(alpha); ca = (real) cos(alpha);
	sb = (real) sin(beta);  cb = (real) cos(beta);

	if (i!=k)	      /* Cardan convention */
	{
		Atil[X][i]=sig*cb;    Atil[X][j]=0.;
		Atil[Y][i]=sig*sa*sb; Atil[Y][j]=(-sig)*ca*cb;
		Atil[Z][i]=-ca*sb;    Atil[Z][j]=-sa*cb;

		Atil[X][k]=0.;
		Atil[Y][k]=-sa;
		Atil[Z][k]=sig*ca;
	}
	else		      /* Euler convention */
	{
		l=3-i-j;
		Atil[X][i]=-sb;          Atil[X][j]=0.;
		Atil[Y][i]=sa*cb;        Atil[Y][j]=ca*sb;
		Atil[Z][i]=(-sig)*ca*cb; Atil[Z][j]=sig*sa*sb;

		Atil[X][l]=0.;
		Atil[Y][l]=-sa;
		Atil[Z][l]=sig*ca;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movl %edi, %ebp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
callq 0x2370
movaps %xmm0, 0x30(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x2140
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2370
movaps %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2140
cmpl %r14d, %r12d
jne 0x5d8c
movl $0x3, %eax
subl %r12d, %eax
subl %r15d, %eax
movapd 0x4301(%rip), %xmm1     # 0xa000
movapd 0x20(%rsp), %xmm6
movapd %xmm6, %xmm2
xorpd %xmm1, %xmm2
movslq %r12d, %rcx
movlpd %xmm2, (%rbx,%rcx,8)
movslq %r15d, %rdx
xorl %esi, %esi
movq %rsi, (%rbx,%rdx,8)
movapd 0x30(%rsp), %xmm5
movapd %xmm5, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, 0x18(%rbx,%rcx,8)
movapd 0x10(%rsp), %xmm4
movapd %xmm4, %xmm2
mulsd %xmm6, %xmm2
movsd %xmm2, 0x18(%rbx,%rdx,8)
xorps %xmm2, %xmm2
cvtsi2sd %ebp, %xmm2
negl %ebp
cvtsi2sd %ebp, %xmm3
mulsd %xmm4, %xmm3
mulsd %xmm0, %xmm3
movsd %xmm3, 0x30(%rbx,%rcx,8)
movapd %xmm5, %xmm0
mulsd %xmm2, %xmm0
mulsd %xmm6, %xmm0
movsd %xmm0, 0x30(%rbx,%rdx,8)
cltq
movq %rsi, (%rbx,%rax,8)
xorpd %xmm5, %xmm1
movlpd %xmm1, 0x18(%rbx,%rax,8)
mulsd %xmm2, %xmm4
jmp 0x5e20
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
movslq %r12d, %rax
movsd %xmm2, (%rbx,%rax,8)
movslq %r15d, %rcx
xorl %edx, %edx
movq %rdx, (%rbx,%rcx,8)
movapd 0x30(%rsp), %xmm5
movapd %xmm5, %xmm2
mulsd %xmm1, %xmm2
movapd 0x20(%rsp), %xmm6
mulsd %xmm6, %xmm2
movsd %xmm2, 0x18(%rbx,%rax,8)
negl %ebp
xorps %xmm2, %xmm2
cvtsi2sd %ebp, %xmm2
movapd 0x10(%rsp), %xmm4
mulsd %xmm4, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, 0x18(%rbx,%rcx,8)
movapd 0x4211(%rip), %xmm2     # 0xa000
movapd %xmm4, %xmm3
xorpd %xmm2, %xmm3
mulsd %xmm6, %xmm3
movsd %xmm3, 0x30(%rbx,%rax,8)
xorpd %xmm5, %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, 0x30(%rbx,%rcx,8)
movslq %r14d, %rax
movq %rdx, (%rbx,%rax,8)
movlpd %xmm2, 0x18(%rbx,%rax,8)
mulsd %xmm1, %xmm4
movsd %xmm4, 0x30(%rbx,%rax,8)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: intermediate
void intermediate(POINT P1, real a, POINT P2, real b, POINT P3)
{
	int i;
	real c;

	c=a+b;
	if (c==0)
	{
		fprintf(stderr,"Error (intermediate) : c==0\n");
		/*c=sqrt(a*a+b*b);
		if (c==0)*/                                         /* by dino 2005 */
			c=1.;             /* if c==0 it is assumed c = 1 */
	}
	for (i=X;i<=Z;i++)
		P3[i]=(P1[i]*a+P2[i]*b)/c;
	P3[U]=1.;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movapd %xmm0, %xmm4
addsd %xmm1, %xmm4
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm4
jne 0x5e59
jnp 0x5e9d
xorl %eax, %eax
movsd (%r14,%rax,8), %xmm3
mulsd %xmm1, %xmm3
movsd (%r15,%rax,8), %xmm2
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
divsd %xmm4, %xmm2
movsd %xmm2, (%rbx,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x5e5b
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
callq 0x2696
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x41b8(%rip), %xmm4     # 0xa078
jmp 0x5e59
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: projponl
real projponl(POINT P1, LINE l, POINT I)
{
	real r;
	PLANE pl;            /* plane trough P1 and orthogonal to line l */

	plane2(P1,l.dir,pl); /* builds plane pl */
	r=project(l.P,pl,I); /* finds I */
	r=dist( P1, I);      /* this line was added by Br1 */
	return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x60(%rsp), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x2110
movq %r14, %rdi
movq %r15, %rsi
callq 0x2030
xorps 0x4099(%rip), %xmm0     # 0xa000
movlps %xmm0, 0x18(%r15)
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2190
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2280
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: project
real project(POINT P, PLANE pl, POINT I)
{
	real r;

	I[U]=1;
	r=distpp(pl,P);
	rmoltv(pl,r,I);
	subv(P,I,I);
	return r;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rdx)
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%rsi,%rax,8), %xmm1
mulsd (%r14,%rax,8), %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq $0x4, %rax
jne 0x5fe2
movq %rsi, %rdi
movq %rbx, %rsi
movl $0x3, %edx
movl $0x1, %ecx
movsd %xmm0, (%rsp)
callq 0x2420
movq %r14, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x2410
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: dot2
real dot2(real *v1, real *v2, int dim)
{
	int i;
	real aux;

	for (i=0,aux=0;i<dim;i++)
		aux += v1[i]*v2[i];
	return(aux);
}

// Assembly:
testl %edx, %edx
jle 0x607b
movl %edx, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movsd (%rdi,%rcx,8), %xmm1
mulsd (%rsi,%rcx,8), %xmm1
addsd %xmm1, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x6064
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: plane
void plane(POINT P1, POINT P2, POINT P3, PLANE pl)
{
	VECTOR v12,v32;

	vect(P1,P2,v12); vect(P3,P2,v32);
	cross(v12,v32,pl); unitv(pl,pl);
	pl[U]=-dot(P2,pl);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
leaq 0x20(%rsp), %r12
movq %r12, %rdx
callq 0x2430
movq %rsp, %r13
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2430
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2390
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2110
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2030
xorps 0x3f22(%rip), %xmm0     # 0xa000
movlps %xmm0, 0x18(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: inters2pl
int inters2pl(PLANE pl1, PLANE pl2, LINEP l)
{
	real zero,d;
	real alpha,beta;
	VECTOR par;
	int i;

	zero=zerom();        /* machine precision */
	cross(pl1,pl2,par);
			     /* planes are not parallel */
	if (aabs(par[X]) > zero || aabs(par[Y]) > zero || aabs(par[Z]) > zero)
	{
		l->dir[X]=par[X]; l->dir[Y]=par[Y]; l->dir[Z]=par[Z];
		d=dot(pl1,pl2);
		alpha=(-pl1[U]+d*pl2[U])/(1-pow(d,2));
		beta=(d*pl1[U]-pl2[U])/(1-pow(d,2));
		for (i=X;i<U;i++)
			l->P[i]=alpha*pl1[i]+beta*pl2[i];
		l->P[U]=1;
		return (OK);
	}
	else                 /* planes are parallel */
		return(NOTOK);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x2360
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2390
movsd 0x8(%rsp), %xmm3
movsd (%r12), %xmm0
movapd 0x3eca(%rip), %xmm1     # 0xa000
xorpd %xmm0, %xmm1
movapd %xmm0, %xmm2
maxsd %xmm1, %xmm2
ucomisd %xmm3, %xmm2
ja 0x6186
movsd 0x18(%rsp), %xmm1
movapd 0x3eaa(%rip), %xmm2     # 0xa000
xorpd %xmm1, %xmm2
maxsd %xmm2, %xmm1
ucomisd %xmm3, %xmm1
ja 0x6186
movsd 0x20(%rsp), %xmm1
movapd 0x3e8e(%rip), %xmm2     # 0xa000
xorpd %xmm1, %xmm2
maxsd %xmm2, %xmm1
xorl %eax, %eax
ucomisd %xmm3, %xmm1
jbe 0x6223
movsd %xmm0, 0x20(%rbx)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x28(%rbx)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x30(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2030
movsd 0x18(%r15), %xmm2
movsd 0x18(%r14), %xmm3
movapd %xmm0, %xmm1
mulsd %xmm3, %xmm1
subsd %xmm2, %xmm1
movapd %xmm0, %xmm4
mulsd %xmm0, %xmm4
movsd 0x3ea4(%rip), %xmm5     # 0xa078
subsd %xmm4, %xmm5
divsd %xmm5, %xmm1
mulsd %xmm2, %xmm0
subsd %xmm3, %xmm0
divsd %xmm5, %xmm0
xorl %eax, %eax
movsd (%r14,%rax,8), %xmm2
mulsd %xmm0, %xmm2
movsd (%r15,%rax,8), %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%rbx,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x61ea
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rbx)
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: interslpl
void interslpl(LINE l, PLANE pl, POINT I, int *inttype)
{
	real par,lie,zero,alpha;
	VECTOR v;

	zero=zerom();
	par=dot(pl,l.dir);
	lie=dot2(pl,l.P,4);
	if(fabs(par)<zero)	             /* l is parallel to pl */ /* fabs() bug fixed Jan 2003 */
	{
		if(lie<zero)         /* pl passes through l.P */
			*inttype=1;  /* the intersection is the line itself */
		else		     /* pl does not pass through point l.P  */
			*inttype=-1; /* no intersection */
	}
	else			     /* line and plane are incident */
	{
		*inttype=0;	     /* there is only one intersection */
		alpha=(-lie) / par;
		vector(l.dir,alpha,v);
		sumv(v,l.P,I);       /* I=alpha*l.dir+l.P */
		I[U]=1.;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x60(%rsp), %r14
callq 0x2360
movsd %xmm0, 0x8(%rsp)
leaq 0x80(%rsp), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x2030
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%r13,%rax,8), %xmm2
mulsd (%r14,%rax,8), %xmm2
addsd %xmm2, %xmm0
incq %rax
cmpq $0x4, %rax
jne 0x6272
movapd 0x3fcc(%rip), %xmm2     # 0xa260
andpd %xmm1, %xmm2
movsd 0x8(%rsp), %xmm3
ucomisd %xmm2, %xmm3
jbe 0x62b3
ucomisd %xmm0, %xmm3
jbe 0x62ff
movl $0x1, (%r15)
jmp 0x6306
movl $0x0, (%r15)
xorpd 0x3d3e(%rip), %xmm0     # 0xa000
divsd %xmm1, %xmm0
leaq 0x10(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x2220
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x3, %ecx
movl $0x1, %r8d
callq 0x2210
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rbx)
jmp 0x6306
movl $0xffffffff, (%r15)     # imm = 0xFFFFFFFF
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI5.c
// Function: axis
void axis(int a, AXIS A)

{
	switch(a)
	  {
      case X:
		   A[X]=1.;
		   A[Y]=0.;
		   A[Z]=0.;
		  break;
      case Y:
		   A[X]=0.;
		   A[Y]=1.;
		   A[Z]=0.;
		  break;
	  case Z:
		   A[X]=0.;
		   A[Y]=0.;
		   A[Z]=1.;
		  break;
	  default:
	       A[X]=0.;
		   A[Y]=0.;
		   A[Z]=0.;
		   fprintf(stderr,"Error (axis): (%d) illegal axis number.\n",a);
		  break;

	  }

}

// Assembly:
cmpl $0x2, %edi
je 0x6f42
movl %edi, %edx
cmpl $0x1, %edi
je 0x6f54
testl %edx, %edx
jne 0x6f6c
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
retq
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
jmp 0x6f67
xorl %eax, %eax
movq %rax, (%rsi)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x8(%rsi)
movq %rax, 0x10(%rsi)
retq
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq 0x7077(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x344d(%rip), %rsi      # 0xa3d8
xorl %eax, %eax
jmp 0x21c0
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI5.c
// Function: traslat
void traslat(AXIS u, real h, MAT4 m)

{
	  unitv(u,u);

      m[X][X]=1.;m[Y][Y]=1.;m[Z][Z]=1.;m[U][U]=1.;
	  m[X][Y]=0.;m[X][Z]=0.;m[Y][X]=0.;m[Y][Z]=0.;
	  m[Z][X]=0.;m[Z][Y]=0.;m[U][X]=0.;m[U][Y]=0.;
	  m[U][Z]=0.;
      m[X][U]=u[X]*h;
	  m[Y][U]=u[Y]*h;
	  m[Z][U]=u[Z]*h;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movsd %xmm0, (%rsp)
movq %rdi, %r14
movq %rdi, %rsi
callq 0x2110
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%rbx)
movq %rax, 0x28(%rbx)
movq %rax, 0x50(%rbx)
movq %rax, 0x78(%rbx)
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movq %rax, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x60(%rbx)
movq %rax, 0x70(%rbx)
movsd (%r14), %xmm0
movsd (%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rbx)
movsd 0x8(%r14), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rbx)
mulsd 0x10(%r14), %xmm1
movsd %xmm1, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI5.c
// Function: traslat24
void traslat24(int a, real h, POINT p, MAT4 m)

{
	  int i;
	  traslat2(a,h,m);
      for(i=X;i<=Z;i++)
		  {
			  m[i][U]=m[i][U]+p[i];
		  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x2300
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
movq %rbx, %rsi
callq 0x2170
xorl %eax, %eax
movsd 0x18(%rbx,%rax,4), %xmm0
addsd (%r14,%rax), %xmm0
movsd %xmm0, 0x18(%rbx,%rax,4)
addq $0x8, %rax
cmpq $0x18, %rax
jne 0x707f
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELI5.c
// Function: psedot
real psedot(MAT4 A, MAT4 B)

{
	  real ps;
	  ps=A[X][U]*B[X][U]+A[Y][U]*B[Y][U]+A[Z][U]*B[Z][U]+
	     A[Z][Y]*B[Z][Y]+A[X][Z]*B[X][Z]+A[Y][X]*B[Y][X];
	  return(ps);
}

// Assembly:
movsd 0x10(%rdi), %xmm1
movsd 0x38(%rdi), %xmm0
mulsd 0x38(%rsi), %xmm0
movsd 0x18(%rdi), %xmm2
mulsd 0x18(%rsi), %xmm2
addsd %xmm0, %xmm2
movsd 0x58(%rdi), %xmm0
mulsd 0x58(%rsi), %xmm0
addsd %xmm2, %xmm0
movsd 0x48(%rdi), %xmm2
mulsd 0x48(%rsi), %xmm2
addsd %xmm0, %xmm2
mulsd 0x10(%rsi), %xmm1
addsd %xmm2, %xmm1
movsd 0x20(%rdi), %xmm0
mulsd 0x20(%rsi), %xmm0
addsd %xmm1, %xmm0
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: dhtom
int dhtom(int jtype, real theta, real d, real b, real a, real alpha, real q,
	  MAT4 m)
{
	real ca,sa,ct,st;

	if (jtype==Pri)                        /* Prismatic joint */
		d+=q;
	else                                   /* Revolute joint */
	{
		if (jtype!=Rev)
		{
			fprintf(stderr,"Error (dhtom) : illegal joint type\n");
			return (NOTOK);
		}
		theta += q;
	}

	ca=(real) cos(alpha);  sa=(real)sin(alpha);
	ct=(real) cos(theta); st=(real)sin(theta);

	m[X][X] = ct;      m[X][Y] = -st*ca;  m[X][Z] = st*sa;
	m[Y][X] = st;      m[Y][Y] = ct*ca;   m[Y][Z] = -ct*sa;
	m[Z][X] =(real)0.; m[Z][Y] = sa;      m[Z][Z] = ca;
	m[U][X] =(real)0.; m[U][Y] =(real)0.; m[U][Z] = (real)0.;

	m[X][U] = a*ct-b*st;
	m[Y][U] = a*st+b*ct;
	m[Z][U] = d;
	m[U][U] =(real)1.;

	return (OK);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
testl %edi, %edi
movsd %xmm3, 0x28(%rsp)
movsd %xmm2, 0x20(%rsp)
je 0x712b
cmpl $0x1, %edi
jne 0x724d
addsd %xmm5, %xmm1
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
jmp 0x713b
addsd %xmm5, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movaps %xmm4, %xmm0
movsd %xmm4, (%rsp)
callq 0x2140
movsd %xmm0, 0x18(%rsp)
movsd (%rsp), %xmm0
callq 0x2370
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2140
movaps %xmm0, 0x30(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2370
movapd 0x30(%rsp), %xmm3
movsd %xmm3, (%rbx)
movapd 0x2e76(%rip), %xmm1     # 0xa000
movapd %xmm0, %xmm2
xorpd %xmm1, %xmm2
movsd 0x18(%rsp), %xmm4
mulsd %xmm4, %xmm2
movsd %xmm2, 0x8(%rbx)
movsd (%rsp), %xmm6
movapd %xmm6, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, 0x10(%rbx)
movsd %xmm0, 0x20(%rbx)
movapd %xmm4, %xmm2
movapd %xmm4, %xmm5
mulsd %xmm3, %xmm2
movsd %xmm2, 0x28(%rbx)
xorpd %xmm3, %xmm1
movapd %xmm3, %xmm4
mulsd %xmm6, %xmm1
movsd %xmm1, 0x30(%rbx)
xorl %eax, %eax
movq %rax, 0x40(%rbx)
movsd %xmm6, 0x48(%rbx)
movsd %xmm5, 0x50(%rbx)
movsd 0x28(%rsp), %xmm2
movapd %xmm2, %xmm1
mulsd %xmm0, %xmm2
movsd 0x20(%rsp), %xmm3
mulsd %xmm3, %xmm0
mulsd %xmm4, %xmm1
subsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movupd %xmm0, 0x60(%rbx)
movq %rax, 0x70(%rbx)
movsd %xmm1, 0x18(%rbx)
mulsd %xmm3, %xmm4
addsd %xmm4, %xmm2
movsd %xmm2, 0x38(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x58(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rbx)
movl $0x1, %eax
addq $0x40, %rsp
popq %rbx
retq
callq 0x2734
xorl %eax, %eax
jmp 0x7247
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: screwtom
void screwtom (AXIS u, real phi, real h, POINT P, MAT4 Q)
{
	int i,j;
	real t;

	rotat(u,phi,M Q,4);  /* builds rotational sub-matrix */

	for(i=X;i<U;i++)
	{
		for(j=X,t=0;j<U;j++)
			t += -Q[i][j] * P[j];
		Q[i][U] = (real) t + P[i] + u[i] * h;
	}
	Q[U][X]=Q[U][Y]=Q[U][Z]= 0; Q[U][U]= 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movsd %xmm1, 0x8(%rsp)
movq %rdi, %r15
movq %rdx, %rsi
movl $0x4, %edx
callq 0x2310
movsd 0x8(%rsp), %xmm2
xorl %eax, %eax
movq %rbx, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
mulsd (%r14,%rdx,8), %xmm1
subsd %xmm1, %xmm0
incq %rdx
cmpq $0x3, %rdx
jne 0x7f18
addsd (%r14,%rax,8), %xmm0
movsd (%r15,%rax,8), %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq %rax, %rdx
shlq $0x5, %rdx
movsd %xmm1, 0x18(%rbx,%rdx)
incq %rax
addq $0x20, %rcx
cmpq $0x3, %rax
jne 0x7f12
xorpd %xmm0, %xmm0
movupd %xmm0, 0x60(%rbx)
movq $0x0, 0x70(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: gtom
void gtom(real gx, real gy, real gz, MAT4 Hg)
{
	clear4(Hg);
	Hg[X][U]=gx;
	Hg[Y][U]=gy;
	Hg[Z][U]=gz;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl $0x4, %esi
movl $0x4, %edx
callq 0x2400
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x38(%rbx)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x58(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: WtoL
void WtoL(MAT4 W, MAT4 L)
{
	VECTOR u;
	real m,tol;

	tol=zerom();
	mtov(M W, 4, u);
	m=mod(u);
	if (m<tol)
		m = (real) sqrt(W[X][U]*W[X][U] +W[Y][U]*W[Y][U] +
				W[Z][U]*W[Z][U]);
	if (m<tol)
		clear4(L);
	else
		rmolt4(W,(real)1./m,L);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x60d2(%rip), %xmm5     # 0xe230
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm5
ja 0x819c
movsd 0x1f08(%rip), %xmm0     # 0xa078
movsd 0x1f20(%rip), %xmm2     # 0xa098
movapd %xmm0, %xmm5
mulsd %xmm2, %xmm5
movapd %xmm5, %xmm3
addsd %xmm0, %xmm3
ucomisd %xmm0, %xmm3
jne 0x817c
jp 0x817c
addsd %xmm5, %xmm5
movsd %xmm5, 0x6094(%rip)     # 0xe230
movsd 0x48(%r14), %xmm2
subsd 0x30(%r14), %xmm2
movsd 0x1ee8(%rip), %xmm3     # 0xa098
mulsd %xmm3, %xmm2
movsd 0x10(%r14), %xmm4
subsd 0x40(%r14), %xmm4
movsd 0x20(%r14), %xmm0
mulsd %xmm3, %xmm4
subsd 0x8(%r14), %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm4, %xmm4
mulsd %xmm2, %xmm2
addsd %xmm4, %xmm2
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x81f4
sqrtsd %xmm0, %xmm0
jmp 0x8203
movsd %xmm5, (%rsp)
callq 0x23e0
movsd (%rsp), %xmm5
ucomisd %xmm0, %xmm5
jbe 0x824e
movsd 0x18(%r14), %xmm1
movsd 0x38(%r14), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd 0x58(%r14), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x823f
sqrtsd %xmm0, %xmm0
jmp 0x824e
movsd %xmm5, (%rsp)
callq 0x23e0
movsd (%rsp), %xmm5
ucomisd %xmm0, %xmm5
jbe 0x826d
movq %rbx, %rdi
movl $0x4, %esi
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2400
movsd 0x1e03(%rip), %xmm1     # 0xa078
divsd %xmm0, %xmm1
xorl %eax, %eax
xorl %ecx, %ecx
movsd (%r14,%rcx,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%rcx,8)
incq %rcx
cmpq $0x4, %rcx
jne 0x827d
incq %rax
addq $0x20, %rbx
addq $0x20, %r14
cmpq $0x4, %rax
jne 0x827b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: velacctoWH
int velacctoWH(int jtype, real qp, real qpp, MAT4 W, MAT4 H)
{
	clear4(W); clear4(H);
	if (jtype==Pri)                        /* Prismatic joint */
	{
		W[Z][U]=qp;
		H[Z][U]=qpp;
	}
	else                                   /* Revolute joint */
	{
		if (jtype!=Rev)
		{
			fprintf(stderr,"Error (velacctoWH) : illegal joint type\n");
			return (NOTOK);
		}
		W[X][Y]= -(W[Y][X]=qp);
		H[X][X]=H[Y][Y]= -qp*qp;
		H[X][Y]= -(H[Y][X]=qpp);
	}
	return(OK);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %edi, %ebp
movq %rsi, %rdi
movl $0x4, %esi
movl $0x4, %edx
callq 0x2400
movq %rbx, %rdi
movl $0x4, %esi
movl $0x4, %edx
callq 0x2400
testl %ebp, %ebp
je 0x8414
movapd (%rsp), %xmm1
movapd 0x10(%rsp), %xmm0
cmpl $0x1, %ebp
jne 0x8464
movsd %xmm1, 0x58(%r14)
movsd %xmm0, 0x58(%rbx)
jmp 0x8456
movapd (%rsp), %xmm2
movsd %xmm2, 0x20(%r14)
movapd 0x1bd9(%rip), %xmm0     # 0xa000
movapd %xmm2, %xmm1
xorpd %xmm0, %xmm1
movlpd %xmm1, 0x8(%r14)
mulsd %xmm2, %xmm1
movsd %xmm1, 0x28(%rbx)
movsd %xmm1, (%rbx)
movapd 0x10(%rsp), %xmm1
movsd %xmm1, 0x20(%rbx)
xorpd %xmm0, %xmm1
movlpd %xmm1, 0x8(%rbx)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2750
xorl %eax, %eax
jmp 0x845b
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: velacctoWH2
int velacctoWH2(int jtype, int a, real qp, real qpp, MAT4 W, MAT4 H)
{
	int x, y, z;

	if (a<X || a>Z)
	{
		fprintf(stderr,"Error (velacctoWH2) : illegal axis");
		return (NOTOK);
	}
	if (jtype != Rev && jtype != Pri)
	{
		fprintf(stderr,"Error (velacctoWH2) : illegal joint type");
		return (NOTOK);
	}

	x=(a+1) % 3; y=(a+2) % 3; z=a;

	clear4(W);  clear4(H);

	if (jtype == Pri)                      /* Prismatic joint */
	{
		W[z][U] = qp;                  /* W[a][U] = qp;  ric 4.11.93*/
		H[z][U] = qpp;                 /* H[a][U] = qpp; ric 4.11.93*/
	}
	else                                   /* Revolute joint */
	{
		W[x][y] = -(W[y][x] = qp);
		H[x][y] = -(H[y][x] = qpp); H[x][x] = H[y][y] = -qp*qp;
	}
	return(OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpl $0x3, %esi
jae 0x858e
movl %edi, %ebp
cmpl $0x2, %edi
jae 0x8595
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r15d
movapd %xmm1, (%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rdx, %rdi
movl $0x4, %esi
movl $0x4, %edx
callq 0x2400
movq %rbx, %rdi
movl $0x4, %esi
movl $0x4, %edx
callq 0x2400
cmpl $0x1, %ebp
jne 0x84ea
movl %r15d, %eax
shlq $0x5, %rax
movaps 0x10(%rsp), %xmm0
movsd %xmm0, 0x18(%r14,%rax)
movapd (%rsp), %xmm0
movsd %xmm0, 0x18(%rbx,%rax)
jmp 0x857e
leal 0x2(%r15), %eax
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x21, %rax
leal (%rax,%rax,2), %eax
negl %eax
addl %r15d, %eax
addl $0x2, %eax
movl %r15d, %edx
incl %edx
imulq %rcx, %rdx
shrq $0x21, %rdx
leal (%rdx,%rdx,2), %ecx
negl %ecx
addl %r15d, %ecx
incl %ecx
movl %eax, %edx
shll $0x5, %edx
leaq (%r14,%rdx), %rsi
leal (,%rcx,8), %edi
movapd 0x10(%rsp), %xmm2
movsd %xmm2, (%rdi,%rsi)
movapd 0x1ac0(%rip), %xmm0     # 0xa000
movapd %xmm2, %xmm1
xorpd %xmm0, %xmm1
shll $0x5, %ecx
addq %rcx, %r14
shll $0x3, %eax
movlpd %xmm1, (%rax,%r14)
addq %rbx, %rdx
movapd (%rsp), %xmm3
movsd %xmm3, (%rdi,%rdx)
xorpd %xmm0, %xmm3
addq %rcx, %rbx
movlpd %xmm3, (%rax,%rbx)
mulsd %xmm2, %xmm1
movsd %xmm1, (%rax,%rdx)
movsd %xmm1, (%rdi,%rbx)
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2788
jmp 0x859a
callq 0x276c
xorl %eax, %eax
jmp 0x8583
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: actom
void actom(real fx, real fy, real fz, real cx, real cy, real cz, MAT4 FI)
{
	FI[X][X]= (real) 0.; FI[X][Y]= -cz;      FI[X][Z]=  cy;
	FI[Y][X]=  cz;       FI[Y][Y]=(real) 0.; FI[Y][Z]= -cx;
	FI[Z][X]= -cy;       FI[Z][Y]=  cx;      FI[Z][Z]=(real) 0.;
	FI[U][X]= -fx;       FI[U][Y]= -fy;      FI[U][Z]= -fz;

	FI[X][U]=fx;
	FI[Y][U]=fy;
	FI[Z][U]=fz;
	FI[U][U]=(real)0.;
}

// Assembly:
xorl %eax, %eax
movq %rax, (%rdi)
movaps 0x1a56(%rip), %xmm6     # 0xa000
movaps %xmm5, %xmm7
xorps %xmm6, %xmm7
movlps %xmm7, 0x8(%rdi)
movsd %xmm4, 0x10(%rdi)
movsd %xmm5, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movaps %xmm3, %xmm5
xorps %xmm6, %xmm5
movlps %xmm5, 0x30(%rdi)
xorps %xmm6, %xmm4
movlps %xmm4, 0x40(%rdi)
movsd %xmm3, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movaps %xmm0, %xmm3
movlhps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
xorps %xmm6, %xmm3
movups %xmm3, 0x60(%rdi)
xorps %xmm2, %xmm6
movlps %xmm6, 0x70(%rdi)
movsd %xmm0, 0x18(%rdi)
movsd %xmm1, 0x38(%rdi)
movsd %xmm2, 0x58(%rdi)
movq %rax, 0x78(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: jtoJ
void jtoJ(real mass, real jxx, real jyy, real jzz, real jxy, real jyz,
	  real jxz, real xg, real yg, real zg, MAT4 J)
{
	J[X][X]=(-jxx+jyy+jzz)/2+mass*xg*xg;
	J[Y][Y]=( jxx-jyy+jzz)/2+mass*yg*yg;
	J[Z][Z]=( jxx+jyy-jzz)/2+mass*zg*zg;

	J[X][Y]=J[Y][X]= -jxy+mass*xg*yg;
	J[X][Z]=J[Z][X]= -jxz+mass*xg*zg;
	J[Y][Z]=J[Z][Y]= -jyz+mass*yg*zg;

	J[U][U]=mass;
	J[U][X]=J[X][U]=mass*xg;
	J[U][Y]=J[Y][U]=mass*yg;
	J[U][Z]=J[Z][U]=mass*zg;
}

// Assembly:
movsd 0x10(%rsp), %xmm8
movsd 0x8(%rsp), %xmm10
movapd %xmm2, %xmm11
subsd %xmm1, %xmm11
addsd %xmm3, %xmm11
movsd 0x1a6e(%rip), %xmm12    # 0xa098
mulsd %xmm12, %xmm11
movapd %xmm0, %xmm9
mulsd %xmm7, %xmm9
mulsd %xmm9, %xmm7
addsd %xmm11, %xmm7
movsd %xmm7, (%rdi)
movapd %xmm1, %xmm11
subsd %xmm2, %xmm11
addsd %xmm3, %xmm11
mulsd %xmm12, %xmm11
movapd %xmm0, %xmm7
mulsd %xmm10, %xmm7
movapd %xmm7, %xmm13
mulsd %xmm10, %xmm13
addsd %xmm11, %xmm13
movsd %xmm13, 0x28(%rdi)
addsd %xmm2, %xmm1
subsd %xmm3, %xmm1
mulsd %xmm12, %xmm1
movapd %xmm0, %xmm2
mulsd %xmm8, %xmm2
movapd %xmm2, %xmm3
mulsd %xmm8, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, 0x50(%rdi)
mulsd %xmm9, %xmm10
subsd %xmm4, %xmm10
movsd %xmm10, 0x20(%rdi)
movsd %xmm10, 0x8(%rdi)
movapd %xmm9, %xmm1
mulsd %xmm8, %xmm1
subsd %xmm6, %xmm1
movsd %xmm1, 0x40(%rdi)
movsd %xmm1, 0x10(%rdi)
mulsd %xmm7, %xmm8
subsd %xmm5, %xmm8
movsd %xmm8, 0x48(%rdi)
movsd %xmm8, 0x30(%rdi)
movsd %xmm0, 0x78(%rdi)
movsd %xmm9, 0x18(%rdi)
movsd %xmm9, 0x60(%rdi)
movsd %xmm7, 0x38(%rdi)
movsd %xmm7, 0x68(%rdi)
movsd %xmm2, 0x58(%rdi)
movsd %xmm2, 0x70(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: trasf_mami
void trasf_mami(MAT4 A1, MAT4 m, MAT4 A2)
{
	int i,j,h,k;
	real t;

	for (i=0;i<3;i++)             /* 3×3 sub matrix */
		for (j=0;j<3;j++)
		{
			t=0.;
			for (h=0;h<3;h++)
				for (k=0;k<3;k++)
					t += m[i][h]*A1[h][k]*m[j][k];
			A2[i][j]=(real)t;
		}
	for (i=0;i<3;i++)             /* elements 1,2,3 of last column */
	{
		for (t=0.,j=0;j<3;j++)
			t += -A2[i][j]*m[j][U] +m[i][j]*A1[j][U];
		A2[i][U] =(real) t+ m[i][U]*A1[U][U];
	}

	A2[U][X]=A2[U][Y]=A2[U][Z]=(real)0.; A2[U][U]=A1[U][U]; /* last row */
}

// Assembly:
pushq %r14
pushq %rbx
xorl %eax, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rsi,%rcx), %r8
addq %rdx, %rcx
movq %rsi, %r9
xorl %r10d, %r10d
xorpd %xmm0, %xmm0
movq %rdi, %r11
xorl %ebx, %ebx
movsd (%r8,%rbx,8), %xmm1
xorl %r14d, %r14d
movsd (%r11,%r14,8), %xmm2
mulsd %xmm1, %xmm2
mulsd (%r9,%r14,8), %xmm2
addsd %xmm2, %xmm0
incq %r14
cmpq $0x3, %r14
jne 0x8b10
incq %rbx
addq $0x20, %r11
cmpq $0x3, %rbx
jne 0x8b07
movsd %xmm0, (%rcx,%r10,8)
incq %r10
addq $0x20, %r9
cmpq $0x3, %r10
jne 0x8afe
incq %rax
cmpq $0x3, %rax
jne 0x8aea
xorl %eax, %eax
movq %rdx, %rcx
movq %rsi, %r8
xorpd %xmm0, %xmm0
xorl %r9d, %r9d
movsd (%rcx,%r9), %xmm1
movsd (%r8,%r9), %xmm2
mulsd 0x18(%rdi,%r9,4), %xmm2
mulsd 0x18(%rsi,%r9,4), %xmm1
subsd %xmm1, %xmm2
addsd %xmm2, %xmm0
addq $0x8, %r9
cmpq $0x18, %r9
jne 0x8b65
movq %rax, %r9
shlq $0x5, %r9
movsd 0x18(%rsi,%r9), %xmm1
mulsd 0x78(%rdi), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rdx,%r9)
incq %rax
addq $0x20, %r8
addq $0x20, %rcx
cmpq $0x3, %rax
jne 0x8b5e
xorpd %xmm0, %xmm0
movupd %xmm0, 0x60(%rdx)
movq $0x0, 0x70(%rdx)
movsd 0x78(%rdi), %xmm0
movsd %xmm0, 0x78(%rdx)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: trasf_miam
void trasf_miam(MAT4 A1, MAT4 m, MAT4 A2)
{
	int i,j,h,k;
	real t;
	real tmp[3];

	for (i=0;i<3;i++)             /* 3×3 rotational sub-matrix*/
		for (j=0;j<3;j++)
		{
			t=0.;
			for (h=0;h<3;h++)
				for (k=0;k<3;k++)
					t += m[h][i]*A1[h][k]*m[k][j];
			A2[i][j]=(real)t;
		}
	for (i=0;i<3;i++)             /* temporary vector */
	{
		for (t=0.,j=0;j<3;j++)
			t += A1[i][j]*m[j][U];
		tmp[i] =(real) t;
	}
	for (i=0;i<3;i++)             /* 1,2,3 last column elements */
	{
		for (t=0.,j=0;j<3;j++)
			t += m[j][i]*(tmp[j]-A1[U][U]*m[j][U]+A1[j][U]);
		A2[i][U] = (real) t;
	}

	A2[U][X]=A2[U][Y]=A2[U][Z]=(real)0.; A2[U][U]=A1[U][U]; /* last row */
}

// Assembly:
pushq %rbx
xorl %eax, %eax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rdx, %rcx
movq %rsi, %r8
xorl %r9d, %r9d
xorpd %xmm0, %xmm0
movq %rdi, %r10
xorl %r11d, %r11d
movq %r11, %rbx
shlq $0x5, %rbx
addq %rsi, %rbx
movsd (%rbx,%rax,8), %xmm1
xorl %ebx, %ebx
movsd (%r10,%rbx), %xmm2
mulsd %xmm1, %xmm2
mulsd (%r8,%rbx,4), %xmm2
addsd %xmm2, %xmm0
addq $0x8, %rbx
cmpq $0x18, %rbx
jne 0x8c0d
incq %r11
addq $0x20, %r10
cmpq $0x3, %r11
jne 0x8bfc
movsd %xmm0, (%rcx,%r9,8)
incq %r9
addq $0x8, %r8
cmpq $0x3, %r9
jne 0x8bf2
incq %rax
cmpq $0x3, %rax
jne 0x8be2
xorl %eax, %eax
movq %rdi, %rcx
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
movsd (%rcx,%r8), %xmm1
mulsd 0x18(%rsi,%r8,4), %xmm1
addsd %xmm1, %xmm0
addq $0x8, %r8
cmpq $0x18, %r8
jne 0x8c60
movsd %xmm0, -0x20(%rsp,%rax,8)
incq %rax
addq $0x20, %rcx
cmpq $0x3, %rax
jne 0x8c59
xorl %eax, %eax
movapd 0x1368(%rip), %xmm0     # 0xa000
movq %rsi, %rcx
movsd 0x78(%rdi), %xmm1
xorpd %xmm0, %xmm1
xorpd %xmm2, %xmm2
xorl %r8d, %r8d
movsd 0x18(%rsi,%r8,4), %xmm3
mulsd %xmm1, %xmm3
addsd -0x20(%rsp,%r8), %xmm3
addsd 0x18(%rdi,%r8,4), %xmm3
mulsd (%rcx,%r8,4), %xmm3
addsd %xmm3, %xmm2
addq $0x8, %r8
cmpq $0x18, %r8
jne 0x8cab
movq %rax, %r8
shlq $0x5, %r8
movsd %xmm2, 0x18(%rdx,%r8)
incq %rax
addq $0x8, %rcx
cmpq $0x3, %rax
jne 0x8c9b
xorpd %xmm0, %xmm0
movupd %xmm0, 0x60(%rdx)
movq $0x0, 0x70(%rdx)
movsd 0x78(%rdi), %xmm0
movsd %xmm0, 0x78(%rdx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: trasf_miamit
void trasf_miamit(MAT4 A1, MAT4 m, MAT4 A2)
{
	int i,j,h,k;
	real t,t1,t2;
	real tmp[3];

	for (i=0;i<3;i++)             /* build temporary vector */
	{
		for (t=0.,j=0;j<3;j++)
			t += -m[j][i]*m[j][U];
		tmp[i] = t;
	}
	for (i=0;i<3;i++)             /* 3×3 rotational sub-matrix */
		for (j=0;j<3;j++)
		{
			t=0.; t1=0.; t2=0.;
			for (h=0;h<3;h++)
			{
				t1 += A1[U][h] * m[h][j];
				t2 += A1[h][U] * m[h][i];
				for (k=0;k<3;k++)
					t += m[h][i]*A1[h][k]*m[k][j];
			}
			A2[i][j] =(real) t +t1*tmp[i] +t2*tmp[j] +tmp[i]*tmp[j]*A1[U][U];
		}

	for (i=0;i<3;i++)             /* 3*1 & 1*3 parts */
	{
		t1=0.; t2=0;
		for (j=0;j<3;j++)
		{
			t1 += m[j][i]*A1[j][U];
			t2 += m[j][i]*A1[U][j];
		}
		A2[i][U]=(real)t1+tmp[i]*A1[U][U];
		A2[U][i]=(real)t2+tmp[i]*A1[U][U];
	}
	A2[U][U] = A1[U][U];
}

// Assembly:
pushq %r14
pushq %rbx
xorl %eax, %eax
movq %rsi, %rcx
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
movsd (%rcx,%r8), %xmm1
mulsd 0x18(%rsi,%r8), %xmm1
subsd %xmm1, %xmm0
addq $0x20, %r8
cmpq $0x60, %r8
jne 0x8daa
movsd %xmm0, -0x18(%rsp,%rax,8)
incq %rax
addq $0x8, %rcx
cmpq $0x3, %rax
jne 0x8da3
xorl %eax, %eax
movsd -0x18(%rsp,%rax,8), %xmm0
movq %rax, %rcx
shlq $0x5, %rcx
addq %rdx, %rcx
movq %rsi, %r8
xorl %r9d, %r9d
xorpd %xmm1, %xmm1
movq %rdi, %r10
xorl %r11d, %r11d
xorpd %xmm2, %xmm2
xorpd %xmm3, %xmm3
movsd 0x60(%rdi,%r11,8), %xmm4
movq %r11, %rbx
shlq $0x5, %rbx
leaq (%rsi,%rbx), %r14
movsd (%r14,%r9,8), %xmm7
movsd 0x18(%rdi,%rbx), %xmm5
movsd (%r14,%rax,8), %xmm6
xorl %ebx, %ebx
movsd (%r10,%rbx), %xmm8
mulsd %xmm6, %xmm8
mulsd (%r8,%rbx,4), %xmm8
addsd %xmm8, %xmm3
addq $0x8, %rbx
cmpq $0x18, %rbx
jne 0x8e28
mulsd %xmm7, %xmm4
addsd %xmm4, %xmm2
mulsd %xmm6, %xmm5
addsd %xmm5, %xmm1
incq %r11
addq $0x20, %r10
cmpq $0x3, %r11
jne 0x8e02
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
movsd -0x18(%rsp,%r9,8), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm3
mulsd 0x78(%rdi), %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, (%rcx,%r9,8)
incq %r9
addq $0x8, %r8
cmpq $0x3, %r9
jne 0x8df0
incq %rax
cmpq $0x3, %rax
jne 0x8dda
xorl %eax, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
xorpd %xmm1, %xmm1
movsd (%rsi,%rcx,4), %xmm2
movsd 0x18(%rdi,%rcx,4), %xmm3
mulsd %xmm2, %xmm3
mulsd 0x60(%rdi,%rcx), %xmm2
addsd %xmm3, %xmm1
addsd %xmm2, %xmm0
addq $0x8, %rcx
cmpq $0x18, %rcx
jne 0x8eb9
movsd -0x18(%rsp,%rax,8), %xmm2
movsd 0x78(%rdi), %xmm3
mulsd %xmm2, %xmm3
addsd %xmm1, %xmm3
movq %rax, %rcx
shlq $0x5, %rcx
movsd %xmm3, 0x18(%rdx,%rcx)
mulsd 0x78(%rdi), %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, 0x60(%rdx,%rax,8)
incq %rax
addq $0x8, %rsi
cmpq $0x3, %rax
jne 0x8eaf
movsd 0x78(%rdi), %xmm0
movsd %xmm0, 0x78(%rdx)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: coriolis
void coriolis(MAT4 H0, MAT4 H1, MAT4 W0, MAT4 W1, MAT4 H)
{

	real t;
	int i,j,k;

	for (i=0;i<3;i++)
	{
		for (j=0;j<4;j++)
		{
			t=0;
			for (k=0;k<3;k++)
			{
				t += W0[i][k]*W1[k][j];
			}
			H[i][j] =(real) 2.*t+H0[i][j]+H1[i][j];
		}
	}
	H[U][X]=H[U][Y]=H[U][Z]=H[U][U]=0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
movq %rax, %r9
shlq $0x5, %r9
leaq (%rdi,%r9), %r10
leaq (%rsi,%r9), %r11
addq %r8, %r9
movq %rcx, %rbx
xorl %r14d, %r14d
xorpd %xmm0, %xmm0
xorl %r15d, %r15d
movsd (%rdx,%r15), %xmm1
mulsd (%rbx,%r15,4), %xmm1
addsd %xmm1, %xmm0
addq $0x8, %r15
cmpq $0x18, %r15
jne 0x8f50
addsd %xmm0, %xmm0
addsd (%r10,%r14,8), %xmm0
addsd (%r11,%r14,8), %xmm0
movsd %xmm0, (%r9,%r14,8)
incq %r14
addq $0x8, %rbx
cmpq $0x4, %r14
jne 0x8f49
incq %rax
addq $0x20, %rdx
cmpq $0x3, %rax
jne 0x8f31
xorpd %xmm0, %xmm0
movupd %xmm0, 0x70(%r8)
movupd %xmm0, 0x60(%r8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: invers
void invers(MAT4 m, MAT4 mi)
{
	int i,j;
	real t;

	if (m==mi){
		runtime_error("invers(m,mi)","the input and the output operands 'm' and 'mi' must be different", 1);
	}

	for (i=0;i<3;i++)
	{
		for (t=(real)0.,j=0;j<3;j++)
		{
			mi[i][j]=m[j][i];
			t -= m[j][i]*m[j][U];
		}
		mi[i][U]=t;
	}
	mi[U][X] = mi[U][Y] = mi[U][Z] = (real) 0.; mi[U][U]=(real)1.;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, %rdi
je 0x9036
xorl %eax, %eax
movq %r14, %rcx
movq %rbx, %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd (%rcx,%rsi,4), %xmm1
movsd %xmm1, (%rdx,%rsi)
movsd (%rcx,%rsi,4), %xmm1
mulsd 0x18(%r14,%rsi,4), %xmm1
subsd %xmm1, %xmm0
addq $0x8, %rsi
cmpq $0x18, %rsi
jne 0x8fcd
movq %rax, %rsi
shlq $0x5, %rsi
movsd %xmm0, 0x18(%rbx,%rsi)
incq %rax
addq $0x20, %rdx
addq $0x8, %rcx
cmpq $0x3, %rax
jne 0x8fc7
xorpd %xmm0, %xmm0
movupd %xmm0, 0x60(%rbx)
movq $0x0, 0x70(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x14b9(%rip), %rdi      # 0xa4f6
leaq 0x14bf(%rip), %rsi      # 0xa503
movl $0x1, %edx
callq 0x22c0
jmp 0x8fbf
// File: /workspace/github_c_makefile_star2_O1/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: trac_ljlt4
real trac_ljlt4(MAT4 L1, MAT4 J, MAT4 L2)
{
	int i,h,k;
	real t;

	t=0.;
	for (i=0;i<3;i++) /* 4th row of L1 and 4th column of L2 assumed null */
		for (h=0;h<4;h++)
			for (k=0;k<4;k++)
				t += L1[i][h]*J[h][k]*L2[i][k];
	return ((real) t);
}

// Assembly:
xorpd %xmm0, %xmm0
xorl %eax, %eax
movq %rax, %rcx
shlq $0x5, %rcx
addq %rdi, %rcx
movq %rsi, %r8
xorl %r9d, %r9d
movsd (%rcx,%r9,8), %xmm1
xorl %r10d, %r10d
movsd (%r8,%r10,8), %xmm2
mulsd %xmm1, %xmm2
mulsd (%rdx,%r10,8), %xmm2
addsd %xmm2, %xmm0
incq %r10
cmpq $0x4, %r10
jne 0x91d5
incq %r9
addq $0x20, %r8
cmpq $0x4, %r9
jne 0x91cc
incq %rax
addq $0x20, %rdx
cmpq $0x3, %rax
jne 0x91bc
retq