LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0x82d4e
movl $0x544, %r14d           # imm = 0x544
addq 0xcd265(%rip), %r14     # 0x14ff40
xorl %r15d, %r15d
leaq 0x2b8d5b(%rip), %r12    # 0x33ba40
leaq 0x28a6d4(%rip), %r13    # 0x30d3c0
leaq -0x2a(%rbp), %rbx
movzbl (%r12,%r15), %eax
movb %al, -0x2a(%rbp)
movb $0x0, -0x29(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpl $0x58, %eax
je 0x82d14
testl %eax, %eax
je 0x82d4e
movq %rbx, %rdi
callq 0x98c6
movl %eax, %esi
leal 0x1(%r15), %edi
callq 0x82c38
movss %xmm0, (%r14)
cmpl $0x0, (%r13)
jne 0x82d36
leaq 0x195b14(%rip), %rax    # 0x218844
movl $0x928, (%rax)          # imm = 0x928
movl $0x1, (%r13)
incq %r15
addq $0x348, %r14            # imm = 0x348
cmpq $0x20, %r15
jne 0x82cf0
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_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 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x82de7
xorl %ecx, %ecx
leaq 0x1bc238(%rip), %rax    # 0x23efb0
movb $0x0, (%rax,%rcx)
addq $0x348, %rcx            # imm = 0x348
cmpq $0xcd140, %rcx          # imm = 0xCD140
jne 0x82d78
xorl %ecx, %ecx
leaq 0x2b8cab(%rip), %rdx    # 0x33ba40
movzbl (%rdx,%rcx), %esi
cmpl $0x30, %esi
jle 0x82db8
cmpl $0x31, %esi
je 0x82dca
cmpl $0x32, %esi
jne 0x82dde
incq %rcx
imulq $0x348, %rcx, %rsi      # imm = 0x348
movb $0x2, (%rax,%rsi)
jmp 0x82de1
jne 0x82dda
incq %rcx
imulq $0x348, %rcx, %rsi      # imm = 0x348
movb $0x0, (%rax,%rsi)
jmp 0x82de1
incq %rcx
imulq $0x348, %rcx, %rsi      # imm = 0x348
movb $0x1, (%rax,%rsi)
jmp 0x82de1
testl %esi, %esi
je 0x82de7
incq %rcx
cmpq $0x20, %rcx
jne 0x82d95
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0x82e1a
leaq 0x2b8c43(%rip), %rdi    # 0x33ba40
callq 0x95e0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leaq 0x28a694(%rip), %rax    # 0x30d4a4
movl (%rax), %edx
andl $-0x5, %edx
leal (%rdx,%rcx,4), %ecx
movl %ecx, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x82e53
leaq 0x2b8c16(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x28a902(%rip), %rcx    # 0x30d738
movw %ax, (%rcx)
leaq 0x28a908(%rip), %rax    # 0x30d748
movl $0x0, (%rax)
leaq 0x28a4df(%rip), %rax    # 0x30d32c
movl $0x1, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x82eae
leaq 0x2b8bdd(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x28a8d5(%rip), %rcx    # 0x30d744
movl %eax, (%rcx)
leaq 0x28a8c4(%rip), %rcx    # 0x30d73c
movl %eax, (%rcx)
leaq 0x28a8bf(%rip), %rcx    # 0x30d740
movl %eax, (%rcx)
movl %eax, %eax
leaq 0x28a8c4(%rip), %rcx    # 0x30d750
movq %rax, (%rcx)
leaq 0x28a492(%rip), %rax    # 0x30d328
cmpl $0x0, (%rax)
jne 0x82ea8
leaq 0x1959a2(%rip), %rcx    # 0x218844
movl $0xbd5, (%rcx)          # imm = 0xBD5
movl $0x37, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x82f42
leaq 0x2b8b7e(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x28a5d6(%rip), %rcx    # 0x30d4a4
movl (%rcx), %edx
movl %edx, %esi
orl $0x8, %esi
movl %esi, (%rcx)
testl %eax, %eax
je 0x82f42
andl $-0x9, %edx
movl %edx, (%rcx)
leaq 0x28a84d(%rip), %rcx    # 0x30d734
cmpl $0x0, (%rcx)
jne 0x82ef5
leaq 0x28a835(%rip), %rcx    # 0x30d728
movl %eax, (%rcx)
leaq 0x28a420(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0x82f42
leaq 0x28a60c(%rip), %rcx    # 0x30d514
cmpl $0x7e1, (%rcx)          # imm = 0x7E1
setge %cl
leaq 0x28a810(%rip), %rdx    # 0x30d728
movl (%rdx), %edx
cmpl $0x12, %edx
setl %sil
andb %cl, %sil
cmpl $0x11, %edx
setl %cl
orb %sil, %cl
jne 0x82f42
leaq 0x19590e(%rip), %rcx    # 0x218844
movl $0x91e, (%rcx)          # imm = 0x91E
movl $0x14e, (%rax)          # imm = 0x14E
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1bc063(%rip), %rcx    # 0x23efb0
movb $0x0, 0x189c1(%rcx,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0x6900, %rax           # imm = 0x6900
jne 0x82f4d
pushq %rbp
movq %rsp, %rbp
callq 0x810b1
testl %eax, %eax
je 0x82fab
leaq 0x2b8ac9(%rip), %rdi    # 0x33ba40
callq 0x98c6
leaq 0x28a165(%rip), %rcx    # 0x30d0e8
movl %eax, (%rcx)
movl $0x189c1, %ecx          # imm = 0x189C1
addq 0xccfaf(%rip), %rcx     # 0x14ff40
xorl %edx, %edx
btl %edx, %eax
jae 0x82f9b
movb $0x1, (%rcx)
incq %rdx
addq $0x348, %rcx            # imm = 0x348
cmpq $0x20, %rdx
jne 0x82f93
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ba2d6(%rip), %rbx    # 0x33d2a8
xorl %eax, %eax
movl %eax, (%rbx)
leaq 0x1980eb(%rip), %r14    # 0x21b0c8
movl %eax, (%r14)
leaq 0x2ba2c5(%rip), %r15    # 0x33d2ac
movl %eax, (%r15)
callq 0x810b1
testl %eax, %eax
je 0x83002
leaq 0x2b8a46(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, (%r15)
callq 0x810b1
testl %eax, %eax
je 0x8301a
leaq 0x2b8a2e(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, (%r14)
callq 0x810b1
testl %eax, %eax
je 0x83031
leaq 0x2b8a16(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, (%rbx)
callq 0x810b1
callq 0x810b1
callq 0x810b1
callq 0x810b1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x810b1
// File: /workspace/github_cpp_makefile_star2_O3/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 0x810b1
testl %eax, %eax
je 0x83083
leaq 0x2b89d8(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x19804c(%rip), %rcx    # 0x21b0c0
movl %eax, (%rcx)
leaq 0x28a34b(%rip), %rax    # 0x30d3c8
movl $0x1, (%rax)
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x830b6
leaq 0x2b89a8(%rip), %rdi    # 0x33ba40
callq 0x95e0
testl %eax, %eax
leaq 0x28ac7a(%rip), %rax    # 0x30dd20
setne (%rax)
leaq 0x28a22c(%rip), %rax    # 0x30d2dc
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x289f02(%rip), %rbx    # 0x30d1d8
andb $-0x21, (%rbx)
leaq 0x28abb4(%rip), %r15    # 0x30de94
xorl %eax, %eax
movl %eax, (%r15)
leaq 0x28ab84(%rip), %r14    # 0x30de70
movl %eax, (%r14)
callq 0x810b1
testl %eax, %eax
je 0x8331d
leaq 0x2b8741(%rip), %rax    # 0x33ba40
cmpb $0x0, (%rax)
je 0x8331d
leaq 0x2b8735(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, (%r15)
testl %eax, %eax
je 0x8331a
orb $0x20, (%rbx)
movl %eax, (%r14)
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_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 0x810b1
movb $0x1, %bl
testl %eax, %eax
je 0x83639
leaq 0x2b8421(%rip), %rdi    # 0x33ba40
callq 0x95e0
testl %eax, %eax
je 0x8362c
xorl %ebx, %ebx
jmp 0x83639
leaq 0x195211(%rip), %rax    # 0x218844
movl $0x214f, (%rax)         # imm = 0x214F
callq 0x810b1
testl %eax, %eax
je 0x83687
leaq 0x2b83f7(%rip), %rdi    # 0x33ba40
callq 0x9470
movsd 0x85a0a(%rip), %xmm1    # 0x109060
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttsd2si %xmm2, %eax
leaq 0x2b9c2b(%rip), %rcx    # 0x33d294
movl %eax, (%rcx)
callq 0x94d0
cvttsd2si %xmm0, %eax
leaq 0x2b9c1d(%rip), %rcx    # 0x33d298
movl %eax, (%rcx)
leaq 0x28a2f0(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x836f5
leaq 0x2b83a4(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x289b28(%rip), %rcx    # 0x30d1d0
movl $0x0, (%rcx)
leaq 0x289bf3(%rip), %rdx    # 0x30d2a8
movl $0x1, %esi
movl %esi, (%rdx)
leaq 0x289b69(%rip), %rdx    # 0x30d22c
movl %esi, (%rdx)
movl %eax, %edx
andl $0x3, %edx
je 0x836ce
movl %edx, (%rcx)
movl %eax, %esi
shll $0x1d, %esi
sarl $0x1f, %esi
leaq 0x289afb(%rip), %rdi    # 0x30d1d8
movl (%rdi), %r8d
andl $-0x7, %r8d
andl $0x6, %esi
orl %r8d, %esi
movl %esi, (%rdi)
testb $0x8, %al
je 0x836f5
orl $0x10, %edx
movl %edx, (%rcx)
testb %bl, %bl
je 0x8370b
leaq 0x9f783(%rip), %rdi     # 0x122e83
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5eff8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
leaq 0x1bb85f(%rip), %r14    # 0x23efb0
movl $0x0, 0x189dc(%r14,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0x41a0, %rax           # imm = 0x41A0
jne 0x83751
callq 0x810b1
testl %eax, %eax
je 0x83892
leaq 0x2b82c1(%rip), %rdi    # 0x33ba40
callq 0x95e0
testl %eax, %eax
jle 0x83892
movl %eax, %ebx
callq 0x810b1
testl %eax, %eax
je 0x83892
leaq 0x2b829e(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, %r15d
callq 0x810b1
testl %eax, %eax
je 0x83892
leaq 0x2b8282(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, %r12d
callq 0x810b1
testl %eax, %eax
je 0x83892
leaq 0x2b8266(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, %r13d
callq 0x810b1
testl %eax, %eax
je 0x83892
leal -0x1(%r15), %eax
cmpl $0x3e6, %eax            # imm = 0x3E6
ja 0x8388a
leaq 0x2b823b(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, -0x2c(%rbp)
movl %r15d, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
xorps %xmm0, %xmm0
cvtsi2ss %r13d, %xmm0
movq %rax, %r13
movl $0x6f, 0x1c(%r14,%rax)
xorps %xmm1, %xmm1
cvtsi2ss %r12d, %xmm1
movl %r15d, %edi
callq 0x5ace1
movl -0x2c(%rbp), %r12d
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
movss %xmm0, 0x20(%r14,%r13)
movl %r15d, %edi
callq 0xdc1dd
leaq 0x289aef(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
testl %r12d, %r12d
movl %r15d, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmovlel %ecx, %eax
movl %eax, 0x218(%r14,%r13)
leaq 0x289a18(%rip), %rax    # 0x30d294
movl $0x2, (%rax)
movl %r15d, %edi
callq 0x5cdab
decl %ebx
jne 0x8378e
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: 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 0x2b7ca9(%rip), %rcx    # 0x33ba40
movb $0x0, (%rcx)
xorl %eax, %eax
testl %edi, %edi
jle 0x83de9
leaq 0x2b7e9d(%rip), %rdx    # 0x33bc44
movslq (%rdx), %rsi
leaq 0x2b7a7f(%rip), %r8     # 0x33b830
cmpb $0x0, (%r8,%rsi)
je 0x83de9
xorl %eax, %eax
movslq %esi, %r9
movb (%r8,%r9), %r9b
testb %r9b, %r9b
je 0x83de6
cmpl $0x1fe, %eax            # imm = 0x1FE
jg 0x83de2
movslq %eax, %r10
leaq 0x1(%r10), %rax
movb %r9b, (%rcx,%r10)
movb $0x0, 0x1(%rcx,%r10)
incl %esi
movl %esi, (%rdx)
decl %edi
jne 0x83dba
movsbl (%rcx), %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
callq 0x810b1
testl %eax, %eax
je 0x84393
leaq 0x2b76b7(%rip), %rdi    # 0x33ba40
callq 0x95e0
cmpl $0x1, %eax
jne 0x843e1
callq 0x810b1
testl %eax, %eax
je 0x843b4
leaq 0x2b769d(%rip), %rdi    # 0x33ba40
callq 0x95e0
addl $0xfffffc19, %eax       # imm = 0xFFFFFC19
cmpl $0xfffffc1a, %eax       # imm = 0xFFFFFC1A
jb 0x843e1
movl $0xa, %r14d
leaq 0x2b767f(%rip), %rbx    # 0x33ba40
movl $0x6, %edi
callq 0x83d8c
testl %eax, %eax
je 0x843dc
cmpb $0x2d, (%rbx)
je 0x843dc
movq %rbx, %rdi
callq 0x98c6
decl %r14d
jne 0x843c1
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9d0f3(%rip), %rdi     # 0x1231a8
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0x860da
leaq 0x2b5976(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x2b7abb(%rip), %rdi    # 0x33db90
callq 0x9340
callq 0x810b1
testl %eax, %eax
je 0x860fa
leaq 0x2b5956(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x2b7acb(%rip), %rdi    # 0x33dbc0
callq 0x9340
callq 0x810b1
testl %eax, %eax
je 0x8611a
leaq 0x2b5936(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x2b7adb(%rip), %rdi    # 0x33dbf0
callq 0x9340
callq 0x810b1
testl %eax, %eax
je 0x8613a
leaq 0x2b5916(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x2b7aeb(%rip), %rdi    # 0x33dc20
callq 0x9340
callq 0x810b1
testl %eax, %eax
je 0x8615a
leaq 0x2b58f6(%rip), %rsi    # 0x33ba40
movb $0x0, 0x20(%rsi)
leaq 0x2b7afb(%rip), %rdi    # 0x33dc50
callq 0x9340
leaq 0x28740f(%rip), %rax    # 0x30d570
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x86171
jnp 0x861b0
leaq 0x1b81f0(%rip), %rax    # 0x23e368
cmpq $0x0, (%rax)
jne 0x8619a
leaq 0x1b81db(%rip), %rax    # 0x23e360
cmpq $0x0, (%rax)
je 0x861a6
leaq 0x1b82b6(%rip), %rax    # 0x23e448
cmpl $0x12e, (%rax)          # imm = 0x12E
jne 0x861a6
leaq 0x28717b(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
je 0x861b0
leaq 0x2877c7(%rip), %rax    # 0x30d974
orb $0xf, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x9cfc6(%rip), %rdi     # 0x1231d8
callq 0x58dc2
callq 0x810b1
testl %eax, %eax
je 0x86283
leaq 0x2b5819(%rip), %rdi    # 0x33ba40
callq 0x9470
xorl %eax, %eax
ucomisd 0x8579a(%rip), %xmm0    # 0x10b9d0
movl $0x82, %ecx
cmovnel %eax, %ecx
cmovpl %eax, %ecx
ucomisd 0x82e27(%rip), %xmm0    # 0x109070
movl $0x2, %eax
cmovnel %ecx, %eax
cmovpl %ecx, %eax
leaq 0x287ac8(%rip), %rcx    # 0x30dd23
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movb %al, (%rcx)
setp %al
setne %cl
orb %al, %cl
leaq 0x287aac(%rip), %rax    # 0x30dd20
movb %cl, (%rax)
leaq 0x287053(%rip), %rax    # 0x30d2d0
movl $0xc, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x862ad
leaq 0x2b57ad(%rip), %rdi    # 0x33ba40
callq 0x9470
leaq 0x287b39(%rip), %rax    # 0x30ddd8
movsd %xmm0, (%rax)
leaq 0x28700e(%rip), %rax    # 0x30d2b8
orb $0x1, (%rax)
callq 0x810b1
callq 0x810b1
callq 0x810b1
callq 0x810b1
leaq 0x28700c(%rip), %rax    # 0x30d2d4
movl $0xc, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_pashr()
void parse_pashr()
{
   if(get_msg_field() == 0) return;
if(debug_file) fprintf(debug_file, "Parsing Z12: %s\n", msg_field);

   if     (strstr(msg_field, "PBN")) parse_z12_pbn();  // binary messages
   else if(strstr(msg_field, "ALM")) parse_z12_alm();
   else if(strstr(msg_field, "EPB")) parse_z12_epb();
   else if(strstr(msg_field, "MPC")) parse_z12_mpc();
   else if(strstr(msg_field, "RPC")) parse_z12_rpc();
   else if(strstr(msg_field, "SNV")) parse_z12_snv();

   else if(strstr(msg_field, "RID")) parse_z12_rid();
   else if(strstr(msg_field, "POS")) parse_z12_pos();
   else if(strstr(msg_field, "EXT")) parse_z12_ext();
   else if(strstr(msg_field, "PPS")) parse_z12_pps();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x810b1
testl %eax, %eax
je 0x86475
leaq 0x1b807a(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x86333
leaq 0x9cec3(%rip), %rsi     # 0x1231e8
leaq 0x2b5714(%rip), %rdx    # 0x33ba40
xorl %eax, %eax
callq 0x9560
leaq 0x2b5706(%rip), %rdi    # 0x33ba40
leaq 0x9ceb8(%rip), %rsi     # 0x1231f9
callq 0x9090
testq %rax, %rax
je 0x86351
popq %rbp
jmp 0x85d78
leaq 0x2b56e8(%rip), %rdi    # 0x33ba40
leaq 0x9ce9e(%rip), %rsi     # 0x1231fd
callq 0x9090
testq %rax, %rax
je 0x86372
leaq 0x9ce40(%rip), %rdi     # 0x1231b0
jmp 0x86391
leaq 0x2b56c7(%rip), %rdi    # 0x33ba40
leaq 0x9ce81(%rip), %rsi     # 0x123201
callq 0x9090
testq %rax, %rax
je 0x86397
leaq 0x9ce2f(%rip), %rdi     # 0x1231c0
popq %rbp
jmp 0x58dc2
leaq 0x2b56a2(%rip), %rdi    # 0x33ba40
leaq 0x9ce60(%rip), %rsi     # 0x123205
callq 0x9090
testq %rax, %rax
je 0x863b5
popq %rbp
jmp 0x8562a
leaq 0x2b5684(%rip), %rdi    # 0x33ba40
leaq 0x9ce46(%rip), %rsi     # 0x123209
callq 0x9090
testq %rax, %rax
je 0x863d6
leaq 0x9cdf4(%rip), %rdi     # 0x1231c8
jmp 0x86391
leaq 0x2b5663(%rip), %rdi    # 0x33ba40
leaq 0x9ce29(%rip), %rsi     # 0x12320d
callq 0x9090
testq %rax, %rax
je 0x863f7
leaq 0x9cdc3(%rip), %rdi     # 0x1231b8
jmp 0x86391
leaq 0x2b5642(%rip), %rdi    # 0x33ba40
leaq 0x9a4d7(%rip), %rsi     # 0x1208dc
callq 0x9090
testq %rax, %rax
je 0x86415
popq %rbp
jmp 0x860aa
leaq 0x2b5624(%rip), %rdi    # 0x33ba40
leaq 0x9fdac(%rip), %rsi     # 0x1261cf
callq 0x9090
testq %rax, %rax
je 0x86439
leaq 0x9cd9c(%rip), %rdi     # 0x1231d0
jmp 0x86391
leaq 0x2b5600(%rip), %rdi    # 0x33ba40
leaq 0x9b3bf(%rip), %rsi     # 0x121806
callq 0x9090
testq %rax, %rax
je 0x86457
popq %rbp
jmp 0x862d0
leaq 0x2b55e2(%rip), %rdi    # 0x33ba40
leaq 0x9ff2e(%rip), %rsi     # 0x126393
callq 0x9090
testq %rax, %rax
je 0x86475
popq %rbp
jmp 0x86207
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ss_config()
void parse_ss_config()
{
int ss_config;
int ss_antenna;

   log_packet_id("Receiver config");

   ss_config = tsip_byte() & 0x0F;

   nav_rate = (DATA_SIZE) (tsip_byte() & 0x03);
   if     (nav_rate == 0) nav_rate = 1;
   else if(nav_rate == 1) nav_rate = 2;
   else if(nav_rate == 2) nav_rate = 5;
   else                   nav_rate = 1;  // unknown rate

   ss_antenna = tsip_byte() & 0x03;  // antenna type (0=auto  1=active  2=passive)

   tsip_byte();  // rsvd
   tsip_word();  // max speed
   tsip_byte();  // max acceleration (bits 0..5)
   tsip_byte();  // statistical threshold
   tsip_byte();  // dead reconning threshold

   tsip_byte();  // rsvd
   tsip_byte();  // rsvd
   tsip_byte();  // rsvd
   tsip_byte();  // rsvd
   tsip_byte();  // rsvd
   tsip_byte();  // rsvd
   tsip_byte();  // rsvd
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9c089(%rip), %rdi     # 0x123357
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x872e9
leaq 0x1b7c8a(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x872ff
leaq 0x1b7c74(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
andl $0x3, %eax
leaq 0xa3b8f(%rip), %rcx     # 0x12ae98
movsd (%rcx,%rax,8), %xmm0
leaq 0x194043(%rip), %rax    # 0x21b358
movsd %xmm0, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8732f
leaq 0x1b7c44(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87345
leaq 0x1b7c2e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87360
leaq 0x1b7c13(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87376
leaq 0x1b7bfd(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8738c
leaq 0x1b7be7(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x873a2
leaq 0x1b7bd1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x873b8
leaq 0x1b7bbb(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x873ce
leaq 0x1b7ba5(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x873e4
leaq 0x1b7b8f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x873fa
leaq 0x1b7b79(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87410
leaq 0x1b7b63(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87426
leaq 0x1b7b4d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: get_ss_string(char*, int)
void get_ss_string(char *s, int len)
{
int i;

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

// Assembly:
testl %esi, %esi
jle 0x87658
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
xorl %r15d, %r15d
leaq 0x1b7956(%rip), %r12    # 0x23ef70
callq 0x587be
testq %rbx, %rbx
je 0x8763c
cmpl $0x100, %eax            # imm = 0x100
jb 0x87630
orb $0x8, (%r12)
movb %al, (%rbx,%r15)
movb $0x0, 0x1(%rbx,%r15)
jmp 0x87648
cmpl $0x100, %eax            # imm = 0x100
jb 0x87648
orb $0x8, (%r12)
incq %r15
cmpq %r15, %r14
jne 0x8761a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ss_id()
void parse_ss_id()
{
   log_packet_id("Version info");

   get_ss_string(ss_sw_pn, 14);
   get_ss_string(ss_model, 14);
   get_ss_string(ss_model_cksum, 4);
   get_ss_string(ss_boot_pn, 14);
   get_ss_string(ss_rsvd, 22);
   get_ss_string(ss_psn, 13);
   get_ss_string(ss_rsvd2, 4);
   ss_boot_cksum = tsip_word();
   ss_op_cksum = tsip_word();
   ss_type = tsip_byte();

   have_info |= ALL_ID_INFO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x9bd0c(%rip), %rdi     # 0x123376
callq 0x58dc2
movl $0x1, %r14d
leaq 0x2b5a94(%rip), %r15    # 0x33d110
leaq 0x1b78ed(%rip), %rbx    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87692
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0xf, %r14
jne 0x87683
movl $0x1, %r14d
leaq 0x2b5a8e(%rip), %r15    # 0x33d140
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x876c1
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0xf, %r14
jne 0x876b2
xorl %r14d, %r14d
leaq 0x2b5a92(%rip), %r15    # 0x33d170
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x876ed
orb $0x8, (%rbx)
movb %al, (%r14,%r15)
movb $0x0, 0x1(%r14,%r15)
incq %r14
cmpq $0x4, %r14
jne 0x876de
movl $0x1, %r14d
leaq 0x2b5a93(%rip), %r15    # 0x33d1a0
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8771c
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0xf, %r14
jne 0x8770d
movl $0x1, %r14d
leaq 0x2b5a94(%rip), %r15    # 0x33d1d0
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8774b
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0x17, %r14
jne 0x8773c
movl $0x1, %r14d
leaq 0x2b5a95(%rip), %r15    # 0x33d200
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8777a
orb $0x8, (%rbx)
movb %al, -0x1(%r15,%r14)
movb $0x0, (%r15,%r14)
incq %r14
cmpq $0xe, %r14
jne 0x8776b
xorl %r14d, %r14d
leaq 0x2b5a99(%rip), %r15    # 0x33d230
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x877a6
orb $0x8, (%rbx)
movb %al, (%r14,%r15)
movb $0x0, 0x1(%r14,%r15)
incq %r14
cmpq $0x4, %r14
jne 0x87797
callq 0x588d2
movzwl %ax, %eax
leaq 0x2b5a8c(%rip), %rcx    # 0x33d254
movl %eax, (%rcx)
callq 0x588d2
movzwl %ax, %eax
leaq 0x2b5a7f(%rip), %rcx    # 0x33d258
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x877ea
orb $0x8, (%rbx)
movzbl %al, %eax
leaq 0x2b5a68(%rip), %rcx    # 0x33d25c
movl %eax, (%rcx)
leaq 0x286177(%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_ss_health()
void parse_ss_health()
{
int prn;
int i;

   log_packet_id("Satellie health");

   reset_sat_health();
   for(prn=1; prn<=32; prn+=4) {
      i = tsip_byte();
      if(i & 0x03) sat[prn+0].health_flag = 1;
      if(i & 0x0C) sat[prn+1].health_flag = 1;
      if(i & 0x30) sat[prn+2].health_flag = 1;
      if(i & 0xC0) sat[prn+3].health_flag = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x9b917(%rip), %rdi     # 0x123393
callq 0x58dc2
xorl %eax, %eax
leaq 0x1b7526(%rip), %rcx    # 0x23efb0
movb $0x0, (%rcx,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd140, %rax          # imm = 0xCD140
jne 0x87a8a
movl $0xd20, %ebx            # imm = 0xD20
addq 0xc8498(%rip), %rbx     # 0x14ff40
movq $-0x3, %r14
leaq 0x1b74ba(%rip), %r15    # 0x23ef70
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87ac6
orb $0x8, (%r15)
testb $0x3, %al
je 0x87ad1
movb $0x1, -0x9d8(%rbx)
testb $0xc, %al
je 0x87adc
movb $0x1, -0x690(%rbx)
testb $0x30, %al
je 0x87ae7
movb $0x1, -0x348(%rbx)
testb $-0x40, %al
je 0x87aee
movb $0x1, (%rbx)
addq $0x4, %r14
addq $0xd20, %rbx            # imm = 0xD20
cmpq $0x1d, %r14
jb 0x87ab6
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_ss_utc()
void parse_ss_utc()
{
int wn_lsf;
int dn;
int valid;

   log_packet_id("UTC and ionosphere data");

   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_byte();
   tsip_dword();
   tsip_dword();
   tsip_byte();
   tsip_byte();
   tsip_byte();

   wn_lsf = tsip_byte();   // !!!! we need a 16 bit value here
   dn = tsip_byte();
   tsip_byte();
   valid = tsip_byte();

   tsip_dword();  // reserved
   tsip_dword();
   tsip_dword();
   tsip_dword();

   if(0 && valid) {
      calc_leap_days(wn_lsf, dn, 765);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9b692(%rip), %rdi     # 0x1233b5
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87d3e
leaq 0x1b7235(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87d54
leaq 0x1b721f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87d6a
leaq 0x1b7209(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87d80
leaq 0x1b71f3(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87d96
leaq 0x1b71dd(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87dac
leaq 0x1b71c7(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87dc2
leaq 0x1b71b1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87dd8
leaq 0x1b719b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87dee
leaq 0x1b7185(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
callq 0x58964
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87e0e
leaq 0x1b7165(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87e24
leaq 0x1b714f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87e3a
leaq 0x1b7139(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87e50
leaq 0x1b7123(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87e66
leaq 0x1b710d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87e7c
leaq 0x1b70f7(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87e92
leaq 0x1b70e1(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
callq 0x58964
callq 0x58964
popq %rbp
jmp 0x58964
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rftg_21()
void parse_rftg_21()
{
   log_packet_id("Packet 0x21 (unknown)");

   tsip_byte();  // 0x00
   tsip_byte();  // 01=OK 02=when not tracking
   tsip_byte();  // 0x74  0x16 when normal
   tsip_byte();  // 0x00
   tsip_byte();  // 40=antenna open
   tsip_byte();  // 0x15=ok 0x06=ok 0x01=ok 00=no signal
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9ae44(%rip), %rdi     # 0x1234d4
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x886ab
leaq 0x1b68c8(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x886c1
leaq 0x1b68b2(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x886d7
leaq 0x1b689c(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x886ed
leaq 0x1b6886(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88703
leaq 0x1b6870(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88719
leaq 0x1b685a(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rftg_phase()
void parse_rftg_phase()
{
   log_packet_id("Packet 0x22 (phase)");

   rftg_phase_err = (double) tsip_single();     // phase err ns
   rftg_phase_ref = (double) tsip_single();     // ref ns
   rftg_avg_phase = (double) tsip_single();     // avg phase?
   rftg_delta_ape_10m = (double) tsip_single(); // 10 min delta ape

   pps_offset = (OFS_SIZE) (double) rftg_avg_phase * 1.0E9;  // average phase
   have_pps_offset = 1;
//sprintf(debug_text, "phase: %g %g %g %g", v1,v2,v3,v4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x9adc2(%rip), %rdi     # 0x1234ea
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x2852ab(%rip), %rax    # 0x30d9e8
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x28529f(%rip), %rax    # 0x30d9f0
movsd %xmm0, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x285293(%rip), %rbx    # 0x30d9f8
movsd %xmm0, (%rbx)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x285297(%rip), %rax    # 0x30da10
movsd %xmm0, (%rax)
movsd (%rbx), %xmm0
mulsd 0x8089f(%rip), %xmm0    # 0x109028
leaq 0x284028(%rip), %rax    # 0x30c7b8
movsd %xmm0, (%rax)
leaq 0x284a9d(%rip), %rax    # 0x30d238
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_rftg_correction()
void parse_rftg_correction()
{
unsigned v2, v4;

   log_packet_id("Packet 0x24 (time/freq corrections)");

   rftg_time_corr = (double) tsip_single();             // time correction
   v2 = (unsigned) tsip_dword();   // age counter

   rftg_freq_corr = (double) tsip_single();             // freq correction
   v4 = (unsigned) tsip_dword();   // age counter

// sprintf(plot_title, "rftg24: %g %d %g %g", rftg_time_corr,v2,rftg_freq_corr,v4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9aaca(%rip), %rdi     # 0x12351b
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x284fe2(%rip), %rax    # 0x30da48
movsd %xmm0, (%rax)
callq 0x58964
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x284fd1(%rip), %rax    # 0x30da50
movsd %xmm0, (%rax)
popq %rbp
jmp 0x58964
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rftg_posn()
void parse_rftg_posn()
{
int i;
double v1,v2,v3;

   // rcvr posn
   log_packet_id("Packet 0x26 (position)");

   for(i=0; i<5; i++) {  // 5 sets of values RCVR, AVG. NVM0, NVM1, NVM2
       v1 = (double) (s32) tsip_dword();
       v2 = (double) (s32) tsip_dword();
       v3 = (double) (s32) tsip_dword();
       if(i == 0) {
          lat = (v1 / 3600000.0) * PI / 180.0;
          lon = (v2 / 3600000.0) * PI / 180.0;
          alt = (v3 / 100.0);
          have_rftg_lla = 1;
       }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x9a937(%rip), %rdi     # 0x12355f
callq 0x58dc2
movl $0x5, %r15d
leaq 0x2843a6(%rip), %r12    # 0x30cfe0
leaq 0x284e5f(%rip), %r13    # 0x30daa0
callq 0x58964
movl %eax, %ebx
callq 0x58964
movl %eax, %r14d
callq 0x58964
cmpl $0x5, %r15d
jne 0x88ccd
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r14d, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %ebx, %xmm2
movsd 0x95547(%rip), %xmm3    # 0x11e1c0
divsd %xmm3, %xmm2
movsd 0x82ba3(%rip), %xmm4    # 0x10b828
mulsd %xmm4, %xmm2
movsd 0x82b9f(%rip), %xmm5    # 0x10b830
divsd %xmm5, %xmm2
leaq 0x284334(%rip), %rax    # 0x30cfd0
movsd %xmm2, (%rax)
divsd %xmm3, %xmm1
mulsd %xmm4, %xmm1
divsd %xmm5, %xmm1
leaq 0x284325(%rip), %rax    # 0x30cfd8
movsd %xmm1, (%rax)
divsd 0x803a1(%rip), %xmm0    # 0x109060
movsd %xmm0, (%r12)
movl $0x1, (%r13)
decl %r15d
jne 0x88c41
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_rftg_additional_status()
void parse_rftg_additional_status()
{
int fw;

   log_packet_id("Packet 0x27 (additional status)");

   fw = tsip_word();  // fw version

   tsip_byte();  //
   tsip_byte();  //
   tsip_byte();  //
// maybe valid float seen here
   tsip_byte();  //
   tsip_byte();  //
// valid float seen here
   tsip_byte();  //
   tsip_byte();  //
   tsip_byte();  //
   tsip_byte();  //
   tsip_byte();  //

   rftg_sensitivity = (double) tsip_single(); // sensitivity
   rftg_pll_port = tsip_byte();   // pll status port
   rftg_pld_port = tsip_byte();   // pld status port
   tsip_byte();  //

// sprintf(debug_text, "adds:%g  pll:%02x pld:%02x", rftg_sensitivity, rftg_pll_port,rftg_pld_port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9a886(%rip), %rdi     # 0x123576
callq 0x58dc2
callq 0x588d2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88d10
leaq 0x1b6263(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88d26
leaq 0x1b624d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88d3c
leaq 0x1b6237(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88d52
leaq 0x1b6221(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88d68
leaq 0x1b620b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88d7e
leaq 0x1b61f5(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88d94
leaq 0x1b61df(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88daa
leaq 0x1b61c9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88dc0
leaq 0x1b61b3(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88dd6
leaq 0x1b619d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x284c4a(%rip), %rax    # 0x30da30
movsd %xmm0, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88e00
leaq 0x1b6173(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x284c8e(%rip), %rcx    # 0x30da98
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88e22
leaq 0x1b6151(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
leaq 0x284c70(%rip), %rcx    # 0x30da9c
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88e44
leaq 0x1b612f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rftg_cable()
void parse_rftg_cable()
{
float val;

   // cable delay in feet
   log_packet_id("Packet 0x55 (cable delay)");

   val = tsip_single();
   cable_delay = (double) val;  // cable delay in feet
   cable_delay = cable_delay / 1.0E9;
   cable_delay /= VELOCITY_FACTOR;  // cable delay in nanoseconds
   have_cable_delay = 1;
//sprintf(debug_text3, "rftg55: %f  %f", val, cable_delay);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9a75a(%rip), %rdi     # 0x1235cd
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
divsd 0x8019f(%rip), %xmm0    # 0x109028
divsd 0x82ae7(%rip), %xmm0    # 0x10b978
leaq 0x284f30(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x284411(%rip), %rax    # 0x30d2b4
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rftg_traim()
void parse_rftg_traim()
{
   // !!!!! we need to decode this
   log_packet_id("Packet 0x63 (traim status)");

   tsip_byte();  // message rate
   tsip_byte();  // alarm limit us (?)
   tsip_byte();  // status (0x0D)
   tsip_byte();  // 
   tsip_byte();  // 
   tsip_byte();  // 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9a738(%rip), %rdi     # 0x1235ff
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88ee2
leaq 0x1b6091(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88ef8
leaq 0x1b607b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88f0e
leaq 0x1b6065(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88f24
leaq 0x1b604f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88f3a
leaq 0x1b6039(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x88f50
leaq 0x1b6023(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rftg_fix_mode(int)
void set_rftg_fix_mode(int mode)
{
   // (mode == 0) -> fix mode
   if(read_only) return;

   start_rftg_request2(0);

   send_rftg_start(0x31);
   send_byte(mode);
   send_rftg_end();
}

// Assembly:
leaq 0x2adf1d(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x89103
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %edi, %edi
callq 0x657ff
movl $0x31, %edi
callq 0x5e6be
movzbl %bl, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rftg_advance(float)
void set_rftg_advance(float val)
{
   // advance pps (in microseconds)
   if(read_only) return;

   start_rftg_request2(0);

   send_rftg_start(0x30);
   send_byte(1);    // advance
   send_single(val);
   send_rftg_end();
}

// Assembly:
leaq 0x2adee4(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x8913c
retq
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
movss %xmm0, -0x4(%rbp)
callq 0x657ff
movl $0x30, %edi
callq 0x5e6be
movl $0x1, %edi
callq 0x590f7
movss -0x4(%rbp), %xmm0
callq 0x59376
addq $0x10, %rsp
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rftg_delay(float)
void set_rftg_delay(float val)
{
   // delay pps (in microseconds)
   if(read_only) return;

   start_rftg_request2(0);

   send_rftg_start(0x30);
   send_byte(2);    // delay
   send_single(val);
   send_rftg_end();
}

// Assembly:
leaq 0x2ade9b(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x89185
retq
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
movss %xmm0, -0x4(%rbp)
callq 0x657ff
movl $0x30, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
movss -0x4(%rbp), %xmm0
callq 0x59376
addq $0x10, %rsp
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: rftg_enable_cpu()
void rftg_enable_cpu()
{
   if(read_only) return;

   start_rftg_request2(0);

   send_rftg_start(0x30);
   send_byte(4); 
   send_dword(0);
   send_rftg_end();

   set_rftg_normal();
}

// Assembly:
leaq 0x2ade52(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x891ce
retq
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x657ff
movl $0x30, %edi
callq 0x5e6be
movl $0x4, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x592eb
callq 0x5e73c
xorl %edi, %edi
callq 0x65779
movl $0x45, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e73c