LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_coast()
void parse_tm4_coast()
{
int hh,mm,ss;

   log_packet_id("coast time");

   hh = mm = ss = 0;
   if(get_msg_field()) {  // hhhhmmss
      sscanf(msg_field, "%04d%02d%02d", &hh,&mm,&ss);
      holdover = (hh*3600 + mm*60 + ss);
   }

   if(get_msg_field()) {  // undocumented 8 chars
   }
   if(get_msg_field()) {  // undocumented 8 chars 
   }
   if(get_msg_field()) {  // undocumented 8 chars 
   }
   if(get_msg_field()) {  // undocumented value (2)
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xa888b(%rip), %rdi     # 0x188eea
callq 0x7add0
movl $0x0, -0xc(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe06bd
leaq 0x2ba596(%rip), %rdi    # 0x39ac20
leaq 0xa8864(%rip), %rsi     # 0x188ef5
leaq -0x4(%rbp), %rdx
leaq -0x8(%rbp), %rcx
leaq -0xc(%rbp), %r8
movb $0x0, %al
callq 0x9370
imull $0xe10, -0x4(%rbp), %ecx # imm = 0xE10
imull $0x3c, -0x8(%rbp), %eax
addl %eax, %ecx
addl -0xc(%rbp), %ecx
leaq 0x28bf7d(%rip), %rax    # 0x36c638
movl %ecx, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe06c9
jmp 0xe06c9
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe06d5
jmp 0xe06d5
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe06e1
jmp 0xe06e1
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe06ed
jmp 0xe06ed
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_lock(int)
void parse_tm4_lock(int id)
{
   sprintf(out, "lock status: #%d", id);
   log_packet_id(out);

   if(get_msg_field()) {
      tm4_lock = (-1);
      if(isdigit(msg_field[0])) tm4_lock = atoi(msg_field);
      have_tm4_lock = id;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edx
leaq 0x2baceb(%rip), %rdi    # 0x39b400
leaq 0xa87e6(%rip), %rsi     # 0x188f02
movb $0x0, %al
callq 0x9060
leaq 0x2bacd6(%rip), %rdi    # 0x39b400
callq 0x7add0
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe077d
leaq 0x2ba9e4(%rip), %rax    # 0x39b124
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x2ba4d3(%rip), %rax    # 0x39ac20
movsbl (%rax), %edi
callq 0x9330
cmpl $0x0, %eax
je 0xe0771
leaq 0x2ba4bf(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x2ba9b5(%rip), %rax    # 0x39b124
movl %ecx, (%rax)
movl -0x4(%rbp), %ecx
leaq 0x2ba9ad(%rip), %rax    # 0x39b128
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_tm4_options()
void parse_tm4_options()
{
   log_packet_id("option settings");

   if(get_msg_field()) {  // antenna alarm enable
      tm4_antenna = atoi(msg_field);
      have_tm4_antenna = 1;
   }

   if(get_msg_field()) {  // PPS source
      tm4_pps_source = atoi(msg_field);
      have_tm4_pps_source = 1;
   }

   if(get_msg_field()) {  // reserved
   }

   if(get_msg_field()) {  // reserved 
   }

   if(get_msg_field()) {  // reserved 
   }

   if(get_msg_field()) {  // reserved
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xa8778(%rip), %rdi     # 0x188f13
callq 0x7add0
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe07ce
leaq 0x2ba46f(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x2ba96d(%rip), %rax    # 0x39b12c
movl %ecx, (%rax)
leaq 0x2ba968(%rip), %rax    # 0x39b130
movl $0x1, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe07fc
leaq 0x2ba441(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x2ba947(%rip), %rax    # 0x39b134
movl %ecx, (%rax)
leaq 0x2ba942(%rip), %rax    # 0x39b138
movl $0x1, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe0808
jmp 0xe0808
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe0814
jmp 0xe0814
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe0820
jmp 0xe0820
callq 0xb0bd0
cmpl $0x0, %eax
je 0xe082c
jmp 0xe082c
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: send_acron_byte(unsigned char)
void send_acron_byte(u08 c)
{
   // send string to the serial port...  send each char to the serial port
   // wait for ACRON_RCVR to echo input char, eat it, then wait 
   // at least 10 msecs
//if(debug_file) fprintf(debug_file, "send:%02X\n", c);

   sendout(RCVR_PORT, c, EOM);

   while(SERIAL_DATA_AVAILABLE(RCVR_PORT) == 0) {  // wait for char to echo
      check_com_timer(RCVR_PORT);
      if(com[RCVR_PORT].com_data_lost) return;
   }

   c = get_com_char();  // eat that pesky echoed character
//if(debug_file) fprintf(debug_file, "eat:%02X\n", c);
   if(sim_file == 0) Sleep(20);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movl $0xa, %edi
movl $0x1, %edx
movzbl -0x1(%rbp), %esi
callq 0xd160
movl $0xa, %edi
callq 0xcad0
cmpl $0x0, %eax
jne 0xe0fae
movl $0xa, %edi
callq 0x2b610
leaq 0x28c51f(%rip), %rax    # 0x36d4c0
cmpb $0x0, 0x17a10(%rax)
je 0xe0fac
jmp 0xe0fcd
jmp 0xe0f81
callq 0x79fc0
movb %al, -0x1(%rbp)
leaq 0x1bc5e3(%rip), %rax    # 0x29d5a0
cmpq $0x0, (%rax)
jne 0xe0fcd
movl $0x14, %edi
callq 0xb8b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: init_acron_time()
void init_acron_time()
{
   // set UTC mode, leap year flag
   // clear leap second and dst flags

   get_clock_time();
   if(leap_year(clk_year)) {
      send_acron_cmd("88c");
   }
   else {
      send_acron_cmd("80c");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0xa750
leaq 0x28b8b8(%rip), %rax    # 0x36c8a8
movl (%rax), %edi
callq 0x1328d0
cmpl $0x0, %eax
je 0xe100a
leaq 0xa7f78(%rip), %rdi     # 0x188f7b
callq 0x82f40
jmp 0xe1016
leaq 0xa7f6e(%rip), %rdi     # 0x188f7f
callq 0x82f40
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_acron_atime()
void parse_acron_atime()
{
int doy;
int tz;
double jd;
int last_tick = 999;
   // asynchronous time request (12 byte response)
if(debug_file) fprintf(debug_file, "acron atime:%s\n", nmea_msg);

   msg_col = 0;

   get_fixed_field(2);
   hours = pri_hours = atoi(msg_field);
   get_fixed_field(2);
   minutes = pri_minutes = atoi(msg_field);
   get_fixed_field(2);
   seconds = pri_seconds = atoi(msg_field);

   get_fixed_field(3);       // day of year  (does this start a 1?)
   doy = atoi(msg_field);

   get_fixed_field(2);
   year = pri_year = atoi(msg_field) + 2000;

   get_fixed_field(1);
   tz = atoi(msg_field);

return;

   jd = jdate(year, 1, 1) + (double) (doy) - 1.0;
   jd += jtime(hours,minutes,seconds, 0.0);

   set_gregorian_time(jd);  // convert julian date to gregorian

   if(timing_mode == TMODE_GPS) {     // convert utc time to gps time
      utc_to_gps();
   }
   else {
      adjust_rcvr_time(0.0);  // incorporarte possibly negative fractional second into time variables
   }
   
   if(last_tick != seconds) {
      last_tick = seconds;
      update_gps_screen(1555);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x3e7, -0x14(%rbp)     # imm = 0x3E7
leaq 0x1bc23a(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe135b
leaq 0x1bc22d(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0xa7c90(%rip), %rsi     # 0x188fdd
leaq 0x2b96bc(%rip), %rdx    # 0x39aa10
movb $0x0, %al
callq 0x9550
leaq 0x2b9ac2(%rip), %rax    # 0x39ae24
movl $0x0, (%rax)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b98a7(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x28b361(%rip), %rax    # 0x36c6e8
movl %ecx, (%rax)
leaq 0x28b320(%rip), %rax    # 0x36c6b0
movl %ecx, (%rax)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b987d(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x28b333(%rip), %rax    # 0x36c6e4
movl %ecx, (%rax)
leaq 0x28b2f2(%rip), %rax    # 0x36c6ac
movl %ecx, (%rax)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b9853(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x28b305(%rip), %rax    # 0x36c6e0
movl %ecx, (%rax)
leaq 0x28b2c4(%rip), %rax    # 0x36c6a8
movl %ecx, (%rax)
movl $0x3, %edi
callq 0xb4d60
leaq 0x2b9829(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
movl $0x2, %edi
callq 0xb4d60
leaq 0x2b9810(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
addl $0x7d0, %ecx            # imm = 0x7D0
leaq 0x28b2d0(%rip), %rax    # 0x36c6f4
movl %ecx, (%rax)
leaq 0x28b28f(%rip), %rax    # 0x36c6bc
movl %ecx, (%rax)
movl $0x1, %edi
callq 0xb4d60
leaq 0x2b97e0(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x8(%rbp)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: bearing(double, double, double, double)
double bearing(double lat2,double lon2, double lat1,double lon1)
{
double dLon;
double x,y;
double brng;

   lat1 *= (PI/180.0);  // convert to radians
   lat2 *= (PI/180.0);
   lon1 *= (PI/180.0);  // convert to radians
   lon2 *= (PI/180.0);
   dLon = (lon2 - lon1);

   y = sin(dLon) * cos(lat2);
   x = cos(lat1) * sin(lat2) - sin(lat1) * cos(lat2) * cos(dLon);

   brng = atan2(y, x) * 180.0/PI;
   if(brng < 0.0) brng += 360.0;
// brng = fmod(brng+360.0, 360.0);
// brng = 360.0 - brng; // count degrees counter-clockwise - remove to make clockwise

   return brng;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm2, -0x18(%rbp)
movsd %xmm3, -0x20(%rbp)
movsd 0x9021c(%rip), %xmm0    # 0x171690
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x9020a(%rip), %xmm0    # 0x171690
mulsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd 0x901f8(%rip), %xmm0    # 0x171690
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x901e6(%rip), %xmm0    # 0x171690
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x68(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x96f0
movaps %xmm0, %xmm1
movsd -0x68(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x96f0
movsd %xmm0, -0x48(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x50(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x60(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x96f0
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x96f0
movsd -0x58(%rbp), %xmm1
movsd -0x50(%rbp), %xmm2
movaps %xmm0, %xmm3
movsd -0x48(%rbp), %xmm0
mulsd %xmm3, %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
callq 0x9050
movsd 0x8dae8(%rip), %xmm1    # 0x16f078
mulsd %xmm1, %xmm0
movsd 0x9002c(%rip), %xmm1    # 0x1715c8
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x40(%rbp), %xmm0
jbe 0xe15c1
movsd 0xa1579(%rip), %xmm0    # 0x182b30
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: poll_next_acron()
void poll_next_acron()
{
   if(1 && (pri_seconds == SCPI_STATUS_SECOND)) { // request status
      if(need_acron_sync) {
         need_acron_sync = 0;
         send_acron_cmd("h");  // user wants a reception attempt
         if(sim_file == 0) Sleep(500);
      }

      send_acron_cmd("g");   // get receiver status
      ++pri_seconds;
      ++seconds;
   }
   else if(0 && (this_acron_cmd == 'G')) {
      send_acron_cmd("i");  // async world time / time zone info
   }
   else send_acron_cmd("o");  // time
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x28ae15(%rip), %rax    # 0x36c6e0
cmpl $0x20, (%rax)
jne 0xe1940
cmpl $0x0, 0x2ea529(%rip)    # 0x3cbe00
je 0xe1908
movl $0x0, 0x2ea51d(%rip)    # 0x3cbe00
leaq 0x9a6a3(%rip), %rdi     # 0x17bf8d
callq 0x82f40
leaq 0x1bbcaa(%rip), %rax    # 0x29d5a0
cmpq $0x0, (%rax)
jne 0xe1906
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xb8b0
jmp 0xe1908
leaq 0xb06c5(%rip), %rdi     # 0x191fd4
callq 0x82f40
leaq 0x28adc5(%rip), %rax    # 0x36c6e0
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x28adb9(%rip), %rax    # 0x36c6e0
movl %ecx, (%rax)
leaq 0x28ad78(%rip), %rax    # 0x36c6a8
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x28ad6c(%rip), %rax    # 0x36c6a8
movl %ecx, (%rax)
jmp 0xe194c
leaq 0x9cdf3(%rip), %rdi     # 0x17e73a
callq 0x82f40
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: decode_acron_msg()
void decode_acron_msg()
{
char c;
int i;

   start_msg_decode(0);

   nmea_msg[0] = 0;
   for(i=0; i<tsip_wptr; i++) {  // copy message from tsip buffer to nmea buffer
      c = tsip_byte();
      nmea_msg[i] = c;
      nmea_msg[i+1] = 0;
      if(i >= ((int)sizeof(nmea_msg)-12)) break;
   }

   tsip_wptr = tsip_rptr = 0;
   tsip_sync = 0;


  // get the response from the reciver and pass it to (HOPEFULLY) the routine
  // that expects it...

  strupr(nmea_msg);

if(debug_file) fprintf(debug_file, "Decode msg %c:[%s]\n", this_acron_cmd, nmea_msg);

   if     (this_acron_cmd == 'O') parse_acron_time();   // parse answer to last command we sent
   else if(this_acron_cmd == 'G') parse_acron_status(); // status
   else if(this_acron_cmd == 'I') parse_acron_atime();  // asynchronous time request (has time zone setting)

   poll_next_acron();

   if(sim_file && sim_delay) {  // throttle sim file messages
      Sleep(sim_delay);
   }
   saw_rcvr_msg = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %edi, %edi
callq 0xae4a0
leaq 0x2b90aa(%rip), %rax    # 0x39aa10
movb $0x0, (%rax)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
leaq 0x2b5ab8(%rip), %rcx    # 0x397432
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xe19c6
callq 0x7a510
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %dl
movslq -0x8(%rbp), %rcx
leaq 0x2b9079(%rip), %rax    # 0x39aa10
movb %dl, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x2b9066(%rip), %rax    # 0x39aa10
movb $0x0, (%rax,%rcx)
cmpl $0x1f5, -0x8(%rbp)      # imm = 0x1F5
jl 0xe19b9
jmp 0xe19c6
jmp 0xe19bb
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xe1970
leaq 0x2b5a67(%rip), %rax    # 0x397434
movw $0x0, (%rax)
leaq 0x2b5a59(%rip), %rax    # 0x397432
movw $0x0, (%rax)
leaq 0x2b5a51(%rip), %rax    # 0x397436
movw $0x0, (%rax)
leaq 0x2b901f(%rip), %rdi    # 0x39aa10
callq 0x9890
leaq 0x1bbb73(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe1a29
leaq 0x1bbb66(%rip), %rax    # 0x29d570
movq (%rax), %rdi
movsbl 0x2ea3e8(%rip), %edx    # 0x3cbdfc
leaq 0xa75f9(%rip), %rsi     # 0x189014
leaq 0x2b8fee(%rip), %rcx    # 0x39aa10
movb $0x0, %al
callq 0x9550
movsbl 0x2ea3cc(%rip), %eax    # 0x3cbdfc
cmpl $0x4f, %eax
jne 0xe1a3c
callq 0xe1020
jmp 0xe1a64
movsbl 0x2ea3b9(%rip), %eax    # 0x3cbdfc
cmpl $0x47, %eax
jne 0xe1a4f
callq 0xe15d0
jmp 0xe1a62
movsbl 0x2ea3a6(%rip), %eax    # 0x3cbdfc
cmpl $0x49, %eax
jne 0xe1a60
callq 0xe1320
jmp 0xe1a62
jmp 0xe1a64
callq 0xe18c0
leaq 0x1bbb30(%rip), %rax    # 0x29d5a0
cmpq $0x0, (%rax)
je 0xe1a94
leaq 0x1a0d63(%rip), %rax    # 0x2827e0
cmpq $0x0, (%rax)
je 0xe1a94
leaq 0x1a0d56(%rip), %rax    # 0x2827e0
movq (%rax), %rax
movl %eax, %edi
callq 0xb8b0
leaq 0x1bc6e5(%rip), %rax    # 0x29e180
movl $0x1, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: get_time_field(int)
void get_time_field(int n)
{
int i;

   // get a fixed length sub-field from a sting - used to decode the date/time
   // string.

   i = 0;
   while(n--) {
      time_field[i++] = msg_field[time_ptr++];
      time_field[i] = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0xe1f35
movl 0x2ef54c(%rip), %eax    # 0x3d1440
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x2ef541(%rip)    # 0x3d1440
movslq %eax, %rcx
leaq 0x2b8d17(%rip), %rax    # 0x39ac20
movb (%rax,%rcx), %dl
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x2ef4ff(%rip), %rax    # 0x3d1420
movb %dl, (%rax,%rcx)
movslq -0x8(%rbp), %rcx
leaq 0x2ef4f1(%rip), %rax    # 0x3d1420
movb $0x0, (%rax,%rcx)
jmp 0xe1ede
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: show_gpsd_msg(char*)
void show_gpsd_msg(char *s)
{
   // used for debug logging
   while(s) {
      s = get_json_field(s);
      strcpy(gpsd_cmd, msg_field);
      if(gpsd_cmd[0] == 0) continue; 

      s = get_json_field(s);
log_gpsd_cmd();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe2a85
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
leaq 0x2ee7b9(%rip), %rdi    # 0x3d1210
leaq 0x2b81c2(%rip), %rsi    # 0x39ac20
callq 0x9350
movsbl 0x2ee7a6(%rip), %eax    # 0x3d1210
cmpl $0x0, %eax
jne 0xe2a71
jmp 0xe2a3c
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
callq 0xe1e70
jmp 0xe2a3c
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpsd_version(char*)
void parse_gpsd_version(char *s)
{
int i;

   // decode the VERSION message - used to display the version info

   saw_version |= 0x0200;
   while(s) {
      s = get_json_field(s);
      strcpy(gpsd_cmd, msg_field);
      if(gpsd_cmd[0] == 0) continue; 

      s = get_json_field(s);
log_gpsd_cmd();

      if(!strcmp(gpsd_cmd, "\"PROTO_MAJOR\"")) {
         gpsd_major = atoi(msg_field);
      }
      else if(!strcmp(gpsd_cmd, "\"PROTO_MINOR\"")) {
         gpsd_minor = atoi(msg_field);
      }
      else if(!strcmp(gpsd_cmd, "\"RELEASE\"")) {
         msg_field[17] = 0;
         gpsd_release[0] = 0;
         i = strlen(msg_field);
         if(i) {
            strcpy(gpsd_release, &msg_field[1]);
            i = strlen(gpsd_release);
            if(i) gpsd_release[i-1] = 0;
         }
         have_info |= (PRODN_PARAMS | MANUF_PARAMS);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x289665(%rip), %rax    # 0x36c5e8
movl (%rax), %ecx
orl $0x200, %ecx            # imm = 0x200
leaq 0x289656(%rip), %rax    # 0x36c5e8
movl %ecx, (%rax)
cmpq $0x0, -0x8(%rbp)
je 0xe30ec
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
leaq 0x2ee25d(%rip), %rdi    # 0x3d1210
leaq 0x2b7c66(%rip), %rsi    # 0x39ac20
callq 0x9350
movsbl 0x2ee24a(%rip), %eax    # 0x3d1210
cmpl $0x0, %eax
jne 0xe2fcd
jmp 0xe2f94
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
callq 0xe1e70
leaq 0x2ee22a(%rip), %rdi    # 0x3d1210
leaq 0xa61f6(%rip), %rsi     # 0x1891e3
callq 0x9510
cmpl $0x0, %eax
jne 0xe3013
leaq 0x2b7c22(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x197278(%rip), %rax    # 0x27a284
movl %ecx, (%rax)
jmp 0xe30e7
leaq 0x2ee1f6(%rip), %rdi    # 0x3d1210
leaq 0xa61d0(%rip), %rsi     # 0x1891f1
callq 0x9510
cmpl $0x0, %eax
jne 0xe3047
leaq 0x2b7bee(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x197248(%rip), %rax    # 0x27a288
movl %ecx, (%rax)
jmp 0xe30e5
leaq 0x2ee1c2(%rip), %rdi    # 0x3d1210
leaq 0xa61aa(%rip), %rsi     # 0x1891ff
callq 0x9510
cmpl $0x0, %eax
jne 0xe30e3
leaq 0x2b7bb6(%rip), %rax    # 0x39ac20
movb $0x0, 0x11(%rax)
leaq 0x1971eb(%rip), %rax    # 0x27a260
movb $0x0, (%rax)
leaq 0x2b7ba1(%rip), %rdi    # 0x39ac20
callq 0x9120
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xe30ce
leaq 0x2b7b8c(%rip), %rsi    # 0x39ac20
incq %rsi
leaq 0x1971c2(%rip), %rdi    # 0x27a260
callq 0x9350
leaq 0x1971b6(%rip), %rdi    # 0x27a260
callq 0x9120
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xe30cc
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x197198(%rip), %rax    # 0x27a260
movb $0x0, (%rax,%rcx)
jmp 0xe30ce
leaq 0x289a7f(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0x3, %ecx
leaq 0x289a73(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
jmp 0xe30e5
jmp 0xe30e7
jmp 0xe2f94
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpsd_devices(char*)
void parse_gpsd_devices(char *s)
{
int i;

   // decode the DEVICES message - we just use the driver name field

   saw_version |= 0x0400;
   while(s) {
      s = get_json_field(s);
      strcpy(gpsd_cmd, msg_field);
      if(gpsd_cmd[0] == 0) continue; 

      s = get_json_field(s);
log_gpsd_cmd();

      if(!strcmp(gpsd_cmd, "\"DRIVER\"")) {
         i = strlen(msg_field);
if(debug_file) fprintf(debug_file, "driver:%s -> ", msg_field);
         if(i) msg_field[i-1] = 0;
if(debug_file) fprintf(debug_file, "%s\n", msg_field);
         show_gpsd_driver();
         have_info |= VERSION_INFO;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x2894d5(%rip), %rax    # 0x36c5e8
movl (%rax), %ecx
orl $0x400, %ecx            # imm = 0x400
leaq 0x2894c6(%rip), %rax    # 0x36c5e8
movl %ecx, (%rax)
cmpq $0x0, -0x8(%rbp)
je 0xe322b
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
leaq 0x2ee0cd(%rip), %rdi    # 0x3d1210
leaq 0x2b7ad6(%rip), %rsi    # 0x39ac20
callq 0x9350
movsbl 0x2ee0ba(%rip), %eax    # 0x3d1210
cmpl $0x0, %eax
jne 0xe315d
jmp 0xe3124
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
callq 0xe1e70
leaq 0x2ee09a(%rip), %rdi    # 0x3d1210
leaq 0xa608c(%rip), %rsi     # 0x189209
callq 0x9510
cmpl $0x0, %eax
jne 0xe3226
leaq 0x2b7a8e(%rip), %rdi    # 0x39ac20
callq 0x9120
movl %eax, -0xc(%rbp)
leaq 0x1ba3cf(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe31c6
leaq 0x1ba3c2(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0xa605a(%rip), %rsi     # 0x189212
leaq 0x2b7a61(%rip), %rdx    # 0x39ac20
movb $0x0, %al
callq 0x9550
cmpl $0x0, -0xc(%rbp)
je 0xe31e0
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x2b7a44(%rip), %rax    # 0x39ac20
movb $0x0, (%rax,%rcx)
leaq 0x1ba389(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xe320c
leaq 0x1ba37c(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0xa5c01(%rip), %rsi     # 0x188dff
leaq 0x2b7a1b(%rip), %rdx    # 0x39ac20
movb $0x0, %al
callq 0x9550
callq 0xe3240
leaq 0x28993c(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0x4, %ecx
leaq 0x289930(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
jmp 0xe3124
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: show_gpsd_driver()
void show_gpsd_driver()
{
   if(zoom_screen) return;

   msg_field[17] = 0;
   sprintf(gpsd_driver, "Drv:  %s", &msg_field[1]);
   vidstr(VER_ROW+2, VER_COL, WHITE, gpsd_driver);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x28873d(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
je 0xe3252
jmp 0xe32a3
leaq 0x2b79c7(%rip), %rax    # 0x39ac20
movb $0x0, 0x11(%rax)
leaq 0x196fcc(%rip), %rdi    # 0x27a230
leaq 0xa8189(%rip), %rsi     # 0x18b3f4
leaq 0x2b79ae(%rip), %rdx    # 0x39ac20
addq $0x1, %rdx
movb $0x0, %al
callq 0x9060
leaq 0x1946f0(%rip), %rax    # 0x277974
movl (%rax), %edi
addl $0x2, %edi
leaq 0x1946e8(%rip), %rax    # 0x277978
movl (%rax), %esi
movl $0xf, %edx
leaq 0x196f92(%rip), %rcx    # 0x27a230
callq 0x10ee0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpsd_att(char*)
void parse_gpsd_att(char *s)
{
   // decode the ATT message - we just use the temperature field

   while(s) {
      s = get_json_field(s);
      strcpy(gpsd_cmd, msg_field);
      if(gpsd_cmd[0] == 0) continue; 

      s = get_json_field(s);
log_gpsd_cmd();

      if(!strcmp(gpsd_cmd, "\"TEMPERATURE\"")) {
         temperature = (float) atof(msg_field);
         have_temperature = 114;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe3350
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
leaq 0x2edf35(%rip), %rdi    # 0x3d1210
leaq 0x2b793e(%rip), %rsi    # 0x39ac20
callq 0x9350
movsbl 0x2edf22(%rip), %eax    # 0x3d1210
cmpl $0x0, %eax
jne 0xe32f5
jmp 0xe32bc
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
callq 0xe1e70
leaq 0x2edf02(%rip), %rdi    # 0x3d1210
leaq 0xa5f0b(%rip), %rsi     # 0x189220
callq 0x9510
cmpl $0x0, %eax
jne 0xe334b
leaq 0x2b78fa(%rip), %rdi    # 0x39ac20
callq 0x9480
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x2888be(%rip), %rax    # 0x36bbf8
movsd %xmm0, (%rax)
leaq 0x2890e7(%rip), %rax    # 0x36c42c
movl $0x72, (%rax)
jmp 0xe32bc
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpsd_rtcm2(char*)
void parse_gpsd_rtcm2(char *s)
{
   // decode the RTCM2 message - we just use the leapsecs field

   while(s) {
      s = get_json_field(s);
      strcpy(gpsd_cmd, msg_field);
      if(gpsd_cmd[0] == 0) continue; 

      s = get_json_field(s);
log_gpsd_cmd();

      if(!user_set_utc_ofs && !strcmp(gpsd_cmd, "\"LEAPSECS\"")) {
         utc_offset = atoi(msg_field);
         check_utc_ofs(11);
      }
      else if(!strcmp(gpsd_cmd, "\"WEEK\"")) {
         gps_week = atoi(msg_field); 
         faked_tow = 0;
         if(have_week == 0) need_redraw = 2056;
         have_week = 10;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe3469
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
leaq 0x2ede85(%rip), %rdi    # 0x3d1210
leaq 0x2b788e(%rip), %rsi    # 0x39ac20
callq 0x9350
movsbl 0x2ede72(%rip), %eax    # 0x3d1210
cmpl $0x0, %eax
jne 0xe33a5
jmp 0xe336c
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
callq 0xe1e70
leaq 0x289556(%rip), %rax    # 0x36c914
cmpl $0x0, (%rax)
jne 0xe33fe
leaq 0x2ede46(%rip), %rdi    # 0x3d1210
leaq 0xa5e5d(%rip), %rsi     # 0x18922e
callq 0x9510
cmpl $0x0, %eax
jne 0xe33fe
leaq 0x2b783e(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x289518(%rip), %rax    # 0x36c908
movl %ecx, (%rax)
movl $0xb, %edi
callq 0x7a270
jmp 0xe3464
leaq 0x2ede0b(%rip), %rdi    # 0x3d1210
leaq 0xa5e2d(%rip), %rsi     # 0x189239
callq 0x9510
cmpl $0x0, %eax
jne 0xe3462
leaq 0x2b7803(%rip), %rdi    # 0x39ac20
callq 0x95c0
movw %ax, %cx
leaq 0x2894ec(%rip), %rax    # 0x36c918
movw %cx, (%rax)
leaq 0x2894f2(%rip), %rax    # 0x36c928
movl $0x0, (%rax)
leaq 0x2890c9(%rip), %rax    # 0x36c50c
cmpl $0x0, (%rax)
jne 0xe3455
leaq 0x1945d5(%rip), %rax    # 0x277a24
movl $0x808, (%rax)          # imm = 0x808
leaq 0x2890b0(%rip), %rax    # 0x36c50c
movl $0xa, (%rax)
jmp 0xe3464
jmp 0xe336c
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_gpsd_watch(char*)
void parse_gpsd_watch(char *s)
{
   // decode the WATCH message - we just thow it away
   while(s) {
      s = get_json_field(s);
      strcpy(gpsd_cmd, msg_field);
      if(gpsd_cmd[0] == 0) continue; 

      s = get_json_field(s);
log_gpsd_cmd();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe34c5
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
leaq 0x2edd79(%rip), %rdi    # 0x3d1210
leaq 0x2b7782(%rip), %rsi    # 0x39ac20
callq 0x9350
movsbl 0x2edd66(%rip), %eax    # 0x3d1210
cmpl $0x0, %eax
jne 0xe34b1
jmp 0xe347c
movq -0x8(%rbp), %rdi
callq 0xe1c20
movq %rax, -0x8(%rbp)
callq 0xe1e70
jmp 0xe347c
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_speed()
void parse_nvs_speed()
{
   log_packet_id("nvs_speed");

   heading = tsip_single();
   speed = tsip_single() * 0.2777778; // km/hr -> m/sec
   tsip_dword();  // time stamp

   have_heading = 12;
   have_speed = 12;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xa5635(%rip), %rdi     # 0x1892b0
callq 0x7add0
callq 0x7a860
cvtss2sd %xmm0, %xmm0
leaq 0x288578(%rip), %rax    # 0x36c208
movsd %xmm0, (%rax)
callq 0x7a860
cvtss2sd %xmm0, %xmm0
movsd 0x9f413(%rip), %xmm1    # 0x1830b8
mulsd %xmm1, %xmm0
leaq 0x288550(%rip), %rax    # 0x36c200
movsd %xmm0, (%rax)
callq 0x7a680
leaq 0x288854(%rip), %rax    # 0x36c514
movl $0xc, (%rax)
leaq 0x28884b(%rip), %rax    # 0x36c518
movl $0xc, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_test()
void parse_nvs_test()
{
u08 subcode;
   // 0x43 packet

   log_packet_id("nvs_test");
   subcode = tsip_byte();
   if(subcode == 2) {
      nvs_test = tsip_byte();
      tsip_dword();

      minor_alarms &= (~MINOR_ANT_NO_PWR);
      if((nvs_test & 0xC0) == 0xC0) minor_alarms |= MINOR_ANT_SHORT; // short
      else if((nvs_test & 0xC0) == 0x80) minor_alarms |= MINOR_ANT_OPEN; // open
      else if((nvs_test & 0xC0) == 0x00) ; // OK
      else minor_alarms |= MINOR_ANT_NO_PWR; // unknown
      have_antenna = 1;

      if(!have_critical_alarms) need_redraw = 7709;
      have_critical_alarms = 9;

      if(nvs_test & 0x30) {  // gps(0x10) / glonass(0x20) failure
         critical_alarms |= CRIT_GPS;
      }
      else {
         critical_alarms &= (~CRIT_GPS);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xa55cb(%rip), %rdi     # 0x1892ba
callq 0x7add0
callq 0x7a510
movb %al, -0x1(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x2, %eax
jne 0xe3e1d
callq 0x7a510
movzbl %al, %eax
movl %eax, 0x2e7fd1(%rip)    # 0x3cbce8
callq 0x7a680
leaq 0x288695(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $-0x7, %ecx
leaq 0x288689(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
movl 0x2e7fb1(%rip), %eax    # 0x3cbce8
andl $0xc0, %eax
cmpl $0xc0, %eax
jne 0xe3d5a
leaq 0x28866e(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x4, %ecx
leaq 0x288662(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xe3dae
movl 0x2e7f88(%rip), %eax    # 0x3cbce8
andl $0xc0, %eax
cmpl $0x80, %eax
jne 0xe3d83
leaq 0x288645(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x2, %ecx
leaq 0x288639(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xe3dac
movl 0x2e7f5f(%rip), %eax    # 0x3cbce8
andl $0xc0, %eax
cmpl $0x0, %eax
jne 0xe3d95
jmp 0xe3daa
leaq 0x28861c(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x6, %ecx
leaq 0x288610(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
jmp 0xe3dac
jmp 0xe3dae
leaq 0x288657(%rip), %rax    # 0x36c40c
movl $0x1, (%rax)
leaq 0x2886c6(%rip), %rax    # 0x36c488
cmpl $0x0, (%rax)
jne 0xe3dd4
leaq 0x193c56(%rip), %rax    # 0x277a24
movl $0x1e1d, (%rax)         # imm = 0x1E1D
leaq 0x2886ad(%rip), %rax    # 0x36c488
movl $0x9, (%rax)
movl 0x2e7f01(%rip), %eax    # 0x3cbce8
andl $0x30, %eax
cmpl $0x0, %eax
je 0xe3e06
leaq 0x2885ba(%rip), %rax    # 0x36c3b0
movl (%rax), %ecx
orl $0x8, %ecx
leaq 0x2885ae(%rip), %rax    # 0x36c3b0
movl %ecx, (%rax)
jmp 0xe3e1b
leaq 0x2885a3(%rip), %rax    # 0x36c3b0
movl (%rax), %ecx
andl $-0x9, %ecx
leaq 0x288597(%rip), %rax    # 0x36c3b0
movl %ecx, (%rax)
jmp 0xe3e1d
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_date()
void parse_nvs_date()
{
u32 tow;
u08 dd,mm;
u16 yy;
u08 tz_hh,tz_mm;
double delta;

   // 0x46 packet
   log_packet_id("nvs_date");

   tow = tsip_dword();
   dd = tsip_byte();
   mm = tsip_byte();
   yy = tsip_word();
   tz_hh = tsip_byte();
   tz_mm = tsip_byte();

   delta = nvs_msecs - ((double)tow*1000.0);

//sprintf(debug_text2, "%04d/%02d/%02d  tz:%02d:%02d  tow:%d  msecs:%f  delta:%f", 
//yy,mm,dd, tz_hh,tz_mm, tow,nvs_msecs, delta);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xa5484(%rip), %rdi     # 0x1892c3
callq 0x7add0
callq 0x7a680
movl %eax, -0x4(%rbp)
callq 0x7a510
movb %al, -0x5(%rbp)
callq 0x7a510
movb %al, -0x6(%rbp)
callq 0x7a560
movw %ax, -0x8(%rbp)
callq 0x7a510
movb %al, -0x9(%rbp)
callq 0x7a510
movb %al, -0xa(%rbp)
movsd 0x2e7e73(%rip), %xmm1   # 0x3cbcf0
movl -0x4(%rbp), %eax
cvtsi2sd %rax, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x8b18c(%rip), %xmm2    # 0x16f030
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_disable()
void parse_nvs_disable()
{
int i;
u08 sys;
int prn;
u08 flag;

   // 0x47 packet
   log_packet_id("nvs_disable");

   for(i=0; i<32+24; i++) {
      sys = tsip_byte();
      prn = tsip_byte();
      flag = tsip_byte();

      if(sys == 1) ;
      else if(sys == 2) prn += NVS_GLONASS_PRN;
      else continue;

      if(flag == 1) ;     // enabled
      else if(flag == 2); // disabled
      else continue;

      if((prn >= 1) && (prn <= MAX_PRN)) {
         flag -= 1;
         sat[prn].disabled = flag;
         if(prn <= 32) {  // gps sats
            if(flag) sats_enabled &= (~(1 << (prn-1)));
            else     sats_enabled |= (1 << (prn-1));
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xa53fd(%rip), %rdi     # 0x1892cc
callq 0x7add0
movl $0x0, -0x4(%rbp)
cmpl $0x38, -0x4(%rbp)
jge 0xe3fe2
callq 0x7a510
movb %al, -0x5(%rbp)
callq 0x7a510
movzbl %al, %eax
movl %eax, -0xc(%rbp)
callq 0x7a510
movb %al, -0xd(%rbp)
movzbl -0x5(%rbp), %eax
cmpl $0x1, %eax
jne 0xe3f0b
jmp 0xe3f26
movzbl -0x5(%rbp), %eax
cmpl $0x2, %eax
jne 0xe3f1f
movl -0xc(%rbp), %eax
addl $0x40, %eax
movl %eax, -0xc(%rbp)
jmp 0xe3f24
jmp 0xe3fd4
jmp 0xe3f26
movzbl -0xd(%rbp), %eax
cmpl $0x1, %eax
jne 0xe3f31
jmp 0xe3f43
movzbl -0xd(%rbp), %eax
cmpl $0x2, %eax
jne 0xe3f3c
jmp 0xe3f41
jmp 0xe3fd4
jmp 0xe3f43
cmpl $0x1, -0xc(%rbp)
jl 0xe3fd2
cmpl $0x3e7, -0xc(%rbp)      # imm = 0x3E7
jg 0xe3fd2
movzbl -0xd(%rbp), %eax
subl $0x1, %eax
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %cl
movslq -0xc(%rbp), %rdx
leaq 0x1ba222(%rip), %rax    # 0x29e190
imulq $0x348, %rdx, %rdx      # imm = 0x348
addq %rdx, %rax
movb %cl, 0x1(%rax)
cmpl $0x20, -0xc(%rbp)
jg 0xe3fd0
cmpb $0x0, -0xd(%rbp)
je 0xe3fad
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
xorl $-0x1, %ecx
leaq 0x288324(%rip), %rax    # 0x36c2c4
andl (%rax), %ecx
leaq 0x28831b(%rip), %rax    # 0x36c2c4
movl %ecx, (%rax)
jmp 0xe3fce
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
leaq 0x288301(%rip), %rax    # 0x36c2c4
orl (%rax), %ecx
leaq 0x2882f8(%rip), %rax    # 0x36c2c4
movl %ecx, (%rax)
jmp 0xe3fd0
jmp 0xe3fd2
jmp 0xe3fd4
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xe3edb
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_iono()
void parse_nvs_iono()
{
float a0,a1,a2,a3;
float b0,b1,b2,b3;
u08 reliability;

   log_packet_id("nvs_iono");

   // 0x4A packet - ionosphere data
   a0 = tsip_single();
   a1 = tsip_single();
   a2 = tsip_single();
   a3 = tsip_single();
   b0 = tsip_single();
   b1 = tsip_single();
   b2 = tsip_single();
   b3 = tsip_single();
   reliability = tsip_byte();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0xa52d9(%rip), %rdi     # 0x1892d8
callq 0x7add0
callq 0x7a860
movss %xmm0, -0x4(%rbp)
callq 0x7a860
movss %xmm0, -0x8(%rbp)
callq 0x7a860
movss %xmm0, -0xc(%rbp)
callq 0x7a860
movss %xmm0, -0x10(%rbp)
callq 0x7a860
movss %xmm0, -0x14(%rbp)
callq 0x7a860
movss %xmm0, -0x18(%rbp)
callq 0x7a860
movss %xmm0, -0x1c(%rbp)
callq 0x7a860
movss %xmm0, -0x20(%rbp)
callq 0x7a510
movb %al, -0x21(%rbp)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_gnss_timescale()
void parse_nvs_gnss_timescale()
{
double a0, a1;
int tow;
int wnt;
int ls;
int wnf;
int dn;
int lsf;
int this_dn;
int wraps;

   log_packet_id("nvs_timescale");

   // 0x4B packet - calculate pending leapsecond info
   a1 = tsip_double();
   a0 = tsip_double();
   tow = tsip_dword();

   wnt = tsip_word();
   ls = (int) (s16) tsip_word();
   wnf = tsip_word();  // gps week
   dn = tsip_word();
   lsf = (int) (s16) tsip_word();

   this_dn = tow / (24*60*60);
   wraps = gps_week / 1024;
///sprintf(debug_text, "gps_week:%d wraps:%d wnt:%d ls:%d wnf:%d dn:%d lsf:%d this_dn:%d", 
///gps_week, wraps, wnt, ls, wnf, dn, lsf, this_dn);
// wnf += (wraps * 1024);

   // we ignore the rest of this message

   minor_alarms &= (~MINOR_LEAP_PEND);
   leap_days = (-1);
   have_leap_days = 0;
   if(ls != lsf) {
      minor_alarms |= MINOR_LEAP_PEND;
      calc_leap_days(wnf+(gps_week/256)*256, dn, 555);
      have_leap_info = 22;
   }
   have_leap_info = 22;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0xa5262(%rip), %rdi     # 0x1892e1
callq 0x7add0
callq 0x7a9d0
movsd %xmm0, -0x10(%rbp)
callq 0x7a9d0
movsd %xmm0, -0x8(%rbp)
callq 0x7a680
movl %eax, -0x14(%rbp)
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0x18(%rbp)
callq 0x7a560
cwtl
movl %eax, -0x1c(%rbp)
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0x20(%rbp)
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
callq 0x7a560
cwtl
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl $0x15180, %ecx          # imm = 0x15180
cltd
idivl %ecx
movl %eax, -0x2c(%rbp)
leaq 0x288830(%rip), %rax    # 0x36c918
movzwl (%rax), %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %eax, -0x30(%rbp)
leaq 0x2882bb(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
leaq 0x2882ac(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
leaq 0x2882b7(%rip), %rax    # 0x36c3cc
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x2882ae(%rip), %rax    # 0x36c3d0
movl $0x0, (%rax)
movl -0x1c(%rbp), %eax
cmpl -0x28(%rbp), %eax
je 0xe418b
leaq 0x288281(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x80, %ecx
leaq 0x288272(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
leaq 0x2887c3(%rip), %rax    # 0x36c918
movzwl (%rax), %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl %eax, %ecx
movl -0x34(%rbp), %eax
shll $0x8, %ecx
addl %ecx, %eax
cvtsi2sd %eax, %xmm0
movl -0x24(%rbp), %eax
movl $0x22b, %esi            # imm = 0x22B
movzwl %ax, %edi
callq 0x80110
leaq 0x2882f3(%rip), %rax    # 0x36c478
movl $0x16, (%rax)
leaq 0x2882e6(%rip), %rax    # 0x36c478
movl $0x16, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_config()
void parse_nvs_config()
{
u08 nav_sys;

   // 0x51 packet
   log_packet_id("nvs_config");

   nav_sys = tsip_byte();
   tsip_byte();    // rsvd
   tsip_byte();    // coord sys
   el_mask = (float) (s08) tsip_byte();
   amu_mask = (float) tsip_byte();
   tsip_word();    // max rms error
   nvs_filter = tsip_single();  // filtration degree

   have_el_mask = 1;
   have_amu = 1;

   // nav system:
   //  0=GPS+GLONASS
   //  1=GPS
   //  2=GLONASS
   //  3=Galileo
   // 10=GPS+GLONASS+SBAS
   // 11=GPS+SBAS
   // 12=GLONASS+SBAS
   have_gnss_mask = 3;
   if     (nav_sys == 0)  gnss_mask = (GPS | GLONASS);
   else if(nav_sys == 1)  gnss_mask = (GPS);
   else if(nav_sys == 2)  gnss_mask = (GLONASS);
   else if(nav_sys == 3)  gnss_mask = (GALILEO);
   else if(nav_sys == 10) gnss_mask = (GPS | GLONASS | SBAS);
   else if(nav_sys == 11) gnss_mask = (GPS | SBAS);
   else if(nav_sys == 12) gnss_mask = (GLONASS | SBAS);
   else if(nav_sys == 13) gnss_mask = (GALILEO | SBAS);
   else have_gnss_mask = 0;
// sprintf(plot_title, "nav sys:%d", nav_sys); //qqqqqqqqq
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xa5140(%rip), %rdi     # 0x1892ef
callq 0x7add0
callq 0x7a510
movb %al, -0x1(%rbp)
callq 0x7a510
callq 0x7a510
callq 0x7a510
movsbl %al, %eax
cvtsi2ss %eax, %xmm0
leaq 0x2880bb(%rip), %rax    # 0x36c294
movss %xmm0, (%rax)
callq 0x7a510
movzbl %al, %eax
cvtsi2ss %eax, %xmm0
leaq 0x2880a8(%rip), %rax    # 0x36c298
movss %xmm0, (%rax)
callq 0x7a560
callq 0x7a860
cvtss2sd %xmm0, %xmm0
leaq 0x288077(%rip), %rax    # 0x36c280
movsd %xmm0, (%rax)
leaq 0x2883c8(%rip), %rax    # 0x36c5dc
movl $0x1, (%rax)
leaq 0x2883b7(%rip), %rax    # 0x36c5d8
movl $0x1, (%rax)
leaq 0xebc2a(%rip), %rax     # 0x1cfe58
movl $0x3, (%rax)
movzbl -0x1(%rbp), %eax
cmpl $0x0, %eax
jne 0xe424f
leaq 0xebc10(%rip), %rax     # 0x1cfe54
movl $0x3, (%rax)
jmp 0xe4318
movzbl -0x1(%rbp), %eax
cmpl $0x1, %eax
jne 0xe426a
leaq 0xebbf5(%rip), %rax     # 0x1cfe54
movl $0x1, (%rax)
jmp 0xe4316
movzbl -0x1(%rbp), %eax
cmpl $0x2, %eax
jne 0xe4285
leaq 0xebbda(%rip), %rax     # 0x1cfe54
movl $0x2, (%rax)
jmp 0xe4314
movzbl -0x1(%rbp), %eax
cmpl $0x3, %eax
jne 0xe429d
leaq 0xebbbf(%rip), %rax     # 0x1cfe54
movl $0x4, (%rax)
jmp 0xe4312
movzbl -0x1(%rbp), %eax
cmpl $0xa, %eax
jne 0xe42b5
leaq 0xebba7(%rip), %rax     # 0x1cfe54
movl $0x8003, (%rax)         # imm = 0x8003
jmp 0xe4310
movzbl -0x1(%rbp), %eax
cmpl $0xb, %eax
jne 0xe42cd
leaq 0xebb8f(%rip), %rax     # 0x1cfe54
movl $0x8001, (%rax)         # imm = 0x8001
jmp 0xe430e
movzbl -0x1(%rbp), %eax
cmpl $0xc, %eax
jne 0xe42e5
leaq 0xebb77(%rip), %rax     # 0x1cfe54
movl $0x8002, (%rax)         # imm = 0x8002
jmp 0xe430c
movzbl -0x1(%rbp), %eax
cmpl $0xd, %eax
jne 0xe42fd
leaq 0xebb5f(%rip), %rax     # 0x1cfe54
movl $0x8004, (%rax)         # imm = 0x8004
jmp 0xe430a
leaq 0xebb54(%rip), %rax     # 0x1cfe58
movl $0x0, (%rax)
jmp 0xe430c
jmp 0xe430e
jmp 0xe4310
jmp 0xe4312
jmp 0xe4314
jmp 0xe4316
jmp 0xe4318
addq $0x10, %rsp
popq %rbp
retq
nop
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_mode()
void parse_nvs_mode()
{
u08 mode;
double delay;
int avg_time;

   // 0x55 packet
   log_packet_id("nvs_mode");

   mode = tsip_byte();
   delay = tsip_double();
   avg_time = (int) tsip_word();

   if(mode == 0) {
      if(nvs_traim & 0x04) rcvr_mode = RCVR_MODE_3D;
      else                 rcvr_mode = RCVR_MODE_2D_3D;
   }
   else if(mode == 1) rcvr_mode = RCVR_MODE_HOLD;
   else if(mode == 2) rcvr_mode = RCVR_MODE_SURVEY;
   else               rcvr_mode = RCVR_MODE_UNKNOWN;

   if(mode == 2) {
      minor_alarms |= MINOR_SURVEY;
      do_survey = avg_time;
      survey_why = 33;
   }
   else {
      minor_alarms &= (~MINOR_SURVEY);
      if(precision_survey == 0) {
         do_survey = 0;
         survey_why = (-333);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xa4dd4(%rip), %rdi     # 0x189303
callq 0x7add0
callq 0x7a510
movb %al, -0x1(%rbp)
callq 0x7a9d0
movsd %xmm0, -0x10(%rbp)
callq 0x7a560
movzwl %ax, %eax
movl %eax, -0x14(%rbp)
movzbl -0x1(%rbp), %eax
cmpl $0x0, %eax
jne 0xe4583
leaq 0x195d4b(%rip), %rax    # 0x27a2ac
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xe4577
leaq 0x287d3e(%rip), %rax    # 0x36c2b0
movb $0x4, (%rax)
jmp 0xe4581
leaq 0x287d32(%rip), %rax    # 0x36c2b0
movb $0x0, (%rax)
jmp 0xe45bb
movzbl -0x1(%rbp), %eax
cmpl $0x1, %eax
jne 0xe4598
leaq 0x287d1d(%rip), %rax    # 0x36c2b0
movb $0x7, (%rax)
jmp 0xe45b9
movzbl -0x1(%rbp), %eax
cmpl $0x2, %eax
jne 0xe45ad
leaq 0x287d08(%rip), %rax    # 0x36c2b0
movb $0xb, (%rax)
jmp 0xe45b7
leaq 0x287cfc(%rip), %rax    # 0x36c2b0
movb $0x63, (%rax)
jmp 0xe45b9
jmp 0xe45bb
movzbl -0x1(%rbp), %eax
cmpl $0x2, %eax
jne 0xe45f6
leaq 0x287ded(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x20, %ecx
leaq 0x287de1(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
movslq -0x14(%rbp), %rcx
leaq 0x288a74(%rip), %rax    # 0x36d058
movq %rcx, (%rax)
leaq 0x288a7a(%rip), %rax    # 0x36d068
movl $0x21, (%rax)
jmp 0xe4637
leaq 0x287dbb(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $-0x21, %ecx
leaq 0x287daf(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
leaq 0x288a66(%rip), %rax    # 0x36d078
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xe4635
leaq 0x288a37(%rip), %rax    # 0x36d058
movq $0x0, (%rax)
leaq 0x288a39(%rip), %rax    # 0x36d068
movl $0xfffffeb3, (%rax)     # imm = 0xFFFFFEB3
jmp 0xe4637
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_dops()
void parse_nvs_dops()
{
int gps_count;
int glonass_count;

   // 0x60 packet
   log_packet_id("nvs_dops");

   gps_count = tsip_byte();
   glonass_count = tsip_byte();
   hdop = tsip_single();
   vdop = tsip_single();
   have_dops |= (HDOP | VDOP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xa4cbd(%rip), %rdi     # 0x18930c
callq 0x7add0
callq 0x7a510
movzbl %al, %eax
movl %eax, -0x4(%rbp)
callq 0x7a510
movzbl %al, %eax
movl %eax, -0x8(%rbp)
callq 0x7a860
cvtss2sd %xmm0, %xmm0
leaq 0x19e056(%rip), %rax    # 0x2826d0
movsd %xmm0, (%rax)
callq 0x7a860
cvtss2sd %xmm0, %xmm0
leaq 0x19e04a(%rip), %rax    # 0x2826d8
movsd %xmm0, (%rax)
leaq 0x19e02b(%rip), %rax    # 0x2826c4
movl (%rax), %ecx
orl $0x6, %ecx
leaq 0x19e01f(%rip), %rax    # 0x2826c4
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_pvtdops()
void parse_nvs_pvtdops()
{
   // 0x61 packet
   log_packet_id("nvs_pvtdops");

   hdop = tsip_single();
   vdop = tsip_single();
   tdop = tsip_single();
   // we ignore the rest of this message
   have_dops |= (HDOP | VDOP | TDOP);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xa4c5a(%rip), %rdi     # 0x189315
callq 0x7add0
callq 0x7a860
cvtss2sd %xmm0, %xmm0
leaq 0x19e000(%rip), %rax    # 0x2826d0
movsd %xmm0, (%rax)
callq 0x7a860
cvtss2sd %xmm0, %xmm0
leaq 0x19dff4(%rip), %rax    # 0x2826d8
movsd %xmm0, (%rax)
callq 0x7a860
cvtss2sd %xmm0, %xmm0
leaq 0x19dff0(%rip), %rax    # 0x2826e8
movsd %xmm0, (%rax)
leaq 0x19dfc1(%rip), %rax    # 0x2826c4
movl (%rax), %ecx
orl $0x16, %ecx
leaq 0x19dfb5(%rip), %rax    # 0x2826c4
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_version()
void parse_nvs_version()
{
int i;

   // 0x70 packet
   log_packet_id("nvs_version");

   nvs_chans = tsip_byte();
   for(i=0; i<21; i++) {  // version string
      nvs_id[i] = tsip_byte();
      nvs_id[i+1] = 0;
   }
   nvs_sn = tsip_dword();

   for(i=0; i<21; i++) {  // version string
      nvs_id2[i] = tsip_byte();
      nvs_id2[i+1] = 0;
   }
   nvs_sn2 = tsip_dword();

   for(i=0; i<21; i++) {  // version string
      nvs_id3[i] = tsip_byte();
      nvs_id3[i+1] = 0;
   }
   nvs_sn3 = tsip_dword();

   saw_version |= 0x2000;
   have_info |= ALL_ID_INFO;

   // we ignore the rest of this message
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xa4bf2(%rip), %rdi     # 0x189321
callq 0x7add0
callq 0x7a510
movzbl %al, %ecx
leaq 0x195a61(%rip), %rax    # 0x27a1a4
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
cmpl $0x15, -0x4(%rbp)
jge 0xe4786
callq 0x7a510
movb %al, %dl
movslq -0x4(%rbp), %rcx
leaq 0x1959bc(%rip), %rax    # 0x27a120
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x1959a9(%rip), %rax    # 0x27a120
movb $0x0, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xe474c
callq 0x7a680
movl %eax, %ecx
leaq 0x1959ac(%rip), %rax    # 0x27a140
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
cmpl $0x15, -0x4(%rbp)
jge 0xe47d7
callq 0x7a510
movb %al, %dl
movslq -0x4(%rbp), %rcx
leaq 0x19599b(%rip), %rax    # 0x27a150
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x195988(%rip), %rax    # 0x27a150
movb $0x0, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xe479d
callq 0x7a680
movl %eax, %ecx
leaq 0x19598b(%rip), %rax    # 0x27a170
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
cmpl $0x15, -0x4(%rbp)
jge 0xe4828
callq 0x7a510
movb %al, %dl
movslq -0x4(%rbp), %rcx
leaq 0x19597a(%rip), %rax    # 0x27a180
movb %dl, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x195967(%rip), %rax    # 0x27a180
movb $0x0, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xe47ee
callq 0x7a680
movl %eax, %ecx
leaq 0x19596a(%rip), %rax    # 0x27a1a0
movl %ecx, (%rax)
leaq 0x287da9(%rip), %rax    # 0x36c5e8
movl (%rax), %ecx
orl $0x2000, %ecx           # imm = 0x2000
leaq 0x287d9a(%rip), %rax    # 0x36c5e8
movl %ecx, (%rax)
leaq 0x2882fd(%rip), %rax    # 0x36cb54
movl (%rax), %ecx
orl $0xf, %ecx
leaq 0x2882f1(%rip), %rax    # 0x36cb54
movl %ecx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)