LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/matrices.c
// Function: matvecmul
void matvecmul(matrix A, vector F)
/* matvecmul multiplies matrix A with vector F, the result is put in F */
{ int rowrunner, colrunner;
  double tmpval;
  double tmp;
  vector tmpv;
  int rows;
  int cols;
  rows=F->rows;
  cols=A->cols;
  tmpv=(vector)newvector(F->rows);
  for (rowrunner=1; rowrunner<=rows; rowrunner++)
  { tmpval = (double)0.0;
	for (colrunner=1; colrunner<=cols; colrunner++)
	  { tmp=(double)M(A,rowrunner,colrunner)*(double)V(F,colrunner);
		tmpval=tmpval+tmp;
	  }
	V(tmpv,rowrunner)=tmpval;
  }    
  for (rows=1; rows<=F->rows; rows++)
  { V(F,rows) = V(tmpv,rows);
  }
  delvector(tmpv);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl (%rsi), %r12d
movl 0x4(%rdi), %r13d
movl %r12d, %edi
callq 0xbde7
movq %rax, %rbx
testl %r12d, %r12d
jle 0xc788
movq 0x8(%rbx), %rax
leal 0x1(%r13), %ecx
incq %r12
decq %rcx
movl $0x1, %edx
testl %r13d, %r13d
jle 0xc776
movq 0x8(%r15), %rsi
movq -0x8(%rsi,%rdx,8), %rsi
movq 0x8(%r14), %rdi
xorpd %xmm0, %xmm0
xorl %r8d, %r8d
movsd (%rsi,%r8,8), %xmm1
mulsd (%rdi,%r8,8), %xmm1
addsd %xmm1, %xmm0
incq %r8
cmpq %r8, %rcx
jne 0xc75c
jmp 0xc77a
xorpd %xmm0, %xmm0
movsd %xmm0, -0x8(%rax,%rdx,8)
incq %rdx
cmpq %r12, %rdx
jne 0xc743
movl (%r14), %eax
testl %eax, %eax
jle 0xc7ab
movq 0x8(%rbx), %rcx
movq 0x8(%r14), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0xc799
movq 0x8(%rbx), %rdi
callq 0xce88
movq %rbx, %rdi
callq 0xce88
leaq 0x8c61(%rip), %rax      # 0x15424
incl (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/matrices.c
// Function: printmatrix
void printmatrix(matrix m, char *text)
{  int i,j;
   printf("  Printmatrix: %s\n",text);
   for (i=1; i<=m->rows; i+=1)
   {
	 { for (j=1; j<=m->cols; j+=1)
	    printf(" % 8.8E",M(m,i,j)); 
	     /*if ( (fabs(M(m,i  ,j  ))>1.0E-20) ||
			  (fabs(M(m,i  ,j+1))>1.0E-20) ||
			  (fabs(M(m,i  ,j+2))>1.0E-20) ||
	          (fabs(M(m,i+1,j  ))>1.0E-20) ||
			  (fabs(M(m,i+1,j+1))>1.0E-20) ||
			  (fabs(M(m,i+1,j+2))>1.0E-20) ||
	          (fabs(M(m,i+2,j  ))>1.0E-20) ||
			  (fabs(M(m,i+2,j+1))>1.0E-20) ||
			  (fabs(M(m,i+2,j+2))>1.0E-20) 
		    ) printf("#"); else printf("0");  */
	 }
	 printf("\n");
   }
   text=text;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3c52(%rip), %rdi      # 0x10460
xorl %eax, %eax
callq 0x1090
cmpl $0x0, (%rbx)
jle 0xc86e
movl $0x1, %r15d
leaq 0x3c4c(%rip), %r14      # 0x10473
cmpl $0x0, 0x4(%rbx)
jle 0xc855
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movq -0x8(%rax,%r15,8), %rax
movsd (%rax,%r12,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x1090
movslq 0x4(%rbx), %rax
incq %r12
cmpq %rax, %r12
jl 0xc830
movl $0xa, %edi
callq 0x1040
leaq 0x1(%r15), %rax
movslq (%rbx), %rcx
cmpq %rcx, %r15
movq %rax, %r15
jl 0xc827
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/matrices.c
// Function: printhypermatrix
void printhypermatrix(hypermatrix hm, char *text)
{ int i;
  printf("  printhypermatrix: %s\n",text);
  for (i=1; i<=hm->dimension; i++)
	{ printf("   dim: %d\n",i);
	  printmatrix(hm->data[i],"matrix");
    }
  text=text;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3bef(%rip), %rdi      # 0x1047b
xorl %eax, %eax
callq 0x1090
cmpl $0x0, (%rbx)
jle 0xc8d8
movl $0x1, %r15d
leaq 0x3bee(%rip), %r14      # 0x10493
leaq 0x1813(%rip), %r12      # 0xe0bf
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1090
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r12, %rsi
callq 0xc7fc
leaq 0x1(%r15), %rax
movslq (%rbx), %rcx
cmpq %rcx, %r15
movq %rax, %r15
jl 0xc8ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/matrices.c
// Function: printvector
void printvector(vector v, char *text)
{ int i;
  printf("  Printvector: %s\n",text);
  for (i=1; i<=v->rows; i++)
	printf(" %+8.8E\n",V(v,i));
  text=text;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x3bac(%rip), %rdi      # 0x1049f
xorl %eax, %eax
callq 0x1090
cmpl $0x0, (%rbx)
jle 0xc928
xorl %r15d, %r15d
leaq 0x3ba9(%rip), %r14      # 0x104b2
movq 0x8(%rbx), %rax
movsd (%rax,%r15,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x1090
movslq (%rbx), %rax
incq %r15
cmpq %rax, %r15
jl 0xc909
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/matrices.c
// Function: matcopy3x3
void matcopy3x3( matrix source, matrix dest )
{ M(dest,1,1)=M(source,1,1);
  M(dest,1,2)=M(source,1,2);
  M(dest,1,3)=M(source,1,3);
  M(dest,2,1)=M(source,2,1);
  M(dest,2,2)=M(source,2,2);
  M(dest,2,3)=M(source,2,3);
  M(dest,3,1)=M(source,3,1);
  M(dest,3,2)=M(source,3,2);
  M(dest,3,3)=M(source,3,3);
}

// Assembly:
movq 0x8(%rdi), %rax
movq (%rax), %rcx
movsd (%rcx), %xmm0
movq 0x8(%rsi), %rdx
movq (%rdx), %rsi
movsd %xmm0, (%rsi)
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%rsi)
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x10(%rsi)
movq 0x8(%rax), %rcx
movsd (%rcx), %xmm0
movq 0x8(%rdx), %rsi
movsd %xmm0, (%rsi)
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%rsi)
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x10(%rsi)
movq 0x10(%rax), %rax
movsd (%rax), %xmm0
movq 0x10(%rdx), %rcx
movsd %xmm0, (%rcx)
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rcx)
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/matrix.c
// Function: nn
void nn(int m, intvector nietnul,point po)
/* Zoekt de niet-nul kolommen op en slaat de index van deze kolommen
   op in de vector nietnul en een nul in het andere geval */
{
  int teller1,teller2;
  point thep;
  
  teller1=0; teller2=0;
  thep=(point)point_dll(po,START,0);
  
  while (thep!=(point)NULL)
    { 
      if (thep->type==CNODE)
	{ 
	  if (thep->label*3-3<m) 
	    { 
	      teller1++;	
	      V(nietnul,thep->label*3-3)=teller1;
	      teller1++;	
	      V(nietnul,thep->label*3-2)=teller1;
	      teller1++;	
	      V(nietnul,thep->label*3-1)=teller1;
	    }
	  else 
	    { 
	      teller2++;	
	      V(nietnul,thep->label*3-3)=teller2;  
	      teller2++;	
	      V(nietnul,thep->label*3-2)=teller2;  
	      teller2++;	
	      V(nietnul,thep->label*3-1)=teller2;  
	    }
	}  
      else
	{
	  V(nietnul,thep->label*3-3)=0;
	  V(nietnul,thep->label*3-2)=0;
	  V(nietnul,thep->label*3-1)=0;
	}
      thep=thep->NEXT;
    }
  
  p=teller1; /* aantal niet-nul kolommen in het linkergedeelte */
  q=teller2; /* aantal niet-nul kolommen in het rechtergedeelte */
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
xorl %r14d, %r14d
movq %rdx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xcf07
movl $0x0, %ecx
testq %rax, %rax
je 0xcca9
xorl %ecx, %ecx
xorl %r14d, %r14d
cmpl $0xf, 0x14(%rax)
jne 0xcc51
movslq 0x10(%rax), %rdx
leaq (%rdx,%rdx,2), %rsi
leal -0x3(%rsi), %edx
cmpl %ebp, %edx
jge 0xcc71
leal 0x1(%r14), %edi
movq 0x8(%rbx), %rdx
movl %edi, -0xc(%rdx,%rsi,4)
leal 0x2(%r14), %esi
movslq 0x10(%rax), %rdi
leaq (%rdi,%rdi,2), %rdi
movl %esi, -0x8(%rdx,%rdi,4)
addl $0x3, %r14d
movl %r14d, %esi
jmp 0xcc90
movq 0x8(%rbx), %rdx
movslq 0x10(%rax), %rsi
leaq (%rsi,%rsi,2), %rdi
xorl %esi, %esi
movl %esi, -0xc(%rdx,%rdi,4)
movslq 0x10(%rax), %rdi
leaq (%rdi,%rdi,2), %rdi
movl %esi, -0x8(%rdx,%rdi,4)
jmp 0xcc90
leal 0x1(%rcx), %edi
movq 0x8(%rbx), %rdx
movl %edi, -0xc(%rdx,%rsi,4)
leal 0x2(%rcx), %esi
movslq 0x10(%rax), %rdi
leaq (%rdi,%rdi,2), %rdi
movl %esi, -0x8(%rdx,%rdi,4)
addl $0x3, %ecx
movl %ecx, %esi
movslq 0x10(%rax), %rdi
leaq (%rdi,%rdi,2), %rdi
movl %esi, -0x4(%rdx,%rdi,4)
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0xcc17
movl %r14d, 0x8c40(%rip)     # 0x158f0
movl %ecx, 0x8c3e(%rip)      # 0x158f4
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/matrix.c
// Function: verwijdernullen
void verwijdernullen(int m,int n,matrix Ma, intvector nietnul,point po )
/* Transformeert de matrix M in een tweetal matrices N1 en N2 die ontstaan
   uit M door uit respectievelijk de bovenste helft en de onderste helft
   de nul-kolommen weg te halen */
{ 
  int i,j,k;
  
  nn(m, nietnul, po);
  
  /* We schuiven in het bovenste gedeelte de niet-nul kolommen naar 
     links */

  k=0;
  for (j=m;j<m+n;j++)
    {
      if (V(nietnul,j)!=0)
	{	
	  for (i=0;i<m;i++)	   
	    M(Ma,i,m+k)=M(Ma,i,j);	   	  
	  k++;
	}	
    }
  
  k=1;
  for (j=m-1;j>=0;j--)
    {
      if (V(nietnul,j)!=0)
	{	
	  for (i=0;i<n;i++)
	    M(Ma,m+i,m-k)=M(Ma,m+i,j); 
	  k++;
	}		
    } 
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %rbx
movl %esi, %r14d
movl %edi, %r15d
movq %rcx, %rsi
movq %r8, %rdx
callq 0xcbec
movl %r15d, %eax
testl %r14d, %r14d
jle 0xcd2e
leal (%r14,%r15), %esi
movq 0x8(%r12), %rcx
movslq %r15d, %rdx
movslq %esi, %rsi
xorl %edi, %edi
cmpl $0x0, (%rcx,%rdx,4)
je 0xcd26
testl %r15d, %r15d
jle 0xcd24
movq 0x8(%rbx), %r8
leal (%rdi,%r15), %r9d
movslq %r9d, %r9
xorl %r10d, %r10d
movq (%r8,%r10,8), %r11
movsd (%r11,%rdx,8), %xmm0
movsd %xmm0, (%r11,%r9,8)
incq %r10
cmpq %r10, %rax
jne 0xcd0c
incl %edi
incq %rdx
cmpq %rsi, %rdx
jl 0xccf3
testl %r15d, %r15d
jle 0xcd8e
movq 0x8(%r12), %rcx
movl %r14d, %edx
movl $0x1, %esi
leaq (,%rax,8), %rdi
leaq -0x1(%rax), %r8
cmpl $0x0, -0x4(%rcx,%rax,4)
je 0xcd85
testl %r14d, %r14d
jle 0xcd83
movl %r15d, %r9d
subl %esi, %r9d
movslq %r9d, %r9
movq 0x8(%rbx), %r10
addq %rdi, %r10
xorl %r11d, %r11d
movq (%r10,%r11,8), %r12
movsd (%r12,%r8,8), %xmm0
movsd %xmm0, (%r12,%r9,8)
incq %r11
cmpq %r11, %rdx
jne 0xcd6b
incl %esi
cmpq $0x1, %rax
movq %r8, %rax
jg 0xcd48
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/matrix.c
// Function: hetelement
double hetelement(int m, int i, int j, intvector nietnul, matrix Ma)
/* Bepaalt het hetelement (i,j) van de oorspronkelijke matrix M uit de nieuwe
   matrix Ma */
{  
  if (i<m)
    {	
      if (j<m) 
	return M(Ma,i,j);
      else	
	{
	  if (V(nietnul,j)!=0)
	    return M(Ma,i,m+V(nietnul,j)-1);
	  else	return 0;
	}	
    }
  else	
    {
      if (j>=m)
	{	
	  return M(Ma,i,j);
	}	
      else	
	{
	  if (V(nietnul,j)!=0)
	    return M(Ma,i,m-p+V(nietnul,j)-1);
	  else return 0;
	}	
    }
}

// Assembly:
cmpl %edi, %esi
jge 0xcdbf
cmpl %edi, %edx
jl 0xcdf0
movq 0x8(%rcx), %rax
movslq %edx, %rcx
movl (%rax,%rcx,4), %eax
testl %eax, %eax
je 0xce07
movq 0x8(%r8), %rcx
movslq %esi, %rdx
movq (%rcx,%rdx,8), %rcx
addl %edi, %eax
jmp 0xcde4
cmpl %edi, %edx
jge 0xcdf0
movq 0x8(%rcx), %rax
movslq %edx, %rcx
movl (%rax,%rcx,4), %eax
testl %eax, %eax
je 0xce07
movq 0x8(%r8), %rcx
movslq %esi, %rdx
movq (%rcx,%rdx,8), %rcx
addl %edi, %eax
subl 0x8b0c(%rip), %eax      # 0x158f0
cltq
leaq (%rcx,%rax,8), %rax
addq $-0x8, %rax
jmp 0xce02
movq 0x8(%r8), %rcx
movslq %esi, %rsi
movslq %edx, %rax
shlq $0x3, %rax
addq (%rcx,%rsi,8), %rax
movsd (%rax), %xmm0
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/memstat.c
// Function: mymalloc
const void *mymalloc(const size_t size)
{ const void *p; 
  if (size==0) fprintf(stderr,"MYMALLOC CALLED WITH 0 LENGTH!\n");
  p = (void *)malloc(size);
  current_allocated++;
  return p;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0xce81
movq %rbx, %rdi
callq 0x1130
incl 0x8a79(%rip)            # 0x158f8
popq %rbx
retq
callq 0x353c
jmp 0xce71
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/memstat.c
// Function: myfree
void myfree(void *p)
{ if (p==NULL) {
	fprintf(stderr,"MYFREE CALLED FOR SOMETHING THAT IS NOT ALLOCATED!\n"); 
	p=p;
  }
  free(p);
  current_allocated--;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0xcea1
movq %rbx, %rdi
callq 0x1030
decl 0x8a59(%rip)            # 0x158f8
popq %rbx
retq
callq 0x3558
jmp 0xce91
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/points.c
// Function: newpoint
point newpoint( void )
{ point p;
  if ( (p=(point)mymalloc(sizeof(pointtype))) == (point)NULL )
    evaluate_level(RED,10);
  p->PREV=(point)NULL; p->NEXT=(point)NULL; p->label = -1;
  p->type=NODE; p->conn=0;
  return p;
}

// Assembly:
pushq %rbx
movl $0x88, %edi
callq 0xce68
movq %rax, %rbx
testq %rax, %rax
jne 0xcee2
movl $0x2, %edi
movl $0xa, %esi
callq 0xbc50
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movabsq $0xbffffffff, %rax      # imm = 0xBFFFFFFFF
movq %rax, 0x10(%rbx)
movl $0x0, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/points.c
// Function: point_dll
point point_dll( point thedll, const int command, const int label )
{ point thecopy;
  /* make a copy of the incoming point for certain commands: */
  if ( (command==APPEND)||(command==NEW) )
  { thecopy=newpoint(); thecopy->label=-1; thecopy->x=0.0;
    thecopy->y=0.0; thecopy->z=0.0;
  }
  switch(command) {
    case START:  { while(thedll->PREV!=(point)NULL) thedll=thedll->PREV;
                   thedll=thedll->NEXT; /* because first item isn't used */
		   return thedll;
		 }
	case END:    { while((thedll!=(point)NULL)&&
	               (thedll->NEXT!=(point)NULL)) thedll=thedll->NEXT;
		   return thedll;
		 }
    case SEARCH: { thedll=point_dll(thedll,START,0);
		   while((thedll->label!=label)&&(thedll->NEXT!=(point)NULL))
		     thedll=thedll->NEXT;
		   if (thedll->label==label) return thedll;
		   else
		   {   evaluate_level(YELLOW,11);
			   return (point)NULL;
		   }
		 }
    case APPEND: { point_dll(thedll,END,0);
		   thedll->NEXT=thecopy;
		   thecopy->NEXT=(point)NULL;
		   thecopy->PREV=thedll;
		   return thecopy;
		 }
    case NEW:    { thecopy->PREV=(point)NULL;
		   thecopy->NEXT=(point)NULL;
		   return thecopy;
		 }
    case KILL:   { thedll=point_dll(thedll,END,0);
		   while(thedll->PREV!=(point)NULL)
		   { thedll=thedll->PREV;
		     myfree(thedll->NEXT);
		   }
		   myfree(thedll);
		   return (point)NULL;
		 }
    default:     { evaluate_level(YELLOW,12);
		 }
  } /* switch */
return (point)NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leal -0x3(%r14), %ecx
cmpl $0x1, %ecx
ja 0xcf37
callq 0xcec0
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movq $0x0, 0x30(%rax)
cmpl $0x5, %r14d
ja 0xcffb
movl %r14d, %ecx
leaq 0x3625(%rip), %rdx      # 0x10570
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %rbx, %rax
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xcf54
movq 0x8(%rax), %rax
jmp 0xd00c
movq %rbx, %rax
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xcf68
movq 0x8(%rax), %rdx
movq %rdx, %rax
movl 0x10(%rdx), %ecx
cmpl %ebp, %ecx
je 0xd00c
movq 0x8(%rax), %rdx
testq %rdx, %rdx
jne 0xcf77
cmpl %ebp, %ecx
je 0xd00c
movl $0x1, %edi
movl $0xb, %esi
jmp 0xd005
movq %rbx, %rax
testq %rbx, %rbx
je 0xd00c
movq 0x8(%rax), %rbx
testq %rbx, %rbx
jne 0xcf9e
jmp 0xd00c
movq %rbx, %r14
testq %rbx, %rbx
je 0xcfd0
movq 0x8(%r14), %rbx
testq %rbx, %rbx
jne 0xcfb1
jmp 0xcfd0
movq %rax, %r14
movq 0x8(%rax), %rdi
callq 0xce88
movq (%r14), %rax
testq %rax, %rax
jne 0xcfc4
movq %r14, %rdi
callq 0xce88
jmp 0xd00a
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
jmp 0xd00c
movq %rax, 0x8(%rbx)
movq $0x0, 0x8(%rax)
movq %rbx, (%rax)
jmp 0xd00c
movl $0x1, %edi
movl $0xc, %esi
callq 0xbc50
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/restr.c
// Function: newrestraint
restraint newrestraint( void )
{ restraint r;
  if ( (r=(restraint)mymalloc(sizeof(restrainttype))) == (restraint)NULL )
    evaluate_level(RED,80);
  r->PREV=(restraint)NULL; r->NEXT=(restraint)NULL; r->label=0;
  return r;
}

// Assembly:
pushq %rbx
movl $0x48, %edi
callq 0xce68
movq %rax, %rbx
testq %rax, %rax
jne 0xd036
movl $0x2, %edi
movl $0x50, %esi
callq 0xbc50
movl $0x0, 0x14(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/restr.c
// Function: fill_restraints
void fill_restraints(restraint r, FILE *fp)
{ char theKeyword[80];
  int type;
  double x;
  double y;
  double z;
  while(1)
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"END_TRACTIONS"))     return;
    if (!strcmp(theKeyword,"END_DISPLACEMENTS")) return;
    if (!strcmp(theKeyword,"END"))               return;
    type=r->type;
    r=(restraint)restraint_dll(r,APPEND,0);
    r->type  = type;
    r->label = atoi(theKeyword);

    read_keyword(fp,theKeyword); 
	  x = strtod(theKeyword,NULL);

    read_keyword(fp,theKeyword); 
	  y = strtod(theKeyword,NULL);
	  
    read_keyword(fp,theKeyword); 
	  z = strtod(theKeyword,NULL);

    /* if (r->type==TRACTION) */
    { r->f1 = x;
      r->f2 = y;
      r->f3 = z;
    }
    /* if (r->type==DISPLACEMENT) */
    { r->u1 = x;
      r->u2 = y;
      r->u3 = z;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r12
movabsq $0x434152545f444e45, %r15 # imm = 0x434152545F444E45
movabsq $0x534e4f49544341, %rbp # imm = 0x534E4F49544341
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x658c
movq (%r14), %rax
xorq %r15, %rax
movq 0x6(%r14), %rcx
xorq %rbp, %rcx
orq %rax, %rcx
je 0xd1c2
leaq 0x10(%rsp), %r14
movzwl 0x20(%rsp), %eax
movd %eax, %xmm0
pcmpeqb 0x34f4(%rip), %xmm0     # 0x105a0
movdqa 0x10(%rsp), %xmm1
pcmpeqb 0x34d6(%rip), %xmm1     # 0x10590
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0xd1c2
cmpl $0x444e45, 0x10(%rsp)   # imm = 0x444E45
je 0xd1c2
movl 0x10(%r12), %r13d
callq 0xd014
movq %rax, %r15
movq %r12, %rax
testq %r12, %r12
je 0xd0f9
movq 0x8(%rax), %r12
testq %r12, %r12
jne 0xd0e8
movq %r15, 0x8(%rax)
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movl %r13d, 0x10(%r15)
movq %r14, %rdi
callq 0x1180
movl %eax, 0x14(%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x658c
movq %r14, %rdi
xorl %esi, %esi
callq 0x1070
movq %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x658c
movq %r14, %rdi
xorl %esi, %esi
callq 0x1070
movq %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x658c
movq %r14, %rdi
xorl %esi, %esi
callq 0x1070
movq 0x8(%rsp), %xmm1
movq %xmm1, 0x18(%r15)
movsd (%rsp), %xmm2
movsd %xmm2, 0x20(%r15)
movq %xmm0, 0x28(%r15)
movq %xmm1, 0x30(%r15)
movsd %xmm2, 0x38(%r15)
movq %xmm0, 0x40(%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x658c
movq 0x10(%rsp), %rax
movabsq $0x434152545f444e45, %rcx # imm = 0x434152545F444E45
xorq %rcx, %rax
movq 0x16(%rsp), %rcx
xorq %rbp, %rcx
orq %rax, %rcx
movq %r15, %r12
jne 0xd09b
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/restr.c
// Function: restraint_dll
restraint restraint_dll( restraint thedll, const int command, const int label )
{ restraint thecopy;
  /* make a copy of the incoming restraint for certain commands: */
  if ((command==APPEND)||(command==NEW)) thecopy=(restraint)newrestraint();
	switch(command) {
	case START:  { while(thedll->PREV!=(restraint)NULL) thedll=thedll->PREV;
				   thedll=thedll->NEXT;
				   return thedll;
				 }
	case END:    { while((thedll!=(restraint)NULL)&&
	               (thedll->NEXT!=(restraint)NULL)) thedll=thedll->NEXT;
				   return thedll;
				 }
	case SEARCH: { if (thedll->NEXT==NULL) return (restraint)NULL;
				   thedll=restraint_dll(thedll,START,0);
				   while((thedll->label!=label)&&(thedll->NEXT!=(restraint)NULL))
				   { thedll=thedll->NEXT;
				   }
				   if (thedll->label==label) return thedll;
				   else
				   {/*  evaluate_level(YELLOW,81); */
					 return (restraint)NULL;
				   }
				 }
	case APPEND: { thedll = restraint_dll(thedll,END,0);
				   thedll->NEXT=thecopy;
				   thecopy->PREV=thedll;
				   thecopy->NEXT=(restraint)NULL;
				   return thecopy;
				 }
	case NEW:    { thecopy->PREV=(restraint)NULL;
				   thecopy->NEXT=(restraint)NULL;
				   return thecopy;
				 }
	case KILL:   { thedll=restraint_dll(thedll,END,0);
				   while(thedll->PREV!=(restraint)NULL)
				   { thedll=thedll->PREV;
					 myfree(thedll->NEXT);
				   }
				   myfree(thedll);
				   return (restraint)NULL;
				 }
	default:     { evaluate_level(YELLOW,82);
				 }
  } /* switch */
return (restraint)NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leal -0x3(%r14), %ecx
cmpl $0x1, %ecx
ja 0xd1eb
callq 0xd014
cmpl $0x5, %r14d
ja 0xd2b3
movl %r14d, %ecx
leaq 0x33b1(%rip), %rdx      # 0x105b0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %rbx, %rax
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xd208
movq 0x8(%rax), %rax
jmp 0xd2c4
movq %rbx, %rcx
testq %rbx, %rbx
je 0xd22d
movq 0x8(%rcx), %rbx
testq %rbx, %rbx
jne 0xd21c
movq %rax, 0x8(%rcx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
jmp 0xd2c4
movq %rbx, %rax
testq %rbx, %rbx
je 0xd2c4
movq 0x8(%rax), %rbx
testq %rbx, %rbx
jne 0xd241
jmp 0xd2c4
movq %rbx, %r14
testq %rbx, %rbx
je 0xd273
movq 0x8(%r14), %rbx
testq %rbx, %rbx
jne 0xd254
jmp 0xd273
movq %rax, %r14
movq 0x8(%rax), %rdi
callq 0xce88
movq (%r14), %rax
testq %rax, %rax
jne 0xd267
movq %r14, %rdi
callq 0xce88
jmp 0xd2c2
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
jmp 0xd2c4
cmpq $0x0, 0x8(%rbx)
je 0xd2c2
movq %rbx, %rax
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xd294
movq 0x8(%rax), %rax
cmpl %ebp, 0x14(%rax)
je 0xd2c4
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0xd2a3
jmp 0xd2c2
movl $0x1, %edi
movl $0x52, %esi
callq 0xbc50
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/tril.c
// Function: fillTRIL
void fillTRIL(element theElement, FILE *fp)
{ char theKeyword[80];
  while (1)
  { read_keyword(fp,theKeyword);
    if (!strcmp(theKeyword,"END_ELEMENTS")) return;
    theElement=(element)element_dll(theElement,APPEND,0);
    theElement->type =  TRIL;
    theElement->label = atoi(theKeyword); 
    read_keyword(fp,theKeyword); theElement->p1 = atoi(theKeyword);
    read_keyword(fp,theKeyword); theElement->p2 = atoi(theKeyword);
    read_keyword(fp,theKeyword); theElement->p3 = atoi(theKeyword);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movabsq $0x4d454c455f444e45, %r12 # imm = 0x4D454C455F444E45
movabsq $0x53544e454d454c, %r13 # imm = 0x53544E454D454C
movq %rsp, %r15
movq %rsi, %rdi
movq %r15, %rsi
callq 0x658c
movq (%r15), %rax
xorq %r12, %rax
movq 0x5(%r15), %rcx
xorq %r13, %rcx
orq %rax, %rcx
je 0xd3a7
movq %rsp, %r15
movq %r14, %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0xb834
movq %rax, %r14
movl $0x2, 0x10(%rax)
movq %r15, %rdi
callq 0x1180
movl %eax, 0x14(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x658c
movq %r15, %rdi
callq 0x1180
movl %eax, 0x18(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x658c
movq %r15, %rdi
callq 0x1180
movl %eax, 0x1c(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x658c
movq %r15, %rdi
callq 0x1180
movl %eax, 0x20(%r14)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x658c
movq (%rsp), %rax
xorq %r12, %rax
movq 0x5(%rsp), %rcx
xorq %r13, %rcx
orq %rax, %rcx
jne 0xd31a
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/tril.c
// Function: fastTRILnormal
void fastTRILnormal(const element e)
{ double x2213;
  double x3312;
  double x3213;
  double x2312;
  double x1312;
  double x1213;
  double c;

  x2213 = (e->p2y - e->p1y) / e->z3;
  x3312 = (e->p3z - e->p1z) / e->z2;
  x3213 = (e->p2z - e->p1z) / e->z3;
  x2312 = (e->p3y - e->p1y) / e->z2;
  x1312 = (e->p3x - e->p1x) / e->z2;
  x1213 = (e->p2x - e->p1x) / e->z3;

  c = 1.0/sin(e->alpha1);

  e->nx = x2213 * x3312 - x3213 * x2312; e->nx = c * e->nx;
  e->ny = x3213 * x1312 - x1213 * x3312; e->ny = c * e->ny;
  e->nz = x1213 * x2312 - x2213 * x1312; e->nz = c * e->nz;

}

// Assembly:
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movsd 0x60(%rdi), %xmm4
movsd 0x40(%rdi), %xmm5
movsd 0x70(%rdi), %xmm0
movsd 0x68(%rdi), %xmm3
movhpd 0x50(%rdi), %xmm3       # xmm3 = xmm3[0],mem[0]
movupd 0x90(%rdi), %xmm1
movsd 0x38(%rdi), %xmm2
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
subpd %xmm2, %xmm3
divpd %xmm1, %xmm3
movapd %xmm3, 0x40(%rsp)
movsd 0x58(%rdi), %xmm6
movhpd 0x48(%rdi), %xmm6       # xmm6 = xmm6[0],mem[0]
movupd 0x28(%rdi), %xmm2
subpd %xmm2, %xmm6
subsd %xmm2, %xmm5
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
subsd %xmm2, %xmm4
divsd %xmm1, %xmm4
movapd %xmm4, 0x10(%rsp)
divpd %xmm1, %xmm6
movapd %xmm6, 0x30(%rsp)
shufpd $0x1, %xmm6, %xmm6      # xmm6 = xmm6[1,0]
movapd %xmm6, 0x20(%rsp)
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm1, %xmm5
movapd %xmm5, (%rsp)
callq 0x1170
movsd 0xbbb(%rip), %xmm1      # 0xe008
divsd %xmm0, %xmm1
movapd 0x40(%rsp), %xmm4
movapd %xmm4, %xmm0
movapd (%rsp), %xmm2
shufpd $0x1, %xmm2, %xmm0      # xmm0 = xmm0[1],xmm2[0]
movapd 0x10(%rsp), %xmm3
mulsd %xmm3, %xmm2
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
mulpd %xmm0, %xmm3
movapd 0x20(%rsp), %xmm0
mulpd %xmm4, %xmm0
subpd %xmm3, %xmm0
movapd %xmm0, %xmm3
movapd 0x30(%rsp), %xmm4
movapd %xmm4, %xmm0
unpckhpd %xmm4, %xmm0            # xmm0 = xmm0[1],xmm4[1]
mulsd %xmm4, %xmm0
subsd %xmm0, %xmm2
mulsd %xmm1, %xmm2
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm3, %xmm1
movupd %xmm1, 0xa0(%rbx)
movsd %xmm2, 0xb0(%rbx)
addq $0x50, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/markpeerdeman[P]mbemm/src/general/tril.c
// Function: TRILcopy
void TRILcopy( const element source, const element dest )
{
  dest->type=source->type;              
  dest->label=source->label;             
  dest->p1=source->p1;
  dest->p2=source->p2;
  dest->p3=source->p3;
  dest->alpha1=source->alpha1;           
  dest->alpha2=source->alpha2;
  dest->alpha3=source->alpha3;
  dest->z1=source->z1;               
  dest->z2=source->z2;
  dest->z3=source->z3;
  dest->nx=source->nx;
  dest->ny=source->ny;
  dest->nz=source->nz;
  dest->p1x=source->p1x;
  dest->p1y=source->p1y;
  dest->p1z=source->p1z;
  dest->p2x=source->p2x;
  dest->p2y=source->p2y;
  dest->p2z=source->p2z;
  dest->p3x=source->p3x;
  dest->p3y=source->p3y;
  dest->p3z=source->p3z;
  dest->area=source->area;
}

// Assembly:
movups 0x10(%rdi), %xmm0
movups %xmm0, 0x10(%rsi)
movl 0x20(%rdi), %eax
movl %eax, 0x20(%rsi)
movups 0x70(%rdi), %xmm0
movups %xmm0, 0x70(%rsi)
movups 0x80(%rdi), %xmm0
movups %xmm0, 0x80(%rsi)
movups 0x90(%rdi), %xmm0
movups %xmm0, 0x90(%rsi)
movups 0xa0(%rdi), %xmm0
movups %xmm0, 0xa0(%rsi)
movsd 0xb0(%rdi), %xmm0
movsd %xmm0, 0xb0(%rsi)
movups 0x28(%rdi), %xmm0
movups %xmm0, 0x28(%rsi)
movups 0x38(%rdi), %xmm0
movups %xmm0, 0x38(%rsi)
movups 0x48(%rdi), %xmm0
movups %xmm0, 0x48(%rsi)
movups 0x58(%rdi), %xmm0
movups %xmm0, 0x58(%rsi)
movsd 0x68(%rdi), %xmm0
movsd %xmm0, 0x68(%rsi)
movsd 0xb8(%rdi), %xmm0
movsd %xmm0, 0xb8(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/rrdclient.c
// Function: cleanup
static void
cleanup(int signal)
{
    fprintf(stderr, "caught signal %d, cleaning up\n", signal);
    if (plugin) {
        rrd_close(plugin);
    }
    exit(1);
}

// Assembly:
pushq %rax
movl %edi, %edx
movq 0x79ed(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x4a8d(%rip), %rsi      # 0x70a2
xorl %eax, %eax
callq 0x2200
movq 0x7b7d(%rip), %rdi      # 0xa1a0
testq %rdi, %rdi
je 0x262d
callq 0x2c86
movl $0x1, %edi
callq 0x22c0
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/librrd.c
// Function: rrd_open
RRD_PLUGIN     *
rrd_open(char *name, rrd_domain_t domain, char *path)
{
    assert(name);
    assert(path);

    RRD_PLUGIN     *plugin = malloc(sizeof(RRD_PLUGIN));
    if (!plugin) {
        return NULL;
    }
    plugin->name = name;
    plugin->path = path;
    plugin->domain = domain;
    /*
     * mark all slots for data sources as free
     */
    for (int i = 0; i < RRD_MAX_SOURCES; i++) {
        plugin->sources[i] = (RRD_SOURCE *) NULL;
    }
    plugin->n = 0;
    plugin->buf_size = 0;
    plugin->buf = NULL;
    plugin->meta = NULL;

    if (initialise(plugin) != 0) {
        invalidate(plugin);
        free(plugin);
        return NULL;
    }
    plugin->file = open(path, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
    if (plugin->file == -1) {
        invalidate(plugin);
        free(plugin);
        return NULL;
    }
    if (write_exact(plugin->file, plugin->buf, plugin->buf_size) != 0) {
        invalidate(plugin);
        free(plugin);
        return NULL;
    }
    return plugin;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x27a7
movq %rdx, %r14
testq %rdx, %rdx
je 0x27c6
movl %esi, %ebp
movq %rdi, %r15
movl $0xb8, %edi
callq 0x2250
testq %rax, %rax
je 0x275a
movq %rax, %rbx
movq %r15, (%rax)
movq %r14, 0x8(%rax)
movl %ebp, 0xa0(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x70(%rax)
movups %xmm0, 0x80(%rax)
movl $0x0, 0xa4(%rax)
movq $0x0, 0xa8(%rax)
movups %xmm0, 0x90(%rax)
movq %rax, %rdi
callq 0x27e5
testl %eax, %eax
je 0x276a
movq 0x98(%rbx), %r14
movq %r14, %rdi
callq 0x2030
xorl %r14d, %r14d
movq %r14, 0x98(%rbx)
movq %r14, 0xa8(%rbx)
movq 0x90(%rbx), %rdi
callq 0x3d65
movq %r14, 0x90(%rbx)
movq %rbx, %rdi
callq 0x2030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl $0x42, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x2290
movl %eax, 0xb0(%rbx)
movq 0x98(%rbx), %r14
cmpl $-0x1, %eax
je 0x2726
movq 0xa8(%rbx), %rdx
movl %eax, %edi
movq %r14, %rsi
callq 0x2c17
testl %eax, %eax
jne 0x2726
jmp 0x275c
leaq 0x4932(%rip), %rdi      # 0x70e0
leaq 0x4930(%rip), %rsi      # 0x70e5
leaq 0x4932(%rip), %rcx      # 0x70ee
movl $0x13e, %edx            # imm = 0x13E
callq 0x2180
leaq 0x4954(%rip), %rdi      # 0x7121
leaq 0x4911(%rip), %rsi      # 0x70e5
leaq 0x4913(%rip), %rcx      # 0x70ee
movl $0x13f, %edx            # imm = 0x13F
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/librrd.c
// Function: write_exact
static int
write_exact(int fd, const void *data, size_t size)
{
    size_t          offset = 0;
    ssize_t         len;
    while (offset < size) {
        len = write(fd, (const char *)data + offset, size - offset);
        if ((len == -1) && (errno == EINTR))
            continue;
        if (len <= 0)
            return -1;
        offset += len;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
testq %rdx, %rdx
je 0x2c6e
movq %rdx, %rbx
movl %edi, %ebp
xorl %r14d, %r14d
movq %rdx, %r15
movq (%rsp), %rax
leaq (%rax,%r14), %r12
movl %ebp, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x20e0
movq %rax, %r13
cmpq $-0x1, %rax
jne 0x2c5e
callq 0x2050
cmpl $0x4, (%rax)
je 0x2c3e
testq %r13, %r13
jle 0x2c72
addq %r13, %r14
movq %rbx, %r15
subq %r14, %r15
ja 0x2c36
xorl %eax, %eax
jmp 0x2c77
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/librrd.c
// Function: rrd_close
int
rrd_close(RRD_PLUGIN * plugin)
{
    assert(plugin);
    int             rc;


    rc = close(plugin->file);
    if (rc == 0)
        rc = unlink(plugin->path);
    invalidate(plugin);
    free(plugin);
    return (rc == 0 ? RRD_OK : RRD_FILE_ERROR);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2cf8
movq %rdi, %rbx
movl 0xb0(%rdi), %edi
callq 0x21b0
movl $0x3, %ebp
testl %eax, %eax
jne 0x2cb9
movq 0x8(%rbx), %rdi
callq 0x2060
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal (%rcx,%rcx,2), %ebp
movq 0x98(%rbx), %rdi
callq 0x2030
xorl %r14d, %r14d
movq %r14, 0x98(%rbx)
movq %r14, 0xa8(%rbx)
movq 0x90(%rbx), %rdi
callq 0x3d65
movq %r14, 0x90(%rbx)
movq %rbx, %rdi
callq 0x2030
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x4427(%rip), %rdi      # 0x7126
leaq 0x43df(%rip), %rsi      # 0x70e5
leaq 0x4420(%rip), %rcx      # 0x712d
movl $0x16d, %edx            # imm = 0x16D
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/librrd.c
// Function: rrd_add_src
int
rrd_add_src(RRD_PLUGIN * plugin, RRD_SOURCE * source)
{
    assert(plugin);
    assert(source);

    /*
     * find free slot
     */
    size_t          i;
    for (i = 0; i < RRD_MAX_SOURCES; i++) {
        if (plugin->sources[i] == NULL)
            break;
    }
    if (i >= RRD_MAX_SOURCES) {
        return RRD_TOO_MANY_SOURCES;
    }
    plugin->sources[i] = source;
    plugin->n++;
    invalidate(plugin);

    return RRD_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2d96
testq %rsi, %rsi
je 0x2db5
movq %rdi, %rbx
xorl %eax, %eax
cmpq $0x0, 0x10(%rbx,%rax,8)
je 0x2d44
incq %rax
cmpq $0x10, %rax
jne 0x2d2e
movl $0x10, %eax
movl $0x1, %r14d
cmpq $0xf, %rax
ja 0x2d8b
movq %rsi, 0x10(%rbx,%rax,8)
incl 0xa4(%rbx)
movq 0x98(%rbx), %rdi
callq 0x2030
xorl %r14d, %r14d
movq %r14, 0x98(%rbx)
movq %r14, 0xa8(%rbx)
movq 0x90(%rbx), %rdi
callq 0x3d65
movq %r14, 0x90(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4389(%rip), %rdi      # 0x7126
leaq 0x4341(%rip), %rsi      # 0x70e5
leaq 0x439e(%rip), %rcx      # 0x7149
movl $0x17f, %edx            # imm = 0x17F
callq 0x2180
leaq 0x43b9(%rip), %rdi      # 0x7175
leaq 0x4322(%rip), %rsi      # 0x70e5
leaq 0x437f(%rip), %rcx      # 0x7149
movl $0x180, %edx            # imm = 0x180
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/librrd.c
// Function: rrd_del_src
int
rrd_del_src(RRD_PLUGIN * plugin, RRD_SOURCE * source)
{
    assert(source);
    size_t          i;
    /*
     * find slot with source
     */
    for (i = 0; i < RRD_MAX_SOURCES; i++) {
        if (plugin->sources[i] == source)
            break;
    }
    if (i >= RRD_MAX_SOURCES) {
        return RRD_NO_SUCH_SOURCE;
    }
    plugin->sources[i] = NULL;
    plugin->n--;
    invalidate(plugin);

    return RRD_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2e52
movq %rdi, %rbx
xorl %eax, %eax
cmpq %rsi, 0x10(%rbx,%rax,8)
je 0x2df7
incq %rax
cmpq $0x10, %rax
jne 0x2de2
movl $0x10, %eax
movl $0x2, %r14d
cmpq $0xf, %rax
ja 0x2e47
movq $0x0, 0x10(%rbx,%rax,8)
decl 0xa4(%rbx)
testq %rbx, %rbx
je 0x2e71
movq 0x98(%rbx), %rdi
callq 0x2030
xorl %r14d, %r14d
movq %r14, 0x98(%rbx)
movq %r14, 0xa8(%rbx)
movq 0x90(%rbx), %rdi
callq 0x3d65
movq %r14, 0x90(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x431c(%rip), %rdi      # 0x7175
leaq 0x4285(%rip), %rsi      # 0x70e5
leaq 0x4315(%rip), %rcx      # 0x717c
movl $0x19a, %edx            # imm = 0x19A
callq 0x2180
leaq 0x42ae(%rip), %rdi      # 0x7126
leaq 0x4266(%rip), %rsi      # 0x70e5
leaq 0x4475(%rip), %rcx      # 0x72fb
movl $0x6d, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_parse_file
JSON_Value * json_parse_file(const char *filename) {
    char *file_contents = read_file(filename);
    JSON_Value *output_value = NULL;
    if (file_contents == NULL) {
        return NULL;
    }
    output_value = json_parse_string(file_contents);
    parson_free(file_contents);
    return output_value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x3054
testq %rax, %rax
je 0x304a
movq %rax, %rbx
movq %rax, %rdi
callq 0x3100
movq %rax, %r14
movq %rbx, %rdi
callq *0x7143(%rip)           # 0xa188
movq %r14, %rax
jmp 0x304c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: read_file
static char * read_file(const char * filename) {
    FILE *fp = fopen(filename, "r");
    size_t file_size;
    long pos;
    char *file_contents;
    if (!fp) {
        return NULL;
    }
    fseek(fp, 0L, SEEK_END);
    pos = ftell(fp);
    if (pos < 0) {
        fclose(fp);
        return NULL;
    }
    file_size = pos;
    rewind(fp);
    file_contents = (char*)parson_malloc(sizeof(char) * (file_size + 1));
    if (!file_contents) {
        fclose(fp);
        return NULL;
    }
    if (fread(file_contents, file_size, 1, fp) < 1) {
        if (ferror(fp)) {
            fclose(fp);
            parson_free(file_contents);
            return NULL;
        }
    }
    fclose(fp);
    file_contents[file_size] = '\0';
    return file_contents;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x447b(%rip), %rsi      # 0x74db
callq 0x22a0
testq %rax, %rax
je 0x30d5
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2260
movq %rbx, %rdi
callq 0x2220
testq %rax, %rax
js 0x30cd
movq %rax, %r15
movq %rbx, %rdi
callq 0x2140
leaq 0x1(%r15), %rdi
callq *0x70f2(%rip)           # 0xa190
testq %rax, %rax
je 0x30cd
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x20b0
testq %rax, %rax
je 0x30e1
movq %rbx, %rdi
callq 0x20f0
movb $0x0, (%r14,%r15)
jmp 0x30d8
movq %rbx, %rdi
callq 0x20f0
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x30be
movq %rbx, %rdi
callq 0x20f0
movq %r14, %rdi
callq *0x708a(%rip)           # 0xa188
jmp 0x30d5
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_parse_string
JSON_Value * json_parse_string(const char *string) {
    if (string == NULL) {
        return NULL;
    }
    if (string[0] == '\xEF' && string[1] == '\xBB' && string[2] == '\xBF') {
        string = string + 3; /* Support for UTF-8 BOM */
    }
    return parse_value((const char**)&string, 0);
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
testq %rdi, %rdi
je 0x312f
cmpb $-0x11, (%rdi)
jne 0x3123
cmpb $-0x45, 0x1(%rdi)
jne 0x3123
cmpb $-0x41, 0x2(%rdi)
jne 0x3123
addq $0x3, %rdi
movq %rdi, (%rsp)
movq %rsp, %rdi
xorl %esi, %esi
callq 0x31d5
jmp 0x3131
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_parse_file_with_comments
JSON_Value * json_parse_file_with_comments(const char *filename) {
    char *file_contents = read_file(filename);
    JSON_Value *output_value = NULL;
    if (file_contents == NULL) {
        return NULL;
    }
    output_value = json_parse_string_with_comments(file_contents);
    parson_free(file_contents);
    return output_value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x3054
testq %rax, %rax
je 0x315d
movq %rax, %rbx
movq %rax, %rdi
callq 0x3167
movq %rax, %r14
movq %rbx, %rdi
callq *0x7030(%rip)           # 0xa188
movq %r14, %rax
jmp 0x315f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_parse_string_with_comments
JSON_Value * json_parse_string_with_comments(const char *string) {
    JSON_Value *result = NULL;
    char *string_mutable_copy = NULL, *string_mutable_copy_ptr = NULL;
    string_mutable_copy = parson_strdup(string);
    if (string_mutable_copy == NULL) {
        return NULL;
    }
    remove_comments(string_mutable_copy, "/*", "*/");
    remove_comments(string_mutable_copy, "//", "\n");
    string_mutable_copy_ptr = string_mutable_copy;
    result = parse_value((const char**)&string_mutable_copy_ptr, 0);
    parson_free(string_mutable_copy);
    return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq $0x0, (%rsp)
callq 0x37b6
testq %rax, %rax
je 0x31c7
movq %rax, %rbx
leaq 0x4311(%rip), %rsi      # 0x7498
leaq 0x430d(%rip), %rdx      # 0x749b
movq %rax, %rdi
callq 0x37f8
leaq 0x4301(%rip), %rsi      # 0x749e
leaq 0x3f2f(%rip), %rdx      # 0x70d3
movq %rbx, %rdi
callq 0x37f8
movq %rsp, %rdi
movq %rbx, (%rdi)
xorl %esi, %esi
callq 0x31d5
movq %rax, %r14
movq %rbx, %rdi
callq *0x6fc3(%rip)           # 0xa188
jmp 0x31ca
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: remove_comments
static void remove_comments(char *string, const char *start_token, const char *end_token) {
    int in_string = 0, escaped = 0;
    size_t i;
    char *ptr = NULL, current_char;
    size_t start_token_len = strlen(start_token);
    size_t end_token_len = strlen(end_token);
    if (start_token_len == 0 || end_token_len == 0) {
        return;
    }
    while ((current_char = *string) != '\0') {
        if (current_char == '\\' && !escaped) {
            escaped = 1;
            string++;
            continue;
        } else if (current_char == '\"' && !escaped) {
            in_string = !in_string;
        } else if (!in_string && strncmp(string, start_token, start_token_len) == 0) {
            for(i = 0; i < start_token_len; i++) {
                string[i] = ' ';
            }
            string = string + start_token_len;
            ptr = strstr(string, end_token);
            if (!ptr) {
                return;
            }
            for (i = 0; i < (ptr - string) + end_token_len; i++) {
                string[i] = ' ';
            }
            string = ptr + end_token_len - 1;
        }
        escaped = 0;
        string++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
movq %rsi, %rdi
callq 0x2110
movq %rax, %r15
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
callq 0x2110
movq %rax, %r12
testq %r15, %r15
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x3927
movb (%r13), %al
testb %al, %al
je 0x3927
movq %r12, %rsi
subq %r15, %rsi
xorl %ecx, %ecx
xorl %ebx, %ebx
xorl %edx, %edx
testb $0x1, %dl
jne 0x3872
cmpb $0x5c, %al
jne 0x3872
movb 0x1(%r13,%rbx), %al
incq %rbx
movb $0x1, %dl
testb %al, %al
jne 0x3856
jmp 0x3927
cmpb $0x22, %al
setne %al
orb %al, %dl
leaq (%rbx,%r13), %rbp
testb $0x1, %dl
je 0x38ab
movl $0x1, %edx
testl %ecx, %ecx
jne 0x38b2
movq %rsi, 0x8(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2080
xorl %edx, %edx
testl %eax, %eax
je 0x38c3
movq 0x8(%rsp), %rsi
jmp 0x38b2
xorl %edx, %edx
testl %ecx, %ecx
sete %dl
movb 0x1(%rbp), %al
incq %rbp
movq %rbp, %r13
movl %edx, %ecx
testb %al, %al
jne 0x3852
jmp 0x3927
testq %r15, %r15
je 0x38d8
movq %rbp, %rdi
movl $0x20, %esi
movq %r15, %rdx
callq 0x21a0
leaq (%r15,%r13), %rbp
addq %rbx, %rbp
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
callq 0x22d0
testq %rax, %rax
movq 0x8(%rsp), %rsi
je 0x3927
movq %rsi, %rdx
subq %r13, %rdx
addq %rax, %rdx
subq %rbx, %rdx
je 0x391c
movq %rbp, %rdi
movl $0x20, %esi
movq %rax, %rbx
callq 0x21a0
movq %rbx, %rax
movq 0x8(%rsp), %rsi
leaq (%rax,%r12), %rbp
decq %rbp
xorl %edx, %edx
jmp 0x38b2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_nget_value
static JSON_Value * json_object_nget_value(const JSON_Object *object, const char *name, size_t n) {
    size_t i, name_length;
    for (i = 0; i < json_object_get_count(object); i++) {
        name_length = strlen(object->names[i]);
        if (name_length != n) {
            continue;
        }
        if (strncmp(object->names[i], name, n) == 0) {
            return object->values[i];
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
xorl %ebx, %ebx
xorl %ebp, %ebp
testq %r15, %r15
je 0x3990
movq 0x18(%r15), %rax
jmp 0x3992
xorl %eax, %eax
cmpq %rax, %rbp
jae 0x39cb
movq 0x8(%r15), %rax
movq (%rax,%rbp,8), %r13
movq %r13, %rdi
callq 0x2110
cmpq %r14, %rax
jne 0x39be
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2080
testl %eax, %eax
je 0x39c3
incq %rbp
jmp 0x3985
movq 0x10(%r15), %rax
movq (%rax,%rbp,8), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_dotget_value
JSON_Value * json_object_dotget_value(const JSON_Object *object, const char *name) {
    const char *dot_position = strchr(name, '.');
    if (!dot_position) {
        return json_object_get_value(object, name);
    }
    object = json_value_get_object(json_object_nget_value(object, name, dot_position - name));
    return json_object_dotget_value(object, dot_position + 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %r15, %rdi
movl $0x2e, %esi
callq 0x2120
testq %rax, %rax
je 0x3b15
movq %rax, %rbx
movq %rax, %rdx
subq %r15, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x396d
testq %rax, %rax
je 0x3b0a
cmpl $0x4, 0x8(%rax)
jne 0x3b0a
movq 0x10(%rax), %r14
jmp 0x3b0d
xorl %r14d, %r14d
incq %rbx
movq %rbx, %r15
jmp 0x3ad3
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x3936
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_value_free
void json_value_free(JSON_Value *value) {
    switch (json_value_get_type(value)) {
        case JSONObject:
            json_object_free(value->value.object);
            break;
        case JSONString:
            parson_free(value->value.string);
            break;
        case JSONArray:
            json_array_free(value->value.array);
            break;
        default:
            break;
    }
    parson_free(value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdi, %rdi
je 0x3d77
movl 0x8(%rbx), %eax
jmp 0x3d7c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x2, %eax
je 0x3e00
cmpl $0x5, %eax
je 0x3dcd
cmpl $0x4, %eax
jne 0x3e0a
movq 0x10(%rbx), %r14
cmpq $0x0, 0x18(%r14)
je 0x3dbd
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rdi
callq *0x63e1(%rip)           # 0xa188
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x3d65
incq %r15
cmpq 0x18(%r14), %r15
jb 0x3d99
movq 0x8(%r14), %rdi
callq *0x63c1(%rip)           # 0xa188
movq 0x10(%r14), %rdi
jmp 0x3df5
movq 0x10(%rbx), %r14
cmpq $0x0, 0x10(%r14)
je 0x3df1
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x3d65
incq %r15
cmpq 0x10(%r14), %r15
jb 0x3ddb
movq 0x8(%r14), %rdi
callq *0x638d(%rip)           # 0xa188
movq %r14, %rdi
jmp 0x3e04
movq 0x10(%rbx), %rdi
callq *0x637e(%rip)           # 0xa188
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x6370(%rip)           # 0xa188
// File: /workspace/github_c_makefile_star2_O1/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_value_init_object
JSON_Value * json_value_init_object(void) {
    JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value));
    if (!new_value) {
        return NULL;
    }
    new_value->parent = NULL;
    new_value->type = JSONObject;
    new_value->value.object = json_object_init(new_value);
    if (!new_value->value.object) {
        parson_free(new_value);
        return NULL;
    }
    return new_value;
}

// Assembly:
pushq %rbx
movl $0x18, %edi
callq *0x636c(%rip)           # 0xa190
testq %rax, %rax
je 0x3e6e
movq %rax, %rbx
movq $0x0, (%rax)
movl $0x4, 0x8(%rax)
movl $0x28, %edi
callq *0x634b(%rip)           # 0xa190
testq %rax, %rax
je 0x3e5a
movq %rbx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
jmp 0x3e5c
xorl %eax, %eax
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x3e70
movq %rbx, %rdi
callq *0x631a(%rip)           # 0xa188
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq