LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: skip_moto_msg()
void skip_moto_msg()
{
   log_packet_id("ignored message");
   while(moto_msg_len > 0) {
      tsip_byte();
      --moto_msg_len;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x886ff(%rip), %rdi     # 0x124dc1
callq 0x58e77
cmpl $0x0, 0x2d03fa(%rip)    # 0x36cac8
jle 0x9c6fa
leaq 0x1a2899(%rip), %rbx    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x9c6e6
orb $0x8, (%rbx)
movl 0x2d03dc(%rip), %eax    # 0x36cac8
leal -0x1(%rax), %ecx
movl %ecx, 0x2d03d3(%rip)    # 0x36cac8
cmpl $0x1, %eax
jg 0x9c6d7
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_scpi_delim(char)
int get_scpi_delim(char delim)
{
char c;
int i;

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

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

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

   return msg_field[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x29e4c0(%rip), %rax    # 0x33ba40
movb $0x0, (%rax)
leaq 0x29e6ba(%rip), %rcx    # 0x33bc44
movslq (%rcx), %rsi
leaq 0x29e29c(%rip), %rdx    # 0x33b830
cmpb $0x0, (%rdx,%rsi)
je 0x9d5da
movslq (%rcx), %rsi
movb (%rdx,%rsi), %r9b
testb %r9b, %r9b
je 0x9d5e2
xorl %r8d, %r8d
cmpb %dil, %r9b
je 0x9d5de
cmpl $0x1fe, %r8d            # imm = 0x1FE
jg 0x9d5cc
movslq %r8d, %r10
leaq 0x1(%r10), %r8
movb %r9b, (%rax,%r10)
movb $0x0, 0x1(%rax,%r10)
incl %esi
movl %esi, (%rcx)
movslq %esi, %r9
movb (%rdx,%r9), %r9b
testb %r9b, %r9b
jne 0x9d5a9
jmp 0x9d5e2
xorl %eax, %eax
jmp 0x9d5e5
incl %esi
movl %esi, (%rcx)
movsbl (%rax), %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_vis()
void parse_scpi_vis()
{
int prn;
int sat_count;

   log_packet_id("scpi vis");

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

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

   config_sat_count(sat_count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x87369(%rip), %rdi     # 0x124e45
callq 0x58e77
movl $0x21c, %eax            # imm = 0x21C
leaq 0x1a14c3(%rip), %r15    # 0x23efb0
movl $0x0, (%r15,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd35c, %rax          # imm = 0xCD35C
jne 0x9daed
leaq 0x29e13a(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
xorl %ebx, %ebx
testl %eax, %eax
je 0x9db64
leaq 0x29df1e(%rip), %r14    # 0x33ba40
leaq 0x26f7ef(%rip), %r12    # 0x30d318
movq %r14, %rdi
callq 0x95e0
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0x9db5b
movl %eax, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
movl $0xffffffff, 0x21c(%r15,%rax) # imm = 0xFFFFFFFF
incl %ebx
movl $0x28, (%r12)
callq 0x811da
testl %eax, %eax
jne 0x9db29
movl %ebx, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5e411
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_track()
void parse_scpi_track()
{
int prn;

   log_packet_id("scpi track");

   for(prn=0; prn<=MAX_PRN; prn++) { 
      sat[prn].tracking = sat[prn].visible;
      if(sat[prn].visible) sat[prn].level_msg = 14;
      else                 sat[prn].level_msg = 0;
      have_snr |= rinex_gnss(prn);
   }

   msg_col = 0;
   while(get_msg_field()) {
      prn = atoi(msg_field);
      if((prn >= 1) && (prn <= MAX_PRN)) { 
         sat[prn].tracking = (1);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x872c9(%rip), %rdi     # 0x124e4e
callq 0x58e77
movl $0x21c, %r14d           # imm = 0x21C
addq 0xb23a9(%rip), %r14     # 0x14ff40
xorl %ebx, %ebx
movl $0xe, %r15d
leaq 0x26f7a6(%rip), %r12    # 0x30d34c
movl (%r14), %eax
movl %eax, -0x4(%r14)
testl %eax, %eax
cmovnel %r15d, %eax
movl %eax, -0x200(%r14)
movl %ebx, %edi
callq 0xdbb74
orl %eax, (%r12)
incq %rbx
addq $0x348, %r14            # imm = 0x348
cmpq $0x3e8, %rbx            # imm = 0x3E8
jne 0x9dba6
leaq 0x29e065(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9dc2d
leaq 0x29de4b(%rip), %rbx    # 0x33ba40
leaq 0x1a13b4(%rip), %r14    # 0x23efb0
movq %rbx, %rdi
callq 0x95e0
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0x9dc24
movl %eax, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
movl $0x1, 0x218(%r14,%rax)
callq 0x811da
testl %eax, %eax
jne 0x9dbfc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_efc()
void parse_scpi_efc()
{
   log_packet_id("scpi efc");

   msg_col = 0;
   if(get_msg_field()) {
      dac_voltage = (float) atof(msg_field);
      if(rcvr_type == CS_RCVR) dac_voltage *= 100.0;
      have_dac = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x87218(%rip), %rdi     # 0x124e59
callq 0x58e77
leaq 0x29dff7(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9dca4
leaq 0x29dddd(%rip), %rdi    # 0x33ba40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x26ed89(%rip), %rax    # 0x30ca00
movsd %xmm0, (%rax)
leaq 0x17ac4e(%rip), %rcx    # 0x2188d0
cmpq $0x20000, (%rcx)        # imm = 0x20000
jne 0x9dc97
mulsd 0x6b3cd(%rip), %xmm0    # 0x109060
movsd %xmm0, (%rax)
leaq 0x26f65e(%rip), %rax    # 0x30d2fc
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_uccm_efc()
void parse_uccm_efc()
{
u32 val;

//kkkkkkuuuuuu
   log_packet_id("uccm efc");

   msg_col = 0;
   if(strstr(nmea_msg, "TO GPS")) {  // recovering from manual mode
      discipline_mode = DIS_MODE_RECOVERY;  // recovery
   }
   else if(strstr(nmea_msg, "RANGE")) {  // out of range
   }
   else if(get_msg_field() > 2) {
      if(discipline_mode == DIS_MODE_RECOVERY) discipline_mode = DIS_MODE_NORMAL;
      val = atohex(&msg_field[2]);
      uccm_voltage = (float) val;
   }
// sprintf(debug_text, "uccm voltage:%f  msg:%s", uccm_voltage, nmea_msg); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x871b1(%rip), %rdi     # 0x124e62
callq 0x58e77
leaq 0x29df87(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
leaq 0x29db66(%rip), %rdi    # 0x33b830
leaq 0x8719a(%rip), %rsi     # 0x124e6b
callq 0x9090
testq %rax, %rax
je 0x9dce7
leaq 0x26f7b5(%rip), %rax    # 0x30d497
movb $0x4, (%rax)
jmp 0x9dd3e
leaq 0x29db42(%rip), %rdi    # 0x33b830
leaq 0x878df(%rip), %rsi     # 0x1255d4
callq 0x9090
testq %rax, %rax
jne 0x9dd3e
callq 0x811da
cmpl $0x3, %eax
jl 0x9dd3e
leaq 0x26f787(%rip), %rax    # 0x30d497
cmpb $0x4, (%rax)
jne 0x9dd18
movb $0x0, (%rax)
leaq 0x29dd21(%rip), %rdi    # 0x33ba40
addq $0x2, %rdi
callq 0x98c6
movl %eax, %eax
cvtsi2ss %rax, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x26ecce(%rip), %rax    # 0x30ca08
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_uccm_led()
void parse_uccm_led()
{
int i;

   log_packet_id("uccm led");

   if(scpi_type == UCCMP_TYPE) { 
      if     (strstr(nmea_msg, "0")) strcpy(uccm_led_msg, "Initializing   ");
      else if(strstr(nmea_msg, "1")) strcpy(uccm_led_msg, "Normal         ");
      else goto uccm_style;
   }
   else {
      uccm_style:
      nmea_msg[16] = 0;
      strcpy(uccm_led_msg, nmea_msg);
      for(i=strlen(uccm_led_msg); i<16; i++) uccm_led_msg[i] = ' ';
      uccm_led_msg[16] = 0;
      strupr(uccm_led_msg);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x87125(%rip), %rdi     # 0x124e72
callq 0x58e77
leaq 0x17d287(%rip), %rax    # 0x21afe0
cmpl $0x50, (%rax)
jne 0x9ddab
leaq 0x29dacb(%rip), %rdi    # 0x33b830
movl $0x30, %esi
callq 0x9100
testq %rax, %rax
je 0x9dd7d
movups 0x87100(%rip), %xmm0    # 0x124e7b
jmp 0x9dd9a
leaq 0x29daac(%rip), %rdi    # 0x33b830
movl $0x31, %esi
callq 0x9100
testq %rax, %rax
je 0x9ddab
movups 0x870f1(%rip), %xmm0    # 0x124e8b
leaq 0x26eebf(%rip), %rax    # 0x30cc60
movaps %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x29da7e(%rip), %rsi    # 0x33b830
movb $0x0, 0x10(%rsi)
leaq 0x26eea3(%rip), %rbx    # 0x30cc60
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
callq 0x9120
cmpl $0xf, %eax
jg 0x9ddf2
cltq
leaq 0x26ee85(%rip), %rdi    # 0x30cc60
addq %rax, %rdi
movl $0xf, %edx
subl %eax, %edx
incq %rdx
movl $0x20, %esi
callq 0x91a0
movb $0x0, 0x10(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9899
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_cable()
void parse_scpi_cable()
{
   log_packet_id("scpi cable");

   msg_col = 0;
   if(get_msg_field()) {
      cable_delay = atof(msg_field);
      if(cable_delay >= 1.0) {  // cable delay is probably in nanoseconds (early firmware?)
         cable_delay *= 1.0E-9;
         cable_nsecs = 1;
      }
      else cable_nsecs = 0;  // standard is in seconds

      have_cable_delay = 1;
      show_cable_delay();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8708c(%rip), %rdi     # 0x124e9b
callq 0x58e77
leaq 0x29de29(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9de76
leaq 0x29dc0f(%rip), %rdi    # 0x33ba40
callq 0x9470
xorl %eax, %eax
ucomisd 0x6b230(%rip), %xmm0    # 0x109070
setae %cl
jb 0x9de4d
mulsd 0x803a3(%rip), %xmm0    # 0x11e1f0
movb %cl, %al
leaq 0x26ff72(%rip), %rcx    # 0x30ddc8
movsd %xmm0, (%rcx)
leaq 0x26ff87(%rip), %rcx    # 0x30dde8
movl %eax, (%rcx)
leaq 0x26f44a(%rip), %rax    # 0x30d2b4
movl $0x1, (%rax)
popq %rbp
jmp 0x754c4
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_elev()
void parse_scpi_elev()
{
   log_packet_id("scpi elev");

   msg_col = 0;
   if(get_msg_field()) {
      el_mask = (float) atof(msg_field);
      have_el_mask = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x87023(%rip), %rdi     # 0x124ea6
callq 0x58e77
leaq 0x29ddb5(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9dec6
leaq 0x29db9b(%rip), %rdi    # 0x33ba40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
leaq 0x26f1ff(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
leaq 0x26f53c(%rip), %rax    # 0x30d3fc
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_utc_ofs()
void parse_scpi_utc_ofs()
{
   log_packet_id("scpi utc ofs");

   msg_col = 0;
   if(!user_set_utc_ofs && get_msg_field()) {
      utc_offset = (int) atof(msg_field);
      check_utc_ofs(10);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x86fdd(%rip), %rdi     # 0x124eb0
callq 0x58e77
leaq 0x29dd65(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
leaq 0x26f848(%rip), %rax    # 0x30d734
cmpl $0x0, (%rax)
je 0x9def3
popq %rbp
retq
callq 0x811da
testl %eax, %eax
je 0x9def1
leaq 0x29db3d(%rip), %rdi    # 0x33ba40
callq 0x9470
cvttsd2si %xmm0, %ecx
leaq 0x26f815(%rip), %rax    # 0x30d728
movl %ecx, (%rax)
leaq 0x26f400(%rip), %rax    # 0x30d31c
cmpl $0x0, (%rax)
jne 0x9def1
leaq 0x26f5ec(%rip), %rdx    # 0x30d514
cmpl $0x7e1, (%rdx)          # imm = 0x7E1
setge %dl
cmpl $0x12, %ecx
setl %sil
andb %dl, %sil
cmpl $0x11, %ecx
setl %cl
orb %sil, %cl
jne 0x9def1
leaq 0x17a8f7(%rip), %rcx    # 0x218844
movl $0x7da, (%rcx)          # imm = 0x7DA
movl $0xa, (%rax)
jmp 0x9def1
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_tint()
void parse_scpi_tint()
{
   log_packet_id("scpi tint");

   msg_col = 0;
   if(get_msg_field()) {
      if(scpi_type == NORTEL_TYPE) pps_offset = (float) atof(msg_field)*1.0;
      else                         pps_offset = (float) atof(msg_field)*1.0E9;
      // doing adves of TINT handled in secondary_timing()
      have_pps_offset = 7;
      have_rcvr_pps = 7;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x86831(%rip), %rdi     # 0x124f8d
callq 0x58e77
leaq 0x29d4dc(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9e7c3
leaq 0x17c862(%rip), %rax    # 0x21afe0
movl (%rax), %ebx
leaq 0x29d2b9(%rip), %rdi    # 0x33ba40
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
cmpl $0x4e, %ebx
je 0x9e7a1
mulsd 0x6a887(%rip), %xmm0    # 0x109028
leaq 0x26e010(%rip), %rax    # 0x30c7b8
movsd %xmm0, (%rax)
leaq 0x26ea85(%rip), %rax    # 0x30d238
movl $0x7, %ecx
movl %ecx, (%rax)
leaq 0x26ea83(%rip), %rax    # 0x30d244
movl %ecx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_progress()
void parse_scpi_progress()
{
   log_packet_id("scpi progress");

   msg_col = 0;
   if(get_msg_field()) {
      survey_progress = (int) atof(msg_field);
      have_progress = 5;
      if(scpi_type == NORTEL_TYPE) {
         if(survey_progress != 100) minor_alarms |= MINOR_SURVEY;
         else                       minor_alarms &= (~MINOR_SURVEY);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x867c2(%rip), %rdi     # 0x124f97
callq 0x58e77
leaq 0x29d463(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9e83d
leaq 0x29d249(%rip), %rdi    # 0x33ba40
callq 0x9470
cvttsd2si %xmm0, %eax
leaq 0x26f685(%rip), %rcx    # 0x30de8c
movl %eax, (%rcx)
leaq 0x26f680(%rip), %rcx    # 0x30de90
movl $0x5, (%rcx)
leaq 0x17c7c3(%rip), %rcx    # 0x21afe0
cmpl $0x4e, (%rcx)
jne 0x9e83d
xorl %ecx, %ecx
cmpl $0x64, %eax
setne %cl
leaq 0x26e9a7(%rip), %rax    # 0x30d1d8
movl (%rax), %edx
andl $-0x21, %edx
shll $0x5, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_survey()
void parse_scpi_survey()
{
   log_packet_id("scpi survey");

   msg_col = 0;
// !!! should restore com_timeout
   if(get_msg_field()) {
      strupr(msg_field);
      if(strstr(msg_field, "ONCE"))   minor_alarms |= MINOR_SURVEY;
      else if(strstr(msg_field, "1")) minor_alarms |= MINOR_SURVEY;
      else                            minor_alarms &= (~MINOR_SURVEY);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x86759(%rip), %rdi     # 0x124fa5
callq 0x58e77
leaq 0x29d3ec(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9e8c0
leaq 0x29d1d2(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9899
leaq 0x83075(%rip), %rsi     # 0x1218f2
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x9e895
leaq 0x26e947(%rip), %rax    # 0x30d1d8
movl (%rax), %ecx
jmp 0x9e8b4
leaq 0x29d1a4(%rip), %rdi    # 0x33ba40
movl $0x31, %esi
callq 0x9100
leaq 0x26e92b(%rip), %rcx    # 0x30d1d8
movl (%rcx), %ecx
testq %rax, %rax
je 0x9e8c7
orl $0x20, %ecx
leaq 0x26e91a(%rip), %rax    # 0x30d1d8
movl %ecx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
andl $-0x21, %ecx
jmp 0x9e8b7
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_holdover()
void parse_scpi_holdover()
{
int state;

   log_packet_id("scpi holdover");

   msg_col = 0;
   if(get_msg_field()) {
      holdover = (int) atof(msg_field);
   }

   if(get_msg_field()) {
      state = atoi(msg_field);
      if(state) {  // in holdover mode
         discipline_mode = DIS_MODE_MANUAL_HOLD;
         if(!have_scpi_hold) user_holdover = 1;
if(scpi_type != UCCMP_TYPE) {  // kkkkkk
   rcvr_mode = RCVR_MODE_PROP;
   have_rcvr_mode = 10;
}
      }
      else {   // not in holdover
         discipline_mode = DIS_MODE_NORMAL;
         if(!have_scpi_hold) user_holdover = 0;
if(scpi_type != UCCMP_TYPE) {  // kkkkkk
   rcvr_mode = RCVR_MODE_HOLD;
   have_rcvr_mode = 10;
}
      }
      have_scpi_hold = 1;
   }
// !!! should restore com_timeout
if(debug_file) fprintf(debug_file, "### holdover:%d  dmode:%d  user:%d\n", holdover, discipline_mode, user_holdover);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x866da(%rip), %rdi     # 0x124fb1
callq 0x58e77
leaq 0x29d361(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9e90b
leaq 0x29d147(%rip), %rdi    # 0x33ba40
callq 0x9470
cvttsd2si %xmm0, %eax
leaq 0x26eb4f(%rip), %rcx    # 0x30d458
movl %eax, (%rcx)
callq 0x811da
testl %eax, %eax
je 0x9e9a1
leaq 0x29d121(%rip), %rdi    # 0x33ba40
callq 0x95e0
testl %eax, %eax
je 0x9e953
leaq 0x26eb68(%rip), %rax    # 0x30d497
movb $0x3, (%rax)
leaq 0x26eb27(%rip), %rax    # 0x30d460
cmpl $0x0, (%rax)
jne 0x9e948
leaq 0x26eb0f(%rip), %rax    # 0x30d454
movb $0x1, (%rax)
leaq 0x17c691(%rip), %rcx    # 0x21afe0
movb $0x8, %al
jmp 0x9e97c
leaq 0x26eb3d(%rip), %rax    # 0x30d497
movb $0x0, (%rax)
leaq 0x26eafc(%rip), %rax    # 0x30d460
cmpl $0x0, (%rax)
jne 0x9e973
leaq 0x26eae4(%rip), %rax    # 0x30d454
movb $0x0, (%rax)
leaq 0x17c666(%rip), %rcx    # 0x21afe0
movb $0x7, %al
cmpl $0x50, (%rcx)
je 0x9e994
leaq 0x26e748(%rip), %rcx    # 0x30d0d0
movb %al, (%rcx)
leaq 0x26ea7c(%rip), %rax    # 0x30d40d
movb $0xa, (%rax)
leaq 0x26eac5(%rip), %rax    # 0x30d460
movl $0x1, (%rax)
leaq 0x19f9e8(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x9e9dd
leaq 0x26eaa1(%rip), %rax    # 0x30d458
movl (%rax), %edx
leaq 0x26ead7(%rip), %rax    # 0x30d497
movzbl (%rax), %ecx
leaq 0x26ea8a(%rip), %rax    # 0x30d454
movzbl (%rax), %r8d
leaq 0x865ea(%rip), %rsi     # 0x124fbf
xorl %eax, %eax
popq %rbp
jmp 0x9560
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_utc()
void parse_scpi_utc()
{
int state;

   log_packet_id("scpi utc");

   msg_col = 0;
   if(get_msg_field()) {
      state = (int) atof(msg_field);
      if(state == 0) {  // GPS time
         time_flags &= (~TFLAGS_UTC);
         timing_mode = TMODE_GPS;
         have_timing_mode = 1;
      }
      else {  // utc time
         time_flags |= (TFLAGS_UTC);
         timing_mode = TMODE_UTC;
         have_timing_mode = 1;
      }
      have_rcvr_tmode = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x865f5(%rip), %rdi     # 0x124ff0
callq 0x58e77
leaq 0x29d23d(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9ea60
leaq 0x29d023(%rip), %rdi    # 0x33ba40
callq 0x9470
cvttsd2si %xmm0, %eax
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x26ea70(%rip), %rax    # 0x30d4a4
movl (%rax), %edx
andl $-0x2, %edx
orl %ecx, %edx
leal (%rcx,%rcx,2), %ecx
movl %edx, (%rax)
leaq 0x26ea76(%rip), %rax    # 0x30d4bd
movb %cl, (%rax)
leaq 0x26e97c(%rip), %rax    # 0x30d3cc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x26e972(%rip), %rax    # 0x30d3d0
movl %ecx, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_tunc()
void parse_scpi_tunc()
{
   log_packet_id("scpi tunc");

   msg_col = 0;
   if(get_msg_field()) {
      osc_offset = (float) atof(nmea_msg);
      have_osc_offset = 7;
      have_rcvr_osc = 7;
osc_offset *= 1000.0;
//    if(jitter_adev == 0) do_osc_adev(osc_offset);  // makes no sense to ADEV
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8658c(%rip), %rdi     # 0x124ff9
callq 0x58e77
leaq 0x29d1cb(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9eac6
leaq 0x29cda1(%rip), %rdi    # 0x33b830
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x26dd1d(%rip), %rax    # 0x30c7c0
leaq 0x26e78a(%rip), %rcx    # 0x30d234
movl $0x7, %edx
movl %edx, (%rcx)
leaq 0x26e790(%rip), %rcx    # 0x30d248
movl %edx, (%rcx)
mulsd 0x6a576(%rip), %xmm0    # 0x109038
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_edge()
void parse_scpi_edge()
{
   log_packet_id("scpi edge");

   msg_col = 0;
   if(get_msg_field()) {
      strupr(msg_field);
      if     (strstr(msg_field, "RIS")) {
         pps_polarity = 0;
         have_pps_polarity = 12;
      }
      else if(strstr(msg_field, "FAL")) {
         pps_polarity = 1;
         have_pps_polarity = 12;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8652e(%rip), %rdi     # 0x125003
callq 0x58e77
leaq 0x29d163(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9eb48
leaq 0x29cf49(%rip), %rbx    # 0x33ba40
movq %rbx, %rdi
callq 0x9899
leaq 0x824ec(%rip), %rsi     # 0x120ff2
movq %rbx, %rdi
callq 0x9090
xorl %ecx, %ecx
testq %rax, %rax
jne 0x9eb32
leaq 0x29cf24(%rip), %rdi    # 0x33ba40
leaq 0x864ea(%rip), %rsi     # 0x12500d
callq 0x9090
movl $0x1, %ecx
testq %rax, %rax
je 0x9eb48
leaq 0x26f1df(%rip), %rax    # 0x30dd18
movl %ecx, (%rax)
leaq 0x26e79e(%rip), %rax    # 0x30d2e0
movl $0xc, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_life()
void parse_scpi_life()
{
   log_packet_id("scpi life");

   msg_col = 0;
   if(get_msg_field()) {
      scpi_life = atoi(msg_field) * 3;
      have_lifetime = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x864b7(%rip), %rdi     # 0x125011
callq 0x58e77
leaq 0x29d0de(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9eb9a
leaq 0x29cec4(%rip), %rdi    # 0x33ba40
callq 0x95e0
leal (%rax,%rax,2), %eax
leaq 0x26e8d1(%rip), %rcx    # 0x30d45c
movl %eax, (%rcx)
leaq 0x26e734(%rip), %rax    # 0x30d2c8
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_test()
void parse_scpi_test()
{
// !!! should restore com_timeout
   log_packet_id("scpi test");

   msg_col = 0;
   if(get_msg_field()) {
      scpi_test = atoi(nmea_msg);
      have_scpi_test = 1;
if(debug_file) fprintf(debug_file, "### self test:%04X\n", scpi_test);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x86498(%rip), %rdi     # 0x12503f
callq 0x58e77
leaq 0x29d091(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9ec04
leaq 0x29cc67(%rip), %rdi    # 0x33b830
callq 0x95e0
leaq 0x26e863(%rip), %rcx    # 0x30d438
movl %eax, (%rcx)
leaq 0x26e822(%rip), %rcx    # 0x30d400
movl $0x1, (%rcx)
leaq 0x19f7a5(%rip), %rcx    # 0x23e390
movq (%rcx), %rdi
testq %rdi, %rdi
je 0x9ec04
leaq 0x8644f(%rip), %rsi     # 0x125049
movl %eax, %edx
xorl %eax, %eax
popq %rbp
jmp 0x9560
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_operation()
void parse_scpi_operation()
{
int status;

   log_packet_id("scpi operation");

   if(scpi_type != NORTEL_TYPE) return;

   // 0x0002 - locked
   // 0x0004 - holdover/unlocked modes
   // 0x0008 - position hold
   // 0x0010 - sats tracked
   // 0x0020 - hardware status reg set
   // 0x0040 - diagnostic log almost full
   // 0x0080 - over temp
   // 0x0100 - under temp
   // 0x0200 - antenna fault

   msg_col = 0;
   if(get_msg_field()) {
      status = atoi(nmea_msg);
if(debug_file) fprintf(debug_file, "### operation status:%04X\n", status);
      if(status & 0x0080) {       // over temperature alarm
         temperature = 71.0F;
         have_temperature = 109;
      }
      else if(status & 0x0100) {  // under temperature alarm
         temperature = (-1.0F);
         have_temperature = 110;
      }
      else {
         temperature = 30.0F;     // normal temperature
         have_temperature = 111;
      }

      if(status & 0x0010) minor_alarms &= (~MINOR_NO_TRACK);  // sat tracking OK
      else                minor_alarms |= MINOR_NO_TRACK;
      have_tracking = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x862f6(%rip), %rdi     # 0x125085
callq 0x58e77
leaq 0x17c245(%rip), %rax    # 0x21afe0
cmpl $0x4e, (%rax)
jne 0x9ee4f
leaq 0x29ce99(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9ee4f
leaq 0x29ca6b(%rip), %rdi    # 0x33b830
callq 0x95e0
movl %eax, %ebx
leaq 0x19f5bd(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x9edeb
leaq 0x862b2(%rip), %rsi     # 0x125094
movl %ebx, %edx
xorl %eax, %eax
callq 0x9560
testb %bl, %bl
js 0x9ee09
xorl %eax, %eax
btl $0x8, %ebx
setae %al
leaq 0x7fc31(%rip), %rcx     # 0x11ea30
movsd (%rcx,%rax,8), %xmm0
orl $0x6e, %eax
jmp 0x9ee16
movl $0x6d, %eax
movsd 0x7f8f2(%rip), %xmm0    # 0x11e708
leaq 0x26dbfb(%rip), %rcx    # 0x30ca18
movsd %xmm0, (%rcx)
leaq 0x26e424(%rip), %rcx    # 0x30d24c
movl %eax, (%rcx)
leaq 0x26e3a7(%rip), %rax    # 0x30d1d8
movl (%rax), %ecx
andl $-0x9, %ecx
shrl %ebx
andl $0x8, %ebx
orl %ecx, %ebx
xorl $0x8, %ebx
movl %ebx, (%rax)
leaq 0x26e447(%rip), %rax    # 0x30d290
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_ignore()
void parse_scpi_ignore()
{
u32 val;
int count;
int prn;
int flag;

   log_packet_id("scpi ignore");

   count = 0;
   val = 0;

   msg_col = 0;
   while(get_msg_field()) {
      prn = atoi(msg_field);
      if((prn >= 1) && (prn <= 32)) { 
         val |= (1 << (prn-1));
         ++count;
      }
   }

   single_sat_prn = 0;
   have_single_prn = 1;
   if(count == 31) {  // all but 1 sat excluded
      for(prn=1; prn <= 32; prn++) {
         flag = (val & (1 << (prn-1)));
         if(flag == 0) {
            single_sat_prn = prn; 
            have_single_prn = 1;
            break;
         }
      }
   }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x8623f(%rip), %rdi     # 0x1250b8
callq 0x58e77
leaq 0x29cdbf(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9eeda
xorl %r15d, %r15d
leaq 0x29cba2(%rip), %rbx    # 0x33ba40
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x95e0
decl %eax
movl $0x1, %edx
movl %eax, %ecx
shll %cl, %edx
cmpl $0x20, %eax
adcl $0x0, %r12d
cmpl $0x20, %eax
cmovael %r15d, %edx
orl %edx, %r14d
callq 0x811da
testl %eax, %eax
jne 0x9eea4
cmpl $0x1f, %r12d
sete %dl
jmp 0x9eedf
xorl %edx, %edx
xorl %r14d, %r14d
leaq 0x26e1f6(%rip), %rax    # 0x30d0dc
movl $0x0, (%rax)
leaq 0x26e1ed(%rip), %rcx    # 0x30d0e0
movl $0x1, (%rcx)
testb %dl, %dl
je 0x9ef18
xorl %edx, %edx
btl %edx, %r14d
jae 0x9ef0e
incl %edx
cmpl $0x20, %edx
jne 0x9eeff
jmp 0x9ef18
incl %edx
movl %edx, (%rax)
movl $0x1, (%rcx)
movl %r14d, %eax
notl %eax
leaq 0x26e1c0(%rip), %rcx    # 0x30d0e4
movl %eax, (%rcx)
movl $0x349, %eax            # imm = 0x349
addq 0xb100e(%rip), %rax     # 0x14ff40
xorl %ecx, %ecx
btl %ecx, %r14d
setb (%rax)
incq %rcx
addq $0x348, %rax            # imm = 0x348
cmpq $0x20, %rcx
jne 0x9ef34
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_ign_count()
void parse_scpi_ign_count()
{
int val;

   log_packet_id("scpi count");

   msg_col = 0;
   if(get_msg_field()) {
      val = atoi(msg_field);  // single_sat_prn
      if(val & (single_sat_prn == 0)) {
         single_sat_prn = 32;  // !!!!! kludge
         have_single_prn = 0;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x86166(%rip), %rdi     # 0x1250c4
callq 0x58e77
leaq 0x29ccda(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9efa9
leaq 0x29cac0(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x26e150(%rip), %rcx    # 0x30d0dc
cmpl $0x0, (%rcx)
jne 0x9efa9
andl $0x1, %eax
je 0x9efa9
movl $0x20, (%rcx)
leaq 0x26e13d(%rip), %rax    # 0x30d0e0
movl $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_include()
void parse_scpi_include()
{
u32 val;
int count;
int prn;
int last_prn;

   log_packet_id("scpi include");

   if(scpi_type != NORTEL_TYPE) return;

   count = 0;
   val = 0;
   last_prn = 0;
   msg_col = 0;
   while(get_msg_field()) {
      prn = atoi(msg_field);
      if((prn >= 1) && (prn <= 32)) { 
         val |= 1 << (prn-1);
         last_prn = prn;
         ++count;
      }
   }

   if(count == 1) single_sat_prn = last_prn; 
   else           single_sat_prn = 0;
   have_single_prn = 1;

   sats_enabled = val;
   update_disable_list(sats_enabled);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x8610f(%rip), %rdi     # 0x1250cf
callq 0x58e77
leaq 0x17c014(%rip), %rax    # 0x21afe0
cmpl $0x4e, (%rax)
jne 0x9f086
leaq 0x29cc68(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9f03d
xorl %r12d, %r12d
leaq 0x29ca4b(%rip), %rbx    # 0x33ba40
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x95e0
leal -0x1(%rax), %ecx
cmpl $0x20, %ecx
adcl $0x0, %r13d
cmpl $0x20, %ecx
cmovbl %eax, %r15d
movl $0x1, %eax
shll %cl, %eax
cmpl $0x20, %ecx
cmovael %r12d, %eax
orl %eax, %r14d
callq 0x811da
testl %eax, %eax
jne 0x9effe
xorl %eax, %eax
cmpl $0x1, %r13d
cmovel %r15d, %eax
jmp 0x9f042
xorl %eax, %eax
xorl %r14d, %r14d
leaq 0x26e093(%rip), %rcx    # 0x30d0dc
movl %eax, (%rcx)
leaq 0x26e08e(%rip), %rax    # 0x30d0e0
movl $0x1, (%rax)
leaq 0x26e085(%rip), %rax    # 0x30d0e4
movl %r14d, (%rax)
movl $0x349, %eax            # imm = 0x349
addq 0xb0ed2(%rip), %rax     # 0x14ff40
xorl %ecx, %ecx
btl %ecx, %r14d
setae (%rax)
addq $0x348, %rax            # imm = 0x348
incq %rcx
cmpq $0x20, %rcx
jne 0x9f070
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_antenna()
void parse_scpi_antenna()
{
   log_packet_id("scpi antenna");

   minor_alarms &= (~MINOR_ANT_NO_PWR);
   if(strstr(nmea_msg, "OK")) ;
   else if(strstr(nmea_msg, "SHORT")) minor_alarms |= MINOR_ANT_SHORT;
   else if(strstr(nmea_msg, "OPEN"))  minor_alarms |= MINOR_ANT_OPEN; 
   else                               minor_alarms |= MINOR_ANT_NO_PWR; 
   have_antenna = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x85e2e(%rip), %rdi     # 0x125114
callq 0x58e77
leaq 0x26dee6(%rip), %rbx    # 0x30d1d8
movl (%rbx), %r15d
movl %r15d, %r14d
andl $-0x7, %r14d
movl %r14d, (%rbx)
leaq 0x29c52a(%rip), %rdi    # 0x33b830
leaq 0x88241(%rip), %rsi     # 0x12754e
callq 0x9090
testq %rax, %rax
jne 0x9f35d
leaq 0x29c512(%rip), %rdi    # 0x33b830
leaq 0x85dfc(%rip), %rsi     # 0x125121
callq 0x9090
testq %rax, %rax
je 0x9f335
orl $0x4, %r14d
jmp 0x9f35a
leaq 0x29c4f4(%rip), %rdi    # 0x33b830
leaq 0x85de4(%rip), %rsi     # 0x125127
callq 0x9090
testq %rax, %rax
je 0x9f353
orl $0x2, %r14d
jmp 0x9f35a
orl $0x6, %r15d
movl %r15d, %r14d
movl %r14d, (%rbx)
leaq 0x26dec8(%rip), %rax    # 0x30d22c
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_uccm_rate()
void parse_uccm_rate()
{
   log_packet_id("uccm rate");

   msg_col = 0;
   if(get_msg_field()) {
      if(strstr(msg_field, "PP1S")) {
         pps_rate = RATE_1PPS;
         have_pps_rate = 6;
//pps_enabled = 1;
      }
      else if(strstr(msg_field, "PP2S")) {
         pps_rate = RATE_PP2S;
         have_pps_rate = 6;
//pps_enabled = 1;
      }
//    have_pps_enable = 10;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x85da5(%rip), %rdi     # 0x125136
callq 0x58e77
leaq 0x29c8a7(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9f3f6
leaq 0x29c68d(%rip), %rdi    # 0x33ba40
leaq 0x81e1d(%rip), %rsi     # 0x1211d7
callq 0x9090
movb $0x2, %cl
testq %rax, %rax
jne 0x9f3e0
leaq 0x29c673(%rip), %rdi    # 0x33ba40
leaq 0x81df2(%rip), %rsi     # 0x1211c6
callq 0x9090
movb $-0x7e, %cl
testq %rax, %rax
je 0x9f3f6
leaq 0x26e93c(%rip), %rax    # 0x30dd23
movb %cl, (%rax)
leaq 0x26dee0(%rip), %rax    # 0x30d2d0
movl $0x6, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_uccm_pullin()
void parse_uccm_pullin()
{
char *s;

   log_packet_id("uccm pullin");

   msg_col = 0;
   s = strchr(nmea_msg, '[');
   if(s) {
      if(*s+1) {
         if(strstr(s+1, "UNLIMITED")) pullin_range = 0;
         else                         pullin_range = atoi(s+1);
         have_pullin = 1;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x85cf7(%rip), %rdi     # 0x125151
callq 0x58e77
leaq 0x29c7de(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
leaq 0x29c3bd(%rip), %rdi    # 0x33b830
movl $0x5b, %esi
callq 0x9100
testq %rax, %rax
je 0x9f4c4
movq %rax, %rbx
cmpb $-0x1, (%rax)
je 0x9f4c4
incq %rbx
leaq 0x85cc9(%rip), %rsi     # 0x12515d
movq %rbx, %rdi
callq 0x9090
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
jne 0x9f4ae
movq %rbx, %rdi
callq 0x95e0
leaq 0x26dcb7(%rip), %rcx    # 0x30d16c
movl %eax, (%rcx)
leaq 0x26dcb2(%rip), %rax    # 0x30d170
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_uccm_hw_alarm()
void parse_uccm_hw_alarm()
{
   log_packet_id("uccm hw alarm");

   msg_col = 0;
   if(get_msg_field()) {
      have_critical_alarms = 666;
      critical_alarms &= (~CRIT_PWR);
      if(strstr(msg_field, "POWER")) {   // SAMSUNG_TYPE
         critical_alarms |= (CRIT_PWR);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x85c8e(%rip), %rdi     # 0x125167
callq 0x58e77
leaq 0x29c75f(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
callq 0x811da
testl %eax, %eax
je 0x9f532
leaq 0x26ddad(%rip), %rax    # 0x30d2a8
movl $0x29a, (%rax)          # imm = 0x29A
leaq 0x26dcc8(%rip), %rbx    # 0x30d1d0
movl (%rbx), %r14d
movl %r14d, %eax
andl $-0x5, %eax
movl %eax, (%rbx)
leaq 0x29c526(%rip), %rdi    # 0x33ba40
leaq 0x85c54(%rip), %rsi     # 0x125175
callq 0x9090
testq %rax, %rax
je 0x9f532
orl $0x4, %r14d
movl %r14d, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_scpi_status()
void parse_scpi_status()
{
//if(debug_file) fprintf(debug_file, "%s\n", nmea_msg);

   // decode the HIDEIOUS multi-line SCPI STATUS message (that takes three
   // seconds for the receiver to send.
   log_packet_id("scpi status");

   scpi_status = 1;
   saw_uccm_dmode = 0;
   scpi_tracked = scpi_not_tracked = 0;
   scpi_col = 0;
   scpi_status_line[0] = 0;
   no_uccm_ref = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x85c26(%rip), %rdi     # 0x12518b
callq 0x58e77
movl $0x1, 0x2d0a70(%rip)    # 0x36ffe4
leaq 0x17ba9d(%rip), %rax    # 0x21b018
xorl %ecx, %ecx
movl %ecx, (%rax)
movl %ecx, 0x2d294f(%rip)    # 0x371ed4
movl %ecx, 0x2d2945(%rip)    # 0x371ed0
movl %ecx, 0x2cd633(%rip)    # 0x36cbc4
movb $0x0, 0x2cd5a8(%rip)    # 0x36cb40
movl %ecx, 0x2d0a4a(%rip)    # 0x36ffe8
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_scpi_status(unsigned char)
void get_scpi_status(u08 c)
{
   if(c == 0x0D) return;

   if(c == 0x0A) {  // end-of-line, process it
      strupr(scpi_status_line);
      if(strstr(scpi_status_line, "SELF TEST")) {
         parse_scpi_status_test();
         scpi_status = 0;
poll_next_scpi(); //;;;;;;;;
      }
      else if(strstr(scpi_status_line, "PRN") && strstr(scpi_status_line, "EL")) {  // tracking info follows
         if(strstr(scpi_status_line, "SS")) adjust_scpi_ss = 1;
         else                               adjust_scpi_ss = 0;
         scpi_status = 2;
         if(rcvr_type == UCCM_RCVR) {
            reset_sat_tracking();
         }
      }
      else if(strstr(scpi_status_line, "ELEV") && strstr(scpi_status_line, "MASK")) {  // end of tracking info
         scpi_status = 4; // skip lines until we see the "SELF TEST" or "------------" end-of-status line
      }
      if(scpi_status == 2) {
         parse_scpi_azel();
      }

      scpi_col = 0;
      scpi_status_line[0] = 0;
   }
   else {
      if(scpi_col < ((int)sizeof(scpi_status_line)-2)) {
         scpi_status_line[scpi_col++] = c;
         scpi_status_line[scpi_col] = 0;
      }
   }
}

// Assembly:
cmpl $0xd, %edi
je 0x9ffe3
cmpl $0xa, %edi
jne 0x9ffbc
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2ccbda(%rip), %rbx    # 0x36cb40
movq %rbx, %rdi
callq 0x9899
leaq 0x8555b(%rip), %rsi     # 0x1254d0
movq %rbx, %rdi
callq 0x9090
testq %rax, %rax
je 0x9ffe4
callq 0x9fd51
movl $0x0, 0x2d0053(%rip)    # 0x36ffe4
callq 0x6f4fd
cmpl $0x2, 0x2d0047(%rip)    # 0x36ffe4
jne 0x9ffa4
callq 0x9f964
movl $0x0, 0x2ccc16(%rip)    # 0x36cbc4
movb $0x0, 0x2ccb8b(%rip)    # 0x36cb40
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movslq 0x2ccc01(%rip), %rax    # 0x36cbc4
cmpq $0x7e, %rax
jg 0x9ffe3
leaq 0x1(%rax), %rcx
movl %ecx, 0x2ccbf1(%rip)    # 0x36cbc4
leaq 0x2ccb66(%rip), %rcx    # 0x36cb40
movb %dil, (%rax,%rcx)
movb $0x0, 0x1(%rax,%rcx)
retq
leaq 0x2ccb55(%rip), %rdi    # 0x36cb40
leaq 0x9308d(%rip), %rsi     # 0x13307f
callq 0x9090
testq %rax, %rax
je 0xa0082
leaq 0x2ccb39(%rip), %rdi    # 0x36cb40
leaq 0x69f8e(%rip), %rsi     # 0x109f9c
callq 0x9090
testq %rax, %rax
je 0xa0082
leaq 0x2ccb21(%rip), %rdi    # 0x36cb40
leaq 0x93324(%rip), %rsi     # 0x13334a
callq 0x9090
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leaq 0x17afe2(%rip), %rax    # 0x21b01c
movl %ecx, (%rax)
movl $0x2, 0x2cff9e(%rip)    # 0x36ffe4
leaq 0x178883(%rip), %rax    # 0x2188d0
cmpq $0x8, (%rax)
jne 0x9ff96
movl $0x218, %eax            # imm = 0x218
leaq 0x19ef4d(%rip), %rcx    # 0x23efb0
xorl %edx, %edx
movl %edx, (%rcx,%rax)
movl %edx, -0x1fc(%rcx,%rax)
addq $0x348, %rax            # imm = 0x348
cmpq $0xcd358, %rax          # imm = 0xCD358
jne 0xa0065
jmp 0x9ff96
leaq 0x2ccab7(%rip), %rdi    # 0x36cb40
leaq 0x8544a(%rip), %rsi     # 0x1254da
callq 0x9090
testq %rax, %rax
je 0x9ff96
leaq 0x2cca9b(%rip), %rdi    # 0x36cb40
leaq 0x82d74(%rip), %rsi     # 0x122e20
callq 0x9090
testq %rax, %rax
je 0x9ff96
movl $0x4, 0x2cff20(%rip)    # 0x36ffe4
jmp 0x9ff96
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_scpi_message()
void get_scpi_message()
{
u08 c;
static int row = 0;

   // This routine buffers up an incomming SCPI message.  When the end of the
   // message is seen, the message is parsed and decoded with decode_scpi_msg()

   if(SERIAL_DATA_AVAILABLE(RCVR_PORT) == 0) {
      check_com_timer(RCVR_PORT);
      return;
   }
   else {
      reset_com_timer(RCVR_PORT);
   }


   c = get_com_char();
   if(scpi_status) {   // we are reading the SYST:STAT? results
      get_scpi_status(c);
      return;
   }

   if(com[RCVR_PORT].rcv_error) {      // parity/framing/overrun errors
      com[RCVR_PORT].rcv_error = 0;
//!!!!!qqqq    goto rst_msg;
   }

   if(tsip_sync == 0) {    // syncing to start of message, search for a '$'
      if(c == '>') {
         tsip_sync = 1;
         get_sync_time();
      }

      rst_msg:
      tsip_wptr = 0;
      tsip_rptr = 0;
      return;
   }
   else if(tsip_sync == 1) { // '>' has been seen, now build the message
      if(c == 0x0D) goto scpi_end; 
      else if(c == 0x0A) goto scpi_end; 
      else if(c == '>')  {  // null response to SCPI command
         decode_scpi_msg();
         packet_end = 1;
         tsip_sync = 1; 
         tsip_rptr = 0;
         tsip_wptr = 0;
         return;
      }

      if(tsip_wptr < MAX_TSIP) {  // so add it to the message buffer
         tsip_buf[tsip_wptr++] = c;
      }
      else {
         tsip_sync = 0;
         goto rst_msg;
      }
   }
   else {
      scpi_end:
      decode_scpi_msg();
      packet_end = 1;
      tsip_sync = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0xa, %edi
callq 0xb9c3
movl $0xa, %edi
testl %eax, %eax
je 0xa0103
callq 0x1ea2c
callq 0x584d5
cmpl $0x0, 0x2cfef1(%rip)    # 0x36ffe4
je 0xa010e
movzbl %al, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9ff4b
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1e6a0
leaq 0x26e1cb(%rip), %rcx    # 0x30e2e0
cmpb $0x0, 0x17a12(%rcx)
je 0xa0125
movb $0x0, 0x17a12(%rcx)
leaq 0x29812a(%rip), %rbx    # 0x338256
movzwl (%rbx), %ecx
cmpw $0x1, %cx
je 0xa0163
movzwl %cx, %ecx
testl %ecx, %ecx
jne 0xa019b
cmpl $0x3e, %eax
jne 0xa014b
movw $0x1, (%rbx)
callq 0x58682
leaq 0x298100(%rip), %rax    # 0x338252
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2980f6(%rip), %rax    # 0x338254
movw %cx, (%rax)
jmp 0xa01af
cmpl $0xa, %eax
je 0xa019b
cmpl $0xd, %eax
je 0xa019b
cmpl $0x3e, %eax
jne 0xa01b6
callq 0x9f5a0
movl $0x1, 0x2cbb13(%rip)    # 0x36bc94
movw $0x1, (%rbx)
leaq 0x2980c7(%rip), %rax    # 0x338254
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2980b9(%rip), %rax    # 0x338252
jmp 0xa015e
callq 0x9f5a0
movl $0x1, 0x2cbaea(%rip)    # 0x36bc94
movw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x298095(%rip), %rdx    # 0x338252
movzwl (%rdx), %ecx
cmpq $0xfff, %rcx            # imm = 0xFFF
ja 0xa01db
leal 0x1(%rcx), %esi
movw %si, (%rdx)
leaq 0x29707a(%rip), %rdx    # 0x337250
movb %al, (%rdx,%rcx)
jmp 0xa01af
movw $0x0, (%rbx)
jmp 0xa014b
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_uccm_loop()
void parse_uccm_loop()
{
   // prepare to decode the multi-line UCCM LOOP status message 
   log_packet_id("uccm loop");

   uccm_loop = 1;
   loop_fmt = TRIMBLE_FMT;   // assume Trimble format
   scpi_col = 0;
   scpi_status_line[0] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x852ef(%rip), %rdi     # 0x1254df
callq 0x58e77
movl $0x1, 0x2cfded(%rip)    # 0x36ffec
xorl %eax, %eax
movl %eax, 0x2cfde9(%rip)    # 0x36fff0
movl %eax, 0x2cc9b7(%rip)    # 0x36cbc4
movb $0x0, 0x2cc92c(%rip)    # 0x36cb40
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_uccm_temp()
void parse_uccm_temp()
{
char *s;

   log_packet_id("uccm temp");

   s = strstr(nmea_msg, "TEMP = ");  // samsung
   if(s) {
      temperature = (DATA_SIZE) atof(s+7);
      if(user_set_temp_plot == 0) plot[TEMP].show_plot = 1;
      have_temperature = 112;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x8504a(%rip), %rdi     # 0x125551
callq 0x58e77
leaq 0x29b31d(%rip), %rdi    # 0x33b830
leaq 0x85041(%rip), %rsi     # 0x12555b
callq 0x9090
testq %rax, %rax
je 0xa0565
addq $0x7, %rax
movq %rax, %rdi
callq 0x9470
leaq 0x26c4e1(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
leaq 0x26d920(%rip), %rax    # 0x30de62
cmpb $0x0, (%rax)
jne 0xa0558
leaq 0xbd7e2(%rip), %rax     # 0x15dd30
movl $0x1, 0x2d0(%rax)
leaq 0x26cced(%rip), %rax    # 0x30d24c
movl $0x70, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: uccm_time_line(int)
int uccm_time_line(int why)
{

   // this routine handles the case where the Symmetricom units send a 
   // time code packet in the middle of another message's response
   
   if(scpi_status_line[0] != 'C') return 0;  // line is not a time code line
   if(scpi_status_line[1] != '5') return 0;

   strcpy(nmea_msg, scpi_status_line);  // prepare to decode the time code line
   parse_uccm_time(why);                   // decode it

   scpi_col = 0;              // prepare to get the next line
   scpi_status_line[0] = 0;

   poll_next_uccm();  //kkkkkk
   return 1;
}

// Assembly:
xorl %eax, %eax
cmpb $0x43, 0x2cc5d0(%rip)   # 0x36cb40
jne 0xa05be
cmpb $0x35, 0x2cc5c8(%rip)   # 0x36cb41
jne 0xa05be
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x29b2a6(%rip), %rdi    # 0x33b830
leaq 0x2cc5af(%rip), %rsi    # 0x36cb40
callq 0x9340
movl %ebx, %edi
callq 0xa0216
movl $0x0, 0x2cc61d(%rip)    # 0x36cbc4
movb $0x0, 0x2cc592(%rip)    # 0x36cb40
callq 0x6fe5f
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_uccm_temp()
void decode_uccm_temp()
{
char *s;

   if(have_temperature) return;  // samsung

   s = strstr(scpi_status_line, "=");   //kkkkk
   if(s) {
      temperature = (float) atof(s+1);
      temperature *= 1.0E12F;
      if(temperature) have_uccm_tcor = 1;
      if(have_uccm_tcor) plot[TEMP].plot_id = "TCOR";
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x26c067(%rip), %rax    # 0x30d24c
cmpl $0x0, (%rax)
je 0xa11ec
popq %rbp
retq
leaq 0x2cb94d(%rip), %rdi    # 0x36cb40
movl $0x3d, %esi
callq 0x9100
testq %rax, %rax
je 0xa11ea
incq %rax
movq %rax, %rdi
callq 0x9470
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x7d4f3(%rip), %xmm0    # 0x11e710
leaq 0x26b7f4(%rip), %rax    # 0x30ca18
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xa1234
jnp 0xa1241
leaq 0x179dc9(%rip), %rax    # 0x21b004
movl $0x1, (%rax)
leaq 0x179dbc(%rip), %rax    # 0x21b004
cmpl $0x0, (%rax)
je 0xa11ea
leaq 0x692e4(%rip), %rax     # 0x10a538
leaq 0xbcad5(%rip), %rcx     # 0x15dd30
movq %rax, 0x2b8(%rcx)
jmp 0xa11ea
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_uccm_phase()
void decode_uccm_phase()
{
char *s;

   s = strstr(scpi_status_line, "=");   //kkkkk
   if(s) {
      pcorr = atof(s+1) * 1.0E12;
      have_uccm_pcor = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2cb8d1(%rip), %rdi    # 0x36cb40
movl $0x3d, %esi
callq 0x9100
testq %rax, %rax
je 0xa12a9
incq %rax
movq %rax, %rdi
callq 0x9470
mulsd 0x67ebf(%rip), %xmm0    # 0x109150
leaq 0x26b790(%rip), %rax    # 0x30ca28
movsd %xmm0, (%rax)
leaq 0x179d65(%rip), %rax    # 0x21b008
movl $0x1, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_uccm_gps_phase()
void decode_uccm_gps_phase()
{
char *s;

   s = strstr(scpi_status_line, "=");   //kkkkk
   if(s) {
      uccm_gps_phase = atof(s+1);
      have_uccm_gps_phase = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2cb88a(%rip), %rdi    # 0x36cb40
movl $0x3d, %esi
callq 0x9100
testq %rax, %rax
je 0xa12e8
incq %rax
movq %rax, %rdi
callq 0x9470
leaq 0x26b759(%rip), %rax    # 0x30ca30
movsd %xmm0, (%rax)
leaq 0x179d2a(%rip), %rax    # 0x21b00c
movl $0x1, (%rax)
popq %rbp
retq