LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: makeL
int makeL(int jtype, AXIS u, real pitch, POINT P, MAT4 L)
{
	VECTOR v;

	clear4(L);

	if (jtype==Pri)      /* translation only */
	{
		L[X][U]=u[X]; L[Y][U]=u[Y]; /*L[Y][U]=u[X]; bug fixed */
		L[Z][U]=u[Z];
	}
	else if (jtype==Rev) /* revolute or screw */
	{
		L[Y][Z]=-(L[Z][Y]=u[X]);
		L[Z][X]=-(L[X][Z]=u[Y]);
		L[X][Y]=-(L[Y][X]=u[Z]);
		cross(u,P,v);
		L[X][U]=-v[X]+pitch*u[X];
		L[Y][U]=-v[Y]+pitch*u[Y];;
		L[Z][U]=-v[Z]+pitch*u[Z];;
	}
	else
	{
		fprintf(stderr,"Error (makeL) : illegal joint type\n");
		return(NOTOK);
	}

	return(OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movl %edi, %ebp
pushq $0x4
popq %rdx
movq %rcx, %rdi
movl %edx, %esi
callq 0x2450
testl %ebp, %ebp
je 0x34f6
cmpl $0x1, %ebp
jne 0x3597
movsd (%r14), %xmm0
movsd %xmm0, 0x18(%rbx)
movsd 0x8(%r14), %xmm0
movsd %xmm0, 0x38(%rbx)
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x58(%rbx)
jmp 0x3587
movsd (%r14), %xmm0
movsd %xmm0, 0x48(%rbx)
movaps 0x6af9(%rip), %xmm1     # 0xa000
xorps %xmm1, %xmm0
movlps %xmm0, 0x30(%rbx)
movsd 0x8(%r14), %xmm0
movsd %xmm0, 0x10(%rbx)
xorps %xmm1, %xmm0
movlps %xmm0, 0x40(%rbx)
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x20(%rbx)
xorps %xmm1, %xmm0
movlps %xmm0, 0x8(%rbx)
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x23e0
movsd (%r14), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
subsd (%r12), %xmm0
movsd %xmm0, 0x18(%rbx)
movsd 0x8(%r14), %xmm0
mulsd %xmm1, %xmm0
subsd 0x8(%r12), %xmm0
movsd %xmm0, 0x38(%rbx)
mulsd 0x10(%r14), %xmm1
subsd 0x10(%r12), %xmm1
movsd %xmm1, 0x58(%rbx)
pushq $0x1
popq %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xaa5a(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x6b57(%rip), %rdi      # 0xa0ff
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
xorl %eax, %eax
jmp 0x358a
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: makeL2
int makeL2(int jtype, int a, real pitch, POINT P, MAT4 L)
{
	int x,y,z;

	if (a<X || a>Z)
	{
		fprintf(stderr,"Error (makeL2) : illegal axis\n");
		return(NOTOK);
	}

	clear4(L);

	if (jtype==Pri)      /* translation only */
	{
		L[a][U]=1;
	}
	else if (jtype==Rev) /* revolute or screw */
	{
		x=(a+1) % 3; y=(a+2) % 3; z=a;

		L[y][x]=1; L[x][y]=-1;
		L[x][U] =  P[y];
		L[y][U] = -P[x];
		L[z][U] = pitch;
	}
	else
	{
		fprintf(stderr,"Error (makeL2) : illegal joint type\n");
		return(NOTOK);
	}

	return(OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x3, %esi
jae 0x36ca
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %r14d
movl %edi, %ebp
movsd %xmm0, (%rsp)
pushq $0x4
popq %rdx
movq %rcx, %rdi
movl %edx, %esi
callq 0x2450
testl %ebp, %ebp
je 0x3641
cmpl $0x1, %ebp
jne 0x36df
movl %r14d, %eax
shlq $0x5, %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x18(%rbx,%rax)
jmp 0x36bc
leal 0x1(%r14), %eax
xorl %ecx, %ecx
cmpl $0x2, %r14d
cmovnel %eax, %ecx
movl %r14d, %eax
subl $0x1, %eax
pushq $0x2
popq %rdx
cmovael %eax, %edx
movq %rdx, %rax
shlq $0x5, %rax
leaq (%rbx,%rax), %rsi
movabsq $0x3ff0000000000000, %rdi # imm = 0x3FF0000000000000
movq %rdi, (%rsi,%rcx,8)
movq %rcx, %rsi
shlq $0x5, %rsi
leaq (%rbx,%rsi), %rdi
movabsq $-0x4010000000000000, %r8 # imm = 0xBFF0000000000000
movq %r8, (%rdi,%rdx,8)
movsd (%r15,%rdx,8), %xmm0
movsd %xmm0, 0x18(%rbx,%rsi)
movsd (%r15,%rcx,8), %xmm0
xorps 0x695b(%rip), %xmm0     # 0xa000
movlps %xmm0, 0x18(%rbx,%rax)
movl %r14d, %eax
shlq $0x5, %rax
movsd (%rsp), %xmm0
movsd %xmm0, 0x18(%rbx,%rax)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xa927(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x6a48(%rip), %rdi      # 0xa123
pushq $0x1e
jmp 0x36f2
movq 0xa912(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x6a52(%rip), %rdi      # 0xa142
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
xorl %eax, %eax
jmp 0x36bf
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: cardantoM
void cardantoM(real *q, int i, int j, int k, POINT O, MAT4 m)
{
	int l;

	cardantor4(q,i,j,k,m);
	for(l=0;l<4;l++)
		m[l][U]=O[l];
	m[U][X]=m[U][Y]=m[U][Z]=0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
pushq $0x4
popq %r9
movq %rbx, %r8
callq 0x21f0
xorl %eax, %eax
cmpq $0x20, %rax
je 0x3e6e
movsd (%r14,%rax), %xmm0
movsd %xmm0, 0x18(%rbx,%rax,4)
addq $0x8, %rax
jmp 0x3e56
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
andq $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: cardantoW
void cardantoW(real *q, real *qp, int i, int j, int k, POINT O, MAT4 W)
{
	int l,m;

	cardanto_omega4(q,qp,i,j,k,W);
	for(l=X;l<=Z;l++)
	{
		W[l][U]=0;
		/*W[i][U]=0; bug fixed 13/05/97 AmGhiPu */
		for(m=X;m<=Z;m++)
			W[l][U] -= W[l][m]*O[m];
	}
	W[U][X]=W[U][Y]=W[U][Z]=W[U][U]=0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq 0x20(%rsp), %r14
movl $0x4, (%rsp)
movq %r14, %r9
callq 0x2120
xorl %eax, %eax
movq %r14, %rcx
cmpq $0x3, %rax
je 0x3ee6
movq %rax, %rdx
shlq $0x5, %rdx
addq %r14, %rdx
addq $0x18, %rdx
andq $0x0, (%rdx)
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq $0x3, %rsi
je 0x3edd
movsd (%rcx,%rsi,8), %xmm1
mulsd (%rbx,%rsi,8), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%rdx)
incq %rsi
jmp 0x3ec0
incq %rax
addq $0x20, %rcx
jmp 0x3ea2
xorpd %xmm0, %xmm0
movupd %xmm0, 0x70(%r14)
movupd %xmm0, 0x60(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: cardantoH
void cardantoH(real *q,real *qp,real *qpp, int i, int j, int k, POINT O,
	       MAT4 H)
{
	int l,m;

	cardanto_G4(q,qp,qpp,i,j,k,H);
	for(l=X;l<=Z;l++)
	{
		H[l][U]=0;
		/* H[i][U]=0; bug fixed 13/05/97 AmGhiPu */
		for(m=X;m<=Z;m++)
			H[l][U] -= H[l][m]*O[m];
	}
	H[U][X]=H[U][Y]=H[U][Z]=H[U][U]=0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %r14
pushq $0x4
pushq %rbx
callq 0x2100
popq %rax
popq %rcx
xorl %eax, %eax
movq %rbx, %rcx
cmpq $0x3, %rax
je 0x41e7
movq %rax, %rdx
shlq $0x5, %rdx
addq %rbx, %rdx
addq $0x18, %rdx
andq $0x0, (%rdx)
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq $0x3, %rsi
je 0x41de
movsd (%rcx,%rsi,8), %xmm1
mulsd (%r14,%rsi,8), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%rdx)
incq %rsi
jmp 0x41c0
incq %rax
addq $0x20, %rcx
jmp 0x41a2
xorpd %xmm0, %xmm0
movupd %xmm0, 0x70(%rbx)
movupd %xmm0, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: cardanto_OMEGAPTO
void cardanto_OMEGAPTO(real *q, real *qp, real *qpp, int i, int j, int k,
		       real *omegapto)
{
	real mat[9],mat1[9];
	real wprod[3];
	real buffer[3],buffer1[3];

	cardantol(q,i,j,k,mat,3);
	cardantoWPROD(q,i,j,k,mat1,3);
	wprod[X] = qp[Y]*qp[Z];
	wprod[Y] = qp[X]*qp[Z];
	wprod[Z] = qp[X]*qp[Y];
	molt(mat,qpp,buffer,3,3,1);
	molt(mat1,wprod,buffer1,3,3,1);
	sum(buffer,buffer1,omegapto,3,1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %r9d, %r13d
movl %r8d, %ebx
movl %ecx, %r15d
movq %rdx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %r14
leaq 0x70(%rsp), %r8
pushq $0x3
popq %rbp
movl %ecx, %esi
movl %ebx, %edx
movl %r9d, %ecx
movl %ebp, %r9d
callq 0x2240
leaq 0xc0(%rsp), %r8
movq %r14, %rdi
movl %r15d, %esi
movl %ebx, %edx
movl %r13d, %ecx
movq %r8, %r13
movl %ebp, %r9d
callq 0x2070
movsd (%r12), %xmm0
movupd 0x8(%r12), %xmm1
movapd %xmm1, %xmm2
shufpd $0x1, %xmm0, %xmm2      # xmm2 = xmm2[1],xmm0[0]
mulpd %xmm1, %xmm2
leaq 0x50(%rsp), %rbx
movapd %xmm2, (%rbx)
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rbx)
leaq 0x30(%rsp), %r14
pushq $0x1
popq %r15
leaq 0x70(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
movl %ebp, %ecx
movl %ebp, %r8d
movl %r15d, %r9d
callq 0x20d0
leaq 0x10(%rsp), %r12
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %ebp, %ecx
movl %ebp, %r8d
movl %r15d, %r9d
callq 0x20d0
movq %r14, %rdi
movq %r12, %rsi
movq 0x140(%rsp), %rdx
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x2220
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: frameP
int frameP(POINT P1, POINT P2, POINT P3, int a1, int a2, MAT A, int dim)
{
	AXIS a,b;

	if((a1==a2) || (min(a1,a2)<X) || (max(a1,a2)>Z))
	{
		fprintf(stderr,"Error (frameP) : illegal axis\n");
		return(NOTOK);
	}

	a[X]=P2[X]-P1[X];  a[Y]=P2[Y]-P1[Y]; a[Z]=P2[Z]-P1[Z];
	b[X]=P3[X]-P1[X];  b[Y]=P3[Y]-P1[Y]; b[Z]=P3[Z]-P1[Z];
	frameV(a, b, a1, a2, M A, dim);

/* #undef RR 	Bug fixed 03.04.97 AmGhiPu */

	return(OK);
}

// Assembly:
subq $0x38, %rsp
cmpl %r8d, %ecx
movl %r8d, %eax
cmovll %ecx, %eax
movl %r8d, %r10d
cmovgl %ecx, %r10d
cmpl $0x2, %r10d
jg 0x4773
cmpl %r8d, %ecx
je 0x4773
testl %eax, %eax
js 0x4773
movl 0x40(%rsp), %eax
movupd (%rsi), %xmm0
movupd (%rdi), %xmm1
subpd %xmm1, %xmm0
leaq 0x20(%rsp), %r10
movapd %xmm0, (%r10)
movsd 0x10(%rsi), %xmm0
movsd 0x10(%rdi), %xmm2
subsd %xmm2, %xmm0
movsd %xmm0, 0x10(%r10)
movupd (%rdx), %xmm0
subpd %xmm1, %xmm0
movq %rsp, %rsi
movapd %xmm0, (%rsi)
movsd 0x10(%rdx), %xmm0
subsd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsi)
movq %r10, %rdi
movl %ecx, %edx
movl %r8d, %ecx
movq %r9, %r8
movl %eax, %r9d
callq 0x2270
pushq $0x1
popq %rax
addq $0x38, %rsp
retq
movq 0x987e(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x5a6e(%rip), %rdi      # 0xa1f2
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
xorl %eax, %eax
jmp 0x476e
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI3.c
// Function: frame4P
void frame4P(POINT P1, POINT P2, POINT P3, int a1, int a2, MAT4 m)
{
	int i;

	frameP(P1,P2,P3, 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
movl $0x4, (%rsp)
callq 0x2260
xorl %eax, %eax
cmpq $0x20, %rax
je 0x492c
movsd (%r14,%rax), %xmm0
movsd %xmm0, 0x18(%rbx,%rax,4)
addq $0x8, %rax
jmp 0x4914
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
andq $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x4
popq %r9
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movl %r8d, %ecx
movq %rbx, %r8
callq 0x2270
xorl %eax, %eax
cmpq $0x20, %rax
je 0x497b
movsd (%r14,%rax), %xmm0
movsd %xmm0, 0x18(%rbx,%rax,4)
addq $0x8, %rax
jmp 0x4963
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
andq $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq %rsi, %r14
movupd (%rdi), %xmm0
movupd (%rsi), %xmm1
subpd %xmm1, %xmm0
leaq 0x20(%rsp), %r15
movapd %xmm0, (%r15)
movsd 0x10(%rdi), %xmm0
subsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%r15)
movq %r15, %rdi
movq %r15, %rsi
callq 0x2110
movupd (%rbx), %xmm0
movupd (%r14), %xmm1
subpd %xmm1, %xmm0
movq %rsp, %r12
movapd %xmm0, (%r12)
movsd 0x10(%rbx), %xmm0
subsd 0x10(%r14), %xmm0
movsd %xmm0, 0x10(%r12)
movq %r12, %rdi
movq %r12, %rsi
callq 0x2110
movq %r15, %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_O2/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), %xmm0
movsd 0x8(%rdi), %xmm1
subsd (%rsi), %xmm0
subsd 0x8(%rsi), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rdi), %xmm1
subsd 0x10(%rsi), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5608(%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_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x56a3(%rip), %rsi      # 0xa230
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x21e0
pushq $0xa
popq %rbp
leaq 0x5694(%rip), %r15      # 0xa235
cmpq $0x2, %r12
je 0x4bcf
cmpq $0x4, %r12
je 0x4be2
xorl %r13d, %r13d
cmpq $0x60, %r13
je 0x4bcf
movsd (%r14,%r13), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x21e0
addq $0x20, %r13
jmp 0x4bb0
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2150
incq %r12
addq $0x8, %r14
jmp 0x4ba1
leaq 0x5a3b(%rip), %rdi      # 0xa624
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2410
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %rbx
movq %rsi, %r14
callq 0x2300
leaq 0x30(%rsp), %r15
pushq $0x4
popq %rdx
pushq $0x3
popq %r12
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %ecx
movl %r12d, %r8d
movl %r12d, %r9d
callq 0x21c0
leaq 0x10(%rsp), %r13
pushq $0x1
popq %rbp
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl %r12d, %ecx
movl %r12d, %r8d
movl %ebp, %r9d
callq 0x20d0
movl $0x4, (%rsp)
movq %r13, %rdi
movl %r12d, %esi
pushq $0x4
popq %rdx
movl %ebp, %ecx
movq %rbx, %r8
movl %edx, %r9d
callq 0x20f0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x50(%rsp), %r15
pushq $0x3
popq %rbp
movq %r15, %rsi
movl %ebp, %edx
movl %ebp, %ecx
callq 0x2080
movq %rsp, %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %ebp, %ecx
movl %ebp, %r8d
callq 0x2460
movsd 0x530f(%rip), %xmm0     # 0xa098
movq %r12, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %ebp, %ecx
callq 0x2470
movq %r12, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x2420
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x4
popq %r13
movq %rcx, %rdi
movl %r13d, %esi
movl %r13d, %edx
callq 0x2450
movq %rbx, %rdi
movl %r13d, %esi
movl %r13d, %edx
callq 0x2450
movl %ebp, %edi
movl %r12d, %esi
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq %r14, %rdx
movq %rbx, %rcx
callq 0x20a0
testl %ebp, %ebp
jne 0x4f5a
leal 0x1(%r12), %eax
pushq $0x3
popq %rbp
cltd
idivl %ebp
movl %edx, 0xc(%rsp)
leal 0x2(%r12), %eax
cltd
idivl %ebp
movl %edx, 0x8(%rsp)
leaq 0x80(%rsp), %rdi
pushq $0x1
popq %r13
movl %ebp, %esi
movl %r13d, %edx
callq 0x2450
leaq 0x60(%rsp), %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x2450
movslq %r12d, %rbp
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp,%rbp,8)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp,%rbp,8)
leaq 0x40(%rsp), %r12
leaq 0x80(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x23e0
leaq 0xa0(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rsi
movq %rdx, %r13
callq 0x23e0
leaq 0x20(%rsp), %r12
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x23e0
movq %r12, %rdi
movq %r13, %rsi
movq %r12, %rdx
pushq $0x3
popq %rcx
pushq $0x1
popq %r8
callq 0x2220
movslq 0xc(%rsp), %rax
movsd 0x40(%rsp,%rax,8), %xmm0
movaps 0x5111(%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,%rbp,8), %xmm0
xorps %xmm1, %xmm0
movq %rbp, %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,%rbp,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_O2/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
movq %r9, 0x8(%rsp)
cmpl %ecx, %edx
je 0x5071
movl %edx, %r12d
movl %esi, %r15d
cmpl %edx, %esi
je 0x5071
cmpl $0x2, %r15d
ja 0x5071
cmpl $0x2, %r12d
ja 0x5071
movl %ecx, %ebp
cmpl $0x3, %ecx
jae 0x5071
movq %r8, %r14
leaq 0x10(%rsp), %r13
pushq $0x4
popq %rdx
pushq $0x3
popq %rbx
movq %r13, %rsi
movl %ebx, %ecx
movl %ebx, %r8d
movl %ebx, %r9d
callq 0x21c0
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
movl %ebx, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %ebp, %r8d
movq %r14, %r9
callq 0x22e0
movsd 0x8(%r14), %xmm0
cmpl %ebp, %r15d
jne 0x501e
callq 0x23b0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x500d
jnp 0x505c
movq 0x8(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x23b0
jmp 0x503e
callq 0x2140
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x502f
jnp 0x505c
movq 0x8(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x2140
ucomisd 0x51fa(%rip), %xmm0     # 0xa240
jne 0x504a
jnp 0x505c
pushq $0x1
popq %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8f95(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x5225(%rip), %rdi      # 0xa292
pushq $0x2b
jmp 0x5084
movq 0x8f80(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x51ee(%rip), %rdi      # 0xa270
pushq $0x21
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
xorl %eax, %eax
jmp 0x504d
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELI4.c
// Function: invA
int invA(real alpha, real beta, int sig, int i, int j, int k, MAT3 Ai)
{
	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) && (cb==0.)) || ((i==k) && (sb==0.)) ) /* singularity */
		return (NOTOK);
	if (i!=k)	      /* Cardan convention */
	{
		Ai[X][i]=1.; Ai[X][j]=sa*sb/cb;     Ai[X][k]=(-sig)*ca*sb/cb;
		Ai[Y][i]=0.; Ai[Y][j]=ca;           Ai[Y][k]=sig*sa;
		Ai[Z][i]=0.; Ai[Z][j]=(-sig)*sa/cb; Ai[Z][k]=ca/cb;
	}
	else	              /* Euler convention */
	{
		l=3-i-j;

		Ai[X][i]=1.; Ai[X][j]=-sa*cb/sb;    Ai[X][l]=sig*ca*cb/sb;
		Ai[Y][i]=0.; Ai[Y][j]=ca;           Ai[Y][l]=sig*sa;
		Ai[Z][i]=0.; Ai[Z][j]=sa/sb;	    Ai[Z][l]=(-sig)*ca/sb;
	}
	return(OK);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %rbx
movl %ecx, %r15d
movl %edx, %r14d
movl %esi, %r12d
movl %edi, %ebp
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x8(%rsp)
callq 0x23b0
movaps %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2140
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x23b0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x2140
xorl %eax, %eax
cmpl %r15d, %r12d
je 0x529f
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x529f
jnp 0x53ea
cmpl %r15d, %r12d
movsd 0x8(%rsp), %xmm6
jne 0x52ba
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm6
jne 0x52ba
jnp 0x53ea
cmpl %r15d, %r12d
je 0x534f
movslq %r12d, %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rbx,%rax,8)
movapd 0x20(%rsp), %xmm5
movapd %xmm5, %xmm1
mulsd %xmm6, %xmm1
divsd %xmm0, %xmm1
movslq %r14d, %rcx
movsd %xmm1, (%rbx,%rcx,8)
cvtsi2sd %ebp, %xmm1
negl %ebp
cvtsi2sd %ebp, %xmm2
movsd 0x10(%rsp), %xmm4
movapd %xmm4, %xmm3
mulsd %xmm2, %xmm3
mulsd %xmm6, %xmm3
divsd %xmm0, %xmm3
movslq %r15d, %rdx
movsd %xmm3, (%rbx,%rdx,8)
andq $0x0, 0x18(%rbx,%rax,8)
movsd %xmm4, 0x18(%rbx,%rcx,8)
mulsd %xmm5, %xmm1
movsd %xmm1, 0x18(%rbx,%rdx,8)
andq $0x0, 0x30(%rbx,%rax,8)
mulsd %xmm2, %xmm5
divsd %xmm0, %xmm5
movsd %xmm5, 0x30(%rbx,%rcx,8)
divsd %xmm0, %xmm4
movsd %xmm4, 0x30(%rbx,%rdx,8)
jmp 0x53e7
pushq $0x3
popq %rcx
subl %r12d, %ecx
subl %r14d, %ecx
movslq %r12d, %rax
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, (%rbx,%rax,8)
movapd 0x4c8f(%rip), %xmm1     # 0xa000
movapd 0x20(%rsp), %xmm4
xorpd %xmm4, %xmm1
mulsd %xmm0, %xmm1
divsd %xmm6, %xmm1
movslq %r14d, %rdx
movsd %xmm1, (%rbx,%rdx,8)
cvtsi2sd %ebp, %xmm1
movsd 0x10(%rsp), %xmm3
movapd %xmm3, %xmm2
mulsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
divsd %xmm6, %xmm2
movslq %ecx, %rcx
movsd %xmm2, (%rbx,%rcx,8)
andq $0x0, 0x18(%rbx,%rax,8)
movsd %xmm3, 0x18(%rbx,%rdx,8)
mulsd %xmm4, %xmm1
movsd %xmm1, 0x18(%rbx,%rcx,8)
andq $0x0, 0x30(%rbx,%rax,8)
divsd %xmm6, %xmm4
movsd %xmm4, 0x30(%rbx,%rdx,8)
negl %ebp
cvtsi2sd %ebp, %xmm0
mulsd %xmm3, %xmm0
divsd %xmm6, %xmm0
movsd %xmm0, 0x30(%rbx,%rcx,8)
pushq $0x1
popq %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x23b0
movaps %xmm0, 0x30(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x2140
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x23b0
movaps %xmm0, 0x20(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2140
cmpl %r14d, %r12d
jne 0x588c
leal (%r12,%r15), %eax
movapd 0x4804(%rip), %xmm1     # 0xa000
movapd 0x20(%rsp), %xmm6
movapd %xmm6, %xmm2
xorpd %xmm1, %xmm2
movslq %r12d, %rcx
movlpd %xmm2, (%rbx,%rcx,8)
movslq %r15d, %rdx
andq $0x0, (%rbx,%rdx,8)
pushq $0x3
popq %rsi
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
cvtsi2sd %ebp, %xmm3
movsd %xmm2, 0x18(%rbx,%rdx,8)
negl %ebp
cvtsi2sd %ebp, %xmm2
subl %eax, %esi
mulsd %xmm4, %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, 0x30(%rbx,%rcx,8)
movapd %xmm5, %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm6, %xmm0
movsd %xmm0, 0x30(%rbx,%rdx,8)
movslq %esi, %rax
andq $0x0, (%rbx,%rax,8)
xorpd %xmm5, %xmm1
movlpd %xmm1, 0x18(%rbx,%rax,8)
mulsd %xmm3, %xmm4
jmp 0x591a
cvtsi2sd %ebp, %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
movslq %r12d, %rax
movsd %xmm2, (%rbx,%rax,8)
movslq %r15d, %rcx
andq $0x0, (%rbx,%rcx,8)
movapd 0x30(%rsp), %xmm5
movapd %xmm5, %xmm2
mulsd %xmm1, %xmm2
movapd 0x20(%rsp), %xmm6
mulsd %xmm6, %xmm2
negl %ebp
cvtsi2sd %ebp, %xmm3
movsd %xmm2, 0x18(%rbx,%rax,8)
movapd 0x10(%rsp), %xmm4
mulsd %xmm4, %xmm3
mulsd %xmm0, %xmm3
movsd %xmm3, 0x18(%rbx,%rcx,8)
movapd 0x4718(%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
andq $0x0, (%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_O2/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 0x5953
jnp 0x5999
xorl %eax, %eax
cmpq $0x3, %rax
je 0x5981
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
jmp 0x5955
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x8658(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x49b0(%rip), %rdi      # 0xa35a
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
callq 0x2410
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x46a5(%rip), %xmm4     # 0xa078
jmp 0x5953
// File: /workspace/github_c_makefile_star2_O2/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), %rsi
movq %rsp, %r15
movq %r15, %rdx
callq 0x2310
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x21b0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2290
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rdx)
movq %rsi, %rdi
movq %r15, %rsi
callq 0x2340
movsd %xmm0, 0x8(%rsp)
pushq $0x3
popq %rbp
pushq $0x1
popq %r12
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x2470
movq %r15, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movl %r12d, %r8d
callq 0x2460
movsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
xorpd %xmm0, %xmm0
cmpq %rax, %rdx
je 0x5b57
movsd (%rdi,%rax,8), %xmm1
mulsd (%rsi,%rax,8), %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x5b3f
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2480
movq %rsp, %r13
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2480
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x23e0
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x2110
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2030
xorps 0x4449(%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_O2/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 0x23a0
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x23e0
movsd 0x8(%rsp), %xmm3
movapd (%r12), %xmm0
movapd 0x43f1(%rip), %xmm1     # 0xa000
xorpd %xmm0, %xmm1
movapd %xmm0, %xmm2
maxsd %xmm1, %xmm2
ucomisd %xmm3, %xmm2
ja 0x5c61
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
movapd 0x43cf(%rip), %xmm2     # 0xa000
xorpd %xmm1, %xmm2
maxsd %xmm2, %xmm1
ucomisd %xmm3, %xmm1
ja 0x5c61
movsd 0x20(%rsp), %xmm1
movapd 0x43b3(%rip), %xmm2     # 0xa000
xorpd %xmm1, %xmm2
maxsd %xmm2, %xmm1
xorl %eax, %eax
ucomisd %xmm3, %xmm1
jbe 0x5cf3
movupd %xmm0, 0x20(%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 0x43d4(%rip), %xmm5     # 0xa078
subsd %xmm4, %xmm5
divsd %xmm5, %xmm1
mulsd %xmm2, %xmm0
subsd %xmm3, %xmm0
divsd %xmm5, %xmm0
xorl %eax, %eax
cmpq $0x3, %rax
je 0x5ce2
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
jmp 0x5cba
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rbx)
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x40, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x70(%rsp), %r14
callq 0x23a0
movsd %xmm0, 0x8(%rsp)
leaq 0x90(%rsp), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x2030
movapd %xmm0, 0x10(%rsp)
pushq $0x4
popq %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x2170
movapd 0x10(%rsp), %xmm2
movapd 0x4506(%rip), %xmm1     # 0xa260
andpd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm3
ucomisd %xmm1, %xmm3
jbe 0x5d79
ucomisd %xmm0, %xmm3
jbe 0x5dbe
movl $0x1, (%r15)
jmp 0x5dc2
andl $0x0, (%r15)
xorpd 0x427b(%rip), %xmm0     # 0xa000
divsd %xmm2, %xmm0
leaq 0x20(%rsp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x2230
pushq $0x3
popq %rcx
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2220
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x18(%rbx)
jmp 0x5dc2
orl $-0x1, (%r15)
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x68fe
movl %edi, %edx
cmpl $0x1, %edi
je 0x6913
testl %edx, %edx
jne 0x6926
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
movq %rax, 0x10(%rsi)
retq
xorps %xmm0, %xmm0
movhps 0x375b(%rip), %xmm0     # xmm0 = xmm0[0,1],mem[0,1]
movups %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
retq
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rsi)
movups %xmm0, (%rsi)
movq 0x76c0(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x3a96(%rip), %rsi      # 0xa3d8
xorl %eax, %eax
jmp 0x21e0
// File: /workspace/github_c_makefile_star2_O2/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, 0x50(%rbx)
movq %rax, 0x78(%rbx)
xorps %xmm0, %xmm0
movhps 0x36f9(%rip), %xmm0     # xmm0 = xmm0[0,1],mem[0,1]
movups %xmm0, 0x20(%rbx)
andq $0x0, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x60(%rbx)
andq $0x0, 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_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdx, %rsi
callq 0x2090
xorl %eax, %eax
cmpq $0x18, %rax
je 0x6a39
movsd 0x18(%rbx,%rax,4), %xmm0
addsd (%r14,%rax), %xmm0
movsd %xmm0, 0x18(%rbx,%rax,4)
addq $0x8, %rax
jmp 0x6a1b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x50, %rsp
movq %rsi, %rbx
testl %edi, %edi
movsd %xmm3, 0x28(%rsp)
movsd %xmm2, 0x20(%rsp)
je 0x6ac6
cmpl $0x1, %edi
jne 0x6bd7
addsd %xmm5, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
jmp 0x6ad5
addsd %xmm5, %xmm0
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
movaps %xmm4, %xmm0
movsd %xmm4, 0x10(%rsp)
callq 0x2140
movaps %xmm0, 0x40(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x23b0
movaps %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
callq 0x2140
movaps %xmm0, 0x30(%rsp)
movsd (%rsp), %xmm0
callq 0x23b0
movapd 0x30(%rsp), %xmm4
movsd %xmm4, (%rbx)
movapd 0x34dd(%rip), %xmm1     # 0xa000
movapd %xmm0, %xmm2
xorpd %xmm1, %xmm2
movapd 0x40(%rsp), %xmm5
movapd %xmm5, %xmm3
movapd 0x10(%rsp), %xmm6
unpcklpd %xmm6, %xmm3            # xmm3 = xmm3[0],xmm6[0]
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm3, %xmm2
movupd %xmm2, 0x8(%rbx)
movsd %xmm0, 0x20(%rbx)
xorpd %xmm4, %xmm1
movapd %xmm4, %xmm2
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
mulpd %xmm3, %xmm2
movupd %xmm2, 0x28(%rbx)
andq $0x0, 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)
andq $0x0, 0x70(%rbx)
movsd %xmm1, 0x18(%rbx)
mulsd %xmm3, %xmm4
addsd %xmm4, %xmm2
movsd %xmm2, 0x38(%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x58(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rbx)
pushq $0x1
popq %rax
addq $0x50, %rsp
popq %rbx
retq
movq 0x741a(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x3864(%rip), %rdi      # 0xa44c
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
xorl %eax, %eax
jmp 0x6bd1
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x4
popq %rdx
movq %rbx, %rsi
callq 0x2330
movsd 0x8(%rsp), %xmm2
xorl %eax, %eax
movq %rbx, %rcx
cmpq $0x3, %rax
je 0x7876
xorpd %xmm0, %xmm0
xorl %edx, %edx
cmpq $0x3, %rdx
je 0x784c
movsd (%rcx,%rdx,8), %xmm1
mulsd (%r14,%rdx,8), %xmm1
subsd %xmm1, %xmm0
incq %rdx
jmp 0x7832
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
jmp 0x7826
andq $0x0, 0x70(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x60(%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_O2/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)
pushq $0x4
popq %rdx
movl %edx, %esi
callq 0x2450
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_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x23a0
movsd %xmm0, 0x8(%rsp)
pushq $0x4
popq %rsi
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x2420
movsd 0x8(%rsp), %xmm2
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%r15), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x7ae8
movsd 0x18(%r14), %xmm0
movsd 0x38(%r14), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x58(%r14), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm1
ucomisd %xmm1, %xmm2
jbe 0x7b04
pushq $0x4
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2450
movsd 0x256c(%rip), %xmm0     # 0xa078
divsd %xmm1, %xmm0
pushq $0x4
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl %ecx, %edx
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x2470
// File: /workspace/github_c_makefile_star2_O2/Alessandro-Barbieri[P]SpaceLib/src/SPACELIB.c
// Function: zerom
real zerom(void)
{
	real  a=(real)1., b=(real)-1;
	static real dzero= (real) -1.;

	if(dzero>(real)0.)
		return((real)dzero);
	loop:
		if (1.==b)
		{
			dzero=2*a;
			return(dzero);
		}

	a /=2.; b=a+1.;

	goto loop;
}

// Assembly:
movsd 0x6727(%rip), %xmm0     # 0xe258
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
ja 0x7b79
movsd 0x2705(%rip), %xmm3     # 0xa248
movsd 0x252d(%rip), %xmm1     # 0xa078
movsd 0x2545(%rip), %xmm2     # 0xa098
movapd %xmm1, %xmm0
ucomisd %xmm1, %xmm3
jne 0x7b5f
jnp 0x7b6d
mulsd %xmm2, %xmm0
movapd %xmm0, %xmm3
addsd %xmm1, %xmm3
jmp 0x7b57
addsd %xmm0, %xmm0
movsd %xmm0, 0x66df(%rip)     # 0xe258
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movl %edi, %ebp
pushq $0x4
popq %r15
movq %rsi, %rdi
movl %r15d, %esi
movl %r15d, %edx
callq 0x2450
movq %rbx, %rdi
movl %r15d, %esi
movl %r15d, %edx
callq 0x2450
testl %ebp, %ebp
je 0x7c90
movapd (%rsp), %xmm1
movapd 0x10(%rsp), %xmm0
cmpl $0x1, %ebp
jne 0x7ce0
movsd %xmm1, 0x58(%r14)
movsd %xmm0, 0x58(%rbx)
jmp 0x7cd2
movapd (%rsp), %xmm2
movsd %xmm2, 0x20(%r14)
movapd 0x235d(%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)
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x6311(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x277f(%rip), %rdi      # 0xa470
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
xorl %eax, %eax
jmp 0x7cd5
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x20, %rsp
cmpl $0x3, %esi
jae 0x7dfe
movl %edi, %ebp
cmpl $0x2, %edi
jae 0x7e13
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r15d
movapd %xmm1, (%rsp)
movaps %xmm0, 0x10(%rsp)
pushq $0x4
popq %r12
movq %rdx, %rdi
movl %r12d, %esi
movl %r12d, %edx
callq 0x2450
movq %rbx, %rdi
movl %r12d, %esi
movl %r12d, %edx
callq 0x2450
cmpl $0x1, %ebp
jne 0x7d78
movl %r15d, %eax
shlq $0x5, %rax
movaps 0x10(%rsp), %xmm0
movsd %xmm0, 0x18(%r14,%rax)
movapd (%rsp), %xmm0
movsd %xmm0, 0x18(%rbx,%rax)
jmp 0x7dee
movl %r15d, %ecx
subl $0x1, %ecx
pushq $0x2
popq %rax
cmovael %ecx, %eax
leal 0x1(%r15), %ecx
xorl %edx, %edx
cmpl $0x2, %r15d
cmovnel %ecx, %edx
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%r14,%rcx), %rsi
movapd 0x10(%rsp), %xmm2
movsd %xmm2, (%rsi,%rdx,8)
movapd 0x2251(%rip), %xmm0     # 0xa000
movapd %xmm2, %xmm1
xorpd %xmm0, %xmm1
movq %rdx, %rsi
shlq $0x5, %rsi
addq %rsi, %r14
movlpd %xmm1, (%r14,%rax,8)
addq %rbx, %rcx
movapd (%rsp), %xmm3
movsd %xmm3, (%rcx,%rdx,8)
xorpd %xmm0, %xmm3
addq %rbx, %rsi
movlpd %xmm3, (%rsi,%rax,8)
mulsd %xmm2, %xmm1
movsd %xmm1, (%rcx,%rax,8)
movsd %xmm1, (%rsi,%rdx,8)
pushq $0x1
popq %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x61f3(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x268a(%rip), %rdi      # 0xa499
pushq $0x22
jmp 0x7e26
movq 0x61de(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x2698(%rip), %rdi      # 0xa4bc
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x2410
xorl %eax, %eax
jmp 0x7df1