LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: echo_nmea_string(char*)
void echo_nmea_string(char *ss)
{
u08 cksum;
char buf[2048+1];
unsigned i;

   // send a NMEA command out the NMEA_PORT.  Leading '$' and checksum are added.

   if(ss == 0) return;
   strcpy(buf,ss);

   sendout(NMEA_PORT, '$', ADD_CHAR);
   cksum = 0;

   for(i=0; i<strlen(buf); i++) {
      sendout(NMEA_PORT, buf[i], ADD_CHAR);
      cksum ^= buf[i];
   }

   sendout(NMEA_PORT, '*', ADD_CHAR);  
   i = (cksum >> 4) & 0x0F;
   if(i > 9) i += ('A'-10);
   else      i += '0';
   sendout(NMEA_PORT, (u08) i, ADD_CHAR);  
   i = cksum & 0x0F;
   if(i > 9) i += ('A'-10);
   else      i += '0';
   sendout(NMEA_PORT, (u08) i, ADD_CHAR);  

   sendout(NMEA_PORT, 0x0D, ADD_CHAR);
   sendout(NMEA_PORT, 0x0A, EOM);

   drain_port(NMEA_PORT);   // we ignore any data comming in the NMEA echo port

// if(debug_file) fprintf(debug_file, "echo nmea:%s\n", s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x820, %rsp            # imm = 0x820
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x7baeb
jmp 0x7bc5d
leaq -0x810(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x9350
movl $0xc, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0xd160
movb $0x0, -0x9(%rbp)
movl $0x0, -0x814(%rbp)
movl -0x814(%rbp), %eax
movq %rax, -0x820(%rbp)
leaq -0x810(%rbp), %rdi
callq 0x9120
movq %rax, %rcx
movq -0x820(%rbp), %rax
cmpq %rcx, %rax
jae 0x7bb84
movl -0x814(%rbp), %eax
movl $0xc, %edi
xorl %edx, %edx
movzbl -0x810(%rbp,%rax), %esi
callq 0xd160
movl -0x814(%rbp), %eax
movsbl -0x810(%rbp,%rax), %ecx
movzbl -0x9(%rbp), %eax
xorl %ecx, %eax
movb %al, -0x9(%rbp)
movl -0x814(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x814(%rbp)
jmp 0x7bb1a
movl $0xc, %edi
movl $0x2a, %esi
xorl %edx, %edx
callq 0xd160
movzbl -0x9(%rbp), %eax
sarl $0x4, %eax
andl $0xf, %eax
movl %eax, -0x814(%rbp)
cmpl $0x9, -0x814(%rbp)
jbe 0x7bbbf
movl -0x814(%rbp), %eax
addl $0x37, %eax
movl %eax, -0x814(%rbp)
jmp 0x7bbce
movl -0x814(%rbp), %eax
addl $0x30, %eax
movl %eax, -0x814(%rbp)
movl -0x814(%rbp), %eax
movl $0xc, %edi
xorl %edx, %edx
movzbl %al, %esi
callq 0xd160
movzbl -0x9(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x814(%rbp)
cmpl $0x9, -0x814(%rbp)
jbe 0x7bc0a
movl -0x814(%rbp), %eax
addl $0x37, %eax
movl %eax, -0x814(%rbp)
jmp 0x7bc19
movl -0x814(%rbp), %eax
addl $0x30, %eax
movl %eax, -0x814(%rbp)
movl -0x814(%rbp), %eax
movl $0xc, %edi
xorl %edx, %edx
movzbl %al, %esi
callq 0xd160
movl $0xc, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xd160
movl $0xc, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xd160
movl $0xc, %edi
callq 0x79900
addq $0x820, %rsp            # imm = 0x820
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_time()
double nmea_time()
{
double time;

   // return UTC time as a floating point number

//   gregorian(0, jd_utc);
   time = ((double) g_hours) * 100 * 100.0;
   time += ((double) g_minutes) * 100.0;
   time += ((double) g_seconds);
   time += g_frac;

   return time;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2f0c0d(%rip), %rax    # 0x36c888
cvtsi2sdl (%rax), %xmm0
movsd 0xf33c9(%rip), %xmm1    # 0x16f050
mulsd %xmm1, %xmm0
movsd 0xf33bd(%rip), %xmm1    # 0x16f050
mulsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
leaq 0x2f0be9(%rip), %rax    # 0x36c88c
cvtsi2sdl (%rax), %xmm0
movsd -0x8(%rbp), %xmm1
movsd 0xf339c(%rip), %xmm2    # 0x16f050
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
leaq 0x2f0bc8(%rip), %rax    # 0x36c890
cvtsi2sdl (%rax), %xmm0
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
leaq 0x2f0bbb(%rip), %rax    # 0x36c898
movsd (%rax), %xmm0
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_date()
int nmea_date()
{
int date;

   // return date as an integer (year modulo 100)

   date = g_day * 100 * 100;
   date += g_month * 100;
   date += (g_year % 100);

   return date;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2f0b75(%rip), %rax    # 0x36c880
imull $0x64, (%rax), %eax
imull $0x64, %eax, %eax
movl %eax, -0x4(%rbp)
leaq 0x2f0b61(%rip), %rax    # 0x36c87c
imull $0x64, (%rax), %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq 0x2f0b59(%rip), %rax    # 0x36c884
movl (%rax), %eax
movl $0x64, %ecx
cltd
idivl %ecx
addl -0x4(%rbp), %edx
movl %edx, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_lat()
char *nmea_lat()
{
static char s[256];
double val;
int deg;
char c;

   // return latitude as a NMEA format string

   if(lat < 0.0) c = 'S';
   else          c = 'N';

   val = fabs(lat) * 180.0 / PI;
   deg = (int) val;
   val -= (double) deg;        // fractional degrees
   val *= 60.0;                // fractional minutes
   val += (double) (deg*100);  // NMEA location

   s[0] = 0;
   if(echo_fmt & ECHO_LLA) sprintf(s, "%.4f,%c", val,c);
   else                    sprintf(s, "%.3f,%c", val,c);
   return &s[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorps %xmm0, %xmm0
leaq 0x2f045e(%rip), %rax    # 0x36c1b0
ucomisd (%rax), %xmm0
jbe 0x7bd5e
movb $0x53, -0xd(%rbp)
jmp 0x7bd62
movb $0x4e, -0xd(%rbp)
leaq 0x2f0447(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
movaps 0xf351c(%rip), %xmm1    # 0x16f290
pand %xmm1, %xmm0
movsd 0xf32f8(%rip), %xmm1    # 0x16f078
mulsd %xmm1, %xmm0
movsd 0xf583c(%rip), %xmm1    # 0x1715c8
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
cvttsd2si -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
cvtsi2sdl -0xc(%rbp), %xmm1
movsd -0x8(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd 0xf3260(%rip), %xmm0    # 0x16f018
mulsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
imull $0x64, -0xc(%rbp), %eax
cvtsi2sd %eax, %xmm0
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movb $0x0, 0x353415(%rip)    # 0x3cf1f0
movl 0x14d78f(%rip), %eax    # 0x1c9570
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7be0b
movsd -0x8(%rbp), %xmm0
movsbl -0xd(%rbp), %edx
leaq 0x3533f5(%rip), %rdi    # 0x3cf1f0
leaq 0x1076e0(%rip), %rsi    # 0x1834e2
movb $0x1, %al
callq 0x9060
jmp 0x7be29
movsd -0x8(%rbp), %xmm0
movsbl -0xd(%rbp), %edx
leaq 0x3533d5(%rip), %rdi    # 0x3cf1f0
leaq 0x1076c8(%rip), %rsi    # 0x1834ea
movb $0x1, %al
callq 0x9060
leaq 0x3533c0(%rip), %rax    # 0x3cf1f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_lon()
char *nmea_lon()
{
static char s[256];
double val;
int deg;
char c;

   // return longitude as a NMEA format string

   s[0] = 0;
   if(lon < 0.0) c = 'W';
   else          c = 'E';

   val = fabs(lon) * 180.0 / PI;
   deg = (int) val;
   val -= (double) deg;        // fractional degrees
   val *= 60.0;                // fractional minutes
   val += (double) (deg*100);  // NMEA location
   

   if(echo_fmt & ECHO_LLA) sprintf(s, "%.4f,%c", val,c);
   else                    sprintf(s, "%.3f,%c", val,c);
   return &s[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, 0x3534a1(%rip)    # 0x3cf2f0
xorps %xmm0, %xmm0
leaq 0x2f035f(%rip), %rax    # 0x36c1b8
ucomisd (%rax), %xmm0
jbe 0x7be65
movb $0x57, -0xd(%rbp)
jmp 0x7be69
movb $0x45, -0xd(%rbp)
leaq 0x2f0348(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
movaps 0xf3415(%rip), %xmm1    # 0x16f290
pand %xmm1, %xmm0
movsd 0xf31f1(%rip), %xmm1    # 0x16f078
mulsd %xmm1, %xmm0
movsd 0xf5735(%rip), %xmm1    # 0x1715c8
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
cvttsd2si -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
cvtsi2sdl -0xc(%rbp), %xmm1
movsd -0x8(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd 0xf3159(%rip), %xmm0    # 0x16f018
mulsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
imull $0x64, -0xc(%rbp), %eax
cvtsi2sd %eax, %xmm0
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movl 0x14d68f(%rip), %eax    # 0x1c9570
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7bf0b
movsd -0x8(%rbp), %xmm0
movsbl -0xd(%rbp), %edx
leaq 0x3533f5(%rip), %rdi    # 0x3cf2f0
leaq 0x1075e0(%rip), %rsi    # 0x1834e2
movb $0x1, %al
callq 0x9060
jmp 0x7bf29
movsd -0x8(%rbp), %xmm0
movsbl -0xd(%rbp), %edx
leaq 0x3533d5(%rip), %rdi    # 0x3cf2f0
leaq 0x1075c8(%rip), %rsi    # 0x1834ea
movb $0x1, %al
callq 0x9060
leaq 0x3533c0(%rip), %rax    # 0x3cf2f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_speed()
char *nmea_speed()
{
static char s[256];

   // return speed as a NMEA format string

   s[0] = 0;
   if(have_speed) {
      sprintf(s, "%.2f", speed / 0.514444);
   }
   return &s[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x353565(%rip)    # 0x3cf4f0
leaq 0x2f0586(%rip), %rax    # 0x36c518
cmpl $0x0, (%rax)
je 0x7bfc3
leaq 0x2f0262(%rip), %rax    # 0x36c200
movsd (%rax), %xmm0
movsd 0x106b7e(%rip), %xmm1   # 0x182b28
divsd %xmm1, %xmm0
leaq 0x35353b(%rip), %rdi    # 0x3cf4f0
leaq 0x10b27d(%rip), %rsi    # 0x187239
movb $0x1, %al
callq 0x9060
leaq 0x353526(%rip), %rax    # 0x3cf4f0
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_heading()
char *nmea_heading()
{
static char s[256];

   // return heading as a NMEA format string

   s[0] = 0;
   if(have_heading) {
      sprintf(s, "%.2f", heading);
   }
   return &s[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x353615(%rip)    # 0x3cf5f0
leaq 0x2f0532(%rip), %rax    # 0x36c514
cmpl $0x0, (%rax)
je 0x7c007
leaq 0x2f021a(%rip), %rax    # 0x36c208
movsd (%rax), %xmm0
leaq 0x3535f7(%rip), %rdi    # 0x3cf5f0
leaq 0x10b239(%rip), %rsi    # 0x187239
movb $0x1, %al
callq 0x9060
leaq 0x3535e2(%rip), %rax    # 0x3cf5f0
popq %rbp
retq
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_zda()
void send_zda()
{
   // send time/date as a NMEA GPZDA sentence
   
//   gregorian(0, jd_utc);

   if     (echo_fmt & ECHO_MSECS) sprintf(out, "GPZDA,%010.3f,%02d,%02d,%04d,00,00", nmea_time(), g_day,g_month,g_year);
   else if(echo_fmt & ECHO_HSECS) sprintf(out, "GPZDA,%09.2f,%02d,%02d,%04d,00,00", nmea_time(), g_day,g_month,g_year);
   else                           sprintf(out, "GPZDA,%06d,%02d,%02d,%04d,00,00", (int)nmea_time(), g_day,g_month,g_year);
   echo_nmea_string(out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x14d556(%rip), %eax    # 0x1c9570
andl $0x4, %eax
cmpl $0x0, %eax
je 0x7c05d
callq 0x7bc70
leaq 0x2f0852(%rip), %rax    # 0x36c880
movl (%rax), %edx
leaq 0x2f0845(%rip), %rax    # 0x36c87c
movl (%rax), %ecx
leaq 0x2f0844(%rip), %rax    # 0x36c884
movl (%rax), %r8d
leaq 0x31f3b6(%rip), %rdi    # 0x39b400
leaq 0x1074a9(%rip), %rsi    # 0x1834fa
movb $0x1, %al
callq 0x9060
jmp 0x7c0e0
movl 0x14d50d(%rip), %eax    # 0x1c9570
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7c0a3
callq 0x7bc70
leaq 0x2f0809(%rip), %rax    # 0x36c880
movl (%rax), %edx
leaq 0x2f07fc(%rip), %rax    # 0x36c87c
movl (%rax), %ecx
leaq 0x2f07fb(%rip), %rax    # 0x36c884
movl (%rax), %r8d
leaq 0x31f36d(%rip), %rdi    # 0x39b400
leaq 0x107483(%rip), %rsi    # 0x18351d
movb $0x1, %al
callq 0x9060
jmp 0x7c0de
callq 0x7bc70
cvttsd2si %xmm0, %edx
leaq 0x2f07cd(%rip), %rax    # 0x36c880
movl (%rax), %ecx
leaq 0x2f07c0(%rip), %rax    # 0x36c87c
movl (%rax), %r8d
leaq 0x2f07be(%rip), %rax    # 0x36c884
movl (%rax), %r9d
leaq 0x31f330(%rip), %rdi    # 0x39b400
leaq 0x107468(%rip), %rsi    # 0x18353f
movb $0x0, %al
callq 0x9060
jmp 0x7c0e0
leaq 0x31f319(%rip), %rdi    # 0x39b400
callq 0x7bad0
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: echo_nmea()
void echo_nmea()
{
int last_sec = 99;

   // send receiver data formmated as NMEA to the NMEA_PORT

   if(com[NMEA_PORT].process_com == 0) return;  // NMEA_PORT not open
   if(com[NMEA_PORT].com_running <= 0) return;
//ffff if(fake_time_stamp) return;   // don't echo faked time stamps so NTP works better?

   gregorian(0, jd_utc + jtime(0,0,0,TSX_TWEAK));

   if(echo_fmt & ECHO_ZDA) send_zda();
   if(echo_fmt & ECHO_VTG) send_vtg();  // we don't do this one for now
   if(echo_fmt & ECHO_RMC) send_rmc();
   if(echo_fmt & ECHO_GGA) send_gga();


   if(POLLED_RCVR) {
      if(g_seconds == (SCPI_STATUS_SECOND+10)) {
         if(echo_fmt & ECHO_GSA) send_gsa();
         if(echo_fmt & ECHO_GSV) send_gsv();
      }
   }
   else if((g_seconds % 10) == (SCPI_STATUS_SECOND%10)) {
      if(echo_fmt & ECHO_GSA) send_gsa();
      if(echo_fmt & ECHO_GSV) send_gsv();
   }

   last_sec = g_seconds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x63, -0x4(%rbp)
leaq 0x2f09ba(%rip), %rax    # 0x36d4c0
cmpl $0x0, 0x1beb4(%rax)
jne 0x7cb14
jmp 0x7cc66
leaq 0x2f09a5(%rip), %rax    # 0x36d4c0
cmpl $0x0, 0x1beb0(%rax)
jg 0x7cb29
jmp 0x7cc66
leaq 0x2efbe0(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
leaq 0x2f0568(%rip), %rax    # 0x36d0a8
movsd (%rax), %xmm0
movsd 0xf24e4(%rip), %xmm1    # 0x16f030
divsd %xmm1, %xmm0
xorl %edx, %edx
movl %edx, %edi
movl %edx, %esi
callq 0x122210
movaps %xmm0, %xmm1
movsd -0x10(%rbp), %xmm0
addsd %xmm1, %xmm0
xorl %edi, %edi
callq 0x11dd00
movl 0x14c9fc(%rip), %eax    # 0x1c9570
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x7cb83
callq 0x7c010
movl 0x14c9e7(%rip), %eax    # 0x1c9570
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x7cb98
callq 0x7cae0
movl 0x14c9d2(%rip), %eax    # 0x1c9570
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x7cbad
callq 0x7c0f0
movl 0x14c9bd(%rip), %eax    # 0x1c9570
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x7cbc2
callq 0x7c310
leaq 0x1faee7(%rip), %rcx    # 0x277ab0
movabsq $0x101b0e5018, %rax     # imm = 0x101B0E5018
andq (%rcx), %rax
cmpq $0x0, %rax
je 0x7cc16
leaq 0x2efcad(%rip), %rax    # 0x36c890
cmpl $0x2a, (%rax)
jne 0x7cc14
movl 0x14c982(%rip), %eax    # 0x1c9570
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x7cbfd
callq 0x7c5a0
movl 0x14c96d(%rip), %eax    # 0x1c9570
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x7cc12
callq 0x7c820
jmp 0x7cc14
jmp 0x7cc5a
leaq 0x2efc73(%rip), %rax    # 0x36c890
movl (%rax), %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x2, %edx
jne 0x7cc58
movl 0x14c93e(%rip), %eax    # 0x1c9570
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x7cc41
callq 0x7c5a0
movl 0x14c929(%rip), %eax    # 0x1c9570
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x7cc56
callq 0x7c820
jmp 0x7cc58
jmp 0x7cc5a
leaq 0x2efc2f(%rip), %rax    # 0x36c890
movl (%rax), %eax
movl %eax, -0x4(%rbp)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: dump_prn_info()
void dump_prn_info()
{
int i;

   if(prn_file == 0) return;
   if(new_sat_azel == 0) return;
   new_sat_azel = 0;

   for(i=0; i<=SUN_MOON_PRN; i++) {
      if((sat[i].tracking > 0) || (i == SUN_PRN) || (i == MOON_PRN)) {
         fprintf(prn_file, "%.6f %4d %6.2f %6.2f %6.2f\n", jd_utc, i, sat[i].azimuth, sat[i].elevation, sat[i].sig_level);
      }
   }

   ++prn_count;
   fprintf(prn_file, "# %d\n", prn_count);
   if(prn_flush_mode) fflush(prn_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x21eff9(%rip), %rax    # 0x29d558
cmpq $0x0, (%rax)
jne 0x7e56a
jmp 0x7e6b1
cmpl $0x0, 0x34ca2b(%rip)    # 0x3caf9c
jne 0x7e578
jmp 0x7e6b1
movl $0x0, 0x34ca1a(%rip)    # 0x3caf9c
movl $0x0, -0x4(%rbp)
cmpl $0x3e9, -0x4(%rbp)      # imm = 0x3E9
jg 0x7e660
movslq -0x4(%rbp), %rcx
leaq 0x21fbef(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
cmpl $0x0, 0x218(%rax)
jg 0x7e5ca
cmpl $0x3e8, -0x4(%rbp)      # imm = 0x3E8
je 0x7e5ca
cmpl $0x3e9, -0x4(%rbp)      # imm = 0x3E9
jne 0x7e650
leaq 0x21ef87(%rip), %rax    # 0x29d558
movq (%rax), %rdi
leaq 0x2ee135(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
movl -0x4(%rbp), %edx
movslq -0x4(%rbp), %rcx
leaq 0x21fba3(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x208(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movslq -0x4(%rbp), %rcx
leaq 0x21fb82(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20c(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
movslq -0x4(%rbp), %rcx
leaq 0x21fb61(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20(%rax), %xmm3
cvtss2sd %xmm3, %xmm3
leaq 0x10bfad(%rip), %rsi    # 0x18a5f6
movb $0x4, %al
callq 0x9550
jmp 0x7e652
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x7e589
leaq 0x21ef91(%rip), %rax    # 0x29d5f8
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x21ef85(%rip), %rax    # 0x29d5f8
movl %ecx, (%rax)
leaq 0x21eedc(%rip), %rax    # 0x29d558
movq (%rax), %rdi
leaq 0x21ef72(%rip), %rax    # 0x29d5f8
movl (%rax), %edx
leaq 0x10bf83(%rip), %rsi    # 0x18a612
movb $0x0, %al
callq 0x9550
leaq 0x21ef6f(%rip), %rax    # 0x29d60c
cmpl $0x0, (%rax)
je 0x7e6b1
leaq 0x21eeaf(%rip), %rax    # 0x29d558
movq (%rax), %rdi
callq 0x9430
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: set_gregorian_time(double)
void set_gregorian_time(double jd)
{
   // set the receiver time/date variables to jd decoded to gregorian

   gregorian(0, jd);  // convert julian date to gregorian

   pri_year = year = g_year;  // update date/time variables to the gregorian values
   pri_month = month = g_month;
   pri_day = day = g_day;

   pri_hours = hours = g_hours;
   pri_minutes = minutes = g_minutes;
   pri_seconds = seconds = g_seconds;
   pri_frac = raw_frac = g_frac;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
xorl %edi, %edi
callq 0x11dd00
leaq 0x2ecd64(%rip), %rax    # 0x36c884
movl (%rax), %ecx
leaq 0x2ecb93(%rip), %rax    # 0x36c6bc
movl %ecx, (%rax)
leaq 0x2ecbc2(%rip), %rax    # 0x36c6f4
movl %ecx, (%rax)
leaq 0x2ecd41(%rip), %rax    # 0x36c87c
movl (%rax), %ecx
leaq 0x2ecb74(%rip), %rax    # 0x36c6b8
movl %ecx, (%rax)
leaq 0x2ecba3(%rip), %rax    # 0x36c6f0
movl %ecx, (%rax)
leaq 0x2ecd2a(%rip), %rax    # 0x36c880
movl (%rax), %ecx
leaq 0x2ecb55(%rip), %rax    # 0x36c6b4
movl %ecx, (%rax)
leaq 0x2ecb84(%rip), %rax    # 0x36c6ec
movl %ecx, (%rax)
leaq 0x2ecd17(%rip), %rax    # 0x36c888
movl (%rax), %ecx
leaq 0x2ecb36(%rip), %rax    # 0x36c6b0
movl %ecx, (%rax)
leaq 0x2ecb65(%rip), %rax    # 0x36c6e8
movl %ecx, (%rax)
leaq 0x2ecd00(%rip), %rax    # 0x36c88c
movl (%rax), %ecx
leaq 0x2ecb17(%rip), %rax    # 0x36c6ac
movl %ecx, (%rax)
leaq 0x2ecb46(%rip), %rax    # 0x36c6e4
movl %ecx, (%rax)
leaq 0x2ecce9(%rip), %rax    # 0x36c890
movl (%rax), %ecx
leaq 0x2ecaf8(%rip), %rax    # 0x36c6a8
movl %ecx, (%rax)
leaq 0x2ecb27(%rip), %rax    # 0x36c6e0
movl %ecx, (%rax)
leaq 0x2eccd6(%rip), %rax    # 0x36c898
movsd (%rax), %xmm0
leaq 0x2ecaf3(%rip), %rax    # 0x36c6c0
movsd %xmm0, (%rax)
leaq 0x2ecb20(%rip), %rax    # 0x36c6f8
movsd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: lla_to_ecef(double, double, double)
void lla_to_ecef(double lat, double lon, double alt)
{   
double clat;
double slat;
double clon;
double slon;
double N;

   // convert lat/lon/alt values (in radians/meters) to ECEF coordinates

   clat = cos(lat);
   slat = sin(lat);
   clon = cos(lon);
   slon = sin(lon);

   N = WGS84_A / sqrt(1.0 - WGS84_E * WGS84_E * slat * slat);

   ecef_x = (N + alt) * clat * clon;
   ecef_y = (N + alt) * clat * slon;
   ecef_z = (N * (1.0 - WGS84_E * WGS84_E) + alt) * slat;
// sprintf(plot_title, "ecef: %f %f %f", ecef_x,ecef_y,ecef_z);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm2, -0x18(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x96f0
movsd %xmm0, -0x20(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x28(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x96f0
movsd %xmm0, -0x30(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x38(%rbp)
movsd 0x102e05(%rip), %xmm0   # 0x182b50
mulsd -0x28(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm1, %xmm0
movsd 0xef2f0(%rip), %xmm1    # 0x16f068
addsd %xmm1, %xmm0
callq 0x9280
movaps %xmm0, %xmm1
movsd 0x102dbc(%rip), %xmm0   # 0x182b48
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
addsd -0x18(%rbp), %xmm0
mulsd -0x20(%rbp), %xmm0
mulsd -0x30(%rbp), %xmm0
leaq 0x2ec418(%rip), %rax    # 0x36c1c8
movsd %xmm0, (%rax)
movsd -0x40(%rbp), %xmm0
addsd -0x18(%rbp), %xmm0
mulsd -0x20(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
leaq 0x2ec401(%rip), %rax    # 0x36c1d0
movsd %xmm0, (%rax)
movsd -0x40(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd 0x102d5b(%rip), %xmm2   # 0x182b40
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
mulsd -0x28(%rbp), %xmm0
leaq 0x2ec3df(%rip), %rax    # 0x36c1d8
movsd %xmm0, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: calc_jd_leap(int)
void calc_jd_leap(int why)
{
double days;

   // calculate the Julian date of the next leapsecond and how many days
   // until the event

   days = jd_leap - jd_utc;
   if(days < 0.0) have_jd_leap = have_leap_days = 0;
   else if(days >= ((double) LEAP_THRESH)) have_jd_leap = have_leap_days = 0;
   else have_jd_leap = have_leap_days = why;

   leap_days = (int) days;

//gregorian(0, jd_leap);
//sprintf(plot_title, "jd_leap %d:  have:%d  %04d/%02d/%02d %02d:%02d:%02d   days:%f", 
//why, have_jd_leap, g_year,g_month,g_day, g_hours,g_minutes,g_seconds, days);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
leaq 0x2ec6c2(%rip), %rax    # 0x36c740
movsd (%rax), %xmm0
leaq 0x2ec687(%rip), %rax    # 0x36c710
subsd (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jbe 0x800b8
leaq 0x2ec32d(%rip), %rax    # 0x36c3d0
movl $0x0, (%rax)
leaq 0x2ec698(%rip), %rax    # 0x36c748
movl $0x0, (%rax)
jmp 0x800fe
movsd -0x10(%rbp), %xmm0
movsd 0x102abb(%rip), %xmm1   # 0x182b80
ucomisd %xmm1, %xmm0
jb 0x800e7
leaq 0x2ec2fe(%rip), %rax    # 0x36c3d0
movl $0x0, (%rax)
leaq 0x2ec669(%rip), %rax    # 0x36c748
movl $0x0, (%rax)
jmp 0x800fc
movl -0x4(%rbp), %ecx
leaq 0x2ec2df(%rip), %rax    # 0x36c3d0
movl %ecx, (%rax)
leaq 0x2ec64e(%rip), %rax    # 0x36c748
movl %ecx, (%rax)
jmp 0x800fe
cvttsd2si -0x10(%rbp), %ecx
leaq 0x2ec2c2(%rip), %rax    # 0x36c3cc
movl %ecx, (%rax)
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: calc_leap_days(double, unsigned short, int)
void calc_leap_days(double wn_lsf, unsigned short dn, int why)
{
double jd;

   jd = GPS_EPOCH + (wn_lsf * 7.0) + (dn) - jtime(0,0,0,1.0); // Julian day of leapsecond
if(wn_lsf < 1024) jd += rollover / (1024.0 * 7.0 * 24.0*60.0*60.0);
   jd_leap = jd;
   calc_jd_leap(1);
   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movsd %xmm0, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl %esi, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
movsd 0xf1554(%rip), %xmm1    # 0x171688
mulsd %xmm1, %xmm0
movsd 0xf14d8(%rip), %xmm1    # 0x171618
addsd %xmm1, %xmm0
movzwl -0xa(%rbp), %eax
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
xorl %edx, %edx
movsd 0xeef09(%rip), %xmm0    # 0x16f068
movl %edx, %edi
movl %edx, %esi
callq 0x122210
movaps %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x102a07(%rip), %xmm0   # 0x182b88
ucomisd -0x8(%rbp), %xmm0
jbe 0x801a9
leaq 0x1fa4b1(%rip), %rax    # 0x27a640
movsd (%rax), %xmm0
movsd 0xf175d(%rip), %xmm1    # 0x1718f8
divsd %xmm1, %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
leaq 0x2ec58b(%rip), %rax    # 0x36c740
movsd %xmm0, (%rax)
movl $0x1, %edi
callq 0x80070
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: guess_leap_days()
void guess_leap_days()
{
double today;
double days;

   // If receiver has no day of leapsecond info, we attempt to guess it
   // assuming the leapsecond occurs on 30 Jun or 31 Dec.

   if((minor_alarms & MINOR_LEAP_PEND) == 0) return;  // no leap pending flag
   if(have_leap_days) return;  // receiver provided the leap day

   today = jdate(year,month,day);
   if(month >= 7) {
      days = jdate(year,12,31);
   }
   else {
      days = jdate(year,6,30);
   }
   jd_leap = days + jtime(23,59,59, 0.0);
   have_jd_leap = 2;
//   calc_jd_leap(2);

   days = days-today;
   if(days < 180.0) leap_days = (int) days;
   else leap_days = (-1);
   guessed_leap_days = '?';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x2ec1d9(%rip), %rax    # 0x36c3b8
movl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x801f0
jmp 0x802f5
leaq 0x2ec1d9(%rip), %rax    # 0x36c3d0
cmpl $0x0, (%rax)
je 0x80201
jmp 0x802f5
leaq 0x2ec4b4(%rip), %rax    # 0x36c6bc
movl (%rax), %edi
leaq 0x2ec4a7(%rip), %rax    # 0x36c6b8
movl (%rax), %esi
leaq 0x2ec49a(%rip), %rax    # 0x36c6b4
movl (%rax), %edx
callq 0x122140
movsd %xmm0, -0x8(%rbp)
leaq 0x2ec48b(%rip), %rax    # 0x36c6b8
cmpl $0x7, (%rax)
jl 0x80251
leaq 0x2ec483(%rip), %rax    # 0x36c6bc
movl (%rax), %edi
movl $0xc, %esi
movl $0x1f, %edx
callq 0x122140
movsd %xmm0, -0x10(%rbp)
jmp 0x8026e
leaq 0x2ec464(%rip), %rax    # 0x36c6bc
movl (%rax), %edi
movl $0x6, %esi
movl $0x1e, %edx
callq 0x122140
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x17, %edi
movl $0x3b, %edx
xorps %xmm0, %xmm0
movl %edx, %esi
callq 0x122210
movaps %xmm0, %xmm1
movsd -0x18(%rbp), %xmm0
addsd %xmm1, %xmm0
leaq 0x2ec4a1(%rip), %rax    # 0x36c740
movsd %xmm0, (%rax)
leaq 0x2ec49e(%rip), %rax    # 0x36c748
movl $0x2, (%rax)
movsd -0x10(%rbp), %xmm0
subsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd 0xeedb1(%rip), %xmm0    # 0x16f078
ucomisd -0x10(%rbp), %xmm0
jbe 0x802de
cvttsd2si -0x10(%rbp), %ecx
leaq 0x2ec0f2(%rip), %rax    # 0x36c3cc
movl %ecx, (%rax)
jmp 0x802eb
leaq 0x2ec0e7(%rip), %rax    # 0x36c3cc
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x2ec0e2(%rip), %rax    # 0x36c3d4
movb $0x3f, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: reset_sat_tracking()
void reset_sat_tracking()
{
int prn;

   // reset all sat tracking flags

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
cmpl $0x3e7, -0x4(%rbp)      # imm = 0x3E7
jg 0x81c6a
movslq -0x4(%rbp), %rcx
leaq 0x21c561(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0x0, 0x218(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x21c542(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movl $0x0, 0x1c(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x81c1b
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: update_disable_list(unsigned int)
void update_disable_list(u32 val)
{
int i;

   // transfer data from a 32 bit bitmask of enabled sats to the sat disabled flags

   for(i=1; i<=32; i++) {
      if(val & (1 << (i-1))) sat[i].disabled = 0;
      else                   sat[i].disabled = 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x1, -0x8(%rbp)
cmpl $0x20, -0x8(%rbp)
jg 0x81d1e
movl -0x4(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x81cf8
movslq -0x8(%rbp), %rcx
leaq 0x21c4a8(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movb $0x0, 0x1(%rax)
jmp 0x81d11
movslq -0x8(%rbp), %rcx
leaq 0x21c48d(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movb $0x1, 0x1(%rax)
jmp 0x81d13
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x81cbe
popq %rbp
retq
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: config_sat_rows()
void config_sat_rows()
{
   // calculate how many rows on the screen the sat info display will use

   if(sat_cols <= 0) return;

   sat_rows = max_sat_display / sat_cols;
   ms_row = ms_col = 0;
   if(sat_cols > 1) {
      if(max_sat_display & 1) ++sat_rows;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2e9959(%rip), %rax    # 0x36b964
cmpl $0x0, (%rax)
jg 0x82012
jmp 0x8207e
leaq 0x21c16b(%rip), %rax    # 0x29e184
movl (%rax), %eax
leaq 0x2e9942(%rip), %rcx    # 0x36b964
cltd
idivl (%rcx)
movl %eax, %ecx
leaq 0x2e993a(%rip), %rax    # 0x36b968
movl %ecx, (%rax)
leaq 0x2e9939(%rip), %rax    # 0x36b970
movl $0x0, (%rax)
leaq 0x2e9928(%rip), %rax    # 0x36b96c
movl $0x0, (%rax)
leaq 0x2e9913(%rip), %rax    # 0x36b964
cmpl $0x1, (%rax)
jle 0x8207e
leaq 0x21c127(%rip), %rax    # 0x29e184
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8207c
leaq 0x2e98fa(%rip), %rax    # 0x36b968
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x2e98ee(%rip), %rax    # 0x36b968
movl %ecx, (%rax)
jmp 0x8207e
popq %rbp
retq
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: config_sat_count(int)
void config_sat_count(int sat_count)
{
   // configure the display for the number of satellite channels

   if(first_key) return;  // delay screen size update until not in a menu
// sprintf(debug_text3, "csc:%d   msd:%d  msc:%d", sat_count, max_sat_display, max_sat_count);
   if(sat_count > max_sat_display) {
      sat_count = max_sat_display;
      have_count = 30;
   }

   if(sat_count > max_sat_count) {
      max_sat_count = sat_count;
      last_ebolt = (-1);
      saw_ebolt();  // !!!! we should do this better  zzzzz
   }

   config_sat_rows();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x21c0a6(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
je 0x82099
jmp 0x820f1
movl -0x4(%rbp), %eax
leaq 0x21c0e1(%rip), %rcx    # 0x29e184
cmpl (%rcx), %eax
jle 0x820c0
leaq 0x21c0d6(%rip), %rax    # 0x29e184
movl (%rax), %eax
movl %eax, -0x4(%rbp)
leaq 0x2ea43e(%rip), %rax    # 0x36c4f8
movl $0x1e, (%rax)
movl -0x4(%rbp), %eax
leaq 0x2e9896(%rip), %rcx    # 0x36b960
cmpl (%rcx), %eax
jle 0x820ec
movl -0x4(%rbp), %ecx
leaq 0x2e9888(%rip), %rax    # 0x36b960
movl %ecx, (%rax)
leaq 0x21c027(%rip), %rax    # 0x29e108
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
callq 0x81d20
callq 0x82000
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: star_sat_sec()
int star_sat_sec()
{
   // The Star receivers use two messages to get the sat info.  We don't want
   // to update the sat count plot during the period between the two messages
   // or else we get spikes on the sat count plot.
   //
   // Returns true if time is such that the sat count info might be invalid
   if(rcvr_type != STAR_RCVR) return 0;

   if(star_msg && star_line) {  // don't update sat table during faked seconds
      return 1;  // ... otherwise you get spikes on the sat count plot
   }

   // piss3
   if(pri_seconds == (SCPI_STATUS_SECOND+0)) {  // don't update sat table during sat info retreival
      return 1;  // ... otherwise you get spikes on the sat count plot
   }
   if(pri_seconds == (SCPI_STATUS_SECOND+1)) {  // don't update sat table during sat info retreival
      return 1;  // ... otherwise you get spikes on the sat count plot
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1f59a5(%rip), %rax    # 0x277ab0
cmpq $0x1000, (%rax)         # imm = 0x1000
je 0x8211d
movl $0x0, -0x4(%rbp)
jmp 0x8216f
leaq 0x1f80b8(%rip), %rax    # 0x27a1dc
cmpl $0x0, (%rax)
je 0x8213e
leaq 0x1f80a8(%rip), %rax    # 0x27a1d8
cmpl $0x0, (%rax)
je 0x8213e
movl $0x1, -0x4(%rbp)
jmp 0x8216f
leaq 0x2ea59b(%rip), %rax    # 0x36c6e0
cmpl $0x20, (%rax)
jne 0x82153
movl $0x1, -0x4(%rbp)
jmp 0x8216f
leaq 0x2ea586(%rip), %rax    # 0x36c6e0
cmpl $0x21, (%rax)
jne 0x82168
movl $0x1, -0x4(%rbp)
jmp 0x8216f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: fmt_fp(int, int, int, int)
void fmt_fp(int v1,int v2,int v3,int v4)
{
unsigned char v[4];

   // debug routine for show showing four integers as a floating point value

   v[3] = v1;
   v[2] = v2;
   v[1] = v3;
   v[0] = v4;
   sprintf(plot_title, "%02X:%02X:%02X:%02X -> %f", v1,v2,v3,v4, *((float *) (void *) &v));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl -0x4(%rbp), %eax
movb %al, -0x11(%rbp)
movl -0x8(%rbp), %eax
movb %al, -0x12(%rbp)
movl -0xc(%rbp), %eax
movb %al, -0x13(%rbp)
movl -0x10(%rbp), %eax
movb %al, -0x14(%rbp)
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %ecx
movl -0xc(%rbp), %r8d
movl -0x10(%rbp), %r9d
movss -0x14(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x31b656(%rip), %rdi    # 0x39da30
leaq 0x1012aa(%rip), %rsi    # 0x18368b
movb $0x1, %al
callq 0x9060
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: calc_msg_ofs()
void calc_msg_ofs()
{
double rcvr_jd;

   rcvr_jd = jd_utc;
   rcvr_jd *= (24.0*60.0*60.0*1000.0);  // convert Julian to milliseconds

   get_clock_time();   // the system clock time when the message arrived
   clk_jd *= (24.0*60.0*60.0*1000.0);
   if(1 || !fake_time_stamp) {
      msg_ofs = clk_jd - rcvr_jd;  // ffff offset from message time to time the message arrived
   }

   if(measure_jitter) {   // rrrrrr
      sprintf(plot_title, "rcvr-clock %d: %f  rcvr:%f  clk:%f  /tsx=%f", fake_time_stamp,msg_ofs, fmod(rcvr_jd,10000.0), fmod(clk_jd,10000.0), time_sync_offset);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x2ea311(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd 0x100788(%rip), %xmm0   # 0x182b98
mulsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
callq 0xa750
movsd 0x100771(%rip), %xmm0   # 0x182b98
leaq 0x2ea492(%rip), %rax    # 0x36c8c0
mulsd (%rax), %xmm0
leaq 0x2ea487(%rip), %rax    # 0x36c8c0
movsd %xmm0, (%rax)
leaq 0x2ea47c(%rip), %rax    # 0x36c8c0
movsd (%rax), %xmm0
subsd -0x8(%rbp), %xmm0
leaq 0x2eac5c(%rip), %rax    # 0x36d0b0
movsd %xmm0, (%rax)
leaq 0x219a49(%rip), %rax    # 0x29bea8
cmpl $0x0, (%rax)
je 0x824df
leaq 0x2ea465(%rip), %rax    # 0x36c8d0
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
leaq 0x2eac39(%rip), %rax    # 0x36d0b0
movsd (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
movsd 0xecc6b(%rip), %xmm1    # 0x16f0f8
callq 0x94d0
movsd %xmm0, -0x18(%rbp)
leaq 0x2ea422(%rip), %rax    # 0x36c8c0
movsd (%rax), %xmm0
movsd 0xecc4e(%rip), %xmm1    # 0x16f0f8
callq 0x94d0
movl -0x1c(%rbp), %edx
movsd -0x18(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x10(%rbp), %xmm0
leaq 0x2eabe2(%rip), %rax    # 0x36d0a8
movsd (%rax), %xmm3
leaq 0x31b55f(%rip), %rdi    # 0x39da30
leaq 0x1011cd(%rip), %rsi    # 0x1836a5
movb $0x4, %al
callq 0x9060
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_tsip_start(unsigned char)
void send_tsip_start(u08 id)
{
   if(log_file && (log_stream & LOG_PACKET_START)) {
      fprintf(log_file, "\nSend tsip start %02X\n", id);
   }
// if(log_file && (log_stream & LOG_SENT_DATA)) fprintf(log_file, "send start: %02X\n", id); //wax 
   sts = 1;

   sendout(RCVR_PORT, DLE, ADD_CHAR);
   nvs_tx_crc = 0;
   send_byte(id);
   tsip_send_count = 2;

   if(id == 0x8E) superpacket = id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
leaq 0x21b03b(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x82538
leaq 0x21b0de(%rip), %rax    # 0x29d5f0
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x82538
leaq 0x21b01d(%rip), %rax    # 0x29d540
movq (%rax), %rdi
movzbl -0x1(%rbp), %edx
leaq 0x1011a0(%rip), %rsi    # 0x1836d1
movb $0x0, %al
callq 0x9550
movl $0x1, 0x34cca2(%rip)    # 0x3cf1e4
movl $0xa, %edi
movl $0x10, %esi
xorl %edx, %edx
callq 0xd160
movw $0x0, 0x349788(%rip)    # 0x3cbce4
movzbl -0x1(%rbp), %edi
callq 0x7b210
movl $0x2, 0x348a89(%rip)    # 0x3caff8
movzbl -0x1(%rbp), %eax
cmpl $0x8e, %eax
jne 0x82583
movb -0x1(%rbp), %al
movb %al, 0x34cc5d(%rip)     # 0x3cf1e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_tsip_end()
void send_tsip_end()
{
   if(log_file && (log_stream & LOG_SENT_DATA)) fprintf(log_file, "tsip end\n"); //wax 
   sendout(RCVR_PORT, DLE, ADD_CHAR);
   sendout(RCVR_PORT, ETX, EOM);  // sending last byte of a TSIP message
   tsip_send_count += 2;
   if(sim_file == 0) Sleep(20); 

   sts = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x21afa5(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x825ca
leaq 0x21b048(%rip), %rax    # 0x29d5f0
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x825ca
leaq 0x21af87(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x101125(%rip), %rsi    # 0x1836e8
movb $0x0, %al
callq 0x9550
movl $0xa, %edi
movl $0x10, %esi
xorl %edx, %edx
callq 0xd160
movl $0xa, %edi
movl $0x3, %esi
movl $0x1, %edx
callq 0xd160
movl 0x348a03(%rip), %eax    # 0x3caff8
addl $0x2, %eax
movl %eax, 0x3489fa(%rip)    # 0x3caff8
leaq 0x21af9b(%rip), %rax    # 0x29d5a0
cmpq $0x0, (%rax)
jne 0x82615
movl $0x14, %edi
callq 0xb8b0
movl $0x0, 0x34cbc5(%rip)    # 0x3cf1e4
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_nvs_end()
void send_nvs_end()
{
u16 crc;

if(1) {  // send CRC
   crc = nvs_tx_crc;
   sendout(RCVR_PORT, DLE, ADD_CHAR);
   sendout(RCVR_PORT, 0xFF, ADD_CHAR);
   sendout(RCVR_PORT, crc & 0xFF, ADD_CHAR);
   sendout(RCVR_PORT, (crc/256) & 0xFF, ADD_CHAR);
}

   sendout(RCVR_PORT, DLE, ADD_CHAR);
   sendout(RCVR_PORT, ETX, EOM);  // sending last byte of a TSIP message to an NVS receiver
   tsip_send_count += 2;
   if(sim_file == 0) Sleep(50);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movw 0x3496a5(%rip), %ax     # 0x3cbce4
movw %ax, -0x2(%rbp)
movl $0xa, %edi
movl $0x10, %esi
xorl %edx, %edx
callq 0xd160
movl $0xa, %edi
movl $0xff, %esi
xorl %edx, %edx
callq 0xd160
movzwl -0x2(%rbp), %eax
andl $0xff, %eax
movl $0xa, %edi
xorl %edx, %edx
movzbl %al, %esi
callq 0xd160
movzwl -0x2(%rbp), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
andl $0xff, %eax
movl $0xa, %edi
xorl %edx, %edx
movzbl %al, %esi
callq 0xd160
movl $0xa, %edi
movl $0x10, %esi
xorl %edx, %edx
callq 0xd160
movl $0xa, %edi
movl $0x3, %esi
movl $0x1, %edx
callq 0xd160
movl 0x348930(%rip), %eax    # 0x3caff8
addl $0x2, %eax
movl %eax, 0x348927(%rip)    # 0x3caff8
leaq 0x21aec8(%rip), %rax    # 0x29d5a0
cmpq $0x0, (%rax)
jne 0x826e8
movl $0x32, %edi
callq 0xb8b0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_ascii_string(char*, int)
void send_ascii_string(char *s, int add_crlf)
{
   if(s) {
      send_nmea_string(s, 0);
   }

   if(add_crlf) {
      send_byte(0x0D);
      eom_flag = EOM;
      send_byte(0x0A);
      eom_flag = ADD_CHAR;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x82711
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x82750
cmpl $0x0, -0xc(%rbp)
je 0x8273f
movl $0xd, %edi
callq 0x7b210
movl $0x1, 0x3488c5(%rip)    # 0x3caff0
movl $0xa, %edi
callq 0x7b210
movl $0x0, 0x3488b1(%rip)    # 0x3caff0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_nmea_string(char*, int)
void send_nmea_string(char *s, int comma)
{
int i, j;

   if(s == 0) return;

   j = strlen(s);
   for(i=0; i<j; i++) send_byte((u08) s[i]);

   if(comma) send_byte((u08) ',');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x82768
jmp 0x827af
movq -0x8(%rbp), %rdi
callq 0x9120
movl %eax, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8279f
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8277b
cmpl $0x0, -0xc(%rbp)
je 0x827af
movl $0x2c, %edi
callq 0x7b210
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_acron_cmd(char*)
void send_acron_cmd(char *s)
{
int i, j;

   if(s == 0) return;
   
   j = strlen(s);
   if(j) this_acron_cmd = toupper(s[j-1]);
   else  this_acron_cmd = 0;
//if(debug_file) fprintf(debug_file, "send acron cmd:[%s]  len:%d  cmd:%c\n", s, j, this_acron_cmd);

   for(i=0; i<j; i++) {
      send_acron_byte((u08) s[i]);
   }

   send_acron_byte((u08) 0x0D);

//if(debug_file) fprintf(debug_file, "this_acron_cmd: %c\n", this_acron_cmd);

   if(FAKE_ACRON_RCVR) {
      if(this_acron_cmd == 'O') {
         get_clock_time();   // get system clock time in UTC
         sprintf(out, "%02d%02d%02d6%02d%02d%02d47\r", clk_hours,clk_minutes,clk_seconds,
         clk_day,clk_month,clk_year-2000);
         strcpy((char *) &com[RCVR_PORT].rcv_buffer[0], (char *) out);
         com[RCVR_PORT].next_rcv_byte = 0;
         com[RCVR_PORT].rcv_byte_count = 16;
      }
      else if(this_acron_cmd == 'G') {
         sprintf(out, "1%c\r", '0'+(pri_minutes%6));
         strcpy((char *) &com[RCVR_PORT].rcv_buffer[0], (char *) out);
         com[RCVR_PORT].next_rcv_byte = 0;
         com[RCVR_PORT].rcv_byte_count = 3;
      }
      else if(this_acron_cmd == 'H') {  // receiver sync request
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x82f55
jmp 0x82fc1
movq -0x8(%rbp), %rdi
callq 0x9120
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x82f85
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x96e0
movb %al, 0x348e79(%rip)     # 0x3cbdfc
jmp 0x82f8c
movb $0x0, 0x348e70(%rip)    # 0x3cbdfc
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x82fb7
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0xe0f60
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x82f93
movl $0xd, %edi
callq 0xe0f60
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: queue_polled_cmd(char*, int)
void queue_polled_cmd(char *s, int id)
{
static int last_id = 0;

   // add a command to a queue of messages to send to the receiver.  SCPI 
   // receivers are REALLY dumb and not designed for talking to computer
   // programs.  Their responses to messages have NO indication of what
   // request the response is from.  If responses get out of sync with
   // requests, you a SCREWED!
   if((id == STAR_CONF_MSG) && (last_id == STAR_CONF_MSG)) {
      return;
   }
   last_id = id;
   brandy_msg_id = id;

   strcpy(polled_q[polled_q_in].msg, s);
   polled_q[polled_q_in].id = id;
   ++polled_q_entries;
   if(++polled_q_in >= POLLED_Q_SIZE) polled_q_in = 0;

if(debug_file) fprintf(debug_file,   "\nQ SCPI id:%d  sqe:%d  in:%d out:%d: %s\n", id, polled_q_entries, polled_q_in,polled_q_out, s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0xca, -0xc(%rbp)
jne 0x82ff9
cmpl $0xca, 0x34e0da(%rip)   # 0x3d10cc
jne 0x82ff9
jmp 0x830be
movl -0xc(%rbp), %eax
movl %eax, 0x34e0ca(%rip)    # 0x3d10cc
movl -0xc(%rbp), %eax
movl %eax, 0x34e061(%rip)    # 0x3d106c
movslq 0x34c18e(%rip), %rax    # 0x3cf1a0
leaq 0x348df7(%rip), %rdi    # 0x3cbe10
imulq $0x84, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x9350
movl -0xc(%rbp), %ecx
movslq 0x34c16a(%rip), %rdx    # 0x3cf1a0
leaq 0x348dd3(%rip), %rax    # 0x3cbe10
imulq $0x84, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x80(%rax)
movl 0x34c155(%rip), %eax    # 0x3cf1a8
addl $0x1, %eax
movl %eax, 0x34c14c(%rip)    # 0x3cf1a8
movl 0x34c13e(%rip), %eax    # 0x3cf1a0
addl $0x1, %eax
movl %eax, 0x34c135(%rip)    # 0x3cf1a0
cmpl $0x64, %eax
jl 0x8307a
movl $0x0, 0x34c126(%rip)    # 0x3cf1a0
leaq 0x21a4ef(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0x830be
leaq 0x21a4e2(%rip), %rax    # 0x29d570
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movl 0x34c10e(%rip), %ecx    # 0x3cf1a8
movl 0x34c0ff(%rip), %r8d    # 0x3cf1a0
movl 0x34c0fc(%rip), %r9d    # 0x3cf1a4
movq -0x8(%rbp), %rax
leaq 0x105512(%rip), %rsi    # 0x1885c5
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9550
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_furuno_cmd(char*)
void send_furuno_cmd(char *s)
{
   if(s == 0) return;


   send_nmea_start();
   if(strstr(s, "PFEC") || (strstr(s, "pfec"))) {
      if(s[0] == '$') {
         if(debug_file) fprintf(debug_file, "Sent1 furuno:$%s\n", &s[1]);
         send_nmea_string(&s[1], 0);
      }
      else {
         if(debug_file) fprintf(debug_file, "Sent2 furuno:$%s\n", &s[0]);
         send_nmea_string(&s[0], 0);
      }
   }
   else {
      if(s[0] == '$') {
         if(debug_file) fprintf(debug_file, "Sent3 furuno:%s\n", &s[0]);
         send_nmea_string(&s[1], 0);
      }
      else {
         if(debug_file) fprintf(debug_file, "Sent furuno:$PFEC,%s\n", &s[0]);
         send_nmea_string("PFEC,", 0);
         send_nmea_string(&s[0], 0);
      }
   }

send_nmea_end(0);  // !!!!! don't send checksums
return;
   if(strchr(s, '*')) send_nmea_end(0);
   else               send_nmea_end(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x83288
jmp 0x833d1
callq 0x83880
movq -0x8(%rbp), %rdi
leaq 0x10ac15(%rip), %rsi    # 0x18dead
callq 0x9090
cmpq $0x0, %rax
jne 0x832bd
movq -0x8(%rbp), %rdi
leaq 0x10054f(%rip), %rsi    # 0x1837fd
callq 0x9090
cmpq $0x0, %rax
je 0x83340
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
jne 0x83307
leaq 0x21a2a0(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0x832f6
leaq 0x21a293(%rip), %rax    # 0x29d570
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
addq $0x1, %rdx
leaq 0x100513(%rip), %rsi    # 0x183802
movb $0x0, %al
callq 0x9550
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
xorl %esi, %esi
callq 0x82750
jmp 0x8333b
leaq 0x21a262(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0x83330
leaq 0x21a255(%rip), %rax    # 0x29d570
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x1004eb(%rip), %rsi    # 0x183814
movb $0x0, %al
callq 0x9550
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x82750
jmp 0x833ca
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
jne 0x83386
leaq 0x21a21d(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0x83375
leaq 0x21a210(%rip), %rax    # 0x29d570
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x1004b8(%rip), %rsi    # 0x183826
movb $0x0, %al
callq 0x9550
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
xorl %esi, %esi
callq 0x82750
jmp 0x833c8
leaq 0x21a1e3(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0x833af
leaq 0x21a1d6(%rip), %rax    # 0x29d570
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x10048f(%rip), %rsi    # 0x183837
movb $0x0, %al
callq 0x9550
leaq 0x100497(%rip), %rdi    # 0x18384d
xorl %esi, %esi
callq 0x82750
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x82750
jmp 0x833ca
xorl %edi, %edi
callq 0x838a0
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_nmea_cmd(char*)
void send_nmea_cmd(char *s)
{
   if(s == 0) return;

   if(log_file && (log_stream & LOG_PACKET_START)) {
      fprintf(log_file, "\nSend nmea cmd: %s\n", s);
   }

   send_nmea_start();
   if(s[0] == '$')    send_nmea_string(&s[1], 0);
   else               send_nmea_string(&s[0], 0);
   if(strchr(s, '*')) send_nmea_end(0);
   else               send_nmea_end(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x833f8
jmp 0x83486
leaq 0x21a141(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x83432
leaq 0x21a1e4(%rip), %rax    # 0x29d5f0
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x83432
leaq 0x21a123(%rip), %rax    # 0x29d540
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x10033c(%rip), %rsi    # 0x183767
movb $0x0, %al
callq 0x9550
callq 0x83880
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
jne 0x83454
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
xorl %esi, %esi
callq 0x82750
jmp 0x8345f
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x82750
movq -0x8(%rbp), %rdi
movl $0x2a, %esi
callq 0x9100
cmpq $0x0, %rax
je 0x8347c
xorl %edi, %edi
callq 0x838a0
jmp 0x83486
movl $0x1, %edi
callq 0x838a0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)