LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/EvolveField.c
// Function: FindCMFTime(double)
double FindCMFTime(double tcurrent)
{
	int j;
	double res;
	const double CMFTimes[CMFTIMENUM] = CMFTIMEVALUES; //times at which CMF and IMF are saved. 
	//Find nearest CMF observation time
	res=-1.0;//init
	if(tcurrent<=CMFTimes[0]){
		res=CMFTimes[0];
	}
	else{
		for ( j = 1; j < CMFTIMENUM; j++ ){
			if(CMFTimes[j-1]<tcurrent && CMFTimes[j]>=tcurrent){ //between these values
				res=CMFTimes[j];
			}
		}
	}

	return res;
}

// Assembly:
movapd %xmm0, %xmm1
movsd 0x42ae(%rip), %xmm0     # 0xb470
ucomisd %xmm1, %xmm0
jae 0x71fc
movsd 0x3e88(%rip), %xmm0     # 0xb058
pushq $0x1
popq %rax
leaq 0x43b6(%rip), %rcx      # 0xb590
cmpq $0x10, %rax
je 0x71fc
ucomisd -0x8(%rcx,%rax,8), %xmm1
jbe 0x71f7
movsd (%rcx,%rax,8), %xmm2
ucomisd %xmm1, %xmm2
jb 0x71f7
movapd %xmm2, %xmm0
incq %rax
jmp 0x71da
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/EvolveField.c
// Function: FindCMFTimeIndex(double)
long FindCMFTimeIndex(double tcurrent)
{
	int j;
	long res;
	const double CMFTimes[CMFTIMENUM] = CMFTIMEVALUES; //times at which CMF and IMF are saved. 
	//Find nearest CMF observation time
	res=-1;//init
	if(tcurrent<=CMFTimes[0]){
		res=0;
	}
	else{
		for ( j = 1; j < CMFTIMENUM; j++ ){
			if(CMFTimes[j-1]<tcurrent && CMFTimes[j]>=tcurrent){ //between these values
				res=j;
			}
		}
	}

	return res;
}

// Assembly:
movsd 0x426b(%rip), %xmm1     # 0xb470
ucomisd %xmm0, %xmm1
jae 0x7239
pushq $-0x1
popq %rax
pushq $0x1
popq %rcx
leaq 0x4378(%rip), %rdx      # 0xb590
cmpq $0x10, %rcx
je 0x723b
ucomisd -0x8(%rdx,%rcx,8), %xmm0
jbe 0x7234
movsd (%rdx,%rcx,8), %xmm1
ucomisd %xmm0, %xmm1
jb 0x7234
movq %rcx, %rax
incq %rcx
jmp 0x7218
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/EvolveField.c
// Function: IsSelfGravitating(double, double, double, double, double, double)
inline bool IsSelfGravitating(double SphereMass, double TMean, double R, double MachedgeSq, double gamma, double StrictnessFactor){
    if( SphereMass >  StrictnessFactor*(FourPiOver3*pow(R,3.0)*RhoCrit(TMean,R,MachedgeSq, gamma)) ){ 
         return true;
         }
    else{
         return false;
         }
}

// Assembly:
subq $0x38, %rsp
movsd %xmm5, 0x30(%rsp)
movsd %xmm4, 0x8(%rsp)
movsd %xmm3, 0x20(%rsp)
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x28(%rsp)
movsd 0x3e0c(%rip), %xmm1     # 0xb078
movapd %xmm2, %xmm0
callq 0x2350
movsd 0x3deb(%rip), %xmm1     # 0xb068
movsd 0x8(%rsp), %xmm2
mulsd 0x41ed(%rip), %xmm2     # 0xb478
divsd 0x41ed(%rip), %xmm2     # 0xb480
mulsd %xmm1, %xmm0
mulsd 0x10(%rsp), %xmm2
movapd %xmm2, %xmm4
movsd 0x20(%rsp), %xmm2
addsd 0x3da1(%rip), %xmm2     # 0xb050
movsd 0x18(%rsp), %xmm3
mulsd %xmm3, %xmm3
mulsd %xmm1, %xmm3
mulsd 0x40eb(%rip), %xmm3     # 0xb3b0
mulsd %xmm4, %xmm2
mulsd 0x40ef(%rip), %xmm3     # 0xb3c0
divsd %xmm3, %xmm2
mulsd %xmm0, %xmm2
mulsd 0x30(%rsp), %xmm2
movsd 0x28(%rsp), %xmm0
ucomisd %xmm2, %xmm0
seta %al
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: IncreaseInputStorage()
void IncreaseInputStorage(){
	long i;
	InputStorage=(struct inputstruct_s*) realloc(InputStorage, (NInputAllocated+StructIncreaseUnit)* sizeof(struct inputstruct_s));
	if(InputStorage==NULL){ //unsuccessful allocation
		cout<<"Memory allocation failure! Exiting!";
		exit(EXIT_FAILURE);
	}
	IsUsed=(bool*) realloc(IsUsed, (NInputAllocated+StructIncreaseUnit)*sizeof(bool));
	for(i=0;i<StructIncreaseUnit;i++){
		IsUsed[NInputAllocated+i]=false;
	}
    InputPriority=(double*) realloc(InputPriority, (NInputAllocated+StructIncreaseUnit)*sizeof(double));
	NInputAllocated+=StructIncreaseUnit; //note the number of elements
	cout<<"Input storage expanded to "<<NInputAllocated<<"\n";
}

