LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: sec_str(double, double, double, double, double, double)
int sec_str(double dis13, double dis14, double dis15, double dis24, double dis25, double dis35)
{
	int s=1;
	
	double delta=2.1;
	if(fabs(dis15-6.37)<delta)
	{
		if(fabs(dis14-5.18)<delta)
		{
			if(fabs(dis25-5.18)<delta)
			{
				if(fabs(dis13-5.45)<delta)
				{
					if(fabs(dis24-5.45)<delta)
					{
						if(fabs(dis35-5.45)<delta)
						{
							s=2; //helix						
							return s;
						}
					}
				}
			}
		}
	}

	delta=1.42;
	if(fabs(dis15-13)<delta)
	{
		if(fabs(dis14-10.4)<delta)
		{
			if(fabs(dis25-10.4)<delta)
			{
				if(fabs(dis13-6.1)<delta)
				{
					if(fabs(dis24-6.1)<delta)
					{
						if(fabs(dis35-6.1)<delta)
						{
							s=4; //strand
							return s;
						}
					}
				}
			}
		}
	}

	if(dis15 < 8)
	{
		s=3; //turn
	}	  


	return s;
}

// Assembly:
movsd 0x17b493(%rip), %xmm6   # 0x583038
addsd %xmm2, %xmm6
andpd 0x17b58f(%rip), %xmm6   # 0x583140
ucomisd 0x17b487(%rip), %xmm6   # 0x583040
jae 0x407c5c
movsd 0x17b481(%rip), %xmm6   # 0x583048
addsd %xmm1, %xmm6
andpd 0x17b56d(%rip), %xmm6   # 0x583140
ucomisd 0x17b465(%rip), %xmm6   # 0x583040
jae 0x407c5c
movsd 0x17b463(%rip), %xmm6   # 0x583048
addsd %xmm4, %xmm6
andpd 0x17b54f(%rip), %xmm6   # 0x583140
ucomisd 0x17b447(%rip), %xmm6   # 0x583040
jae 0x407c5c
movsd 0x17b44d(%rip), %xmm6   # 0x583050
addsd %xmm0, %xmm6
andpd 0x17b531(%rip), %xmm6   # 0x583140
ucomisd 0x17b429(%rip), %xmm6   # 0x583040
jae 0x407c5c
movsd 0x17b42f(%rip), %xmm6   # 0x583050
addsd %xmm3, %xmm6
andpd 0x17b513(%rip), %xmm6   # 0x583140
ucomisd 0x17b40b(%rip), %xmm6   # 0x583040
jae 0x407c5c
movsd 0x17b411(%rip), %xmm6   # 0x583050
addsd %xmm5, %xmm6
andpd 0x17b4f5(%rip), %xmm6   # 0x583140
ucomisd 0x17b3ed(%rip), %xmm6   # 0x583040
jae 0x407c5c
pushq $0x2
jmp 0x407d02
movsd 0x17b3f4(%rip), %xmm6   # 0x583058
addsd %xmm2, %xmm6
andpd 0x17b4d0(%rip), %xmm6   # 0x583140
ucomisd 0x17b3e8(%rip), %xmm6   # 0x583060
jae 0x407d04
addsd 0x17b3e2(%rip), %xmm1   # 0x583068
andpd 0x17b4b2(%rip), %xmm1   # 0x583140
ucomisd 0x17b3ca(%rip), %xmm1   # 0x583060
jae 0x407d04
addsd 0x17b3c8(%rip), %xmm4   # 0x583068
andpd 0x17b498(%rip), %xmm4   # 0x583140
ucomisd 0x17b3b0(%rip), %xmm4   # 0x583060
jae 0x407d04
addsd 0x17b3b6(%rip), %xmm0   # 0x583070
andpd 0x17b47e(%rip), %xmm0   # 0x583140
ucomisd 0x17b396(%rip), %xmm0   # 0x583060
jae 0x407d04
addsd 0x17b39c(%rip), %xmm3   # 0x583070
andpd 0x17b464(%rip), %xmm3   # 0x583140
ucomisd 0x17b37c(%rip), %xmm3   # 0x583060
jae 0x407d04
addsd 0x17b382(%rip), %xmm5   # 0x583070
andpd 0x17b44a(%rip), %xmm5   # 0x583140
ucomisd 0x17b362(%rip), %xmm5   # 0x583060
jae 0x407d04
pushq $0x4
popq %rax
retq
xorl %eax, %eax
ucomisd 0x17b36a(%rip), %xmm2   # 0x583078
setb %al
leal 0x1(,%rax,2), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: make_sec(double**, int, int*)
void make_sec(double **x, int len, int *sec)
{
    int j1, j2, j3, j4, j5;
	double d13, d14, d15, d24, d25, d35;
    for(int i=0; i<len; i++)
    { 	
		sec[i]=1;
        j1=i-2;
        j2=i-1;
        j3=i;
        j4=i+1;
        j5=i+2;		
        
        if(j1>=0 && j5<len)
		{
			d13=sqrt(dist(x[j1], x[j3]));
			d14=sqrt(dist(x[j1], x[j4]));
			d15=sqrt(dist(x[j1], x[j5]));
			d24=sqrt(dist(x[j2], x[j4]));
			d25=sqrt(dist(x[j2], x[j5]));
			d35=sqrt(dist(x[j3], x[j5]));
			sec[i]=sec_str(d13, d14, d15, d24, d25, d35);			
		}    
    } 
	smooth(sec, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, 0x18(%rsp)
xorl %r14d, %r14d
testl %esi, %esi
movl $0x0, %edi
cmovgl %esi, %edi
movl %esi, 0xc(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x18(%rsp), %r12
cmpq %r14, %rdi
je 0x407e4d
movl $0x1, (%rdx,%r14,4)
cmpq $0x2, %r14
setae %al
leaq 0x2(%r14), %r15
cmpl %esi, %r15d
setl %cl
testb %cl, %al
je 0x407e42
movq -0x10(%r12,%r14,8), %r13
movq (%r12,%r14,8), %rax
movq %rax, 0x48(%rsp)
movq %r13, %rdi
movq %rax, %rsi
callq 0x4054a5
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x8(%r12,%r14,8), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4054a5
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x10(%r12,%r14,8), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4054a5
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
movq -0x8(%r12,%r14,8), %r13
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4054a5
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4054a5
sqrtsd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x4054a5
sqrtsd %xmm0, %xmm5
movsd 0x50(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movsd 0x30(%rsp), %xmm3
movsd 0x28(%rsp), %xmm4
callq 0x407b9d
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rdx
movl 0xc(%rsp), %esi
movl %eax, (%rdx,%r14,4)
decq %r15
movq %r15, %r14
jmp 0x407d4c
movq %rdx, %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x407a74
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: score_matrix_rmsd(double**, double**, int, int, int*)
void score_matrix_rmsd(  double **x, 
						 double **y, 
						 int x_len,
						 int y_len,
						 int *y2x
						 )
{
	double t[3], u[3][3];
	double rmsd, dij;
	double d01=d0+1.5;
	if(d01 < D0_MIN) d01=D0_MIN;
	double d02=d01*d01;

	double xx[3];
	int i, k=0;
	for(int j=0; j<y_len; j++)
	{
		i=y2x[j];
		if(i>=0)
		{
			r1[k][0]=x[i][0];  
			r1[k][1]=x[i][1]; 
			r1[k][2]=x[i][2];   
            
			r2[k][0]=y[j][0];  
			r2[k][1]=y[j][1]; 
			r2[k][2]=y[j][2];
			
			k++;
		}
	}
	Kabsch(r1, r2, k, 1, &rmsd, t, u);
	//do_rotation(x, xt, x_len, t, u);
	
	
	for(int ii=0; ii<x_len; ii++)
	{		
		transform(t, u, &x[ii][0], xx);
		for(int jj=0; jj<y_len; jj++)
		{
			//dij=dist(&xt[ii][0], &y[jj][0]);   
			dij=dist(xx, &y[jj][0]); 
			score[ii+1][jj+1] = 1.0/(1+dij/d02);
			//	cout << ii+1 << " " << jj+1 << " " << score[ii+1][jj+1]<< endl;
		}
	}		
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %ebx
movl %edx, %r14d
movq %rsi, %r15
movsd 0x1fa36a(%rip), %xmm1   # 0x602580
addsd 0x17ae62(%rip), %xmm1   # 0x583080
maxsd 0x1fa342(%rip), %xmm1   # 0x602568
movq %rdi, 0x18(%rsp)
movq 0x1fa3e6(%rip), %rdi    # 0x602618
movq 0x1fa3e7(%rip), %rsi    # 0x602620
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ebx
xorl %edx, %edx
cmpq %rax, %rbx
je 0x4082ad
movslq (%r8,%rax,4), %rcx
testq %rcx, %rcx
js 0x4082a8
movq 0x18(%rsp), %r9
movq (%r9,%rcx,8), %rcx
movsd (%rcx), %xmm0
movslq %edx, %rdx
movq (%rdi,%rdx,8), %r9
movsd %xmm0, (%r9)
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%r9)
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x10(%r9)
movq (%r15,%rax,8), %rcx
movsd (%rcx), %xmm0
movq (%rsi,%rdx,8), %r9
movsd %xmm0, (%r9)
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%r9)
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x10(%r9)
incl %edx
incq %rax
jmp 0x408242
mulsd %xmm1, %xmm1
movsd %xmm1, 0x10(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, (%rsp)
pushq $0x1
popq %rcx
leaq 0x28(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x405c40
xorl %ebp, %ebp
testl %r14d, %r14d
cmovlel %ebp, %r14d
movq %r14, 0x20(%rsp)
movsd 0x17ad20(%rip), %xmm0   # 0x583008
divsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x50(%rsp), %r13
cmpq 0x20(%rsp), %rbp
je 0x408362
movq 0x18(%rsp), %rax
movq (%rax,%rbp,8), %rdx
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %r13, %rcx
callq 0x4054f3
movq 0x1fa276(%rip), %r14    # 0x602598
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x40835d
movq (%r15,%r12,8), %rsi
movq %r13, %rdi
callq 0x4054a5
mulsd 0x10(%rsp), %xmm0
movsd 0x17acc4(%rip), %xmm1   # 0x583008
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movq 0x8(%r14,%rbp,8), %rax
movsd %xmm1, 0x8(%rax,%r12,8)
incq %r12
jmp 0x408325
incq %rbp
jmp 0x4082f9
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: score_matrix_rmsd_sec(double**, double**, int, int, int*)
void score_matrix_rmsd_sec(  double **x, 
							 double **y, 
							 int x_len,
							 int y_len,
							 int *y2x
							 )
{
	double t[3], u[3][3];
	double rmsd, dij;
	double d01=d0+1.5;
	if(d01 < D0_MIN) d01=D0_MIN;
	double d02=d01*d01;

	double xx[3];
	int i, k=0;
	for(int j=0; j<y_len; j++)
	{
		i=y2x[j];
		if(i>=0)
		{
			r1[k][0]=x[i][0];  
			r1[k][1]=x[i][1]; 
			r1[k][2]=x[i][2];   
            
			r2[k][0]=y[j][0];  
			r2[k][1]=y[j][1]; 
			r2[k][2]=y[j][2];
			
			k++;
		}
	}
	Kabsch(r1, r2, k, 1, &rmsd, t, u);

	
	for(int ii=0; ii<x_len; ii++)
	{		
		transform(t, u, &x[ii][0], xx);
		for(int jj=0; jj<y_len; jj++)
		{
			dij=dist(xx, &y[jj][0]); 
			if(secx[ii]==secy[jj])
			{
				score[ii+1][jj+1] = 1.0/(1+dij/d02) + 0.5;
			}
			else
			{
				score[ii+1][jj+1] = 1.0/(1+dij/d02);
			}		
		}
	}		
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %ebx
movl %edx, %r14d
movq %rsi, 0x18(%rsp)
movsd 0x1fa1e9(%rip), %xmm1   # 0x602580
addsd 0x17ace1(%rip), %xmm1   # 0x583080
maxsd 0x1fa1c1(%rip), %xmm1   # 0x602568
movq %rdi, 0x10(%rsp)
movq 0x1fa265(%rip), %rdi    # 0x602618
movq 0x1fa266(%rip), %rsi    # 0x602620
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ebx
xorl %edx, %edx
cmpq %rax, %rbx
je 0x408433
movslq (%r8,%rax,4), %rcx
testq %rcx, %rcx
js 0x40842e
movq 0x10(%rsp), %r9
movq (%r9,%rcx,8), %rcx
movsd (%rcx), %xmm0
movslq %edx, %rdx
movq (%rdi,%rdx,8), %r9
movsd %xmm0, (%r9)
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%r9)
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x10(%r9)
movq 0x18(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
movsd (%rcx), %xmm0
movq (%rsi,%rdx,8), %r9
movsd %xmm0, (%r9)
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%r9)
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x10(%r9)
incl %edx
incq %rax
jmp 0x4083c3
mulsd %xmm1, %xmm1
movsd %xmm1, 0x8(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, (%rsp)
pushq $0x1
popq %rcx
leaq 0x28(%rsp), %r8
leaq 0x50(%rsp), %r9
callq 0x405c40
xorl %ebp, %ebp
testl %r14d, %r14d
cmovlel %ebp, %r14d
movq %r14, 0x20(%rsp)
movsd 0x17ab9a(%rip), %xmm0   # 0x583008
divsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
cmpq 0x20(%rsp), %rbp
je 0x40851b
movq 0x10(%rsp), %rax
movq (%rax,%rbp,8), %rdx
leaq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x30(%rsp), %rcx
callq 0x4054f3
movq 0x1fa15f(%rip), %r14    # 0x602608
movq 0x1fa160(%rip), %r12    # 0x602610
movq 0x1fa0e1(%rip), %r15    # 0x602598
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x408513
movq 0x18(%rsp), %rax
movq (%rax,%r13,8), %rsi
leaq 0x30(%rsp), %rdi
callq 0x4054a5
movl (%r14,%rbp,4), %eax
mulsd 0x8(%rsp), %xmm0
movsd 0x17ab24(%rip), %xmm1   # 0x583008
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addsd 0x17ab20(%rip), %xmm0   # 0x583018
cmpl (%r12,%r13,4), %eax
je 0x408502
movapd %xmm1, %xmm0
movq 0x8(%r15,%rbp,8), %rax
movsd %xmm0, 0x8(%rax,%r13,8)
incq %r13
jmp 0x4084ba
incq %rbp
jmp 0x40847a
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./TMalign.h
// Function: find_max_frag(double**, int*, int, int*, int*)
void find_max_frag(double **x, int *resno, int len, int *start_max, int *end_max)
{
	int r_min, fra_min=4;           //minimum fragment for search
	double d;
	int start;
	int Lfr_max=0, flag;

	r_min= (int) (len*1.0/3.0); //minimum fragment, in case too small protein
	if(r_min > fra_min) r_min=fra_min;
	
	int inc=0;
	double dcu0_cut=dcu0*dcu0;;
	double dcu_cut=dcu0_cut;

	while(Lfr_max < r_min)
	{		
		Lfr_max=0;			
		int j=1;    //number of residues at nf-fragment
		start=0;
		for(int i=1; i<len; i++)
		{			
			d = dist(x[i-1], x[i]);
			flag=0;
			if(dcu_cut>dcu0_cut)
			{
				if(d<dcu_cut)
				{
					flag=1;
				}
			}
			else if(resno[i] == (resno[i-1]+1)) //necessary??
			{
				if(d<dcu_cut)
				{
					flag=1;
				}
			}

			if(flag==1)
			{
				j++;

				if(i==(len-1))
				{
					if(j > Lfr_max) 
					{
						Lfr_max=j;
						*start_max=start;
						*end_max=i;						
					}
					j=1;
				}
			}
			else
			{
				if(j>Lfr_max) 
				{
					Lfr_max=j;
					*start_max=start;
					*end_max=i-1;										
				}

				j=1;
				start=i;
			}
		}// for i;
		
		if(Lfr_max < r_min)
		{
			inc++;
			double dinc=pow(1.1, (double) inc) * dcu0;
			dcu_cut= dinc*dinc;
		}
	}//while <;	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, 0x28(%rsp)
movq %rcx, 0x10(%rsp)
movq %rsi, 0x38(%rsp)
cvtsi2sd %edx, %xmm0
mulsd 0x17aa90(%rip), %xmm0   # 0x583010
cvttsd2si %xmm0, %eax
cmpl $0x4, %eax
pushq $0x4
popq %rbx
cmovll %eax, %ebx
movq %rdi, %r13
movsd 0x1f9ff8(%rip), %xmm1   # 0x602590
movsd %xmm1, 0x18(%rsp)
mulsd %xmm1, %xmm1
movslq %edx, %rax
movq %rax, 0x50(%rsp)
decl %edx
movq %rdx, 0x20(%rsp)
leaq -0x1(%rdx), %rax
movq %rax, 0x30(%rsp)
xorl %r14d, %r14d
movl $0x0, 0x8(%rsp)
movsd %xmm1, 0x40(%rsp)
movl %ebx, 0xc(%rsp)
movsd %xmm1, 0x48(%rsp)
cmpl %ebx, %r14d
jge 0x4086ae
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %r15d, %r15d
pushq $0x1
popq %rax
movl %eax, %ebp
movq %r12, %rbx
incq %r12
cmpq 0x50(%rsp), %r12
jge 0x408673
movq (%r13,%rbx,8), %rdi
movq 0x8(%r13,%rbx,8), %rsi
callq 0x4054a5
movsd 0x48(%rsp), %xmm1
ucomisd 0x40(%rsp), %xmm1
ja 0x408626
movq 0x38(%rsp), %rcx
movl (%rcx,%rbx,4), %eax
incl %eax
cmpl %eax, 0x4(%rcx,%rbx,4)
jne 0x40864a
ucomisd %xmm1, %xmm0
jae 0x40864a
leal 0x1(%rbp), %eax
cmpq %rbx, 0x30(%rsp)
jne 0x4085ea
cmpl %r14d, %ebp
jl 0x4085e7
movq 0x10(%rsp), %rcx
movl %r15d, (%rcx)
movq 0x20(%rsp), %rbx
jmp 0x40865c
cmpl %r14d, %ebp
jle 0x40866b
movq 0x10(%rsp), %rax
movl %r15d, (%rax)
movl %ebp, %eax
movl %r12d, %r15d
movq 0x28(%rsp), %rcx
movl %ebx, (%rcx)
movl %eax, %r14d
jmp 0x4085e7
movl %r12d, %r15d
jmp 0x4085e7
movl 0xc(%rsp), %ebx
cmpl %ebx, %r14d
jge 0x4085d5
movl 0x8(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
cvtsi2sd %eax, %xmm0
mulsd 0x17a9f2(%rip), %xmm0   # 0x583088
callq 0x4aa8a0
movapd %xmm0, %xmm1
mulsd 0x18(%rsp), %xmm1
mulsd %xmm1, %xmm1
jmp 0x4085cf
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/TMalign.cpp
// Function: parameter_set4search(int, int)
void parameter_set4search(int xlen, int ylen)
{
	//parameter initilization for searching: D0_MIN, Lnorm, d0, d0_search, score_d8
	D0_MIN=0.5; 
	dcu0=4.25;                       //update 3.85-->4.25
 
	Lnorm=getmin(xlen, ylen);        //normaliz TMscore by this in searching
    if(Lnorm<=19)                    //update 15-->19
    {
        d0=0.168;                   //update 0.5-->0.168
    }
    else
    {
        d0=(1.24*pow((Lnorm*1.0-15), 1.0/3)-1.8);
    }
	D0_MIN=d0+0.8;              //this should be moved to above
    d0=D0_MIN;                  //update: best for search    


	d0_search=d0;	
	if(d0_search>8) d0_search=8;
	if(d0_search<4.5) d0_search=4.5;


    score_d8=1.5*pow(Lnorm*1.0, 0.3)+3.5; //remove pairs with dis>d8 during search & final
}

// Assembly:
pushq %rax
movabsq $0x4011000000000000, %rax # imm = 0x4011000000000000
movq %rax, 0x1f86af(%rip)    # 0x602590
cmpl %esi, %edi
cmovll %edi, %esi
cvtsi2sd %esi, %xmm2
movsd %xmm2, 0x1f867e(%rip)   # 0x602570
cmpl $0x14, %esi
jge 0x409f01
movsd 0x1791b1(%rip), %xmm0   # 0x5830b0
jmp 0x409f27
addl $-0xf, %esi
cvtsi2sd %esi, %xmm0
movsd %xmm2, (%rsp)
callq 0x4a9b50
movsd (%rsp), %xmm2
mulsd 0x179199(%rip), %xmm0   # 0x5830b8
addsd 0x179109(%rip), %xmm0   # 0x583030
movsd %xmm0, 0x1f8639(%rip)   # 0x602568
movsd %xmm0, 0x1f8649(%rip)   # 0x602580
minsd 0x179139(%rip), %xmm0   # 0x583078
maxsd 0x179179(%rip), %xmm0   # 0x5830c0
movsd %xmm0, 0x1f8639(%rip)   # 0x602588
movsd 0x179171(%rip), %xmm1   # 0x5830c8
movapd %xmm2, %xmm0
callq 0x4aa7e0
mulsd 0x179118(%rip), %xmm0   # 0x583080
addsd 0x179160(%rip), %xmm0   # 0x5830d0
movsd %xmm0, 0x1f8600(%rip)   # 0x602578
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/TMalign.cpp
// Function: parameter_set4final(double)
void parameter_set4final(double len)
{
	D0_MIN=0.5; 
 
	Lnorm=len;            //normaliz TMscore by this in searching
    if(Lnorm<=21)         
    {
        d0=0.5;          
    }
    else
    {
        d0=(1.24*pow((Lnorm*1.0-15), 1.0/3)-1.8);
    }
    if(d0<D0_MIN) d0=D0_MIN;   

	d0_search=d0;	
	if(d0_search>8) d0_search=8;
	if(d0_search<4.5) d0_search=4.5;  

}

// Assembly:
pushq %rax
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, 0x1f85dc(%rip)    # 0x602568
movsd %xmm0, 0x1f85dc(%rip)   # 0x602570
ucomisd 0x17913c(%rip), %xmm0   # 0x5830d8
jbe 0x409fc5
addsd 0x17913a(%rip), %xmm0   # 0x5830e0
callq 0x4a9b50
mulsd 0x179105(%rip), %xmm0   # 0x5830b8
addsd 0x17912d(%rip), %xmm0   # 0x5830e8
ucomisd 0x179055(%rip), %xmm0   # 0x583018
jae 0x409fcd
movsd 0x17904b(%rip), %xmm0   # 0x583018
movsd %xmm0, 0x1f85ab(%rip)   # 0x602580
minsd 0x17909b(%rip), %xmm0   # 0x583078
maxsd 0x1790db(%rip), %xmm0   # 0x5830c0
movsd %xmm0, 0x1f859b(%rip)   # 0x602588
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/asford[P]tmalign/./basic_fun.h
// Function: void DeleteArray<bool>(bool***, int)
void DeleteArray(A *** array, int Narray)
{
  for(int i=0; i<Narray; i++)
    if(*(*array+i)) delete [] *(*array+i);
  if(Narray) delete [] (*array);
  (*array)=NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
xorl %r14d, %r14d
testl %esi, %esi
movl $0x0, %r15d
cmovgl %esi, %r15d
cmpq %r14, %r15
je 0x40aff3
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x40afee
callq 0x40b100
incq %r14
jmp 0x40afd8
testl %ebp, %ebp
je 0x40b004
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x40b004
callq 0x40b100
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: main
int main(){
	//Add jobs to the queue
	create_files(NUM_FILES);

	pthread_t threads_id[NUM_THREADS];
	
	int i;

	enqueue_job("file1.txt", 0);
	enqueue_job("file2.txt", 1);
	enqueue_job("file3.txt", 0);
	enqueue_job("file4.txt", 1);
	enqueue_job("file5.txt", 0);
	enqueue_job("file6.txt", 1);
	enqueue_job("file7.txt", 0);
	enqueue_job("file8.txt", 1);

	for(i = 0; i < NUM_THREADS; ++i){
		pthread_create(&threads_id[i], NULL, &thread_function, NULL);
	}

	for(i = 0; i < NUM_THREADS; ++i){
		pthread_join(threads_id[i], NULL);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
pushq $0x8
popq %rdi
callq 0x1330
leaq 0xd8e(%rip), %rdi       # 0x2004
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x1417
leaq 0xd87(%rip), %rdi       # 0x200e
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x1417
leaq 0xd80(%rip), %rdi       # 0x2018
xorl %esi, %esi
callq 0x1417
leaq 0xd7c(%rip), %rdi       # 0x2022
movl %ebx, %esi
callq 0x1417
leaq 0xd78(%rip), %rdi       # 0x202c
xorl %esi, %esi
callq 0x1417
leaq 0xd74(%rip), %rdi       # 0x2036
movl %ebx, %esi
callq 0x1417
leaq 0xd70(%rip), %rdi       # 0x2040
xorl %esi, %esi
callq 0x1417
leaq 0xd6c(%rip), %rdi       # 0x204a
movl %ebx, %esi
callq 0x1417
leaq 0x172(%rip), %rbx       # 0x145e
cmpq $0x20, %r14
je 0x130c
leaq (%r14,%rbp), %rdi
addq $-0x30, %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x10f0
addq $0x8, %r14
jmp 0x12ec
xorl %ebx, %ebx
cmpq $0x4, %rbx
je 0x1325
movq -0x30(%rbp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1120
incq %rbx
jmp 0x130e
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: create_files
void create_files(int n){
	char filename[20] = "";
	FILE *fp = NULL;
	int i, count, j;

	for(i = 1; i <= n; ++i){
		srand(time(NULL)*(i+2));
		sprintf(filename, "file%d.txt", i);
		fp = fopen(filename, "w");
		count = rand() % TAM_MAX;
		count = count > 10 ? count : 10;
		for(j = 0; j < count-1; ++j){
			fprintf(fp, "%d\n", rand() % 1000);
		}
		fprintf(fp, "%d", rand() % 1000);
		fclose(fp);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rax
movaps %xmm0, (%rax)
andl $0x0, 0x10(%rax)
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edi
incl %edi
movl %edi, -0x2c(%rbp)
pushq $0x1
popq %r15
movl $0x3e8, %ebx            # imm = 0x3E8
leaq 0xcf6(%rip), %r13       # 0x2061
cmpl -0x2c(%rbp), %r15d
je 0x1408
xorl %edi, %edi
callq 0x10b0
leal 0x2(%r15), %edi
imull %eax, %edi
callq 0x1090
leaq -0x40(%rbp), %r14
movq %r14, %rdi
leaq 0xcbe(%rip), %rsi       # 0x2054
movl %r15d, %edx
xorl %eax, %eax
callq 0x1110
movq %r14, %rdi
leaq 0xcb5(%rip), %rsi       # 0x205f
callq 0x1100
movq %rax, %r12
callq 0x1150
cltd
pushq $0x64
popq %rcx
idivl %ecx
movl %edx, %r14d
cmpl $0xb, %edx
pushq $0xa
popq %rax
cmovll %eax, %r14d
decl %r14d
callq 0x1150
cltd
idivl %ebx
movq %r12, %rdi
subl $0x1, %r14d
jb 0x13ea
movq %r13, %rsi
xorl %eax, %eax
callq 0x10a0
jmp 0x13cd
leaq 0xc74(%rip), %rsi       # 0x2065
xorl %eax, %eax
callq 0x10a0
movq %r12, %rdi
callq 0x1060
incl %r15d
jmp 0x136b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: enqueue_job
void enqueue_job (const char *filename, int reverse)
{
	job* new_job = create_job(filename, reverse);
	/* Set the other fields of the job struct here... */
	/* Lock the mutex on the job queue before accessing it.*/
	pthread_mutex_lock (&job_queue_mutex);
	/* Place the new job at the head of the queue. */
	new_job->next = job_queue;
	job_queue = new_job;

	/* Post to the semaphore to indicate that another job is available.
	If threads are blocked, waiting on the semaphore, one will become
	unblocked so it can process the job. */
	sem_post (&job_queue_count);

	/* Unlock the job queue mutex. */
	pthread_mutex_unlock (&job_queue_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x14ce
movq %rax, %rbx
leaq 0x2c9b(%rip), %r14      # 0x40c8
movq %r14, %rdi
callq 0x1140
movq 0x2cb4(%rip), %rax      # 0x40f0
movq %rax, (%rbx)
movq %rbx, 0x2caa(%rip)      # 0x40f0
leaq 0x2cab(%rip), %rdi      # 0x40f8
callq 0x1080
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: create_job
job* create_job(const char *filename, int reverse){
	job *new_job = malloc(sizeof(job));

	new_job->next = NULL;
	new_job->filename = filename;
	new_job->reverse = reverse;

	return new_job;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x10d0
andq $0x0, (%rax)
movq %r14, 0x8(%rax)
movl %ebx, 0x10(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: process_job
void process_job(job* next_job){
	FILE *fp = fopen(next_job->filename, "r");
	int c, count = 0, i;
	int *array = NULL;

	for (c = getc(fp); c != EOF; c = getc(fp)) 
        if (c == '\n') 
            count = count + 1; 

	array = (int *)malloc(sizeof(int) * count);

	rewind(fp);

	for(i = 0; i < count; ++i)
		fscanf(fp,"%d", &array[i]);

	merge_sort(array, 0, count-1);

	fclose(fp);

	fp = fopen(next_job->filename, "w");

	if(next_job->reverse){
		for(i = count-1; i >= 0; --i)
			fprintf(fp, "%d\n", array[i]);		
	}else{
		for(i = 0; i < count; ++i)
			fprintf(fp, "%d\n", array[i]);
	}

	free(array);
	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movq 0x8(%rdi), %rdi
leaq 0xb56(%rip), %rsi       # 0x2068
callq 0x1100
movq %rax, %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x1130
cmpl $-0x1, %eax
je 0x1533
cmpl $0xa, %eax
jne 0x151c
incq %rbx
jmp 0x151c
movl %ebx, %edi
shlq $0x2, %rdi
callq 0x10d0
movq %rax, %r13
movq %r15, %rdi
callq 0x1070
leaq 0xb15(%rip), %r12       # 0x2065
movq %r13, -0x30(%rbp)
movq %rbx, %r14
subq $0x1, %r14
jb 0x1573
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1040
addq $0x4, %r13
jmp 0x1557
leal -0x1(%rbx), %r12d
movq -0x30(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
callq 0x1618
movq %r15, %rdi
callq 0x1060
movq -0x38(%rbp), %r13
movq 0x8(%r13), %rdi
leaq 0xac0(%rip), %rsi       # 0x205f
callq 0x1100
movq %rax, %r15
cmpl $0x0, 0x10(%r13)
je 0x15d6
leaq 0xaac(%rip), %r14       # 0x2061
testl %r12d, %r12d
js 0x15f9
movl %r12d, %eax
movq -0x30(%rbp), %rcx
movl (%rcx,%rax,4), %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x10a0
decl %r12d
jmp 0x15b5
leaq 0xa84(%rip), %r12       # 0x2061
subq $0x1, %rbx
jb 0x15f9
movl (%r14), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x10a0
addq $0x4, %r14
jmp 0x15dd
movq -0x30(%rbp), %rdi
callq 0x1030
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: merge_sort
void merge_sort(int *a, int low, int high) 
{ 
    // calculating mid point of array 
    int mid = low + (high - low) / 2; 
    if (low < high) { 
  
        // calling first half 
        merge_sort(a, low, mid); 
  
        // calling second half 
        merge_sort(a, mid + 1, high); 
  
        // merging the two halves 
        merge(a, low, mid, high); 
    } 
}

// Assembly:
movl %edx, %eax
subl %esi, %eax
jle 0x1677
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, %r12d
leal (%r12,%r14), %r13d
movl %r13d, %edx
callq 0x1618
leal (%r12,%r14), %esi
incl %esi
movq %r15, %rdi
movl %ebx, %edx
callq 0x1618
movq %r15, %rdi
movl %r14d, %esi
movl %r13d, %edx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1678
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: merge
void merge(int* a, int low, int mid, int high) 
{ 
    int* left = malloc(sizeof(int) * (mid - low + 1)); 
    int* right = malloc(sizeof(int) * (high - mid)); 
  
    // n1 is size of left part and n2 is size 
    // of right part 
    int n1 = mid - low + 1, n2 = high - mid, i, j; 
  
    // storing values in left part 
    for (i = 0; i < n1; i++) 
        left[i] = a[i + low]; 
  
    // storing values in right part 
    for (i = 0; i < n2; i++) 
        right[i] = a[i + mid + 1]; 
  
    int k = low; 
    i = j = 0; 
  
    // merge left and right in ascending order 
    while (i < n1 && j < n2) { 
        if (left[i] <= right[j]) 
            a[k++] = left[i++]; 
        else
            a[k++] = right[j++]; 
    } 
  
    // insert remaining values from left 
    while (i < n1) { 
        a[k++] = left[i++]; 
    } 
  
    // insert remaining values from right 
    while (j < n2) { 
        a[k++] = right[j++]; 
    }

    free(left);
    free(right); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movl %edx, %r14d
movl %esi, -0x2c(%rbp)
movq %rdi, -0x40(%rbp)
movl %edx, %r13d
subl %esi, %r13d
movslq %r13d, %r12
leaq 0x4(,%r12,4), %rdi
callq 0x10d0
movq %rax, %rbx
movl %r14d, -0x30(%rbp)
subl %r14d, %r15d
movslq %r15d, %rax
movq %rax, -0x38(%rbp)
leaq (,%rax,4), %rdi
callq 0x10d0
movq -0x40(%rbp), %rdi
movq %rax, %r14
movslq -0x2c(%rbp), %rax
leaq (%rdi,%rax,4), %rax
xorl %ecx, %ecx
cmpq %r12, %rcx
jg 0x16eb
movl (%rax,%rcx,4), %edx
movl %edx, (%rbx,%rcx,4)
incq %rcx
jmp 0x16db
movslq -0x30(%rbp), %rsi
xorl %ecx, %ecx
testl %r15d, %r15d
movl $0x0, %edx
cmovgl %r15d, %edx
leaq (%rdi,%rsi,4), %rsi
addq $0x4, %rsi
cmpq %rcx, %rdx
je 0x1716
movl (%rsi,%rcx,4), %edi
movl %edi, (%r14,%rcx,4)
incq %rcx
jmp 0x1705
xorl %edi, %edi
xorl %esi, %esi
movl %edi, %edx
movl %esi, %ecx
cmpl %r13d, %edi
jg 0x1751
cmpl %r15d, %esi
jge 0x1751
movl (%rbx,%rdx,4), %r8d
movl (%r14,%rcx,4), %ecx
xorl %r9d, %r9d
xorl %edi, %edi
cmpl %ecx, %r8d
setg %r9b
setle %dil
cmovll %r8d, %ecx
addl %edx, %edi
addl %r9d, %esi
movl %ecx, (%rax)
addq $0x4, %rax
jmp 0x171a
movq -0x38(%rbp), %rdi
cmpq %r12, %rdx
jg 0x1775
movl (%rbx,%rdx,4), %esi
incq %rdx
movl %esi, (%rax)
addq $0x4, %rax
jmp 0x1755
movl (%r14,%rcx,4), %edx
incq %rcx
movl %edx, (%rax)
addq $0x4, %rax
cmpq %rdi, %rcx
jl 0x1768
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/util/getline.c
// Function: getline
ssize_t getline(char **lineptr, size_t *n, FILE *stream) {
    size_t pos;
    int c;

    if (lineptr == NULL || stream == NULL || n == NULL) {
        errno = EINVAL;
        return -1;
    }

    c = getc(stream);
    if (c == EOF) {
        return -1;
    }

    if (*lineptr == NULL) {
        *lineptr = (char *) malloc(128);
        if (*lineptr == NULL) {
            return -1;
        }
        *n = 128;
    }

    pos = 0;
    while(c != EOF) {
        if (pos + 1 >= *n) {
            size_t new_size = *n + (*n >> 2);
            if (new_size < 128) {
                new_size = 128;
            }
            char *new_ptr = (char *) realloc(*lineptr, new_size);
            if (new_ptr == NULL) {
                return -1;
            }
            *n = new_size;
            *lineptr = new_ptr;
        }

        ((unsigned char *)(*lineptr))[pos ++] = c;
        if (c == '\n') {
            break;
        }
        c = getc(stream);
    }

    (*lineptr)[pos] = '\0';
    return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, -0x30(%rbp)
testq %rsi, %rsi
je 0x2655
movq %rdi, %r14
testq %rdi, %rdi
je 0x2655
movq %rdx, %r12
testq %rdx, %rdx
je 0x2655
movq %r12, %rdi
callq 0x20a0
movl %eax, %r15d
pushq $-0x1
popq %rax
cmpl $-0x1, %r15d
je 0x2673
movq (%r14), %rax
testq %rax, %rax
jne 0x25d3
movl $0x80, %edi
callq 0x22b0
movq %rax, (%r14)
testq %rax, %rax
je 0x2660
movq -0x30(%rbp), %rcx
movq $0x80, (%rcx)
xorl %r13d, %r13d
cmpl $-0x1, %r15d
je 0x266b
leaq 0x1(%r13), %rbx
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
cmpq %rcx, %rbx
jb 0x2638
movq %rbx, -0x38(%rbp)
movl %r15d, %ebx
movq %r12, %r15
movq %rcx, %r12
shrq $0x2, %r12
addq %rcx, %r12
cmpq $0x81, %r12
movl $0x80, %ecx
cmovbq %rcx, %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x23b0
testq %rax, %rax
je 0x2660
movq -0x30(%rbp), %rcx
movq %r12, (%rcx)
movq %rax, (%r14)
movq %r15, %r12
movl %ebx, %r15d
movq -0x38(%rbp), %rbx
movb %r15b, (%rax,%r13)
cmpl $0xa, %r15d
je 0x2665
movq %r12, %rdi
callq 0x20a0
movl %eax, %r15d
movq (%r14), %rax
movq %rbx, %r13
jmp 0x25d6
callq 0x2040
movl $0x16, (%rax)
pushq $-0x1
popq %rax
jmp 0x2673
movq (%r14), %rax
incq %r13
movb $0x0, (%rax,%r13)
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/util/debug.cpp
// Function: fog_debug_log(char const*, _IO_FILE*, char const*, int, char const*, char const*, ...)
void _fog_debug_log(const char* type, FILE* stream, const char* file,
                    int line, const char *func, const char* fmt, ...) {
    // TODO(ed): Log file with timestamps?
    va_list args;
    va_start(args, fmt);
#ifdef VIM_JUMP_TO
    fprintf(stream, "%s|%d| (%s) [%s]: ", file, line, func, type);
#else
    fprintf(stream, "%s @ %d (%s) [%s]:\n-- ", file, line, func, type);
#endif
    vfprintf(stream, fmt, args);
    va_end(args);
    fprintf(stream, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %r9, %r14
movq %rsi, %rbx
movq %rdi, %r9
testb %al, %al
je 0x26c8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0xe0(%rbp), %rax
leaq -0x30(%rbp), %r15
movq %rax, 0x10(%r15)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000030, %rax     # imm = 0x3000000030
movq %rax, (%r15)
leaq 0x1115d(%rip), %rsi     # 0x13850
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2310
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x22c0
pushq $0xa
popq %rdi
movq %rbx, %rsi
callq 0x2280
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: create_skew_symmetric(Vec3)
Mat4 create_skew_symmetric(Vec3 v) {
    Mat4 m;
    m._00 = m._11 = m._22 = m._33 = 0.0f;
    m._10 = v.z;
    m._01 = -v.z;
    m._02 = v.y;
    m._20 = -v.y;
    m._13 = v.z;
    m._31 = -v.z;
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
andl $0x0, 0x3c(%rdi)
andl $0x0, 0x28(%rdi)
andl $0x0, 0x14(%rdi)
andl $0x0, (%rdi)
movss %xmm1, 0x10(%rdi)
movaps 0xfdd2(%rip), %xmm2     # 0x13040
movaps %xmm1, %xmm3
xorps %xmm2, %xmm3
movss %xmm3, 0x4(%rdi)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x8(%rdi)
xorps %xmm2, %xmm0
movss %xmm0, 0x20(%rdi)
movss %xmm1, 0x1c(%rdi)
movss %xmm3, 0x34(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: zero_transform(Mat4)
Mat4 zero_transform(Mat4 m) {
    m._03 = 0.0f;
    m._13 = 0.0f;
    m._23 = 0.0f;
    m._33 = 1.0f;
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0x1c(%rbp)
andl $0x0, 0x2c(%rbp)
andl $0x0, 0x3c(%rbp)
movq %rdi, %rax
movl $0x3f800000, 0x4c(%rbp) # imm = 0x3F800000
movaps 0x10(%rbp), %xmm0
movups %xmm0, (%rdi)
movaps 0x20(%rbp), %xmm0
movups %xmm0, 0x10(%rdi)
movaps 0x30(%rbp), %xmm0
movups %xmm0, 0x20(%rdi)
movq 0x40(%rbp), %rcx
movq %rcx, 0x30(%rdi)
movl 0x48(%rbp), %ecx
movl %ecx, 0x38(%rdi)
movl 0x4c(%rbp), %ecx
movl %ecx, 0x3c(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: create_perspective_projection(float, float, float, float)
Mat4 create_perspective_projection(real fov, real aspect_ratio, real near_clip,
                                   real far_clip) {
    real w = tan(fov / 2.0f);

    Mat4 m = {};
    m._00 = 1.0f / (aspect_ratio * w);
    m._11 = 1.0f / w;
    m._22 = -(far_clip + near_clip) / (far_clip - near_clip);
    m._32 = -1.0f;
    m._23 = -(2.0f * far_clip * near_clip) / (far_clip - near_clip);
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movss %xmm3, -0x14(%rbp)
movss %xmm2, -0x10(%rbp)
movss %xmm1, -0xc(%rbp)
movq %rdi, %rbx
mulss 0xfd0c(%rip), %xmm0     # 0x1300c
callq 0x2320
xorps %xmm1, %xmm1
movups %xmm1, 0x14(%rbx)
movups %xmm1, 0x24(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm1, 0x4(%rbx)
movss -0xc(%rbp), %xmm3
mulss %xmm0, %xmm3
movss 0xfcdb(%rip), %xmm1     # 0x13004
movaps %xmm1, %xmm2
divss %xmm3, %xmm2
movss %xmm2, (%rbx)
divss %xmm0, %xmm1
movss -0x10(%rbp), %xmm3
movaps %xmm3, %xmm0
movss -0x14(%rbp), %xmm2
addss %xmm2, %xmm0
xorps 0xfcf0(%rip), %xmm0     # 0x13040
movss %xmm1, 0x14(%rbx)
movaps %xmm2, %xmm1
subss %xmm3, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x28(%rbx)
movl $0xbf800000, 0x38(%rbx) # imm = 0xBF800000
mulss 0xfc9c(%rip), %xmm2     # 0x13010
mulss %xmm3, %xmm2
divss %xmm1, %xmm2
movss %xmm2, 0x2c(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: transpose(Mat4)
Mat4 transpose(Mat4 m) {
    Mat4 t = {};

    for (u8 i = 0; i < 4; i++)
        for (u8 j = 0; j < 4; j++) t._[i][j] = m._[j][i];

    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
leaq 0x10(%rbp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %edx, %edx
movq %rdi, %rsi
cmpq $0x4, %rdx
je 0x33d8
xorl %edi, %edi
cmpq $0x10, %rdi
je 0x33cb
movss (%rcx,%rdi,4), %xmm0
movss %xmm0, (%rsi,%rdi)
addq $0x4, %rdi
jmp 0x33b5
incq %rdx
addq $0x4, %rcx
addq $0x10, %rsi
jmp 0x33ad
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/block_math.h
// Function: std_progress_func_vec4(Vec4, float, Vec4, float, float)
Vec4 std_progress_func_vec4(Vec4 start_value, f32 start_slope, Vec4 end_value, f32 end_slope, f32 progress) {
    f32 p = -2 + start_slope + end_slope;
    f32 q = -(-3 + 2 * start_slope + end_slope);
    f32 y = p * pow(progress, 3) + q * pow(progress, 2) + start_slope*progress;
    return LERP(start_value, end_value, y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movss %xmm6, -0x8(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm3, -0x50(%rbp)
movaps %xmm1, -0x40(%rbp)
movaps %xmm0, -0x30(%rbp)
movss 0xf04e(%rip), %xmm0     # 0x13010
movss %xmm2, -0xc(%rbp)
addss %xmm2, %xmm0
addss %xmm2, %xmm2
addss 0xf03d(%rip), %xmm2     # 0x13014
addss %xmm5, %xmm0
addss %xmm5, %xmm2
movss %xmm2, -0x4(%rbp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
cvtss2sd %xmm6, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0xf192(%rip), %xmm1     # 0x13190
callq 0x23c0
cvtss2sd -0x4(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm2
mulsd -0x20(%rbp), %xmm0
subsd %xmm2, %xmm0
movss -0xc(%rbp), %xmm1
mulss -0x8(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm2
movss 0xefc8(%rip), %xmm0     # 0x13004
subss %xmm2, %xmm0
movaps -0x30(%rbp), %xmm3
movaps %xmm3, %xmm1
mulss %xmm0, %xmm1
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
mulss %xmm0, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movaps -0x40(%rbp), %xmm4
movaps %xmm4, %xmm3
mulss %xmm0, %xmm3
shufps $0x55, %xmm4, %xmm4     # xmm4 = xmm4[1,1,1,1]
mulss %xmm0, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
movlhps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
leaq -0x70(%rbp), %rdi
movups %xmm1, (%rdi)
movaps -0x50(%rbp), %xmm1
movaps %xmm1, %xmm0
mulss %xmm2, %xmm0
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps -0x60(%rbp), %xmm3
movaps %xmm3, %xmm1
mulss %xmm2, %xmm1
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
mulss %xmm2, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
callq 0x10b28
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/block_math.h
// Function: binomial(unsigned int, unsigned int)
u32 binomial(u32 n, u32 k) {
    u32 res = 1;

    // k and n-k have the same binomial coeff so only calculate the "shorter"
    if (k > n - k)
        k = n - k;

    for (u32 i = 0; i < k; i++) {
        res *= (n - i);
        res /= (i + 1);
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %ecx
subl %esi, %ecx
cmpl %esi, %ecx
cmovael %esi, %ecx
negl %ecx
movl $0x1, %esi
movl %esi, %eax
leal (%rcx,%rsi), %edx
cmpl $0x1, %edx
je 0x40d8
imull %edi, %eax
xorl %edx, %edx
divl %esi
incl %esi
decl %edi
jmp 0x40c3
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/random.cpp
// Function: random_seed(unsigned int)
void random_seed(u32 seed) {
    // Generated random numbers from random.org.
    //
    // This makes it deterministic, which you might
    // not want.
    random_state.a = 398973565 ^ seed;
    random_state.b = 141307319 ^ seed;
    random_state.c =  15804145 ^ seed;
    random_state.d = 296129167 ^ seed;
    random_state.counter = 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
xorl $0x17c7da7d, %eax       # imm = 0x17C7DA7D
movl %eax, 0x16185(%rip)     # 0x1a270
movl %edi, %eax
xorl $0x86c2db7, %eax        # imm = 0x86C2DB7
movl %eax, 0x1617c(%rip)     # 0x1a274
movl %edi, %eax
xorl $0xf126f1, %eax         # imm = 0xF126F1
movl %eax, 0x16173(%rip)     # 0x1a278
xorl $0x11a6928f, %edi       # imm = 0x11A6928F
movl %edi, 0x1616b(%rip)     # 0x1a27c
movl $0x64, 0x16165(%rip)    # 0x1a280
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/random.cpp
// Function: xorwow()
u32 xorwow() {
    // Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs"
    // Stolen straight from Wikipedia.
    u32 t = random_state.d;

    u32 s = random_state.a;
    random_state.d = random_state.c;
    random_state.c = random_state.b;
    random_state.b = s;

    t ^= t >> 2;
    t ^= t << 1;
    t ^= s ^ (s << 4);
    random_state.a = t;

    random_state.counter += 362437;
    return t + random_state.counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x16155(%rip), %eax     # 0x1a27c
movl 0x16143(%rip), %ecx     # 0x1a270
movq 0x16140(%rip), %rdx     # 0x1a274
movq %rdx, 0x1613d(%rip)     # 0x1a278
movl %ecx, 0x16133(%rip)     # 0x1a274
movl %eax, %edx
shrl $0x2, %edx
xorl %eax, %edx
movl %ecx, %eax
shll $0x4, %eax
xorl %ecx, %eax
xorl %edx, %eax
addl %edx, %edx
xorl %eax, %edx
movl %edx, 0x16115(%rip)     # 0x1a270
movl 0x1611f(%rip), %eax     # 0x1a280
leal 0x587c5(%rax), %ecx
movl %ecx, 0x16113(%rip)     # 0x1a280
addl %edx, %eax
addl $0x587c5, %eax          # imm = 0x587C5
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/random.cpp
// Function: random_unit_vec2()
Vec2 random_unit_vec2() {
    Vec2 out;
    while (true) {
        out = {random_real(-1, 1), random_real(-1, 1)};
        f32 sq = length_squared(out);
        if (sq > 1.0 || sq == 0.0)
            continue;
        return normalize(out);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movss 0xee3c(%rip), %xmm0     # 0x13020
movss 0xee18(%rip), %xmm1     # 0x13004
callq 0x4192
movaps %xmm0, -0x10(%rbp)
movss 0xee23(%rip), %xmm0     # 0x13020
movss 0xedff(%rip), %xmm1     # 0x13004
callq 0x4192
movaps -0x10(%rbp), %xmm3
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movaps %xmm3, %xmm1
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
ucomiss 0xeddd(%rip), %xmm1     # 0x13004
ja 0x41dc
ucomiss 0xedf4(%rip), %xmm1     # 0x13024
jne 0x4234
jnp 0x41dc
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
movaps %xmm3, %xmm0
addq $0x10, %rsp
popq %rbp
jmp 0x285d
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/math/random.cpp
// Function: random_unit_vec3()
Vec3 random_unit_vec3() {
    Vec3 out;
    while (true) {
        out = {random_real(-1, 1), random_real(-1, 1), random_real(-1, 1)};
        f32 sq = length_squared(out);
        if (sq > 1.0 || sq == 0.0)
            continue;
        return normalize(out);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movss 0xedcc(%rip), %xmm0     # 0x13020
movss 0xeda8(%rip), %xmm1     # 0x13004
callq 0x4192
movaps %xmm0, -0x20(%rbp)
movss 0xedb3(%rip), %xmm0     # 0x13020
movss 0xed8f(%rip), %xmm1     # 0x13004
callq 0x4192
movaps %xmm0, -0x10(%rbp)
movss 0xed9a(%rip), %xmm0     # 0x13020
movss 0xed76(%rip), %xmm1     # 0x13004
callq 0x4192
movaps -0x10(%rbp), %xmm4
movaps -0x20(%rbp), %xmm3
movaps %xmm0, %xmm1
movaps %xmm4, %xmm0
mulss %xmm4, %xmm0
movaps %xmm3, %xmm2
mulss %xmm3, %xmm2
addss %xmm0, %xmm2
movaps %xmm1, %xmm0
mulss %xmm1, %xmm0
addss %xmm2, %xmm0
ucomiss 0xed42(%rip), %xmm0     # 0x13004
ja 0x424c
ucomiss 0xed59(%rip), %xmm0     # 0x13024
jne 0x42d3
jnp 0x424c
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
movaps %xmm3, %xmm0
addq $0x20, %rsp
popq %rbp
jmp 0x2a86
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/asset/asset.h
// Function: Asset::asset_hash(char const*)
u64 asset_hash(const char *str) {
    // This number is pretty arbitrary, it's prime and that's nice.
    u64 hash = 5351;
    while (*str) {
        char c = (*str++);
        hash = hash * c + c;
    }
    return hash % 0x0FFFFFFF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x14e7, %eax           # imm = 0x14E7
movsbq (%rdi), %rcx
testq %rcx, %rcx
je 0x4301
incq %rdi
incq %rax
imulq %rcx, %rax
jmp 0x42ec
movl $0xfffffff, %ecx        # imm = 0xFFFFFFF
xorl %edx, %edx
divq %rcx
movq %rdx, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: get_asset_header(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, Asset::Type)
Asset::Header get_asset_header(const std::string *path, Asset::Type type) {
    char *file_path = (char *) malloc(path->size() * sizeof(path[0]));
    const char *from = path->c_str();
    char *to = file_path;
    while (*from) *(to++) = *(from++);
    *(to++) = *(from++);
    // struct stat buffer;
    // if (stat(file_path, &buffer) == -1) return {};

    return {type,
            file_path,
            path->size() + 1,
            0,  // buffer.st_mtime,
            0,  //(u32) buffer.st_size,
            0,
            Asset::ASSET_ID_NO_ASSET};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %r12
movq %r12, %rdi
shlq $0x5, %rdi
callq 0x22b0
movq (%r15), %rdx
xorl %ecx, %ecx
movb (%rdx,%rcx), %sil
testb %sil, %sil
je 0x61b2
movb %sil, (%rax,%rcx)
incq %rcx
jmp 0x61a0
movb $0x0, (%rax,%rcx)
movl %r14d, (%rbx)
movq %rax, 0x8(%rbx)
incq %r12
movq %r12, 0x10(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x28(%rbx)
movups %xmm0, 0x18(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x30(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: add_asset_to_file(AssetFile*, Asset::Header*, Asset::Data*)
void add_asset_to_file(AssetFile *file, Asset::Header *header, Asset::Data *asset) {
    assert(header);
    assert(asset);
    header->asset_id = file->asset_headers.size();

    file->header.number_of_assets++;
    file->header.size_of_strings += header->file_path_length;
    file->header.size_of_headers += sizeof(Asset::Header);
    file->header.size_of_data += header->asset_size;

    file->asset_headers.push_back(*header);
    file->assets.push_back(*asset);
    assert(file->asset_headers.size() == file->assets.size());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x627a
movq %rdx, %r14
testq %rdx, %rdx
je 0x6293
movq %rdi, %rbx
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
pushq $0x38
popq %r15
cqto
idivq %r15
movl %eax, 0x34(%rsi)
incq (%rdi)
movq 0x10(%rsi), %rax
addq %rax, 0x10(%rdi)
addq $0x20, %rdi
addq $0x38, 0x8(%rbx)
movl 0x30(%rsi), %eax
addq %rax, 0x18(%rbx)
callq 0x10c1c
leaq (%rbx,%r15), %rdi
movq %r14, %rsi
callq 0x10c58
movq 0x28(%rbx), %rax
movq 0x40(%rbx), %rcx
subq 0x20(%rbx), %rax
cqto
idivq %r15
movq %rax, %rsi
subq 0x38(%rbx), %rcx
pushq $0x30
popq %rdi
movq %rcx, %rax
cqto
idivq %rdi
cmpq %rax, %rsi
jne 0x62ac
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdb17(%rip), %rdi      # 0x13d98
leaq 0xd60c(%rip), %rsi      # 0x13894
leaq 0xd620(%rip), %rcx      # 0x138af
pushq $0x57
jmp 0x62c3
leaq 0xd659(%rip), %rdi      # 0x138f3
leaq 0xd5f3(%rip), %rsi      # 0x13894
leaq 0xd607(%rip), %rcx      # 0x138af
pushq $0x58
jmp 0x62c3
leaq 0xd646(%rip), %rdi      # 0x138f9
leaq 0xd5da(%rip), %rsi      # 0x13894
leaq 0xd5ee(%rip), %rcx      # 0x138af
pushq $0x62
popq %rdx
callq 0x2140