// File: /workspace/github_c_makefile_star2_O0/markpeerdeman[P]mbemm/src/emath/singular.c
// Function: make_p_q_r
void make_p_q_r(const matrix p, const matrix q, const matrix r)
{ /* IN:          matrices p, q, r which have to be filled
   * OUT:         nothing
   * MODIFIES:    matrices p, q, r
   * USES:        theElement, n1, n2 and n3 arrays
   * DESCRIPTION:
   * The matrices p, q and r are calculated from the element data from
   * theElement. The results are put in the offered p, r and r matrices.
   */

double c;    /* :scalefactor for p, q and r */
double k213, /* :temporary storage: */
	 i213,
	 i312,
	 k312;
int  k, i; /* :counters */

  /* scalefactor c is given by 1/(sin(alpha1)^2): */
   c = sinA1 * sinA1;
   c = 1.0 / c;

   for (k=1; k<=3; k++)
   { k213 = (n2[k]-n1[k])/theElement->z3;
	 k312 = (n3[k]-n1[k])/theElement->z2;
	 for (i=1; i<=3; i++)
	 { i213 = (n2[i]-n1[i])/theElement->z3;
	   i312 = (n3[i]-n1[i])/theElement->z2;
	   M(p,k,i) = c * k213 * i213;
	   M(q,k,i) = c * ( k213*i312 + i213*k312 ); 
	   M(r,k,i) = c * k312 * i312;
	 } /* for i */
   } /* for k */

}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movsd 0x10321(%rip), %xmm0    # 0x1e798
mulsd 0x10319(%rip), %xmm0    # 0x1e798
movsd %xmm0, -0x20(%rsp)
movsd 0xab7b(%rip), %xmm0     # 0x19008
divsd -0x20(%rsp), %xmm0
movsd %xmm0, -0x20(%rsp)
movl $0x1, -0x44(%rsp)
cmpl $0x3, -0x44(%rsp)
jg 0xe67d
movslq -0x44(%rsp), %rcx
leaq 0x10338(%rip), %rax     # 0x1e7f0
movsd (%rax,%rcx,8), %xmm0
movslq -0x44(%rsp), %rcx
leaq 0x10307(%rip), %rax     # 0x1e7d0
subsd (%rax,%rcx,8), %xmm0
movq 0x102bb(%rip), %rax     # 0x1e790
divsd 0x98(%rax), %xmm0
movsd %xmm0, -0x28(%rsp)
movslq -0x44(%rsp), %rcx
leaq 0x10321(%rip), %rax     # 0x1e810
movsd (%rax,%rcx,8), %xmm0
movslq -0x44(%rsp), %rcx
leaq 0x102d0(%rip), %rax     # 0x1e7d0
subsd (%rax,%rcx,8), %xmm0
movq 0x10284(%rip), %rax     # 0x1e790
divsd 0x90(%rax), %xmm0
movsd %xmm0, -0x40(%rsp)
movl $0x1, -0x48(%rsp)
cmpl $0x3, -0x48(%rsp)
jg 0xe66b
movslq -0x48(%rsp), %rcx
leaq 0x102b7(%rip), %rax     # 0x1e7f0
movsd (%rax,%rcx,8), %xmm0
movslq -0x48(%rsp), %rcx
leaq 0x10286(%rip), %rax     # 0x1e7d0
subsd (%rax,%rcx,8), %xmm0
movq 0x1023a(%rip), %rax     # 0x1e790
divsd 0x98(%rax), %xmm0
movsd %xmm0, -0x30(%rsp)
movslq -0x48(%rsp), %rcx
leaq 0x102a0(%rip), %rax     # 0x1e810
movsd (%rax,%rcx,8), %xmm0
movslq -0x48(%rsp), %rcx
leaq 0x1024f(%rip), %rax     # 0x1e7d0
subsd (%rax,%rcx,8), %xmm0
movq 0x10203(%rip), %rax     # 0x1e790
divsd 0x90(%rax), %xmm0
movsd %xmm0, -0x38(%rsp)
movsd -0x20(%rsp), %xmm0
mulsd -0x28(%rsp), %xmm0
mulsd -0x30(%rsp), %xmm0
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0x48(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x20(%rsp), %xmm0
movsd -0x28(%rsp), %xmm1
movsd -0x38(%rsp), %xmm3
movsd -0x30(%rsp), %xmm2
mulsd -0x40(%rsp), %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0x48(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x20(%rsp), %xmm0
mulsd -0x40(%rsp), %xmm0
mulsd -0x38(%rsp), %xmm0
movq -0x18(%rsp), %rax
movq 0x8(%rax), %rax
movl -0x44(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl -0x48(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rsp)
jmp 0xe522
jmp 0xe66d
movl -0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rsp)
jmp 0xe4a1
retq
nop