LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_true_getver()
void parse_true_getver()
{
   log_packet_id("getver");

   if(get_msg_field()) {
      msg_field[32] = 0;
      strcpy(tp_sw, msg_field);
   }

   if(get_msg_field()) {
      msg_field[32] = 0;
      strcpy(tp_boot, msg_field);
      if(strstr(msg_field, "BOOT")) {
         send_true_cmd("$PROCEED");  // get out of boot mode
      }
   }

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

   if(get_msg_field()) {  // software checmsum
      msg_field[32] = 0;
      strcpy(tp_num2, msg_field);
   }

   if(get_msg_field()) {  // FPGA checksum
      msg_field[32] = 0;
      strcpy(tp_num3, msg_field);
   }

   if(get_msg_field()) {
      msg_field[32] = 0;
      strcpy(tp_sn, msg_field);
   }

   have_info |= ALL_ID_INFO;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xa19bf(%rip), %rdi     # 0x1895aa
callq 0x7add0
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe7c18
leaq 0x2b301f(%rip), %rax    # 0x39ac20
movb $0x0, 0x20(%rax)
leaq 0x2b45c4(%rip), %rdi    # 0x39c1d0
leaq 0x2b300d(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe7c67
leaq 0x2b2ff7(%rip), %rax    # 0x39ac20
movb $0x0, 0x20(%rax)
leaq 0x2b45cc(%rip), %rdi    # 0x39c200
leaq 0x2b2fe5(%rip), %rsi    # 0x39ac20
callq 0x9350
leaq 0x2b2fd9(%rip), %rdi    # 0x39ac20
leaq 0xa1963(%rip), %rsi     # 0x1895b1
callq 0x9090
cmpq $0x0, %rax
je 0xe7c65
leaq 0x9cdf7(%rip), %rdi     # 0x184a57
callq 0x83580
jmp 0xe7c67
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe7c8f
leaq 0x2b2fa8(%rip), %rax    # 0x39ac20
movb $0x0, 0x20(%rax)
leaq 0x2b45ad(%rip), %rdi    # 0x39c230
leaq 0x2b2f96(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe7cb7
leaq 0x2b2f80(%rip), %rax    # 0x39ac20
movb $0x0, 0x20(%rax)
leaq 0x2b45b5(%rip), %rdi    # 0x39c260
leaq 0x2b2f6e(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe7cdf
leaq 0x2b2f58(%rip), %rax    # 0x39ac20
movb $0x0, 0x20(%rax)
leaq 0x2b45bd(%rip), %rdi    # 0x39c290
leaq 0x2b2f46(%rip), %rsi    # 0x39ac20
callq 0x9350
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe7d07
leaq 0x2b2f30(%rip), %rax    # 0x39ac20
movb $0x0, 0x20(%rax)
leaq 0x2b45c5(%rip), %rdi    # 0x39c2c0
leaq 0x2b2f1e(%rip), %rsi    # 0x39ac20
callq 0x9350
leaq 0x284e46(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0xf, %ecx
leaq 0x284e3a(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_enviro_field()
int get_enviro_field()
{
char c;
int i;

   // extract the next field from a sensorr message.  Fields are separated
   // by commas, spaces, or tabs.

   enviro_field[0] = 0;
   if(enviro_msg[enviro_col] == 0) return 0;  // at end-of-message

   i = 0;
   while(enviro_col < (int)sizeof(enviro_msg)) {   // get next field from the thermometer message
      c = enviro_msg[enviro_col];
      if(c == 0) {  // reached end-of-message
         break;
      }
      else if(c == ' ') {  // skip leading spaces, end field on a space
         ++enviro_col;
         if(i) break;
      }
      else if(c == '\t') {  // skip leading spaces, end field on a tab
         ++enviro_col;
         if(i) break;
      }
      else if(c == ',') {  // skip leading spaces, end field on a comma
         ++enviro_col;
         if(i) break;
      }
      else {        // add char to extracted field
         enviro_field[i++] = c;
         enviro_field[i] = 0;
         ++enviro_col;
      }
   }

   return enviro_field[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x2e3165(%rip)    # 0x3cb630
movslq 0x2e3362(%rip), %rcx    # 0x3cb834
leaq 0x2e2f47(%rip), %rax    # 0x3cb420
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xe84ee
movl $0x0, -0x4(%rbp)
jmp 0xe85e1
movl $0x0, -0xc(%rbp)
cmpl $0x201, 0x2e3335(%rip)  # imm = 0x201
jge 0xe85d7
movslq 0x2e3328(%rip), %rcx    # 0x3cb834
leaq 0x2e2f0d(%rip), %rax    # 0x3cb420
movb (%rax,%rcx), %al
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
cmpl $0x0, %eax
jne 0xe8527
jmp 0xe85d7
movsbl -0x5(%rbp), %eax
cmpl $0x20, %eax
jne 0xe854f
movl 0x2e32fe(%rip), %eax    # 0x3cb834
addl $0x1, %eax
movl %eax, 0x2e32f5(%rip)    # 0x3cb834
cmpl $0x0, -0xc(%rbp)
je 0xe854a
jmp 0xe85d7
jmp 0xe85d0
movsbl -0x5(%rbp), %eax
cmpl $0x9, %eax
jne 0xe8571
movl 0x2e32d6(%rip), %eax    # 0x3cb834
addl $0x1, %eax
movl %eax, 0x2e32cd(%rip)    # 0x3cb834
cmpl $0x0, -0xc(%rbp)
je 0xe856f
jmp 0xe85d7
jmp 0xe85ce
movsbl -0x5(%rbp), %eax
cmpl $0x2c, %eax
jne 0xe8593
movl 0x2e32b4(%rip), %eax    # 0x3cb834
addl $0x1, %eax
movl %eax, 0x2e32ab(%rip)    # 0x3cb834
cmpl $0x0, -0xc(%rbp)
je 0xe8591
jmp 0xe85d7
jmp 0xe85cc
movb -0x5(%rbp), %dl
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %eax, %rcx
leaq 0x2e3085(%rip), %rax    # 0x3cb630
movb %dl, (%rax,%rcx)
movslq -0xc(%rbp), %rcx
leaq 0x2e3077(%rip), %rax    # 0x3cb630
movb $0x0, (%rax,%rcx)
movl 0x2e3271(%rip), %eax    # 0x3cb834
addl $0x1, %eax
movl %eax, 0x2e3268(%rip)    # 0x3cb834
jmp 0xe85ce
jmp 0xe85d0
jmp 0xe85d2
jmp 0xe84f5
movsbl 0x2e3052(%rip), %eax    # 0x3cb630
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_humidity()
int parse_humidity()
{
   if(is_numeric(enviro_field)) {
      humidity = (DATA_SIZE) atof(enviro_field);
      have_humidity = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e3031(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe862f
leaq 0x2e3020(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x28375c(%rip), %rax    # 0x36bd78
movsd %xmm0, (%rax)
leaq 0x283e15(%rip), %rax    # 0x36c43c
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8638
movl $0x0, -0x4(%rbp)
jmp 0xe863f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_pressure()
int parse_pressure()
{
   if(is_numeric(enviro_field)) {
      pressure = (DATA_SIZE) atof(enviro_field);
      have_pressure = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2fd1(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe868f
leaq 0x2e2fc0(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x283704(%rip), %rax    # 0x36bd80
movsd %xmm0, (%rax)
leaq 0x283db9(%rip), %rax    # 0x36c440
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8698
movl $0x0, -0x4(%rbp)
jmp 0xe869f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_temp0()
int parse_temp0()
{
   // optional room temperature reading
   if(is_numeric(enviro_field)) {
      tc0 = (DATA_SIZE) atof(enviro_field);
      have_temperature0 = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2f71(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe86ef
leaq 0x2e2f60(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x2836ac(%rip), %rax    # 0x36bd88
movsd %xmm0, (%rax)
leaq 0x283d49(%rip), %rax    # 0x36c430
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe86f8
movl $0x0, -0x4(%rbp)
jmp 0xe86ff
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_temp1()
int parse_temp1()
{
   // remote temperature sensor 1
   if(is_numeric(enviro_field)) {
      tc1 = (DATA_SIZE) atof(enviro_field);
      have_temperature1 = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2f11(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe874f
leaq 0x2e2f00(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x283654(%rip), %rax    # 0x36bd90
movsd %xmm0, (%rax)
leaq 0x283ced(%rip), %rax    # 0x36c434
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8758
movl $0x0, -0x4(%rbp)
jmp 0xe875f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_temp2()
int parse_temp2()
{
   // remote temperature sensor 2
   if(is_numeric(enviro_field)) {
      tc2 = (DATA_SIZE) atof(enviro_field);
      have_temperature2 = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2eb1(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe87af
leaq 0x2e2ea0(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x2835fc(%rip), %rax    # 0x36bd98
movsd %xmm0, (%rax)
leaq 0x283c91(%rip), %rax    # 0x36c438
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe87b8
movl $0x0, -0x4(%rbp)
jmp 0xe87bf
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_adc1()
int parse_adc1()
{
   // remote environmenal sensor ADC channal 1
   if(is_numeric(enviro_field)) {
      adc1 = (DATA_SIZE) atof(enviro_field);
      have_adc1 = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2e51(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe880f
leaq 0x2e2e40(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x2835b4(%rip), %rax    # 0x36bdb0
movsd %xmm0, (%rax)
leaq 0x283c3d(%rip), %rax    # 0x36c444
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8818
movl $0x0, -0x4(%rbp)
jmp 0xe881f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_adc2()
int parse_adc2()
{
   // remote environmenal sensor ADC channal 2
   if(is_numeric(enviro_field)) {
      adc2 = (DATA_SIZE) atof(enviro_field);
      have_adc2 = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2df1(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe886f
leaq 0x2e2de0(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x28355c(%rip), %rax    # 0x36bdb8
movsd %xmm0, (%rax)
leaq 0x283be1(%rip), %rax    # 0x36c448
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8878
movl $0x0, -0x4(%rbp)
jmp 0xe887f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_adc3()
int parse_adc3()
{
   // remote environmenal sensor ADC channal 3
   if(is_numeric(enviro_field)) {
      adc3 = (DATA_SIZE) atof(enviro_field);
      have_adc3 = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2d91(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe88cf
leaq 0x2e2d80(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x283504(%rip), %rax    # 0x36bdc0
movsd %xmm0, (%rax)
leaq 0x283b85(%rip), %rax    # 0x36c44c
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe88d8
movl $0x0, -0x4(%rbp)
jmp 0xe88df
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_adc4()
int parse_adc4()
{
   // remote environmental sensor ADC channel 4
   if(is_numeric(enviro_field)) {
      adc4 = (DATA_SIZE) atof(enviro_field);
      have_adc4 = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2d31(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe892f
leaq 0x2e2d20(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x2834ac(%rip), %rax    # 0x36bdc8
movsd %xmm0, (%rax)
leaq 0x283b29(%rip), %rax    # 0x36c450
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8938
movl $0x0, -0x4(%rbp)
jmp 0xe893f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_dp()
int parse_dp()
{
   // dew point
   if(is_numeric(enviro_field)) {
      dew_pt = (DATA_SIZE) (atof(enviro_field));
      have_dp = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2cd1(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe898f
leaq 0x2e2cc0(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x283454(%rip), %rax    # 0x36bdd0
movsd %xmm0, (%rax)
leaq 0x283acd(%rip), %rax    # 0x36c454
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8998
movl $0x0, -0x4(%rbp)
jmp 0xe899f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_rtemp()
int parse_rtemp()
{
   // remote temperature
   if(is_numeric(enviro_field)) {
      rem_temp = (DATA_SIZE) (atof(enviro_field));
      have_rem_temp = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2c71(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe89ef
leaq 0x2e2c60(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x2833fc(%rip), %rax    # 0x36bdd8
movsd %xmm0, (%rax)
leaq 0x283a71(%rip), %rax    # 0x36c458
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe89f8
movl $0x0, -0x4(%rbp)
jmp 0xe89ff
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_lux()
int parse_lux()
{
   // lux light sensor
   if(is_numeric(enviro_field)) {
      lux = (DATA_SIZE) (atof(enviro_field));
      have_lux = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2c11(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe8a4f
leaq 0x2e2c00(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x2833a4(%rip), %rax    # 0x36bde0
movsd %xmm0, (%rax)
leaq 0x283a19(%rip), %rax    # 0x36c460
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8a58
movl $0x0, -0x4(%rbp)
jmp 0xe8a5f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ref_baro_alt()
int parse_ref_baro_alt()
{
   // reference altitude
   if(is_numeric(enviro_field)) {
      ref_baro_alt = (DATA_SIZE) (atof(enviro_field));
      have_ref_baro_alt = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2bb1(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe8aaf
leaq 0x2e2ba0(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x28334c(%rip), %rax    # 0x36bde8
movsd %xmm0, (%rax)
leaq 0x2839b5(%rip), %rax    # 0x36c45c
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8ab8
movl $0x0, -0x4(%rbp)
jmp 0xe8abf
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_lfs_counter()
int parse_lfs_counter()
{
   // counter / frequency
   if(is_numeric(enviro_field)) {
      lfs_counter = (DATA_SIZE) (atof(enviro_field));
      have_lfs_counter = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2b51(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe8b0f
leaq 0x2e2b40(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x2832f4(%rip), %rax    # 0x36bdf0
movsd %xmm0, (%rax)
leaq 0x28395d(%rip), %rax    # 0x36c464
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8b18
movl $0x0, -0x4(%rbp)
jmp 0xe8b1f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_lfs_emis()
int parse_lfs_emis()
{
   // IR sensor emssivity
   if(is_numeric(enviro_field)) {
      emis1 = (DATA_SIZE) (atof(enviro_field));
      have_lfs_emis = 900;
   }
   else return 0;

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2e2af1(%rip), %rdi    # 0x3cb630
callq 0xb0a70
cmpl $0x0, %eax
je 0xe8b6f
leaq 0x2e2ae0(%rip), %rdi    # 0x3cb630
callq 0x9480
leaq 0x283464(%rip), %rax    # 0x36bfc0
movsd %xmm0, (%rax)
leaq 0x283901(%rip), %rax    # 0x36c468
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8b78
movl $0x0, -0x4(%rbp)
jmp 0xe8b7f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: save_temp1()
void save_temp1()
{
   // if the enviro sensor is the main receiver or the GPS device does not
   // report temperatures, store the main temp sensor reading in the regular 
   // temperature variable/plot (GT plot).

   if(rcvr_type == THERMO_RCVR) {
      temperature = tc1;
      have_temperature = 900;
   }
   else if(have_temperature == 0) {
      temperature = tc1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x18ef15(%rip), %rax    # 0x277ab0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0xe8bc9
leaq 0x2831e5(%rip), %rax    # 0x36bd90
movsd (%rax), %xmm0
leaq 0x283042(%rip), %rax    # 0x36bbf8
movsd %xmm0, (%rax)
leaq 0x28386b(%rip), %rax    # 0x36c42c
movl $0x384, (%rax)          # imm = 0x384
jmp 0xe8bed
leaq 0x28385c(%rip), %rax    # 0x36c42c
cmpl $0x0, (%rax)
jne 0xe8beb
leaq 0x2831b4(%rip), %rax    # 0x36bd90
movsd (%rax), %xmm0
leaq 0x283011(%rip), %rax    # 0x36bbf8
movsd %xmm0, (%rax)
jmp 0xe8bed
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: next_enviro_poll()
int next_enviro_poll()
{
int i;

   // find the next reading that we can poll for

   for(i=0; i<NUM_SENSORS; i++) { 
      if(last_enviro == 0) next_enviro = ENV_TEMP1;
      else if(next_enviro == 0) next_enviro = ENV_TEMP1;
      else next_enviro <<= 1;
      if(next_enviro & (0x0001 << NUM_SENSORS)) next_enviro = ENV_TEMP1;

      if(next_enviro & enviro_sensors) {  // the device supports this reading
         return next_enviro;
      }
   }

   next_enviro = 0;     // device has no known supported readings
   return next_enviro;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x8(%rbp)
cmpl $0xb, -0x8(%rbp)
jge 0xe8ca6
leaq 0x18eef8(%rip), %rax    # 0x277b04
cmpl $0x0, (%rax)
jne 0xe8c20
leaq 0x18eef0(%rip), %rax    # 0x277b08
movl $0x1, (%rax)
jmp 0xe8c51
leaq 0x18eee1(%rip), %rax    # 0x277b08
cmpl $0x0, (%rax)
jne 0xe8c3b
leaq 0x18eed5(%rip), %rax    # 0x277b08
movl $0x1, (%rax)
jmp 0xe8c4f
leaq 0x18eec6(%rip), %rax    # 0x277b08
movl (%rax), %ecx
shll %ecx
leaq 0x18eebb(%rip), %rax    # 0x277b08
movl %ecx, (%rax)
jmp 0xe8c51
leaq 0x18eeb0(%rip), %rax    # 0x277b08
movl (%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xe8c71
leaq 0x18ee9d(%rip), %rax    # 0x277b08
movl $0x1, (%rax)
leaq 0x18ee90(%rip), %rax    # 0x277b08
movl (%rax), %eax
leaq 0x18ee7f(%rip), %rcx    # 0x277b00
andl (%rcx), %eax
cmpl $0x0, %eax
je 0xe8c96
leaq 0x18ee79(%rip), %rax    # 0x277b08
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xe8cbf
jmp 0xe8c98
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xe8bfb
leaq 0x18ee5b(%rip), %rax    # 0x277b08
movl $0x0, (%rax)
leaq 0x18ee4e(%rip), %rax    # 0x277b08
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: detect_enviro_type()
void detect_enviro_type()
{
   // figure up the sensor type and what readings it can do

   enviro_sensors = ENV_TEMP1;   // assume everybody does temperature
   if(strstr(enviro_field, "$PLHEN")) {  // custom Heather BME280 + two thermistors
      enviro_sensors = (ENV_TEMP1 | ENV_TEMP2 | ENV_HUMID | ENV_PRESS);
      enviro_type = HEATHER_ENVIRO;
   }
   else if(strstr(enviro_field, "USB-")) {   // dogratian.com USB devices
      enviro_field[UNIT_LEN] = 0;
      strcpy(enviro_dev, enviro_field);
      have_info |= (MANUF_PARAMS | PRODN_PARAMS | VERSION_INFO);

      if(strstr(enviro_field, "PA")) {  // see what measurements it does
         enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_HUMID | ENV_PRESS);
         enviro_type = DOG_ENVIRO;
      }
      else if(strstr(enviro_field, "SHT")) {
         enviro_sensors = (ENV_SN | ENV_TEMP1 | ENV_HUMID);
         enviro_type = DOG_ENVIRO;
      }
      else if(strstr(enviro_field, "LM75")) {
         enviro_sensors = (ENV_SN | ENV_TEMP1);
         enviro_type = DOG_ENVIRO;
      }
   }
   else if(strstr(enviro_field, "LFS10")) {
      set_lfs_type();
   }

   next_enviro = 0;  // start the polling cycle
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x18ec45(%rip), %rax    # 0x277b00
movl $0x1, (%rax)
leaq 0x2e2768(%rip), %rdi    # 0x3cb630
leaq 0xa07b1(%rip), %rsi     # 0x189680
callq 0x9090
cmpq $0x0, %rax
je 0xe8ef9
leaq 0x18ec1f(%rip), %rax    # 0x277b00
movl $0xf, (%rax)
leaq 0x18ec06(%rip), %rax    # 0x277af4
movl $0x2, (%rax)
jmp 0xe900a
leaq 0x2e2730(%rip), %rdi    # 0x3cb630
leaq 0xa0780(%rip), %rsi     # 0x189687
callq 0x9090
cmpq $0x0, %rax
je 0xe8fe8
movb $0x0, 0x2e2725(%rip)    # 0x3cb642
leaq 0x2b351c(%rip), %rdi    # 0x39c440
leaq 0x2e2705(%rip), %rsi    # 0x3cb630
callq 0x9350
leaq 0x283c1d(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0x7, %ecx
leaq 0x283c11(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
leaq 0x2e26e4(%rip), %rdi    # 0x3cb630
leaq 0xa0739(%rip), %rsi     # 0x18968c
callq 0x9090
cmpq $0x0, %rax
je 0xe8f7a
leaq 0x18eb9b(%rip), %rax    # 0x277b00
movl $0x1d, (%rax)
leaq 0x18eb82(%rip), %rax    # 0x277af4
movl $0x1, (%rax)
jmp 0xe8fe6
leaq 0x2e26af(%rip), %rdi    # 0x3cb630
leaq 0xa0707(%rip), %rsi     # 0x18968f
callq 0x9090
cmpq $0x0, %rax
je 0xe8faf
leaq 0x18eb66(%rip), %rax    # 0x277b00
movl $0x15, (%rax)
leaq 0x18eb4d(%rip), %rax    # 0x277af4
movl $0x1, (%rax)
jmp 0xe8fe4
leaq 0x2e267a(%rip), %rdi    # 0x3cb630
leaq 0xa06d6(%rip), %rsi     # 0x189693
callq 0x9090
cmpq $0x0, %rax
je 0xe8fe2
leaq 0x18eb31(%rip), %rax    # 0x277b00
movl $0x11, (%rax)
leaq 0x18eb18(%rip), %rax    # 0x277af4
movl $0x1, (%rax)
jmp 0xe8fe4
jmp 0xe8fe6
jmp 0xe9008
leaq 0x2e2641(%rip), %rdi    # 0x3cb630
leaq 0xa06a2(%rip), %rsi     # 0x189698
callq 0x9090
cmpq $0x0, %rax
je 0xe9006
callq 0xe8cd0
jmp 0xe9008
jmp 0xe900a
leaq 0x18eaf7(%rip), %rax    # 0x277b08
movl $0x0, (%rax)
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: decode_heather_enviro(unsigned int, int)
void decode_heather_enviro(unsigned port, int i)
{
   // decode Heather sensor values.  No need to poll for the next readings

   enviro_type = HEATHER_ENVIRO;
   if(get_enviro_field()) {  // humidity
      parse_humidity();
   }
   if(get_enviro_field()) {  // pressure
      parse_pressure();
   }
   if(get_enviro_field()) {  // BME280 temp sensor (room temp) (not currently used)
      parse_temp0();
   }
   if(get_enviro_field()) {  // thermistor 1
      parse_temp1();
      save_temp1();
   }
   if(get_enviro_field()) {  // thermistor 2
      parse_temp2();
   }
   if(get_enviro_field()) {  // ADC channel 3
//lfs parse_adc3();
   }
   if(get_enviro_field()) {  // ADC channel 4
//lfs parse_adc4();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq 0x18e17f(%rip), %rax    # 0x277af4
movl $0x2, (%rax)
callq 0xe84c0
cmpl $0x0, %eax
je 0xe998a
callq 0xe85f0
callq 0xe84c0
cmpl $0x0, %eax
je 0xe9999
callq 0xe8650
callq 0xe84c0
cmpl $0x0, %eax
je 0xe99a8
callq 0xe86b0
callq 0xe84c0
cmpl $0x0, %eax
je 0xe99bc
callq 0xe8710
callq 0xe8b90
callq 0xe84c0
cmpl $0x0, %eax
je 0xe99cb
callq 0xe8770
callq 0xe84c0
cmpl $0x0, %eax
je 0xe99d7
jmp 0xe99d7
callq 0xe84c0
cmpl $0x0, %eax
je 0xe99e3
jmp 0xe99e3
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_dac_value(double)
int send_dac_value(double val)
{
unsigned i;

   // send a value to the external DAC port
   if(dac_port_open() == 0) return 0;


   sprintf(out, "%.6f", val);
   sendout(DAC_PORT, '$', ADD_CHAR);
   for(i=0; i<strlen(out); i++) {
      sendout(DAC_PORT, out[i], ADD_CHAR);
   }
   sendout(DAC_PORT, 0x0D, ADD_CHAR);
   sendout(DAC_PORT, 0x0A, EOM);

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd %xmm0, -0x10(%rbp)
callq 0xea380
cmpl $0x0, %eax
jne 0xea3e3
movl $0x0, -0x4(%rbp)
jmp 0xea487
movsd -0x10(%rbp), %xmm0
leaq 0x2b1011(%rip), %rdi    # 0x39b400
leaq 0x8f309(%rip), %rsi     # 0x1796ff
movb $0x1, %al
callq 0x9060
movl $0x10, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0xd160
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
leaq 0x2b0fdd(%rip), %rdi    # 0x39b400
callq 0x9120
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0xea45b
movl -0x14(%rbp), %eax
movl %eax, %ecx
movl $0x10, %edi
xorl %edx, %edx
leaq 0x2b0fb9(%rip), %rax    # 0x39b400
movzbl (%rax,%rcx), %esi
callq 0xd160
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xea415
movl $0x10, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xd160
movl $0x10, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xd160
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_dac_field()
int get_dac_field()
{
char c;
int i;

   // extract the next field from a ADC message.  Fields are separated by
   // spaces or tabs.  

   dac_field[0] = 0;
   if(dac_msg[dac_col] == 0) return 0;  // at end-of-message

   i = 0;
   while(dac_col < (int)sizeof(dac_msg)) {   // get next field from the ADC message
      c = dac_msg[dac_col];
      if(c == 0) {  // reached end-of-message
         break;
      }
      else if(c == ' ') {  // skip leading spaces, end field on a space
         ++dac_col;
         if(i) break;
      }
      else if(c == '\t') {  // skip leading spaces, end field on a tab
         ++dac_col;
         if(i) break;
      }
      else {        // add char to extracted field
         dac_field[i++] = c;
         dac_field[i] = 0;
         ++dac_col;
      }
   }

   return dac_field[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x2e15b5(%rip)    # 0x3cba50
movslq 0x2e17b2(%rip), %rcx    # 0x3cbc54
leaq 0x2e1397(%rip), %rax    # 0x3cb840
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xea4be
movl $0x0, -0x4(%rbp)
jmp 0xea587
movl $0x0, -0xc(%rbp)
cmpl $0x201, 0x2e1785(%rip)  # imm = 0x201
jge 0xea57d
movslq 0x2e1778(%rip), %rcx    # 0x3cbc54
leaq 0x2e135d(%rip), %rax    # 0x3cb840
movb (%rax,%rcx), %al
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
cmpl $0x0, %eax
jne 0xea4f7
jmp 0xea57d
movsbl -0x5(%rbp), %eax
cmpl $0x20, %eax
jne 0xea519
movl 0x2e174e(%rip), %eax    # 0x3cbc54
addl $0x1, %eax
movl %eax, 0x2e1745(%rip)    # 0x3cbc54
cmpl $0x0, -0xc(%rbp)
je 0xea517
jmp 0xea57d
jmp 0xea576
movsbl -0x5(%rbp), %eax
cmpl $0x9, %eax
jne 0xea53b
movl 0x2e172c(%rip), %eax    # 0x3cbc54
addl $0x1, %eax
movl %eax, 0x2e1723(%rip)    # 0x3cbc54
cmpl $0x0, -0xc(%rbp)
je 0xea539
jmp 0xea57d
jmp 0xea574
movb -0x5(%rbp), %dl
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %eax, %rcx
leaq 0x2e14fd(%rip), %rax    # 0x3cba50
movb %dl, (%rax,%rcx)
movslq -0xc(%rbp), %rcx
leaq 0x2e14ef(%rip), %rax    # 0x3cba50
movb $0x0, (%rax,%rcx)
movl 0x2e16e9(%rip), %eax    # 0x3cbc54
addl $0x1, %eax
movl %eax, 0x2e16e0(%rip)    # 0x3cbc54
jmp 0xea576
jmp 0xea578
jmp 0xea4c5
movsbl 0x2e14cc(%rip), %eax    # 0x3cba50
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: decode_dac_msg(unsigned int)
void decode_dac_msg(unsigned port)
{
int i;
u08 c;
DATA_SIZE val;

// if(rcvr_type == DAC_RCVR) {
   if(0) {
      start_msg_decode(1);
      ++dac_packets;
   }
   else {
      ++packet_count;
      ++dac_packets;
   }

   // reset the data queues shortly after startup.  
//   if((dac_packets == DAC_RESET_THRESH) && (pause_data == 0)) {
//      new_queue(RESET_ALL_QUEUES, 103);
//   }

   dac_msg[0] = 0;
   if(port == DAC_PORT) {
      for(i=0; i<dac_wptr; i++) {  // copy message from ADC buffer to dac_msg
         c = dac_buf[i];
         dac_msg[i] = c;
         dac_msg[i+1] = 0;
      }
   }
   else {
      for(i=0; i<tsip_wptr; i++) {  // copy message from tsip buffer to dac_msg
         c = tsip_buf[i];
         dac_msg[i] = c;
         dac_msg[i+1] = 0;
      }
   }

   strupr(dac_msg);

   dac_col = 0;     // index of next char to get from DAC (actally ADC) buffer
   if(get_dac_field()) {
      if(is_numeric(dac_field)) {
         val = (DATA_SIZE) atof(dac_field);
         // !!!!!!! do something
      }
      else return;
   }

   saw_rcvr_msg = 1;
   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
leaq 0x1b3bb2(%rip), %rax    # 0x29e154
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1b3ba6(%rip), %rax    # 0x29e154
movl %ecx, (%rax)
leaq 0x1b3bad(%rip), %rax    # 0x29e164
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1b3ba1(%rip), %rax    # 0x29e164
movl %ecx, (%rax)
movb $0x0, 0x2e1274(%rip)    # 0x3cb840
cmpl $0x10, -0x4(%rbp)
jne 0xea62a
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
leaq 0x2afe81(%rip), %rcx    # 0x39a464
cmpl (%rcx), %eax
jge 0xea628
movslq -0x8(%rbp), %rcx
leaq 0x2aee6e(%rip), %rax    # 0x399460
movb (%rax,%rcx), %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %dl
movslq -0x8(%rbp), %rcx
leaq 0x2e123a(%rip), %rax    # 0x3cb840
movb %dl, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x2e1227(%rip), %rax    # 0x3cb840
movb $0x0, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xea5d9
jmp 0xea685
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
leaq 0x2acdf7(%rip), %rcx    # 0x397432
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xea683
movslq -0x8(%rbp), %rcx
leaq 0x2abde3(%rip), %rax    # 0x396430
movb (%rax,%rcx), %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %dl
movslq -0x8(%rbp), %rcx
leaq 0x2e11df(%rip), %rax    # 0x3cb840
movb %dl, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x2e11cc(%rip), %rax    # 0x3cb840
movb $0x0, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xea631
jmp 0xea685
leaq 0x2e11b4(%rip), %rdi    # 0x3cb840
callq 0x9890
movl $0x0, 0x2e15b9(%rip)    # 0x3cbc54
callq 0xea490
cmpl $0x0, %eax
je 0xea6cd
leaq 0x2e13a4(%rip), %rdi    # 0x3cba50
callq 0xb0a70
cmpl $0x0, %eax
je 0xea6c9
leaq 0x2e1393(%rip), %rdi    # 0x3cba50
callq 0x9480
movsd %xmm0, -0x18(%rbp)
jmp 0xea6cb
jmp 0xea6da
jmp 0xea6cd
leaq 0x1b3aac(%rip), %rax    # 0x29e180
movl $0x1, (%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_ticc_field()
int get_ticc_field()
{
char c;
int i;

   // extract the next field from a TICC message.  Fields are separated by
   // spaces or tabs.  HP counters embed commas in numbers so we don't end
   // fields with commas.

   ticc_field[0] = 0;
   if(ticc_msg[ticc_col] == 0) return 0;  // at end-of-message

   i = 0;
   while(ticc_col < (int)sizeof(ticc_msg)) {   // get next field from the ticc message
      c = ticc_msg[ticc_col];
      if(c == 0) {  // reached end-of-message
         break;
      }
      else if(c == ' ') {  // skip leading spaces, end field on a space
         ++ticc_col;
         if(i) break;
      }
      else if(c == '\t') {  // skip leading spaces, end field on a tab
         ++ticc_col;
         if(i) break;
      }
      else {        // add char to extracted field
         ticc_field[i++] = c;
         ticc_field[i] = 0;
         ++ticc_col;
      }
   }

   return ticc_field[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x2e0925(%rip)    # 0x3cb210
movslq 0x2e0b22(%rip), %rcx    # 0x3cb414
leaq 0x2e0707(%rip), %rax    # 0x3cb000
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xea90e
movl $0x0, -0x4(%rbp)
jmp 0xea9d7
movl $0x0, -0xc(%rbp)
cmpl $0x201, 0x2e0af5(%rip)  # imm = 0x201
jge 0xea9cd
movslq 0x2e0ae8(%rip), %rcx    # 0x3cb414
leaq 0x2e06cd(%rip), %rax    # 0x3cb000
movb (%rax,%rcx), %al
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
cmpl $0x0, %eax
jne 0xea947
jmp 0xea9cd
movsbl -0x5(%rbp), %eax
cmpl $0x20, %eax
jne 0xea969
movl 0x2e0abe(%rip), %eax    # 0x3cb414
addl $0x1, %eax
movl %eax, 0x2e0ab5(%rip)    # 0x3cb414
cmpl $0x0, -0xc(%rbp)
je 0xea967
jmp 0xea9cd
jmp 0xea9c6
movsbl -0x5(%rbp), %eax
cmpl $0x9, %eax
jne 0xea98b
movl 0x2e0a9c(%rip), %eax    # 0x3cb414
addl $0x1, %eax
movl %eax, 0x2e0a93(%rip)    # 0x3cb414
cmpl $0x0, -0xc(%rbp)
je 0xea989
jmp 0xea9cd
jmp 0xea9c4
movb -0x5(%rbp), %dl
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %eax, %rcx
leaq 0x2e086d(%rip), %rax    # 0x3cb210
movb %dl, (%rax,%rcx)
movslq -0xc(%rbp), %rcx
leaq 0x2e085f(%rip), %rax    # 0x3cb210
movb $0x0, (%rax,%rcx)
movl 0x2e0a59(%rip), %eax    # 0x3cb414
addl $0x1, %eax
movl %eax, 0x2e0a50(%rip)    # 0x3cb414
jmp 0xea9c6
jmp 0xea9c8
jmp 0xea915
movsbl 0x2e083c(%rip), %eax    # 0x3cb210
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_ticc_line(unsigned int)
int get_ticc_line(unsigned port)
{
unsigned i;
char c;
double t0;

   // get a line from the TICC menu.

   if(port >= NUM_COM_PORTS) return 1;

   i = 0;
   cfg_buf[i] = 0;
   t0 = GetMsecs();
   while(GetMsecs() < (t0 + 1000.0)) {   // !!!! we need a timeout here
      if(SERIAL_DATA_AVAILABLE(port)) {
         c = get_ticc_char();
         if(c == 0x0A) continue;
         if(c == 0x0D) return 0;
         if(i > (sizeof(cfg_buf) - 2)) break;
         cfg_buf[i++] = c;
         cfg_buf[i] = 0;
      }
   }
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
cmpl $0x13, -0x8(%rbp)
jb 0xea9fd
movl $0x1, -0x4(%rbp)
jmp 0xeaab0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2e6a70(%rip), %rax    # 0x3d1480
movb $0x0, (%rax,%rcx)
callq 0xb630
movsd %xmm0, -0x18(%rbp)
callq 0xb630
movaps %xmm0, %xmm1
movsd 0x84602(%rip), %xmm0    # 0x16f030
addsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xeaaa9
movl -0x8(%rbp), %edi
callq 0xcad0
cmpl $0x0, %eax
je 0xeaaa4
callq 0x7a030
movb %al, -0xd(%rbp)
movsbl -0xd(%rbp), %eax
cmpl $0xa, %eax
jne 0xeaa59
jmp 0xeaa1e
movsbl -0xd(%rbp), %eax
cmpl $0xd, %eax
jne 0xeaa6b
movl $0x0, -0x4(%rbp)
jmp 0xeaab0
movl -0xc(%rbp), %eax
cmpq $0x3fe, %rax            # imm = 0x3FE
jbe 0xeaa78
jmp 0xeaaa9
movb -0xd(%rbp), %dl
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movl %eax, %eax
movl %eax, %ecx
leaq 0x2e69ef(%rip), %rax    # 0x3d1480
movb %dl, (%rax,%rcx)
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x2e69e0(%rip), %rax    # 0x3d1480
movb $0x0, (%rax,%rcx)
jmp 0xeaa1e
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: ishex(char)
int ishex(char c)
{
   // returns true if 'c' is a valid ascii hex character
   c &= 0xFF;
   if((c >= '0') && (c <= '9')) return 1;
   if((toupper(c) >= 'A') && (toupper(c) <= 'F')) return 1;

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
andl $0xff, %eax
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
cmpl $0x30, %eax
jl 0xeaaf5
movsbl -0x5(%rbp), %eax
cmpl $0x39, %eax
jg 0xeaaf5
movl $0x1, -0x4(%rbp)
jmp 0xeab21
movsbl -0x5(%rbp), %edi
callq 0x96e0
cmpl $0x41, %eax
jl 0xeab1a
movsbl -0x5(%rbp), %edi
callq 0x96e0
cmpl $0x46, %eax
jg 0xeab1a
movl $0x1, -0x4(%rbp)
jmp 0xeab21
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: pet_data(unsigned char*, int, int)
int pet_data(unsigned char *buf, int k, int check_crlf)
{
int p;

   // returns true if data in buf starting at char k is a valid picpet reading

   if(!isdigit(buf[k+0] & 0xFF)) return 0;
   if(!isdigit(buf[k+1] & 0xFF)) return 0;
   if(buf[k+2] != '.') return 0;

   for(p=3; p<=9; p++) {
      if(isdigit(buf[k+p] & 0xFF) == 0) return 0;
   }
   if(buf[k+10] != ' ') return 0;
   if(ishex(buf[k+11]) == 0) return 0;
   if(ishex(buf[k+12]) == 0) return 0;
   if(check_crlf) {
      if(buf[k+13] != 0x0D) return 0;
      if(buf[k+14] != 0x0A) return 0;
   }
   else {
      if(buf[k+13]) return 0;
   }

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
andl $0xff, %edi
callq 0x9330
cmpl $0x0, %eax
jne 0xeab6f
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
andl $0xff, %edi
callq 0x9330
cmpl $0x0, %eax
jne 0xeab9c
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x2e, %eax
je 0xeabbe
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
movl $0x3, -0x1c(%rbp)
cmpl $0x9, -0x1c(%rbp)
jg 0xeac05
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edi
andl $0xff, %edi
callq 0x9330
cmpl $0x0, %eax
jne 0xeabf8
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
jmp 0xeabfa
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xeabc5
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0xa, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0xeac27
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0xb, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0xeaac0
cmpl $0x0, %eax
jne 0xeac4e
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0xc, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0xeaac0
cmpl $0x0, %eax
jne 0xeac72
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
cmpl $0x0, -0x18(%rbp)
je 0xeacb8
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0xd, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xd, %eax
je 0xeac97
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0xe, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0xeacb6
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
jmp 0xeacd6
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0xd, %ecx
movslq %ecx, %rcx
cmpb $0x0, (%rax,%rcx)
je 0xeacd4
movl $0x0, -0x4(%rbp)
jmp 0xeacdd
jmp 0xeacd6
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: lars_data(char*)
int lars_data(char *buf)
{
int i;

   // returns true if data in buf looks like it comes from a Lars GPSDO

   i = 0;
   if(strstr(buf, "LARS")) i = 1;
   if(strstr(buf, "HELP+INFO")) i = 2;
   if(strstr(buf, "NO PPS")) i = 3;
   if(strstr(buf, "WARMUP")) i = 10;
   if(strstr(buf, "NOLOCK")) i = 11;
   if(strstr(buf, "LOCKED"))i = 12;
   if((i >= 10) && !strchr(buf, '\t')) return 0;
   return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x9e9f2(%rip), %rsi     # 0x189700
callq 0x9090
cmpq $0x0, %rax
je 0xead20
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x9e9da(%rip), %rsi     # 0x189705
callq 0x9090
cmpq $0x0, %rax
je 0xead3d
movl $0x2, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x9e9c7(%rip), %rsi     # 0x18970f
callq 0x9090
cmpq $0x0, %rax
je 0xead5a
movl $0x3, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x9dcb7(%rip), %rsi     # 0x188a1c
callq 0x9090
cmpq $0x0, %rax
je 0xead77
movl $0xa, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x9e994(%rip), %rsi     # 0x189716
callq 0x9090
cmpq $0x0, %rax
je 0xead94
movl $0xb, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa140d(%rip), %rsi     # 0x18c1ac
callq 0x9090
cmpq $0x0, %rax
je 0xeadb1
movl $0xc, -0x14(%rbp)
cmpl $0xa, -0x14(%rbp)
jl 0xeadd4
movq -0x10(%rbp), %rdi
movl $0x9, %esi
callq 0x9100
cmpq $0x0, %rax
jne 0xeadd4
movl $0x0, -0x4(%rbp)
jmp 0xeadda
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: hp_time(char*)
double hp_time(char *s)
{
unsigned i, j;

   // convert an HP formatted time string to a normal number by removing
   // embedded commas.  Returns the time as a double.

   j = 0;
   for(i=0; i<strlen(s); i++) {  // remove commas
      if(s[i] != ',') {
         s[j++] = s[i];
      }
   }
   s[j] = 0;

   return atof(s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
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 0xeba51
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
je 0xeba44
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x10(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0xeba46
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xeb9fa
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rdi
callq 0x9480
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: tie_to_freq(int, double)
double tie_to_freq(int id, double val)
{
double nominal_freq;
double period;

   // convert time interval error to frequency

   if(id == PPS) {
      nominal_freq = nominal_cha_freq;
      period = pps_adev_period;
   }
   else if(id == OSC) {
      if(rcvr_type == PRS_RCVR) {  // show PPT as frequency
         return val * 10.0E-6 * 1000.0;
      }
      else {
         nominal_freq = nominal_chb_freq;
         period = osc_adev_period;
      }
   }
   else if(id == SEVEN) {
      nominal_freq = nominal_chc_freq;
      period = chc_adev_period;
   }
   else if(id == EIGHT) {
      nominal_freq = nominal_chd_freq;
      period = chd_adev_period;
   }
   else {
      nominal_freq = NOMINAL_FREQ;
      period = 1.0;
   }
period = 1.0;   // !!!!! TIE is always referenced to 1 Hz

   val = (period - (val/1.0e9)) * nominal_freq;
// val = (period + (val/1.0e9)) * nominal_freq;
val -= nominal_freq;  // frequency difference from nominal
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movsd %xmm0, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xebc17
leaq 0x27ff4f(%rip), %rax    # 0x36bb48
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq 0x1b02d7(%rip), %rax    # 0x29bee0
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0xebce2
cmpl $0x1, -0xc(%rbp)
jne 0xebc72
leaq 0x18be8c(%rip), %rax    # 0x277ab0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0xebc50
movsd 0x859eb(%rip), %xmm0    # 0x171620
mulsd -0x18(%rbp), %xmm0
movsd 0x833ee(%rip), %xmm1    # 0x16f030
mulsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xebd30
leaq 0x27fef9(%rip), %rax    # 0x36bb50
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq 0x1b0281(%rip), %rax    # 0x29bee8
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0xebce0
cmpl $0xa, -0xc(%rbp)
jne 0xebc9a
leaq 0x27fed9(%rip), %rax    # 0x36bb58
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq 0x1b0261(%rip), %rax    # 0x29bef0
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0xebcde
cmpl $0xb, -0xc(%rbp)
jne 0xebcc2
leaq 0x27feb9(%rip), %rax    # 0x36bb60
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq 0x1b0241(%rip), %rax    # 0x29bef8
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0xebcdc
movsd 0x834e6(%rip), %xmm0    # 0x16f1b0
movsd %xmm0, -0x20(%rbp)
movsd 0x83391(%rip), %xmm0    # 0x16f068
movsd %xmm0, -0x28(%rbp)
jmp 0xebcde
jmp 0xebce0
jmp 0xebce2
movsd 0x8337e(%rip), %xmm0    # 0x16f068
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd 0x83327(%rip), %xmm2    # 0x16f028
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x20(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_track_port()
void send_track_port()
{
int i, j;

   // send message "out" to the TRACK_PORT

   j = strlen(out);
   for(i=0; i<j; i++) {
      sendout(TRACK_PORT, (u08) out[i], ADD_CHAR);
   }
   sendout(TRACK_PORT, 0x0D, ADD_CHAR);
   sendout(TRACK_PORT, 0x0A, ADD_CHAR);
   sendout(TRACK_PORT, 0, FLUSH_COM);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2af1b1(%rip), %rdi    # 0x39b400
callq 0x9120
movl %eax, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xec28c
movslq -0x4(%rbp), %rcx
movl $0x12, %edi
xorl %edx, %edx
leaq 0x2af188(%rip), %rax    # 0x39b400
movzbl (%rax,%rcx), %esi
callq 0xd160
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xec25e
movl $0x12, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xd160
movl $0x12, %edi
movl $0xa, %esi
xorl %edx, %edx
callq 0xd160
movl $0x12, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0xd160
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_prn_azel(int)
void send_prn_azel(int prn)
{
   // send sat az/el out the TRACK_PORT if it is enabled

   if((prn >= 1) && (prn <= MAX_PRN)) {
      sprintf(out, "PRN %3d: %9.3f %9.3f", prn, sat[prn].azimuth, sat[prn].elevation);
   }
   else {  // invalid satellite
      strcpy(out, "PRN: 000");
   }
   send_track_port();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x1, -0x4(%rbp)
jl 0xec346
cmpl $0x3e7, -0x4(%rbp)      # imm = 0x3E7
jg 0xec346
movl -0x4(%rbp), %edx
movslq -0x4(%rbp), %rcx
leaq 0x1b1e98(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x208(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0x4(%rbp), %rcx
leaq 0x1b1e77(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20c(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x2af0ca(%rip), %rdi    # 0x39b400
leaq 0x9d5d9(%rip), %rsi     # 0x189916
movb $0x2, %al
callq 0x9060
jmp 0xec359
leaq 0x2af0b3(%rip), %rdi    # 0x39b400
leaq 0x9d5d7(%rip), %rsi     # 0x18992b
callq 0x9350
callq 0xec240
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: highest_sat()
int highest_sat()
{
float el;
int prn;
int i;

   // return the PRN of the highest elevation satellite

   prn = 0;
   el = 0.0;
   for(i=1; i<=MAX_PRN; i++) { 
      if(sat[i].tracking > 0) {
         if(sat[i].elevation > el) {
            el = sat[i].elevation;
            prn = i;
         }
      }
   }
   return prn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
movl $0x1, -0xc(%rbp)
cmpl $0x3e7, -0xc(%rbp)      # imm = 0x3E7
jg 0xec40e
movslq -0xc(%rbp), %rcx
leaq 0x1b1df2(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
cmpl $0x0, 0x218(%rax)
jle 0xec3fe
movslq -0xc(%rbp), %rcx
leaq 0x1b1dd4(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20c(%rax), %xmm0
ucomiss -0x4(%rbp), %xmm0
jbe 0xec3fc
movslq -0xc(%rbp), %rcx
leaq 0x1b1db1(%rip), %rax    # 0x29e190
imulq $0x348, %rcx, %rcx      # imm = 0x348
addq %rcx, %rax
movss 0x20c(%rax), %xmm0
movss %xmm0, -0x4(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0xec3fe
jmp 0xec400
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xec38a
movl -0x8(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)