// Assembly:
pushq %rax
movq 0x7f64(%rip), %rdi      # 0xf260
imulq $0x80050, 0x7f71(%rip), %rsi # imm = 0x80050
addq $0x1900fa0, %rsi        # imm = 0x1900FA0
callq 0x2320
movq %rax, 0x7f46(%rip)      # 0xf260
testq %rax, %rax
je 0x73b1
movq 0x7f46(%rip), %rdi      # 0xf270
movq 0x7f47(%rip), %rsi      # 0xf278
addq $0x32, %rsi
callq 0x2320
movq %rax, 0x7f2f(%rip)      # 0xf270
movq 0x7f30(%rip), %rcx      # 0xf278
addq %rcx, %rax
xorl %edx, %edx
cmpq $0x32, %rdx
je 0x735c
movb $0x0, (%rax,%rdx)
incq %rdx
jmp 0x734d
movq 0x7f05(%rip), %rdi      # 0xf268
leaq 0x190(,%rcx,8), %rsi
callq 0x2320
movq %rax, 0x7ef1(%rip)      # 0xf268
addq $0x32, 0x7ef9(%rip)     # 0xf278
movq 0x7c4a(%rip), %rdi      # 0xefd0
leaq 0x4283(%rip), %rsi      # 0xb610
callq 0x21b0
movq 0x7edf(%rip), %rsi      # 0xf278
movq %rax, %rdi
callq 0x2190
leaq 0x3e91(%rip), %rsi      # 0xb239
movq %rax, %rdi
popq %rax
jmp 0x21b0
movq 0x7c18(%rip), %rdi      # 0xefd0
leaq 0x3e88(%rip), %rsi      # 0xb247
callq 0x21b0
pushq $0x1
popq %rdi
callq 0x2220
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: FreeInputStorage()
void FreeInputStorage(){
	NInputAllocated=0;
	NInputCurrent=0;
	free(InputStorage);
	free(IsUsed);
	free(InputPriority);
}

