LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: rosh_jd(int)
double rosh_jd(int y)
{
int g;
double r;
double jd;
int i, j;
int day, month;

   // return Julian date of Rosh Hashanha
   g = (y % 19) + 1;
   j = (12 * g) % 19;
   i = (y/100) - (y/400) - 2;
   r = (double) (int) (y%4);
   r = (765433.0/492480.0*(double) j) + (r/4.0) - ((313.0 * ((double) y) + 89081.0)/98496.0);
   r += (double) i;
// r = 6.057778996 + (1.554241797*(double) j) + 0.25*r - 0.003177794*(double)y,

   day = (int) r;
   r -= (double) day;
   month = 9;
   if(day > 30) { day-=30; ++month; }

   i = day_of_week(day, month, y);
   jd = jdate(y, month, day);

   // apply the postponements
   if((i == 0) || (i == 3) || (i == 5)) {
      jd += 1.0;
   }
   else if(i == 1) {
      if((r >= 23269.0/25920.0) && (j > 6)) jd += 1.0;
   }
   else if(i == 2) {
      if((r >= 1367.0/2160.0) && (j > 6)) jd += 2.0;
   }
   return jd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %r14d
pushq $0x13
popq %rcx
movl %edi, %eax
cltd
idivl %ecx
imull $0xc, %edx, %eax
addl $0xc, %eax
cwtd
movw $0x13, %cx
idivw %cx
movl %edx, %ebx
pushq $0x64
popq %rcx
movl %edi, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl $0xfffffe70, %esi       # imm = 0xFFFFFE70
movl %edi, %eax
cltd
idivl %esi
movl %eax, %esi
pushq $0x4
popq %rdi
movl %r14d, %eax
cltd
idivl %edi
cvtsi2sd %edx, %xmm0
movswl %bx, %eax
cvtsi2sd %eax, %xmm1
mulsd 0x1bd12(%rip), %xmm0    # 0xf59e0
mulsd 0x3c822(%rip), %xmm1    # 0x1164f8
leal -0x2(%rcx,%rsi), %eax
addsd %xmm0, %xmm1
cvtsi2sd %r14d, %xmm0
mulsd 0x3c815(%rip), %xmm0    # 0x116500
addsd 0x3c815(%rip), %xmm0    # 0x116508
divsd 0x3c815(%rip), %xmm0    # 0x116510
cvtsi2sd %eax, %xmm2
addsd %xmm1, %xmm0
addsd %xmm0, %xmm2
movapd %xmm2, -0x40(%rbp)
cvttsd2si %xmm2, %eax
leal -0x1e(%rax), %r12d
xorl %r13d, %r13d
cmpl $0x1f, %eax
setge %r13b
cmovll %eax, %r12d
addl $0x9, %r13d
movl %r12d, %edi
movl %r13d, %esi
movl %r14d, %edx
callq 0xcd7b8
movl %eax, %r15d
movl %r14d, %edi
movl %r13d, %esi
movl %r12d, %edx
callq 0xc2f07
cmpb $0x5, %r15b
ja 0xd9d78
movapd -0x40(%rbp), %xmm2
cvttpd2dq %xmm2, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm2
movzbl %r15b, %eax
leaq 0x3b399(%rip), %rcx     # 0x115100
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addsd 0x192f8(%rip), %xmm0    # 0xf3070
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
ucomisd 0x3c791(%rip), %xmm2    # 0x116520
jb 0xd9d78
cmpw $0x7, %bx
jge 0xd9d70
jmp 0xd9d78
ucomisd 0x3c777(%rip), %xmm2    # 0x116518
jb 0xd9d78
cmpw $0x7, %bx
jl 0xd9d78
addsd 0x1bc97(%rip), %xmm0    # 0xf5a48
jmp 0xd9d78
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd9fff
leaq 0x21d478(%rip), %r12    # 0x2f76a4
movl $0x244, %eax            # imm = 0x244
cmpl %ebx, (%r12)
je 0xda272
leal -0x243(%rbx), %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0xd9fff
movl $0x243, %eax            # imm = 0x243
cmpl %ebx, (%r12)
je 0xda272
leal -0x242(%rbx), %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0xd9fff
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_O2/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
movl %edi, %r15d
addl $0xfffffdbe, %r15d      # imm = 0xFFFFFDBE
pushq $0x1
popq %r14
leaq 0x21d282(%rip), %rbx    # 0x2f7520
testl %r15d, %r15d
jle 0xda2dd
movl %r15d, %edi
movl %r14d, %esi
movl %r14d, %edx
callq 0xd9fff
movl (%rbx), %eax
leaq 0x21d3ea(%rip), %rcx    # 0x2f76a4
cmpl %eax, (%rcx)
jl 0xda2dd
jne 0xda2d8
leaq 0x21d3d5(%rip), %rax    # 0x2f769c
cmpl $0x1, (%rax)
jne 0xda2d8
leaq 0x21d3cd(%rip), %rax    # 0x2f76a0
cmpl $0x1, (%rax)
je 0xda2dd
decl %r15d
jmp 0xda29e
movl %r15d, -0x2c(%rbp)
leaq 0x28acc8(%rip), %r13    # 0x364fb0
leaq 0x28adf1(%rip), %r15    # 0x3650e0
xorl %r14d, %r14d
xorl %ebx, %ebx
movl %r14d, %eax
xorl %edx, %edx
pushq $0xc
popq %rcx
divl %ecx
movl %eax, %r12d
movzbl %bl, %eax
movb $0xc, %cl
divb %cl
cmpq $0x24, %rbx
je 0xda367
movzbl %al, %eax
imull $-0xc, %eax, %eax
movzbl %al, %eax
incq %rax
addl -0x2c(%rbp), %r12d
addl %ebx, %eax
movzbl %al, %esi
movl %r12d, %edi
pushq $0x1
popq %rdx
callq 0xd9fff
movl %r12d, (%r15)
leaq 0x21d36c(%rip), %rax    # 0x2f76a4
movl (%rax), %edi
leaq 0x21d35b(%rip), %rax    # 0x2f769c
movl (%rax), %esi
leaq 0x21d356(%rip), %rax    # 0x2f76a0
movl (%rax), %edx
callq 0xc2f07
movsd %xmm0, (%r13)
incq %rbx
addq $0x8, %r13
addq $0x4, %r15
incl %r14d
jmp 0xda2f4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
pushq %rax
movl %edi, %ebx
leal -0x1(%rbx), %edi
pushq $0xc
popq %rsi
pushq $0x18
popq %rdx
callq 0xc2f07
leaq 0x12b0bd(%rip), %rax    # 0x205450
cvtsi2sdq (%rax), %xmm1
movsd %xmm1, -0x10(%rbp)
addsd %xmm1, %xmm0
leaq 0x28afa8(%rip), %rax    # 0x365350
xorl %ecx, %ecx
leaq 0x28b03f(%rip), %rdx    # 0x3653f0
movsd 0x3c19f(%rip), %xmm1    # 0x116558
cmpq $0x38, %rcx
je 0xda3d4
movl %ebx, (%rcx,%rdx)
movsd %xmm0, (%rax)
addsd %xmm1, %xmm0
addq $0x4, %rcx
addq $0x8, %rax
jmp 0xda3b9
pushq $0xc
popq %rsi
pushq $0x18
popq %rdx
movl %ebx, %edi
callq 0xc2f07
addsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x28afd2(%rip)   # 0x3653c0
incl %ebx
movl %ebx, 0x28b032(%rip)    # 0x365428
addsd 0x3c15a(%rip), %xmm0    # 0x116558
movsd %xmm0, 0x28afc2(%rip)   # 0x3653c8
movl %ebx, 0x28b020(%rip)    # 0x36542c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: init_persian(int)
void init_persian(int year)
{
double jd;
int leap;
int mm;

// gregorian(0, spring-365.24238426);    // time of spring in GMT of last year;
// jd = jdate(g_year, g_month, g_day);   // jdate of start of spring
// if((jd - (3.5/24.0) + (12.0/24.0)) > spring) {  // it's after noon in Tehran
//    jd += 1.0;  //!!! kludge - we should be using solar noon in Tehran
// }

   leap = year-621-1;               // start calculating from last year
   leap %= 33;                      // leap years on 33 year cycles
   if     (leap == 1)  leap = 20;   // leap years start on 20 March
   else if(leap == 5)  leap = 20;
   else if(leap == 9)  leap = 20;
   else if(leap == 13) leap = 20;
   else if(leap == 17) leap = 20;
   else if(leap == 22) leap = 20;
   else if(leap == 26) leap = 20;
   else if(leap == 30) leap = 20;
   else                leap = 21;

   jd = jdate(year-1, 3, leap);  // first day of the previous persian year

   ptimes[0] = jd;
   pyears[0] = year-621-1;

   for(mm=0+1; mm<=36; mm++) { // calculate next 36 months
      if     ((mm%12) <= 6)  ptimes[mm] = ptimes[mm-1] + 31.0;
      else if((mm%12) <= 11) ptimes[mm] = ptimes[mm-1] + 30.0;
      if((mm == 12) || (mm == 24) || (mm == 36)) {  // first month of the next year
         if(leap == 20)  ptimes[mm] = ptimes[mm-1] + 30.0;  // set length of the previous month
         else            ptimes[mm] = ptimes[mm-1] + 29.0;
      }
      pyears[mm] = (year-621-1) + (mm/12);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leal -0x26e(%rdi), %ebx
pushq $0x21
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
cmpl $0x1e, %edx
ja 0xda50d
movl $0x44422222, %eax       # imm = 0x44422222
btl %edx, %eax
jae 0xda50d
pushq $0x14
popq %rdx
movsd 0x1b52b(%rip), %xmm0    # 0xf5978
movsd %xmm0, -0x20(%rbp)
decl %edi
pushq $0x3
popq %rsi
callq 0xc2f07
movsd %xmm0, 0x28ad1c(%rip)   # 0x365180
movl %ebx, 0x28ae46(%rip)    # 0x3652b0
movb $0x1, %cl
xorl %edi, %edi
movb $0xc, %dl
leaq 0x3c3d9(%rip), %rsi     # 0x116850
leaq 0x28ad02(%rip), %r8     # 0x365180
leaq 0x28ae2b(%rip), %r9     # 0x3652b0
movabsq $0x1001001000, %r10     # imm = 0x1001001000
movsd -0x20(%rbp), %xmm1
movzbl %cl, %eax
divb %dl
cmpq $0x24, %rdi
je 0xda502
movzbl %al, %eax
imull $-0xc, %eax, %eax
movzbl %al, %r14d
incq %r14
leaq 0x1(%rdi), %r11
addl %edi, %r14d
movzbl %r11b, %eax
divb %dl
xorl %r15d, %r15d
cmpb $0x7, %r14b
setb %r15b
addsd (%rsi,%r15,8), %xmm0
movsd %xmm0, 0x8(%r8,%rdi,8)
cmpl $0x24, %r11d
ja 0xda4f1
movl %r11d, %r14d
btq %r14, %r10
jae 0xda4f1
movsd (%r8,%rdi,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%r8,%rdi,8)
movzbl %al, %eax
addl %ebx, %eax
movl %eax, 0x4(%r9,%rdi,4)
incb %cl
movq %r11, %rdi
jmp 0xda494
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x15
popq %rdx
movsd 0x3c020(%rip), %xmm0    # 0x116538
jmp 0xda44d
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
pushq %rax
movl %edi, %ebx
decl %ebx
pushq $0xc
popq %rsi
pushq $0x16
popq %rdx
movl %ebx, %edi
callq 0xc2f07
movsd %xmm0, 0x28aa04(%rip)   # 0x364f40
movsd 0x1b434(%rip), %xmm1    # 0xf5978
addsd %xmm1, %xmm0
movsd %xmm0, 0x28a9f8(%rip)   # 0x364f48
addsd %xmm1, %xmm0
movsd %xmm0, 0x28a9f4(%rip)   # 0x364f50
addsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movl %ebx, %edi
callq 0xcd71e
testl %eax, %eax
je 0xda57f
movsd -0x10(%rbp), %xmm1
addsd 0x18b7b(%rip), %xmm1    # 0xf30f8
jmp 0xda584
movsd -0x10(%rbp), %xmm1
movsd %xmm1, 0x28a9cc(%rip)   # 0x364f58
movsd 0x3b67c(%rip), %xmm0    # 0x115c10
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a9c0(%rip)   # 0x364f60
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a9bc(%rip)   # 0x364f68
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a9b8(%rip)   # 0x364f70
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a9b4(%rip)   # 0x364f78
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a9b0(%rip)   # 0x364f80
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a9ac(%rip)   # 0x364f88
movsd 0x1b394(%rip), %xmm0    # 0xf5978
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a9a0(%rip)   # 0x364f90
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a99c(%rip)   # 0x364f98
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a998(%rip)   # 0x364fa0
addsd %xmm0, %xmm1
movsd %xmm1, 0x28a994(%rip)   # 0x364fa8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7a4ee(%rip), %r9      # 0x154b20
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 0x28a44e(%rip), %rdi    # 0x364ab0
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 0x3c1c4(%rip), %r13     # 0x116860
leaq (%rsi,%r15), %r11
cmpq %r9, %r11
jge 0xda6f0
testq %rcx, %rcx
sete %r11b
leaq (%rbx,%r15,4), %rax
leaq 0x28a539(%rip), %r12    # 0x364bf0
movl %edx, (%r12,%rax)
leaq 0x28a5ce(%rip), %r12    # 0x364c90
movl %r14d, (%r12,%rax)
cmpl %r15d, %r10d
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)
incq %r15
jmp 0xda69c
testq %rcx, %rcx
je 0xda6ff
leaq 0x28a594(%rip), %rax    # 0x364c90
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_O2/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 0xda727
popq %rbx
popq %r14
popq %rbp
retq
leal -0x1(%rbx), %edi
xorl %esi, %esi
callq 0xda61b
movl %eax, %r14d
movl %ebx, %edi
movl %eax, %esi
callq 0xda61b
addl %eax, %r14d
incl %ebx
movl %ebx, %edi
movl %r14d, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xda61b
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3afe4(%rip), %xmm1    # 0x115770
movsd %xmm0, -0x30(%rbp)
addsd %xmm0, %xmm1
divsd 0x3afdb(%rip), %xmm1    # 0x115778
movsd %xmm1, -0x18(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
pushq $0x10
popq %rbx
leaq 0x7fbbb(%rip), %r14     # 0x15a370
cmpq $0x250, %rbx            # imm = 0x250
je 0xda7fa
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
jmp 0xda7b5
movsd -0x18(%rbp), %xmm0
mulsd 0x3bd59(%rip), %xmm0    # 0x116560
addsd 0x3bd59(%rip), %xmm0    # 0x116568
mulsd 0x1b171(%rip), %xmm0    # 0xf5988
movsd %xmm0, -0x18(%rbp)
callq 0x9710
mulsd 0x3bd47(%rip), %xmm0    # 0x116570
addsd 0x1883f(%rip), %xmm0    # 0xf3070
movsd %xmm0, -0x20(%rbp)
movsd -0x18(%rbp), %xmm0
addsd %xmm0, %xmm0
callq 0x9710
mulsd 0x3bd2c(%rip), %xmm0    # 0x116578
movsd -0x28(%rbp), %xmm1
mulsd 0x1b0a7(%rip), %xmm1    # 0xf5900
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_O2/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
pushq %rax
movl %esi, %r14d
leaq 0x12a966(%rip), %rsi    # 0x20541b
xorl %eax, %eax
cmpb $0x0, (%rsi)
jne 0xdab73
movl %edi, %ecx
leaq 0x127d27(%rip), %rax    # 0x2027f0
movl (%rax), %ebx
leaq 0x7a386(%rip), %r15     # 0x154e58
xorl %r12d, %r12d
movl %edx, -0x30(%rbp)
movl %edi, -0x2c(%rbp)
movslq %ebx, %rax
cmpq %rax, %r12
jge 0xdab71
movl (%r15), %eax
testl %eax, %eax
je 0xdab5d
movl -0x4(%r15), %r13d
testl %r13d, %r13d
setns %sil
cmpl %r14d, %eax
setne %al
testb %sil, %al
jne 0xdab5d
movl -0x8(%r15), %edi
testl %edi, %edi
sete %al
cmpl $0x64, %edi
setge %sil
orb %al, %sil
jne 0xdab36
movl %r13d, %esi
movl %r14d, %edx
callq 0xcd819
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %edx
movl %eax, %r13d
leaq 0x127cbc(%rip), %rax    # 0x2027f0
movl (%rax), %ebx
testl %r13d, %r13d
jns 0xdab58
movl %edx, %edi
movl %r14d, %esi
movl %ecx, %edx
callq 0xcd7b8
movzbl %al, %eax
cmpl %eax, (%r15)
jne 0xdab69
negl %r13d
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
cmpl %edx, %r13d
je 0xdab82
incq %r12
addq $0x18, %r15
jmp 0xdaadb
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
jmp 0xdab5d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rax
jmp 0xdab73
// File: /workspace/github_cpp_makefile_star2_O2/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 0x128dee(%rip), %rax    # 0x205410
cmpb $0x0, (%rax)
setne %al
testl %edi, %edi
sete %cl
leaq 0x248d3c(%rip), %rdx    # 0x325370
testb %al, %cl
cmovneq 0x5d872(%rip), %rdx     # 0x139eb0
leaq 0x1261cb(%rip), %rcx    # 0x202810
cmovneq 0x5d91b(%rip), %rcx     # 0x139f68
movl (%rdx), %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
movl %eax, %ebx
subl (%rcx), %ebx
pushq $0x4
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
movl %eax, 0x2876f1(%rip)    # 0x363d58
leaq 0x21b182(%rip), %rax    # 0x2f77f0
movsd (%rax), %xmm4
xorpd %xmm0, %xmm0
ucomisd %xmm4, %xmm0
jbe 0xdc68e
subsd %xmm4, %xmm0
movl $0x8, 0x77fb6(%rip)     # 0x154640
movapd %xmm0, %xmm4
leaq 0x21b153(%rip), %rax    # 0x2f77e8
movsd 0x192f3(%rip), %xmm0    # 0xf5990
movsd (%rax), %xmm1
addsd %xmm0, %xmm1
movsd 0x3935b(%rip), %xmm2    # 0x115a08
addsd %xmm1, %xmm2
movsd 0x2baf7(%rip), %xmm5    # 0x1081b0
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 0x39f6d(%rip), %xmm4    # 0x116660
divsd %xmm0, %xmm4
movsd %xmm4, -0x10(%rbp)
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
movapd %xmm0, -0x30(%rbp)
movapd %xmm5, %xmm1
callq 0x94d0
divsd 0x16a46(%rip), %xmm0    # 0xf3160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x10(%rbp), %xmm0
cvtsi2sd %ebx, %xmm1
movsd %xmm1, -0x18(%rbp)
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x28760d(%rip)    # 0x363d50
movapd -0x30(%rbp), %xmm0
movsd 0x2ba60(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x16a03(%rip), %xmm0    # 0xf3160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x10(%rbp), %xmm0
mulsd -0x18(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x2875d6(%rip)    # 0x363d54
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xde15f
xorl %eax, %eax
jmp 0xde1ed
movl %edi, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
leaq 0x14ae41(%rip), %rcx    # 0x228fb0
cvttss2si 0x20(%rcx,%rax), %esi
movl $0x3, %ecx
cmpl $0x3e8, %edi            # imm = 0x3E8
je 0xde196
leaq 0x124747(%rip), %rax    # 0x2028d0
cmpq $0x4, (%rax)
jne 0xde196
movl %esi, %eax
cltd
idivl %ecx
addl %eax, %esi
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
leaq 0x14ad4c(%rip), %rdx    # 0x228ef0
leal -0x1e(%rax), %esi
cmpb $0x0, (%rdx)
cmovnel %eax, %esi
cmpl $0x4, %esi
cmovll %ecx, %esi
cmpl $0xe, %esi
movl $0xe, %eax
cmovll %esi, %eax
cvtsi2ss %eax, %xmm0
divss 0x3852e(%rip), %xmm0    # 0x1166f8
leaq 0x2471bb(%rip), %rax    # 0x32538c
cvtsi2ssl (%rax), %xmm1
mulss %xmm0, %xmm1
divss 0x2a7e7(%rip), %xmm1    # 0x1089c8
cvttss2si %xmm1, %eax
cmpl $0x4, %eax
cmovgel %eax, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: tick_radial(int, int, int, int, int)
void tick_radial(int grid_x,int grid_y, int grid_r, int max_el, int az)
{
int x0,y0;
int x1,y1;
int x2,y2;
int el;
double len;
double r;

   x0 = grid_x;
   y0 = grid_y;
   r = (double) grid_r;
   if(plot_signals == 3) {
      x0 -= grid_r;
      y0 += grid_r;
      r *= 2.0F;
   }

   for(el=0; el<max_el; el+=5) {
      len = (r * ((double)(max_el-el)/(double) max_el));
      x1 = (int) (len * cos360(az-2));
      y1 = (int) (len * sin360(az-2));

      x2 = (int) (len * cos360(az+2));
      y2 = (int) (len * sin360(az+2));

      line(x0+x1,y0+y1, x0+x2,y0+y2, azel_grid_color);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, -0x34(%rbp)
movl %esi, -0x30(%rbp)
movl %edi, -0x2c(%rbp)
cvtsi2sd %edx, %xmm0
leaq 0x126405(%rip), %rax    # 0x205415
xorl %r14d, %r14d
cmpb $0x3, (%rax)
cmovnel %r14d, %edx
jne 0xdf020
addsd %xmm0, %xmm0
leal -0x2(%r8), %eax
cvtsi2sd %eax, %xmm1
movsd %xmm1, -0x50(%rbp)
addl %edx, -0x30(%rbp)
movl -0x34(%rbp), %r15d
cvtsi2sd %r15d, %xmm1
movsd %xmm1, -0x58(%rbp)
subl %edx, -0x2c(%rbp)
addl $0x2, %r8d
cvtsi2sd %r8d, %xmm1
movsd %xmm1, -0x48(%rbp)
movsd %xmm0, -0x60(%rbp)
cmpl -0x34(%rbp), %r14d
jge 0xdf171
cvtsi2sd %r15d, %xmm1
divsd -0x58(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movsd -0x50(%rbp), %xmm0
movsd 0x29132(%rip), %xmm1    # 0x1081b0
callq 0x94d0
movsd 0x140d5(%rip), %xmm1    # 0xf3160
divsd %xmm1, %xmm0
callq 0x9710
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x40(%rbp), %xmm0
cvttsd2si %xmm0, %r12d
movsd -0x50(%rbp), %xmm0
movsd 0x290fd(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x140a0(%rip), %xmm0    # 0xf3160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x40(%rbp), %xmm0
cvttsd2si %xmm0, %r13d
movsd -0x48(%rbp), %xmm0
movsd 0x290cc(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x1406f(%rip), %xmm0    # 0xf3160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x40(%rbp), %xmm0
cvttsd2si %xmm0, %ebx
movsd -0x48(%rbp), %xmm0
movsd 0x2909c(%rip), %xmm1    # 0x1081b0
callq 0x94d0
divsd 0x1403f(%rip), %xmm0    # 0xf3160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x40(%rbp), %xmm0
cvttsd2si %xmm0, %ecx
movl -0x2c(%rbp), %edx
addl %edx, %r12d
movl -0x30(%rbp), %eax
addl %eax, %r13d
addl %edx, %ebx
addl %eax, %ecx
leaq 0x24625a(%rip), %rax    # 0x3253a8
movzbl (%rax), %r8d
movl %r12d, %edi
movl %r13d, %esi
movl %ebx, %edx
callq 0xdedf
movsd -0x60(%rbp), %xmm0
addl $0x5, %r14d
addl $-0x5, %r15d
jmp 0xdf054
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: clear_sat_trails()
void clear_sat_trails()
{
int i;
int prn;

   for(prn=0; prn<=MOON_PRN; prn++) {
      for(i=0; i<TRAIL_POINTS; i++) {  // clear the sat's position list
         sat_trail[prn].az[i] = 0.0F;
         sat_trail[prn].el[i] = 0.0F;
         sat_trail[prn].mins[i] = 0;
      }
   }
   trail_count = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x286542(%rip), %rax    # 0x365ab8
xorl %ecx, %ecx
cmpq $0x3ea, %rcx            # imm = 0x3EA
je 0xdf5b3
movq $-0x120, %rdx           # imm = 0xFEE0
testq %rdx, %rdx
je 0xdf5a8
andl $0x0, -0x128(%rax,%rdx)
andl $0x0, -0x4(%rax,%rdx)
andl $0x0, 0x120(%rax,%rdx)
addq $0x4, %rdx
jmp 0xdf588
incq %rcx
addq $0x36c, %rax            # imm = 0x36C
jmp 0xdf578
andl $0x0, 0x2862a6(%rip)    # 0x365860
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: dbc_to_amu(float)
float dbc_to_amu(float sig_level)
{
int i;

   if(sig_level <= 0.0F)  return 0.0F;
   if(sig_level >= 51.0F) return 25.1F + ((sig_level - 51.0F) * 3.0F);

   for(i=0; i<256; i++) {
      if(amu_2_dbc[i] > sig_level) return ((float) i) / 10.0F;
   }
   return 0.0F;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jae 0xe2293
ucomiss 0x344d3(%rip), %xmm1    # 0x116718
jae 0xe226a
leaq 0x785f2(%rip), %rcx     # 0x15a840
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0xe2293
movss (%rcx), %xmm2
ucomiss %xmm1, %xmm2
ja 0xe2287
incq %rax
addq $0x4, %rcx
jmp 0xe2250
addss 0x344aa(%rip), %xmm1    # 0x11671c
mulss 0x14e62(%rip), %xmm1    # 0xf70dc
addss 0x3448e(%rip), %xmm1    # 0x116710
movaps %xmm1, %xmm0
jmp 0xe2293
cvtsi2ss %eax, %xmm0
divss 0x14e3d(%rip), %xmm0    # 0xf70d0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: small_screen_watch()
void small_screen_watch()
{
int medium_touch;  // for 1024x600 touch screen

if(plot_lla && lla_showing) return;

   medium_touch = ((SCREEN_WIDTH > MEDIUM_WIDTH) && (SCREEN_WIDTH <= (MEDIUM_WIDTH+X11_MARGIN)) && (SCREEN_HEIGHT <= SHORT_SCREEN) && (all_adevs == SINGLE_ADEVS));

   if(medium_touch || (SMALL_SCREEN && (SCREEN_WIDTH > NARROW_SCREEN) && (all_adevs == SINGLE_ADEVS))) {
      if(rcvr_type == NO_RCVR) {
         aclock_y = WATCH_ROW + ACLOCK_R + TEXT_WIDTH;
         aclock_x = WATCH_COL + TEXT_WIDTH;
      }
      else {
         ACLOCK_SIZE = WATCH_SIZE;
         aclock_y = WATCH_ROW + ACLOCK_R + TEXT_WIDTH;
         aclock_x = WATCH_COL + ACLOCK_R + TEXT_WIDTH;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x243010(%rip), %rax    # 0x3252b0
cmpb $0x0, (%rax)
je 0xe22b5
leaq 0x243014(%rip), %rax    # 0x3252c0
cmpl $0x0, (%rax)
jne 0xe23b0
leaq 0x120544(%rip), %rax    # 0x202800
movl (%rax), %ecx
leal -0x3e3(%rcx), %eax
cmpl $0x6, %eax
setb %al
leaq 0x120533(%rip), %rdx    # 0x202804
movl (%rdx), %esi
cmpl $0x259, %esi            # imm = 0x259
setl %dl
andb %al, %dl
leaq 0x144a59(%rip), %rax    # 0x226d3e
movb (%rax), %al
testb %al, %al
sete %dil
testb %dil, %dl
jne 0xe232b
testb %al, %al
sete %dil
leaq 0x12b245(%rip), %rax    # 0x20d544
imull $0x31a, (%rax), %eax    # imm = 0x31A
movl $0x64, %r8d
cltd
idivl %r8d
cmpl $0x258, %esi            # imm = 0x258
setl %dl
cmpl %eax, %ecx
setg %al
andb %dil, %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0xe23b0
leaq 0x12059e(%rip), %rax    # 0x2028d0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0xe2370
leaq 0x243022(%rip), %rcx    # 0x325364
leaq 0x243027(%rip), %rax    # 0x325370
movl (%rax), %eax
movl $0x2, %esi
cltd
idivl %esi
addl (%rcx), %eax
leaq 0x24301c(%rip), %rcx    # 0x325378
movl %eax, (%rcx)
leaq 0x243003(%rip), %rax    # 0x325368
movl (%rax), %eax
leaq 0x1204a2(%rip), %rcx    # 0x202810
jmp 0xe23a5
leaq 0x242ff5(%rip), %rax    # 0x32536c
movl (%rax), %eax
leaq 0x242ff0(%rip), %rcx    # 0x325370
movl %eax, (%rcx)
leaq 0x242fdb(%rip), %rcx    # 0x325364
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
addl (%rcx), %edx
leaq 0x242fdc(%rip), %rcx    # 0x325378
movl %edx, (%rcx)
leaq 0x242fc3(%rip), %rcx    # 0x325368
addl (%rcx), %eax
leaq 0x242fc6(%rip), %rcx    # 0x325374
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: zoom_sat_info()
void zoom_sat_info()
{
int old_sigs;
int old_row, old_col;
int old_size;
int old_clk_r;

   old_sigs = plot_signals;
   old_row = AZEL_ROW;
   old_col = AZEL_COL;
   old_size = AZEL_SIZE;
   old_clk_r = ACLOCK_SIZE;

   if(SCREEN_HEIGHT < TINY_HEIGHT) AZEL_SIZE = ((SCREEN_WIDTH-((MINOR_COL+4)*TEXT_WIDTH)) * 6) / 10;
   else AZEL_SIZE = ((SCREEN_WIDTH-((MINOR_COL+4)*TEXT_WIDTH)) * 8) / 10;

   if(AZEL_SIZE > (SCREEN_HEIGHT/2)) AZEL_SIZE = ((SCREEN_HEIGHT/2) * 8) / 10;
   if(AZEL_SIZE > MAX_AZEL) AZEL_SIZE = MAX_AZEL;

   plot_signals = 0;
   AZEL_ROW = TEXT_HEIGHT*2;
   AZEL_COL = (MINOR_COL+4)*TEXT_WIDTH;
// AZEL_RADIUS = AZEL_SIZE/2;
   ACLOCK_SIZE = AZEL_SIZE;
   erase_azel(9);
   draw_azel_plot(5);

   plot_signals = 4;
   AZEL_ROW = (SCREEN_HEIGHT/2);// + TEXT_WIDTH*8;
   AZEL_COL = (MINOR_COL+4)*TEXT_WIDTH;
   erase_azel(10);
   draw_signal_map(9);

   AZEL_COL = old_col;
   AZEL_ROW = old_row;
   AZEL_SIZE = old_size;
   ACLOCK_SIZE= old_clk_r;
   plot_signals = old_sigs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x1229d0(%rip), %r12    # 0x205415
movb (%r12), %al
movb %al, -0x29(%rbp)
leaq 0x24293d(%rip), %r10    # 0x325390
movl (%r10), %eax
movl %eax, -0x38(%rbp)
leaq 0x242934(%rip), %r11    # 0x325394
leaq 0x11fd9d(%rip), %rax    # 0x202804
movl (%rax), %ecx
leaq 0x11fd90(%rip), %rax    # 0x202800
movl (%rax), %eax
leaq 0x11fd23(%rip), %rdx    # 0x20279c
movl (%rdx), %edi
addl $0x4, %edi
leaq 0x11fd8b(%rip), %rdx    # 0x202810
imull (%rdx), %edi
subl %edi, %eax
imull $0x6, %eax, %edx
shll $0x3, %eax
cmpl $0x1e0, %ecx            # imm = 0x1E0
cmovll %edx, %eax
movl (%r11), %edx
movl %edx, -0x34(%rbp)
cltd
leaq 0x2428e5(%rip), %rbx    # 0x32538c
movl (%rbx), %esi
movl %esi, -0x30(%rbp)
leaq 0x2428bd(%rip), %r15    # 0x325370
movl (%r15), %r14d
pushq $0xa
popq %r8
idivl %r8d
movl %eax, %esi
movl %ecx, %eax
cltd
pushq $0x2
popq %r13
idivl %r13d
cmpl %eax, %esi
jle 0xe2ad6
shll $0x3, %eax
cltd
idivl %r8d
movl %eax, %esi
movl $0x140, %eax            # imm = 0x140
cmpl %eax, %esi
cmovll %esi, %eax
movl %eax, (%rbx)
movb $0x0, (%r12)
leaq 0x11fd26(%rip), %rcx    # 0x202814
movl (%rcx), %ecx
addl %ecx, %ecx
movl %ecx, (%r10)
movl %edi, (%r11)
movl %eax, (%r15)
pushq $0x9
popq %rdi
movq %r10, %rbx
movq %r11, %r15
callq 0xe87c
callq 0xe2e51
movb $0x4, (%r12)
leaq 0x11fcea(%rip), %rax    # 0x202804
movl (%rax), %eax
cltd
idivl %r13d
movl %eax, (%rbx)
leaq 0x11fc73(%rip), %rax    # 0x20279c
movl (%rax), %eax
addl $0x4, %eax
leaq 0x11fcdb(%rip), %rcx    # 0x202810
imull (%rcx), %eax
movl %eax, (%r15)
pushq $0xa
popq %rdi
callq 0xe87c
callq 0xe35a6
movl -0x34(%rbp), %eax
movl %eax, (%r15)
movl -0x38(%rbp), %eax
movl %eax, (%rbx)
movl -0x30(%rbp), %eax
leaq 0x24282f(%rip), %rcx    # 0x32538c
movl %eax, (%rcx)
leaq 0x24280a(%rip), %rax    # 0x325370
movl %r14d, (%rax)
movb -0x29(%rbp), %al
movb %al, (%r12)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: zoom_all_signals()
void zoom_all_signals()
{
int old_sigs;
int old_row, old_col;
int old_size;
int w;

   old_sigs = plot_signals;
   old_row = AZEL_ROW;
   old_col = AZEL_COL;
   old_size = AZEL_SIZE;

   if((SCREEN_WIDTH < TINY_TINY_WIDTH) || (SCREEN_WIDTH < SCREEN_HEIGHT)) {
      w = SCREEN_WIDTH;
   }
   else {
      w = SCREEN_HEIGHT;
   }
   AZEL_SIZE = ((w / 2) * 8) / 10;

   plot_signals = 1;
   AZEL_COL = 0 + TEXT_WIDTH*8;
   AZEL_ROW = TEXT_HEIGHT*2;
   erase_azel(2);
   draw_signal_map(3);

   plot_signals = 2;
   AZEL_COL = SCREEN_WIDTH/2;
   erase_azel(3);
   draw_signal_map(4);

   plot_signals = 3;
   AZEL_COL = 0 + TEXT_WIDTH*8;
   AZEL_ROW = (SCREEN_HEIGHT/2) + (TEXT_HEIGHT/2);
   erase_azel(4);
   draw_signal_map(5);

   plot_signals = 4;
   AZEL_COL = SCREEN_WIDTH/2;
   erase_azel(5);
   draw_signal_map(6);

   AZEL_COL = old_col;
   AZEL_ROW = old_row;
   AZEL_SIZE = old_size;
   plot_signals = old_sigs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x12287e(%rip), %r14    # 0x205415
movb (%r14), %al
movb %al, -0x29(%rbp)
leaq 0x2427ec(%rip), %rax    # 0x325390
movl (%rax), %ecx
movl %ecx, -0x38(%rbp)
movq %rax, %rsi
leaq 0x2427e1(%rip), %r15    # 0x325394
movl (%r15), %eax
movl %eax, -0x34(%rbp)
leaq 0x2427cc(%rip), %rax    # 0x32538c
movl (%rax), %ecx
movl %ecx, -0x30(%rbp)
movq %rax, %rdi
leaq 0x11fc31(%rip), %rax    # 0x202800
movl (%rax), %ecx
leaq 0x11fc2c(%rip), %rax    # 0x202804
movl (%rax), %eax
cmpl %eax, %ecx
cmovll %ecx, %eax
cmpl $0x1c2, %ecx            # imm = 0x1C2
cmovll %ecx, %eax
pushq $0x2
popq %rbx
cltd
idivl %ebx
shll $0x3, %eax
cltd
pushq $0xa
popq %rcx
idivl %ecx
movl %eax, (%rdi)
leaq 0x11fc10(%rip), %r12    # 0x202810
movl (%r12), %eax
shll $0x3, %eax
movl %eax, (%r15)
leaq 0x11fc03(%rip), %r13    # 0x202814
movl (%r13), %eax
addl %eax, %eax
movl %eax, (%rsi)
movb $0x1, (%r14)
movl %ebx, %edi
callq 0xe87c
callq 0xe35a6
movb $0x2, (%r14)
leaq 0x11fbcc(%rip), %rax    # 0x202800
movl (%rax), %eax
cltd
idivl %ebx
movl %eax, (%r15)
pushq $0x3
popq %rdi
callq 0xe87c
callq 0xe35a6
movb $0x3, (%r14)
movl (%r12), %eax
shll $0x3, %eax
movl %eax, (%r15)
leaq 0x11fba6(%rip), %rax    # 0x202804
movl (%rax), %eax
cltd
idivl %ebx
movl %eax, %ecx
movl (%r13), %eax
cltd
idivl %ebx
addl %ecx, %eax
leaq 0x24271b(%rip), %rcx    # 0x325390
movl %eax, (%rcx)
pushq $0x4
popq %rdi
callq 0xe87c
callq 0xe35a6
movb $0x4, (%r14)
leaq 0x11fb71(%rip), %rax    # 0x202800
movl (%rax), %eax
cltd
idivl %ebx
movl %eax, (%r15)
pushq $0x5
popq %rdi
callq 0xe87c
callq 0xe35a6
movl -0x34(%rbp), %eax
movl %eax, (%r15)
movl -0x38(%rbp), %eax
leaq 0x2426dc(%rip), %rcx    # 0x325390
movl %eax, (%rcx)
movl -0x30(%rbp), %eax
leaq 0x2426cc(%rip), %rcx    # 0x32538c
movl %eax, (%rcx)
movb -0x29(%rbp), %al
movb %al, (%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: clear_signals()
void clear_signals()
{
int x, y;

   // clear out the signal level data structures

   for(x=0; x<=360; x++) {
      db_az_sum[x] = 0.0F;
      db_weighted_az_sum[x] = 0.0F;
      db_az_count[x] = 0.0F;
      max_el[x] = 0;
      min_el[x] = 90;

      for(y=0; y<=90; y++) {
         db_3d_sum[x][y] = 0.0F;
         db_3d_count[x][y] = (-1.0F);
      }
   }

   for(y=0; y<=90; y++) {
      db_el_sum[y]= 0.0F;
      db_el_count[y] = 0.0F;
   }

   max_sig_level = 0.0F;
   min_sig_level = 999.0F;
   sig_level_sum = 0.0;
   sig_level_count = 0.0;
   max_sat_prn = 0;
   for(x=0; x<=32; x++) {
      max_sat_db[x] = 0.0F;
   }

   reading_signals = 0;  // re-enable live data recording
   signal_length = 0L;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq 0x7946c(%rip), %rax     # 0x15d020
leaq 0x995b5(%rip), %rcx     # 0x17d170
xorl %edx, %edx
leaq 0x7806c(%rip), %rsi     # 0x15bc30
leaq 0x78615(%rip), %rdi     # 0x15c1e0
leaq 0x78bbe(%rip), %r8      # 0x15c790
leaq 0x77aa7(%rip), %r9      # 0x15b680
leaq 0x774f0(%rip), %r10     # 0x15b0d0
movl $0x16c, %r11d           # imm = 0x16C
cmpq $0x169, %rdx            # imm = 0x169
je 0xe3c2c
andl $0x0, (%rsi,%rdx,4)
andl $0x0, (%rdi,%rdx,4)
andl $0x0, (%r8,%rdx,4)
andl $0x0, (%r9,%rdx,4)
movl $0x5a, (%r10,%rdx,4)
xorl %ebx, %ebx
cmpq $0x5b, %rbx
je 0xe3c21
andl $0x0, (%rax,%rbx,4)
movl $0xbf800000, (%rcx,%rbx,4) # imm = 0xBF800000
incq %rbx
jmp 0xe3c0b
incq %rdx
addq %r11, %rax
addq %r11, %rcx
jmp 0xe3be6
xorl %eax, %eax
leaq 0x7910b(%rip), %rcx     # 0x15cd40
leaq 0x79274(%rip), %rdx     # 0x15ceb0
cmpq $0x5b, %rax
je 0xe3c4f
andl $0x0, (%rcx,%rax,4)
andl $0x0, (%rdx,%rax,4)
incq %rax
jmp 0xe3c3c
leaq 0xba612(%rip), %rax     # 0x19e268
andl $0x0, (%rax)
leaq 0xba610(%rip), %rax     # 0x19e270
andq $0x0, (%rax)
leaq 0xba60d(%rip), %rax     # 0x19e278
andq $0x0, (%rax)
leaq 0x77452(%rip), %rax     # 0x15b0c8
andl $0x0, (%rax)
leaq 0xba5ec(%rip), %rax     # 0x19e26c
movl $0x4479c000, (%rax)     # imm = 0x4479C000
xorl %eax, %eax
leaq 0xb9631(%rip), %rcx     # 0x19d2c0
cmpq $0x21, %rax
je 0xe3c9e
andl $0x0, (%rcx,%rax,4)
incq %rax
jmp 0xe3c8f
leaq 0x241633(%rip), %rax    # 0x3252d8
movb $0x0, (%rax)
leaq 0x24162d(%rip), %rax    # 0x3252dc
andl $0x0, (%rax)
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: freshen_sig_info()
void freshen_sig_info()
{
int az, ell;

   // keep signal level maps "fresh" by periodically re-starting the averaging
   // of readings from the current avaerage.

   for(az=0; az<=360; az++) {
      if(db_az_count[az]) {
         db_weighted_az_sum[az] = (db_weighted_az_sum[az] / db_az_count[az]);
         db_az_sum[az] = (db_az_sum[az] / db_az_count[az]);
         db_az_count[az] = 1;
      }
   }

   for(ell=0; ell<=90; ell++) {
      if(db_el_count[ell]) {
         db_el_sum[ell] = (db_el_sum[ell] / db_el_count[ell]);
         db_el_count[ell] = 1;
      }
   }
}

// Assembly:
xorl %eax, %eax
leaq 0x78ad2(%rip), %rcx     # 0x15c790
xorps %xmm0, %xmm0
leaq 0x78518(%rip), %rdx     # 0x15c1e0
leaq 0x77f61(%rip), %rsi     # 0x15bc30
cmpq $0x169, %rax            # imm = 0x169
je 0xe3d0b
movss (%rcx,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0xe3ce3
jnp 0xe3d06
movss (%rdx,%rax,4), %xmm2
divss %xmm1, %xmm2
movss %xmm2, (%rdx,%rax,4)
movss (%rsi,%rax,4), %xmm2
divss %xmm1, %xmm2
movss %xmm2, (%rsi,%rax,4)
movl $0x3f800000, (%rcx,%rax,4) # imm = 0x3F800000
incq %rax
jmp 0xe3ccf
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leaq 0x79198(%rip), %rcx     # 0x15ceb0
xorps %xmm0, %xmm0
leaq 0x7901e(%rip), %rdx     # 0x15cd40
popq %rbp
cmpq $0x5b, %rax
je 0xe3d4f
movss (%rcx,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0xe3d35
jnp 0xe3d4a
movss (%rdx,%rax,4), %xmm2
divss %xmm1, %xmm2
movss %xmm2, (%rdx,%rax,4)
movl $0x3f800000, (%rcx,%rax,4) # imm = 0x3F800000
incq %rax
jmp 0xe3d23
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: dump_signals(char*)
void dump_signals(char *fn)
{
FILE *f;
int az, el;

   // write signal strength data to a log file

   if(!strstr(fn, ".")) {
      strcat(fn, ".sig");
   }
   f = topen(fn, "w");
   if(f == 0) return;

   write_log_header(f, 3);
   month = fix_month(month);
   fprintf(f,"#   %02d:%02d:%02d %s   %02d %s %04d\n", 
      hours,minutes,seconds, (time_flags & TFLAGS_UTC)?"UTC":"GPS", day,months[month],year);
   fprintf(f, "#\n");
   fprintf(f, "#az el dBc\n");

   for(el=0; el<=90; el++) {
      for(az=0; az<=360; az++) {
         if(db_3d_count[az][el] > 0.0F) {
            fprintf(f, "%03d %02d %5.2f\n", az, el, db_3d_sum[az][el]/db_3d_count[az][el]);
         }
      }
   }

   fclose(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2e
popq %rsi
callq 0x9100
testq %rax, %rax
jne 0xe3ef6
movq %rbx, %rdi
callq 0x9120
movl $0x6769732e, (%rbx,%rax) # imm = 0x6769732E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x27406(%rip), %rsi     # 0x10b303
movq %rbx, %rdi
callq 0x9a22
testq %rax, %rax
je 0xe405f
movq %rax, %r12
movq %rax, %rdi
callq 0xb5513
leaq 0x2135b8(%rip), %rbx    # 0x2f74d8
movl (%rbx), %edi
callq 0x68914
movl %eax, (%rbx)
leaq 0x2135a0(%rip), %rcx    # 0x2f74d0
movl (%rcx), %edx
leaq 0x213593(%rip), %rcx    # 0x2f74cc
movl (%rcx), %ecx
leaq 0x213586(%rip), %rsi    # 0x2f74c8
movl (%rsi), %r8d
leaq 0x213558(%rip), %rsi    # 0x2f74a4
testb $0x1, (%rsi)
leaq 0x398bb(%rip), %rsi     # 0x11d811
leaq 0x3ae71(%rip), %r9      # 0x11edce
cmoveq %rsi, %r9
leaq 0x21356c(%rip), %rsi    # 0x2f74d4
movl (%rsi), %r10d
movslq %eax, %r11
leaq 0x707cb(%rip), %rbx     # 0x154740
leaq 0x213560(%rip), %rax    # 0x2f74dc
movl (%rax), %r15d
subq $0x8, %rsp
leaq 0x3b0fb(%rip), %rsi     # 0x11f085
movq %r12, %rdi
xorl %eax, %eax
pushq %r15
pushq (%rbx,%r11,8)
pushq %r10
callq 0x9560
addq $0x20, %rsp
leaq 0x378e6(%rip), %rdi     # 0x11b88d
pushq $0x2
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %r12, %rcx
callq 0x9750
leaq 0x3b0eb(%rip), %rdi     # 0x11f0ab
pushq $0xb
popq %rsi
movq %r15, %rdx
movq %r12, -0x30(%rbp)
movq %r12, %rcx
callq 0x9750
xorl %r14d, %r14d
leaq 0x99194(%rip), %r13     # 0x17d170
leaq 0x7903d(%rip), %r15     # 0x15d020
xorps %xmm1, %xmm1
cmpq $0x5b, %r14
je 0xe4048
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpq $0x169, %r12            # imm = 0x169
je 0xe403b
movss (%r13,%rbx), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xe402f
movss (%r15,%rbx), %xmm1
divss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm0
movq -0x30(%rbp), %rdi
leaq 0x3b098(%rip), %rsi     # 0x11f0b7
movl %r12d, %edx
movl %r14d, %ecx
movb $0x1, %al
callq 0x9560
xorps %xmm1, %xmm1
incq %r12
addq $0x16c, %rbx            # imm = 0x16C
jmp 0xe3ff1
incq %r14
addq $0x4, %r13
addq $0x4, %r15
jmp 0xe3fe6
movq -0x30(%rbp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9360
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: next_az_point(int, int)
int next_az_point(int start_az, int el)
{
   if(start_az >= 360) return 360;
   while(++start_az < 360) {
      if(db_3d_count[start_az][el] > 0.0F) break;
      if((lat < 0.0) || (DABS(lat*RAD_TO_DEG) > HIGH_LATS)) {
         if(start_az == 180) break;
      }
   }
   return start_az;
}

// Assembly:
movl $0x168, %eax            # imm = 0x168
cmpl $0x167, %edi            # imm = 0x167
jg 0xe453c
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rsi
leaq 0x212b48(%rip), %rcx    # 0x2f6fd0
movsd (%rcx), %xmm0
movsd 0xeccc(%rip), %xmm3     # 0xf3160
mulsd %xmm0, %xmm3
xorpd %xmm1, %xmm1
xorpd %xmm4, %xmm4
subsd %xmm3, %xmm4
movapd %xmm3, %xmm2
cmpltsd %xmm1, %xmm2
andpd %xmm2, %xmm4
andnpd %xmm3, %xmm2
orpd %xmm4, %xmm2
movslq %edi, %rcx
leaq -0x167(%rcx), %rdx
imulq $0x16c, %rcx, %r8       # imm = 0x16C
addq $-0xb3, %rcx
leaq (%r8,%rsi,4), %rsi
addq 0x559dc(%rip), %rsi     # 0x139eb8
addq $0x16c, %rsi            # imm = 0x16C
xorl %r8d, %r8d
xorpd %xmm3, %xmm3
movsd 0x24486(%rip), %xmm4    # 0x108978
cmpq %r8, %rdx
je 0xe453b
movss (%rsi), %xmm5
ucomiss %xmm3, %xmm5
ja 0xe452d
ucomisd %xmm0, %xmm1
jbe 0xe450d
cmpq %r8, %rcx
jne 0xe4521
jmp 0xe4536
cmpq %r8, %rcx
sete %r9b
ucomisd %xmm4, %xmm2
seta %r10b
testb %r9b, %r10b
jne 0xe4536
decq %r8
addq $0x16c, %rsi            # imm = 0x16C
jmp 0xe44f2
subl %r8d, %edi
incl %edi
movl %edi, %eax
jmp 0xe453b
movl $0xb4, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: draw_3d_signals()
void draw_3d_signals()
{
int el;

   // draw signal level map as a function of az/el
   start_color = BLACK;
   if(plot_signals == 4) {  // find min and max elevations seen at each az angle
      calc_az_clip();
   }
   else if(plot_signals) ;
   else if(zoom_screen == 'S') {
      calc_az_clip();
   }

   for(el=0; el<90; el++) {
      if(plot_signals >= 5) {  // just show raw data points
         plot_raw_signals(el);
      }
      else {                   // show fully expanded color data plot
         plot_3d_signals(el);
      }
   }

   azel_grid_color = WHITE;  // AZEL_COLOR;
   draw_azel_grid(1, AZEL_X,AZEL_Y, AZEL_RADIUS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
andl $0x0, 0x3580fe(%rip)    # 0x43c884
xorl %ebx, %ebx
leaq 0x120c86(%rip), %r14    # 0x205415
cmpl $0x5a, %ebx
je 0xe47ae
cmpb $0x5, (%r14)
jb 0xe47a3
movl %ebx, %edi
callq 0xe406e
jmp 0xe47aa
movl %ebx, %edi
callq 0xe453d
incl %ebx
jmp 0xe478f
leaq 0x240bf3(%rip), %rax    # 0x3253a8
movl $0xf, (%rax)
leaq 0x240bde(%rip), %rax    # 0x3253a0
movl (%rax), %esi
leaq 0x240bd9(%rip), %rax    # 0x3253a4
movl (%rax), %ecx
leaq 0x240bb8(%rip), %rax    # 0x32538c
movl (%rax), %eax
pushq $0x2
popq %rdi
cltd
idivl %edi
leaq 0x240bb5(%rip), %rdx    # 0x325398
subl (%rdx), %eax
pushq $0x1
popq %rdi
movl %ecx, %edx
movl %eax, %ecx
popq %rbx
popq %r14
popq %rbp
jmp 0xdf180