LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jkingan[P]ladyheather/heathui.cpp
// Function: scroll_char(int)
int scroll_char(int c)
{
   // check if 'c' is a plot area control char

   if((c >= '0') && (c <= '9')) return 1;
   if(c == '=') return 1;
   if(c == '-') return 1;
   if(c == '+') return 1;
   if(c == '%') return 1;

   if(c == '[') return 1;
   if(c == ']') return 1;

   if(c == '<') return 1;
   if(c == '>') return 1;

   if(c == UP_CHAR) return 1;
   if(c == DOWN_CHAR) return 1;
   if(c == PAGE_UP) return 1;
   if(c == PAGE_DOWN) return 1;
   if(c == LEFT_CHAR) return 1;
   if(c == RIGHT_CHAR) return 1;
   if(c == HOME_CHAR) return 1;
   if(c == END_CHAR) return 1;

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x30, -0x8(%rbp)
jl 0x6292f
cmpl $0x39, -0x8(%rbp)
jg 0x6292f
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x3d, -0x8(%rbp)
jne 0x62941
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x2d, -0x8(%rbp)
jne 0x62953
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x2b, -0x8(%rbp)
jne 0x62965
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x25, -0x8(%rbp)
jne 0x62977
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x5b, -0x8(%rbp)
jne 0x62989
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x5d, -0x8(%rbp)
jne 0x6299b
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x3c, -0x8(%rbp)
jne 0x629ad
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x3e, -0x8(%rbp)
jne 0x629bf
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x148, -0x8(%rbp)      # imm = 0x148
jne 0x629d4
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x150, -0x8(%rbp)      # imm = 0x150
jne 0x629e6
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x149, -0x8(%rbp)      # imm = 0x149
jne 0x629f8
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x151, -0x8(%rbp)      # imm = 0x151
jne 0x62a0a
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x14b, -0x8(%rbp)      # imm = 0x14B
jne 0x62a1c
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x14d, -0x8(%rbp)      # imm = 0x14D
jne 0x62a2e
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x147, -0x8(%rbp)      # imm = 0x147
jne 0x62a40
movl $0x1, -0x4(%rbp)
jmp 0x62a59
cmpl $0x14f, -0x8(%rbp)      # imm = 0x14F
jne 0x62a52
movl $0x1, -0x4(%rbp)
jmp 0x62a59
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathui.cpp
// Function: set_watch_name(char*)
void set_watch_name(char *s)
{
unsigned i, j;
int n;
char c;

   // set the analog watch face name info

   plot_watch = 1;
   config_screen(129);
   n = 0;
   j = 0;
   watch_name[j] = watch_name2[j] = 0;
   for(i=0; i<strlen(s); i++) {
      c = s[i];
      if(c == 0) break;
      if(c == '/') {
         ++n;
         j = 0;
         continue;
      }

      if(c == '_') c = ' ';
      if(n == 0) {
         watch_name[j++] = c;
         watch_name[j] = 0;
         if(j >= (sizeof(watch_name)-1)) break;
      }
      else if(n == 1) {
         watch_name2[j++] = c;
         watch_name2[j] = 0;
         if(j >= (sizeof(watch_name2)-1)) break;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x216ca5(%rip), %rax    # 0x27a5e8
movb $0x1, (%rax)
movl $0x81, %edi
callq 0xeaf0
movl $0x0, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x339f86(%rip), %rax    # 0x39d8f0
movb $0x0, (%rax,%rcx)
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x339f56(%rip), %rax    # 0x39d8d0
movb $0x0, (%rax,%rcx)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9120
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x63a7b
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x0, %eax
jne 0x639c0
jmp 0x63a7b
movsbl -0x15(%rbp), %eax
cmpl $0x2f, %eax
jne 0x639de
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
jmp 0x63a6d
movsbl -0x15(%rbp), %eax
cmpl $0x5f, %eax
jne 0x639eb
movb $0x20, -0x15(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x63a2a
movb -0x15(%rbp), %dl
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x10(%rbp)
movl %eax, %eax
movl %eax, %ecx
leaq 0x339ec6(%rip), %rax    # 0x39d8d0
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x339eb7(%rip), %rax    # 0x39d8d0
movb $0x0, (%rax,%rcx)
movl -0x10(%rbp), %eax
cmpq $0x1e, %rax
jb 0x63a28
jmp 0x63a7b
jmp 0x63a6b
cmpl $0x1, -0x14(%rbp)
jne 0x63a69
movb -0x15(%rbp), %dl
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x10(%rbp)
movl %eax, %eax
movl %eax, %ecx
leaq 0x339ea7(%rip), %rax    # 0x39d8f0
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x339e98(%rip), %rax    # 0x39d8f0
movb $0x0, (%rax,%rcx)
movl -0x10(%rbp), %eax
cmpq $0x1e, %rax
jb 0x63a67
jmp 0x63a7b
jmp 0x63a69
jmp 0x63a6b
jmp 0x63a6d
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x63985
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: config_utc_mode(int)
void config_utc_mode(int set_utc_ofs)
{
   // this routine configures the time mode for receivers that do not support
   // operating in GPS time mode.

   if(set_gps_mode) {
      set_utc_mode = 0;
      time_flags |= TFLAGS_UTC;
      if(luxor) have_timing_mode = 1;
   }
   else if(set_utc_mode) {
      set_gps_mode = 0;
      time_flags &= (~TFLAGS_UTC);
      if(luxor) have_timing_mode = 1;
   }
   else {
      time_flags = TFLAGS_NULL;
      if(luxor) time_flags = TFLAGS_NULL;
      set_utc_mode = 1;
      set_gps_mode = 0;
   }

   // here we attempt to estimate the leapsecond count if it is needed and
   // the user or GPS receiver did not specify one.

   if(!user_set_utc_ofs && set_utc_ofs) {
      get_clock_time();
      if(clk_jd < jdate(2019,7,1)) utc_offset = 18;
      else utc_offset = (int) (43.216 + (double)(clk_year-2061)*0.567);
      have_utc_ofs = (-1);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x308bf2(%rip), %rax    # 0x36c694
cmpl $0x0, (%rax)
je 0x63ae7
leaq 0x308be2(%rip), %rax    # 0x36c690
movl $0x0, (%rax)
leaq 0x308bc9(%rip), %rax    # 0x36c684
movl (%rax), %ecx
orl $0x1, %ecx
leaq 0x308bbd(%rip), %rax    # 0x36c684
movl %ecx, (%rax)
leaq 0x23a64e(%rip), %rax    # 0x29e11e
cmpb $0x0, (%rax)
je 0x63ae2
leaq 0x308ad0(%rip), %rax    # 0x36c5ac
movl $0x1, (%rax)
jmp 0x63b72
leaq 0x308ba2(%rip), %rax    # 0x36c690
cmpl $0x0, (%rax)
je 0x63b30
leaq 0x308b9a(%rip), %rax    # 0x36c694
movl $0x0, (%rax)
leaq 0x308b7d(%rip), %rax    # 0x36c684
movl (%rax), %ecx
andl $-0x2, %ecx
leaq 0x308b71(%rip), %rax    # 0x36c684
movl %ecx, (%rax)
leaq 0x23a602(%rip), %rax    # 0x29e11e
cmpb $0x0, (%rax)
je 0x63b2e
leaq 0x308a84(%rip), %rax    # 0x36c5ac
movl $0x1, (%rax)
jmp 0x63b70
leaq 0x308b4d(%rip), %rax    # 0x36c684
movl $0x0, (%rax)
leaq 0x23a5da(%rip), %rax    # 0x29e11e
cmpb $0x0, (%rax)
je 0x63b56
leaq 0x308b34(%rip), %rax    # 0x36c684
movl $0x0, (%rax)
leaq 0x308b33(%rip), %rax    # 0x36c690
movl $0x1, (%rax)
leaq 0x308b2a(%rip), %rax    # 0x36c694
movl $0x0, (%rax)
jmp 0x63b72
leaq 0x308d9b(%rip), %rax    # 0x36c914
cmpl $0x0, (%rax)
jne 0x63c13
cmpl $0x0, -0x4(%rbp)
je 0x63c13
callq 0xa750
leaq 0x308d28(%rip), %rax    # 0x36c8c0
movsd (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
movl $0x7e3, %edi            # imm = 0x7E3
movl $0x7, %esi
movl $0x1, %edx
callq 0x122140
movsd -0x10(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x63bcf
leaq 0x308d41(%rip), %rax    # 0x36c908
movl $0x12, (%rax)
jmp 0x63c06
leaq 0x308cd2(%rip), %rax    # 0x36c8a8
movl (%rax), %eax
subl $0x80d, %eax            # imm = 0x80D
cvtsi2sd %eax, %xmm0
movsd 0x10dbc7(%rip), %xmm1   # 0x1717b0
mulsd %xmm1, %xmm0
movsd 0x10dbc3(%rip), %xmm1   # 0x1717b8
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
leaq 0x308d04(%rip), %rax    # 0x36c908
movl %ecx, (%rax)
leaq 0x3088ef(%rip), %rax    # 0x36c4fc
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: save_adev_period()
void save_adev_period()
{
   old_adev_period     = adev_period;
   old_pps_adev_period = pps_adev_period;
   old_osc_adev_period = osc_adev_period;
   old_chc_adev_period = chc_adev_period;
   old_chd_adev_period = chd_adev_period;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x232fad(%rip), %rax    # 0x29bed8
movsd (%rax), %xmm0
leaq 0x3316aa(%rip), %rax    # 0x39a5e0
movsd %xmm0, (%rax)
leaq 0x232f9f(%rip), %rax    # 0x29bee0
movsd (%rax), %xmm0
leaq 0x33169c(%rip), %rax    # 0x39a5e8
movsd %xmm0, (%rax)
leaq 0x232f91(%rip), %rax    # 0x29bee8
movsd (%rax), %xmm0
leaq 0x33168e(%rip), %rax    # 0x39a5f0
movsd %xmm0, (%rax)
leaq 0x232f83(%rip), %rax    # 0x29bef0
movsd (%rax), %xmm0
leaq 0x331680(%rip), %rax    # 0x39a5f8
movsd %xmm0, (%rax)
leaq 0x232f75(%rip), %rax    # 0x29bef8
movsd (%rax), %xmm0
leaq 0x331672(%rip), %rax    # 0x39a600
movsd %xmm0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: set_gpsd_mode()
void set_gpsd_mode()
{
   // set the receiver type to GPSD and config the ports

   rcvr_type = GPSD_RCVR;
   com[RCVR_PORT].com_port = com[RCVR_PORT].usb_port = 0;
   if(com[RCVR_PORT].user_set_ip == 0) {
      strcpy(com[RCVR_PORT].IP_addr, "localhost:2947");
   }
   com[RCVR_PORT].user_disabled_com = 0;
   com[RCVR_PORT].process_com = 1;
   init_com(RCVR_PORT, 17);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2097f5(%rip), %rax    # 0x277ab0
movq $0x200, (%rax)          # imm = 0x200
leaq 0x2ff1f7(%rip), %rax    # 0x36d4c0
movl $0x0, 0x157c4(%rax)
leaq 0x2ff1e6(%rip), %rax    # 0x36d4c0
movl $0x0, 0x157c0(%rax)
leaq 0x2ff1d5(%rip), %rax    # 0x36d4c0
cmpl $0x0, 0x17a1c(%rax)
jne 0x6e30e
leaq 0x2ff1c5(%rip), %rdi    # 0x36d4c0
addq $0x158cd, %rdi          # imm = 0x158CD
leaq 0x1147bf(%rip), %rsi    # 0x182ac8
callq 0x9350
leaq 0x2ff1ab(%rip), %rax    # 0x36d4c0
movl $0x0, 0x179e8(%rax)
leaq 0x2ff19a(%rip), %rax    # 0x36d4c0
movl $0x1, 0x179f4(%rax)
movl $0xa, %edi
movl $0x11, %esi
callq 0xc0e0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: parse_option(char*)
int parse_option(char *arg)
{
unsigned i;
char c;

   // break up a command line option into the command and argument fields.
   // connvert command to lower case.  Returns the char that separated the
   // command from the value, returns 0 if no value.

   for(i=0; i<sizeof(opt_cmd); i++) opt_cmd[i] = 0;
   for(i=0; i<sizeof(opt_arg); i++) opt_arg[i] = 0;
   if(arg == 0) return 0;

   for(i=0; i<sizeof(opt_cmd)-1; i++) {
      c = arg[i+1];
      if(c == 0) break;
      else if((c == '=') || (c == ':')) {  // : or = separates option from arg value
         strcpy(opt_arg, &arg[i+1+1]);
         strlwr(opt_cmd);
         return c;
      }
      else opt_cmd[i] = c;
   }

   strlwr(opt_cmd);
   return 0;
sprintf(plot_title, "cmd:(%s)  arg:(%s)", opt_cmd, opt_arg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x201, %rax            # imm = 0x201
jae 0x6e389
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x35c6d6(%rip), %rax    # 0x3caa50
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6e363
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x201, %rax            # imm = 0x201
jae 0x6e3b6
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x35c8b9(%rip), %rax    # 0x3cac60
movb $0x0, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6e390
cmpq $0x0, -0x10(%rbp)
jne 0x6e3c9
movl $0x0, -0x4(%rbp)
jmp 0x6e478
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x200, %rax            # imm = 0x200
jae 0x6e465
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
cmpl $0x0, %eax
jne 0x6e3fc
jmp 0x6e465
movsbl -0x15(%rbp), %eax
cmpl $0x3d, %eax
je 0x6e40e
movsbl -0x15(%rbp), %eax
cmpl $0x3a, %eax
jne 0x6e441
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
addl $0x1, %eax
addl $0x1, %eax
movl %eax, %eax
addq %rax, %rsi
leaq 0x35c839(%rip), %rdi    # 0x3cac60
callq 0x9350
leaq 0x35c61d(%rip), %rdi    # 0x3caa50
callq 0x9850
movsbl -0x15(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6e478
movb -0x15(%rbp), %dl
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x35c600(%rip), %rax    # 0x3caa50
movb %dl, (%rax,%rcx)
jmp 0x6e455
jmp 0x6e457
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6e3d0
leaq 0x35c5e4(%rip), %rdi    # 0x3caa50
callq 0x9850
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathui.cpp
// Function: restore_adev_period()
void restore_adev_period()
{
   adev_period     = old_adev_period;
   pps_adev_period = old_pps_adev_period;
   osc_adev_period = old_osc_adev_period;
   chc_adev_period = old_chc_adev_period;
   chd_adev_period = old_chd_adev_period;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x32c145(%rip), %rax    # 0x39a5e0
movsd (%rax), %xmm0
leaq 0x22da32(%rip), %rax    # 0x29bed8
movsd %xmm0, (%rax)
leaq 0x32c137(%rip), %rax    # 0x39a5e8
movsd (%rax), %xmm0
leaq 0x22da24(%rip), %rax    # 0x29bee0
movsd %xmm0, (%rax)
leaq 0x32c129(%rip), %rax    # 0x39a5f0
movsd (%rax), %xmm0
leaq 0x22da16(%rip), %rax    # 0x29bee8
movsd %xmm0, (%rax)
leaq 0x32c11b(%rip), %rax    # 0x39a5f8
movsd (%rax), %xmm0
leaq 0x22da08(%rip), %rax    # 0x29bef0
movsd %xmm0, (%rax)
leaq 0x32c10d(%rip), %rax    # 0x39a600
movsd (%rax), %xmm0
leaq 0x22d9fa(%rip), %rax    # 0x29bef8
movsd %xmm0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: drain_port(unsigned int)
void drain_port(unsigned port)
{
   // drain all received data from port buffers
   if(port >= NUM_COM_PORTS) return;
   if(com[port].process_com == 0) return;
   if(com[port].com_running <= 0) return;

   while(SERIAL_DATA_AVAILABLE(port)) {  // drain any input data from the ECHO_PORT
      get_serial_char(port);  // !!!! we should have a timeout on this loop
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x13, -0x4(%rbp)
jb 0x79913
jmp 0x7996e
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x2f3ba1(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
cmpl $0x0, 0x2234(%rax)
jne 0x79934
jmp 0x7996e
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x2f3b80(%rip), %rax    # 0x36d4c0
imulq $0x2260, %rcx, %rcx     # imm = 0x2260
addq %rcx, %rax
cmpl $0x0, 0x2230(%rax)
jg 0x79955
jmp 0x7996e
jmp 0x79957
movl -0x4(%rbp), %edi
callq 0xcad0
cmpl $0x0, %eax
je 0x7996e
movl -0x4(%rbp), %edi
callq 0xcd60
jmp 0x79957
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: echo_log(char*)
void echo_log(char *s)
{
unsigned i;
int c;

   if(s == 0) return;

   if(zoom_screen == 'H') {
      for(i=0; i<strlen(s); i++) {
         c = s[i];
         echo_term(monitor_port, c, monitor_hex, 0);
      }
   }

   if(log_file == 0) return;
   fprintf(log_file, "%s", s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x79998
jmp 0x79a2c
leaq 0x2f1fe9(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x48, %eax
jne 0x79a01
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9120
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x799ff
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movsbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
leaq 0x2f3ad1(%rip), %rax    # 0x36d4b0
movl (%rax), %edi
movl -0x10(%rbp), %esi
leaq 0x223c39(%rip), %rax    # 0x29d624
movl (%rax), %edx
xorl %ecx, %ecx
callq 0xb1d0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x799ae
jmp 0x79a01
leaq 0x223b38(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
jne 0x79a10
jmp 0x79a2c
leaq 0x223b29(%rip), %rax    # 0x29d540
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x117108(%rip), %rsi    # 0x190b2d
movb $0x0, %al
callq 0x9550
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_com_char()
int get_com_char()
{
u08 c;

   // Get the next byte from the receiver (or simulation file)

   c = get_serial_char(RCVR_PORT);
   if(rcvr_type == ACRON_RCVR) c &= 0x7F;

   if((rcvr_type == TICC_RCVR) && ticc_file) {
      echo_ticc(c);
   }
   else {
      echo_stream(c); // echo receiver char to a file or com device
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xa, %edi
callq 0xcd60
movb %al, -0x1(%rbp)
leaq 0x1fdad4(%rip), %rax    # 0x277ab0
cmpq $0x4000, (%rax)         # imm = 0x4000
jne 0x79fef
movzbl -0x1(%rbp), %eax
andl $0x7f, %eax
movb %al, -0x1(%rbp)
leaq 0x1fdaba(%rip), %rax    # 0x277ab0
cmpq $0x10000, (%rax)        # imm = 0x10000
jne 0x7a017
leaq 0x223562(%rip), %rax    # 0x29d568
cmpq $0x0, (%rax)
je 0x7a017
movzbl -0x1(%rbp), %edi
callq 0x79f40
jmp 0x7a020
movzbl -0x1(%rbp), %edi
callq 0x79a40
movzbl -0x1(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_ticc_char()
int get_ticc_char() 
{
u08 c;

   // Get the next byte from the TICC port (or simulation file)

   if(rcvr_type == TICC_RCVR) c = get_serial_char(RCVR_PORT);
   else                       c = get_serial_char(TICC_PORT);

   if((rcvr_type == TICC_RCVR) && (ticc_file == 0)) {  // aaattt
      echo_stream(c); // echo ticc char to a file or com device
   }
   else if(ticc_file) {  // echo ticc data to TICC capture file
      echo_ticc(c);
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1fda71(%rip), %rax    # 0x277ab0
cmpq $0x10000, (%rax)        # imm = 0x10000
jne 0x7a057
movl $0xa, %edi
callq 0xcd60
movb %al, -0x1(%rbp)
jmp 0x7a064
movl $0xd, %edi
callq 0xcd60
movb %al, -0x1(%rbp)
leaq 0x1fda45(%rip), %rax    # 0x277ab0
cmpq $0x10000, (%rax)        # imm = 0x10000
jne 0x7a08c
leaq 0x2234ed(%rip), %rax    # 0x29d568
cmpq $0x0, (%rax)
jne 0x7a08c
movzbl -0x1(%rbp), %edi
callq 0x79a40
jmp 0x7a0a4
leaq 0x2234d5(%rip), %rax    # 0x29d568
cmpq $0x0, (%rax)
je 0x7a0a2
movzbl -0x1(%rbp), %edi
callq 0x79f40
jmp 0x7a0a4
movzbl -0x1(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_enviro_char()
int get_enviro_char() 
{
u08 c;

   // Get the next byte from the environmental sensor port (or simulation file)

   if(rcvr_type == THERMO_RCVR) {
      c = get_serial_char(RCVR_PORT);
   }
   else {
      c = get_serial_char(THERMO_PORT);
   }

   if((rcvr_type == THERMO_RCVR) && (enviro_file == 0)) {  // aaattt
      echo_stream(c); // echo enviro char to a file or com device
   }
   else if(enviro_file) {  // echo enviro data to capture file
      echo_enviro(c);
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1fd9f1(%rip), %rax    # 0x277ab0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0x7a0d7
movl $0xa, %edi
callq 0xcd60
movb %al, -0x1(%rbp)
jmp 0x7a0e4
movl $0xf, %edi
callq 0xcd60
movb %al, -0x1(%rbp)
leaq 0x1fd9c5(%rip), %rax    # 0x277ab0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0x7a10c
leaq 0x223465(%rip), %rax    # 0x29d560
cmpq $0x0, (%rax)
jne 0x7a10c
movzbl -0x1(%rbp), %edi
callq 0x79a40
jmp 0x7a124
leaq 0x22344d(%rip), %rax    # 0x29d560
cmpq $0x0, (%rax)
je 0x7a122
movzbl -0x1(%rbp), %edi
callq 0x79f80
jmp 0x7a124
movzbl -0x1(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: drain_com_data()
void drain_com_data()
{
   // drain any data from the serial input buffer

   if(sim_file) return;
   if(rcvr_type == NO_RCVR) return;

   Sleep(250);
   while(SERIAL_DATA_AVAILABLE(RCVR_PORT)) {
      update_pwm();
      if((this_msec-com[RCVR_PORT].last_com_time) > 1000.0) { 
         break;
      }
      get_serial_char(RCVR_PORT);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x223445(%rip), %rax    # 0x29d5a0
cmpq $0x0, (%rax)
je 0x7a163
jmp 0x7a1c9
leaq 0x1fd946(%rip), %rax    # 0x277ab0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x7a175
jmp 0x7a1c9
movl $0xfa, %edi
callq 0xb8b0
movl $0xa, %edi
callq 0xcad0
cmpl $0x0, %eax
je 0x7a1c9
callq 0x11ee60
leaq 0x2f27ae(%rip), %rax    # 0x36c948
movsd (%rax), %xmm0
leaq 0x2f331b(%rip), %rax    # 0x36d4c0
subsd 0x17a08(%rax), %xmm0
movsd 0xf4e7b(%rip), %xmm1    # 0x16f030
ucomisd %xmm1, %xmm0
jbe 0x7a1bd
jmp 0x7a1c9
movl $0xa, %edi
callq 0xcd60
jmp 0x7a17f
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_sync_time()
void get_sync_time()
{
int bits;

   // get the approximate time the receiver sent the start bit of the message
   // (this assumes no delay through the operating system buffers)

   if(com[RCVR_PORT].baud_rate == 0) return;

   bits = 1 + com[RCVR_PORT].data_bits + com[RCVR_PORT].stop_bits;
   if(com[RCVR_PORT].parity) ++bits;
   msg_sync_msec = 0.0 - ((double) bits / (double) com[RCVR_PORT].baud_rate);

   msg_sync_msec += GetMsecs();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2f32e1(%rip), %rax    # 0x36d4c0
cmpl $0x0, 0x159d0(%rax)
jne 0x7a1ea
jmp 0x7a268
leaq 0x2f32cf(%rip), %rax    # 0x36d4c0
movl 0x159d4(%rax), %eax
addl $0x1, %eax
leaq 0x2f32bf(%rip), %rcx    # 0x36d4c0
addl 0x159d8(%rcx), %eax
movl %eax, -0x4(%rbp)
leaq 0x2f32af(%rip), %rax    # 0x36d4c0
cmpl $0x0, 0x159dc(%rax)
je 0x7a223
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
cvtsi2sdl -0x4(%rbp), %xmm1
leaq 0x2f3291(%rip), %rax    # 0x36d4c0
cvtsi2sdl 0x159d0(%rax), %xmm0
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
subsd %xmm1, %xmm0
leaq 0x2f26b7(%rip), %rax    # 0x36c900
movsd %xmm0, (%rax)
callq 0xb630
leaq 0x2f26a7(%rip), %rax    # 0x36c900
addsd (%rax), %xmm0
leaq 0x2f269c(%rip), %rax    # 0x36c900
movsd %xmm0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: check_utc_ofs(int)
void check_utc_ofs(int redraw)
{
   if(have_utc_ofs) return;
   else if((pri_year > 2016) && (utc_offset < 18)) return;
   else if(utc_offset < MIN_UTC_OFFSET) return;

   if((redraw > 0) && (have_utc_ofs == 0)) need_redraw = 2000+redraw;
   if(redraw < 0) have_utc_ofs = (0 - redraw);
   else           have_utc_ofs = redraw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
leaq 0x2f227e(%rip), %rax    # 0x36c4fc
cmpl $0x0, (%rax)
je 0x7a285
jmp 0x7a2fa
leaq 0x2f2468(%rip), %rax    # 0x36c6f4
cmpl $0x7e0, (%rax)          # imm = 0x7E0
jle 0x7a2a2
leaq 0x2f266d(%rip), %rax    # 0x36c908
cmpl $0x12, (%rax)
jge 0x7a2a2
jmp 0x7a2fa
leaq 0x2f265f(%rip), %rax    # 0x36c908
cmpl $0x11, (%rax)
jge 0x7a2b0
jmp 0x7a2fa
jmp 0x7a2b2
jmp 0x7a2b4
cmpl $0x0, -0x4(%rbp)
jle 0x7a2d8
leaq 0x2f223b(%rip), %rax    # 0x36c4fc
cmpl $0x0, (%rax)
jne 0x7a2d8
movl -0x4(%rbp), %ecx
addl $0x7d0, %ecx            # imm = 0x7D0
leaq 0x1fd74e(%rip), %rax    # 0x277a24
movl %ecx, (%rax)
cmpl $0x0, -0x4(%rbp)
jge 0x7a2ee
xorl %ecx, %ecx
subl -0x4(%rbp), %ecx
leaq 0x2f2212(%rip), %rax    # 0x36c4fc
movl %ecx, (%rax)
jmp 0x7a2fa
movl -0x4(%rbp), %ecx
leaq 0x2f2204(%rip), %rax    # 0x36c4fc
movl %ecx, (%rax)
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_unkn_message()
void get_unkn_message()
{
u08 c;

   // This routine reads and throws away messages from unknown receiver types.

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

   c = get_com_char();
   if(com[RCVR_PORT].rcv_error) {      // parity/framing/overrun errors
      com[RCVR_PORT].rcv_error = 0;
   }

   tsip_wptr = 0;
   tsip_sync = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xa, %edi
callq 0xcad0
cmpl $0x0, %eax
jne 0x7a323
movl $0xa, %edi
callq 0x2b610
jmp 0x7a36b
movl $0xa, %edi
callq 0x2bd30
callq 0x79fc0
movb %al, -0x1(%rbp)
leaq 0x2f3184(%rip), %rax    # 0x36d4c0
cmpb $0x0, 0x17a12(%rax)
je 0x7a353
leaq 0x2f3174(%rip), %rax    # 0x36d4c0
movb $0x0, 0x17a12(%rax)
leaq 0x31d0d8(%rip), %rax    # 0x397432
movw $0x0, (%rax)
leaq 0x31d0d0(%rip), %rax    # 0x397436
movw $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_next_tsip()
unsigned get_next_tsip()
{
   early_end = 0;
   if(tsip_rptr >= tsip_wptr) {  // attempt to read past end of message
      return EOL_ERROR;
   }

   return tsip_buf[tsip_rptr++];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw $0x0, 0x350c13(%rip)    # 0x3cafa0
leaq 0x31d0a0(%rip), %rax    # 0x397434
movzwl (%rax), %eax
leaq 0x31d094(%rip), %rcx    # 0x397432
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jl 0x7a3ae
movl $0x2000, -0x4(%rbp)     # imm = 0x2000
jmp 0x7a3dc
leaq 0x31d07f(%rip), %rax    # 0x397434
movw (%rax), %ax
movw %ax, %dx
addw $0x1, %dx
leaq 0x31d06e(%rip), %rcx    # 0x397434
movw %dx, (%rcx)
movzwl %ax, %eax
movl %eax, %ecx
leaq 0x31c05b(%rip), %rax    # 0x396430
movzbl (%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_next_tsip_byte()
unsigned get_next_tsip_byte()
{
u16 c;

   if(1 && early_end) {  // we are skipping message data
      if(log_comments && (log_stream & LOG_HEX_STREAM) && log_file) {
         fprintf(log_file, "[%04X]", early_end);
         if(log_flush_mode) fflush(log_file);
      }
      return early_end;
   }

   c = get_next_tsip();  // get next data stream element
   if(c & 0xFF00) {      // we saw something that was not expected
      if(log_comments && (log_stream & LOG_HEX_STREAM) && log_file) {
         fprintf(log_file, "<%04X>", c);
         if(log_flush_mode) fflush(log_file);
      }
      early_end = c;
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpw $0x0, 0x350ba0(%rip)    # 0x3cafa0
je 0x7a477
leaq 0x2231eb(%rip), %rax    # 0x29d5f4
cmpb $0x0, (%rax)
je 0x7a468
leaq 0x2231db(%rip), %rax    # 0x29d5f0
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x7a468
leaq 0x22311a(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x7a468
leaq 0x22310d(%rip), %rax    # 0x29d540
movq (%rax), %rdi
movzwl 0x350b63(%rip), %edx    # 0x3cafa0
leaq 0x108fd3(%rip), %rsi    # 0x183417
movb $0x0, %al
callq 0x9550
leaq 0x2231ae(%rip), %rax    # 0x29d600
cmpl $0x0, (%rax)
je 0x7a466
leaq 0x2230e2(%rip), %rax    # 0x29d540
movq (%rax), %rdi
callq 0x9430
jmp 0x7a468
movzwl 0x350b31(%rip), %eax    # 0x3cafa0
movl %eax, -0x4(%rbp)
jmp 0x7a503
callq 0x7a380
movw %ax, -0x6(%rbp)
movzwl -0x6(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x7a4fc
leaq 0x22315f(%rip), %rax    # 0x29d5f4
cmpb $0x0, (%rax)
je 0x7a4f1
leaq 0x22314f(%rip), %rax    # 0x29d5f0
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x7a4f1
leaq 0x22308e(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x7a4f1
leaq 0x223081(%rip), %rax    # 0x29d540
movq (%rax), %rdi
movzwl -0x6(%rbp), %edx
leaq 0x108f51(%rip), %rsi    # 0x18341e
movb $0x0, %al
callq 0x9550
leaq 0x223125(%rip), %rax    # 0x29d600
cmpl $0x0, (%rax)
je 0x7a4ef
leaq 0x223059(%rip), %rax    # 0x29d540
movq (%rax), %rdi
callq 0x9430
jmp 0x7a4f1
movw -0x6(%rbp), %ax
movw %ax, 0x350aa4(%rip)     # 0x3cafa0
movzwl -0x6(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_word()
u16 tsip_word()   /* get next two byte (word) field from binary message */
{
u08 i;
u08 word[2];
u16 c;

   for(i=0; i<2; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= WORD_ERROR; 
      if(ENDIAN) word[i] = (u08) c;
      else       word[1-i] = (u08) c;
   }
   return * ((u16 *) (void *) &word[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x2, %eax
jge 0x7a5e0
callq 0x7a3f0
movw %ax, -0x6(%rbp)
movzwl -0x6(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x7a5a1
leaq 0x223bbd(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x10, %ecx
leaq 0x223bb1(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
leaq 0x1fd40c(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7a5bd
movw -0x6(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %eax
movb %cl, -0x3(%rbp,%rax)
jmp 0x7a5d4
movw -0x6(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %edx
movl $0x1, %eax
subl %edx, %eax
cltq
movb %cl, -0x3(%rbp,%rax)
jmp 0x7a5d6
movb -0x1(%rbp), %al
addb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x7a56c
movw -0x3(%rbp), %ax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_tbyte()
u32 tsip_tbyte()   /* get next 3 byte field from binary message */
{
u08 i;
u08 word[3];
u16 c;

   for(i=0; i<3; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= DWORD_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[2-i] = (u08) c;
   }
   return * ((u32 *) (void *) &word[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x3, %eax
jge 0x7a670
callq 0x7a3f0
movw %ax, -0x6(%rbp)
movzwl -0x6(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x7a631
leaq 0x223b2d(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x20, %ecx
leaq 0x223b21(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
leaq 0x1fd37c(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7a64d
movw -0x6(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %eax
movb %cl, -0x4(%rbp,%rax)
jmp 0x7a664
movw -0x6(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %edx
movl $0x2, %eax
subl %edx, %eax
cltq
movb %cl, -0x4(%rbp,%rax)
jmp 0x7a666
movb -0x1(%rbp), %al
addb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x7a5fc
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_dword()
u32 tsip_dword()   /* get next dword field from binary message */
{
u08 i;
u08 word[4];
u16 c;

   for(i=0; i<4; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= DWORD_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[3-i] = (u08) c;
   }
   return * ((u32 *) (void *) &word[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x4, %eax
jge 0x7a700
callq 0x7a3f0
movw %ax, -0x8(%rbp)
movzwl -0x8(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x7a6c1
leaq 0x223a9d(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x20, %ecx
leaq 0x223a91(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
leaq 0x1fd2ec(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7a6dd
movw -0x8(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %eax
movb %cl, -0x5(%rbp,%rax)
jmp 0x7a6f4
movw -0x8(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %edx
movl $0x3, %eax
subl %edx, %eax
cltq
movb %cl, -0x5(%rbp,%rax)
jmp 0x7a6f6
movb -0x1(%rbp), %al
addb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x7a68c
movl -0x5(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_tword()
u48 tsip_tword()   /* get next tword field (48 bit) from binary message */
{
u08 i;
u08 word[3];
u16 c;

   for(i=0; i<3; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= TWORD_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[2-i] = (u08) c;
   }
   return * ((u48 *) (void *) &word[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x3, %eax
jge 0x7a793
callq 0x7a3f0
movw %ax, -0x6(%rbp)
movzwl -0x6(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x7a754
leaq 0x223a0d(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
leaq 0x2239fe(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
leaq 0x1fd259(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7a770
movw -0x6(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %eax
movb %cl, -0x4(%rbp,%rax)
jmp 0x7a787
movw -0x6(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %edx
movl $0x2, %eax
subl %edx, %eax
cltq
movb %cl, -0x4(%rbp,%rax)
jmp 0x7a789
movb -0x1(%rbp), %al
addb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x7a71c
movq -0x4(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: check_float(float)
float check_float(float val) 
{
   // validate a float as being resonable

   if(val != val) {
      tsip_error |= NAN_ERROR;
      return 0.0F;  // kludgy NAN check
   }
   if(val > 1.0E30F) {
      tsip_error |= RANGE_ERROR;
      return 1.0E30F;        // prevent run-away printf's
   }
   if(val < (-1.0E30F)) {
      tsip_error |= RANGE_ERROR;
      return (-1.0E30F);
   }
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss %xmm0, -0x8(%rbp)
movss -0x8(%rbp), %xmm0
ucomiss -0x8(%rbp), %xmm0
jne 0x7a7b8
jp 0x7a7b8
jmp 0x7a7da
leaq 0x223991(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x400, %ecx            # imm = 0x400
leaq 0x223982(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x7a852
movss -0x8(%rbp), %xmm0
movss 0x108b11(%rip), %xmm1   # 0x1832f8
ucomiss %xmm1, %xmm0
jbe 0x7a813
leaq 0x22395d(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
leaq 0x22394e(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
movss 0x108aec(%rip), %xmm0   # 0x1832f8
movss %xmm0, -0x4(%rbp)
jmp 0x7a852
movss 0x108ae1(%rip), %xmm0   # 0x1832fc
ucomiss -0x8(%rbp), %xmm0
jbe 0x7a848
leaq 0x223928(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
leaq 0x223919(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
movss 0x108abb(%rip), %xmm0   # 0x1832fc
movss %xmm0, -0x4(%rbp)
jmp 0x7a852
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x4(%rbp), %xmm0
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_single()
float tsip_single()   /* get next four byte floating number from binary message */
{
u08 i;
u08 word[4];
u16 c;
float val;

   for(i=0; i<4; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= FLOAT_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[3-i] = (u08) c;
   }

   val = (* ((float *) (void *) &word[0]));
   val = check_float(val);   // checks for NAN's
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x4, %eax
jge 0x7a8e0
callq 0x7a3f0
movw %ax, -0x8(%rbp)
movzwl -0x8(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x7a8a1
leaq 0x2238bd(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x40, %ecx
leaq 0x2238b1(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
leaq 0x1fd10c(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7a8bd
movw -0x8(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %eax
movb %cl, -0x5(%rbp,%rax)
jmp 0x7a8d4
movw -0x8(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %edx
movl $0x3, %eax
subl %edx, %eax
cltq
movb %cl, -0x5(%rbp,%rax)
jmp 0x7a8d6
movb -0x1(%rbp), %al
addb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x7a86c
movss -0x5(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
callq 0x7a7a0
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: check_double(double)
double check_double(double val) 
{
   // validate a double as being resonable

   if(val != val) {
      tsip_error |= NAN_ERROR;
      return 0.0;  // kludgy NAN check
   }
   if(val > 1.0E30) {
      tsip_error |= RANGE_ERROR;
      return 1.0E30;        // prevent runaway printf's
   }
   if(val < (-1.0E30)) {
      tsip_error |= RANGE_ERROR;
      return (-1.0E30);
   }
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
ucomisd -0x10(%rbp), %xmm0
jne 0x7a929
jp 0x7a929
jmp 0x7a94b
leaq 0x223820(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x400, %ecx            # imm = 0x400
leaq 0x223811(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x7a9c5
movsd -0x10(%rbp), %xmm0
movsd 0x1081c0(%rip), %xmm1   # 0x182b18
ucomisd %xmm1, %xmm0
jbe 0x7a985
leaq 0x2237eb(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
leaq 0x2237dc(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
movsd 0x10819a(%rip), %xmm0   # 0x182b18
movsd %xmm0, -0x8(%rbp)
jmp 0x7a9c5
movsd 0x108193(%rip), %xmm0   # 0x182b20
ucomisd -0x10(%rbp), %xmm0
jbe 0x7a9bb
leaq 0x2237b5(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
leaq 0x2237a6(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
movsd 0x10816c(%rip), %xmm0   # 0x182b20
movsd %xmm0, -0x8(%rbp)
jmp 0x7a9c5
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_double()
double tsip_double()   /* get next eight byte floating number from binary message */
{
u08 i;
u08 word[8];
u16 c;
double val;

   for(i=0; i<8; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= DOUBLE_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[7-i] = (u08) c;
   }

   val = (* ((double *) (void *) &word[0]));
   val = check_double(val);   // checks for NAN's, etc
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb $0x0, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x8, %eax
jge 0x7aa53
callq 0x7a3f0
movw %ax, -0xc(%rbp)
movzwl -0xc(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0x0, %eax
je 0x7aa14
leaq 0x22374d(%rip), %rax    # 0x29e150
movl (%rax), %ecx
orl $0x80, %ecx
leaq 0x22373e(%rip), %rax    # 0x29e150
movl %ecx, (%rax)
leaq 0x1fcf99(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7aa30
movw -0xc(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %eax
movb %cl, -0x9(%rbp,%rax)
jmp 0x7aa47
movw -0xc(%rbp), %ax
movb %al, %cl
movzbl -0x1(%rbp), %edx
movl $0x7, %eax
subl %edx, %eax
cltq
movb %cl, -0x9(%rbp,%rax)
jmp 0x7aa49
movb -0x1(%rbp), %al
addb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x7a9dc
movsd -0x9(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x7a910
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_string(char*, int)
void tsip_string(char *s, int len)
{
int i;

   // get a 'len" byte string into 's'.  Terminate string with a 0 byte

   if(s == 0) return;

   i = 0;
   s[i] = 0;
   if(len < 0) return;

   while(len--) {
      s[i++] = tsip_byte();
      s[i] = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x7ad68
jmp 0x7adbf
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0xc(%rbp)
jge 0x7ad83
jmp 0x7adbf
jmp 0x7ad85
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, %eax
je 0x7adbf
callq 0x7a510
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x7ad85
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: log_packet_id(char*)
void log_packet_id(char *s)
{
   if((log_stream & LOG_PACKET_ID) || (zoom_screen == 'H')) {
      if(HEX_PACKET_IDS) {
         if(s) strcpy(packet_id, s);
         else  strcpy(packet_id, "{null packet id string}\n");
      }
      else if(s) {
         if(log_file) fprintf(log_file, "   {%s}\n", s);
      }
      else {
         if(log_file) fprintf(log_file, "   {null packet id string}\n");
      }
      if(log_flush_mode && log_file) fflush(log_file);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x22280d(%rip), %rax    # 0x29d5f0
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x7ae00
leaq 0x2f0b94(%rip), %rax    # 0x36b988
movzbl (%rax), %eax
cmpl $0x48, %eax
jne 0x7aecd
leaq 0x1fcca9(%rip), %rcx    # 0x277ab0
movabsq $0x1b197411ff, %rax     # imm = 0x1B197411FF
andq (%rcx), %rax
cmpq $0x0, %rax
je 0x7ae48
cmpq $0x0, -0x8(%rbp)
je 0x7ae33
movq -0x8(%rbp), %rsi
leaq 0x350054(%rip), %rdi    # 0x3cae80
callq 0x9350
jmp 0x7ae46
leaq 0x350046(%rip), %rdi    # 0x3cae80
leaq 0x1085e7(%rip), %rsi    # 0x183428
callq 0x9350
jmp 0x7aea3
cmpq $0x0, -0x8(%rbp)
je 0x7ae7a
leaq 0x2226ea(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x7ae78
leaq 0x2226dd(%rip), %rax    # 0x29d540
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x108597(%rip), %rsi    # 0x183408
movb $0x0, %al
callq 0x9550
jmp 0x7aea1
leaq 0x2226bf(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x7ae9f
leaq 0x2226b2(%rip), %rax    # 0x29d540
movq (%rax), %rdi
leaq 0x10858d(%rip), %rsi    # 0x183425
movb $0x0, %al
callq 0x9550
jmp 0x7aea1
jmp 0x7aea3
leaq 0x222756(%rip), %rax    # 0x29d600
cmpl $0x0, (%rax)
je 0x7aecb
leaq 0x22268a(%rip), %rax    # 0x29d540
cmpq $0x0, (%rax)
je 0x7aecb
leaq 0x22267d(%rip), %rax    # 0x29d540
movq (%rax), %rdi
callq 0x9430
jmp 0x7aecd
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_word(unsigned short)
void send_word(u16 val)
{
u08 *s;
int i;

   s = (u08 *) (void *) &val;
   for(i=0; i<2; i++) {
      if(ENDIAN) send_byte(s[i]);
      else       send_byte(s[1-i]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0x2(%rbp)
leaq -0x2(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jge 0x7b518
leaq 0x1fc4d9(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7b4f3
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b50b
movq -0x10(%rbp), %rax
movl $0x1, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b50d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7b4ce
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_dword(unsigned int)
void send_dword(u32 val)
{
u08 *s;
int i;

   s = (u08 *) (void *) &val;
   for(i=0; i<4; i++) {
      if(ENDIAN) send_byte(s[i]);
      else       send_byte(s[3-i]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
leaq -0x4(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x7b584
leaq 0x1fc46d(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7b55f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b577
movq -0x10(%rbp), %rax
movl $0x3, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b579
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7b53a
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_tword(unsigned long)
void send_tword(u48 val)
{
u08 *s;
int i;

   s = (u08 *) (void *) &val;
   for(i=0; i<3; i++) {
      if(ENDIAN) send_byte(s[i]);
      else       send_byte(s[2-i]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jge 0x7b5f5
leaq 0x1fc3fc(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7b5d0
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b5e8
movq -0x10(%rbp), %rax
movl $0x2, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b5ea
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7b5ab
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_single(float)
void send_single(float val)
{
u08 *s;
int i;

   s = (u08 *) (void *) &val;
   for(i=0; i<4; i++) {
      if(ENDIAN) send_byte(s[i]);
      else       send_byte(s[3-i]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movss %xmm0, -0x4(%rbp)
leaq -0x4(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x7b666
leaq 0x1fc38b(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7b641
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b659
movq -0x10(%rbp), %rax
movl $0x3, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b65b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7b61c
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_double(double)
void send_double(double val)
{
u08 *s;
int i;

   s = (u08 *) (void *) &val;
   for(i=0; i<8; i++) {
      if(ENDIAN) send_byte(s[i]);
      else       send_byte(s[7-i]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd %xmm0, -0x8(%rbp)
leaq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jge 0x7b6d6
leaq 0x1fc31b(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7b6b1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b6c9
movq -0x10(%rbp), %rax
movl $0x7, %ecx
subl -0x14(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b6cb
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7b68c
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_fp80(long double)
void send_fp80(FP80 val)
{
u08 *s;
int i;

// !!!!!!!!!!!! this does not work on machines that don't support native
//              80-bit floating point formats.  We need to do format conversions.
//              before this can be useful.  Note that Heather currently does
//              not ever call this routine... it is just a placeholder for
//              future functionality.

   s = (u08 *) (void *) &val;
   for(i=0; i<10; i++) {
      if(ENDIAN) send_byte(s[i]);
      else       send_byte(s[9-i]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
fldt 0x10(%rbp)
fstpt -0x10(%rbp)
leaq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0xa, -0x1c(%rbp)
jge 0x7b747
leaq 0x1fc2aa(%rip), %rax    # 0x2779b4
cmpb $0x0, (%rax)
je 0x7b722
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b73a
movq -0x18(%rbp), %rax
movl $0x9, %ecx
subl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
callq 0x7b210
jmp 0x7b73c
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7b6fd
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)