// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/McLachlan_float.c
// Function: matfit
short matfit(float    *x1,        /* First coord array    */
             float    *x2,        /* Second coord array   */
             double    rm[3][3],   /* Rotation matrix      */
             int       n,          /* Number of points     */
             float    *wt1,       /* Weight array         */
             short     column)     /* Column-wise output   */
{
   int  i,j,m=0;
   double umat[3][3];


   if(n<2){return(0);}

   if(wt1){
     for(i=0;i<3;i++){
       for(j=0;j<3;j++) umat[i][j] = 0.0;
       m=0;
       for(j=0;j<n;j++){
	 switch(i){
	 case 0:
	   umat[i][0] += wt1[j] * x1[m] * x2[m];
	   umat[i][1] += wt1[j] * x1[m] * x2[m+1];
	   umat[i][2] += wt1[j] * x1[m] * x2[m+2];
	   break;
	 case 1:
	   umat[i][0] += wt1[j] * x1[m+1] * x2[m];
	   umat[i][1] += wt1[j] * x1[m+1] * x2[m+1];
	   umat[i][2] += wt1[j] * x1[m+1] * x2[m+2];
	   break;
	 case 2:
	   umat[i][0] += wt1[j] * x1[m+2] * x2[m];
	   umat[i][1] += wt1[j] * x1[m+2] * x2[m+1];
	   umat[i][2] += wt1[j] * x1[m+2] * x2[m+2];
	   break;
	 }
	 m+=3;
       }
     }
   }else{
     for(i=0;i<3;i++){
       for(j=0;j<3;j++) umat[i][j] = 0.0;
       for(j=0;j<n;j++){
	 switch(i){
	 case 0:
	   umat[i][0] += x1[m] * x2[m];
	   umat[i][1] += x1[m] * x2[m+1];
	   umat[i][2] += x1[m] * x2[m+2];
	   break;
	 case 1:
	   umat[i][0] += x1[m+1] * x2[m];
	   umat[i][1] += x1[m+1] * x2[m+1];
	   umat[i][2] += x1[m+1] * x2[m+2];
	   break;
	 case 2:
	   umat[i][0] += x1[m+2] * x2[m];
	   umat[i][1] += x1[m+2] * x2[m+1];
	   umat[i][2] += x1[m+2] * x2[m+2];
	   break;
	 }
	 m+=3;
       }
     }
   }
   qikfit(umat,rm,column);

   return(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movw %r9w, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movw %ax, -0x32(%rbp)
movl $0x0, -0x40(%rbp)
cmpl $0x2, -0x24(%rbp)
jge 0x70f7e
movw $0x0, -0x2(%rbp)
jmp 0x71624
cmpq $0x0, -0x30(%rbp)
je 0x71309
movl $0x0, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x71304
movl $0x0, -0x3c(%rbp)
cmpl $0x3, -0x3c(%rbp)
jge 0x70fd0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x70fa1
movl $0x0, -0x40(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x712f4
movl -0x38(%rbp), %eax
movl %eax, -0x94(%rbp)
testl %eax, %eax
je 0x7101e
jmp 0x70ff9
movl -0x94(%rbp), %eax
subl $0x1, %eax
je 0x71100
jmp 0x7100a
movl -0x94(%rbp), %eax
subl $0x2, %eax
je 0x711f1
jmp 0x712dd
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0x712dd
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0x712dd
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
movl -0x40(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x70fde
jmp 0x712f6
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x70f90
jmp 0x7160a
movl $0x0, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x71608
movl $0x0, -0x3c(%rbp)
cmpl $0x3, -0x3c(%rbp)
jge 0x71350
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x3c(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x71321
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x715f8
movl -0x38(%rbp), %eax
movl %eax, -0x98(%rbp)
testl %eax, %eax
je 0x71397
jmp 0x71372
movl -0x98(%rbp), %eax
subl $0x1, %eax
je 0x71452
jmp 0x71383
movl -0x98(%rbp), %eax
subl $0x2, %eax
je 0x7151c
jmp 0x715e1
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0x715e1
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0x715e1
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x38(%rbp), %rcx
leaq -0x90(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
movl -0x40(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x71357
jmp 0x715fa
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x71310
jmp 0x7160a
leaq -0x90(%rbp), %rdi
movq -0x20(%rbp), %rsi
movswl -0x32(%rbp), %edx
callq 0x71830
movw $0x1, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)