LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_eeprom_status()
void request_eeprom_status()
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;
   if(ACU_GG) return;
   if(ACU_360) return;
   if(ACUTIME) ;
   else if(PALISADE) return;
   else if(SV6_FAMILY) return;
   if(res_t) return;          // !!! Thunderbolt only
   if(saw_ntpx) return;

   send_tsip_start(0x3F);
   send_byte(0x11);
   send_tsip_end();
}

// Assembly:
leaq 0x1c824d(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x60d2f
leaq 0x2c0323(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60d2f
leaq 0x1a1bc7(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60d2f
leaq 0x1a42be(%rip), %rax    # 0x204fd4
movl (%rax), %eax
movl %eax, %edx
xorl $0x41, %edx
leaq 0x1a1bd4(%rip), %rcx    # 0x2028f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
jne 0x60d30
retq
cmpl $0x41, %eax
jne 0x60d55
cmpl $0x33, %ecx
je 0x60d2f
cmpl $0x47, %ecx
je 0x60d2f
leaq 0x1a1bbe(%rip), %rax    # 0x202904
leaq 0x1c81ef(%rip), %rcx    # 0x228f3c
movb (%rcx), %cl
orb (%rax), %cl
jne 0x60d2f
jmp 0x60d84
cmpl $0x50, %eax
je 0x60d2f
leaq 0x1a1ba3(%rip), %rcx    # 0x202904
cmpb $0x0, (%rcx)
jne 0x60d2f
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x60d78
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jb 0x60d2f
leaq 0x1c81bd(%rip), %rax    # 0x228f3c
cmpb $0x0, (%rax)
jne 0x60d2f
pushq %rbp
movq %rsp, %rbp
pushq $0x3f
popq %rdi
callq 0x5707f
pushq $0x11
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_diff_mode()
void request_diff_mode()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x62);
      send_byte(0xFF);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1c8199(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x60dab
retq
leaq 0x2c026e(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60daa
leaq 0x1a1b12(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60daa
pushq %rbp
movq %rsp, %rbp
pushq $0x62
popq %rdi
callq 0x5707f
movl $0xff, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_diff_mode(unsigned char)
void set_diff_mode(u08 mode)
{
   if(read_only) return;
   if(luxor) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x62);
      send_byte(mode);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2c0233(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x60ded
retq
leaq 0x1c814a(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x60dec
leaq 0x1a1ad0(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60dec
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x62
popq %rdi
callq 0x5707f
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_posn_filter()
void request_posn_filter()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x71);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1c810e(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x60e36
retq
leaq 0x2c01e3(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60e35
leaq 0x1a1a87(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60e35
pushq %rbp
movq %rsp, %rbp
pushq $0x71
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_alt_filter()
void request_alt_filter()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x73);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1c80d6(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x60e6e
retq
leaq 0x2c01ab(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60e6d
leaq 0x1a1a4f(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60e6d
pushq %rbp
movq %rsp, %rbp
pushq $0x73
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_high8_mode()
void request_high8_mode()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x75);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1c809e(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x60ea6
retq
leaq 0x2c0173(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60ea5
leaq 0x1a1a17(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60ea5
pushq %rbp
movq %rsp, %rbp
pushq $0x75
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_high6_mode()
void request_high6_mode()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x76);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1c8066(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x60ede
retq
leaq 0x2c013b(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60edd
leaq 0x1a19df(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60edd
pushq %rbp
movq %rsp, %rbp
pushq $0x76
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_diff_age()
void request_diff_age()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x77);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1c802e(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x60f16
retq
leaq 0x2c0103(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60f15
leaq 0x1a19a7(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60f15
pushq %rbp
movq %rsp, %rbp
pushq $0x77
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_filter_config()
void request_filter_config()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) return;
      if(ACU_360) return;
      if(ACUTIME) return;     // responds to filter commands, but settings do not stick
      if(PALISADE) return;

      if(ACUTIME) {
         send_tsip_start(0x70);
         send_tsip_end();
      }
      else if(SV6_FAMILY) {
         request_alt_filter();
         request_posn_filter();
      }
      else {
         send_tsip_start(0x70);
         send_tsip_end();
      }
   }
   else if(rcvr_type == MOTO_RCVR) {
      send_moto_start("AN");  // marine (velocity) filter
      send_byte(0xFF);
      send_moto_end();

      send_moto_start("AQ");  // position filter
      send_byte(0xFF);
      send_moto_end();

      send_moto_start("Aq");  // ionosphere corrections
      send_byte(0xFF);
      send_moto_end();

      send_moto_start("Ar");  // fix type
      send_byte(0xFF);
      send_moto_end();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1c7ff2(%rip), %rax    # 0x228f3e
leaq 0x2c00cd(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
jne 0x60f97
leaq 0x1a1970(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x20, %rax
je 0x60f99
cmpq $0x1, %rax
jne 0x60f97
leaq 0x1a405e(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x60f8c
cmpl $0x50, %eax
je 0x60f97
cmpl $0x41, %eax
je 0x60f97
cmpl $0x36, %eax
jne 0x61006
callq 0x60e61
popq %rbp
jmp 0x60e29
popq %rbp
retq
leaq 0xad255(%rip), %rdi     # 0x10e1f5
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
callq 0x59aab
leaq 0xa9d13(%rip), %rdi     # 0x10acce
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
callq 0x59aab
leaq 0xa9cfb(%rip), %rdi     # 0x10acd1
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
callq 0x59aab
leaq 0xa9ce3(%rip), %rdi     # 0x10acd4
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
popq %rbp
jmp 0x59aab
pushq $0x70
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_posn_filter(unsigned char, unsigned char)
void set_posn_filter(u08 static_mode, u08 dynamic_mode)
{
u08 val;

   if(read_only) return;
   if(luxor) return;

   if(rcvr_type == TSIP_RCVR) {
      if(static_mode || dynamic_mode) val = 1;
      else val = 0;
      send_tsip_start(0x71);
      send_byte(val);
      if(dynamic_mode) send_single(0.0625F);
      else             send_single(1.0F);
      send_byte(1);
      send_byte(1);
      send_byte(0);
      send_byte(6);
      send_single(0.1F);
      send_single(100.0F);
      send_single(1.21F);
      send_single(1.0E6F);
      if(static_mode) send_byte(6);
      else            send_byte(255);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2bffff(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x61101
leaq 0x1c7f13(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x61101
leaq 0x1a1895(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x61101
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %r15d, %r15d
testb %sil, %sil
sete %r15b
xorl %r14d, %r14d
orb %bl, %sil
setne %r14b
pushq $0x71
popq %rdi
callq 0x5707f
movl %r14d, %edi
callq 0x523f2
leaq 0xa71cc(%rip), %rax     # 0x108248
movss (%rax,%r15,4), %xmm0
callq 0x52673
pushq $0x1
popq %r14
movl %r14d, %edi
callq 0x523f2
movl %r14d, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
pushq $0x6
popq %r14
movl %r14d, %edi
callq 0x523f2
movss 0xa7906(%rip), %xmm0    # 0x1089bc
callq 0x52673
movss 0x9602d(%rip), %xmm0    # 0xf70f0
callq 0x52673
movss 0xa78f0(%rip), %xmm0    # 0x1089c0
callq 0x52673
movss 0xa78e7(%rip), %xmm0    # 0x1089c4
callq 0x52673
testb %bl, %bl
movl $0xff, %edi
cmovnel %r14d, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_filter_config(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, int)
void set_filter_config(u08 pv, u08 stat, u08 alt, u08 kalman, u08 marine, int save)
{
u08 val;

   if(read_only) return;
   if(luxor) return;

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

      if(SV6_FAMILY) {
         set_alt_filter(alt);
         set_posn_filter(stat, pv);
      }
      else {
         send_tsip_start(0x70);
         send_byte(pv);
         send_byte(stat);
         send_byte(alt);
         send_byte(kalman); // rsvd on ThunderBolt,  kalman on ThunderBolt-E
         send_tsip_end();
         if(0 && save) save_segment(255, 20);
      }
   }
   else if(1 && (rcvr_type == MOTO_RCVR)) { // marine velocity filter - !!!! code in heathui.cpp will need to be changed to do this
      if((marine >= 10) && (marine <= 100)) {
         send_moto_start("AN");
         send_byte(marine);
         send_moto_end();
      }

      send_moto_start("AQ");
      send_byte(pv);
      send_moto_end();

      val = 0x00;
      if(stat) val |= 0x01;
      if(alt) val |= 0x02;
      send_moto_start("Aq");
      send_byte(val);
      send_moto_end();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
leaq 0x2bff00(%rip), %rax    # 0x32101a
leaq 0x1c7e1d(%rip), %rcx    # 0x228f3e
movb (%rcx), %cl
orb (%rax), %cl
jne 0x61189
movl %edx, %ebx
movl %esi, %r14d
movl %edi, %r15d
leaq 0x1a179a(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x20, %rax
je 0x61198
cmpq $0x1, %rax
jne 0x61189
leaq 0x1a3e88(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x61166
cmpl $0x50, %eax
je 0x61189
cmpl $0x41, %eax
je 0x61189
cmpl $0x36, %eax
jne 0x61211
movzbl %bl, %edi
callq 0x6124f
movzbl %r14b, %edi
movzbl %r15b, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x61014
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r8d, %r13d
leal -0xa(%r13), %eax
cmpb $0x5a, %al
ja 0x611bd
leaq 0xad04b(%rip), %rdi     # 0x10e1f5
callq 0x59a28
movzbl %r13b, %edi
callq 0x523f2
callq 0x59aab
leaq 0xa9b0a(%rip), %rdi     # 0x10acce
callq 0x59a28
movzbl %r15b, %edi
callq 0x523f2
callq 0x59aab
xorl %eax, %eax
testb %r14b, %r14b
setne %al
leal 0x2(%rax), %ecx
testb %bl, %bl
movzbl %cl, %ebx
cmovel %eax, %ebx
leaq 0xa9ae0(%rip), %rdi     # 0x10acd1
callq 0x59a28
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x59aab
pushq $0x70
popq %rdi
callq 0x5707f
movzbl %r15b, %edi
callq 0x523f2
movzbl %r14b, %edi
callq 0x523f2
movzbl %bl, %edi
callq 0x523f2
movzbl %r12b, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_alt_filter(unsigned char)
void set_alt_filter(u08 mode)
{
   if(read_only) return;
   if(luxor) return;

   // mode > 1: filter count
   // mode = 1: filter off
   // mode = 0: filter default
   if(mode) mode = 0;
   else     mode = 1;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x73);
      send_single((float) mode);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2bfdc4(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x61286
leaq 0x1c7cdc(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x61286
leaq 0x1a1662(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x61286
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
testb %dil, %dil
je 0x61287
xorps %xmm0, %xmm0
jmp 0x6128f
retq
movss 0x95e5d(%rip), %xmm0    # 0xf70ec
movss %xmm0, -0x4(%rbp)
pushq $0x73
popq %rdi
callq 0x5707f
movss -0x4(%rbp), %xmm0
callq 0x52673
addq $0x10, %rsp
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_high8_mode(unsigned char)
void set_high8_mode(u08 mode)
{
   if(read_only) return;
   if(luxor) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x75);
      send_single((float) mode);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2bfd63(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x612bd
retq
leaq 0x1c7c7a(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x612bc
leaq 0x1a1600(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x612bc
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x75
popq %rdi
callq 0x5707f
movzbl %bl, %eax
cvtsi2ss %eax, %xmm0
callq 0x52673
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_high6_mode(unsigned char)
void set_high6_mode(u08 mode)
{
   if(read_only) return;
   if(luxor) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x76);
      send_single((float) mode);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2bfd16(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x6130a
retq
leaq 0x1c7c2d(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x61309
leaq 0x1a15b3(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x61309
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x76
popq %rdi
callq 0x5707f
movzbl %bl, %eax
cvtsi2ss %eax, %xmm0
callq 0x52673
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_diff_age(unsigned short)
void set_diff_age(u16 age)
{
   if(read_only) return;
   if(luxor) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x77);
      send_word(age);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2bfcc9(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x61357
retq
leaq 0x1c7be0(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x61356
leaq 0x1a1566(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x61356
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x77
popq %rdi
callq 0x5707f
movzwl %bx, %edi
callq 0x52599
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: send_rt17_start(int, int)
void send_rt17_start(int msg, int len)
{
// flush_rt17_cmd();   // toots - RT17 fix needed
if(debug_file) fprintf(debug_file, "send rt17: %02x  len:%d\n", msg, len);

   send_byte(0x02);
   rt17_tx_cksum = 0;

   send_byte(0x00);   // status
   send_byte(msg);    // msg type
   send_byte(len);    // header len
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
leaq 0x1c6fa6(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x61405
leaq 0xab6b1(%rip), %rsi     # 0x10caaa
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x9560
pushq $0x2
popq %rdi
callq 0x523f2
movb $0x0, 0x2f56ac(%rip)    # 0x356ac0
xorl %edi, %edi
callq 0x523f2
movl $0xff, %r15d
andl %r15d, %r14d
movl %r14d, %edi
callq 0x523f2
andl %r15d, %ebx
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x523f2
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_gnss_system()
void request_gnss_system()
{
   // request the current GNSS system selections
   if(no_poll) return;
   if(luxor) return;

   if(rcvr_type == ESIP_RCVR) {
      send_esip_cmd("PERDAPI,GNSS,QUERY");
   }
   else if(rcvr_type == NVS_RCVR) {
      send_nvs_start(0x0D);  // gnss system info
      send_byte(0x02);
      send_nvs_end();
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(PALISADE) return;
      if(SV6_FAMILY) return;

      if(saw_icm || (res_t == RES_T_360) || ACU_GG || ACU_360) {
         request_rcvr_config(666);
      }
   }
   else if(rcvr_type == UBX_RCVR) {
      request_ubx_msg(UBX_GNSS);
   }
   else if(rcvr_type == VENUS_RCVR) {
      query_venus_msg(QUERY_VENUS_GNSS);
      query_venus_msg(QUERY_VENUS_SBAS);
      query_venus_msg(QUERY_VENUS_QZSS);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2bfb96(%rip), %rax    # 0x321020
leaq 0x1c7aad(%rip), %rcx    # 0x228f3e
movb (%rcx), %cl
orb (%rax), %cl
je 0x6149e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1a142b(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x61537
cmpq $0x4, %rax
je 0x614e4
cmpq $0x80, %rax
je 0x6150f
cmpq $0x800, %rax            # imm = 0x800
je 0x614f4
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, %rax
jne 0x61497
leaq 0xaa380(%rip), %rdi     # 0x10b859
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57791
movl $0x63e, %edi            # imm = 0x63E
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x59749
pushq $0xd
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57171
pushq $0x64
popq %rdi
pushq $0x1a
popq %rsi
callq 0x5da8c
pushq $0x62
popq %rbx
pushq $0x2
popq %rsi
movl %ebx, %edi
callq 0x5da8c
pushq $0x4
popq %rsi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5da8c
leaq 0x1a3a96(%rip), %rax    # 0x204fd4
movl (%rax), %eax
leal -0x33(%rax), %ecx
cmpl $0x1d, %ecx
ja 0x61556
movl $0x20004009, %edx       # imm = 0x20004009
btl %ecx, %edx
jb 0x61497
leaq 0x1c79d0(%rip), %rcx    # 0x228f2d
cmpb $0x0, (%rcx)
jne 0x61585
leaq 0x1a139b(%rip), %rcx    # 0x202904
cmpb $0x4, (%rcx)
je 0x61585
movl %eax, %edx
xorl $0x41, %edx
leaq 0x1a137e(%rip), %rcx    # 0x2028f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
jne 0x61595
movl $0x29a, %edi            # imm = 0x29A
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e18e
cmpl $0x41, %eax
jne 0x61497
cmpl $0x47, %ecx
je 0x61585
cmpl $0x33, %ecx
je 0x61585
jmp 0x61497
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_ubx_amu(float)
void set_ubx_amu(float amu)
{
   if(read_only) return;

   send_ubx_start(UBX_NAVX5, 40);

   send_word(0);      // msg version
   send_word(0x0008); // only update amu mask 
   send_dword(0);
   send_byte(0);      // rsvd
   send_byte(0);      // rsvd
   send_byte(1);      // min sv
   send_byte(16);     // max sv
   send_byte((s08) amu);
   send_byte(0);      // rsvd
   send_byte(0);      // initial fix
   send_byte(0);      // rsvd
   send_byte(0);      // rsvd
   send_byte(0);      // rsvd
   send_word(0);      // rollover week
   send_dword(0);     // rsvd
   send_dword(0);     // rsvd
   send_dword(0);     // rsvd
   send_dword(0);     // rsvd
   send_dword(0);     // rsvd

   send_ubx_end();
}

// Assembly:
leaq 0x2bfa66(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x615ba
retq
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
pushq $0x28
popq %rsi
movl $0x623, %edi            # imm = 0x623
movss %xmm0, -0x4(%rbp)
callq 0x57bf3
xorl %edi, %edi
callq 0x52599
pushq $0x8
popq %rdi
callq 0x52599
xorl %edi, %edi
callq 0x525e2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
pushq $0x1
popq %rdi
callq 0x523f2
pushq $0x10
popq %rdi
callq 0x523f2
cvttss2si -0x4(%rbp), %eax
movzbl %al, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x52599
xorl %edi, %edi
callq 0x525e2
xorl %edi, %edi
callq 0x525e2
xorl %edi, %edi
callq 0x525e2
xorl %edi, %edi
callq 0x525e2
xorl %edi, %edi
callq 0x525e2
addq $0x10, %rsp
popq %rbp
jmp 0x57cca
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rcvr_smoothing(int)
void set_rcvr_smoothing(int val)
{
   if(read_only) return;

   if(rcvr_type == FURUNO_RCVR) {
      if((val >= 1) && (val <= 3)) {
         sprintf(out, "GPset,W%d", val);
         send_furuno_cmd(out);
         send_furuno_cmd("GPsrq");
      }
   }
}

// Assembly:
movl %edi, %edx
leal -0x1(%rdx), %eax
cmpl $0x2, %eax
ja 0x61901
leaq 0x2bf766(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x61901
leaq 0x1a1010(%rip), %rax    # 0x2028d0
cmpq $0x20000000, (%rax)     # imm = 0x20000000
jne 0x61901
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2c494a(%rip), %rbx    # 0x326220
leaq 0xa9631(%rip), %rsi     # 0x10af0e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x578d5
leaq 0xa9123(%rip), %rdi     # 0x10aa19
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x578d5
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_serial_config(unsigned char)
void request_serial_config(u08 port)
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;

   send_tsip_start(0xBC);
   send_byte(port);
   send_tsip_end();
}

// Assembly:
leaq 0x1c7635(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x6194c
leaq 0x2bf70b(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x6194c
leaq 0x1a0faf(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x6194c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0xbc, %edi
callq 0x5707f
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_trimble_protocol(int, int, int, int, int, int)
int set_trimble_protocol(int baud,int data_bits,int parity,int stop_bits, int in_prot,int out_prot)
{
   if(read_only) return 2;
   if(rcvr_type != TSIP_RCVR) return 2;

   // in_prot, out_prot:  2=TSIP  4=NMEA
   in_prot = out_prot = 2;  // !!!! always use TSIP

   if     (baud == 4800)   baud = 6;
   else if(baud == 9600)   baud = 7;
   else if(baud == 19200)  baud = 8;
   else if(baud == 38400)  baud = 9;
   else if(baud == 57600)  baud = 10;
   else if(baud == 115200) baud = 11;
   else return 1;

   data_bits = 3;   // !!!! we always use 8 bits

   if     (parity == ODD_PAR)  parity = 1;
   else if(parity == EVEN_PAR) parity = 2;
   else                        parity = 0;

   if(stop_bits == 2) stop_bits = 1;
   else               stop_bits = 0;

   send_tsip_start(0xBC);
   send_byte(0xFF);       // current com port (0=main com)
   send_byte(baud);       // 9600 baud
   send_byte(baud);       // 9600 baud
   send_byte(3);          // 8-bit
   send_byte(parity);     // no parity
   send_byte(stop_bits);  // 1 stop bit
   send_byte(0);          // rsvd (flow control)
   send_byte(in_prot);    // 2=tsip 4=nmea
   send_byte(out_prot);   // 
   send_byte(0);          // rsvd
   send_tsip_end();

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2bf6bc(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
pushq $0x2
popq %rbx
jne 0x61a53
leaq 0x1a0f5f(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x61a53
cmpl $0x12c0, %edi           # imm = 0x12C0
je 0x619cc
cmpl $0x1c200, %edi          # imm = 0x1C200
je 0x619c7
cmpl $0x4b00, %edi           # imm = 0x4B00
je 0x619b0
cmpl $0x9600, %edi           # imm = 0x9600
je 0x619ba
cmpl $0xe100, %edi           # imm = 0xE100
je 0x619b5
cmpl $0x2580, %edi           # imm = 0x2580
jne 0x619bf
movb $0x7, %r14b
jmp 0x619cf
movb $0x8, %r14b
jmp 0x619cf
movb $0xa, %r14b
jmp 0x619cf
movb $0x9, %r14b
jmp 0x619cf
pushq $0x1
popq %rbx
jmp 0x61a53
movb $0xb, %r14b
jmp 0x619cf
movb $0x6, %r14b
cmpl $0x2, %edx
sete %al
addb %al, %al
cmpl $0x1, %edx
movzbl %al, %r15d
cmovel %edx, %r15d
xorl %ebx, %ebx
cmpl $0x2, %ecx
sete %bl
movl $0xbc, %edi
callq 0x5707f
movl $0xff, %edi
callq 0x523f2
movzbl %r14b, %r14d
movl %r14d, %edi
callq 0x523f2
movl %r14d, %edi
callq 0x523f2
pushq $0x3
popq %rdi
callq 0x523f2
movzbl %r15b, %edi
callq 0x523f2
movl %ebx, %edi
callq 0x523f2
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x523f2
pushq $0x2
popq %r14
movl %r14d, %edi
callq 0x523f2
movl %r14d, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
callq 0x570f8
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_datum()
void request_datum()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == FURUNO_RCVR) {
//      send_furuno_cmd("GPsrq");  // we get this from request_rcvr_config()
   }
   else if(rcvr_type == MOTO_RCVR) {
      send_moto_start("Ao");
      send_byte(0xFF);
      send_moto_end();
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(SV6_FAMILY && !ACU_GG && !ACU_360) return;
      send_tsip_start(0x8E);
      send_byte(0x15);
      send_tsip_end();
   }
   else if(rcvr_type == UBX_RCVR) {
      request_ubx_msg(UBX_DATUM);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1c74cd(%rip), %rax    # 0x228f3e
leaq 0x2bf5a8(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
setne %cl
leaq 0x1a0e4a(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x20000000, %rax       # imm = 0x20000000
sete %dl
orb %cl, %dl
je 0x61a98
popq %rbp
retq
cmpq $0x1, %rax
je 0x61ad1
cmpq $0x4, %rax
je 0x61ac6
cmpq $0x20, %rax
jne 0x61a96
leaq 0xa9467(%rip), %rdi     # 0x10af18
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
popq %rbp
jmp 0x59aab
movl $0x606, %edi            # imm = 0x606
popq %rbp
jmp 0x59749
leaq 0x1a34fc(%rip), %rax    # 0x204fd4
movl (%rax), %eax
leal -0x33(%rax), %ecx
cmpl $0x1d, %ecx
ja 0x61b03
movl $0x20004009, %edx       # imm = 0x20004009
btl %ecx, %edx
jae 0x61b03
movl %eax, %edx
xorl $0x41, %edx
leaq 0x1a0e00(%rip), %rcx    # 0x2028f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
jne 0x61b1b
movl $0x8e, %edi
callq 0x5707f
pushq $0x15
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
cmpl $0x41, %eax
jne 0x61a96
cmpl $0x47, %ecx
je 0x61b03
cmpl $0x33, %ecx
je 0x61b03
jmp 0x61a96
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: revert_segment(unsigned char)
void revert_segment(u08 segment)
{
   if(read_only) return;
   if(luxor) return;
   if(rcvr_type != TSIP_RCVR) return;

   send_tsip_start(0x8E);
   send_byte(0x45);
   send_byte(segment);
   send_tsip_end();
}

// Assembly:
leaq 0x2bf4e0(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x61b85
leaq 0x1c73f8(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x61b85
leaq 0x1a0d7e(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x61b85
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x8e, %edi
callq 0x5707f
pushq $0x45
popq %rdi
callq 0x523f2
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_osc_sense()
void request_osc_sense()
{
   if(luxor) return;
   if(no_poll) return;
   if(res_t) 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;

   send_tsip_start(0x8E);  // not available on ThunderBolt-E or early ThunderBolts
   send_byte(0xA1);
   send_tsip_end();
}

// Assembly:
leaq 0x1c73b1(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x61bd2
leaq 0x2bf487(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x61bd2
leaq 0x1a0d5f(%rip), %rax    # 0x202904
cmpb $0x0, (%rax)
jne 0x61bd2
leaq 0x1a0d1f(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x61bd2
leaq 0x1a3416(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x61bd3
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x61bd3
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5707f
movl $0xa1, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_ubx_tp5(int)
void request_ubx_tp5(int chan)
{
   if(no_poll) return;

   send_ubx_start(UBX_TP5, 1);
   send_byte(chan);
   send_ubx_end();
}

// Assembly:
leaq 0x2bf1b7(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x61e6f
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x1
popq %rsi
movl $0x631, %edi            # imm = 0x631
callq 0x57bf3
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57cca
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rftg_cable(double)
void set_rftg_cable(double delay)
{
   if(read_only) return;

   delay *= 1.0E9;
   delay *= VELOCITY_FACTOR;  // assumed velocity factor

   start_rftg_request(1);

   send_rftg_start(0x35);
   send_byte(1);   // 1=set?
   send_single((float) delay);
   send_rftg_end();
   set_rftg_normal();
}

// Assembly:
leaq 0x2be5a1(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x62a7f
retq
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
mulsd 0x90599(%rip), %xmm0    # 0xf3028
mulsd 0x92f59(%rip), %xmm0    # 0xf59f0
movsd %xmm0, -0x8(%rbp)
pushq $0x35
popq %rdi
callq 0x5707f
pushq $0x1
popq %rdi
callq 0x523f2
cvtsd2ss -0x8(%rbp), %xmm0
callq 0x52673
callq 0x570f8
addq $0x10, %rsp
popq %rbp
jmp 0x5d4f6
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rftg_offset(double)
void set_rftg_offset(double val)
{
   // pps offset - in nanoseconds
   if(read_only) return;

   val = (val / 1000.0);   // convert nanoseconds to microseconds
   if(val >= 0.0) set_rftg_advance((float) val);
   else           set_rftg_delay((float) (0.0-val));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2be54a(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x62ad7
popq %rbp
retq
divsd 0x90559(%rip), %xmm0    # 0xf3038
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jae 0x62af7
subsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
popq %rbp
jmp 0x7c9d0
cvtsd2ss %xmm0, %xmm0
popq %rbp
jmp 0x7c98b
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_creg(int)
void set_x72_creg(int val)
{
   // set the X72 control reg value
   if(read_only) return;


   val &= 0xFFFF;
   sprintf(out, "q%04X", val);
   queue_x72_cmd(out, X72_SET_CREG_MSG);
}

// Assembly:
leaq 0x2be351(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x62ccf
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movzwl %di, %edx
leaq 0x2c3541(%rip), %rbx    # 0x326220
leaq 0xab194(%rip), %rsi     # 0x10de7a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x2c6, %esi            # imm = 0x2C6
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_pps_source(int)
void set_pps_source(int source)
{
   if(read_only) return;

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

// Assembly:
leaq 0x2be0f4(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x62f6f
leaq 0x19f99e(%rip), %rax    # 0x2028d0
movabsq $0x400000000, %rcx      # imm = 0x400000000
cmpq %rcx, (%rax)
jne 0x62f6f
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2c32d0(%rip), %rbx    # 0x326220
leaq 0xa8196(%rip), %rsi     # 0x10b0ed
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57a21
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_time_code(char)
void set_time_code(char mode)
{
   // set time code output format
   if(read_only) return;

   if(rcvr_type == BRANDY_RCVR) {
      if(mode == 'D') {  // enable digital time code
         sprintf(out, "$PRCCG,E,X,1,X,X");
      }
      else {
         sprintf(out, "$PRCCG,E,%c,X,X,X", mode);
      }
      queue_brandy_cmd(out, BRANDY_CODE_MSG);
   }
   else if(rcvr_type == TM4_RCVR) {
      if     (mode == '0') send_tm4_cmd("#16,0"); // IRIG
      else if(mode == '1') send_tm4_cmd("#16,1"); // NASA36
   }
}

// Assembly:
leaq 0x2be0a3(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x62f7d
retq
leaq 0x19f94c(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x400000000, %rcx      # imm = 0x400000000
cmpq %rcx, %rax
je 0x62fbf
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x62f7c
pushq %rbp
movq %rsp, %rbp
cmpb $0x44, %dil
jne 0x62fd9
movups 0xa8145(%rip), %xmm0    # 0x10b0f4
leaq 0x2c326a(%rip), %rax    # 0x326220
movaps %xmm0, (%rax)
movb $0x0, 0x10(%rax)
jmp 0x62ff2
movsbl %dil, %eax
cmpl $0x31, %eax
je 0x63004
cmpl $0x30, %eax
jne 0x62f7c
leaq 0xa8143(%rip), %rdi     # 0x10b117
jmp 0x57a21
movsbl %dil, %edx
leaq 0x2c323c(%rip), %rdi    # 0x326220
leaq 0xa811a(%rip), %rsi     # 0x10b105
xorl %eax, %eax
callq 0x9060
leaq 0x2c3227(%rip), %rdi    # 0x326220
movl $0x192, %esi            # imm = 0x192
popq %rbp
jmp 0x576d4
leaq 0xa8112(%rip), %rdi     # 0x10b11d
jmp 0x57a21
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_timeport_format(int)
void set_timeport_format(int format)
{
   if(read_only) return;

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

// Assembly:
leaq 0x2be003(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x63060
leaq 0x19f8ad(%rip), %rax    # 0x2028d0
movabsq $0x400000000, %rcx      # imm = 0x400000000
cmpq %rcx, (%rax)
jne 0x63060
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2c31df(%rip), %rbx    # 0x326220
leaq 0xa80db(%rip), %rsi     # 0x10b123
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57a21
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_pps_mode()
void request_pps_mode()
{
   if(read_only) return;    // !!!Resolution-T, RES360 only
   if(no_poll) return;
   if(luxor) return;
   if(saw_ntpx) return;

   if(rcvr_type == BRANDY_RCVR) {
      queue_brandy_cmd("c", BRANDY_PULSE_MSG);
      queue_brandy_cmd("e", BRANDY_CODE_MSG);
   }
   else if(rcvr_type == FURUNO_RCVR) {
   }
   else if(rcvr_type == MOTO_RCVR) {
      send_moto_start("Gc");
      send_byte(0xFF);
      send_moto_end();

      send_moto_start("AP");   // get pps rate
      send_byte(0xFF);
      send_moto_end();
   }
   else 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);
      send_byte(0x4E);
      send_tsip_end();
   }
   else if(rcvr_type == UBX_RCVR) {
      if(saw_ubx_tp5) request_ubx_tp5(0);
      else            request_ubx_msg(UBX_PPS);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2bdfae(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x6315a
leaq 0x2bdfa4(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x6315a
leaq 0x1c5eb2(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x6315a
leaq 0x1c5ea0(%rip), %rax    # 0x228f3c
cmpb $0x0, (%rax)
jne 0x6315a
leaq 0x19f824(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x6313f
cmpq $0x4, %rax
je 0x630f4
cmpq $0x20, %rax
je 0x63108
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x6315a
leaq 0xb494f(%rip), %rdi     # 0x117a27
movl $0x191, %esi            # imm = 0x191
callq 0x576d4
leaq 0x97bec(%rip), %rdi     # 0xfacd5
movl $0x192, %esi            # imm = 0x192
popq %rbp
jmp 0x576d4
leaq 0x294331(%rip), %rax    # 0x2f742c
cmpl $0x0, (%rax)
je 0x6315c
xorl %edi, %edi
popq %rbp
jmp 0x61e62
leaq 0xa7e12(%rip), %rdi     # 0x10af21
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
callq 0x59aab
leaq 0x91b23(%rip), %rdi     # 0xf4c4d
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
popq %rbp
jmp 0x59aab
leaq 0x1a1e8e(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x63167
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jae 0x63167
popq %rbp
retq
movl $0x607, %edi            # imm = 0x607
popq %rbp
jmp 0x59749
movl $0x8e, %edi
callq 0x5707f
pushq $0x4e
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_pps_width()
void request_pps_width()
{
   if(read_only) return;    // !!!Which receivers can do this?
   if(no_poll) return;
   if(luxor) return;

   if(rcvr_type == BRANDY_RCVR) {
      queue_brandy_cmd("c", BRANDY_PULSE_MSG);
      queue_brandy_cmd("e", BRANDY_CODE_MSG);
   }
   else if(rcvr_type == NVS_RCVR) {
      send_nvs_start(0xD7);
      send_byte(0x05);
      send_nvs_end();
   }
   else 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);
      send_byte(0x4F);
      send_tsip_end();
   }
   else if(rcvr_type == UBX_RCVR) {
      if(saw_ubx_tp5) request_ubx_tp5(0);
      else            request_ubx_msg(UBX_PPS);
   }
   else if(rcvr_type == ZYFER_RCVR) {
      send_zyfer_cmd("$PULW");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2bde90(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x63258
leaq 0x2bde86(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x63258
leaq 0x1c5d94(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x63258
leaq 0x19f716(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x6323d
cmpq $0x4, %rax
je 0x63204
cmpq $0x800, %rax            # imm = 0x800
je 0x63225
cmpq $0x100000, %rax         # imm = 0x100000
je 0x63218
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x63258
leaq 0xb483f(%rip), %rdi     # 0x117a27
movl $0x191, %esi            # imm = 0x191
callq 0x576d4
leaq 0x97adc(%rip), %rdi     # 0xfacd5
movl $0x192, %esi            # imm = 0x192
popq %rbp
jmp 0x576d4
leaq 0x294221(%rip), %rax    # 0x2f742c
cmpl $0x0, (%rax)
je 0x6325a
xorl %edi, %edi
popq %rbp
jmp 0x61e62
leaq 0xa7f0c(%rip), %rdi     # 0x10b12b
popq %rbp
jmp 0x579af
movl $0xd7, %edi
callq 0x5707f
pushq $0x5
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x57171
leaq 0x1a1d90(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x63265
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jae 0x63265
popq %rbp
retq
movl $0x607, %edi            # imm = 0x607
popq %rbp
jmp 0x59749
movl $0x8e, %edi
callq 0x5707f
pushq $0x4f
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: x72_fw_discipline()
int x72_fw_discipline()
{
   // returns true if the X72 supports firmware PPS disciplining
   if(rcvr_type != X72_RCVR) return 0;

   if(1 && have_x72_fw_dis) {  // use "j" command results to determine capability
      if(x72_type == X72_TYPE)  return 72;
      if(x72_type == X99_TYPE)  return 99;   // !!!!! what X99 firmware supports pps disciplining?
      if(x72_type == SA22_TYPE) return 22;
      return 1;
   }

   if(1 && have_x72_type) {  // use firmware rev to determine capability
      if((x72_type == X72_TYPE) && (x72_fw >= 5.02)) return -72;
      if((x72_type == X99_TYPE) && (x72_fw >= 5.02)) return -99;   // !!!!! what X99 firmware supports pps disciplining?
      if((x72_type == SA22_TYPE) && (x72_fw >= 6.05)) return -22;
   }

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x19ee7c(%rip), %rcx    # 0x2028d0
xorl %eax, %eax
cmpq $0x2000000, (%rcx)      # imm = 0x2000000
jne 0x63ac0
leaq 0x1a12ae(%rip), %rcx    # 0x204d14
cmpl $0x0, (%rcx)
je 0x63a86
leaq 0x1a12ce(%rip), %rax    # 0x204d40
movl (%rax), %eax
cmpq $0x4, %rax
jae 0x63abb
leaq 0xa4fcf(%rip), %rcx     # 0x108a50
movl (%rcx,%rax,4), %eax
jmp 0x63ac0
leaq 0x1a1253(%rip), %rcx    # 0x204ce0
cmpl $0x0, (%rcx)
je 0x63ac0
leaq 0x1a12a7(%rip), %rcx    # 0x204d40
movl (%rcx), %ecx
leaq 0x1a1306(%rip), %rdx    # 0x204da8
movsd (%rdx), %xmm0
testl %ecx, %ecx
jne 0x63ac2
ucomisd 0xa47a6(%rip), %xmm0    # 0x108258
jb 0x63ac2
movl $0xffffffb8, %eax       # imm = 0xFFFFFFB8
jmp 0x63ac0
movl $0x1, %eax
popq %rbp
retq
cmpl $0x3, %ecx
jne 0x63ad8
ucomisd 0xa4789(%rip), %xmm0    # 0x108258
jb 0x63ad8
movl $0xffffff9d, %eax       # imm = 0xFFFFFF9D
jmp 0x63ac0
cmpl $0x1, %ecx
jne 0x63ac0
ucomisd 0xa477b(%rip), %xmm0    # 0x108260
jb 0x63ac0
movl $0xffffffea, %eax       # imm = 0xFFFFFFEA
jmp 0x63ac0
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: save_prs_param(char*)
void save_prs_param(char *s)
{
   if(s == 0) return;
   if(!strcmp(s, "AL")) {
      queue_prs_cmd("LM!", SCPI_USER_MSG);  // in verbose mode, these return an OK response
      queue_prs_cmd("FC!", SCPI_USER_MSG);  // ... so no need for -SCPI_USER_MSG
      queue_prs_cmd("GA!", SCPI_USER_MSG);
      queue_prs_cmd("SP!", SCPI_USER_MSG);
      queue_prs_cmd("MO!", SCPI_USER_MSG);
      queue_prs_cmd("TO!", SCPI_USER_MSG);
      queue_prs_cmd("PL!", SCPI_USER_MSG);
      queue_prs_cmd("PF!", SCPI_USER_MSG);
      queue_prs_cmd("PT!", SCPI_USER_MSG);
   }
   else {
      strcpy(out, s);
      strcat(out, "!");
      queue_prs_cmd(out, SCPI_USER_MSG);
   }
}

// Assembly:
testq %rdi, %rdi
je 0x63b51
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rsi
cmpb $0x41, (%rdi)
jne 0x63b23
cmpb $0x4c, 0x1(%rsi)
jne 0x63b23
cmpb $0x0, 0x2(%rsi)
je 0x63b52
leaq 0x2c26f6(%rip), %rbx    # 0x326220
movq %rbx, %rdi
callq 0x9330
movq %rbx, %rdi
callq 0x9120
movw $0x21, (%rbx,%rax)
pushq $0x25
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
retq
leaq 0xa770f(%rip), %rdi     # 0x10b268
pushq $0x25
popq %rbx
movl %ebx, %esi
callq 0x576d4
leaq 0xa7702(%rip), %rdi     # 0x10b26c
movl %ebx, %esi
callq 0x576d4
leaq 0xa76f8(%rip), %rdi     # 0x10b270
movl %ebx, %esi
callq 0x576d4
leaq 0xa76ee(%rip), %rdi     # 0x10b274
movl %ebx, %esi
callq 0x576d4
leaq 0xa76e4(%rip), %rdi     # 0x10b278
movl %ebx, %esi
callq 0x576d4
leaq 0xa76da(%rip), %rdi     # 0x10b27c
movl %ebx, %esi
callq 0x576d4
leaq 0xa76d0(%rip), %rdi     # 0x10b280
movl %ebx, %esi
callq 0x576d4
leaq 0xa76c6(%rip), %rdi     # 0x10b284
movl %ebx, %esi
callq 0x576d4
leaq 0xa76bc(%rip), %rbx     # 0x10b288
jmp 0x63b40
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: rftg_clear_errlog()
void rftg_clear_errlog()
{
   if(read_only) return;

   start_rftg_request2(0);

   send_rftg_start(0x37);  // clear error history from eeprom
   send_byte(1); 
   send_rftg_end();

   set_rftg_normal();
}

// Assembly:
leaq 0x2bd41a(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x63c06
retq
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x5d465
pushq $0x37
popq %rdi
callq 0x5707f
pushq $0x1
popq %rdi
callq 0x523f2
callq 0x570f8
popq %rbp
jmp 0x5d4f6
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_dac_voltage()
void request_dac_voltage()
{
   if(luxor) return;
   if(no_poll) return;
   if(res_t) 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;

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

// Assembly:
leaq 0x1c530b(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x63c78
leaq 0x2bd3e1(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x63c78
leaq 0x19ecb9(%rip), %rax    # 0x202904
cmpb $0x0, (%rax)
jne 0x63c78
leaq 0x19ec79(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x63c78
leaq 0x1a1370(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x63c79
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x63c79
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5707f
movl $0xa0, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_dac_value(unsigned int)
void set_dac_value(u32 value)
{
   if(read_only) return;
   if(luxor) 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;

   send_tsip_start(0x8E);
   send_byte(0xA0);
   send_byte(0x01);
   send_dword(value);
   send_tsip_end();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2bd1b4(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x63ea1
leaq 0x1c50cc(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x63ea1
leaq 0x19ea52(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x63ea1
movl %edi, %ebx
leaq 0x1a1147(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x63ea8
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x63ea8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x8e, %edi
callq 0x5707f
movl $0xa0, %edi
callq 0x523f2
pushq $0x1
popq %rdi
callq 0x523f2
movl %ebx, %edi
callq 0x525e2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_osc_sense(unsigned char, int)
void set_osc_sense(u08 mode, int save)
{
   if(read_only) return;
   if(luxor) 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;

   send_tsip_start(0x8E);  // not available on ThunderBolt-E or early ThunderBolts
   send_byte(0xA1);
   send_byte(mode);
   send_tsip_end();

   if(save) save_segment(6, 24);       // save timing config in EEPROM
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2bd136(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x63f22
leaq 0x1c504e(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x63f22
leaq 0x19e9d4(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x63f22
movl %esi, %ebx
movl %edi, %r14d
leaq 0x1a10c6(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x63f27
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x63f27
popq %rbx
popq %r14
popq %rbp
retq
movl $0x8e, %edi
callq 0x5707f
movl $0xa1, %edi
callq 0x523f2
movzbl %r14b, %edi
callq 0x523f2
callq 0x570f8
testl %ebx, %ebx
je 0x63f22
pushq $0x6
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x6166c
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_traim_info()
void request_traim_info()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == FURUNO_RCVR) {
      send_furuno_cmd("GPrrq");   // get traim settings
      send_furuno_cmd("GPint,rrm00");  // get pps info
   }
   else if(rcvr_type == MOTO_RCVR) {
      send_moto_start("Ge");  // 12 chan traim data
      send_byte(0xFF);
      send_moto_end();
      send_moto_start("Gf");  // 12 chan traim data
      send_word(0xFFFF);
      send_moto_end();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1c4fda(%rip), %rax    # 0x228f3e
leaq 0x2bd0b5(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
jne 0x63fa2
leaq 0x19e958(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x20, %rax
je 0x63fa4
cmpq $0x20000000, %rax       # imm = 0x20000000
jne 0x63fa2
leaq 0xa6d70(%rip), %rdi     # 0x10ad00
callq 0x578d5
leaq 0xa7354(%rip), %rdi     # 0x10b2f0
popq %rbp
jmp 0x578d5
popq %rbp
retq
leaq 0xa7351(%rip), %rdi     # 0x10b2fc
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
callq 0x59aab
leaq 0xa7339(%rip), %rdi     # 0x10b2ff
callq 0x59a28
movl $0xffff, %edi           # imm = 0xFFFF
callq 0x52599
popq %rbp
jmp 0x59aab