LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/Deriv_func.c
// Function: Deriv_func(double, double*, double*, double, long)
void Deriv_func ( double t, double y[], double yp[], double dt, long dimension )

/******************************************************************************/
/*
  Purpose:
  		  
    Evaluates the derivative, using equation for scalar size
*/
{
   /*Calculating derivative*/ 
   // In this case y[0]= r relative radius, y[1]=sigma surface density, y[2]=edge Mach number at the beginning, y[3] is the current edge Mach number squared
      // d r/d tau=1/(1-Q/2) -1/sqrt(r) Mach^3/(1+Mach^2)^(3/2)*sqrt(M/M_0), see http://arxiv.org/abs/1507.06678 (last correction factor accounts for mass loss)
   //Safegurad against negative values which cause problems
   if(y[0]>0){
   	yp[0]=-1.0/(1.0-QVirial/2.0)*pow(y[0],-0.5)*pow(y[2]/(1.0+y[2]),1.5)*sqrt(y[3]);
      // Sigma, evolved separetely
    yp[1]=0.0;
     // Edge Mach number, evolved separetely
   	yp[2]=0.0;
     // Mass ratio, evolved separetely
   	yp[3]=0.0;
   }
   else{
   	yp[0]=0;
   	yp[1]=0;
   	yp[2]=0;
   	yp[3]=0;
   }
   
   
  return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movsd (%rdi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x82bc
movq %rdi, %r14
movsd 0x31f0(%rip), %xmm1     # 0xb458
callq 0x2390
mulsd 0x3493(%rip), %xmm0     # 0xb708
movsd %xmm0, (%rsp)
movsd 0x10(%r14), %xmm0
movsd 0x2dc8(%rip), %xmm1     # 0xb050
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movsd 0x3150(%rip), %xmm1     # 0xb3e8
callq 0x2390
movapd %xmm0, %xmm1
mulsd (%rsp), %xmm1
movsd 0x18(%r14), %xmm0
ucomisd 0x31cc(%rip), %xmm0     # 0xb480
jb 0x82cb
sqrtsd %xmm0, %xmm0
jmp 0x82da
xorpd %xmm0, %xmm0
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, (%rbx)
jmp 0x82f3
movsd %xmm1, (%rsp)
callq 0x2160
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/fft.c
// Function: fft(complex*, int, int)
void fft(complex x[], int n, int flag)
{
   complex *y;
   
   assert(1 == flag || -1 == flag);
   y = (complex *) malloc( n*sizeof(complex) );
   assert(NULL != y);
   stockham(x, n, flag, 1, y);
   free(y);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
cmpl $-0x1, %edx
je 0x87fc
cmpl $0x1, %ebx
jne 0x8855
movslq %ebp, %rdi
shlq $0x4, %rdi
callq 0x2280
testq %rax, %rax
je 0x8836
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl $0x1, %ecx
movq %rax, %r8
callq 0x82fc
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2250
leaq 0x2f9b(%rip), %rdi      # 0xb7d8
leaq 0x2edf(%rip), %rsi      # 0xb723
leaq 0x2f6f(%rip), %rcx      # 0xb7ba
movl $0xbd, %edx
callq 0x2100
leaq 0x2f46(%rip), %rdi      # 0xb7a2
leaq 0x2ec0(%rip), %rsi      # 0xb723
leaq 0x2f50(%rip), %rcx      # 0xb7ba
movl $0xbb, %edx
callq 0x2100
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/fft.c
// Function: fft2D(complex*, int, int, int)
void fft2D(complex x[], int n1, int n2, int flag)
{
   complex *y;
   int i, n;

   assert(1 == flag || -1 == flag);
   n = n1*n2;
   y = (complex *) malloc( n2*sizeof(complex) );
   assert(NULL != y);

   for(i=0; i < n; i += n2) {                                  /* FFT in y */
      stockham(x+i, n2, flag, 1, y); 
   }
   free(y);
   cooley_tukey(x, n, flag, n2);                               /* FFT in x */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, 0x8(%rsp)
cmpl $-0x1, %ecx
je 0x8899
cmpl $0x1, %ecx
jne 0x8942
movl %ecx, %r14d
movslq %ebx, %r12
movq %r12, %rdi
shlq $0x4, %rdi
movq %rdi, %r15
callq 0x2280
testq %rax, %rax
je 0x8923
movl %ebx, 0x4(%rsp)
imull %ebx, %ebp
movl %ebp, (%rsp)
testl %ebp, %ebp
jle 0x88f9
movl (%rsp), %edx
movq %rdx, 0x10(%rsp)
xorl %ebp, %ebp
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
movl $0x1, %ecx
movq %rax, %r13
movq %rax, %r8
callq 0x82fc
movq %r13, %rax
addq %r12, %rbp
addq %r15, %rbx
cmpq 0x10(%rsp), %rbp
jl 0x88d0
movq %rax, %rdi
callq 0x2250
movq 0x8(%rsp), %rdi
movl (%rsp), %esi
movl %r14d, %edx
movl 0x4(%rsp), %ecx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8543
leaq 0x2eae(%rip), %rdi      # 0xb7d8
leaq 0x2df2(%rip), %rsi      # 0xb723
leaq 0x2eaa(%rip), %rcx      # 0xb7e2
movl $0xd5, %edx
callq 0x2100
leaq 0x2e59(%rip), %rdi      # 0xb7a2
leaq 0x2dd3(%rip), %rsi      # 0xb723
leaq 0x2e8b(%rip), %rcx      # 0xb7e2
movl $0xd2, %edx
callq 0x2100
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/fft.c
// Function: fft3D(complex*, int, int, int, int)
void fft3D(complex x[], int n1, int n2, int n3, int flag)
{
   complex *y;
   int i, n, n23;

   assert(1 == flag || -1 == flag);
   n23 = n2*n3;
   n = n1*n23;
   y = (complex *) malloc( n23*sizeof(complex) );
   assert(NULL != y);

   for(i=0; i < n; i += n3) {                                  /* FFT in z */
      stockham(x+i, n3, flag, 1, y);
   }
   for(i=0; i < n; i += n23) {                                 /* FFT in y */
      stockham(x+i, n23, flag, n3, y); 
   }
   free(y);
   cooley_tukey(x, n, flag, n23);                              /* FFT in x */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r14d
movl %esi, %r12d
movq %rdi, 0x18(%rsp)
cmpl $-0x1, %r8d
je 0x898a
cmpl $0x1, %r8d
jne 0x8a96
movl %r8d, %ebx
movl %ecx, 0x8(%rsp)
imull %ecx, %r14d
movslq %r14d, %rax
movq %rax, 0x28(%rsp)
movq %rax, %rdi
shlq $0x4, %rdi
movq %rdi, 0x30(%rsp)
callq 0x2280
testq %rax, %rax
je 0x8a77
movq %rax, %rbp
movl %r14d, 0x24(%rsp)
imull %r14d, %r12d
movl %r12d, %r15d
movl %r12d, 0xc(%rsp)
testl %r12d, %r12d
jle 0x8a0b
movslq 0x8(%rsp), %r14
movq %r14, %rax
shlq $0x4, %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
movq 0x18(%rsp), %r12
movq %r12, %rdi
movl %r14d, %esi
movl %ebx, %edx
movl $0x1, %ecx
movq %rbp, %r8
callq 0x82fc
addq %r14, %r13
addq 0x10(%rsp), %r12
cmpq %r15, %r13
jl 0x89e9
cmpl $0x0, 0xc(%rsp)
movl %ebx, 0x10(%rsp)
movl 0x8(%rsp), %r13d
movq 0x30(%rsp), %r12
jle 0x8a4b
xorl %ebx, %ebx
movq 0x18(%rsp), %r14
movq %r14, %rdi
movq 0x28(%rsp), %rsi
movl 0x10(%rsp), %edx
movl %r13d, %ecx
movq %rbp, %r8
callq 0x82fc
addq 0x28(%rsp), %rbx
addq %r12, %r14
cmpq %r15, %rbx
jl 0x8a27
movq %rbp, %rdi
callq 0x2250
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0x24(%rsp), %ecx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8543
leaq 0x2d5a(%rip), %rdi      # 0xb7d8
leaq 0x2c9e(%rip), %rsi      # 0xb723
leaq 0x2d7b(%rip), %rcx      # 0xb807
movl $0xe7, %edx
callq 0x2100
leaq 0x2d05(%rip), %rdi      # 0xb7a2
leaq 0x2c7f(%rip), %rsi      # 0xb723
leaq 0x2d5c(%rip), %rcx      # 0xb807
movl $0xe3, %edx
callq 0x2100
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/gaussrand.c
// Function: gaussrand()
double gaussrand()
{
	static double V1, V2, S;
	static int phase = 0;
	double X;

	if(phase == 0) {
		do {
			double U1 = (double)rand() / RAND_MAX;
			double U2 = (double)rand() / RAND_MAX;

			V1 = 2 * U1 - 1;
			V2 = 2 * U2 - 1;
			S = V1 * V1 + V2 * V2;
			} while(S >= 1 || S == 0);

		X = V1 * sqrt(-2 * log(S) / S);
	} else
		X = V2 * sqrt(-2 * log(S) / S);

	phase = 1 - phase;

	return X;
}

// Assembly:
pushq %rax
cmpl $0x0, 0x63e4(%rip)      # 0xf2b8
je 0x8ef0
movsd 0x63ca(%rip), %xmm0     # 0xf2a8
movsd %xmm0, (%rsp)
movsd 0x63c5(%rip), %xmm0     # 0xf2b0
jmp 0x8f7d
callq 0x2090
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x29b4(%rip), %xmm0     # 0xb8b8
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
callq 0x2090
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd 0x2997(%rip), %xmm1     # 0xb8b8
movsd (%rsp), %xmm2
addsd %xmm2, %xmm2
movsd 0x2126(%rip), %xmm0     # 0xb058
addsd %xmm0, %xmm2
addsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x6362(%rip)     # 0xf2a8
mulsd %xmm1, %xmm1
movsd %xmm2, (%rsp)
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x634d(%rip)     # 0xf2b0
ucomisd 0x20e5(%rip), %xmm0     # 0xb050
jae 0x8ef0
ucomisd 0x250b(%rip), %xmm0     # 0xb480
jne 0x8f7d
jnp 0x8ef0
callq 0x2170
mulsd 0x2936(%rip), %xmm0     # 0xb8c0
divsd 0x631e(%rip), %xmm0     # 0xf2b0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x8fa2
sqrtsd %xmm0, %xmm0
jmp 0x8fa7
callq 0x2160
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
movl $0x1, %eax
subl 0x62fd(%rip), %eax      # 0xf2b8
movl %eax, 0x62f7(%rip)      # 0xf2b8
movapd %xmm1, %xmm0
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/LogScale.c
// Function: LogScale(double*, double, double, long)
void LogScale(double* vector, double x0, double x1, long n)
{
long i; //loop variable
double step=log(x1/x0)/(n-1);
double logx0=log(x0);

for (i = 0; i < n; i++){
    vector[i]=exp(logx0+i*step);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movsd %xmm0, (%rsp)
movq %rdi, %r14
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x2170
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x2170
testq %rbx, %rbx
jle 0x9050
movapd %xmm0, %xmm2
leaq -0x1(%rbx), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
xorl %r15d, %r15d
movsd %xmm2, (%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r15, %xmm0
mulsd 0x8(%rsp), %xmm0
addsd %xmm2, %xmm0
callq 0x23c0
movsd (%rsp), %xmm2
movsd %xmm0, (%r14,%r15,8)
incq %r15
cmpq %r15, %rbx
jne 0x9026
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/Restart.cpp
// Function: SaveRestartControl(long)
void SaveRestartControl(long Niter){
	ofstream myfile; //Output file handle
	char filename[200];
	
	//Get filename
	ContructFilePath("RestartControl.txt", "Output", filename);
	//open output file
	myfile.open(filename,ios::out);
    //Save parameters
    myfile<<Niter<<"\n";
    myfile.flush(); //finish writing
    myfile.close(); //close file
}

// Assembly:
pushq %rbx
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x2380
leaq 0x1db2(%rip), %rdi      # 0xb0f3
leaq 0x1d50(%rip), %rsi      # 0xb098
leaq 0x200(%rsp), %rdx
callq 0x80f5
movq %rsp, %rdi
leaq 0x200(%rsp), %rsi
movl $0x10, %edx
callq 0x2040
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x21c0
leaq 0x1ebd(%rip), %rsi      # 0xb239
movl $0x1, %edx
movq %rax, %rdi
callq 0x2210
movq %rsp, %rdi
callq 0x2120
movq %rsp, %rdi
callq 0x22c0
movq 0x5c08(%rip), %rax      # 0xefa8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, (%rsp,%rcx)
callq 0x2190
leaq 0xf8(%rsp), %rdi
callq 0x20a0
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x22e0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/Restart.cpp
// Function: ReadRestartControl(long*)
void ReadRestartControl(long* Niter){
	char filename[200];
	FILE *sourcefile; //Input file handle
	char line[100];
	
	//Get filename
	ContructFilePath("RestartControl.txt", "Output", filename);
	//open input file
	sourcefile=fopen (filename,"r");
    //Read parameters
    fgets (line, 100, sourcefile);
    Niter[0]=strtol(line,NULL, 0);
    fclose(sourcefile);
    remove(filename); //remove file
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdi, %r14
leaq 0x1cf5(%rip), %rdi      # 0xb0f3
leaq 0x1c93(%rip), %rsi      # 0xb098
leaq 0x70(%rsp), %rbx
movq %rbx, %rdx
callq 0x80f5
leaq 0x22df(%rip), %rsi      # 0xb6f8
movq %rbx, %rdi
callq 0x2240
movq %rax, %r15
movq %rsp, %r12
movq %r12, %rdi
movl $0x64, %esi
movq %rax, %rdx
callq 0x2330
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2290
movq %rax, (%r14)
movq %r15, %rdi
callq 0x21f0
movq %rbx, %rdi
callq 0x23d0
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: vector_long(long)
long *vector_long(long m) {
    long *res = (long *) calloc(m, sizeof (long));
    if (res == NULL){
    	cout<<"Error! Failed memory allocation in" <<"vector_long"<<" function.\n";
	}
    return (res);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x8, %esi
callq 0x2110
movq %rax, %rbx
testq %rax, %rax
jne 0xa72d
movq 0x48d7(%rip), %r14      # 0xefc8
leaq 0x1208(%rip), %rsi      # 0xb900
movl $0x22, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x1217(%rip), %rsi      # 0xb923
movl $0xb, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x120f(%rip), %rsi      # 0xb92f
movl $0xb, %edx
movq %r14, %rdi
callq 0x2210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: matrix_long(long, long)
long **matrix_long(long m, long n) {
    long **res = (long **) calloc(m, sizeof (long *));
    long i;
    for (i = 0; i < m; i++)
        res[i] = (long *) calloc(n, sizeof (long));
    	if (res[i] == NULL){
    		cout<<"Error! Failed memory allocation in" <<"matrix_long"<<" function.\n";
		}
    return (res);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movl $0x8, %esi
callq 0x2110
movq %rax, %rbx
testq %r14, %r14
jle 0xa776
xorl %r12d, %r12d
movl $0x8, %esi
movq %r15, %rdi
callq 0x2110
movq %rax, (%rbx,%r12,8)
incq %r12
cmpq %r12, %r14
jne 0xa75b
jmp 0xa779
xorl %r14d, %r14d
cmpq $0x0, (%rbx,%r14,8)
jne 0xa7c3
movq 0x4841(%rip), %r14      # 0xefc8
leaq 0x1172(%rip), %rsi      # 0xb900
movl $0x22, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x1199(%rip), %rsi      # 0xb93b
movl $0xb, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x1179(%rip), %rsi      # 0xb92f
movl $0xb, %edx
movq %r14, %rdi
callq 0x2210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: vector_double(long)
double *vector_double(long m) {
    double *res = (double *) calloc(m, sizeof (double));
    if (res == NULL){
    	cout<<"Error! Failed memory allocation in" <<"vector_double"<<" function.\n";
	}
    return (res);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x8, %esi
callq 0x2110
movq %rax, %rbx
testq %rax, %rax
jne 0xa82b
movq 0x47d9(%rip), %r14      # 0xefc8
leaq 0x110a(%rip), %rsi      # 0xb900
movl $0x22, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x113d(%rip), %rsi      # 0xb947
movl $0xd, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x1111(%rip), %rsi      # 0xb92f
movl $0xb, %edx
movq %r14, %rdi
callq 0x2210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: vector_bool(long)
bool *vector_bool(long m) {
    bool *res = (bool *) calloc(m, sizeof (bool));
    if (res == NULL){
    	cout<<"Error! Failed memory allocation in" <<"vector_bool"<<" function.\n";
	}
    return (res);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x1, %esi
callq 0x2110
movq %rax, %rbx
testq %rax, %rax
jne 0xa88f
movq 0x4775(%rip), %r14      # 0xefc8
leaq 0x10a6(%rip), %rsi      # 0xb900
movl $0x22, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x10e7(%rip), %rsi      # 0xb955
movl $0xb, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x10ad(%rip), %rsi      # 0xb92f
movl $0xb, %edx
movq %r14, %rdi
callq 0x2210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: matrix_double(long, long)
double **matrix_double(long m, long n) {
    double **res = (double **) calloc(m, sizeof (double *));
    long i;
    for (i = 0; i < m; i++)
        res[i] = (double *) calloc(n, sizeof (double));
        if (res[i] == NULL){
    		cout<<"Error! Failed memory allocation in" <<"matrix_double"<<" function.\n";
		}
    return (res);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movl $0x8, %esi
callq 0x2110
movq %rax, %rbx
testq %r14, %r14
jle 0xa8d8
xorl %r12d, %r12d
movl $0x8, %esi
movq %r15, %rdi
callq 0x2110
movq %rax, (%rbx,%r12,8)
incq %r12
cmpq %r12, %r14
jne 0xa8bd
jmp 0xa8db
xorl %r14d, %r14d
cmpq $0x0, (%rbx,%r14,8)
jne 0xa925
movq 0x46df(%rip), %r14      # 0xefc8
leaq 0x1010(%rip), %rsi      # 0xb900
movl $0x22, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x105d(%rip), %rsi      # 0xb961
movl $0xd, %edx
movq %r14, %rdi
callq 0x2210
leaq 0x1017(%rip), %rsi      # 0xb92f
movl $0xb, %edx
movq %r14, %rdi
callq 0x2210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: matrix3d_double(long, long, long)
double ***matrix3d_double(long m, long n, long o){
       long i,j;
       double ***res = (double ***)calloc(m, sizeof(double**));
       for (i = 0; i< m; i++) {
         res[i] = (double **) calloc(n, sizeof(double*));
         for (j = 0; j < n; j++) {
              res[i][j] = (double *)calloc(o, sizeof(double));
            if (res[i][j] == NULL){
    			cout<<"Error! Failed memory allocation in" <<"matrix3d_double"<<" function.\n";
			}
          }
        }
       return (res);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x8, %esi
callq 0x2110
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
testq %r15, %r15
jle 0xa9fc
xorl %r15d, %r15d
movq 0x4656(%rip), %r13      # 0xefc8
movl $0x8, %esi
movq %r14, %rdi
callq 0x2110
movq %rax, %rbp
movq 0x8(%rsp), %rax
movq %rbp, (%rax,%r15,8)
testq %r14, %r14
jle 0xa9ee
xorl %r12d, %r12d
movl $0x8, %esi
movq %rbx, %rdi
callq 0x2110
movq %rax, (%rbp,%r12,8)
testq %rax, %rax
jne 0xa9e6
movl $0x22, %edx
movq %r13, %rdi
leaq 0xf47(%rip), %rsi       # 0xb900
callq 0x2210
movl $0xf, %edx
movq %r13, %rdi
leaq 0xfa2(%rip), %rsi       # 0xb96f
callq 0x2210
movl $0xb, %edx
movq %r13, %rdi
leaq 0xf4e(%rip), %rsi       # 0xb92f
callq 0x2210
incq %r12
cmpq %r12, %r14
jne 0xa993
incq %r15
cmpq 0x10(%rsp), %r15
jne 0xa972
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: free_long_matrix(long**, long)
void free_long_matrix(long** M, long m){
     long i;
     for (i = 0; i < m; i++){
         free(M[i]);
         }
         free(M);   
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
jle 0xaa34
movq %rsi, %r14
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x2250
incq %r15
cmpq %r15, %r14
jne 0xaa23
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: free_double_matrix(double**, long)
void free_double_matrix(double** M, long m){
     long i;
     for (i = 0; i < m; i++){
         free(M[i]);
         }
         free(M);   
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
jle 0xaa65
movq %rsi, %r14
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x2250
incq %r15
cmpq %r15, %r14
jne 0xaa54
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: free_double_matrix3d(double***, long, long)
void free_double_matrix3d(double*** M, long m, long n){
       long i,j;
       for (i = 0; i< m; i++) {
         for (j = 0; j < n; j++) {
              free(M[i][j]);
          }
          free(M[i]);
        }
}

// Assembly:
testq %rsi, %rsi
jle 0xaac3
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
testq %rbx, %rbx
jle 0xaaa9
xorl %r13d, %r13d
movq (%r15,%r12,8), %rax
movq (%rax,%r13,8), %rdi
callq 0x2250
incq %r13
cmpq %r13, %rbx
jne 0xaa94
movq (%r15,%r12,8), %rdi
callq 0x2250
incq %r12
cmpq %r14, %r12
jne 0xaa8c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: vector_set(double*, double, long)
void vector_set( double x[], double a, long n_elements )
{
 	 //adds up vector plus constant
 	   long i;	     
 	   for(i=0;i<n_elements;i++){
	   							 x[i]=a;	   
 	   
	   }
	   return;
	   }

// Assembly:
testq %rsi, %rsi
jle 0xab5e
leaq 0x1(%rsi), %rax
andq $-0x2, %rax
decq %rsi
movq %rsi, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa 0x9a6(%rip), %xmm2      # 0xb490
xorl %ecx, %ecx
movdqa 0xdfc(%rip), %xmm3      # 0xb8f0
pxor %xmm3, %xmm1
pcmpeqd %xmm4, %xmm4
movdqa 0x9cc(%rip), %xmm5      # 0xb4d0
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm1, %xmm7
pcmpeqd %xmm1, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0xab3d
movsd %xmm0, (%rdi,%rcx,8)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xab51
movsd %xmm0, 0x8(%rdi,%rcx,8)
addq $0x2, %rcx
paddq %xmm5, %xmm2
cmpq %rcx, %rax
jne 0xab04
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: matrix_const_add(double**, double**, double, long, long)
void matrix_const_add( double** res, double** M, double a, long n, long m )
{
 	   long i,j;	     
 	   for(i=0;i<n;i++){
                      for(j=0;j<m;j++){
	   							         res[i][j]=M[i][j]+a;
                                         }
                    }	   
 	   
	   return;
	   }

// Assembly:
testq %rdx, %rdx
jle 0xac11
xorl %eax, %eax
testq %rcx, %rcx
jle 0xac09
movq (%rsi,%rax,8), %r8
movq (%rdi,%rax,8), %r9
xorl %r10d, %r10d
movsd (%r8,%r10,8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%r9,%r10,8)
incq %r10
cmpq %r10, %rcx
jne 0xabf1
incq %rax
cmpq %rdx, %rax
jne 0xabe1
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: matrix_add(double**, double**, double**, long, long)
void matrix_add( double** res, double** M1, double** M2, long n, long m )
{
 	   long i,j;	     
 	   for(i=0;i<n;i++){
                      for(j=0;j<m;j++){
	   							         res[i][j]=M1[i][j]+M2[i][j];
                                         }
                    }	   
 	   
	   return;
	   }

// Assembly:
testq %rcx, %rcx
jle 0xac50
pushq %rbx
xorl %eax, %eax
testq %r8, %r8
jle 0xac47
movq (%rsi,%rax,8), %r9
movq (%rdx,%rax,8), %r10
movq (%rdi,%rax,8), %r11
xorl %ebx, %ebx
movsd (%r9,%rbx,8), %xmm0
addsd (%r10,%rbx,8), %xmm0
movsd %xmm0, (%r11,%rbx,8)
incq %rbx
cmpq %rbx, %r8
jne 0xac2d
incq %rax
cmpq %rcx, %rax
jne 0xac1a
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: matrix_const_multiply(double**, double**, double, long, long)
void matrix_const_multiply( double** res, double** M, double factor, long n, long m)
{
 	 //multiplies matrix with constant
 	   long i,j;	     
 	   for(i=0;i<n;i++){
                      for(j=0;j<m;j++){
                                       res[i][j]=M[i][j]*factor;
                                       }
 	   
	   }
	   return;
	   }

// Assembly:
testq %rdx, %rdx
jle 0xac88
xorl %eax, %eax
testq %rcx, %rcx
jle 0xac80
movq (%rsi,%rax,8), %r8
movq (%rdi,%rax,8), %r9
xorl %r10d, %r10d
movsd (%r8,%r10,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r9,%r10,8)
incq %r10
cmpq %r10, %rcx
jne 0xac68
incq %rax
cmpq %rdx, %rax
jne 0xac58
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/vectorfunctions.c
// Function: matrix_matrix_multiply(double**, double**, double**, long, long)
void matrix_matrix_multiply(  double** res, double** M1, double** M2, long n, long m )
{
 	 //multiplies array with constant
 	   long i,j;	     
 	   for(i=0;i<n;i++){
                               for(j=0;j<m;j++){
	   							                                       res[i][j]=M1[i][j]*M2[i][j];	   
                                                         }
 	   
	   }
	   return;
	   }

// Assembly:
testq %rcx, %rcx
jle 0xacc7
pushq %rbx
xorl %eax, %eax
testq %r8, %r8
jle 0xacbe
movq (%rsi,%rax,8), %r9
movq (%rdx,%rax,8), %r10
movq (%rdi,%rax,8), %r11
xorl %ebx, %ebx
movsd (%r9,%rbx,8), %xmm0
mulsd (%r10,%rbx,8), %xmm0
movsd %xmm0, (%r11,%rbx,8)
incq %rbx
cmpq %rbx, %r8
jne 0xaca4
incq %rax
cmpq %rcx, %rax
jne 0xac91
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/LuaJIT[P]LuaJIT/src/./../dynasm/dasm_x86.h
// Function: dasm_init
void dasm_init(Dst_DECL, int maxsection)
{
  dasm_State *D;
  size_t psz = 0;
  Dst_REF = NULL;
  DASM_M_GROW(Dst, struct dasm_State, Dst_REF, psz, DASM_PSZ(maxsection));
  D = Dst_REF;
  D->psize = psz;
  D->lglabels = NULL;
  D->lgsize = 0;
  D->pclabels = NULL;
  D->pcsize = 0;
  D->globals = NULL;
  D->maxsection = maxsection;
  memset((void *)D->sections, 0, maxsection * sizeof(dasm_Section));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq $0x0, (%rdi)
leal -0x1(%rbx), %eax
cltq
leaq (%rax,%rax,4), %rax
shlq $0x3, %rax
addq $0x78, %rax
je 0x582a
movl $0x10, %ecx
movq %rcx, %r15
addq %rcx, %rcx
cmpq %rax, %r15
jb 0x5805
movq %r15, %rdi
callq 0x5140
movq %rax, (%r14)
testq %rax, %rax
jne 0x582d
movl $0x1, %edi
callq 0x51b0
xorl %r15d, %r15d
movq (%r14), %rdi
movq %r15, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movq $0x0, 0x30(%rdi)
movl %ebx, 0x48(%rdi)
addq $0x50, %rdi
movslq %ebx, %rax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdx
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x50c0
// File: /workspace/github_c_makefile_star2_O1/LuaJIT[P]LuaJIT/src/host/buildvm.c
// Function: sym_decorate
static const char *sym_decorate(BuildCtx *ctx,
				const char *prefix, const char *suffix)
{
  char name[256];
  char *p;
#if LJ_64
  const char *symprefix = ctx->mode == BUILD_machasm ? "_" : "";
#elif LJ_TARGET_XBOX360
  const char *symprefix = "";
#else
  const char *symprefix = ctx->mode != BUILD_elfasm ? "_" : "";
#endif
  sprintf(name, "%s%s%s", symprefix, prefix, suffix);
  p = strchr(name, '@');
  if (p) {
#if LJ_TARGET_X86ORX64
    if (!LJ_64 && (ctx->mode == BUILD_coffasm || ctx->mode == BUILD_peobj))
      name[0] = name[1] == 'R' ? '_' : '@';  /* Just for _RtlUnwind@16. */
    else
      *p = '\0';
#elif LJ_TARGET_PPC && !LJ_TARGET_CONSOLE
    /* Keep @plt etc. */
#else
    *p = '\0';
#endif
  }
  p = (char *)malloc(strlen(name)+1);  /* MSVC doesn't like strdup. */
  strcpy(p, name);
  return p;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r8
movq %rsi, %rcx
cmpl $0x2, 0x8(%rdi)
leaq 0xb948(%rip), %rax      # 0x12db3
leaq 0xafac(%rip), %rdx      # 0x1241e
cmoveq %rax, %rdx
leaq 0x9906(%rip), %rsi      # 0x10d83
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x51a0
movq %rbx, %rdi
movl $0x40, %esi
callq 0x50b0
testq %rax, %rax
je 0x749f
movb $0x0, (%rax)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x50a0
leaq 0x1(%rax), %rdi
callq 0x5140
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5060
movq %r14, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/LuaJIT[P]LuaJIT/src/host/buildvm_lib.c
// Function: libdef_lua
static void libdef_lua(BuildCtx *ctx, char *p, int arg)
{
  UNUSED(arg);
  if (ctx->mode == BUILD_libdef) {
    int i;
    for (i = 0; libbc_map[i].name != NULL; i++) {
      if (!strcmp(libbc_map[i].name, p)) {
	int ofs = libbc_map[i].ofs;
	int len = libbc_map[i+1].ofs - ofs;
	obuf[2]++;  /* Bump hash table size. */
	*optr++ = LIBINIT_LUA;
	libdef_name(p, 0);
	memcpy(optr, libbc_code + ofs, len);
	libdef_fixupbc(optr);
	optr += len;
	return;
      }
    }
    fprintf(stderr, "Error: missing libbc definition for %s\n", p);
    exit(1);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x7, 0x8(%rdi)
jne 0xa8a1
movq %rsi, %r14
leaq 0x892e(%rip), %rdi      # 0x1308d
callq 0x5100
leaq 0xc5e5(%rip), %rbx      # 0x16d50
movl $0x1, %r15d
testl %eax, %eax
je 0xa7a0
leaq 0xc5d4(%rip), %r12      # 0x16d50
cmpq $0x8, %r15
je 0xa8ad
movq 0x10(%r12), %rdi
addq $0x10, %r12
movq %r14, %rsi
callq 0x5100
incq %r15
testl %eax, %eax
jne 0xa77c
jmp 0xa7a3
movq %rbx, %r12
movslq 0x8(%r12), %r12
shlq $0x4, %r15
movslq 0x8(%r15,%rbx), %rbx
subq %r12, %rbx
incb 0xca78(%rip)            # 0x17232
movq 0xea6f(%rip), %rax      # 0x19230
leaq 0x1(%rax), %rcx
movq %rcx, 0xea64(%rip)      # 0x19230
movb $-0x7, (%rax)
movq %r14, %rdi
xorl %esi, %esi
callq 0xabdc
movq 0xea50(%rip), %r14      # 0x19230
leaq 0x8349(%rip), %rsi      # 0x12b30
addq %r12, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5130
leaq 0x5(%r14), %rax
cmpb $0x0, 0x4(%r14)
js 0xa805
movq %rax, %rdx
jmp 0xa811
leaq 0x1(%rax), %rdx
cmpb $0x0, (%rax)
movq %rdx, %rax
js 0xa805
leaq 0x1(%rdx), %rcx
cmpb $0x0, (%rdx)
js 0xa81f
movq %rcx, %rax
jmp 0xa82b
leaq 0x1(%rcx), %rax
cmpb $0x0, (%rcx)
movq %rax, %rcx
js 0xa81f
movzbl (%rax), %edx
incq %rax
testb %dl, %dl
jns 0xa854
andl $0x7f, %edx
movl $0x7, %ecx
movzbl (%rax), %esi
movl %esi, %edi
andl $0x7f, %edi
shll %cl, %edi
orl %edi, %edx
incq %rax
addl $0x7, %ecx
testb %sil, %sil
js 0xa83d
testl %edx, %edx
je 0xa89a
movl %edx, %ecx
xorl %edx, %edx
movl $0x11, %esi
movl $0xf, %edi
movzbl (%rax,%rdx,4), %r8d
movb 0x2(%rax,%rdx,4), %r9b
movl %r8d, %r10d
xorb $0x10, %r10b
movzbl %r9b, %r11d
xorb $0xe, %r9b
orb %r10b, %r9b
cmovel %esi, %r8d
cmovel %edi, %r11d
movb %r8b, (%rax,%rdx,4)
movb %r11b, 0x2(%rax,%rdx,4)
incq %rdx
cmpl %edx, %ecx
jne 0xa866
addq %rbx, 0xe98f(%rip)      # 0x19230
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x5477
// File: /workspace/github_c_makefile_star2_O1/starius[P]dna-complement/make-int-table.c
// Function: main
int main() {
    initializeTranslate();
    unsigned x, y;
    for (x = 0; x < NCHARS * NCHARS; x++) {
        unsigned int buffer[NCHARS * NCHARS];
        for (y = 0; y < NCHARS * NCHARS; y++) {
            unsigned int in_xy = (x << 16) | y;
            unsigned int out_xy =
                ((unsigned int)(short_translate[x]) << 16) |
                (unsigned int)(short_translate[y]);
            buffer[y] = out_xy;
        }
        fwrite((char*)buffer, 1, sizeof(buffer), stdout);
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40008, %rsp          # imm = 0x40008
callq 0x113c
xorl %r14d, %r14d
leaq 0x2f26(%rip), %r15      # 0x4140
pxor %xmm2, %xmm2
movq 0x2dbb(%rip), %r12      # 0x3fe0
movq %rsp, %rbx
movzwl (%r15,%r14,2), %eax
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pslld $0x10, %xmm0
xorl %eax, %eax
movq (%rax,%r15), %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
por %xmm0, %xmm1
movdqa %xmm1, (%rsp,%rax,2)
addq $0x8, %rax
cmpq $0x20000, %rax          # imm = 0x20000
jne 0x123d
movq (%r12), %rcx
movl $0x1, %esi
movl $0x40000, %edx          # imm = 0x40000
movq %rbx, %rdi
callq 0x1030
pxor %xmm2, %xmm2
incq %r14
cmpq $0x10000, %r14          # imm = 0x10000
jne 0x1228
xorl %eax, %eax
addq $0x40008, %rsp          # imm = 0x40008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_06/reopen.c
// Function: main
int main(void)
{
	int mode;
	FILE *fp;

	mode = fwide(stdout, 0);
	wprintf(L"by default stdout has mode=%d\n", mode);
	mode = fwide(stdout, 0);
	wprintf(L"now stdout has mode=%d\n", mode);

	fp = freopen(NULL, "a+", stdout);
	if (!fp) {
		perror("freopen");
		return -1;
	}

	mode = fwide(stdout, 0);
	wprintf(L"after freopen() stdout has mode=%d\n", mode);

	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x2e69(%rip), %r14      # 0x3fe0
movq (%r14), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x1050
leaq 0xe7a(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movq (%r14), %rdi
xorl %esi, %esi
callq 0x1050
leaq 0xedc(%rip), %rdi       # 0x2080
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movq (%r14), %rdx
leaq 0xfb9(%rip), %rsi       # 0x2170
xorl %edi, %edi
callq 0x1030
testq %rax, %rax
je 0x11e7
movq (%r14), %rdi
xorl %esi, %esi
callq 0x1050
leaq 0xf0c(%rip), %rdi       # 0x20e0
movl %eax, %esi
xorl %eax, %eax
callq 0x1040
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xf85(%rip), %rdi       # 0x2173
callq 0x1060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x11dd
// File: /workspace/github_c_makefile_star2_O1/ngkaho1234[P]ext4-extents-tree/exttraverse.c
// Function: free_ext4_db
static void free_ext4_db(struct inode *inode)
{
	struct db_handle *db_handle = inode->i_db;
	struct block_device *bdev = inode->i_sb->s_bdev;

	inode_free(inode);
	db_close(db_handle);
	bdev_free(bdev);
	fs_bh_showstat();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
movq (%rdi), %rax
movq 0x18(%rdi), %r14
movq 0x10(%rax), %rbx
testb $0x1, 0x74(%rdi)
je 0x2820
movq 0x78(%r15), %rax
testq %rax, %rax
je 0x281b
movq %r15, %rdi
callq *%rax
testl %eax, %eax
jne 0x2820
andb $-0x2, 0x74(%r15)
movq %r15, %rdi
callq 0x2030
movq %r14, %rdi
callq 0x4364
movq %rbx, %rdi
callq 0x2b4d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2947
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: dispatch_init
struct dispatch_state *
dispatch_init(const int * socks, size_t nsocks,
    struct wire_requestqueue * Q, size_t maxconn)
{
	struct dispatch_state * dstate;
	size_t i;

	/* Bake a cookie. */
	if ((dstate = malloc(sizeof(struct dispatch_state))) == NULL)
		goto err0;
	dstate->nsock_listen = nsocks;
	dstate->sock_active = NULL;
	dstate->nsock_active = 0;
	dstate->nsock_active_max = maxconn;
	dstate->Q = Q;
	dstate->failed = 0;

	/* Allocate an array of listeners. */
	if ((dstate->sock_listen =
	    malloc(nsocks * sizeof(struct sock_listen))) == NULL)
		goto err1;
	for (i = 0; i < nsocks; i++) {
		dstate->sock_listen[i].dstate = dstate;
		dstate->sock_listen[i].s = socks[i];
		dstate->sock_listen[i].accept_cookie = NULL;
	}

	/* Start accepting connections. */
	if (accept_start(dstate))
		goto err2;

	/* Success! */
	return (dstate);

err2:
	free(dstate->sock_listen);
err1:
	free(dstate);
err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl $0x38, %edi
callq 0x2270
testq %rax, %rax
je 0x33b3
movq %rax, %rbx
movq %r14, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %r13, 0x20(%rax)
movq %r12, 0x28(%rax)
movl $0x0, 0x30(%rax)
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %rdi
callq 0x2270
movq %rax, (%rbx)
testq %rax, %rax
je 0x33ab
testq %r14, %r14
je 0x3397
addq $0x10, %rax
xorl %ecx, %ecx
movq %rbx, -0x10(%rax)
movl (%r15,%rcx,4), %edx
movl %edx, -0x8(%rax)
movq $0x0, (%rax)
incq %rcx
addq $0x18, %rax
cmpq %rcx, %r14
jne 0x3379
movq %rbx, %rdi
callq 0x33c2
testl %eax, %eax
je 0x33b5
movq (%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: accept_start
static int
accept_start(struct dispatch_state * dstate)
{
	struct sock_listen * L;
	size_t i;

	/* Make sure we don't have any in-progress accepts. */
	for (i = 0; i < dstate->nsock_listen; i++) {
		L = &dstate->sock_listen[i];
		if (L->accept_cookie != NULL) {
			warn0("Already trying to accept a connection!");
			goto err0;
		}
	}

	/* Try to accept connections. */
	for (i = 0; i < dstate->nsock_listen; i++) {
		L = &dstate->sock_listen[i];
		if ((L->accept_cookie =
		    network_accept(L->s, callback_gotconn, L)) == NULL)
			goto err1;
	}

	/* Success! */
	return (0);

err1:
	/* Cancel the accepts we started. */
	accept_stop(dstate);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x33ed
movq (%rbx), %rcx
addq $0x10, %rcx
cmpq $0x0, (%rcx)
jne 0x3430
addq $0x18, %rcx
decq %rax
jne 0x33de
cmpq $0x0, 0x8(%rbx)
je 0x342c
xorl %r15d, %r15d
leaq 0x101(%rip), %r14       # 0x34ff
xorl %r12d, %r12d
movq (%rbx), %r13
leaq (%r15,%r13), %rdx
movl 0x8(%r13,%r15), %edi
movq %r14, %rsi
callq 0x5e34
movq %rax, 0x10(%r13,%r15)
testq %rax, %rax
je 0x344b
incq %r12
addq $0x18, %r15
cmpq 0x8(%rbx), %r12
jb 0x3401
xorl %eax, %eax
jmp 0x3458
leaq 0x7efa(%rip), %rdi      # 0xb331
xorl %eax, %eax
callq 0x8a5f
callq 0x20a0
movl $0x0, (%rax)
jmp 0x3453
movq %rbx, %rdi
callq 0x36cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: dispatch_done
void
dispatch_done(struct dispatch_state * dstate)
{

	/* Sanity-check. */
	assert(dstate->failed == 1);
	assert(dstate->sock_active == NULL);
	assert(dstate->nsock_active == 0);

	/* Free memory. */
	free(dstate->sock_listen);
	free(dstate);
}

// Assembly:
pushq %rbx
cmpl $0x1, 0x30(%rdi)
jne 0x34a2
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
jne 0x34c1
cmpq $0x0, 0x18(%rbx)
jne 0x34e0
movq (%rbx), %rdi
callq 0x2040
movq %rbx, %rdi
popq %rbx
jmp 0x2040
leaq 0x7e07(%rip), %rdi      # 0xb2b0
leaq 0x7e14(%rip), %rsi      # 0xb2c4
leaq 0x7e18(%rip), %rcx      # 0xb2cf
movl $0x20e, %edx            # imm = 0x20E
callq 0x21a0
leaq 0x7e33(%rip), %rdi      # 0xb2fb
leaq 0x7df5(%rip), %rsi      # 0xb2c4
leaq 0x7df9(%rip), %rcx      # 0xb2cf
movl $0x20f, %edx            # imm = 0x20F
callq 0x21a0
leaq 0x7e30(%rip), %rdi      # 0xb317
leaq 0x7dd6(%rip), %rsi      # 0xb2c4
leaq 0x7dda(%rip), %rcx      # 0xb2cf
movl $0x210, %edx            # imm = 0x210
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: accept_stop
static void
accept_stop(struct dispatch_state * dstate)
{
	struct sock_listen * L;
	size_t i;

	/* Iterate through the sockets, cancelling any accepts. */
	for (i = 0; i < dstate->nsock_listen; i++) {
		L = &dstate->sock_listen[i];
		if (L->accept_cookie != NULL) {
			network_accept_cancel(L->accept_cookie);
			L->accept_cookie = NULL;
		}
	}
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x371b
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %r14d
xorl %r15d, %r15d
movq (%rbx), %r12
movq (%r12,%r14), %rdi
testq %rdi, %rdi
je 0x3703
callq 0x5ef2
movq $0x0, (%r12,%r14)
incq %r15
addq $0x18, %r14
cmpq 0x8(%rbx), %r15
jb 0x36ea
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: readreq
static int
readreq(struct sock_active * S)
{

	/* We shouldn't be waiting yet. */
	assert(S->read_cookie == NULL);

	/* Wait for request packets to arrive. */
	if ((S->read_cookie =
	    wire_readpacket_wait(S->readq, callback_gotrequests, S)) == NULL) {
		warnp("Error waiting for requests to arrive");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x30(%rdi)
jne 0x3780
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
leaq 0x6d(%rip), %rsi        # 0x379f
movq %rbx, %rdx
callq 0x8cb5
movq %rax, %rcx
movq %rax, 0x30(%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x377e
callq 0x20a0
cmpl $0x0, (%rax)
je 0x376b
movq %rax, %rbx
leaq 0x7cb5(%rip), %rdi      # 0xb411
xorl %eax, %eax
callq 0x8940
movl $0x0, (%rbx)
jmp 0x3779
leaq 0x7c9f(%rip), %rdi      # 0xb411
xorl %eax, %eax
callq 0x8a5f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
leaq 0x7c51(%rip), %rdi      # 0xb3d8
leaq 0x7b36(%rip), %rsi      # 0xb2c4
leaq 0x7c5a(%rip), %rcx      # 0xb3ef
movl $0xd5, %edx
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: callback_gotrequests
static int
callback_gotrequests(void * cookie, int status)
{
	struct sock_active * S = cookie;
	struct dispatch_state * dstate = S->dstate;
	struct wire_packet P;
	struct forwardee * F;

	/* We're not waiting for a packet to be available any more. */
	S->read_cookie = NULL;

	/* If the wait failed, the connection is dying. */
	if (status)
		goto fail;

	/* Handle packets until there are no more or we encounter an error. */
	do {
		/* Grab a packet. */
		if (wire_readpacket_peek(S->readq, &P))
			goto fail;

		/* Exit the loop if no packet is available. */
		if (P.buf == NULL)
			break;

		/* Bake a cookie. */
		if ((F = mpool_forwardee_malloc()) == NULL)
			goto err0;
		F->ID = P.ID;
		F->conn = S;

		/* Send the request to the target. */
		if (wire_requestqueue_add(dstate->Q, P.buf, P.len,
		    callback_gotresponse, F))
			goto err1;

		/* We have an additional outstanding request. */
		S->nrequests++;

		/* Consume the packet. */
		wire_readpacket_consume(S->readq, &P);
	} while (1);

	/* Wait for more packets to arrive. */
	if (readreq(S))
		goto err0;

	/* Success! */
	return (0);

fail:
	/* If we have no requests in progress, drop the connection. */
	if (S->nrequests == 0) {
		if (dropconn(S))
			goto err0;
	}

	/* Return success; the connection will be reaped later. */
	return (0);

err1:
	free(F);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %r13
movq $0x0, 0x30(%rdi)
testl %esi, %esi
jne 0x37cf
movq 0x20(%rbx), %rdi
movq %rsp, %rsi
callq 0x8b84
testl %eax, %eax
je 0x37fa
xorl %ebp, %ebp
cmpq $0x0, 0x38(%rbx)
jne 0x37e9
movq %rbx, %rdi
callq 0x3c28
testl %eax, %eax
je 0x37e9
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xee(%rip), %r14        # 0x38ef
movq %rsp, %r15
cmpq $0x0, 0x10(%rsp)
je 0x38cb
incq 0xda01(%rip)            # 0x11218
movq 0xd9e2(%rip), %rax      # 0x11200
testq %rax, %rax
je 0x383c
movq 0xd9e6(%rip), %rcx      # 0x11210
leaq -0x1(%rax), %rdx
movq %rdx, 0xd9cb(%rip)      # 0x11200
movq -0x8(%rcx,%rax,8), %r12
jmp 0x386f
incq 0xd9dd(%rip)            # 0x11220
cmpl $0x0, 0xd9de(%rip)      # 0x11228
jne 0x3862
movq 0xd9e5(%rip), %rdi      # 0x11238
callq 0xa8c0
movl $0x1, 0xd9c6(%rip)      # 0x11228
movl $0x10, %edi
callq 0x2270
movq %rax, %r12
testq %r12, %r12
je 0x37e4
movq (%rsp), %rax
movq %rax, 0x8(%r12)
movq %rbx, (%r12)
movq 0x28(%r13), %rdi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq %r14, %rcx
movq %r12, %r8
callq 0x9725
testl %eax, %eax
jne 0x38e2
incq 0x38(%rbx)
movq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0x902c
movq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0x8b84
testl %eax, %eax
je 0x3804
jmp 0x37cf
movq %rbx, %rdi
callq 0x371c
testl %eax, %eax
jne 0x37e4
xorl %ebp, %ebp
jmp 0x37e9
movq %r12, %rdi
callq 0x2040
jmp 0x37e4
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/mux/dispatch.c
// Function: dropconn
static int
dropconn(struct sock_active * S)
{
	struct dispatch_state * dstate = S->dstate;

	/* Sanity check. */
	assert(S->read_cookie == NULL);
	assert(S->nrequests == 0);

	/* Detach from the dispatcher. */
	if (S->prev == NULL)
		dstate->sock_active = S->next;
	else
		S->prev->next = S->next;
	if (S->next != NULL)
		S->next->prev = S->prev;
	if (dstate->nsock_active-- == dstate->nsock_active_max) {
		if (accept_start(dstate))
			goto err2;
	}

	/* Free the buffered reader. */
	netbuf_read_free(S->readq);

	/* Free the buffered writer. */
	netbuf_write_free(S->writeq);

	/* Close the socket. */
	while (close(S->s)) {
		if (errno == EINTR)
			continue;
		warnp("close");
		goto err1;
	}

	/* Free the connection state. */
	free(S);

	/* Success! */
	return (0);

err2:
	netbuf_read_free(S->readq);
	netbuf_write_free(S->writeq);
	if (close(S->s))
		warnp("close");
err1:
	free(S);

	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x30(%rdi)
jne 0x3d50
movq %rdi, %rbx
cmpq $0x0, 0x38(%rdi)
jne 0x3d6f
movq (%rbx), %rdi
movq 0x10(%rbx), %rax
leaq 0x8(%rax), %rcx
leaq 0x10(%rdi), %rdx
testq %rax, %rax
cmoveq %rdx, %rcx
movq 0x8(%rbx), %rdx
movq %rdx, (%rcx)
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x3c6f
movq %rax, 0x10(%rcx)
movq 0x18(%rdi), %rax
leaq -0x1(%rax), %rcx
movq %rcx, 0x18(%rdi)
cmpq 0x20(%rdi), %rax
jne 0x3cd9
callq 0x33c2
testl %eax, %eax
je 0x3cd9
movq 0x20(%rbx), %rdi
callq 0x58c8
movq 0x28(%rbx), %rdi
callq 0x5cb3
movl 0x18(%rbx), %edi
callq 0x21c0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x3d31
callq 0x20a0
cmpl $0x0, (%rax)
je 0x3d40
movq %rax, %r14
leaq 0x7fcb(%rip), %rdi      # 0xbc94
xorl %eax, %eax
callq 0x8940
movl $0x0, (%r14)
jmp 0x3d31
movq 0x20(%rbx), %rdi
callq 0x58c8
movq 0x28(%rbx), %rdi
callq 0x5cb3
movl 0x18(%rbx), %edi
callq 0x21c0
testl %eax, %eax
je 0x3d1a
callq 0x20a0
movq %rax, %r14
movl (%rax), %eax
cmpl $0x4, %eax
je 0x3ceb
leaq 0x7f87(%rip), %rdi      # 0xbc94
testl %eax, %eax
jne 0x3d1e
xorl %eax, %eax
callq 0x8a5f
jmp 0x3d2c
xorl %ebp, %ebp
jmp 0x3d31
xorl %eax, %eax
callq 0x8940
movl $0x0, (%r14)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x2040
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7f4d(%rip), %rdi      # 0xbc94
xorl %eax, %eax
callq 0x8a5f
jmp 0x3d31
leaq 0x7681(%rip), %rdi      # 0xb3d8
leaq 0x7566(%rip), %rsi      # 0xb2c4
leaq 0x772c(%rip), %rcx      # 0xb491
movl $0x195, %edx            # imm = 0x195
callq 0x21a0
leaq 0x773e(%rip), %rdi      # 0xb4b4
leaq 0x7547(%rip), %rsi      # 0xb2c4
leaq 0x770d(%rip), %rcx      # 0xb491
movl $0x196, %edx            # imm = 0x196
callq 0x21a0
// File: /workspace/github_c_makefile_star2_O1/carlitosmarin[P]Sistema-Ficheros-SOII/escribir.c
// Function: main
int main (int argc, char **argv) {
	if (argc != 4) {
		printf("Número de parametros incorrectos\n");
		return -1;
	}

	char *camino = argv[2];
    if(camino[strlen(camino)-1] == '/'){
        printf("ERROR: ( %s ) no es un fichero.\n",camino);
        return -1;
    }

	bmount(argv[1]);
	int offset = atoi(argv[3]);

    int bytes = 0;
    char buffer[1000];
    strcpy (buffer, "blablablablablablablablablablabla...\n");

    int nin = 0; //= reservar_inodo ('f', 6);

    int n = strlen(buffer);
    int m = 70;
    int i, offsetActual;
    int er;

   	for(i = 0, offsetActual = offset ; i < m; i++, offsetActual += n){
   		er = mi_write(camino,&buffer,offsetActual,n);
    	if(er < 0) {
            bumount();
    		return 0;
    	}
        bytes += er;
	}

	bumount();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3f0, %rsp            # imm = 0x3F0
cmpl $0x4, %edi
jne 0x3e5d
movq %rsi, %r14
movq 0x10(%rsi), %rbx
movq %rbx, %rdi
callq 0x1080
cmpb $0x2f, -0x1(%rbx,%rax)
jne 0x3e70
leaq 0x6d9(%rip), %rdi       # 0x452a
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1090
jmp 0x3e69
leaq 0x70d(%rip), %rdi       # 0x4571
callq 0x1060
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x3ee2
movq 0x8(%r14), %rdi
callq 0x128c
movq 0x18(%r14), %rdi
callq 0x1150
movl %eax, %ebp
movups 0x6d0(%rip), %xmm0      # 0x455b
movq %rsp, %r14
movaps %xmm0, 0x10(%r14)
movups 0x6b1(%rip), %xmm0      # 0x454b
movaps %xmm0, (%r14)
movabsq $0xa2e2e2e616c62, %rax  # imm = 0xA2E2E2E616C62
movq %rax, 0x1e(%r14)
movq %r14, %rdi
callq 0x1080
movq %rax, %r15
movl $0x46, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x3c92
testl %eax, %eax
js 0x3ed9
addl %r15d, %ebp
decl %r12d
jne 0x3ebd
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x12ca
movl %ebx, %eax
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq