LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/transform.cpp
// Function: Transform::DrawDateline(Image&, TransformParams const&, Transform::CmdParams const&, double) const
void Transform::DrawDateline (Image& image, 
			      const TransformParams& params,
			      const CmdParams &cmdparams,
			      double day) const
{
  LongPlotter longplotter(image, params, *this);
  // Spring equinox is date 0, and is day 80 of a normal year.
  day = day - 80;
  while (day < 0) day += 365;
  while (day >= 365) day -= 365;
  double date = 2 * pi * day / 365;
  longplotter.phi = sundec(date);
  image.PlotLine(-pi, pi, longplotter, cmdparams.color,16);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x28(%rsp)
leaq 0x8aed(%rip), %rax      # 0x11b10
movq %rax, 0x10(%rsp)
addsd 0x33a8(%rip), %xmm0     # 0xc3d8
xorpd %xmm2, %xmm2
movsd 0x33a4(%rip), %xmm1     # 0xc3e0
ucomisd %xmm0, %xmm2
jbe 0x9048
addsd %xmm1, %xmm0
jmp 0x903c
movsd 0x3398(%rip), %xmm2     # 0xc3e8
ucomisd %xmm1, %xmm0
jb 0x905c
addsd %xmm2, %xmm0
jmp 0x9050
movsd %xmm0, 0x8(%rsp)
fldl 0x8(%rsp)
fmull 0x2fcc(%rip)            # 0xc038
fdivs 0x347e(%rip)            # 0xc4f0
fstpl (%rsp)
movsd (%rsp), %xmm0
callq 0x9c89
leaq 0x10(%rsp), %rsi
movsd %xmm0, 0x20(%rsi)
movsd 0x2f9f(%rip), %xmm0     # 0xc030
movsd 0x2f6f(%rip), %xmm1     # 0xc008
pushq $0x10
popq %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0xb5ca
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/transform.cpp
// Function: Transform::DrawDatetime(Image&, TransformParams const&, Transform::CmdParams const&, double) const
void Transform::DrawDatetime (Image& image, 
			      const TransformParams& params,
			      const CmdParams &cmdparams,
			      double day) const
{
  LongPlotter longplotter(image, params, *this);
  // Spring equinox is day 0
  day = day - 80;
  while (day < 0) day += 365;
  while (day >= 365) day -= 365;
  double time = fmod(day, 1.0)-0.5; // Time relative to noon
  double date = 2 * pi * day / 365;
  double phi = sundec(date);
  double eot = equationoftime(date) / (24 * 60 * 60);
  double apparenttime = time + eot; // AT = MT + EOT
  double lambda = -(2 * pi * apparenttime);
  double x,y;
  MapXY(image, params, phi, lambda, x, y); 
  //fprintf(stderr,"%g %g %g %g %g %g\n", day, time,date,eot,phi,lambda);
  image.PlotPoint(x,y,1,cmdparams.color);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
addsd 0x3306(%rip), %xmm0     # 0xc3d8
xorpd %xmm1, %xmm1
movsd 0x3302(%rip), %xmm2     # 0xc3e0
ucomisd %xmm0, %xmm1
jbe 0x90ea
addsd %xmm2, %xmm0
jmp 0x90de
movsd 0x32f6(%rip), %xmm1     # 0xc3e8
ucomisd %xmm2, %xmm0
jb 0x90fe
addsd %xmm1, %xmm0
jmp 0x90f2
movsd 0x2f42(%rip), %xmm1     # 0xc048
movsd %xmm0, (%rsp)
callq 0x4270
addsd 0x32f8(%rip), %xmm0     # 0xc410
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
fldl 0x30(%rsp)
fmull 0x2f05(%rip)            # 0xc038
fdivs 0x33b7(%rip)            # 0xc4f0
fstpl 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x9c89
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x9aa9
divsd 0x330a(%rip), %xmm0     # 0xc470
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
fldl 0x20(%rsp)
fmull 0x2e94(%rip)            # 0xc010
fstpl 0x18(%rsp)
movsd 0x18(%rsp), %xmm1
leaq 0x40(%rsp), %r13
leaq 0x38(%rsp), %rbp
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movsd (%rsp), %xmm0
movq %r13, %rcx
movq %rbp, %r8
callq 0x6670
movsd (%r13), %xmm0
movsd (%rbp), %xmm1
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0xb52c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/transform.cpp
// Function: FooPlotter::GetXY(double, double&, double&) const
bool GetXY(double t, double&x, double&y) const
  {
    // Angle up from the pole
    double x0 = cos(t)*cos(theta);
    double y0 = sin(t)*cos(theta);
    double z0 = sin(theta);
    // Now rotate about y axis
    double x1 = sin(phi)*x0 + cos(phi)*z0;
    double y1 = y0;
    double z1 = -cos(phi)*x0 + sin(phi)*z0;
    double phi0 = asin(z1);
    if (phi0 < -inclination || phi0 > inclination) {
      return false;
    } else {
      double lambda0 = atan2(y1,x1);
      return transform.MapXY(image, params, phi0, lambda0+lambda, x, y);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movsd %xmm0, 0x10(%rsp)
movq %rdi, %r15
callq 0x43a0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%r15), %xmm0
callq 0x43a0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x4070
movsd %xmm0, 0x40(%rsp)
movsd 0x20(%r15), %xmm0
callq 0x43a0
movsd %xmm0, 0x38(%rsp)
movsd 0x20(%r15), %xmm0
callq 0x4070
movsd %xmm0, 0x10(%rsp)
movsd 0x30(%r15), %xmm0
callq 0x4070
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%r15), %xmm0
callq 0x43a0
movsd %xmm0, 0x28(%rsp)
movsd 0x30(%r15), %xmm0
callq 0x43a0
movsd %xmm0, 0x48(%rsp)
movsd 0x30(%r15), %xmm0
callq 0x4070
mulsd 0x10(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
subsd %xmm1, %xmm0
callq 0x4320
movapd 0x2da2(%rip), %xmm1     # 0xc4d0
andpd %xmm0, %xmm1
ucomisd 0x2d2e(%rip), %xmm1     # 0xc468
jbe 0x9748
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movsd 0x10(%rsp), %xmm2
mulsd 0x28(%rsp), %xmm2
movapd %xmm0, 0x10(%rsp)
movsd 0x30(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
addsd %xmm2, %xmm1
movsd 0x40(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
callq 0x4050
movapd %xmm0, %xmm1
movq 0x18(%r15), %rdi
movq 0x8(%r15), %rsi
addsd 0x28(%r15), %xmm1
movq 0x10(%r15), %rdx
movaps 0x10(%rsp), %xmm0
movq %r14, %rcx
movq %rbx, %r8
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x6670
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/equations.cpp
// Function: Equation::FindRoot(double, double, double, double&) const
bool Equation::FindRoot (double t0, double t1, double epsilon, double& t) const
{
  bool result = false;
  double p0 = (*this)(t0);
  double p1 = (*this)(t1);
  if (p0 > p1) {
    double temp;
    temp = t0; t0 = t1; t1 = temp;
    temp = p0; p0 = p1; p1 = temp;
  };
  if (p0 > 0 || p1 < 0) {
    fprintf(stderr, "No root for %f %f %f %f\n", t0, t1, p0, p1);
  } else {
    while (t1 - t0 > epsilon) {
      double t2 = (t0 + t1) / 2.0;
      double p2 = (*this)(t2);
      if (p2 <= 0.0) {
	t0 = t2;
      } else {
	t1 = t2;
      }
    }
    t = t0;
    result = true;
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movsd %xmm2, 0x38(%rsp)
movsd %xmm1, 0x8(%rsp)
movq %rdi, %r14
movq (%rdi), %rax
movsd %xmm0, 0x10(%rsp)
callq *(%rax)
movaps %xmm0, 0x20(%rsp)
movq (%r14), %rax
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq *(%rax)
movapd 0x20(%rsp), %xmm3
ucomisd %xmm0, %xmm3
jbe 0x989a
movapd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rsp), %xmm5
jmp 0x98ae
movapd %xmm3, %xmm2
movapd %xmm0, %xmm3
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm5
xorpd %xmm4, %xmm4
movapd %xmm3, %xmm0
cmpnltpd %xmm4, %xmm0
cmpnltpd %xmm2, %xmm4
andpd %xmm0, %xmm4
movd %xmm4, %ebp
testb $0x1, %bpl
jne 0x9947
movq 0x870b(%rip), %rax      # 0x11fe0
movq (%rax), %rdi
leaq 0x2f91(%rip), %rsi      # 0xc870
movapd %xmm5, %xmm0
movb $0x4, %al
callq 0x42b0
jmp 0x995b
movapd %xmm1, 0x10(%rsp)
movapd %xmm1, %xmm0
addsd %xmm5, %xmm0
mulsd 0x2aee(%rip), %xmm0     # 0xc3f0
movapd %xmm0, 0x20(%rsp)
movq (%r14), %rax
movq %r14, %rdi
movsd %xmm5, 0x8(%rsp)
callq *(%rax)
movapd 0x20(%rsp), %xmm2
movsd 0x8(%rsp), %xmm5
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jb 0x9930
movapd %xmm2, %xmm5
cmpnlesd %xmm1, %xmm0
andpd %xmm0, %xmm2
andnpd 0x10(%rsp), %xmm0
orpd %xmm2, %xmm0
movapd %xmm0, %xmm1
movapd %xmm1, %xmm0
subsd %xmm5, %xmm0
ucomisd 0x38(%rsp), %xmm0
ja 0x98ec
movsd %xmm5, (%rbx)
andb $0x1, %bpl
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/equations.cpp
// Function: perihelionangle(double)
double perihelionangle (double m)
{
  double e = eccentricity;
  double r = m + 2*e*sin(m) + 5*sqr(e)*sin(2*m)/4 + 
             cube(e)*(-sin(m)/4 + 13*sin(3*m)/12);
  return r;
}

// Assembly:
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
callq 0x4070
movapd %xmm0, %xmm1
mulsd 0x2e23(%rip), %xmm1     # 0xc7a8
movsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
addsd %xmm0, %xmm0
callq 0x4070
mulsd 0x2e0b(%rip), %xmm0     # 0xc7b0
mulsd 0x2e0b(%rip), %xmm0     # 0xc7b8
addsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x4070
mulsd 0x2dee(%rip), %xmm0     # 0xc7b8
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
mulsd 0x2de2(%rip), %xmm0     # 0xc7c0
callq 0x4070
mulsd 0x2ddd(%rip), %xmm0     # 0xc7c8
divsd 0x2ddd(%rip), %xmm0     # 0xc7d0
subsd 0x10(%rsp), %xmm0
mulsd 0x2dd7(%rip), %xmm0     # 0xc7d8
addsd (%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/equations.cpp
// Function: getperiheliontime()
double getperiheliontime ()
{
  double theta0 = 0;
  double theta1 = 2 * pi;
  double epsilon = 1e-8;
  while (theta1 - theta0 > epsilon) {
    double theta2 = (theta0 + theta1) / 2.0;
    double p = perihelionangle(theta2) - equinoxangle;
    if (p <= 0.0) {
      theta0 = theta2;
    } else {
      theta1 = theta2;
    }
  }
  printf ("Perihelion time: %f\n", -theta1);
  return -theta1;
}

// Assembly:
subq $0x38, %rsp
movsd 0x2621(%rip), %xmm0     # 0xc038
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm1
subsd %xmm2, %xmm1
ucomisd 0x2db5(%rip), %xmm1     # 0xc7e0
jbe 0x9a85
movapd %xmm0, (%rsp)
addsd %xmm2, %xmm0
mulsd 0x29b2(%rip), %xmm0     # 0xc3f0
movapd %xmm0, 0x20(%rsp)
movsd %xmm2, 0x18(%rsp)
callq 0x996a
movapd 0x20(%rsp), %xmm3
movsd 0x18(%rsp), %xmm2
xorpd %xmm1, %xmm1
addsd 0x2d81(%rip), %xmm0     # 0xc7e8
ucomisd %xmm0, %xmm1
jb 0x9a71
movapd %xmm3, %xmm2
cmpnlesd %xmm1, %xmm0
andpd %xmm0, %xmm3
andnpd (%rsp), %xmm0
orpd %xmm3, %xmm0
jmp 0x9a1b
xorpd 0x25e3(%rip), %xmm0     # 0xc070
movapd %xmm0, (%rsp)
leaq 0x2df0(%rip), %rdi      # 0xc889
movb $0x1, %al
callq 0x4040
movaps (%rsp), %xmm0
addq $0x38, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/equations.cpp
// Function: equationoftime(double)
double equationoftime(double date)
{
  double p = perihelion;
  double m = date - periheliontime;
  double s = 
    -591.7 * sin(2 * (m+p))
    -459.6 * sin(m) +
     +19.8 * sin(m + 2 * p)
     -19.8 * sin(3 * m + 2 * p)
     -12.8 * sin(4 * (m + p))
      -4.8 * sin(2 * m)
      +0.9 * sin(3 * m + 4 * p)
      -0.9 * sin(5 * m + 4 * p)
      -0.5 * sin(4 * m + 2 * p)
      -0.4 * sin(6 * (m + p));
    
  // fprintf(stderr, "EOT: %f\n", s / 60.0);
  return s; // seconds
}

// Assembly:
subq $0x28, %rsp
movapd %xmm0, %xmm1
addsd 0x2d37(%rip), %xmm1     # 0xc7f0
movsd %xmm1, 0x10(%rsp)
movsd 0x2d31(%rip), %xmm0     # 0xc7f8
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
addsd %xmm0, %xmm0
callq 0x4070
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x4070
mulsd 0x2d0d(%rip), %xmm0     # 0xc800
movsd 0x8(%rsp), %xmm1
mulsd 0x2d07(%rip), %xmm1     # 0xc808
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
addsd 0x2cf7(%rip), %xmm0     # 0xc810
callq 0x4070
mulsd 0x2cf2(%rip), %xmm0     # 0xc818
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x2c86(%rip), %xmm0     # 0xc7c0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
addsd 0x2cc2(%rip), %xmm0     # 0xc810
callq 0x4070
mulsd 0x2cc5(%rip), %xmm0     # 0xc820
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x20(%rsp), %xmm0
mulsd 0x28d3(%rip), %xmm0     # 0xc448
callq 0x4070
mulsd 0x2ca6(%rip), %xmm0     # 0xc828
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
addsd %xmm0, %xmm0
callq 0x4070
mulsd 0x2c8b(%rip), %xmm0     # 0xc830
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x8(%rsp), %xmm0
addsd 0x2c79(%rip), %xmm0     # 0xc838
callq 0x4070
mulsd 0x2c74(%rip), %xmm0     # 0xc840
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x2c68(%rip), %xmm0     # 0xc848
mulsd 0x10(%rsp), %xmm0
addsd 0x2c4a(%rip), %xmm0     # 0xc838
callq 0x4070
mulsd 0x2c55(%rip), %xmm0     # 0xc850
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0x2833(%rip), %xmm0     # 0xc448
addsd 0x2bf3(%rip), %xmm0     # 0xc810
callq 0x4070
mulsd 0x27e6(%rip), %xmm0     # 0xc410
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
mulsd 0x2814(%rip), %xmm0     # 0xc458
callq 0x4070
mulsd 0x2c07(%rip), %xmm0     # 0xc858
addsd 0x10(%rsp), %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/equations.cpp
// Function: sunaltitude(double, double, double)
double sunaltitude (double date, double phi, double time)
{
  // Compute altitude of sun at the given date and time,
  // on the zero meridian at latitude phi
  double delta = asin(sunheight(date)); // Declination of the sun

  // Rotate lat = phi, long = 0 round by time
  // Find x,y,z coords on the sphere - no need to use an ellipsoid, as the
  // tangents at a location are the same.
  double x = cos(time) * cos(phi);
  double y = sin(time) * cos(phi);
  double z = sin(phi);

  // The sun vector - the sun is at -x
  double sunx = -cos(delta);
  double suny = 0;
  double sunz = sin(delta);

  // Dot product to get angle to normal
  double alt = pi/2.0 - acos(x * sunx + y * suny + z * sunz);
  return alt;
}

// Assembly:
subq $0x38, %rsp
movsd %xmm2, (%rsp)
movsd %xmm1, 0x8(%rsp)
callq 0x9c74
callq 0x4320
movsd %xmm0, 0x18(%rsp)
movsd (%rsp), %xmm0
callq 0x43a0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x43a0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
callq 0x4070
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x43a0
mulsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x4070
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x43a0
movsd %xmm0, 0x20(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x4070
xorpd %xmm1, %xmm1
mulsd (%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
mulsd 0x10(%rsp), %xmm2
subsd %xmm2, %xmm1
mulsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0x41f0
movsd %xmm0, 0x30(%rsp)
fldl 0x22c0(%rip)            # 0xc020
fsubl 0x30(%rsp)
fstpl 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
addq $0x38, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/equations.cpp
// Function: sunrise(double, double)
double sunrise (double date, double phi)
{
  double t0 = 0;
  double t1 = pi;
  double epsilon = 1e-6;
  while (t1 - t0 > epsilon) {
    double t = (t1 + t0) / 2.0;
    double h = sunaltitude(date + t/daysinyear, phi, t);
    //printf ("%f %f %f %f\n", t0, t1, t, h);
    if (h < sunriseangle) {
      t0 = t;
    } else {
      t1 = t;
    }
  }
  return t0;
}

// Assembly:
subq $0x48, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
xorpd %xmm1, %xmm1
movsd 0x2279(%rip), %xmm2     # 0xc008
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
ucomisd 0x2699(%rip), %xmm0     # 0xc438
jbe 0x9e16
movapd %xmm2, 0x30(%rsp)
movsd %xmm1, 0x18(%rsp)
addsd %xmm1, %xmm2
mulsd 0x2637(%rip), %xmm2     # 0xc3f0
movapd %xmm2, %xmm0
movapd %xmm2, 0x20(%rsp)
divsd 0x2a9d(%rip), %xmm0     # 0xc868
addsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x9c95
movapd 0x20(%rsp), %xmm3
movsd 0x261e(%rip), %xmm2     # 0xc408
ucomisd %xmm0, %xmm2
movapd %xmm3, %xmm1
ja 0x9dfa
movsd 0x18(%rsp), %xmm1
cmpltsd %xmm2, %xmm0
movapd 0x30(%rsp), %xmm2
andpd %xmm0, %xmm2
andnpd %xmm3, %xmm0
orpd %xmm0, %xmm2
jmp 0x9d8f
movapd %xmm1, %xmm0
addq $0x48, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/utils.cpp
// Function: StringSpec::ReadOpt(int&, char**&)
int StringSpec::ReadOpt(int &argc, char** &argv) {
  if (strcmp(argv[0], optstring) != 0) {
    return 0;
  } else {
    argc--; argv++;
    if (argc == 0) {
      fprintf(stderr,"Need a parameter for %s\n", optstring);
      return -1;
    } else {
      value = argv[0];
      return 1;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %r12
movq (%r12), %rdi
movq 0x8(%rbx), %rsi
callq 0x4290
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x9f45
addq $0x8, %r12
decl (%r15)
movq %r12, (%r14)
je 0x9f51
movq (%r12), %rax
movq 0x10(%rbx), %rcx
movq %rax, (%rcx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8088(%rip), %rax      # 0x11fe0
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
leaq 0x2941(%rip), %rsi      # 0xc8a7
xorl %eax, %eax
callq 0x42b0
pushq $-0x1
jmp 0x9f44
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/utils.cpp
// Function: IntSpec::ReadOpt(int&, char**&)
int IntSpec::ReadOpt(int &argc, char** &argv) {
  if (strcmp(argv[0], optstring) != 0) {
    return 0;
  } else {
    argc--; argv++;
    if (argc == 0) {
      fprintf(stderr,"Need a parameter for %s\n", optstring);
      return -1;
    } else {
      // Should do some error checking here
      value = strtol(argv[0],NULL,0);
      return 1;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %r12
movq (%r12), %rdi
movq 0x8(%rbx), %rsi
callq 0x4290
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x9fd1
addq $0x8, %r12
decl (%r15)
movq %r12, (%r14)
je 0x9fdd
movq (%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x42a0
movq 0x10(%rbx), %rcx
movl %eax, (%rcx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x7ffc(%rip), %rax      # 0x11fe0
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
leaq 0x28b5(%rip), %rsi      # 0xc8a7
xorl %eax, %eax
callq 0x42b0
pushq $-0x1
jmp 0x9fd0
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/utils.cpp
// Function: DoubleSpec::ReadOpt(int&, char**&)
int DoubleSpec::ReadOpt(int &argc, char** &argv) {
  if (strcmp(argv[0], optstring) != 0) {
    return 0;
  } else {
    argc--; argv++;
    if (argc == 0) {
      fprintf(stderr,"Need a parameter for %s\n", optstring);
      return -1;
    } else {
      // Should do some error checking here
      value = conversion * strtod(argv[0], NULL);
      return 1;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %r12
movq (%r12), %rdi
movq 0x8(%rbx), %rsi
callq 0x4290
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xa070
addq $0x8, %r12
decl (%r15)
movq %r12, (%r14)
je 0xa07c
movsd 0x18(%rbx), %xmm0
movsd %xmm0, (%rsp)
movq (%r12), %rdi
xorl %esi, %esi
callq 0x4170
mulsd (%rsp), %xmm0
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x7f5d(%rip), %rax      # 0x11fe0
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
leaq 0x2816(%rip), %rsi      # 0xc8a7
xorl %eax, %eax
callq 0x42b0
pushq $-0x1
jmp 0xa06f
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/utils.cpp
// Function: CmdSpec::ReadOpt(int&, char**&)
int CmdSpec::ReadOpt(int &argc, char** &argv) {
  if (strcmp(argv[0], optstring) != 0) {
    return 0;
  } else {
    vector<string>cmd;
    // Skip the initial '-'
    assert(*argv[0] == '-');
    cmd.push_back(argv[0]+1);
    for (int i = 0; i < nargs; i++){
      argc--;argv++;
      if (argc == 0) {
	fprintf(stderr,"Need %d parameter for %s\n", nargs, optstring);
	return -1;
      } else {
	cmd.push_back(argv[0]);
      }
    }
    cmdlist.push_back(cmd);
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %rax
movq (%rax), %r12
movq 0x8(%rdi), %rsi
movq %r12, %rdi
callq 0x4290
xorl %ebp, %ebp
testl %eax, %eax
jne 0xa193
andq $0x0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
cmpb $0x2d, (%r12)
jne 0xa1c7
incq %r12
leaq 0x28(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r12, %rsi
callq 0xa232
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xa3b0
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x40e0
xorl %r13d, %r13d
leaq 0x10(%rsp), %rbp
cmpl 0x10(%rbx), %r13d
jge 0xa175
decl (%r15)
setne %cl
movq (%r14), %rax
addq $0x8, %rax
movq %rax, (%r14)
testb %cl, %cl
je 0xa1a4
movq (%rax), %rsi
movq %r12, %rdi
leaq 0xf(%rsp), %rdx
callq 0xa232
movq %rbp, %rdi
movq %r12, %rsi
callq 0xa3b0
movq %r12, %rdi
callq 0x40e0
incl %r13d
jmp 0xa133
leaq 0x80c4(%rip), %rdi      # 0x12240
leaq 0x10(%rsp), %rsi
callq 0xa26e
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %rdi
callq 0xa29a
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7e35(%rip), %rax      # 0x11fe0
movq (%rax), %rdi
movl 0x10(%rbx), %edx
movq 0x8(%rbx), %rcx
leaq 0x274c(%rip), %rsi      # 0xc908
xorl %eax, %eax
callq 0x42b0
pushq $-0x1
jmp 0xa188
leaq 0x26f2(%rip), %rdi      # 0xc8c0
leaq 0x26fb(%rip), %rsi      # 0xc8d0
leaq 0x26fe(%rip), %rcx      # 0xc8da
movl $0x80, %edx
callq 0x4130
jmp 0xa1ec
jmp 0xa1f1
jmp 0xa1ec
movq %rax, %rbx
jmp 0xa1fe
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x40e0
leaq 0x10(%rsp), %rdi
callq 0xa29a
movq %rbx, %rdi
callq 0x4360
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: RgbSpec::ReadOpt(int&, char**&)
int RgbSpec::ReadOpt(int &argc, char** &argv) {
  if (strcmp(argv[0], optstring) != 0) {
    return 0;
  } else {
    argc--; argv++;
    if (argc == 0) {
      fprintf(stderr,"Need a parameter for %s\n", optstring);
      return -1;
    } else {
      value = Rgb(argv[0]);
      return 1;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdx), %r12
movq (%r12), %rdi
movq 0x8(%rbx), %rsi
callq 0x4290
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xab9d
addq $0x8, %r12
decl (%r15)
movq %r12, (%r14)
je 0xaba9
movq (%r12), %rsi
leaq 0x5(%rsp), %r14
movq %r14, %rdi
callq 0xa904
movq 0x10(%rbx), %rax
movb 0x2(%r14), %cl
movb %cl, 0x2(%rax)
movzwl (%r14), %ecx
movw %cx, (%rax)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x7430(%rip), %rax      # 0x11fe0
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
leaq 0x1ce9(%rip), %rsi      # 0xc8a7
xorl %eax, %eax
callq 0x42b0
pushq $-0x1
jmp 0xab9c
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: Image::Close()
void Image::Close()
{
  if (mmapdata != NULL) {
    if (munmap(mmapdata, mmapsize)) {
      syserror("Error unmapping input file");
    }
    close(mmapfd);
    mmapdata = NULL;
    mmapsize = 0;
    mmapfd = 0;
    data = NULL;
  } else if (data != NULL) {
    delete (data);
    data = NULL;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0xac4d
movq 0x20(%rbx), %rsi
callq 0x4120
testl %eax, %eax
je 0xac38
leaq 0x1e30(%rip), %rdi      # 0xca63
callq 0x9e44
movl 0x28(%rbx), %edi
callq 0x43c0
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x1c(%rbx)
jmp 0xac63
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xac63
pushq $0x1
popq %rsi
callq 0x4230
andq $0x0, 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: Image::Copy(Image const&)
void Image::Copy (const Image& image) {
  if (data == NULL) {
    width = image.width;
    height = image.height;
    data = new char[(long) width * height * 3];
    memcpy(data, image.data,(long) width * height * 3);
  } else {
    for (long y = 0; y < height && y < image.height; y++) {
      for (long x = 0; x < width && x < image.width; x++) {
	Rgb rgb;
	image.GetRgb(x,y,rgb);
	SetRgb(x,y,rgb);
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
je 0xacde
xorl %eax, %eax
pushq $0x1
popq %rcx
xorl %edx, %edx
cmpq 0x8(%r14), %rdx
jge 0xacd8
cmpq 0x8(%rbx), %rdx
jge 0xacd8
movq %rcx, %rsi
xorl %edi, %edi
movq (%r14), %r8
cmpq %r8, %rdi
jge 0xaccf
movq (%rbx), %r9
cmpq %r9, %rdi
jge 0xaccf
imulq %rax, %r9
addq 0x10(%rbx), %r9
movzwl -0x1(%rsi,%r9), %r10d
movb 0x1(%rsi,%r9), %r9b
imulq %rax, %r8
addq 0x10(%r14), %r8
movw %r10w, -0x1(%rsi,%r8)
movb %r9b, 0x1(%rsi,%r8)
incq %rdi
addq $0x3, %rsi
jmp 0xac90
incq %rdx
addq $0x3, %rax
jmp 0xac7f
popq %rbx
popq %r14
popq %r15
retq
movq (%rbx), %rax
movq %rax, (%r14)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
imulq %rcx, %rax
leaq (%rax,%rax,2), %r15
movq %r15, %rdi
callq 0x4030
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x41b0
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: GetLine(char*&, char*, char*, int)
static void GetLine (char* &dataptr, char* dataend, 
	      char* linebuffer, int length)
{
  do {
    int i = 0;
    if (dataptr == dataend) {
      error("Unexpected end of file\n");
    }
    while (dataptr < dataend && i <length-1) {
      char c = *dataptr;
      dataptr++;
      if (c == '\n') {
	break;
      }
      linebuffer[i] = c;
      i++;
    }
    linebuffer[i] = 0;
  } while (linebuffer[0] == '#' || linebuffer[0] == 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1cac(%rip), %r12      # 0xcbb3
cmpq %r14, (%r15)
jne 0xaf14
movq %r12, %rdi
callq 0x9e20
xorl %eax, %eax
movq (%r15), %rcx
cmpq %r14, %rcx
jae 0xaf39
cmpq $0x7e, %rax
ja 0xaf39
movb (%rcx), %dl
incq %rcx
movq %rcx, (%r15)
cmpb $0xa, %dl
je 0xaf39
movb %dl, (%rbx,%rax)
incq %rax
jmp 0xaf16
movb $0x0, (%rbx,%rax)
movzbl (%rbx), %eax
testl %eax, %eax
je 0xaf07
cmpl $0x23, %eax
je 0xaf07
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: Image::Write(char const*) const
void Image::Write (const char* filename) const
{
  if (mmapdata != NULL) {
    fprintf(stderr, "mmapped image - skipping WriteImage\n");
  } else {
    int fd = 1; // stdout
    char header[128];
    size_t datasize;
    if (filename != NULL) {
      fd = creat(filename, 0666);
      if (fd < 0) {
	syserror("Can't open output file");
      }
    }
#if defined O_BINARY
    // Ghastly hack to ensure CR/LF substitution not done, eg. on cygwin
    // Set the output type to binary, not text.
    setmode(fd,O_BINARY);
#endif
    sprintf(header, "P6\n%ld %ld\n255\n", width, height);
    if (write(fd, header, strlen(header)) < 0) {
      syserror("write failed");
    }
    datasize = (long) width * height * 3;
    char *dataptr = data;
    while (datasize > 0) {
      size_t MAXDATA = 64UL*1024*1024;
      ssize_t written = write(fd, dataptr, std::min(MAXDATA,datasize));
      fprintf(stderr,"%zd bytes written\n", written);
      if (written < 0) {
	syserror("write failed");
      }
      datasize -= written;
      dataptr += written;
    }
    if (filename != NULL) {
      close(fd);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
cmpq $0x0, 0x18(%rdi)
jne 0xb07b
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xaf9e
movq %rbx, %rdi
movl $0x1b6, %esi            # imm = 0x1B6
callq 0x4140
movl %eax, %ebp
testl %eax, %eax
jns 0xafa1
leaq 0x1b97(%rip), %rdi      # 0xcb2e
callq 0x9e44
jmp 0xafa1
pushq $0x1
popq %rbp
movq (%r14), %rdx
movq 0x8(%r14), %rcx
leaq 0x1b96(%rip), %rsi      # 0xcb45
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x4060
movq %r15, %rdi
callq 0x40d0
movl %ebp, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x40a0
testq %rax, %rax
jns 0xafe2
leaq 0x1b78(%rip), %rdi      # 0xcb55
callq 0x9e44
movq (%r14), %rax
movq 0x10(%r14), %r15
imulq 0x8(%r14), %rax
leaq (%rax,%rax,2), %r12
leaq 0x1b69(%rip), %r14      # 0xcb62
testq %r12, %r12
je 0xb04c
movl $0x4000000, %eax        # imm = 0x4000000
cmpq %rax, %r12
movl $0x4000000, %edx        # imm = 0x4000000
cmovbq %r12, %rdx
movl %ebp, %edi
movq %r15, %rsi
callq 0x40a0
movq %rax, %r13
movq 0x6fbd(%rip), %rax      # 0x11fe0
movq (%rax), %rdi
movq %r14, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x42b0
testq %r13, %r13
jns 0xb044
leaq 0x1b16(%rip), %rdi      # 0xcb55
callq 0x9e44
subq %r13, %r12
addq %r13, %r15
jmp 0xaff9
testq %rbx, %rbx
je 0xb069
movl %ebp, %edi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x43c0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6f5e(%rip), %rax      # 0x11fe0
movq (%rax), %rcx
leaq 0x1a7d(%rip), %rdi      # 0xcb09
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x43b0
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: Image::AddGrid(double, double, Rgb const&)
void Image::AddGrid(double gridx, double gridy, const Rgb& color)
{
  double ystep = gridy * height/180.0;
  double xstep = gridx * width/360.0;
  // Quicker this way around with big images
  for (long y = 0; y < height; y++) {
    for (double xgrad = 0.0; ROUND(xgrad) < width; xgrad += xstep) {
      long x = long(ROUND(xgrad));
      SetRgb((long) y * width + x, color);
    }
  }
  for (double ygrad = 0.0; ROUND(ygrad) < height; ygrad += ystep) {
    long y = long(ROUND(ygrad));
    for (long x = 0; x < width; x++) {
      SetRgb((long) y * width + x, color);
    }
  }
#if 0
  long y = long(ROUND(height/2.0 - greenwichlat * height / pi));
  for (long x = 0; x < width; x++) {
    SetRgb((long) y * width + x, red);
  }
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movq 0x8(%rdi), %r13
cvtsi2sd %r13, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rsp)
cvtsi2sd %r15, %xmm1
mulsd %xmm0, %xmm1
divsd 0x18ce(%rip), %xmm1     # 0xc9b0
movsd %xmm1, 0x18(%rsp)
xorl %r12d, %r12d
cmpq %r13, %r12
jge 0xb158
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
addsd 0x12ee(%rip), %xmm0     # 0xc3f0
callq 0x4340
cvtsi2sd %r15, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xb14f
cvttsd2si %xmm0, %rax
imulq %r12, %r15
addq %rax, %r15
movq 0x10(%r14), %rax
addq %r15, %rax
addq %r15, %rax
movb (%rbx), %cl
movb %cl, (%rax,%r15)
movb 0x1(%rbx), %cl
movb %cl, 0x1(%rax,%r15)
movb 0x2(%rbx), %cl
movb %cl, 0x2(%rax,%r15)
movsd 0x10(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
movq (%r14), %r15
jmp 0xb0f4
incq %r12
movq 0x8(%r14), %r13
jmp 0xb0eb
movsd 0x8(%rsp), %xmm0
divsd 0x1852(%rip), %xmm0     # 0xc9b8
movsd %xmm0, 0x8(%rsp)
xorpd %xmm0, %xmm0
pushq $0x2
popq %r12
movsd %xmm0, 0x10(%rsp)
addsd 0x126e(%rip), %xmm0     # 0xc3f0
callq 0x4340
cvtsi2sd %r13, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xb1e4
cvttsd2si %xmm0, %rax
leaq (%rax,%rax,2), %rax
movq %r12, %rcx
xorl %edx, %edx
movsd 0x10(%rsp), %xmm0
cmpq %r15, %rdx
jge 0xb1d8
imulq %rax, %r15
addq 0x10(%r14), %r15
movb (%rbx), %sil
movb %sil, -0x2(%rcx,%r15)
movb 0x1(%rbx), %sil
movb %sil, -0x1(%rcx,%r15)
movb 0x2(%rbx), %sil
movb %sil, (%rcx,%r15)
incq %rdx
movq (%r14), %r15
addq $0x3, %rcx
jmp 0xb1a6
addsd 0x8(%rsp), %xmm0
movq 0x8(%r14), %r13
jmp 0xb174
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: Image::MapX(MapFunction&, double, double)
void Image::MapX (MapFunction& f, double xoff, double yoff)
{
  double hh = height/2;
  double hw = width/2;
  double scale = f.Scale(width,height);
  //fprintf(stderr, "%f %f %f\n", xoff, yoff, scale);
  for (long y = 0; y < height; y++) {
    double y0 = (hh-y)*scale+yoff;
    f.InitY(y0);
    for (long x = 0; x < width; x++) {
      double x0 = (x-hw)*scale+xoff;
      //fprintf (stderr, "%d %d %f %f\n", x,y,x0,y0);
      SetRgb((long) y*width+x, f(x0,y0));
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x28(%rsp)
movq %rdi, %r13
movq (%rdi), %rcx
movq 0x8(%rdi), %r8
pushq $0x2
popq %rdi
movq %r8, %rax
cqto
idivq %rdi
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rcx, %rax
cqto
idivq %rdi
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x20(%rsp)
movq (%rsi), %rax
movq %rsi, %rdi
movq %rcx, %rsi
movq %r8, %rdx
callq *(%rax)
movsd %xmm0, (%rsp)
xorl %r12d, %r12d
xorl %eax, %eax
cmpq 0x8(%r13), %rax
jge 0xb2f7
movq %rax, 0x18(%rsp)
cvtsi2sd %rax, %xmm1
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
mulsd (%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movq (%r14), %rax
movq %r14, %rdi
movsd %xmm0, 0x30(%rsp)
callq *0x8(%rax)
pushq $0x2
popq %rbp
xorl %r15d, %r15d
movq (%r13), %rbx
cmpq %rbx, %r15
jge 0xb2e6
cvtsi2sd %r15, %xmm0
subsd 0x20(%rsp), %xmm0
mulsd (%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
movq (%r14), %rax
movq %r14, %rdi
movsd 0x30(%rsp), %xmm1
callq *0x10(%rax)
imulq %r12, %rbx
addq 0x10(%r13), %rbx
movb %al, -0x2(%rbp,%rbx)
movb %ah, -0x1(%rbp,%rbx)
shrl $0x10, %eax
movb %al, (%rbp,%rbx)
incq %r15
addq $0x3, %rbp
jmp 0xb298
movq 0x18(%rsp), %rax
incq %rax
addq $0x3, %r12
jmp 0xb25a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: Image::PlotPoint(double, double, int, Rgb const&)
void Image::PlotPoint(double x, double y, int r, const Rgb &rgb)
{
  //fprintf(stderr,"%g %g %g\n",x,y,r);
  for (int j = -r; j <= r; j ++) {
    for (int i = -r; i <= r; i++) {
      CheckSetRgb(long(ROUND(x+i)),long(ROUND(y+j)),rgb);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rdi, %r14
movl %esi, %r13d
negl %r13d
movl %r13d, 0x4(%rsp)
cmpl %ebp, %r13d
jg 0xb5ba
cvtsi2sd %r13d, %xmm0
addsd 0x8(%rsp), %xmm0
addsd 0xe7f(%rip), %xmm0      # 0xc3f0
callq 0x4340
cvttsd2si %xmm0, %r15
movl 0x4(%rsp), %r12d
cmpl %ebp, %r12d
jg 0xb5b5
cvtsi2sd %r12d, %xmm0
addsd 0x10(%rsp), %xmm0
addsd 0xe58(%rip), %xmm0      # 0xc3f0
callq 0x4340
cvttsd2si %xmm0, %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0xb8cc
incl %r12d
jmp 0xb580
incl %r13d
jmp 0xb559
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/matthewarcus[P]mmps/image.cpp
// Function: Image::PlotLine(double, double, LinePlotter const&, Rgb const&, int)
void Image::PlotLine(double t0, double t1, 
		     const LinePlotter& lineplotter,
		     const Rgb& color,
		     int numinitialpoints)
{
  double inc = (t1-t0)/numinitialpoints;
  for (int i = 0; i < numinitialpoints; i++) {
    PlotLineAux(t0 + i * inc, t0 + (i+1) * inc,
		lineplotter, color, 10);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movsd %xmm0, 0x8(%rsp)
subsd %xmm0, %xmm1
cvtsi2sd %ecx, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
xorl %r12d, %r12d
testl %ecx, %ecx
cmovgl %ecx, %r12d
negl %r12d
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
pushq $0x1
popq %r13
pushq $0xa
popq %rbp
leal (%r12,%r13), %eax
cmpl $0x1, %eax
je 0xb66a
movsd (%rsp), %xmm1
movapd %xmm1, %xmm0
movsd 0x10(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd 0x8(%rsp), %xmm3
addsd %xmm3, %xmm0
addsd 0xa05(%rip), %xmm1      # 0xc048
movsd %xmm1, (%rsp)
cvtsi2sd %r13d, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm3, %xmm1
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0xb67a
incl %r13d
jmp 0xb615
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/Test/QDigest_test_Double.cpp
// Function: test_reverse()
void test_reverse()
{
	QDigestDouble larry(3000);
	int stream_size =88888;
	double item;
	
	default_random_engine generator;
    normal_distribution<double> distribution(3000,50);
    
    for (int i=0; i<stream_size; i++) 
    {
    	item = distribution(generator);
    	//item = i;
  	    larry.insert(item);
  	}
  	
  	double median;
  	median = larry.getQuantile(0.5);
  	cout << median << endl;
  	
  	double median_index;
  	median_index = larry.reverseQuantile(3000, stream_size);
  	cout << median_index << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
leaq -0xa8(%rbp), %rbx
movsd 0x29a2(%rip), %xmm0     # 0x60a0
movq %rbx, %rdi
callq 0x3936
movabsq $0x40a7700000000000, %rax # imm = 0x40A7700000000000
leaq -0xc8(%rbp), %r14
movq %rax, (%r14)
movabsq $0x4049000000000000, %rax # imm = 0x4049000000000000
movq %rax, 0x8(%r14)
andq $0x0, 0x10(%r14)
leaq -0x28(%rbp), %r15
movq $0x1, (%r15)
movb $0x0, 0x18(%r14)
movl $0x15b38, %r12d         # imm = 0x15B38
subl $0x1, %r12d
jb 0x375e
movq %r14, %rdi
movq %r15, %rsi
callq 0x3a2a
movq %rbx, %rdi
callq 0x3972
jmp 0x3743
leaq -0xa8(%rbp), %rdi
movsd 0x2903(%rip), %xmm0     # 0x6070
callq 0x39dc
movq 0x5857(%rip), %rdi      # 0x8fd0
callq 0x21c0
movq %rax, %rdi
callq 0x2090
leaq -0xa8(%rbp), %rdi
movsd 0x290b(%rip), %xmm0     # 0x60a0
movl $0x15b38, %esi          # imm = 0x15B38
callq 0x237c
movq 0x582a(%rip), %rdi      # 0x8fd0
callq 0x21c0
movq %rax, %rdi
callq 0x2090
leaq -0xa8(%rbp), %rdi
callq 0x3a12
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x37d3
jmp 0x37d3
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x3a12
movq %rbx, %rdi
callq 0x2230
// File: /workspace/github_cpp_makefile_star2_O2/shutow[P]shared_mutex/./test_util.h
// Function: rand_wait()
inline void rand_wait()
{
	//return; // no wait

	static std::random_device rd;
	static std::mt19937 gen(rd());
	static std::uniform_int_distribution<> dis(0, 1);

	std::this_thread::sleep_for(std::chrono::milliseconds(dis(gen)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb 0x6a45(%rip), %al       # 0x94e8
testb %al, %al
je 0x2aed
movb 0x7dcb(%rip), %al       # 0xa878
testb %al, %al
je 0x2b37
movb 0x7dcd(%rip), %al       # 0xa888
testb %al, %al
je 0x2b79
leaq 0x7db6(%rip), %rdi      # 0xa880
leaq 0x6a1f(%rip), %rsi      # 0x94f0
callq 0x2f0c
cltq
leaq -0x18(%rbp), %rdi
movq %rax, (%rdi)
callq 0x2eb1
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x69f4(%rip), %rbx      # 0x94e8
movq %rbx, %rdi
callq 0x2270
testl %eax, %eax
je 0x2aa7
leaq 0x5659(%rip), %rdi      # 0x8160
callq 0x2e48
leaq 0x38b(%rip), %rdi       # 0x2e9e
leaq 0x5646(%rip), %rsi      # 0x8160
leaq 0x5627(%rip), %rdx      # 0x8148
callq 0x2150
leaq 0x69bb(%rip), %rdi      # 0x94e8
callq 0x2130
jmp 0x2aa7
leaq 0x7d3a(%rip), %rbx      # 0xa878
movq %rbx, %rdi
callq 0x2270
testl %eax, %eax
je 0x2ab5
leaq 0x560b(%rip), %rdi      # 0x8160
callq 0x21d0
movl %eax, %esi
leaq 0x698d(%rip), %rdi      # 0x94f0
callq 0x2f1a
leaq 0x7d09(%rip), %rdi      # 0xa878
callq 0x2130
jmp 0x2ab5
leaq 0x7d08(%rip), %rdi      # 0xa888
callq 0x2270
testl %eax, %eax
je 0x2ac3
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x7ce2(%rip)      # 0xa880
leaq 0x7ce3(%rip), %rdi      # 0xa888
callq 0x2130
jmp 0x2ac3
jmp 0x2bb1
movq %rax, %r14
movq %rbx, %rdi
callq 0x2120
movq %r14, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/shutow[P]shared_mutex/./test_util.h
// Function: my_rand()
inline int my_rand()
{
	static std::random_device rd;
	static std::mt19937 gen(rd());
	static std::uniform_int_distribution<> dis(1, 1000000000);
	return dis(gen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movb 0x9047(%rip), %al       # 0xbc18
testb %al, %al
je 0x2c04
movb 0xa3cd(%rip), %al       # 0xcfa8
testb %al, %al
je 0x2c4b
movb 0xa3d3(%rip), %al       # 0xcfb8
testb %al, %al
je 0x2c89
leaq 0xa3bc(%rip), %rdi      # 0xcfb0
leaq 0x9025(%rip), %rsi      # 0xbc20
popq %rbx
popq %r14
popq %rbp
jmp 0x2f0c
leaq 0x900d(%rip), %rbx      # 0xbc18
movq %rbx, %rdi
callq 0x2270
testl %eax, %eax
je 0x2bd5
leaq 0x7c72(%rip), %rdi      # 0xa890
callq 0x2e48
leaq 0x274(%rip), %rdi       # 0x2e9e
leaq 0x7c5f(%rip), %rsi      # 0xa890
leaq 0x5510(%rip), %rdx      # 0x8148
callq 0x2150
leaq 0x8fd4(%rip), %rdi      # 0xbc18
callq 0x2130
jmp 0x2bd5
leaq 0xa356(%rip), %rbx      # 0xcfa8
movq %rbx, %rdi
callq 0x2270
testl %eax, %eax
je 0x2bdf
leaq 0x7c2b(%rip), %rdi      # 0xa890
callq 0x21d0
movl %eax, %esi
leaq 0x8fad(%rip), %rdi      # 0xbc20
callq 0x2f1a
leaq 0xa329(%rip), %rdi      # 0xcfa8
callq 0x2130
jmp 0x2bdf
leaq 0xa328(%rip), %rdi      # 0xcfb8
callq 0x2270
testl %eax, %eax
je 0x2bed
movabsq $0x3b9aca0000000001, %rax # imm = 0x3B9ACA0000000001
movq %rax, 0xa302(%rip)      # 0xcfb0
leaq 0xa303(%rip), %rdi      # 0xcfb8
callq 0x2130
jmp 0x2bed
jmp 0x2cc1
movq %rax, %r14
movq %rbx, %rdi
callq 0x2120
movq %r14, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/shutow[P]shared_mutex/./shared_mutex.h
// Function: gx::shareable_lock_template<gx::shared_lock_t>::~shareable_lock_template()
~shareable_lock_template()
		{
			if (m_mutex && is_locked)
			{
				if (m_mode == lock_mode::shared)
					m_mutex->unlock_shared();
				else
					m_mutex->unlock();
			}
		}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d38
cmpb $0x1, 0xc(%rdi)
jne 0x2d38
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x8(%rdi)
je 0x2d2c
movq 0x10(%rax), %rcx
testq %rcx, %rcx
jle 0x2d33
lock
decq 0x10(%rax)
lock
decq 0x20(%rax)
jmp 0x2d37
movb $0x0, 0x18(%rax)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/shutow[P]shared_mutex/./shared_mutex.h
// Function: gx::shared_mutex::lock_shared()
void lock_shared()
		{
			while (true)
			{
				m_counter.fetch_add(1, std::memory_order_acq_rel);
				if (m_exclusive.load(std::memory_order_acquire))
					m_counter.fetch_sub(1, std::memory_order_acq_rel);
				else
					break;
				while (m_exclusive.load(std::memory_order_acquire)) delay();
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
lock
incq 0x20(%rbx)
movb 0x18(%rbx), %al
testb $0x1, %al
je 0x2d65
lock
decq 0x20(%rbx)
movb 0x18(%rbx), %al
testb $0x1, %al
je 0x2d43
movq %rbx, %rdi
callq 0x2d6c
jmp 0x2d54
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/shutow[P]shared_mutex/./shared_mutex.h
// Function: gx::shared_mutex::delay()
void delay()
		{
			if (m_strategy == yield)
				std::this_thread::yield();
			else if (m_strategy == wait)
				std::this_thread::sleep_for(std::chrono::duration<uint64_t, std::micro>(m_wait_microseconds));
		}

// Assembly:
movl (%rdi), %eax
cmpl $0x1, %eax
je 0x2d7c
testl %eax, %eax
jne 0x2d99
jmp 0x21f0
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x8(%rdi), %rax
leaq -0x8(%rbp), %rdi
movq %rax, (%rdi)
callq 0x2d9a
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/shutow[P]shared_mutex/./shared_mutex.h
// Function: gx::shared_mutex::unlock_shared_and_lock()
void unlock_shared_and_lock()
		{
			bool expected = false;
			if (m_exclusive.compare_exchange_weak(expected, true, std::memory_order_acq_rel, std::memory_order_acquire))
			{
				m_counter.fetch_sub(1, std::memory_order_acq_rel);
				while (m_counter.load(std::memory_order_acquire) > 0) delay();
			}
			else // if some thread is claimed m_exclusive already and waits for m_counter == 0
			{
				int64_t num = m_priority_exclusive.fetch_add(1, std::memory_order_acq_rel) + 1;
				while (m_counter.load(std::memory_order_acquire) > num) delay();
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x1, %cl
xorl %eax, %eax
lock
cmpxchgb %cl, 0x18(%rdi)
jne 0x2e23
lock
decq 0x20(%rbx)
movq 0x20(%rbx), %rax
testq %rax, %rax
jle 0x2e43
movq %rbx, %rdi
callq 0x2d6c
jmp 0x2e10
pushq $0x1
popq %r14
lock
xaddq %r14, 0x10(%rbx)
incq %r14
movq 0x20(%rbx), %rax
cmpq %r14, %rax
jle 0x2e43
movq %rbx, %rdi
callq 0x2d6c
jmp 0x2e30
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/shutow[P]shared_mutex/./shared_mutex.h
// Function: gx::shared_mutex::lock()
void lock()
		{
			bool expected = false;
			while (!m_exclusive.compare_exchange_weak(expected, true, std::memory_order_acq_rel, std::memory_order_acquire))
			{
				delay();
				expected = false;
			}
			while (m_counter.load(std::memory_order_acquire) > 0) delay();
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x1, %r14b
xorl %eax, %eax
lock
cmpxchgb %r14b, 0x18(%rbx)
je 0x334d
movq %rbx, %rdi
callq 0x2d6c
jmp 0x3331
movq %rbx, %rdi
callq 0x2d6c
movq 0x20(%rbx), %rax
testq %rax, %rax
jg 0x3345
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pgrouchy[P]NoiseWorld/master.cpp
// Function: term_trap(int)
void term_trap(int sig)
{
    stringstream final_clean_1;
    final_clean_1 << "killall EMM_island";
    system(final_clean_1.str().c_str());
    cout << "Islands submerged..." << endl;
    stringstream final_clean_2;
    final_clean_2 << "rm -rf /dev/shm/*";
    system(final_clean_2.str().c_str());
    cout << "Term was trapped. RAMdisk cleaned successfully (hopefully?).\n";
    exit(0);
}

// Assembly:
pushq %rbx
subq $0x330, %rsp            # imm = 0x330
leaq 0x1a8(%rsp), %rdi
callq 0x20f0
leaq 0x1b8(%rsp), %rdi
leaq 0x6b70(%rip), %rsi      # 0x9070
callq 0x21d0
leaq 0x1c0(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x22e0
movq 0x20(%rsp), %rdi
callq 0x2180
leaq 0x20(%rsp), %rdi
callq 0x20b0
movq 0xaaa6(%rip), %rdi      # 0xcfd8
leaq 0x6b4a(%rip), %rsi      # 0x9083
callq 0x21d0
movq %rax, %rdi
callq 0x20c0
leaq 0x20(%rsp), %rdi
callq 0x20f0
leaq 0x30(%rsp), %rdi
leaq 0x6b3c(%rip), %rsi      # 0x9098
callq 0x21d0
leaq 0x38(%rsp), %rsi
movq %rsp, %rdi
callq 0x22e0
movq (%rsp), %rdi
callq 0x2180
movq %rsp, %rdi
callq 0x20b0
movq 0xaa52(%rip), %rdi      # 0xcfd8
leaq 0x6b1d(%rip), %rsi      # 0x90aa
callq 0x21d0
xorl %edi, %edi
callq 0x2230
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20b0
jmp 0x25ab
jmp 0x25a8
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2120
jmp 0x25cd
jmp 0x25ca
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20b0
jmp 0x25cd
jmp 0x25ca
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x2330