LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cc7c8(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
movl $0x2, %ebx
jne 0x6a958
leaq 0x1ae069(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6a958
movl $0x1, %ebx
cmpl $0x95ff, %edi           # imm = 0x95FF
jg 0x6a89f
cmpl $0x12c0, %edi           # imm = 0x12C0
je 0x6a8c0
cmpl $0x2580, %edi           # imm = 0x2580
je 0x6a8ca
cmpl $0x4b00, %edi           # imm = 0x4B00
jne 0x6a958
movb $0x8, %r14b
jmp 0x6a8d2
cmpl $0x9600, %edi           # imm = 0x9600
je 0x6a8c5
cmpl $0xe100, %edi           # imm = 0xE100
je 0x6a8cf
cmpl $0x1c200, %edi          # imm = 0x1C200
jne 0x6a958
movb $0xb, %r14b
jmp 0x6a8d2
movb $0x6, %r14b
jmp 0x6a8d2
movb $0x9, %r14b
jmp 0x6a8d2
movb $0x7, %r14b
jmp 0x6a8d2
movb $0xa, %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 0x5e6be
movl $0xff, %edi
callq 0x590f7
movzbl %r14b, %r14d
movl %r14d, %edi
callq 0x590f7
movl %r14d, %edi
callq 0x590f7
movl $0x3, %edi
callq 0x590f7
movzbl %r15b, %edi
callq 0x590f7
movl %ebx, %edi
callq 0x590f7
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x590f7
movl $0x2, %edi
callq 0x590f7
movl $0x2, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x590f7
callq 0x5e73c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: 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 0x1d45c8(%rip), %rax    # 0x23ef3e
leaq 0x2cc6a3(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
setne %cl
leaq 0x1adf45(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x20000000, %rax       # imm = 0x20000000
sete %dl
orb %cl, %dl
je 0x6a99d
popq %rbp
retq
cmpq $0x1, %rax
je 0x6a9dd
cmpq $0x4, %rax
je 0x6a9cb
cmpq $0x20, %rax
jne 0x6a99b
leaq 0xb661a(%rip), %rdi     # 0x120fd0
callq 0x6160d
movl $0xff, %edi
callq 0x590f7
popq %rbp
jmp 0x61688
movl $0x606, %edi            # imm = 0x606
xorl %esi, %esi
callq 0x5f37d
popq %rbp
jmp 0x5f456
leaq 0x1b05f0(%rip), %rax    # 0x21afd4
movl (%rax), %eax
leal -0x33(%rax), %ecx
cmpl $0x1d, %ecx
ja 0x6aa0f
movl $0x20004009, %edx       # imm = 0x20004009
btl %ecx, %edx
jae 0x6aa0f
movl %eax, %edx
xorl $0x41, %edx
leaq 0x1adef4(%rip), %rcx    # 0x2188f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
jne 0x6aa29
movl $0x8e, %edi
callq 0x5e6be
movl $0x15, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
cmpl $0x41, %eax
jne 0x6a99b
cmpl $0x47, %ecx
je 0x6aa0f
cmpl $0x33, %ecx
je 0x6aa0f
jmp 0x6a99b
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cc5d2(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6aa95
leaq 0x1d44ea(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6aa95
leaq 0x1ade70(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6aa95
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x8e, %edi
callq 0x5e6be
movl $0x45, %edi
callq 0x590f7
movzbl %bl, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1d44a1(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6aae2
leaq 0x2cc577(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x6aae2
leaq 0x1ade4f(%rip), %rax    # 0x218904
cmpb $0x0, (%rax)
jne 0x6aae2
leaq 0x1ade0f(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6aae2
leaq 0x1b0506(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6aae3
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x6aae3
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e6be
movl $0xa1, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cc278(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
je 0x6adae
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x631, %edi            # imm = 0x631
movl $0x1, %esi
callq 0x5f37d
movzbl %bl, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5f456
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cb515(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6bb0b
retq
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
mulsd 0x9d50d(%rip), %xmm0    # 0x109028
mulsd 0x9fe55(%rip), %xmm0    # 0x10b978
movsd %xmm0, -0x8(%rbp)
movl $0x35, %edi
callq 0x5e6be
movl $0x1, %edi
callq 0x590f7
xorps %xmm0, %xmm0
cvtsd2ss -0x8(%rbp), %xmm0
callq 0x59376
callq 0x5e73c
xorl %edi, %edi
callq 0x65779
movl $0x45, %edi
callq 0x5e6be
addq $0x10, %rsp
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cb4a6(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6bb7b
popq %rbp
retq
divsd 0x9d4b5(%rip), %xmm0    # 0x109038
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jae 0x6bb9e
subsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
popq %rbp
jmp 0x89178
cvtsd2ss %xmm0, %xmm0
popq %rbp
jmp 0x8912f
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cb24d(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6bdd3
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movzwl %di, %edx
leaq 0x2d043d(%rip), %rbx    # 0x33c220
leaq 0xb8148(%rip), %rsi     # 0x123f32
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x2c6, %esi            # imm = 0x2C6
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5edda
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cafec(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6c077
leaq 0x1ac896(%rip), %rax    # 0x2188d0
movabsq $0x400000000, %rcx      # imm = 0x400000000
cmpq %rcx, (%rax)
jne 0x6c077
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2d01c8(%rip), %rbx    # 0x33c220
leaq 0xb5146(%rip), %rsi     # 0x1211a5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5f170
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2caf9b(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6c085
retq
leaq 0x1ac844(%rip), %rax    # 0x2188d0
movq (%rax), %rax
movabsq $0x400000000, %rcx      # imm = 0x400000000
cmpq %rcx, %rax
je 0x6c0c7
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x6c084
pushq %rbp
movq %rsp, %rbp
cmpb $0x44, %dil
jne 0x6c0e1
movups 0xb50f5(%rip), %xmm0    # 0x1211ac
leaq 0x2d0162(%rip), %rax    # 0x33c220
movaps %xmm0, (%rax)
movb $0x0, 0x10(%rax)
jmp 0x6c0fa
movsbl %dil, %eax
cmpl $0x31, %eax
je 0x6c10c
cmpl $0x30, %eax
jne 0x6c084
leaq 0xb50f3(%rip), %rdi     # 0x1211cf
jmp 0x5f170
movsbl %dil, %edx
leaq 0x2d0134(%rip), %rdi    # 0x33c220
leaq 0xb50ca(%rip), %rsi     # 0x1211bd
xorl %eax, %eax
callq 0x9060
leaq 0x2d011f(%rip), %rdi    # 0x33c220
movl $0x192, %esi            # imm = 0x192
popq %rbp
jmp 0x5edda
leaq 0xb50c2(%rip), %rdi     # 0x1211d5
jmp 0x5f170
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2caefb(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6c168
leaq 0x1ac7a5(%rip), %rax    # 0x2188d0
movabsq $0x400000000, %rcx      # imm = 0x400000000
cmpq %rcx, (%rax)
jne 0x6c168
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2d00d7(%rip), %rbx    # 0x33c220
leaq 0xb508b(%rip), %rsi     # 0x1211db
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5f170
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2caea6(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6c22d
leaq 0x2cae9c(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x6c22d
leaq 0x1d2daa(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6c22d
leaq 0x1d2d98(%rip), %rax    # 0x23ef3c
cmpb $0x0, (%rax)
jne 0x6c22d
leaq 0x1ac71c(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x1f, %rax
jg 0x6c1e1
cmpq $0x1, %rax
je 0x6c212
cmpq $0x4, %rax
jne 0x6c22d
leaq 0x2a125c(%rip), %rax    # 0x30d42c
cmpl $0x0, (%rax)
je 0x6c266
xorl %edi, %edi
popq %rbp
jmp 0x6ada1
cmpq $0x20, %rax
je 0x6c22f
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x6c22d
leaq 0xc1911(%rip), %rdi     # 0x12db07
movl $0x191, %esi            # imm = 0x191
callq 0x5edda
leaq 0xa4a4e(%rip), %rdi     # 0x110c55
movl $0x192, %esi            # imm = 0x192
popq %rbp
jmp 0x5edda
leaq 0x1aedbb(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6c278
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jae 0x6c278
popq %rbp
retq
leaq 0xb4da3(%rip), %rdi     # 0x120fd9
callq 0x6160d
movl $0xff, %edi
callq 0x590f7
callq 0x61688
leaq 0x9e981(%rip), %rdi     # 0x10abd2
callq 0x6160d
movl $0xff, %edi
callq 0x590f7
popq %rbp
jmp 0x61688
movl $0x607, %edi            # imm = 0x607
xorl %esi, %esi
callq 0x5f37d
popq %rbp
jmp 0x5f456
movl $0x8e, %edi
callq 0x5e6be
movl $0x4e, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2cad7d(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6c379
leaq 0x2cad73(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x6c379
leaq 0x1d2c81(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6c379
leaq 0x1ac603(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x7ff, %rax            # imm = 0x7FF
jle 0x6c317
cmpq $0x800, %rax            # imm = 0x800
je 0x6c337
cmpq $0x100000, %rax         # imm = 0x100000
je 0x6c351
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x6c379
leaq 0xc180c(%rip), %rdi     # 0x12db07
movl $0x191, %esi            # imm = 0x191
callq 0x5edda
leaq 0xa4949(%rip), %rdi     # 0x110c55
movl $0x192, %esi            # imm = 0x192
popq %rbp
jmp 0x5edda
cmpq $0x1, %rax
je 0x6c35e
cmpq $0x4, %rax
jne 0x6c379
leaq 0x2a1102(%rip), %rax    # 0x30d42c
cmpl $0x0, (%rax)
je 0x6c37b
xorl %edi, %edi
popq %rbp
jmp 0x6ada1
movl $0xd7, %edi
callq 0x5e6be
movl $0x5, %edi
callq 0x590f7
popq %rbp
jmp 0x5e7c0
leaq 0xb4e8b(%rip), %rdi     # 0x1211e3
popq %rbp
jmp 0x5f0e5
leaq 0x1aec6f(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6c38d
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jae 0x6c38d
popq %rbp
retq
movl $0x607, %edi            # imm = 0x607
xorl %esi, %esi
callq 0x5f37d
popq %rbp
jmp 0x5f456
movl $0x8e, %edi
callq 0x5e6be
movl $0x4f, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1abce1(%rip), %rcx    # 0x2188d0
xorl %eax, %eax
cmpq $0x2000000, (%rcx)      # imm = 0x2000000
jne 0x6cc87
leaq 0x1ae10f(%rip), %rax    # 0x21ad14
cmpl $0x0, (%rax)
je 0x6cc2a
leaq 0x1ae12f(%rip), %rax    # 0x21ad40
movl (%rax), %ecx
movl $0x1, %eax
cmpq $0x4, %rcx
jae 0x6cc87
leaq 0xb1ecb(%rip), %rax     # 0x11eaf0
movl (%rax,%rcx,4), %eax
jmp 0x6cc87
leaq 0x1ae0af(%rip), %rax    # 0x21ace0
cmpl $0x0, (%rax)
je 0x6cc85
leaq 0x1ae103(%rip), %rax    # 0x21ad40
movl (%rax), %ecx
leaq 0x1ae162(%rip), %rax    # 0x21ada8
movsd (%rax), %xmm0
testl %ecx, %ecx
jne 0x6cc5d
movl $0xffffffb8, %eax       # imm = 0xFFFFFFB8
ucomisd 0xb1585(%rip), %xmm0    # 0x11e1e0
jae 0x6cc87
cmpl $0x3, %ecx
jne 0x6cc71
movl $0xffffff9d, %eax       # imm = 0xFFFFFF9D
ucomisd 0xb1571(%rip), %xmm0    # 0x11e1e0
jae 0x6cc87
cmpl $0x1, %ecx
jne 0x6cc85
movl $0xffffffea, %eax       # imm = 0xFFFFFFEA
ucomisd 0xb1565(%rip), %xmm0    # 0x11e1e8
jae 0x6cc87
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6ccee
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rsi
cmpb $0x41, (%rdi)
jne 0x6ccbe
cmpb $0x4c, 0x1(%rsi)
jne 0x6ccbe
cmpb $0x0, 0x2(%rsi)
je 0x6ccef
leaq 0x2cf55b(%rip), %rbx    # 0x33c220
movq %rbx, %rdi
callq 0x9340
movq %rbx, %rdi
callq 0x9120
movw $0x21, (%rbx,%rax)
movq %rbx, %rdi
movl $0x25, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5edda
retq
leaq 0xb462a(%rip), %rdi     # 0x121320
movl $0x25, %esi
callq 0x5edda
leaq 0xb461d(%rip), %rdi     # 0x121324
movl $0x25, %esi
callq 0x5edda
leaq 0xb4610(%rip), %rdi     # 0x121328
movl $0x25, %esi
callq 0x5edda
leaq 0xb4603(%rip), %rdi     # 0x12132c
movl $0x25, %esi
callq 0x5edda
leaq 0xb45f6(%rip), %rdi     # 0x121330
movl $0x25, %esi
callq 0x5edda
leaq 0xb45e9(%rip), %rdi     # 0x121334
movl $0x25, %esi
callq 0x5edda
leaq 0xb45dc(%rip), %rdi     # 0x121338
movl $0x25, %esi
callq 0x5edda
leaq 0xb45cf(%rip), %rdi     # 0x12133c
movl $0x25, %esi
callq 0x5edda
leaq 0xb45c2(%rip), %rbx     # 0x121340
jmp 0x6ccdb
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2ca268(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6cdb8
retq
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x657ff
movl $0x37, %edi
callq 0x5e6be
movl $0x1, %edi
callq 0x590f7
callq 0x5e73c
xorl %edi, %edi
callq 0x65779
movl $0x45, %edi
callq 0x5e6be
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_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 0x1d2144(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6ce3f
leaq 0x2ca21a(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x6ce3f
leaq 0x1abaf2(%rip), %rax    # 0x218904
cmpb $0x0, (%rax)
jne 0x6ce3f
leaq 0x1abab2(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6ce3f
leaq 0x1ae1a9(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6ce40
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x6ce40
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e6be
movl $0xa0, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2c9fc2(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6d093
leaq 0x1d1eda(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6d093
leaq 0x1ab860(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6d093
movl %edi, %ebx
leaq 0x1adf55(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6d09a
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x6d09a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x8e, %edi
callq 0x5e6be
movl $0xa0, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x590f7
movl %ebx, %edi
callq 0x592eb
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2c9f42(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6d116
leaq 0x1d1e5a(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6d116
leaq 0x1ab7e0(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6d116
movl %esi, %ebx
movl %edi, %r14d
leaq 0x1aded2(%rip), %rax    # 0x21afd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6d11b
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x6d11b
popq %rbx
popq %r14
popq %rbp
retq
movl $0x8e, %edi
callq 0x5e6be
movl $0xa1, %edi
callq 0x590f7
movzbl %r14b, %edi
callq 0x590f7
callq 0x5e73c
testl %ebx, %ebx
je 0x6d116
movl $0x6, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x6a4ce
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %rbx
pushq %rax
leaq 0x1d1de2(%rip), %rax    # 0x23ef3e
leaq 0x2c9ebd(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
jne 0x6d19f
leaq 0x1ab760(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x20, %rax
je 0x6d1a6
cmpq $0x20000000, %rax       # imm = 0x20000000
jne 0x6d19f
leaq 0xb3c30(%rip), %rdi     # 0x120db8
callq 0x5eff8
leaq 0xb4214(%rip), %rdi     # 0x1213a8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5eff8
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xb4207(%rip), %rdi     # 0x1213b4
callq 0x6160d
movl $0xff, %edi
callq 0x590f7
callq 0x61688
leaq 0xb41ef(%rip), %rdi     # 0x1213b7
callq 0x6160d
movw $0xffff, -0xa(%rbp)     # imm = 0xFFFF
leaq 0x1ab5fa(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61688
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_timing_mode()
void request_timing_mode()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == FURUNO_RCVR) {
   }
   else if(rcvr_type == MOTO_RCVR) {
      send_moto_start("Aw");  // get GPS/UTC mode
      send_byte(0xFF);
      send_moto_end();

      send_moto_start("Bo");  // get UTC offset command
      send_byte(0);
      send_moto_end();
   }
   else if(rcvr_type == NVS_RCVR) {
      send_nvs_start(0x1E);  // !!!! gets leapsecond info, timing mode comes from request_pps_info()
      send_nvs_end();
   }
   else if(rcvr_type == TM4_RCVR) {
      request_tm4_msg("57");  // timing mode
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) ;
      else if(ACU_360) ;
      else if(ACUTIME) return;
      else if(PALISADE) return;
      else if(SV6_FAMILY) return;

      send_tsip_start(0x8E);
      send_byte(0xA2);
      send_tsip_end();
   }
   else if(rcvr_type == ZYFER_RCVR) {
      send_zyfer_cmd("$TIMM");
   }

   request_traim_info();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1d1d2a(%rip), %rax    # 0x23ef3e
leaq 0x2c9e05(%rip), %rcx    # 0x337020
movb (%rcx), %cl
orb (%rax), %cl
je 0x6d223
popq %rbp
retq
leaq 0x1ab6a6(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x7ff, %rax            # imm = 0x7FF
jg 0x6d27a
cmpq $0x1, %rax
je 0x6d298
cmpq $0x20, %rax
jne 0x6d2e2
leaq 0xb416e(%rip), %rdi     # 0x1213ba
callq 0x6160d
movl $0xff, %edi
callq 0x590f7
callq 0x61688
leaq 0xb4156(%rip), %rdi     # 0x1213bd
callq 0x6160d
xorl %edi, %edi
callq 0x590f7
callq 0x61688
jmp 0x6d2e2
cmpq $0x800, %rax            # imm = 0x800
je 0x6d2d3
cmpq $0x100000, %rax         # imm = 0x100000
jne 0x6d2e2
leaq 0xb4130(%rip), %rdi     # 0x1213c1
callq 0x5f0e5
jmp 0x6d2e2
leaq 0x1add35(%rip), %rax    # 0x21afd4
movl (%rax), %eax
movl %eax, %edx
xorl $0x41, %edx
leaq 0x1ab64b(%rip), %rcx    # 0x2188f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
jne 0x6d2e8
movl $0x8e, %edi
callq 0x5e6be
movl $0xa2, %edi
callq 0x590f7
callq 0x5e73c
jmp 0x6d2e2
movl $0x1e, %edi
callq 0x5e6be
callq 0x5e7c0
popq %rbp
jmp 0x6d14f
cmpl $0x41, %eax
jne 0x6d2fc
cmpl $0x33, %ecx
je 0x6d2b8
cmpl $0x47, %ecx
je 0x6d2b8
jmp 0x6d221
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x6d2b8
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jb 0x6d221
jmp 0x6d2b8
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rcvr_utc_ofs(int)
void set_rcvr_utc_ofs(int i)
{
   // sets the receiver default UTC offset value
   if(read_only) return;

   if(rcvr_type == ESIP_RCVR) {
      sprintf(out, "PERDAPI,DEFLS,%d,AUTO", i);
      send_esip_cmd(out);
      Sleep(1000);
      save_segment(128,8787);
   }
}

// Assembly:
leaq 0x2c9cff(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6d373
leaq 0x1ab5a9(%rip), %rax    # 0x2188d0
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, (%rax)
jne 0x6d373
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2ceee0(%rip), %rbx    # 0x33c220
leaq 0xb40f3(%rip), %rsi     # 0x12143a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x5ee9b
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xafe8
movl $0x80, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6a4ce
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rftg_traim(int)
void set_rftg_traim(int mode)
{
   // (mode == 1) -> enable  (0 == disable)
   // note: this does not seem to change anything!!!!!
   if(read_only) return;

   start_rftg_request2(0);

   if(mode == 0) mode = 2;  // disable

   send_rftg_start(0x64);
   send_byte(mode);
   send_rftg_end();
}

// Assembly:
leaq 0x2c9a52(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6d5ce
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %edi, %edi
callq 0x657ff
movl $0x64, %edi
callq 0x5e6be
testl %ebx, %ebx
movl $0x2, %eax
cmovnel %ebx, %eax
movzbl %al, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_sy(int)
void set_sro_sy(int mode)
{
   if(read_only) return;

   if(mode < 0) mode = 0;
   if(mode > 3) mode = 1;
   sprintf(out, "SY%d", mode);
   queue_sro_cmd(out, SRO_SY_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2c95aa(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6da76
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
cmpl $0x4, %edi
movl $0x1, %edx
cmovll %eax, %edx
leaq 0x2ce788(%rip), %rbx    # 0x33c220
leaq 0xb5ee6(%rip), %rsi     # 0x123985
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x326, %esi            # imm = 0x326
callq 0x5edda
movl $0x1f8, %edi            # imm = 0x1F8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9d78
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_tr(int)
void set_sro_tr(int mode)
{
   if(read_only) return;

   if(mode < 0) mode = 0;
   if(mode > 3) mode = 1;
   sprintf(out, "TR%d", mode);
   queue_sro_cmd(out, SRO_TR_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2c954d(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6dad3
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
cmpl $0x4, %edi
movl $0x1, %edx
cmovll %eax, %edx
leaq 0x2ce72b(%rip), %rbx    # 0x33c220
leaq 0xb5e8e(%rip), %rsi     # 0x12398a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x325, %esi            # imm = 0x325
callq 0x5edda
movl $0x1f8, %edi            # imm = 0x1F8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9d78
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: exit_test_mode()
void exit_test_mode()
{
   // this is a set_() type function
   if(read_only) return;
   if(luxor) return;
   if(rcvr_type != TSIP_RCVR) return;

   send_tsip_start(0x8E);
   send_byte(0xA4);
   send_byte(0x00);
   send_tsip_end();
}

// Assembly:
leaq 0x2c93a5(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6dcb8
leaq 0x1d12bd(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6dcb8
leaq 0x1aac43(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6dcb8
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e6be
movl $0xa4, %edi
callq 0x590f7
xorl %edi, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: request_packet_mask()
void request_packet_mask()
{
   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(0xA5);
   send_tsip_end();
}

// Assembly:
leaq 0x1d1278(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0x6dcf7
leaq 0x2c934e(%rip), %rax    # 0x337020
cmpb $0x0, (%rax)
jne 0x6dcf7
leaq 0x1aabf2(%rip), %rax    # 0x2188d0
cmpq $0x1, (%rax)
jne 0x6dcf7
leaq 0x1ad2e9(%rip), %rax    # 0x21afd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x6dcf7
cmpl $0x36, %eax
jne 0x6dcf8
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5e6be
movl $0xa5, %edi
callq 0x590f7
popq %rbp
jmp 0x5e73c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rtk_mode(int)
void set_rtk_mode(int mode)
{
   if(read_only) return;

   if(rcvr_type == VENUS_RCVR) {
      if(mode < 0) mode = ROVER_MODE;
      else if(mode > 1) mode = BASE_MODE;

      send_venus_start(SET_VENUS_RTK_MODE);
      send_byte(1); 
      send_byte(mode);  // 0=rover  1=base
      send_venus_save(1);

      query_venus_msg(QUERY_VENUS_RTK_MODE);
   }
}

// Assembly:
leaq 0x2c92fd(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
jne 0x6dd8d
leaq 0x1aaba7(%rip), %rax    # 0x2188d0
cmpq $0x80, (%rax)
jne 0x6dd8d
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testl %edi, %edi
setg %bl
movl $0x6a, %edi
movl $0x4, %esi
callq 0x5fb3c
movl $0x1, %edi
callq 0x590f7
movl %ebx, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x5fc00
movl $0x6a, %edi
movl $0x2, %esi
callq 0x5fb3c
movl $0x2, %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x61bc1
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_nav_rate(double)
void set_nav_rate(DATA_SIZE hz)
{
   if(read_only) return;

   if(hz <= 0.0) hz = 1.0;

   if(rcvr_type == CS_RCVR) {
      if(!pause_data) nav_rate = hz;
   }
   else if((rcvr_type == NO_RCVR) || (rcvr_type == TIDE_RCVR) || (rcvr_type == THERMO_RCVR)) {
      if(!pause_data) nav_rate = hz;
   }
   else if(rcvr_type == NVS_RCVR) {
      send_nvs_start(0xD7); // set nav rate (1 Hz)
      send_byte(0x02);
      send_byte((u08) hz);
      send_nvs_end();
   }
   else if(rcvr_type == TICC_RCVR) {
      if(!pause_data) nav_rate = hz;
   }
   else if(rcvr_type == UBX_RCVR) {
      if(time_flags & TFLAGS_UTC) {       // sync to UTC time
         set_ubx_nav_rate((DATA_SIZE) 1000.0/hz, 1); // 1Hz, align to UTC
      }
      else {
         set_ubx_nav_rate((DATA_SIZE) 1000.0/hz, 0); // 1Hz, align to GPS
      }
   }
   else if(rcvr_type == VENUS_RCVR) {
      send_venus_start(SET_VENUS_OUT_RATE);
      send_byte(1);  // 1 Hz
      send_venus_save(1);
      Sleep(1000);

      // doing this causes the receiver to effectively warm start
      send_venus_start(SET_VENUS_NAV_RATE);
      send_byte((u08) hz);  // raw Hz !!!!
      send_venus_save(1);
   }

   log_written = 0;  // force new log header
}

// Assembly:
leaq 0x2c9285(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6dd9b
retq
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpnlesd %xmm1, %xmm2
andpd %xmm2, %xmm0
movsd 0x9b2b4(%rip), %xmm1    # 0x109070
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
leaq 0x1aab05(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0xffff, %rax           # imm = 0xFFFF
jg 0x6de55
cmpq $0x3ff, %rax            # imm = 0x3FF
jg 0x6de72
cmpq $0x4, %rax
je 0x6ded8
cmpq $0x80, %rax
jne 0x6defe
movl $0x11, %edi
movl $0x3, %esi
movapd %xmm2, -0x10(%rbp)
callq 0x5fb3c
movl $0x1, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x5fc00
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xafe8
movl $0xe, %edi
movl $0x3, %esi
callq 0x5fb3c
cvttsd2si -0x10(%rbp), %eax
movzbl %al, %edi
callq 0x590f7
movl $0x1, %edi
callq 0x5fc00
jmp 0x6defe
cmpq $0x7ffff, %rax          # imm = 0x7FFFF
jg 0x6deaf
cmpq $0x10000, %rax          # imm = 0x10000
je 0x6debf
cmpq $0x20000, %rax          # imm = 0x20000
je 0x6debf
jmp 0x6defe
cmpq $0x400, %rax            # imm = 0x400
je 0x6debf
cmpq $0x800, %rax            # imm = 0x800
jne 0x6defe
movl $0xd7, %edi
movapd %xmm2, -0x10(%rbp)
callq 0x5e6be
movl $0x2, %edi
callq 0x590f7
cvttsd2si -0x10(%rbp), %eax
movzbl %al, %edi
callq 0x590f7
callq 0x5e7c0
jmp 0x6defe
cmpq $0x80000, %rax          # imm = 0x80000
je 0x6debf
cmpq $0x800000, %rax         # imm = 0x800000
jne 0x6defe
leaq 0x1ad36e(%rip), %rax    # 0x21b234
cmpb $0x0, (%rax)
jne 0x6defe
leaq 0x1ad486(%rip), %rax    # 0x21b358
movsd %xmm2, (%rax)
jmp 0x6defe
leaq 0x29f5c5(%rip), %rax    # 0x30d4a4
testb $0x1, (%rax)
movsd 0x9b14e(%rip), %xmm0    # 0x109038
divsd %xmm2, %xmm0
jne 0x6def4
xorl %edi, %edi
jmp 0x6def9
movl $0x1, %edi
callq 0x6df0e
leaq 0x1d04e5(%rip), %rax    # 0x23e3ea
movb $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_ubx_nav_rate(double, int)
void set_ubx_nav_rate(DATA_SIZE rate, int align)
{
   if(read_only) return;

   send_ubx_start(UBX_NAV_RATE, 6);
   send_word((u16) rate);  // in msecs
   send_word(1);
   send_word(align);
   send_ubx_end();
}

// Assembly:
leaq 0x2c9105(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6df1b
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movl $0x608, %edi            # imm = 0x608
movl $0x6, %esi
movsd %xmm0, -0x20(%rbp)
callq 0x5f37d
cvttsd2si -0x20(%rbp), %eax
movw %ax, -0x12(%rbp)
leaq 0x1aa888(%rip), %r14    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%r14)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r14)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw $0x1, -0x14(%rbp)
xorl %eax, %eax
cmpb $0x0, (%r14)
sete %al
movzbl -0x14(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r14)
setne %al
movzbl -0x14(%rbp,%rax), %edi
callq 0x590f7
movw %bx, -0x16(%rbp)
xorl %eax, %eax
cmpb $0x0, (%r14)
sete %al
movzbl -0x16(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%r14)
setne %al
movzbl -0x16(%rbp,%rax), %edi
callq 0x590f7
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x5f456
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: init_enviro(unsigned int)
void init_enviro(unsigned port)
{
   // intialize the environmental sensor device to start sending data
   // We request the device ID.

   if(port >= NUM_COM_PORTS) return;
   drain_port(port);
   reset_com_timer(port);

   last_enviro = ENV_ID;
   if(enviro_type == DOG_ENVIRO) {
      send_enviro_cmd("GI\r", port);
      send_enviro_cmd("GI\r", port);
   }
   else if(enviro_type == LFS_ENVIRO) {
      send_enviro_cmd("GETID\r", port);
      send_enviro_cmd("GETID\r", port);
   }
   else if(enviro_type == DETECT_ENVIRO) {
      send_enviro_cmd("GI\n", port); 
      send_enviro_cmd("GI\n", port);
      send_enviro_cmd("\n", port);

      send_enviro_cmd("GETID\r", port);  //lfs
      send_enviro_cmd("GETID\r", port);
      if(rcvr_type == THERMO_RCVR) {  //lfs
         send_enviro_cmd("GETID\r", port);
         send_enviro_cmd("GETID\r", port);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x12, %edi
jbe 0x6e1ab
popq %rbx
popq %r14
popq %rbp
retq
movl %edi, %ebx
callq 0x5802f
movl %ebx, %edi
callq 0x1ea0b
leaq 0x1aa764(%rip), %rax    # 0x218924
movl $0x8000, (%rax)         # imm = 0x8000
leaq 0x1aa747(%rip), %rax    # 0x218914
movl (%rax), %eax
testl %eax, %eax
je 0x6e1ef
cmpl $0x1, %eax
je 0x6e1e6
cmpl $0x3, %eax
jne 0x6e1a6
leaq 0xb342d(%rip), %r14     # 0x121611
jmp 0x6e247
leaq 0xb3420(%rip), %r14     # 0x12160d
jmp 0x6e247
leaq 0xb3422(%rip), %r14     # 0x121618
movq %r14, %rdi
movl %ebx, %esi
callq 0x60f7b
movq %r14, %rdi
movl %ebx, %esi
callq 0x60f7b
leaq 0xc7883(%rip), %rdi     # 0x135a94
movl %ebx, %esi
callq 0x60f7b
leaq 0xb33f2(%rip), %r14     # 0x121611
movq %r14, %rdi
movl %ebx, %esi
callq 0x60f7b
movq %r14, %rdi
movl %ebx, %esi
callq 0x60f7b
leaq 0x1aa696(%rip), %rax    # 0x2188d0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0x6e1a6
movq %r14, %rdi
movl %ebx, %esi
callq 0x60f7b
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x60f7b
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: poll_z12_time(int)
void poll_z12_time(int sleep)
{
   if(rcvr_type == Z12_RCVR) {
if(raw_msg_rate) return; //lfs // !!!!! we get time from the system clock
      if(ZDA_TIME) send_z12_cmd("PASHQ,ZDA");
      else         send_z12_cmd("PASHQ,RID");
      if(sleep) Sleep(150);
   }
}

// Assembly:
leaq 0x1aa66a(%rip), %rax    # 0x2188d0
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, (%rax)
jne 0x6e2aa
leaq 0x1ad0fc(%rip), %rax    # 0x21b378
cmpl $0x0, (%rax)
jne 0x6e2aa
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0xb27b4(%rip), %rdi     # 0x120a44
callq 0x5f2c8
testl %ebx, %ebx
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0x6e2aa
movl $0x96, %edi
jmp 0xafe8
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: enable_gpsd()
void enable_gpsd()
{
   if(gpsd_device[0]) {
      sprintf(out, "?WATCH={\"enable\":true,\"json\":true,\"pps\":true,\"devicename\":\"%s\"}", gpsd_device);
   }
   else {
      sprintf(out, "?WATCH={\"enable\":true,\"json\":true,\"pps\":true}");
   }
   send_nmea_string(out, 0);
//    send_byte(0x0D);
   eom_flag = EOM;
   send_byte(0x0A);
   eom_flag = ADD_CHAR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2cd7d7(%rip), %rax    # 0x33c430
cmpb $0x0, (%rax)
je 0x6ec7c
leaq 0x2cd5bb(%rip), %rdi    # 0x33c220
leaq 0xb7091(%rip), %rsi     # 0x125cfd
leaq 0x2cd7bd(%rip), %rdx    # 0x33c430
xorl %eax, %eax
callq 0x9060
jmp 0x6eca3
movups 0xb70d8(%rip), %xmm0    # 0x125d5b
leaq 0x2cd596(%rip), %rax    # 0x33c220
movups %xmm0, 0x1e(%rax)
movups 0xb70b8(%rip), %xmm0    # 0x125d4d
movaps %xmm0, 0x10(%rax)
movups 0xb709d(%rip), %xmm0    # 0x125d3d
movaps %xmm0, (%rax)
leaq 0x2cd576(%rip), %rdi    # 0x33c220
xorl %esi, %esi
callq 0x5e8a6
movl $0x1, 0x2fd155(%rip)    # 0x36be10
movl $0xa, %edi
callq 0x590f7
movl $0x0, 0x2fd141(%rip)    # 0x36be10
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_ubx_antenna(unsigned char)
void set_ubx_antenna(u08 mode)
{ 
   if(read_only) return;

   send_ubx_start(UBX_CFG_ANT, 4);
   send_word(mode);
   send_word(0x0000);  // dont re-config pins - LEA-5T has a98b
   send_ubx_end();
}

// Assembly:
leaq 0x2c7261(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x6fdbf
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x613, %edi            # imm = 0x613
movl $0x4, %esi
callq 0x5f37d
movzbl %bl, %eax
movw %ax, -0xa(%rbp)
leaq 0x1a89f0(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xa(%rbp,%rax), %edi
callq 0x590f7
movw $0x0, -0xc(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0xc(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0xc(%rbp,%rax), %edi
callq 0x590f7
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5f456
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: set_zod_nav_mode(int)
void set_zod_nav_mode(int flags)
{
   if(read_only) return;

   send_zod_start(ZOD_SET_NAV_MODE, 15, 0);
   send_zod_seq();
   send_word(flags);
   send_word(0);
   send_word(0);
   send_word(0);
   send_word(0);
   send_word(0);
   send_word(0);
   send_word(0);
   send_zod_end();
}

// Assembly:
leaq 0x2c6eba(%rip), %rax    # 0x33701a
cmpb $0x0, (%rax)
je 0x70166
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
xorl %r14d, %r14d
movl $0x4c5, %edi            # imm = 0x4C5
movl $0xf, %esi
xorl %edx, %edx
callq 0x646e6
callq 0x64869
movw %bx, -0x12(%rbp)
leaq 0x1a863d(%rip), %rbx    # 0x2187d4
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw %r14w, -0x12(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw %r14w, -0x12(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw %r14w, -0x12(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw %r14w, -0x12(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw %r14w, -0x12(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw %r14w, -0x12(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
movw %r14w, -0x12(%rbp)
xorl %eax, %eax
cmpb $0x0, (%rbx)
sete %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
xorl %eax, %eax
cmpb $0x0, (%rbx)
setne %al
movzbl -0x12(%rbp,%rax), %edi
callq 0x590f7
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x648ab