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

int  k, i; /* counters */
double B1, B2, B3;

   for (k=1; k<=3; k++)
   { for (i=1; i<=3; i++)
	 { B1 = sinA1 * sinA1 / sinA2
		  + beta * sin( 2.0*theElement->alpha3 )
		  - 2.0 * ( sinA3 + sin(2.0*theElement->alpha3+theElement->alpha2) );
       B1 = M(p,k,i) * B1;

	   B2 = beta * sin( theElement->alpha3-theElement->alpha2 )
		  - 2.0 * ( sinA3 - sinA2 );
       B2 = M(q,k,i) * B2;

	   B3 = - sinA1 * sinA1 / sinA3
		  - beta * sin( 2.0*theElement->alpha2 )
		  + 2.0 * ( sinA2 + sin(2.0*theElement->alpha2+theElement->alpha3) );
       B3 = M(r,k,i) * B3;

	   M(B,k,i) = B1 + B2 + B3;
	 } /* for i */
   } /* for k */

}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movsd %xmm0, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movl $0x1, 0x6c(%rsp)
cmpl $0x3, 0x6c(%rsp)
jg 0xec1e
movl $0x1, 0x68(%rsp)
cmpl $0x3, 0x68(%rsp)
jg 0xec0c
movsd 0xfe80(%rip), %xmm0     # 0x1e798
mulsd 0xfe78(%rip), %xmm0     # 0x1e798
divsd 0xfe80(%rip), %xmm0     # 0x1e7a8
movsd %xmm0, 0x8(%rsp)
movsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0xfe4f(%rip), %rax      # 0x1e790
movsd 0xaaef(%rip), %xmm0     # 0x19438
mulsd 0x80(%rax), %xmm0
callq 0x1120
movsd 0x8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0xfe3d(%rip), %xmm0     # 0x1e7b8
movsd %xmm0, 0x18(%rsp)
movq 0xfe08(%rip), %rax      # 0x1e790
movsd 0x80(%rax), %xmm0
movq 0xfdf9(%rip), %rax      # 0x1e790
movsd 0x78(%rax), %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
callq 0x1120
movsd 0x18(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x20(%rsp), %xmm0
addsd %xmm2, %xmm1
addsd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x6c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x68(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0xfd7e(%rip), %rax      # 0x1e790
movsd 0x80(%rax), %xmm0
movq 0xfd6f(%rip), %rax      # 0x1e790
subsd 0x78(%rax), %xmm0
callq 0x1120
movaps %xmm0, %xmm2
movsd 0x28(%rsp), %xmm0
movsd 0xfd7c(%rip), %xmm3     # 0x1e7b8
subsd 0xfd64(%rip), %xmm3     # 0x1e7a8
movsd 0xa9ec(%rip), %xmm1     # 0x19438
mulsd %xmm3, %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x88(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x6c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x68(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0xfce6(%rip), %xmm0     # 0x1e798
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd 0xfcc7(%rip), %xmm0     # 0x1e798
divsd 0xfcdf(%rip), %xmm0     # 0x1e7b8
movsd %xmm0, 0x30(%rsp)
movsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0xfc9e(%rip), %rax      # 0x1e790
movsd 0xa93e(%rip), %xmm0     # 0x19438
mulsd 0x78(%rax), %xmm0
callq 0x1120
movsd 0x30(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x38(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0xfc68(%rip), %xmm0     # 0x1e7a8
movsd %xmm0, 0x48(%rsp)
movq 0xfc43(%rip), %rax      # 0x1e790
movsd 0x78(%rax), %xmm0
movq 0xfc37(%rip), %rax      # 0x1e790
movsd 0x80(%rax), %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
callq 0x1120
movsd 0x40(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x48(%rsp), %xmm0
addsd %xmm2, %xmm0
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x6c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x68(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
mulsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x60(%rsp), %xmm0
addsd 0x58(%rsp), %xmm0
addsd 0x50(%rsp), %xmm0
movq 0x70(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x6c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x68(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x68(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
jmp 0xe905
jmp 0xec0e
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0xe8f2
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)