// File: /workspace/github_c_makefile_star2_O0/markpeerdeman[P]mbemm/src/emath/post.c
// Function: U_write_mises_analytical
void U_write_mises_analytical(mesh themesh)
{ double zx, zy, zz; /* midpoint coordinates */
  matrix stress;
  double s1, s2, s3, mises;
  element e; point node1, node2, node3;

  stress = (matrix)newmatrix(3,3);

  printf("    -1\n");
  printf("  2414\n");
  printf("         4\n");
  printf(" von Mises stresses (analytical)\n");
  printf("         2\n");
  printf("ElastoMath BEM results\n");
  printf("ELASTOMATH_SOLVE\n");
  printf("LOAD SET 1\n");
  printf("Analysis time was     8-May-66       14:24:27\n");
  printf("NONE\n");
  printf("         1         1         1         2         2         1\n");
  printf("       -10         0         1         1         1         0");
  printf("         0         0\n");
  printf("         2         0\n");
  printf("  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00");
  printf("  0.00000E+00\n");
  printf("  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00");
  printf("  0.00000E+00\n");


e=(element)element_dll(themesh->mesh_e,START,0);
while (e!=(element)NULL)
{
  node1 = (point)point_dll(themesh->mesh_p,SEARCH,e->p1);
  node2 = (point)point_dll(themesh->mesh_p,SEARCH,e->p2);
  node3 = (point)point_dll(themesh->mesh_p,SEARCH,e->p3);

  zx = 1.0/3.0 * ( node1->x + node2->x + node3->x );
  zy = 1.0/3.0 * ( node1->y + node2->y + node3->y );
  zz = 1.0/3.0 * ( node1->z + node2->z + node3->z );

  M(stress,1,1) = zx;
  M(stress,2,2) = zy;
  M(stress,1,2) = M(stress,2,1) = zy;

  /* calculate the von Mises stress for this element: */

  s2 = 0.0;
  s1 = 0.5*(M(stress,1,1)+M(stress,2,2)+sqrt( (M(stress,1,1)-M(stress,2,2))*(M(stress,1,1)-M(stress,2,2)) +
       4.0*(M(stress,1,2)*M(stress,1,2))));
  s3 = 0.5*(M(stress,1,1)+M(stress,2,2)-sqrt( (M(stress,1,1)-M(stress,2,2))*(M(stress,1,1)-M(stress,2,2)) +
       4.0*(M(stress,1,2)*M(stress,1,2))));

  mises = 1.0/sqrt(2.0)*sqrt( (s1-s2)*(s1-s2)+(s1-s3)*(s1-s3)+(s2-s3)*(s2-s3) );

  printf("%10d%10d\n",e->label,1);
  printf(" % 1.5E\n",(double)mises);

  e=e->NEXT;
}

  printf("    -1\n");

  delmatrix(stress);

}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movl $0x3, %esi
movl %esi, %edi
callq 0x15420
movq %rax, 0x60(%rsp)
leaq 0x126c9(%rip), %rdi     # 0x19a00
movb $0x0, %al
callq 0x1070
leaq 0x126c3(%rip), %rdi     # 0x19a08
movb $0x0, %al
callq 0x1070
leaq 0x12847(%rip), %rdi     # 0x19b9a
movb $0x0, %al
callq 0x1070
leaq 0x12845(%rip), %rdi     # 0x19ba6
movb $0x0, %al
callq 0x1070
leaq 0x126c2(%rip), %rdi     # 0x19a31
movb $0x0, %al
callq 0x1070
leaq 0x126c0(%rip), %rdi     # 0x19a3d
movb $0x0, %al
callq 0x1070
leaq 0x126ca(%rip), %rdi     # 0x19a55
movb $0x0, %al
callq 0x1070
leaq 0x126ce(%rip), %rdi     # 0x19a67
movb $0x0, %al
callq 0x1070
leaq 0x126cc(%rip), %rdi     # 0x19a73
movb $0x0, %al
callq 0x1070
leaq 0x126ed(%rip), %rdi     # 0x19aa2
movb $0x0, %al
callq 0x1070
leaq 0x126e5(%rip), %rdi     # 0x19aa8
movb $0x0, %al
callq 0x1070
leaq 0x12715(%rip), %rdi     # 0x19ae6
movb $0x0, %al
callq 0x1070
leaq 0x12744(%rip), %rdi     # 0x19b23
movb $0x0, %al
callq 0x1070
leaq 0x1274c(%rip), %rdi     # 0x19b39
movb $0x0, %al
callq 0x1070
leaq 0x12754(%rip), %rdi     # 0x19b4f
movb $0x0, %al
callq 0x1070
leaq 0x128a7(%rip), %rdi     # 0x19cb0
movb $0x0, %al
callq 0x1070
leaq 0x12738(%rip), %rdi     # 0x19b4f
movb $0x0, %al
callq 0x1070
leaq 0x1288b(%rip), %rdi     # 0x19cb0
movb $0x0, %al
callq 0x1070
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x14570
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x7805
movq 0x80(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movl 0x18(%rax), %edx
movl $0x2, %esi
callq 0x175c0
movq %rax, 0x30(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movl 0x1c(%rax), %edx
movl $0x2, %esi
callq 0x175c0
movq %rax, 0x28(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rax
movl 0x20(%rax), %edx
movl $0x2, %esi
callq 0x175c0
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movsd 0x20(%rax), %xmm1
movq 0x28(%rsp), %rax
addsd 0x20(%rax), %xmm1
movq 0x20(%rsp), %rax
addsd 0x20(%rax), %xmm1
movsd 0x11f42(%rip), %xmm0    # 0x19420
mulsd %xmm1, %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0x30(%rsp), %rax
movsd 0x28(%rax), %xmm1
movq 0x28(%rsp), %rax
addsd 0x28(%rax), %xmm1
movq 0x20(%rsp), %rax
addsd 0x28(%rax), %xmm1
movsd 0x11f12(%rip), %xmm0    # 0x19420
mulsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x30(%rsp), %rax
movsd 0x30(%rax), %xmm1
movq 0x28(%rsp), %rax
addsd 0x30(%rax), %xmm1
movq 0x20(%rsp), %rax
addsd 0x30(%rax), %xmm1
movsd 0x11ee2(%rip), %xmm0    # 0x19420
mulsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
movsd 0x78(%rsp), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd %xmm0, (%rax)
movsd 0x70(%rsp), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movsd %xmm0, 0x8(%rax)
movsd 0x70(%rsp), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movsd %xmm0, (%rax)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd %xmm0, 0x8(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
subsd 0x8(%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm2
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
subsd 0x8(%rax), %xmm2
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd 0x8(%rax), %xmm3
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
mulsd 0x8(%rax), %xmm3
movsd 0x11e0b(%rip), %xmm1    # 0x19448
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x1150
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd 0x11dd0(%rip), %xmm0    # 0x19430
mulsd %xmm1, %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
subsd 0x8(%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd (%rax), %xmm2
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
subsd 0x8(%rax), %xmm2
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movsd 0x8(%rax), %xmm3
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
mulsd 0x8(%rax), %xmm3
movsd 0x11d48(%rip), %xmm1    # 0x19448
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x1150
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x11d0d(%rip), %xmm0    # 0x19430
mulsd %xmm1, %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x11d03(%rip), %xmm0    # 0x19438
callq 0x1150
movaps %xmm0, %xmm1
movsd 0x118c3(%rip), %xmm0    # 0x19008
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x58(%rsp), %xmm1
subsd 0x50(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
subsd 0x50(%rsp), %xmm2
movsd 0x58(%rsp), %xmm0
subsd 0x48(%rsp), %xmm0
movsd 0x58(%rsp), %xmm3
subsd 0x48(%rsp), %xmm3
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x50(%rsp), %xmm0
subsd 0x48(%rsp), %xmm0
movsd 0x50(%rsp), %xmm2
subsd 0x48(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x1150
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x38(%rsp), %rax
movl 0x14(%rax), %esi
leaq 0x12451(%rip), %rdi     # 0x19c23
movl $0x1, %edx
movb $0x0, %al
callq 0x1070
movsd 0x40(%rsp), %xmm0
leaq 0x123a6(%rip), %rdi     # 0x19b91
movb $0x1, %al
callq 0x1070
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
jmp 0x7446
leaq 0x121f4(%rip), %rdi     # 0x19a00
movb $0x0, %al
callq 0x1070
movq 0x60(%rsp), %rdi
callq 0x15690
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)