LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: log_enviro_info()
void log_enviro_info()
{
   strcpy(log_text, "#");
   write_log_comment(1);

   if(enviro_type == HEATHER_ENVIRO) {
      sprintf(log_text, "#   Enviro type:   Heather Environmental Sensor");
   }
   else if(enviro_type == DOG_ENVIRO) {
      if(enviro_dev[0]) sprintf(log_text, "#   Enviro type:   %s", enviro_dev);
      else              sprintf(log_text, "#   Envito type:   Dogratian USB");
   }
   else if(enviro_type == LFS_ENVIRO) {
      if(enviro_dev[0]) sprintf(log_text, "#   Enviro type:   %s", enviro_dev);
      else              sprintf(log_text, "#   Enviro type:   LFS10xx");
   }
   else {
      sprintf(log_text, "#   Enviro type:   Environmental sensor");
   }
   write_log_comment(1);

   if(enviro_sn[0]) {
      sprintf(log_text, "#   Enviro serial: %s", enviro_sn);
      write_log_comment(1);
   }

   strcpy(log_text, "#");
   write_log_comment(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x17997b(%rip), %rbx    # 0x23d960
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x154919(%rip), %rax    # 0x218914
movl (%rax), %eax
cmpl $0x1, %eax
je 0xc404e
cmpl $0x3, %eax
je 0xc402b
cmpl $0x2, %eax
jne 0xc4078
movups 0x697d0(%rip), %xmm0    # 0x12d7e3
movaps %xmm0, 0x20(%rbx)
movups 0x697b5(%rip), %xmm0    # 0x12d7d3
movaps %xmm0, 0x10(%rbx)
movups 0x6979a(%rip), %xmm0    # 0x12d7c3
jmp 0xc4049
leaq 0x27922e(%rip), %rax    # 0x33d260
cmpb $0x0, (%rax)
jne 0xc405a
movups 0x697f7(%rip), %xmm0    # 0x12d835
movups %xmm0, 0xb(%rbx)
movups 0x697e1(%rip), %xmm0    # 0x12d82a
movaps %xmm0, (%rbx)
jmp 0xc40b6
leaq 0x27920b(%rip), %rax    # 0x33d260
cmpb $0x0, (%rax)
je 0xc409d
leaq 0x1798ff(%rip), %rdi    # 0x23d960
leaq 0x6978b(%rip), %rsi     # 0x12d7f3
leaq 0x2791f1(%rip), %rdx    # 0x33d260
xorl %eax, %eax
callq 0x9060
jmp 0xc40b6
movups 0x697d6(%rip), %xmm0    # 0x12d855
movaps %xmm0, 0x10(%rbx)
movups 0x697bb(%rip), %xmm0    # 0x12d845
movaps %xmm0, (%rbx)
movabsq $0x726f736e657320, %rax # imm = 0x726F736E657320
movq %rax, 0x20(%rbx)
jmp 0xc40b6
movups 0x69775(%rip), %xmm0    # 0x12d819
movaps %xmm0, 0x10(%rbx)
movups 0x6975a(%rip), %xmm0    # 0x12d809
movaps %xmm0, (%rbx)
movb $0x0, 0x20(%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x2791b9(%rip), %rax    # 0x33d280
cmpb $0x0, (%rax)
je 0xc40f2
leaq 0x17988d(%rip), %rdi    # 0x23d960
leaq 0x69793(%rip), %rsi     # 0x12d86d
leaq 0x27919f(%rip), %rdx    # 0x33d280
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw $0x23, (%rbx)
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xc36e2
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: show_cs_log(int, int, int)
void show_cs_log(int row,int col, int extended)
{
int i;
int count;

   vidstr(row,col, GREEN, "Log: Message");
   ++row;
   count = 0;
   for(i=cs_log_count-1; i>=0; i--) {
      if(cs_log_msg[i][0]) {
         vidstr(row,col, WHITE, &blanks[TEXT_COLS-LOG_MSG_LEN]);
         vidstr(row,col, WHITE, cs_log_msg[i]);
         ++row;
         ++count;
         if(count >= CS_LOG_SHOW) break;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
leaq 0x653fd(%rip), %rcx     # 0x12fe79
movl $0xa, %edx
callq 0xe787
leaq 0x14fe67(%rip), %rax    # 0x21a8f4
movslq (%rax), %rax
testq %rax, %rax
jle 0xcab11
incl %r14d
leaq 0x1(%rax), %r12
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rax,2), %rax
leaq 0x14e4a2(%rip), %rcx    # 0x218f50
leaq (%rcx,%rax), %r15
addq $-0x22, %r15
xorl %r13d, %r13d
cmpb $0x0, (%r15)
je 0xcab04
leaq 0x14dd42(%rip), %rax    # 0x218808
movslq (%rax), %rax
leaq 0x271540(%rip), %rcx    # 0x33c010
addq %rax, %rcx
addq $-0x20, %rcx
movl %r14d, %edi
movl %ebx, %esi
movl $0xf, %edx
callq 0xe787
movl %r14d, %edi
movl %ebx, %esi
movl $0xf, %edx
movq %r15, %rcx
callq 0xe787
cmpl $0x6, %r13d
jg 0xcab11
incl %r14d
incl %r13d
decq %r12
addq $-0x22, %r15
cmpq $0x1, %r12
ja 0xcaab9
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: show_cs_val(int, int, int)
void show_cs_val(int row,int col, int color)
{
char *s;
int i;

   s = strchr(out, ':');
   if(s == 0) return;

   i = s - &out[0] + 1;
   out[i] = 0;
   i = strlen(out);

   vidstr(row,col, WHITE, &blanks[TEXT_COLS-40]);
   vidstr(row,col, GREEN, out);
   vidstr(row,col+i+1, color, &out[i+1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r12d
movl %edi, %r14d
leaq 0x2716e3(%rip), %r15    # 0x33c220
movq %r15, %rdi
movl $0x3a, %esi
callq 0x9100
testq %rax, %rax
je 0xcabc7
subl %r15d, %eax
incl %eax
cltq
movb $0x0, (%r15,%rax)
movq %r15, %rdi
callq 0x9120
movq %rax, %r13
leaq 0x14dc9b(%rip), %rax    # 0x218808
movslq (%rax), %rax
leaq 0x271499(%rip), %rcx    # 0x33c010
leaq -0x28(%rax,%rcx), %rcx
movl %r14d, %edi
movl %r12d, %esi
movl $0xf, %edx
callq 0xe787
movl %r14d, %edi
movl %r12d, %esi
movl $0xa, %edx
movq %r15, %rcx
callq 0xe787
leal (%r12,%r13), %esi
incl %esi
incl %r13d
movslq %r13d, %rcx
addq %r15, %rcx
movzbl %bl, %edx
movl %r14d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe787
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: log_lpfrs_xml(_IO_FILE*)
void log_lpfrs_xml(FILE *file)
{
   fprintf(file, "        <aa>%g</aa>\n", lpfrs_aa);
   fprintf(file, "        <bb>%g</bb>\n", lpfrs_bb);
   fprintf(file, "        <cc>%g</cc>\n", lpfrs_cc);
   fprintf(file, "        <dd>%g</dd>\n", lpfrs_dd);
   fprintf(file, "        <ee>%g</ee>\n", lpfrs_ee);
   fprintf(file, "        <ff>%g</ff>\n", lpfrs_ff);
   fprintf(file, "        <gg>%g</gg>\n", lpfrs_gg);
   fprintf(file, "        <hh>%g</hh>\n", lpfrs_hh);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x24211c(%rip), %rax    # 0x30dd00
movsd (%rax), %xmm0
leaq 0x6496d(%rip), %rsi     # 0x13055c
movb $0x1, %al
callq 0x9560
leaq 0x2420fb(%rip), %rax    # 0x30dcf8
movsd (%rax), %xmm0
leaq 0x64969(%rip), %rsi     # 0x130571
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2420d7(%rip), %rax    # 0x30dcf0
movsd (%rax), %xmm0
leaq 0x64962(%rip), %rsi     # 0x130586
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2420b3(%rip), %rax    # 0x30dce8
movsd (%rax), %xmm0
leaq 0x6495b(%rip), %rsi     # 0x13059b
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x24208f(%rip), %rax    # 0x30dce0
movsd (%rax), %xmm0
leaq 0x64954(%rip), %rsi     # 0x1305b0
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x24206b(%rip), %rax    # 0x30dcd8
movsd (%rax), %xmm0
leaq 0x6494d(%rip), %rsi     # 0x1305c5
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x242047(%rip), %rax    # 0x30dcd0
movsd (%rax), %xmm0
leaq 0x64946(%rip), %rsi     # 0x1305da
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x242023(%rip), %rax    # 0x30dcc8
movsd (%rax), %xmm0
leaq 0x6493f(%rip), %rsi     # 0x1305ef
movq %rbx, %rdi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9560
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: log_sro_xml(_IO_FILE*)
void log_sro_xml(FILE *file)
{
   fprintf(file, "        <aa>%g</aa>\n", sro_aa);
   fprintf(file, "        <bb>%g</bb>\n", sro_bb);
   fprintf(file, "        <cc>%g</cc>\n", sro_cc);
   fprintf(file, "        <dd>%g</dd>\n", sro_dd);
   fprintf(file, "        <ee>%g</ee>\n", sro_ee);
   fprintf(file, "        <ff>%g</ff>\n", sro_ff);
   fprintf(file, "        <gg>%g</gg>\n", sro_gg);
   fprintf(file, "        <hh>%g</hh>\n", sro_hh);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x241eca(%rip), %rax    # 0x30dba0
movsd (%rax), %xmm0
leaq 0x6487b(%rip), %rsi     # 0x13055c
movb $0x1, %al
callq 0x9560
leaq 0x241ea9(%rip), %rax    # 0x30db98
movsd (%rax), %xmm0
leaq 0x64877(%rip), %rsi     # 0x130571
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x241e85(%rip), %rax    # 0x30db90
movsd (%rax), %xmm0
leaq 0x64870(%rip), %rsi     # 0x130586
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x241e61(%rip), %rax    # 0x30db88
movsd (%rax), %xmm0
leaq 0x64869(%rip), %rsi     # 0x13059b
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x241e3d(%rip), %rax    # 0x30db80
movsd (%rax), %xmm0
leaq 0x64862(%rip), %rsi     # 0x1305b0
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x241e19(%rip), %rax    # 0x30db78
movsd (%rax), %xmm0
leaq 0x6485b(%rip), %rsi     # 0x1305c5
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x241df5(%rip), %rax    # 0x30db70
movsd (%rax), %xmm0
leaq 0x64854(%rip), %rsi     # 0x1305da
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x241dd1(%rip), %rax    # 0x30db68
movsd (%rax), %xmm0
leaq 0x6484d(%rip), %rsi     # 0x1305ef
movq %rbx, %rdi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9560
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: utc_delta_t()
double utc_delta_t()
{
double dt;

   // return UTC delta T (in Julian days!)

   if(user_set_delta_t) dt = user_delta_t;
   else dt = jtime(0, 0, 51+utc_offset, 0.184);  // TDT is 51.184 seconds ahead of GPS

   return dt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x23f15d(%rip), %rax    # 0x30d4e8
cmpl $0x0, (%rax)
je 0xce39d
leaq 0x23f159(%rip), %rax    # 0x30d4f0
movsd (%rax), %xmm0
jmp 0xce3cd
leaq 0x23f384(%rip), %rax    # 0x30d728
movl (%rax), %eax
addl $0x33, %eax
cvtsi2sd %eax, %xmm1
addsd 0x5d3b3(%rip), %xmm1    # 0x12b768
divsd 0x3ac53(%rip), %xmm1    # 0x109010
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
divsd 0x3ac73(%rip), %xmm0    # 0x109040
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: write_log_error(char*, unsigned int)
void write_log_error(char *s, u32 val)
{
   if(log_file == 0) return;
   if(log_errors == 0) return;
   if(log_comments == 0) return;

   sprintf(log_text, "#! %s error: %u", s, (u32) val);
   write_log_comment(1);
}

// Assembly:
leaq 0x16a9dc(%rip), %rax    # 0x23e360
cmpq $0x0, (%rax)
je 0xd39cb
leaq 0x16aa6a(%rip), %rax    # 0x23e3fb
cmpb $0x0, (%rax)
je 0xd39cb
leaq 0x16aa77(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0xd39cb
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movq %rdi, %rdx
leaq 0x169fae(%rip), %rdi    # 0x23d960
leaq 0x5ed60(%rip), %rsi     # 0x132719
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
popq %rbp
jmp 0xc36e2
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: write_log_utc(int)
void write_log_utc(int utc_offset)
{
   // write UTC offset changes to the log file

   if(log_file == 0) return;
   if(log_comments == 0) return;
   if((have_info & INFO_LOGGED) == 0) { // log file header not written yet   
      if(user_set_log) return;   // keeps bogus UTC entry out of log file
   }

   sprintf(log_text,"#");
   write_log_comment(1);
   sprintf(log_text,"#! New UTC offset: %d seconds", utc_offset);
   write_log_comment(1);
   sprintf(log_text,"#");
   write_log_comment(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x16a983(%rip), %rax    # 0x23e360
cmpq $0x0, (%rax)
je 0xd3a0a
leaq 0x16aa2a(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0xd3a0a
movl %edi, %ebx
leaq 0x239f7c(%rip), %rax    # 0x30d974
testb $0x2, 0x1(%rax)
jne 0xd3a15
leaq 0x16a9f7(%rip), %rax    # 0x23e3fc
cmpb $0x0, (%rax)
je 0xd3a15
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x169f44(%rip), %r14    # 0x23d960
movw $0x23, %r15w
movw %r15w, (%r14)
movl $0x1, %edi
callq 0xc36e2
leaq 0x5ecf3(%rip), %rsi     # 0x132729
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
movw %r15w, (%r14)
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc36e2
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: write_log_leapsecond()
void write_log_leapsecond()
{
   // write leapsecond occurance in the log file

   sprintf(log_text,"#");
   write_log_comment(1);

   month = fix_month(month);
   sprintf(log_text,"#! Leapsecond: %02d:%02d:%02d %s   %02d %s %04d - interval %ld secs", 
      hours,minutes,seconds, (time_flags & TFLAGS_UTC)?"UTC":"GPS", day,months[month],year, log_interval);
   write_log_comment(1);

   sprintf(log_text,"#");
   write_log_comment(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x169ee7(%rip), %rbx    # 0x23d960
movw $0x23, %r14w
movw %r14w, (%rbx)
movl $0x1, %edi
callq 0xc36e2
leaq 0x239a45(%rip), %r15    # 0x30d4d8
movl (%r15), %edi
callq 0x723a5
movl %eax, (%r15)
leaq 0x239a2b(%rip), %rcx    # 0x30d4d0
movl (%rcx), %edx
leaq 0x239a1e(%rip), %rcx    # 0x30d4cc
movl (%rcx), %ecx
leaq 0x239a11(%rip), %rsi    # 0x30d4c8
leaq 0x2399e6(%rip), %rdi    # 0x30d4a4
testb $0x1, (%rdi)
leaq 0x5fe29(%rip), %rdi     # 0x1338f1
leaq 0x613df(%rip), %r9      # 0x134eae
cmoveq %rdi, %r9
movl (%rsi), %r8d
leaq 0x2399f7(%rip), %rsi    # 0x30d4d4
movl (%rsi), %r10d
movslq %eax, %r11
leaq 0x96c56(%rip), %r15     # 0x16a740
leaq 0x2399eb(%rip), %rax    # 0x30d4dc
movl (%rax), %r12d
leaq 0x1478ad(%rip), %r13    # 0x21b3a8
leaq 0x5ec45(%rip), %rsi     # 0x132747
movq %rbx, %rdi
xorl %eax, %eax
pushq (%r13)
pushq %r12
pushq (%r15,%r11,8)
pushq %r10
callq 0x9060
addq $0x20, %rsp
movl $0x1, %edi
callq 0xc36e2
movw %r14w, (%rbx)
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc36e2
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: restore_plot_config()
void restore_plot_config()
{
int i;

   if(showing_adv_file) { // restore all plots
      showing_adv_file = 0;
      for(i=0; i<NUM_PLOTS+DERIVED_PLOTS; i++) {
         plot[i].show_plot = plot[i].old_show;
      }
      plot_sat_count = old_sat_plot;
      plot_adev_data = old_adev_plot;
      if(plot_adev_data == 0) adev_decades_shown = 0;
      adev_period = xxx_adev_period;       // aaaaaapppppp other periods
      keep_adevs_fresh = old_keep_fresh;
   }
}

// Assembly:
leaq 0x26761c(%rip), %rax    # 0x33b3f1
cmpb $0x0, (%rax)
je 0xd3e67
movb $0x0, (%rax)
movl $0xc4, %eax
leaq 0x89f43(%rip), %rcx     # 0x15dd30
movl (%rcx,%rax), %edx
movl %edx, -0xac(%rcx,%rax)
addq $0xe8, %rax
cmpq $0x12e4, %rax           # imm = 0x12E4
jne 0xd3ded
pushq %rbp
movq %rsp, %rbp
leaq 0x2675e2(%rip), %rax    # 0x33b3f2
movb (%rax), %al
leaq 0x1475c2(%rip), %rcx    # 0x21b3db
movb %al, (%rcx)
leaq 0x2675d1(%rip), %rax    # 0x33b3f3
movb (%rax), %al
leaq 0x1475ae(%rip), %rcx    # 0x21b3d9
movb %al, (%rcx)
testb %al, %al
jne 0xd3e3e
leaq 0x14498c(%rip), %rax    # 0x2187c4
movl $0x0, (%rax)
leaq 0x2675b3(%rip), %rax    # 0x33b3f8
movsd (%rax), %xmm0
leaq 0x168ea8(%rip), %rax    # 0x23ccf8
movsd %xmm0, (%rax)
leaq 0x267599(%rip), %rax    # 0x33b3f4
movb (%rax), %al
leaq 0x168ed8(%rip), %rcx    # 0x23cd3c
movb %al, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: jdate(int, int, int)
double jdate(int y, int m, int d)
{
long j;
long j1;
long j2;
long j3;
long c;
long x;

   // return the julian date of the start of a given day

   if(m < 3) {
      m = m + 12;
      j = y - 1;
   }
   else j = y;

   c = (j / 100L);
   x = j - (100L * c);
   j1 = (146097L * c) / 4L;
   j2 = (36525L * x) / 100L;
   j3 = ((153L*(long)m) - 457L) / 5L;
   return (1721119.5-1.0) + (double) j1 + (double) j2 + (double) j3 + (double) d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %ecx
leal 0xc(%rsi), %r8d
xorl %eax, %eax
cmpl $0x3, %esi
setl %al
cmovgel %esi, %r8d
subl %eax, %edi
movslq %edi, %rax
imulq $0x51eb851f, %rax, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x25, %rdx
addl %esi, %edx
movslq %edx, %rdx
imulq $-0x64, %rdx, %rsi
addq %rax, %rsi
imulq $0x23ab1, %rdx, %rax    # imm = 0x23AB1
leaq 0x3(%rax), %r9
testq %rax, %rax
cmovnsq %rax, %r9
sarq $0x2, %r9
imulq $0x8ead, %rsi, %rdi     # imm = 0x8EAD
movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B
movq %rdi, %rax
imulq %rdx
movq %rdx, %rsi
addq %rdi, %rsi
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x6, %rsi
movslq %r8d, %rax
imulq $0x99, %rax, %rax
addq $-0x1c9, %rax           # imm = 0xFE37
movabsq $0x6666666666666667, %rdx # imm = 0x6666666666666667
imulq %rdx
addq %rdi, %rsi
movq %rdx, %rax
shrq $0x3f, %rax
sarq %rdx
addq %rax, %rdx
cvtsi2sd %r9, %xmm0
addsd 0x56ed9(%rip), %xmm0    # 0x12b7e8
cvtsi2sd %rsi, %xmm1
addsd %xmm0, %xmm1
cvtsi2sd %rdx, %xmm2
addsd %xmm1, %xmm2
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
addsd %xmm2, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: xml_val(char*)
DATA_SIZE xml_val(char *line)
{
char *s;

   // get a numeric value from an XML data point line

   if(line == 0) return 0.0;

   s = strchr(line, '>');

   if(s == 0) return 0.0;
   else if(s[0] == 0) return 0.0;
   else return (DATA_SIZE) atof(s+1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0xd498d
movl $0x3e, %esi
callq 0x9100
testq %rax, %rax
je 0xd498d
cmpb $0x0, (%rax)
je 0xd498d
incq %rax
movq %rax, %rdi
popq %rbp
jmp 0x9470
xorps %xmm0, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: xml_string(char*)
char *xml_string(char *line)
{
char *s;
char *s2;

   // get a string value from an XML data point line

   if(line == 0) return "";

   s = strchr(line, '>');
   if(s == 0) return "";
   else if(s[0] == 0) return "";

   s2 = strchr(s, '<');
   if(s2) *s2 = 0;

   return s+1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x5d0f6(%rip), %rbx     # 0x131a96
testq %rdi, %rdi
je 0xd49d7
movl $0x3e, %esi
callq 0x9100
testq %rax, %rax
je 0xd49d7
movq %rax, %r14
cmpb $0x0, (%rax)
je 0xd49d7
movq %r14, %rdi
movl $0x3c, %esi
callq 0x9100
testq %rax, %rax
je 0xd49d1
movb $0x0, (%rax)
incq %r14
movq %r14, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: set_log_title(char*)
void set_log_title(char *plot_title)
{
int i;

   // set the plot title string from info in a log file
   if(plot_title == 0) return;

   i = strlen(plot_title);

   if(i && (plot_title[i-1] == 0x0D)) plot_title[i-1] = 0;
   if(i && (plot_title[i-1] == 0x0A)) plot_title[i-1] = 0;
   if(plot_title[0]) title_type = USER;
   else              title_type = NONE;

   saw_log_title = 1;
   show_title();
   refresh_page();
}

// Assembly:
testq %rdi, %rdi
je 0xd7310
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9120
testl %eax, %eax
je 0xd72e3
decl %eax
cltq
movzbl (%rbx,%rax), %ecx
cmpl $0xd, %ecx
je 0xd72df
cmpl $0xa, %ecx
jne 0xd72e3
movb $0x0, (%rbx,%rax)
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
addl %eax, %eax
leaq 0x267fd8(%rip), %rcx    # 0x33f2cc
movl %eax, (%rcx)
movl $0x1, 0x2a3374(%rip)    # 0x37a674
callq 0x17eb5
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xab54
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: alloc_mtie(int)
void alloc_mtie(int why)
{
   alloc_mtie_data(CHA_MTIE, adev_q_size);
   alloc_mtie_data(CHB_MTIE, adev_q_size);
   alloc_mtie_data(CHC_MTIE, adev_q_size);
   alloc_mtie_data(CHD_MTIE, adev_q_size);
   mtie_allocated = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x16495c(%rip), %rbx    # 0x23ccd8
movl (%rbx), %esi
xorl %edi, %edi
callq 0xfe060
movl (%rbx), %esi
movl $0x1, %edi
callq 0xfe060
movl (%rbx), %esi
movl $0x2, %edi
callq 0xfe060
movl (%rbx), %esi
movl $0x3, %edi
callq 0xfe060
leaq 0x164934(%rip), %rax    # 0x23cce4
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: force_adev_redraw(int)
void force_adev_redraw(int why)
{
    // force a redraw of the the adev tables and graphs
    have_time = 0;
    pps_adev_disp = ADEV_DISPLAY_RATE;
    osc_adev_disp = ADEV_DISPLAY_RATE;
    chc_adev_disp = ADEV_DISPLAY_RATE;
    chd_adev_disp = ADEV_DISPLAY_RATE;

    max_adev_width = 0;    // recalc table sizes
    adev_page_size = 0;
    adev_table_rows = 0;

    update_adev_display(ATYPE, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x16632c(%rip), %rax    # 0x23eedc
movb $0x0, (%rax)
leaq 0x163f96(%rip), %rax    # 0x23cb50
movl $0xa, %ecx
movl %ecx, (%rax)
leaq 0x163fd8(%rip), %rax    # 0x23cba0
movl %ecx, (%rax)
leaq 0x16401f(%rip), %rax    # 0x23cbf0
movl %ecx, (%rax)
leaq 0x16405e(%rip), %rax    # 0x23cc38
movl %ecx, (%rax)
leaq 0x1640a9(%rip), %rax    # 0x23cc8c
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x13fbce(%rip), %rax    # 0x2187bc
movl %ecx, (%rax)
leaq 0x13fbc9(%rip), %rax    # 0x2187c0
movl %ecx, (%rax)
leaq 0x14aa10(%rip), %rax    # 0x223610
movl (%rax), %edi
movl $0x1, %esi
popq %rbp
jmp 0x103d0b
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: read_rawfile(char*)
int read_rawfile(char *s)
{
long seek_addr;

   // load a .raw capture file and treat it as a simulation file

   if(s == 0) return 0;
   strcpy(sim_name, s);

   s = strchr(sim_name, ',');
   if(s) {  // seek offset set
      *s = 0;
      seek_addr = (long) atoi(s+1);
   }
   else seek_addr = 0;

   sim_file = topen(sim_name, "rb");
   if(sim_file == 0) return 1;
   if(rcvr_type != CS_RCVR) sim_file_read |= 0x01;

   kbd_sim = 1;  // flag that a keyboard command opened the simulation file
   fseek(sim_file, seek_addr, SEEK_SET);
   sim_eof = 0;

   return 2;
}

// Assembly:
testq %rdi, %rdi
je 0xd8f01
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rsi
leaq 0x16468c(%rip), %rbx    # 0x23d560
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
movl $0x2c, %esi
callq 0x9100
testq %rax, %rax
je 0xd8f04
movb $0x0, (%rax)
incq %rax
movq %rax, %rdi
callq 0x95e0
movslq %eax, %rbx
jmp 0xd8f06
xorl %eax, %eax
retq
xorl %ebx, %ebx
leaq 0x164653(%rip), %rdi    # 0x23d560
leaq 0x451c9(%rip), %rsi     # 0x11e0dd
callq 0x9a47
leaq 0x1654a0(%rip), %rcx    # 0x23e3c0
movq %rax, (%rcx)
testq %rax, %rax
je 0xd8f70
leaq 0x13f9a1(%rip), %rcx    # 0x2188d0
cmpq $0x20000, (%rcx)        # imm = 0x20000
je 0xd8f42
leaq 0x14a6cd(%rip), %rcx    # 0x22360c
orb $0x1, (%rcx)
leaq 0x165497(%rip), %rcx    # 0x23e3e0
movl $0x1, (%rcx)
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x93d0
leaq 0x165475(%rip), %rax    # 0x23e3d8
movl $0x0, (%rax)
movl $0x2, %eax
jmp 0xd8f75
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: read_signals(char*)
void read_signals(char *s)
{
FILE *sig_file;
float az, el, sig;

   // stop recording live signal strength data and load in signal strength 
   // data from a log file

   sig_file = topen(s, "r");
   if(sig_file == 0) return;
   clear_signals();       // flush the old data
   
   plot_signals = 4;      // show the pretty color map

   while(fgets(out, sizeof out, sig_file) != NULL) {
      if((out[0] == '*') || (out[0] == ';') || (out[0] == '/') || (out[0] == '#')) {
         continue;  // comment line
      }
      sscanf(out, "%f %f %f", &az, &el, &sig);
      log_signal(az, el, sig, 0);
   }

   fclose(sig_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x45c40(%rip), %rsi     # 0x120d8d
callq 0x9a47
testq %rax, %rax
je 0xdb1fd
movq %rax, %rbx
callq 0xf947d
leaq 0x1402ab(%rip), %rax    # 0x21b415
movb $0x4, (%rax)
leaq 0x2610ac(%rip), %r14    # 0x33c220
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
je 0xdb1f5
leaq -0x30(%rbp), %r13
leaq -0x2c(%rbp), %r15
movabsq $0x800840800000000, %r12 # imm = 0x800840800000000
movzbl (%r14), %eax
cmpq $0x3b, %rax
ja 0xdb1c2
btq %rax, %r12
jae 0xdb1c2
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
jne 0xdb19b
jmp 0xdb1f5
movq %r14, %rdi
leaq 0x59fe3(%rip), %rsi     # 0x1351af
leaq -0x34(%rbp), %rdx
movq %r13, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x9360
movss -0x34(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
movss -0x2c(%rbp), %xmm2
xorl %edi, %edi
callq 0xf9622
jmp 0xdb1ab
movq %rbx, %rdi
callq 0x9370
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: read_prn(char*)
void read_prn(char *s)
{
FILE *prn_file;
double jd;
int prn;
float az, el, sig;

   // load in satellie time, prn, az, el, signal strength 
   // data from a .prn file

   prn_file = topen(s, "r");
   if(prn_file == 0) return;

   while(fgets(out, sizeof out, prn_file) != NULL) {
      if((out[0] == '*') || (out[0] == ';') || (out[0] == '/') || (out[0] == '#')) {
         continue;  // comment line
      }
      sscanf(out, "%lf %d %f %f %f", &jd, &prn, &az, &el, &sig);
      log_signal(az, el, sig, 0);   // !!!!! do something with this data?
   }

   fclose(prn_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x45b69(%rip), %rsi     # 0x120d8d
callq 0x9a47
testq %rax, %rax
je 0xdb2d1
movq %rax, %rbx
leaq 0x260fe4(%rip), %r14    # 0x33c220
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rax, %rdx
callq 0x9600
testq %rax, %rax
je 0xdb2c9
leaq -0x34(%rbp), %r15
leaq -0x30(%rbp), %r12
movabsq $0x800840800000000, %r13 # imm = 0x800840800000000
movzbl (%r14), %eax
cmpq $0x3b, %rax
ja 0xdb28a
btq %rax, %r13
jae 0xdb28a
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
jne 0xdb263
jmp 0xdb2c9
leaq -0x2c(%rbp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
leaq 0x59f0c(%rip), %rsi     # 0x1351a8
leaq -0x40(%rbp), %rdx
leaq -0x38(%rbp), %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x9360
movss -0x34(%rbp), %xmm0
movss -0x30(%rbp), %xmm1
movss -0x2c(%rbp), %xmm2
xorl %edi, %edi
callq 0xf9622
jmp 0xdb273
movq %rbx, %rdi
callq 0x9370
addq $0x28, %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: bump_time()
void bump_time(void)
{
  // add one second to current time value
  month = fix_month(month);
  if(++seconds >= 60) {
     seconds = 0;
     if(++minutes >= 60) {
        minutes = 0;
        if(++hours >= 24) {
           hours = 0;
           if(++day > dim[month]) {
              day = 1;
              if(++month > 12) {
                 month = 1;
                 ++year;
              }
           }
        }
     }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x231828(%rip), %rbx    # 0x30d4d8
movl (%rbx), %edi
callq 0x723a5
movl %eax, (%rbx)
leaq 0x231808(%rip), %rcx    # 0x30d4c8
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
cmpl $0x3b, %edx
jl 0xdbd40
movl $0x0, (%rcx)
leaq 0x2317f3(%rip), %rcx    # 0x30d4cc
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
cmpl $0x3b, %edx
jl 0xdbd40
movl $0x0, (%rcx)
leaq 0x2317de(%rip), %rcx    # 0x30d4d0
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
cmpl $0x17, %edx
jl 0xdbd40
movl $0x0, (%rcx)
leaq 0x2317c9(%rip), %rcx    # 0x30d4d4
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
movslq %eax, %rsi
leaq 0x8e9e4(%rip), %rdi     # 0x16a700
cmpl (%rdi,%rsi,4), %edx
jl 0xdbd40
movl $0x1, (%rcx)
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0xc, %eax
jl 0xdbd40
movl $0x1, (%rbx)
leaq 0x23179e(%rip), %rax    # 0x30d4dc
incl (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: glonass_prn(int)
int glonass_prn(int prn)
{
   if(rcvr_type == GPSD_RCVR) { // we don't know the actual receiver type GPSD is using 
      return 0;
   }
   else if(rcvr_type == ESIP_RCVR) {
      if(prn < 65) return 0;
      if(prn > 92) return 0;
   }
   else {
      if(prn < 65) return 0;
      if(prn > 96) return 0;
   }
   return (prn-64);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x13cae7(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
xorl %eax, %eax
cmpq $0x200, %rcx            # imm = 0x200
je 0xdbe0e
movl $0x80000000, %edx       # imm = 0x80000000
cmpq %rdx, %rcx
jne 0xdbe10
leal -0x5d(%rdi), %ecx
cmpl $-0x1c, %ecx
jb 0xdbe0e
addl $-0x40, %edi
movl %edi, %eax
popq %rbp
retq
leal -0x61(%rdi), %ecx
cmpl $-0x20, %ecx
jae 0xdbe09
jmp 0xdbe0e
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: galileo_prn(int)
int galileo_prn(int prn)
{
   if(rcvr_type == UBX_RCVR) {
      if((prn >= 211) && (prn <= 246)) return prn-210;
   }
   else if(rcvr_type == VENUS_RCVR) {
      if((prn >= 301) && (prn <= 350)) return prn-300;
   }
   else if(0 && (rcvr_type == TSIP_RCVR)) {
      // 183, 192,193,200
      if((prn >= 97) && (prn <= 133)) return prn-96;
   }
   return 0;  // not yet supported
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x13ca6f(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
cmpq $0x80, %rcx
je 0xdbe88
xorl %eax, %eax
cmpq $0x4, %rcx
jne 0xdbe9c
leal -0xd3(%rdi), %ecx
addl $0xffffff2e, %edi       # imm = 0xFFFFFF2E
xorl %eax, %eax
cmpl $0x24, %ecx
jmp 0xdbe99
leal -0x12d(%rdi), %ecx
addl $0xfffffed4, %edi       # imm = 0xFFFFFED4
xorl %eax, %eax
cmpl $0x32, %ecx
cmovbl %edi, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: beidou_prn(int)
int beidou_prn(int prn)
{
   // not supported in RINEX before v3.0
   if(1 && (rcvr_type == UBX_RCVR)) {
      if((prn >= 159) && (prn <= 163)) return prn-158;
      else if((prn >= 33) && (prn <= 64)) return 6+(prn-33);
   }
   else if(rcvr_type == VENUS_RCVR) {
      if((prn >= 201) && (prn <= 237)) return prn-200;
   }
   else if(0 && (rcvr_type == TSIP_RCVR)) {
      if((prn >= 201) && (prn <= 237)) return prn-200;
   }
   return 0;  // not yet supported
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x13c9da(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
cmpq $0x80, %rcx
je 0xdbf1f
xorl %eax, %eax
cmpq $0x4, %rcx
jne 0xdbf40
leal -0x9f(%rdi), %eax
cmpl $0x4, %eax
ja 0xdbf32
addl $0xffffff62, %edi       # imm = 0xFFFFFF62
movl %edi, %eax
jmp 0xdbf40
leal -0xc9(%rdi), %ecx
addl $0xffffff38, %edi       # imm = 0xFFFFFF38
xorl %eax, %eax
cmpl $0x25, %ecx
jmp 0xdbf3d
leal -0x21(%rdi), %ecx
addl $-0x1b, %edi
xorl %eax, %eax
cmpl $0x20, %ecx
cmovbl %edi, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: qzss_prn(int)
int qzss_prn(int prn)
{
   // returns the RINEX PRN id code if sat is a QZSS satellite
   if(rcvr_type == ESIP_RCVR) {
      if((prn >= 93) && (prn < 199)) return prn-92;
   }
   else if(rcvr_type == TSIP_RCVR) {
      // 183, 192, 193, 200
   }
   else if(rcvr_type == UBX_RCVR){
      if((prn >= 193) && (prn <= 197)) return prn-192;
   }
   else if(rcvr_type == VENUS_RCVR){
      if((prn >= 193) && (prn <= 199)) return prn-192;
   }

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x13c96e(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
cmpq $0x4, %rcx
je 0xdbfa0
cmpq $0x80, %rcx
je 0xdbf8d
xorl %eax, %eax
movl $0x80000000, %edx       # imm = 0x80000000
cmpq %rdx, %rcx
jne 0xdbfb4
leal -0x5d(%rdi), %ecx
addl $-0x5c, %edi
xorl %eax, %eax
cmpl $0x6a, %ecx
jmp 0xdbfb1
leal -0xc1(%rdi), %ecx
addl $0xffffff40, %edi       # imm = 0xFFFFFF40
xorl %eax, %eax
cmpl $0x7, %ecx
jmp 0xdbfb1
leal -0xc1(%rdi), %ecx
addl $0xffffff40, %edi       # imm = 0xFFFFFF40
xorl %eax, %eax
cmpl $0x5, %ecx
cmovbl %edi, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: gnss_letter(int)
char gnss_letter(int prn)
{
char c;

   rinex_gnss(prn);
   if(rcvr_type == GPSD_RCVR)  c = ' ';
   else if(gnss_sat & GPS)     c = 'G';
   else if(gnss_sat & BEIDOU)  c = 'C';
   else if(gnss_sat & GALILEO) c = 'E';
   else if(gnss_sat & IRNSS)   c = 'I';
   else if(gnss_sat & QZSS)    c = 'J';
   else if(gnss_sat & IMES)    c = 'M';
   else if(gnss_sat & GLONASS) c = 'R';
   else if(gnss_sat & SBAS)    c = 'S';
   else                        c = ' ';

   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0xdc01f
leaq 0x13c6cf(%rip), %rcx    # 0x2188d0
movb $0x20, %al
cmpq $0x200, (%rcx)          # imm = 0x200
je 0xdc258
leaq 0x94a6d(%rip), %rax     # 0x170c80
movl (%rax), %ecx
movb $0x47, %al
testb $0x1, %cl
jne 0xdc258
movb $0x43, %al
testb $0x8, %cl
jne 0xdc258
movb $0x45, %al
testb $0x4, %cl
jne 0xdc258
movb $0x49, %al
testb $0x10, %cl
jne 0xdc258
movb $0x4a, %al
btl $0xe, %ecx
jb 0xdc258
movb $0x4d, %al
btl $0xd, %ecx
jb 0xdc258
movb $0x52, %al
testb $0x2, %cl
jne 0xdc258
testw %cx, %cx
movl $0x20, %ecx
movl $0x53, %eax
cmovnsl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: gnss_id(int)
char *gnss_id(int prn)
{
char *s;

   rinex_gnss(prn);
   if(rcvr_type == GPSD_RCVR)  s = "PRN";
   else if(gnss_sat & GPS)     s = "GPS";
   else if(gnss_sat & BEIDOU)  s = "BEIDOU";
   else if(gnss_sat & GALILEO) s = "GALILEO";
   else if(gnss_sat & IRNSS)   s = "IRNSS";
   else if(gnss_sat & QZSS)    s = "QZSS";
   else if(gnss_sat & IMES)    s = "IMES";
   else if(gnss_sat & GLONASS) s = "GLONASS";
   else if(gnss_sat & SBAS)    s = "SBAS";
   else                        s = "PRN";

   return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0xdc01f
leaq 0x13c666(%rip), %rax    # 0x2188d0
cmpq $0x200, (%rax)          # imm = 0x200
jne 0xdc27c
leaq 0x56ef5(%rip), %rax     # 0x13316f
jmp 0xdc2f9
leaq 0x949fd(%rip), %rax     # 0x170c80
movl (%rax), %eax
testb $0x1, %al
jne 0xdc2bc
testb $0x8, %al
jne 0xdc2c5
testb $0x4, %al
jne 0xdc2ce
testb $0x10, %al
jne 0xdc2d7
btl $0xe, %eax
jb 0xdc2e0
btl $0xd, %eax
jb 0xdc2e9
testb $0x2, %al
jne 0xdc2f2
testw %ax, %ax
leaq 0x56ec0(%rip), %rcx     # 0x13316f
leaq 0x4846a(%rip), %rax     # 0x124720
cmovnsq %rcx, %rax
jmp 0xdc2f9
leaq 0x5762e(%rip), %rax     # 0x1338f1
jmp 0xdc2f9
leaq 0x57150(%rip), %rax     # 0x13341c
jmp 0xdc2f9
leaq 0x5714e(%rip), %rax     # 0x133423
jmp 0xdc2f9
leaq 0x3ccf8(%rip), %rax     # 0x118fd6
jmp 0xdc2f9
leaq 0x57144(%rip), %rax     # 0x13342b
jmp 0xdc2f9
leaq 0x57140(%rip), %rax     # 0x133430
jmp 0xdc2f9
leaq 0x5713c(%rip), %rax     # 0x133435
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: good_raw(int)
int good_raw(int prn)
{
   // return the RINEX system id char if it's a satellite we support
   if(sat[prn].level_msg == 0) return 0;  // sat is not tracked
   if(sat[prn].tracking <= 0) return 0;

   if(rinex_prn(prn)) {
      if     (gps_sat(prn))     return gps_sat(prn);      // it's a GPS sat
      else if(sbas_sat(prn))    return sbas_sat(prn);     // it's a SBAS sat
      else if(glonass_sat(prn)) return glonass_sat(prn);  // 
      else if(galileo_sat(prn)) return galileo_sat(prn);  // 
      else if(beidou_sat(prn))  return beidou_sat(prn);   // 
   }

   return 0;  // it's not OK to output the sat's RAW measurements
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movslq %edi, %rax
imulq $0x348, %rax, %rcx      # imm = 0x348
leaq 0x162c9d(%rip), %rax    # 0x23efb0
xorl %r14d, %r14d
cmpl $0x0, 0x1c(%rax,%rcx)
je 0xdc353
addq %rcx, %rax
cmpl $0x0, 0x218(%rax)
jle 0xdc353
movl %edi, %ebx
callq 0xdc01f
testl %eax, %eax
je 0xdc353
leal -0x21(%rbx), %eax
movl $0x47, %r14d
cmpl $-0x21, %eax
ja 0xdc353
movl %ebx, %edi
callq 0xdbd6e
movl $0x53, %r14d
testl %eax, %eax
je 0xdc35b
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x13c56e(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x200, %rax            # imm = 0x200
je 0xdc38f
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, %rax
jne 0xdc387
leal -0x5d(%rbx), %eax
movl $0x52, %r14d
cmpl $-0x1c, %eax
jae 0xdc353
jmp 0xdc38f
leal -0x61(%rbx), %ecx
cmpl $-0x20, %ecx
jae 0xdc3b2
movl %ebx, %edi
callq 0xdbe9e
movl %eax, %r14d
testl %eax, %eax
jne 0xdc353
movl %ebx, %edi
callq 0xdbeeb
testl %eax, %eax
movl $0x43, %r14d
cmovel %eax, %r14d
jmp 0xdc353
xorl %ecx, %ecx
cmpq $0x200, %rax            # imm = 0x200
movl $0x52, %r14d
cmovel %ecx, %r14d
jmp 0xdc353
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: add_obs_val(_IO_FILE*, char*, int*)
void add_obs_val(FILE *file, char *meas, int *obs_count)
{
int max_obs;

   // add the observation value to the output string

   if(file == 0) return;
   if(meas == 0) return;
   if(obs_count == 0) return;

   max_obs = 5;
   if(rinex_fmt >= 3.0) max_obs = 100;

   fprintf(file, "%s", meas);
   *obs_count = (*obs_count)+1;
   if(*obs_count >= max_obs) {
      fprintf(file, "\n");
      out[0] = 0;
      *obs_count = 0;
      obs_data_written = 1;
   }
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
orb %cl, %al
jne 0xdc45a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x16218b(%rip), %rax    # 0x23e580
movsd (%rax), %xmm0
ucomisd 0x2f607(%rip), %xmm0    # 0x10ba08
movl $0x5, %eax
movl $0x64, %r15d
cmovbl %eax, %r15d
movq %rsi, %rdi
movq %r14, %rsi
callq 0x9400
movl (%rbx), %eax
incl %eax
movl %eax, (%rbx)
cmpl %r15d, %eax
jl 0xdc450
movl $0xa, %edi
movq %r14, %rsi
callq 0x9480
leaq 0x25fde6(%rip), %rax    # 0x33c220
movb $0x0, (%rax)
movl $0x0, (%rbx)
leaq 0x161faa(%rip), %rax    # 0x23e3f4
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: add_obs_type(int*, int, int)
int add_obs_type(int *obs_type, int count, int obs)
{
int i;

   // add an observation ID to the observation type list

   if(obs_type == 0) return count;
   if(count >= MAX_OBS) return count;

   for(i=0; i<count; i++) {  // filter out duplicates
      if(obs_type[i] == obs) return count;
   }

   obs_type[count++] = obs;
   return obs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
testq %rdi, %rdi
sete %cl
cmpl $0x1b, %esi
setge %dl
orb %cl, %dl
je 0xdc475
movl %esi, %eax
jmp 0xdc490
testl %esi, %esi
jle 0xdc48a
movl %esi, %ecx
xorl %edx, %edx
cmpl %eax, (%rdi,%rdx,4)
je 0xdc471
incq %rdx
cmpq %rdx, %rcx
jne 0xdc47d
movslq %esi, %rcx
movl %eax, (%rdi,%rcx,4)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: rinex_cppr(int, double, double)
double rinex_cppr(int prn, double range, double carrier)
{
double cp_range;
int gnss;

  // convert carrier phase to pseudorange
  // (testing shows this actually makes things worse)
  if(use_rinex_cppr == 0) return range;
  if(have_phase == 0) return range;

  gnss = rinex_gnss(prn);
  if(gnss & GPS) ;           // sats in 1575.426 Mhz L1
  else if(gnss & SBAS) ;
  else if(gnss & GALILEO) ;
  else return range;

  cp_range = carrier * ((LIGHTSPEED*1000.0)/1575.42E6);
if(0 &&debug_file) fprintf(debug_file, "cppr(%d,%f): %f -> %f\n", prn,carrier, range,cp_range);
  return cp_range;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x15fbe2(%rip), %rax    # 0x23e58c
cmpl $0x0, (%rax)
je 0xde9ed
leaq 0x22e98e(%rip), %rax    # 0x30d344
cmpl $0x0, (%rax)
je 0xde9ed
movsd %xmm1, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
callq 0xdc01f
movsd -0x10(%rbp), %xmm0
leaq 0x922aa(%rip), %rax     # 0x170c80
movzwl (%rax), %eax
testl $0x8005, %eax           # imm = 0x8005
je 0xde9ed
movsd -0x8(%rbp), %xmm0
mulsd 0x4ce33(%rip), %xmm0    # 0x12b820
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: init_dsm(int)
void init_dsm(int year)
{
int month;

   // days to start of month (and days in month)
   dsm[0]  = 0;
   dsm[1]  = 0;         // Jan
   dsm[2]  = 0+31;      // Feb
   dsm[3]  = 0+31+28;   // March ...
   dsm[4]  = 0+31+28+31;
   dsm[5]  = 0+31+28+31+30;
   dsm[6]  = 0+31+28+31+30+31;
   dsm[7]  = 0+31+28+31+30+31+30;
   dsm[8]  = 0+31+28+31+30+31+30+31;
   dsm[9]  = 0+31+28+31+30+31+30+31+31;
   dsm[10] = 0+31+28+31+30+31+30+31+31+30;
   dsm[11] = 0+31+28+31+30+31+30+31+31+30+31;
   dsm[12] = 0+31+28+31+30+31+30+31+31+30+31+30;

   dim[2] = 28;

   if(leap_year(year)) {
      for(month=2; month<=12; month++) dsm[month] += 1;
      dim[2] += 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movaps 0x4c1bf(%rip), %xmm0    # 0x12c900
leaq 0x22d1f8(%rip), %rax    # 0x30d940
movaps %xmm0, (%rax)
movaps 0x4c1be(%rip), %xmm0    # 0x12c910
movaps %xmm0, 0x10(%rax)
movaps 0x4c1c3(%rip), %xmm0    # 0x12c920
movaps %xmm0, 0x20(%rax)
movl $0x14e, 0x30(%rax)      # imm = 0x14E
movl $0x1c, 0x89f96(%rip)    # 0x16a708
testb $0x3, %dil
jne 0xe07cb
imull $0xc28f5c29, %edi, %ecx # imm = 0xC28F5C29
addl $0x51eb850, %ecx        # imm = 0x51EB850
rorl $0x2, %ecx
cmpl $0x28f5c28, %ecx        # imm = 0x28F5C28
ja 0xe07b0
movslq %edi, %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, %edi
jne 0xe07cb
movl $0x2, %ecx
incl (%rax,%rcx,4)
incq %rcx
cmpq $0xd, %rcx
jne 0xe07b5
movl $0x1d, 0x89f3d(%rip)    # 0x16a708
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: sun_mean_anomaly(double)
double sun_mean_anomaly(double jd)
{
double T, T2, T3;

   // return mean anomaly of the sun in radians at time JD
   T = (jd - JD2000) / 36525.0;
   T2 = T * T;
   T3 = T * T2;

   return (357.52772 + 35999.05034*T - 0.0001603*T2 - (T3 / 300000.0)) * (PI/180.0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
addsd 0x4ae0d(%rip), %xmm0    # 0x12b830
divsd 0x4ae0d(%rip), %xmm0    # 0x12b838
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
mulsd 0x4adfd(%rip), %xmm0    # 0x12b840
addsd 0x4adfd(%rip), %xmm0    # 0x12b848
mulsd 0x4adfd(%rip), %xmm1    # 0x12b850
addsd %xmm1, %xmm0
divsd 0x4adf9(%rip), %xmm2    # 0x12b858
addsd %xmm2, %xmm0
mulsd 0x2aea5(%rip), %xmm0    # 0x10b910
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: obliquity(double, int)
double obliquity(double JD, int nutate)
{
double t, p, w, EpsMeanDeg;

   // Code derived from code by Jay Tanner
   // Algorithm by JPL?

   // -----------------------------------------------------------
   // Compute the (t) value in Julian decamillennia corresponding
   // to the JD argument and reckoned from J2000.
   t = (JD - JD2000) / 3652500.0;

   // --------------------------------------
   // Compute mean obliquity in arc seconds.
   w  = 84381.448;  p  = t;
   w -=  4680.93*p; p *= t;
   w -=     1.55*p; p *= t;
   w +=  1999.25*p; p *= t;
   w -=    51.38*p; p *= t;
   w -=   249.67*p; p *= t;
   w -=    39.05*p; p *= t;
   w +=     7.12*p; p *= t;
   w +=    27.87*p; p *= t;
   w +=     5.79*p; p *= t;
   w +=     2.45*p;

   // ----------------------------------
   // Compute mean ecliptic obliquity in
   // degrees from arc seconds value.
   EpsMeanDeg = w / 3600.0;
   if(nutate) EpsMeanDeg += nutation(JD);   // adjust for nutation
   EpsMeanDeg *= (PI/180.0);     // convert to radians

   return EpsMeanDeg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x4a60b(%rip), %xmm5    # 0x12b830
addsd %xmm0, %xmm5
divsd 0x4a75f(%rip), %xmm5    # 0x12b990
movsd 0x4a75f(%rip), %xmm1    # 0x12b998
mulsd %xmm5, %xmm1
addsd 0x4a75b(%rip), %xmm1    # 0x12b9a0
movapd %xmm5, %xmm2
mulsd %xmm5, %xmm2
movapd %xmm5, %xmm3
mulsd %xmm2, %xmm3
mulsd 0x4a74b(%rip), %xmm2    # 0x12b9a8
addsd %xmm1, %xmm2
movapd %xmm5, %xmm1
mulsd %xmm3, %xmm1
mulsd 0x4a73f(%rip), %xmm3    # 0x12b9b0
movapd %xmm5, %xmm4
mulsd %xmm1, %xmm4
mulsd 0x4a737(%rip), %xmm1    # 0x12b9b8
addsd %xmm2, %xmm3
addsd %xmm3, %xmm1
movapd %xmm5, %xmm2
mulsd %xmm4, %xmm2
mulsd 0x4a727(%rip), %xmm4    # 0x12b9c0
addsd %xmm1, %xmm4
movapd %xmm5, %xmm1
mulsd %xmm2, %xmm1
mulsd 0x4a71b(%rip), %xmm2    # 0x12b9c8
addsd %xmm4, %xmm2
movapd %xmm5, %xmm3
mulsd %xmm1, %xmm3
mulsd 0x4a70f(%rip), %xmm1    # 0x12b9d0
movapd %xmm5, %xmm4
mulsd %xmm3, %xmm4
mulsd 0x4a707(%rip), %xmm3    # 0x12b9d8
addsd %xmm2, %xmm1
mulsd %xmm4, %xmm5
mulsd 0x4a6ff(%rip), %xmm4    # 0x12b9e0
addsd %xmm1, %xmm3
addsd %xmm3, %xmm4
mulsd 0x4a6f7(%rip), %xmm5    # 0x12b9e8
addsd %xmm4, %xmm5
divsd 0x27d13(%rip), %xmm5    # 0x109010
testl %edi, %edi
je 0xe1314
movsd %xmm5, -0x8(%rbp)
callq 0xe0a6d
movsd -0x8(%rbp), %xmm5
addsd %xmm0, %xmm5
mulsd 0x2a5f4(%rip), %xmm5    # 0x10b910
movapd %xmm5, %xmm0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: setup_calendars(int)
void setup_calendars(int why)
{
  #ifdef GEN_CHINA_DATA
     void load_china_data();
     void load_hk_data();
     load_china_data();              // process data from projectpluto.com "chinese.dat"
     load_hk_data();                 // process data from Hong Kong Observatory files
  #endif

   calc_seasons();                   // calc jdates of the equinoxes
   calc_moons(jd_local, 1);          // moon phases for the current month

   init_chinese(this_year);          // setup chinese calendar
   init_hebrew(this_year);           // setup Hebrew calendar (oy, vey! it be complicated)
   init_islamic(this_year);          // setup (appoximate) Islamic calendar
   init_persian(this_year);          // setup Persian/Afghan/Kurdish calendars
   init_indian(this_year);           // setup Indian civil calendar
   init_druid(this_year);            // setup pseudo-Druid calendar

   calc_greetings();                 // calculate seasonal holidays and insert into table
   show_greetings();                 // display any current greeting
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0xef56e
leaq 0x22bda8(%rip), %rax    # 0x30d548
movsd (%rax), %xmm0
callq 0xe9da0
leaq 0x22bd70(%rip), %rbx    # 0x30d520
movl (%rbx), %edi
callq 0xef38f
movl (%rbx), %edi
callq 0xee7bb
movl (%rbx), %edi
callq 0xeecf7
movl (%rbx), %edi
callq 0xeef75
movl (%rbx), %edi
callq 0xef111
movl (%rbx), %edi
callq 0xeedf8
callq 0xe5130
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe4a1f
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: dst_disabled()
int dst_disabled()
{
   if(time_zone_set == 0)   return 1;
   if(dst_start_day == 0)   return 2;
   if(dst_start_month == 0) return 3;
   if(dst_end_day == 0)     return 4;
   if(dst_end_month == 0)   return 5;
   if(dst_string[0] == 0)   return 6;
   if(dst_area == 0)        return 7;

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x22c09f(%rip), %rax    # 0x30d894
cmpb $0x0, (%rax)
je 0xe1840
cmpl $0x0, 0x2991ff(%rip)    # 0x37aa00
je 0xe1847
cmpl $0x0, 0x2991fa(%rip)    # 0x37aa04
je 0xe184e
cmpl $0x0, 0x2991f5(%rip)    # 0x37aa08
je 0xe1855
cmpl $0x0, 0x2991f0(%rip)    # 0x37aa0c
je 0xe185c
leaq 0x22c103(%rip), %rax    # 0x30d928
cmpb $0x0, (%rax)
je 0xe1863
leaq 0x22c06b(%rip), %rax    # 0x30d89c
xorl %ecx, %ecx
cmpl $0x0, (%rax)
movl $0x7, %eax
cmovnel %ecx, %eax
jmp 0xe1868
movl $0x1, %eax
jmp 0xe1868
movl $0x2, %eax
jmp 0xe1868
movl $0x3, %eax
jmp 0xe1868
movl $0x4, %eax
jmp 0xe1868
movl $0x5, %eax
jmp 0xe1868
movl $0x6, %eax
popq %rbp
retq