// File: /workspace/github_c_makefile_star2_O0/markpeerdeman[P]mbemm/src/emath/post.c
// Function: write_edge_force
void write_edge_force(mesh theMesh)
{ point p;
  element e;
  double t1x, t1y, t1z, t2x, t2y, t2z, t3x, t3y, t3z;
  double fx, fy, fz;
  double fxt, fyt, fzt;
  int cnodes;
  int p1iscnode;
  int p2iscnode;
  int p3iscnode;
  /* double force1, force2; */

  printf("\n{---------------------------------------------------------------}\n");
  printf("{ POST output of the edge element forces.\n");
  printf("  format:\n");
  printf("  element_label force_x force_y force_z\n");
  printf("}\n");
  printf("edge_element_forces\n");
  fxt=0.0; fyt=0.0; fzt=0.0;

  /* the calculated tractions: */
  e = (element)element_dll(theMesh->mesh_e,START,0);
  while (e!=(element)NULL)
  { cnodes=0; p1iscnode=0; p2iscnode=0; p3iscnode=0;   
    /* get the traction forces at the three nodes of the element: */ 
	/* NODE 1: */
	p=(point)point_dll(theMesh->mesh_p,SEARCH,e->p1);
        if (p->type==CNODE) { cnodes++; p1iscnode=1; }
	t1x=p->fx; t1y=p->fy; t1z=p->fz;
	/* NODE 2: */
	p=(point)point_dll(theMesh->mesh_p,SEARCH,e->p2);
        if (p->type==CNODE) { cnodes++; p2iscnode=1; }
	t2x=p->fx; t2y=p->fy; t2z=p->fz;
	/* NODE 3: */
	p=(point)point_dll(theMesh->mesh_p,SEARCH,e->p3);
        if (p->type==CNODE) { cnodes++; p3iscnode=1; }
	t3x=p->fx; t3y=p->fy; t3z=p->fz;
  
	fx= 1.0/3.0*(t1x+t2x+t3x)*e->area*theMesh->G_SCALE;
	fy= 1.0/3.0*(t1y+t2y+t3y)*e->area*theMesh->G_SCALE;
	fz= 1.0/3.0*(t1z+t2z+t3z)*e->area*theMesh->G_SCALE;
	fxt+=fx; fyt+=fy; fzt+=fz;
        if (cnodes==2)
        { if ( (p1iscnode==1) && (p2iscnode==1) )
          { fx=fx/e->z3*theMesh->G_SCALE;
            fy=fy/e->z3*theMesh->G_SCALE;
            fz=fz/e->z3*theMesh->G_SCALE;
          }
          if ( (p1iscnode==1) && (p3iscnode==1) )
          { fx=fx/e->z2*theMesh->G_SCALE;
            fy=fy/e->z2*theMesh->G_SCALE;
            fz=fz/e->z2*theMesh->G_SCALE;
          }
          if ( (p2iscnode==1) && (p3iscnode==1) )
          { fx=fx/e->z1*theMesh->G_SCALE;
            fy=fy/e->z1*theMesh->G_SCALE;
            fz=fz/e->z1*theMesh->G_SCALE;
          }

	  printf("%4d % 8.8E % 8.8E % 8.8E (per unit length)\n", e->label,fx,fy,fz);
        }
    e=e->NEXT;
  }

  printf("end_edge_element_forces\n");

  printf("\n{---------------------------------------------------------------}\n");
  printf("{ POST output of the resulting force vector.\n");
  printf(" Force: %5.8E %5.8E %5.8E\n",fxt,fyt,fzt);
  printf(" Modulus: %5.8E\n",sqrt((double)(fxt*fxt+fyt*fyt+fzt*fzt)));

}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
leaq 0x1469a(%rip), %rdi     # 0x19460
movb $0x0, %al
callq 0x1070
leaq 0x14aaa(%rip), %rdi     # 0x1987e
movb $0x0, %al
callq 0x1070
leaq 0x146ee(%rip), %rdi     # 0x194d0
movb $0x0, %al
callq 0x1070
leaq 0x1490e(%rip), %rdi     # 0x196fe
movb $0x0, %al
callq 0x1070
leaq 0x146a3(%rip), %rdi     # 0x194a1
movb $0x0, %al
callq 0x1070
leaq 0x14acd(%rip), %rdi     # 0x198d9
movb $0x0, %al
callq 0x1070
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x14570
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
je 0x52fb
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movl 0x18(%rax), %edx
movl $0x2, %esi
callq 0x175c0
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
cmpl $0xf, 0x14(%rax)
jne 0x4ec3
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movl $0x1, 0x10(%rsp)
movq 0x98(%rsp), %rax
movsd 0x38(%rax), %xmm0
movsd %xmm0, 0x88(%rsp)
movq 0x98(%rsp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, 0x80(%rsp)
movq 0x98(%rsp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movl 0x1c(%rax), %edx
movl $0x2, %esi
callq 0x175c0
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
cmpl $0xf, 0x14(%rax)
jne 0x4f4b
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movl $0x1, 0xc(%rsp)
movq 0x98(%rsp), %rax
movsd 0x38(%rax), %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x98(%rsp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0x98(%rsp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0xa0(%rsp), %rax
movq (%rax), %rdi
movq 0x90(%rsp), %rax
movl 0x20(%rax), %edx
movl $0x2, %esi
callq 0x175c0
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
cmpl $0xf, 0x14(%rax)
jne 0x4fcd
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movl $0x1, 0x8(%rsp)
movq 0x98(%rsp), %rax
movsd 0x38(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x98(%rsp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x98(%rsp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd 0x88(%rsp), %xmm1
addsd 0x70(%rsp), %xmm1
addsd 0x58(%rsp), %xmm1
movsd 0x143fd(%rip), %xmm0    # 0x19420
mulsd %xmm1, %xmm0
movq 0x90(%rsp), %rax
mulsd 0xb8(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x80(%rsp), %xmm1
addsd 0x68(%rsp), %xmm1
addsd 0x50(%rsp), %xmm1
movsd 0x143b9(%rip), %xmm0    # 0x19420
mulsd %xmm1, %xmm0
movq 0x90(%rsp), %rax
mulsd 0xb8(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x78(%rsp), %xmm1
addsd 0x60(%rsp), %xmm1
addsd 0x48(%rsp), %xmm1
movsd 0x14378(%rip), %xmm0    # 0x19420
mulsd %xmm1, %xmm0
movq 0x90(%rsp), %rax
mulsd 0xb8(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x40(%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x38(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x30(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpl $0x2, 0x14(%rsp)
jne 0x52e2
cmpl $0x1, 0x10(%rsp)
jne 0x519d
cmpl $0x1, 0xc(%rsp)
jne 0x519d
movsd 0x40(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x98(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x38(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x98(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x30(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x98(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
cmpl $0x1, 0x10(%rsp)
jne 0x522a
cmpl $0x1, 0x8(%rsp)
jne 0x522a
movsd 0x40(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x90(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x38(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x90(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x30(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x90(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
cmpl $0x1, 0xc(%rsp)
jne 0x52b7
cmpl $0x1, 0x8(%rsp)
jne 0x52b7
movsd 0x40(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x88(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x38(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x88(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x30(%rsp), %xmm0
movq 0x90(%rsp), %rax
divsd 0x88(%rax), %xmm0
movq 0xa0(%rsp), %rax
mulsd 0x30(%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x90(%rsp), %rax
movl 0x14(%rax), %esi
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
leaq 0x145ce(%rip), %rdi     # 0x198a9
movb $0x3, %al
callq 0x1070
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x90(%rsp)
jmp 0x4e4b
leaq 0x145d3(%rip), %rdi     # 0x198d5
movb $0x0, %al
callq 0x1070
leaq 0x14150(%rip), %rdi     # 0x19460
movb $0x0, %al
callq 0x1070
leaq 0x14437(%rip), %rdi     # 0x19755
movb $0x0, %al
callq 0x1070
movsd 0x28(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
leaq 0x14445(%rip), %rdi     # 0x19783
movb $0x3, %al
callq 0x1070
movsd 0x28(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
movsd 0x20(%rsp), %xmm0
mulsd 0x20(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
movsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x1150
leaq 0x14419(%rip), %rdi     # 0x1979e
movb $0x1, %al
callq 0x1070
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)