LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: sun_refraction(double)
double sun_refraction(double el)
{
double r;
double htan;
double r2;

   // calculation sun refraction angle (in degrees) given its 
   // elevation "el" in degrees

   r = r2 = (-1.0);
   if(0) {
      htan = el + 5.11;
      if(htan == 0.0) return (-1.0);
      htan = el + (10.3 / htan);
      htan = tan(htan*PI/180.0);
      if(htan == 0.0) return (-1.0);
      r2 = 1.02 / htan; // refraction in minutes
      r2 /= 60.0;       // refraction in degrees
      r = r2;
   }
   else {
      if(el >= 85.0) r = 0.0;
      else if(el >= 5.0) {
         htan = tan(el*PI/180.0);
         if(htan == 0.0) return (-1.0);
         r = (58.1 / htan) - (0.07 / (htan*htan*htan)) + (0.000086 / (htan*htan*htan*htan*htan));
      }
      else if(el >= (-0.575)) {
         r = 1735.0;
         r -= (518.2*el);
         r += (103.4*el*el);
         r -= (12.79*el*el*el);
         r += (0.711*el*el*el*el);
      }
      else {
         htan = tan(el*PI/180.0);
         if(htan == 0.0) return (-1.0);
         r = (-20.774/htan);
      }
      r /= 3600.0;
   }
   return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorpd %xmm1, %xmm1
ucomisd 0x42619(%rip), %xmm0    # 0x12c080
jae 0xe9b7b
ucomisd 0x1f6c3(%rip), %xmm0    # 0x109138
jae 0xe9ab3
ucomisd 0x42621(%rip), %xmm0    # 0x12c0a0
jae 0xe9ae1
mulsd 0x21d9f(%rip), %xmm0    # 0x10b828
divsd 0x21d9f(%rip), %xmm0    # 0x10b830
callq 0x91b0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xe9aa2
jnp 0xe9ad4
movsd 0x42626(%rip), %xmm1    # 0x12c0d0
divsd %xmm0, %xmm1
jmp 0xe9b7b
mulsd 0x21d6d(%rip), %xmm0    # 0x10b828
divsd 0x21d6d(%rip), %xmm0    # 0x10b830
callq 0x91b0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xe9b3b
jp 0xe9b3b
movsd 0x1f61c(%rip), %xmm1    # 0x1090f8
jmp 0xe9b83
movsd 0x425bf(%rip), %xmm1    # 0x12c0a8
mulsd %xmm0, %xmm1
addsd 0x425bb(%rip), %xmm1    # 0x12c0b0
movsd 0x425bb(%rip), %xmm2    # 0x12c0b8
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
movsd 0x425af(%rip), %xmm3    # 0x12c0c0
mulsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movsd 0x4259f(%rip), %xmm1    # 0x12c0c8
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
jmp 0xe9b77
movsd 0x42545(%rip), %xmm1    # 0x12c088
divsd %xmm0, %xmm1
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd 0x42535(%rip), %xmm3    # 0x12c090
divsd %xmm2, %xmm3
addsd %xmm1, %xmm3
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd 0x42525(%rip), %xmm1    # 0x12c098
divsd %xmm2, %xmm1
addsd %xmm3, %xmm1
divsd 0x1f48d(%rip), %xmm1    # 0x109010
movapd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: sun_diam(double)
double sun_diam(double jd)
{
double diam;

   // return apparent topocentric sun disk diameter in degrees.
   // earth radius correction only valid for daylight hours

   diam = 2.0 * asin(SUN_DIAM / ((earth_sun_dist(jd)-earth_radius(lat,alt)) * 2.0)) * 180.0 / PI;
   return diam;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0xe9966
movsd %xmm0, -0x8(%rbp)
leaq 0x22342e(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
leaq 0x223433(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm1
callq 0xe80f9
movsd -0x8(%rbp), %xmm1
subsd %xmm0, %xmm1
addsd %xmm1, %xmm1
movsd 0x4250d(%rip), %xmm0    # 0x12c0d8
divsd %xmm1, %xmm0
callq 0x9660
addsd %xmm0, %xmm0
mulsd 0x21c50(%rip), %xmm0    # 0x10b830
divsd 0x21c40(%rip), %xmm0    # 0x10b828
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: lookup_new_moon(double)
int lookup_new_moon(double jd)
{
int i, j;
int i0;

   gregorian(0, jd);
   if((g_year >= 2016) && (g_year < 2100)) {  // look up accurate new moon info in table
      i0 = (g_year-2016) * 12;  // approx place to start looking in the table
      j = sizeof(new_moon_table) / sizeof(new_moon_table[0]);
      for(i=i0; i<j; i++) {
         if(jd <= new_moon_table[i]) {
            return i-1;
         }
      }
   }
   return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
movsd %xmm0, -0x8(%rbp)
callq 0xd12da
leaq 0x223a35(%rip), %rax    # 0x30d6a4
movl (%rax), %ecx
leal -0x7e0(%rcx), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x53, %edx
ja 0xe9cce
shll $0x2, %ecx
leal (%rcx,%rcx,2), %edx
addl $0xffffa180, %edx       # imm = 0xFFFFA180
leal (%rcx,%rcx,2), %ecx
addl $0xffffa17f, %ecx       # imm = 0xFFFFA17F
leaq 0x83cd3(%rip), %rsi     # 0x16d970
leaq (%rsi,%rdx,8), %rsi
incq %rdx
movsd -0x8(%rbp), %xmm1
movsd (%rsi), %xmm0
ucomisd %xmm1, %xmm0
jae 0xe9ccc
incl %ecx
addq $0x8, %rsi
movq %rdx, %rdi
incq %rdi
cmpl $0x41b, %edx            # imm = 0x41B
movq %rdi, %rdx
jne 0xe9ca9
jmp 0xe9cce
movl %ecx, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: moon_synod(double)
double moon_synod(double jd)
{
int i;
double d1,d2,d3;
double delta;
double pct,mid;
double synod;

   // return moon synod (in days) for the month jd lies in
   // the value is linearly interpolated between the two adjacent synods.

   i = lookup_new_moon(jd);
   if(i < 0) { // jd is outside of the table range, calculate the synod
      calc_synod:
      synod = (jd - JD2000) / 36525.0;
      synod = 29.5305888531 + 0.00000021621*synod - 3.64E-10*synod*synod;  // average length of synodic month
      return synod;
   }

   d3 = new_moon_table[i+2];
   d2 = new_moon_table[i+1];
   d1 = new_moon_table[i+0];

   d1 = d2 - d1;  // this months synod
   d2 = d3 - d2;  // next months synod

   delta = (d2 - d1);
   if(delta == 0.0) goto calc_synod;
   if(d1 == 0.0) goto calc_synod;

   pct = (jd - new_moon_table[i]) / d1;
   mid = d1 + (delta * pct);

// sprintf(debug_text2, "d1:%f d2:%f pct:%f  delta:%f  mid:%f", d1,d2, pct, delta, mid);
   return mid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd %xmm0, -0x8(%rbp)
callq 0xe9c54
testl %eax, %eax
js 0xe9d3b
leaq 0x83c7f(%rip), %rcx     # 0x16d970
movl %eax, %eax
movsd (%rcx,%rax,8), %xmm2
movsd 0x8(%rcx,%rax,8), %xmm3
movapd %xmm3, %xmm1
subsd %xmm2, %xmm1
xorpd %xmm4, %xmm4
ucomisd %xmm4, %xmm1
jne 0xe9d12
jnp 0xe9d3b
movsd 0x10(%rcx,%rax,8), %xmm0
subsd %xmm3, %xmm0
subsd %xmm1, %xmm0
ucomisd %xmm4, %xmm0
jne 0xe9d28
jnp 0xe9d3b
movsd -0x8(%rbp), %xmm3
subsd %xmm2, %xmm3
divsd %xmm1, %xmm3
mulsd %xmm3, %xmm0
jmp 0xe9d74
movsd -0x8(%rbp), %xmm2
addsd 0x41ae8(%rip), %xmm2    # 0x12b830
divsd 0x41ae8(%rip), %xmm2    # 0x12b838
movsd 0x42390(%rip), %xmm1    # 0x12c0e8
mulsd %xmm2, %xmm1
addsd 0x4238c(%rip), %xmm1    # 0x12c0f0
movsd 0x4238c(%rip), %xmm0    # 0x12c0f8
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: greatcircle(double, double, double, double)
double greatcircle(double lat1,double long1, double lat2,double long2)
{
double dg;
double l1r, l2r;

   l1r = lat1;
   l2r = lat2;
   dg = earth_radius(lat,alt) * acos(
           (cos(l1r) * cos(l2r) * cos(long2-long1))
           + (sin(l1r) * sin(l2r)));
   if(debug_file && show_debug_info) {
       fprintf(debug_file,
               "greatcircle lat1 %.9f long1 %.9f lat2 %.9f long2 %.9f dist %.9f\n",
               lat1, long1, lat2, long2, dg);
       fflush(debug_file);
   }

   dg = check_double(dg);  // NAN check
   return dg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movsd %xmm3, -0x30(%rbp)
movsd %xmm2, -0x10(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm0, -0x20(%rbp)
leaq 0x222fca(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
leaq 0x222fcf(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm1
callq 0xe80f9
movsd %xmm0, -0x48(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x9710
movsd %xmm0, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x9710
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x30(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
callq 0x9710
movsd %xmm0, -0x40(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x38(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x9080
mulsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x18(%rbp), %xmm1
addsd %xmm1, %xmm0
callq 0x9350
movapd %xmm0, %xmm4
mulsd -0x48(%rbp), %xmm4
leaq 0x1542f9(%rip), %rbx    # 0x23e390
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xea0e4
leaq 0x12e81e(%rip), %rax    # 0x2188c4
cmpb $0x0, (%rax)
je 0xea0e4
leaq 0x4ab93(%rip), %rsi     # 0x134c45
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x10(%rbp), %xmm2
movsd -0x30(%rbp), %xmm3
movsd %xmm4, -0x10(%rbp)
movsd -0x10(%rbp), %xmm4
movb $0x5, %al
callq 0x9560
movq (%rbx), %rdi
callq 0x9420
movsd -0x10(%rbp), %xmm4
movapd %xmm4, %xmm0
addq $0x48, %rsp
popq %rbx
popq %rbp
jmp 0x58ac3
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: az_angle(double, double, double, double)
double az_angle(double lat1,double lon1, double lat2,double lon2)
{
double x,y;
double az;

   y = sin(lon2-lon1) * cos(lat2);
   x = cos(lat1)*sin(lat) - sin(lat1)*cos(lat2)*cos(lon2-lon1);
   az = atan2(y, x) * 180.0/PI;
   az = fmod(az + 360.0, 360.0);
   return az;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movsd %xmm2, -0x10(%rbp)
movsd %xmm0, -0x8(%rbp)
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x9080
movsd %xmm0, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x9710
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9710
movsd %xmm0, -0x28(%rbp)
leaq 0x222e8a(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
callq 0x9080
movsd %xmm0, -0x20(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x8(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x9710
movsd %xmm0, -0x10(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0x9710
movsd -0x10(%rbp), %xmm1
mulsd -0x8(%rbp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd -0x20(%rbp), %xmm1
mulsd -0x28(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd -0x18(%rbp), %xmm0
callq 0x9050
mulsd 0x21682(%rip), %xmm0    # 0x10b830
divsd 0x21672(%rip), %xmm0    # 0x10b828
movsd 0x33f7a(%rip), %xmm1    # 0x11e138
addsd %xmm1, %xmm0
addq $0x30, %rsp
popq %rbp
jmp 0x94d0
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: waveangle(double, double, int)
double waveangle(double dg, double h, int n)
{
double theta;
double delta;

   theta = dg / (earth_radius(lat,alt) * (double)(2 * n));
   delta = atan((h / (earth_radius(lat,alt) * sin(theta))) + tan(theta/2)) - theta;
   if(0 && debug_file) {
       fprintf(debug_file, "waveangle dist %g height %g hops %d angle %g\n",
              dg, h, n, delta / RADPERDEG);
       fflush(debug_file);
   }
   return delta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
movsd %xmm1, -0x28(%rbp)
movsd %xmm0, -0x20(%rbp)
leaq 0x222de4(%rip), %r14    # 0x30cfd0
movsd (%r14), %xmm0
leaq 0x222de8(%rip), %r15    # 0x30cfe0
movsd (%r15), %xmm1
callq 0xe80f9
addl %ebx, %ebx
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
mulsd %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd (%r14), %xmm0
movsd (%r15), %xmm1
callq 0xe80f9
movsd %xmm0, -0x30(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x9080
mulsd -0x30(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
movsd 0x1ee12(%rip), %xmm0    # 0x109068
mulsd -0x20(%rbp), %xmm0
callq 0x91b0
addsd -0x28(%rbp), %xmm0
callq 0x92d0
subsd -0x20(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: geoxyz_(double*, double*, double*, double*, double*, double*)
int geoxyz_(double *gla, double *glo, double *eht, double *x, double *y, double *z)
{
    /* Local variables */
    static double w, w2, en, cla, sla;

    /* convert geodetic lat, long, ellip ht. to x,y,z */
    sla = sin(*gla);
    cla = cos(*gla);
    w2 = 1. - eccSquared * sla * sla;
    w = sqrt(w2);
    en = WGS84_A / w;
    *x = (en + *eht) * cla * cos(*glo);
    *y = (en + *eht) * cla * sin(*glo);
    *z = (en * (1. - eccSquared) + *eht) * sla;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x38(%rbp)
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movsd (%rdi), %xmm0
callq 0x9080
movsd %xmm0, 0x29080f(%rip)   # 0x37b810
movsd (%rbx), %xmm0
callq 0x9710
movapd %xmm0, %xmm1
movsd 0x2907fa(%rip), %xmm2   # 0x37b810
movsd 0x3312a(%rip), %xmm0    # 0x11e148
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm0
addsd 0x1e042(%rip), %xmm0    # 0x109070
movsd %xmm1, 0x2907d2(%rip)   # 0x37b808
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xeb046
sqrtsd %xmm0, %xmm0
jmp 0xeb04b
callq 0x9270
movsd 0x330fd(%rip), %xmm1    # 0x11e150
divsd %xmm0, %xmm1
movsd %xmm1, 0x2907a1(%rip)   # 0x37b800
addsd (%r14), %xmm1
mulsd 0x29079c(%rip), %xmm1   # 0x37b808
movsd %xmm1, -0x30(%rbp)
movsd (%r12), %xmm0
callq 0x9710
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r13)
movsd 0x290771(%rip), %xmm0   # 0x37b800
addsd (%r14), %xmm0
mulsd 0x29076c(%rip), %xmm0   # 0x37b808
movsd %xmm0, -0x30(%rbp)
movsd (%r12), %xmm0
callq 0x9080
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r15)
movsd 0x290742(%rip), %xmm0   # 0x37b800
mulsd 0x33092(%rip), %xmm0    # 0x11e158
addsd (%r14), %xmm0
mulsd 0x29073d(%rip), %xmm0   # 0x37b810
movq -0x38(%rbp), %rax
movsd %xmm0, (%rax)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: rge_(double*, double*, double*, double*, double*, double*, double*, double*)
int rge_(double *gla, double *glo, double *u, 
        double *v, double *w, double *x, double *y, double *z)
{
    /* Local variables */
    static double cb, cl, sb, sl;

    /* given a rectangular cartesian system (x,y,z) */
    /* compute a geodetic h cartesian sys   (u,v,w) */
    sb = sin(*gla);
    cb = cos(*gla);
    sl = sin(*glo);
    cl = cos(*glo);
    *u = -sb * cl * *x - sb * sl * *y + cb * *z;
    *v = -sl * *x + cl * *y;
    *w = cb * cl * *x + cb * sl * *y + sb * *z;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, -0x30(%rbp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movsd (%rdi), %xmm0
callq 0x9080
movsd %xmm0, 0x28f35b(%rip)   # 0x37b820
movsd (%rbx), %xmm0
callq 0x9710
movsd %xmm0, 0x28f342(%rip)   # 0x37b818
movsd (%r13), %xmm0
callq 0x9080
movsd %xmm0, 0x28f33f(%rip)   # 0x37b828
movsd (%r13), %xmm0
callq 0x9710
movsd 0x28f324(%rip), %xmm1   # 0x37b820
movapd 0x1ccac(%rip), %xmm3    # 0x1091b0
xorpd %xmm1, %xmm3
mulsd %xmm0, %xmm3
movsd 0x28f314(%rip), %xmm2   # 0x37b828
movapd %xmm2, %xmm4
mulsd %xmm1, %xmm4
movq 0x10(%rbp), %rcx
mulsd (%rcx), %xmm4
mulsd (%r14), %xmm3
subsd %xmm4, %xmm3
movsd 0x28f2e3(%rip), %xmm4   # 0x37b818
movq 0x18(%rbp), %rax
movsd (%rax), %xmm5
mulsd %xmm4, %xmm5
addsd %xmm3, %xmm5
movsd %xmm5, (%r12)
movsd (%rcx), %xmm3
mulsd %xmm0, %xmm3
movsd (%r14), %xmm5
mulsd %xmm2, %xmm5
subsd %xmm5, %xmm3
movsd %xmm3, (%r15)
mulsd %xmm4, %xmm0
mulsd %xmm4, %xmm2
mulsd (%rcx), %xmm2
mulsd (%r14), %xmm0
mulsd (%rax), %xmm1
addsd %xmm2, %xmm0
addsd %xmm0, %xmm1
movq -0x30(%rbp), %rax
movsd %xmm1, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: sprod_(double*, double*, double*, double*, double*)
int sprod_(double *x, double *y, double *scal, double *r1, double *r2)
{

   if(x == 0) return (-1); 
   if(y == 0) return (-1); 
   if(scal == 0) return (-1); 
   if(r1 == 0) return (-1); 
   if(r2 == 0) return (-1); 

/*  computation of the scalar-product of two vectors and their norms */

/*  input:   x(i),i=1,2,3  -- components of vector x */
/*           y(i),i=1,2,3  -- components of vector y */
/*  output:  scal          -- scalar product of x and y */
/*           r1,r2         -- lengths of the two vectors x and y */

    /* Function Body */
    *r1 = sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
    *r2 = sqrt(y[0] * y[0] + y[1] * y[1] + y[2] * y[2]);
    *scal = x[0] * y[0] + x[1] * y[1] + x[2] * y[2];
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %r9b
orb %al, %r9b
testq %rdx, %rdx
sete %al
testq %rcx, %rcx
sete %r10b
orb %al, %r10b
orb %r9b, %r10b
testq %r8, %r8
sete %al
orb %r10b, %al
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0xec67c
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rdi), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
movsd %xmm0, (%rcx)
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rsi), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
movsd %xmm0, (%r8)
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
mulsd 0x8(%rsi), %xmm1
mulsd (%rsi), %xmm0
movsd 0x10(%rdi), %xmm2
mulsd 0x10(%rsi), %xmm2
addsd %xmm1, %xmm0
addsd %xmm0, %xmm2
movsd %xmm2, (%rdx)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: rot1_(double*, double*, double*, double*, double*, double*, double*)
int rot1_(double *theta, double *x, double *y, 
        double *z, double *u, double *v, double *w)
{
    /* Local variables */
    static double c, s;

    /* rotate coordinate axes about 1 axis by angle of theta radians */
    /* x,y,z transformed into u,v,w */
    s = sin(*theta);
    c = cos(*theta);
    *u = *x;
    *v = c * *y + s * *z;
    *w = c * *z - s * *y;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, -0x30(%rbp)
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
movsd (%rdi), %xmm0
callq 0x9080
movsd %xmm0, 0x28d9c4(%rip)   # 0x37b830
movsd (%r14), %xmm0
callq 0x9710
movsd (%r13), %xmm1
movsd %xmm1, (%r12)
movsd 0x28d9a6(%rip), %xmm1   # 0x37b830
movsd (%rbx), %xmm2
mulsd %xmm1, %xmm2
movsd (%r15), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movq -0x30(%rbp), %rax
movsd %xmm3, (%rax)
mulsd (%r15), %xmm1
mulsd (%rbx), %xmm0
subsd %xmm1, %xmm0
movq 0x10(%rbp), %rax
movsd %xmm0, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: getghar_(int*, double*, double*)
int getghar_(int *mjd, double *fmjd, double *ghar)
{
    static double ghad, d;
    static int i;
    static double fmjdutc, tsecgps, tsecutc;

    if(mjd == 0) return (-1); 
    if(fmjd == 0) return (-1); 
    if(ghar == 0) return (-1); 

/* convert mjd/fmjd in GPS time to Greenwich hour angle (in radians) */

/*** "satellite orbits: models, methods, applications" montenbruck & gill(2000) */
/* section 2.3.1, pg. 33 */
/*** need UT to get sidereal time  ("astronomy on the personal computer", 4th ed) 2005) */
    tsecgps = *fmjd * 86400.;
/* *** GPS time (sec of */
    tsecutc = gps2utc_(&tsecgps);
/* *** UTC time (sec of */
    fmjdutc = tsecutc / 86400.;
/* **** d = MJD - 51544.5d0                               !*** footnote */

/* *** UTC time (fract. */
    d = *mjd - 51544 + (fmjdutc - .5);
/* greenwich hour angle for J2000  (12:00:00 on 1 Jan 2000) */
/***** ghad = 100.46061837504d0 + 360.9856473662862d0*d  !*** eq. 2.85 (+d
igits)*/
/* *** days since */
    ghad = d * 360.9856473662862 + 280.46061837504;
/* *** normalize to 0-360 and convert to radians */
/* *** corrn.   (+ */
    i = (int) (ghad / 360.);
    *ghar = (ghad - i * 360.) / stuff_1.rad;
    while(*ghar > stuff_1.pi2) {
       *ghar -= stuff_1.pi2;
    }
    while(*ghar < 0.) {
       *ghar += stuff_1.pi2;
    }
    return 0;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
orb %cl, %al
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0xedf9a
pushq %rbp
movq %rsp, %rbp
movsd 0x1b11e(%rip), %xmm1    # 0x109018
movsd (%rsi), %xmm0
mulsd %xmm1, %xmm0
leaq 0x21f81f(%rip), %rax    # 0x30d728
cvtsi2sdl (%rax), %xmm2
subsd %xmm2, %xmm0
movl $0xffff36a8, %eax       # imm = 0xFFFF36A8
addl (%rdi), %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
divsd %xmm1, %xmm0
addsd 0x1da5d(%rip), %xmm0    # 0x10b988
addsd %xmm2, %xmm0
mulsd 0x3e671(%rip), %xmm0    # 0x12c5a8
addsd 0x3e671(%rip), %xmm0    # 0x12c5b0
movsd 0x301f1(%rip), %xmm1    # 0x11e138
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
divsd 0x28d509(%rip), %xmm0   # 0x37b470
movsd %xmm0, (%rdx)
movsd 0x28d50d(%rip), %xmm1   # 0x37b480
ucomisd %xmm1, %xmm0
jbe 0xedf7f
subsd %xmm1, %xmm0
jmp 0xedf67
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xedf99
addsd 0x28d4ed(%rip), %xmm0   # 0x37b480
movsd %xmm0, (%rdx)
jmp 0xedf85
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: rot3_(double*, double*, double*, double*, double*, double*, double*)
int rot3_(double *theta, double *x, double *y, 
        double *z, double *u, double *v, double *w)
{
    /* Local variables */
    static double c, s;

    /* rotate coordinate axes about 3 axis by angle of theta radians */
    /* x,y,z transformed into u,v,w */

    s = sin(*theta);
    c = cos(*theta);
    *u = c * *x + s * *y;
    *v = c * *y - s * *x;
    *w = *z;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, -0x30(%rbp)
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
movsd (%rdi), %xmm0
callq 0x9080
movsd %xmm0, 0x28d86b(%rip)   # 0x37b838
movsd (%rbx), %xmm0
callq 0x9710
movsd 0x28d85a(%rip), %xmm1   # 0x37b838
movsd (%r15), %xmm2
mulsd %xmm1, %xmm2
movsd (%r13), %xmm3
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%r12)
mulsd (%r13), %xmm1
mulsd (%r15), %xmm0
subsd %xmm1, %xmm0
movq -0x30(%rbp), %rax
movsd %xmm0, (%rax)
movsd (%r14), %xmm0
movq 0x10(%rbp), %rax
movsd %xmm0, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: lhsaaz_(double*, double*, double*, double*, double*, double*)
int lhsaaz_(double *u, double *v, double *w, 
        double *ra, double *az, double *va)
{
    /* Local variables */
    static double s, r2, s2;

    if(u == 0) return (-1); 
    if(v == 0) return (-1); 
    if(w == 0) return (-1); 
    if(ra == 0) return (-1); 
    if(az == 0) return (-1); 
    if(va == 0) return (-1); 

    /* determine range,azimuth,vertical angle from local horizon coord. */
    s2 = *u * *u + *v * *v;
    r2 = s2 + *w * *w;
    s = sqrt(s2);
    *ra = sqrt(r2);
    *az = atan2(*v, *u);
    *va = atan2(*w, s);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r15
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
testq %r12, %r12
sete %dl
orb %al, %dl
orb %cl, %dl
testq %r8, %r8
sete %al
testq %r9, %r9
sete %cl
orb %al, %cl
orb %dl, %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0xee12a
movq %r8, %r14
movq %rsi, %rbx
movq %rdi, %r13
movq %r9, -0x30(%rbp)
movsd (%rdi), %xmm1
movsd (%rsi), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd (%r15), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm1, %xmm1
movsd %xmm1, 0x28d719(%rip)   # 0x37b7f8
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xee0ef
sqrtsd %xmm0, %xmm0
jmp 0xee0f4
callq 0x9270
movsd %xmm0, (%r12)
movsd (%rbx), %xmm0
movsd (%r13), %xmm1
callq 0x9050
movsd %xmm0, (%r14)
movsd (%r15), %xmm0
movsd 0x28d6dd(%rip), %xmm1   # 0x37b7f8
callq 0x9050
movq -0x30(%rbp), %rax
movsd %xmm0, (%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: grav_force(double)
double grav_force(double jd)
{
double d;

   // jd is utc time
   d = 0.0;
   if(lat && lon) {  // only do this if lat/lon available
      d = calc_gals(jd, lat*180.0/PI, lon*180.0/PI, alt);

      calc_earth_tide(jd + jtime(0,0,utc_offset,0.0));  // uses GPS time
      d = alt_tide;
   }

   return d;
}

// Assembly:
movapd %xmm0, %xmm4
leaq 0x21ee8c(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0xee158
jnp 0xee1f4
leaq 0x21ee79(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm2
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm2
jne 0xee173
jnp 0xee1f4
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x1d6ad(%rip), %xmm0    # 0x10b830
mulsd %xmm0, %xmm1
movsd 0x1d699(%rip), %xmm3    # 0x10b828
divsd %xmm3, %xmm1
mulsd %xmm0, %xmm2
divsd %xmm3, %xmm2
leaq 0x21ee3e(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm3
movapd %xmm4, %xmm0
movsd %xmm4, -0x8(%rbp)
callq 0xea49b
leaq 0x21f56d(%rip), %rax    # 0x30d728
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
divsd 0x1ae46(%rip), %xmm0    # 0x109010
addsd 0x1af46(%rip), %xmm0    # 0x109118
divsd 0x1ae66(%rip), %xmm0    # 0x109040
addsd -0x8(%rbp), %xmm0
callq 0xead52
leaq 0x21ee6d(%rip), %rax    # 0x30d058
movsd (%rax), %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: get_islam_day(int, int, int)
int get_islam_day(int yy, int mm, int dd)
{
// islam_to_greg(yy-581, mm, dd);
// if(g_year == yy) return 581;

   islam_to_greg(yy-580, mm, dd);
   if(g_year == yy) return 580;

   islam_to_greg(yy-579, mm, dd);
   if(g_year == yy) return 579; // not in this year, try next year

   islam_to_greg(yy-578, mm, dd);
   if(g_year == yy) return 578; // not in this year, try next year

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %r15d
movl %edi, %ebx
leal -0x244(%rbx), %edi
callq 0xeea07
leaq 0x21e9fc(%rip), %r12    # 0x30d6a4
movl $0x244, %eax            # imm = 0x244
cmpl %ebx, (%r12)
je 0xeecee
leal -0x243(%rbx), %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0xeea07
movl $0x243, %eax            # imm = 0x243
cmpl %ebx, (%r12)
je 0xeecee
leal -0x242(%rbx), %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0xeea07
xorl %ecx, %ecx
cmpl %ebx, (%r12)
movl $0x242, %eax            # imm = 0x242
cmovnel %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: init_islamic(int)
void init_islamic(int year)
{
int mm;
int iyear;

   // calculate start of each Islamic month
   iyear = year - 578;
   while(iyear > 0) {  // find Islamic year that starts on or before this gregorian year
      islam_to_greg(iyear, 1, 1);
      if(g_year < this_year) break;
      else if((g_year == this_year) && (g_month == 1) && (g_day == 1)) break;
      --iyear;
   }

   for(mm=0; mm<=35; mm++) {  // find start of the next 36 islam months
      islam_to_greg(iyear+(mm/12), (mm%12)+1, 1);
      myears[mm] = iyear+(mm/12);
      mtimes[mm] = jdate(g_year, g_month, g_day);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leal -0x242(%rdi), %ebx
cmpl $0x243, %edi            # imm = 0x243
jl 0xeed64
leaq 0x21e98a(%rip), %r14    # 0x30d6a4
leaq 0x21e7ff(%rip), %r15    # 0x30d520
leaq 0x21e974(%rip), %r12    # 0x30d69c
leaq 0x21e971(%rip), %r13    # 0x30d6a0
movl %ebx, %edi
movl $0x1, %esi
movl $0x1, %edx
callq 0xeea07
movl (%r15), %eax
cmpl %eax, (%r14)
jl 0xeed64
jne 0xeed58
cmpl $0x1, (%r12)
jne 0xeed58
cmpl $0x1, (%r13)
je 0xeed64
leal -0x1(%rbx), %eax
cmpl $0x1, %ebx
movl %eax, %ebx
jg 0xeed2f
xorl %ebx, %ebx
leaq 0x28c245(%rip), %r15    # 0x37afb0
leaq 0x28c36e(%rip), %r12    # 0x37b0e0
xorl %r13d, %r13d
movl %r13d, %eax
movl $0xff, %ecx
andl %ecx, %eax
imull $0xab, %eax, %r14d
shrl $0xb, %r14d
leal (,%r14,4), %eax
leal (%rax,%rax,2), %eax
addl %ebx, %r14d
negl %eax
leal (%rax,%r13), %esi
incl %esi
andl %ecx, %esi
movl %r14d, %edi
movl $0x1, %edx
callq 0xeea07
movl %r14d, (%r12)
leaq 0x21e8ea(%rip), %rax    # 0x30d6a4
movl (%rax), %edi
leaq 0x21e8d9(%rip), %rax    # 0x30d69c
movl (%rax), %esi
leaq 0x21e8d4(%rip), %rax    # 0x30d6a0
movl (%rax), %edx
callq 0xd485e
movsd %xmm0, (%r15)
incq %r13
addq $0x8, %r15
addq $0x4, %r12
cmpq $0x24, %r13
jne 0xeed75
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: init_druid(int)
void init_druid(int year)
{
double jd;
int mm;

   jd = jdate(year-1, 12, 24);  // Druid year starts on 24 Dec
   jd += (double) druid_epoch;  // kludge to allow tweak to start of calendar
   for(mm=0; mm<=13; mm++) {    // the Juilan time of the start of each month
      dyears[mm] = year;        // assume druid year is the Gregorian year
      dtimes[mm] = jd;          // ... that holds most of the Druid year
      jd += 28.0;               // Druid months are 28 days long
   }

   dtimes[14] = jdate(year, 12, 24);
   dtimes[14] += (double) druid_epoch; 
   dyears[14] = year+1;
   dtimes[15] = dtimes[14]+28.0;
   dyears[15] = year+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %edi, %rsi
leaq -0x1(%rsi), %rax
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
cltq
imulq $-0x64, %rax, %rcx
imulq $0x23ab1, %rax, %rax    # imm = 0x23AB1
leaq 0x3(%rax), %r9
testq %rax, %rax
cmovnsq %rax, %r9
leaq (%rcx,%rsi), %rax
decq %rax
sarq $0x2, %r9
imulq $0x8ead, %rax, %rcx     # imm = 0x8EAD
movabsq $-0x5c28f5c28f5c28f5, %r8 # imm = 0xA3D70A3D70A3D70B
movq %rcx, %rax
imulq %r8
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
cvtsi2sd %r9, %xmm0
addsd 0x3c97c(%rip), %xmm0    # 0x12b7e8
addq %rax, %rdx
cvtsi2sd %rdx, %xmm1
addsd %xmm0, %xmm1
addsd 0x3d7a8(%rip), %xmm1    # 0x12c628
addsd 0x1a1b8(%rip), %xmm1    # 0x109040
leaq 0x12c5c1(%rip), %rax    # 0x21b450
xorps %xmm0, %xmm0
cvtsi2sdq (%rax), %xmm0
addsd %xmm0, %xmm1
leaq 0x28c4ae(%rip), %rax    # 0x37b350
xorl %ecx, %ecx
leaq 0x28c545(%rip), %rdx    # 0x37b3f0
movsd 0x3d77d(%rip), %xmm2    # 0x12c630
movl %edi, (%rcx,%rdx)
movsd %xmm1, (%rax)
addsd %xmm2, %xmm1
addq $0x8, %rax
addq $0x4, %rcx
cmpq $0x38, %rcx
jne 0xeeeb3
imulq $0x51eb851f, %rsi, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
cltq
imulq $-0x64, %rax, %rcx
addq %rsi, %rcx
imulq $0x23ab1, %rax, %rax    # imm = 0x23AB1
leaq 0x3(%rax), %rsi
testq %rax, %rax
cmovnsq %rax, %rsi
sarq $0x2, %rsi
imulq $0x8ead, %rcx, %rcx     # imm = 0x8EAD
movq %rcx, %rax
imulq %r8
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
xorps %xmm1, %xmm1
cvtsi2sd %rsi, %xmm1
addsd 0x3c8be(%rip), %xmm1    # 0x12b7e8
addq %rax, %rdx
xorps %xmm2, %xmm2
cvtsi2sd %rdx, %xmm2
addsd %xmm1, %xmm2
addsd 0x3d6e7(%rip), %xmm2    # 0x12c628
addsd 0x1a0f7(%rip), %xmm2    # 0x109040
addsd %xmm0, %xmm2
movsd %xmm2, 0x28c46b(%rip)   # 0x37b3c0
incl %edi
movl %edi, 0x28c4cb(%rip)    # 0x37b428
addsd 0x3d6cb(%rip), %xmm2    # 0x12c630
movsd %xmm2, 0x28c45b(%rip)   # 0x37b3c8
movl %edi, 0x28c4b9(%rip)    # 0x37b42c
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: init_indian(int)
void init_indian(int year)
{
   // India civil calendar
   itimes[0] = jdate(year-1, 12, 22);  // start of Pau the year before
   itimes[1] = itimes[0] + 30.0;           // Mag
   itimes[2] = itimes[1] + 30.0;           // Pha
   itimes[3] = itimes[2] + 30.0;           // start of Cai
   if(leap_year(year-79+78)) itimes[3] -= 1.0;  // adjust for leap years
   itimes[4] = itimes[3] + 31.0;           // Vai
   itimes[5] = itimes[4] + 31.0;           // Jya
   itimes[6] = itimes[5] + 31.0;           // Asa
   itimes[7] = itimes[6] + 31.0;           // Sra
   itimes[8] = itimes[7] + 31.0;           // Bha
   itimes[9] = itimes[8] + 31.0;           // Asv

   itimes[10] = itimes[9]  + 30.0;         // Kar
   itimes[11] = itimes[10] + 30.0;         // Agr
   itimes[12] = itimes[11] + 30.0;         // Pau
   itimes[13] = itimes[12] + 30.0;         // Mag
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %edi, %rax
leaq -0x1(%rax), %rcx
imulq $0x51eb851f, %rcx, %rsi # imm = 0x51EB851F
movq %rsi, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rsi
addl %ecx, %esi
movslq %esi, %rcx
imulq $-0x64, %rcx, %rdx
addq %rdx, %rax
decq %rax
imulq $0x23ab1, %rcx, %rcx    # imm = 0x23AB1
leaq 0x3(%rcx), %r8
testq %rcx, %rcx
cmovnsq %rcx, %r8
sarq $0x2, %r8
imulq $0x8ead, %rax, %rcx     # imm = 0x8EAD
movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B
movq %rcx, %rax
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
addq %rax, %rdx
cvtsi2sd %r8, %xmm1
addsd 0x3c660(%rip), %xmm1    # 0x12b7e8
cvtsi2sd %rdx, %xmm0
addsd %xmm1, %xmm0
addsd 0x3d48f(%rip), %xmm0    # 0x12c628
leal -0x1(%rdi), %eax
addsd 0x3d494(%rip), %xmm0    # 0x12c638
movsd %xmm0, 0x28bd94(%rip)   # 0x37af40
movsd 0x1c74c(%rip), %xmm1    # 0x10b900
addsd %xmm1, %xmm0
movsd %xmm0, 0x28bd88(%rip)   # 0x37af48
addsd %xmm1, %xmm0
movsd %xmm0, 0x28bd84(%rip)   # 0x37af50
addsd %xmm1, %xmm0
movsd %xmm0, 0x28bd80(%rip)   # 0x37af58
testb $0x3, %al
jne 0xef21a
imull $0x64, %esi, %ecx
negl %ecx
addl %edi, %ecx
decl %ecx
testl %ecx, %ecx
jne 0xef20a
movslq %eax, %rcx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x27, %rcx
addl %edx, %ecx
imull $0x190, %ecx, %ecx      # imm = 0x190
subl %ecx, %eax
jne 0xef21a
addsd 0x19ee6(%rip), %xmm0    # 0x1090f8
movsd %xmm0, 0x28bd3e(%rip)   # 0x37af58
movsd 0x3cabe(%rip), %xmm2    # 0x12bce0
addsd %xmm2, %xmm0
movsd %xmm0, 0x28bd32(%rip)   # 0x37af60
addsd %xmm2, %xmm0
movsd %xmm0, 0x28bd2e(%rip)   # 0x37af68
addsd %xmm2, %xmm0
movsd %xmm0, 0x28bd2a(%rip)   # 0x37af70
addsd %xmm2, %xmm0
movsd %xmm0, 0x28bd26(%rip)   # 0x37af78
addsd %xmm2, %xmm0
movsd %xmm0, 0x28bd22(%rip)   # 0x37af80
addsd %xmm2, %xmm0
movsd %xmm0, 0x28bd1e(%rip)   # 0x37af88
addsd %xmm1, %xmm0
movsd %xmm0, 0x28bd1a(%rip)   # 0x37af90
addsd %xmm1, %xmm0
movsd %xmm0, 0x28bd16(%rip)   # 0x37af98
addsd %xmm1, %xmm0
movsd %xmm0, 0x28bd12(%rip)   # 0x37afa0
addsd %xmm1, %xmm0
movsd %xmm0, 0x28bd0e(%rip)   # 0x37afa8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: load_china_year(int, int)
int load_china_year(int year, int mm)
{
int i;
int index;
int month, months;
double days;

   index = year - 2009;
   if(china_data[index].leap_month) months = 13;
   else                             months = 12;
   year = year + 4635 - 1998 + 60;  // note +60 years is common in the US

   ctimes[mm] = china_data[index].jd;
   month = 1;
   for(i=mm; i<mm+months; i++) {
      cyear[i]  = year;
      cmonth[i] = month;
      if(china_data[index].leap_month) {  // this year has a leap month
         if((i-mm+1) != china_data[index].leap_month) ++month;
      }
      else {
         ++month;
      }

      if(china_data[index].month_mask & (1 << (i-mm))) days = 30.0;
      else                                             days = 29.0;
      ctimes[i+1] = ctimes[i] + days;
   }
   if(china_data[index].leap_month) {
      cmonth[china_data[index].leap_month] *= (-1);
   }

   return months;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq %edi, %r8
leaq 0x7b86d(%rip), %r9      # 0x16ab20
movzbl -0x3ec6(%r9,%r8,8), %ecx
cmpq $0x1, %rcx
movl $0xd, %eax
sbbl $0x0, %eax
leal 0xa89(%r8), %edx
cvtss2sd -0x3ec4(%r9,%r8,8), %xmm0
movslq %esi, %rsi
leaq 0x28b7cd(%rip), %rdi    # 0x37aab0
leaq 0x8(%rdi,%rsi,8), %rdi
movsd %xmm0, -0x8(%rdi)
movq %rax, -0x30(%rbp)
leal (%rsi,%rax), %r10d
movzwl -0x3ec8(%r9,%r8,8), %r8d
movslq %r10d, %r9
leaq -0x1(%rcx), %r10
leaq (,%rsi,4), %rbx
movl $0x1, %r14d
xorl %r15d, %r15d
leaq 0x28b973(%rip), %rax    # 0x37ac90
leaq 0x3d61c(%rip), %r13     # 0x12c940
testq %rcx, %rcx
leaq (%rbx,%r15,4), %r11
leaq 0x28b8be(%rip), %r12    # 0x37abf0
movl %edx, (%r12,%r11)
movl %r14d, (%rax,%r11)
sete %r11b
cmpl %r15d, %r10d
movq %rax, %r12
setne %al
orb %r11b, %al
movzbl %al, %eax
addl %eax, %r14d
xorl %eax, %eax
btl %r15d, %r8d
setae %al
addsd (%r13,%rax,8), %xmm0
movsd %xmm0, (%rdi,%r15,8)
leaq (%rsi,%r15), %rax
incq %rax
incq %r15
cmpq %r9, %rax
movq %r12, %rax
jl 0xef324
testq %rcx, %rcx
je 0xef380
negl (%rax,%rcx,4)
movq -0x30(%rbp), %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: init_chinese(int)
void init_chinese(int year)
{
int month;

   if((year < 2010) || (year > 2100)) return;
   month = 0;
   month += load_china_year(year-1, month);
   month += load_china_year(year+0, month);
   month += load_china_year(year+1, month);
//FILE *f;
//int i;
//f = topen("abcd", "w");
//for(i=0; i<40; i++) {
//   fprintf(f, "%.1f %d %d\n", ctimes[i], cyear[i], cmonth[i]);
//}
//fclose(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leal -0x835(%rbx), %eax
cmpl $-0x5b, %eax
jae 0xef3a8
popq %rbx
popq %r14
popq %rbp
retq
leal -0x1(%rbx), %edi
xorl %esi, %esi
callq 0xef29c
movl %eax, %r14d
movl %ebx, %edi
movl %eax, %esi
callq 0xef29c
addl %eax, %r14d
incl %ebx
movl %ebx, %edi
movl %r14d, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xef29c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: calc_vs(double)
double calc_vs(double jdme)
{
int i;
double t;
double s;
double w, jd, l;

   t = (jdme - JD2000) / 36525.0;    // Julian centuries from 2000 (of equ/sol).

   s = 0.0;
   for(i=0; i<=23; i++) {
      s = s + sol[i].a*cos(sol[i].b + sol[i].c*t);
   }

   w = (35999.373*t - 2.47)*DEG_TO_RAD; // radians
   l = 1.0 + 0.0334*cos(w) + 0.0007*cos(2.0*w);
   jd = jdme + (0.00001*s/l);           // the final result in Julian Dynamical Days.
   return jd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movsd 0x3c3aa(%rip), %xmm1    # 0x12b830
movsd %xmm0, -0x30(%rbp)
addsd %xmm0, %xmm1
divsd 0x3c3a1(%rip), %xmm1    # 0x12b838
movsd %xmm1, -0x18(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movl $0x10, %ebx
leaq 0x80ebf(%rip), %r14     # 0x170370
movsd -0x10(%rbx,%r14), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd (%rbx,%r14), %xmm0
mulsd -0x18(%rbp), %xmm0
addsd -0x8(%rbx,%r14), %xmm0
callq 0x9710
mulsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
addq $0x18, %rbx
cmpq $0x250, %rbx            # imm = 0x250
jne 0xef4b1
movsd -0x18(%rbp), %xmm0
mulsd 0x3d13f(%rip), %xmm0    # 0x12c640
addsd 0x3d13f(%rip), %xmm0    # 0x12c648
mulsd 0x1c3ff(%rip), %xmm0    # 0x10b910
movsd %xmm0, -0x18(%rbp)
callq 0x9710
mulsd 0x3d12d(%rip), %xmm0    # 0x12c650
addsd 0x19b45(%rip), %xmm0    # 0x109070
movsd %xmm0, -0x20(%rbp)
movsd -0x18(%rbp), %xmm0
addsd %xmm0, %xmm0
callq 0x9710
mulsd 0x3d112(%rip), %xmm0    # 0x12c658
movsd -0x28(%rbp), %xmm1
mulsd 0x1c335(%rip), %xmm1    # 0x10b888
addsd -0x20(%rbp), %xmm0
divsd %xmm0, %xmm1
addsd -0x30(%rbp), %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: is_holiday(int, int, int)
int is_holiday(int pri_year,int pri_month,int pri_day)
{
int i;
int dow;
int day;

   if(no_greetings) return 0;

   for(i=0; i<calendar_entries; i++) { // is it a special day?
      if(holiday[i].month == 0) continue;

      day = holiday[i].day;
      if(day < 0) ;   // day number for dates like Friday the 13th (would be -13)
      else if(pri_month != holiday[i].month) continue;

      if((holiday[i].nth != 0) && (holiday[i].nth < 100)) {
         day = nth_dow_in(holiday[i].nth, day, pri_month, pri_year);
      }
      if(day < 0) {
         day = 0 - day;
         dow = day_of_week(pri_day,pri_month,pri_year);
         if(dow != holiday[i].month) continue;
      }
      if(day != pri_day) continue;
      return 1;
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, -0x2c(%rbp)
leaq 0x12bc69(%rip), %rcx    # 0x21b41b
xorl %eax, %eax
cmpb $0x0, (%rcx)
jne 0xef8d7
leaq 0x12902c(%rip), %r13    # 0x2187f0
cmpl $0x0, (%r13)
jle 0xef8d7
movl %edx, %r12d
movl %esi, %r14d
xorl %eax, %eax
cmpl $0x3, %esi
setl %al
movl -0x2c(%rbp), %ecx
subl %eax, %ecx
leal 0x3(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x2, %eax
movslq %ecx, %rdi
imulq $-0x51eb851f, %rdi, %rcx # imm = 0xAE147AE1
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imulq $0x51eb851f, %rdi, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x27, %rdx
addl %esi, %edx
movslq %r14d, %rsi
movq %rsi, -0x38(%rbp)
addl %r12d, %edi
addl %eax, %edi
addl %ecx, %edi
addl %edx, %edi
movq %rdi, -0x40(%rbp)
leaq 0x7b625(%rip), %r15     # 0x16ae58
xorl %ebx, %ebx
movl (%r15), %ecx
testl %ecx, %ecx
je 0xef8ba
movl -0x4(%r15), %eax
testl %eax, %eax
setns %dl
cmpl %r14d, %ecx
setne %cl
testb %dl, %cl
jne 0xef8ba
movl -0x8(%r15), %edi
testl %edi, %edi
sete %cl
cmpl $0x64, %edi
setge %dl
orb %cl, %dl
jne 0xef86f
movl %eax, %esi
movl %r14d, %edx
movl -0x2c(%rbp), %ecx
callq 0xe085c
testl %eax, %eax
jns 0xef8b5
movq -0x38(%rbp), %rcx
leaq 0x3bd12(%rip), %rdx     # 0x12b590
movzbl -0x1(%rcx,%rdx), %ecx
addl -0x40(%rbp), %ecx
movslq %ecx, %rcx
imulq $-0x6db6db6d, %rcx, %rdx # imm = 0x92492493
shrq $0x20, %rdx
addl %ecx, %edx
movl %edx, %esi
shrl $0x1f, %esi
sarl $0x2, %edx
addl %esi, %edx
leal (,%rdx,8), %esi
subl %esi, %edx
addl %ecx, %edx
movzbl %dl, %ecx
cmpl %ecx, (%r15)
jne 0xef8ba
negl %eax
cmpl %r12d, %eax
je 0xef8d2
incq %rbx
movslq (%r13), %rax
addq $0x18, %r15
cmpq %rax, %rbx
jl 0xef835
xorl %eax, %eax
jmp 0xef8d7
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: calc_moon_posn(int)
void calc_moon_posn(int watch)
{
double maz,mel;
int r;

   if(map_and_watch && (watch == 0)) {
      r = AZEL_RADIUS;
      moon_size = (AZEL_RADIUS/4);
   }
   else {
      r = ACLOCK_R;
      moon_size = (ACLOCK_R/4);
   }

   mel = moon_el;
   if(mel < 0.0) {
      mel = 0.0 - mel;
      moon_color = GREY;
   }
   mel = (mel - 90.0F) / 90.0F;

   maz = moon_az;
   maz += 90.0F;
   if(maz >= 360.0) maz -= 360.0;
   if(maz <= 360.0) maz += 360.0;
   moon_x = (int) (mel * cos360((int)maz) * r);
   moon_y = (int) (mel * sin360((int)maz) * r);
//sprintf(plot_title, "ACLOCK:%d  AZEL:%d  maw:%d", ACLOCK_R,AZEL_RADIUS, map_and_watch);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
leaq 0x129c32(%rip), %rax    # 0x21b410
cmpb $0x0, (%rax)
setne %al
testl %edi, %edi
sete %cl
leaq 0x249b80(%rip), %rdx    # 0x33b370
testb %al, %cl
cmovneq 0x5e6ae(%rip), %rdx     # 0x14fea8
leaq 0x12700f(%rip), %rax    # 0x218810
cmovneq 0x5e75f(%rip), %rax     # 0x14ff68
movl (%rdx), %ecx
movl %ecx, %ebx
shrl $0x1f, %ebx
addl %ecx, %ebx
sarl %ebx
subl (%rax), %ebx
leal 0x3(%rbx), %eax
testl %ebx, %ebx
cmovnsl %ebx, %eax
sarl $0x2, %eax
movl %eax, 0x288531(%rip)    # 0x379d58
leaq 0x21bfc2(%rip), %rax    # 0x30d7f0
movsd (%rax), %xmm4
xorpd %xmm0, %xmm0
ucomisd %xmm4, %xmm0
jbe 0xf184e
subsd %xmm4, %xmm0
movl $0x8, 0x78df6(%rip)     # 0x16a640
movapd %xmm0, %xmm4
leaq 0x21bf93(%rip), %rax    # 0x30d7e8
movsd 0x1a0bb(%rip), %xmm0    # 0x10b918
movsd (%rax), %xmm1
addsd %xmm0, %xmm1
movsd 0x3a25b(%rip), %xmm2    # 0x12bac8
addsd %xmm1, %xmm2
movsd 0x2c8bf(%rip), %xmm5    # 0x11e138
movapd %xmm5, %xmm3
cmpnlesd %xmm1, %xmm3
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm3
orpd %xmm1, %xmm3
movapd %xmm3, %xmm1
cmpnlesd %xmm5, %xmm1
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
addsd %xmm5, %xmm3
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd 0x3ae8d(%rip), %xmm4    # 0x12c740
divsd %xmm0, %xmm4
movsd %xmm4, -0x10(%rbp)
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
movapd %xmm0, -0x30(%rbp)
movapd %xmm5, %xmm1
callq 0x94d0
divsd 0x17886(%rip), %xmm0    # 0x109160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
movsd %xmm1, -0x18(%rbp)
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x28844a(%rip)    # 0x379d50
movapd -0x30(%rbp), %xmm0
movsd 0x2c825(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x17840(%rip), %xmm0    # 0x109160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x10(%rbp), %xmm0
mulsd -0x18(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x288413(%rip)    # 0x379d54
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: set_marker_size(int)
int set_marker_size(int prn)
{
int marker_size;

   if(prn < 0) return 0;
   if(prn > SUN_MOON_PRN) return 0;

   marker_size = (int) sat[prn].sig_level;
if((rcvr_type == UBX_RCVR) && (prn != SUN_PRN)) marker_size += (marker_size / 3);  // UBX receivers have smaller sig level values
   if(marker_size < 0) marker_size = 0 - marker_size;
   if(amu_mode == 0) {
       marker_size -= 30;  // 30 dBc represents our minimum marker size
   }

   if(marker_size > MAX_MARKER_SIZE) marker_size = MAX_MARKER_SIZE;   // and 44 dBc is our max size
   else if(marker_size < MIN_MARKER_SIZE) marker_size = MIN_MARKER_SIZE;
   marker_size = (int) (((float) marker_size) / (float) MAX_MARKER_SIZE * (float) AZEL_SIZE/20.0F);
   if(marker_size < MIN_MARKER_SIZE) marker_size = MIN_MARKER_SIZE;

   return marker_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x3e9, %edi            # imm = 0x3E9
jbe 0xf34ef
xorl %eax, %eax
jmp 0xf358c
movl %edi, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
leaq 0x14bab1(%rip), %rcx    # 0x23efb0
cvttss2si 0x20(%rcx,%rax), %eax
cmpl $0x3e8, %edi            # imm = 0x3E8
je 0xf3532
leaq 0x1253bc(%rip), %rcx    # 0x2188d0
cmpq $0x4, (%rcx)
jne 0xf3532
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
addl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
leaq 0x14b9b0(%rip), %rax    # 0x23eef0
leal -0x1e(%rcx), %edx
cmpb $0x0, (%rax)
cmovnel %ecx, %edx
cmpl $0x4, %edx
movl $0x3, %eax
cmovll %eax, %edx
cmpl $0xe, %edx
movl $0xe, %ecx
cmovll %edx, %ecx
cvtsi2ss %ecx, %xmm0
divss 0x3926d(%rip), %xmm0    # 0x12c7d8
leaq 0x247e1a(%rip), %rcx    # 0x33b38c
cvtsi2ssl (%rcx), %xmm1
mulss %xmm0, %xmm1
divss 0x2b4ce(%rip), %xmm1    # 0x11ea50
cvttss2si %xmm1, %ecx
cmpl $0x4, %ecx
cmovgel %ecx, %eax
popq %rbp
retq