// File: /workspace/github_c_makefile_star2_O0/markpeerdeman[P]mbemm/src/emath/singular.c
// Function: make_A
void make_A(const matrix p, const matrix q, const matrix r, const double beta, 
			const matrix A)
{ /* IN:          matrices p, q and r, double beta, matrix A
   * OUT:         nothing
   * MODIFIES:    matrix A
   * USES:        data from theElement
   * DESCRIPTION: This function, of course, calculates the A matrix.
   */

int  k, i; /* :counters */
double A1, A2, A3;

   for (k=1; k<=3; k++)
   { for (i=1; i<=3; i++)
	 { A1 = cosA3
		  - cos( theElement->alpha3-theElement->alpha1 )
		  + beta * sinA3 * sinA3;
       A1 = M(p,k,i) * A1;
       
	   A2 = cosA2
		  + cosA3
		  - beta * sinA2 * sinA3;
       A2 = M(q,k,i) * A2;

       A3 = cosA2
		  - cos( theElement->alpha2-theElement->alpha1 )
		  + beta * sinA2 * sinA2;
       A3 = M(r,k,i) * A3;

	   M(A,k,i) = A1 + A2 + A3;
	 } /* for i */
   }  /* for k */

}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movsd %xmm0, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movl $0x1, 0x2c(%rsp)
cmpl $0x3, 0x2c(%rsp)
jg 0xe8b2
movl $0x1, 0x28(%rsp)
cmpl $0x3, 0x28(%rsp)
jg 0xe8a0
movsd 0x100f4(%rip), %xmm0    # 0x1e7c0
movsd %xmm0, (%rsp)
movq 0x100b8(%rip), %rax     # 0x1e790
movsd 0x80(%rax), %xmm0
movq 0x100a9(%rip), %rax     # 0x1e790
subsd 0x70(%rax), %xmm0
callq 0x10a0
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
mulsd 0x100b0(%rip), %xmm0    # 0x1e7b8
movsd 0x100a8(%rip), %xmm2    # 0x1e7b8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x28(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x10058(%rip), %xmm1    # 0x1e7b0
addsd 0x10060(%rip), %xmm1    # 0x1e7c0
movsd 0x38(%rsp), %xmm0
mulsd 0x1003a(%rip), %xmm0    # 0x1e7a8
movsd 0x10042(%rip), %xmm2    # 0x1e7b8
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x28(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0xffdb(%rip), %xmm0     # 0x1e7b0
movsd %xmm0, 0x8(%rsp)
movq 0xffae(%rip), %rax      # 0x1e790
movsd 0x78(%rax), %xmm0
movq 0xffa2(%rip), %rax      # 0x1e790
subsd 0x70(%rax), %xmm0
callq 0x10a0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x38(%rsp), %xmm0
mulsd 0xff98(%rip), %xmm0     # 0x1e7a8
movsd 0xff90(%rip), %xmm2     # 0x1e7a8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x28(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x2c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x28(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0xe6b9
jmp 0xe8a2
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0xe6a6
addq $0x58, %rsp
retq
nopw (%rax,%rax)