LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x8bd8c(%rip), %rdi     # 0x124a60
callq 0x58e77
callq 0x589b0
callq 0x588f0
callq 0x588f0
callq 0x588f0
leaq 0x274a44(%rip), %rcx    # 0x30d738
movw %ax, (%rcx)
leaq 0x274a4a(%rip), %rax    # 0x30d748
movl $0x0, (%rax)
leaq 0x274621(%rip), %rax    # 0x30d32c
cmpl $0x0, (%rax)
jne 0x98d1d
leaq 0x17fb2d(%rip), %rcx    # 0x218844
movl $0x7f1, (%rcx)          # imm = 0x7F1
movl $0x6, (%rax)
callq 0x589b0
leaq 0x274a11(%rip), %rcx    # 0x30d740
movl %eax, (%rcx)
leaq 0x274a04(%rip), %rcx    # 0x30d73c
movl %eax, (%rcx)
leaq 0x274a03(%rip), %rcx    # 0x30d744
movl %eax, (%rcx)
leaq 0x2745de(%rip), %rcx    # 0x30d328
cmpl $0x0, (%rcx)
jne 0x98d5c
leaq 0x17faee(%rip), %rdx    # 0x218844
movl $0x7f2, (%rdx)          # imm = 0x7F2
movl $0x6, (%rcx)
movl %eax, %eax
leaq 0x2749e5(%rip), %rcx    # 0x30d750
movq %rax, (%rcx)
callq 0x589b0
movl $0x218, %eax            # imm = 0x218
leaq 0x1a6231(%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 0x98d81
movl $0xc, %r12d
callq 0x588f0
movl %eax, %ebx
callq 0x588f0
movl %eax, %r14d
callq 0x588f0
leal -0x1(%r14), %ecx
movzwl %cx, %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0x98e1b
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 0xdbb74
leaq 0x274554(%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 0x5ced3
decl %r12d
jne 0x98da1
leaq 0x85149(%rip), %rax     # 0x11df70
leaq 0x1a60ca(%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_O1/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 0x8ba3e(%rip), %rdi     # 0x124a7a
callq 0x58e77
callq 0x589b0
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x589b0
leaq 0x2746d0(%rip), %rcx    # 0x30d740
movl %eax, (%rcx)
leaq 0x2746c3(%rip), %rcx    # 0x30d73c
movl %eax, (%rcx)
leaq 0x2746c2(%rip), %rcx    # 0x30d744
movl %eax, (%rcx)
leaq 0x27429d(%rip), %rcx    # 0x30d328
cmpl $0x0, (%rcx)
jne 0x9909d
leaq 0x17f7ad(%rip), %rdx    # 0x218844
movl $0x7f3, (%rdx)          # imm = 0x7F3
movl $0x7, (%rcx)
movl %eax, %eax
leaq 0x2746a4(%rip), %rcx    # 0x30d750
movq %rax, (%rcx)
callq 0x588f0
movl %eax, %ebx
callq 0x589b0
leaq 0x274672(%rip), %rcx    # 0x30d734
cmpl $0x0, (%rcx)
jne 0x9913a
movzwl %bx, %ecx
cvtsi2sd %ecx, %xmm0
movl %eax, %eax
cvtsi2sd %rax, %xmm1
divsd 0x6ff4b(%rip), %xmm1    # 0x109028
addsd %xmm0, %xmm1
addsd 0x6ff7f(%rip), %xmm1    # 0x109068
cvttsd2si %xmm1, %ecx
leaq 0x274634(%rip), %rax    # 0x30d728
movl %ecx, (%rax)
leaq 0x27421f(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0x9913a
leaq 0x27440b(%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 0x9913a
leaq 0x17f716(%rip), %rcx    # 0x218844
movl $0x7d7, (%rcx)          # imm = 0x7D7
movl $0x7, (%rax)
callq 0x588f0
movzwl %ax, %eax
leaq 0x27408f(%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
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_ee_written()
void parse_zod_ee_written()
{
u16 flags;

   log_packet_id("eeprom write");

   get_zod_seq(0);
   flags = tsip_word();
   BEEP(508); // gggg
   ++ee_write_count;
//sprintf(debug_text, "ee_write:%04X  count:%d", flags,ee_write_count); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8b33e(%rip), %rdi     # 0x124ab5
callq 0x58e77
callq 0x589b0
callq 0x588f0
callq 0x588f0
movl $0x1fc, %edi            # imm = 0x1FC
callq 0x9d80
leaq 0x181a9c(%rip), %rax    # 0x21b238
incl (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_ee_status()
void parse_zod_ee_status()
{
u16 flags;
u32 alm_fail;
u32 fail;
u32 alm_status;
u32 status;

   log_packet_id("eeprom status");

   get_zod_seq(0);
   flags = tsip_word();
   alm_fail = tsip_dword();
   fail = tsip_dword();
   alm_status = tsip_dword();
   status = tsip_dword();

   if(flags & 0x01) have_eeprom = 0;
   else             have_eeprom = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8b315(%rip), %rdi     # 0x124ac2
callq 0x58e77
callq 0x589b0
callq 0x588f0
callq 0x588f0
movl %eax, %ebx
notl %ebx
callq 0x589b0
callq 0x589b0
callq 0x589b0
callq 0x589b0
andl $0x1, %ebx
leaq 0x273ac9(%rip), %rax    # 0x30d2ac
movl %ebx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_power()
void parse_zod_power()
{
u16 flags;

   log_packet_id("power");

   get_zod_seq(0);
   flags = tsip_word();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a2b3(%rip), %rdi     # 0x123aaa
callq 0x58e77
callq 0x589b0
callq 0x588f0
popq %rbp
jmp 0x588f0
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_id()
void parse_zod_id()
{
int i;

   log_packet_id("receiver id");

   get_zod_seq(0);

   for(i=0; i<20; i++) {
      zod_chans[i] = tsip_byte();
      zod_chans[i+1] = 0;
   }

   for(i=0; i<20; i++) {
      zod_sw[i] = tsip_byte();
      zod_sw[i+1] = 0;
   }

   for(i=0; i<20; i++) {
      zod_date[i] = tsip_byte();
      zod_date[i+1] = 0;
   }

   for(i=0; i<20; i++) {
      zod_opt[i] = tsip_byte();
      zod_opt[i+1] = 0;

   }

   for(i=0; i<20; i++) {
      zod_rsvd[i] = tsip_byte();
      zod_rsvd[i+1] = 0;
   }

   have_info |= ALL_ID_INFO;

// show_version_info();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x8b2b3(%rip), %rdi     # 0x124ad0
callq 0x58e77
callq 0x589b0
callq 0x588f0
movl $0x1, %r14d
leaq 0x2a45d7(%rip), %r15    # 0x33de10
leaq 0x1a5730(%rip), %rbx    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9984f
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x99840
movl $0x1, %r14d
leaq 0x2a45c1(%rip), %r15    # 0x33de30
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9987e
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x9986f
movl $0x1, %r14d
leaq 0x2a45b2(%rip), %r15    # 0x33de50
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x998ad
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x9989e
movl $0x1, %r14d
leaq 0x2a45a3(%rip), %r15    # 0x33de70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x998dc
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x998cd
movl $0x1, %r14d
leaq 0x2a4594(%rip), %r15    # 0x33de90
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9990b
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x998fc
leaq 0x27404f(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_settings()
void parse_zod_settings()
{
u16 snr_threshold;
u16 elev;
u16 platform;

   log_packet_id("setttings");

   get_zod_seq(0);

   zod_nav_flags = tsip_word();
   snr_threshold = ((zod_nav_flags >> 9) & 0x7F);

   tsip_word();        // col start timeout
   tsip_word();        // dgps timeout

   elev = tsip_word();
   el_mask = (float) elev;
   el_mask += 0.005F;
   el_mask = el_mask * (float) ((180.0/PI) / 1000.0);
   have_el_mask = 1;

   sats_enabled = tsip_dword();  // selected sats bit mask
   tsip_word();        // solution flags
   tsip_word();        // required sat count
   tsip_dword();       // required horiz err
   tsip_dword();       // required vert err
   platform = tsip_word();

   update_disable_list(sats_enabled);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8b19c(%rip), %rdi     # 0x124adc
callq 0x58e77
callq 0x589b0
callq 0x588f0
callq 0x588f0
movw %ax, 0x2d31d7(%rip)     # 0x36cb32
callq 0x588f0
callq 0x588f0
callq 0x588f0
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
addss 0x8503f(%rip), %xmm0    # 0x11e9b8
mulss 0x8503b(%rip), %xmm0    # 0x11e9bc
leaq 0x27372c(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x273a69(%rip), %rax    # 0x30d3fc
movl $0x1, (%rax)
callq 0x589b0
leaq 0x27373f(%rip), %rbx    # 0x30d0e4
movl %eax, (%rbx)
callq 0x588f0
callq 0x588f0
callq 0x589b0
callq 0x589b0
callq 0x588f0
movl $0x349, %eax            # imm = 0x349
addq 0xb6574(%rip), %rax     # 0x14ff40
movl (%rbx), %ecx
xorl %edx, %edx
btl %edx, %ecx
setae (%rax)
addq $0x348, %rax            # imm = 0x348
incq %rdx
cmpq $0x20, %rdx
jne 0x999d0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_zod_diags()
void parse_zod_diags()
{
int ram;
int rom;
int ee;
int dp_ram;
int dsp;
int rtc;

   log_packet_id("diagnostics");

   get_zod_seq(0);
   rom = tsip_word();
   ram = tsip_word();
   ee  = tsip_word();
   dp_ram = tsip_word();
   dsp = tsip_word();
   rtc = tsip_word();

   tsip_word();   // serial port stats
   tsip_word();
   tsip_word();
   tsip_word();

   critical_alarms = 0;
   if(have_eeprom == 0) ee = 0;
   minor_alarms &= (~MINOR_EEPROM);

   if(rom) critical_alarms |= CRIT_ROM;   // ROM
   if(rtc) critical_alarms |= CRIT_OCXO;  // 1KHz / DCXO
   if(dsp) critical_alarms |= CRIT_FPGA;  // FPGA
   if(ram | dp_ram) critical_alarms |= CRIT_RAM;  // RAM
   if(ee) {
      minor_alarms |= MINOR_EEPROM;      // EEPROM
      have_eeprom = 1;
   }
   if(!have_critical_alarms) need_redraw = 7703;
   have_critical_alarms = 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x746ef(%rip), %rdi     # 0x10e0f0
callq 0x58e77
callq 0x589b0
callq 0x588f0
callq 0x588f0
movl %eax, %r12d
callq 0x588f0
movl %eax, %r14d
callq 0x588f0
movw %ax, -0x2a(%rbp)
callq 0x588f0
movl %eax, %r15d
callq 0x588f0
movl %eax, %r13d
callq 0x588f0
movl %eax, %ebx
callq 0x588f0
callq 0x588f0
callq 0x588f0
callq 0x588f0
leaq 0x273775(%rip), %rdi    # 0x30d1d0
movl $0x0, (%rdi)
leaq 0x273844(%rip), %rax    # 0x30d2ac
movl (%rax), %esi
leaq 0x273767(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %r8d
andl $0xfffffbff, %r8d       # imm = 0xFFFFFBFF
movl %r8d, (%rcx)
testw %r12w, %r12w
je 0x99a8c
movl $0x1, (%rdi)
testw %bx, %bx
je 0x99a94
orb $0x10, (%rdi)
testw %r13w, %r13w
je 0x99a9d
orb $0x8, (%rdi)
orw %r14w, %r15w
je 0x99aa6
orb $0x2, (%rdi)
cmpw $0x0, -0x2a(%rbp)
je 0x99abf
testl %esi, %esi
je 0x99abf
orl $0x400, %edx            # imm = 0x400
movl %edx, (%rcx)
movl $0x1, (%rax)
leaq 0x2737e2(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x99ad8
leaq 0x17ed72(%rip), %rcx    # 0x218844
movl $0x1e17, (%rcx)         # imm = 0x1E17
movl $0x3, (%rax)
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/heathgps.cpp
// Function: set_zod_protocol(int)
void set_zod_protocol(int prot)
{
   if(read_only) return;

   if(prot < 0) return;
   if(prot > 1) return;

   send_zod_start(ZOD_SET_PROTOCOL, 9, 0);
   send_zod_seq();
   send_word(0);
   send_word(prot);
   send_zod_end();

   Sleep(250);
   if     (prot == 0) rcvr_type = ZODIAC_RCVR;
   else if(prot == 1) rcvr_type = NMEA_RCVR;
   config_rcvr_type(0);
   need_msg_init = 2006;
   init_messages(60, 1);
}

// Assembly:
cmpl $0x1, %edi
ja 0x99b8c
leaq 0x29d51d(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x99b8c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x533, %edi            # imm = 0x533
movl $0x9, %esi
xorl %edx, %edx
callq 0x645ec
movzwl 0x2d300a(%rip), %edi    # 0x36cb30
callq 0x5936c
xorl %edi, %edi
callq 0x5936c
movzwl %bx, %edi
callq 0x5936c
callq 0x646c7
movl $0xfa, %edi
callq 0xaff7
testl %ebx, %ebx
movl $0x100, %eax            # imm = 0x100
movl $0x2, %ecx
cmoveq %rax, %rcx
leaq 0x17ed70(%rip), %rax    # 0x2188d0
movq %rcx, (%rax)
xorl %edi, %edi
callq 0x4b25a
leaq 0x1814bf(%rip), %rax    # 0x21b030
movl $0x7d6, (%rax)          # imm = 0x7D6
movl $0x3c, %edi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61765
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_zod_power(int)
void set_zod_power(int power)
{
   if(read_only) return;

   send_zod_start(ZOD_SET_POWER, 8, 0);
   send_zod_seq();
   send_word(power);
   send_zod_end();
   Sleep(100);

   query_zod_msg(ZOD_POWER_MSG);
}

// Assembly:
leaq 0x29d486(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x99b9a
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x525, %edi            # imm = 0x525
movl $0x8, %esi
xorl %edx, %edx
callq 0x645ec
movzwl 0x2d2f76(%rip), %edi    # 0x36cb30
callq 0x5936c
movzwl %bx, %edi
callq 0x5936c
callq 0x646c7
movl $0x64, %edi
callq 0xaff7
movl $0x45d, %edi            # imm = 0x45D
movl $0x6, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x645ec
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x646c7
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_zod_platform(int)
void set_zod_platform(int platform)
{
   if(read_only) return;

   send_zod_start(ZOD_SET_PLATFORM, 8, 0);
   send_zod_seq();
   send_word(platform);
   send_zod_end();
   Sleep(100);

   query_zod_msg(ZOD_SETTINGS_MSG);
}

// Assembly:
leaq 0x29d41e(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x99c02
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x4c4, %edi            # imm = 0x4C4
movl $0x8, %esi
xorl %edx, %edx
callq 0x645ec
movzwl 0x2d2f0e(%rip), %edi    # 0x36cb30
callq 0x5936c
movzwl %bx, %edi
callq 0x5936c
callq 0x646c7
movl $0x64, %edi
callq 0xaff7
movl $0x3f4, %edi            # imm = 0x3F4
movl $0x6, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x645ec
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x646c7
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_zod_message()
void decode_zod_message()
{
u16 id;

   start_msg_decode(1);

   id = zodiac_hdr[0];

   if     (id == ZOD_POSN_MSG)         parse_zod_posn();
   else if(id == ZOD_SNR_MSG)          parse_zod_snr();
   else if(id == ZOD_VIS_MSG)          parse_zod_vis();
   else if(id == ZOD_TRAIM_STATUS_MSG) parse_zod_traim_status();
   else if(id == ZOD_TRAIM_CONFIG_MSG) parse_zod_traim_config();
   else if(id == ZOD_DIAG_MSG)         parse_zod_diags();
   else if(id == ZOD_MARK_MSG)         parse_zod_mark();
   else if(id == ZOD_TEMP_MSG)         parse_zod_temp();
   else if(id == ZOD_EE_WRITE_MSG)     parse_zod_ee_written();
   else if(id == ZOD_EE_STATUS_MSG)    parse_zod_ee_status();
   else if(id == ZOD_POWER_MSG)        parse_zod_power();
   else if(id == ZOD_SETTINGS_MSG)     parse_zod_settings();
   else if(id == ZOD_ID_MSG)           parse_zod_id();
// else sprintf(debug_text, "unk zod msg:%d", id);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1, %edi
callq 0x7f47d
movzwl 0x2d2eb6(%rip), %eax    # 0x36cb28
cmpl $0x41f, %eax            # imm = 0x41F
jle 0x99cab
cmpl $0x455, %eax            # imm = 0x455
jle 0x99cdd
cmpl $0x46e, %eax            # imm = 0x46E
jg 0x99d15
cmpl $0x456, %eax            # imm = 0x456
je 0x99d2a
cmpl $0x45d, %eax            # imm = 0x45D
jne 0x99d60
callq 0x997ec
jmp 0x99d60
cmpl $0x3f2, %eax            # imm = 0x3F2
jg 0x99cf9
cmpl $0x3e8, %eax            # imm = 0x3E8
je 0x99d46
cmpl $0x3ea, %eax            # imm = 0x3EA
je 0x99d54
cmpl $0x3eb, %eax            # imm = 0x3EB
jne 0x99d60
callq 0x98e40
jmp 0x99d60
cmpl $0x420, %eax            # imm = 0x420
je 0x99d38
cmpl $0x44c, %eax            # imm = 0x44C
je 0x99d3f
cmpl $0x454, %eax            # imm = 0x454
jne 0x99d60
callq 0x9902f
jmp 0x99d60
cmpl $0x3f3, %eax            # imm = 0x3F3
je 0x99d4d
cmpl $0x3f4, %eax            # imm = 0x3F4
je 0x99d5b
cmpl $0x41f, %eax            # imm = 0x41F
jne 0x99d60
callq 0x99174
jmp 0x99d60
cmpl $0x46f, %eax            # imm = 0x46F
je 0x99d31
cmpl $0x470, %eax            # imm = 0x470
jne 0x99d60
callq 0x997a0
jmp 0x99d60
callq 0x98bfb
jmp 0x99d60
callq 0x9976c
jmp 0x99d60
callq 0x992d5
jmp 0x99d60
callq 0x999ec
jmp 0x99d60
callq 0x99401
jmp 0x99d60
callq 0x9980c
jmp 0x99d60
callq 0x98cbf
jmp 0x99d60
callq 0x99933
leaq 0x1a4659(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
setne %al
leaq 0x18988b(%rip), %rcx    # 0x223600
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x99d8a
callq 0xaff7
leaq 0x1a520f(%rip), %rax    # 0x23efa0
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_moto_lla()
void get_moto_lla()
{
   // get lat/lon/alt fields from a motorola binary message

   lat = ((double) (S32) tsip_dword());  // filtered or unfiltered posn
   lon = ((double) (S32) tsip_dword());
   alt = ((double) (S32) tsip_dword());  // gps altitude

   lat = (lat / 3600000.0) * PI / 180.0; // milliarcseconds to radians
   lon = (lon / 3600000.0) * PI / 180.0;
   alt /= 100.0;  // convert cm to meters
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x589b0
cvtsi2sd %eax, %xmm0
leaq 0x272fbe(%rip), %rbx    # 0x30cfd0
movsd %xmm0, (%rbx)
callq 0x589b0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x272faf(%rip), %r14    # 0x30cfd8
movsd %xmm0, (%r14)
callq 0x589b0
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x272f9f(%rip), %rax    # 0x30cfe0
movsd (%rbx), %xmm1
movsd 0x840cb(%rip), %xmm2    # 0x11e118
divsd %xmm2, %xmm1
movsd 0x717bf(%rip), %xmm3    # 0x10b818
mulsd %xmm3, %xmm1
movsd 0x717bb(%rip), %xmm4    # 0x10b820
divsd %xmm4, %xmm1
movsd %xmm1, (%rbx)
movsd (%r14), %xmm1
divsd %xmm2, %xmm1
mulsd %xmm3, %xmm1
divsd %xmm4, %xmm1
movsd %xmm1, (%r14)
divsd 0x6efd5(%rip), %xmm0    # 0x109060
movsd %xmm0, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_moto_time(int)
void get_moto_time(int set_time)
{
   if(set_time) {
      pri_month = month = tsip_byte();
      pri_day = day = tsip_byte();
      pri_year = year = tsip_word();
      pri_hours = hours = tsip_byte();
      pri_minutes = minutes = tsip_byte();
      pri_seconds = seconds = tsip_byte();
      pri_frac = raw_frac = 0.0;
   }
   else {
      tsip_byte();
      tsip_byte();
      tsip_word();
      tsip_byte();
      tsip_byte();
      tsip_byte();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x587d1
testl %ebx, %ebx
je 0x9a1ad
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a0ba
leaq 0x1a4eb9(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x273414(%rip), %rcx    # 0x30d4d8
movl %eax, (%rcx)
leaq 0x273443(%rip), %rcx    # 0x30d510
movl %eax, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a0e5
leaq 0x1a4e8e(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x2733e5(%rip), %rcx    # 0x30d4d4
movl %eax, (%rcx)
leaq 0x273414(%rip), %rcx    # 0x30d50c
movl %eax, (%rcx)
callq 0x588f0
movzwl %ax, %eax
leaq 0x2733d3(%rip), %rcx    # 0x30d4dc
movl %eax, (%rcx)
leaq 0x273402(%rip), %rcx    # 0x30d514
movl %eax, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a12a
leaq 0x1a4e49(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x27339c(%rip), %rcx    # 0x30d4d0
movl %eax, (%rcx)
leaq 0x2733cb(%rip), %rcx    # 0x30d508
movl %eax, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a155
leaq 0x1a4e1e(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x27336d(%rip), %rcx    # 0x30d4cc
movl %eax, (%rcx)
leaq 0x27339c(%rip), %rcx    # 0x30d504
movl %eax, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a180
leaq 0x1a4df3(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x27333e(%rip), %rcx    # 0x30d4c8
movl %eax, (%rcx)
leaq 0x27336d(%rip), %rcx    # 0x30d500
movl %eax, (%rcx)
leaq 0x273344(%rip), %rax    # 0x30d4e0
xorl %ecx, %ecx
movq %rcx, (%rax)
leaq 0x273370(%rip), %rax    # 0x30d518
movq %rcx, (%rax)
jmp 0x9a21b
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a1be
leaq 0x1a4db5(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a1d4
leaq 0x1a4d9f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a1ef
leaq 0x1a4d84(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a205
leaq 0x1a4d6e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a21b
leaq 0x1a4d58(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_posn_mode()
void decode_posn_mode()
{
   // convert position mode word into tbolt equivalents

   set_survey_status(0);

   if     (posn_mode == 0) rcvr_mode = RCVR_MODE_3D;
   else if(posn_mode == 1) rcvr_mode = RCVR_MODE_HOLD;
   else if(posn_mode == 2) rcvr_mode = RCVR_MODE_2D;
   else if(posn_mode == 3) set_survey_status(1);
   have_rcvr_mode = 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x272f43(%rip), %rax    # 0x30d1d8
movl (%rax), %ecx
movl %ecx, %edx
andl $-0x21, %edx
movl %edx, (%rax)
leaq 0x180e47(%rip), %rdx    # 0x21b0ec
movl (%rdx), %edx
cmpq $0x3, %rdx
ja 0x9a2e6
leaq 0x85568(%rip), %rsi     # 0x11f81c
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
leaq 0x272e0c(%rip), %rax    # 0x30d0d0
movb $0x4, (%rax)
jmp 0x9a2e6
leaq 0x272e00(%rip), %rax    # 0x30d0d0
movb $0x3, (%rax)
jmp 0x9a2e6
orl $0x20, %ecx
movl %ecx, (%rax)
jmp 0x9a2e6
leaq 0x272ded(%rip), %rax    # 0x30d0d0
movb $0x7, (%rax)
leaq 0x273120(%rip), %rax    # 0x30d40d
movb $0x4, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_moto_tag()
void get_moto_tag()
{
   id_tag[0] = tsip_byte();  // id string
   id_tag[1] = tsip_byte();
   id_tag[2] = tsip_byte();
   id_tag[3] = tsip_byte();
   id_tag[4] = tsip_byte();
   id_tag[5] = tsip_byte();
   id_tag[6] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a41a
leaq 0x1a4b59(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d26ac(%rip)     # 0x36cacc
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a436
leaq 0x1a4b3d(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d2691(%rip)     # 0x36cacd
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a452
leaq 0x1a4b21(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d2676(%rip)     # 0x36cace
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a46e
leaq 0x1a4b05(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d265b(%rip)     # 0x36cacf
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a48a
leaq 0x1a4ae9(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d2640(%rip)     # 0x36cad0
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a4a6
leaq 0x1a4acd(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d2625(%rip)     # 0x36cad1
movb $0x0, 0x2d261f(%rip)    # 0x36cad2
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Af()
void parse_moto_Af()
{
   log_packet_id("altitude");
   alt = ((double) (S32) tsip_dword());  // GPS height in cm
   tsip_dword();                         // MSL height in cm
   alt = (alt / 100.0); // cm to meters
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8a5d6(%rip), %rdi     # 0x124b14
callq 0x58e77
callq 0x589b0
cvtsi2sd %eax, %xmm0
leaq 0x272a8d(%rip), %rbx    # 0x30cfe0
movsd %xmm0, (%rbx)
callq 0x589b0
movsd (%rbx), %xmm0
divsd 0x6eaf8(%rip), %xmm0    # 0x109060
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Ag()
void parse_moto_Ag()
{
   // elevation mask
   log_packet_id("elevation mask");
   el_mask = tsip_byte();
   have_el_mask = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x79cb0(%rip), %rdi     # 0x11422e
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a599
leaq 0x1a49da(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
cvtsi2ss %eax, %xmm0
leaq 0x272b0d(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x272e4a(%rip), %rax    # 0x30d3fc
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Am()
void parse_moto_Am()
{
u32 val;

   log_packet_id("ignore sats");
   tsip_byte();
   val = tsip_dword();  // sat ignore bitmask

   val = (~val);
   sats_enabled = val;
   update_disable_list(sats_enabled);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a558(%rip), %rdi     # 0x124b1d
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a5e0
leaq 0x1a4993(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x589b0
movl %eax, %ecx
notl %ecx
leaq 0x272af4(%rip), %rdx    # 0x30d0e4
movl %ecx, (%rdx)
movl $0x349, %ecx            # imm = 0x349
addq 0xb5942(%rip), %rcx     # 0x14ff40
xorl %edx, %edx
btl %edx, %eax
setb (%rcx)
incq %rdx
addq $0x348, %rcx            # imm = 0x348
cmpq $0x20, %rdx
jne 0x9a600
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_AN()
void parse_moto_AN()
{
u08 v_filter;

   // marine velocity filter
   log_packet_id("marine filter");
   v_filter = tsip_byte();
   marine_filter = v_filter;
   if((v_filter >= 10) && (v_filter <= 100)) have_filter |= MARINE_FILTER;
   else                                      have_filter &= (~MARINE_FILTER);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a506(%rip), %rdi     # 0x124b29
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a63e
leaq 0x1a4935(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x272a5a(%rip), %rcx    # 0x30d09f
leal -0xa(%rax), %edx
xorl %esi, %esi
cmpb $0x5b, %dl
setb %sil
leaq 0x272a38(%rip), %rdx    # 0x30d090
movl $0xfffffeff, %edi       # imm = 0xFFFFFEFF
andl (%rdx), %edi
movb %al, (%rcx)
shll $0x8, %esi
orl %edi, %esi
movl %esi, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_AP()
void parse_moto_AP()
{
   // PPS rate (1 / 100 PPS)
   log_packet_id("pps rate");
   pps_rate = tsip_byte();
   have_pps_rate = 5;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a4c2(%rip), %rdi     # 0x124b37
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a690
leaq 0x1a48e3(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x27368c(%rip), %rcx    # 0x30dd23
movb %al, (%rcx)
leaq 0x272c30(%rip), %rax    # 0x30d2d0
movl $0x5, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Aq()
void parse_moto_Aq()
{
u08 iono;

   // ionosphere corrections
   log_packet_id("iono/tropo filters");
   iono = tsip_byte();  // 0x01=iono, 0x02:tropo
   if(iono & 0x01) static_filter = 1;
   else            static_filter = 0;
   have_filter |= STATIC_FILTER;

   // troposphere corrections
   if(iono & 0x02) alt_filter = 1;
   else            alt_filter = 0;
   have_filter |= ALT_FILTER;
//sprintf(plot_title, "iono:%02x", iono);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a487(%rip), %rdi     # 0x124b4b
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a6df
leaq 0x1a4894(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movl %eax, %ecx
andb $0x1, %cl
leaq 0x2729ae(%rip), %rdx    # 0x30d099
movb %cl, (%rdx)
leaq 0x27299c(%rip), %rcx    # 0x30d090
shrb %al
andb $0x1, %al
leaq 0x27299b(%rip), %rdx    # 0x30d09a
movb %al, (%rdx)
orb $0x6, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_AQ()
void parse_moto_AQ()
{
u08 v_filter;

   // position filter
   log_packet_id("pv filter");
   v_filter = tsip_byte();
   pv_filter = v_filter;
   have_filter |= PV_FILTER;
//sprintf(debug_text, "Pfilter:%02x", pv_filter);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a44d(%rip), %rdi     # 0x124b5e
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a72c
leaq 0x1a4847(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x272965(%rip), %rcx    # 0x30d098
movb %al, (%rcx)
leaq 0x272954(%rip), %rax    # 0x30d090
orb $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_At()
void parse_moto_At()
{
   // position hold status
   log_packet_id("positioning mode");
   posn_mode = tsip_byte();  // 0=3D, 1=posn hold
   decode_posn_mode();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a3fd(%rip), %rdi     # 0x124b71
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a78f
leaq 0x1a47e4(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x180953(%rip), %rcx    # 0x21b0ec
movl %eax, (%rcx)
popq %rbp
jmp 0x9a28a
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Ay()
void parse_moto_Ay()
{
   // pps delay
   log_packet_id("pps delay");
   pps1_delay = (double) (S32) tsip_dword();
   have_pps_delay |= 0x01;
   show_cable_delay();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a3d6(%rip), %rdi     # 0x124b82
callq 0x58e77
callq 0x589b0
cvtsi2sd %eax, %xmm0
leaq 0x273617(%rip), %rax    # 0x30ddd8
movsd %xmm0, (%rax)
leaq 0x272aec(%rip), %rax    # 0x30d2b8
orb $0x1, (%rax)
popq %rbp
jmp 0x754c4
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Aw()
void parse_moto_Aw()
{
u08 x;

   // GPS (0) UTC (1) select
   log_packet_id("timing mode");
   x = tsip_byte();  
   if(x == 0) {
      time_flags &= (~TFLAGS_UTC);
      timing_mode = TMODE_GPS;
      have_timing_mode = 1;
   }
   else {
      time_flags |= (TFLAGS_UTC);
      timing_mode = TMODE_UTC;
      have_timing_mode = 1;
   }
   have_rcvr_tmode = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a3ac(%rip), %rdi     # 0x124b8c
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a7fb
leaq 0x1a4778(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
xorl %ecx, %ecx
testb %al, %al
setne %cl
leaq 0x272c9b(%rip), %rax    # 0x30d4a4
movl (%rax), %edx
andl $-0x2, %edx
orl %ecx, %edx
leal (%rcx,%rcx,2), %ecx
movl %edx, (%rax)
leaq 0x272ca1(%rip), %rax    # 0x30d4bd
movb %cl, (%rax)
leaq 0x272ba7(%rip), %rax    # 0x30d3cc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x272b9d(%rip), %rax    # 0x30d3d0
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Az()
void parse_moto_Az()
{
S32 val;

   // cable delay
   log_packet_id("cable delay");
   val = tsip_dword();
   cable_delay = ((double) val) / 1.0E9;
// if(have_cable_delay == 0) need_redraw = 2040;
   have_cable_delay = 1;
   show_cable_delay();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8a356(%rip), %rdi     # 0x124b98
callq 0x58e77
callq 0x589b0
cvtsi2sd %eax, %xmm0
divsd 0x6e7d0(%rip), %xmm0    # 0x109028
leaq 0x273569(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x272a4a(%rip), %rax    # 0x30d2b4
movl $0x1, (%rax)
popq %rbp
jmp 0x754c4
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Bb()
void parse_moto_Bb()
{
int i;
int nsats;
int prn;
s16 doppler;
int el;
int az;
int health;

   log_packet_id("sat visibility");
   nsats = tsip_byte();
   for(i=0; i<12; i++) {
      prn     = tsip_byte();
      doppler = tsip_word();
      el      = tsip_byte();
      az      = tsip_word();
      health  = tsip_byte();

      if((prn >= 1) && (prn <= MAX_PRN)) { 
         set_sat_azel(prn, (float) az, (float) el);
         sat[prn].doppler = (float) doppler;
         sat[prn].health_flag = health;  // 0=healthy  1=unhealthy
         have_sat_azel = 7;
         if(sat[prn].doppler != 0.0F) {
            if(have_doppler == 0) need_redraw = 2041;
            have_doppler |= rinex_gnss(prn);
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8a1cf(%rip), %rdi     # 0x124a6b
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a8b7
leaq 0x1a46bc(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movl $0xc, %r15d
callq 0x587d1
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a8d5
leaq 0x1a469e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
movw %ax, -0x2a(%rbp)
callq 0x587d1
movl %eax, %r12d
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a8f7
leaq 0x1a467c(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
movl %eax, %r14d
callq 0x587d1
movl %eax, %r13d
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a918
leaq 0x1a465b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
testb %bl, %bl
je 0x9a99a
movzbl %bl, %ecx
movzwl %r14w, %eax
movl %ecx, %r14d
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movzbl %r12b, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movl %ecx, %edi
callq 0x5ad98
movswl -0x2a(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movzbl %bl, %ecx
imulq $0x348, %rcx, %rcx      # imm = 0x348
leaq 0x1a4655(%rip), %rdx    # 0x23efb0
movsd %xmm0, 0x30(%rdx,%rcx)
movb %r13b, (%rdx,%rcx)
leaq 0x272928(%rip), %rcx    # 0x30d294
movl $0x7, (%rcx)
testw %ax, %ax
je 0x9a99a
leaq 0x2729c2(%rip), %rbx    # 0x30d340
cmpl $0x0, (%rbx)
jne 0x9a990
leaq 0x17deba(%rip), %rax    # 0x218844
movl $0x7f9, (%rax)          # imm = 0x7F9
movl %r14d, %edi
callq 0xdbb74
orl %eax, (%rbx)
decl %r15d
jne 0x9a8bd
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/heathgps.cpp
// Function: parse_moto_Bd()
void parse_moto_Bd()
{
u08 valid;
u08 week;
u08 time;
u08 sv_count;
u32 sv_mask;

   // almanac status
   log_packet_id("almanac status");

   valid = tsip_byte();
   week = tsip_byte();
   time = tsip_byte();
   sv_count = tsip_byte();
   sv_mask = tsip_dword();

   tsip_byte();  // reserved bytes
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();

   if(valid) minor_alarms &= (~MINOR_ALMANAC);
   else      minor_alarms |= MINOR_ALMANAC;
   have_almanac = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8a1f3(%rip), %rdi     # 0x124bb2
callq 0x58e77
callq 0x587d1
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a9dc
leaq 0x1a4597(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a9f2
leaq 0x1a4581(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa08
leaq 0x1a456b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa1e
leaq 0x1a4555(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x589b0
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa39
leaq 0x1a453a(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa4f
leaq 0x1a4524(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa65
leaq 0x1a450e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa7b
leaq 0x1a44f8(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa91
leaq 0x1a44e2(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aaa7
leaq 0x1a44cc(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aabd
leaq 0x1a44b6(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aad3
leaq 0x1a44a0(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
xorl %eax, %eax
testb %bl, %bl
sete %al
leaq 0x2726f7(%rip), %rcx    # 0x30d1d8
movl $0xfffff7ff, %edx       # imm = 0xFFFFF7FF
andl (%rcx), %edx
shll $0xb, %eax
orl %edx, %eax
movl %eax, (%rcx)
leaq 0x2727ae(%rip), %rax    # 0x30d2a4
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Bj()
void parse_moto_Bj()
{
int leap;

   // get leapscond pending info
   log_packet_id("leapsecond info");
   if(have_moto_Gj) return;  // M12 messes this up, always reports no leap

   leap = tsip_byte();
   if(leap) {
      minor_alarms |= MINOR_LEAP_PEND;
   }
   else { 
      minor_alarms &= (~MINOR_LEAP_PEND);
   }
   have_leap_info = 3;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x88ba4(%rip), %rdi     # 0x1236b2
callq 0x58e77
leaq 0x2726fe(%rip), %rax    # 0x30d218
cmpl $0x0, (%rax)
jne 0x9ab5e
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ab35
leaq 0x1a443e(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
xorl %ecx, %ecx
testb %al, %al
setne %cl
leaq 0x272695(%rip), %rax    # 0x30d1d8
movl $0xffffff7f, %edx       # imm = 0xFFFFFF7F
andl (%rax), %edx
shll $0x7, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
leaq 0x272740(%rip), %rax    # 0x30d298
movl $0x3, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Bo()
void parse_moto_Bo()
{
int i;

   // gps/utc time offset
   log_packet_id("utc offset");
   i = (int) (s08) tsip_byte(); 

   if(!user_set_utc_ofs) {
      utc_offset = i;
      check_utc_ofs(8);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x89f15(%rip), %rdi     # 0x124a80
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ab86
leaq 0x1a43ed(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x272ba7(%rip), %rcx    # 0x30d734
cmpl $0x0, (%rcx)
jne 0x9abe2
movsbl %al, %ecx
leaq 0x272b8c(%rip), %rax    # 0x30d728
movl %ecx, (%rax)
leaq 0x272777(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0x9abe2
leaq 0x272963(%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 0x9abe2
leaq 0x17dc6e(%rip), %rcx    # 0x218844
movl $0x7d8, (%rcx)          # imm = 0x7D8
movl $0x8, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Ca()
void parse_moto_Ca()
{
u16 status;

   log_packet_id("self test results");
   status = tsip_word();     // 6 channel self test

   critical_alarms = 0;
   minor_alarms &= (~MINOR_EEPROM);

   if(status & 0x0280) critical_alarms |= CRIT_ROM;   // ROM
   if(status & 0x0500) critical_alarms |= CRIT_RAM;   // RAM
   if(status & 0x1040) critical_alarms |= CRIT_OCXO;  // 1KHz / DCXO
   if(status & 0xE03F) critical_alarms |= CRIT_FPGA;  // FPGA

   if(status & 0x0800) minor_alarms |= MINOR_EEPROM;  // EEPROM
   have_eeprom = 1;
   if(!have_critical_alarms) need_redraw = 7704;
   have_critical_alarms = 4;

   init_messages(24, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x89fd2(%rip), %rdi     # 0x124bc1
callq 0x58e77
callq 0x588f0
leaq 0x2725d0(%rip), %rsi    # 0x30d1d0
movl $0x0, (%rsi)
leaq 0x2725cb(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %edi
andl $0xfffffbff, %edi       # imm = 0xFFFFFBFF
movl %edi, (%rcx)
movzwl %ax, %eax
testl $0x280, %eax            # imm = 0x280
je 0x9ac29
movl $0x1, (%rsi)
testl $0x500, %eax            # imm = 0x500
je 0x9ac33
orb $0x2, (%rsi)
testl $0x1040, %eax           # imm = 0x1040
je 0x9ac3d
orb $0x10, (%rsi)
testl $0xe03f, %eax           # imm = 0xE03F
je 0x9ac47
orb $0x8, (%rsi)
btl $0xb, %eax
jae 0x9ac55
orl $0x400, %edx            # imm = 0x400
movl %edx, (%rcx)
leaq 0x272650(%rip), %rax    # 0x30d2ac
movl $0x1, (%rax)
leaq 0x27263f(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x9ac7b
leaq 0x17dbcf(%rip), %rcx    # 0x218844
movl $0x1e18, (%rcx)         # imm = 0x1E18
movl $0x4, (%rax)
movl $0x18, %edi
movl $0x1, %esi
popq %rbp
jmp 0x61765
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Fa()
void parse_moto_Fa()
{
u16 status;

   log_packet_id("self test results");
   status = tsip_word();     // 8 channel self test

   critical_alarms = 0;
   minor_alarms &= (~MINOR_EEPROM);

   if(status & 0x0600) critical_alarms |= CRIT_ROM;   // ROM
   if(status & 0x1800) critical_alarms |= CRIT_RAM;   // RAM
   if(status & 0x4100) critical_alarms |= CRIT_OCXO;  // 1KHz / DCXO
   if(status & 0x80FF) critical_alarms |= CRIT_FPGA;  // FPGA

   if(status & 0x2000) minor_alarms |= MINOR_EEPROM;  // EEPROM
   have_eeprom = 1;
   if(!have_critical_alarms) need_redraw = 7705;
   have_critical_alarms = 5;

   init_messages(25, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x89273(%rip), %rdi     # 0x124bc1
callq 0x58e77
callq 0x588f0
leaq 0x271871(%rip), %rsi    # 0x30d1d0
movl $0x0, (%rsi)
leaq 0x27186c(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %edi
andl $0xfffffbff, %edi       # imm = 0xFFFFFBFF
movl %edi, (%rcx)
movzwl %ax, %eax
testl $0x600, %eax            # imm = 0x600
je 0x9b988
movl $0x1, (%rsi)
testl $0x1800, %eax           # imm = 0x1800
je 0x9b992
orb $0x2, (%rsi)
testl $0x4100, %eax           # imm = 0x4100
je 0x9b99c
orb $0x10, (%rsi)
testl $0x80ff, %eax           # imm = 0x80FF
je 0x9b9a6
orb $0x8, (%rsi)
btl $0xd, %eax
jae 0x9b9b4
orl $0x400, %edx            # imm = 0x400
movl %edx, (%rcx)
leaq 0x2718f1(%rip), %rax    # 0x30d2ac
movl $0x1, (%rax)
leaq 0x2718e0(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x9b9da
leaq 0x17ce70(%rip), %rcx    # 0x218844
movl $0x1e19, (%rcx)         # imm = 0x1E19
movl $0x5, (%rax)
movl $0x19, %edi
movl $0x1, %esi
popq %rbp
jmp 0x61765
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Gc()
void parse_moto_Gc()
{
   log_packet_id("pps state");
   pps_enabled = pps_mode = tsip_byte();  // 0=off, 1=always on,  2=on when tracking, 3=on when traim met
   have_pps_enable = 7;
   have_pps_mode = 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x892fd(%rip), %rdi     # 0x124d45
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ba63
leaq 0x1a3510(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2722b8(%rip), %rcx    # 0x30dd22
movb %al, (%rcx)
leaq 0x2722ad(%rip), %rcx    # 0x30dd20
movb %al, (%rcx)
leaq 0x271860(%rip), %rax    # 0x30d2dc
movl $0x7, %ecx
movl %ecx, (%rax)
leaq 0x271862(%rip), %rax    # 0x30d2ec
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Ia()
void parse_moto_Ia()
{
u08 stat1;
u16 stat2;
u32 status;

   log_packet_id("alarms");

   stat1 = tsip_byte();
   stat2 = tsip_word();

   status = stat1;
   status <<= 16;
   status |= stat2; 

   critical_alarms = 0;
   minor_alarms &= (~MINOR_EEPROM);

   if(status & 0x020000) critical_alarms |= CRIT_ROM;  // ROM
   if(status & 0x040000) critical_alarms |= CRIT_RAM;  // RAM
   if(status & 0x012000) critical_alarms |= CRIT_OCXO; // 1KHz / DCXO
   if(status & 0x000FFF) critical_alarms |= CRIT_FPGA; // FPGA
   if(status & 0x305000) critical_alarms |= CRIT_FPGA; // FPGA

   if(status & 0x000000) minor_alarms |= MINOR_EEPROM; // EEPROM
   have_eeprom = 1;
   if(!have_critical_alarms) need_redraw = 7706;
   have_critical_alarms = 6;

   init_messages(26, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8880d(%rip), %rdi     # 0x124da4
callq 0x58e77
callq 0x587d1
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c5b4
leaq 0x1a29bf(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
movzbl %bl, %esi
movl %esi, %ecx
shll $0x10, %ecx
movzwl %ax, %edx
leaq 0x270c05(%rip), %rax    # 0x30d1d0
movl $0x0, (%rax)
leaq 0x270c00(%rip), %rdi    # 0x30d1d8
andb $-0x5, 0x1(%rdi)
testb $0x2, %sil
je 0x9c5e8
movl $0x1, (%rax)
orl %edx, %ecx
testb $0x4, %bl
je 0x9c5f2
orb $0x2, (%rax)
testl $0x12000, %ecx          # imm = 0x12000
je 0x9c5fd
orb $0x10, (%rax)
testl $0xfff, %edx            # imm = 0xFFF
je 0x9c608
orb $0x8, (%rax)
testl $0x305000, %ecx         # imm = 0x305000
je 0x9c613
orb $0x8, (%rax)
leaq 0x270c92(%rip), %rax    # 0x30d2ac
movl $0x1, (%rax)
leaq 0x270c81(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x9c639
leaq 0x17c211(%rip), %rcx    # 0x218844
movl $0x1e1a, (%rcx)         # imm = 0x1E1A
movl $0x6, (%rax)
movl $0x1a, %edi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61765
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_moto_Sz()
void parse_moto_Sz()
{
   // power up self test failed
   log_packet_id("power-up test results");

   tsip_byte();

   critical_alarms = CRIT_ALL;  // 0x1F;
   if(!have_critical_alarms) need_redraw = 7707;
   have_critical_alarms = 7;
   minor_alarms = MINOR_ALL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8874c(%rip), %rdi     # 0x124dab
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c67a
leaq 0x1a28f9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
leaq 0x270b4f(%rip), %rax    # 0x30d1d0
movl $0xffff, (%rax)         # imm = 0xFFFF
leaq 0x270c1a(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x9c6a0
leaq 0x17c1aa(%rip), %rcx    # 0x218844
movl $0x1e1b, (%rcx)         # imm = 0x1E1B
movl $0x7, (%rax)
leaq 0x270b2b(%rip), %rax    # 0x30d1d8
movl $0xffff, (%rax)         # imm = 0xFFFF
popq %rbp
retq