LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/post.c
// Function: U_write_displacements
void U_write_displacements(const point plist)
{ point p;
  printf("    -1\n");
  printf("  2414\n");
  printf("         1\n");
  printf(" Nodal displacements\n");
  printf("         1\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         3         8         2         6\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");

  p=(point)point_dll(plist,START,0);
  while (p!=(point)NULL)
  {	printf("%10d\n",p->label);
	printf(" % 1.5E % 1.5E % 1.5E  0.00000E+00  0.00000E+00  0.00000E+00\n",
	 (double)p->dx, (double)p->dy,
	 (double)p->dz );
    p=p->NEXT;
  }

  printf("    -1\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x981c(%rip), %rdi      # 0xdda0
callq 0x1060
leaq 0x9720(%rip), %rdi      # 0xdcb0
callq 0x1060
leaq 0x96e6(%rip), %r14      # 0xdc82
movq %r14, %rdi
callq 0x1060
leaq 0x96f0(%rip), %rdi      # 0xdc9b
callq 0x1060
movq %r14, %rdi
callq 0x1060
leaq 0x9714(%rip), %rdi      # 0xdcd3
callq 0x1060
leaq 0x971f(%rip), %rdi      # 0xdcea
callq 0x1060
leaq 0x9724(%rip), %rdi      # 0xdcfb
callq 0x1060
leaq 0x9723(%rip), %rdi      # 0xdd06
callq 0x1060
leaq 0x9745(%rip), %rdi      # 0xdd34
callq 0x1060
leaq 0x973e(%rip), %rdi      # 0xdd39
callq 0x1060
leaq 0x8fc4(%rip), %rdi      # 0xd5cb
xorl %eax, %eax
callq 0x1090
leaq 0x9761(%rip), %rdi      # 0xdd76
callq 0x1060
leaq 0x976a(%rip), %rdi      # 0xdd8b
callq 0x1060
leaq 0x8fdb(%rip), %r14      # 0xd608
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
leaq 0x8ffe(%rip), %r15      # 0xd63c
movq %r15, %rdi
callq 0x1060
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
movq %r15, %rdi
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc14c
movq %rax, %rbx
leaq 0x8ffd(%rip), %r14      # 0xd66b
leaq 0x9033(%rip), %r15      # 0xd6a8
testq %rbx, %rbx
je 0x46a6
movl 0x10(%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
movsd 0x50(%rbx), %xmm0
movsd 0x58(%rbx), %xmm1
movsd 0x60(%rbx), %xmm2
movq %r15, %rdi
movb $0x3, %al
callq 0x1090
movq 0x8(%rbx), %rbx
jmp 0x4675
leaq 0x96f3(%rip), %rdi      # 0xdda0
popq %rbx
popq %r14
popq %r15
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/post.c
// Function: U_write_tractions
void U_write_tractions(const point plist)
{ point p;
  printf("    -1\n");
  printf("  2414\n");
  printf("         2\n");
  printf(" Nodal tractions\n");
  printf("         1\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         3         8         2         6\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");

  p=(point)point_dll(plist,START,0);
  while (p!=(point)NULL)
  { printf("%10d\n",p->label);
    printf(" % 1.5E % 1.5E % 1.5E  0.00000E+00  0.00000E+00  0.00000E+00\n",
     (double)p->fx, (double)p->fy,
     (double)p->fz );
    p=p->NEXT;
  }

  printf("    -1\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x96da(%rip), %rdi      # 0xdda0
callq 0x1060
leaq 0x95de(%rip), %rdi      # 0xdcb0
callq 0x1060
leaq 0x95d9(%rip), %rdi      # 0xdcb7
callq 0x1060
leaq 0x95d8(%rip), %rdi      # 0xdcc2
callq 0x1060
leaq 0x958c(%rip), %rdi      # 0xdc82
callq 0x1060
leaq 0x95d1(%rip), %rdi      # 0xdcd3
callq 0x1060
leaq 0x95dc(%rip), %rdi      # 0xdcea
callq 0x1060
leaq 0x95e1(%rip), %rdi      # 0xdcfb
callq 0x1060
leaq 0x95e0(%rip), %rdi      # 0xdd06
callq 0x1060
leaq 0x9602(%rip), %rdi      # 0xdd34
callq 0x1060
leaq 0x95fb(%rip), %rdi      # 0xdd39
callq 0x1060
leaq 0x8e81(%rip), %rdi      # 0xd5cb
xorl %eax, %eax
callq 0x1090
leaq 0x961e(%rip), %rdi      # 0xdd76
callq 0x1060
leaq 0x9627(%rip), %rdi      # 0xdd8b
callq 0x1060
leaq 0x8e98(%rip), %r14      # 0xd608
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
leaq 0x8ebb(%rip), %r15      # 0xd63c
movq %r15, %rdi
callq 0x1060
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
movq %r15, %rdi
callq 0x1060
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc14c
movq %rax, %rbx
leaq 0x8eba(%rip), %r14      # 0xd66b
leaq 0x8ef0(%rip), %r15      # 0xd6a8
testq %rbx, %rbx
je 0x47e9
movl 0x10(%rbx), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
movsd 0x38(%rbx), %xmm0
movsd 0x40(%rbx), %xmm1
movsd 0x48(%rbx), %xmm2
movq %r15, %rdi
movb $0x3, %al
callq 0x1090
movq 0x8(%rbx), %rbx
jmp 0x47b8
leaq 0x95b0(%rip), %rdi      # 0xdda0
popq %rbx
popq %r14
popq %r15
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: fgetc_sc
int fgetc_sc(FILE *fp)
/* this function gets a character from stream fp, skipping everything between
 * the characters named 'theJohn' and 'theAnita', defined above.
 */
{ char c;
  int johns=0;
  do
  { c=(char)fgetc(fp);
	if (feof(fp)) return (int)' ';
	if (c==theJohn)  johns++;
	if (c==theAnita) johns--;
  } while( johns!=0 );
  if (c==theAnita) c=' ';
  return (int)c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x20
popq %rbx
movq %r14, %rdi
callq 0x10a0
movl %eax, %ebp
movq %r14, %rdi
callq 0x1100
testl %eax, %eax
jne 0x5354
shll $0x18, %ebp
xorl %eax, %eax
cmpl $0x7b000000, %ebp       # imm = 0x7B000000
sete %al
addl %eax, %r15d
xorl %eax, %eax
cmpl $0x7d000000, %ebp       # imm = 0x7D000000
sete %al
subl %eax, %r15d
jne 0x530c
movl %ebp, %eax
sarl $0x18, %eax
cmpl $0x7d000000, %ebp       # imm = 0x7D000000
pushq $0x20
popq %rbx
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: read_keyword
void read_keyword( FILE *fp, char *data)
/* This function reads a keyword string from the stream fp. The keyword is
 * returned (capitalized), terminated with a \0 string terminator. When EOF is
 * encountered, the keyword 'END' is returned.
 */
{ int ch;
  int i=0;
  /* search begin of next keyword: */
  do
  { ch=fgetc_sc(fp);
	if (feof(fp))
	{ /* evaluate_level(GREEN,52); */
	  data[0]='E'; data[1]='N'; data[2]='D'; data[3]=(char)0;
	  return;
	}
  }
  while (isspace(ch));
  /* read keyword in the datastring: */
  while ( !isspace(ch) )
  { data[i++]=(char)toupper(ch);
    if (i>79) evaluate_level(YELLOW,58);
    ch=toupper(fgetc_sc(fp));
  }
  data[i]=(char)0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %r14, %rdi
callq 0x52fc
movl %eax, %ebp
movq %r14, %rdi
callq 0x1100
testl %eax, %eax
jne 0x53e9
callq 0x11b0
movq %rax, %r15
movq (%rax), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
btl $0xd, %eax
jb 0x5372
xorl %r12d, %r12d
pushq $0x3a
popq %r13
btl $0xd, %eax
jb 0x53f7
movl %ebp, %edi
callq 0x1050
movb %al, (%rbx,%r12)
cmpq $0x4f, %r12
jb 0x53c9
pushq $0x1
popq %rdi
movl %r13d, %esi
callq 0xb0f8
movq %r14, %rdi
callq 0x52fc
movl %eax, %edi
callq 0x1050
movl %eax, %ebp
movq (%r15), %rax
movslq %ebp, %rcx
movzwl (%rax,%rcx,2), %eax
incq %r12
jmp 0x53a7
movw $0x4e45, (%rbx)         # imm = 0x4E45
movb $0x44, 0x2(%rbx)
pushq $0x3
popq %rax
jmp 0x53fa
movl %r12d, %eax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: read_points
void read_points(FILE *fp, mesh theMesh)
/* this function reads the point data into the the mesh's point dll. Data is
 * read until the keyword 'END_NODES' is encountered. Syntax errors are NOT
 * processed!
 */
{ static char theKeyword[80];
  /* evaluate_level(GREEN,54); */
  while (1)
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"END_NODES")) return;
    theMesh->mesh_p=point_dll(theMesh->mesh_p,APPEND,0);
    theMesh->mesh_p->label =  atoi(theKeyword); 
    read_keyword(fp,theKeyword); theMesh->mesh_p->x = strtod(theKeyword,NULL);
    read_keyword(fp,theKeyword); theMesh->mesh_p->y = strtod(theKeyword,NULL);
    read_keyword(fp,theKeyword); theMesh->mesh_p->z = strtod(theKeyword,NULL);
    theMesh->mesh_p->type=NODE;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xf02b(%rip), %r15      # 0x14450
leaq 0x8ae4(%rip), %r12      # 0xdf10
pushq $0xa
popq %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1140
testl %eax, %eax
je 0x54d2
movq (%rbx), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
callq 0xc14c
movq %rax, %rbp
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x1170
movl %eax, 0x10(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movq (%rbx), %rax
movsd %xmm0, 0x20(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movq (%rbx), %rax
movsd %xmm0, 0x28(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movq (%rbx), %rax
movsd %xmm0, 0x30(%rax)
movl $0xb, 0x14(%rax)
jmp 0x5430
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: skip_solutionvector
void skip_solutionvector(FILE *fp)
{ static char theKeyword[80];
  READ_SOLUTION=YES;
  while (1)
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"END_SOLUTION")) return;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xef31(%rip), %rax      # 0x14424
movl $0x1, (%rax)
leaq 0xefa0(%rip), %r14      # 0x144a0
leaq 0x8a13(%rip), %r15      # 0xdf1a
pushq $0xd
popq %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5361
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1140
testl %eax, %eax
jne 0x550b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: fill_solutionvector
void fill_solutionvector(FILE *fp,vector thesolutionvector)
{ static char theKeyword[80];
  int i=1;
  while (1)
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"END_SOLUTION")) return;
	else 
	{ V(thesolutionvector,i++)=strtod(theKeyword,NULL);
	  read_keyword(fp,theKeyword); V(thesolutionvector,i++)=strtod(theKeyword,NULL);
	  read_keyword(fp,theKeyword); V(thesolutionvector,i++)=strtod(theKeyword,NULL);
	}
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
leaq 0xefa2(%rip), %r15      # 0x144f0
leaq 0x89c5(%rip), %r12      # 0xdf1a
pushq $0xd
popq %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1140
testl %eax, %eax
je 0x55cd
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movq 0x8(%rbx), %rax
movsd %xmm0, (%rax,%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movq 0x8(%rbx), %rax
movsd %xmm0, 0x8(%rax,%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movq 0x8(%rbx), %rax
movsd %xmm0, 0x10(%rax,%rbp)
addq $0x18, %rbp
jmp 0x5559
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: fill_C_points
void fill_C_points(FILE *fp, cmesh theCMesh)
{ point p; 
  point q;
  int node1label;
  int node2label;
  double length;
  static char theKeyword[80];
  while (1)
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"END_CNODES")) return;
    node1label=atoi(theKeyword);
    read_keyword(fp,theKeyword); 
    node2label=atoi(theKeyword)+theCMesh->nr_of_nodes_basemesh;
    p=(point)point_dll(theCMesh->merged_mesh->mesh_p,SEARCH,node1label);
    q=(point)point_dll(theCMesh->merged_mesh->mesh_p,SEARCH,node2label);
    p->type=CNODE; q->type=CNODE;
    p->conn=q->label; q->conn=p->label;
    read_keyword(fp,theKeyword); p->n1=strtod(theKeyword,NULL);
    read_keyword(fp,theKeyword); p->n2=strtod(theKeyword,NULL);
    read_keyword(fp,theKeyword); p->n3=strtod(theKeyword,NULL);
    length=sqrt(p->n1*p->n1+p->n2*p->n2+p->n3*p->n3);
    p->n1/=length;
    p->n2/=length;
    p->n3/=length;
    q->n1=p->n1;
    q->n2=p->n2;
    q->n3=p->n3;
     
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xef56(%rip), %r15      # 0x14590
pushq $0x2
popq %rbp
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
leaq 0x88d5(%rip), %rsi      # 0xdf27
pushq $0xb
popq %rdx
callq 0x1140
testl %eax, %eax
je 0x5772
movq %r15, %rdi
callq 0x1170
movl %eax, %r12d
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
callq 0x1170
movl %eax, %r13d
addl 0x8(%rbx), %r13d
movq (%rbx), %rax
movq (%rax), %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0xc14c
movq %rax, %r12
movq (%rbx), %rax
movq (%rax), %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0xc14c
movq %rax, %r13
pushq $0xf
popq %rax
movl %eax, 0x14(%r12)
movl %eax, 0x14(%r13)
movl 0x10(%r13), %eax
movl %eax, 0x18(%r12)
movl 0x10(%r12), %eax
movl %eax, 0x18(%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movsd %xmm0, 0x68(%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movsd %xmm0, 0x70(%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
xorl %esi, %esi
callq 0x1070
movupd 0x68(%r12), %xmm1
movapd %xmm1, %xmm2
mulpd %xmm1, %xmm2
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
movapd %xmm1, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
sqrtsd %xmm2, %xmm2
divsd %xmm2, %xmm0
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
divpd %xmm2, %xmm1
movupd %xmm1, 0x68(%r12)
movsd %xmm0, 0x78(%r12)
movupd %xmm1, 0x68(%r13)
movsd %xmm0, 0x78(%r13)
jmp 0x563d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: read_elements
void read_elements(FILE *fp, mesh theMesh)
/* This function calls the function fillTRIL() when the keyword 'elements'
 * is encountered. When other elements are implemented, the switch has to be
 * made in this little function.
 */
{ static char theKeyword[80];
  read_keyword(fp,theKeyword);

  /* make a 'switch' here when other element types are implemented: */
  if (!strcmp(theKeyword,"TRIL")) 
  { /* evaluate_level(GREEN,55); */
    fillTRIL(theMesh->mesh_e,fp); 
    return; 
  }
  else evaluate_level(YELLOW,58);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xee4d(%rip), %r15      # 0x145e0
movq %r15, %rsi
callq 0x5361
leaq 0x8080(%rip), %rsi      # 0xd822
pushq $0x5
popq %rdx
movq %r15, %rdi
callq 0x1140
testl %eax, %eax
je 0x57c1
pushq $0x1
popq %rdi
pushq $0x3a
popq %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xb0f8
movq 0x8(%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xc49c
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: read_material
void read_material(FILE *fp)
/* This function reads the material card */
{ static char theKeyword[80];
  /* evaluate_level(GREEN,62); */
  read_keyword(fp,theKeyword); modulus_of_elasticity = strtod(theKeyword,NULL);
  read_keyword(fp,theKeyword); poissons_ratio = strtod(theKeyword,NULL);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xee27(%rip), %r14      # 0x14630
movq %r14, %rsi
callq 0x5361
movq %r14, %rdi
xorl %esi, %esi
callq 0x1070
leaq 0xebd6(%rip), %rax      # 0x143f8
movsd %xmm0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5361
movq %r14, %rdi
xorl %esi, %esi
callq 0x1070
leaq 0xebbe(%rip), %rax      # 0x14400
movsd %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: write_universal_req
void write_universal_req(void)
/* This function sets the global switch for writing universal files */
{ WRITE_UNIVERSAL=YES;
  WRITE_SPECIAL=NO;
  WRITE_OBJ=NO;
  /*evaluate_level(GREEN,66);*/
}

// Assembly:
leaq 0xebc7(%rip), %rax      # 0x1441c
movl $0x1, (%rax)
leaq 0xebb6(%rip), %rax      # 0x14418
andl $0x0, (%rax)
leaq 0xebb4(%rip), %rax      # 0x14420
andl $0x0, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: write_special_req
void write_special_req(void)
/* This function sets the global switch for writing the special format */
{ WRITE_SPECIAL=YES;
  WRITE_UNIVERSAL=NO;
  WRITE_OBJ=NO;
  /* evaluate_level(GREEN,67); */
}

// Assembly:
leaq 0xeba1(%rip), %rax      # 0x14418
movl $0x1, (%rax)
leaq 0xeb98(%rip), %rax      # 0x1441c
andl $0x0, (%rax)
leaq 0xeb92(%rip), %rax      # 0x14420
andl $0x0, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: write_obj_req
void write_obj_req(void)
/* This function sets the global switch for writing the .OBJ format */
{ WRITE_SPECIAL=NO;
  WRITE_UNIVERSAL=NO;
  WRITE_OBJ=YES;
  evaluate_level(GREEN,65);
}

// Assembly:
leaq 0xeb7f(%rip), %rax      # 0x14418
andl $0x0, (%rax)
leaq 0xeb79(%rip), %rax      # 0x1441c
andl $0x0, (%rax)
leaq 0xeb73(%rip), %rax      # 0x14420
movl $0x1, (%rax)
pushq $0x41
popq %rsi
xorl %edi, %edi
jmp 0xb0f8
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: parse_contact
void parse_contact(char *name, cmesh theCMesh)
{ FILE *fp;
  static char theKeyword[80];
  point p;
  fprintf(stderr,"parsing contact...\n");
  if ( (fp=fopen(name,"r"))==(FILE *)NULL ) evaluate_level(RED,50);
  evaluate_level(GREEN,51);
  /* do something when a keyword is encountered: */
  while (!feof(fp))
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"CNODES")) fill_C_points(fp,theCMesh); 
  }
  /* calculate the cylinder normals: */
  p = (point)point_dll(theCMesh->merged_mesh->mesh_p,START,0);
  while (p!=(point)NULL)
  { if (p->type==CNODE) 
    { /* calculate_cyl_normal(p); */
      fprintf(stderr,"node %d, x: %f y %f z %f, has normals %f %f %f\n",p->label,
		p->x, p->y, p->z, p->n1, p->n2, p->n3);  
    }
    p=p->NEXT;
  }
  fprintf(stderr,"Contact parsed\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0xe41c(%rip), %rbp      # 0x13ff8
movq (%rbp), %rcx
leaq 0x8390(%rip), %rdi      # 0xdf77
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x1190
leaq 0x9079(%rip), %rsi      # 0xec72
movq %r14, %rdi
callq 0x1150
movq %rax, %r14
testq %rax, %rax
jne 0x5c14
pushq $0x2
popq %rdi
pushq $0x32
popq %rsi
callq 0xb0f8
pushq $0x33
popq %rsi
xorl %edi, %edi
callq 0xb0f8
leaq 0xeaab(%rip), %r15      # 0x146d0
leaq 0x82ff(%rip), %r12      # 0xdf2b
pushq $0x7
popq %r13
movq %r14, %rdi
callq 0x1100
testl %eax, %eax
jne 0x5c66
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1140
testl %eax, %eax
jne 0x5c30
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5622
jmp 0x5c30
movq (%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc14c
movq %rax, %rbx
leaq 0x830c(%rip), %r14      # 0xdf8b
testq %rbx, %rbx
je 0x5cc1
cmpl $0xf, 0x14(%rbx)
je 0x5c90
movq 0x8(%rbx), %rbx
jmp 0x5c7f
movq (%rbp), %rdi
movl 0x10(%rbx), %edx
movsd 0x20(%rbx), %xmm0
movsd 0x28(%rbx), %xmm1
movsd 0x30(%rbx), %xmm2
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movsd 0x78(%rbx), %xmm5
movq %r14, %rsi
movb $0x6, %al
callq 0x10f0
jmp 0x5c8a
movq (%rbp), %rcx
leaq 0x82ef(%rip), %rdi      # 0xdfbb
pushq $0xf
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/parse.c
// Function: parse_solution
void parse_solution(char *name, vector thesolutionvector)
{ FILE *fp;
  static char theKeyword[80];
  if ( (fp=fopen(name,"r"))==(FILE *)NULL ) evaluate_level(RED,50);
  evaluate_level(GREEN,51);
  /* do something when a keyword is encountered: */
  while (!feof(fp))
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"SOLUTION")) fill_solutionvector(fp,thesolutionvector);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
leaq 0x8f7a(%rip), %rsi      # 0xec72
callq 0x1150
movq %rax, %r14
testq %rax, %rax
jne 0x5d10
pushq $0x2
popq %rdi
pushq $0x32
popq %rsi
callq 0xb0f8
pushq $0x33
popq %rsi
xorl %edi, %edi
callq 0xb0f8
leaq 0xe9ff(%rip), %r15      # 0x14720
leaq 0x81f6(%rip), %r12      # 0xdf1e
pushq $0x9
popq %r13
movq %r14, %rdi
callq 0x1100
testl %eax, %eax
jne 0x5d62
movq %r14, %rdi
movq %r15, %rsi
callq 0x5361
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1140
testl %eax, %eax
jne 0x5d2c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5534
jmp 0x5d2c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: tijdbalkjec
void tijdbalkjec(int deKnoop)
{ /* deze functie tekent een nifty tijdbalkje om te kunnen zien of de
   * de software nog ergens mee bezig is...
   */
   float fraction;
   int pos, pos2;

   if (deKnoop==0) /* teken het tijdbalkje */
   { /* lengte van de lijn is 65 */
   fprintf(stderr,"\n* Building system of equations...\n");
fprintf(stderr,"=================================================================\n");
	 ccurpos = 0;
   }
   else if (deKnoop==-1) /* maak het tijdbalkje af */
		{
fprintf(stderr,"\n=================================================================\n\n");
		}
		else /* teken het percentage */
		{ fraction = (float)((float)deKnoop/(float)cn_nodes);
		  pos = (int)(fraction*(float)65.0);
		  if (pos>ccurpos) {
			pos2 = 0;
			while (pos2<pos)
			  { fprintf(stderr,">");
				pos2++;
              }
			  fprintf(stderr,"\r");
			}
            ccurpos=pos;
		}
}

// Assembly:
cmpl $-0x1, %edi
je 0x6117
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %edi, %edi
je 0x60da
cvtsi2ss %edi, %xmm0
cvtsi2ssl 0xe6ec(%rip), %xmm1 # 0x14770
divss %xmm1, %xmm0
mulss 0x6f74(%rip), %xmm0     # 0xd004
cvttss2si %xmm0, %ebp
cmpl %ebp, 0xe6e6(%rip)      # 0x14780
jge 0x60c9
xorl %r14d, %r14d
testl %ebp, %ebp
cmovgl %ebp, %r14d
movq 0xdf4c(%rip), %r15      # 0x13ff8
pushq $0x3e
popq %rbx
movq (%r15), %rsi
subl $0x1, %r14d
jb 0x60c1
movl %ebx, %edi
callq 0x10d0
jmp 0x60af
pushq $0xd
popq %rdi
callq 0x10d0
movl %ebp, 0xe6b1(%rip)      # 0x14780
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0xdf17(%rip), %r14      # 0x13ff8
movq (%r14), %rcx
leaq 0x80f5(%rip), %rdi      # 0xe1e0
pushq $0x23
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1190
movq (%r14), %rcx
leaq 0x7ed6(%rip), %rdi      # 0xdfd9
pushq $0x42
popq %rsi
movq %rbx, %rdx
callq 0x1190
andl $0x0, 0xe66b(%rip)      # 0x14780
jmp 0x60cf
movq 0xdeda(%rip), %rax      # 0x13ff8
movq (%rax), %rcx
leaq 0x6f22(%rip), %rdi      # 0xd04a
pushq $0x44
popq %rsi
pushq $0x1
popq %rdx
jmp 0x1190
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: init_integration_matricesc
void init_integration_matricesc(void)
{ int i;
  ctemp = (matrix)newmatrix(3,3);
  /* matrices for intermediate gauss integration values: */
  ctf=(matrix *)mymalloc(8*sizeof(matrix));
  if (ctf==(matrix *)NULL) evaluate_level(RED,108);
  cuf=(matrix *)mymalloc(8*sizeof(matrix));
  if (cuf==(matrix *)NULL) evaluate_level(RED,108);
  for (i=0; i<=7; i++) 
  { ctf[i]=(matrix)newmatrix(3,3);
    cuf[i]=(matrix)newmatrix(3,3);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x3
popq %rdi
movl %edi, %esi
callq 0xb24c
movq %rax, 0xe640(%rip)      # 0x14788
pushq $0x40
popq %rdi
callq 0xc068
movq %rax, 0xe639(%rip)      # 0x14790
testq %rax, %rax
jne 0x6167
pushq $0x2
popq %rdi
pushq $0x6c
popq %rsi
callq 0xb0f8
pushq $0x40
popq %rdi
callq 0xc068
movq %rax, 0xe622(%rip)      # 0x14798
testq %rax, %rax
jne 0x6186
pushq $0x2
popq %rdi
pushq $0x6c
popq %rsi
callq 0xb0f8
xorl %r14d, %r14d
pushq $0x3
popq %rbx
cmpq $0x8, %r14
je 0x61bf
movl %ebx, %edi
movl %ebx, %esi
callq 0xb24c
movq 0xe5ee(%rip), %rcx      # 0x14790
movq %rax, (%rcx,%r14,8)
movl %ebx, %edi
movl %ebx, %esi
callq 0xb24c
movq 0xe5e2(%rip), %rcx      # 0x14798
movq %rax, (%rcx,%r14,8)
incq %r14
jmp 0x618c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: init_linearc
void init_linearc(void)
{ 
  evaluate_level(GREEN,100);
  if (READ_SOLUTION==NO)
  { main_E=(matrix)newmatrix(3*cn_nodes,3*cn_nodes);
  }
  else main_E=(matrix)newmatrix(3,3);
  fillmatrix(main_E,ZEROFILL); 
  main_f=(vector)newvector(3*cn_nodes); fillvector(main_f,ZEROFILL);
  init_integration_matricesc();
  clocal=(matrix)newmatrix(3,3);
}

// Assembly:
pushq %rax
pushq $0x64
popq %rsi
xorl %edi, %edi
callq 0xb0f8
leaq 0xe24b(%rip), %rax      # 0x14424
cmpl $0x0, (%rax)
je 0x61e3
pushq $0x3
popq %rdi
jmp 0x61ea
imull $0x3, 0xe586(%rip), %edi # 0x14770
movl %edi, %esi
callq 0xb24c
leaq 0xe238(%rip), %rcx      # 0x14430
movq %rax, (%rcx)
movq %rax, %rdi
xorl %esi, %esi
callq 0xb45d
imull $0x3, 0xe564(%rip), %edi # 0x14770
callq 0xb358
leaq 0xe220(%rip), %rcx      # 0x14438
movq %rax, (%rcx)
movq %rax, %rdi
xorl %esi, %esi
callq 0xb5d1
callq 0x6133
pushq $0x3
popq %rdi
movl %edi, %esi
callq 0xb24c
movq %rax, 0xe565(%rip)      # 0x147a0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: close_linearc
void close_linearc(void)
{ int i;
  evaluate_level(GREEN,101); 
  delmatrix(ctemp);
  delmatrix(clocal);

  for (i=0; i<=7; i++) 
  { delmatrix(ctf[i]);
	delmatrix(cuf[i]);
  }
  myfree(ctf);
  myfree(cuf);
  
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
pushq $0x65
popq %rsi
xorl %edi, %edi
callq 0xb0f8
movq 0xe537(%rip), %rdi      # 0x14788
callq 0xb3b2
movq 0xe543(%rip), %rdi      # 0x147a0
callq 0xb3b2
movq 0xe527(%rip), %rdi      # 0x14790
cmpq $0x8, %rbx
je 0x628d
movq (%rdi,%rbx,8), %rdi
callq 0xb3b2
movq 0xe519(%rip), %rax      # 0x14798
movq (%rax,%rbx,8), %rdi
callq 0xb3b2
incq %rbx
jmp 0x6262
callq 0xc09f
movq 0xe4ff(%rip), %rdi      # 0x14798
popq %rbx
jmp 0xc09f
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: init_normal_integrationc
void init_normal_integrationc( point sn, element e )
{ /* IN:          sourcenode 'sn', element e;
   * OUT:         nothing
   * MODIFIES:    the matrix arrays ctf[] and cuf[]
   * USES:        fsol3d module
   * DESCRIPTION: This function fills the matrix arrays cuf[] and ctf[] with
   *              the fundamental solutions in the gauss points. This is 
   *              done once for each element.
   */
int i;            /* counter */
double cx, cy, cz;  /* fieldpoint coordinates */

   for (i=1; i<=7; i++)
   { cx = cxi1[i]*e->p1x + cxi2[i]*e->p2x + cxi3[i]*e->p3x;
     cy = cxi1[i]*e->p1y + cxi2[i]*e->p2y + cxi3[i]*e->p3y;
     cz = cxi1[i]*e->p1z + cxi2[i]*e->p2z + cxi3[i]*e->p3z;
     makeUFandTF(cuf[i],ctf[i],sn->x,sn->y,sn->z,cx,cy,cz,e->nx,e->ny,e->nz);
   }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
leaq 0xde36(%rip), %r12      # 0x140f0
leaq 0xde6f(%rip), %r13      # 0x14130
leaq 0xdea8(%rip), %rbp      # 0x14170
cmpq $0x38, %r15
je 0x639b
movsd 0x8(%r15,%r12), %xmm0
movsd 0x8(%r15,%r13), %xmm1
movsd 0x40(%rbx), %xmm2
mulsd %xmm1, %xmm2
movsd 0x28(%rbx), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm2, %xmm4
movsd 0x8(%r15,%rbp), %xmm5
movsd 0x58(%rbx), %xmm3
mulsd %xmm5, %xmm3
addsd %xmm4, %xmm3
movsd 0x48(%rbx), %xmm2
mulsd %xmm1, %xmm2
movsd 0x30(%rbx), %xmm6
mulsd %xmm0, %xmm6
addsd %xmm2, %xmm6
movsd 0x60(%rbx), %xmm4
mulsd %xmm5, %xmm4
addsd %xmm6, %xmm4
mulsd 0x50(%rbx), %xmm1
mulsd 0x38(%rbx), %xmm0
mulsd 0x68(%rbx), %xmm5
addsd %xmm1, %xmm0
addsd %xmm0, %xmm5
movq 0xe44d(%rip), %rax      # 0x14798
movq 0x8(%rax,%r15), %rdi
movq 0xe439(%rip), %rax      # 0x14790
movq 0x8(%rax,%r15), %rsi
movsd 0x20(%r14), %xmm0
movsd 0x28(%r14), %xmm1
movsd 0x30(%r14), %xmm2
movsd 0xa0(%rbx), %xmm6
movsd 0xa8(%rbx), %xmm7
movsd 0xb0(%rbx), %xmm8
movsd %xmm8, (%rsp)
callq 0xaaa0
addq $0x8, %r15
jmp 0x62c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: collocatec
void collocatec(point sourcenode,element fieldelement,
			   hypermatrix c,hypermatrix e)
{ /* IN:          see prototype
   * OUT:         nothing
   * MODIFIES:    matrices c and e
   * USES:        nothing
   * DESCRIPTION: This function collocates the sourcenode to the nodes of
   *              the element fieldelement.
   */

  /* First the normal integrations: */
   if ( (sourcenode->label!=fieldelement->p1) &&
	(sourcenode->label!=fieldelement->p2) &&
	(sourcenode->label!=fieldelement->p3) )
   {    init_normal_integrationc(sourcenode,fieldelement);
	norm_intc( fieldelement, c, e);
	return;
   } /* if */

  /* Singular integrations: */
   if ( (sourcenode->label==fieldelement->p1) ||
	(sourcenode->label==fieldelement->p2) ||
	(sourcenode->label==fieldelement->p3) )
   {    sing_int( fieldelement, c, e, sourcenode->label ); 
	return;
   } /* if */

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl 0x10(%rdi), %ecx
cmpl 0x18(%rsi), %ecx
je 0x660e
cmpl 0x1c(%r15), %ecx
jne 0x6621
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x880a
cmpl 0x20(%r15), %ecx
jne 0x6633
cmpl 0x20(%r15), %ecx
je 0x660e
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rsi
callq 0x629f
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x63aa
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: make_rhs_vectorc
void make_rhs_vectorc(mesh theMesh)
{ restraint r;
  point p;

  fillvector(main_u,ZEROFILL); 
  fillvector(main_f,ZEROFILL);

  r=(restraint)restraint_dll(theMesh->mesh_t,START,0);
  while (r!=(restraint)NULL)
  { V(main_u,r->label*3-2)=r->f1;
    V(main_u,r->label*3-1)=r->f2;
    V(main_u,r->label*3  )=r->f3;
    r=r->NEXT;
  }
  r=(restraint)restraint_dll(theMesh->mesh_d,START,0);
  while (r!=(restraint)NULL)
  { V(main_u,r->label*3-2)=r->u1;
    V(main_u,r->label*3-1)=r->u2;
    V(main_u,r->label*3  )=r->u3;
    r=r->NEXT;
  }

  p=(point)point_dll(theMesh->mesh_p,START,0);
  while (p!=(point)NULL)
  { if (p->type==CNODE)
    { V(main_u,p->label*3-2)=0.0;
      V(main_u,p->label*3-1)=0.0;
      V(main_u,p->label*3  )=0.0;
    }
    p=p->NEXT;
  } 

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xdacc(%rip), %r14      # 0x14440
movq (%r14), %rdi
xorl %esi, %esi
callq 0xb5d1
leaq 0xdab3(%rip), %rax      # 0x14438
movq (%rax), %rdi
xorl %esi, %esi
callq 0xb5d1
movq 0x18(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc3a0
movq (%r14), %rcx
testq %rax, %rax
je 0x69d7
movsd 0x18(%rax), %xmm0
movq 0x8(%rcx), %rdx
movslq 0x14(%rax), %rsi
imulq $0x18, %rsi, %rsi
movsd %xmm0, -0x18(%rdx,%rsi)
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x10(%rdx,%rsi)
movsd 0x28(%rax), %xmm0
movsd %xmm0, -0x8(%rdx,%rsi)
movq 0x8(%rax), %rax
jmp 0x699f
movq 0x10(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc3a0
movq (%r14), %rcx
testq %rax, %rax
je 0x6a1f
movsd 0x30(%rax), %xmm0
movq 0x8(%rcx), %rdx
movslq 0x14(%rax), %rsi
imulq $0x18, %rsi, %rsi
movsd %xmm0, -0x18(%rdx,%rsi)
movsd 0x38(%rax), %xmm0
movsd %xmm0, -0x10(%rdx,%rsi)
movsd 0x40(%rax), %xmm0
movsd %xmm0, -0x8(%rdx,%rsi)
movq 0x8(%rax), %rax
jmp 0x69e7
movq (%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc14c
movq (%r14), %rcx
xorps %xmm0, %xmm0
testq %rax, %rax
je 0x6a59
cmpl $0xf, 0x14(%rax)
jne 0x6a53
movq 0x8(%rcx), %rdx
movslq 0x10(%rax), %rsi
imulq $0x18, %rsi, %rsi
movups %xmm0, -0x18(%rdx,%rsi)
andq $0x0, -0x8(%rdx,%rsi)
movq 0x8(%rax), %rax
jmp 0x6a31
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: plug_inc
void plug_inc(int label, hypermatrix erow)
{ int i;
  for (i=1; i<=cn_nodes; i++)
  { M(main_E,label*3-2,i*3-2)=H(erow,1,1,i);
    M(main_E,label*3-2,i*3-1)=H(erow,1,2,i);
    M(main_E,label*3-2,i*3  )=H(erow,1,3,i);

    M(main_E,label*3-1,i*3-2)=H(erow,2,1,i);
    M(main_E,label*3-1,i*3-1)=H(erow,2,2,i);
    M(main_E,label*3-1,i*3  )=H(erow,2,3,i);

    M(main_E,label*3  ,i*3-2)=H(erow,3,1,i);
    M(main_E,label*3  ,i*3-1)=H(erow,3,2,i);
    M(main_E,label*3  ,i*3  )=H(erow,3,3,i);
  }
}

// Assembly:
pushq %rbx
movslq 0xdd07(%rip), %rax      # 0x14770
leaq 0xd9c0(%rip), %rcx      # 0x14430
movq (%rcx), %rcx
leal (%rdi,%rdi,2), %edx
movslq %edx, %rdx
movabsq $0x1, %rdi
movabsq $0x2, %r8
cmpq %rax, %rdi
jg 0x6b3b
movq 0x8(%rsi), %r9
movq (%r9,%rdi,8), %r9
movq 0x8(%r9), %r9
movq (%r9), %r10
movsd (%r10), %xmm0
movq 0x8(%rcx), %r11
movq -0x18(%r11,%rdx,8), %rbx
movsd %xmm0, -0x10(%rbx,%r8,8)
movsd 0x8(%r10), %xmm0
movsd %xmm0, -0x8(%rbx,%r8,8)
movsd 0x10(%r10), %xmm0
movsd %xmm0, (%rbx,%r8,8)
movq 0x8(%r9), %r10
movsd (%r10), %xmm0
movq -0x10(%r11,%rdx,8), %rbx
movsd %xmm0, -0x10(%rbx,%r8,8)
movsd 0x8(%r10), %xmm0
movsd %xmm0, -0x8(%rbx,%r8,8)
movsd 0x10(%r10), %xmm0
movsd %xmm0, (%rbx,%r8,8)
movq 0x10(%r9), %r9
movsd (%r9), %xmm0
movq -0x8(%r11,%rdx,8), %r10
movsd %xmm0, -0x10(%r10,%r8,8)
movsd 0x8(%r9), %xmm0
movsd %xmm0, -0x8(%r10,%r8,8)
movsd 0x10(%r9), %xmm0
movsd %xmm0, (%r10,%r8,8)
incq %rdi
addq $0x3, %r8
jmp 0x6a8d
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/contactc.c
// Function: contact3
void contact3(cmesh theCMesh)
{ point       sourcenode;
  hypermatrix c;
  hypermatrix e;
  hypermatrix crow;
  hypermatrix erow;
  mesh theMesh;

  theMesh=theCMesh->merged_mesh;

  printstatusc(theMesh);
  init_linearc();


if (READ_SOLUTION==NO)
{
  c=(hypermatrix)newhypermatrix(3,3,3);
  e=(hypermatrix)newhypermatrix(3,3,3);
  crow=(hypermatrix)newhypermatrix(3,3,cn_nodes);
  erow=(hypermatrix)newhypermatrix(3,3,cn_nodes);

  tijdbalkjec(0);
  sourcenode=(point)point_dll(theMesh->mesh_p,START,0);
  while (sourcenode!=(point)NULL)
  { tijdbalkjec(sourcenode->label); 
    make_rowc(sourcenode,crow,erow,c,e,theCMesh);
    make_a(sourcenode,crow,erow,theCMesh);
    plug_inc(sourcenode->label,crow); 
    sourcenode=sourcenode->NEXT;
  }

  tijdbalkjec(-1);

  delhypermatrix(c);
  delhypermatrix(e);
  delhypermatrix(crow);
  delhypermatrix(erow);
} /* if READ_SOLUTION is is NO */

  close_linearc();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rbp
movq %rbp, %rdi
callq 0x5d6c
callq 0x61c7
leaq 0xcb81(%rip), %rax      # 0x14424
cmpl $0x0, (%rax)
jne 0x797f
pushq $0x3
popq %r13
movl %r13d, %edi
movl %r13d, %esi
movl %r13d, %edx
callq 0xb2dc
movq %rax, %r14
movl %r13d, %edi
movl %r13d, %esi
movl %r13d, %edx
callq 0xb2dc
movq %rax, %r15
movl 0xce98(%rip), %edx      # 0x14770
movl %r13d, %edi
movl %r13d, %esi
callq 0xb2dc
movq %rax, %r12
movl 0xce84(%rip), %edx      # 0x14770
movl %r13d, %edi
movl %r13d, %esi
callq 0xb2dc
movq %rax, %r13
xorl %edi, %edi
callq 0x6064
movq (%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xc14c
movq %rax, %rbp
testq %rbp, %rbp
je 0x7957
movl 0x10(%rbp), %edi
callq 0x6064
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x664e
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x7183
movl 0x10(%rbp), %edi
movq %r12, %rsi
callq 0x6a61
movq 0x8(%rbp), %rbp
jmp 0x7911
pushq $-0x1
popq %rdi
callq 0x6064
movq %r14, %rdi
callq 0xb405
movq %r15, %rdi
callq 0xb405
movq %r12, %rdi
callq 0xb405
movq %r13, %rdi
callq 0xb405
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x623d
nop
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/singular.c
// Function: init_singular
void init_singular(void)
{ /* IN:          nothing
   * OUT:         nothing
   * MODIFIES:    sinA1, sinA2, sinA3, cosA1, cosA2, cosA3, normal,
   *              n1, n2, n3
   * USES:        theElement
   * DESCRIPTION: Initialisation function for all globals of this module.
   */


  /* calculate the cosines and sines of the element corners: */
   sinA1 = sin( theElement->alpha1 );
   cosA1 = cos( theElement->alpha1 );

   sinA2 = sin( theElement->alpha2 );
   cosA2 = cos( theElement->alpha2 );

   sinA3 = sin( theElement->alpha3 );
   cosA3 = cos( theElement->alpha3 );

  /* copy the node coordinates in the arrays n1, n2 and n3: */
   n1[1]=theElement->p1x; n1[2]=theElement->p1y; n1[3]=theElement->p1z;
   n2[1]=theElement->p2x; n2[2]=theElement->p2y; n2[3]=theElement->p2z;
   n3[1]=theElement->p3x; n3[2]=theElement->p3y; n3[3]=theElement->p3z;

   normal[1] = theElement->nx;
   normal[2] = theElement->ny;
   normal[3] = theElement->nz;

}

// Assembly:
pushq %rax
movq 0xce14(%rip), %rax      # 0x147b0
movsd 0x70(%rax), %xmm0
callq 0x1160
movsd %xmm0, 0xce0a(%rip)     # 0x147b8
movq 0xcdfb(%rip), %rax      # 0x147b0
movsd 0x70(%rax), %xmm0
callq 0x10c0
movsd %xmm0, 0xcdf9(%rip)     # 0x147c0
movq 0xcde2(%rip), %rax      # 0x147b0
movsd 0x78(%rax), %xmm0
callq 0x1160
movsd %xmm0, 0xcde8(%rip)     # 0x147c8
movq 0xcdc9(%rip), %rax      # 0x147b0
movsd 0x78(%rax), %xmm0
callq 0x10c0
movsd %xmm0, 0xcdd7(%rip)     # 0x147d0
movq 0xcdb0(%rip), %rax      # 0x147b0
movsd 0x80(%rax), %xmm0
callq 0x1160
movsd %xmm0, 0xcdc3(%rip)     # 0x147d8
movq 0xcd94(%rip), %rax      # 0x147b0
movsd 0x80(%rax), %xmm0
callq 0x10c0
movsd %xmm0, 0xcdaf(%rip)     # 0x147e0
movq 0xcd78(%rip), %rax      # 0x147b0
movups 0x28(%rax), %xmm0
movups %xmm0, 0xcdb5(%rip)     # 0x147f8
movsd 0x38(%rax), %xmm0
movsd %xmm0, 0xcdb8(%rip)     # 0x14808
movups 0x40(%rax), %xmm0
movups %xmm0, 0xcdbd(%rip)     # 0x14818
movsd 0x50(%rax), %xmm0
movsd %xmm0, 0xcdc0(%rip)     # 0x14828
movups 0x58(%rax), %xmm0
movups %xmm0, 0xcdc5(%rip)     # 0x14838
movsd 0x68(%rax), %xmm0
movsd %xmm0, 0xcdc8(%rip)     # 0x14848
movups 0xa0(%rax), %xmm0
movups %xmm0, 0xcdca(%rip)     # 0x14858
movsd 0xb0(%rax), %xmm0
movsd %xmm0, 0xcdca(%rip)     # 0x14868
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/singular.c
// Function: make_v
double make_v(const vector v)
{ /* IN:          vector v which has to be filled
   * OUT:         beta
   * MODIFIES:    vector v
   * USES:        theElement
   * DESCRIPTION:
   * The vector v is calculated from the element data from theElement.
   * beta, i.e. v[1] is  returned.
   */

  /* first component: */
   V(v,1) = 1.0/tan(0.5*theElement->alpha2)
		  * 1.0/tan(0.5*theElement->alpha3);
   V(v,1) = log(V(v,1));

  /* second component: */
   V(v,2) = V(v,1)*cosA3
		  + theElement->z3/theElement->z2
		  - 1.0;
   V(v,2) = V(v,2) * theElement->z2/theElement->z1;

  /* third component: */
   V(v,3) = V(v,1)*cosA2
		  + theElement->z2/theElement->z3
		  - 1.0;
   V(v,3) = V(v,3) *theElement->z3/theElement->z1;

   return V(v,1);

}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xcaad(%rip), %rax      # 0x147b0
movsd 0x78(%rax), %xmm0
mulsd 0x5750(%rip), %xmm0     # 0xd460
callq 0x1130
movsd 0x52eb(%rip), %xmm1     # 0xd008
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq 0xca82(%rip), %rax      # 0x147b0
movsd 0x572a(%rip), %xmm0     # 0xd460
mulsd 0x80(%rax), %xmm0
callq 0x1130
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x8(%rbx), %rax
movsd %xmm1, (%rax)
movapd %xmm1, %xmm0
callq 0x10b0
movq 0x8(%rbx), %rax
movsd %xmm0, (%rax)
movq 0xca43(%rip), %rcx      # 0x147b0
movsd 0x98(%rcx), %xmm1
divsd 0x90(%rcx), %xmm1
movsd 0xca5b(%rip), %xmm2     # 0x147e0
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
movsd 0x623b(%rip), %xmm1     # 0xdfd0
addsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rax)
mulsd 0x90(%rcx), %xmm2
divsd 0x88(%rcx), %xmm2
movsd %xmm2, 0x8(%rax)
movsd 0x90(%rcx), %xmm2
divsd 0x98(%rcx), %xmm2
movsd 0xca05(%rip), %xmm3     # 0x147d0
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, 0x10(%rax)
mulsd 0x98(%rcx), %xmm3
divsd 0x88(%rcx), %xmm3
movsd %xmm3, 0x10(%rax)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movsd 0xc9b4(%rip), %xmm1     # 0x147b8
mulsd %xmm1, %xmm1
movsd 0x51f8(%rip), %xmm0     # 0xd008
divsd %xmm1, %xmm0
movq 0xc995(%rip), %rax      # 0x147b0
movq 0x8(%rdi), %rcx
movq 0x8(%rsi), %rsi
movq 0x8(%rdx), %rdx
movabsq $0x1, %rdi
leaq 0xc9d8(%rip), %r8       # 0x14810
leaq 0xc9b1(%rip), %r9       # 0x147f0
leaq 0xc9ea(%rip), %r10      # 0x14830
cmpq $0x4, %rdi
je 0x7f0f
movsd (%r8,%rdi,8), %xmm1
movsd (%r9,%rdi,8), %xmm3
subsd %xmm3, %xmm1
divsd 0x98(%rax), %xmm1
movsd (%r10,%rdi,8), %xmm2
subsd %xmm3, %xmm2
divsd 0x90(%rax), %xmm2
movapd %xmm0, %xmm3
mulsd %xmm1, %xmm3
movq -0x8(%rcx,%rdi,8), %r11
movq -0x8(%rsi,%rdi,8), %rbx
movapd %xmm0, %xmm4
mulsd %xmm2, %xmm4
movq -0x8(%rdx,%rdi,8), %r14
xorl %r15d, %r15d
cmpq $0x18, %r15
je 0x7f07
movsd 0x8(%r15,%r8), %xmm5
movsd 0x8(%r15,%r9), %xmm6
subsd %xmm6, %xmm5
divsd 0x98(%rax), %xmm5
movsd 0x8(%r15,%r10), %xmm7
subsd %xmm6, %xmm7
divsd 0x90(%rax), %xmm7
movapd %xmm3, %xmm6
mulsd %xmm5, %xmm6
movsd %xmm6, (%r11,%r15)
mulsd %xmm2, %xmm5
movapd %xmm1, %xmm6
mulsd %xmm7, %xmm6
addsd %xmm5, %xmm6
mulsd %xmm0, %xmm6
movsd %xmm6, (%rbx,%r15)
mulsd %xmm4, %xmm7
movsd %xmm7, (%r14,%r15)
addq $0x8, %r15
jmp 0x7e9c
incq %rdi
jmp 0x7e46
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movapd %xmm0, 0x20(%rsp)
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movapd %xmm0, 0x10(%rsp)
pushq $0x1
popq %r13
cmpq $0x4, %r13
je 0x8086
xorl %ebp, %ebp
cmpq $0x3, %rbp
je 0x807e
movq 0xc84d(%rip), %rax      # 0x147b0
movsd 0x80(%rax), %xmm0
subsd 0x70(%rax), %xmm0
movsd 0xc868(%rip), %xmm1     # 0x147e0
movaps %xmm1, 0x70(%rsp)
callq 0x10c0
movapd %xmm0, 0x60(%rsp)
movsd 0xc848(%rip), %xmm2     # 0x147d8
movapd %xmm2, 0x50(%rsp)
movq 0x8(%r12), %rax
movq -0x8(%rax,%r13,8), %rax
movsd 0xc828(%rip), %xmm0     # 0x147d0
movapd %xmm0, 0x40(%rsp)
movsd 0xc82a(%rip), %xmm1     # 0x147e0
addsd %xmm0, %xmm1
movsd 0xc806(%rip), %xmm0     # 0x147c8
mulsd 0x20(%rsp), %xmm0
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm1
movq 0x8(%r15), %rcx
movq -0x8(%rcx,%r13,8), %rcx
mulsd (%rcx,%rbp,8), %xmm1
movsd %xmm1, 0x8(%rsp)
movq 0xc7c5(%rip), %rcx      # 0x147b0
movsd 0x78(%rcx), %xmm0
subsd 0x70(%rcx), %xmm0
movsd (%rax,%rbp,8), %xmm1
movaps %xmm1, 0x30(%rsp)
callq 0x10c0
movq 0x8(%r14), %rax
movq -0x8(%rax,%r13,8), %rax
movapd 0x70(%rsp), %xmm1
unpcklpd 0x40(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0]
movapd 0x60(%rsp), %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
subpd %xmm2, %xmm1
movapd 0x50(%rsp), %xmm2
movhpd 0xc793(%rip), %xmm2     # xmm2 = xmm2[0],mem[0]
movapd %xmm2, %xmm0
mulpd 0x10(%rsp), %xmm0
mulpd %xmm2, %xmm0
addpd %xmm1, %xmm0
movapd 0x30(%rsp), %xmm1
movhpd (%rax,%rbp,8), %xmm1    # xmm1 = xmm1[0],mem[0]
mulpd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movq 0x8(%rbx), %rax
movq -0x8(%rax,%r13,8), %rax
movsd %xmm1, (%rax,%rbp,8)
incq %rbp
jmp 0x7f52
incq %r13
jmp 0x7f46
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/markpeerdeman[P]mbemm/src/emath/singular.c
// Function: make_D
void make_D( const matrix D, const double beta )
{ /* IN:          matrix D, beta
   * OUT:         nothing 
   * MODIFIES:    matrix D
   * USES:        data from theElement
   * DESCRIPTION: This function fills the D matrix and returns the value
   *              for beta, which has to be used for calculating the 
   *              S matrix.
   */

   M(D,2,3) = (n3[1]-n2[1])/theElement->z1;
   M(D,2,3) = M(D,2,3) * beta;

   M(D,3,1) = (n3[2]-n2[2])/theElement->z1;
   M(D,3,1) = M(D,3,1) * beta;

   M(D,1,2) = (n3[3]-n2[3])/theElement->z1;
   M(D,1,2) = M(D,1,2) * beta;

   M(D,3,2) = -M(D,2,3); 
   M(D,1,3) = -M(D,3,1);
   M(D,2,1) = -M(D,1,2);

   M(D,1,1) = 0.0;
   M(D,2,2) = 0.0;
   M(D,3,3) = 0.0;

}

// Assembly:
movsd 0xc358(%rip), %xmm1     # 0x14838
subsd 0xc330(%rip), %xmm1     # 0x14818
movq 0xc2c1(%rip), %rcx      # 0x147b0
divsd 0x88(%rcx), %xmm1
movq 0x8(%rdi), %rdx
movq 0x8(%rdx), %rax
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rax)
movsd 0xc330(%rip), %xmm1     # 0x14840
subsd 0xc308(%rip), %xmm1     # 0x14820
divsd 0x88(%rcx), %xmm1
movq 0x10(%rdx), %rsi
mulsd %xmm0, %xmm1
movsd %xmm1, (%rsi)
movsd 0xc314(%rip), %xmm1     # 0x14848
subsd 0xc2ec(%rip), %xmm1     # 0x14828
divsd 0x88(%rcx), %xmm1
movq (%rdx), %rcx
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rcx)
movsd 0x10(%rax), %xmm0
movaps 0x4ac4(%rip), %xmm1     # 0xd020
xorps %xmm1, %xmm0
movlps %xmm0, 0x8(%rsi)
movsd (%rsi), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, 0x10(%rcx)
movsd 0x8(%rcx), %xmm0
xorps %xmm1, %xmm0
movlps %xmm0, (%rax)
andq $0x0, (%rcx)
andq $0x0, 0x8(%rax)
andq $0x0, 0x10(%rsi)
retq