// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jge 0xce08
movl $0x0, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jge 0xcdf8
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x3, -0x24(%rbp)
jge 0xcdcd
movl $0x0, -0x28(%rbp)
cmpl $0x3, -0x28(%rbp)
jge 0xcdbd
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x28(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xcd52
jmp 0xcdbf
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xcd41
movsd -0x30(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xcd28
jmp 0xcdfa
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xcd17
movl $0x0, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jge 0xce8d
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jge 0xce73
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xce24
movsd -0x30(%rbp), %xmm0
movslq -0x1c(%rbp), %rax
movsd %xmm0, -0x50(%rbp,%rax,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xce0f
movl $0x0, -0x1c(%rbp)
cmpl $0x3, -0x1c(%rbp)
jge 0xcf70
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x3, -0x20(%rbp)
jge 0xcf49
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq -0x20(%rbp), %rax
movsd -0x50(%rbp,%rax,8), %xmm1
movq -0x8(%rbp), %rax
movsd 0x78(%rax), %xmm2
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd 0x18(%rax), %xmm3
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movq -0x8(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
addsd 0x18(%rax), %xmm2
movsd -0x30(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xcead
movsd -0x30(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x18(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xce94
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x70(%rax)
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x68(%rax)
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rax)
movq -0x8(%rbp), %rax
movsd 0x78(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x78(%rax)
popq %rbp
retq
nopl (%rax,%rax)