LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1c4f58(%rip), %rax    # 0x228f3e
leaq 0x2bd033(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
je 0x63ff5
popq %rbp
retq
leaq 0x19e8d4(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x64071
cmpq $0x100000, %rax         # imm = 0x100000
je 0x64054
cmpq $0x800, %rax            # imm = 0x800
je 0x64062
cmpq $0x20, %rax
jne 0x640aa
leaq 0xa72dc(%rip), %rdi     # 0x10b302
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
callq 0x59aab
leaq 0xa72c4(%rip), %rdi     # 0x10b305
callq 0x59a28
xorl %edi, %edi
callq 0x523f2
callq 0x59aab
jmp 0x640aa
leaq 0xa72ae(%rip), %rdi     # 0x10b309
callq 0x579af
jmp 0x640aa
pushq $0x1e
popq %rdi
callq 0x5707f
callq 0x57171
jmp 0x640aa
leaq 0x1a0f5c(%rip), %rax    # 0x204fd4
movl (%rax), %eax
movl %eax, %edx
xorl $0x41, %edx
leaq 0x19e872(%rip), %rcx    # 0x2028f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
jne 0x640b0
movl $0x8e, %edi
callq 0x5707f
movl $0xa2, %edi
callq 0x523f2
callq 0x570f8
popq %rbp
jmp 0x63f59
cmpl $0x41, %eax
jne 0x640c4
cmpl $0x33, %ecx
je 0x64091
cmpl $0x47, %ecx
je 0x64091
jmp 0x63ff3
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x64091
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jb 0x63ff3
jmp 0x64091
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bcf37(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x6413b
leaq 0x19e7e1(%rip), %rax    # 0x2028d0
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, (%rax)
jne 0x6413b
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2c2118(%rip), %rbx    # 0x326220
leaq 0xa7273(%rip), %rsi     # 0x10b382
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x57791
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xae83
movl $0x80, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6166c
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bcd06(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x6431a
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %edi, %edi
callq 0x5d465
pushq $0x64
popq %rdi
callq 0x5707f
testl %ebx, %ebx
pushq $0x2
popq %rax
cmovnel %ebx, %eax
movzbl %al, %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: 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 0x2bc8cd(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x64753
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
cmpl $0x4, %edi
pushq $0x1
popq %rdx
cmovll %eax, %edx
leaq 0x2c1aad(%rip), %rbx    # 0x326220
leaq 0xa9153(%rip), %rsi     # 0x10d8cd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x326, %esi            # imm = 0x326
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bc877(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x647a9
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
movl $0x0, %eax
cmovgl %edi, %eax
cmpl $0x4, %edi
pushq $0x1
popq %rdx
cmovll %eax, %edx
leaq 0x2c1a57(%rip), %rbx    # 0x326220
leaq 0xa9102(%rip), %rsi     # 0x10d8d2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x325, %esi            # imm = 0x325
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bc6d3(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x6498a
leaq 0x1c45eb(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x6498a
leaq 0x19df71(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x6498a
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5707f
movl $0xa4, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1c45a6(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x649c9
leaq 0x2bc67c(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x649c9
leaq 0x19df20(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x649c9
leaq 0x1a0617(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x649c9
cmpl $0x36, %eax
jne 0x649ca
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5707f
movl $0xa5, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bc62b(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x64a54
leaq 0x19ded5(%rip), %rax    # 0x2028d0
cmpq $0x80, (%rax)
jne 0x64a54
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testl %edi, %edi
setg %bl
pushq $0x6a
popq %r14
pushq $0x4
popq %rsi
movl %r14d, %edi
callq 0x582b6
pushq $0x1
popq %r15
movl %r15d, %edi
callq 0x523f2
movl %ebx, %edi
callq 0x523f2
movl %r15d, %edi
callq 0x58354
pushq $0x2
popq %rsi
movl %r14d, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5da8c
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bc5be(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x64a62
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpnlesd %xmm1, %xmm2
andpd %xmm2, %xmm0
movsd 0x8e5ea(%rip), %xmm1    # 0xf3070
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
leaq 0x19de3b(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x4, %rax
je 0x64b7e
cmpq $0x80, %rax
je 0x64b02
cmpq $0x400, %rax            # imm = 0x400
je 0x64ae2
cmpq $0x800, %rax            # imm = 0x800
je 0x64b53
cmpq $0x10000, %rax          # imm = 0x10000
je 0x64ae2
cmpq $0x800000, %rax         # imm = 0x800000
je 0x64ae2
cmpq $0x80000, %rax          # imm = 0x80000
je 0x64ae2
cmpq $0x20000, %rax          # imm = 0x20000
jne 0x64ba2
leaq 0x1a074b(%rip), %rax    # 0x205234
cmpb $0x0, (%rax)
jne 0x64ba2
leaq 0x1a085f(%rip), %rax    # 0x205358
movsd %xmm2, (%rax)
jmp 0x64ba2
pushq $0x11
popq %rdi
pushq $0x3
popq %rbx
movl %ebx, %esi
movapd %xmm2, -0x20(%rbp)
callq 0x582b6
pushq $0x1
popq %r14
movl %r14d, %edi
callq 0x523f2
movl %r14d, %edi
callq 0x58354
movl $0x3e8, %edi            # imm = 0x3E8
callq 0xae83
pushq $0xe
popq %rdi
movl %ebx, %esi
callq 0x582b6
cvttsd2si -0x20(%rbp), %eax
movzbl %al, %edi
callq 0x523f2
movl %r14d, %edi
callq 0x58354
jmp 0x64ba2
movl $0xd7, %edi
movapd %xmm2, -0x20(%rbp)
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
cvttsd2si -0x20(%rbp), %eax
movzbl %al, %edi
callq 0x523f2
callq 0x57171
jmp 0x64ba2
leaq 0x29291f(%rip), %rax    # 0x2f74a4
testb $0x1, (%rax)
movsd 0x8e4a8(%rip), %xmm0    # 0xf3038
divsd %xmm2, %xmm0
jne 0x64b9a
xorl %edi, %edi
jmp 0x64b9d
pushq $0x1
popq %rdi
callq 0x64bb5
leaq 0x1c3841(%rip), %rax    # 0x2283ea
movb $0x0, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2bc45e(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x64bc2
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
pushq $0x6
popq %rsi
movl $0x608, %edi            # imm = 0x608
movsd %xmm0, -0x18(%rbp)
callq 0x57bf3
cvttsd2si -0x18(%rbp), %edi
movl $0xffff, %r14d          # imm = 0xFFFF
andl %r14d, %edi
callq 0x52599
pushq $0x1
popq %rdi
callq 0x52599
andl %r14d, %ebx
movl %ebx, %edi
callq 0x52599
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x57cca
// File: /workspace/github_cpp_makefile_star2_O2/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 0x64ddf
popq %rbx
popq %r14
popq %rbp
retq
movl %edi, %ebx
callq 0x5142f
movl %ebx, %edi
callq 0x1d93f
leaq 0x19db30(%rip), %rax    # 0x202924
movl $0x8000, (%rax)         # imm = 0x8000
leaq 0x19db13(%rip), %rax    # 0x202914
movl (%rax), %eax
testl %eax, %eax
je 0x64e23
cmpl $0x1, %eax
je 0x64e1a
cmpl $0x3, %eax
jne 0x64dda
leaq 0xa6741(%rip), %r14     # 0x10b559
jmp 0x64e7b
leaq 0xa6734(%rip), %r14     # 0x10b555
jmp 0x64e7b
leaq 0xa6736(%rip), %r14     # 0x10b560
movq %r14, %rdi
movl %ebx, %esi
callq 0x593cc
movq %r14, %rdi
movl %ebx, %esi
callq 0x593cc
leaq 0xbab6f(%rip), %rdi     # 0x11f9b4
movl %ebx, %esi
callq 0x593cc
leaq 0xa6706(%rip), %r14     # 0x10b559
movq %r14, %rdi
movl %ebx, %esi
callq 0x593cc
movq %r14, %rdi
movl %ebx, %esi
callq 0x593cc
leaq 0x19da62(%rip), %rax    # 0x2028d0
cmpq $0x80000, (%rax)        # imm = 0x80000
jne 0x64dda
movq %r14, %rdi
movl %ebx, %esi
callq 0x593cc
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x593cc
// File: /workspace/github_cpp_makefile_star2_O2/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 0x19da36(%rip), %rax    # 0x2028d0
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, (%rax)
jne 0x64ede
leaq 0x1a04c8(%rip), %rax    # 0x205378
cmpl $0x0, (%rax)
jne 0x64ede
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0xa5ac8(%rip), %rdi     # 0x10a98c
callq 0x57b55
testl %ebx, %ebx
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0x64ede
movl $0x96, %edi
jmp 0xae83
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2c0cce(%rip), %rax    # 0x326430
cmpb $0x0, (%rax)
je 0x65785
leaq 0x2c0ab2(%rip), %rdi    # 0x326220
leaq 0xaa4cd(%rip), %rsi     # 0x10fc42
leaq 0x2c0cb4(%rip), %rdx    # 0x326430
xorl %eax, %eax
callq 0x9060
jmp 0x657ac
movups 0xaa514(%rip), %xmm0    # 0x10fca0
leaq 0x2c0a8d(%rip), %rax    # 0x326220
movups %xmm0, 0x1e(%rax)
movups 0xaa4f4(%rip), %xmm0    # 0x10fc92
movaps %xmm0, 0x10(%rax)
movups 0xaa4d9(%rip), %xmm0    # 0x10fc82
movaps %xmm0, (%rax)
leaq 0x2c0a6d(%rip), %rdi    # 0x326220
xorl %esi, %esi
callq 0x5724b
movl $0x1, 0x2f064c(%rip)    # 0x355e10
pushq $0xa
popq %rdi
callq 0x523f2
andl $0x0, 0x2f063d(%rip)    # 0x355e10
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2ba841(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x667df
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x4
popq %rsi
movl $0x613, %edi            # imm = 0x613
callq 0x57bf3
movzbl %bl, %edi
callq 0x52599
xorl %edi, %edi
callq 0x52599
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57cca
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2ba53f(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x66ae1
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0xf
popq %rsi
movl $0x4c5, %edi            # imm = 0x4C5
xorl %edx, %edx
callq 0x5c619
callq 0x5c6ed
movzwl %bx, %edi
callq 0x52599
xorl %edi, %edi
callq 0x52599
xorl %edi, %edi
callq 0x52599
xorl %edi, %edi
callq 0x52599
xorl %edi, %edi
callq 0x52599
xorl %edi, %edi
callq 0x52599
xorl %edi, %edi
callq 0x52599
xorl %edi, %edi
callq 0x52599
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5c6fe
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_discipline_params(unsigned char)
void request_discipline_params(u08 type)
{
   if(luxor) return;
   if(no_poll) return;
   if(res_t) return;

   if(rcvr_type == PRS_RCVR) {
      if     (type == 0x00) {   // time constant
         queue_prs_cmd("PT?", PRS_PT_MSG);
      }
      else if(type == 0x01) {  // gain
         queue_prs_cmd("GA?", PRS_GA_MSG);
      }
      else if(type == 0x02) {  // stability
         queue_prs_cmd("PF?", PRS_PF_MSG);
      }
      else if(type == 0x03) {  // integrator
         queue_prs_cmd("PI?", PRS_PI_MSG);
      }
   }
   else if(rcvr_type == STAR_RCVR) {
      if(type == 0x00) {
         request_rcvr_config(5577);
      }
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) return;
      if(ACU_360) return;
      if(ACUTIME) return;
      if(PALISADE) return;
      if(SV6_FAMILY) return;
      send_tsip_start(0x8E);
      send_byte(0xA8);
      send_byte(type);
      send_tsip_end();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1c1e8c(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x6714e
leaq 0x2b9f5e(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x6714e
leaq 0x19b832(%rip), %rax    # 0x202904
cmpb $0x0, (%rax)
jne 0x6714e
movl %edi, %ebx
leaq 0x19b7f0(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x67133
cmpq $0x1000, %rax           # imm = 0x1000
je 0x6711f
cmpq $0x1000000, %rax        # imm = 0x1000000
jne 0x6714e
cmpb $0x3, %bl
ja 0x6714e
movzbl %bl, %eax
leaq 0xa1d10(%rip), %rcx     # 0x108e18
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xa4766(%rip), %rdi     # 0x10b87e
movl $0x20b, %esi            # imm = 0x20B
jmp 0x6717d
testb %bl, %bl
jne 0x6714e
movl $0x15c9, %edi           # imm = 0x15C9
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e18e
leaq 0x19de9a(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x67188
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x67188
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xa472a(%rip), %rdi     # 0x10b886
movl $0x20c, %esi            # imm = 0x20C
jmp 0x6717d
leaq 0xa4720(%rip), %rdi     # 0x10b88a
movl $0x20d, %esi            # imm = 0x20D
jmp 0x6717d
leaq 0xa470a(%rip), %rdi     # 0x10b882
movl $0x200, %esi            # imm = 0x200
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
movl $0x8e, %edi
callq 0x5707f
movl $0xa8, %edi
callq 0x523f2
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_all_dis_params()
void request_all_dis_params()
{
   if(luxor) return;
   if(no_poll) return;

   request_discipline_params(0x00); // time constant
   request_discipline_params(0x01); // gain / DAC range
   request_discipline_params(0x02); // sync / freq thresholds
   request_discipline_params(0x03); // initial DAC voltage
   request_discipline_params(0x04); // undocumented - allowable DAC range?
}

// Assembly:
leaq 0x1c1d88(%rip), %rax    # 0x228f3e
leaq 0x2b9e63(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
je 0x671c4
retq
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x670a5
pushq $0x1
popq %rdi
callq 0x670a5
pushq $0x2
popq %rdi
callq 0x670a5
pushq $0x3
popq %rdi
callq 0x670a5
pushq $0x4
popq %rdi
popq %rbp
jmp 0x670a5
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_pullin_range(int)
void set_pullin_range(int i)
{
   if(read_only) return;

   if(rcvr_type == UCCM_RCVR) {
      sprintf(out, "PULLINRANGE %d", i/10);
      queue_uccm_cmd(out, UCCM_SET_PULLIN_MSG);
      queue_uccm_cmd("PULLINRANGE?", UCCM_GET_PULLIN_MSG);
   }
}

// Assembly:
leaq 0x2b9e23(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x67251
leaq 0x19b6cd(%rip), %rax    # 0x2028d0
cmpq $0x8, (%rax)
jne 0x67251
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
pushq $0xa
popq %rcx
movl %edi, %eax
cltd
idivl %ecx
leaq 0x2bf002(%rip), %rbx    # 0x326220
leaq 0xa4669(%rip), %rsi     # 0x10b88e
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x9060
pushq $0x6c
popq %rsi
movq %rbx, %rdi
callq 0x576d4
leaq 0xa3b24(%rip), %rdi     # 0x10ad67
pushq $0x6d
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_prs_pt(int)
void set_prs_pt(int val)
{
   if(read_only) return;

   sprintf(out, "PT%d", val);
   queue_prs_cmd(out, PRS_PT_MSG);
   queue_prs_cmd("PT?", PRS_PT_MSG);
}

// Assembly:
leaq 0x2b9a12(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x6760e
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2bec03(%rip), %rbx    # 0x326220
leaq 0xa65f3(%rip), %rsi     # 0x10dc17
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x20b, %esi            # imm = 0x20B
callq 0x576d4
leaq 0xa423c(%rip), %rdi     # 0x10b87e
movl $0x20b, %esi            # imm = 0x20B
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_prs_pf(int)
void set_prs_pf(int val)
{
   if(read_only) return;

   sprintf(out, "PF%d", val);
   queue_prs_cmd(out, PRS_PF_MSG);
   queue_prs_cmd("PF?", PRS_PF_MSG);
}

// Assembly:
leaq 0x2b99c1(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x6765f
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2bebb2(%rip), %rbx    # 0x326220
leaq 0xa6593(%rip), %rsi     # 0x10dc08
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x20c, %esi            # imm = 0x20C
callq 0x576d4
leaq 0xa41f3(%rip), %rdi     # 0x10b886
movl $0x20c, %esi            # imm = 0x20C
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_prs_ga(int)
void set_prs_ga(int val)
{
   if(read_only) return;

   sprintf(out, "GA%d", val);
   queue_prs_cmd(out, PRS_GA_MSG);
   queue_prs_cmd("GA?", PRS_GA_MSG);
}

// Assembly:
leaq 0x2b9970(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x676b0
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2beb61(%rip), %rbx    # 0x326220
leaq 0x9847e(%rip), %rsi     # 0xffb44
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x576d4
leaq 0xa419e(%rip), %rdi     # 0x10b882
movl $0x200, %esi            # imm = 0x200
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_prs_pi(int)
void set_prs_pi(int val)
{
   if(read_only) return;

   sprintf(out, "PI%d", val);
   queue_prs_cmd(out, PRS_PI_MSG);
   queue_prs_cmd("PI?", PRS_PI_MSG);
}

// Assembly:
leaq 0x2b991f(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x67701
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2beb10(%rip), %rbx    # 0x326220
leaq 0xa64f6(%rip), %rsi     # 0x10dc0d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x20d, %esi            # imm = 0x20D
callq 0x576d4
leaq 0xa4155(%rip), %rdi     # 0x10b88a
movl $0x20d, %esi            # imm = 0x20D
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_sro_tc(int)
void set_sro_tc(int secs)
{
   if(read_only) return;

   if(secs < 0) secs = 0;
   if(secs > 999999) secs = 999999;
   sprintf(out, "TC%06d", secs);
   queue_sro_cmd(out, SRO_TC_MSG);
   sro_eeprom();
}

// Assembly:
leaq 0x2b98ce(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x67752
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
xorl %eax, %eax
testl %edi, %edi
cmovlel %eax, %edx
movl $0xf423f, %eax          # imm = 0xF423F
cmpl %eax, %edx
cmovgel %eax, %edx
leaq 0x2beaae(%rip), %rbx    # 0x326220
leaq 0xa614d(%rip), %rsi     # 0x10d8c6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
movl $0x32d, %esi            # imm = 0x32D
callq 0x576d4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7ee6e
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_dds(double)
void set_x72_dds(double val)
{
#define MAX_DDS_STEP  4.0E-8
#define MAX_DDS_RANGE 1.0E-6
double dval;
double set_val;
double sign;
int i, j;

   // set the X72 DDS freq tune value
   if(read_only) return;

   if(fabs(val) > 1.0E-6) return;

   if(val < 0.0) sign = (-1.0);
   else          sign = 1.0;

   last_x72_dds = val;
   user_set_x72_dds = 1;
   save_x72_state();

   dval = fabs(val);
   if(dval > MAX_DDS_RANGE) return;  // freq change is too large
   j = (int) (MAX_DDS_RANGE / MAX_DDS_STEP) + 1;

   set_val = 0.0;
   for(i=0; i<j; i++) {  // max DDS change allowed in one step is 4.0E-8
      if(dval > MAX_DDS_STEP) set_val += MAX_DDS_STEP;
      else                    set_val += dval;

      osc_offset = set_val*sign;

      val = set_val / 1.0E-12;  // we get E-12 steps
      have_osc_offset = 333;
      val = val / 10.0;     // scale E-12 input to E-11 
      sprintf(out, "f%.2f", val*sign);
      queue_x72_cmd(out, X72_SET_DDS_MSG);

      dval -= MAX_DDS_STEP;
      if(dval <= 0.0) break;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x2b9867(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x678cb
movapd 0x8b9cc(%rip), %xmm1    # 0xf3190
andpd %xmm0, %xmm1
movapd %xmm1, -0x40(%rbp)
ucomisd 0x8e2a3(%rip), %xmm1    # 0xf5a78
ja 0x678cb
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x8f781(%rip), %rcx     # 0xf6f70
movsd (%rcx,%rax,8), %xmm1
movsd %xmm1, -0x48(%rbp)
leaq 0x19d6e0(%rip), %rax    # 0x204ee0
movsd %xmm0, (%rax)
leaq 0x19d6a5(%rip), %rax    # 0x204eb0
movl $0x1, (%rax)
callq 0x62d03
pushq $0x1b
popq %r15
leaq 0x28ef9f(%rip), %r12    # 0x2f67c0
leaq 0x28fa0c(%rip), %r13    # 0x2f7234
leaq 0x2be9f1(%rip), %rbx    # 0x326220
leaq 0xa663a(%rip), %r14     # 0x10de70
xorpd %xmm2, %xmm2
decl %r15d
je 0x678cb
movsd 0xa0a1d(%rip), %xmm0    # 0x108268
minsd -0x40(%rbp), %xmm0
addsd %xmm0, %xmm2
movsd %xmm2, -0x50(%rbp)
movsd -0x48(%rbp), %xmm1
movapd %xmm1, %xmm0
mulsd %xmm2, %xmm0
movsd %xmm0, (%r12)
movapd %xmm2, %xmm0
divsd 0xa09f8(%rip), %xmm0    # 0x108270
movl $0x14d, (%r13)          # imm = 0x14D
divsd 0x8b820(%rip), %xmm0    # 0xf30a8
mulsd %xmm1, %xmm0
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x9060
movq %rbx, %rdi
movl $0x2bd, %esi            # imm = 0x2BD
callq 0x576d4
movsd -0x50(%rbp), %xmm2
movapd -0x40(%rbp), %xmm1
addsd 0xa09c0(%rip), %xmm1    # 0x108278
movapd %xmm1, -0x40(%rbp)
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jb 0x6783a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_jamthresh(double)
void set_x72_jamthresh(double val)
{
   // set the X72 sw discipline forced jamsync threshold
   if(read_only) return;

//// if(x72_fw_discipline()) return;
// !!!!!!!!!!!!!! we need to change the X72_PPS_BINS code to implement this !!!!!!!!!!!!!!
   if(val <= 0.0) val = X72_JAMSYNC_THRESH;
   if(val >= X72_JAMSYNC_THRESH) val = X72_JAMSYNC_THRESH;

   have_x72_jamthresh = 1;
   x72_jamthresh_val = val;
   user_jam_sync = (DATA_SIZE) val;
   jam_sync = (DATA_SIZE) val;
   have_osc_params |= PARAM_JAMSYNC;

   last_x72_jamthresh = val;
   user_set_x72_jamthresh = 1;

   save_x72_state();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2b9735(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x678ec
popq %rbp
retq
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpnlesd %xmm1, %xmm2
andpd %xmm2, %xmm0
movsd 0x8e09b(%rip), %xmm1    # 0xf59a0
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
minsd %xmm2, %xmm1
leaq 0x19d410(%rip), %rax    # 0x204d28
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x19d4fa(%rip), %rax    # 0x204e20
movsd %xmm1, (%rax)
leaq 0x28f87f(%rip), %rax    # 0x2f71b0
movsd %xmm1, (%rax)
leaq 0x28f804(%rip), %rax    # 0x2f7140
movsd %xmm1, (%rax)
leaq 0x2904b5(%rip), %rax    # 0x2f7dfc
orb $0x2, 0x1(%rax)
leaq 0x19d5be(%rip), %rax    # 0x204f10
movsd %xmm1, (%rax)
leaq 0x19d59f(%rip), %rax    # 0x204efc
movl %ecx, (%rax)
popq %rbp
jmp 0x62d03
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_tc(int)
void set_x72_tc(int val)
{
   // set the X72 disciplining time constant factor
   if(read_only) return;

   if(val < MIN_X72_TC) val = MIN_X72_TC;
   if(val > MAX_X72_TC) val = MAX_X72_TC;

   have_x72_tc = 1;
   x72_tc_val = val;
   user_time_constant = (DATA_SIZE) val;
   time_constant = (DATA_SIZE) val;
   have_osc_params |= PARAM_TC;
   x72_reset_filter();

   last_x72_tc = val;
   user_set_x72_tc = 1;
   save_x72_state();

   if(x72_fw_discipline()) {
      sprintf(out, "y2\r%d", val);
      queue_x72_cmd(out, X72_TC_MSG);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2b96a7(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x6797d
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x6, %edi
pushq $0x5
popq %rbx
cmovgel %edi, %ebx
movl $0x186a0, %eax          # imm = 0x186A0
cmpl %eax, %ebx
cmovgel %eax, %ebx
leaq 0x19d389(%rip), %rax    # 0x204d20
leaq 0x29045e(%rip), %rcx    # 0x2f7dfc
orb $0x1, (%rcx)
leaq 0x19d580(%rip), %rcx    # 0x204f28
andl $0x0, (%rcx)
pushq $0x1
popq %rcx
movl %ecx, (%rax)
leaq 0x19d44d(%rip), %rax    # 0x204e04
cvtsi2sd %ebx, %xmm0
movl %ebx, (%rax)
andq $0x0, 0x2f8d6b(%rip)    # 0x360730
leaq 0x28f7ac(%rip), %rax    # 0x2f7178
andl $0x0, 0x2fc35d(%rip)    # 0x363d30
movsd %xmm0, (%rax)
andl $0x0, 0x2fc356(%rip)    # 0x363d34
leaq 0x28f70b(%rip), %rax    # 0x2f70f0
andq $0x0, 0x2fc33b(%rip)    # 0x363d28
movsd %xmm0, (%rax)
andq $0x0, 0x2fc33f(%rip)    # 0x363d38
leaq 0x19d51c(%rip), %rax    # 0x204f1c
movl %ebx, (%rax)
leaq 0x19d4eb(%rip), %rax    # 0x204ef4
movl %ecx, (%rax)
callq 0x62d03
callq 0x63a49
testl %eax, %eax
je 0x67978
leaq 0x2be7fc(%rip), %r14    # 0x326220
leaq 0xa646e(%rip), %rsi     # 0x10de99
movq %r14, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movq %r14, %rdi
movl $0x2cb, %esi            # imm = 0x2CB
popq %rbx
popq %r14
popq %rbp
jmp 0x576d4
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_damping(double)
void set_x72_damping(double val)
{
   // set the X72 disciplining damping factor
   if(read_only) return;

   have_x72_damping = 1;
   x72_damping_val = val;
   user_damping_factor = (DATA_SIZE) val;
   have_osc_params |= PARAM_DAMP;

   last_x72_damping = val;
   user_set_x72_damping = 1;
   save_x72_state();

   if(x72_fw_discipline()) {
      sprintf(out, "y1\r%.2f", val);
      queue_x72_cmd(out, X72_DAMPING_MSG);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2b95c5(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x67a61
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x19d2bc(%rip), %rax    # 0x204d24
pushq $0x1
popq %rcx
movl %ecx, (%rax)
leaq 0x19d3a4(%rip), %rax    # 0x204e18
movsd %xmm0, (%rax)
leaq 0x28f701(%rip), %rax    # 0x2f7180
movsd %xmm0, (%rax)
leaq 0x290372(%rip), %rax    # 0x2f7dfc
orb $0x2, (%rax)
leaq 0x19d474(%rip), %rax    # 0x204f08
movsd %xmm0, (%rax)
leaq 0x19d459(%rip), %rax    # 0x204ef8
movl %ecx, (%rax)
movsd %xmm0, -0x10(%rbp)
callq 0x62d03
callq 0x63a49
movsd -0x10(%rbp), %xmm0
testl %eax, %eax
je 0x67a5a
leaq 0x2be760(%rip), %rbx    # 0x326220
leaq 0xa63ca(%rip), %rsi     # 0x10de91
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
movq %rbx, %rdi
movl $0x2cc, %esi            # imm = 0x2CC
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x576d4
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_x72_holdover(int)
void set_x72_holdover(int val)
{
   // set the X72 sw discipline holdover analysis time
   if(read_only) return;

//// if(x72_fw_discipline()) return;
   if(val <= 0) val = X72_HOLDOVER_SIZE;

   have_x72_holdover = 1;
   x72_holdover_val = val;
   user_holdover_time = val;
   have_osc_params |= PARAM_HOLDOVER;

   last_x72_holdover = val;
   user_set_x72_holdover = 1;

   save_x72_state();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2b952b(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x67af6
popq %rbp
retq
testl %edi, %edi
movl $0x78, %eax
cmovgl %edi, %eax
leaq 0x19d225(%rip), %rcx    # 0x204d2c
movl $0x1, %edx
movl %edx, (%rcx)
leaq 0x19d2f3(%rip), %rcx    # 0x204e08
movl %eax, (%rcx)
leaq 0x28f6aa(%rip), %rcx    # 0x2f71c8
movl %eax, (%rcx)
leaq 0x2902d5(%rip), %rcx    # 0x2f7dfc
orb $0x20, 0x1(%rcx)
leaq 0x19d3e6(%rip), %rcx    # 0x204f18
movl %eax, (%rcx)
leaq 0x19d3c5(%rip), %rax    # 0x204f00
movl %edx, (%rax)
popq %rbp
jmp 0x62d03
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_survey_params()
void request_survey_params()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == FURUNO_RCVR) {
      send_furuno_cmd("GPtmq");
   }
   else if(rcvr_type == MOTO_RCVR) {
      send_moto_start("Gd");
      send_byte(0xFF);
      send_moto_end();
   }
   else if(rcvr_type == TM4_RCVR) {
      request_tm4_msg("57");
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) return;
      else if(ACU_360) return;
      else if(ACUTIME) ;
      else if(PALISADE) return;
      else if(SV6_FAMILY) return;
      send_tsip_start(0x8E);
      send_byte(0xA9);
      send_tsip_end();
   }
   else if(rcvr_type == UBX_RCVR) { 
      if     (have_ubx_tmode == 2) request_ubx_msg(UBX_CFG_TMODE2);  // M8T
      else if(have_ubx_tmode == 1) request_ubx_msg(UBX_CFG_TMODE);
      else {
         request_ubx_msg(UBX_CFG_TMODE2);  // M8T
         request_ubx_msg(UBX_CFG_TMODE);
      }
      request_ubx_msg(UBX_SVIN);
   }
   else if(rcvr_type == VENUS_RCVR) {
      if(saw_venus_raw) query_venus_msg(QUERY_VENUS_BASE);
      else              query_venus_msg(QUERY_VENUS_SURVEY);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1c13f0(%rip), %rax    # 0x228f3e
leaq 0x2b94cb(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
je 0x67b5d
popq %rbp
retq
leaq 0x19ad6c(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x67bea
cmpq $0x4, %rax
je 0x67b96
cmpq $0x20, %rax
je 0x67bce
cmpq $0x80, %rax
je 0x67bbe
cmpq $0x20000000, %rax       # imm = 0x20000000
jne 0x67b5b
leaq 0xa3d15(%rip), %rdi     # 0x10b8a5
popq %rbp
jmp 0x578d5
leaq 0x28f817(%rip), %rax    # 0x2f73b4
movl (%rax), %eax
cmpl $0x2, %eax
je 0x67c33
cmpl $0x1, %eax
je 0x67bb7
movl $0x63d, %edi            # imm = 0x63D
callq 0x59749
movl $0x61d, %edi            # imm = 0x61D
jmp 0x67c38
leaq 0x2c022f(%rip), %rax    # 0x327df4
cmpl $0x0, (%rax)
je 0x67c27
pushq $0x23
jmp 0x67c29
leaq 0xa3245(%rip), %rdi     # 0x10ae1a
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
popq %rbp
jmp 0x59aab
leaq 0x19d3e3(%rip), %rax    # 0x204fd4
movl (%rax), %eax
movl %eax, %edx
xorl $0x41, %edx
leaq 0x19acf9(%rip), %rcx    # 0x2028f8
movl (%rcx), %ecx
movl %ecx, %esi
xorl $0x47, %esi
orl %edx, %esi
je 0x67b5b
cmpl $0x41, %eax
jne 0x67c48
cmpl $0x33, %ecx
je 0x67b5b
cmpl $0x47, %ecx
je 0x67b5b
jmp 0x67c5e
pushq $0x44
popq %rdi
pushq $-0x1
popq %rsi
popq %rbp
jmp 0x5da8c
movl $0x63d, %edi            # imm = 0x63D
callq 0x59749
movl $0xd04, %edi            # imm = 0xD04
popq %rbp
jmp 0x59749
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x67c5e
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jb 0x67b5b
movl $0x8e, %edi
callq 0x5707f
movl $0xa9, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_survey_params(unsigned char, unsigned char, unsigned int)
void set_survey_params(u08 enable_survey,  u08 save_survey, u32 survey_len)
{
   if(read_only) return;
   if(luxor) return;

   if(rcvr_type == FURUNO_RCVR) {  //!!! zorky
   }
   else if(rcvr_type == MOTO_RCVR) {  //!!! moto_chans
      send_moto_start("Gd");
      if(enable_survey) send_byte(0x03);
      else              send_byte(0x00);
      send_moto_end();
   }
   else if(rcvr_type == NVS_RCVR) {
      if(survey_len > 1440) survey_len = 1440;
      else if(survey_len < 20) survey_len = 20;
      send_nvs_start(0x1D);
      send_byte(0x06);
      send_word(survey_len);
      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(0xA9);
      send_byte(enable_survey);
      send_byte(save_survey);
      send_dword(survey_len);
      send_dword(0x0000);
      send_tsip_end();
   }
   else if(rcvr_type == TRUE_RCVR) {  // zorky
   }
   else if(rcvr_type == UBX_RCVR) {  // zorky
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
leaq 0x2b938f(%rip), %rax    # 0x32101a
leaq 0x1c12ac(%rip), %rcx    # 0x228f3e
movb (%rcx), %cl
orb (%rax), %cl
setne %cl
leaq 0x19ac30(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x20000000, %rax       # imm = 0x20000000
sete %dl
orb %cl, %dl
je 0x67cbb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %edi, %r14d
cmpq $0x1, %rax
je 0x67d3b
cmpq $0x800, %rax            # imm = 0x800
je 0x67cfd
cmpq $0x20, %rax
jne 0x67cb0
leaq 0xa3141(%rip), %rdi     # 0x10ae1a
callq 0x59a28
xorl %eax, %eax
testb %r14b, %r14b
setne %al
leal (%rax,%rax,2), %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x59aab
cmpl $0x15, %ebx
pushq $0x14
popq %r14
cmovael %ebx, %r14d
movl $0x5a0, %eax            # imm = 0x5A0
cmpl %eax, %r14d
cmovael %eax, %r14d
pushq $0x1d
popq %rdi
callq 0x5707f
pushq $0x6
popq %rdi
callq 0x523f2
movl %r14d, %edi
callq 0x52599
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57171
movl %esi, %r15d
leaq 0x19d28f(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x67d5d
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jb 0x67cb0
movl $0x8e, %edi
callq 0x5707f
movl $0xa9, %edi
callq 0x523f2
movzbl %r14b, %edi
callq 0x523f2
movzbl %r15b, %edi
callq 0x523f2
movl %ebx, %edi
callq 0x525e2
xorl %edi, %edi
callq 0x525e2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_primary_timing()
void request_primary_timing()
{
   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) return;
   else if(SV6_FAMILY) return;

   send_tsip_start(0x8E);
   send_byte(0xAB);
   send_byte(0x02);
   send_tsip_end();
}

// Assembly:
leaq 0x1c0ead(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x680ca
leaq 0x2b8f83(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x680ca
leaq 0x19a827(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x680ca
leaq 0x19cf1e(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x680cb
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jae 0x680cb
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5707f
movl $0xab, %edi
callq 0x523f2
pushq $0x2
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_secondary_timing()
void request_secondary_timing()
{
   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) return;
   else if(SV6_FAMILY) return;

   send_tsip_start(0x8E);
   send_byte(0xAC);
   send_byte(0x02);
   send_tsip_end();
}

// Assembly:
leaq 0x1c0e46(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x68131
leaq 0x2b8f1c(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x68131
leaq 0x19a7c0(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x68131
leaq 0x19ceb7(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x68132
movl $0x20000009, %ecx       # imm = 0x20000009
btl %eax, %ecx
jae 0x68132
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5707f
movl $0xac, %edi
callq 0x523f2
pushq $0x2
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_ae_packet(unsigned char)
void request_ae_packet(u08 subcode)
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;
   if(ACU_GG) return;
   if(ACU_360) return;
   if(ACUTIME) return;
   if(PALISADE) return;
   if(SV6_FAMILY) return;

   send_tsip_start(0x8E);
   send_byte(0xAE);
   send_byte(subcode);
   send_tsip_end();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1c0dd9(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x681a0
leaq 0x2b8eaf(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x681a0
leaq 0x19a753(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x681a0
movl %edi, %ebx
leaq 0x19ce48(%rip), %rax    # 0x204fd4
movl (%rax), %eax
addl $-0x33, %eax
cmpl $0x1d, %eax
ja 0x681a7
movl $0x20004009, %ecx       # imm = 0x20004009
btl %eax, %ecx
jae 0x681a7
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x8e, %edi
callq 0x5707f
movl $0xae, %edi
callq 0x523f2
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: get_gps_time()
void get_gps_time()
{
float gps_tow;
u16 xgps_week;
float gps_utc_offset;

   log_packet_id("Packet 0x41 - GPS time");

   gps_tow = sv6_tow = tsip_single();
   xgps_week = sv6_week = tsip_word();
   faked_tow = 0;
   gps_utc_offset = tsip_single();
   check_tsip_end(1);
   if(tsip_error) return;

   saw_sv6_time = 1;

//sv6_tow = (float) (int) (gps_tow + 0.50);

   if(SV6_FAMILY || (have_pri_time == 0)) {
      have_week = 33;
      gps_week = xgps_week;
      tow = (u32) gps_tow;  
      pri_tow = tow;
      this_tow = tow;
      survey_tow = tow;

      if(have_tow == 0) need_redraw = 3029;
      have_tow = 55;
   }

   if(SV6_FAMILY || (have_pri_time == 0)) {
      if(!user_set_utc_ofs && gps_utc_offset) utc_offset = (int) gps_utc_offset;
      check_utc_ofs(33);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xa33ec(%rip), %rdi     # 0x10b9ee
callq 0x520bf
callq 0x51dc3
movss %xmm0, -0xc(%rbp)
movss %xmm0, 0x2ed7f3(%rip)   # 0x355e0c
callq 0x51c63
movl %eax, %ebx
movw %ax, 0x2ed7e1(%rip)     # 0x355e08
leaq 0x28f11a(%rip), %rax    # 0x2f7748
andl $0x0, (%rax)
callq 0x51dc3
movss %xmm0, -0x10(%rbp)
xorl %edi, %edi
callq 0x52194
leaq 0x1c0927(%rip), %rax    # 0x228f70
cmpl $0x0, (%rax)
je 0x68655
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x19a2a0(%rip), %rax    # 0x2028fc
movl $0x1, (%rax)
leaq 0x19a267(%rip), %rax    # 0x2028d0
movq (%rax), %rax
leaq 0x1c0865(%rip), %rcx    # 0x228ed8
movl (%rcx), %ecx
cmpq $0x1, %rax
jne 0x686a6
testl %ecx, %ecx
je 0x686aa
leaq 0x19c94e(%rip), %rcx    # 0x204fd4
movl (%rcx), %ecx
leal -0x33(%rcx), %edx
cmpl $0x1e, %edx
jae 0x68722
movl $0x20004009, %esi       # imm = 0x20004009
btl %edx, %esi
jae 0x68722
xorl %ecx, %ecx
jmp 0x686ac
testl %ecx, %ecx
jne 0x6864e
movb $0x1, %cl
leaq 0x28ec79(%rip), %rdx    # 0x2f732c
movl $0x21, (%rdx)
leaq 0x28f078(%rip), %rdx    # 0x2f7738
movw %bx, (%rdx)
cvttss2si -0xc(%rbp), %rdx
leaq 0x28f06c(%rip), %rsi    # 0x2f773c
movl %edx, (%rsi)
leaq 0x28f06b(%rip), %rsi    # 0x2f7744
movl %edx, (%rsi)
leaq 0x28f05e(%rip), %rsi    # 0x2f7740
movl %edx, (%rsi)
movl %edx, %edx
leaq 0x28f063(%rip), %rsi    # 0x2f7750
movq %rdx, (%rsi)
leaq 0x28ec31(%rip), %rdx    # 0x2f7328
cmpl $0x0, (%rdx)
jne 0x68709
leaq 0x19a141(%rip), %rsi    # 0x202844
movl $0xbd5, (%rsi)          # imm = 0xBD5
movl $0x37, (%rdx)
cmpq $0x1, %rax
jne 0x6873d
testb %cl, %cl
jne 0x68745
leaq 0x19c8b4(%rip), %rax    # 0x204fd4
movl (%rax), %ecx
addl $-0x33, %ecx
cmpl $0x1d, %ecx
ja 0x6864e
movl $0x20004009, %eax       # imm = 0x20004009
btl %ecx, %eax
jb 0x68745
jmp 0x6864e
testb %cl, %cl
je 0x6864e
xorps %xmm0, %xmm0
movss -0x10(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x68754
jnp 0x6876d
leaq 0x28efd9(%rip), %rax    # 0x2f7734
cmpl $0x0, (%rax)
jne 0x6876d
cvttss2si %xmm1, %eax
leaq 0x28efbd(%rip), %rcx    # 0x2f7728
movl %eax, (%rcx)
pushq $0x21
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x51a91