// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/matrix.c
// Function: svdcmp
matrix svdcmp(matrix a, int m, int n, double* w)
{
/*Given a matrix a[1..m][1..n], this routine computes its singular value decomposition, A = UWV T. Thematrix U replaces a on output. The diagonal matrix of singular values W is output as a vector w[1..n]. Thematrix V (not the transpose V T ) is output as v[1..n][1..n].*/
 int flag, i, its, j, jj, k, l, nm;
 double anorm, c, f, g, h, s, scale, x, y, z, *rv1, tmp;
	matrix v;
 rv1 = safemalloc(n * sizeof(double), "svdcmp", 4);
	v = matrix_alloc(n, n);
 g = 0.0;
	scale = 0.0;
	anorm = 0.0; 
 for (i = 1; i <= n; i++) 
	 {
   l = i + 1;
   rv1[i - 1] = scale * g;
   g = 0.0;
			s = 0.0;
			scale = 0.0;
   if (i <= m) 
			 {
     for (k = i; k <= m; k++) 
						 scale += fabs(a.values[k - 1][i - 1]);
     if (scale) 
					 {
       for (k = i; k <= m; k++) 
							 {
         a.values[k - 1][i - 1] /= scale;
         s += a.values[k - 1][i - 1] * a.values[k - 1][i - 1];
						  }
       f = a.values[i - 1][i - 1];
       g = change_sign(sqrt(s), f);
       h = f * g - s;
       a.values[i - 1][i - 1] = f - g;
       for (j = l; j <= n; j++) 
							 {
         for (s = 0.0, k = i; k <= m; k++) 
										 s += a.values[k - 1][i - 1]*a.values[k - 1][j - 1];
         f = s / h;
         for (k = i; k <= m; k++) 
										 a.values[k - 1][j - 1] += f*a.values[k - 1][i - 1];
							 }
       for (k = i; k <= m; k++) 
								 a.values[k - 1][i - 1] *= scale;
					 }
			 }
   w[i - 1] = scale * g;
   g = 0.0;
			s = 0.0;
			scale = 0.0;
   if (i <= m && i != n) 
			 {
     for (k = l; k <= n; k++) 
						 scale += fabs(a.values[i - 1][k - 1]);
     if (scale) 
					 {
       for (k = l; k <= n; k++) 
							 {
         a.values[i - 1][k - 1] /= scale;
         s += a.values[i - 1][k - 1] * a.values[i - 1][k - 1];
						  }
       f = a.values[i - 1][l - 1];
       g = -change_sign(sqrt(s), f);
       h = f * g - s;
       a.values[i - 1][l - 1] = f - g;
       for (k = l; k <= n; k++) 
								 rv1[k - 1] = a.values[i - 1][k - 1] / h;
       for (j = l; j <= m; j++) 
							 {
         for (s = 0.0, k = l; k <= n; k++) 
										 s += a.values[j - 1][k - 1] * a.values[i - 1][k - 1];
         for (k = l; k <= n; k++) 
										 a.values[j - 1][k - 1] += s * rv1[k - 1];
							 }
       for (k = l; k <= n; k++) 
								 a.values[i - 1][k - 1] *= scale;
					 }
			 }
   anorm = fmax(anorm, (fabs(w[i - 1]) + fabs(rv1[i - 1])));
	 }
 for (i = n; i >= 1; i--) 
	 { 
   if (i < n) 
			 {
     if (g) 
					 {
       for (j = l; j <= n; j++) 
         v.values[j - 1][i - 1] = (a.values[i - 1][j - 1] / a.values[i - 1][l - 1]) / g;
       for (j = l; j <= n; j++) 
							 {
         for (s = 0.0, k = l; k <= n; k++) 
										 s += a.values[i - 1][k - 1] * v.values[k - 1][j - 1];
         for (k = l; k <= n; k++) 
										 v.values[k - 1][j - 1] += s * v.values[k - 1][i - 1];
							 }
					 }
     for (j = l; j <= n; j++) 
					 {
						 v.values[i - 1][j - 1] = 0.0;
							v.values[j - 1][i - 1] = 0.0;
					 }
			 }
   v.values[i - 1][i - 1] = 1.0;
   g = rv1[i - 1];
   l = i;
	 }
 for (i = imin(m, n); i >= 1; i--) 
	 { 
   l = i + 1;
   g = w[i - 1];
   for (j = l; j <= n; j++) 
				 a.values[i - 1][j - 1] = 0.0;
   if (g) 
			 {
     g = 1.0 / g;
     for (j = l; j <= n; j++) 
					 {
       for (s = 0.0, k = l; k <= m; k++) 
								 s += a.values[k - 1][i - 1] * a.values[k - 1][j - 1];
       f = (s / a.values[i - 1][i - 1]) * g;
       for (k = i; k <= m; k++) 
								 a.values[k - 1][j - 1] += f * a.values[k - 1][i - 1];
					 }
     for (j = i; j <= m; j++) 
						 a.values[j - 1][i - 1] *= g;
			 } 
		 else 
				 for (j = i; j <= m; j++) 
						 a.values[j - 1][i - 1] = 0.0;
   ++(a.values[i - 1][i - 1]);
	 }
 for (k = n; k >= 1; k--) 
	 {  
		 for (its = 1; its <= 30; its++) 
			 {
     flag = 1;
     for (l = k; l >= 1; l--) 
					 { 
       nm = l - 1; 
       if ((double)(fabs(rv1[l - 1]) + anorm) == anorm) 
							 {
         flag = 0;
         break;
							 }
       if ((double)(fabs(w[nm - 1]) + anorm) == anorm) 
								 break;
					 }
     if (flag) 
					 {
       c = 0.0; 
       s = 1.0;
       for (i = l; i <= k; i++) 
							 {
         f = s * rv1[i - 1];
         rv1[i - 1] = c * rv1[i - 1];
         if ((double)(fabs(f) + anorm) == anorm) 
										 break;
         g = w[i - 1];
         h = pythag(f,g);
         w[i - 1] = h;
         h = 1.0 / h;
         c = g * h;
         s = -f * h;
         for (j = 1; j <= m; j++) 
									 {
           y = a.values[j - 1][nm - 1];
           z = a.values[j - 1][i - 1];
           a.values[j - 1][nm - 1] = y * c + z * s;
           a.values[j - 1][i - 1] = z * c - y * s;
									 }
							 }
					 }
     z = w[k - 1];
     if (l == k) 
					 { 
       if (z < 0.0) 
							 {
         w[k - 1] = -z;
         for (j = 1; j <= n; j++) 
										 v.values[j - 1][k - 1] = -v.values[j - 1][k - 1];
							 }
       break;
					 }
     if (its == 30) 
						 printf(m1304);
     x = w[l - 1]; 
     nm = k - 1;
     y = w[nm - 1];
     g = rv1[nm - 1];
     h = rv1[k - 1];
     f = ((y - z) * (y + z) + (g - h) * (g + h)) / (2.0 * h * y);
     g = pythag(f, 1.0);
     f = ((x - z) * (x + z) + h * ((y / ( f + change_sign(g, f))) - h)) / x;
     c = 1.0; 
					s = 1.0; 
     for (j=l;j<=nm;j++) 
					 {
       i = j + 1;
       g = rv1[i - 1];
       y = w[i - 1];
       h = s * g;
       g = c * g;
       z = pythag(f, h);
       rv1[j - 1] = z;
       c = f / z;
       s = h / z;
       f = x * c + g * s;
       g = g * c - x * s;
       h = y * s;
       y *= c;
       for (jj = 1; jj <= n; jj++) 
							 {
         x = v.values[jj - 1][j - 1];
         z = v.values[jj - 1][i - 1];
         v.values[jj - 1][j - 1] = x * c + z * s;
         v.values[jj - 1][i - 1] = z * c - x * s;
							 }
       z = pythag(f, h);
       w[j - 1] = z; 
       if (z) 
							 {
         z = 1.0 / z;
         c = f * z;
         s = h * z;
							 }
       f = c * g + s * y;
       x = c * y - s * g;
       for (jj = 1; jj <= m; jj++) 
							 {
         y = a.values[jj - 1][j - 1];
         z = a.values[jj - 1][i - 1];
         a.values[jj - 1][j - 1] = y * c + z * s;
         a.values[jj - 1][i - 1] = z * c - y * s;
							 }
					 }
     rv1[l - 1] = 0.0;
     rv1[k - 1] = f;
     w[k - 1] = x;
    }
  }
 safe_free(rv1);
	for (i = 0; i < n; i++)
		 for (j = i + 1; j < n; j++)
				 if (w[i] < w[j])
					 {
       tmp = w[i];
						 w[i] = w[j];
							w[j] = tmp;
						 matrix_exchange_columns(a, i, j);
						 matrix_exchange_columns(v, i, j);
					 }
 return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, 0x10(%rsp)
movl %ecx, %r14d
movl %edx, %r15d
movq %rsi, %r13
movq %rdi, 0xf0(%rsp)
movslq %ecx, %rbx
leaq (,%rbx,8), %rdi
leaq 0x6c49d(%rip), %rsi     # 0xaa03a
movl $0x4, %edx
callq 0x3a0e1
movq %rax, %r12
leaq 0x6c3bb(%rip), %r8      # 0xa9f6c
movl $0x8, %edi
movl $0x8, %esi
movl %ebx, %edx
movl %ebx, %ecx
movl $0x3, %r9d
callq 0x3a231
movl %ebx, %ebp
movslq %r15d, %r11
movq %rbx, 0x20(%rsp)
testl %ebx, %ebx
movq %rax, 0x30(%rsp)
movq %r14, 0x70(%rsp)
movq %r15, 0xa8(%rsp)
movq %r12, 0x38(%rsp)
movq %r11, 0x8(%rsp)
jle 0x3e2fe
leal 0x1(%r15), %ecx
leal 0x1(%r14), %edx
movl %edx, 0x60(%rsp)
leal 0x2(%r14), %edi
movq %rcx, 0xb0(%rsp)
leaq -0x1(%rcx), %rbx
movq %r12, %rcx
addq $-0x8, %rcx
movq %rcx, 0xf8(%rsp)
leal -0x1(%r14), %r9d
movl $0x1, %r15d
movl $0x2, %r14d
xorl %r8d, %r8d
movapd 0x685a2(%rip), %xmm4    # 0xa61e0
movapd 0x6859a(%rip), %xmm5    # 0xa61e0
movq %rbp, %rdx
movq %r12, %rcx
movq %r13, %r12
xorpd %xmm7, %xmm7
xorpd %xmm6, %xmm6
xorpd %xmm3, %xmm3
movq 0x10(%rsp), %rsi
movq %rdi, 0xd0(%rsp)
mulsd %xmm6, %xmm7
leaq -0x1(%r15), %r10
movsd %xmm7, -0x8(%rcx,%r15,8)
cmpq %r11, %r15
jle 0x3dc90
leaq (%rsi,%r10,8), %rcx
movq $0x0, (%rcx)
xorpd %xmm6, %xmm6
jmp 0x3df4c
movq %r10, 0x28(%rsp)
movq %rdx, 0x80(%rsp)
movslq %r14d, %rdx
movq 0xf8(%rsp), %rcx
leaq (%rcx,%rdx,8), %rcx
movq %rcx, 0x18(%rsp)
shlq $0x3, %rdx
movq %rdx, 0x90(%rsp)
xorpd %xmm2, %xmm2
xorl %edx, %edx
movq (%r12,%rdx,8), %rcx
movsd -0x8(%rcx,%r15,8), %xmm0
andpd %xmm5, %xmm0
addsd %xmm0, %xmm2
incq %rdx
cmpq %rdx, %rbx
jne 0x3dcc3
xorpd %xmm6, %xmm6
ucomisd %xmm6, %xmm2
xorpd %xmm0, %xmm0
movq %r9, 0x40(%rsp)
jne 0x3dcf7
jnp 0x3de5c
xorl %eax, %eax
movq (%r12,%rax,8), %rcx
movsd -0x8(%rcx,%r15,8), %xmm1
divsd %xmm2, %xmm1
movsd %xmm1, -0x8(%rcx,%r15,8)
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq %rax, %rbx
jne 0x3dcf9
movq %r8, 0x78(%rsp)
movsd %xmm3, 0x58(%rsp)
movq -0x8(%r13,%r15,8), %rax
movsd -0x8(%rax,%r15,8), %xmm1
ucomisd 0x67fca(%rip), %xmm0    # 0xa5d08
movsd %xmm2, 0xe0(%rsp)
movsd %xmm1, 0x50(%rsp)
movsd %xmm0, 0xd8(%rsp)
jb 0x3dd5e
sqrtsd %xmm0, %xmm0
jmp 0x3dd69
callq 0x4300
movsd 0x50(%rsp), %xmm1
callq 0x39a88
movsd 0x50(%rsp), %xmm7
movapd %xmm7, %xmm1
subsd %xmm0, %xmm1
movq -0x8(%r13,%r15,8), %rax
movsd %xmm1, -0x8(%rax,%r15,8)
cmpq 0x20(%rsp), %r15
movq 0x30(%rsp), %rax
movq 0x10(%rsp), %rsi
movsd 0x58(%rsp), %xmm3
movq 0x8(%rsp), %r11
movl 0x60(%rsp), %r8d
movq 0x40(%rsp), %r9
movapd 0x6842c(%rip), %xmm4    # 0xa61e0
movapd 0x68424(%rip), %xmm5    # 0xa61e0
xorpd %xmm6, %xmm6
jge 0x3de26
mulsd %xmm0, %xmm7
subsd 0xd8(%rsp), %xmm7
movq %r14, %rdi
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
movq (%r12,%rcx,8), %rdx
movsd -0x8(%rdx,%r15,8), %xmm2
mulsd -0x8(%rdx,%rdi,8), %xmm2
addsd %xmm2, %xmm1
incq %rcx
cmpq %rcx, %rbx
jne 0x3ddd8
divsd %xmm7, %xmm1
xorl %ecx, %ecx
movq (%r12,%rcx,8), %rdx
movsd -0x8(%rdx,%r15,8), %xmm2
mulsd %xmm1, %xmm2
addsd -0x8(%rdx,%rdi,8), %xmm2
movsd %xmm2, -0x8(%rdx,%rdi,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x3ddfb
incq %rdi
cmpl %edi, %r8d
jne 0x3ddd2
xorl %edx, %edx
movsd 0xe0(%rsp), %xmm2
movq (%r12,%rdx,8), %rcx
movsd -0x8(%rcx,%r15,8), %xmm1
mulsd %xmm2, %xmm1
movsd %xmm1, -0x8(%rcx,%r15,8)
incq %rdx
cmpq %rdx, %rbx
jne 0x3de31
movq 0xd0(%rsp), %rdi
movq 0x78(%rsp), %r8
mulsd %xmm0, %xmm2
movq 0x28(%rsp), %rcx
leaq (%rsi,%rcx,8), %rcx
movsd %xmm2, -0x8(%rsi,%r15,8)
cmpq %rbp, %r15
movq 0x80(%rsp), %rdx
je 0x3df4c
cmpq 0x20(%rsp), %r15
jge 0x3df4c
movq %rcx, 0x28(%rsp)
movq %r11, %r10
movq %rdx, %r11
movq -0x8(%r13,%r15,8), %rdx
addq %r8, %rdx
xorpd %xmm7, %xmm7
movl $0x1, %ecx
movsd (%rdx,%rcx,8), %xmm0
andpd %xmm5, %xmm0
addsd %xmm0, %xmm7
incq %rcx
cmpl %ecx, %r11d
jne 0x3dea8
xorpd %xmm6, %xmm6
ucomisd %xmm6, %xmm7
jne 0x3decd
jnp 0x3dfb2
movq -0x8(%r13,%r15,8), %rax
xorpd %xmm0, %xmm0
cmpq 0x20(%rsp), %r15
movq 0x80(%rsp), %rsi
jge 0x3df0b
leaq (%rax,%r8), %rcx
movl $0x1, %edx
movsd (%rcx,%rdx,8), %xmm1
divsd %xmm7, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
cmpl %edx, %esi
jne 0x3deee
movsd %xmm3, 0x58(%rsp)
movsd (%rax,%r15,8), %xmm1
ucomisd 0x67de9(%rip), %xmm0    # 0xa5d08
movq %r14, 0xc8(%rsp)
movq %r8, 0x78(%rsp)
movapd %xmm7, 0xe0(%rsp)
movsd %xmm0, 0xd8(%rsp)
movsd %xmm1, 0x50(%rsp)
jb 0x3dfc2
sqrtsd %xmm0, %xmm0
jmp 0x3dfc7
xorpd %xmm7, %xmm7
movsd (%rcx), %xmm0
andpd %xmm4, %xmm0
movq 0x38(%rsp), %rcx
movsd -0x8(%rcx,%r15,8), %xmm1
incq %r15
andpd %xmm4, %xmm1
addsd %xmm0, %xmm1
movapd %xmm3, %xmm0
cmpunordsd %xmm3, %xmm0
movapd %xmm0, %xmm2
andpd %xmm1, %xmm2
maxsd %xmm3, %xmm1
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
movapd %xmm0, %xmm3
incq %r14
addq $0x8, %r12
decq %rbx
addq $0x8, %r8
decq %rdx
decq %r9
cmpq %rdi, %r14
jne 0x3dc68
jmp 0x3e195
movq %r10, %r11
movq 0x80(%rsp), %rdx
jmp 0x3e18b
callq 0x4300
movsd 0x50(%rsp), %xmm1
callq 0x39a88
movsd 0x50(%rsp), %xmm1
movapd %xmm0, %xmm6
movapd %xmm1, %xmm0
addsd %xmm6, %xmm0
xorpd 0x681e4(%rip), %xmm6    # 0xa61d0
movq -0x8(%r13,%r15,8), %r8
movsd %xmm0, (%r8,%r15,8)
cmpq 0x20(%rsp), %r15
movq 0x40(%rsp), %rax
movq 0x18(%rsp), %rsi
jge 0x3e03b
mulsd %xmm6, %xmm1
subsd 0xd8(%rsp), %xmm1
movq 0x90(%rsp), %rcx
addq %r8, %rcx
addq $-0x8, %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rsi,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x3e026
cmpq 0x8(%rsp), %r15
movq 0x30(%rsp), %rax
movq 0x10(%rsp), %rsi
movsd 0x58(%rsp), %xmm3
movapd 0x68188(%rip), %xmm4    # 0xa61e0
movapd 0x68180(%rip), %xmm5    # 0xa61e0
movapd 0xe0(%rsp), %xmm7
jge 0x3e113
movq 0x90(%rsp), %rcx
addq %r8, %rcx
addq $-0x8, %rcx
movq 0xc8(%rsp), %rdx
cmpq 0x20(%rsp), %r15
movq 0x40(%rsp), %r14
jge 0x3e103
movq -0x8(%r13,%rdx,8), %rdi
movq 0x90(%rsp), %r9
addq %rdi, %r9
addq $-0x8, %r9
xorpd %xmm0, %xmm0
xorl %edi, %edi
movsd (%r9,%rdi,8), %xmm1
mulsd (%rcx,%rdi,8), %xmm1
addsd %xmm1, %xmm0
incq %rdi
cmpl %edi, %r14d
jne 0x3e0ac
cmpq 0x20(%rsp), %r15
movq 0x18(%rsp), %r11
jge 0x3e103
movq -0x8(%r13,%rdx,8), %rdi
movq 0x90(%rsp), %r9
addq %rdi, %r9
addq $-0x8, %r9
xorl %edi, %edi
movsd (%r11,%rdi,8), %xmm1
mulsd %xmm0, %xmm1
addsd (%r9,%rdi,8), %xmm1
movsd %xmm1, (%r9,%rdi,8)
incq %rdi
cmpl %edi, %r14d
jne 0x3e0e5
incq %rdx
cmpl %edx, 0xb0(%rsp)
jne 0x3e086
cmpq 0x20(%rsp), %r15
jge 0x3e164
addq 0x78(%rsp), %r8
movl $0x1, %ecx
movq 0xd0(%rsp), %rdi
movq 0x40(%rsp), %r9
movq 0x80(%rsp), %rdx
movq 0x8(%rsp), %r11
movsd (%r8,%rcx,8), %xmm0
mulsd %xmm7, %xmm0
movsd %xmm0, (%r8,%rcx,8)
incq %rcx
cmpl %ecx, %edx
jne 0x3e13e
movq 0xc8(%rsp), %r14
movq 0x78(%rsp), %r8
jmp 0x3e18b
movq 0xd0(%rsp), %rdi
movq 0x40(%rsp), %r9
movq 0xc8(%rsp), %r14
movq 0x78(%rsp), %r8
movq 0x80(%rsp), %rdx
movq 0x8(%rsp), %r11
movq 0x28(%rsp), %rcx
jmp 0x3df50
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rbp, %rdi
movq 0x70(%rsp), %rsi
movq %r15, %rdx
movq %rdi, %r15
cmpq 0x20(%rsp), %rdi
jge 0x3e2ca
ucomisd %xmm0, %xmm6
jne 0x3e1cb
jnp 0x3e288
movq 0x70(%rsp), %rsi
subl %edx, %esi
jl 0x3e288
movq -0x8(%r13,%r15,8), %r9
movslq %edx, %rdi
leaq (%r9,%rdi,8), %r10
movq 0x30(%rsp), %rax
leaq (%rax,%rdi,8), %r8
movq $-0x1, %r11
movsd (%r10,%r11,8), %xmm1
divsd -0x8(%r9,%rdi,8), %xmm1
divsd %xmm6, %xmm1
movq (%r8,%r11,8), %rbx
movsd %xmm1, -0x8(%rbx,%r15,8)
incq %r11
cmpl %r11d, %esi
jne 0x3e1f4
cmpl %edx, 0x70(%rsp)
jl 0x3e288
movslq %edx, %r9
shlq $0x3, %rdi
addq -0x8(%r13,%r15,8), %rdi
xorpd %xmm1, %xmm1
movq $-0x1, %r10
movsd (%rdi,%r10,8), %xmm2
movq (%r8,%r10,8), %r11
mulsd -0x8(%r11,%r9,8), %xmm2
addsd %xmm2, %xmm1
incq %r10
cmpl %r10d, %esi
jne 0x3e235
movq $-0x1, %r10
movq (%r8,%r10,8), %r11
movsd -0x8(%r11,%r15,8), %xmm2
mulsd %xmm1, %xmm2
addsd -0x8(%r11,%r9,8), %xmm2
movsd %xmm2, -0x8(%r11,%r9,8)
incq %r10
cmpl %r10d, %esi
jne 0x3e259
incq %r9
cmpl %r9d, 0x60(%rsp)
jne 0x3e22a
movq 0x70(%rsp), %rsi
movl %esi, %r10d
subl %edx, %r10d
movq 0x30(%rsp), %rax
jl 0x3e2ca
movslq %edx, %rdi
leaq (,%rdi,8), %rdx
addq -0x8(%rax,%r15,8), %rdx
leaq (%rax,%rdi,8), %rdi
movq $-0x1, %r8
movq %r12, (%rdx,%r8,8)
movq (%rdi,%r8,8), %r9
movq %r12, -0x8(%r9,%r15,8)
incq %r8
cmpl %r8d, %r10d
jne 0x3e2b5
leaq -0x1(%r15), %rdi
movq -0x8(%rax,%r15,8), %rdx
movq %rcx, -0x8(%rdx,%r15,8)
movq 0x38(%rsp), %rdx
movsd -0x8(%rdx,%r15,8), %xmm6
cmpq $0x1, %r15
jg 0x3e1ae
movsd %xmm3, 0x58(%rsp)
movq 0xa8(%rsp), %r15
jmp 0x3e30b
xorpd %xmm0, %xmm0
movsd %xmm0, 0x58(%rsp)
movq %r14, %rsi
movl %r15d, %edi
callq 0x39b49
movq 0xa8(%rsp), %r8
movq 0x70(%rsp), %rdi
testl %eax, %eax
movq 0x10(%rsp), %r9
movq 0x8(%rsp), %r10
jle 0x3e541
movq %rax, %rcx
movl %ecx, %r15d
leaq 0x1(%r15), %r11
leaq 0x8(,%r15,8), %rax
addq $-0x8, %rax
movq %rax, 0x28(%rsp)
notl %ecx
addl %edi, %ecx
movq %rcx, 0x18(%rsp)
leaq (,%r15,8), %rdx
addq %r13, %rdx
xorl %r14d, %r14d
xorpd %xmm3, %xmm3
movsd 0x671b0(%rip), %xmm4    # 0xa5520
movq %rdx, %r12
movq %r15, 0x40(%rsp)
movq %r15, %rbx
decq %r15
movsd -0x8(%r9,%rbx,8), %xmm1
cmpq 0x20(%rsp), %rbx
jge 0x3e4b3
movq 0x18(%rsp), %rax
addl %r14d, %eax
movq %rdx, 0x60(%rsp)
leaq 0x8(,%rax,8), %rdx
leaq (,%r14,8), %rax
movq 0x28(%rsp), %rdi
subq %rax, %rdi
addq (%r13,%r15,8), %rdi
xorl %esi, %esi
movq %r11, 0x90(%rsp)
movsd %xmm1, 0xb0(%rsp)
callq 0x4050
movsd 0xb0(%rsp), %xmm1
movsd 0x6713d(%rip), %xmm4    # 0xa5520
xorpd %xmm3, %xmm3
movq 0x60(%rsp), %rdx
movq 0x90(%rsp), %r11
movq 0x8(%rsp), %r10
movq 0x10(%rsp), %r9
movq 0xa8(%rsp), %r8
movq 0x70(%rsp), %rdi
ucomisd %xmm3, %xmm1
jne 0x3e417
jnp 0x3e4f0
movq %r14, 0x80(%rsp)
movapd %xmm4, %xmm0
divsd %xmm1, %xmm0
movq (%r13,%r15,8), %rax
movq %r11, %rcx
xorpd %xmm1, %xmm1
cmpq %r10, %rbx
movq 0x60(%rsp), %r14
jge 0x3e45e
xorl %edx, %edx
movq (%r14,%rdx,8), %rsi
movsd (%rsi,%r15,8), %xmm2
mulsd -0x8(%rsi,%rcx,8), %xmm2
addsd %xmm2, %xmm1
incq %rdx
leal (%rbx,%rdx), %esi
cmpl %r8d, %esi
jl 0x3e43f
cmpq %r10, %rbx
jg 0x3e499
divsd (%rax,%r15,8), %xmm1
mulsd %xmm0, %xmm1
movq $-0x1, %rdx
movq (%r12,%rdx,8), %rsi
movsd (%rsi,%r15,8), %xmm2
mulsd %xmm1, %xmm2
addsd -0x8(%rsi,%rcx,8), %xmm2
movsd %xmm2, -0x8(%rsi,%rcx,8)
incq %rdx
leal (%rbx,%rdx), %esi
cmpl %r8d, %esi
jl 0x3e474
leaq 0x1(%rcx), %rdx
cmpl %edi, %ecx
movq %rdx, %rcx
jl 0x3e42f
movq 0x60(%rsp), %rdx
movq 0x80(%rsp), %r14
jmp 0x3e4c3
ucomisd %xmm3, %xmm1
jne 0x3e4bb
jnp 0x3e4f0
movapd %xmm4, %xmm0
divsd %xmm1, %xmm0
cmpq %r10, %rbx
jg 0x3e513
movq $-0x1, %rax
movq (%r12,%rax,8), %rcx
movsd (%rcx,%r15,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%r15,8)
incq %rax
leal (%rax,%rbx), %ecx
cmpl %r8d, %ecx
jl 0x3e4cf
jmp 0x3e513
cmpq %r10, %rbx
jg 0x3e513
movq $-0x1, %rax
movq (%r12,%rax,8), %rcx
movq $0x0, (%rcx,%r15,8)
incq %rax
leal (%rax,%rbx), %ecx
cmpl %r8d, %ecx
jl 0x3e4fc
movq (%r13,%r15,8), %rax
movsd (%rax,%r15,8), %xmm0
addsd %xmm4, %xmm0
movsd %xmm0, (%rax,%r15,8)
incq %r14
decq %r11
addq $-0x8, %r12
addq $-0x8, %rdx
cmpq 0x40(%rsp), %r14
jne 0x3e378
testl %edi, %edi
jle 0x3ec72
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
leal 0x1(%r8), %r15d
leaq -0x1(%rbp), %rcx
movq %rcx, 0x50(%rsp)
movq %rbp, %rcx
shlq $0x20, %rcx
addq %rax, %rcx
movq %rcx, 0xe0(%rsp)
decq %r15
movapd 0x67c63(%rip), %xmm2    # 0xa61e0
movapd 0x67c4b(%rip), %xmm5    # 0xa61d0
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdx
movsd 0x58(%rsp), %xmm1
movq %r13, 0x100(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
decq %rax
movq %rax, 0x8(%rsp)
movl $0x1, 0x28(%rsp)
movq 0xe0(%rsp), %rcx
movq 0x50(%rsp), %rax
movq 0x18(%rsp), %r14
movq %rcx, %rbx
movl %eax, %ecx
movq 0x38(%rsp), %r12
movsd (%r12,%rcx,8), %xmm0
andpd %xmm2, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm1, %xmm0
jne 0x3e5f2
jnp 0x3e75c
movq 0x10(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm0
andpd %xmm2, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm1, %xmm0
jne 0x3e60d
jnp 0x3e62c
leal -0x1(%r14), %r12d
decq %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rbx, %rcx
cmpl $0x2, %r14d
movl %r12d, %r14d
jge 0x3e5ce
jmp 0x3e62f
movl %r14d, %r12d
movslq %r12d, %r14
cmpq %r14, 0x18(%rsp)
jl 0x3e754
sarq $0x1d, %rbx
xorpd %xmm6, %xmm6
movsd 0x66ed3(%rip), %xmm4    # 0xa5520
movq 0x38(%rsp), %rax
movsd -0x8(%rax,%r14,8), %xmm0
mulsd %xmm0, %xmm4
mulsd %xmm0, %xmm6
movsd %xmm6, -0x8(%rax,%r14,8)
movapd %xmm4, %xmm0
andpd %xmm2, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm1, %xmm0
jne 0x3e680
jnp 0x3e754
movq 0x10(%rsp), %r13
movsd -0x8(%r13,%r14,8), %xmm1
movsd %xmm1, 0x40(%rsp)
movapd %xmm4, %xmm0
movapd %xmm4, 0x60(%rsp)
callq 0x39b59
movsd 0x40(%rsp), %xmm6
movapd 0x60(%rsp), %xmm4
movapd 0x67b1b(%rip), %xmm5    # 0xa61d0
movsd %xmm0, -0x8(%r13,%r14,8)
movq 0x100(%rsp), %r13
movsd 0x66e54(%rip), %xmm1    # 0xa5520
divsd %xmm0, %xmm1
mulsd %xmm1, %xmm6
xorpd %xmm5, %xmm4
mulsd %xmm1, %xmm4
cmpl $0x0, 0xa8(%rsp)
jle 0x3e72f
xorl %eax, %eax
movq (%r13,%rax,8), %rcx
movsd -0x8(%rcx,%rbx), %xmm0
movsd -0x8(%rcx,%r14,8), %xmm1
movapd %xmm4, %xmm2
mulsd %xmm1, %xmm2
movapd %xmm4, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm6, %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, -0x8(%rcx,%rbx)
mulsd %xmm6, %xmm1
subsd %xmm3, %xmm1
movsd %xmm1, -0x8(%rcx,%r14,8)
incq %rax
cmpq %rax, %r15
jne 0x3e6e8
leaq 0x1(%r14), %rax
cmpq 0x18(%rsp), %r14
movq %rax, %r14
movq 0x30(%rsp), %rdx
movsd 0x58(%rsp), %xmm1
movapd 0x67a92(%rip), %xmm2    # 0xa61e0
jl 0x3e64d
movl %r12d, %r14d
movq 0x38(%rsp), %r12
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm3
movl %r14d, %eax
cmpq %rax, 0x18(%rsp)
je 0x3eb49
cmpl $0x1e, 0x28(%rsp)
movapd %xmm3, 0x40(%rsp)
jne 0x3e798
leaq 0x6b8b4(%rip), %rdi     # 0xaa041
callq 0x4090
movapd 0x40(%rsp), %xmm3
movslq %r14d, %r14
movq 0x10(%rsp), %rax
movsd -0x8(%rax,%r14,8), %xmm0
movaps %xmm0, 0x60(%rsp)
movq 0x18(%rsp), %rbx
movsd -0x10(%rax,%rbx,8), %xmm5
movsd -0x10(%r12,%rbx,8), %xmm0
movq 0x8(%rsp), %rax
movsd (%r12,%rax,8), %xmm2
movsd %xmm2, 0x80(%rsp)
movapd %xmm5, %xmm4
subsd %xmm3, %xmm4
movapd %xmm3, %xmm1
addsd %xmm5, %xmm1
movapd %xmm5, 0xb0(%rsp)
mulsd %xmm4, %xmm1
movapd %xmm0, %xmm4
subsd %xmm2, %xmm4
addsd %xmm2, %xmm0
mulsd %xmm4, %xmm0
addsd %xmm1, %xmm0
movapd %xmm2, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm5, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x66cfc(%rip), %xmm1    # 0xa5520
callq 0x39b59
movapd 0x60(%rsp), %xmm2
movapd %xmm2, %xmm1
movapd 0x40(%rsp), %xmm3
subsd %xmm3, %xmm1
addsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
movapd %xmm3, 0x40(%rsp)
movsd 0x90(%rsp), %xmm1
callq 0x39a88
movapd 0xb0(%rsp), %xmm4
movapd 0x60(%rsp), %xmm1
addsd 0x90(%rsp), %xmm0
divsd %xmm0, %xmm4
movsd 0x80(%rsp), %xmm0
subsd %xmm0, %xmm4
mulsd %xmm0, %xmm4
addsd 0x40(%rsp), %xmm4
divsd %xmm1, %xmm4
cmpq %r14, %rbx
movq %r14, 0x78(%rsp)
jle 0x3eaee
movq %r14, %r12
movapd 0x6b657(%rip), %xmm6    # 0xa9f00
movq 0x10(%rsp), %r9
movapd %xmm4, 0xb0(%rsp)
movapd %xmm1, 0x60(%rsp)
movq %r12, %rbx
incq %r12
movq 0x38(%rsp), %r14
movsd (%r14,%rbx,8), %xmm0
movsd (%r9,%rbx,8), %xmm1
movsd %xmm1, 0x40(%rsp)
movapd %xmm6, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, 0x90(%rsp)
unpckhpd %xmm6, %xmm6            # xmm6 = xmm6[1,1]
mulsd %xmm0, %xmm6
movapd %xmm6, 0x80(%rsp)
movapd %xmm4, %xmm0
callq 0x39b59
movapd 0x60(%rsp), %xmm6
movapd 0x678bd(%rip), %xmm5    # 0xa61d0
movsd %xmm0, -0x8(%r14,%rbx,8)
movapd 0x90(%rsp), %xmm3
unpcklpd 0xb0(%rsp), %xmm3       # xmm3 = xmm3[0],mem[0]
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm3
movapd 0x80(%rsp), %xmm4
movapd %xmm4, %xmm1
mulsd %xmm3, %xmm1
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
movapd %xmm3, %xmm2
movapd %xmm3, %xmm7
mulsd %xmm6, %xmm2
mulsd %xmm0, %xmm6
addsd %xmm1, %xmm6
movapd %xmm4, %xmm1
mulsd %xmm0, %xmm1
subsd %xmm2, %xmm1
movapd %xmm1, 0xb0(%rsp)
movsd 0x40(%rsp), %xmm2
movapd %xmm2, %xmm1
mulsd %xmm3, %xmm1
mulsd %xmm0, %xmm2
movsd %xmm2, 0x40(%rsp)
movapd %xmm3, 0x90(%rsp)
unpcklpd %xmm3, %xmm7            # xmm7 = xmm7[0],xmm3[0]
xorl %eax, %eax
movq 0x30(%rsp), %rdx
movq (%rdx,%rax,8), %rcx
movupd -0x8(%rcx,%rbx,8), %xmm2
movapd %xmm2, %xmm3
xorpd %xmm5, %xmm3
movapd %xmm2, %xmm4
shufpd $0x1, %xmm3, %xmm4      # xmm4 = xmm4[1],xmm3[0]
mulpd %xmm7, %xmm4
mulpd %xmm0, %xmm2
addpd %xmm4, %xmm2
movupd %xmm2, -0x8(%rcx,%rbx,8)
incq %rax
cmpq %rax, %rbp
jne 0x3e9a2
movapd %xmm6, %xmm0
movapd %xmm6, 0x60(%rsp)
movapd %xmm1, 0x80(%rsp)
callq 0x39b59
movapd 0x677d9(%rip), %xmm5    # 0xa61d0
movq 0x10(%rsp), %r9
movsd %xmm0, -0x8(%r9,%rbx,8)
movsd 0x66b15(%rip), %xmm1    # 0xa5520
divsd %xmm0, %xmm1
cmpneqsd 0x672f0(%rip), %xmm0    # 0xa5d08
movq %xmm0, %rax
andl $0x1, %eax
movapd 0x80(%rsp), %xmm0
unpcklpd 0x60(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm6      # xmm6 = xmm0[0,0,0,0]
pslld $0x1f, %xmm6
psrad $0x1f, %xmm6
andpd %xmm6, %xmm1
andnpd 0x90(%rsp), %xmm6
orpd %xmm1, %xmm6
cmpl $0x0, 0xa8(%rsp)
jle 0x3eaad
movapd %xmm6, %xmm0
unpcklpd %xmm6, %xmm0            # xmm0 = xmm0[0],xmm6[0]
movapd %xmm6, %xmm1
unpckhpd %xmm6, %xmm1            # xmm1 = xmm1[1],xmm6[1]
xorl %eax, %eax
movq (%r13,%rax,8), %rcx
movupd -0x8(%rcx,%rbx,8), %xmm2
movapd %xmm2, %xmm3
xorpd %xmm5, %xmm3
movapd %xmm2, %xmm4
shufpd $0x1, %xmm3, %xmm4      # xmm4 = xmm4[1],xmm3[0]
mulpd %xmm0, %xmm4
mulpd %xmm1, %xmm2
addpd %xmm4, %xmm2
movupd %xmm2, -0x8(%rcx,%rbx,8)
incq %rax
cmpq %rax, %r15
jne 0x3ea77
movsd 0x40(%rsp), %xmm2
movapd %xmm2, %xmm0
mulsd %xmm6, %xmm0
pshufd $0xee, %xmm6, %xmm1     # xmm1 = xmm6[2,3,2,3]
movdqa %xmm1, %xmm4
movapd 0xb0(%rsp), %xmm3
mulsd %xmm3, %xmm4
addsd %xmm0, %xmm4
mulsd %xmm6, %xmm3
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
cmpq 0x18(%rsp), %r12
jl 0x3e8ae
jmp 0x3eafb
movq 0x10(%rsp), %r9
movapd 0x676d5(%rip), %xmm5    # 0xa61d0
movq 0x78(%rsp), %rax
decq %rax
movq 0x38(%rsp), %r12
movq $0x0, (%r12,%rax,8)
movq 0x8(%rsp), %rax
movsd %xmm4, (%r12,%rax,8)
movsd %xmm1, (%r9,%rax,8)
movl 0x28(%rsp), %eax
incl %eax
movl %eax, 0x28(%rsp)
cmpl $0x1f, %eax
movq 0x30(%rsp), %rdx
movsd 0x58(%rsp), %xmm1
movapd 0x6769f(%rip), %xmm2    # 0xa61e0
jne 0x3e5bc
jmp 0x3eb88
xorpd %xmm0, %xmm0
ucomisd %xmm3, %xmm0
movq 0x10(%rsp), %r9
jbe 0x3eb88
xorpd %xmm5, %xmm3
movq 0x8(%rsp), %rax
movlpd %xmm3, (%r9,%rax,8)
xorl %eax, %eax
movq (%rdx,%rax,8), %rcx
movq 0x8(%rsp), %rsi
movsd (%rcx,%rsi,8), %xmm0
xorpd %xmm5, %xmm0
movlpd %xmm0, (%rcx,%rsi,8)
incq %rax
cmpq %rax, %rbp
jne 0x3eb69
decq 0x50(%rsp)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, 0xe0(%rsp)
cmpq $0x1, 0x18(%rsp)
jg 0x3e5a2
movq %r9, %rbx
movq %r12, %rdi
callq 0x3a180
movq 0x30(%rsp), %rdx
cmpl $0x0, 0x70(%rsp)
movq 0xf0(%rsp), %r10
jle 0x3ec81
movl %r10d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl $0x1, %ecx
xorl %r11d, %r11d
movq %r11, %rsi
incq %r11
cmpq 0x20(%rsp), %r11
jge 0x3ec64
movq %rcx, %rdi
movsd (%rbx,%rsi,8), %xmm0
movsd (%rbx,%rdi,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3ec5c
movsd %xmm1, (%rbx,%rsi,8)
movsd %xmm0, (%rbx,%rdi,8)
testl %r10d, %r10d
jle 0x3ec35
xorl %r8d, %r8d
movq (%r13,%r8,8), %r9
movsd (%r9,%rsi,8), %xmm0
movsd (%r9,%rdi,8), %xmm1
movsd %xmm1, (%r9,%rsi,8)
movsd %xmm0, (%r9,%rdi,8)
incq %r8
cmpq %r8, %rax
jne 0x3ec10
xorl %r8d, %r8d
movq (%rdx,%r8,8), %r9
movsd (%r9,%rsi,8), %xmm0
movsd (%r9,%rdi,8), %xmm1
movsd %xmm1, (%r9,%rsi,8)
movsd %xmm0, (%r9,%rdi,8)
incq %r8
cmpq %r8, %rbp
jne 0x3ec38
incq %rdi
cmpq %rbp, %rdi
jne 0x3ebee
incq %rcx
cmpq %rbp, %r11
jne 0x3ebde
jmp 0x3ec81
movq 0x38(%rsp), %rdi
callq 0x3a180
movq 0x30(%rsp), %rdx
movq %rbp, %rax
shlq $0x20, %rax
orq %rbp, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq