LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_mon()
void parse_ubx_mon()
{
int i;
u08 ant;
u08 ant_pwr;

   // used to get antenna power monitor info
   log_packet_id("UBX_MON");

   for(i=0; i<20; i++) tsip_byte();
   ant = tsip_byte();
   ant_pwr = tsip_byte();
   for(i=22; i<=59; i++) tsip_byte(); 

   minor_alarms &= (~MINOR_ANT_NO_PWR);
   if     (ant == 2);                             // ok
   else if(ant == 3)     minor_alarms |= MINOR_ANT_SHORT;  // short
   else if(ant == 4)     minor_alarms |= MINOR_ANT_OPEN;   // open
   else if(ant_pwr == 0) minor_alarms |= MINOR_ANT_NO_PWR; // no power
   have_antenna = 1;
//sprintf(plot_title, "ant state:%02X  pwr:%02X", ant, ant_pwr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x90190(%rip), %rdi     # 0x124757
callq 0x58dc2
movl $0x14, %ebx
leaq 0x1aa998(%rip), %r15    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x945e8
orb $0x8, (%r15)
decl %ebx
jne 0x945d8
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x945fe
orb $0x8, (%r15)
callq 0x587be
movl %eax, %r14d
cmpl $0x100, %eax            # imm = 0x100
jb 0x94611
orb $0x8, (%r15)
movl $0x26, %r12d
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x94627
orb $0x8, (%r15)
decl %r12d
jne 0x94617
leaq 0x278ba5(%rip), %rax    # 0x30d1d8
movl (%rax), %edx
movl %edx, %ecx
andl $-0x7, %ecx
movl %ecx, (%rax)
cmpb $0x2, %bl
je 0x94664
movzbl %bl, %esi
cmpl $0x4, %esi
je 0x94653
cmpl $0x3, %esi
jne 0x94658
orl $0x4, %ecx
jmp 0x94662
orl $0x2, %ecx
jmp 0x94662
testb %r14b, %r14b
jne 0x94664
orl $0x6, %edx
movl %edx, %ecx
movl %ecx, (%rax)
leaq 0x278bc1(%rip), %rax    # 0x30d22c
movl $0x1, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_tmode(int)
void parse_ubx_tmode(int tmode)
{
u32 mode;
u32 slen;

   // also UBX_TMODE2 for M8T
   log_packet_id("UBX_TMODE");

   saw_timing_msg |= 0x02;
   have_ubx_tmode = tmode;

   mode = tsip_dword();
   tsip_dword();
   tsip_dword();
   tsip_dword();
   tsip_dword();   // fixed posn variance
   slen = tsip_dword();   // min survey time
   tsip_dword();   // survey stop required variance (mm^2)

   if(mode == 1) {
      minor_alarms |= MINOR_SURVEY;
      do_survey = (long) slen;
      survey_why = 10;
   }
   else {
      minor_alarms &= (~MINOR_SURVEY);
      if(precision_survey == 0) {
         do_survey = 0;
         survey_why = (-10);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x900c2(%rip), %rdi     # 0x124767
callq 0x58dc2
leaq 0x278d77(%rip), %rax    # 0x30d428
orb $0x2, (%rax)
leaq 0x278cf9(%rip), %rax    # 0x30d3b4
movl %ebx, (%rax)
callq 0x58964
movl %eax, %r14d
callq 0x58964
callq 0x58964
callq 0x58964
callq 0x58964
callq 0x58964
movl %eax, %ebx
callq 0x58964
leaq 0x278aec(%rip), %rax    # 0x30d1d8
movl (%rax), %ecx
cmpl $0x1, %r14d
jne 0x94702
orl $0x20, %ecx
movl %ecx, (%rax)
movl %ebx, %ecx
movl $0xa, %eax
jmp 0x9471a
andl $-0x21, %ecx
movl %ecx, (%rax)
leaq 0x27978a(%rip), %rax    # 0x30de98
cmpb $0x0, (%rax)
jne 0x9472d
movl $0xfffffff6, %eax       # imm = 0xFFFFFFF6
xorl %ecx, %ecx
leaq 0x279757(%rip), %rdx    # 0x30de78
movq %rcx, (%rdx)
leaq 0x27975d(%rip), %rcx    # 0x30de88
movl %eax, (%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_svin()
void parse_ubx_svin()
{
u32 dur;        // current duration of survey
double ecef_x;
double ecef_y;
double ecef_z;
u32 obs;        // number of observations used
u08 valid;
u08 active;
u32 rsvd;

   log_packet_id("UBX_SVIN");
   saw_timing_msg |= 0x01;

   dur = tsip_dword();  // dur
   ecef_x = (double) (S32) tsip_dword();
   ecef_y = (double) (S32) tsip_dword();
   ecef_z = (double) (S32) tsip_dword();
   ubx_svar = tsip_dword();  // var
   obs = tsip_dword();   // observation count
   valid = tsip_byte();
   active = tsip_byte(); 
   rsvd  = tsip_word();

   if(do_survey) survey_progress = (int) ((100 * dur) / do_survey);  // !!!! use obs instead of dur?
   else          survey_progress = 0;
   have_progress = 3;
//sprintf(plot_title, "obs:%d  dur:%d  svar:%d  progress:%d  act:%d  valid:%d", 
//obs,dur,ubx_svar,survey_progress, active,valid);  // zorky
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8ff74(%rip), %rdi     # 0x1246b3
callq 0x58dc2
leaq 0x278cdd(%rip), %rax    # 0x30d428
orb $0x1, (%rax)
callq 0x58964
movl %eax, %ebx
callq 0x58964
callq 0x58964
callq 0x58964
callq 0x58964
movl %eax, 0x2d8341(%rip)    # 0x36cab0
callq 0x58964
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9478a
leaq 0x1aa7e9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x947a0
leaq 0x1aa7d3(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
leaq 0x2796cc(%rip), %rax    # 0x30de78
movq (%rax), %rcx
testq %rcx, %rcx
je 0x947be
imull $0x64, %ebx, %eax
xorl %edx, %edx
idivq %rcx
jmp 0x947c0
xorl %eax, %eax
leaq 0x2796c5(%rip), %rcx    # 0x30de8c
movl %eax, (%rcx)
leaq 0x2796c0(%rip), %rax    # 0x30de90
movl $0x3, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_navx5()
void parse_ubx_navx5()
{
   log_packet_id("UBX_NAVX5");
   have_amu = 1;

   tsip_word();      // msg version
   tsip_word(); // update amu mask 
   tsip_dword();
   tsip_byte();      // rsvd
   tsip_byte();      // rsvd
   tsip_byte();      // min sv's
   tsip_byte();      // max sv'ss
   amu_mask = (float) tsip_byte();
   tsip_byte();      // rsvd
   tsip_byte();      // initial fix
   tsip_byte();      // rsvd
   tsip_byte();      // rsvd
   tsip_byte();      // rsvd
   tsip_word();      // rollover week
   tsip_dword();     // rsvd
   tsip_dword();     // rsvd
   tsip_dword();     // rsvd
   tsip_dword();     // rsvd
   tsip_dword();     // rsvd
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8ff89(%rip), %rdi     # 0x124771
callq 0x58dc2
leaq 0x278c04(%rip), %rax    # 0x30d3f8
movl $0x1, (%rax)
callq 0x588d2
callq 0x588d2
callq 0x58964
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9481f
leaq 0x1aa754(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x94835
leaq 0x1aa73e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9484b
leaq 0x1aa728(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x94861
leaq 0x1aa712(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x94877
leaq 0x1aa6fc(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
cvtsi2ss %eax, %xmm0
leaq 0x278833(%rip), %rax    # 0x30d0b8
movss %xmm0, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9489f
leaq 0x1aa6d4(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x948b5
leaq 0x1aa6be(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x948cb
leaq 0x1aa6a8(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x948e1
leaq 0x1aa692(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x948f7
leaq 0x1aa67c(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
callq 0x58964
callq 0x58964
callq 0x58964
callq 0x58964
popq %rbp
jmp 0x58964
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_ver()
void parse_ubx_ver()
{
int i;
int line;

   // note: docs say the message is 70+ bytes long, we only see 40 bytes
   // on a NEO-6M
   log_packet_id("UBX_VER");

   saw_version |= 0x100;

   for(i=0; i<30; i++) {  // sw version
      ubx_sw[i] = tsip_byte();
   }
ubx_sw[21] = 0;  // trim it so info fits on screen
   if(ubx_sw[0]) ubx_fw_ver = (float) atof(ubx_sw);
   else          ubx_fw_ver = (float) atof(ubx_sw);

   for(i=0; i<10; i++) {  // hw vers
      ubx_hw[i] = tsip_byte();
   }
   ubx_hw[9] = 0;

   for(line=0; line<UBX_ROM_INFO; line++) {  // clear rom version info
      ubx_rom[line][0] = 0;
   }

   for(line=0; line<UBX_ROM_INFO; line++) {  // get rom version info
      if(tsip_error) {  // past end of message
         break;
      }

      for(i=0; i<30; i++) {   // rom version (not on NEO-6M)
         ubx_rom[line][i] = tsip_byte();
         if(tsip_error) {
            ubx_rom[line][0] = 0;
            break;
         }
      }
      ubx_rom[line][30] = 0;
   }

   have_info |= ALL_ID_INFO;

// show_version_info();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8fe50(%rip), %rdi     # 0x12477b
callq 0x58dc2
leaq 0x278ad1(%rip), %rax    # 0x30d408
orb $0x1, 0x1(%rax)
xorl %r15d, %r15d
leaq 0x2a8d7b(%rip), %rbx    # 0x33d6c0
leaq 0x1aa624(%rip), %r14    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9495c
orb $0x8, (%r14)
movb %al, (%rbx,%r15)
incq %r15
cmpq $0x1e, %r15
jne 0x9494c
movb $0x0, 0x15(%rbx)
movq %rbx, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
leaq 0x2a8ffc(%rip), %rax    # 0x33d97c
movss %xmm0, (%rax)
xorl %ebx, %ebx
leaq 0x2a8d51(%rip), %r15    # 0x33d6de
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9499d
orb $0x8, (%r14)
movb %al, (%r15,%rbx)
incq %rbx
cmpq $0xa, %rbx
jne 0x9498d
movb $0x0, 0x9(%r15)
xorl %eax, %eax
leaq 0x2a8d38(%rip), %rbx    # 0x33d6f0
movb $0x0, (%rbx,%rax)
addq $0x1f, %rax
cmpq $0x26c, %rax            # imm = 0x26C
jne 0x949b8
cmpl $0x0, (%r14)
jne 0x94a3d
xorl %r15d, %r15d
movq %rbx, %r12
xorl %r13d, %r13d
callq 0x587be
movl (%r14), %ecx
cmpl $0x100, %eax            # imm = 0x100
jae 0x94a19
movb %al, (%r12,%r13)
testl %ecx, %ecx
jne 0x94a23
incq %r13
cmpq $0x1e, %r13
jne 0x949d7
movq %r15, %rax
shlq $0x5, %rax
subq %r15, %rax
movb $0x0, 0x1e(%rbx,%rax)
leaq 0x1(%r15), %rax
addq $0x1f, %r12
cmpq $0x13, %r15
movq %rax, %r15
jb 0x949d4
jmp 0x94a3d
orl $0x8, %ecx
movl %ecx, (%r14)
movb %al, (%r12,%r13)
movq %r15, %rax
shlq $0x5, %rax
subq %r15, %rax
leaq 0x2a8cbc(%rip), %rcx    # 0x33d6f0
xorl %edx, %edx
movb %dl, (%rcx,%rax)
movb %dl, 0x1e(%rcx,%rax)
leaq 0x278f30(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
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/heathgps.cpp
// Function: parse_ubx_cfg()
void parse_ubx_cfg()
{
int fix;  // 1=2D  2=3D  3=2D/3D
int el;
int i;

   log_packet_id("UBX_CFG");

   tsip_word();
   tsip_byte();
   fix = tsip_byte();
   for(i=4; i<12; i++) tsip_byte();
   el = tsip_byte();
   // ignore bytes 13..35

   el_mask = (float) el;
   have_el_mask = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x8fcf9(%rip), %rdi     # 0x12478d
callq 0x58dc2
callq 0x588d2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x94ab4
leaq 0x1aa4bf(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x94aca
leaq 0x1aa4a9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movl $0x8, %r14d
leaq 0x1aa499(%rip), %rbx    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x94ae6
orb $0x8, (%rbx)
decl %r14d
jne 0x94ad7
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x94afa
orb $0x8, (%rbx)
movzbl %al, %eax
cvtsi2ss %eax, %xmm0
leaq 0x2785ac(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x2788e9(%rip), %rax    # 0x30d3fc
movl $0x1, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cs_freq(int, double)
void set_cs_freq(int chan, double freq)
{
   if(read_only) return;

   if(rcvr_type == CS_RCVR) {
      if(chan == 1) {
         set_cs_remote(1);
         sprintf(out, ":ROSC:FREQ%d %g", chan, freq);
         queue_cs_cmd(out, CS_FREQ1_MSG);
         restore_cs_remote();

         sprintf(out, ":ROSC:FREQ%d?", chan);
         queue_cs_cmd(out, CS_FREQ1_MSG);
      }
      else if(chan == 2) {
         set_cs_remote(1);
         sprintf(out, ":ROSC:FREQ%d %g", chan, freq);
         queue_cs_cmd(out, CS_FREQ2_MSG);
         restore_cs_remote();

         sprintf(out, ":ROSC:FREQ%d?", chan);
         queue_cs_cmd(out, CS_FREQ2_MSG);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x2a1c80(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x95402
leaq 0x18352a(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0x95402
movl %edi, %ebx
cmpl $0x2, %edi
je 0x9540f
cmpl $0x1, %ebx
jne 0x95402
movl $0x1, %r14d
movl $0x1, %edi
movsd %xmm0, -0x28(%rbp)
callq 0x63e3b
leaq 0x2a6e49(%rip), %r12    # 0x33c220
leaq 0x90622(%rip), %rsi     # 0x125a00
movq %r12, %rdi
movl $0x1, %edx
movsd -0x28(%rbp), %xmm0
movb $0x1, %al
callq 0x9060
movl $0x13f, %r15d           # imm = 0x13F
movq %r12, %rdi
movl $0x13f, %esi            # imm = 0x13F
jmp 0x95454
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
movsd %xmm0, -0x28(%rbp)
callq 0x63e3b
leaq 0x2a6dfb(%rip), %r12    # 0x33c220
leaq 0x905d4(%rip), %rsi     # 0x125a00
movl $0x2, %r14d
movq %r12, %rdi
movl $0x2, %edx
movsd -0x28(%rbp), %xmm0
movb $0x1, %al
callq 0x9060
movl $0x140, %r15d           # imm = 0x140
movq %r12, %rdi
movl $0x140, %esi            # imm = 0x140
callq 0x5edda
leaq 0x18558c(%rip), %rax    # 0x21a9ec
cmpl $0x0, (%rax)
jne 0x9546f
xorl %edi, %edi
callq 0x63e3b
movl %ebx, %r14d
leaq 0x2a6daa(%rip), %rbx    # 0x33c220
leaq 0x90593(%rip), %rsi     # 0x125a10
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl %r15d, %esi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5edda
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_tp()
void parse_ubx_tp()
{
u32 tow;
u32 subms;
S32 quant;
u16 week;
u08 flags;
u08 rsvd;

   log_packet_id("UBX_TP");

   tow = tsip_dword();
   subms = tsip_dword();
   quant = (S32) tsip_dword();
   week = tsip_word();
   flags = tsip_byte();
   rsvd = tsip_byte();

   have_sawtooth = 1;
   dac_voltage = ((float) quant) / 1000.0F;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8f33c(%rip), %rdi     # 0x1247ea
callq 0x58dc2
callq 0x58964
callq 0x58964
callq 0x58964
movl %eax, %ebx
callq 0x588d2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x954df
leaq 0x1a9a94(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x954f5
leaq 0x1a9a7e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
cvtsi2ss %ebx, %xmm0
leaq 0x277ec4(%rip), %rax    # 0x30d3c4
divss 0x89528(%rip), %xmm0    # 0x11ea30
movl $0x1, (%rax)
cvtss2sd %xmm0, %xmm0
leaq 0x2774e7(%rip), %rax    # 0x30ca00
movsd %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ubx_rate()
void parse_ubx_rate()
{
int rate;

   log_packet_id("UBX_RATE");

   rate = tsip_word();
   tsip_word();
   tsip_word();

   if(rate > 0) {
      if(!pause_data) {
         nav_rate = 1000.0F / (float) rate;
         have_nav_rate = 1;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8f2c0(%rip), %rdi     # 0x1247f1
callq 0x58dc2
callq 0x588d2
movl %eax, %ebx
callq 0x588d2
callq 0x588d2
testw %bx, %bx
je 0x9558a
leaq 0x185ce1(%rip), %rax    # 0x21b234
cmpb $0x0, (%rax)
jne 0x9558a
movzwl %bx, %eax
cvtsi2ss %eax, %xmm0
movss 0x894c9(%rip), %xmm1    # 0x11ea30
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0x185ddf(%rip), %rax    # 0x21b358
movsd %xmm0, (%rax)
leaq 0x277d48(%rip), %rax    # 0x30d2cc
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sirf_sw_ver()
void parse_sirf_sw_ver()
{
int i;
int len;

   log_packet_id("sirf_sw_ver");

   sirf_sw_id[0] = 0;
   if(sirf_msg_len > 80) len = 80-2;
   else len = sirf_msg_len-2;

   for(i=0; i<len; i++) {
      sirf_sw_id[i] = tsip_byte();
      sirf_sw_id[i+1] = 0;
   }

   have_info |= ALL_ID_INFO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x8ea75(%rip), %rdi     # 0x124868
callq 0x58dc2
leaq 0x2a7b81(%rip), %rbx    # 0x33d980
movb $0x0, (%rbx)
movl 0x2d6cf4(%rip), %eax    # 0x36cafc
leal -0x2(%rax), %ecx
cmpl $0x51, %eax
movl $0x4e, %eax
cmovbl %ecx, %eax
testl %eax, %eax
jle 0x95e4a
movl %eax, %r14d
xorl %r15d, %r15d
leaq 0x1a9149(%rip), %r12    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x95e38
orb $0x8, (%r12)
movb %al, (%r15,%rbx)
movb $0x0, 0x1(%r15,%rbx)
incq %r15
cmpq %r15, %r14
jne 0x95e27
leaq 0x277b23(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sirf_pps()
void parse_sirf_pps()
{
double utc_frac;
u08 status;
int i;

   // WARNING: not all receivers output this message
   log_packet_id("sirf_pps");

   have_sirf_pps = 1;

   tsip_byte();  // hh
   tsip_byte();  // mm
   tsip_byte();  // ss
   tsip_byte();  // day
   tsip_byte();  // month
   tsip_word();  // year
   i = (int) (s16) tsip_word();  // utc offset
   utc_frac = ((double) (S32) tsip_dword()) * 1.0E-9;
   status = tsip_byte();  // bit0:valid time  bit1:utc time  bit2:utc offset info valid

   if(!user_set_utc_ofs) {
      if(status & 0x04) {    // UTC offset valid
         utc_offset = i;
         check_utc_ofs(5);
      }
   }

   if(status & 0x01) {  // time is valid
   }

   if(status & 0x02) {  // UTC time 
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8e18b(%rip), %rdi     # 0x124891
callq 0x58dc2
leaq 0x276c12(%rip), %rax    # 0x30d324
movl $0x1, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9672e
leaq 0x1a8845(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x96744
leaq 0x1a882f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9675a
leaq 0x1a8819(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x96770
leaq 0x1a8803(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x96786
leaq 0x1a87ed(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
callq 0x588d2
movl %eax, %ebx
callq 0x58964
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x967ad
leaq 0x1a87c6(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
testb $0x4, %al
je 0x96809
leaq 0x276f7c(%rip), %rax    # 0x30d734
cmpl $0x0, (%rax)
jne 0x96809
movswl %bx, %eax
leaq 0x276f61(%rip), %rcx    # 0x30d728
movl %eax, (%rcx)
leaq 0x276b4c(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0x96809
leaq 0x276d38(%rip), %rcx    # 0x30d514
cmpl $0x7e1, (%rcx)          # imm = 0x7E1
setge %cl
cmpw $0x12, %bx
setl %dl
cmpw $0x11, %bx
jl 0x96809
andb %cl, %dl
jne 0x96809
leaq 0x182047(%rip), %rcx    # 0x218844
movl $0x7d5, (%rcx)          # imm = 0x7D5
movl $0x5, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_sirf_clock()
void parse_sirf_clock()
{
u32 drift;
u32 bias;
u32 time;

   log_packet_id("sirf_clock");

   tsip_word();  // gps week
   tsip_dword(); // tow
   tsip_byte();  // sats
   drift = tsip_dword(); // clock drift in Hz
   bias = tsip_dword();  // clock bias in nanosecs
   time = tsip_dword();  // GPS time in msecs

   have_pps_offset = 20;
   have_rcvr_pps = 20;
   if(drift) {
      pps_offset = 1.0 / (double) drift;  // convert Hz to nanoseconds
//adadad      if(jitter_adev == 0) do_pps_adev(pps_offset);
   }
   else pps_offset = 0.0;
   pps_offset *= 1.0E9;

   osc_offset = ((double) bias) / 1.0E6;
   have_osc_offset = 20;
   have_rcvr_osc = 20;
//adadad   if(jitter_adev == 0) do_osc_adev(osc_offset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x8e07c(%rip), %rdi     # 0x12489a
callq 0x58dc2
callq 0x588d2
callq 0x58964
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x96843
leaq 0x1a8730(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
movl %eax, %r14d
callq 0x58964
movl %eax, %ebx
callq 0x58964
leaq 0x2769da(%rip), %rcx    # 0x30d238
movl $0x14, %eax
movl %eax, (%rcx)
leaq 0x2769d8(%rip), %rcx    # 0x30d244
movl %eax, (%rcx)
xorpd %xmm0, %xmm0
testl %r14d, %r14d
je 0x96893
movl %r14d, %ecx
cvtsi2sd %rcx, %xmm1
movsd 0x727e9(%rip), %xmm0    # 0x109070
divsd %xmm1, %xmm0
mulsd 0x72795(%rip), %xmm0    # 0x109028
leaq 0x275f1e(%rip), %rcx    # 0x30c7b8
movsd %xmm0, (%rcx)
movl %ebx, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
divsd 0x727a0(%rip), %xmm0    # 0x109050
leaq 0x275f09(%rip), %rcx    # 0x30c7c0
movsd %xmm0, (%rcx)
leaq 0x276972(%rip), %rcx    # 0x30d234
movl %eax, (%rcx)
leaq 0x27697d(%rip), %rcx    # 0x30d248
movl %eax, (%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_sirf_msg()
void decode_sirf_msg()
{
u08 id;

   // process the received Sirf message
   start_msg_decode(1);

   id = tsip_byte();
// if(debug_file) fprintf(debug_file, "decode sirf:%02X (%d)  len:%d\n", id,id, sirf_msg_len);

   if     (id == SIRF_TRACK_MSG)      parse_sirf_track();
   else if(id == SIRF_SW_VER_MSG)     parse_sirf_sw_ver();
   else if(id == SIRF_CLOCK_MSG)      parse_sirf_clock();
   else if(id == SIRF_VIS_MSG)        parse_sirf_vis();
   else if(id == SIRF_NAV_PARAM_MSG)  parse_sirf_nav_params();
   else if(id == SIRF_NAV_MSG)        parse_sirf_nav();
   else if(id == SIRF_PPS_MSG)        parse_sirf_pps();
   else if(id == SIRF_ACK_MSG)        parse_sirf_ack();
   else if(id == SIRF_NAK_MSG)        parse_sirf_nak();
   else if(id == SIRF_NAV2_MSG)       parse_sirf_nav2();
   else if(id == SIRF_DGPS_MSG)       parse_sirf_dgps();
   else if(id == SIRF_THROUGHPUT_MSG) parse_sirf_throughput();
   else                               parse_sirf_unkn(id);

   if(sim_file && sim_delay) {  // throttle sim file messages
      Sleep(sim_delay);
   }
   saw_rcvr_msg = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
callq 0x7f2b8
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x96b1b
leaq 0x1a8458(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %ecx
cmpl $0x1a, %ecx
jg 0x96b4b
addl $-0x2, %ecx
cmpl $0x11, %ecx
ja 0x96bb1
leaq 0x88c86(%rip), %rdx     # 0x11f7bc
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x8dd81(%rip), %rdi     # 0x1248c7
jmp 0x96bcf
cmpl $0x1b, %ecx
je 0x96ba1
cmpl $0x29, %ecx
je 0x96baa
cmpl $0x34, %ecx
jne 0x96bb1
callq 0x966f9
jmp 0x96bd4
leaq 0x8dd4d(%rip), %rdi     # 0x1248b5
jmp 0x96bcf
callq 0x95e5d
jmp 0x96bd4
callq 0x96810
jmp 0x96bd4
callq 0x968d2
jmp 0x96bd4
callq 0x95de1
jmp 0x96bd4
leaq 0x8dd31(%rip), %rdi     # 0x1248be
jmp 0x96bcf
leaq 0x8dce9(%rip), %rdi     # 0x12487f
jmp 0x96bcf
leaq 0x8dd3f(%rip), %rdi     # 0x1248de
jmp 0x96bcf
leaq 0x8dd2c(%rip), %rdi     # 0x1248d4
jmp 0x96bcf
callq 0x9622f
jmp 0x96bd4
movzbl %al, %edx
leaq 0x2a5665(%rip), %rbx    # 0x33c220
leaq 0x8dd2c(%rip), %rsi     # 0x1248ee
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x58dc2
leaq 0x1a77e5(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
setne %al
leaq 0x18ca17(%rip), %rcx    # 0x223600
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x96bfe
callq 0xafe8
leaq 0x1a839b(%rip), %rax    # 0x23efa0
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_masks()
void parse_venus_masks()
{
u08 flags;
u08 el;
u08 cnr;

   log_packet_id("venus_masks");
   flags = tsip_byte();
   el = tsip_byte();
   cnr = tsip_byte();

   if((flags == 1) || (flags == 2)) {
      el_mask = (float) el;
      have_el_mask = 1;
   }

   if((flags == 1) || (flags == 3)) {
      amu_mask = (float) cnr;
      have_amu = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x8d7a4(%rip), %rdi     # 0x124930
callq 0x58dc2
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x971a9
leaq 0x1a7dca(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, %r14d
cmpl $0x100, %eax            # imm = 0x100
jb 0x971c2
leaq 0x1a7db1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x971d8
leaq 0x1a7d9b(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leal -0x1(%rbx), %ecx
cmpb $0x1, %cl
ja 0x97200
movzbl %r14b, %ecx
cvtsi2ss %ecx, %xmm0
leaq 0x275ec5(%rip), %rcx    # 0x30d0b4
movss %xmm0, (%rcx)
leaq 0x276202(%rip), %rcx    # 0x30d3fc
movl $0x1, (%rcx)
andb $-0x3, %bl
cmpb $0x1, %bl
jne 0x9722a
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
leaq 0x275e9f(%rip), %rax    # 0x30d0b8
movss %xmm0, (%rax)
leaq 0x2761d4(%rip), %rax    # 0x30d3f8
movl $0x1, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_cable()
void parse_venus_cable()
{
   log_packet_id("venus_cable");
   cable_delay = (float) (S32) tsip_dword();
   cable_delay *= 1.0E-11;

// if(have_cable_delay == 0) need_redraw = 2031;
   have_cable_delay = 1;

   show_cable_delay();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d702(%rip), %rdi     # 0x12493c
callq 0x58dc2
callq 0x58964
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x8750c(%rip), %xmm0    # 0x11e760
leaq 0x276b6d(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x27604e(%rip), %rax    # 0x30d2b4
movl $0x1, (%rax)
popq %rbp
jmp 0x75326
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_survey(int)
void parse_venus_survey(int msg)
{
u08 mode;
u32 len;
u32 sdev;
double slat,slon,salt;
u08 rtime;
u32 rlen;

   log_packet_id("venus_survey");

   if(saw_venus_raw == 0) config_venus_timing();
   saw_timing_msg |= 0x04;
   
   mode = tsip_byte();   // timing mode
   len = tsip_dword();   // survey length
   sdev = tsip_dword();  // std dev
   slat = tsip_double(); // saved lat
   slon = tsip_double(); // saved lon
   salt = (double) tsip_single(); // saved alt
   rtime = tsip_byte();  // run-time timing mode
   rlen = tsip_dword();  // run-time survey length

   if(do_survey > 0) survey_progress = 100 - ((100 * rlen) / do_survey);
   else              survey_progress = (-1);
   have_progress = 4;
//sprintf(debug_text, "mode:%d msg:%04X  len:%d  sdev:%d  lla:%f %f %f   rtime:%d  rlen:%d  prog:%d",
//mode, msg, len, sdev, slat,slon,salt, rtime, rlen, survey_progress);

   minor_alarms &= (~MINOR_SURVEY);
   venus_hold_mode = 0;
   if((rlen == 0) && (saw_venus_raw == 0)) ;  // survey completed
   else if(rtime == 0) { // PVT mode
      rcvr_mode = RCVR_MODE_3D;
   }
   else if(rtime == 1) {  // surveying
      minor_alarms |= (MINOR_SURVEY);
      rcvr_mode = RCVR_MODE_SURVEY;
   }
   else if(rtime == 2) {  // position hold
      venus_hold_mode = 1;
      rcvr_mode = RCVR_MODE_HOLD;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x8d6c8(%rip), %rdi     # 0x124948
callq 0x58dc2
leaq 0x2a6b68(%rip), %r14    # 0x33ddf4
cmpl $0x0, (%r14)
jne 0x97297
callq 0x82a84
leaq 0x27618a(%rip), %rax    # 0x30d428
orb $0x4, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x972b7
leaq 0x1a7cbc(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
callq 0x58964
callq 0x58b08
callq 0x58b08
callq 0x58a30
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x972e8
leaq 0x1a7c8b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
movl %eax, %ecx
leaq 0x276b82(%rip), %rax    # 0x30de78
movq (%rax), %rsi
testq %rsi, %rsi
jle 0x9730f
imull $0x64, %ecx, %eax
xorl %edx, %edx
divq %rsi
movl $0x64, %edx
subl %eax, %edx
jmp 0x97314
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
leaq 0x276b71(%rip), %rax    # 0x30de8c
movl %edx, (%rax)
leaq 0x276b6c(%rip), %rax    # 0x30de90
movl $0x4, (%rax)
leaq 0x275ea7(%rip), %rax    # 0x30d1d8
movl (%rax), %edx
movl %edx, %esi
andl $-0x21, %esi
movl %esi, (%rax)
leaq 0x275d92(%rip), %rsi    # 0x30d0d3
movb $0x0, (%rsi)
orl (%r14), %ecx
je 0x97375
testb %bl, %bl
je 0x9736a
movzbl %bl, %ecx
cmpl $0x2, %ecx
je 0x97363
cmpl $0x1, %ecx
jne 0x97375
orl $0x20, %edx
movl %edx, (%rax)
movb $0xb, %al
jmp 0x9736c
movb $0x1, (%rsi)
movb $0x7, %al
jmp 0x9736c
movb $0x4, %al
leaq 0x275d5d(%rip), %rcx    # 0x30d0d0
movb %al, (%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_pps()
void parse_venus_pps()
{
u08 sub_code;
u32 freq;
u32 width;

pps_enabled = pps_mode = 1; // zzzzz
   have_pps_enable = 4;
   have_pps_mode = 4;
   sub_code = tsip_byte();
   freq = width = 0;

   if(sub_code == 0x80) {   // width (us) 1..100000us
      log_packet_id("pps width");
      width = tsip_dword();
      if(saw_timing_msg & 0x08) {
         pps2_duty = 0.50;
         have_pps_duty |= 0x02;
      }
      else {
         if(pps1_freq) {
            pps1_duty = (((double) (width)) / 1.0E6) /  (1.0 / pps1_freq);
            have_pps_duty |= 0x01;
         }
      }
   }
   else if(sub_code == 0x81) {  // freq (not all firmware does this)
      log_packet_id("pps freq");
      freq = tsip_dword();
      if(saw_timing_msg & 0x08) {
         pps2_freq = (double) freq;
         have_pps_freq |= 0x02;
      }
      else {
//!!!!   pps1_freq = (double) freq;
         pps1_freq = 1.0;        // only does 1PPS, can't set the freq
         have_pps_freq |= 0x01;
      }
   }
   else {
      log_packet_id("unsupported pps subcode");
   }
//sprintf(debug_text, "freq %d:%d  width %d:%d  duty:%f", have_pps_freq,freq,  have_pps_duty,width,pps1_duty); // qqqqqqqq
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x27699d(%rip), %rax    # 0x30dd22
movb $0x1, %cl
movb %cl, (%rax)
leaq 0x276990(%rip), %rax    # 0x30dd20
movb %cl, (%rax)
leaq 0x275f43(%rip), %rax    # 0x30d2dc
movl $0x4, %ecx
movl %ecx, (%rax)
leaq 0x275f45(%rip), %rax    # 0x30d2ec
movl %ecx, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x973bf
leaq 0x1a7bb4(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
cmpb $-0x7f, %al
je 0x97447
movzbl %al, %eax
cmpl $0x80, %eax
jne 0x97484
leaq 0x8d579(%rip), %rdi     # 0x124955
callq 0x58dc2
callq 0x58964
leaq 0x27603b(%rip), %rcx    # 0x30d428
testb $0x8, (%rcx)
jne 0x97491
leaq 0x27692b(%rip), %rcx    # 0x30dd28
movsd (%rcx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x97411
jnp 0x974ca
movl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd 0x71c2d(%rip), %xmm1    # 0x109050
movsd 0x71c45(%rip), %xmm2    # 0x109070
divsd %xmm0, %xmm2
divsd %xmm2, %xmm1
leaq 0x2768f6(%rip), %rax    # 0x30dd30
movsd %xmm1, (%rax)
leaq 0x27691f(%rip), %rax    # 0x30dd64
jmp 0x9747f
leaq 0x8d511(%rip), %rdi     # 0x12495f
callq 0x58dc2
callq 0x58964
leaq 0x275fc9(%rip), %rcx    # 0x30d428
testb $0x8, (%rcx)
jne 0x974ae
leaq 0x2768bd(%rip), %rax    # 0x30dd28
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rax)
leaq 0x2768e1(%rip), %rax    # 0x30dd60
orb $0x1, (%rax)
jmp 0x974ca
leaq 0x8d4dd(%rip), %rdi     # 0x124968
popq %rbp
jmp 0x58dc2
leaq 0x2768b0(%rip), %rax    # 0x30dd48
movabsq $0x3fe0000000000000, %rcx # imm = 0x3FE0000000000000
movq %rcx, (%rax)
leaq 0x2768b8(%rip), %rax    # 0x30dd64
jmp 0x974c7
movl %eax, %eax
cvtsi2sd %rax, %xmm0
leaq 0x276884(%rip), %rax    # 0x30dd40
movsd %xmm0, (%rax)
leaq 0x276899(%rip), %rax    # 0x30dd60
orb $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_rtk()
void parse_venus_rtk()
{
int sub_code;

   sub_code = tsip_byte();
   if(sub_code == 0x80) {
      log_packet_id("venus rtk");
      rtk_mode = tsip_byte();
      have_rtk_mode = 1;
   }
   else {
      log_packet_id("unsupported rtk subcode");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x974e6
leaq 0x1a7a8d(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
negb %al
jno 0x97527
leaq 0x8d48f(%rip), %rdi     # 0x124980
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9750c
leaq 0x1a7a67(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x2a68e6(%rip), %rcx    # 0x33ddfc
movl %eax, (%rcx)
leaq 0x2a68e1(%rip), %rax    # 0x33de00
movl $0x1, (%rax)
popq %rbp
retq
leaq 0x8d45c(%rip), %rdi     # 0x12498a
popq %rbp
jmp 0x58dc2
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_sbas()
void parse_venus_sbas()
{
u08 sub_code;
u08 flag;
u08 qzss_chans;
u08 sbas_mode;
u08 sbas_ura;
u08 sbas_correct;
u08 sbas_chans;
u08 sbas_mask;

   // message type 0x62 responses

   sub_code = tsip_byte();
   flag = tsip_byte();
   if(sub_code == 0x80) {  // SBAS status
      log_packet_id("venus sbas status");
      if(flag) gnss_mask |= SBAS;
      else     gnss_mask &= (~SBAS);
      sbas_mode = tsip_byte();
      sbas_ura = tsip_byte();
      sbas_correct = tsip_byte();
      sbas_chans = tsip_byte();
      sbas_mask = tsip_byte();
//sprintf(plot_title, "sbas flag:%02X mode:%02X ura:%02X correct:%02X chans:%d mask:%d",
//flag, sbas_mode, sbas_ura, sbas_correct, sbas_chans, sbas_mask);
   }
   else if(sub_code == 0x81) {  // QZSS status
      log_packet_id("venus qzss status");
      if(flag) gnss_mask |= QZSS;
      else     gnss_mask &= (~QZSS);

      qzss_chans = tsip_byte();
//sprintf(debug_text, "qzss flag:%02X chans:%d", flag,qzss_chans);
   }
   else {
      log_packet_id("unsupported sbas subcode");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x587be
movl %eax, %r14d
cmpl $0x100, %eax            # imm = 0x100
jb 0x97554
leaq 0x1a7a1f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9756c
leaq 0x1a7a07(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
cmpb $-0x7f, %r14b
je 0x97607
movzbl %r14b, %eax
cmpl $0x80, %eax
jne 0x9764a
leaq 0x8d416(%rip), %rdi     # 0x1249a2
callq 0x58dc2
xorl %eax, %eax
testb %bl, %bl
setne %al
leaq 0xd96d5(%rip), %rcx     # 0x170c74
movl $0xffff7fff, %edx       # imm = 0xFFFF7FFF
andl (%rcx), %edx
shll $0xf, %eax
orl %edx, %eax
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x975c3
leaq 0x1a79b0(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x975d9
leaq 0x1a799a(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x975ef
leaq 0x1a7984(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9762f
leaq 0x1a796e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
jmp 0x9762f
leaq 0x8d3a6(%rip), %rdi     # 0x1249b4
callq 0x58dc2
xorl %eax, %eax
testb %bl, %bl
setne %al
leaq 0xd9653(%rip), %rcx     # 0x170c74
movl $0xffffbfff, %edx       # imm = 0xFFFFBFFF
andl (%rcx), %edx
shll $0xe, %eax
orl %edx, %eax
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x97645
leaq 0x1a792e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x8d375(%rip), %rdi     # 0x1249c6
popq %rbx
popq %r14
popq %rbp
jmp 0x58dc2
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_version()
void parse_venus_version()
{
u08 sw_type;
u32 kernel;
u32 odm;
u32 rev;

   log_packet_id("venus_version");
   sw_type = tsip_byte();
   kernel = tsip_dword();
   odm = tsip_dword();
   rev = tsip_dword();

   sprintf(venus_kern, "%04d.%02d.%02d", (kernel>>16), (kernel>>8)&0xFF, kernel&0xFF);
   sprintf(venus_odm,  "Ver:  %04d.%02d.%02d", (odm>>16), (odm>>8)&0xFF, odm&0xFF);
   sprintf(venus_rev,  "Rev:  %04d.%02d.%02d", (rev>>16), (rev>>8)&0xFF, rev&0xFF);

   have_info |= ALL_ID_INFO;
//sprintf(plot_title, "k:%08X  odm:%08X  rev:%08X", kernel,odm,rev);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x8d1bb(%rip), %rdi     # 0x124a4c
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x978ac
leaq 0x1a76c7(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
movl %eax, %r15d
callq 0x58964
movl %eax, %r14d
callq 0x58964
movl %eax, %ebx
movl %r15d, %edx
shrl $0x10, %edx
movl %r15d, %ecx
shrl $0x8, %ecx
movl $0xff, %r12d
andl %r12d, %ecx
andl %r12d, %r15d
leaq 0x2a64ae(%rip), %rdi    # 0x33dd90
leaq 0x8d177(%rip), %rsi     # 0x124a60
movl %r15d, %r8d
xorl %eax, %eax
callq 0x9060
movl %r14d, %edx
shrl $0x10, %edx
movl %r14d, %ecx
shrl $0x8, %ecx
andl %r12d, %ecx
andl %r12d, %r14d
leaq 0x2a64a4(%rip), %rdi    # 0x33ddb0
leaq 0x8d147(%rip), %rsi     # 0x124a5a
movl %r14d, %r8d
xorl %eax, %eax
callq 0x9060
movl %ebx, %edx
shrl $0x10, %edx
movl %ebx, %ecx
shrl $0x8, %ecx
andl %r12d, %ecx
andl %r12d, %ebx
leaq 0x2a649c(%rip), %rdi    # 0x33ddd0
leaq 0x8d134(%rip), %rsi     # 0x124a6f
movl %ebx, %r8d
xorl %eax, %eax
callq 0x9060
leaq 0x276028(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_rate()
void parse_venus_rate()
{
float rate;

   log_packet_id("venus_rate");
   rate = (float) tsip_byte();
   if(!pause_data) {
      nav_rate = rate;
      have_nav_rate = 2;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8d0e5(%rip), %rdi     # 0x124a98
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x979ce
leaq 0x1a75a5(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x18385f(%rip), %rcx    # 0x21b234
cmpb $0x0, (%rcx)
jne 0x979f9
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
leaq 0x183970(%rip), %rax    # 0x21b358
movsd %xmm0, (%rax)
leaq 0x2758d9(%rip), %rax    # 0x30d2cc
movl $0x2, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_mtime()
void parse_venus_mtime()
{
int tow;
int week;
double meas_tow;
int xtow;

   // raw measurement epoch
   log_packet_id("venus_mtime");
if(saw_venus_raw & 0x10) return;  // use extended raw data

   saw_venus_raw |= 0x04;
   minor_alarms &= (~MINOR_NO_TRACK);
   tsip_byte();  // iod
   week = tsip_word();
   tow = tsip_dword();
   tsip_word();  // measurement period
   if(raw_msg_rate == 0) return;

   meas_tow = ((double) tow) / 1000.0; // measurement tow
   xtow = (int) (meas_tow*nav_rate);   // raw Hz

   if(1) {  // this might cause time stamp faults in CSRS-PPP  rnx3
      if(xtow % (int) ((double)raw_msg_rate*nav_rate)) return;

      obs_tow = meas_tow;
      jd_obs = GPS_EPOCH + ((double) week * 7.0) + jtime(0,0,0,meas_tow);
   }
   else {  // Only 1Hz nav rate
      if(((int) meas_tow % raw_msg_rate) != 0) return;  // drop unwanted messages

      obs_tow = meas_tow;
      jd_obs = GPS_EPOCH + ((double) week * 7.0) + jtime(0,0,0,meas_tow);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8cab3(%rip), %rdi     # 0x124abd
callq 0x58dc2
leaq 0x2a5dde(%rip), %rax    # 0x33ddf4
movl (%rax), %ecx
testb $0x10, %cl
jne 0x980e6
orl $0x4, %ecx
movl %ecx, (%rax)
leaq 0x2751ab(%rip), %rax    # 0x30d1d8
andb $-0x9, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x98046
leaq 0x1a6f2d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
movl %eax, %ebx
callq 0x58964
movl %eax, %r14d
callq 0x588d2
leaq 0x183317(%rip), %rax    # 0x21b378
movl (%rax), %ecx
testl %ecx, %ecx
je 0x980e6
cvtsi2sd %r14d, %xmm0
divsd 0x70fc4(%rip), %xmm0    # 0x109038
leaq 0x1832dd(%rip), %rax    # 0x21b358
movsd (%rax), %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
mulsd %xmm1, %xmm2
cvttsd2si %xmm2, %ecx
cltd
idivl %ecx
testl %edx, %edx
jne 0x980e6
leaq 0x2754d0(%rip), %rax    # 0x30d578
movsd %xmm0, (%rax)
movzwl %bx, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
mulsd 0x7384a(%rip), %xmm1    # 0x10b908
addsd 0x737d2(%rip), %xmm1    # 0x10b898
movsd %xmm1, -0x18(%rbp)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd492e
addsd -0x18(%rbp), %xmm0
leaq 0x27548e(%rip), %rax    # 0x30d570
movsd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_zod_seq(int)
void get_zod_seq(int sat_meas)
{
int ts;
int seq;
int sat_seq;

   ts = tsip_dword();  // timestamp
   seq = tsip_word();  // seq
   if(sat_meas) {      // satellite measurement sequence number
      sat_seq = tsip_word();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x58964
callq 0x588d2
addq $0x8, %rsp
testl %ebx, %ebx
je 0x98d04
popq %rbx
popq %rbp
jmp 0x588d2
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_temp()
void parse_zod_temp()
{
u16 t0;
s16 tref;
s16 tfilt;
s16 s0;
float dt;

   log_packet_id("temperature");
   tfilt = 0;     // !!!! current temp sensor reading - but no messages
                  //      return it... thus, this code is USELESS !!!!

   get_zod_seq(0);

   tsip_word();

   tsip_word();
   tsip_word();
   tsip_word();
   tsip_word();
   tsip_word();

   tsip_word();
   tsip_word();

   tref = tsip_word();
   t0 = tsip_word();
   s0 = tsip_word();

   tsip_word();
   tsip_word();

   dt = ((float) s0) / (65536.0F*100.0F); // s0 = deg/count
   dt *= ((float) (tfilt-t0));             // t0 = counts, tfilt=current sensor reading

   temperature = (DATA_SIZE) ((((float) tref) * 0.01F) - dt);  // !!!! but no way to get tfilt !!!!
   have_temperature = 107;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x8b761(%rip), %rdi     # 0x124479
callq 0x58dc2
callq 0x58964
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
movl %eax, %ebx
callq 0x588d2
movl %eax, %r14d
callq 0x588d2
movl %eax, %r15d
callq 0x588d2
callq 0x588d2
movswl %r15w, %eax
cvtsi2ss %eax, %xmm0
movzwl %r14w, %eax
negl %eax
cvtsi2ss %eax, %xmm1
movswl %bx, %eax
cvtsi2ss %eax, %xmm2
divss 0x85ccf(%rip), %xmm0    # 0x11ea60
mulss %xmm1, %xmm0
mulss 0x85cc7(%rip), %xmm2    # 0x11ea64
addss %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
leaq 0x273c69(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
leaq 0x274492(%rip), %rax    # 0x30d24c
movl $0x6b, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_snr()
void parse_zod_snr()
{
int i;
int flags;
int prn;
int snr;

   log_packet_id("sig levels");

   get_zod_seq(1);
   
   gps_week = tsip_word();
   faked_tow = 0;
   if(have_week == 0) need_redraw = 2033;
   have_week = 6;

   pri_tow = tow = this_tow = tsip_dword();
   if(have_tow == 0) need_redraw = 2034;
   have_tow = 6;
   survey_tow = tow;

   tsip_dword(); // epoch nanoseconds

   reset_sat_tracking();

   for(i=0; i<12; i++) {
      flags = tsip_word();
      prn = tsip_word();
      snr = tsip_word();
      if((prn >= 1) && (prn <= MAX_PRN)) { 
         sat[prn].sig_level = (float) snr;
         sat[prn].level_msg = 9;
         have_snr |= rinex_gnss(prn);
         if(flags & 0x0001) sat[prn].tracking = 1;
         else               sat[prn].tracking = (-1);
         record_sig_levels(prn);
      }
   }

   level_type = "SNR";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8bd60(%rip), %rdi     # 0x124b40
callq 0x58dc2
callq 0x58964
callq 0x588d2
callq 0x588d2
callq 0x588d2
leaq 0x274938(%rip), %rcx    # 0x30d738
movw %ax, (%rcx)
leaq 0x27493e(%rip), %rax    # 0x30d748
movl $0x0, (%rax)
leaq 0x274515(%rip), %rax    # 0x30d32c
cmpl $0x0, (%rax)
jne 0x98e29
leaq 0x17fa21(%rip), %rcx    # 0x218844
movl $0x7f1, (%rcx)          # imm = 0x7F1
movl $0x6, (%rax)
callq 0x58964
leaq 0x274905(%rip), %rcx    # 0x30d740
movl %eax, (%rcx)
leaq 0x2748f8(%rip), %rcx    # 0x30d73c
movl %eax, (%rcx)
leaq 0x2748f7(%rip), %rcx    # 0x30d744
movl %eax, (%rcx)
leaq 0x2744d2(%rip), %rcx    # 0x30d328
cmpl $0x0, (%rcx)
jne 0x98e68
leaq 0x17f9e2(%rip), %rdx    # 0x218844
movl $0x7f2, (%rdx)          # imm = 0x7F2
movl $0x6, (%rcx)
movl %eax, %eax
leaq 0x2748d9(%rip), %rcx    # 0x30d750
movq %rax, (%rcx)
callq 0x58964
movl $0x218, %eax            # imm = 0x218
leaq 0x1a6125(%rip), %r15    # 0x23efb0
xorl %ecx, %ecx
movl %ecx, (%r15,%rax)
movl %ecx, -0x1fc(%r15,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd358, %rax          # imm = 0xCD358
jne 0x98e8d
movl $0xc, %r12d
callq 0x588d2
movl %eax, %ebx
callq 0x588d2
movl %eax, %r14d
callq 0x588d2
leal -0x1(%r14), %ecx
movzwl %cx, %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0x98f27
movzwl %ax, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movzwl %r14w, %r14d
imulq $0x348, %r14, %r13      # imm = 0x348
movss %xmm0, 0x20(%r15,%r13)
movl $0x9, 0x1c(%r15,%r13)
movl %r14d, %edi
callq 0xdc1dd
leaq 0x274448(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
andl $0x1, %ebx
cmpw $0x1, %bx
movl $0x0, %eax
sbbl %eax, %eax
orl $0x1, %eax
movl %eax, 0x218(%r15,%r13)
movl %r14d, %edi
callq 0x5cdab
decl %r12d
jne 0x98ead
leaq 0x850c8(%rip), %rax     # 0x11dffb
leaq 0x1a5fbe(%rip), %rcx    # 0x23eef8
movq %rax, (%rcx)
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/heathgps.cpp
// Function: parse_zod_mark()
void parse_zod_mark()
{
double secs;
int flags;

   log_packet_id("tow / utc offset");

   get_zod_seq(0);
   tsip_word();  // rsvd
   tsip_word(); 
   tsip_word(); 
   tsip_word(); 
   tsip_word(); 

   pri_tow = tow = this_tow = tsip_dword();
   if(have_tow == 0) need_redraw = 2035;
   have_tow = 7;
   survey_tow = tow;

   secs  = (double) tsip_word();
   secs += ((double) tsip_dword()) / 1.0E9;
   if(!user_set_utc_ofs) {
      utc_offset = (int) (secs + 0.50);
      check_utc_ofs(7);
   }

   flags = tsip_word();

   minor_alarms &= (~MINOR_PPS_SKIPPED);
//sprintf(debug_text2, "mark flags:%04X", flags);
   if((flags & 0x0001) == 0) minor_alarms |= MINOR_PPS_SKIPPED;  // time mark invalid
   if(flags & 0x0008) minor_alarms |= MINOR_PPS_SKIPPED;  // traim alarm

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8ba12(%rip), %rdi     # 0x124b5a
callq 0x58dc2
callq 0x58964
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x58964
leaq 0x2745c4(%rip), %rcx    # 0x30d740
movl %eax, (%rcx)
leaq 0x2745b7(%rip), %rcx    # 0x30d73c
movl %eax, (%rcx)
leaq 0x2745b6(%rip), %rcx    # 0x30d744
movl %eax, (%rcx)
leaq 0x274191(%rip), %rcx    # 0x30d328
cmpl $0x0, (%rcx)
jne 0x991a9
leaq 0x17f6a1(%rip), %rdx    # 0x218844
movl $0x7f3, (%rdx)          # imm = 0x7F3
movl $0x7, (%rcx)
movl %eax, %eax
leaq 0x274598(%rip), %rcx    # 0x30d750
movq %rax, (%rcx)
callq 0x588d2
movl %eax, %ebx
callq 0x58964
leaq 0x274566(%rip), %rcx    # 0x30d734
cmpl $0x0, (%rcx)
jne 0x99246
movzwl %bx, %ecx
cvtsi2sd %ecx, %xmm0
movl %eax, %eax
cvtsi2sd %rax, %xmm1
divsd 0x6fe3f(%rip), %xmm1    # 0x109028
addsd %xmm0, %xmm1
addsd 0x6fe73(%rip), %xmm1    # 0x109068
cvttsd2si %xmm1, %ecx
leaq 0x274528(%rip), %rax    # 0x30d728
movl %ecx, (%rax)
leaq 0x274113(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0x99246
leaq 0x2742ff(%rip), %rdx    # 0x30d514
cmpl $0x7e1, (%rdx)          # imm = 0x7E1
setge %dl
cmpl $0x12, %ecx
setl %sil
andb %dl, %sil
cmpl $0x11, %ecx
setl %cl
orb %sil, %cl
jne 0x99246
leaq 0x17f60a(%rip), %rcx    # 0x218844
movl $0x7d7, (%rcx)          # imm = 0x7D7
movl $0x7, (%rax)
callq 0x588d2
movzwl %ax, %eax
leaq 0x273f83(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %esi
andl $0xffffefff, %esi       # imm = 0xFFFFEFFF
movl %eax, %edi
andl $0x1, %edi
shll $0xc, %edi
orl %esi, %edi
movl $0x1000, %esi           # imm = 0x1000
xorl %esi, %edi
orl %esi, %edx
testb $0x8, %al
cmovel %edi, %edx
movl %edx, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq