LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rt17_rawdata(int)
void parse_rt17_rawdata(int msg)
{
int subcode;
int page;
int reply;
int flags;

   subcode = tsip_byte();
   page = tsip_byte();
   reply = tsip_byte();
   flags = tsip_byte();

   if     (subcode == 0x00) parse_rt17_realtime(flags);
   else if(subcode == 0x01) parse_rt17_posn(flags);
   else if(subcode == 0x02) parse_rt17_event();
   else if(subcode == 0x05) parse_rt17_raw5();
   else if(subcode == 0x06) parse_rt17_raw6();
   else if(subcode == 0x07) parse_rt17_enh_posn();
   else {
      sprintf(out, "RAWDATA 0x%02X:%02X", msg, subcode);
      log_packet_id(out);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x51c47
movl %eax, %r14d
callq 0x51c47
callq 0x51c47
callq 0x51c47
movzbl %r14b, %ecx
cmpb $0x7, %cl
ja 0x7511c
leaq 0x93f4b(%rip), %rdx     # 0x109040
movslq (%rdx,%rcx,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movzbl %al, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x74d9d
popq %rbx
popq %r14
popq %rbp
jmp 0x743a4
popq %rbx
popq %r14
popq %rbp
jmp 0x7507d
leaq 0x2b10fd(%rip), %r14    # 0x326220
leaq 0x97bb3(%rip), %rsi     # 0x10ccdd
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x520bf
popq %rbx
popq %r14
popq %rbp
jmp 0x74271
popq %rbx
popq %r14
popq %rbp
jmp 0x7505b
popq %rbx
popq %r14
popq %rbp
jmp 0x7506c
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rt17_gsof(int)
void parse_rt17_gsof(int msg)
{
int reply;
int page;
int pages;

int subcode;
int len;

   reply = tsip_byte();
   page = tsip_byte();
   pages = tsip_byte();

   while(tsip_rptr < tsip_wptr) {  // parse the GSOF messages
      subcode = tsip_byte();
      len = tsip_byte();
      sprintf(out, "GSOF msg 0x%02X:%d", subcode, len);
      log_packet_id(out);
      // decode GSOF packets here
while(len--) tsip_byte();  // toots - skip payload bytes for now
break;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x51c47
callq 0x51c47
callq 0x51c47
leaq 0x2ad0d7(%rip), %rax    # 0x322254
movzwl (%rax), %eax
leaq 0x2ad0cb(%rip), %rcx    # 0x322252
cmpw (%rcx), %ax
jae 0x751ce
callq 0x51c47
movzbl %al, %r14d
callq 0x51c47
movzbl %al, %ebx
leaq 0x2b107c(%rip), %r15    # 0x326220
leaq 0x97b46(%rip), %rsi     # 0x10ccf1
movq %r15, %rdi
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x9060
movq %r15, %rdi
callq 0x520bf
subl $0x1, %ebx
jb 0x751ce
callq 0x51c47
jmp 0x751c2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: is_numeric(char*)
int is_numeric(char *field)
{
unsigned i;

   // returns true if field starts with + - . or digit

   if(field[0] == 0) return 0;

   for(i=0; i<strlen(field); i++) {  // skip leading whitespace
      if(field[i] == ' ') ;
      else if(field[i] == '\t') ;
      else {  // first non-whitespace seen
         if(field[i] == '+') return 1;
         if(field[i] == '-') return 2;
         if(field[i] == '.') return 3;
         if((field[i] >= '0') && (field[i] <= '9')) return 4;
         if((field[i] == '.') && (field[i+1] >= '0') && (field[i+1] <= '9')) return 5;
         break;
      }
   }

   return 0;  // field is not a number
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
cmpb $0x0, (%rdi)
je 0x7574b
movq %rdi, %r14
callq 0x9120
pushq $0x1
popq %rcx
leal -0x1(%rcx), %edx
cmpq %rdx, %rax
jbe 0x7574b
movzbl (%r14,%rdx), %edx
cmpl $0x9, %edx
je 0x75722
cmpl $0x20, %edx
jne 0x75726
incl %ecx
jmp 0x7570b
cmpl $0x2b, %edx
je 0x7573d
cmpl $0x2d, %edx
je 0x75739
cmpl $0x2e, %edx
jne 0x75741
pushq $0x3
jmp 0x7574a
pushq $0x2
jmp 0x7574a
pushq $0x1
jmp 0x7574a
leal -0x30(%rdx), %eax
cmpb $0xa, %al
jae 0x75752
pushq $0x4
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
cmpb $0x2e, %dl
jne 0x7574b
movl %ecx, %eax
movb (%r14,%rax), %al
addb $-0x30, %al
cmpb $0xa, %al
jae 0x7574b
pushq $0x5
jmp 0x7574a
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_lat()
void get_nmea_lat()
{
double deg;

   if(get_msg_field()) {
      deg = atof(msg_field);
      lat = (double) (int) (deg / 100.0);
      deg = deg - (lat * 100.0);
      deg /= 60.0;
      lat += deg;
      lat *= (PI / 180.0);
   }

   if(get_msg_field()) {
      if(msg_field[0] == 'S') lat = 0.0 - lat;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x75767
testl %eax, %eax
je 0x75dae
leaq 0x2afcd6(%rip), %rdi    # 0x325a40
callq 0x9470
movsd 0x7d2e9(%rip), %xmm1    # 0xf3060
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
divsd 0x7d271(%rip), %xmm0    # 0xf3008
addsd %xmm2, %xmm0
mulsd 0x7fbe5(%rip), %xmm0    # 0xf5988
leaq 0x281226(%rip), %rax    # 0x2f6fd0
movsd %xmm0, (%rax)
callq 0x75767
testl %eax, %eax
je 0x75dd6
leaq 0x2afc82(%rip), %rax    # 0x325a40
cmpb $0x53, (%rax)
jne 0x75dd6
leaq 0x281206(%rip), %rax    # 0x2f6fd0
xorpd %xmm0, %xmm0
subsd (%rax), %xmm0
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_lon()
void get_nmea_lon()
{
double deg;

   if(get_msg_field()) {
      deg = atof(msg_field);
      lon = (double) (int) (deg / 100.0);
      deg = deg - (lon * 100.0);
      deg /= 60.0;
      lon += deg;
      lon *= (PI / 180.0);
   }

   if(get_msg_field()) {
      if(msg_field[0] == 'W') lon = 0.0 - lon;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x75767
testl %eax, %eax
je 0x75e30
leaq 0x2afc54(%rip), %rdi    # 0x325a40
callq 0x9470
movsd 0x7d267(%rip), %xmm1    # 0xf3060
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
divsd 0x7d1ef(%rip), %xmm0    # 0xf3008
addsd %xmm2, %xmm0
mulsd 0x7fb63(%rip), %xmm0    # 0xf5988
leaq 0x2811ac(%rip), %rax    # 0x2f6fd8
movsd %xmm0, (%rax)
callq 0x75767
testl %eax, %eax
je 0x75e58
leaq 0x2afc00(%rip), %rax    # 0x325a40
cmpb $0x57, (%rax)
jne 0x75e58
leaq 0x28118c(%rip), %rax    # 0x2f6fd8
xorpd %xmm0, %xmm0
subsd (%rax), %xmm0
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_alt()
void get_nmea_alt()
{
   if(get_msg_field()) {  //altitude
      alt = atoi(msg_field);
      get_msg_field();    // meters or feet
      if(msg_field[0] == 'F') alt = alt * FEET_PER_METER;
   }
   else get_msg_field();  // meters or feet
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
callq 0x75767
testl %eax, %eax
je 0x75eaa
leaq 0x2afbcf(%rip), %rbx    # 0x325a40
movq %rbx, %rdi
callq 0x95e0
cvtsi2sd %eax, %xmm0
leaq 0x28115c(%rip), %r14    # 0x2f6fe0
movsd %xmm0, (%r14)
callq 0x75767
cmpb $0x46, (%rbx)
jne 0x75ea5
movsd (%r14), %xmm0
mulsd 0x7fa80(%rip), %xmm0    # 0xf5920
movsd %xmm0, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
popq %rbx
popq %r14
popq %rbp
jmp 0x75767
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_time()
void get_nmea_time()
{
double ftime;
int time;

   // get a time field from a NMEA message

   if(rcvr_type == BRANDY_RCVR) {  // we use the brandywine time and date message
      get_msg_field();
   }
   else if(get_msg_field()) {  // time
      ftime = atof(msg_field);  // time field can be floating point
      time = (int) ftime;
      pri_hours = hours = (time / 10000);
      pri_minutes = minutes = ((time / 100) % 100);
      pri_seconds = seconds = ((time / 1) % 100);
      pri_frac = raw_frac = ftime - (double) time;
//vvvv   time_flags |= TFLAGS_UTC;  // UTC based time
      if(timing_mode == TMODE_GPS) {  // convert utc time to gps time
         utc_to_gps();
      }
      time_flags &= (~TFLAGS_INVALID);
   }
   else if(1) { // empty time field, use system clock and flag as invalid time
      get_clock_time();
      hours = pri_hours = clk_hours;
      minutes = pri_minutes = clk_minutes;
      seconds = pri_seconds = clk_seconds;
      pri_frac = raw_frac = clk_frac;
      time_flags |= (~TFLAGS_INVALID);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x18ca10(%rip), %rax    # 0x2028d0
movq (%rax), %rbx
callq 0x75767
cmpq $0x40000, %rbx          # imm = 0x40000
je 0x7600a
testl %eax, %eax
je 0x75f7e
leaq 0x2afb5c(%rip), %rdi    # 0x325a40
callq 0x9470
cvttsd2si %xmm0, %ecx
movl $0x2710, %esi           # imm = 0x2710
movl %ecx, %eax
cltd
idivl %esi
leaq 0x2815d2(%rip), %rdx    # 0x2f74d0
movl %eax, (%rdx)
leaq 0x281601(%rip), %rdx    # 0x2f7508
movl %eax, (%rdx)
pushq $0x64
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
movl %edx, %ecx
cltd
idivl %esi
leaq 0x2815af(%rip), %rax    # 0x2f74cc
movl %edx, (%rax)
leaq 0x2815de(%rip), %rax    # 0x2f7504
movl %edx, (%rax)
leaq 0x281599(%rip), %rax    # 0x2f74c8
movl %ecx, (%rax)
leaq 0x2815c8(%rip), %rax    # 0x2f7500
movl %ecx, (%rax)
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
leaq 0x281593(%rip), %rax    # 0x2f74e0
movsd %xmm0, (%rax)
leaq 0x2815c0(%rip), %rax    # 0x2f7518
movsd %xmm0, (%rax)
leaq 0x28155a(%rip), %rax    # 0x2f74bd
cmpb $0x0, (%rax)
jne 0x75f6d
callq 0x554d3
leaq 0x281530(%rip), %rax    # 0x2f74a4
movl (%rax), %eax
andl $-0x5, %eax
jmp 0x76001
callq 0xa386
leaq 0x281742(%rip), %rax    # 0x2f76cc
movl (%rax), %eax
leaq 0x281575(%rip), %rcx    # 0x2f7508
movl %eax, (%rcx)
leaq 0x281534(%rip), %rcx    # 0x2f74d0
movl %eax, (%rcx)
leaq 0x28172b(%rip), %rax    # 0x2f76d0
movl (%rax), %eax
leaq 0x281556(%rip), %rcx    # 0x2f7504
movl %eax, (%rcx)
leaq 0x281515(%rip), %rcx    # 0x2f74cc
movl %eax, (%rcx)
leaq 0x281714(%rip), %rax    # 0x2f76d4
movl (%rax), %eax
leaq 0x281537(%rip), %rcx    # 0x2f7500
movl %eax, (%rcx)
leaq 0x2814f6(%rip), %rcx    # 0x2f74c8
movl %eax, (%rcx)
leaq 0x2816fd(%rip), %rax    # 0x2f76d8
movsd (%rax), %xmm0
leaq 0x2814fa(%rip), %rax    # 0x2f74e0
movsd %xmm0, (%rax)
leaq 0x281527(%rip), %rax    # 0x2f7518
movsd %xmm0, (%rax)
leaq 0x2814a8(%rip), %rax    # 0x2f74a4
movl (%rax), %eax
orl $-0x5, %eax
leaq 0x28149c(%rip), %rcx    # 0x2f74a4
movl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_nmea_date()
void get_nmea_date()
{
int date;

   // get a date field from a NMEA message

   if(rcvr_type == BRANDY_RCVR) {  // we use the brandywine time and date message
      get_msg_field();
   }
   else if(get_msg_field()) {
      date = atoi(msg_field);
      have_nmea_date = 0x07;     // we have day/month/year

      pri_day = day = (date / 10000);
      pri_month = month = ((date / 100) % 100);
      pri_year = ((date / 1) % 100);
      if(pri_year > TRUNC_YEAR) pri_year += 1900;
      else                      pri_year += 2000;
      year = pri_year;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x18c8b2(%rip), %rax    # 0x2028d0
cmpq $0x40000, (%rax)        # imm = 0x40000
sete %bl
callq 0x75767
testl %eax, %eax
sete %al
orb %bl, %al
jne 0x760b0
leaq 0x2afa03(%rip), %rdi    # 0x325a40
callq 0x95e0
movl %eax, %ecx
leaq 0x18f09d(%rip), %rax    # 0x2050e8
movl $0x7, (%rax)
movl $0x2710, %esi           # imm = 0x2710
movl %ecx, %eax
cltd
idivl %esi
leaq 0x281472(%rip), %rdx    # 0x2f74d4
movl %eax, (%rdx)
leaq 0x2814a1(%rip), %rdx    # 0x2f750c
movl %eax, (%rdx)
pushq $0x64
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
movl %edx, %ecx
cltd
idivl %esi
leaq 0x281457(%rip), %rax    # 0x2f74d8
movl %edx, (%rax)
leaq 0x281486(%rip), %rax    # 0x2f7510
movl %edx, (%rax)
leal 0x7d0(%rcx), %eax
leal 0x76c(%rcx), %edx
cmpl $0x51, %ecx
cmovll %eax, %edx
leaq 0x28146f(%rip), %rax    # 0x2f7514
movl %edx, (%rax)
leaq 0x28142e(%rip), %rax    # 0x2f74dc
movl %edx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: check_nmea_date()
void check_nmea_date()
{
   // fake a date from the system clock if none seen from the GPS
   if(rcvr_type == BRANDY_RCVR) return;

   if(have_nmea_date != 0x07) {  // SV6_TYPE - has no date messages, use the system clock
      get_clock_time();
      year = pri_year = clk_year;
      month = pri_month = clk_month;
      day = pri_day = clk_day;
   }
}

// Assembly:
leaq 0x18c812(%rip), %rax    # 0x2028d0
cmpq $0x40000, (%rax)        # imm = 0x40000
je 0x7612e
leaq 0x18f01a(%rip), %rax    # 0x2050e8
cmpl $0x7, (%rax)
je 0x7612e
pushq %rbp
movq %rsp, %rbp
callq 0xa386
leaq 0x2815e5(%rip), %rax    # 0x2f76c8
movl (%rax), %eax
leaq 0x281428(%rip), %rcx    # 0x2f7514
movl %eax, (%rcx)
leaq 0x2813e7(%rip), %rcx    # 0x2f74dc
movl %eax, (%rcx)
leaq 0x2815c2(%rip), %rax    # 0x2f76c0
movl (%rax), %eax
leaq 0x281409(%rip), %rcx    # 0x2f7510
movl %eax, (%rcx)
leaq 0x2813c8(%rip), %rcx    # 0x2f74d8
movl %eax, (%rcx)
leaq 0x2815ab(%rip), %rax    # 0x2f76c4
movl (%rax), %eax
leaq 0x2813ea(%rip), %rcx    # 0x2f750c
movl %eax, (%rcx)
leaq 0x2813a9(%rip), %rcx    # 0x2f74d4
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpgll(int)
void parse_gpgll(int system)
{
double old_lat, old_lon,old_alt;

   old_lat = lat;
   old_lon = lon;
   old_alt = alt;

   get_nmea_lat();
   get_nmea_lon();
   get_nmea_alt();

   if(get_msg_field()) {  // status: A=valid  V=invalid
      if(msg_field[0] == 'V') {
         lat = old_lat;
         lon = old_lon;
         alt = old_alt;
      }
   }
   if(get_msg_field()) {  // mode: A=autonomus  D=differential  N=invalid
      if(msg_field[0] == 'N') {
         lat = old_lat;
         lon = old_lon;
         alt = old_alt;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x280e8b(%rip), %rbx    # 0x2f6fd0
movsd (%rbx), %xmm0
movsd %xmm0, -0x38(%rbp)
leaq 0x280e83(%rip), %r14    # 0x2f6fd8
movsd (%r14), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x280e7a(%rip), %r15    # 0x2f6fe0
movsd (%r15), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x75d56
callq 0x75dd8
callq 0x75e5a
callq 0x75767
leaq 0x2af8b5(%rip), %r12    # 0x325a40
testl %eax, %eax
je 0x761b3
cmpb $0x56, (%r12)
jne 0x761b3
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%rbx)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r14)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%r15)
callq 0x75767
testl %eax, %eax
je 0x761e0
cmpb $0x4e, (%r12)
jne 0x761e0
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%rbx)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%r14)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%r15)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gprmc(int)
void parse_gprmc(int system)
{
   if((system & system_mask) == 0) return;

   last_was_gsv = 0;
   have_gprmc = system;

   if(TIME_FILTER && have_gpzda) get_msg_field();
   else                          get_nmea_time();

   get_msg_field();  // active flag A=good  V=invalid fix

   if(msg_field[0] == 'A') {
      get_nmea_lat();
      get_nmea_lon();

      if(get_msg_field()) {  // speed (km/hr)
         speed = atof(msg_field) * 0.514444;
         have_speed = 4;
      }
      if(get_msg_field()) {  // course angle
         heading = atof(msg_field);
         have_heading = 4;
      }

      if(rcvr_type == BRANDY_RCVR) return;  // Brandywine gets date/time from a different message

      if(TIME_FILTER && have_gpzda && (have_nmea_date == 0x07)) get_msg_field();
      else get_nmea_date();
   }

   check_nmea_date();

   if(TIME_FILTER && have_gpzda) ;
   else drive_nmea_screen(system, NMEA_RMC);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xe4604(%rip), %rax     # 0x15ac70
testl %edi, (%rax)
je 0x76754
andl $0x0, 0x2e57a9(%rip)    # 0x35be24
leaq 0x18ea56(%rip), %rax    # 0x2050d8
movl %edi, (%rax)
leaq 0x18ea55(%rip), %rbx    # 0x2050e0
cmpl $0x0, (%rbx)
je 0x76697
callq 0x75767
jmp 0x7669c
callq 0x75eb3
callq 0x75767
leaq 0x2af398(%rip), %rax    # 0x325a40
cmpb $0x41, (%rax)
jne 0x7674a
callq 0x75d56
callq 0x75dd8
callq 0x75767
testl %eax, %eax
je 0x766f0
leaq 0x2af375(%rip), %rdi    # 0x325a40
callq 0x9470
mulsd 0x91ad0(%rip), %xmm0    # 0x1081a8
leaq 0x280941(%rip), %rax    # 0x2f7020
movsd %xmm0, (%rax)
leaq 0x280c4e(%rip), %rax    # 0x2f7338
movl $0x4, (%rax)
callq 0x75767
testl %eax, %eax
je 0x7671d
leaq 0x2af340(%rip), %rdi    # 0x325a40
callq 0x9470
leaq 0x28091c(%rip), %rax    # 0x2f7028
movsd %xmm0, (%rax)
leaq 0x280c1d(%rip), %rax    # 0x2f7334
movl $0x4, (%rax)
leaq 0x18c1ac(%rip), %rax    # 0x2028d0
cmpq $0x40000, (%rax)        # imm = 0x40000
je 0x76754
cmpl $0x0, (%rbx)
je 0x76745
leaq 0x18e9af(%rip), %rax    # 0x2050e8
cmpl $0x7, (%rax)
jne 0x76745
callq 0x75767
jmp 0x7674a
callq 0x76011
callq 0x760b7
cmpl $0x0, (%rbx)
je 0x7675b
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7650a
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpgga(int)
void parse_gpgga(int system)
{
int fix;

   if((system & system_mask) == 0) return;

   last_was_gsv = 0;
   if((rcvr_type == BRANDY_RCVR) && (have_gpgga = 0)) {
      new_queue(RESET_ALL_QUEUES, 1504);
   }
   have_gpgga = system;

   if     (TIME_FILTER && have_gpzda) get_msg_field();
   else if(TIME_FILTER && have_gprmc) get_msg_field();
   else                               get_nmea_time();  // was get_msg_field();

   get_nmea_lat();
   get_nmea_lon();

   get_msg_field();  // fix status   zzzzz - verify fix is good
   if(msg_field[0]) fix = atoi(msg_field);
   else             fix = 0;

   if(get_msg_field()) { // sat count
      sat_count = atoi(msg_field);
      have_count = 3;
   }

   if(get_msg_field()) { // hdop
      hdop = (float) atof(msg_field);
      have_dops |= HDOP;
   }

   get_nmea_alt();

   get_msg_field();  // geiod height
   get_msg_field();  // dgps time
   get_msg_field();  // dgps station

   config_sat_count(sat_count);

   check_nmea_date();

   if     (TIME_FILTER && have_gpzda) ;
   else if(TIME_FILTER && have_gprmc) ;
   else if(rcvr_type == BRANDY_RCVR) {
      return;  // Brandywine gets date/time from a different message
   }
   else drive_nmea_screen(system, NMEA_GGA);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xe44fd(%rip), %rax     # 0x15ac70
testl %edi, (%rax)
je 0x7686b
andl $0x0, 0x2e56a2(%rip)    # 0x35be24
leaq 0x18e94b(%rip), %rax    # 0x2050d4
movl %edi, (%rax)
leaq 0x18e94e(%rip), %rbx    # 0x2050e0
cmpl $0x0, (%rbx)
jne 0x767a7
leaq 0x18e93a(%rip), %rax    # 0x2050d8
cmpl $0x0, (%rax)
je 0x76872
callq 0x75767
callq 0x75d56
callq 0x75dd8
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x767e6
leaq 0x2af275(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x1b2735(%rip), %rcx    # 0x228f0c
movl %eax, (%rcx)
leaq 0x280b38(%rip), %rax    # 0x2f7318
movl $0x3, (%rax)
callq 0x75767
testl %eax, %eax
je 0x76818
leaq 0x2af24a(%rip), %rdi    # 0x325a40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x196ce6(%rip), %rax    # 0x20d4f0
movsd %xmm0, (%rax)
leaq 0x196ccf(%rip), %rax    # 0x20d4e4
orb $0x2, (%rax)
callq 0x75e5a
callq 0x75767
callq 0x75767
callq 0x75767
leaq 0x1b26d9(%rip), %rax    # 0x228f0c
movl (%rax), %edi
callq 0x56d93
callq 0x760b7
cmpl $0x0, (%rbx)
jne 0x7686b
leaq 0x18e88d(%rip), %rax    # 0x2050d8
cmpl $0x0, (%rax)
jne 0x7686b
leaq 0x18c079(%rip), %rax    # 0x2028d0
cmpq $0x40000, (%rax)        # imm = 0x40000
je 0x7686b
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7650a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x75eb3
jmp 0x767ac
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: config_jackson()
void config_jackson()
{
   // proprietary Jackson Labs STATUS message seen... config for Jack Labs LTE-Lite 

   if(lte_lite) return;  // we are already congigured

   lte_lite = 1;
   have_info |= ALL_ID_INFO;

if(1 || (rcvr_type != VENUS_RCVR)) {
   rcvr_type = VENUS_RCVR;
   nmea_type = VENUS_NMEA;
   lte_lite = 1;
   config_rcvr_type(0);
   need_msg_init = 2005;
   lte_lite = 1;
}

   plot[DAC].plot_id = "DAC";    // setup plots
   plot[DAC].units = "%";
   plot[DAC].scale_factor = 1.0;
   plot[DAC].ref_scale = 1.0;
   if(user_set_dac_plot == 0) plot[DAC].show_plot = 1;

   plot[OSC].units = " ns";
   plot[OSC].ref_scale = 1.0F;
   ppt_string = " ns";
   ppb_string = " ns";
   if(user_set_osc_float == 0) plot[OSC].float_center = 1;
   if(user_set_osc_plot == 0) plot[OSC].show_plot = 1;

   if(user_set_pps_plot == 0) plot[PPS].show_plot = 1;
   if(user_set_pps_float == 0) plot[PPS].float_center = 1;

// if(user_set_dac_float == 0) plot[DAC].float_center = 1;
   new_queue(RESET_ALL_QUEUES, 135);  // flush old data
   need_redraw = 6386;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x18e2c6(%rip), %rbx    # 0x204fd0
cmpl $0x0, (%rbx)
jne 0x76e3c
leaq 0x280c5a(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
leaq 0x18bbac(%rip), %rax    # 0x2028d0
movq $0x80, (%rax)
leaq 0x18e2b2(%rip), %rax    # 0x204fe4
movl $0x56, (%rax)
pushq $0x1
popq %r14
movl %r14d, (%rbx)
xorl %edi, %edi
callq 0x473fa
leaq 0x18e2e3(%rip), %rax    # 0x205030
movl $0x7d5, (%rax)          # imm = 0x7D5
movl %r14d, (%rbx)
leaq 0x9a79d(%rip), %rcx     # 0x1114fa
leaq 0xd0fcc(%rip), %rax     # 0x147d30
movq %rcx, 0x1d0(%rax)
leaq 0x95c19(%rip), %rcx     # 0x10c98b
movq %rcx, 0x1d8(%rax)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x208(%rax)
movq %rcx, 0x1e0(%rax)
leaq 0x2810c9(%rip), %rdx    # 0x2f7e61
cmpb $0x0, (%rdx)
jne 0x76da7
movl $0x1, 0x1e8(%rax)
leaq 0x8891b(%rip), %rdx     # 0xff6c9
movq %rdx, 0xf0(%rax)
movq %rcx, 0xf8(%rax)
leaq 0x2b285d(%rip), %rcx    # 0x329620
movq %rdx, (%rcx)
leaq 0x2b284b(%rip), %rcx    # 0x329618
movq %rdx, (%rcx)
leaq 0x281086(%rip), %rcx    # 0x2f7e5d
cmpb $0x0, (%rcx)
jne 0x76de6
movl $0x1, 0x104(%rax)
leaq 0x281073(%rip), %rcx    # 0x2f7e60
cmpb $0x0, (%rcx)
jne 0x76dfc
movl $0x1, 0x100(%rax)
leaq 0x28105c(%rip), %rcx    # 0x2f7e5f
cmpb $0x0, (%rcx)
jne 0x76e0f
movl $0x1, 0x18(%rax)
leaq 0x281046(%rip), %rcx    # 0x2f7e5c
cmpb $0x0, (%rcx)
jne 0x76e22
movl $0x1, 0x1c(%rax)
pushq $0x7
popq %rdi
movl $0x87, %esi
callq 0x10a99
leaq 0x18ba0e(%rip), %rax    # 0x202844
movl $0x18f2, (%rax)         # imm = 0x18F2
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: config_venus_timing()
void config_venus_timing()
{
   if((saw_timing_msg == 0) || (have_sawtooth == 0)) {
      if(rcvr_type != VENUS_RCVR) {
         rcvr_type = VENUS_RCVR;
         config_rcvr_type(0);
         need_msg_init = 2004;
      }
      else {
         config_rcvr_plots();
         config_msg_ofs();
      }

      plot[ONE].show_plot = 0;
      plot[TWO].show_plot = 0;
      plot[THREE].show_plot = 0;
      plot[SIX].show_plot = 0;
      if(user_set_dac_plot == 0) plot[DAC].show_plot = 1;
   }
}

// Assembly:
leaq 0x280412(%rip), %rax    # 0x2f7428
cmpl $0x0, (%rax)
je 0x77028
leaq 0x2803a2(%rip), %rax    # 0x2f73c4
cmpl $0x0, (%rax)
je 0x77028
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x18b89d(%rip), %rax    # 0x2028d0
cmpq $0x80, (%rax)
jne 0x77048
callq 0x43cec
callq 0x43898
jmp 0x77063
movq $0x80, (%rax)
xorl %edi, %edi
callq 0x473fa
leaq 0x18dfd3(%rip), %rax    # 0x205030
movl $0x7d4, (%rax)          # imm = 0x7D4
leaq 0xd0cc6(%rip), %rax     # 0x147d30
andl $0x0, 0x3b8(%rax)
andl $0x0, 0x4a0(%rax)
andl $0x0, 0x588(%rax)
andl $0x0, 0x840(%rax)
leaq 0x280dd4(%rip), %rcx    # 0x2f7e61
cmpb $0x0, (%rcx)
popq %rbp
jne 0x77027
movl $0x1, 0x1e8(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_sawtooth()
void parse_venus_sawtooth()
{
int mode;
int survey_len;
float sawtooth;
float sdev1;
float sdev2;

  have_venus_timing |= 0x01;
  config_venus_timing();
  saw_timing_msg |= 0x08;

  if(get_msg_field()) {
     mode = atoi(msg_field);

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

  if(get_msg_field()) {
     survey_len = atoi(msg_field);
  }

  if(get_msg_field()) {
     sawtooth = (float) atof(msg_field);
     have_sawtooth = 1;

     if(lte_lite) ;   // we show dac voltage instead of sawtooth
     else {
        dac_voltage = sawtooth;
     }
  }

  if(get_msg_field()) {
     sdev1 = (float) atof(msg_field);
  }

  if(get_msg_field()) {
     sdev2 = (float) atof(msg_field);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2b0d4f(%rip), %rax    # 0x327df8
orb $0x1, (%rax)
callq 0x7700f
leaq 0x280370(%rip), %rax    # 0x2f7428
orb $0x8, (%rax)
callq 0x75767
testl %eax, %eax
je 0x7712b
leaq 0x2ae975(%rip), %rdi    # 0x325a40
callq 0x95e0
cmpl $0x2, %eax
je 0x77100
cmpl $0x1, %eax
je 0x770ee
testl %eax, %eax
jne 0x7712b
leaq 0x2800f3(%rip), %rax    # 0x2f71d8
movl (%rax), %eax
andl $-0x21, %eax
movb $0x4, %cl
jmp 0x770fc
leaq 0x2800e3(%rip), %rax    # 0x2f71d8
movl (%rax), %eax
orl $0x20, %eax
movb $0xb, %cl
xorl %edx, %edx
jmp 0x77110
leaq 0x2800d1(%rip), %rax    # 0x2f71d8
movl (%rax), %eax
andl $-0x21, %eax
movb $0x7, %cl
movb $0x1, %dl
leaq 0x2800c1(%rip), %rsi    # 0x2f71d8
movl %eax, (%rsi)
leaq 0x27ffb3(%rip), %rax    # 0x2f70d3
movb %dl, (%rax)
leaq 0x27ffa7(%rip), %rax    # 0x2f70d0
movb %cl, (%rax)
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x77171
leaq 0x2ae900(%rip), %rdi    # 0x325a40
callq 0x9470
leaq 0x280278(%rip), %rax    # 0x2f73c4
movl $0x1, (%rax)
leaq 0x18de77(%rip), %rax    # 0x204fd0
cmpl $0x0, (%rax)
jne 0x77171
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x27f893(%rip), %rax    # 0x2f6a00
movsd %xmm0, (%rax)
callq 0x75767
popq %rbp
jmp 0x75767
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpacc()
void parse_gpacc()
{
int prn;
int acc;
char c[2];

   if(get_msg_field()) {
      for(prn=1; prn<=32; prn++) {
         c[0] = msg_field[prn-1];
         c[1] = 0;
         if(c[0] == 0) break;

         if(c[0] == 'X') acc = (-1);
         else            acc = atohex(c);
         sat[prn].sv_accuracy = ura_to_dist(prn, acc);

         if(have_accu == 0) need_redraw = 2344;
         have_accu = 1;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x75767
testl %eax, %eax
je 0x772d3
movl $0x544, %r14d           # imm = 0x544
addq 0xc2ce5(%rip), %r14     # 0x139f48
xorl %r15d, %r15d
leaq 0x2ae7d3(%rip), %r12    # 0x325a40
pushq $-0x1
popq %r13
leaq 0x280148(%rip), %rbx    # 0x2f73c0
cmpq $0x20, %r15
je 0x772d3
movzbl (%r12,%r15), %eax
movb %al, -0x2a(%rbp)
movb $0x0, -0x29(%rbp)
movl %r13d, %esi
cmpl $0x58, %eax
je 0x772a1
testl %eax, %eax
je 0x772d3
leaq -0x2a(%rbp), %rdi
callq 0x98b2
movl %eax, %esi
leal 0x1(%r15), %edi
callq 0x771c5
movss %xmm0, (%r14)
cmpl $0x0, (%rbx)
jne 0x772c1
leaq 0x18b589(%rip), %rax    # 0x202844
movl $0x928, (%rax)          # imm = 0x928
movl $0x1, (%rbx)
incq %r15
addq $0x348, %r14            # imm = 0x348
jmp 0x77278
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpanc()
void parse_gpanc()
{
int i;
char c;

   get_msg_field();  // eat the almanac time string

   if(get_msg_field()) {
      reset_sat_health();
      for(i=0; i<32; i++) {
         c = msg_field[i];
         if(c == 0) break;
         else if(c == '0') sat[i+1].health_flag = 0;  // no sat
         else if(c == '1') sat[i+1].health_flag = 1;  // unhealthy
         else if(c == '2') sat[i+1].health_flag = 2;  // good
      }
   }
   else return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x7735b
callq 0x56b4a
xorl %eax, %eax
leaq 0x2ae73e(%rip), %rcx    # 0x325a40
leaq 0x1b1ca7(%rip), %rdx    # 0x228fb0
cmpq $0x20, %rax
je 0x7735b
movzbl (%rcx,%rax), %esi
cmpl $0x30, %esi
je 0x7733b
cmpl $0x31, %esi
je 0x7732b
cmpl $0x32, %esi
je 0x7734b
testl %esi, %esi
je 0x7735b
incq %rax
jmp 0x77309
incq %rax
imulq $0x348, %rax, %rsi      # imm = 0x348
movb $0x1, (%rdx,%rsi)
jmp 0x77309
incq %rax
imulq $0x348, %rax, %rsi      # imm = 0x348
movb $0x0, (%rdx,%rsi)
jmp 0x77309
incq %rax
imulq $0x348, %rax, %rsi      # imm = 0x348
movb $0x2, (%rdx,%rsi)
jmp 0x77309
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpgpt()
void parse_gpgpt()
{
int val;
int i;

   if(get_msg_field()) {  // gps time valid
      val = atoi(msg_field);
      if(val) time_flags &= (~TFLAGS_INVALID);
      else    time_flags |= (TFLAGS_INVALID);
   }

   if(get_msg_field()) {  // gps week
      gps_week = atoi(msg_field);
      faked_tow = 0;
      have_week = 1;
   }

   if(get_msg_field()) {  // GPS TOW
      pri_tow = atoi(msg_field);
      tow = pri_tow;  
      this_tow = tow;
      survey_tow = tow;

      if(have_tow == 0) need_redraw = 3029;
      have_tow = 55;
   }

   if(get_msg_field()) {  // leap second count
      i = atoi(msg_field);
      time_flags |= TFLAGS_NO_UTC_OFS;
      if(i) {
         time_flags &= (~TFLAGS_NO_UTC_OFS);
         if(!user_set_utc_ofs) utc_offset = i;
         check_utc_ofs(334);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x75767
testl %eax, %eax
je 0x7738e
leaq 0x2ae6cf(%rip), %rdi    # 0x325a40
callq 0x95e0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leaq 0x280120(%rip), %rax    # 0x2f74a4
movl (%rax), %edx
andl $-0x5, %edx
leal (%rdx,%rcx,4), %ecx
movl %ecx, (%rax)
callq 0x75767
testl %eax, %eax
je 0x773c4
leaq 0x2ae6a2(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x28039e(%rip), %rcx    # 0x2f7748
andl $0x0, (%rcx)
leaq 0x280384(%rip), %rcx    # 0x2f7738
movw %ax, (%rcx)
leaq 0x27ff6e(%rip), %rax    # 0x2f732c
movl $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x7741f
leaq 0x2ae66c(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x280364(%rip), %rcx    # 0x2f7744
movl %eax, (%rcx)
leaq 0x280353(%rip), %rcx    # 0x2f773c
movl %eax, (%rcx)
leaq 0x28034e(%rip), %rcx    # 0x2f7740
movl %eax, (%rcx)
movl %eax, %eax
leaq 0x280353(%rip), %rcx    # 0x2f7750
movq %rax, (%rcx)
leaq 0x27ff21(%rip), %rax    # 0x2f7328
cmpl $0x0, (%rax)
jne 0x77419
leaq 0x18b431(%rip), %rcx    # 0x202844
movl $0xbd5, (%rcx)          # imm = 0xBD5
movl $0x37, (%rax)
callq 0x75767
testl %eax, %eax
je 0x7746d
leaq 0x2ae611(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x280069(%rip), %rcx    # 0x2f74a4
movl (%rcx), %edx
movl %edx, %esi
orl $0x8, %esi
movl %esi, (%rcx)
testl %eax, %eax
je 0x7746d
andl $-0x9, %edx
movl %edx, (%rcx)
leaq 0x2802e0(%rip), %rcx    # 0x2f7734
cmpl $0x0, (%rcx)
jne 0x77462
leaq 0x2802c8(%rip), %rcx    # 0x2f7728
movl %eax, (%rcx)
movl $0x14e, %edi            # imm = 0x14E
popq %rbp
jmp 0x51a91
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpmge()
void parse_gpmge()
{
int i;
int prn;

   // get prohibited SBAS sats bitmask (answer from gpmgq query)

   for(i=0; i<32; i++) {
      prn = i+120;
      sat[prn].disabled = 0;
   }

   if(get_msg_field()) {  // gps week
      excluded_sbas = (u32) atohex(msg_field);
      for(i=0; i<32; i++) {
         prn = i+120;
         if(excluded_sbas & (1 << i)) sat[prn].disabled = 1;
      }
   }
   else return;
}

// Assembly:
xorl %eax, %eax
leaq 0x1b1b38(%rip), %rcx    # 0x228fb0
cmpq $0x6900, %rax           # imm = 0x6900
je 0x77490
movb $0x0, 0x189c1(%rcx,%rax)
addq $0x348, %rax            # imm = 0x348
jmp 0x77478
pushq %rbp
movq %rsp, %rbp
callq 0x75767
testl %eax, %eax
je 0x774da
leaq 0x2ae59c(%rip), %rdi    # 0x325a40
callq 0x98b2
leaq 0x27fc38(%rip), %rcx    # 0x2f70e8
movl %eax, (%rcx)
movl $0x189c1, %ecx          # imm = 0x189C1
addq 0xc2a8a(%rip), %rcx     # 0x139f48
xorl %edx, %edx
cmpq $0x20, %rdx
je 0x774da
btl %edx, %eax
jae 0x774ce
movb $0x1, (%rcx)
incq %rdx
addq $0x348, %rcx            # imm = 0x348
jmp 0x774c0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gprrm()
void parse_gprrm()
{
int traim_offset;

   // traim status

   traim_alarm = traim_status = traim_deleted = traim_offset = 0;

   if(get_msg_field()) {
      traim_alarm = atoi(msg_field);
   }

   if(get_msg_field()) {
      traim_status = atoi(msg_field);
   }

   if(get_msg_field()) {
      traim_deleted = atoi(msg_field);
   }

   get_msg_field();  // reserved
   get_msg_field();  // reserved
   get_msg_field();  // reserved
   get_msg_field();  // reserved

   if(get_msg_field()) {
      traim_offset = atoi(msg_field);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2afda7(%rip), %rbx    # 0x3272a8
andl $0x0, (%rbx)
leaq 0x18dbbd(%rip), %r14    # 0x2050c8
andl $0x0, (%r14)
leaq 0x2afd96(%rip), %r15    # 0x3272ac
andl $0x0, (%r15)
callq 0x75767
testl %eax, %eax
je 0x77532
leaq 0x2ae516(%rip), %rdi    # 0x325a40
callq 0x95e0
movl %eax, (%r15)
callq 0x75767
testl %eax, %eax
je 0x7754a
leaq 0x2ae4fe(%rip), %rdi    # 0x325a40
callq 0x95e0
movl %eax, (%r14)
callq 0x75767
testl %eax, %eax
je 0x77561
leaq 0x2ae4e6(%rip), %rdi    # 0x325a40
callq 0x95e0
movl %eax, (%rbx)
callq 0x75767
callq 0x75767
callq 0x75767
callq 0x75767
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x75767
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gprsd()
void parse_gprsd()
{
int furuno_traim;
int pps_mode;

   // pps/traim config

   if(get_msg_field()) {
      traim_mode = atoi(msg_field);
      have_traim = 1;
   }

   if(get_msg_field()) {
      furuno_traim = atoi(msg_field);
   }

   if(get_msg_field()) {
      pps_mode = atoi(msg_field);
      if(pps_mode) pps_enabled = 1;
      else         pps_enabled = 0;
      have_pps_enable = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x75767
testl %eax, %eax
je 0x775b3
leaq 0x2ae4a8(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x18db1c(%rip), %rcx    # 0x2050c0
movl %eax, (%rcx)
leaq 0x27fe1b(%rip), %rax    # 0x2f73c8
movl $0x1, (%rax)
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x775e6
leaq 0x2ae478(%rip), %rdi    # 0x325a40
callq 0x95e0
testl %eax, %eax
leaq 0x28074a(%rip), %rax    # 0x2f7d20
setne (%rax)
leaq 0x27fcfc(%rip), %rax    # 0x2f72dc
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gptmd()
void parse_gptmd()
{
   minor_alarms &= (~MINOR_SURVEY);
   survey_secs = 0;
   survey_length = 0;

   if(get_msg_field()) {   // samples remaining
      if(msg_field[0]) {
         survey_secs = atoi(msg_field);
         if(survey_secs) minor_alarms |= MINOR_SURVEY;
         survey_length = survey_secs;
      }
   }
   else return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x27f9de(%rip), %rbx    # 0x2f71d8
andb $-0x21, (%rbx)
leaq 0x280690(%rip), %r15    # 0x2f7e94
andl $0x0, (%r15)
leaq 0x280661(%rip), %r14    # 0x2f7e70
andl $0x0, (%r14)
callq 0x75767
testl %eax, %eax
je 0x77841
leaq 0x2ae21d(%rip), %rax    # 0x325a40
cmpb $0x0, (%rax)
je 0x77841
leaq 0x2ae211(%rip), %rdi    # 0x325a40
callq 0x95e0
movl %eax, (%r15)
testl %eax, %eax
je 0x7783e
orb $0x20, (%rbx)
movl %eax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gptst()
void parse_gptst()
{
int status;
double id;
int t1,t2;

   // test results
   t1 = t2 = status = 0;
   id = 0;

   if(get_msg_field()) {
      status = atoi(msg_field);
      if(status == 0) need_redraw = 8527;
   }

   if(get_msg_field()) {
      id = atof(msg_field);
      furuno_pgm = (int) (id / 100.0);
      furuno_ver = (int) fmod(id, 100.0);
      have_info |= ALL_ID_INFO;
   }

   if(get_msg_field()) {
      t1 = atoi(msg_field);
   }

   if(get_msg_field()) {
      t2 = atoi(msg_field);

      critical_alarms = 0;
      have_critical_alarms = 1;
      have_antenna = 1;

      if(t2 & 0x01) {  // ROM error
         critical_alarms |= CRIT_ROM;
      }

      if(t2 & 0x02) {  // RAM error
         critical_alarms |= CRIT_RAM;
      }

      if(t2 & 0x04) {  // antenna error
         minor_alarms |= MINOR_ANT_NO_PWR;
      }
      else {
         minor_alarms &= (~MINOR_ANT_NO_PWR);
      }

      if(t2 & 0x08) {  // backup param error
         critical_alarms |= CRIT_RTC;
      }
   }

   if(status == 0) {
      send_furuno_cmd("GPtrq,1");  // finish self test
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x75767
movb $0x1, %bl
testl %eax, %eax
je 0x77ad9
leaq 0x2adf81(%rip), %rdi    # 0x325a40
callq 0x95e0
testl %eax, %eax
je 0x77acc
xorl %ebx, %ebx
jmp 0x77ad9
leaq 0x18ad71(%rip), %rax    # 0x202844
movl $0x214f, (%rax)         # imm = 0x214F
callq 0x75767
testl %eax, %eax
je 0x77b27
leaq 0x2adf57(%rip), %rdi    # 0x325a40
callq 0x9470
movsd 0x7b56a(%rip), %xmm1    # 0xf3060
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
leaq 0x2af78b(%rip), %rcx    # 0x327294
movl %eax, (%rcx)
callq 0x94d0
cvttsd2si %xmm0, %eax
leaq 0x2af77d(%rip), %rcx    # 0x327298
movl %eax, (%rcx)
leaq 0x27fe50(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x77b90
leaq 0x2adf04(%rip), %rdi    # 0x325a40
callq 0x95e0
leaq 0x27f688(%rip), %rcx    # 0x2f71d0
andl $0x0, (%rcx)
leaq 0x27f756(%rip), %rdx    # 0x2f72a8
pushq $0x1
popq %rsi
movl %esi, (%rdx)
leaq 0x27f6ce(%rip), %rdx    # 0x2f722c
movl %esi, (%rdx)
movl %eax, %edx
andl $0x3, %edx
je 0x77b69
movl %edx, (%rcx)
movl %eax, %esi
shll $0x1d, %esi
sarl $0x1f, %esi
leaq 0x27f660(%rip), %rdi    # 0x2f71d8
movl (%rdi), %r8d
andl $-0x7, %r8d
andl $0x6, %esi
orl %r8d, %esi
movl %esi, (%rdi)
testb $0x8, %al
je 0x77b90
orl $0x10, %edx
movl %edx, (%rcx)
testb %bl, %bl
je 0x77ba6
leaq 0x95230(%rip), %rdi     # 0x10cdcb
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x578d5
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpwav()
void parse_gpwav()
{
int geo_sat;
int i;
int prn;
int el;
int az;
int snr;

   // SBAS sat info - from GPint,wav00
   for(i=120; i<140; i++) {
      sat[i].level_msg = (0);
   }

   if(get_msg_field()) {
      geo_sat = atoi(msg_field);
   }
   else return;

   for(i=0; i<geo_sat; i++) {
      if(get_msg_field()) {
         prn = atoi(msg_field);
      }
      else break;

      if(get_msg_field()) {
         el = atoi(msg_field);
      }
      else break;

      if(get_msg_field()) {
         az = atoi(msg_field);
      } 
      else break;

      if(get_msg_field()) {
         snr = atoi(msg_field);
      }
      else break;

      if((prn >= 1) && (prn <= MAX_PRN)) {
         sat[prn].level_msg = 111;
         set_sat_azel(prn, (float) az, (float) el);
         sat[prn].sig_level = (float) snr;
         have_snr |= rinex_gnss(prn);
         if(snr > 0) sat[prn].tracking = prn;
         else        sat[prn].tracking = (-1);
         have_sat_azel = 2;

         record_sig_levels(prn);
      }
   }
}

// Assembly:
xorl %eax, %eax
leaq 0x1b13d2(%rip), %rcx    # 0x228fb0
cmpq $0x41a0, %rax           # imm = 0x41A0
je 0x77bf6
andl $0x0, 0x189dc(%rcx,%rax)
addq $0x348, %rax            # imm = 0x348
jmp 0x77bde
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x75767
testl %eax, %eax
je 0x77d20
leaq 0x2ade28(%rip), %rbx    # 0x325a40
movq %rbx, %rdi
callq 0x95e0
xorl %r13d, %r13d
testl %eax, %eax
cmovgl %eax, %r13d
subl $0x1, %r13d
jb 0x77d20
callq 0x75767
testl %eax, %eax
je 0x77d20
movq %rbx, %rdi
callq 0x95e0
movl %eax, %r14d
callq 0x75767
testl %eax, %eax
je 0x77d20
movq %rbx, %rdi
callq 0x95e0
movl %eax, %r15d
callq 0x75767
testl %eax, %eax
je 0x77d20
movq %rbx, %rdi
callq 0x95e0
movl %eax, %r12d
callq 0x75767
testl %eax, %eax
je 0x77d20
leal -0x1(%r14), %eax
cmpl $0x3e6, %eax            # imm = 0x3E6
ja 0x77c29
movq %rbx, %rdi
callq 0x95e0
movl %eax, -0x2c(%rbp)
movl %r14d, %eax
imulq $0x348, %rax, %rbx      # imm = 0x348
cvtsi2ss %r12d, %xmm0
leaq 0x1b12fc(%rip), %r12    # 0x228fb0
movl $0x6f, 0x1c(%r12,%rbx)
cvtsi2ss %r15d, %xmm1
movl %r14d, %edi
callq 0x53b74
movl -0x2c(%rbp), %r15d
cvtsi2ss %r15d, %xmm0
movss %xmm0, 0x20(%r12,%rbx)
movl %r14d, %edi
callq 0xca4da
leaq 0x27f663(%rip), %rcx    # 0x2f734c
orl %eax, (%rcx)
testl %r15d, %r15d
movl %r14d, %eax
pushq $-0x1
popq %rcx
cmovlel %ecx, %eax
movl %eax, 0x218(%r12,%rbx)
leaq 0x2add3a(%rip), %rbx    # 0x325a40
leaq 0x27f587(%rip), %rax    # 0x2f7294
movl $0x2, (%rax)
movl %r14d, %edi
callq 0x559ba
jmp 0x77c29
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: get_fixed_field(int)
int get_fixed_field(int width)
{
char c;
int i;

   // get a fixed with field from a message

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

   i = 0;
   while(width--) {   // get next field from the nmea message
      c = nmea_msg[msg_col];
      if(c == 0) {  // reached end-of-message
         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 0x2ad89d(%rip), %rcx    # 0x325a40
movb $0x0, (%rcx)
xorl %eax, %eax
testl %edi, %edi
jle 0x781fe
leaq 0x2ada91(%rip), %rdx    # 0x325c44
movslq (%rdx), %rsi
leaq 0x2ad673(%rip), %r8     # 0x325830
cmpb $0x0, (%r8,%rsi)
je 0x781fe
xorl %eax, %eax
movslq %esi, %r9
negl %edi
incl %edi
cmpl $0x1, %edi
je 0x781fb
movb (%r8,%r9), %r10b
testb %r10b, %r10b
je 0x781fb
cmpl $0x1fe, %eax            # imm = 0x1FE
ja 0x781cb
movl %eax, %r9d
leaq 0x1(%r9), %rax
movb %r10b, (%rcx,%r9)
movb $0x0, 0x1(%rcx,%r9)
incl %esi
movl %esi, (%rdx)
negl %edi
jmp 0x781c6
movsbl (%rcx), %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_crn()
void parse_crn()
{
int i;
int system;
int prn;
int frame[MAX_PRN+1][10];

   // GPS navigation subframe

   system = (-1);
   prn = 0;

   if(get_msg_field()) {
      system = atoi(msg_field);
      if(system != 1) return;  // system 1 is GPS
   }

   if(get_msg_field()) {
      prn = atoi(msg_field);
      if(prn <= 0) return;
      if(prn >= MAX_PRN) return;
   }

   for(i=0; i<10; i++) {
      if(get_fixed_field(6)) {
         if(msg_field[0] == '-') frame[prn][i] = 0;
         else frame[prn][i] = atohex(msg_field);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x75767
testl %eax, %eax
je 0x787a9
leaq 0x2ad2a1(%rip), %rdi    # 0x325a40
callq 0x95e0
cmpl $0x1, %eax
jne 0x787ca
callq 0x75767
testl %eax, %eax
je 0x787d5
leaq 0x2ad287(%rip), %rdi    # 0x325a40
callq 0x95e0
addl $0xfffffc19, %eax       # imm = 0xFFFFFC19
cmpl $0xfffffc1a, %eax       # imm = 0xFFFFFC1A
jae 0x787d5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0xa
popq %r15
pushq $0x6
popq %rbx
leaq 0x2ad25d(%rip), %r14    # 0x325a40
subl $0x1, %r15d
jb 0x787ca
movl %ebx, %edi
callq 0x78198
testl %eax, %eax
je 0x787e3
cmpb $0x2d, (%r14)
je 0x787e3
movq %r14, %rdi
callq 0x98b2
jmp 0x787e3
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_z12_rid()
void parse_z12_rid()
{
   // Z12 receiver ID
   log_packet_id("z12_rid");

   if(get_msg_field()) {  // type
      msg_field[32] = 0;
      strcpy(z12_type, msg_field);
   }

   if(get_msg_field()) {  // channel options
      msg_field[32] = 0;
      strcpy(z12_chan_opt, msg_field);
   }

   if(get_msg_field()) {  // nav version
      msg_field[32] = 0;
      strcpy(z12_nav_ver, msg_field);
   }

   if(get_msg_field()) {  // rsvd
      msg_field[32] = 0;
      strcpy(z12_rsvd, msg_field);
   }

   if(get_msg_field()) {  // chan version
      msg_field[32] = 0;
      strcpy(z12_chan_ver, msg_field);
   }

   if(jd_obs) {  // prevents writing RINEX file until raw readings are available
      if(rinex_file) {
         if(have_utc_ofs) {  // dont start writing until utc info available
            have_info |= ALL_ID_INFO;
         }
      }
      else if(log_file && (log_fmt == RINEX)) {  // writing .obs file
         if(have_utc_ofs) {  // dont start writing until utc info available
            have_info |= ALL_ID_INFO;
         }
      }
      else {
         have_info |= ALL_ID_INFO;
      }
   }

   if(ZDA_TIME == 0) get_norcvr_message();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x92dac(%rip), %rdi     # 0x10d0f0
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x7a369
leaq 0x2ab6e7(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2ad82c(%rip), %rdi    # 0x327b90
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x7a389
leaq 0x2ab6c7(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2ad83c(%rip), %rdi    # 0x327bc0
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x7a3a9
leaq 0x2ab6a7(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2ad84c(%rip), %rdi    # 0x327bf0
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x7a3c9
leaq 0x2ab687(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2ad85c(%rip), %rdi    # 0x327c20
callq 0x9330
callq 0x75767
testl %eax, %eax
je 0x7a3e9
leaq 0x2ab667(%rip), %rsi    # 0x325a40
movb $0x0, 0x20(%rsi)
leaq 0x2ad86c(%rip), %rdi    # 0x327c50
callq 0x9330
leaq 0x27d180(%rip), %rax    # 0x2f7570
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7a400
jnp 0x7a43f
leaq 0x1adf61(%rip), %rax    # 0x228368
cmpq $0x0, (%rax)
jne 0x7a429
leaq 0x1adf4c(%rip), %rax    # 0x228360
cmpq $0x0, (%rax)
je 0x7a435
leaq 0x1ae027(%rip), %rax    # 0x228448
cmpl $0x12e, (%rax)          # imm = 0x12E
jne 0x7a435
leaq 0x27ceec(%rip), %rax    # 0x2f731c
cmpl $0x0, (%rax)
je 0x7a43f
leaq 0x27d538(%rip), %rax    # 0x2f7974
orb $0xf, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_z12_pps()
void parse_z12_pps()
{
double period;
double ofs;

   // PPS output control
   log_packet_id("z12_pps");

   if(get_msg_field()) {  // period (0.5 .. 59.5 secs)
      period = atof(msg_field);
      if     (period == 1.0) pps_rate = RATE_1PPS;
      else if(period == 2.0) pps_rate = RATE_PP2S;
      else                   pps_rate = RATE_USER;

      if(period == 0.0) pps_enabled = 0;
      else              pps_enabled = 1;

      have_pps_rate = 12;
   }

   if(get_msg_field()) {  // offset (in msecs)
      ofs = atof(msg_field);
      pps1_delay = ofs;
      have_pps_delay |= 0x01;
   }

   get_msg_field();  // PPS enabled on port A
   get_msg_field();  // PPS enabled on port B 
   get_msg_field();  // PPS enabled on port C 
   get_msg_field();  // PPS enabled on port D 

   have_z12_pps = 12;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x92c7f(%rip), %rdi     # 0x10d120
callq 0x520bf
callq 0x75767
testl %eax, %eax
je 0x7a510
leaq 0x2ab58a(%rip), %rdi    # 0x325a40
callq 0x9470
xorl %eax, %eax
ucomisd 0x7b583(%rip), %xmm0    # 0xf5a48
movl $0x82, %ecx
cmovnel %eax, %ecx
cmovpl %eax, %ecx
ucomisd 0x78b98(%rip), %xmm0    # 0xf3070
pushq $0x2
popq %rax
cmovnel %ecx, %eax
cmovpl %ecx, %eax
leaq 0x27d83b(%rip), %rcx    # 0x2f7d23
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movb %al, (%rcx)
setp %al
setne %cl
orb %al, %cl
leaq 0x27d81f(%rip), %rax    # 0x2f7d20
movb %cl, (%rax)
leaq 0x27cdc6(%rip), %rax    # 0x2f72d0
movl $0xc, (%rax)
callq 0x75767
testl %eax, %eax
je 0x7a53a
leaq 0x2ab520(%rip), %rdi    # 0x325a40
callq 0x9470
leaq 0x27d8ac(%rip), %rax    # 0x2f7dd8
movsd %xmm0, (%rax)
leaq 0x27cd81(%rip), %rax    # 0x2f72b8
orb $0x1, (%rax)
callq 0x75767
callq 0x75767
callq 0x75767
callq 0x75767
leaq 0x27cd7f(%rip), %rax    # 0x2f72d4
movl $0xc, (%rax)
popq %rbp
retq