LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_7A_00()
void request_7A_00()
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;
   if(ACU_GG) return;
   if(ACU_360) return;
   if(ACUTIME) return;
   if(PALISADE) return;
   if(SV6_FAMILY) return;
   // config NMEA output

   send_tsip_start(0x7A);   //!!! ??? receiver
   send_byte(0x00);
   send_tsip_end();
}

// Assembly:
leaq 0x1dddfe(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x61179
leaq 0x2d5ed4(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x61179
leaq 0x1b7778(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x61179
leaq 0x1b9e6f(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6117a
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x6117a
retq
pushq %rbp
movq %rsp, %rbp
movl $0x7a, %edi
callq 0x5e6be
xorl %edi, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rcvr_health()
void request_rcvr_health()
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;

   send_tsip_start(0x26);   //!!! ThunderBolt-E only
   send_tsip_end();
}

// Assembly:
leaq 0x1ddda2(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x611ce
leaq 0x2d5e78(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x611ce
leaq 0x1b771c(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x611ce
pushq %rbp
movq %rsp, %rbp
movl $0x26, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e73c
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_utc_info()
void request_utc_info()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == BRANDY_RCVR) {
      queue_brandy_cmd("j", BRANDY_LEAP_MSG);
   }
   else if(rcvr_type == FURUNO_RCVR) {
//    send_furuno_cmp("GPint,tlp00");  // we get this from GPtps message
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(saw_version == 0) return;
      if(res_t == RES_T) return;   // this message can hose up this receiver for 3 seconds
      if(SV6_FAMILY) {
         send_tsip_start(0x2F);       // get UTC (leapsecond) info from sat data
         send_tsip_end();
      }
      else {
         send_tsip_start(0x38);       // get UTC (leapsecond) info from sat data
         send_byte(0x01);
         send_byte(0x05);
         send_byte(0x00);
         send_tsip_end();
      }
   }
   else if(rcvr_type == MOTO_RCVR) {
      request_moto_leap(0);
   }
   else if(rcvr_type == NVS_RCVR) {
      send_nvs_start(0x2B);
      send_nvs_end();
   }
   else if(rcvr_type == SS_RCVR) {  // get leapsecond info
//    request_ss_msg(75);           // ... now set in conig_rcvr
   }
   else if(rcvr_type == UBX_RCVR) {  // get leapsecond info
      request_ubx_msg(UBX_LEAP);
   }
   else if(rcvr_type == ZYFER_RCVR) {  // get leapsecond info
      send_zyfer_cmd("$LEAP");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1ddd64(%rip), %rax    # 0x23ef3e
leaq 0x2d5e3f(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
je 0x611e9
popq %rbp
retq
leaq 0x1b76e0(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x7ff, %rax            # imm = 0x7FF
jg 0x61219
cmpq $0x1, %rax
je 0x61243
cmpq $0x4, %rax
je 0x61296
cmpq $0x20, %rax
jne 0x611e7
xorl %edi, %edi
popq %rbp
jmp 0x612dc
cmpq $0x800, %rax            # imm = 0x800
je 0x61286
cmpq $0x100000, %rax         # imm = 0x100000
je 0x612a8
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x611e7
leaq 0xc39a7(%rip), %rdi     # 0x124bdf
movl $0x195, %esi            # imm = 0x195
popq %rbp
jmp 0x5edda
leaq 0x2ac1be(%rip), %rax    # 0x30d408
cmpl $0x0, (%rax)
je 0x611e7
leaq 0x1b76ae(%rip), %rax    # 0x218904
cmpb $0x1, (%rax)
je 0x611e7
leaq 0x1b9d72(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x612b5
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x612b5
movl $0x2f, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e73c
movl $0x2b, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e7c0
movl $0xb02, %edi            # imm = 0xB02
xorl %esi, %esi
callq 0x5f37d
popq %rbp
jmp 0x5f456
leaq 0xbf325(%rip), %rdi     # 0x1205d4
popq %rbp
jmp 0x5f0e5
movl $0x38, %edi
callq 0x5e6be
movl $0x1, %edi
callq 0x590f7
movl $0x5, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x590f7
jmp 0x61280
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_moto_leap(int)
void request_moto_leap(int rate)
{
   if(no_poll) return;

   send_moto_start("Gj");
   send_moto_end();

   send_moto_start("Bj");
   send_byte(rate);
   send_moto_end();
}

// Assembly:
leaq 0x2d5d3d(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x612e9
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0xc38e3(%rip), %rdi     # 0x124bdb
callq 0x6160d
callq 0x61688
leaq 0xc38d5(%rip), %rdi     # 0x124bde
callq 0x6160d
movzbl %bl, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61688
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_sv6_config(int)
void request_sv6_config(int force)
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      if(SV6_FAMILY && (force == 0)) return;  //ttttt qqqqq  doing this screws up the decice!
      if(ACU_GG) return;
      if(ACU_360) return;

      send_tsip_start(0x2C);       // get SV6 config
      send_byte(0);
      send_single(-1.0);
      send_single(-1.0);
      send_single(-1.0);
      send_single(-1.0);
      send_tsip_end();
      if(sim_file == 0) Sleep(200);
   }
}

// Assembly:
leaq 0x1ddbee(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x61356
retq
leaq 0x2d5cc3(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x61355
leaq 0x1b7567(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x61355
leaq 0x1b9c5e(%rip), %rax    # 0x21afd4
movl (%rax), %eax
cmpl $0x36, %eax
sete %cl
cmpl $0x33, %eax
sete %sil
cmpl $0x50, %eax
sete %r8b
cmpl $0x41, %eax
sete %dl
testl %edi, %edi
jne 0x613a0
orb %sil, %cl
orb %r8b, %dl
orb %cl, %dl
jne 0x61355
movl %eax, %edx
xorl $0x41, %edx
leaq 0x1b754c(%rip), %rcx    # 0x2188f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
je 0x61355
cmpl $0x41, %eax
jne 0x613c6
cmpl $0x33, %ecx
je 0x61355
cmpl $0x47, %ecx
je 0x61355
pushq %rbp
movq %rsp, %rbp
movl $0x2c, %edi
callq 0x5e6be
xorl %edi, %edi
callq 0x590f7
movss 0xabc85(%rip), %xmm0    # 0x10d068
callq 0x59376
movss 0xabc78(%rip), %xmm0    # 0x10d068
callq 0x59376
movss 0xabc6b(%rip), %xmm0    # 0x10d068
callq 0x59376
movss 0xabc5e(%rip), %xmm0    # 0x10d068
callq 0x59376
callq 0x5e73c
leaq 0x1dcfa5(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
popq %rbp
jne 0x61355
movl $0xc8, %edi
jmp 0xafe8
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_osc_offset()
void request_osc_offset()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x2D);       // get SV6 osc offset in Hz
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1ddb07(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x6143d
retq
leaq 0x2d5bdc(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x6143c
leaq 0x1b7480(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6143c
pushq %rbp
movq %rsp, %rbp
movl $0x2d, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: write_all_nvs()
void write_all_nvs()
{
   if(read_only) return;
   if(luxor) return;
   if(no_eeprom_writes) return;

   if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) ;
      else if(ACU_360) ;
      else if(ACUTIME) ;
      else if(PALISADE) return;
      else if(SV6_FAMILY) return;

      send_tsip_start(0x8E);   //!!! ThunderBolt-E only
      send_byte(0x26);
      send_tsip_end();
   }

   BEEP(500);   // !!! if you hear lots of beeps,  you may be wearing out the EEPROM
}

// Assembly:
leaq 0x2d5ba9(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x614b6
leaq 0x1ddac1(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x614b6
leaq 0x1b9dad(%rip), %rax    # 0x21b236
cmpb $0x0, (%rax)
jne 0x614b6
leaq 0x1b743b(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x614d5
leaq 0x1b9b32(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x614b7
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jae 0x614b7
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e6be
movl $0x26, %edi
callq 0x590f7
callq 0x5e73c
popq %rbp
movl $0x1f4, %edi            # imm = 0x1F4
jmp 0x9d78
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: restart_gpsdo()
void restart_gpsdo()
{
   // re-awaken a GPSDO after a reset
   if(saw_nortel || saw_ntpx || (rcvr_type == MOTO_RCVR) || (rcvr_type == NVS_RCVR)) {
      vidstr(EDIT_ROW+4, EDIT_COL, PROMPT_COLOR, "There is a 20 second reset delay...");
      refresh_page();
      Sleep(20000);
      SetDtrLine(RCVR_PORT, 1);
      if(NO_SCPI_BREAK && (rcvr_type == SCPI_RCVR)) ; 
      else SendBreak(RCVR_PORT);
      Sleep(2000);
   }
}

// Assembly:
leaq 0x1dda54(%rip), %rax    # 0x23ef3a
cmpb $0x0, (%rax)
jne 0x61510
leaq 0x1dda4a(%rip), %rax    # 0x23ef3c
cmpb $0x0, (%rax)
jne 0x61510
leaq 0x1b73d2(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x20, %rax
je 0x61510
cmpq $0x800, %rax            # imm = 0x800
je 0x61510
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x2de0f1(%rip), %rax    # 0x33f60c
movl (%rax), %edi
addl $0x4, %edi
leaq 0x2de0e9(%rip), %rax    # 0x33f610
movl (%rax), %esi
leaq 0xbf0a9(%rip), %rcx     # 0x1205d9
movl $0xb, %edx
callq 0xe787
callq 0xab54
movl $0x4e20, %edi           # imm = 0x4E20
callq 0xafe8
movl $0xa, %edi
movl $0x1, %esi
callq 0xaeab
movl $0xa, %edi
callq 0xaf80
movl $0x7d0, %edi            # imm = 0x7D0
popq %rbp
jmp 0xafe8
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: restart_zodiac_rcvr()
void restart_zodiac_rcvr()
{
   // re-init ZODIAC receiver message format after a restart
   if(force_mode_change) {     // leave the receiver in Motorola mode
      rcvr_type = MOTO_RCVR;
      config_rcvr_type(0);
      need_msg_init = 2000;
      force_mode_change = 0;
   }
   else {
      send_moto_start("Wb");  // set Jupiter-T receiver protocol to Zodiac mode
      send_byte(1);
      send_moto_end();
      Sleep(1000);

      tsip_sync = 0;
      tsip_wptr = 0;
      tsip_rptr = 0;
      init_messages(70, 1);
   }

   Sleep(250);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1b9aa6(%rip), %rbx    # 0x21b020
cmpl $0x0, (%rbx)
je 0x615a9
leaq 0x1b734a(%rip), %rax    # 0x2188d0
movq $0x20, (%rax)
xorl %edi, %edi
callq 0x4b2af
leaq 0x1b9a95(%rip), %rax    # 0x21b030
movl $0x7d0, (%rax)          # imm = 0x7D0
movl $0x0, (%rbx)
jmp 0x615fd
leaq 0xbf04d(%rip), %rdi     # 0x1205fd
callq 0x6160d
movl $0x1, %edi
callq 0x590f7
callq 0x61688
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xafe8
leaq 0x2d6c81(%rip), %rax    # 0x338256
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2d6c71(%rip), %rax    # 0x338252
movw %cx, (%rax)
leaq 0x2d6c69(%rip), %rax    # 0x338254
movw %cx, (%rax)
movl $0x46, %edi
movl $0x1, %esi
callq 0x616de
movl $0xfa, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xafe8
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: send_moto_start(char*)
void send_moto_start(char *s)
{
   // send a Motorola binary message start header
   if(s == 0) return;
   if(log_file && (log_stream & LOG_PACKET_START)) {
      fprintf(log_file, "\nSend moto start %s\n", s);
   }

   sendout(RCVR_PORT, '@', ADD_CHAR);
   sendout(RCVR_PORT, '@', ADD_CHAR);
   moto_tx_cksum = 0;
   send_byte(s[0]);
   send_byte(s[1]);
}

// Assembly:
testq %rdi, %rdi
je 0x61687
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1dcd3e(%rip), %rax    # 0x23e360
movq (%rax), %rdi
testq %rdi, %rdi
je 0x61647
leaq 0x1dcddf(%rip), %rax    # 0x23e410
testb $0x4, (%rax)
je 0x61647
leaq 0xc3589(%rip), %rsi     # 0x124bc6
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9560
movl $0xa, %edi
movl $0x40, %esi
xorl %edx, %edx
callq 0xbcaa
movl $0xa, %edi
movl $0x40, %esi
xorl %edx, %edx
callq 0xbcaa
movb $0x0, 0x30b453(%rip)    # 0x36cac3
movzbl (%rbx), %edi
callq 0x590f7
movzbl 0x1(%rbx), %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x590f7
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: send_moto_end()
void send_moto_end()
{
   // send Motorola binary message checksum and end-of-packet
   sendout(RCVR_PORT, moto_tx_cksum, ADD_CHAR);
   sendout(RCVR_PORT, 0x0D, ADD_CHAR);
   sendout(RCVR_PORT, 0x0A, EOM);
   if(sim_file == 0) Sleep(50);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x30b430(%rip), %esi    # 0x36cac3
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcaa
movl $0xa, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xbcaa
movl $0xa, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xbcaa
leaq 0x1dccf5(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
je 0x616d3
popq %rbp
retq
movl $0x32, %edi
popq %rbp
jmp 0xafe8
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: update_ubx_config(unsigned int, unsigned int, unsigned int)
void update_ubx_config(u32 clear, u32 save, u32 load)
{
#define EE_MSG_SIZE 12

   send_ubx_start(UBX_EEPROM, EE_MSG_SIZE);
   send_dword(clear);   // reset params from permanent config
   send_dword(save);    // save params to EEPROM
   send_dword(load);    // load config from EEPROM

   if(EE_MSG_SIZE == 13) {  // storage device select
      send_byte(0x17);      // all devices
   }
   send_ubx_end();

   if(save) {
      BEEP(501);
      ++ee_write_count;
      Sleep(1000);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movl %edi, %r15d
movl $0x609, %edi            # imm = 0x609
movl $0xc, %esi
callq 0x5f37d
movl %r15d, %edi
callq 0x592eb
movl %r14d, %edi
callq 0x592eb
movl %ebx, %edi
callq 0x592eb
callq 0x5f456
testl %r14d, %r14d
je 0x61a1e
movl $0x1f5, %edi            # imm = 0x1F5
callq 0x9d78
leaq 0x1b9830(%rip), %rax    # 0x21b238
incl (%rax)
movl $0x3e8, %edi            # imm = 0x3E8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xafe8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: venus_restart(int)
void venus_restart(int mode)
{
s16 val;

   send_venus_start(SET_VENUS_RESTART);
   send_byte(mode);
   send_word(pri_year);
   send_byte(pri_month);
   send_byte(pri_day);
   send_byte(pri_hours);
   send_byte(pri_minutes);
   send_byte(pri_seconds);

   val = (s16) (lat * 180.0 / PI * 100.0);
   send_word(val);

   val = (s16) (lon * 180.0 / PI * 100.0);
   send_word(val);

   val = (s16) alt;
   send_word(val);

   send_venus_end();

   Sleep(5000);
   init_messages(50, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x1, %edi
movl $0xf, %esi
callq 0x5fb3c
movzbl %bl, %edi
callq 0x590f7
leaq 0x2abac5(%rip), %rax    # 0x30d514
movzwl (%rax), %eax
movw %ax, -0xa(%rbp)
leaq 0x1b6d77(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
leaq 0x2aba88(%rip), %rax    # 0x30d510
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2aba75(%rip), %rax    # 0x30d50c
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2aba62(%rip), %rax    # 0x30d508
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2aba4f(%rip), %rax    # 0x30d504
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2aba3c(%rip), %rax    # 0x30d500
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2ab4fd(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
mulsd 0xa9d51(%rip), %xmm0    # 0x10b830
divsd 0xa9d41(%rip), %xmm0    # 0x10b828
mulsd 0xa7571(%rip), %xmm0    # 0x109060
cvttsd2si %xmm0, %eax
movw %ax, -0xc(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xc(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xc(%rbp,%rax), %edi
callq 0x590f7
leaq 0x2ab4b6(%rip), %rax    # 0x30cfd8
movsd 0xa9d06(%rip), %xmm0    # 0x10b830
mulsd (%rax), %xmm0
divsd 0xa9cf2(%rip), %xmm0    # 0x10b828
mulsd 0xa7522(%rip), %xmm0    # 0x109060
cvttsd2si %xmm0, %eax
movw %ax, -0xe(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xe(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xe(%rbp,%rax), %edi
callq 0x590f7
leaq 0x2ab46f(%rip), %rax    # 0x30cfe0
cvttsd2si (%rax), %eax
movw %ax, -0x10(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x10(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x10(%rbp,%rax), %edi
callq 0x590f7
callq 0x61bc1
movl $0x1388, %edi           # imm = 0x1388
callq 0xafe8
movl $0x32, %edi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x616de
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: send_venus_end()
void send_venus_end()
{
   venus_tx_cksum &= 0xFF;
   sendout(RCVR_PORT, venus_tx_cksum, ADD_CHAR);
   sendout(RCVR_PORT, 0x0D, ADD_CHAR);
   sendout(RCVR_PORT, 0x0A, EOM);
   venus_start = venus_len = 0;
   if(sim_file == 0) Sleep(20);   // slightly rate limit sent messages
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movzbl 0x30af05(%rip), %esi    # 0x36cad3
xorl %ebx, %ebx
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcaa
movl $0xa, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xbcaa
movl $0xa, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xbcaa
movl %ebx, 0x30aee5(%rip)    # 0x36caec
movl %ebx, 0x30aedb(%rip)    # 0x36cae8
leaq 0x1dc7ac(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
je 0x61c21
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x14, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xafe8
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: enable_moto_binary()
void enable_moto_binary()
{
   // switch motorola receiver to binary mode

   rcvr_type = NMEA_RCVR;
   send_nmea_cmd("PMOTG,GGA,0000");
   send_nmea_cmd("PMOTG,GLL,0000");
   send_nmea_cmd("PMOTG,GSA,0000");
   send_nmea_cmd("PMOTG,GSV,0000");
   send_nmea_cmd("PMOTG,RMC,0000");
   send_nmea_cmd("PMOTG,VTG,0000");
   send_nmea_cmd("PMOTG,ZDA,0000");

   send_nmea_cmd("PMOTG,FOR,0");
   Sleep(500);

   com[RCVR_PORT].baud_rate = 9600;
   com[RCVR_PORT].data_bits = 8;
   com[RCVR_PORT].parity = NO_PAR;
   com[RCVR_PORT].stop_bits = 1;
   init_com(RCVR_PORT, 103);
   Sleep(100);
   drain_port(RCVR_PORT);

   tsip_sync = 0;
   tsip_wptr = 0;
   tsip_rptr = 0;
   auto_detect(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1b6c94(%rip), %rax    # 0x2188d0
movq $0x2, (%rax)
leaq 0xbe9b6(%rip), %rdi     # 0x120600
callq 0x5f0e5
leaq 0xbe9b9(%rip), %rdi     # 0x12060f
callq 0x5f0e5
leaq 0xbe9bc(%rip), %rdi     # 0x12061e
callq 0x5f0e5
leaq 0xbe9bf(%rip), %rdi     # 0x12062d
callq 0x5f0e5
leaq 0xbe9c2(%rip), %rdi     # 0x12063c
callq 0x5f0e5
leaq 0xbe9c5(%rip), %rdi     # 0x12064b
callq 0x5f0e5
leaq 0xbe9c8(%rip), %rdi     # 0x12065a
callq 0x5f0e5
leaq 0xbe9cb(%rip), %rdi     # 0x120669
callq 0x5f0e5
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xafe8
movaps 0xa750c(%rip), %xmm0    # 0x1091c0
leaq 0x2ac625(%rip), %rax    # 0x30e2e0
movaps %xmm0, 0x159d0(%rax)
movl $0xa, %edi
movl $0x67, %esi
callq 0xb49e
movl $0x64, %edi
callq 0xafe8
movl $0xa, %edi
callq 0x5802f
leaq 0x2d656a(%rip), %rax    # 0x338256
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2d655a(%rip), %rax    # 0x338252
movw %cx, (%rax)
leaq 0x2d6552(%rip), %rax    # 0x338254
movw %cx, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x61d0d
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: xxx_enable_moto_binary()
void xxx_enable_moto_binary()
{
   // put Motorola receiver into BINARY mode

   rcvr_type = NMEA_RCVR;
   send_nmea_cmd("PMOTG,FOR,0");
   Sleep(500);

   com[RCVR_PORT].baud_rate = 9600;
   com[RCVR_PORT].data_bits = 8;
   com[RCVR_PORT].parity = NO_PAR;
   com[RCVR_PORT].stop_bits = 1;
   init_com(RCVR_PORT, 103);
   Sleep(100);

   rcvr_type = MOTO_RCVR;
   auto_detect(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1b4d83(%rip), %rbx    # 0x2188d0
movq $0x2, (%rbx)
leaq 0xbcb0e(%rip), %rdi     # 0x120669
callq 0x5f0e5
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xafe8
movaps 0xa564f(%rip), %xmm0    # 0x1091c0
leaq 0x2aa768(%rip), %rax    # 0x30e2e0
movaps %xmm0, 0x159d0(%rax)
movl $0xa, %edi
movl $0x67, %esi
callq 0xb49e
movl $0x64, %edi
callq 0xafe8
movq $0x20, (%rbx)
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61d0d
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: enable_moto_nmea()
void enable_moto_nmea()
{
//send_moto_start("Eq"); // testing ASCII position message
//send_byte(0);
//send_moto_end();
//return;

   // put Motorola receiver into NMEA mode

   send_moto_start("Ci");
   if(furuno_moto == 0) send_byte(1);       // !!!!!! ESIP_RCVR motorola mode  !!!!!!!!!!
   send_moto_end();
   Sleep(500);

   if(furuno_moto) {  // switch to ESIP_RCVR mode
      force_mode_change = 0;
      com[RCVR_PORT].baud_rate = 38400;
      com[RCVR_PORT].data_bits = 8;
      com[RCVR_PORT].parity = NO_PAR;
      com[RCVR_PORT].stop_bits = 1;
      init_com(RCVR_PORT, 101);
      Sleep(100);
      rcvr_type = ESIP_RCVR;
   }
   else {
      com[RCVR_PORT].baud_rate = 4800;
      com[RCVR_PORT].data_bits = 8;
      com[RCVR_PORT].parity = NO_PAR;
      com[RCVR_PORT].stop_bits = 1;
      init_com(RCVR_PORT, 102);
      Sleep(100);

      rcvr_type = NMEA_RCVR;
      send_nmea_cmd("PMOTG,GGA,0001");
      send_nmea_cmd("PMOTG,GLL,0001");
      send_nmea_cmd("PMOTG,GSA,0001");
      send_nmea_cmd("PMOTG,GSV,0001");
      send_nmea_cmd("PMOTG,RMC,0001");
      send_nmea_cmd("PMOTG,VTG,0001");
      send_nmea_cmd("PMOTG,ZDA,0001");
   }

// auto_detect(0);
   config_rcvr_type(0);
   need_msg_init = 2001;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xbcabc(%rip), %rdi     # 0x120675
callq 0x6160d
leaq 0x1b537b(%rip), %rbx    # 0x218f40
cmpl $0x0, (%rbx)
jne 0x63bd4
movl $0x1, %edi
callq 0x590f7
callq 0x61688
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xafe8
cmpl $0x0, (%rbx)
je 0x63c37
leaq 0x1b7431(%rip), %rax    # 0x21b020
movl $0x0, (%rax)
movaps 0xa9424(%rip), %xmm0    # 0x10d020
leaq 0x2aa6dd(%rip), %rax    # 0x30e2e0
movaps %xmm0, 0x159d0(%rax)
movl $0xa, %edi
movl $0x65, %esi
callq 0xb49e
movl $0x64, %edi
callq 0xafe8
leaq 0x1b4ca6(%rip), %rax    # 0x2188d0
movl $0x80000000, %ecx       # imm = 0x80000000
movq %rcx, (%rax)
jmp 0x63cc7
movaps 0xa9372(%rip), %xmm0    # 0x10cfb0
leaq 0x2aa69b(%rip), %rax    # 0x30e2e0
movaps %xmm0, 0x159d0(%rax)
movl $0xa, %edi
movl $0x66, %esi
callq 0xb49e
movl $0x64, %edi
callq 0xafe8
leaq 0x1b4c64(%rip), %rax    # 0x2188d0
movq $0x2, (%rax)
leaq 0xbc9fe(%rip), %rdi     # 0x120678
callq 0x5f0e5
leaq 0xbca01(%rip), %rdi     # 0x120687
callq 0x5f0e5
leaq 0xbca04(%rip), %rdi     # 0x120696
callq 0x5f0e5
leaq 0xbca07(%rip), %rdi     # 0x1206a5
callq 0x5f0e5
leaq 0xbca0a(%rip), %rdi     # 0x1206b4
callq 0x5f0e5
leaq 0xbca0d(%rip), %rdi     # 0x1206c3
callq 0x5f0e5
leaq 0xbca10(%rip), %rdi     # 0x1206d2
callq 0x5f0e5
xorl %edi, %edi
callq 0x4b2af
leaq 0x1b735b(%rip), %rax    # 0x21b030
movl $0x7d1, (%rax)          # imm = 0x7D1
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_cs_remote(int)
void set_cs_remote(int mode)
{
   if(read_only) return;

   if(rcvr_type == CS_RCVR) {
      if(mode) queue_cs_cmd("SYST:REM ON", CS_REM_MSG);
      else     queue_cs_cmd("SYST:REM OFF", CS_REM_MSG);
      queue_cs_cmd("SYST:REM?", CS_REM_MSG);
   }
}

// Assembly:
leaq 0x2d31d8(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x63e8b
leaq 0x1b4a82(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0x63e8b
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
leaq 0xc1bc6(%rip), %rax     # 0x125a2a
leaq 0xc1bb3(%rip), %rdi     # 0x125a1e
cmoveq %rax, %rdi
movl $0x146, %esi            # imm = 0x146
callq 0x5edda
leaq 0xbc969(%rip), %rdi     # 0x1207e9
movl $0x146, %esi            # imm = 0x146
popq %rbp
jmp 0x5edda
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: init_z12(int)
void init_z12(int mode)
{
int baud;
int i;

   // mode 0 -> no mem reset
   // mode 1 -> reset internal memory
   // mode 2 -> reset external memory
   // mode 3 -> reset all memory

   i = (-1);
   baud = com[RCVR_PORT].baud_rate;
   if     (baud == 150) ;   // don't allow non-standard values
   else if(baud == 300) i = 0;   
   else if(baud == 600) i = 1;   
   else if(baud == 1200) i = 2;  
   else if(baud == 2400) i = 3;  
   else if(baud == 4800) i = 4;  
   else if(baud == 9600) i = 5;  
   else if(baud == 19200) i = 6; 
   else if(baud == 38400) i = 7; 
   else if(baud == 57600) i = 8; 
   else if(baud == 115200) i = 9; 
   else if(baud == 230400) i = (-1);
   sprintf(out, "PASHS,INI,%d,%d,%d,%d,%d,0", i,i,i,i,mode);
//lfs sprintf(debug_text, "baud:%d  i:%d  msg:%s", baud,i,out);
   if(i < 0) return;

   send_z12_cmd(out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2aa447(%rip), %rax    # 0x30e2e0
movl 0x159d0(%rax), %eax
cmpl $0x257f, %eax           # imm = 0x257F
jg 0x63ecd
cmpl $0x4af, %eax            # imm = 0x4AF
jle 0x63ef4
cmpl $0x4b0, %eax            # imm = 0x4B0
je 0x63f27
cmpl $0x960, %eax            # imm = 0x960
je 0x63f35
cmpl $0x12c0, %eax           # imm = 0x12C0
jne 0x63f72
movl $0x4, %ecx
jmp 0x63f41
cmpl $0x95ff, %eax           # imm = 0x95FF
jle 0x63f0b
cmpl $0x9600, %eax           # imm = 0x9600
je 0x63f2e
cmpl $0xe100, %eax           # imm = 0xE100
je 0x63f3c
cmpl $0x1c200, %eax          # imm = 0x1C200
jne 0x63f72
movl $0x9, %ecx
jmp 0x63f41
xorl %ecx, %ecx
cmpl $0x12c, %eax            # imm = 0x12C
je 0x63f41
cmpl $0x258, %eax            # imm = 0x258
jne 0x63f72
movl $0x1, %ecx
jmp 0x63f41
cmpl $0x2580, %eax           # imm = 0x2580
je 0x63f20
cmpl $0x4b00, %eax           # imm = 0x4B00
jne 0x63f72
movl $0x6, %ecx
jmp 0x63f41
movl $0x5, %ecx
jmp 0x63f41
movl $0x2, %ecx
jmp 0x63f41
movl $0x7, %ecx
jmp 0x63f41
movl $0x3, %ecx
jmp 0x63f41
movl $0x8, %ecx
movl %edi, (%rsp)
leaq 0x2d82d5(%rip), %rbx    # 0x33c220
leaq 0xbc78f(%rip), %rsi     # 0x1206e1
movq %rbx, %rdi
movl %ecx, %edx
movl %ecx, %r8d
movl %ecx, %r9d
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5f2c8
movl %edi, (%rsp)
leaq 0x2d82a4(%rip), %rdi    # 0x33c220
leaq 0xbc75e(%rip), %rsi     # 0x1206e1
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x9060
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_luxor_time()
void set_luxor_time()
{
   if(luxor == 0) return;

   get_clock_time();   // in UTC

   send_tsip_start(LUXOR_ID); 
   send_byte(0x02);
   send_byte((u08) clk_seconds);
   send_byte((u08) clk_minutes);
   send_byte((u08) clk_hours);
   send_byte((u08) clk_day);
   send_byte((u08) clk_month);
   send_byte((u08) (clk_year%100));
   send_tsip_end();

   luxor_time_set = 1;
}

// Assembly:
leaq 0x1daaf4(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x644f3
pushq %rbp
movq %rsp, %rbp
callq 0xa477
movl $0xdc, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
leaq 0x2a925d(%rip), %rax    # 0x30d6d4
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2a924a(%rip), %rax    # 0x30d6d0
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2a9237(%rip), %rax    # 0x30d6cc
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2a9220(%rip), %rax    # 0x30d6c4
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2a920d(%rip), %rax    # 0x30d6c0
movzbl (%rax), %edi
callq 0x590f7
leaq 0x2a9206(%rip), %rax    # 0x30d6c8
movslq (%rax), %rax
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
movzbl %al, %edi
callq 0x590f7
callq 0x5e73c
movb $0x1, 0x30792c(%rip)    # 0x36be1e
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_reset(int)
void request_rftg_reset(int mode)
{
   start_rftg_request(0);

   send_rftg_start(0x30);
   send_byte(0x06);
   send_dword(0);
   send_rftg_end();

   set_rftg_normal();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x65779
movl $0x30, %edi
callq 0x5e6be
movl $0x6, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x592eb
callq 0x5e73c
xorl %edi, %edi
callq 0x65779
movl $0x45, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: send_zod_start(unsigned short, unsigned short, unsigned short)
void send_zod_start(u16 id, u16 len, u16 flags)
{
u16 cksum;

   if(log_file && (log_stream & LOG_PACKET_START)) {
      fprintf(log_file, "\nSend zodiac start %04X  len:%u  flags:%04X\n", id, len,flags);
   }

   if(id == ZOD_FW_UPDATE) return;  // we don't allow this - might brick things

   len -= 6;
   cksum = (0x81FF + id + len + flags) & 0xFFFF;
   if(cksum != 0x8000) cksum = (0 - cksum) & 0xFFFF;

   zod_seq_num = (zod_seq_num + 1) & 0x7FFF;

   send_word(0x81FF);
   send_word(id);
   send_word(len);
   send_word(flags);
   send_word(cksum);

   zodiac_tx_cksum = 0;
   zodiac_tx_cnt = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %r15d
movl %edi, %r14d
leaq 0x1d9c5a(%rip), %rax    # 0x23e360
movq (%rax), %rdi
movzwl %r14w, %r12d
testq %rdi, %rdi
je 0x64737
leaq 0x1d9cf7(%rip), %rax    # 0x23e410
testb $0x4, (%rax)
je 0x64737
movzwl %r15w, %ecx
movzwl %bx, %r8d
leaq 0xc03e6(%rip), %rsi     # 0x124b13
movl %r12d, %edx
xorl %eax, %eax
callq 0x9560
cmpl $0x564, %r12d           # imm = 0x564
je 0x6485a
leal -0x6(%r15), %r13d
leal (%r14,%r15), %eax
addl %ebx, %eax
movl $0x7e07, %r12d          # imm = 0x7E07
subl %eax, %r12d
movzwl 0x3083d2(%rip), %eax    # 0x36cb30
incl %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movw %ax, 0x3083c4(%rip)     # 0x36cb30
movw $0x81ff, -0x2a(%rbp)    # imm = 0x81FF
leaq 0x1b405b(%rip), %r15    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%r15)
sete %al
movzbl -0x2a(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r15)
setne %al
movzbl -0x2a(%rbp,%rax), %edi
callq 0x590f7
movw %r14w, -0x2c(%rbp)
xorl %eax, %eax
cmpb $0x0, (%r15)
sete %al
movzbl -0x2c(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r15)
setne %al
movzbl -0x2c(%rbp,%rax), %edi
callq 0x590f7
movw %r13w, -0x2e(%rbp)
xorl %eax, %eax
cmpb $0x0, (%r15)
sete %al
movzbl -0x2e(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r15)
setne %al
movzbl -0x2e(%rbp,%rax), %edi
callq 0x590f7
movw %bx, -0x30(%rbp)
xorl %eax, %eax
cmpb $0x0, (%r15)
sete %al
movzbl -0x30(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r15)
setne %al
movzbl -0x30(%rbp,%rax), %edi
callq 0x590f7
movw %r12w, -0x32(%rbp)
xorl %eax, %eax
cmpb $0x0, (%r15)
sete %al
movzbl -0x32(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r15)
setne %al
movzbl -0x32(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
movw %ax, 0x3082c7(%rip)     # 0x36cb1a
movw %ax, 0x3082be(%rip)     # 0x36cb18
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: send_zod_end()
void send_zod_end()
{
   if(zodiac_tx_cksum != 0x8000) zodiac_tx_cksum = (0 - zodiac_tx_cksum) & 0xFFFF;

   sendout(RCVR_PORT, zodiac_tx_cksum % 256, ADD_CHAR);
   sendout(RCVR_PORT, zodiac_tx_cksum / 256, EOM);
   if(sim_file == 0) Sleep(50);
}

// Assembly:
movzwl 0x308268(%rip), %eax    # 0x36cb1a
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x648bd
xorl %eax, %eax
jmp 0x648c6
negl %eax
movw %ax, 0x308254(%rip)     # 0x36cb1a
pushq %rbp
movq %rsp, %rbp
movzbl %al, %esi
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcaa
movzbl 0x30823b(%rip), %esi    # 0x36cb1b
movl $0xa, %edi
movl $0x1, %edx
callq 0xbcaa
leaq 0x1d9aca(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
popq %rbp
je 0x648fe
retq
movl $0x32, %edi
jmp 0xafe8
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_venus_mode(int)
void set_venus_mode(int mode)
{
   // mode 1: NMEA output (accepts binary input) 2:binary output
   if(read_only) return;  // !!!!!!!!!!!!!!!!!

   send_venus_start(SET_VENUS_BINARY);
   send_byte(mode);
   send_venus_save(1);
}

// Assembly:
leaq 0x2d1fc5(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6505b
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x9, %edi
movl $0x3, %esi
callq 0x5fb3c
movzbl %bl, %edi
callq 0x590f7
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5fc00
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: send_ss_start(int, int)
void send_ss_start(int id, int len)
{
   ss_tx_cksum = 0;
   len -= 4;   // 4 bytes of header

   send_byte(0x01);    // SOH
   send_byte(id);      // if bit 0x80 set on message requests, send continuosly
   send_byte(id^0xFF);
   send_byte(len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
movw $0x0, 0x30749f(%rip)    # 0x36cabc
movl $0x1, %edi
callq 0x590f7
movzbl %r14b, %r14d
movl %r14d, %edi
callq 0x590f7
notb %r14b
movzbl %r14b, %edi
callq 0x590f7
addb $-0x4, %bl
movzbl %bl, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x590f7
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_manuf_params()
void request_manuf_params()
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;
   if(ACU_GG) ;
   else if(ACU_360) ;
   else if(ACUTIME) ;
   else if(PALISADE) ;
   else if(SV6_FAMILY) return;

   send_tsip_start(0x8E);
   send_byte(0x41);
   send_tsip_end();
}

// Assembly:
leaq 0x1d986c(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x65703
leaq 0x2d1942(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x65703
leaq 0x1b31e6(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x65703
leaq 0x1b58dd(%rip), %rax    # 0x21afd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x65703
cmpl $0x36, %eax
jne 0x65704
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e6be
movl $0x41, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_prodn_params()
void request_prodn_params()
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;
   if(ACU_GG) ;
   else if(ACU_360) ;
   else if(ACUTIME) ;
   else if(PALISADE) ;
   else if(SV6_FAMILY) return;

   send_tsip_start(0x8E);
   send_byte(0x42);
   send_tsip_end();
}

// Assembly:
leaq 0x1d9815(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6575a
leaq 0x2d18eb(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x6575a
leaq 0x1b318f(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6575a
leaq 0x1b5886(%rip), %rax    # 0x21afd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x6575a
cmpl $0x36, %eax
jne 0x6575b
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e6be
movl $0x42, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: start_rftg_request(int)
void start_rftg_request(int dont_do)
{
if(dont_do) return;

   send_rftg_start(0x34);
   send_byte(0x00);
   send_byte(0x40);
   send_byte(0x01);
   send_byte(0xFF);
   send_byte(0x02);
   send_rftg_end();

   send_rftg_start(0x34);
   send_byte(0x00);
   send_byte(0x40);
   send_byte(0x01);
   send_byte(0xFF);
   send_byte(0x01);
   send_rftg_end();
}

// Assembly:
testl %edi, %edi
je 0x6577e
retq
pushq %rbp
movq %rsp, %rbp
movl $0x34, %edi
callq 0x5e6be
xorl %edi, %edi
callq 0x590f7
movl $0x40, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x590f7
movl $0xff, %edi
callq 0x590f7
movl $0x2, %edi
callq 0x590f7
callq 0x5e73c
movl $0x34, %edi
callq 0x5e6be
xorl %edi, %edi
callq 0x590f7
movl $0x40, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x590f7
movl $0xff, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: start_rftg_request2(int)
void start_rftg_request2(int dont_do)
{
if(dont_do) return;

   send_rftg_start(0x34);
   send_byte(0x00);
   send_byte(0x40);
   send_byte(0x01);
   send_byte(0xFF);
   send_byte(0x02);
   send_rftg_end();

   send_rftg_start(0x34);
   send_byte(0x00);
   send_byte(0x40);
   send_byte(0x01);
   send_byte(0xFF);
   send_byte(0x02);
   send_rftg_end();
}

// Assembly:
testl %edi, %edi
je 0x65804
retq
pushq %rbp
movq %rsp, %rbp
movl $0x34, %edi
callq 0x5e6be
xorl %edi, %edi
callq 0x590f7
movl $0x40, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x590f7
movl $0xff, %edi
callq 0x590f7
movl $0x2, %edi
callq 0x590f7
callq 0x5e73c
movl $0x34, %edi
callq 0x5e6be
xorl %edi, %edi
callq 0x590f7
movl $0x40, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x590f7
movl $0xff, %edi
callq 0x590f7
movl $0x2, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_cable()
void request_rftg_cable()
{
   start_rftg_request(1);    // request cable delay (in feet)

   send_rftg_start(0x35);
   send_byte(2);   // 2=req  1=set
   send_dword(0);
   send_rftg_end();
   set_rftg_normal();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x35, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x592eb
callq 0x5e73c
xorl %edi, %edi
callq 0x65779
movl $0x45, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_voltages()
void request_rftg_voltages()
{
// start_rftg_request(1);
   if(no_poll) return;

start_rftg_request2(0);

   send_rftg_start(0x43);
   send_rftg_end();

//send_rftg_start(0x48);  // ?? does not do anything
//send_rftg_end();

   set_rftg_normal();
}

// Assembly:
leaq 0x2d173e(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x658e8
retq
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x657ff
movl $0x43, %edi
callq 0x5e6be
callq 0x5e73c
xorl %edi, %edi
callq 0x65779
movl $0x45, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_errlog()
void request_rftg_errlog()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x37);
   send_byte(2);  // 2=req 1=clear
   send_rftg_end();
/////   set_rftg_normal();
}

// Assembly:
leaq 0x2d1700(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65926
retq
pushq %rbp
movq %rsp, %rbp
movl $0x37, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_warmup_time()
void request_rftg_warmup_time()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x62);
   send_byte(0x02);  // 2=req 1=set
   send_word(0);
   send_rftg_end();
///   set_rftg_normal();
}

// Assembly:
leaq 0x2d1651(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x659d5
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x62, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
movw $0x0, -0xa(%rbp)
leaq 0x1b2dd8(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_delta_ape()
void request_rftg_delta_ape()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x65);
   send_byte(0x02);  // 2=req 1=set
   send_dword(0);
   send_rftg_end();
///   set_rftg_normal();
}

// Assembly:
leaq 0x2d15ee(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65a38
retq
pushq %rbp
movq %rsp, %rbp
movl $0x65, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x592eb
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_const_ape()
void request_rftg_const_ape()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x66);
   send_byte(0x02);  // 2=req 1=set
   send_dword(0);
   send_rftg_end();
///   set_rftg_normal();
}

// Assembly:
leaq 0x2d15bc(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65a6a
retq
pushq %rbp
movq %rsp, %rbp
movl $0x66, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x592eb
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_ape2()
void request_rftg_ape2()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x68);
   send_byte(0x02);  // 2=req 1=set
   send_dword(0);
   send_rftg_end();
///   set_rftg_normal();
}

// Assembly:
leaq 0x2d158a(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65a9c
retq
pushq %rbp
movq %rsp, %rbp
movl $0x68, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x592eb
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_ape()
void request_rftg_ape()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x69);
   send_byte(0x02);  // 2=req 1=set
   send_dword(0);
   send_rftg_end();
///   set_rftg_normal();
}

// Assembly:
leaq 0x2d1558(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65ace
retq
pushq %rbp
movq %rsp, %rbp
movl $0x69, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x592eb
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_delta_temp()
void request_rftg_delta_temp()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x70);   // 43=get voltages?
   send_byte(0x02);  // 2=req 1=set
   send_dword(0);
   send_rftg_end();
///   set_rftg_normal();
}

// Assembly:
leaq 0x2d1526(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65b00
retq
pushq %rbp
movq %rsp, %rbp
movl $0x70, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x592eb
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_corr_sched()
void request_rftg_corr_sched()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x74);
   send_byte(0x02);  // 2=req 1=set
   send_word(0);
   send_rftg_end();
///   set_rftg_normal();
}

// Assembly:
leaq 0x2d14f4(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65b32
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x74, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
movw $0x0, -0xa(%rbp)
leaq 0x1b2c7b(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_hw_ver()
void request_rftg_hw_ver()
{
   if(no_poll) return;

   start_rftg_request(1);  // was (1)
   send_rftg_start(0x71);
   send_byte(0x02);  // 2=req 1=set
   send_byte(0);
   send_rftg_end();

///   set_rftg_normal();
}

// Assembly:
leaq 0x2d1491(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65b95
retq
pushq %rbp
movq %rsp, %rbp
movl $0x71, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_avg_sample()
void request_rftg_avg_sample()
{
   if(no_poll) return;

   start_rftg_request(1);
   send_rftg_start(0x72);
   send_byte(0x02);  // 2=req 1=set
   send_byte(0);
   send_rftg_end();
///   set_rftg_normal();
}

// Assembly:
leaq 0x2d145f(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65bc7
retq
pushq %rbp
movq %rsp, %rbp
movl $0x72, %edi
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: query_venus_msg(int, int)
void query_venus_msg(int id, int sub_id)
{
   if(sub_id >= 0) {
      send_venus_start(id, 2);
      send_byte(sub_id);
   }
   else {
      send_venus_start(id, 1);
   }
   send_venus_end();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x65fd1
movl %esi, %ebx
movl $0x2, %esi
callq 0x5fb3c
movzbl %bl, %edi
callq 0x590f7
jmp 0x65fdb
movl $0x1, %esi
callq 0x5fb3c
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61bc1
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: show_test_warning()
void show_test_warning()
{
   erase_screen();
   vidstr(0,0, YELLOW, "Receiver is resetting... this may take a while");
   refresh_page();
   Sleep(3000);
   erase_screen();
   refresh_page();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0xeceb
leaq 0xc0253(%rip), %rcx     # 0x126531
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
callq 0xe787
callq 0xab54
movl $0xbb8, %edi            # imm = 0xBB8
callq 0xafe8
callq 0xeceb
popq %rbp
jmp 0xab54
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_almanac(int)
void request_almanac(int prn)
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == NVS_RCVR) { 
      if(prn < NVS_GLONASS_PRN) {  // GPS
         send_nvs_start(0x20);
         send_byte(0x01);
         send_byte((u08) prn);
         send_nvs_end();
      }
      else { // GLONASS
         send_nvs_start(0x20);
         send_byte(0x02);
         send_byte(prn-NVS_GLONASS_PRN);
         send_nvs_end();
      }
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) ;
      else if(ACU_360) ;
      else if(ACUTIME) ;
      else if(PALISADE) ;
      else if(SV6_FAMILY) return;
      send_tsip_start(0x20);
      send_byte((u08) prn);
      send_tsip_end();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1d8c2b(%rip), %rax    # 0x23ef3e
leaq 0x2d0d06(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
jne 0x66368
movl %edi, %ebx
leaq 0x1b25a7(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x66355
cmpq $0x800, %rax            # imm = 0x800
jne 0x66368
movl $0x20, %edi
callq 0x5e6be
cmpl $0x3f, %ebx
jg 0x6636f
movl $0x1, %edi
callq 0x590f7
jmp 0x6637c
leaq 0x1b4c78(%rip), %rax    # 0x21afd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x66368
cmpl $0x36, %eax
jne 0x6638f
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x2, %edi
callq 0x590f7
addb $-0x40, %bl
movzbl %bl, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e7c0
movl $0x20, %edi
callq 0x5e6be
movzbl %bl, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_atten(double)
void set_atten(double val)
{
   if(read_only) return;

   if(rcvr_type == TRUE_RCVR) {
      sprintf(out, "$SETA %d", (int) val);
      send_true_cmd(out);       // $SETA %d - set attenuator value
   }
   request_atten();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2d0c31(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x66447
leaq 0x1b24db(%rip), %r14    # 0x2188d0
cmpq $0x200000, (%r14)       # imm = 0x200000
jne 0x66447
cvttsd2si %xmm0, %edx
leaq 0x2d5e17(%rip), %rbx    # 0x33c220
leaq 0xba51a(%rip), %rsi     # 0x12092a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x5f228
leaq 0x2d0bf7(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x66447
cmpq $0x200000, (%r14)       # imm = 0x200000
jne 0x66447
leaq 0xba4e6(%rip), %rdi     # 0x120924
popq %rbx
popq %r14
popq %rbp
jmp 0x5f228
popq %rbx
popq %r14
popq %rbp
retq