LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/sTeeLM[P]dwipe/options.c
// Function: dwipe_options_log
void dwipe_options_log( void )
{
/**
 *  Prints a manifest of options to the log.
 *
 */

	dwipe_log( DWIPE_LOG_NOTICE, "Program options are set as follows..." );

	if( dwipe_options.autonuke )
	{
		dwipe_log( DWIPE_LOG_NOTICE, "  autonuke = %i (on)", dwipe_options.autonuke );
	}

	else
	{
		dwipe_log( DWIPE_LOG_NOTICE, "  autonuke = %i (off)", dwipe_options.autonuke );
	}


	dwipe_log( DWIPE_LOG_NOTICE, "  banner   = %s", dwipe_options.banner );
	dwipe_log( DWIPE_LOG_NOTICE, "  method   = %s", dwipe_method_label( dwipe_options.method ) );
	dwipe_log( DWIPE_LOG_NOTICE, "  rounds   = %i", dwipe_options.rounds );
	dwipe_log( DWIPE_LOG_NOTICE, "  sync     = %i", dwipe_options.sync );
	dwipe_log( DWIPE_LOG_NOTICE, "  exclude  = %s", dwipe_options.exclude == NULL ? "none" :  dwipe_options.exclude);

	switch( dwipe_options.verify )
	{
		case DWIPE_VERIFY_NONE:
			dwipe_log( DWIPE_LOG_NOTICE, "  verify   = %i (off)", dwipe_options.verify );
			break;

		case DWIPE_VERIFY_LAST:
			dwipe_log( DWIPE_LOG_NOTICE, "  verify   = %i (last pass)", dwipe_options.verify );
			break;

		case DWIPE_VERIFY_ALL:
			dwipe_log( DWIPE_LOG_NOTICE, "  verify   = %i (all passes)", dwipe_options.verify );
			break;

		default:
			dwipe_log( DWIPE_LOG_NOTICE, "  verify   = %i", dwipe_options.verify );
			break;
	}

}