// Assembly:
pushq %rax
andq $0x0, 0x7ea3(%rip)      # 0xf278
andq $0x0, 0x7ea3(%rip)      # 0xf280
movq 0x7e7c(%rip), %rdi      # 0xf260
callq 0x2210
movq 0x7e80(%rip), %rdi      # 0xf270
callq 0x2210
movq 0x7e6c(%rip), %rdi      # 0xf268
popq %rax
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: SaveAndFreeInputStorage()
void SaveAndFreeInputStorage(){
	char filename[200];
	
	//Get filename
	ContructFilePath("Restart_Inputs.txt", "Output", filename);
	//Save all accumulated input data
	SaveInputStorage(filename);
	FreeInputStorage(); //free memory
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
leaq 0x3d12(%rip), %rdi      # 0xb123
leaq 0x3c80(%rip), %rsi      # 0xb098
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x7a31
movq %rbx, %rdi
callq 0x7439
callq 0x73cc
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: PutIntoInputStorage(inputstruct_s*, long)
void PutIntoInputStorage(struct inputstruct_s* inputstruct, long pos_index){
	long i;
	
	//Rho
	for(i=0;i<NgridTotal;i++){
		InputStorage[pos_index].rho_field[i]=inputstruct[0].rho_field[i];
    }
	//T
	for(i=0;i<NgridTotal;i++){
		InputStorage[pos_index].T_field[i]=inputstruct[0].T_field[i];
    }
    InputStorage[pos_index].R0=inputstruct[0].R0;
    InputStorage[pos_index].X0=inputstruct[0].X0;
    InputStorage[pos_index].Y0=inputstruct[0].Y0;
    InputStorage[pos_index].Z0=inputstruct[0].Z0;
    InputStorage[pos_index].Machedge=inputstruct[0].Machedge;
    InputStorage[pos_index].RelativeVelocityX=inputstruct[0].RelativeVelocityX;
    InputStorage[pos_index].RelativeVelocityY=inputstruct[0].RelativeVelocityY;
    InputStorage[pos_index].RelativeVelocityZ=inputstruct[0].RelativeVelocityZ;
    InputStorage[pos_index].InitScale=inputstruct[0].InitScale;
    InputStorage[pos_index].tparent=inputstruct[0].tparent;
    
    //Assigned values
    IsUsed[pos_index]=true; //space occupied
    InputPriority[pos_index]=PriorityFunction(inputstruct);
    //InputPriority[pos_index]=1.0/inputstruct.R0;
    
	NInputCurrent++; //one more input struct has been added
}

// Assembly:
movq 0x7b8f(%rip), %rax      # 0xf260
imulq $0x80050, %rsi, %rcx    # imm = 0x80050
leaq (%rax,%rcx), %rdx
xorl %r8d, %r8d
cmpq $0x8000, %r8            # imm = 0x8000
je 0x76f9
movsd (%rdi,%r8,8), %xmm0
movsd %xmm0, (%rdx,%r8,8)
incq %r8
jmp 0x76df
leaq (%rcx,%rax), %rdx
addq $0x40000, %rdx          # imm = 0x40000
xorl %r8d, %r8d
cmpq $0x8000, %r8            # imm = 0x8000
je 0x7725
movsd 0x40000(%rdi,%r8,8), %xmm0
movsd %xmm0, (%rdx,%r8,8)
incq %r8
jmp 0x7707
movupd 0x80000(%rdi), %xmm0
movupd %xmm0, 0x80000(%rax,%rcx)
movups 0x80010(%rdi), %xmm1
movups %xmm1, 0x80010(%rax,%rcx)
movups 0x80020(%rdi), %xmm1
movups %xmm1, 0x80020(%rax,%rcx)
movups 0x80030(%rdi), %xmm1
movups %xmm1, 0x80030(%rax,%rcx)
movups 0x80040(%rdi), %xmm1
movups %xmm1, 0x80040(%rax,%rcx)
movq 0x7af7(%rip), %rax      # 0xf270
movb $0x1, (%rax,%rsi)
movsd 0x38cb(%rip), %xmm1     # 0xb050
divsd %xmm0, %xmm1
movq 0x7ad8(%rip), %rax      # 0xf268
movsd %xmm1, (%rax,%rsi,8)
incq 0x7ae4(%rip)            # 0xf280
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: InitInputDataType()
void InitInputDataType(){

//MPI Variables
const int nitems=12; //number of items in the structure	
int blocklengths[12]={NgridTotal,NgridTotal,1,1,1,1,1,1,1,1,1,1}; //length of struct blocks
MPI_Datatype types[12] = {MPI_DOUBLE, MPI_DOUBLE,MPI_DOUBLE, MPI_DOUBLE,MPI_DOUBLE, MPI_DOUBLE,MPI_DOUBLE, MPI_DOUBLE,MPI_DOUBLE, MPI_DOUBLE,MPI_DOUBLE, MPI_DOUBLE}; //type of variables in blocks
MPI_Aint offsets[12]; //memory offsets for each block	

//Find offsets of input datatype
offsets[0] = offsetof(inputstruct_s,rho_field);
offsets[1] = offsetof(inputstruct_s, T_field);
offsets[2] = offsetof(inputstruct_s, R0);
offsets[3] = offsetof(inputstruct_s, X0);
offsets[4] = offsetof(inputstruct_s, Y0);
offsets[5] = offsetof(inputstruct_s, Z0);
offsets[6] = offsetof(inputstruct_s, Machedge);
offsets[7] = offsetof(inputstruct_s, RelativeVelocityX);
offsets[8] = offsetof(inputstruct_s, RelativeVelocityY);
offsets[9] = offsetof(inputstruct_s, RelativeVelocityZ);
offsets[10] = offsetof(inputstruct_s, InitScale);
offsets[11] = offsetof(inputstruct_s, tparent);


//create MPI passable struct type
MPI_Type_create_struct(nitems, blocklengths, offsets, types, &mpi_inputstruct_type); 
//allows the type to be used for MPI communication
MPI_Type_commit(&mpi_inputstruct_type); 

	
}

// Assembly:
pushq %rbx
subq $0xf0, %rsp
movaps 0x3eb3(%rip), %xmm0     # 0xb670
movq %rsp, %rax
movaps %xmm0, 0x20(%rax)
movaps 0x3e95(%rip), %xmm0     # 0xb660
movaps %xmm0, 0x10(%rax)
movaps 0x3e7a(%rip), %xmm0     # 0xb650
movaps %xmm0, (%rax)
leaq 0x7500(%rip), %rsi      # 0xece0
pushq $0xc
popq %rcx
leaq 0x90(%rsp), %r8
movq %r8, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x30(%rsp), %rdx
andq $0x0, (%rdx)
movq $0x40000, 0x8(%rdx)     # imm = 0x40000
movq $0x80000, 0x10(%rdx)    # imm = 0x80000
movq $0x80008, 0x18(%rdx)    # imm = 0x80008
movq $0x80010, 0x20(%rdx)    # imm = 0x80010
movq $0x80018, 0x28(%rdx)    # imm = 0x80018
movq $0x80020, 0x30(%rdx)    # imm = 0x80020
movq $0x80028, 0x38(%rdx)    # imm = 0x80028
movq $0x80030, 0x40(%rdx)    # imm = 0x80030
movq $0x80038, 0x48(%rdx)    # imm = 0x80038
movq $0x80040, 0x50(%rdx)    # imm = 0x80040
movq $0x80048, 0x58(%rdx)    # imm = 0x80048
leaq 0x79f7(%rip), %rbx      # 0xf250
pushq $0xc
popq %rdi
movq %rax, %rsi
movq %r8, %rcx
movq %rbx, %r8
callq 0x21d0
movq %rbx, %rdi
callq 0x2230
addq $0xf0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: InitDensityStructDataType()
void InitDensityStructDataType(){
//MPI Variables
const int nitems=6; //number of items in the structure	
int blocklengths[6]={NgridTotal,NgridTotal,NgridTotal,NgridTotal,NgridTotal,1}; //length of struct blocks
MPI_Datatype types[6] = {MPI_DOUBLE, MPI_DOUBLE,MPI_DOUBLE, MPI_DOUBLE,MPI_DOUBLE, MPI_DOUBLE}; //type of variables in blocks
MPI_Aint offsets[6]; //memory offsets for each block	

//Find offsets of input datatype
offsets[0] = offsetof(densitystruct_s,rho_field);
offsets[1] = offsetof(densitystruct_s, T_field);
offsets[2] = offsetof(densitystruct_s, xcoord);
offsets[3] = offsetof(densitystruct_s, ycoord);
offsets[4] = offsetof(densitystruct_s, zcoord);
offsets[5] = offsetof(densitystruct_s, volume);



//create MPI passable struct type
MPI_Type_create_struct(nitems, blocklengths, offsets, types, &mpi_densitystruct_type); 
//allows the type to be used for MPI communication
MPI_Type_commit(&mpi_densitystruct_type); 

	
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movaps 0x3df6(%rip), %xmm0     # 0xb680
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movabsq $0x100008000, %rax      # imm = 0x100008000
movq %rax, 0x10(%rsi)
movaps 0x74bb(%rip), %xmm0     # 0xed60
leaq 0x50(%rsp), %rcx
movaps %xmm0, 0x20(%rcx)
movaps 0x749b(%rip), %xmm0     # 0xed50
movaps %xmm0, 0x10(%rcx)
movaps 0x7480(%rip), %xmm0     # 0xed40
movaps %xmm0, (%rcx)
leaq 0x20(%rsp), %rdx
andq $0x0, (%rdx)
movq $0x40000, 0x8(%rdx)     # imm = 0x40000
movq $0x80000, 0x10(%rdx)    # imm = 0x80000
movq $0xc0000, 0x18(%rdx)    # imm = 0xC0000
movq $0x100000, 0x20(%rdx)   # imm = 0x100000
movq $0x140000, 0x28(%rdx)   # imm = 0x140000
leaq 0x795d(%rip), %rbx      # 0xf258
pushq $0x6
popq %rdi
movq %rbx, %r8
callq 0x21d0
movq %rbx, %rdi
callq 0x2230
addq $0x80, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: InitInputDataStorage(long)
void InitInputDataStorage(long Nitem)
{
	//Init global counting variables
	NInputAllocated=Nitem;
	NInputCurrent=0;
	InputStorage=(struct inputstruct_s*) calloc(Nitem,sizeof(struct inputstruct_s));
	if(InputStorage==NULL){ //unsuccessful allocation
		cout<<"Memory allocation failure! Exiting!";
		exit(EXIT_FAILURE);
	}
    IsUsed=vector_bool(Nitem);
    InputPriority=vector_double(Nitem);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rdi, 0x7956(%rip)      # 0xf278
andq $0x0, 0x7956(%rip)      # 0xf280
movl $0x80050, %esi          # imm = 0x80050
callq 0x20f0
movq %rax, 0x7925(%rip)      # 0xf260
testq %rax, %rax
je 0x7960
movq %rbx, %rdi
callq 0x9ee8
movq %rax, 0x7921(%rip)      # 0xf270
movq %rbx, %rdi
callq 0x9ea1
movq %rax, 0x790a(%rip)      # 0xf268
popq %rbx
retq
movq 0x7669(%rip), %rdi      # 0xefd0
leaq 0x38d9(%rip), %rsi      # 0xb247
callq 0x21b0
pushq $0x1
popq %rdi
callq 0x2220
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: NextToCall()
long NextToCall(){
	long i,ind=-1;
	double temp=0;
	
	for(i=0;i<NInputAllocated;i++){
		if(IsUsed[i]){
			if(ind==-1){
				ind=i;
				temp=InputPriority[i];
			}
			else{
				if(InputPriority[i]>temp){
					ind=i;
					temp=InputPriority[i];
				}
			}
			
		}
    }
    
    return ind;	
}

// Assembly:
movq 0x78f6(%rip), %rcx      # 0xf278
movq 0x78e7(%rip), %rdx      # 0xf270
movq 0x78d8(%rip), %rsi      # 0xf268
xorl %edi, %edi
testq %rcx, %rcx
cmovleq %rdi, %rcx
xorpd %xmm0, %xmm0
pushq $-0x1
popq %rax
cmpq %rdi, %rcx
je 0x79c8
cmpb $0x1, (%rdx,%rdi)
jne 0x79c3
movsd (%rsi,%rdi,8), %xmm1
cmpq $-0x1, %rax
je 0x79bc
ucomisd %xmm0, %xmm1
jbe 0x79c3
movq %rdi, %rax
movapd %xmm1, %xmm0
incq %rdi
jmp 0x79a0
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: FirstUnused()
long FirstUnused(){
	long i;
	for(i=0;i<NInputAllocated;i++){
		if(IsUsed[i]==false){
			return i;
		}
	}
	cout<<"All of InputStorage used.";
	return -1; //error
}

// Assembly:
pushq %rax
movq 0x78a7(%rip), %rcx      # 0xf278
movq 0x7898(%rip), %rdx      # 0xf270
xorl %eax, %eax
testq %rcx, %rcx
cmovleq %rax, %rcx
cmpq %rax, %rcx
je 0x79f1
cmpb $0x0, (%rdx,%rax)
je 0x7a07
incq %rax
jmp 0x79e1
movq 0x75d8(%rip), %rdi      # 0xefd0
leaq 0x3c2c(%rip), %rsi      # 0xb62b
callq 0x21b0
pushq $-0x1
popq %rax
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/FileManage.c
// Function: file_exists(char*)
bool file_exists (char* filename) {
    if (FILE *file = fopen(filename, "r")) {
        fclose(file);
        return true;
    } else {
        return false;
    }   
}

// Assembly:
pushq %rbx
leaq 0x3c84(%rip), %rsi      # 0xb698
callq 0x2200
movq %rax, %rbx
testq %rax, %rax
je 0x7a29
movq %rbx, %rdi
callq 0x21c0
testq %rbx, %rbx
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/FileManage.c
// Function: WriteLineToTextFile(char*, char*)
void WriteLineToTextFile(char* line, char* filename)
{
	FILE *targetfile; //input file handle
    //Open file
    targetfile = fopen (filename,"a");
    //Save line to file
	fprintf(targetfile,"%s\n",line);
	fflush(targetfile);
	fclose(targetfile);		
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x3c38(%rip), %rsi      # 0xb6a1
movq %rax, %rdi
callq 0x2200
movq %rax, %r14
leaq 0x3c28(%rip), %rsi      # 0xb6a3
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2290
movq %r14, %rdi
callq 0x21f0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21c0
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/FileManage.c
// Function: CountNumberOfLines(char*)
long CountNumberOfLines(char* filename){
	
FILE *fp = fopen(filename,"r");
int ch=0;
long lines=0;

while(!feof(fp))
{
  ch = fgetc(fp);
  if(ch == '\n')
  {
    lines++;
  }
}

return lines;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3bee(%rip), %rsi      # 0xb698
callq 0x2200
movq %rax, %r14
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x22d0
testl %eax, %eax
jne 0x7ad5
movq %r14, %rdi
callq 0x22e0
xorl %ecx, %ecx
cmpl $0xa, %eax
sete %cl
addq %rcx, %rbx
jmp 0x7ab4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/comparison.c
// Function: Min_array_double(double*, long)
double Min_array_double(double* x, long N)
{
long i;
double res;

res=x[0]; //init
 for (i = 0; i < N; i++){
     if (x[i]>res){
        res=x[i];
        }
     }
 return res;
}

// Assembly:
movsd (%rdi), %xmm0
xorl %eax, %eax
testq %rsi, %rsi
cmovleq %rax, %rsi
cmpq %rax, %rsi
je 0x7b4e
movsd (%rdi,%rax,8), %xmm1
maxsd %xmm0, %xmm1
incq %rax
movapd %xmm1, %xmm0
jmp 0x7b37
retq
// File: /workspace/github_c_makefile_star2_O2/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 %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jbe 0x7bfb
movq %rdi, %r14
movsd 0x38bc(%rip), %xmm1     # 0xb450
callq 0x2350
mulsd 0x3b07(%rip), %xmm0     # 0xb6a8
movsd %xmm0, (%rsp)
movsd 0x10(%r14), %xmm0
movsd 0x349c(%rip), %xmm1     # 0xb050
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movsd 0x3814(%rip), %xmm1     # 0xb3d8
callq 0x2350
movapd %xmm0, %xmm2
mulsd (%rsp), %xmm2
movsd 0x18(%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x7be8
sqrtsd %xmm0, %xmm0
jmp 0x7bf7
movsd %xmm2, (%rsp)
callq 0x2140
movsd (%rsp), %xmm2
mulsd %xmm0, %xmm2
movsd %xmm2, (%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rbx)
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 0x80f4
cmpl $0x1, %ebx
jne 0x814b
movslq %ebp, %rdi
shlq $0x4, %rdi
callq 0x2240
testq %rax, %rax
je 0x812c
movq %rax, %r15
pushq $0x1
popq %rcx
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movq %rax, %r8
callq 0x7c18
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2210
leaq 0x3645(%rip), %rdi      # 0xb778
leaq 0x3589(%rip), %rsi      # 0xb6c3
leaq 0x3619(%rip), %rcx      # 0xb75a
movl $0xbd, %edx
callq 0x20e0
leaq 0x35f0(%rip), %rdi      # 0xb742
leaq 0x356a(%rip), %rsi      # 0xb6c3
leaq 0x35fa(%rip), %rcx      # 0xb75a
movl $0xbb, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O2/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, %r14
movl %ecx, (%rsp)
cmpl $-0x1, %ecx
je 0x8191
cmpl $0x1, (%rsp)
jne 0x822d
movslq %ebx, %r12
movq %r12, 0x10(%rsp)
shlq $0x4, %r12
movq %r12, %rdi
callq 0x2240
testq %rax, %rax
je 0x820e
movq %rax, %r13
movl %ebx, %r15d
imull %ebx, %ebp
movl %ebp, 0x4(%rsp)
movslq %ebp, %rbp
xorl %ebx, %ebx
movq %r14, 0x8(%rsp)
cmpq %rbp, %rbx
jge 0x81e4
movq %r14, %rdi
movl %r15d, %esi
movl (%rsp), %edx
pushq $0x1
popq %rcx
movq %r13, %r8
callq 0x7c18
addq 0x10(%rsp), %rbx
addq %r12, %r14
jmp 0x81c1
movq %r13, %rdi
callq 0x2210
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
movl (%rsp), %edx
movl %r15d, %ecx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7e78
leaq 0x3563(%rip), %rdi      # 0xb778
leaq 0x34a7(%rip), %rsi      # 0xb6c3
leaq 0x355f(%rip), %rcx      # 0xb782
movl $0xd5, %edx
callq 0x20e0
leaq 0x350e(%rip), %rdi      # 0xb742
leaq 0x3488(%rip), %rsi      # 0xb6c3
leaq 0x3540(%rip), %rcx      # 0xb782
movl $0xd2, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O2/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 %ecx, %r14d
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, 0x10(%rsp)
cmpl $-0x1, %r8d
je 0x8276
cmpl $0x1, %r8d
jne 0x836d
movl %r8d, 0xc(%rsp)
imull %r14d, %ebx
movslq %ebx, %rax
movq %rax, 0x30(%rsp)
movq %rax, %rdi
shlq $0x4, %rdi
movq %rdi, 0x28(%rsp)
callq 0x2240
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x834e
movl %ebx, 0x24(%rsp)
imull %ebx, %ebp
movl %r14d, %r15d
movslq %r14d, %rbx
movl %ebp, 0x20(%rsp)
movslq %ebp, %r13
movq %rbx, %r14
shlq $0x4, %r14
xorl %r12d, %r12d
movq 0x10(%rsp), %rbp
cmpq %r13, %r12
jge 0x82ed
movq %rbp, %rdi
movl %r15d, %esi
movl 0xc(%rsp), %edx
pushq $0x1
popq %rcx
movq 0x18(%rsp), %r8
callq 0x7c18
addq %rbx, %r12
addq %r14, %rbp
jmp 0x82c9
xorl %ebx, %ebx
movq 0x10(%rsp), %r14
movl 0xc(%rsp), %ebp
movl 0x24(%rsp), %r12d
cmpq %r13, %rbx
jge 0x8323
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
movl %r15d, %ecx
movq 0x18(%rsp), %r8
callq 0x7c18
addq 0x30(%rsp), %rbx
addq 0x28(%rsp), %r14
jmp 0x82fd
movq 0x18(%rsp), %rdi
callq 0x2210
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
movl %ebp, %edx
movl %r12d, %ecx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7e78
leaq 0x3423(%rip), %rdi      # 0xb778
leaq 0x3367(%rip), %rsi      # 0xb6c3
leaq 0x3444(%rip), %rcx      # 0xb7a7
movl $0xe7, %edx
callq 0x20e0
leaq 0x33ce(%rip), %rdi      # 0xb742
leaq 0x3348(%rip), %rsi      # 0xb6c3
leaq 0x3425(%rip), %rcx      # 0xb7a7
movl $0xe3, %edx
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O2/guszejnovdavid[P]MISFIT/FindParameter_Newton.c
// Function: FindMach(double)
double FindMach(double m)

{
    double Delta = 1E-6;       /* Tolerance  */
    double Epsilon = 1E-6;     /* Tolerance  */
    double Small = 1E-6;       /* Tolerance  */

    int Max = 99;  /* Maximum number of iterations  */
    int Cond = 0;  /* Condition fo loop termination */
    int K;         /* Counter for loop              */

    double P0=1.0;    /* INPUT : Must be close to the root */
    double P1;    /* New iterate    */
    double Y0;    /* Function value */
    double Y1;    /* Function value */
    double Df;    /* Derivative     */
    double Dp;
    double RelErr;


    Y0 = ffunction_Mach(P0,m);

    for ( K = 1; K <= Max ; K++) {

        if(Cond) break;

        Df = dffunction_Mach(P0);      /* Compute the derivative  */

         if( Df == 0) {       /* Check division by zero */
             Cond = 1;
             Dp   = 0;
         }

         else Dp = Y0/Df;

        P1 = P0 - Dp;       /* New iterate */
        Y1 = ffunction_Mach(P1,m);   /* New function value */

        RelErr = 2 * fabs(Dp) / ( fabs(P1) + Small );  /* Relative error */

        if( (RelErr < Delta)  && (fabs(Y1) < Epsilon) ) { /* Check for   */

            if( Cond != 1) Cond = 2;                      /* convergence */

        }

        P0 = P1;
        Y0 = Y1;
    }

if(Cond == 0) printf("The maximum number of iterations was exceeded !\n");

if(Cond == 1) printf("Division by zero was encountered !\n");

return P0;

//if(Cond == 2) printf("The root was found with the desired tolerance !\n");

}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movsd 0x33b1(%rip), %xmm2     # 0xb7d8
movsd %xmm0, 0x8(%rsp)
subsd %xmm0, %xmm2
xorl %eax, %eax
pushq $0x1
popq %rbx
movsd 0x2c12(%rip), %xmm0     # 0xb050
cmpl $0x63, %ebx
movapd %xmm0, 0x10(%rsp)
ja 0x852d
testl %eax, %eax
jne 0x852d
movapd %xmm2, 0x20(%rsp)
callq 0x83c5
movapd 0x20(%rsp), %xmm5
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpeqsd %xmm1, %xmm2
movq %xmm2, %rax
movl %eax, %ecx
andl $0x1, %ecx
addl $0x2, %eax
ucomisd %xmm1, %xmm0
divsd %xmm0, %xmm5
movapd %xmm5, %xmm1
jne 0x8498
movapd %xmm5, %xmm1
jp 0x8498
xorpd %xmm1, %xmm1
movapd 0x10(%rsp), %xmm0
subsd %xmm1, %xmm0
movapd %xmm0, %xmm1
mulsd 0x332a(%rip), %xmm1     # 0xb7d8
movapd 0x301a(%rip), %xmm4     # 0xb4d0
andpd %xmm4, %xmm5
addsd %xmm5, %xmm5
jne 0x84c6
jp 0x84c6
xorpd %xmm5, %xmm5
mulsd %xmm0, %xmm1
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd 0x2b76(%rip), %xmm3     # 0xb050
addsd %xmm3, %xmm2
mulsd %xmm1, %xmm2
movapd %xmm3, %xmm1
divsd %xmm0, %xmm1
addsd %xmm3, %xmm1
divsd %xmm1, %xmm2
subsd 0x8(%rsp), %xmm2
movapd %xmm2, %xmm1
andpd %xmm4, %xmm1
movsd 0x2f08(%rip), %xmm3     # 0xb410
ucomisd %xmm1, %xmm3
movapd %xmm0, %xmm1
andpd %xmm4, %xmm1
cmovbel %ecx, %eax
addsd %xmm3, %xmm1
divsd %xmm1, %xmm5
ucomisd %xmm5, %xmm3
cmovbel %ecx, %eax
incl %ebx
jmp 0x843e
testl %eax, %eax
je 0x853f
cmpl $0x1, %eax
jne 0x8551
leaq 0x32f3(%rip), %rdi      # 0xb830
jmp 0x8546
leaq 0x32ba(%rip), %rdi      # 0xb800
callq 0x22c0
movapd 0x10(%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x6b84(%rip)      # 0xf298
je 0x8730
movsd 0x6b6a(%rip), %xmm0     # 0xf288
movsd %xmm0, (%rsp)
movsd 0x6b65(%rip), %xmm0     # 0xf290
jmp 0x87b7
callq 0x2090
cvtsi2sd %eax, %xmm1
movsd 0x3117(%rip), %xmm0     # 0xb858
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
callq 0x2090
cvtsi2sd %eax, %xmm1
divsd 0x30fd(%rip), %xmm1     # 0xb858
movsd (%rsp), %xmm2
addsd %xmm2, %xmm2
movsd 0x28ec(%rip), %xmm0     # 0xb058
addsd %xmm0, %xmm2
addsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x6b08(%rip)     # 0xf288
mulsd %xmm1, %xmm1
movsd %xmm2, (%rsp)
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x6af3(%rip)     # 0xf290
ucomisd 0x28ab(%rip), %xmm0     # 0xb050
jae 0x8730
ucomisd 0x2cb9(%rip), %xmm0     # 0xb468
jne 0x87b7
jnp 0x8730
callq 0x2150
mulsd 0x309c(%rip), %xmm0     # 0xb860
divsd 0x6ac4(%rip), %xmm0     # 0xf290
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x87dc
sqrtsd %xmm0, %xmm0
jmp 0x87e1
callq 0x2140
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
pushq $0x1
popq %rax
subl 0x6aa5(%rip), %eax      # 0xf298
movl %eax, 0x6a9f(%rip)      # 0xf298
movapd %xmm1, %xmm0
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x2150
leaq -0x1(%rbx), %rax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x2150
movsd %xmm0, (%rsp)
xorl %r15d, %r15d
testq %rbx, %rbx
cmovleq %r15, %rbx
cmpq %r15, %rbx
je 0x8872
cvtsi2sd %r15, %xmm0
mulsd 0x8(%rsp), %xmm0
addsd (%rsp), %xmm0
callq 0x2380
movsd %xmm0, (%r14,%r15,8)
incq %r15
jmp 0x884d
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x2340
leaq 0x25a9(%rip), %rdi      # 0xb0f3
leaq 0x2547(%rip), %rsi      # 0xb098
leaq 0x200(%rsp), %rdx
callq 0x7a31
movq %rsp, %rdi
leaq 0x200(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x2040
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2190
leaq 0x26b6(%rip), %rsi      # 0xb239
movq %rax, %rdi
callq 0x21b0
movq %rsp, %rdi
callq 0x2100
movq %rsp, %rdi
callq 0x2280
movq %rsp, %rdi
callq 0x22a0
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_c_makefile_star2_O2/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 0x251c(%rip), %rdi      # 0xb0f3
leaq 0x24ba(%rip), %rsi      # 0xb098
leaq 0x70(%rsp), %rbx
movq %rbx, %rdx
callq 0x7a31
leaq 0x2aa6(%rip), %rsi      # 0xb698
movq %rbx, %rdi
callq 0x2200
movq %rax, %r15
movq %rsp, %r12
pushq $0x64
popq %rsi
movq %r12, %rdi
movq %rax, %rdx
callq 0x22f0
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2250
movq %rax, (%r14)
movq %r15, %rdi
callq 0x21c0
movq %rbx, %rdi
callq 0x2390
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq $0x8
popq %rsi
callq 0x20f0
movq %rax, %rbx
testq %rax, %rax
jne 0x9e16
movq 0x51e4(%rip), %rdi      # 0xefd0
leaq 0x1a85(%rip), %rsi      # 0xb878
callq 0x21b0
leaq 0x1a9c(%rip), %rsi      # 0xb89b
movq %rax, %rdi
callq 0x21b0
leaq 0x1a99(%rip), %rsi      # 0xb8a7
movq %rax, %rdi
callq 0x21b0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
pushq $0x8
popq %r12
movq %r12, %rsi
callq 0x20f0
movq %rax, %rbx
xorl %r13d, %r13d
testq %r14, %r14
cmovleq %r13, %r14
cmpq %r13, %r14
je 0x9e5c
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
movq %rax, (%rbx,%r13,8)
incq %r13
jmp 0x9e43
cmpq $0x0, (%rbx,%r14,8)
jne 0x9e94
movq 0x5166(%rip), %rdi      # 0xefd0
leaq 0x1a07(%rip), %rsi      # 0xb878
callq 0x21b0
leaq 0x1a36(%rip), %rsi      # 0xb8b3
movq %rax, %rdi
callq 0x21b0
leaq 0x1a1b(%rip), %rsi      # 0xb8a7
movq %rax, %rdi
callq 0x21b0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq $0x8
popq %rsi
callq 0x20f0
movq %rax, %rbx
testq %rax, %rax
jne 0x9ee3
movq 0x5117(%rip), %rdi      # 0xefd0
leaq 0x19b8(%rip), %rsi      # 0xb878
callq 0x21b0
leaq 0x19f3(%rip), %rsi      # 0xb8bf
movq %rax, %rdi
callq 0x21b0
leaq 0x19cc(%rip), %rsi      # 0xb8a7
movq %rax, %rdi
callq 0x21b0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
pushq $0x1
popq %rsi
callq 0x20f0
movq %rax, %rbx
testq %rax, %rax
jne 0x9f2a
movq 0x50d0(%rip), %rdi      # 0xefd0
leaq 0x1971(%rip), %rsi      # 0xb878
callq 0x21b0
leaq 0x19ba(%rip), %rsi      # 0xb8cd
movq %rax, %rdi
callq 0x21b0
leaq 0x1985(%rip), %rsi      # 0xb8a7
movq %rax, %rdi
callq 0x21b0
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
pushq $0x8
popq %r12
movq %r12, %rsi
callq 0x20f0
movq %rax, %rbx
xorl %r13d, %r13d
testq %r14, %r14
cmovleq %r13, %r14
cmpq %r13, %r14
je 0x9f70
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
movq %rax, (%rbx,%r13,8)
incq %r13
jmp 0x9f57
cmpq $0x0, (%rbx,%r14,8)
jne 0x9fa8
movq 0x5052(%rip), %rdi      # 0xefd0
leaq 0x18f3(%rip), %rsi      # 0xb878
callq 0x21b0
leaq 0x1948(%rip), %rsi      # 0xb8d9
movq %rax, %rdi
callq 0x21b0
leaq 0x1907(%rip), %rsi      # 0xb8a7
movq %rax, %rdi
callq 0x21b0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r13
pushq $0x8
popq %r12
movq %r12, %rsi
callq 0x20f0
testq %r15, %r15
movl $0x0, %r14d
movq %r15, 0x10(%rsp)
cmovgq %r15, %r14
xorl %r15d, %r15d
movq %rax, 0x8(%rsp)
testq %r13, %r13
cmovleq %r15, %r13
movq %r13, 0x18(%rsp)
leaq 0x18a2(%rip), %r13      # 0xb8a7
cmpq 0x18(%rsp), %r15
je 0xa083
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x20f0
movq %rax, %rbp
movq %r15, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq %rbp, (%rax,%r15,8)
xorl %r15d, %r15d
cmpq %r15, %r14
je 0xa079
movq %rbx, %rdi
movq %r12, %rsi
callq 0x20f0
movq %rax, (%rbp,%r15,8)
testq %rax, %rax
jne 0xa074
movq 0x4f82(%rip), %rdi      # 0xefd0
leaq 0x1823(%rip), %rsi      # 0xb878
callq 0x21b0
movq %rax, %rdi
leaq 0x1883(%rip), %rsi      # 0xb8e7
callq 0x21b0
movq %rax, %rdi
movq %r13, %rsi
callq 0x21b0
incq %r15
jmp 0xa02d
movq 0x20(%rsp), %r15
incq %r15
jmp 0xa005
movq 0x8(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
testq %rsi, %rsi
cmovleq %r15, %r14
cmpq %r15, %r14
je 0xa0bf
movq (%rbx,%r15,8), %rdi
callq 0x2210
incq %r15
jmp 0xa0ac
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
testq %rsi, %rsi
cmovleq %r15, %r14
cmpq %r15, %r14
je 0xa0f4
movq (%rbx,%r15,8), %rdi
callq 0x2210
incq %r15
jmp 0xa0e1
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
xorl %r12d, %r12d
testq %rdx, %rdx
cmovleq %r12, %rbx
movq %rdi, %r15
testq %rsi, %rsi
cmovleq %r12, %r14
cmpq %r14, %r12
je 0xa14d
xorl %r13d, %r13d
movq (%r15,%r12,8), %rdi
cmpq %r13, %rbx
je 0xa143
movq (%rdi,%r13,8), %rdi
callq 0x2210
incq %r13
jmp 0xa12c
callq 0x2210
incq %r12
jmp 0xa124
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testq %rcx, %rcx
cmovleq %rax, %rcx
testq %rdx, %rdx
cmovleq %rax, %rdx
cmpq %rdx, %rax
je 0xa23a
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0xa235
movq (%rsi,%rax,8), %r9
movsd (%r9,%r8,8), %xmm1
addsd %xmm0, %xmm1
movq (%rdi,%rax,8), %r9
movsd %xmm1, (%r9,%r8,8)
incq %r8
jmp 0xa213
incq %rax
jmp 0xa20b
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testq %r8, %r8
cmovleq %rax, %r8
testq %rcx, %rcx
cmovleq %rax, %rcx
cmpq %rcx, %rax
je 0xa280
xorl %r9d, %r9d
cmpq %r9, %r8
je 0xa27b
movq (%rsi,%rax,8), %r10
movsd (%r10,%r9,8), %xmm0
movq (%rdx,%rax,8), %r10
addsd (%r10,%r9,8), %xmm0
movq (%rdi,%rax,8), %r10
movsd %xmm0, (%r10,%r9,8)
incq %r9
jmp 0xa253
incq %rax
jmp 0xa24b
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testq %rcx, %rcx
cmovleq %rax, %rcx
testq %rdx, %rdx
cmovleq %rax, %rdx
cmpq %rdx, %rax
je 0xa2c0
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0xa2bb
movq (%rsi,%rax,8), %r9
movsd (%r9,%r8,8), %xmm1
mulsd %xmm0, %xmm1
movq (%rdi,%rax,8), %r9
movsd %xmm1, (%r9,%r8,8)
incq %r8
jmp 0xa299
incq %rax
jmp 0xa291
retq
// File: /workspace/github_c_makefile_star2_O2/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:
xorl %eax, %eax
testq %r8, %r8
cmovleq %rax, %r8
testq %rcx, %rcx
cmovleq %rax, %rcx
cmpq %rcx, %rax
je 0xa306
xorl %r9d, %r9d
cmpq %r9, %r8
je 0xa301
movq (%rsi,%rax,8), %r10
movsd (%r10,%r9,8), %xmm0
movq (%rdx,%rax,8), %r10
mulsd (%r10,%r9,8), %xmm0
movq (%rdi,%rax,8), %r10
movsd %xmm0, (%r10,%r9,8)
incq %r9
jmp 0xa2d9
incq %rax
jmp 0xa2d1
retq
// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, (%rdi)
leal -0x1(%rbx), %eax
cltq
imulq $0x28, %rax, %rax
addq $0x78, %rax
pushq $0x10
popq %rcx
movq %rcx, %r15
addq %rcx, %rcx
cmpq %rax, %r15
jb 0x531a
movq %r15, %rdi
callq 0x5150
movq %rax, (%r14)
testq %rax, %rax
je 0x5365
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
andq $0x0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movl %ebx, 0x48(%rax)
addq $0x50, %rax
movslq %ebx, %rcx
imulq $0x28, %rcx, %rdx
movq %rax, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x50c0
pushq $0x1
popq %rdi
callq 0x51c0
// File: /workspace/github_c_makefile_star2_O2/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 0xafe3(%rip), %rax      # 0x11d93
leaq 0xa648(%rip), %rdx      # 0x113ff
cmoveq %rax, %rdx
leaq 0x8fc1(%rip), %rsi      # 0xfd83
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x51b0
pushq $0x40
popq %rsi
movq %rbx, %rdi
callq 0x50b0
testq %rax, %rax
je 0x6de2
movb $0x0, (%rax)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x50a0
leaq 0x1(%rax), %rdi
callq 0x5150
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_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0x7, 0x8(%rdi)
jne 0x9d03
movq %rsi, %r14
xorl %ebx, %ebx
leaq 0xd131(%rip), %r15      # 0x16d50
cmpq $0x80, %rbx
je 0x9d11
movq (%rbx,%r15), %rdi
movq %r14, %rsi
callq 0x5110
testl %eax, %eax
je 0x9c42
addq $0x10, %rbx
jmp 0x9c1f
movslq 0x8(%rbx,%r15), %r13
movslq 0x18(%rbx,%r15), %rbx
subq %r13, %rbx
incb 0xd5dd(%rip)            # 0x17232
movq 0xf5d4(%rip), %rax      # 0x19230
leaq 0x1(%rax), %rcx
movq %rcx, 0xf5c9(%rip)      # 0x19230
movb $-0x7, (%rax)
xorl %r12d, %r12d
movq %r14, %rdi
xorl %esi, %esi
callq 0xa07a
movq 0xf5b2(%rip), %r14      # 0x19230
leaq 0x7e8b(%rip), %rsi      # 0x11b10
addq %r13, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x5140
leaq 0x4(%r14), %rdi
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0xa15b
movq %rax, %rdi
movq %r15, %rsi
callq 0xa15b
movq %rax, %rdi
movq %r15, %rsi
callq 0xa15b
movl (%r15), %ecx
pushq $0x11
popq %rdx
pushq $0xf
popq %rsi
cmpl %r12d, %ecx
je 0x9cf9
movzbl (%rax,%r12,4), %edi
movb 0x2(%rax,%r12,4), %r8b
movl %edi, %r9d
xorb $0x10, %r9b
movzbl %r8b, %r10d
xorb $0xe, %r8b
orb %r9b, %r8b
cmovel %edx, %edi
cmovel %esi, %r10d
movb %dil, (%rax,%r12,4)
movb %r10b, 0x2(%rax,%r12,4)
incq %r12
jmp 0x9cc3
addq %rbx, %r14
movq %r14, 0xf52d(%rip)      # 0x19230
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xd2e0(%rip), %rax      # 0x16ff8
movq (%rax), %rdi
leaq 0x8323(%rip), %rsi      # 0x12045
movq %r14, %rdx
xorl %eax, %eax
callq 0x5130
pushq $0x1
popq %rdi
callq 0x51c0