LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: write_log_comment(int)
void write_log_comment(int spaces)
{
   if(log_file == 0) return;
   if(log_comments == 0) return;

   if(log_fmt == HEATHER) {
      fprintf(log_file, "%s", log_text);
      while(spaces--) fprintf(log_file, "\n");
   }
   else if(log_fmt == KML) {
      if(filter_log_text()) {
         fprintf(log_file, "<!-- %s -->", log_text);
      }
      while(spaces--) fprintf(log_file, "\n");
   }
   else if(log_fmt == RINEX) {  // don't output anything until the RINEX header has been output
      if(rinex_header_written) {
         write_rinex_line(log_file, log_text, "COMMENT");
      }
   }
   else if(log_fmt == XML) {  // !!!! does this work when sending to a GPX viewer?
      if(filter_log_text()) {
         fprintf(log_file, "<!-- %s -->", log_text);
      }
      else {  // blank line
//       fprintf(log_file, "<!--  -->");
      }

      while(spaces--) {
         fprintf(log_file, "\n");
      }
   }

   if(debug_file) {
      if(log_text[1] == '!') fprintf(debug_file, "Event: %s\n", log_text);
      fflush(debug_file);
   }

   if(log_flush_mode && log_file) fflush(log_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x17b24d(%rip), %r14    # 0x23e360
movq (%r14), %rsi
testq %rsi, %rsi
je 0xc327a
leaq 0x17b2ee(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0xc327a
movl %edi, %ebx
leaq 0x17b310(%rip), %rax    # 0x23e448
movl (%rax), %eax
cmpl $0x1d, %eax
jg 0xc318b
testl %eax, %eax
je 0xc31c2
cmpl $0xa, %eax
jne 0xc321b
callq 0xc38cf
testl %eax, %eax
je 0xc316d
movq (%r14), %rdi
leaq 0x6a555(%rip), %rsi     # 0x12d6b4
leaq 0x17a7fa(%rip), %rdx    # 0x23d960
xorl %eax, %eax
callq 0x9560
testl %ebx, %ebx
je 0xc321b
movq (%r14), %rsi
movl $0xa, %edi
callq 0x9480
decl %ebx
jne 0xc3175
jmp 0xc321b
cmpl $0x1e, %eax
je 0xc31e5
cmpl $0x12e, %eax            # imm = 0x12E
jne 0xc321b
leaq 0x17b24a(%rip), %rax    # 0x23e3ec
cmpl $0x0, (%rax)
je 0xc321b
leaq 0x17a7b2(%rip), %rax    # 0x23d960
leaq 0x6a50b(%rip), %rdx     # 0x12d6c0
movq %rsi, %rdi
movq %rax, %rsi
callq 0xc3936
jmp 0xc321b
leaq 0x17a797(%rip), %rdi    # 0x23d960
callq 0x9400
testl %ebx, %ebx
je 0xc321b
movq (%r14), %rsi
movl $0xa, %edi
callq 0x9480
decl %ebx
jne 0xc31d2
jmp 0xc321b
callq 0xc38cf
testl %eax, %eax
je 0xc3206
movq (%r14), %rdi
leaq 0x6a4bc(%rip), %rsi     # 0x12d6b4
leaq 0x17a761(%rip), %rdx    # 0x23d960
xorl %eax, %eax
callq 0x9560
testl %ebx, %ebx
je 0xc321b
movq (%r14), %rsi
movl $0xa, %edi
callq 0x9480
decl %ebx
jne 0xc320a
leaq 0x17b16e(%rip), %rbx    # 0x23e390
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xc3254
leaq 0x17a72f(%rip), %rax    # 0x23d960
cmpb $0x21, 0x1(%rax)
jne 0xc324c
leaq 0x6a48a(%rip), %rsi     # 0x12d6c8
leaq 0x17a71b(%rip), %rdx    # 0x23d960
xorl %eax, %eax
callq 0x9560
movq (%rbx), %rdi
callq 0x9420
leaq 0x17b1c5(%rip), %rax    # 0x23e420
cmpl $0x0, (%rax)
setne %al
movq (%r14), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xc327a
popq %rbx
popq %r14
popq %rbp
jmp 0x9420
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: sync_log_file()
void sync_log_file()
{
   if(log_file == 0) return;

   if(log_fmt != HEATHER) {
      end_log_track();
      sync_file(log_file);
      start_log_track();
   }
   else {
      sync_file(log_file);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x17aacf(%rip), %rbx    # 0x23e360
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xc38bd
leaq 0x17aba8(%rip), %rax    # 0x23e448
cmpl $0x0, (%rax)
je 0xc38c4
callq 0xc2640
movq (%rbx), %rdi
callq 0xa7fd
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xc2351
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa7fd
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: filter_log_text()
int filter_log_text()
{
char *s;

   // remove potentially corrupting chars from log_text lines
   // returns 0 if resulting line is blank, 1 otherwise

   s = strchr(log_text, '!');
   while(s) {
      *s = ' ';
      s = strchr(s+1, '!');
   }

   s = strchr(log_text, '#');
   while(s) {
      *s = ' ';
      s = strchr(s+1, '#');
   }

   if(log_text[0] == 0) return 0;  // empty line
   if((log_text[0] == ' ') && (log_text[1] == 0)) return 0;  // blank line
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x17a084(%rip), %rdi    # 0x23d960
movl $0x21, %esi
callq 0x9100
testq %rax, %rax
je 0xc38f6
movb $0x20, (%rax)
incq %rax
movq %rax, %rdi
jmp 0xc38dc
leaq 0x17a063(%rip), %rbx    # 0x23d960
movq %rbx, %rdi
movl $0x23, %esi
callq 0x9100
testq %rax, %rax
je 0xc391a
movb $0x20, (%rax)
incq %rax
movq %rax, %rdi
jmp 0xc3900
movb (%rbx), %cl
testb %cl, %cl
je 0xc392d
xorb $0x20, %cl
xorl %eax, %eax
orb 0x1(%rbx), %cl
setne %al
jmp 0xc392f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: write_rinex_line(_IO_FILE*, char*, char*)
void write_rinex_line(FILE *file, char *s, char *type)
{
char buf[SLEN+1];

   // output a 60:20 character line to a RINEX file

   if(file == 0) return;
   if(s == 0) return;
   if(type == 0) return;

   sprintf(buf, "%-60.60s%-20.20s", s,type);
   buf[80] = 0;
   fprintf(file, "%s\n", buf);
}

// Assembly:
movq %rdx, %rcx
movq %rsi, %rdx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %sil
orb %al, %sil
testq %rcx, %rcx
sete %al
orb %sil, %al
jne 0xc39a4
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
leaq 0x69d34(%rip), %rsi     # 0x12d6a3
leaq -0x110(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
movb $0x0, 0x50(%r14)
leaq 0x6206b(%rip), %rsi     # 0x1259f7
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x9560
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x179fae(%rip), %rbx    # 0x23d960
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x154f4c(%rip), %rax    # 0x218914
movl (%rax), %eax
cmpl $0x1, %eax
je 0xc3a1b
cmpl $0x3, %eax
je 0xc39f8
cmpl $0x2, %eax
jne 0xc3a45
movups 0x69d13(%rip), %xmm0    # 0x12d6f3
movaps %xmm0, 0x20(%rbx)
movups 0x69cf8(%rip), %xmm0    # 0x12d6e3
movaps %xmm0, 0x10(%rbx)
movups 0x69cdd(%rip), %xmm0    # 0x12d6d3
jmp 0xc3a16
leaq 0x279861(%rip), %rax    # 0x33d260
cmpb $0x0, (%rax)
jne 0xc3a27
movups 0x69d3a(%rip), %xmm0    # 0x12d745
movups %xmm0, 0xb(%rbx)
movups 0x69d24(%rip), %xmm0    # 0x12d73a
movaps %xmm0, (%rbx)
jmp 0xc3a83
leaq 0x27983e(%rip), %rax    # 0x33d260
cmpb $0x0, (%rax)
je 0xc3a6a
leaq 0x179f32(%rip), %rdi    # 0x23d960
leaq 0x69cce(%rip), %rsi     # 0x12d703
leaq 0x279824(%rip), %rdx    # 0x33d260
xorl %eax, %eax
callq 0x9060
jmp 0xc3a83
movups 0x69d19(%rip), %xmm0    # 0x12d765
movaps %xmm0, 0x10(%rbx)
movups 0x69cfe(%rip), %xmm0    # 0x12d755
movaps %xmm0, (%rbx)
movabsq $0x726f736e657320, %rax # imm = 0x726F736E657320
movq %rax, 0x20(%rbx)
jmp 0xc3a83
movups 0x69cb8(%rip), %xmm0    # 0x12d729
movaps %xmm0, 0x10(%rbx)
movups 0x69c9d(%rip), %xmm0    # 0x12d719
movaps %xmm0, (%rbx)
movb $0x0, 0x20(%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x2797ec(%rip), %rax    # 0x33d280
cmpb $0x0, (%rax)
je 0xc3abf
leaq 0x179ec0(%rip), %rdi    # 0x23d960
leaq 0x69cd6(%rip), %rsi     # 0x12d77d
leaq 0x2797d2(%rip), %rdx    # 0x33d280
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xc3105
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6595f(%rip), %rcx     # 0x12fd89
movl $0xa, %edx
callq 0xe7d0
leaq 0x1504b9(%rip), %rax    # 0x21a8f4
movslq (%rax), %rax
testq %rax, %rax
jle 0xca4bf
incl %r14d
leaq 0x1(%rax), %r12
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rax,2), %rax
leaq 0x14eaf4(%rip), %rcx    # 0x218f50
leaq (%rcx,%rax), %r15
addq $-0x22, %r15
xorl %r13d, %r13d
cmpb $0x0, (%r15)
je 0xca4b2
leaq 0x14e394(%rip), %rax    # 0x218808
movslq (%rax), %rax
leaq 0x271b92(%rip), %rcx    # 0x33c010
addq %rax, %rcx
addq $-0x20, %rcx
movl %r14d, %edi
movl %ebx, %esi
movl $0xf, %edx
callq 0xe7d0
movl %r14d, %edi
movl %ebx, %esi
movl $0xf, %edx
movq %r15, %rcx
callq 0xe7d0
cmpl $0x6, %r13d
jg 0xca4bf
incl %r14d
incl %r13d
decq %r12
addq $-0x22, %r15
cmpq $0x1, %r12
jg 0xca467
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x271d35(%rip), %r15    # 0x33c220
movq %r15, %rdi
movl $0x3a, %esi
callq 0x9100
testq %rax, %rax
je 0xca575
subl %r15d, %eax
incl %eax
cltq
movb $0x0, (%r15,%rax)
movq %r15, %rdi
callq 0x9120
movq %rax, %r13
leaq 0x14e2ed(%rip), %rax    # 0x218808
movslq (%rax), %rax
leaq 0x271aeb(%rip), %rcx    # 0x33c010
leaq -0x28(%rax,%rcx), %rcx
movl %r14d, %edi
movl %r12d, %esi
movl $0xf, %edx
callq 0xe7d0
movl %r14d, %edi
movl %r12d, %esi
movl $0xa, %edx
movq %r15, %rcx
callq 0xe7d0
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 0xe7d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x242780(%rip), %rax    # 0x30dd00
movsd (%rax), %xmm0
leaq 0x64ee1(%rip), %rsi     # 0x13046c
movb $0x1, %al
callq 0x9560
leaq 0x24275f(%rip), %rax    # 0x30dcf8
movsd (%rax), %xmm0
leaq 0x64edd(%rip), %rsi     # 0x130481
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x24273b(%rip), %rax    # 0x30dcf0
movsd (%rax), %xmm0
leaq 0x64ed6(%rip), %rsi     # 0x130496
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x242717(%rip), %rax    # 0x30dce8
movsd (%rax), %xmm0
leaq 0x64ecf(%rip), %rsi     # 0x1304ab
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2426f3(%rip), %rax    # 0x30dce0
movsd (%rax), %xmm0
leaq 0x64ec8(%rip), %rsi     # 0x1304c0
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2426cf(%rip), %rax    # 0x30dcd8
movsd (%rax), %xmm0
leaq 0x64ec1(%rip), %rsi     # 0x1304d5
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2426ab(%rip), %rax    # 0x30dcd0
movsd (%rax), %xmm0
leaq 0x64eba(%rip), %rsi     # 0x1304ea
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x242687(%rip), %rax    # 0x30dcc8
movsd (%rax), %xmm0
leaq 0x64eb3(%rip), %rsi     # 0x1304ff
movq %rbx, %rdi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9560
// File: /workspace/github_cpp_makefile_star2_O1/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 0x24252e(%rip), %rax    # 0x30dba0
movsd (%rax), %xmm0
leaq 0x64def(%rip), %rsi     # 0x13046c
movb $0x1, %al
callq 0x9560
leaq 0x24250d(%rip), %rax    # 0x30db98
movsd (%rax), %xmm0
leaq 0x64deb(%rip), %rsi     # 0x130481
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2424e9(%rip), %rax    # 0x30db90
movsd (%rax), %xmm0
leaq 0x64de4(%rip), %rsi     # 0x130496
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2424c5(%rip), %rax    # 0x30db88
movsd (%rax), %xmm0
leaq 0x64ddd(%rip), %rsi     # 0x1304ab
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2424a1(%rip), %rax    # 0x30db80
movsd (%rax), %xmm0
leaq 0x64dd6(%rip), %rsi     # 0x1304c0
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x24247d(%rip), %rax    # 0x30db78
movsd (%rax), %xmm0
leaq 0x64dcf(%rip), %rsi     # 0x1304d5
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x242459(%rip), %rax    # 0x30db70
movsd (%rax), %xmm0
leaq 0x64dc8(%rip), %rsi     # 0x1304ea
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x242435(%rip), %rax    # 0x30db68
movsd (%rax), %xmm0
leaq 0x64dc1(%rip), %rsi     # 0x1304ff
movq %rbx, %rdi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9560
// File: /workspace/github_cpp_makefile_star2_O1/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 0x23f7f1(%rip), %rax    # 0x30d4e8
cmpl $0x0, (%rax)
je 0xcdd09
leaq 0x23f7ed(%rip), %rax    # 0x30d4f0
movsd (%rax), %xmm0
jmp 0xcdd39
leaq 0x23fa18(%rip), %rax    # 0x30d728
movl (%rax), %eax
addl $0x33, %eax
cvtsi2sd %eax, %xmm1
addsd 0x5d967(%rip), %xmm1    # 0x12b688
divsd 0x3b2e7(%rip), %xmm1    # 0x109010
xorpd %xmm0, %xmm0
addsd %xmm1, %xmm0
divsd 0x3b307(%rip), %xmm0    # 0x109040
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16b111(%rip), %rax    # 0x23e360
cmpq $0x0, (%rax)
je 0xd3296
leaq 0x16b19f(%rip), %rax    # 0x23e3fb
cmpb $0x0, (%rax)
je 0xd3296
leaq 0x16b1ac(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0xd3296
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movq %rdi, %rdx
leaq 0x16a6e3(%rip), %rdi    # 0x23d960
leaq 0x5f3a5(%rip), %rsi     # 0x132629
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
popq %rbp
jmp 0xc3105
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16b0b8(%rip), %rax    # 0x23e360
cmpq $0x0, (%rax)
je 0xd32d5
leaq 0x16b15f(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0xd32d5
movl %edi, %ebx
leaq 0x23a6b1(%rip), %rax    # 0x30d974
testb $0x2, 0x1(%rax)
jne 0xd32e0
leaq 0x16b12c(%rip), %rax    # 0x23e3fc
cmpb $0x0, (%rax)
je 0xd32e0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16a679(%rip), %r14    # 0x23d960
movw $0x23, %r15w
movw %r15w, (%r14)
movl $0x1, %edi
callq 0xc3105
leaq 0x5f338(%rip), %rsi     # 0x132639
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw %r15w, (%r14)
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc3105
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16a61c(%rip), %rbx    # 0x23d960
movw $0x23, %r14w
movw %r14w, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x23a17a(%rip), %r15    # 0x30d4d8
movl (%r15), %edi
callq 0x724e5
movl %eax, (%r15)
leaq 0x23a160(%rip), %rcx    # 0x30d4d0
movl (%rcx), %edx
leaq 0x23a153(%rip), %rcx    # 0x30d4cc
movl (%rcx), %ecx
leaq 0x23a146(%rip), %rsi    # 0x30d4c8
leaq 0x23a11b(%rip), %rdi    # 0x30d4a4
testb $0x1, (%rdi)
leaq 0x6046e(%rip), %rdi     # 0x133801
leaq 0x61a24(%rip), %r9      # 0x134dbe
cmoveq %rdi, %r9
movl (%rsi), %r8d
leaq 0x23a12c(%rip), %rsi    # 0x30d4d4
movl (%rsi), %r10d
movslq %eax, %r11
leaq 0x9738b(%rip), %r15     # 0x16a740
leaq 0x23a120(%rip), %rax    # 0x30d4dc
movl (%rax), %r12d
leaq 0x147fe2(%rip), %r13    # 0x21b3a8
leaq 0x5f28a(%rip), %rsi     # 0x132657
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 0xc3105
movw %r14w, (%rbx)
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc3105
// File: /workspace/github_cpp_makefile_star2_O1/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 0x267d33(%rip), %rax    # 0x33b3f1
cmpb $0x0, (%rax)
je 0xd3750
movb $0x0, (%rax)
movl $0xc4, %eax
leaq 0x8a65a(%rip), %rcx     # 0x15dd30
movl (%rcx,%rax), %edx
movl %edx, -0xac(%rcx,%rax)
addq $0xe8, %rax
cmpq $0x12e4, %rax           # imm = 0x12E4
jne 0xd36d6
pushq %rbp
movq %rsp, %rbp
leaq 0x267cf9(%rip), %rax    # 0x33b3f2
movb (%rax), %al
leaq 0x147cd9(%rip), %rcx    # 0x21b3db
movb %al, (%rcx)
leaq 0x267ce8(%rip), %rax    # 0x33b3f3
movb (%rax), %al
leaq 0x147cc5(%rip), %rcx    # 0x21b3d9
movb %al, (%rcx)
testb %al, %al
jne 0xd3727
leaq 0x1450a3(%rip), %rax    # 0x2187c4
movl $0x0, (%rax)
leaq 0x267cca(%rip), %rax    # 0x33b3f8
movsd (%rax), %xmm0
leaq 0x1695bf(%rip), %rax    # 0x23ccf8
movsd %xmm0, (%rax)
leaq 0x267cb0(%rip), %rax    # 0x33b3f4
movb (%rax), %al
leaq 0x1695ef(%rip), %rcx    # 0x23cd3c
movb %al, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %rsi
movabsq $-0x5c28f5c28f5c28f5, %r10 # imm = 0xA3D70A3D70A3D70B
movq %rsi, %rax
imulq %r10
addq %rsi, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
addq %rax, %rdx
imulq $-0x64, %rdx, %rax
addq %rsi, %rax
imulq $0x23ab1, %rdx, %rdx    # imm = 0x23AB1
leaq 0x3(%rdx), %r9
testq %rdx, %rdx
cmovnsq %rdx, %r9
sarq $0x2, %r9
imulq $0x8ead, %rax, %rdi     # imm = 0x8EAD
movq %rdi, %rax
imulq %r10
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 0x57547(%rip), %xmm0    # 0x12b708
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_O1/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 0xd423f
movl $0x3e, %esi
callq 0x9100
testq %rax, %rax
je 0xd423f
cmpb $0x0, (%rax)
je 0xd423f
incq %rax
movq %rax, %rdi
popq %rbp
jmp 0x9470
xorps %xmm0, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5d754(%rip), %rbx     # 0x1319a6
testq %rdi, %rdi
je 0xd4289
movl $0x3e, %esi
callq 0x9100
testq %rax, %rax
je 0xd4289
movq %rax, %r14
cmpb $0x0, (%rax)
je 0xd4289
movq %r14, %rdi
movl $0x3c, %esi
callq 0x9100
testq %rax, %rax
je 0xd4283
movb $0x0, (%rax)
incq %r14
movq %r14, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xd6bc4
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9120
testl %eax, %eax
je 0xd6b97
decl %eax
cltq
cmpb $0xd, (%rbx,%rax)
jne 0xd6b8d
movb $0x0, (%rbx,%rax)
cmpb $0xa, (%rbx,%rax)
jne 0xd6b97
movb $0x0, (%rbx,%rax)
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
addl %eax, %eax
leaq 0x268724(%rip), %rcx    # 0x33f2cc
movl %eax, (%rcx)
movl $0x1, 0x2a3ac0(%rip)    # 0x37a674
callq 0x17e7f
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xab5f
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x16509c(%rip), %rbx    # 0x23ccd8
movl (%rbx), %esi
xorl %edi, %edi
callq 0xfd984
movl (%rbx), %esi
movl $0x1, %edi
callq 0xfd984
movl (%rbx), %esi
movl $0x2, %edi
callq 0xfd984
movl (%rbx), %esi
movl $0x3, %edi
callq 0xfd984
leaq 0x165074(%rip), %rax    # 0x23cce4
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x166a62(%rip), %rax    # 0x23eedc
movb $0x0, (%rax)
leaq 0x1646cc(%rip), %rax    # 0x23cb50
movl $0xa, %ecx
movl %ecx, (%rax)
leaq 0x16470e(%rip), %rax    # 0x23cba0
movl %ecx, (%rax)
leaq 0x164755(%rip), %rax    # 0x23cbf0
movl %ecx, (%rax)
leaq 0x164794(%rip), %rax    # 0x23cc38
movl %ecx, (%rax)
leaq 0x1647df(%rip), %rax    # 0x23cc8c
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x140304(%rip), %rax    # 0x2187bc
movl %ecx, (%rax)
leaq 0x1402ff(%rip), %rax    # 0x2187c0
movl %ecx, (%rax)
leaq 0x14b146(%rip), %rax    # 0x223610
movl (%rax), %edi
movl $0x1, %esi
popq %rbp
jmp 0x103663
// File: /workspace/github_cpp_makefile_star2_O1/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 0xd8826
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rsi
leaq 0x164d67(%rip), %rbx    # 0x23d560
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
movl $0x2c, %esi
callq 0x9100
testq %rax, %rax
je 0xd8829
movb $0x0, (%rax)
incq %rax
movq %rax, %rdi
callq 0x95e0
movslq %eax, %rbx
jmp 0xd882b
xorl %eax, %eax
retq
xorl %ebx, %ebx
leaq 0x164d2e(%rip), %rdi    # 0x23d560
leaq 0x45819(%rip), %rsi     # 0x11e052
callq 0x9a4d
leaq 0x165b7b(%rip), %rcx    # 0x23e3c0
movq %rax, (%rcx)
testq %rax, %rax
je 0xd8895
leaq 0x14007c(%rip), %rcx    # 0x2188d0
cmpq $0x20000, (%rcx)        # imm = 0x20000
je 0xd8867
leaq 0x14ada8(%rip), %rcx    # 0x22360c
orb $0x1, (%rcx)
leaq 0x165b72(%rip), %rcx    # 0x23e3e0
movl $0x1, (%rcx)
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x93d0
leaq 0x165b50(%rip), %rax    # 0x23e3d8
movl $0x0, (%rax)
movl $0x2, %eax
jmp 0xd889a
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4621b(%rip), %rsi     # 0x120cad
callq 0x9a4d
testq %rax, %rax
je 0xdab42
movq %rax, %rbx
callq 0xf8d50
leaq 0x140966(%rip), %rax    # 0x21b415
movb $0x4, (%rax)
leaq 0x261767(%rip), %r14    # 0x33c220
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
je 0xdab3a
leaq -0x30(%rbp), %r13
leaq -0x2c(%rbp), %r15
movabsq $0x800840800000000, %r12 # imm = 0x800840800000000
movzbl (%r14), %eax
cmpq $0x3b, %rax
ja 0xdab07
btq %rax, %r12
jae 0xdab07
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
jne 0xdaae0
jmp 0xdab3a
movq %r14, %rdi
leaq 0x5a5ae(%rip), %rsi     # 0x1350bf
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 0xf8ef5
jmp 0xdaaf0
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_O1/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 0x46144(%rip), %rsi     # 0x120cad
callq 0x9a4d
testq %rax, %rax
je 0xdac16
movq %rax, %rbx
leaq 0x26169f(%rip), %r14    # 0x33c220
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rax, %rdx
callq 0x9600
testq %rax, %rax
je 0xdac0e
leaq -0x34(%rbp), %r15
leaq -0x30(%rbp), %r12
movabsq $0x800840800000000, %r13 # imm = 0x800840800000000
movzbl (%r14), %eax
cmpq $0x3b, %rax
ja 0xdabcf
btq %rax, %r13
jae 0xdabcf
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
jne 0xdaba8
jmp 0xdac0e
leaq -0x2c(%rbp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
leaq 0x5a4d7(%rip), %rsi     # 0x1350b8
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 0xf8ef5
jmp 0xdabb8
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_O1/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 0x231ee5(%rip), %rbx    # 0x30d4d8
movl (%rbx), %edi
callq 0x724e5
movl %eax, (%rbx)
leaq 0x231ec5(%rip), %rcx    # 0x30d4c8
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
cmpl $0x3b, %edx
jl 0xdb683
movl $0x0, (%rcx)
leaq 0x231eb0(%rip), %rcx    # 0x30d4cc
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
cmpl $0x3b, %edx
jl 0xdb683
movl $0x0, (%rcx)
leaq 0x231e9b(%rip), %rcx    # 0x30d4d0
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
cmpl $0x17, %edx
jl 0xdb683
movl $0x0, (%rcx)
leaq 0x231e86(%rip), %rcx    # 0x30d4d4
movl (%rcx), %edx
leal 0x1(%rdx), %esi
movl %esi, (%rcx)
movslq %eax, %rsi
leaq 0x8f0a1(%rip), %rdi     # 0x16a700
cmpl (%rdi,%rsi,4), %edx
jl 0xdb683
movl $0x1, (%rcx)
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0xc, %eax
jl 0xdb683
movl $0x1, (%rbx)
leaq 0x231e5b(%rip), %rax    # 0x30d4dc
incl (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x13d1a4(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
xorl %eax, %eax
cmpq $0x200, %rcx            # imm = 0x200
je 0xdb751
movl $0x80000000, %edx       # imm = 0x80000000
cmpq %rdx, %rcx
jne 0xdb753
leal -0x5d(%rdi), %ecx
cmpl $-0x1c, %ecx
jb 0xdb751
addl $-0x40, %edi
movl %edi, %eax
popq %rbp
retq
leal -0x61(%rdi), %ecx
cmpl $-0x20, %ecx
jae 0xdb74c
jmp 0xdb751
// File: /workspace/github_cpp_makefile_star2_O1/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 0x13d124(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
cmpq $0x80, %rcx
je 0xdb7d3
xorl %eax, %eax
cmpq $0x4, %rcx
jne 0xdb7e7
leal -0xd3(%rdi), %ecx
addl $0xffffff2e, %edi       # imm = 0xFFFFFF2E
xorl %eax, %eax
cmpl $0x24, %ecx
jmp 0xdb7e4
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_O1/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 0x13d08b(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
cmpq $0x80, %rcx
je 0xdb86e
xorl %eax, %eax
cmpq $0x4, %rcx
jne 0xdb88f
leal -0x9f(%rdi), %eax
cmpl $0x4, %eax
ja 0xdb881
addl $0xffffff62, %edi       # imm = 0xFFFFFF62
movl %edi, %eax
jmp 0xdb88f
leal -0xc9(%rdi), %ecx
addl $0xffffff38, %edi       # imm = 0xFFFFFF38
xorl %eax, %eax
cmpl $0x25, %ecx
jmp 0xdb88c
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_O1/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 0x13d01f(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
cmpq $0x4, %rcx
je 0xdb8ef
cmpq $0x80, %rcx
je 0xdb8dc
xorl %eax, %eax
movl $0x80000000, %edx       # imm = 0x80000000
cmpq %rdx, %rcx
jne 0xdb903
leal -0x5d(%rdi), %ecx
addl $-0x5c, %edi
xorl %eax, %eax
cmpl $0x6a, %ecx
jmp 0xdb900
leal -0xc1(%rdi), %ecx
addl $0xffffff40, %edi       # imm = 0xFFFFFF40
xorl %eax, %eax
cmpl $0x7, %ecx
jmp 0xdb900
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_O1/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 0xdb96e
leaq 0x13cd38(%rip), %rcx    # 0x2188d0
movb $0x20, %al
cmpq $0x200, (%rcx)          # imm = 0x200
je 0xdbbef
leaq 0x950d6(%rip), %rax     # 0x170c80
movl (%rax), %ecx
movb $0x47, %al
testb $0x1, %cl
jne 0xdbbef
movb $0x43, %al
testb $0x8, %cl
jne 0xdbbef
movb $0x45, %al
testb $0x4, %cl
jne 0xdbbef
movb $0x49, %al
testb $0x10, %cl
jne 0xdbbef
movb $0x4a, %al
btl $0xe, %ecx
jb 0xdbbef
movb $0x4d, %al
btl $0xd, %ecx
jb 0xdbbef
movb $0x52, %al
testb $0x2, %cl
jne 0xdbbef
testw %cx, %cx
movl $0x20, %ecx
movl $0x53, %eax
cmovnsl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xdb96e
leaq 0x13cccf(%rip), %rax    # 0x2188d0
cmpq $0x200, (%rax)          # imm = 0x200
jne 0xdbc13
leaq 0x5746e(%rip), %rax     # 0x13307f
jmp 0xdbc90
leaq 0x95066(%rip), %rax     # 0x170c80
movl (%rax), %eax
testb $0x1, %al
jne 0xdbc53
testb $0x8, %al
jne 0xdbc5c
testb $0x4, %al
jne 0xdbc65
testb $0x10, %al
jne 0xdbc6e
btl $0xe, %eax
jb 0xdbc77
btl $0xd, %eax
jb 0xdbc80
testb $0x2, %al
jne 0xdbc89
testw %ax, %ax
leaq 0x57439(%rip), %rcx     # 0x13307f
leaq 0x489f3(%rip), %rax     # 0x124640
cmovnsq %rcx, %rax
jmp 0xdbc90
leaq 0x57ba7(%rip), %rax     # 0x133801
jmp 0xdbc90
leaq 0x576c9(%rip), %rax     # 0x13332c
jmp 0xdbc90
leaq 0x576c7(%rip), %rax     # 0x133333
jmp 0xdbc90
leaq 0x3d2cd(%rip), %rax     # 0x118f42
jmp 0xdbc90
leaq 0x576bd(%rip), %rax     # 0x13333b
jmp 0xdbc90
leaq 0x576b9(%rip), %rax     # 0x133340
jmp 0xdbc90
leaq 0x576b5(%rip), %rax     # 0x133345
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
movslq %edi, %rax
imulq $0x348, %rax, %rcx      # imm = 0x348
leaq 0x163307(%rip), %rax    # 0x23efb0
cmpl $0x0, 0x1c(%rax,%rcx)
je 0xdbd5c
addq %rcx, %rax
cmpl $0x0, 0x218(%rax)
jle 0xdbd5c
movl %edi, %ebx
callq 0xdb96e
testl %eax, %eax
je 0xdbd5c
leal -0x21(%rbx), %ecx
movl $0x47, %eax
cmpl $-0x21, %ecx
ja 0xdbd5e
movl %ebx, %edi
callq 0xdb6b1
movl %eax, %ecx
movl $0x53, %eax
testl %ecx, %ecx
jne 0xdbd5e
leaq 0x13cbd7(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x200, %rax            # imm = 0x200
je 0xdbd16
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, %rax
jne 0xdbd33
leal -0x5d(%rbx), %ecx
cmpl $-0x1c, %ecx
jae 0xdbd3b
movl %ebx, %edi
callq 0xdb7e9
testl %eax, %eax
jne 0xdbd5e
movl %ebx, %edi
callq 0xdb83a
movl %eax, %ecx
testl %eax, %eax
movl $0x43, %eax
jmp 0xdbd7c
leal -0x61(%rbx), %ecx
cmpl $-0x20, %ecx
jb 0xdbd16
cmpq $0x200, %rax            # imm = 0x200
je 0xdbd5c
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, %rax
jne 0xdbd65
leal -0x5d(%rbx), %ecx
movl $0x0, %eax
cmpl $-0x1c, %ecx
jb 0xdbd5e
jmp 0xdbd72
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leal -0x61(%rbx), %ecx
movl $0x0, %eax
cmpl $-0x20, %ecx
jb 0xdbd5e
xorl %ecx, %ecx
cmpl $0x40, %ebx
movl $0x52, %eax
cmovel %ecx, %eax
jmp 0xdbd5e
// File: /workspace/github_cpp_makefile_star2_O1/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 0xdbe15
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x1627d0(%rip), %rax    # 0x23e580
movsd (%rax), %xmm0
ucomisd 0x2fc4c(%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 0xdbe0b
movl $0xa, %edi
movq %r14, %rsi
callq 0x9480
leaq 0x26042b(%rip), %rax    # 0x33c220
movb $0x0, (%rax)
movl $0x0, (%rbx)
leaq 0x1625ef(%rip), %rax    # 0x23e3f4
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xdbe30
movl %esi, %eax
jmp 0xdbe4b
testl %esi, %esi
jle 0xdbe45
movl %esi, %ecx
xorl %edx, %edx
cmpl %eax, (%rdi,%rdx,4)
je 0xdbe2c
incq %rdx
cmpq %rdx, %rcx
jne 0xdbe38
movslq %esi, %rcx
movl %eax, (%rdi,%rcx,4)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x160498(%rip), %rax    # 0x23e58c
cmpl $0x0, (%rax)
je 0xde137
leaq 0x22f244(%rip), %rax    # 0x30d344
cmpl $0x0, (%rax)
je 0xde137
movsd %xmm1, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
callq 0xdb96e
movsd -0x10(%rbp), %xmm0
leaq 0x92b60(%rip), %rax     # 0x170c80
movzwl (%rax), %eax
testl $0x8005, %eax           # imm = 0x8005
je 0xde137
movsd -0x8(%rbp), %xmm0
mulsd 0x4d609(%rip), %xmm0    # 0x12b740
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4cb8d(%rip), %xmm0    # 0x12c810
leaq 0x22dcb6(%rip), %rax    # 0x30d940
movaps %xmm0, (%rax)
movaps 0x4cb8c(%rip), %xmm0    # 0x12c820
movaps %xmm0, 0x10(%rax)
movaps 0x4cb91(%rip), %xmm0    # 0x12c830
movaps %xmm0, 0x20(%rax)
movl $0x14e, 0x30(%rax)      # imm = 0x14E
movl $0x1c, 0x8aa54(%rip)    # 0x16a708
testb $0x3, %dil
jne 0xdfd0d
imull $0xc28f5c29, %edi, %ecx # imm = 0xC28F5C29
addl $0x51eb850, %ecx        # imm = 0x51EB850
rorl $0x2, %ecx
cmpl $0x28f5c28, %ecx        # imm = 0x28F5C28
ja 0xdfcf2
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 0xdfd0d
movl $0x2, %ecx
incl (%rax,%rcx,4)
incq %rcx
cmpq $0xd, %rcx
jne 0xdfcf7
movl $0x1d, 0x8a9fb(%rip)    # 0x16a708
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4b7eb(%rip), %xmm0    # 0x12b750
divsd 0x4b7eb(%rip), %xmm0    # 0x12b758
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
mulsd 0x4b7db(%rip), %xmm0    # 0x12b760
addsd 0x4b7db(%rip), %xmm0    # 0x12b768
mulsd 0x4b7db(%rip), %xmm1    # 0x12b770
addsd %xmm1, %xmm0
divsd 0x4b7d7(%rip), %xmm2    # 0x12b778
addsd %xmm2, %xmm0
mulsd 0x2b95b(%rip), %xmm0    # 0x10b908
popq %rbp
retq