// Assembly:
pushq %rax
leaq 0x4d16(%rip), %rsi      # 0xde2b
movl $0x3, %edi
xorl %eax, %eax
callq 0x79f8
movl 0x8719(%rip), %edx      # 0x11840
testl %edx, %edx
je 0x9139
leaq 0x4d1f(%rip), %rsi      # 0xde51
movl $0x3, %edi
jmp 0x9147
leaq 0x4d26(%rip), %rsi      # 0xde66
movl $0x3, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x79f8
movq 0x86f3(%rip), %rdx      # 0x11848
leaq 0x4d20(%rip), %rsi      # 0xde7c
movl $0x3, %edi
xorl %eax, %eax
callq 0x79f8
movq 0x86e1(%rip), %rdi      # 0x11850
callq 0x7c74
leaq 0x4d11(%rip), %rsi      # 0xde8c
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x79f8
movl 0x86d0(%rip), %edx      # 0x11860
leaq 0x4d05(%rip), %rsi      # 0xde9c
movl $0x3, %edi
xorl %eax, %eax
callq 0x79f8
movl 0x86bb(%rip), %edx      # 0x11864
leaq 0x4cfc(%rip), %rsi      # 0xdeac
movl $0x3, %edi
xorl %eax, %eax
callq 0x79f8
movq 0x86ad(%rip), %rax      # 0x11870
testq %rax, %rax
leaq 0x4cff(%rip), %rdx      # 0xdecc
cmovneq %rax, %rdx
leaq 0x4ce4(%rip), %rsi      # 0xdebc
movl $0x3, %edi
xorl %eax, %eax
callq 0x79f8
movl 0x867e(%rip), %edx      # 0x11868
cmpl $0x2, %edx
je 0x921b
cmpl $0x1, %edx
je 0x9208
testl %edx, %edx
jne 0x922e
leaq 0x4cd2(%rip), %rsi      # 0xded1
movl $0x3, %edi
xorl %edx, %edx
jmp 0x923a
leaq 0x4cd8(%rip), %rsi      # 0xdee7
movl $0x3, %edi
movl $0x1, %edx
jmp 0x923a
leaq 0x4ce1(%rip), %rsi      # 0xdf03
movl $0x3, %edi
movl $0x2, %edx
jmp 0x923a
leaq 0x4ceb(%rip), %rsi      # 0xdf20
movl $0x3, %edi
xorl %eax, %eax
popq %rcx
jmp 0x79f8
nop
// File: /workspace/github_c_makefile_star2_O1/sTeeLM[P]dwipe/prng.c
// Function: dwipe_twister_init
int dwipe_twister_init( DWIPE_PRNG_INIT_SIGNATURE )
{
	if( *state == NULL )
	{
		/* This is the first time that we have been called. */
		*state = malloc( sizeof( twister_state_t ) );
	}
	twister_init( (twister_state_t*)*state, (u32*)( seed->s ), seed->length / sizeof( u32 ) );
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, (%rdi)
jne 0x9eed
movl $0x1390, %edi           # imm = 0x1390
callq 0x32f0
movq %rax, (%r14)
movq (%r14), %rdi
movq (%rbx), %rdx
movq 0x8(%rbx), %rsi
shrq $0x3, %rdx
callq 0x8a09
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sTeeLM[P]dwipe/prng.c
// Function: dwipe_twister_read
int dwipe_twister_read( DWIPE_PRNG_READ_SIGNATURE )
{
	u32 ii;
	u32 words = count / sizeof( u32 );
	u32 remain = count % sizeof( u32 );

	/* Twister returns 4-bytes per call, so cast the buffer into words. */
	for( ii = 0; ii < words; ++ii )
	{
		((u32*)buffer)[ii] = twister_genrand_int32( (twister_state_t*)*state );
	}

	/* Fill the buffer tail if the count is not evenly divided by the size of u32. */
	for( ii = 1; ii <= remain; ++ii )
	{
		/* Notice how three bytes are discarded by doing this. */
		((u8*)buffer)[count-ii] = twister_genrand_int32( (twister_state_t*)*state );
	}
	 
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl %r14d, %r12d
andl $0x7, %r12d
cmpq $0x8, %rdx
jb 0x9f48
movq %r14, %r13
shrq $0x3, %r13
xorl %ebp, %ebp
movq (%rbx), %rdi
callq 0x8b32
movq %rax, (%r15,%rbp,8)
incq %rbp
cmpq %rbp, %r13
jne 0x9f34
testq %r12, %r12
je 0x9f6d
negq %r12
addq %r15, %r14
decq %r14
xorl %r15d, %r15d
movq (%rbx), %rdi
callq 0x8b32
movb %al, (%r14,%r15)
decq %r15
cmpq %r15, %r12
jne 0x9f59
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sTeeLM[P]dwipe/prng.c
// Function: dwipe_isaac_init
int dwipe_isaac_init( DWIPE_PRNG_INIT_SIGNATURE )
{
	int count;
	randctx* isaac_state = *state;

	if( *state == NULL )
	{
		/* This is the first time that we have been called. */
		*state = malloc( sizeof( randctx ) );
		isaac_state = *state;

		/* Check the memory allocation. */
		if( isaac_state == 0 )
		{
				dwipe_perror( errno, __FUNCTION__, "malloc" );
				dwipe_log( DWIPE_LOG_FATAL, "Unable to allocate memory for the isaac state." );
				return -1;
		}
	}


	/* Take the minimum of the isaac seed size and available entropy. */
	if( sizeof( isaac_state->randrsl ) < seed->length ) 
	{
		count = sizeof( isaac_state->randrsl );	
	}
	else
	{
		memset( isaac_state->randrsl, 0, sizeof( isaac_state->randrsl ) );
		count = seed->length;
	}

	if( count == 0 )
	{
		/* Start ISACC without a seed. */
		randinit( isaac_state, 0 );
	}
	else
	{
		/* Seed the ISAAC state with entropy. */
		memcpy( isaac_state->randrsl, seed->s, count );

		/* The second parameter indicates that randrsl is non-empty. */
		randinit( isaac_state, 1 );
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq (%rdi), %rbx
testq %rbx, %rbx
jne 0x9fa8
movq %rdi, %r15
movl $0x1020, %edi           # imm = 0x1020
callq 0x32f0
movq %rax, %rbx
movq %rax, (%r15)
testq %rax, %rax
je 0xa004
movl $0x800, %eax            # imm = 0x800
cmpq $0x800, (%r14)          # imm = 0x800
ja 0x9fc9
leaq 0x8(%rbx), %rdi
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x31d0
movl (%r14), %eax
testl %eax, %eax
je 0x9fe9
leaq 0x8(%rbx), %rdi
movq 0x8(%r14), %rsi
movslq %eax, %rdx
callq 0x3290
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x9ff0
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x765e
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x3070
movl (%rax), %edi
leaq 0x433b(%rip), %rsi      # 0xe34d
leaq 0x1b97(%rip), %rdx      # 0xbbb0
callq 0x7c3f
leaq 0x4339(%rip), %rsi      # 0xe35e
movl $0x6, %edi
xorl %eax, %eax
callq 0x79f8
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x9ff7
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_1/exercise_1_24/check_syntax.c
// Function: main
int main(void)
{
  char str[MAXSTR];

  get_str(str, MAXSTR);
  check_syntax(str);

  return 0;
}

// Assembly:
pushq %rbx
subq $0x2710, %rsp           # imm = 0x2710
xorl %ebx, %ebx
callq 0x1040
cmpl $-0x1, %eax
je 0x1174
movb %al, (%rsp,%rbx)
incq %rbx
cmpq $0x270f, %rbx           # imm = 0x270F
jne 0x1156
movl $0x270f, %ebx           # imm = 0x270F
movl %ebx, %eax
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
callq 0x11d7
xorl %eax, %eax
addq $0x2710, %rsp           # imm = 0x2710
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/Master.cpp
// Function: FindIdle(bool*, int)
int FindIdle(bool* IsIdle, int n_proc){
	int i;
	
	for(i=1;i<n_proc;i++){// all slave processes
		if(IsIdle[i]){
			return i; //index of first idle
		}
	}
	//cout<<"No idle slave.";
	return 0; // no idle process was found, return zero
}

// Assembly:
xorl %eax, %eax
cmpl $0x2, %esi
jl 0x35c2
movl %esi, %edx
movl $0x1, %ecx
cmpb $0x0, (%rdi,%rcx)
jne 0x35c3
incq %rcx
cmpq %rcx, %rdx
jne 0x35b4
retq
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/Master.cpp
// Function: SumIdle(bool*, int)
int SumIdle(bool* IsIdle, int n_proc){
	int i,tot=0;
	
	for(i=1;i<n_proc;i++){// all slave processes
		if(IsIdle[i]){
			tot++;
		}
	}
	return tot; 
}

// Assembly:
xorl %eax, %eax
cmpl $0x2, %esi
jl 0x35e4
movl %esi, %ecx
xorl %eax, %eax
movl $0x1, %edx
movzbl (%rdi,%rdx), %esi
addl %esi, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x35d6
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: IncreaseStarMatrix()
void IncreaseStarMatrix(){
	long i;
	double *temppointer;
	
	for(i=0;i<8;i++){ //reallocating memory for all lines, increasing the number of elements
		temppointer=(double*) realloc(StarMatrix[i], (NStarsAllocated+LineIncreaseUnit)* sizeof(double));
		if(temppointer!=NULL){ //successful allocation
			StarMatrix[i]=temppointer;
		}
		else
		{
			cout<<"Memory allocation failure! Exiting!";
			exit(EXIT_FAILURE);
		}
	}
	NStarsAllocated+=LineIncreaseUnit; //note the number of elements	
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
movq 0xbb52(%rip), %rax      # 0xf228
movq (%rax,%rbx,8), %rdi
movq 0xbb4f(%rip), %rax      # 0xf230
leaq 0x1f40(,%rax,8), %rsi
callq 0x2360
testq %rax, %rax
je 0x3714
movq 0xbb2e(%rip), %rcx      # 0xf228
movq %rax, (%rcx,%rbx,8)
incq %rbx
cmpq $0x8, %rbx
jne 0x36cf
addq $0x3e8, 0xbb1e(%rip) # imm = 0x3E8
popq %rbx
retq
movq 0xb8ad(%rip), %rdi      # 0xefc8
leaq 0x7b3e(%rip), %rsi      # 0xb260
callq 0x21e0
movl $0x1, %edi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: FreeStarMatrix()
void FreeStarMatrix(){
	long i;
	
	for(i=0;i<8;i++){ 
		free(StarMatrix[i]);
	}
	free(StarMatrix);
	StarMatrix=NULL; //none assigned
	NStarsAllocated=0; //zero size
	NStarsCurrent=0; //zero stars
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
movq 0xbaed(%rip), %rax      # 0xf228
movq (%rax,%rbx,8), %rdi
callq 0x2250
incq %rbx
cmpq $0x8, %rbx
jne 0x3734
movq 0xbad4(%rip), %rdi      # 0xf228
callq 0x2250
xorl %eax, %eax
movq %rax, 0xbac6(%rip)      # 0xf228
movq %rax, 0xbac7(%rip)      # 0xf230
movq %rax, 0xbac8(%rip)      # 0xf238
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: IncreaseCoreMatrix(long)
void IncreaseCoreMatrix(long timeindex){
	long i;
	double *temppointer;
	
	for(i=0;i<12;i++){ //reallocating memory for all lines, increasing the number of elements
		temppointer=(double*) realloc(CoreMatrix[timeindex][i], (NCoresAllocated[timeindex]+LineIncreaseUnit)* sizeof(double));
		if(temppointer!=NULL){ //successful allocation
			CoreMatrix[timeindex][i]=temppointer;
		}
		else
		{
			cout<<"Memory allocation failure! Exiting!";
			exit(EXIT_FAILURE);
		}
	}
	NCoresAllocated[timeindex]+=LineIncreaseUnit; //note the number of elements	
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0xbabd(%rip), %rax      # 0xf240
movq (%rax,%rbx,8), %rax
movq (%rax,%r14,8), %rdi
movq 0xbab6(%rip), %rax      # 0xf248
movq (%rax,%rbx,8), %rax
leaq 0x1f40(,%rax,8), %rsi
callq 0x2360
testq %rax, %rax
je 0x37d7
movq 0xba91(%rip), %rcx      # 0xf240
movq (%rcx,%rbx,8), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq $0xc, %r14
jne 0x377c
movq 0xba81(%rip), %rax      # 0xf248
addq $0x3e8, (%rax,%rbx,8)   # imm = 0x3E8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xb7ea(%rip), %rdi      # 0xefc8
leaq 0x7a7b(%rip), %rsi      # 0xb260
callq 0x21e0
movl $0x1, %edi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: FreeCoreMatrix()
void FreeCoreMatrix(){
	long i,j;
	
	for(i=0;i<CMFTIMENUM;i++){ 
		for(j=0;j<12;j++){ 
			free(CoreMatrix[i][j]);
		}
		free(CoreMatrix[i]);
		NCoresAllocated[i]=0;
		NCoresCurrent[i]=0;	
	}
	free(NCoresAllocated);
	free(NCoresCurrent);
	free(CoreMatrix);
	CoreMatrix=NULL; //none assigned
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0xba38(%rip), %rax      # 0xf240
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
callq 0x2250
incq %r15
cmpq $0xc, %r15
jne 0x3801
movq 0xba1b(%rip), %rax      # 0xf240
movq (%rax,%r14,8), %rdi
callq 0x2250
movq 0xba13(%rip), %rax      # 0xf248
movq %rbx, (%rax,%r14,8)
movq 0xba10(%rip), %rax      # 0xf250
movq %rbx, (%rax,%r14,8)
incq %r14
cmpq $0x10, %r14
jne 0x37fe
movq 0xb9f4(%rip), %rdi      # 0xf248
callq 0x2250
movq 0xb9f0(%rip), %rdi      # 0xf250
callq 0x2250
movq 0xb9d4(%rip), %rdi      # 0xf240
callq 0x2250
movq $0x0, 0xb9c4(%rip) # 0xf240
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: SaveAndFreeStarsAndCoresMatrices(bool)
void SaveAndFreeStarsAndCoresMatrices(bool IsEnd){
	long l;
	char filename[100];
	char Corefilename[100]; //file containing the cores at a chosen time
	

	//Save all accumulated star data
	//Save results to file
	ContructFilePath("Stars.txt", "Output", filename); //file where data about stars should go
	if(NStarsCurrent>0){
		SaveStarMatrix(filename, IsEnd);
		FreeStarMatrix(); //free memory
	}
	//Save accumulated core data
	ContructFilePath("Clouds.txt", "Output", filename); //file where data about clouds should go
	for ( l = 0; l < CMFTIMENUM; l++ ){ //check all CMF times 
		CMFFileName(Corefilename, filename, CMFTimes[l]);
		if(NCoresCurrent[l]>0){
			SaveCoreMatrix(l,Corefilename,IsEnd);
		}
	}
	FreeCoreMatrix(); //free memory
	
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movl %edi, %ebx
leaq 0x79e9(%rip), %rdi      # 0xb284
leaq 0x77f6(%rip), %rsi      # 0xb098
movq %rsp, %rdx
callq 0x80f5
cmpq $0x0, 0xb986(%rip)      # 0xf238
movzbl %bl, %ebx
jle 0x38c6
movq %rsp, %rdi
movl %ebx, %esi
callq 0x393d
callq 0x3731
leaq 0x79c1(%rip), %rdi      # 0xb28e
leaq 0x77c4(%rip), %rsi      # 0xb098
movq %rsp, %r14
movq %r14, %rdx
callq 0x80f5
leaq 0x79da(%rip), %r13      # 0xb2c0
xorl %r15d, %r15d
leaq 0x70(%rsp), %r12
movsd (%r13), %xmm0
movq %r12, %rdi
movq %r14, %rsi
callq 0x3a8c
movq 0xb94a(%rip), %rax      # 0xf250
cmpq $0x0, (%rax,%r15,8)
jle 0x391a
movq %r15, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x3b1d
incq %r15
addq $0x8, %r13
cmpq $0x10, %r15
jne 0x38ee
callq 0x37f4
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: SaveStarMatrix(char*, bool)
void SaveStarMatrix(char* filename, bool IsEnd){
	long i,j;
	ofstream myfile; //Output file handle
    //Open file
    myfile.open(filename,ios::app);
    //Save parameters of stars
    for(i=0;i<NStarsCurrent;i++){ 
		for(j=0;j<8;j++){
			if(j<7){
				myfile<<StarMatrix[j][i]<<"\t";
			}
			else{
				myfile<<StarMatrix[j][i]<<"\n";
			}
     	}
     }
     if(IsEnd){
     	myfile <<"END"<<"\n"; //mark end for this parent cloud in file
	 }
     myfile.flush(); //finish writing
     myfile.close(); //close file	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %esi, %ebx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2380
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x2040
cmpq $0x0, 0xb8c0(%rip)      # 0xf238
jle 0x39ed
leaq 0x78b8(%rip), %r15      # 0xb239
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
leaq 0x7909(%rip), %r13      # 0xb299
xorl %ebp, %ebp
movq 0xb88f(%rip), %rax      # 0xf228
cmpq $0x7, %rbp
jne 0x39b6
movq 0x38(%rax), %rax
movsd (%rax,%r12,8), %xmm0
movq %r14, %rdi
callq 0x2350
movq %r15, %rsi
jmp 0x39cb
movq (%rax,%rbp,8), %rax
movsd (%rax,%r12,8), %xmm0
movq %r14, %rdi
callq 0x2350
movq %r13, %rsi
movl $0x1, %edx
movq %rax, %rdi
callq 0x2210
incq %rbp
cmpq $0x8, %rbp
jne 0x3992
incq %r12
cmpq 0xb84d(%rip), %r12      # 0xf238
jl 0x3990
testb %bl, %bl
je 0x3a1d
leaq 0x78a3(%rip), %rsi      # 0xb29b
leaq 0x8(%rsp), %rdi
movl $0x3, %edx
callq 0x2210
leaq 0x782b(%rip), %rsi      # 0xb239
leaq 0x8(%rsp), %rdi
movl $0x1, %edx
callq 0x2210
leaq 0x8(%rsp), %rdi
callq 0x2120
leaq 0x8(%rsp), %rdi
callq 0x22c0
movq 0xb570(%rip), %rax      # 0xefa8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x2190
leaq 0x100(%rsp), %rdi
callq 0x20a0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3a77
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22e0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: CMFFileName(char*, char*, double)
void CMFFileName(char* fullname, char* filename, double CMFTime)
{
	char ending[100];
	char beginning[100];
	char* chpointer;

	//find file extension at the end of the string
	chpointer=strchr(filename,'x');
	//make a copy of the filename without extension
	strncpy(beginning, filename, chpointer-filename-2);
	beginning[chpointer-filename-1]=0;
	sprintf( ending, "_cores_t%g.txt", CMFTime);
	fullname[0]=0; //set it as empty string
	strcat (fullname,beginning);
	strcat (fullname,ending);	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xf0, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x78, %esi
callq 0x20b0
movq %rax, %r15
subq %r14, %r15
leaq -0x2(%r15), %rdx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x20e0
xorl %ebp, %ebp
movb %bpl, -0x1(%r15,%r12)
leaq 0x77d2(%rip), %rsi      # 0xb2ae
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x2060
movb %bpl, (%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x23b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23b0
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: SaveCoreMatrix(long, char*, bool)
void SaveCoreMatrix(long timeindex, char* filename, bool IsEnd){
	long i,j;
	ofstream myfile; //Output file handle
    //Open file
    myfile.open(filename,ios::app);
    //Save parameters of cores for this obs. time
    for(i=0;i<NCoresCurrent[timeindex];i++){ 
		for(j=0;j<12;j++){
			if(j<11){
				myfile<<CoreMatrix[timeindex][j][i]<<"\t";
			}
			else{
				myfile<<CoreMatrix[timeindex][j][i]<<"\n";
			}
     	}
     }
     if(IsEnd){
     	myfile <<"END"<<"\n"; //mark end for this parent cloud in file
	 }
     myfile.flush(); //finish writing
     myfile.close(); //close file	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movl %edx, 0x4(%rsp)
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x2380
movq %r12, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x2040
movq 0xb6f4(%rip), %rax      # 0xf250
cmpq $0x0, (%rax,%r14,8)
jle 0x3be0
leaq 0x76cf(%rip), %r12      # 0xb239
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
leaq 0x7720(%rip), %rbp      # 0xb299
movq $-0xc, %rbx
movq 0xb6b9(%rip), %rax      # 0xf240
movq (%rax,%r14,8), %rax
cmpq $-0x1, %rbx
je 0x3ba9
movq 0x60(%rax,%rbx,8), %rax
movsd (%rax,%r13,8), %xmm0
movq %r15, %rdi
callq 0x2350
movq %rbp, %rsi
jmp 0x3bbe
movq 0x58(%rax), %rax
movsd (%rax,%r13,8), %xmm0
movq %r15, %rdi
callq 0x2350
movq %r12, %rsi
movl $0x1, %edx
movq %rax, %rdi
callq 0x2210
incq %rbx
jne 0x3b80
incq %r13
movq 0xb676(%rip), %rax      # 0xf250
cmpq (%rax,%r14,8), %r13
jl 0x3b79
cmpb $0x0, 0x4(%rsp)
je 0x3c13
leaq 0x76ad(%rip), %rsi      # 0xb29b
leaq 0x8(%rsp), %rdi
movl $0x3, %edx
callq 0x2210
leaq 0x7635(%rip), %rsi      # 0xb239
leaq 0x8(%rsp), %rdi
movl $0x1, %edx
callq 0x2210
leaq 0x8(%rsp), %rdi
callq 0x2120
leaq 0x8(%rsp), %rdi
callq 0x22c0
movq 0xb37a(%rip), %rax      # 0xefa8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x2190
leaq 0x100(%rsp), %rdi
callq 0x20a0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c6d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22e0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: TooLargeStarsAndCoresMatrices()
bool TooLargeStarsAndCoresMatrices(){
	long TotalAlloc=NStarsAllocated*8; //stars, 8 data items per star
	long l;
	
	for ( l = 0; l < CMFTIMENUM; l++ ){ //check all CMF times
		TotalAlloc+=NCoresAllocated[l]*12; //12 numbers per core
	}	
	if(TotalAlloc<MaxAllocated){
		return false;
	}
	else
	{
		return true;
	}	
}

// Assembly:
movq 0xb5bf(%rip), %rax      # 0xf248
movq 0xb5a0(%rip), %rcx      # 0xf230
shlq $0x3, %rcx
movq %rcx, %xmm1
xorl %ecx, %ecx
movdqa 0x75ad(%rip), %xmm0     # 0xb250
movdqu (%rax,%rcx,8), %xmm2
movdqa %xmm2, %xmm3
pmuludq %xmm0, %xmm3
paddq %xmm1, %xmm3
psrlq $0x20, %xmm2
pmuludq %xmm0, %xmm2
psllq $0x20, %xmm2
movdqa %xmm2, %xmm1
paddq %xmm3, %xmm1
addq $0x2, %rcx
cmpq $0x10, %rcx
jne 0x3ca3
pshufd $0xee, %xmm1, %xmm0     # xmm0 = xmm1[2,3,2,3]
paddq %xmm1, %xmm0
movq %xmm0, %rax
cmpq $0xf4240, %rax          # imm = 0xF4240
setge %al
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: SaveFields(densitystruct_s*, long)
void SaveFields(struct densitystruct_s* fieldstruct, long ObjectTimeindex){
	long i;
	char filename[200],protofilename[200];
	ofstream myfile; //Output file handle
	
	sprintf(protofilename, "fields_t%g.txt", CMFTimes[ObjectTimeindex]);
	ContructFilePath(protofilename, "Output", filename); //file where data about fields should go
	
    //Open file
    myfile.open(filename,ios::app);
	#if (ExtraVerboseOutput==true)
	cout<<"Fields output file "<< filename<<"\n";
	#endif
    //Save field data
    for ( i = 0; i < NgridTotal; i++ ){
		myfile<<fieldstruct[0].xcoord[i]<<"\t"<<fieldstruct[0].ycoord[i]<<"\t"<<fieldstruct[0].zcoord[i]<<"\t"<<fieldstruct[0].rho_field[i]<<"\t"<<fieldstruct[0].T_field[i]<<"\t"<<fieldstruct[0].volume<<"\n";
     }
     myfile.flush(); //finish writing
     myfile.close(); //close file	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x398, %rsp            # imm = 0x398
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x2380
leaq 0x75ae(%rip), %rax      # 0xb2c0
movsd (%rax,%r14,8), %xmm0
leaq 0x7580(%rip), %rsi      # 0xb29f
leaq 0x2d0(%rsp), %r14
movq %r14, %rdi
movb $0x1, %al
callq 0x2060
leaq 0x7360(%rip), %rsi      # 0xb098
leaq 0x200(%rsp), %rdx
movq %r14, %rdi
callq 0x80f5
movq %rsp, %rdi
leaq 0x200(%rsp), %rsi
movl $0x1, %edx
callq 0x2040
movq $-0x40000, %rbp         # imm = 0xFFFC0000
movq %rsp, %r14
leaq 0x752b(%rip), %r15      # 0xb299
leaq 0x74c4(%rip), %r12      # 0xb239
movsd 0xc0000(%rbx,%rbp), %xmm0
movq %r14, %rdi
callq 0x2350
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movsd 0x100000(%rbx,%rbp), %xmm0
movq %r13, %rdi
callq 0x2350
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movsd 0x140000(%rbx,%rbp), %xmm0
movq %r13, %rdi
callq 0x2350
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movsd 0x40000(%rbx,%rbp), %xmm0
movq %r13, %rdi
callq 0x2350
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movsd 0x80000(%rbx,%rbp), %xmm0
movq %r13, %rdi
callq 0x2350
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movsd 0x140000(%rbx), %xmm0
movq %r13, %rdi
callq 0x2350
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
addq $0x8, %rbp
jne 0x3d75
movq %rsp, %rdi
callq 0x2120
movq %rsp, %rdi
callq 0x22c0
movq 0xb13e(%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 $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3ea8
movq %rax, %rbx
movq %rsp, %rdi
callq 0x22e0
movq %rbx, %rdi
callq 0x23a0
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: AssignStarMatrixValues(double, double, double, double, double, double, double, double)
void AssignStarMatrixValues(double Mass, double X0, double Y0, double Z0, double RelativeVelocityX, double RelativeVelocityY, double RelativeVelocityZ, double tcurrent){
	StarMatrix[0][NStarsCurrent]=Mass;
	StarMatrix[1][NStarsCurrent]=X0;
	StarMatrix[2][NStarsCurrent]=Y0;
	StarMatrix[3][NStarsCurrent]=Z0;
	StarMatrix[4][NStarsCurrent]=RelativeVelocityX;
	StarMatrix[5][NStarsCurrent]=RelativeVelocityY;
	StarMatrix[6][NStarsCurrent]=RelativeVelocityZ;
	StarMatrix[7][NStarsCurrent]=tcurrent;
	NStarsCurrent++; //one more star has been added
}

// Assembly:
movq 0xb366(%rip), %rax      # 0xf228
movq (%rax), %rcx
movq 0xb36c(%rip), %rdx      # 0xf238
movsd %xmm0, (%rcx,%rdx,8)
movq 0x8(%rax), %rcx
movsd %xmm1, (%rcx,%rdx,8)
movq 0x10(%rax), %rcx
movsd %xmm2, (%rcx,%rdx,8)
movq 0x18(%rax), %rcx
movsd %xmm3, (%rcx,%rdx,8)
movq 0x20(%rax), %rcx
movsd %xmm4, (%rcx,%rdx,8)
movq 0x28(%rax), %rcx
movsd %xmm5, (%rcx,%rdx,8)
movq 0x30(%rax), %rcx
movsd %xmm6, (%rcx,%rdx,8)
movq 0x38(%rax), %rax
movsd %xmm7, (%rax,%rdx,8)
incq %rdx
movq %rdx, 0xb31e(%rip)      # 0xf238
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: AssignCoreMatrixValues(long, double, double, double, double, double, double, double, double, double, double, double, double)
void AssignCoreMatrixValues(long timeindex, double MassInit, double Mass, double X0, double Y0, double Z0, double RelativeVelocityX, double RelativeVelocityY, double RelativeVelocityZ, double Machedge, double Temperature, double Radius, double RhoAverage){
	CoreMatrix[timeindex][0][NCoresCurrent[timeindex]]=MassInit;
	CoreMatrix[timeindex][1][NCoresCurrent[timeindex]]=Mass;
	CoreMatrix[timeindex][2][NCoresCurrent[timeindex]]=X0;
	CoreMatrix[timeindex][3][NCoresCurrent[timeindex]]=Y0;
	CoreMatrix[timeindex][4][NCoresCurrent[timeindex]]=Z0;
	CoreMatrix[timeindex][5][NCoresCurrent[timeindex]]=RelativeVelocityX;
	CoreMatrix[timeindex][6][NCoresCurrent[timeindex]]=RelativeVelocityY;
	CoreMatrix[timeindex][7][NCoresCurrent[timeindex]]=RelativeVelocityZ;
	CoreMatrix[timeindex][8][NCoresCurrent[timeindex]]=Machedge;
	CoreMatrix[timeindex][9][NCoresCurrent[timeindex]]=Temperature;
	CoreMatrix[timeindex][10][NCoresCurrent[timeindex]]=Radius;
	CoreMatrix[timeindex][11][NCoresCurrent[timeindex]]=RhoAverage;
	NCoresCurrent[timeindex]++; //one more star has been added
}

// Assembly:
movsd 0x20(%rsp), %xmm8
movsd 0x18(%rsp), %xmm9
movsd 0x10(%rsp), %xmm10
movsd 0x8(%rsp), %xmm11
movq 0xb302(%rip), %rax      # 0xf240
movq (%rax,%rdi,8), %rax
movq (%rax), %rcx
movq 0xb304(%rip), %rdx      # 0xf250
movq (%rdx,%rdi,8), %rsi
movsd %xmm0, (%rcx,%rsi,8)
movq 0x8(%rax), %rcx
movsd %xmm1, (%rcx,%rsi,8)
movq 0x10(%rax), %rcx
movsd %xmm2, (%rcx,%rsi,8)
movq 0x18(%rax), %rcx
movsd %xmm3, (%rcx,%rsi,8)
movq 0x20(%rax), %rcx
movsd %xmm4, (%rcx,%rsi,8)
movq 0x28(%rax), %rcx
movsd %xmm5, (%rcx,%rsi,8)
movq 0x30(%rax), %rcx
movsd %xmm6, (%rcx,%rsi,8)
movq 0x38(%rax), %rcx
movsd %xmm7, (%rcx,%rsi,8)
movq 0x40(%rax), %rcx
movsd %xmm11, (%rcx,%rsi,8)
movq 0x48(%rax), %rcx
movsd %xmm10, (%rcx,%rsi,8)
movq 0x50(%rax), %rcx
movsd %xmm9, (%rcx,%rsi,8)
movq 0x58(%rax), %rax
movsd %xmm8, (%rax,%rsi,8)
incq %rsi
movq %rsi, (%rdx,%rdi,8)
retq
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/StarsAndCores.cpp
// Function: InitStarsAndCores()
void InitStarsAndCores()
{
	
	long i;
	
	//Init global counting variables
	NStarsAllocated=0;
	NStarsCurrent=0;
	NCoresAllocated=(long*)calloc(CMFTIMENUM, sizeof (long));
	NCoresCurrent=(long*)calloc(CMFTIMENUM, sizeof (long));
	StarMatrix=(double**)calloc(8,sizeof(double*));
	CoreMatrix=(double***)calloc(CMFTIMENUM,sizeof(double**));
	for(i=0;i<CMFTIMENUM;i++){
		CoreMatrix[i]=(double**)calloc(12,sizeof(double*));
	}

}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
movq %rbx, 0xb262(%rip)      # 0xf230
movq %rbx, 0xb263(%rip)      # 0xf238
movl $0x10, %edi
movl $0x8, %esi
callq 0x2110
movq %rax, 0xb25d(%rip)      # 0xf248
movl $0x10, %edi
movl $0x8, %esi
callq 0x2110
movq %rax, 0xb24f(%rip)      # 0xf250
movl $0x8, %edi
movl $0x8, %esi
callq 0x2110
movq %rax, 0xb211(%rip)      # 0xf228
movl $0x10, %edi
movl $0x8, %esi
callq 0x2110
movq %rax, 0xb213(%rip)      # 0xf240
movl $0xc, %edi
movl $0x8, %esi
callq 0x2110
movq 0xb1fd(%rip), %rcx      # 0xf240
movq %rax, (%rcx,%rbx,8)
incq %rbx
cmpq $0x10, %rbx
jne 0x402d
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/Heating.c
// Function: RhoTempFieldWithHeating(double, double*, double*, double*, long)
void RhoTempFieldWithHeating(double HeatTemp, double* TField, double* RhoField, double* Rho_T_Field, long N)
// Calculates the rho*T field where heating is taken into account
{
	long i;
	double factor=1.0;
	double HeatTemp4=pow(HeatTemp,4.0);
	#if (R05Heating==true)
	double x,y,z;
	const long Nsq=Ngrid*Ngrid;
	const double Nhalf=(double)(Ngrid-1)/2.0;
	#endif
	
	for(i=0;i<N;i++){
		#if (R05Heating==true)
		x= (double)(i/Nsq)-Nhalf; //x coordinate index
     	y= (double)((i % Nsq)/Ngrid)-Nhalf; //y coordinate index
     	z= (double)(i % Ngrid)-Nhalf; //z coordinate index
     	factor=Nhalf*Nhalf/(x*x+y*y+z*z); // (sqrt(r0/r))^4
     	#endif
		Rho_T_Field[i]=pow(factor*HeatTemp4+pow(TField[i],4.0),0.25)*RhoField[i];
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movsd 0x7294(%rip), %xmm1     # 0xb358
callq 0x2390
movsd %xmm0, 0x8(%rsp)
testq %rbx, %rbx
jle 0x4111
xorl %r13d, %r13d
movsd (%r12,%r13,8), %xmm0
movsd 0x7273(%rip), %xmm1     # 0xb358
callq 0x2390
addsd 0x8(%rsp), %xmm0
movsd 0x7268(%rip), %xmm1     # 0xb360
callq 0x2390
mulsd (%r15,%r13,8), %xmm0
movsd %xmm0, (%r14,%r13,8)
incq %r13
cmpq %r13, %rbx
jne 0x40d7
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/EvolveField.c
// Function: SetOptimaldt(double, double, double)
double SetOptimaldt(double dt,double renormstepMax,double dDeltaKMax){
	double newdt; // new value for dt/t0 to use
	double newrenormstepMax; //the value of renormstepMax after changing to newdt
	
	// First optimize for density variance steps (this is quadratic)
    newdt=dt*(dDeltaKOptimal/dDeltaKMax)*(dDeltaKOptimal/dDeltaKMax);
    newrenormstepMax=renormstepMax*newdt/dt; //linear relation
    // Check if this is acceptable for the dt/tau steps
	if (newrenormstepMax>RenormstepOptimal){
    	newdt=newdt*(RenormstepOptimal/newrenormstepMax); //linear dependence
	}
	
return newdt;	
}

// Assembly:
movsd 0x3830(%rip), %xmm3     # 0xb070
movapd %xmm3, %xmm4
divsd %xmm2, %xmm4
movapd %xmm4, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm4, %xmm2
mulsd %xmm2, %xmm1
divsd %xmm0, %xmm1
movapd %xmm3, %xmm0
divsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
cmpltsd %xmm1, %xmm3
movapd %xmm3, %xmm1
andnpd %xmm2, %xmm1
andpd %xmm0, %xmm3
orpd %xmm1, %xmm3
movapd %xmm3, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x3b47(%rip), %xmm1     # 0xb418
ucomisd %xmm0, %xmm1
jae 0x790a
movq $-0x1, %rax
movl $0x1, %ecx
leaq 0x3d06(%rip), %rdx      # 0xb5f0
ucomisd -0x8(%rdx,%rcx,8), %xmm0
jbe 0x7900
movsd (%rdx,%rcx,8), %xmm1
ucomisd %xmm0, %xmm1
jb 0x7900
movq %rcx, %rax
incq %rcx
cmpq $0x10, %rcx
jne 0x78ea
retq
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq 0x7968(%rip), %rdi      # 0xf280
imulq $0x80050, 0x7975(%rip), %rsi # imm = 0x80050
addq $0x1900fa0, %rsi        # imm = 0x1900FA0
callq 0x2360
movq %rax, 0x794a(%rip)      # 0xf280
testq %rax, %rax
je 0x79de
movq 0x794a(%rip), %rdi      # 0xf290
movq 0x794b(%rip), %rsi      # 0xf298
addq $0x32, %rsi
callq 0x2360
movq %rax, 0x7933(%rip)      # 0xf290
movq 0x7934(%rip), %rcx      # 0xf298
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax,%rcx)
movups %xmm0, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movw $0x0, 0x30(%rax,%rcx)
movq 0x7905(%rip), %rdi      # 0xf288
leaq 0x190(,%rcx,8), %rsi
callq 0x2360
movq %rax, 0x78f1(%rip)      # 0xf288
addq $0x32, 0x78f9(%rip)     # 0xf298
movq 0x7622(%rip), %rbx      # 0xefc8
leaq 0x3cc3(%rip), %rsi      # 0xb670
movl $0x1a, %edx
movq %rbx, %rdi
callq 0x2210
movq 0x78d7(%rip), %rsi      # 0xf298
movq %rbx, %rdi
callq 0x21c0
leaq 0x3869(%rip), %rsi      # 0xb239
movl $0x1, %edx
movq %rax, %rdi
popq %rbx
jmp 0x2210
movq 0x75e3(%rip), %rdi      # 0xefc8
leaq 0x3874(%rip), %rsi      # 0xb260
callq 0x21e0
movl $0x1, %edi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O1/guszejnovdavid[P]MISFIT/InputDataManage.cpp
// Function: FreeInputStorage()
void FreeInputStorage(){
	NInputAllocated=0;
	NInputCurrent=0;
	free(InputStorage);
	free(IsUsed);
	free(InputPriority);
}

// Assembly:
pushq %rax
xorl %eax, %eax
movq %rax, 0x7893(%rip)      # 0xf298
movq %rax, 0x7894(%rip)      # 0xf2a0
movq 0x786d(%rip), %rdi      # 0xf280
callq 0x2250
movq 0x7871(%rip), %rdi      # 0xf290
callq 0x2250
movq 0x785d(%rip), %rdi      # 0xf288
popq %rax
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O1/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 0x36e3(%rip), %rdi      # 0xb123
leaq 0x3651(%rip), %rsi      # 0xb098
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x80f5
movq %rbx, %rdi
callq 0x7a68
callq 0x79fb
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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:
imulq $0x80050, %rsi, %rax    # imm = 0x80050
movq 0x7506(%rip), %rcx      # 0xf280
addq %rax, %rcx
xorl %edx, %edx
movsd (%rdi,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq $0x8000, %rdx           # imm = 0x8000
jne 0x7d7f
movq 0x74e4(%rip), %rcx      # 0xf280
addq %rax, %rcx
addq $0x40000, %rcx          # imm = 0x40000
xorl %edx, %edx
movsd 0x40000(%rdi,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq $0x8000, %rdx           # imm = 0x8000
jne 0x7da8
movq 0x74b7(%rip), %rcx      # 0xf280
movups 0x80000(%rdi), %xmm0
movups %xmm0, 0x80000(%rcx,%rax)
movups 0x80010(%rdi), %xmm0
movups %xmm0, 0x80010(%rcx,%rax)
movups 0x80020(%rdi), %xmm0
movups %xmm0, 0x80020(%rcx,%rax)
movups 0x80030(%rdi), %xmm0
movups %xmm0, 0x80030(%rcx,%rax)
movups 0x80040(%rdi), %xmm0
movups %xmm0, 0x80040(%rcx,%rax)
movq 0x7475(%rip), %rax      # 0xf290
movb $0x1, (%rax,%rsi)
movsd 0x3229(%rip), %xmm0     # 0xb050
divsd 0x80000(%rdi), %xmm0
movq 0x7452(%rip), %rax      # 0xf288
movsd %xmm0, (%rax,%rsi,8)
incq 0x745e(%rip)            # 0xf2a0
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x386d(%rip), %xmm0     # 0xb6d0
movq %rsp, %rax
movaps %xmm0, 0x20(%rax)
movaps 0x384f(%rip), %xmm0     # 0xb6c0
movaps %xmm0, 0x10(%rax)
movaps 0x3834(%rip), %xmm0     # 0xb6b0
movaps %xmm0, (%rax)
leaq 0x6e4a(%rip), %rsi      # 0xecd0
leaq 0x90(%rsp), %r8
movl $0xc, %ecx
movq %r8, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x30(%rsp), %rdx
movq $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 0x736c(%rip), %rbx      # 0xf270
movl $0xc, %edi
movq %rax, %rsi
movq %r8, %rcx
movq %rbx, %r8
callq 0x2200
movq %rbx, %rdi
callq 0x2270
addq $0xf0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x37a9(%rip), %xmm0     # 0xb6e0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movabsq $0x100008000, %rax      # imm = 0x100008000
movq %rax, 0x10(%rsi)
movaps 0x6dfe(%rip), %xmm0     # 0xed50
leaq 0x50(%rsp), %rcx
movaps %xmm0, 0x20(%rcx)
movaps 0x6dde(%rip), %xmm0     # 0xed40
movaps %xmm0, 0x10(%rcx)
movaps 0x6dc3(%rip), %xmm0     # 0xed30
movaps %xmm0, (%rcx)
leaq 0x20(%rsp), %rdx
movq $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 0x72cd(%rip), %rbx      # 0xf278
movl $0x6, %edi
movq %rbx, %r8
callq 0x2200
movq %rbx, %rdi
callq 0x2270
addq $0x80, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x72c4(%rip)      # 0xf298
movq $0x0, 0x72c1(%rip) # 0xf2a0
movl $0x80050, %esi          # imm = 0x80050
callq 0x2110
movq %rax, 0x7290(%rip)      # 0xf280
testq %rax, %rax
je 0x8015
movq %rbx, %rdi
callq 0xa836
movq %rax, 0x728c(%rip)      # 0xf290
movq %rbx, %rdi
callq 0xa7d2
movq %rax, 0x7275(%rip)      # 0xf288
popq %rbx
retq
movq 0x6fac(%rip), %rdi      # 0xefc8
leaq 0x323d(%rip), %rsi      # 0xb260
callq 0x21e0
movl $0x1, %edi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O1/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 0x725f(%rip), %rcx      # 0xf298
testq %rcx, %rcx
jle 0x8080
movq 0x724b(%rip), %rdx      # 0xf290
movq $-0x1, %rax
xorpd %xmm0, %xmm0
movq 0x7231(%rip), %rsi      # 0xf288
xorl %edi, %edi
cmpb $0x1, (%rdx,%rdi)
jne 0x8077
movsd (%rsi,%rdi,8), %xmm1
cmpq $-0x1, %rax
je 0x8070
ucomisd %xmm0, %xmm1
jbe 0x8077
movq %rdi, %rax
movapd %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rcx
jne 0x8059
retq
movq $-0x1, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x7208(%rip), %rcx      # 0xf298
testq %rcx, %rcx
jle 0x80ac
movq 0x71f4(%rip), %rdx      # 0xf290
xorl %eax, %eax
cmpb $0x0, (%rdx,%rax)
je 0x80cb
incq %rax
cmpq %rax, %rcx
jne 0x809e
movq 0x6f15(%rip), %rdi      # 0xefc8
leaq 0x35d1(%rip), %rsi      # 0xb68b
movl $0x19, %edx
callq 0x2210
movq $-0x1, %rax
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x3620(%rip), %rsi      # 0xb6f8
callq 0x2240
movq %rax, %rbx
testq %rax, %rax
je 0x80ed
movq %rbx, %rdi
callq 0x21f0
testq %rbx, %rbx
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x35d2(%rip), %rsi      # 0xb701
movq %rax, %rdi
callq 0x2240
movq %rax, %r14
leaq 0x35c2(%rip), %rsi      # 0xb703
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22d0
movq %r14, %rdi
callq 0x2230
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21f0
// File: /workspace/github_c_makefile_star2_O1/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 0x3588(%rip), %rsi      # 0xb6f8
callq 0x2240
movq %rax, %rbx
movq %rax, %rdi
callq 0x2310
xorl %r14d, %r14d
testl %eax, %eax
jne 0x81a4
movq %rbx, %rdi
callq 0x2320
xorl %ecx, %ecx
cmpl $0xa, %eax
sete %cl
addq %rcx, %r14
movq %rbx, %rdi
callq 0x2310
jmp 0x8183
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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), %xmm1
testq %rsi, %rsi
jle 0x821b
xorl %eax, %eax
movsd (%rdi,%rax,8), %xmm0
maxsd %xmm1, %xmm0
incq %rax
movapd %xmm0, %xmm1
cmpq %rax, %rsi
jne 0x8205
retq
movapd %xmm1, %xmm0
retq