LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::getQuantile(double)
double QDigest::getQuantile(double fraction)
{
  // throw exception if fraction < 0 || fraction > 1 ??
  std::vector<long*> ranges = toAscRanges();
  long sum = 0;
  for (int i = 0; i < ranges.size(); i++)
  {
    if (sum > fraction * size)
      return clamp(ranges[i][1]);
    sum += ranges[i][2];
  }
  double value = ranges[ranges.size() - 1][1];
  delete_ranges(ranges);
  return clamp(value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, -0x20(%rbp)
movq %rdi, %rbx
leaq -0x50(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34f6
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq %rcx, %rsi
subq %rax, %rsi
subq %rax, %rcx
setne %dl
je 0x3426
sarq $0x3, %rsi
xorps %xmm0, %xmm0
cvtsi2sdq 0x40(%rbx), %xmm0
cmpq $0x1, %rsi
movq %rsi, %r8
adcq $0x0, %r8
mulsd -0x20(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x33ca
xorl %edi, %edi
jmp 0x33f5
decq %r8
xorl %edx, %edx
xorl %edi, %edi
cmpq %rdi, %r8
je 0x341d
movq (%rax,%rdi,8), %r9
addq 0x10(%r9), %rdx
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
incq %rdi
ucomisd %xmm0, %xmm1
jbe 0x33d1
cmpq %rdi, %rsi
seta %dl
movq (%rax,%rdi,8), %rsi
movq 0x8(%rsi), %rsi
movq 0x50(%rbx), %rdi
movq 0x58(%rbx), %r8
cmpq %rsi, %r8
cmovgeq %rsi, %r8
cmpq %rsi, %rdi
cmovgq %rdi, %r8
xorps %xmm0, %xmm0
cvtsi2sd %r8, %xmm0
jmp 0x3426
incq %rdi
cmpq %rdi, %rsi
seta %dl
testb %dl, %dl
jne 0x34b9
movq -0x8(%rax,%rcx), %rax
movq 0x8(%rax), %r14
leaq -0x38(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x6924
movq -0x38(%rbp), %rax
cmpq %rax, -0x30(%rbp)
je 0x3476
xorl %r15d, %r15d
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x345f
callq 0x2260
incq %r15
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
ja 0x3451
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x3496
movsd %xmm0, -0x20(%rbp)
callq 0x21f0
movsd -0x20(%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq 0x50(%rbx), %rcx
movq 0x58(%rbx), %rdx
cmpq %rax, %rdx
cmovgeq %rax, %rdx
cmpq %rax, %rcx
cmovgq %rcx, %rdx
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x34d1
movsd %xmm0, -0x20(%rbp)
callq 0x21f0
movsd -0x20(%rbp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x34ed
callq 0x21f0
movq %rbx, %rdi
callq 0x2360
nop
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::toAscRanges()
std::vector<long*> QDigest::toAscRanges()
{
  std::vector<long*> ranges;
  for (std::unordered_map<long, long>::const_iterator i = node2count.begin(); i != node2count.end(); i++)
  {
    long *next_range = new long[3];
    next_range[0] = rangeLeft(i->first);
    next_range[1] = rangeRight(i->first);
    next_range[2] = i->second;
    ranges.push_back(next_range);
  }
 std::sort(ranges.begin(), ranges.end(), compare_ranges);
 return ranges;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x18(%rsi), %r12
testq %r12, %r12
je 0x3597
movq %rsi, %r14
leaq -0x28(%rbp), %r15
movl $0x18, %edi
callq 0x2030
movq %rax, -0x28(%rbp)
movq 0x8(%r12), %rdx
movq 0x48(%r14), %rcx
movq %rdx, %rsi
addq %rdx, %rdx
subq %rcx, %rsi
jl 0x353d
movq %rsi, (%rax)
movq 0x8(%r12), %rdx
cmpq %rdx, %rcx
jle 0x355f
leaq 0x1(,%rdx,2), %rdx
jmp 0x3550
subq %rcx, %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%r12), %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3583
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x358e
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7e36
movq (%r12), %r12
testq %r12, %r12
jne 0x3526
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x35de
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq 0x879(%rip), %rcx       # 0x3e3a
movq %r14, %rdi
movq %r15, %rsi
callq 0x7f52
leaq 0x867(%rip), %rdx       # 0x3e3a
movq %r14, %rdi
movq %r15, %rsi
callq 0x807d
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x35f0
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3600
callq 0x21f0
movq %r14, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::highestOneBit(long)
int QDigest::highestOneBit(long value)
{
  if (!value)
    return 0;
  int ret = 1;
  while (value >>= 1)
    ret <<= 1;
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x385f
movl $0x1, %eax
cmpq $0x1, %rsi
je 0x3861
sarq %rsi
addl %eax, %eax
cmpq $0x2, %rsi
jae 0x3852
jmp 0x3861
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::compressFully()
void QDigest::compressFully()
{
  std::vector<long> keys;
  keys.reserve(node2count.size());
  for (std::unordered_map<long, long>::const_iterator i = node2count.begin(); i != node2count.end(); i++)
    keys.push_back(i->first);

  for (std::vector<long>::const_iterator i = keys.begin(); i != keys.end(); i++)
  {
    if (!isRoot(*i))
      compressDownward(*i);  
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x20(%rbx), %rsi
callq 0x69a4
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x3b38
leaq -0x30(%rbp), %r14
leaq 0x8(%r15), %rdx
movq -0x28(%rbp), %rsi
cmpq -0x20(%rbp), %rsi
je 0x3b28
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x28(%rbp)
jmp 0x3b30
movq %r14, %rdi
callq 0x788c
movq (%r15), %r15
testq %r15, %r15
jne 0x3b0a
movq -0x30(%rbp), %r14
cmpq -0x28(%rbp), %r14
je 0x3b59
movq (%r14), %rsi
cmpq $0x1, %rsi
je 0x3b53
movq %rbx, %rdi
callq 0x3b90
addq $0x8, %r14
jmp 0x3b3c
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x3b67
callq 0x21f0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3b76
jmp 0x3b76
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x3b87
callq 0x21f0
movq %rbx, %rdi
callq 0x2360
nop
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::compare_ranges(long*, long*)
bool QDigest::compare_ranges(long a[3], long b[3])
{
  long rightA = a[1], rightB = b[1], sizeA = a[1] - a[0], sizeB = b[1] - b[0];
  if (rightA < rightB)
    return 1;
  else if (rightA > rightB)
    return 0;
  else if (sizeA < sizeB)
    return 1;
  else if (sizeA > sizeB)
    return 0;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
movq 0x8(%rsi), %rdx
movb $0x1, %al
cmpq %rdx, %rcx
jl 0x3e67
movq %rdx, %rax
subq (%rsi), %rax
movq %rcx, %rsi
subq (%rdi), %rsi
cmpq %rdx, %rcx
setle %cl
cmpq %rax, %rsi
setl %al
andb %cl, %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/Chi_Square_Distribution.cpp
// Function: gser(double, double)
void gser(  double a, double x )
{
	int n, ITMAX=100;
	double sum, del, ap, eps = 3.0e-7;
	gln = gammln( a );
	if( x <= 0.0 )
	{
		if( x < 0.0 )
		{
			printf( "x less than 0 in routine gser" );
			exit( 1 );
		}
		gamser = 0.0;
		return;
	}
	else
	{
		ap = a;
		del = sum = 1.0 / a;

		for( n = 1; n <= ITMAX; n++ )
		{
			++ap;
			del *= x / ap;
			sum += del;
			if( fabs( del ) < fabs( sum ) * eps)
			{
				gamser = sum * exp( -x + a * log( x ) - gln );
				return;
			}
		}
		printf( "Error:a too large, ITMAX too small in routine gser" );
		exit( 1 );
	}
	return;
//	returns the incomplete gamma function P(a,x) evaluated by its series reprentation
//  as gamser, also returns ln(gamma(a) as gln;
//  the incomplete gamma function P(a,x) is efined:
//		P(a,x) = 1/gamma(a)* integral(0,x) exp(-t)t^(a-1) dt (a>0);
//	it has the limiting values P(a,0)=0 and P(a,infinity)=1;
//  it relates many cumulative probability functions, such as chi-square;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd %xmm1, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
callq 0x3f69
movsd -0x10(%rbp), %xmm7
movsd %xmm0, 0x938b(%rip)     # 0xd218
xorpd %xmm1, %xmm1
ucomisd %xmm7, %xmm1
jae 0x3f21
movsd 0x5165(%rip), %xmm0     # 0x9008
movapd %xmm0, %xmm3
movsd -0x8(%rbp), %xmm9
divsd %xmm9, %xmm3
movl $0x64, %eax
movapd 0x5301(%rip), %xmm1     # 0x91c0
movsd 0x5161(%rip), %xmm2     # 0x9028
movapd %xmm9, %xmm4
movapd %xmm3, %xmm8
movapd %xmm3, %xmm5
addsd %xmm0, %xmm4
movapd %xmm7, %xmm3
divsd %xmm4, %xmm3
mulsd %xmm5, %xmm3
addsd %xmm3, %xmm8
movapd %xmm3, %xmm5
andpd %xmm1, %xmm5
movapd %xmm8, %xmm6
andpd %xmm1, %xmm6
mulsd %xmm2, %xmm6
ucomisd %xmm5, %xmm6
ja 0x3f2c
decl %eax
jne 0x3ed1
leaq 0x53b4(%rip), %rdi      # 0x92c4
xorl %eax, %eax
callq 0x2050
movl $0x1, %edi
callq 0x2240
jbe 0x3f5b
leaq 0x537c(%rip), %rdi      # 0x92a6
jmp 0x3f10
movapd %xmm7, %xmm0
movapd %xmm8, -0x20(%rbp)
callq 0x21a0
mulsd -0x8(%rbp), %xmm0
subsd -0x10(%rbp), %xmm0
subsd 0x92cb(%rip), %xmm0     # 0xd218
callq 0x2380
movapd -0x20(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x92bd(%rip)     # 0xd220
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/Chi_Square_Distribution.cpp
// Function: gammln(double)
double gammln( double xx )
{
	double x, y, tmp, ser;
	static double cof[6]={76.18009172947146,-86.50532032941677,24.01409824083091,
		-1.231739572450155,0.1208650973866179e-2,-0.5395239384953e-5};
	int j;
	
	y = x = xx;
	tmp = x + 5.5;
	tmp -= ( x + 0.5 ) * log( tmp );
	ser = 1.000000000190015;
	for( j = 0; j < 6; j++ )
		ser += cof[ j ] / ++y;
	return( -tmp + log( 2.5066282746310005 * ser / x ) );
//	Returns the logarithmic value of gamma function of xx for xx>0;
//  the gamma function is defined by the intergral:
// 		gamma(z)=inter(0,infinity) t^(z-1)epx(-t)dt;
//  n!=gamma(n+1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movapd %xmm0, %xmm1
movsd %xmm0, -0x10(%rbp)
movsd 0x50ae(%rip), %xmm0     # 0x9030
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
callq 0x21a0
movsd -0x10(%rbp), %xmm5
movapd %xmm0, %xmm1
movsd 0x5097(%rip), %xmm0     # 0x9038
xorl %eax, %eax
leaq 0x5266(%rip), %rcx      # 0x9210
movsd 0x5056(%rip), %xmm2     # 0x9008
movapd %xmm5, %xmm3
movsd (%rax,%rcx), %xmm4
addsd %xmm2, %xmm3
divsd %xmm3, %xmm4
addsd %xmm4, %xmm0
addq $0x8, %rax
cmpq $0x30, %rax
jne 0x3fb6
movsd 0x5067(%rip), %xmm2     # 0x9040
addsd %xmm5, %xmm2
mulsd %xmm1, %xmm2
movsd -0x8(%rbp), %xmm1
subsd %xmm2, %xmm1
movsd %xmm1, -0x8(%rbp)
mulsd 0x5051(%rip), %xmm0     # 0x9048
divsd %xmm5, %xmm0
callq 0x21a0
subsd -0x8(%rbp), %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/Chi_Square_Distribution.cpp
// Function: gammp(double, double)
double gammp( double a, double x )
{

	// x = chisquare, a = df/2
	if( x < 0.0 || a <= 0.0 )
	{
		printf( "error: invalid arguments in routine gammp" );
		exit( 1 );
	}
	if( x < ( a + 1.0 ) )
	{
		gser( a, x );
		return( gamser );
	}
	else
	{
		gcf( a, x );
		return( 1.0 - gammcf );
	}
//	returns the incomplete gamma function P(a,x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
jae 0x4057
ucomisd %xmm1, %xmm2
ja 0x4057
movsd 0x4fe1(%rip), %xmm2     # 0x9008
addsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jbe 0x4040
callq 0x3e69
movsd 0x91e2(%rip), %xmm0     # 0xd220
jmp 0x4055
callq 0x406f
movsd 0x4fbb(%rip), %xmm0     # 0x9008
subsd 0x91d3(%rip), %xmm0     # 0xd228
popq %rbp
retq
leaq 0x5299(%rip), %rdi      # 0x92f7
xorl %eax, %eax
callq 0x2050
movl $0x1, %edi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/Chi_Square_Distribution.cpp
// Function: gcf(double, double)
void gcf(  double a, double x )
{
	int i, ITMAX=100;
	double an, b, c, d, del, h, eps = 3.0e-7, fpmin = 1.0e-30;
	gln = gammln( a );
	b = x + 1.0 - a;
	c = 1.0 / fpmin;
	d = 1.0 / b;
	h = d;
	for( i = 1; i < ITMAX; i++ )
	{
		
		an = -i * ( i-a );
		b += 2.0;
		d = an * d + b;
		if( fabs( d ) < fpmin )
			d = fpmin;
		c = b + an / c;
		if( fabs( c ) < fpmin )
			c = fpmin;
		d = 1.0 / d;
		del = d * c;
		h *= del;
		if( fabs( del-1.0 ) < eps )
			break;
	}
	if( i > ITMAX )
	{
		printf( "Error:a too large, ITMAX too small in routine gser" );
		exit( 1 );
	}
	gammcf = exp( -x + a * log( x ) - gln ) * h;
//	returns the incomplete gamma function P(a,x) evaluated by its continued fraction
//	reprentation as gammcf, also returns ln(gamma(a) as gln;
//  the definition of incomplete function P(a,x) can see routine gser();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd %xmm1, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
callq 0x3f69
movsd -0x10(%rbp), %xmm14
movsd %xmm0, 0x9184(%rip)     # 0xd218
movsd 0x4f6c(%rip), %xmm0     # 0x9008
movsd -0x8(%rbp), %xmm1
movapd %xmm1, %xmm13
addsd %xmm0, %xmm1
subsd %xmm14, %xmm1
movapd %xmm0, %xmm15
divsd %xmm1, %xmm15
movsd 0x4f8f(%rip), %xmm2     # 0x9050
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movsd 0x4f85(%rip), %xmm3     # 0x9058
movapd 0x50e5(%rip), %xmm4     # 0x91c0
movsd 0x4f7d(%rip), %xmm5     # 0x9060
movsd 0x4f65(%rip), %xmm6     # 0x9050
movsd 0x4f25(%rip), %xmm7     # 0x9018
movsd 0x4f2c(%rip), %xmm8     # 0x9028
movapd %xmm15, %xmm9
xorps %xmm10, %xmm10
cvtsi2sd %ecx, %xmm10
xorps %xmm11, %xmm11
cvtsi2sd %eax, %xmm11
subsd %xmm14, %xmm11
mulsd %xmm10, %xmm11
addsd %xmm3, %xmm1
mulsd %xmm11, %xmm9
addsd %xmm1, %xmm9
movapd %xmm0, %xmm10
divsd %xmm9, %xmm10
andpd %xmm4, %xmm9
divsd %xmm2, %xmm11
addsd %xmm1, %xmm11
movapd %xmm11, %xmm2
andpd %xmm4, %xmm2
cmpltsd %xmm5, %xmm2
movapd %xmm2, %xmm12
andnpd %xmm11, %xmm12
andpd %xmm5, %xmm2
orpd %xmm12, %xmm2
cmpltsd %xmm5, %xmm9
movapd %xmm9, %xmm11
andnpd %xmm10, %xmm11
andpd %xmm6, %xmm9
orpd %xmm11, %xmm9
movapd %xmm9, %xmm10
mulsd %xmm2, %xmm10
mulsd %xmm10, %xmm15
addsd %xmm7, %xmm10
andpd %xmm4, %xmm10
ucomisd %xmm10, %xmm8
ja 0x41b1
incl %eax
decl %ecx
cmpl $-0x64, %ecx
jne 0x4101
movl $0x64, %eax
movsd %xmm15, -0x18(%rbp)
cmpl $0x65, %eax
jae 0x41f4
movapd %xmm13, %xmm0
callq 0x21a0
mulsd -0x10(%rbp), %xmm0
subsd -0x8(%rbp), %xmm0
subsd 0x9040(%rip), %xmm0     # 0xd218
callq 0x2380
movsd -0x18(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x903a(%rip)     # 0xd228
addq $0x20, %rsp
popq %rbp
retq
leaq 0x50c9(%rip), %rdi      # 0x92c4
xorl %eax, %eax
callq 0x2050
movl $0x1, %edi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/ChiSquareContinuous.cpp
// Function: ChiSquareContinuous::ChiSquareContinuous(double, int)
ChiSquareContinuous::ChiSquareContinuous(double memory_,int num)
{
  chi_squared = 0;
  upper_bins = new double;
  lower_bins = new double;
  memory = memory_;
  switch(num)
  {
  case 1: 
    memory = memory_/3;
    quantile_sketch = new GK(memory);
    break;
  case 2:
    quantile_sketch = new QDigestDouble(memory);
    break;
  case 3: 
    quantile_sketch = new ReservoirSampling((int)memory);
    break;
  default:
    throw IndexError();
  }	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %r14d
movsd %xmm0, -0x18(%rbp)
movq %rdi, %rbx
movq $0x0, (%rdi)
movl $0x8, %edi
callq 0x2220
movq %rax, 0x10(%rbx)
movl $0x8, %edi
callq 0x2220
movq %rax, 0x18(%rbx)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x8(%rbx)
cmpl $0x3, %r14d
je 0x47ce
cmpl $0x2, %r14d
je 0x4747
cmpl $0x1, %r14d
jne 0x4823
movsd -0x18(%rbp), %xmm0
divsd 0x4902(%rip), %xmm0     # 0x9020
movsd %xmm0, -0x18(%rbp)
movsd %xmm0, 0x8(%rbx)
movl $0x30, %edi
callq 0x2220
movq %rax, %r14
cvttsd2si -0x18(%rbp), %esi
movq %rax, %rdi
callq 0x29e6
jmp 0x4816
movl $0x80, %edi
callq 0x2220
movq %rax, %r14
addq $0x38, %rax
movq %rax, 0x8(%r14)
movl $0x1, %eax
movq %rax, 0x10(%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x18(%r14)
movl $0x3f800000, 0x28(%r14) # imm = 0x3F800000
movupd %xmm0, 0x30(%r14)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x60(%r14)
movq %rax, 0x48(%r14)
xorl %eax, %eax
movq %rax, 0x40(%r14)
movq %rax, 0x68(%r14)
movq $0x3b9aca00, 0x50(%r14) # imm = 0x3B9ACA00
movq $-0x3b9aca00, 0x58(%r14) # imm = 0xC4653600
leaq 0x85cb(%rip), %rax      # 0xcd78
movq %rax, (%r14)
movabsq $0x41cdcd6500000000, %rax # imm = 0x41CDCD6500000000
movq %rax, 0x70(%r14)
movabsq $0x40c3880000000000, %rax # imm = 0x40C3880000000000
movq %rax, 0x78(%r14)
jmp 0x4816
movl $0x18, %edi
callq 0x2220
movq %rax, %r14
cvttsd2si -0x18(%rbp), %eax
leaq 0x84d9(%rip), %rcx      # 0xccc0
movq %rcx, (%r14)
movl %eax, 0xc(%r14)
cltq
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, 0x10(%r14)
movl $0x0, 0x8(%r14)
movq %r14, 0x20(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %edi
callq 0x2100
leaq 0x8514(%rip), %rsi      # 0xcd48
movq %rax, %rdi
xorl %edx, %edx
callq 0x2330
jmp 0x4840
movq %rax, %rbx
movq %r14, %rdi
callq 0x21f0
movq %rbx, %rdi
callq 0x2360
nop
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/ChiSquareContinuous.cpp
// Function: ChiSquareContinuous::normal_cdf_inverse(double, double, double)
double ChiSquareContinuous::normal_cdf_inverse(double p, double mean, double SD){
  if (p < 0.0 || p > 1.0)
  {
    //throw an exception
  }

  if(p==0)
    return -99999999;
    
  if(p==1)
    return 99999999;
    
  if (p < 0.5)
  {
    // F^-1(p) = - G^-1(p)
    return -rational_approximation( sqrt(-2.0*log(p)))*SD + mean;
  }
  else
  {
    // F^-1(p) = G^-1(1-p)
    return rational_approximation( sqrt(-2.0*log(1-p)))*SD + mean;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
jne 0x4a51
jp 0x4a51
movsd 0x46e4(%rip), %xmm0     # 0x9130
jmp 0x4ba4
ucomisd 0x45af(%rip), %xmm0     # 0x9008
jne 0x4a6a
jp 0x4a6a
movsd 0x46d3(%rip), %xmm0     # 0x9138
jmp 0x4ba4
movsd %xmm2, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd 0x45c4(%rip), %xmm1     # 0x9040
ucomisd %xmm0, %xmm1
jbe 0x4a9f
callq 0x21a0
mulsd 0x45d9(%rip), %xmm0     # 0x9068
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4acc
sqrtsd %xmm0, %xmm0
jmp 0x4ad1
movsd 0x4561(%rip), %xmm1     # 0x9008
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x21a0
mulsd 0x45ac(%rip), %xmm0     # 0x9068
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4b3d
sqrtsd %xmm0, %xmm0
jmp 0x4b42
callq 0x2190
movsd -0x8(%rbp), %xmm3
movsd 0x4662(%rip), %xmm1     # 0x9140
mulsd %xmm0, %xmm1
addsd 0x465e(%rip), %xmm1     # 0x9148
mulsd %xmm0, %xmm1
addsd 0x465a(%rip), %xmm1     # 0x9150
movsd 0x465a(%rip), %xmm2     # 0x9158
mulsd %xmm0, %xmm2
addsd 0x4656(%rip), %xmm2     # 0x9160
mulsd %xmm0, %xmm2
addsd 0x4652(%rip), %xmm2     # 0x9168
mulsd %xmm0, %xmm2
addsd 0x44e6(%rip), %xmm2     # 0x9008
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
movsd -0x10(%rbp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x4ba4
callq 0x2190
movsd -0x8(%rbp), %xmm3
movsd 0x45f1(%rip), %xmm1     # 0x9140
mulsd %xmm0, %xmm1
addsd 0x45ed(%rip), %xmm1     # 0x9148
mulsd %xmm0, %xmm1
addsd 0x45e9(%rip), %xmm1     # 0x9150
movsd 0x45e9(%rip), %xmm2     # 0x9158
mulsd %xmm0, %xmm2
addsd 0x45e5(%rip), %xmm2     # 0x9160
mulsd %xmm0, %xmm2
addsd 0x45e1(%rip), %xmm2     # 0x9168
mulsd %xmm0, %xmm2
addsd 0x4475(%rip), %xmm2     # 0x9008
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
mulsd %xmm3, %xmm0
addsd -0x10(%rbp), %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/VaryMemoryOneSample.cpp
// Function: get_estimate(ChiSquareContinuous*, char, int, double, double)
double get_estimate(ChiSquareContinuous *quantile_sketch, char distribution_type, int num_buckets, double location, double scale)
{
  if (distribution_type == 'N')
    return quantile_sketch->calculate_statistic_ifNormal(num_buckets, location, scale);
  else if (distribution_type == 'U')
    return quantile_sketch->calculate_statistic_ifUniform(num_buckets, location, scale);
  else if (distribution_type == 'P')
    return quantile_sketch->calculate_statistic_ifPareto(num_buckets, location, scale);
  else
    return quantile_sketch->calculate_statistic_ifExponential(num_buckets, location, scale);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x55, %esi
je 0x68f5
cmpl $0x50, %esi
je 0x68ec
cmpl $0x4e, %esi
jne 0x68fe
movl %edx, %esi
popq %rbp
jmp 0x48a2
leaq -0x1ab1(%rip), %rax     # 0x4e42
jmp 0x6905
leaq -0x1b3e(%rip), %rax     # 0x4dbe
jmp 0x6905
leaq -0x1a13(%rip), %rax     # 0x4ef2
movl %edx, %esi
movq %rax, %rdx
xorl %ecx, %ecx
popq %rbp
jmp 0x4bf4
// File: /workspace/github_cpp_makefile_star2_O1/ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/QDigestDouble.h
// Function: QDigestDouble::insert(double)
void insert(double x)
  { 
    if (x < -range)
      x = 0;
    if (x > range)
      x = precision;
    QDigest::insert(doubleToLong(x)); 
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x70(%rdi), %xmm1
movsd 0x78(%rdi), %xmm2
movapd 0x23ba(%rip), %xmm3     # 0x91d0
xorpd %xmm2, %xmm3
movapd %xmm0, %xmm4
cmpltsd %xmm3, %xmm4
andnpd %xmm0, %xmm4
movapd %xmm2, %xmm0
cmpltsd %xmm4, %xmm0
movapd %xmm0, %xmm3
andnpd %xmm4, %xmm3
andpd %xmm1, %xmm0
orpd %xmm3, %xmm0
addsd %xmm2, %xmm0
addsd %xmm2, %xmm2
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
popq %rbp
jmp 0x3152
nop
// File: /workspace/github_cpp_makefile_star2_O1/Joke-Shi[P]astrunc/sample/../include/astrunc.common.h
// Function: astrunc::common::chars(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int astrunc::common::chars( std::vector< std::string> &__chars, const std::string &__s)
{
    int rc = 0;

    if ( !__s.empty()) {
        std::size_t i = 0;

        for( i = 0; i < __s.size(); ) {
            unsigned char c = (unsigned char )__s[ i];

            std::size_t c_size = 0;
            if ( (0x00 <= c) && (0xC0 > c)) {
                c_size = 1;

            } else if ( (0xC0 <= c) && (0xE0 > c)) {
                c_size = 2;

            } else if ( (0xe0 <= c) && (0xF0 > c)) {
                c_size = 3;

            } else if ( (0xF0 <= c) && (0xF8 > c)) {
                c_size = 4;

            } else if ( (0xF8 <= c) && (0xFC > c)) {
                c_size = 5;

            } else if ( (0xFE <= c) && (0xFE > c)) {
                c_size = 6;

            } else {
                c_size = 7;
            }

            std::string tmp_word;
            for ( std::size_t j = 0; j < c_size; j++) {
                tmp_word.push_back( __s[ i + j]);
            }

            try {
                __chars.push_back( tmp_word);
            } catch ( std::bad_alloc &__e) {
                rc = -1;

                break;
            }

            i += c_size;
        }
    }

    return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
cmpq $0x0, 0x8(%rsi)
je 0x3160
movq %rsi, %rbx
xorl %r12d, %r12d
leaq 0x20(%rsp), %r13
leaq 0x10(%rsp), %r15
movl $0x0, 0xc(%rsp)
cmpq 0x8(%rbx), %r12
jae 0x3168
movq (%rbx), %rax
movb (%rax,%r12), %al
movl $0x1, %ebp
cmpb $-0x40, %al
jb 0x30d2
movl $0x2, %ebp
cmpb $-0x20, %al
jb 0x30d2
movl $0x3, %ebp
cmpb $-0x10, %al
jb 0x30d2
movl $0x4, %ebp
cmpb $-0x8, %al
jb 0x30d2
xorl %ecx, %ecx
cmpb $-0x4, %al
setae %cl
leaq 0x5(,%rcx,2), %rbp
movq %r13, %r14
movq %r13, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
xorl %r13d, %r13d
movq (%rbx), %rax
addq %r12, %rax
movsbl (%r13,%rax), %esi
movq %r15, %rdi
callq 0x20f0
incq %r13
cmpq %r13, %rbp
jne 0x30eb
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x6dc2
addq %rbp, %r12
movb $0x1, %bpl
movq %r14, %r13
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x3134
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2130
testb %bpl, %bpl
jne 0x308e
jmp 0x3168
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x3180
movq %rbp, %rdi
callq 0x2080
callq 0x2190
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
xorl %ebp, %ebp
jmp 0x311a
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x317d
movq %rax, %rbp
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x3197
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbp, %rdi
callq 0x21a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Joke-Shi[P]astrunc/sample/sample_en.cc
// Function: main
int main( int argc, const char **argv)
{         
    std::string s_en = "He said: Chang suggested organizing a canine patrol squad at the "
                       "museum \"abc\" and, in 1987, dogs came back. At 1 year old, each dog is "
                       "given a tailored training course. ";

    std::vector< std::string> vec_s;
    int rc = astrunc::access::split( vec_s, s_en, astrunc::access::EN, 32);
    if ( 0 == rc) {
        for ( auto const &__s : vec_s) {
            std::cout << __s << std::endl;
            std::cout << "------------------------------------------------------------------\n";
        }
    } else { std::cerr << "[Error]: Split error\n"; }


    return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x28(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x166d(%rip), %rsi      # 0x82f8
leaq 0x170f(%rip), %rdx      # 0x83a1
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x7164
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x8(%rbx)
je 0x6ccc
movq %rsp, %rdi
leaq 0x18(%rsp), %rsi
movl $0x20, %edx
callq 0x403c
movl %eax, %ebx
jmp 0x6cce
xorl %ebx, %ebx
testl %ebx, %ebx
je 0x6cec
movq 0x4317(%rip), %rdi      # 0xaff0
leaq 0x1706(%rip), %rsi      # 0x83e6
movl $0x15, %edx
callq 0x2150
jmp 0x6d5b
movq (%rsp), %rbp
movq 0x8(%rsp), %r13
cmpq %r13, %rbp
je 0x6d5b
movq 0x42cf(%rip), %r14      # 0xafd0
leaq 0x169a(%rip), %r15      # 0x83a2
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r14, %rdi
callq 0x2150
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20a0
movl $0x43, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2150
addq $0x20, %rbp
cmpq %r13, %rbp
jne 0x6d08
movq %rsp, %rdi
callq 0x6e2a
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x6d7f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2130
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6d92
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6e2a
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x6db9
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2130
movq %rbx, %rdi
callq 0x21a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/kentcz[P]rapl-tools/Rapl.cpp
// Function: Rapl::Rapl()
Rapl::Rapl() {

	open_msr();
	pp1_supported = detect_pp1();

	/* Read MSR_RAPL_POWER_UNIT Register */
	uint64_t raw_value = read_msr(MSR_RAPL_POWER_UNIT);
	power_units = pow(0.5,	(double) (raw_value & 0xf));
	energy_units = pow(0.5,	(double) ((raw_value >> 8) & 0x1f));
	time_units = pow(0.5,	(double) ((raw_value >> 16) & 0xf));

	/* Read MSR_PKG_POWER_INFO Register */
	raw_value = read_msr(MSR_PKG_POWER_INFO);
	thermal_spec_power = power_units * ((double)(raw_value & 0x7fff));
	minimum_power = power_units * ((double)((raw_value >> 16) & 0x7fff));
	maximum_power = power_units * ((double)((raw_value >> 32) & 0x7fff));
	time_window = time_units * ((double)((raw_value >> 48) & 0x7fff));

	reset();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x0, 0x4(%rdi)
movb $0x1, 0x8(%rdi)
callq 0x2982
movl $0x1, %eax
cpuid
andl $0xffff0, %eax          # imm = 0xFFFF0
cmpl $0x206d0, %eax          # imm = 0x206D0
setne %cl
cmpl $0x306f0, %eax          # imm = 0x306F0
setne %al
andb %cl, %al
movb %al, 0x8(%r14)
movq %r14, %rdi
movl $0x606, %esi            # imm = 0x606
callq 0x2af8
movq %rax, %rbx
andl $0xf, %eax
cvtsi2sd %eax, %xmm0
orpd 0x17c0(%rip), %xmm0     # 0x4070
callq 0x2120
movsd %xmm0, 0x10(%r14)
movl %ebx, %eax
shrl $0x8, %eax
andl $0x1f, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
orpd 0x179e(%rip), %xmm0     # 0x4070
callq 0x2120
movsd %xmm0, 0x18(%r14)
shrl $0x10, %ebx
andl $0xf, %ebx
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
orpd 0x177e(%rip), %xmm0     # 0x4070
callq 0x2120
movsd %xmm0, 0x20(%r14)
movq %r14, %rdi
movl $0x614, %esi            # imm = 0x614
callq 0x2af8
movsd 0x10(%r14), %xmm0
movl $0x7fff, %ecx           # imm = 0x7FFF
movl %eax, %edx
andl %ecx, %edx
cvtsi2sd %edx, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%r14)
movl %eax, %edx
shrl $0x10, %edx
andl %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x30(%r14)
movq %rax, %rdx
shrq $0x20, %rdx
andl %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x38(%r14)
shrq $0x30, %rax
andl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x20(%r14), %xmm0
movsd %xmm0, 0x40(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2b1c
nop
// File: /workspace/github_cpp_makefile_star2_O1/kentcz[P]rapl-tools/Rapl.cpp
// Function: Rapl::open_msr()
void Rapl::open_msr() {
	std::stringstream filename_stream;
	filename_stream << "/dev/cpu/" << core << "/msr";
	fd = open(filename_stream.str().c_str(), O_RDONLY);
	if (fd < 0) {
		if ( errno == ENXIO) {
			fprintf(stderr, "rdmsr: No CPU %d\n", core);
			exit(2);
		} else if ( errno == EIO) {
			fprintf(stderr, "rdmsr: CPU %d doesn't support MSRs\n", core);
			exit(3);
		} else {
			perror("rdmsr:open");
			fprintf(stderr, "Trying to open %s\n",
					filename_stream.str().c_str());
			exit(127);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20c0
leaq 0x30(%rsp), %r14
leaq 0x1703(%rip), %rsi      # 0x40a8
movl $0x9, %edx
movq %r14, %rdi
callq 0x2170
movl 0x4(%rbx), %esi
movq %r14, %rdi
callq 0x2230
leaq 0x16ee(%rip), %rsi      # 0x40b2
movl $0x4, %edx
movq %rax, %rdi
callq 0x2170
leaq 0x38(%rsp), %rsi
movq %rsp, %rdi
callq 0x21f0
movq (%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x20d0
movl %eax, (%rbx)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a08
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
cmpl $0x0, (%rbx)
js 0x2a36
movq 0x3594(%rip), %rsi      # 0x5fa8
leaq 0x20(%rsp), %rdi
callq 0x20e0
leaq 0xa0(%rsp), %rdi
callq 0x2080
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
retq
addq $0x4, %rbx
callq 0x2040
movl (%rax), %eax
cmpl $0x5, %eax
je 0x2a81
cmpl $0x6, %eax
je 0x2a79
leaq 0x169b(%rip), %rdi      # 0x40ed
callq 0x20f0
movq 0x357a(%rip), %rax      # 0x5fd8
movq (%rax), %rbx
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2140
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x22ac
movq %rbx, %rdi
callq 0x2286
movq %rbx, %rdi
callq 0x2260
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ab0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x2ab0
jmp 0x2aad
jmp 0x2aad
movq %rax, %rbx
movq 0x34f1(%rip), %rsi      # 0x5fa8
leaq 0x20(%rsp), %rdi
callq 0x20e0
leaq 0xa0(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/kentcz[P]rapl-tools/Rapl.cpp
// Function: Rapl::read_msr(int)
uint64_t Rapl::read_msr(int msr_offset) {
	uint64_t data;
	if (pread(fd, &data, sizeof(data), msr_offset) != sizeof(data)) {
		perror("read_msr():pread");
		exit(127);
	}
	return data;
}

// Assembly:
pushq %rax
movl (%rdi), %edi
movslq %esi, %rcx
movq %rsp, %rsi
movl $0x8, %edx
callq 0x2190
cmpq $0x8, %rax
jne 0x2b17
movq (%rsp), %rax
popq %rcx
retq
callq 0x22d7
// File: /workspace/github_cpp_makefile_star2_O1/kentcz[P]rapl-tools/Rapl.cpp
// Function: Rapl::reset()
void Rapl::reset() {

	prev_state = &state1;
	current_state = &state2;
	next_state = &state3;

	// sample twice to fill current and previous
	sample();
	sample();

	// Initialize running_total
	running_total.pkg = 0;
	running_total.pp0 = 0;
	running_total.dram = 0;
	gettimeofday(&(running_total.tsc), NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x60(%rdi), %rax
movq %rax, 0x50(%rdi)
leaq 0x90(%rdi), %rax
movq %rax, 0x48(%rdi)
leaq 0xc0(%rdi), %rax
movq %rax, 0x58(%rdi)
callq 0x2b72
movq %rbx, %rdi
callq 0x2b72
movq $0x0, 0x108(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xf0(%rbx)
addq $0x110, %rbx            # imm = 0x110
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
jmp 0x2210
// File: /workspace/github_cpp_makefile_star2_O1/kentcz[P]rapl-tools/Rapl.cpp
// Function: Rapl::sample()
void Rapl::sample() {
	uint32_t max_int = ~((uint32_t) 0);

	next_state->pkg = read_msr(MSR_PKG_ENERGY_STATUS) & max_int;
	next_state->pp0 = read_msr(MSR_PP0_ENERGY_STATUS) & max_int;

	if (pp1_supported) {
		next_state->pp1 = read_msr(MSR_PP1_ENERGY_STATUS) & max_int;
		next_state->dram = 0;
	} else {
		next_state->pp1 = 0;
		next_state->dram = read_msr(MSR_DRAM_ENERGY_STATUS) & max_int;
	}

	gettimeofday(&(next_state->tsc), NULL);


	// Update running total
	running_total.pkg += energy_delta(current_state->pkg, next_state->pkg);
	running_total.pp0 += energy_delta(current_state->pp0, next_state->pp0);
	running_total.pp1 += energy_delta(current_state->pp0, next_state->pp0);
	running_total.dram += energy_delta(current_state->dram, next_state->dram);

	// Rotate states
	rapl_state_t *pprev_state = prev_state;
	prev_state = current_state;
	current_state = next_state;
	next_state = pprev_state;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x611, %esi            # imm = 0x611
callq 0x2af8
movl %eax, %eax
movq 0x58(%rbx), %rcx
movq %rax, (%rcx)
movq %rbx, %rdi
movl $0x639, %esi            # imm = 0x639
callq 0x2af8
movl %eax, %ecx
movq 0x58(%rbx), %rax
movq %rcx, 0x8(%rax)
cmpb $0x1, 0x8(%rbx)
jne 0x2bc1
movq %rbx, %rdi
movl $0x641, %esi            # imm = 0x641
callq 0x2af8
movl %eax, %ecx
movq 0x58(%rbx), %rax
movq %rcx, 0x10(%rax)
xorl %ecx, %ecx
jmp 0x2bdc
movq $0x0, 0x10(%rax)
movq %rbx, %rdi
movl $0x619, %esi            # imm = 0x619
callq 0x2af8
movl %eax, %ecx
movq 0x58(%rbx), %rax
movq %rcx, 0x18(%rax)
movq 0x58(%rbx), %rdi
addq $0x20, %rdi
xorl %esi, %esi
callq 0x2210
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rcx
movq (%rcx), %rdx
subq (%rax), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq (%rdx,%rsi), %rdi
cmovaeq %rdx, %rdi
addq %rdi, 0xf0(%rbx)
movq 0x8(%rcx), %rdx
subq 0x8(%rax), %rdx
leaq (%rdx,%rsi), %rdi
cmovaeq %rdx, %rdi
addq %rdi, 0xf8(%rbx)
movq 0x8(%rcx), %rdx
subq 0x8(%rax), %rdx
leaq (%rdx,%rsi), %rdi
cmovaeq %rdx, %rdi
addq %rdi, 0x100(%rbx)
movq 0x18(%rcx), %rdx
subq 0x18(%rax), %rdx
leaq (%rdx,%rsi), %rsi
cmovaeq %rdx, %rsi
addq %rsi, 0x108(%rbx)
movq 0x50(%rbx), %rdx
movq %rax, 0x50(%rbx)
movq %rcx, 0x48(%rbx)
movq %rdx, 0x58(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/henrixh[P]shittydsa/examples/../src/fft.h
// Function: bitreversecopy(std::vector<std::complex<double>, std::allocator<std::complex<double>>>&)
vc bitreversecopy(vc& xs) {
  vc res;
  ul size = xs.size();
  ul lb_size = (ul)lb(size);
  res.assign(size, {});
  for (ul i { 0 }; i < size; i++) {
    ul index = (bitreverse(i) >> (sizeof(ul)*8 - lb_size + 1));
    cd r { xs[i] };
    res[index] = r;
  }
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rsi), %r15
subq (%rsi), %r15
sarq $0x4, %r15
movl $0x21, %ebp
testl %r15d, %r15d
je 0x13c2
movl %r15d, %ecx
movl %r15d, %eax
sarl %eax
decl %ebp
cmpl $0x1, %ecx
movl %eax, %ecx
ja 0x13b7
movl %r15d, %esi
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movq %rbx, %rdi
callq 0x2096
testl %r15d, %r15d
je 0x144c
movl %r15d, %eax
shlq $0x4, %rax
xorl %edx, %edx
movl $0xf0f0f0f, %esi        # imm = 0xF0F0F0F
movl $0x33333333, %edi       # imm = 0x33333333
movl $0x55555555, %r8d       # imm = 0x55555555
xorl %r9d, %r9d
movl %edx, %ecx
bswapl %ecx
movl %ecx, %r10d
shrl $0x4, %r10d
andl %esi, %r10d
andl %esi, %ecx
shll $0x4, %ecx
orl %r10d, %ecx
movl %ecx, %r10d
andl %edi, %r10d
shrl $0x2, %ecx
andl %edi, %ecx
leal (%rcx,%r10,4), %ecx
movl %ecx, %r10d
andl %r8d, %r10d
shrl %ecx
andl %r8d, %ecx
leal (%rcx,%r10,2), %r10d
movl %ebp, %ecx
shrl %cl, %r10d
movq (%r14), %rcx
movq (%rbx), %r11
shlq $0x4, %r10
movups (%rcx,%r9), %xmm0
movups %xmm0, (%r11,%r10)
addq $0x10, %r9
incl %edx
cmpq %r9, %rax
jne 0x13f4
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1471
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x10c0
movq %r14, %rdi
callq 0x1130
// File: /workspace/github_cpp_makefile_star2_O1/henrixh[P]shittydsa/examples/fft.cpp
// Function: main
int main(int, char**) {
  ul len_a, len_b;
  cin >> len_a >> len_b;
  vd a,b;

  fp x;
  for (ul i { 0 }; i < len_a; ++i) {
    cin >> x;
    a.push_back(x);
  }

  for (ul i { 0 }; i < len_b; ++i) {
    cin >> x;
    b.push_back(x);
  }

  vd r { convolve(a,b) };
  r.resize(len_a+len_b);
  for (auto x : r) {
    cout << round(x) << '\n';
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq 0x346d(%rip), %rdi      # 0x4fe0
leaq 0x14(%rsp), %rbx
movq %rbx, %rsi
callq 0x1120
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x1120
xorl %r12d, %r12d
movq %r12, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq %r12, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
cmpl $0x0, (%rbx)
je 0x1bfe
movq 0x342d(%rip), %rbx      # 0x4fe0
leaq 0x18(%rsp), %r14
leaq 0x40(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1080
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x1be9
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x48(%rsp)
jmp 0x1bf4
movq %r15, %rdi
movq %r14, %rdx
callq 0x2334
incl %r12d
cmpl 0x14(%rsp), %r12d
jb 0x1bbd
cmpl $0x0, 0x10(%rsp)
je 0x1c57
xorl %ebp, %ebp
movq 0x33d2(%rip), %rbx      # 0x4fe0
leaq 0x18(%rsp), %r14
leaq 0x20(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1080
movq 0x28(%rsp), %rsi
cmpq 0x30(%rsp), %rsi
je 0x1c44
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x28(%rsp)
jmp 0x1c4f
movq %r15, %rdi
movq %r14, %rdx
callq 0x2334
incl %ebp
cmpl 0x10(%rsp), %ebp
jb 0x1c18
leaq 0x58(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x1693
movl 0x10(%rsp), %esi
addl 0x14(%rsp), %esi
leaq 0x58(%rsp), %rdi
callq 0x1f24
movq 0x58(%rsp), %r15
movq 0x60(%rsp), %r12
cmpq %r12, %r15
je 0x1cc8
movq 0x333d(%rip), %rbx      # 0x4fd0
leaq 0xf(%rsp), %r14
movsd (%r15), %xmm0
callq 0x1050
movq %rbx, %rdi
callq 0x1100
movb $0xa, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x10d0
addq $0x8, %r15
cmpq %r12, %r15
jne 0x1c98
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1cdf
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1cf6
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1d0d
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1d27
jmp 0x1d22
jmp 0x1d22
movq %rax, %rbx
jmp 0x1d41
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1d41
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1d58
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1d6f
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1130
nop
// File: /workspace/github_cpp_makefile_star2_O1/superblocks[P]superblocks/set-nug.cpp
// Function: Superblocks::init()
void Superblocks::init() {

	coin = "NUG"; 
	coin_name = "Nuggets";

	hash_length = 64;

	// normal (step 0)
	reward[0] = 49;

	// superblock (step 1)
	reward[1] = 10045; // superblock reward (step 1)
	seed_type[1] = SEED_WITH_PREVIOUS_BLOCK_HASH;
	cutout_start[1] = 55;
	cutout_length[1] = 7;
	rnd_range_low[1] = 1;
	rnd_range_high[1] = 1000000;
	luck_type[1] = LUCK_WITH_LESS_THAN_X;
	luck_x[1] = 9723;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
movq 0x20(%rbx), %rdx
leaq 0x18f8(%rip), %rcx      # 0x3b00
movl $0x3, %r8d
xorl %esi, %esi
callq 0x1130
leaq 0x38(%rbx), %rdi
movq 0x40(%rbx), %rdx
leaq 0x18e0(%rip), %rcx      # 0x3b04
movl $0x7, %r8d
xorl %esi, %esi
callq 0x1130
movl $0x40, 0x58(%rbx)
movabsq $0x273d00000031, %rax   # imm = 0x273D00000031
movq %rax, 0xd4(%rbx)
movl $0x2, 0x60(%rbx)
movl $0x37, 0x68(%rbx)
movl $0x7, 0x70(%rbx)
movl $0x1, %eax
movl %eax, 0x78(%rbx)
movl $0xf4240, 0x80(%rbx)    # imm = 0xF4240
movl %eax, 0xc0(%rbx)
movl $0x25fb, 0xc8(%rbx)     # imm = 0x25FB
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ahupp[P]mural/mural_server.cpp
// Function: mural_epoll_add(int, int)
void mural_epoll_add(const int epoll_fd, const int fd) {
  struct epoll_event evt;
  evt.data.fd = fd;
  evt.events = EPOLLIN;
  enforce(epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &evt), "mural_add_epoll");
}

// Assembly:
subq $0x18, %rsp
movl %esi, %edx
leaq 0xc(%rsp), %rcx
movl %esi, 0x4(%rcx)
movl $0x1, (%rcx)
movl $0x1, %esi
callq 0x2280
cmpl $-0x1, %eax
je 0x28e4
addq $0x18, %rsp
retq
callq 0x23ae
// File: /workspace/github_cpp_makefile_star2_O1/ahupp[P]mural/mural_server.cpp
// Function: read_inotify_events(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<TagInfo, std::allocator<TagInfo>>&)
void read_inotify_events(const int inotify_fd,
                         const string& tag_file,
                         vector<TagInfo>& tags) {

  const int EVENT_SIZE = sizeof(struct inotify_event);
  const int BUF_SIZE = 1024 * (EVENT_SIZE + 16);
  char buf[BUF_SIZE];

  // The examples I've read check for EINTR, but its not clear when
  // that would happen, or what I should do about it.  So just fail
  // hard.  They also include a check for len == 0, same thing.
  int len = enforce(read(inotify_fd, buf, BUF_SIZE), "read");

  int i = 0;
  while (i < len) {

    struct inotify_event *event = (struct inotify_event*) &buf[i];

    if (event->mask & IN_CLOSE_WRITE) {
      // it can only be one thing...
      read_tags_file(tag_file, tags);
    }

    i += EVENT_SIZE + event->len;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x8008, %rsp           # imm = 0x8008
movq %rdx, %rbx
movq %rsi, %r14
movq %rsp, %rsi
movl $0x8000, %edx           # imm = 0x8000
callq 0x2290
movq %rax, %r15
cmpl $-0x1, %r15d
je 0x294f
testl %r15d, %r15d
jle 0x2940
xorl %eax, %eax
movslq %eax, %r12
testb $0x8, 0x4(%rsp,%r12)
je 0x2930
movq %r14, %rdi
movq %rbx, %rsi
callq 0x43a6
movl 0xc(%rsp,%r12), %eax
addl %r12d, %eax
addl $0x10, %eax
cmpl %r15d, %eax
jl 0x291a
addq $0x8008, %rsp           # imm = 0x8008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x23c3
// File: /workspace/github_cpp_makefile_star2_O1/ahupp[P]mural/search.cpp
// Function: is_fuzzy_match(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int*)
bool is_fuzzy_match(const string& symbol, const string& query,
                    int* inter_count_ret) {

  size_t qi = 0;
  size_t si = 0;
  int lastmatch = -1;

  // The number of characters between fuzzy matches.  This is 0 if
  // query is a substring of symbol.  Larger values of inter_count
  // will generally be worse matches than smaller values.
  int inter_count = 0;

  while (qi < query.length() && si < symbol.length()) {
    if (query[qi] == symbol[si]) {
      if (lastmatch != -1) {
        inter_count += si - lastmatch - 1;
      }
      lastmatch = si;
      ++qi;
    }
    ++si;
  }
  *inter_count_ret = inter_count;
  return qi == query.length();
}

// Assembly:
movq 0x8(%rsi), %rax
movq 0x8(%rdi), %rcx
testq %rax, %rax
setne %r8b
testq %rcx, %rcx
setne %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x2d93
pushq %rbp
pushq %rbx
movq (%rsi), %r8
movq (%rdi), %r9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %r10d, %r10d
xorl %edi, %edi
xorl %r11d, %r11d
xorl %esi, %esi
movb (%r8,%rsi), %bpl
cmpb (%r9,%r11), %bpl
jne 0x2d82
movl %ebx, %ebp
notl %ebp
addl %r11d, %ebp
cmpl $-0x1, %ebx
cmovel %r10d, %ebp
addl %ebp, %edi
incq %rsi
movl %r11d, %ebx
cmpq %rax, %rsi
jae 0x2d8f
incq %r11
cmpq %rcx, %r11
jb 0x2d62
popq %rbx
popq %rbp
jmp 0x2d97
xorl %esi, %esi
xorl %edi, %edi
movl %edi, (%rdx)
cmpq %rax, %rsi
sete %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/ahupp[P]mural/search.cpp
// Function: is_better_match(std::pair<TagInfo const*, int> const&, std::pair<TagInfo const*, int> const&)
bool is_better_match(const FuzzyMatch& lhs, const FuzzyMatch& rhs) {
  if (lhs.second < rhs.second) {
    return true;
  } else if (lhs.second == rhs.second) {
    if (lhs.first->symbol.length() < rhs.first->symbol.length()) {
      return true;
    }
  }
  return false;
}

// Assembly:
movl 0x8(%rsi), %ecx
movb $0x1, %al
cmpl %ecx, 0x8(%rdi)
jl 0x2dbe
jne 0x2dbc
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq (%rsi), %rdx
cmpq 0x8(%rdx), %rcx
jb 0x2dbe
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/ahupp[P]mural/search.cpp
// Function: find_all_fuzzy_matches(std::vector<TagInfo, std::allocator<TagInfo>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
vector<FuzzyMatch> find_all_fuzzy_matches(const vector<TagInfo>& tags,
                                          const string& query,
                                          const bool ignore_case) {
  // Searches that don't explicitly look like a method ("::") will
  // never include methods, and vice-versa.
  bool methods_only = is_method_tag(query);

  vector<FuzzyMatch> matches;

  for (size_t i = 0; i < tags.size(); ++i) {
    int inter_count;
    const TagInfo& tag = tags[i];

    if (tag.is_method != methods_only) {
      // could split the tags into method and non-method sets and only
      // search one, but right now it's fast enough.
      continue;
    }

    if (is_fuzzy_match(ignore_case ? tag.symbol_lc : tag.symbol,
                       query, &inter_count)) {
      // Passing &tag here is an important perf optimization to avoid
      // excessive copying when there are many possible results (like
      // "A")
      matches.push_back(make_pair(&tag, inter_count));
    }
  }
  return matches;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, 0x10(%rsp)
movq %rdx, %rdi
callq 0x398c
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq (%r15), %r13
cmpq %r13, 0x8(%r15)
je 0x2e9a
movl %eax, %ebp
movzbl %r12b, %eax
shll $0x5, %eax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
xorl %r14d, %r14d
cmpb %bpl, 0x64(%r13,%r12)
jne 0x2e6e
movq 0x8(%rsp), %rax
leaq (%rax,%r13), %rdi
addq %r12, %rdi
movq 0x10(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x2d2c
testb %al, %al
je 0x2e6e
addq %r12, %r13
movl 0x4(%rsp), %eax
movq %r13, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2e61
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rbx)
jmp 0x2e6e
movq %rbx, %rdi
leaq 0x18(%rsp), %rdx
callq 0x3116
incq %r14
movq (%r15), %r13
movq 0x8(%r15), %rax
subq %r13, %rax
sarq $0x3, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rcx, %rax
addq $0x68, %r12
cmpq %rax, %r14
jb 0x2e12
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2ec3
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x2330