LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d5ce9(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x6133d
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0xc37af(%rip), %rdi     # 0x124afb
callq 0x61694
callq 0x6170f
leaq 0xc37a1(%rip), %rdi     # 0x124afe
callq 0x61694
movzbl %bl, %edi
callq 0x591af
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6170f
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ddb9a(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x613aa
retq
leaq 0x2d5c6f(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x613a9
leaq 0x1b7513(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x613a9
leaq 0x1b9c0a(%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 0x613f4
orb %sil, %cl
orb %r8b, %dl
orb %cl, %dl
jne 0x613a9
movl %eax, %edx
xorl $0x41, %edx
leaq 0x1b74f8(%rip), %rcx    # 0x2188f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
je 0x613a9
cmpl $0x41, %eax
jne 0x6141a
cmpl $0x33, %ecx
je 0x613a9
cmpl $0x47, %ecx
je 0x613a9
pushq %rbp
movq %rsp, %rbp
movl $0x2c, %edi
callq 0x5e740
xorl %edi, %edi
callq 0x591af
movss 0xabb99(%rip), %xmm0    # 0x10cfd0
callq 0x59440
movss 0xabb8c(%rip), %xmm0    # 0x10cfd0
callq 0x59440
movss 0xabb7f(%rip), %xmm0    # 0x10cfd0
callq 0x59440
movss 0xabb72(%rip), %xmm0    # 0x10cfd0
callq 0x59440
callq 0x5e7c0
leaq 0x1dcf51(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
popq %rbp
jne 0x613a9
movl $0xc8, %edi
jmp 0xaff7
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ddab3(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x61491
retq
leaq 0x2d5b88(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x61490
leaq 0x1b742c(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x61490
pushq %rbp
movq %rsp, %rbp
movl $0x2d, %edi
callq 0x5e740
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d5b55(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x61565
leaq 0x1dda69(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x61565
leaq 0x1b9d51(%rip), %rax    # 0x21b236
cmpb $0x0, (%rax)
jne 0x61565
leaq 0x1b73df(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x61535
leaq 0x1b9ad6(%rip), %rax    # 0x21afd4
movl (%rax), %eax
movl %eax, %edx
xorl $0x41, %edx
leaq 0x1b73ec(%rip), %rcx    # 0x2188f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
jne 0x6153f
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e740
movl $0x26, %edi
callq 0x591af
callq 0x5e7c0
popq %rbp
movl $0x1f4, %edi            # imm = 0x1F4
jmp 0x9d80
cmpl $0x41, %eax
jne 0x61553
cmpl $0x33, %ecx
je 0x61517
cmpl $0x47, %ecx
je 0x61517
cmpl $0x41, %eax
je 0x61517
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x61517
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x61517
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1dd9cd(%rip), %rax    # 0x23ef3a
cmpb $0x0, (%rax)
jne 0x61597
leaq 0x1dd9c3(%rip), %rax    # 0x23ef3c
cmpb $0x0, (%rax)
jne 0x61597
leaq 0x1b734b(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x20, %rax
je 0x61597
cmpq $0x800, %rax            # imm = 0x800
je 0x61597
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x2de06a(%rip), %rax    # 0x33f60c
movl (%rax), %edi
addl $0x4, %edi
leaq 0x2de062(%rip), %rax    # 0x33f610
movl (%rax), %esi
leaq 0xbef42(%rip), %rcx     # 0x1204f9
movl $0xb, %edx
callq 0xe7d0
callq 0xab5f
movl $0x4e20, %edi           # imm = 0x4E20
callq 0xaff7
movl $0xa, %edi
movl $0x1, %esi
callq 0xaeba
movl $0xa, %edi
callq 0xaf8f
movl $0x7d0, %edi            # imm = 0x7D0
popq %rbp
jmp 0xaff7
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1b9a1f(%rip), %rbx    # 0x21b020
cmpl $0x0, (%rbx)
je 0x61630
leaq 0x1b72c3(%rip), %rax    # 0x2188d0
movq $0x20, (%rax)
xorl %edi, %edi
callq 0x4b25a
leaq 0x1b9a0e(%rip), %rax    # 0x21b030
movl $0x7d0, (%rax)          # imm = 0x7D0
movl $0x0, (%rbx)
jmp 0x61684
leaq 0xbeee6(%rip), %rdi     # 0x12051d
callq 0x61694
movl $0x1, %edi
callq 0x591af
callq 0x6170f
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xaff7
leaq 0x2d6bfa(%rip), %rax    # 0x338256
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2d6bea(%rip), %rax    # 0x338252
movw %cx, (%rax)
leaq 0x2d6be2(%rip), %rax    # 0x338254
movw %cx, (%rax)
movl $0x46, %edi
movl $0x1, %esi
callq 0x61765
movl $0xfa, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xaff7
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6170e
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1dccb7(%rip), %rax    # 0x23e360
movq (%rax), %rdi
testq %rdi, %rdi
je 0x616ce
leaq 0x1dcd58(%rip), %rax    # 0x23e410
testb $0x4, (%rax)
je 0x616ce
leaq 0xc3422(%rip), %rsi     # 0x124ae6
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9560
movl $0xa, %edi
movl $0x40, %esi
xorl %edx, %edx
callq 0xbcc0
movl $0xa, %edi
movl $0x40, %esi
xorl %edx, %edx
callq 0xbcc0
movb $0x0, 0x30b3cc(%rip)    # 0x36cac3
movzbl (%rbx), %edi
callq 0x591af
movzbl 0x1(%rbx), %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x591af
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x30b3a9(%rip), %esi    # 0x36cac3
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcc0
movl $0xa, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xbcc0
movl $0xa, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xbcc0
leaq 0x1dcc6e(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
je 0x6175a
popq %rbp
retq
movl $0x32, %edi
popq %rbp
jmp 0xaff7
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5f3f5
movl %r15d, %edi
callq 0x593b5
movl %r14d, %edi
callq 0x593b5
movl %ebx, %edi
callq 0x593b5
callq 0x5f4ce
testl %r14d, %r14d
je 0x61aa8
movl $0x1f5, %edi            # imm = 0x1F5
callq 0x9d80
leaq 0x1b97a6(%rip), %rax    # 0x21b238
incl (%rax)
movl $0x3e8, %edi            # imm = 0x3E8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xaff7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5fbb4
movzbl %bl, %edi
callq 0x591af
leaq 0x2aba3b(%rip), %rax    # 0x30d514
movzwl (%rax), %edi
callq 0x5936c
leaq 0x2aba28(%rip), %rax    # 0x30d510
movzbl (%rax), %edi
callq 0x591af
leaq 0x2aba15(%rip), %rax    # 0x30d50c
movzbl (%rax), %edi
callq 0x591af
leaq 0x2aba02(%rip), %rax    # 0x30d508
movzbl (%rax), %edi
callq 0x591af
leaq 0x2ab9ef(%rip), %rax    # 0x30d504
movzbl (%rax), %edi
callq 0x591af
leaq 0x2ab9dc(%rip), %rax    # 0x30d500
movzbl (%rax), %edi
callq 0x591af
leaq 0x2ab49d(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
mulsd 0xa9ce1(%rip), %xmm0    # 0x10b820
divsd 0xa9cd1(%rip), %xmm0    # 0x10b818
mulsd 0xa7511(%rip), %xmm0    # 0x109060
cvttsd2si %xmm0, %edi
movl $0xffff, %ebx           # imm = 0xFFFF
andl %ebx, %edi
callq 0x5936c
leaq 0x2ab472(%rip), %rax    # 0x30cfd8
movsd 0xa9cb2(%rip), %xmm0    # 0x10b820
mulsd (%rax), %xmm0
divsd 0xa9c9e(%rip), %xmm0    # 0x10b818
mulsd 0xa74de(%rip), %xmm0    # 0x109060
cvttsd2si %xmm0, %edi
andl %ebx, %edi
callq 0x5936c
leaq 0x2ab44c(%rip), %rax    # 0x30cfe0
cvttsd2si (%rax), %edi
andl %ebx, %edi
callq 0x5936c
callq 0x61bc3
movl $0x1388, %edi           # imm = 0x1388
callq 0xaff7
movl $0x32, %edi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61765
// File: /workspace/github_cpp_makefile_star2_O1/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 0x30af03(%rip), %esi    # 0x36cad3
xorl %ebx, %ebx
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcc0
movl $0xa, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xbcc0
movl $0xa, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xbcc0
movl %ebx, 0x30aee3(%rip)    # 0x36caec
movl %ebx, 0x30aed9(%rip)    # 0x36cae8
leaq 0x1dc7aa(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
je 0x61c23
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x14, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xaff7
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1b6c92(%rip), %rax    # 0x2188d0
movq $0x2, (%rax)
leaq 0xbe8d4(%rip), %rdi     # 0x120520
callq 0x5f15d
leaq 0xbe8d7(%rip), %rdi     # 0x12052f
callq 0x5f15d
leaq 0xbe8da(%rip), %rdi     # 0x12053e
callq 0x5f15d
leaq 0xbe8dd(%rip), %rdi     # 0x12054d
callq 0x5f15d
leaq 0xbe8e0(%rip), %rdi     # 0x12055c
callq 0x5f15d
leaq 0xbe8e3(%rip), %rdi     # 0x12056b
callq 0x5f15d
leaq 0xbe8e6(%rip), %rdi     # 0x12057a
callq 0x5f15d
leaq 0xbe8e9(%rip), %rdi     # 0x120589
callq 0x5f15d
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xaff7
movaps 0xa74fa(%rip), %xmm0    # 0x1091b0
leaq 0x2ac623(%rip), %rax    # 0x30e2e0
movaps %xmm0, 0x159d0(%rax)
movl $0xa, %edi
movl $0x67, %esi
callq 0xb49f
movl $0x64, %edi
callq 0xaff7
movl $0xa, %edi
callq 0x5804f
leaq 0x2d6568(%rip), %rax    # 0x338256
xorl %ecx, %ecx
movw %cx, (%rax)
leaq 0x2d6558(%rip), %rax    # 0x338252
movw %cx, (%rax)
leaq 0x2d6550(%rip), %rax    # 0x338254
movw %cx, (%rax)
xorl %edi, %edi
popq %rbp
jmp 0x61d0f
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1b4e09(%rip), %rbx    # 0x2188d0
movq $0x2, (%rbx)
leaq 0xbcab4(%rip), %rdi     # 0x120589
callq 0x5f15d
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xaff7
movaps 0xa56c5(%rip), %xmm0    # 0x1091b0
leaq 0x2aa7ee(%rip), %rax    # 0x30e2e0
movaps %xmm0, 0x159d0(%rax)
movl $0xa, %edi
movl $0x67, %esi
callq 0xb49f
movl $0x64, %edi
callq 0xaff7
movq $0x20, (%rbx)
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61d0f
// File: /workspace/github_cpp_makefile_star2_O1/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 0xbca62(%rip), %rdi     # 0x120595
callq 0x61694
leaq 0x1b5401(%rip), %rbx    # 0x218f40
cmpl $0x0, (%rbx)
jne 0x63b4e
movl $0x1, %edi
callq 0x591af
callq 0x6170f
movl $0x1f4, %edi            # imm = 0x1F4
callq 0xaff7
cmpl $0x0, (%rbx)
je 0x63bb1
leaq 0x1b74b7(%rip), %rax    # 0x21b020
movl $0x0, (%rax)
movaps 0xa941a(%rip), %xmm0    # 0x10cf90
leaq 0x2aa763(%rip), %rax    # 0x30e2e0
movaps %xmm0, 0x159d0(%rax)
movl $0xa, %edi
movl $0x65, %esi
callq 0xb49f
movl $0x64, %edi
callq 0xaff7
leaq 0x1b4d2c(%rip), %rax    # 0x2188d0
movl $0x80000000, %ecx       # imm = 0x80000000
movq %rcx, (%rax)
jmp 0x63c41
movaps 0xa93a8(%rip), %xmm0    # 0x10cf60
leaq 0x2aa721(%rip), %rax    # 0x30e2e0
movaps %xmm0, 0x159d0(%rax)
movl $0xa, %edi
movl $0x66, %esi
callq 0xb49f
movl $0x64, %edi
callq 0xaff7
leaq 0x1b4cea(%rip), %rax    # 0x2188d0
movq $0x2, (%rax)
leaq 0xbc9a4(%rip), %rdi     # 0x120598
callq 0x5f15d
leaq 0xbc9a7(%rip), %rdi     # 0x1205a7
callq 0x5f15d
leaq 0xbc9aa(%rip), %rdi     # 0x1205b6
callq 0x5f15d
leaq 0xbc9ad(%rip), %rdi     # 0x1205c5
callq 0x5f15d
leaq 0xbc9b0(%rip), %rdi     # 0x1205d4
callq 0x5f15d
leaq 0xbc9b3(%rip), %rdi     # 0x1205e3
callq 0x5f15d
leaq 0xbc9b6(%rip), %rdi     # 0x1205f2
callq 0x5f15d
xorl %edi, %edi
callq 0x4b25a
leaq 0x1b73e1(%rip), %rax    # 0x21b030
movl $0x7d1, (%rax)          # imm = 0x7D1
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d325e(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x63e05
leaq 0x1b4b08(%rip), %rax    # 0x2188d0
cmpq $0x20000, (%rax)        # imm = 0x20000
jne 0x63e05
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
leaq 0xc1b6c(%rip), %rax     # 0x12594a
leaq 0xc1b59(%rip), %rdi     # 0x12593e
cmoveq %rax, %rdi
movl $0x146, %esi            # imm = 0x146
callq 0x5ee52
leaq 0xbc90f(%rip), %rdi     # 0x120709
movl $0x146, %esi            # imm = 0x146
popq %rbp
jmp 0x5ee52
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2aa4cd(%rip), %rax    # 0x30e2e0
movl 0x159d0(%rax), %eax
cmpl $0x257f, %eax           # imm = 0x257F
jg 0x63e47
cmpl $0x4af, %eax            # imm = 0x4AF
jle 0x63e6e
cmpl $0x4b0, %eax            # imm = 0x4B0
je 0x63ea1
cmpl $0x960, %eax            # imm = 0x960
je 0x63eaf
cmpl $0x12c0, %eax           # imm = 0x12C0
jne 0x63eec
movl $0x4, %ecx
jmp 0x63ebb
cmpl $0x95ff, %eax           # imm = 0x95FF
jle 0x63e85
cmpl $0x9600, %eax           # imm = 0x9600
je 0x63ea8
cmpl $0xe100, %eax           # imm = 0xE100
je 0x63eb6
cmpl $0x1c200, %eax          # imm = 0x1C200
jne 0x63eec
movl $0x9, %ecx
jmp 0x63ebb
xorl %ecx, %ecx
cmpl $0x12c, %eax            # imm = 0x12C
je 0x63ebb
cmpl $0x258, %eax            # imm = 0x258
jne 0x63eec
movl $0x1, %ecx
jmp 0x63ebb
cmpl $0x2580, %eax           # imm = 0x2580
je 0x63e9a
cmpl $0x4b00, %eax           # imm = 0x4B00
jne 0x63eec
movl $0x6, %ecx
jmp 0x63ebb
movl $0x5, %ecx
jmp 0x63ebb
movl $0x2, %ecx
jmp 0x63ebb
movl $0x7, %ecx
jmp 0x63ebb
movl $0x3, %ecx
jmp 0x63ebb
movl $0x8, %ecx
movl %edi, (%rsp)
leaq 0x2d835b(%rip), %rbx    # 0x33c220
leaq 0xbc735(%rip), %rsi     # 0x120601
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 0x5f340
movl %edi, (%rsp)
leaq 0x2d832a(%rip), %rdi    # 0x33c220
leaq 0xbc704(%rip), %rsi     # 0x120601
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_O1/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 0x1dabee(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x643f9
pushq %rbp
movq %rsp, %rbp
callq 0xa495
movl $0xdc, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
leaq 0x2a9357(%rip), %rax    # 0x30d6d4
movzbl (%rax), %edi
callq 0x591af
leaq 0x2a9344(%rip), %rax    # 0x30d6d0
movzbl (%rax), %edi
callq 0x591af
leaq 0x2a9331(%rip), %rax    # 0x30d6cc
movzbl (%rax), %edi
callq 0x591af
leaq 0x2a931a(%rip), %rax    # 0x30d6c4
movzbl (%rax), %edi
callq 0x591af
leaq 0x2a9307(%rip), %rax    # 0x30d6c0
movzbl (%rax), %edi
callq 0x591af
leaq 0x2a9300(%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 0x591af
callq 0x5e7c0
movb $0x1, 0x307a26(%rip)    # 0x36be1e
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x655b0
movl $0x30, %edi
callq 0x5e740
movl $0x6, %edi
callq 0x591af
xorl %edi, %edi
callq 0x593b5
callq 0x5e7c0
xorl %edi, %edi
callq 0x655b0
movl $0x45, %edi
callq 0x5e740
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %r15d
movl %edi, %eax
leaq 0x1d9d5b(%rip), %rcx    # 0x23e360
movq (%rcx), %rdi
movzwl %ax, %r14d
testq %rdi, %rdi
je 0x64636
leaq 0x1d9df8(%rip), %rax    # 0x23e410
testb $0x4, (%rax)
je 0x64636
movzwl %r15w, %ecx
movzwl %bx, %r8d
leaq 0xc0407(%rip), %rsi     # 0x124a33
movl %r14d, %edx
xorl %eax, %eax
callq 0x9560
cmpl $0x564, %r14d           # imm = 0x564
je 0x646ad
leal -0x6(%r15), %r12d
leal (%r14,%r15), %eax
addl %ebx, %eax
movl $0x7e07, %r15d          # imm = 0x7E07
subl %eax, %r15d
movzwl 0x3084d7(%rip), %eax    # 0x36cb30
incl %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movw %ax, 0x3084c9(%rip)     # 0x36cb30
movl $0x81ff, %edi           # imm = 0x81FF
callq 0x5936c
movl %r14d, %edi
callq 0x5936c
movl $0xffff, %r14d          # imm = 0xFFFF
andl %r14d, %r12d
movl %r12d, %edi
callq 0x5936c
movzwl %bx, %edi
callq 0x5936c
andl %r14d, %r15d
movl %r15d, %edi
callq 0x5936c
xorl %eax, %eax
movw %ax, 0x308474(%rip)     # 0x36cb1a
movw %ax, 0x30846b(%rip)     # 0x36cb18
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x30844c(%rip), %eax    # 0x36cb1a
cmpl $0x8000, %eax           # imm = 0x8000
je 0x646de
negl %eax
movw %ax, 0x30843c(%rip)     # 0x36cb1a
pushq %rbp
movq %rsp, %rbp
movzbl 0x308431(%rip), %esi    # 0x36cb1a
movl $0xa, %edi
xorl %edx, %edx
callq 0xbcc0
movzbl 0x30841f(%rip), %esi    # 0x36cb1b
movl $0xa, %edi
movl $0x1, %edx
callq 0xbcc0
leaq 0x1d9cae(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
popq %rbp
je 0x6471a
retq
movl $0x32, %edi
jmp 0xaff7
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d225c(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x64dc4
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x9, %edi
movl $0x3, %esi
callq 0x5fbb4
movzbl %bl, %edi
callq 0x591af
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5fc43
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x307702(%rip)    # 0x36cabc
movl $0x1, %edi
callq 0x591af
movzbl %r14b, %r14d
movl %r14d, %edi
callq 0x591af
notb %r14b
movzbl %r14b, %edi
callq 0x591af
addb $-0x4, %bl
movzbl %bl, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x591af
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d9acf(%rip), %rax    # 0x23ef3e
leaq 0x2d1baa(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
setne %al
leaq 0x1b344c(%rip), %rcx    # 0x2188d0
movq (%rcx), %rcx
cmpq $0x1, %rcx
setne %dl
orb %al, %dl
je 0x65493
retq
leaq 0x1b5b3a(%rip), %rax    # 0x21afd4
movl (%rax), %eax
movl %eax, %esi
xorl $0x41, %esi
leaq 0x1b3450(%rip), %rdx    # 0x2188f8
movl (%rdx), %edx
movl %edx, %edi
xorl $0x47, %edi
orl %esi, %edi
jne 0x654d1
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e740
movl $0x41, %edi
callq 0x591af
popq %rbp
jmp 0x5e7c0
cmpl $0x41, %eax
jne 0x654e0
cmpl $0x33, %edx
je 0x654b3
cmpl $0x47, %edx
je 0x654b3
cmpl $0x41, %eax
sete %dl
cmpl $0x50, %eax
setne %sil
cmpq $0x1, %rcx
jne 0x654b3
xorb %sil, %dl
je 0x654b3
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x654b3
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jb 0x65492
jmp 0x654b3
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d9a2b(%rip), %rax    # 0x23ef3e
leaq 0x2d1b06(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
setne %al
leaq 0x1b33a8(%rip), %rcx    # 0x2188d0
movq (%rcx), %rcx
cmpq $0x1, %rcx
setne %dl
orb %al, %dl
je 0x65537
retq
leaq 0x1b5a96(%rip), %rax    # 0x21afd4
movl (%rax), %eax
movl %eax, %esi
xorl $0x41, %esi
leaq 0x1b33ac(%rip), %rdx    # 0x2188f8
movl (%rdx), %edx
movl %edx, %edi
xorl $0x47, %edi
orl %esi, %edi
jne 0x65575
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e740
movl $0x42, %edi
callq 0x591af
popq %rbp
jmp 0x5e7c0
cmpl $0x41, %eax
jne 0x65584
cmpl $0x33, %edx
je 0x65557
cmpl $0x47, %edx
je 0x65557
cmpl $0x41, %eax
sete %dl
cmpl $0x50, %eax
setne %sil
cmpq $0x1, %rcx
jne 0x65557
xorb %sil, %dl
je 0x65557
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x65557
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jb 0x65536
jmp 0x65557
// File: /workspace/github_cpp_makefile_star2_O1/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 0x655b5
retq
pushq %rbp
movq %rsp, %rbp
movl $0x34, %edi
callq 0x5e740
xorl %edi, %edi
callq 0x591af
movl $0x40, %edi
callq 0x591af
movl $0x1, %edi
callq 0x591af
movl $0xff, %edi
callq 0x591af
movl $0x2, %edi
callq 0x591af
callq 0x5e7c0
movl $0x34, %edi
callq 0x5e740
xorl %edi, %edi
callq 0x591af
movl $0x40, %edi
callq 0x591af
movl $0x1, %edi
callq 0x591af
movl $0xff, %edi
callq 0x591af
movl $0x1, %edi
callq 0x591af
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6563b
retq
pushq %rbp
movq %rsp, %rbp
movl $0x34, %edi
callq 0x5e740
xorl %edi, %edi
callq 0x591af
movl $0x40, %edi
callq 0x591af
movl $0x1, %edi
callq 0x591af
movl $0xff, %edi
callq 0x591af
movl $0x2, %edi
callq 0x591af
callq 0x5e7c0
movl $0x34, %edi
callq 0x5e740
xorl %edi, %edi
callq 0x591af
movl $0x40, %edi
callq 0x591af
movl $0x1, %edi
callq 0x591af
movl $0xff, %edi
callq 0x591af
movl $0x2, %edi
callq 0x591af
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x593b5
callq 0x5e7c0
xorl %edi, %edi
callq 0x655b0
movl $0x45, %edi
callq 0x5e740
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d1907(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x6571f
retq
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x65636
movl $0x43, %edi
callq 0x5e740
callq 0x5e7c0
xorl %edi, %edi
callq 0x655b0
movl $0x45, %edi
callq 0x5e740
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d18c9(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x6575d
retq
pushq %rbp
movq %rsp, %rbp
movl $0x37, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d181a(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x6580c
retq
pushq %rbp
movq %rsp, %rbp
movl $0x62, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x5936c
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d17e8(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x6583e
retq
pushq %rbp
movq %rsp, %rbp
movl $0x65, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x593b5
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d17b6(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65870
retq
pushq %rbp
movq %rsp, %rbp
movl $0x66, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x593b5
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d1784(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x658a2
retq
pushq %rbp
movq %rsp, %rbp
movl $0x68, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x593b5
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d1752(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x658d4
retq
pushq %rbp
movq %rsp, %rbp
movl $0x69, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x593b5
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d1720(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65906
retq
pushq %rbp
movq %rsp, %rbp
movl $0x70, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x593b5
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d16ee(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x65938
retq
pushq %rbp
movq %rsp, %rbp
movl $0x74, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x5936c
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d16bc(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x6596a
retq
pushq %rbp
movq %rsp, %rbp
movl $0x71, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x591af
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d168a(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x6599c
retq
pushq %rbp
movq %rsp, %rbp
movl $0x72, %edi
callq 0x5e740
movl $0x2, %edi
callq 0x591af
xorl %edi, %edi
callq 0x591af
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x65da6
movl %esi, %ebx
movl $0x2, %esi
callq 0x5fbb4
movzbl %bl, %edi
callq 0x591af
jmp 0x65db0
movl $0x1, %esi
callq 0x5fbb4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61bc3
// File: /workspace/github_cpp_makefile_star2_O1/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 0xed5e
leaq 0xc03e5(%rip), %rcx     # 0x126451
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
callq 0xe7d0
callq 0xab5f
movl $0xbb8, %edi            # imm = 0xBB8
callq 0xaff7
callq 0xed5e
popq %rbp
jmp 0xab5f
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d8e9d(%rip), %rax    # 0x23ef3e
leaq 0x2d0f78(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
jne 0x66182
movl %edi, %ebx
leaq 0x1b2815(%rip), %rax    # 0x2188d0
movq (%rax), %rcx
cmpq $0x1, %rcx
je 0x660ec
cmpq $0x800, %rcx            # imm = 0x800
jne 0x66182
movl $0x20, %edi
callq 0x5e740
cmpl $0x3f, %ebx
jg 0x66129
movl $0x1, %edi
callq 0x591af
jmp 0x66136
leaq 0x1b4ee1(%rip), %rax    # 0x21afd4
movl (%rax), %eax
movl %eax, %esi
xorl $0x41, %esi
leaq 0x1b27f7(%rip), %rdx    # 0x2188f8
movl (%rdx), %edx
movl %edx, %edi
xorl $0x47, %edi
orl %esi, %edi
jne 0x66149
movl $0x20, %edi
callq 0x5e740
movzbl %bl, %edi
callq 0x591af
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e7c0
movl $0x2, %edi
callq 0x591af
addb $-0x40, %bl
movzbl %bl, %edi
callq 0x591af
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e844
cmpl $0x41, %eax
jne 0x66158
cmpl $0x33, %edx
je 0x6610c
cmpl $0x47, %edx
je 0x6610c
cmpl $0x41, %eax
sete %dl
cmpl $0x50, %eax
setne %sil
cmpq $0x1, %rcx
jne 0x6610c
xorb %sil, %dl
je 0x6610c
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6610c
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x6610c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2d0e54(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x661d0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1b26f9(%rip), %r14    # 0x2188d0
cmpq $0x200000, (%r14)       # imm = 0x200000
jne 0x66204
cvttsd2si %xmm0, %edx
leaq 0x2d6035(%rip), %rbx    # 0x33c220
leaq 0xba658(%rip), %rsi     # 0x12084a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x5f2a0
leaq 0x2d0e15(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x661cb
cmpq $0x200000, (%r14)       # imm = 0x200000
jne 0x661cb
leaq 0xba624(%rip), %rdi     # 0x120844
popq %rbx
popq %r14
popq %rbp
jmp 0x5f2a0
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_antenna(int)
void set_antenna(int i)
{
   if(read_only) return;

   if(rcvr_type == TM4_RCVR) {
      sprintf(out, "#23,%d", i);
      send_tm4_cmd(out);
   }
}

// Assembly:
leaq 0x2d0dea(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x66279
leaq 0x1b2694(%rip), %rax    # 0x2188d0
movabsq $0x400000000, %rcx      # imm = 0x400000000
cmpq %rcx, (%rax)
jne 0x66279
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2d5fc6(%rip), %rbx    # 0x33c220
leaq 0xba5f2(%rip), %rsi     # 0x120853
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5f1e8
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: request_sat_list()
void request_sat_list()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == ESIP_RCVR) {
//    send_esip_cmd("PERDCFG,NMEAOUT,GSA,0");
//    send_esip_cmd("PERDCFG,NMEAOUT,GSV,0");
   }
   else if(rcvr_type == FURUNO_RCVR) {
      send_furuno_cmd("GPint,GSA00,GSV00,acc00,anc00,wav00");
      send_furuno_cmd("GPwaq");
      send_furuno_cmd("GPmgq");
      send_furuno_cmd("GPpsq");
      send_furuno_cmd("GPprq");
   }
   else if(rcvr_type == MOTO_RCVR) {
      if(1 || (user_set_raw_rate == 0)) { 
         send_moto_start("Bb");  // sat visibility data
         send_byte(0);
         send_moto_end();
      }
   }
   else if(rcvr_type == NVS_RCVR) {
      send_nvs_start(0x24);
      send_nvs_end();
   }
   else if(rcvr_type == RFTG_RCVR) {
      request_rftg_sats();
set_rftg_normal();
   }
   else if(rcvr_type == TRUE_RCVR) {
      send_true_cmd("$GETPOS");  // get position
   }
   else if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x24);
      send_tsip_end();
   }
   else if(rcvr_type == UBX_RCVR) {
      request_ubx_msg(UBX_DOP);
   }
   else if(rcvr_type == ZODIAC_RCVR) {
      query_zod_msg(ZOD_SNR_MSG);
      query_zod_msg(ZOD_VIS_MSG);
//query_zod_msg(ZOD_TRAIM_CONFIG_MSG);  //zork
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1d8cb9(%rip), %rax    # 0x23ef3e
leaq 0x2d0d94(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
setne %cl
leaq 0x1b2636(%rip), %rax    # 0x2188d0
movq (%rax), %rax
movl $0x80000000, %edx       # imm = 0x80000000
cmpq %rdx, %rax
sete %dl
orb %cl, %dl
je 0x662ae
popq %rbp
retq
cmpq $0x7ff, %rax            # imm = 0x7FF
jg 0x662de
cmpq $0x1f, %rax
jg 0x66307
cmpq $0x1, %rax
je 0x6639d
cmpq $0x4, %rax
jne 0x662ac
movl $0x104, %edi            # imm = 0x104
xorl %esi, %esi
callq 0x5f3f5
popq %rbp
jmp 0x5f4ce
cmpq $0x3fffff, %rax         # imm = 0x3FFFFF
jg 0x6634c
cmpq $0x800, %rax            # imm = 0x800
je 0x663a4
cmpq $0x200000, %rax         # imm = 0x200000
jne 0x662ac
leaq 0xba598(%rip), %rdi     # 0x120899
popq %rbp
jmp 0x5f2a0
cmpq $0x20, %rax
je 0x663b4
cmpq $0x100, %rax            # imm = 0x100
jne 0x662ac
movl $0x3ea, %edi            # imm = 0x3EA
movl $0x6, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x645ec
callq 0x646c7
movl $0x3eb, %edi            # imm = 0x3EB
movl $0x6, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x645ec
popq %rbp
jmp 0x646c7
cmpq $0x400000, %rax         # imm = 0x400000
je 0x663cd
cmpq $0x20000000, %rax       # imm = 0x20000000
jne 0x662ac
leaq 0xba4f3(%rip), %rdi     # 0x12085a
callq 0x5f070
leaq 0xba50b(%rip), %rdi     # 0x12087e
callq 0x5f070
leaq 0xba505(%rip), %rdi     # 0x120884
callq 0x5f070
leaq 0xba4ff(%rip), %rdi     # 0x12088a
callq 0x5f070
leaq 0xba4f9(%rip), %rdi     # 0x120890
popq %rbp
jmp 0x5f070
movl $0x24, %edi
jmp 0x663de
movl $0x24, %edi
callq 0x5e740
popq %rbp
jmp 0x5e844
leaq 0xba4db(%rip), %rdi     # 0x120896
callq 0x61694
xorl %edi, %edi
callq 0x591af
popq %rbp
jmp 0x6170f
callq 0x6579c
xorl %edi, %edi
callq 0x655b0
movl $0x45, %edi
callq 0x5e740
popq %rbp
jmp 0x5e7c0
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: request_gps_time()
void request_gps_time()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {  // SV6_TYPE uses this
      send_tsip_start(0x21);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1d8b4e(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x663f6
retq
leaq 0x2d0c23(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x663f5
leaq 0x1b24c7(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x663f5
pushq %rbp
movq %rsp, %rbp
movl $0x21, %edi
callq 0x5e740
popq %rbp
jmp 0x5e7c0