LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/ReservoirSampling.cpp
// Function: ReservoirSampling::getQuantile(double)
double ReservoirSampling::getQuantile(double fraction)
{
  sort(array, array + sample_size); // sorting from range s to s+k
  if (fraction >= 1) 
    return array[sample_size - 1];// if f is greater than one
  else if (fraction < 0) 
    return array[0];//if f is less than 1
  else
    return array[(int)(fraction * sample_size)]; //if f is between 0 and 1. 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x10(%rax), %rdi
movq 0x10(%rax), %rsi
movslq 0xc(%rax), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x89c0
movsd -0x18(%rbp), %xmm0
movsd 0xe9da(%rip), %xmm1     # 0x12008
ucomisd %xmm1, %xmm0
jb 0x3651
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rax
movl 0xc(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x3695
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0x366e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x3695
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rax
movsd -0x18(%rbp), %xmm0
cvtsi2sdl 0xc(%rcx), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::QDigest(double)
QDigest::QDigest(double compression)
{
  compression_factor = compression; 
  capacity = 1;
  size = 0;
  stream_size = 0;
  min = MAX_VALUE;
  max = -MAX_VALUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x8920
movq -0x18(%rbp), %rdi
leaq 0x165e7(%rip), %rax     # 0x19cb0
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x8a00
movq -0x18(%rbp), %rax
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x60(%rax)
movq $0x1, 0x48(%rax)
movq $0x0, 0x40(%rax)
movq $0x0, 0x68(%rax)
movq $0x3b9aca00, 0x50(%rax) # imm = 0x3B9ACA00
movq $-0x3b9aca00, 0x58(%rax) # imm = 0xC4653600
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::copy(QDigest const&)
void QDigest::copy(const QDigest& other)
{
  node2count = other.node2count;
  compression_factor = other.compression_factor;
  capacity = other.capacity;
  size = other.size;
  min = other.min;
  max = other.max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
addq $0x8, %rdi
callq 0x9170
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movsd 0x60(%rcx), %xmm0
movsd %xmm0, 0x60(%rax)
movq -0x10(%rbp), %rcx
movq 0x48(%rcx), %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq %rcx, 0x58(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::insert(double)
void QDigest::insert(double value)
{
  stream_size += 1;
  if (value < min)
    min = value;
  if (value > max)
    max = value;
  offer(value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x68(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rax)
movsd -0x10(%rbp), %xmm1
cvtsi2sdq 0x50(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3894
movq -0x18(%rbp), %rax
cvttsd2si -0x10(%rbp), %rcx
movq %rcx, 0x50(%rax)
movq -0x18(%rbp), %rax
movsd -0x10(%rbp), %xmm0
cvtsi2sdq 0x58(%rax), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x38b7
movq -0x18(%rbp), %rax
cvttsd2si -0x10(%rbp), %rcx
movq %rcx, 0x58(%rax)
movq -0x18(%rbp), %rdi
cvttsd2si -0x10(%rbp), %rsi
callq 0x38d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x78(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3ce0
movq $0x0, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movslq -0x3c(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x8a40
movq %rax, %rcx
movq -0x80(%rbp), %rax
cmpq %rcx, %rax
jae 0x3c12
movq -0x78(%rbp), %rax
cvtsi2sdq -0x38(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
cvtsi2sdq 0x40(%rax), %xmm2
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3be8
movslq -0x3c(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x8a60
movq -0x78(%rbp), %rdi
movq (%rax), %rax
movq 0x8(%rax), %rsi
callq 0x3e70
movq %rax, -0x88(%rbp)
jmp 0x3bba
movq -0x88(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x8(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x3cb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3ccc
movslq -0x3c(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x8a60
movq (%rax), %rax
movq 0x10(%rax), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3b54
leaq -0x30(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x8a40
movq -0x90(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0x8a60
movq -0x90(%rbp), %rsi
movq (%rax), %rax
cvtsi2sdq 0x8(%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x8a80
jmp 0x3c54
movq -0x78(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3ed0
jmp 0x3c63
leaq -0x70(%rbp), %rdi
callq 0x8b70
movq -0x78(%rbp), %rdi
cvttsd2si -0x58(%rbp), %rsi
callq 0x3e70
movq %rax, -0x98(%rbp)
jmp 0x3c84
movq -0x98(%rbp), %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x8(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x3cb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x8b70
jmp 0x3ccc
leaq -0x30(%rbp), %rdi
callq 0x8b70
movsd -0x8(%rbp), %xmm0
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x8b70
movq -0x48(%rbp), %rdi
callq 0x2320
nop
// File: 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
subq $0x90, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x9400
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x8e60
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x8e90
movq -0x68(%rbp), %rdi
addq $0x8, %rdi
callq 0x8c50
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x8ec0
testb $0x1, %al
jne 0x3d54
jmp 0x3e16
movl $0x18, %edi
callq 0x2030
movq %rax, -0x80(%rbp)
jmp 0x3d64
movq -0x80(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x8f60
movq -0x68(%rbp), %rdi
movq (%rax), %rsi
callq 0x4b00
movq %rax, -0x88(%rbp)
jmp 0x3d8a
movq -0x88(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
leaq -0x20(%rbp), %rdi
callq 0x8f60
movq -0x68(%rbp), %rdi
movq (%rax), %rsi
callq 0x4b60
movq %rax, -0x90(%rbp)
jmp 0x3db6
movq -0x90(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
leaq -0x20(%rbp), %rdi
callq 0x8f60
movq -0x78(%rbp), %rdi
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
leaq -0x38(%rbp), %rsi
callq 0x9420
jmp 0x3de9
jmp 0x3deb
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x8f90
movq %rax, -0x50(%rbp)
jmp 0x3d2d
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x8b70
jmp 0x3e66
movq -0x78(%rbp), %rdi
callq 0x94e0
movq -0x78(%rbp), %rdi
movq %rax, -0x58(%rbp)
callq 0x9510
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
leaq 0xd81(%rip), %rdx       # 0x4bc0
callq 0x9490
jmp 0x3e46
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x3e59
movq -0x78(%rbp), %rdi
callq 0x8b70
movq -0x70(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2320
nop
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/../Quantiles/Q-Digest.cpp
// Function: QDigest::clamp(long)
long QDigest::clamp(long value)
{
  if (value < min)
    return min;
  if (value > max)
    return max;
  return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq 0x50(%rcx), %rax
jge 0x3e9c
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3ec0
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq 0x58(%rcx), %rax
jle 0x3eb8
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3ec0
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x42ac
movl $0x0, -0x4(%rbp)
jmp 0x42d4
movl $0x1, -0x1c(%rbp)
movq -0x18(%rbp), %rax
sarq %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x42ce
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0x42b3
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x8d40
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
callq 0x8d20
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x8d60
jmp 0x45cf
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
callq 0x8e60
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8e90
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
callq 0x8c50
movq %rax, -0x48(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x8ec0
testb $0x1, %al
jne 0x4611
jmp 0x4655
leaq -0x38(%rbp), %rdi
callq 0x8f60
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x8ef0
jmp 0x4628
jmp 0x462a
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x8f90
movq %rax, -0x50(%rbp)
jmp 0x45ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x91a0
jmp 0x46f6
leaq -0x20(%rbp), %rdi
callq 0x9000
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x9060
leaq -0x20(%rbp), %rdi
callq 0x9030
movq %rax, -0x68(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x90a0
testb $0x1, %al
jne 0x468f
jmp 0x46e4
leaq -0x58(%rbp), %rdi
callq 0x90e0
movq -0x80(%rbp), %rdi
movq (%rax), %rsi
callq 0x9200
movb %al, -0x81(%rbp)
jmp 0x46ac
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x46d1
jmp 0x46b8
leaq -0x58(%rbp), %rdi
callq 0x90e0
movq -0x80(%rbp), %rdi
movq (%rax), %rsi
callq 0x4700
jmp 0x46cf
jmp 0x46d1
jmp 0x46d3
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x9130
movq %rax, -0x70(%rbp)
jmp 0x466f
leaq -0x20(%rbp), %rdi
callq 0x91a0
addq $0x90, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2320
nop
// File: 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 %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jge 0x4c1a
movb $0x1, -0x1(%rbp)
jmp 0x4c54
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x4c2a
movb $0x0, -0x1(%rbp)
jmp 0x4c54
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x4c3a
movb $0x1, -0x1(%rbp)
jmp 0x4c54
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x4c4a
movb $0x0, -0x1(%rbp)
jmp 0x4c54
jmp 0x4c4c
jmp 0x4c4e
jmp 0x4c50
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 $0x50, %rsp
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movl $0x64, -0x18(%rbp)
movsd 0xd39f(%rip), %xmm0     # 0x12020
movsd %xmm0, -0x38(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x4e10
movsd %xmm0, 0x155a0(%rip)    # 0x1a238
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jb 0x4cd4
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jbe 0x4cc4
leaq 0xd533(%rip), %rdi      # 0x121e6
movb $0x0, %al
callq 0x2040
movl $0x1, %edi
callq 0x2200
xorps %xmm0, %xmm0
movsd %xmm0, 0x15571(%rip)    # 0x1a240
jmp 0x4e07
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd 0xd322(%rip), %xmm0     # 0x12008
divsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jg 0x4def
movsd 0xd2f8(%rip), %xmm0     # 0x12008
addsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x10(%rbp), %xmm0
divsd -0x30(%rbp), %xmm0
mulsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x28(%rbp), %xmm1
movaps 0xd447(%rip), %xmm0     # 0x12190
pand %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
movaps 0xd437(%rip), %xmm2     # 0x12190
pand %xmm2, %xmm0
mulsd -0x38(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4ddf
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x10(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x2140
movsd -0x50(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x48(%rbp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
subsd 0x15474(%rip), %xmm0    # 0x1a238
callq 0x2340
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x15463(%rip)    # 0x1a240
jmp 0x4e07
jmp 0x4de1
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4cfc
leaq 0xd40e(%rip), %rdi      # 0x12204
movb $0x0, %al
callq 0x2040
movl $0x1, %edi
callq 0x2200
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 $0x40, %rsp
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd 0xd204(%rip), %xmm0     # 0x12038
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0xd1ea(%rip), %xmm0     # 0x12030
addsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x2140
movaps %xmm0, %xmm2
movsd -0x38(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0xd195(%rip), %xmm0     # 0x12028
movsd %xmm0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x6, -0x2c(%rbp)
jge 0x4ee0
movslq -0x2c(%rbp), %rcx
leaq 0x15320(%rip), %rax     # 0x1a1d0
movsd (%rax,%rcx,8), %xmm0
movsd 0xd14b(%rip), %xmm1     # 0x12008
addsd -0x18(%rbp), %xmm1
movsd %xmm1, -0x18(%rbp)
divsd %xmm1, %xmm0
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4e9f
movsd -0x20(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd 0xd137(%rip), %xmm0     # 0x12040
mulsd -0x28(%rbp), %xmm0
divsd -0x10(%rbp), %xmm0
callq 0x2140
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
addsd %xmm1, %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x20, %rsp
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
ja 0x4f56
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jb 0x4f6e
leaq 0xd2da(%rip), %rdi      # 0x12237
movb $0x0, %al
callq 0x2040
movl $0x1, %edi
callq 0x2200
movsd -0x18(%rbp), %xmm1
movsd 0xd08d(%rip), %xmm0     # 0x12008
addsd -0x10(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4fa4
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
callq 0x4c60
movsd 0x152a3(%rip), %xmm0    # 0x1a240
movsd %xmm0, -0x8(%rbp)
jmp 0x4fc8
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
callq 0x4fe0
movsd 0xd04d(%rip), %xmm0     # 0x12008
subsd 0x15285(%rip), %xmm0    # 0x1a248
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, (%rax)
movl $0x8, %edi
movq %rdi, -0x38(%rbp)
callq 0x21c0
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
callq 0x21c0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x8(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
subl $0x1, %eax
je 0x5932
jmp 0x5917
movl -0x28(%rbp), %eax
subl $0x2, %eax
je 0x599b
jmp 0x5921
movl -0x28(%rbp), %eax
subl $0x3, %eax
je 0x59e4
jmp 0x5a2d
movq -0x30(%rbp), %rax
movsd -0x10(%rbp), %xmm0
movsd 0xc6cd(%rip), %xmm1     # 0x12010
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rax)
movl $0x30, %edi
callq 0x21c0
movq %rax, %rdi
movq -0x30(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x40(%rbp)
cvttsd2si 0x8(%rax), %esi
callq 0x2bf0
jmp 0x5970
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x5a4a
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x21a0
jmp 0x5a50
movl $0x80, %edi
callq 0x21c0
movq %rax, %rdi
movq -0x30(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x48(%rbp)
movsd 0x8(%rax), %xmm0
callq 0x95a0
jmp 0x59bf
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x5a4a
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x21a0
jmp 0x5a50
movl $0x18, %edi
callq 0x21c0
movq %rax, %rdi
movq -0x30(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x50(%rbp)
cvttsd2si 0x8(%rax), %esi
callq 0x3310
jmp 0x5a08
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x20(%rax)
jmp 0x5a4a
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x21a0
jmp 0x5a50
movl $0x1, %edi
callq 0x20c0
movq %rax, %rdi
leaq 0x142df(%rip), %rsi     # 0x19d20
xorl %eax, %eax
movl %eax, %edx
callq 0x22f0
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x2320
nopl (%rax)
// File: 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 $0x30, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movsd %xmm1, -0x20(%rbp)
movsd %xmm2, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
ja 0x5d70
movsd -0x18(%rbp), %xmm0
movsd 0xc29e(%rip), %xmm1     # 0x12008
ucomisd %xmm1, %xmm0
jbe 0x5d72
jmp 0x5d72
movsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5d94
jp 0x5d94
movsd 0xc3b6(%rip), %xmm0     # 0x12140
movsd %xmm0, -0x8(%rbp)
jmp 0x5e67
movsd -0x18(%rbp), %xmm0
movsd 0xc267(%rip), %xmm1     # 0x12008
ucomisd %xmm1, %xmm0
jne 0x5dbb
jp 0x5dbb
movsd 0xc387(%rip), %xmm0     # 0x12138
movsd %xmm0, -0x8(%rbp)
jmp 0x5e67
movsd 0xc26d(%rip), %xmm0     # 0x12030
ucomisd -0x18(%rbp), %xmm0
jbe 0x5e21
movsd -0x18(%rbp), %xmm0
callq 0x2140
movaps %xmm0, %xmm1
movsd 0xc351(%rip), %xmm0     # 0x12130
mulsd %xmm1, %xmm0
callq 0x2130
movq -0x30(%rbp), %rdi
callq 0x6a30
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd -0x28(%rbp), %xmm2
movsd -0x20(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x5e67
movsd 0xc1df(%rip), %xmm0     # 0x12008
subsd -0x18(%rbp), %xmm0
callq 0x2140
movaps %xmm0, %xmm1
movsd 0xc2f2(%rip), %xmm0     # 0x12130
mulsd %xmm1, %xmm0
callq 0x2130
movq -0x30(%rbp), %rdi
callq 0x6a30
movsd -0x28(%rbp), %xmm2
movsd -0x20(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/ChiSquareContinuous.cpp
// Function: ChiSquareContinuous::final_decision_ifNormal(int, double, double, double)
bool ChiSquareContinuous::final_decision_ifNormal(int num_buckets, double mean, double SD, double sig_level)
{
	double p = calculate_pvalue_ifNormal(num_buckets, mean, SD);
	if (p < sig_level)
		return true;
	else
		return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x5e80
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5f2f
movb $0x1, -0x1(%rbp)
jmp 0x5f33
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/ChiSquareContinuous.cpp
// Function: ChiSquareContinuous::final_decision_ifUniform(int, double, double, double)
bool ChiSquareContinuous::final_decision_ifUniform(int num_buckets, double a, double b, double sig_level)
{
	double p = calculate_pvalue_ifUniform(num_buckets, a, b);
	if (p < sig_level)
		return true;
	else
		return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x6300
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x63af
movb $0x1, -0x1(%rbp)
jmp 0x63b3
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/ChiSquareContinuous.cpp
// Function: ChiSquareContinuous::final_decision_ifPareto(int, double, double, double)
bool ChiSquareContinuous::final_decision_ifPareto(int num_buckets, double location, double scale, double sig_level)
{
	double p = calculate_pvalue_ifPareto(num_buckets, location, scale);
	if (p < sig_level)
		return true;
	else
		return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x6470
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x651f
movb $0x1, -0x1(%rbp)
jmp 0x6523
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/ChiSquareContinuous.cpp
// Function: ChiSquareContinuous::final_decision_ifExponential(int, double, double, double)
bool ChiSquareContinuous::final_decision_ifExponential(int num_buckets, double location, double scale, double sig_level)
{
	double p = calculate_pvalue_ifExponential(num_buckets, location, scale);
	if (p < sig_level)
		return true;
	else
		return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x65d0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x667f
movb $0x1, -0x1(%rbp)
jmp 0x6683
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: ashlall[P]StreamStats/ChiSquareExperiments/./../SourceCode/ChiSquare/ChiSquareContinuous.cpp
// Function: ChiSquareContinuous::two_sample_final_decision(ChiSquareContinuous const&, int, double)
bool ChiSquareContinuous::two_sample_final_decision(const ChiSquareContinuous& distribution_2, int num_buckets, double sig_level)
{
	double p = two_sample_pvalue(distribution_2, num_buckets);
	if (p < sig_level)
		return true;
	else
		return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movsd %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x6940
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x69d3
movb $0x1, -0x1(%rbp)
jmp 0x69d7
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %edx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x4e, %eax
jne 0x8765
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x5b00
movsd %xmm0, -0x8(%rbp)
jmp 0x87cc
movsbl -0x11(%rbp), %eax
cmpl $0x55, %eax
jne 0x878b
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x6270
movsd %xmm0, -0x8(%rbp)
jmp 0x87cc
movsbl -0x11(%rbp), %eax
cmpl $0x50, %eax
jne 0x87b1
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x63c0
movsd %xmm0, -0x8(%rbp)
jmp 0x87cc
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
callq 0x6530
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movsd -0x10(%rbp), %xmm1
movsd 0x78(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
ucomisd %xmm1, %xmm0
jbe 0xaf28
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
movq -0x18(%rbp), %rax
movsd -0x10(%rbp), %xmm0
ucomisd 0x78(%rax), %xmm0
jbe 0xaf46
movq -0x18(%rbp), %rax
movsd 0x70(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
callq 0xafb0
movq -0x18(%rbp), %rdi
cvtsi2sd %rax, %xmm0
callq 0x3850
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0xb0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x22b0
movq -0x90(%rbp), %rdx
leaq 0x2287(%rip), %rsi      # 0xb20e
leaq -0x30(%rbp), %rdi
callq 0x9170
jmp 0x8f92
leaq -0x31(%rbp), %rdi
callq 0x21c0
leaq -0x60(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x9310
movq -0xa0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xe, %edx
movl $0x20, %ecx
callq 0x49d0
movl %eax, -0x94(%rbp)
jmp 0x8fcd
movl -0x94(%rbp), %eax
movl %eax, -0x64(%rbp)
xorl %eax, %eax
cmpl -0x64(%rbp), %eax
jne 0x90b5
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x9330
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
callq 0x9360
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x9390
testb $0x1, %al
jne 0x9019
jmp 0x90b3
leaq -0x78(%rbp), %rdi
callq 0x93d0
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rsi
movq 0x5f99(%rip), %rdi      # 0xefd0
callq 0x2160
movq %rax, -0xa8(%rbp)
jmp 0x9045
movq -0xa8(%rbp), %rdi
movq 0x5f65(%rip), %rsi      # 0xefb8
callq 0x21a0
jmp 0x905a
movq 0x5f6f(%rip), %rdi      # 0xefd0
leaq 0x2250(%rip), %rsi      # 0xb2b8
callq 0x2170
jmp 0x906f
jmp 0x9071
leaq -0x78(%rbp), %rdi
callq 0x93f0
jmp 0x9003
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x21c0
jmp 0x90f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x9410
leaq -0x30(%rbp), %rdi
callq 0x22f8
jmp 0x90f0
jmp 0x90cc
movq 0x5f34(%rip), %rdi      # 0xeff0
leaq 0x2239(%rip), %rsi      # 0xb2fc
callq 0x2170
jmp 0x90ca
jmp 0x90cc
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x9410
leaq -0x30(%rbp), %rdi
callq 0x22f8
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x22a0
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl $0x0, 0x4(%rdi)
movb $0x1, 0x8(%rdi)
callq 0x2ae0
movq -0x18(%rbp), %rdi
callq 0x2d00
movq -0x18(%rbp), %rdi
movb %al, 0x8(%rdi)
movl $0x606, %esi            # imm = 0x606
callq 0x2d50
movq %rax, -0x10(%rbp)
movl -0x10(%rbp), %eax
andl $0xf, %eax
cvtsi2sd %eax, %xmm1
movsd 0x1674(%rip), %xmm0     # 0x4068
movsd %xmm0, -0x20(%rbp)
callq 0x21f0
movq -0x18(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
movsd %xmm1, 0x10(%rax)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
andl $0x1f, %eax
cvtsi2sd %eax, %xmm1
callq 0x21f0
movq -0x18(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
movsd %xmm1, 0x18(%rax)
movzwl -0xe(%rbp), %eax
andl $0xf, %eax
cvtsi2sd %eax, %xmm1
callq 0x21f0
movq -0x18(%rbp), %rdi
movsd %xmm0, 0x20(%rdi)
movl $0x614, %esi            # imm = 0x614
callq 0x2d50
movq -0x18(%rbp), %rdi
movq %rax, -0x10(%rbp)
movsd 0x10(%rdi), %xmm0
movl -0x10(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rdi)
movsd 0x10(%rdi), %xmm0
movzwl -0xe(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rdi)
movsd 0x10(%rdi), %xmm0
movl -0xc(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rdi)
movsd 0x20(%rdi), %xmm0
movzwl -0xa(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rdi)
callq 0x2da0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x20b0
leaq -0x180(%rbp), %rdi
leaq 0x158c(%rip), %rsi      # 0x40a0
callq 0x2110
movq %rax, -0x1e8(%rbp)
jmp 0x2b22
movq -0x1e8(%rbp), %rdi
movq -0x1f0(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x21e0
movq %rax, -0x1f8(%rbp)
jmp 0x2b41
movq -0x1f8(%rbp), %rdi
leaq 0x155b(%rip), %rsi      # 0x40aa
callq 0x2110
jmp 0x2b56
leaq -0x1c0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x2100
jmp 0x2b6b
leaq -0x1c0(%rbp), %rdi
callq 0x2070
movq %rax, %rdi
xorl %esi, %esi
movb %sil, %al
callq 0x20c0
movl %eax, -0x1fc(%rbp)
jmp 0x2b8c
movq -0x1f0(%rbp), %rax
movl -0x1fc(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x1c0(%rbp), %rdi
callq 0x2090
movq -0x1f0(%rbp), %rax
cmpl $0x0, (%rax)
jge 0x2ccb
callq 0x2030
cmpl $0x6, (%rax)
jne 0x2c27
movq -0x1f0(%rbp), %rax
movq 0x3409(%rip), %rcx      # 0x5fd8
movq (%rcx), %rdi
movl 0x4(%rax), %edx
leaq 0x14d3(%rip), %rsi      # 0x40af
movb $0x0, %al
callq 0x2180
movl $0x2, %edi
callq 0x2150
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
jmp 0x2ce0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x2090
jmp 0x2ce0
callq 0x2030
cmpl $0x5, (%rax)
jne 0x2c5d
movq -0x1f0(%rbp), %rax
movq 0x3399(%rip), %rcx      # 0x5fd8
movq (%rcx), %rdi
movl 0x4(%rax), %edx
leaq 0x1475(%rip), %rsi      # 0x40c1
movb $0x0, %al
callq 0x2180
movl $0x3, %edi
callq 0x2150
leaq 0x1481(%rip), %rdi      # 0x40e5
callq 0x20e0
jmp 0x2c6b
movq 0x3366(%rip), %rax      # 0x5fd8
movq (%rax), %rax
movq %rax, -0x208(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x2100
jmp 0x2c91
leaq -0x1e0(%rbp), %rdi
callq 0x2070
movq -0x208(%rbp), %rdi
movq %rax, %rdx
leaq 0x1442(%rip), %rsi      # 0x40f0
movb $0x0, %al
callq 0x2180
leaq -0x1e0(%rbp), %rdi
callq 0x2090
movl $0x7f, %edi
callq 0x2150
leaq -0x190(%rbp), %rdi
callq 0x20d0
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0x190(%rbp), %rdi
callq 0x20d0
movq -0x198(%rbp), %rdi
callq 0x2200
nopl (%rax,%rax)
// File: kentcz[P]rapl-tools/Rapl.cpp
// Function: Rapl::detect_pp1()
bool Rapl::detect_pp1() {
	uint32_t eax_input = 1;
	uint32_t eax;
	__asm__("cpuid;"
			:"=a"(eax)               // EAX into b (output)
			:"0"(eax_input)          // 1 into EAX (input)
			:"%ebx","%ecx","%edx");  // clobbered registers

	uint32_t cpu_signature = eax & SIGNATURE_MASK;
	if (cpu_signature == SANDYBRIDGE_E || cpu_signature == IVYBRIDGE_E) {
		return false;
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rdi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cpuid
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
andl $0xffff0, %eax          # imm = 0xFFFF0
movl %eax, -0x24(%rbp)
cmpl $0x206d0, -0x24(%rbp)   # imm = 0x206D0
je 0x2d35
cmpl $0x306f0, -0x24(%rbp)   # imm = 0x306F0
jne 0x2d3b
movb $0x0, -0x9(%rbp)
jmp 0x2d3f
movb $0x1, -0x9(%rbp)
movb -0x9(%rbp), %al
andb $0x1, %al
popq %rbx
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edi
movslq -0xc(%rbp), %rcx
leaq -0x18(%rbp), %rsi
movl $0x8, %edx
callq 0x2160
cmpq $0x8, %rax
je 0x2d93
leaq 0x137f(%rip), %rdi      # 0x4103
callq 0x20e0
movl $0x7f, %edi
callq 0x2150
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movq %rdi, %rax
addq $0x60, %rax
movq %rax, 0x50(%rdi)
movq %rdi, %rax
addq $0x90, %rax
movq %rax, 0x48(%rdi)
movq %rdi, %rax
addq $0xc0, %rax
movq %rax, 0x58(%rdi)
callq 0x2e30
movq -0x10(%rbp), %rdi
callq 0x2e30
movq -0x10(%rbp), %rdi
movq $0x0, 0xf0(%rdi)
movq $0x0, 0xf8(%rdi)
movq $0x0, 0x108(%rdi)
addq $0xf0, %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movl $0x611, %esi            # imm = 0x611
callq 0x2d50
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl -0xc(%rbp), %eax
andq %rax, %rcx
movq 0x58(%rdi), %rax
movq %rcx, (%rax)
movl $0x639, %esi            # imm = 0x639
callq 0x2d50
movq %rax, %rdx
movq -0x20(%rbp), %rax
movl -0xc(%rbp), %ecx
andq %rcx, %rdx
movq 0x58(%rax), %rcx
movq %rdx, 0x8(%rcx)
testb $0x1, 0x8(%rax)
je 0x2ebf
movq -0x20(%rbp), %rdi
movl $0x641, %esi            # imm = 0x641
callq 0x2d50
movq %rax, %rdx
movq -0x20(%rbp), %rax
movl -0xc(%rbp), %ecx
andq %rcx, %rdx
movq 0x58(%rax), %rcx
movq %rdx, 0x10(%rcx)
movq 0x58(%rax), %rax
movq $0x0, 0x18(%rax)
jmp 0x2eee
movq -0x20(%rbp), %rdi
movq 0x58(%rdi), %rax
movq $0x0, 0x10(%rax)
movl $0x619, %esi            # imm = 0x619
callq 0x2d50
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl -0xc(%rbp), %edx
andq %rdx, %rcx
movq 0x58(%rax), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21c0
movq -0x20(%rbp), %rdi
movq 0x48(%rdi), %rax
movq (%rax), %rsi
movq 0x58(%rdi), %rax
movq (%rax), %rdx
callq 0x2fd0
movq -0x20(%rbp), %rdi
addq 0xf0(%rdi), %rax
movq %rax, 0xf0(%rdi)
movq 0x48(%rdi), %rax
movq 0x8(%rax), %rsi
movq 0x58(%rdi), %rax
movq 0x8(%rax), %rdx
callq 0x2fd0
movq -0x20(%rbp), %rdi
addq 0xf8(%rdi), %rax
movq %rax, 0xf8(%rdi)
movq 0x48(%rdi), %rax
movq 0x8(%rax), %rsi
movq 0x58(%rdi), %rax
movq 0x8(%rax), %rdx
callq 0x2fd0
movq -0x20(%rbp), %rdi
addq 0x100(%rdi), %rax
movq %rax, 0x100(%rdi)
movq 0x48(%rdi), %rax
movq 0x18(%rax), %rsi
movq 0x58(%rdi), %rax
movq 0x18(%rax), %rdx
callq 0x2fd0
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq 0x108(%rax), %rcx
movq %rcx, 0x108(%rax)
movq 0x50(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x48(%rax), %rcx
movq %rcx, 0x50(%rax)
movq 0x58(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x58(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: kentcz[P]rapl-tools/Rapl.cpp
// Function: Rapl::energy_delta(unsigned long, unsigned long)
uint64_t Rapl::energy_delta(uint64_t before, uint64_t after) {
	uint64_t max_int = ~((uint32_t) 0);
	uint64_t eng_delta = after - before;

	// Check for rollovers
	if (before > after) {
		eng_delta = after + (max_int - before);
	}

	return eng_delta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x3012
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq -0x10(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: henrixh[P]shittydsa/examples/../src/fft.h
// Function: bitreverse(unsigned int)
ul bitreverse(ul x) {
  x = (((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << 1));
	x = (((x & 0xcccccccc) >> 2) | ((x & 0x33333333) << 2));
	x = (((x & 0xf0f0f0f0) >> 4) | ((x & 0x0f0f0f0f) << 4));
	x = (((x & 0xff00ff00) >> 8) | ((x & 0x00ff00ff) << 8));
	return((x >> 16) | (x << 16));
}

// Assembly:
movl %edi, -0x4(%rsp)
movl -0x4(%rsp), %eax
andl $0xaaaaaaaa, %eax       # imm = 0xAAAAAAAA
shrl %eax
movl -0x4(%rsp), %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
shll %ecx
orl %ecx, %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
andl $0xcccccccc, %eax       # imm = 0xCCCCCCCC
shrl $0x2, %eax
movl -0x4(%rsp), %ecx
andl $0x33333333, %ecx       # imm = 0x33333333
shll $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
andl $0xf0f0f0f0, %eax       # imm = 0xF0F0F0F0
shrl $0x4, %eax
movl -0x4(%rsp), %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
shll $0x4, %ecx
orl %ecx, %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
andl $0xff00ff00, %eax       # imm = 0xFF00FF00
shrl $0x8, %eax
movl -0x4(%rsp), %ecx
andl $0xff00ff, %ecx         # imm = 0xFF00FF
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
shrl $0x10, %eax
movl -0x4(%rsp), %ecx
shll $0x10, %ecx
orl %ecx, %eax
retq
nop