LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8b31a(%rip), %rdi     # 0x124b95
callq 0x58dc2
callq 0x58964
callq 0x588d2
callq 0x588d2
movl $0x1fc, %edi            # imm = 0x1FC
callq 0x9d78
leaq 0x181998(%rip), %rax    # 0x21b238
incl (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8b2f1(%rip), %rdi     # 0x124ba2
callq 0x58dc2
callq 0x58964
callq 0x588d2
callq 0x588d2
movl %eax, %ebx
notl %ebx
callq 0x58964
callq 0x58964
callq 0x58964
callq 0x58964
andl $0x1, %ebx
leaq 0x2739c5(%rip), %rax    # 0x30d2ac
movl %ebx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a28f(%rip), %rdi     # 0x123b8a
callq 0x58dc2
callq 0x58964
callq 0x588d2
popq %rbp
jmp 0x588d2
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8b28f(%rip), %rdi     # 0x124bb0
callq 0x58dc2
callq 0x58964
callq 0x588d2
movl $0x1, %r14d
leaq 0x2a44d3(%rip), %r15    # 0x33de10
leaq 0x1a562c(%rip), %rbx    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x99953
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x99944
movl $0x1, %r14d
leaq 0x2a44bd(%rip), %r15    # 0x33de30
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x99982
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x99973
movl $0x1, %r14d
leaq 0x2a44ae(%rip), %r15    # 0x33de50
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x999b1
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x999a2
movl $0x1, %r14d
leaq 0x2a449f(%rip), %r15    # 0x33de70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x999e0
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x999d1
movl $0x1, %r14d
leaq 0x2a4490(%rip), %r15    # 0x33de90
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x99a0f
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x15, %r14
jne 0x99a00
leaq 0x273f4b(%rip), %rax    # 0x30d974
orb $0xf, (%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_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 0x8b178(%rip), %rdi     # 0x124bbc
callq 0x58dc2
callq 0x58964
callq 0x588d2
callq 0x588d2
movw %ax, 0x2d30d3(%rip)     # 0x36cb32
callq 0x588d2
callq 0x588d2
callq 0x588d2
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
addss 0x84feb(%rip), %xmm0    # 0x11ea68
mulss 0x84fe7(%rip), %xmm0    # 0x11ea6c
leaq 0x273628(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x273965(%rip), %rax    # 0x30d3fc
movl $0x1, (%rax)
callq 0x58964
leaq 0x27363b(%rip), %rbx    # 0x30d0e4
movl %eax, (%rbx)
callq 0x588d2
callq 0x588d2
callq 0x58964
callq 0x58964
callq 0x588d2
movl $0x349, %eax            # imm = 0x349
addq 0xb6470(%rip), %rax     # 0x14ff40
movl (%rbx), %ecx
xorl %edx, %edx
btl %edx, %ecx
setae (%rax)
incq %rdx
addq $0x348, %rax            # imm = 0x348
cmpq $0x20, %rdx
jne 0x99ad4
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7467f(%rip), %rdi     # 0x10e184
callq 0x58dc2
callq 0x58964
callq 0x588d2
callq 0x588d2
movl %eax, %r15d
callq 0x588d2
movl %eax, %r12d
callq 0x588d2
movw %ax, -0x2a(%rbp)
callq 0x588d2
movl %eax, %r14d
orl %r12d, %r14d
callq 0x588d2
movl %eax, %r12d
callq 0x588d2
movl %eax, %ebx
movl %ebx, %r13d
orl %r15d, %r13d
orl %r12d, %r13d
callq 0x588d2
callq 0x588d2
callq 0x588d2
callq 0x588d2
leaq 0x273665(%rip), %rdi    # 0x30d1d0
movl $0x0, (%rdi)
leaq 0x273734(%rip), %rax    # 0x30d2ac
movl (%rax), %esi
leaq 0x273657(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %r8d
andl $0xfffffbff, %r8d       # imm = 0xFFFFFBFF
movl %r8d, (%rcx)
orw %r14w, %r13w
je 0x99bc7
xorl %r8d, %r8d
testw %r15w, %r15w
setne %r8b
leal 0x10(%r8), %r9d
testw %bx, %bx
cmovel %r8d, %r9d
leal 0x8(%r9), %r8d
testw %r12w, %r12w
cmovel %r9d, %r8d
leal 0x2(%r8), %r9d
testw %r14w, %r14w
cmovel %r8d, %r9d
movl %r9d, (%rdi)
cmpw $0x0, -0x2a(%rbp)
je 0x99be0
testl %esi, %esi
je 0x99be0
orl $0x400, %edx            # imm = 0x400
movl %edx, (%rcx)
movl $0x1, (%rax)
leaq 0x2736c1(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x99bf9
leaq 0x17ec51(%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_O3/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 0x99cfb
leaq 0x29d3fc(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x99cfb
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl $0x533, %edi            # imm = 0x533
movl $0x9, %esi
xorl %edx, %edx
callq 0x646e6
callq 0x64869
movw $0x0, -0x12(%rbp)
leaq 0x17eb7d(%rip), %r14    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%r14)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r14)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw %bx, -0x14(%rbp)
xorl %eax, %eax
cmpb $0x0, (%r14)
sete %al
movzbl -0x14(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r14)
setne %al
movzbl -0x14(%rbp,%rax), %edi
callq 0x590f7
callq 0x648ab
movl $0xfa, %edi
callq 0xafe8
testl %ebx, %ebx
movl $0x100, %eax            # imm = 0x100
movl $0x2, %ecx
cmoveq %rax, %rcx
leaq 0x17ec03(%rip), %rax    # 0x2188d0
movq %rcx, (%rax)
xorl %edi, %edi
callq 0x4b2af
leaq 0x181352(%rip), %rax    # 0x21b030
movl $0x7d6, (%rax)          # imm = 0x7D6
movl $0x3c, %edi
movl $0x1, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x616de
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x29d317(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x99d09
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 0x646e6
callq 0x64869
movw %bx, -0xa(%rbp)
leaq 0x17eaa2(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
callq 0x648ab
movl $0x64, %edi
callq 0xafe8
movl $0x45d, %edi            # imm = 0x45D
movl $0x6, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x646e6
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x648ab
// File: /workspace/github_cpp_makefile_star2_O3/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 0x29d28f(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x99d91
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 0x646e6
callq 0x64869
movw %bx, -0xa(%rbp)
leaq 0x17ea1a(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
callq 0x648ab
movl $0x64, %edi
callq 0xafe8
movl $0x3f4, %edi            # imm = 0x3F4
movl $0x6, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x646e6
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x648ab
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7f2b8
movzwl 0x2d2d07(%rip), %eax    # 0x36cb28
cmpl $0x41f, %eax            # imm = 0x41F
jle 0x99e5a
cmpl $0x455, %eax            # imm = 0x455
jle 0x99e8c
cmpl $0x46e, %eax            # imm = 0x46E
jg 0x99ec4
cmpl $0x456, %eax            # imm = 0x456
je 0x99ed9
cmpl $0x45d, %eax            # imm = 0x45D
jne 0x99f0f
callq 0x998f0
jmp 0x99f0f
cmpl $0x3f2, %eax            # imm = 0x3F2
jg 0x99ea8
cmpl $0x3e8, %eax            # imm = 0x3E8
je 0x99ef5
cmpl $0x3ea, %eax            # imm = 0x3EA
je 0x99f03
cmpl $0x3eb, %eax            # imm = 0x3EB
jne 0x99f0f
callq 0x98f4c
jmp 0x99f0f
cmpl $0x420, %eax            # imm = 0x420
je 0x99ee7
cmpl $0x44c, %eax            # imm = 0x44C
je 0x99eee
cmpl $0x454, %eax            # imm = 0x454
jne 0x99f0f
callq 0x9913b
jmp 0x99f0f
cmpl $0x3f3, %eax            # imm = 0x3F3
je 0x99efc
cmpl $0x3f4, %eax            # imm = 0x3F4
je 0x99f0a
cmpl $0x41f, %eax            # imm = 0x41F
jne 0x99f0f
callq 0x99280
jmp 0x99f0f
cmpl $0x46f, %eax            # imm = 0x46F
je 0x99ee0
cmpl $0x470, %eax            # imm = 0x470
jne 0x99f0f
callq 0x998a4
jmp 0x99f0f
callq 0x98d07
jmp 0x99f0f
callq 0x99870
jmp 0x99f0f
callq 0x993d9
jmp 0x99f0f
callq 0x99af0
jmp 0x99f0f
callq 0x99505
jmp 0x99f0f
callq 0x99910
jmp 0x99f0f
callq 0x98dcb
jmp 0x99f0f
callq 0x99a37
leaq 0x1a44aa(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
setne %al
leaq 0x1896dc(%rip), %rcx    # 0x223600
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x99f39
callq 0xafe8
leaq 0x1a5060(%rip), %rax    # 0x23efa0
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x58964
cvtsi2sd %eax, %xmm0
leaq 0x272e10(%rip), %rbx    # 0x30cfd0
movsd %xmm0, (%rbx)
callq 0x58964
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x272e01(%rip), %r14    # 0x30cfd8
movsd %xmm0, (%r14)
callq 0x58964
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd (%rbx), %xmm1
movsd 0x83fcc(%rip), %xmm2    # 0x11e1c0
divsd %xmm2, %xmm1
movsd 0x71628(%rip), %xmm3    # 0x10b828
mulsd %xmm3, %xmm1
movsd 0x71624(%rip), %xmm4    # 0x10b830
divsd %xmm4, %xmm1
movsd %xmm1, (%rbx)
movsd (%r14), %xmm1
divsd %xmm2, %xmm1
mulsd %xmm3, %xmm1
divsd %xmm4, %xmm1
movsd %xmm1, (%r14)
divsd 0x6ee2e(%rip), %xmm0    # 0x109060
leaq 0x272da7(%rip), %rax    # 0x30cfe0
movsd %xmm0, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x587be
testl %ebx, %ebx
je 0x9a35b
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a268
leaq 0x1a4d0b(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x273266(%rip), %rcx    # 0x30d4d8
movl %eax, (%rcx)
leaq 0x273295(%rip), %rcx    # 0x30d510
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a293
leaq 0x1a4ce0(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x273237(%rip), %rcx    # 0x30d4d4
movl %eax, (%rcx)
leaq 0x273266(%rip), %rcx    # 0x30d50c
movl %eax, (%rcx)
callq 0x588d2
movzwl %ax, %eax
leaq 0x273225(%rip), %rcx    # 0x30d4dc
movl %eax, (%rcx)
leaq 0x273254(%rip), %rcx    # 0x30d514
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a2d8
leaq 0x1a4c9b(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x2731ee(%rip), %rcx    # 0x30d4d0
movl %eax, (%rcx)
leaq 0x27321d(%rip), %rcx    # 0x30d508
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a303
leaq 0x1a4c70(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x2731bf(%rip), %rcx    # 0x30d4cc
movl %eax, (%rcx)
leaq 0x2731ee(%rip), %rcx    # 0x30d504
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a32e
leaq 0x1a4c45(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x273190(%rip), %rcx    # 0x30d4c8
movl %eax, (%rcx)
leaq 0x2731bf(%rip), %rcx    # 0x30d500
movl %eax, (%rcx)
leaq 0x273196(%rip), %rax    # 0x30d4e0
xorl %ecx, %ecx
movq %rcx, (%rax)
leaq 0x2731c2(%rip), %rax    # 0x30d518
movq %rcx, (%rax)
jmp 0x9a3c9
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a36c
leaq 0x1a4c07(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a382
leaq 0x1a4bf1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a39d
leaq 0x1a4bd6(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a3b3
leaq 0x1a4bc0(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a3c9
leaq 0x1a4baa(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x272d95(%rip), %rax    # 0x30d1d8
movl (%rax), %ecx
movl %ecx, %edx
andl $-0x21, %edx
movl %edx, (%rax)
leaq 0x180c99(%rip), %rdx    # 0x21b0ec
movl (%rdx), %edx
cmpq $0x3, %rdx
ja 0x9a494
leaq 0x85492(%rip), %rsi     # 0x11f8f4
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
leaq 0x272c5e(%rip), %rax    # 0x30d0d0
movb $0x4, (%rax)
jmp 0x9a494
leaq 0x272c52(%rip), %rax    # 0x30d0d0
movb $0x3, (%rax)
jmp 0x9a494
orl $0x20, %ecx
movl %ecx, (%rax)
jmp 0x9a494
leaq 0x272c3f(%rip), %rax    # 0x30d0d0
movb $0x7, (%rax)
leaq 0x272f72(%rip), %rax    # 0x30d40d
movb $0x4, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a5c3
leaq 0x1a49b0(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d2503(%rip)     # 0x36cacc
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a5df
leaq 0x1a4994(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d24e8(%rip)     # 0x36cacd
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a5fb
leaq 0x1a4978(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d24cd(%rip)     # 0x36cace
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a617
leaq 0x1a495c(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d24b2(%rip)     # 0x36cacf
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a633
leaq 0x1a4940(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d2497(%rip)     # 0x36cad0
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a64f
leaq 0x1a4924(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movb %al, 0x2d247c(%rip)     # 0x36cad1
movb $0x0, 0x2d2476(%rip)    # 0x36cad2
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a50d(%rip), %rdi     # 0x124bf4
callq 0x58dc2
callq 0x58964
cvtsi2sd %eax, %xmm0
leaq 0x2728e4(%rip), %rbx    # 0x30cfe0
movsd %xmm0, (%rbx)
callq 0x58964
movsd (%rbx), %xmm0
divsd 0x6e94f(%rip), %xmm0    # 0x109060
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x79b9b(%rip), %rdi     # 0x1142c2
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a742
leaq 0x1a4831(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
cvtsi2ss %eax, %xmm0
leaq 0x272964(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x272ca1(%rip), %rax    # 0x30d3fc
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a48f(%rip), %rdi     # 0x124bfd
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a789
leaq 0x1a47ea(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
movl %eax, %ecx
notl %ecx
leaq 0x27294b(%rip), %rdx    # 0x30d0e4
movl %ecx, (%rdx)
movl $0x349, %ecx            # imm = 0x349
addq 0xb5799(%rip), %rcx     # 0x14ff40
xorl %edx, %edx
btl %edx, %eax
setb (%rcx)
incq %rdx
addq $0x348, %rcx            # imm = 0x348
cmpq $0x20, %rdx
jne 0x9a7a9
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a43d(%rip), %rdi     # 0x124c09
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a7e7
leaq 0x1a478c(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2728b1(%rip), %rcx    # 0x30d09f
leal -0xa(%rax), %edx
xorl %esi, %esi
cmpb $0x5b, %dl
setb %sil
leaq 0x27288f(%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_O3/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 0x8a3f9(%rip), %rdi     # 0x124c17
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a839
leaq 0x1a473a(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2734e3(%rip), %rcx    # 0x30dd23
movb %al, (%rcx)
leaq 0x272a87(%rip), %rax    # 0x30d2d0
movl $0x5, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a3be(%rip), %rdi     # 0x124c2b
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a888
leaq 0x1a46eb(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movl %eax, %ecx
andb $0x1, %cl
leaq 0x272805(%rip), %rdx    # 0x30d099
movb %cl, (%rdx)
leaq 0x2727f3(%rip), %rcx    # 0x30d090
shrb %al
andb $0x1, %al
leaq 0x2727f2(%rip), %rdx    # 0x30d09a
movb %al, (%rdx)
orb $0x6, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a384(%rip), %rdi     # 0x124c3e
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a8d5
leaq 0x1a469e(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2727bc(%rip), %rcx    # 0x30d098
movb %al, (%rcx)
leaq 0x2727ab(%rip), %rax    # 0x30d090
orb $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a334(%rip), %rdi     # 0x124c51
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a938
leaq 0x1a463b(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x1807aa(%rip), %rcx    # 0x21b0ec
movl %eax, (%rcx)
popq %rbp
jmp 0x9a438
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a30d(%rip), %rdi     # 0x124c62
callq 0x58dc2
callq 0x58964
cvtsi2sd %eax, %xmm0
leaq 0x27346e(%rip), %rax    # 0x30ddd8
movsd %xmm0, (%rax)
leaq 0x272943(%rip), %rax    # 0x30d2b8
orb $0x1, (%rax)
popq %rbp
jmp 0x75326
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a2e3(%rip), %rdi     # 0x124c6c
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9a9a4
leaq 0x1a45cf(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
xorl %ecx, %ecx
testb %al, %al
setne %cl
leaq 0x272af2(%rip), %rax    # 0x30d4a4
movl (%rax), %edx
andl $-0x2, %edx
orl %ecx, %edx
leal (%rcx,%rcx,2), %ecx
movl %edx, (%rax)
leaq 0x272af8(%rip), %rax    # 0x30d4bd
movb %cl, (%rax)
leaq 0x2729fe(%rip), %rax    # 0x30d3cc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x2729f4(%rip), %rax    # 0x30d3d0
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a28d(%rip), %rdi     # 0x124c78
callq 0x58dc2
callq 0x58964
cvtsi2sd %eax, %xmm0
divsd 0x6e627(%rip), %xmm0    # 0x109028
leaq 0x2733c0(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x2728a1(%rip), %rax    # 0x30d2b4
movl $0x1, (%rax)
popq %rbp
jmp 0x75326
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8a106(%rip), %rdi     # 0x124b4b
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa60
leaq 0x1a4513(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movl $0xc, %ebx
callq 0x587be
movl %eax, %r14d
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aa7e
leaq 0x1a44f5(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
movw %ax, -0x2a(%rbp)
callq 0x587be
movl %eax, %r15d
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aaa0
leaq 0x1a44d3(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
movl %eax, %r13d
callq 0x587be
movl %eax, %r12d
cmpl $0x100, %eax            # imm = 0x100
jb 0x9aac1
leaq 0x1a44b2(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
movzbl %r14b, %r14d
testl %r14d, %r14d
je 0x9ab45
movzwl %r13w, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movzbl %r15b, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movl %r14d, %edi
callq 0x5ace1
movswl -0x2a(%rbp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movl %r14d, %ecx
imulq $0x348, %rcx, %rcx      # imm = 0x348
leaq 0x1a44ac(%rip), %rdx    # 0x23efb0
movsd %xmm0, 0x30(%rdx,%rcx)
movb %r12b, (%rdx,%rcx)
leaq 0x27277f(%rip), %rcx    # 0x30d294
movl $0x7, (%rcx)
testw %ax, %ax
je 0x9ab45
leaq 0x272819(%rip), %r15    # 0x30d340
cmpl $0x0, (%r15)
jne 0x9ab3a
leaq 0x17dd10(%rip), %rax    # 0x218844
movl $0x7f9, (%rax)          # imm = 0x7F9
movl %r14d, %edi
callq 0xdc1dd
orl %eax, (%r15)
decl %ebx
jne 0x9aa65
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_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 0x8a129(%rip), %rdi     # 0x124c92
callq 0x58dc2
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ab86
leaq 0x1a43ed(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ab9c
leaq 0x1a43d7(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9abb2
leaq 0x1a43c1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9abc8
leaq 0x1a43ab(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9abe3
leaq 0x1a4390(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9abf9
leaq 0x1a437a(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ac0f
leaq 0x1a4364(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ac25
leaq 0x1a434e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ac3b
leaq 0x1a4338(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ac51
leaq 0x1a4322(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ac67
leaq 0x1a430c(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ac7d
leaq 0x1a42f6(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
xorl %eax, %eax
testb %bl, %bl
sete %al
leaq 0x27254d(%rip), %rcx    # 0x30d1d8
movl $0xfffff7ff, %edx       # imm = 0xFFFFF7FF
andl (%rcx), %edx
shll $0xb, %eax
orl %edx, %eax
movl %eax, (%rcx)
leaq 0x272604(%rip), %rax    # 0x30d2a4
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_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 0x88ada(%rip), %rdi     # 0x123792
callq 0x58dc2
leaq 0x272554(%rip), %rax    # 0x30d218
cmpl $0x0, (%rax)
jne 0x9ad08
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9acdf
leaq 0x1a4294(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
xorl %ecx, %ecx
testb %al, %al
setne %cl
leaq 0x2724eb(%rip), %rax    # 0x30d1d8
movl $0xffffff7f, %edx       # imm = 0xFFFFFF7F
andl (%rax), %edx
shll $0x7, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
leaq 0x272596(%rip), %rax    # 0x30d298
movl $0x3, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x89e4b(%rip), %rdi     # 0x124b60
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9ad30
leaq 0x1a4243(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2729fd(%rip), %rcx    # 0x30d734
cmpl $0x0, (%rcx)
jne 0x9ad8c
movsbl %al, %ecx
leaq 0x2729e2(%rip), %rax    # 0x30d728
movl %ecx, (%rax)
leaq 0x2725cd(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0x9ad8c
leaq 0x2727b9(%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 0x9ad8c
leaq 0x17dac4(%rip), %rcx    # 0x218844
movl $0x7d8, (%rcx)          # imm = 0x7D8
movl $0x8, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x89f08(%rip), %rdi     # 0x124ca1
callq 0x58dc2
callq 0x588d2
leaq 0x272426(%rip), %rsi    # 0x30d1d0
movl $0x0, (%rsi)
leaq 0x272421(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %edi
andl $0xfffffbff, %edi       # imm = 0xFFFFFBFF
movl %edi, (%rcx)
movzwl %ax, %eax
testl $0xf7ff, %eax           # imm = 0xF7FF
je 0x9ae02
xorl %edi, %edi
testl $0x280, %eax            # imm = 0x280
setne %dil
leal 0x2(%rdi), %r8d
testl $0x500, %eax            # imm = 0x500
cmovel %edi, %r8d
leal 0x10(%r8), %edi
testl $0x1040, %eax           # imm = 0x1040
cmovel %r8d, %edi
leal 0x8(%rdi), %r8d
testl $0xe03f, %eax           # imm = 0xE03F
cmovel %edi, %r8d
movl %r8d, (%rsi)
btl $0xb, %eax
jae 0x9ae10
orl $0x400, %edx            # imm = 0x400
movl %edx, (%rcx)
leaq 0x272495(%rip), %rax    # 0x30d2ac
movl $0x1, (%rax)
leaq 0x272484(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x9ae36
leaq 0x17da14(%rip), %rcx    # 0x218844
movl $0x1e18, (%rcx)         # imm = 0x1E18
movl $0x4, (%rax)
movl $0x18, %edi
movl $0x1, %esi
popq %rbp
jmp 0x616de
// File: /workspace/github_cpp_makefile_star2_O3/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 0x89180(%rip), %rdi     # 0x124ca1
callq 0x58dc2
callq 0x588d2
leaq 0x27169e(%rip), %rsi    # 0x30d1d0
movl $0x0, (%rsi)
leaq 0x271699(%rip), %rcx    # 0x30d1d8
movl (%rcx), %edx
movl %edx, %edi
andl $0xfffffbff, %edi       # imm = 0xFFFFFBFF
movl %edi, (%rcx)
movzwl %ax, %eax
testl $0xdfff, %eax           # imm = 0xDFFF
je 0x9bb8a
xorl %edi, %edi
testl $0x600, %eax            # imm = 0x600
setne %dil
leal 0x2(%rdi), %r8d
testl $0x1800, %eax           # imm = 0x1800
cmovel %edi, %r8d
leal 0x10(%r8), %edi
testl $0x4100, %eax           # imm = 0x4100
cmovel %r8d, %edi
leal 0x8(%rdi), %r8d
testl $0x80ff, %eax           # imm = 0x80FF
cmovel %edi, %r8d
movl %r8d, (%rsi)
btl $0xd, %eax
jae 0x9bb98
orl $0x400, %edx            # imm = 0x400
movl %edx, (%rcx)
leaq 0x27170d(%rip), %rax    # 0x30d2ac
movl $0x1, (%rax)
leaq 0x2716fc(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x9bbbe
leaq 0x17cc8c(%rip), %rcx    # 0x218844
movl $0x1e19, (%rcx)         # imm = 0x1E19
movl $0x5, (%rax)
movl $0x19, %edi
movl $0x1, %esi
popq %rbp
jmp 0x616de
// File: /workspace/github_cpp_makefile_star2_O3/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 0x891f9(%rip), %rdi     # 0x124e25
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9bc47
leaq 0x1a332c(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
leaq 0x2720d4(%rip), %rcx    # 0x30dd22
movb %al, (%rcx)
leaq 0x2720c9(%rip), %rcx    # 0x30dd20
movb %al, (%rcx)
leaq 0x27167c(%rip), %rax    # 0x30d2dc
movl $0x7, %ecx
movl %ecx, (%rax)
leaq 0x27167e(%rip), %rax    # 0x30d2ec
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x88717(%rip), %rdi     # 0x124e84
callq 0x58dc2
callq 0x587be
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c78a
leaq 0x1a27e9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
movzbl %bl, %ecx
shll $0x10, %ecx
movzwl %ax, %edx
orl %edx, %ecx
leaq 0x270a2f(%rip), %rax    # 0x30d1d0
movl $0x0, (%rax)
leaq 0x270a2a(%rip), %rsi    # 0x30d1d8
andb $-0x5, 0x1(%rsi)
movl %ebx, %edi
andl $0x6, %edi
movl %ecx, %esi
andl $0x12000, %esi          # imm = 0x12000
orl %esi, %edi
andl $0xfff, %edx            # imm = 0xFFF
orl %edx, %edi
andl $0x305000, %ecx         # imm = 0x305000
orl %ecx, %edi
je 0x9c7f4
shrl %ebx
andl $0x3, %ebx
leal 0x10(%rbx), %edi
testl %esi, %esi
cmovel %ebx, %edi
leal 0x8(%rdi), %esi
testl %edx, %edx
cmovel %edi, %esi
movl %esi, %edx
orl $0x8, %edx
testl %ecx, %ecx
cmovel %esi, %edx
movl %edx, (%rax)
leaq 0x270ab1(%rip), %rax    # 0x30d2ac
movl $0x1, (%rax)
leaq 0x270aa0(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x9c81a
leaq 0x17c030(%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 0x616de
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8864b(%rip), %rdi     # 0x124e8b
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c85b
leaq 0x1a2718(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
leaq 0x27096e(%rip), %rax    # 0x30d1d0
movl $0xffff, (%rax)         # imm = 0xFFFF
leaq 0x270a39(%rip), %rax    # 0x30d2a8
cmpl $0x0, (%rax)
jne 0x9c881
leaq 0x17bfc9(%rip), %rcx    # 0x218844
movl $0x1e1b, (%rcx)         # imm = 0x1E1B
movl $0x7, (%rax)
leaq 0x27094a(%rip), %rax    # 0x30d1d8
movl $0xffff, (%rax)         # imm = 0xFFFF
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: skip_moto_msg()
void skip_moto_msg()
{
   log_packet_id("ignored message");
   while(moto_msg_len > 0) {
      tsip_byte();
      --moto_msg_len;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x885fe(%rip), %rdi     # 0x124ea1
callq 0x58dc2
cmpl $0x0, 0x2d0219(%rip)    # 0x36cac8
jle 0x9c8db
leaq 0x1a26b8(%rip), %rbx    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c8c7
orb $0x8, (%rbx)
movl 0x2d01fb(%rip), %eax    # 0x36cac8
leal -0x1(%rax), %ecx
movl %ecx, 0x2d01f2(%rip)    # 0x36cac8
cmpl $0x1, %eax
jg 0x9c8b8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_scpi_delim(char)
int get_scpi_delim(char delim)
{
char c;
int i;

   msg_field[0] = 0;
   if(nmea_msg[msg_col] == 0) return 0;  // at end-of-message

   i = 0;
   while(1) {   // get next field from the nmea message
      c = nmea_msg[msg_col];
      if(c == 0) {  // reached end-of-message
         break;
      }
      if(c == delim) {  // reached end-of-field
         ++msg_col;
         break;
      }

      if(i < ((int)sizeof(msg_field)-2)) {
         msg_field[i++] = c;
         msg_field[i] = 0;
         ++msg_col;
      }
   }

   return msg_field[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x29e2dd(%rip), %rax    # 0x33ba40
movb $0x0, (%rax)
leaq 0x29e4d7(%rip), %rcx    # 0x33bc44
movslq (%rcx), %rdx
leaq 0x29e0b9(%rip), %rsi    # 0x33b830
movb (%rsi,%rdx), %r9b
testb %r9b, %r9b
je 0x9d7b4
xorl %r8d, %r8d
cmpb %dil, %r9b
je 0x9d7b8
cmpl $0x1fe, %r8d            # imm = 0x1FE
jg 0x9d7a6
movslq %r8d, %r10
leaq 0x1(%r10), %r8
movb %r9b, (%rax,%r10)
movb $0x0, 0x1(%rax,%r10)
incl %edx
movl %edx, (%rcx)
movslq %edx, %r9
movb (%rsi,%r9), %r9b
testb %r9b, %r9b
jne 0x9d783
jmp 0x9d7bc
xorl %eax, %eax
jmp 0x9d7bf
incl %edx
movl %edx, (%rcx)
movsbl (%rax), %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_vis()
void parse_scpi_vis()
{
int prn;
int sat_count;

   log_packet_id("scpi vis");

   sat_count = 0;
   for(prn=0; prn<=MAX_PRN; prn++) {
      sat[prn].visible = 0;
   }

   msg_col = 0;
   while(get_msg_field()) {
      prn = atoi(msg_field);
      if((prn >= 1) && (prn <= MAX_PRN)) { 
         sat[prn].visible = (-1);
         ++sat_count;
         have_count = 40;
      }
   }

   config_sat_count(sat_count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x8726f(%rip), %rdi     # 0x124f25
callq 0x58dc2
movl $0x21c, %eax            # imm = 0x21C
leaq 0x1a12e9(%rip), %r15    # 0x23efb0
movl $0x0, (%r15,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd35c, %rax          # imm = 0xCD35C
jne 0x9dcc7
leaq 0x29df60(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x810b1
xorl %ebx, %ebx
testl %eax, %eax
je 0x9dd3e
leaq 0x29dd44(%rip), %r14    # 0x33ba40
leaq 0x26f615(%rip), %r12    # 0x30d318
movq %r14, %rdi
callq 0x95e0
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0x9dd35
movl %eax, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
movl $0xffffffff, 0x21c(%r15,%rax) # imm = 0xFFFFFFFF
incl %ebx
movl $0x28, (%r12)
callq 0x810b1
testl %eax, %eax
jne 0x9dd03
movl %ebx, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5e390