LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: send_zod_start(unsigned short, unsigned short, unsigned short)
void send_zod_start(u16 id, u16 len, u16 flags)
{
u16 cksum;

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

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

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

   zod_seq_num = (zod_seq_num + 1) & 0x7FFF;

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

   zodiac_tx_cksum = 0;
   zodiac_tx_cnt = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movl %edi, %r15d
leaq 0x1cbd2c(%rip), %rax    # 0x228360
movq (%rax), %rdi
movzwl %r15w, %r14d
movzwl %dx, %ebx
testq %rdi, %rdi
je 0x5c667
leaq 0x1cbdc6(%rip), %rax    # 0x228410
testb $0x4, (%rax)
je 0x5c667
movzwl %r12w, %ecx
leaq 0xb2401(%rip), %rsi     # 0x10ea5b
movl %r14d, %edx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x9560
cmpw $0x564, %r15w           # imm = 0x564
je 0x5c6de
leal -0x6(%r12), %r13d
addl %r12d, %r15d
leal (%rbx,%r15), %eax
movl $0x7e07, %r15d          # imm = 0x7E07
subl %eax, %r15d
movzwl 0x2fa4a5(%rip), %eax    # 0x356b30
incl %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movw %ax, 0x2fa497(%rip)     # 0x356b30
movl $0x81ff, %edi           # imm = 0x81FF
callq 0x52599
movl %r14d, %edi
callq 0x52599
movl $0xffff, %r14d          # imm = 0xFFFF
andl %r14d, %r13d
movl %r13d, %edi
callq 0x52599
movl %ebx, %edi
callq 0x52599
andl %r14d, %r15d
movl %r15d, %edi
callq 0x52599
andw $0x0, 0x2fa444(%rip)    # 0x356b1a
andw $0x0, 0x2fa43a(%rip)    # 0x356b18
addq $0x8, %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: send_zod_end()
void send_zod_end()
{
   if(zodiac_tx_cksum != 0x8000) zodiac_tx_cksum = (0 - zodiac_tx_cksum) & 0xFFFF;

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

// Assembly:
movzwl 0x2fa415(%rip), %eax    # 0x356b1a
cmpw $0x8000, %ax            # imm = 0x8000
jne 0x5c70f
xorl %eax, %eax
jmp 0x5c718
negl %eax
movw %ax, 0x2fa402(%rip)     # 0x356b1a
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movzbl %al, %esi
pushq $0xa
popq %rbx
movl %ebx, %edi
xorl %edx, %edx
callq 0xba3b
movzbl 0x2fa3e7(%rip), %esi    # 0x356b1b
pushq $0x1
popq %rdx
movl %ebx, %edi
callq 0xba3b
leaq 0x1cbc7b(%rip), %rax    # 0x2283c0
cmpq $0x0, (%rax)
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
je 0x5c753
retq
pushq $0x32
popq %rdi
jmp 0xae83
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_venus_mode(int)
void set_venus_mode(int mode)
{
   // mode 1: NMEA output (accepts binary input) 2:binary output
   if(read_only) return;  // !!!!!!!!!!!!!!!!!

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

// Assembly:
leaq 0x2c42ae(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5cd72
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x9
popq %rdi
pushq $0x3
popq %rsi
callq 0x582b6
movzbl %bl, %edi
callq 0x523f2
pushq $0x1
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x58354
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: send_ss_start(int, int)
void send_ss_start(int id, int len)
{
   ss_tx_cksum = 0;
   len -= 4;   // 4 bytes of header

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

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

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

// Assembly:
leaq 0x1cbc09(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x5d366
leaq 0x2c3cdf(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x5d366
leaq 0x1a5583(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5d366
leaq 0x1a7c7a(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x5d366
cmpl $0x36, %eax
jne 0x5d367
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5707f
pushq $0x41
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_prodn_params()
void request_prodn_params()
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;
   if(ACU_GG) ;
   else if(ACU_360) ;
   else if(ACUTIME) ;
   else if(PALISADE) ;
   else if(SV6_FAMILY) return;

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

// Assembly:
leaq 0x1cbbb4(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x5d3bb
leaq 0x2c3c8a(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x5d3bb
leaq 0x1a552e(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5d3bb
leaq 0x1a7c25(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x5d3bb
cmpl $0x36, %eax
jne 0x5d3bc
retq
pushq %rbp
movq %rsp, %rbp
movl $0x8e, %edi
callq 0x5707f
pushq $0x42
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: start_rftg_request(int)
void start_rftg_request(int dont_do)
{
if(dont_do) return;

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

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

// Assembly:
testl %edi, %edi
je 0x5d3dd
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
pushq $0x34
popq %r14
movl %r14d, %edi
callq 0x5707f
xorl %edi, %edi
callq 0x523f2
pushq $0x40
popq %r15
movl %r15d, %edi
callq 0x523f2
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x523f2
movl $0xff, %edi
callq 0x523f2
pushq $0x2
popq %rdi
callq 0x523f2
callq 0x570f8
movl %r14d, %edi
callq 0x5707f
xorl %edi, %edi
callq 0x523f2
movl %r15d, %edi
callq 0x523f2
movl %ebx, %edi
callq 0x523f2
movl $0xff, %edi
callq 0x523f2
movl %ebx, %edi
callq 0x523f2
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: start_rftg_request2(int)
void start_rftg_request2(int dont_do)
{
if(dont_do) return;

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

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

// Assembly:
testl %edi, %edi
je 0x5d46a
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq $0x34
popq %rbx
movl %ebx, %edi
callq 0x5707f
xorl %edi, %edi
callq 0x523f2
pushq $0x40
popq %r14
movl %r14d, %edi
callq 0x523f2
pushq $0x1
popq %r15
movl %r15d, %edi
callq 0x523f2
movl $0xff, %edi
callq 0x523f2
pushq $0x2
popq %r12
movl %r12d, %edi
callq 0x523f2
callq 0x570f8
movl %ebx, %edi
callq 0x5707f
xorl %edi, %edi
callq 0x523f2
movl %r14d, %edi
callq 0x523f2
movl %r15d, %edi
callq 0x523f2
movl $0xff, %edi
callq 0x523f2
movl %r12d, %edi
callq 0x523f2
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_cable()
void request_rftg_cable()
{
   start_rftg_request(1);    // request cable delay (in feet)

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

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq $0x35
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x525e2
callq 0x570f8
popq %rbp
jmp 0x5d4f6
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_voltages()
void request_rftg_voltages()
{
// start_rftg_request(1);
   if(no_poll) return;

start_rftg_request2(0);

   send_rftg_start(0x43);
   send_rftg_end();

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

   set_rftg_normal();
}

// Assembly:
leaq 0x2c3ae4(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d542
retq
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0x5d465
pushq $0x43
popq %rdi
callq 0x5707f
callq 0x570f8
popq %rbp
jmp 0x5d4f6
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_errlog()
void request_rftg_errlog()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c3ab9(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d56d
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x37
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_warmup_time()
void request_rftg_warmup_time()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c3a16(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d610
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x62
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x52599
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_delta_ape()
void request_rftg_delta_ape()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c39e8(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d63e
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x65
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x525e2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_const_ape()
void request_rftg_const_ape()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c39ba(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d66c
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x66
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x525e2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_ape2()
void request_rftg_ape2()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c398c(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d69a
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x68
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x525e2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_ape()
void request_rftg_ape()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c395e(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d6c8
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x69
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x525e2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_delta_temp()
void request_rftg_delta_temp()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c3930(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d6f6
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x70
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x525e2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_corr_sched()
void request_rftg_corr_sched()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c3902(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d724
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x74
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x52599
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_hw_ver()
void request_rftg_hw_ver()
{
   if(no_poll) return;

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

///   set_rftg_normal();
}

// Assembly:
leaq 0x2c38d4(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d752
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x71
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_rftg_avg_sample()
void request_rftg_avg_sample()
{
   if(no_poll) return;

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

// Assembly:
leaq 0x2c38a6(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
je 0x5d780
retq
pushq %rbp
movq %rsp, %rbp
pushq $0x72
popq %rdi
callq 0x5707f
pushq $0x2
popq %rdi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: query_venus_msg(int, int)
void query_venus_msg(int id, int sub_id)
{
   if(sub_id >= 0) {
      send_venus_start(id, 2);
      send_byte(sub_id);
   }
   else {
      send_venus_start(id, 1);
   }
   send_venus_end();
}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0xe7d9
leaq 0xb2773(%rip), %rcx     # 0x110476
pushq $0xe
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0xe2d2
callq 0xaa05
movl $0xbb8, %edi            # imm = 0xBB8
callq 0xae83
callq 0xe7d9
popq %rbp
jmp 0xaa05
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_almanac(int)
void request_almanac(int prn)
{
   if(luxor) return;
   if(no_poll) return;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1cb208(%rip), %rax    # 0x228f3e
leaq 0x2c32e3(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
jne 0x5dd87
movl %edi, %ebx
leaq 0x1a4b84(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x5dd74
cmpq $0x800, %rax            # imm = 0x800
jne 0x5dd87
pushq $0x20
popq %rdi
callq 0x5707f
cmpl $0x3f, %ebx
jg 0x5dd8e
pushq $0x1
popq %rdi
callq 0x523f2
jmp 0x5dd99
leaq 0x1a7259(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x5dd87
cmpl $0x36, %eax
jne 0x5ddac
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $0x2
popq %rdi
callq 0x523f2
addb $-0x40, %bl
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57171
pushq $0x20
popq %rdi
callq 0x5707f
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_atten(double)
void set_atten(double val)
{
   if(read_only) return;

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

// Assembly:
leaq 0x2c321d(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5de03
retq
leaq 0x1a4ac6(%rip), %rax    # 0x2028d0
cmpq $0x200000, (%rax)       # imm = 0x200000
jne 0x5ddc7
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cvttsd2si %xmm0, %edx
leaq 0x2c83f8(%rip), %rbx    # 0x326220
leaq 0xaca43(%rip), %rsi     # 0x10a872
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x57acc
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5ddc7
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_antenna(int)
void set_antenna(int i)
{
   if(read_only) return;

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

// Assembly:
leaq 0x2c31c7(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x5de9c
leaq 0x1a4a71(%rip), %rax    # 0x2028d0
movabsq $0x400000000, %rcx      # imm = 0x400000000
cmpq %rcx, (%rax)
jne 0x5de9c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %edx
leaq 0x2c83a3(%rip), %rbx    # 0x326220
leaq 0xac9f7(%rip), %rsi     # 0x10a87b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57a21
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_sat_list()
void request_sat_list()
{
   if(luxor) return;
   if(no_poll) return;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1cb096(%rip), %rax    # 0x228f3e
leaq 0x2c3171(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
setne %cl
leaq 0x1a4a13(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movl $0x80000000, %edx       # imm = 0x80000000
cmpq %rdx, %rax
sete %dl
orb %cl, %dl
je 0x5ded1
popq %rbp
retq
cmpq $0x1, %rax
je 0x5dfb7
cmpq $0x4, %rax
je 0x5df7e
cmpq $0x20, %rax
je 0x5df9e
cmpq $0x100, %rax            # imm = 0x100
je 0x5df89
cmpq $0x800, %rax            # imm = 0x800
je 0x5df58
cmpq $0x200000, %rax         # imm = 0x200000
je 0x5df71
cmpq $0x400000, %rax         # imm = 0x400000
je 0x5df66
cmpq $0x20000000, %rax       # imm = 0x20000000
jne 0x5decf
leaq 0xac960(%rip), %rdi     # 0x10a882
callq 0x578d5
leaq 0xac978(%rip), %rdi     # 0x10a8a6
callq 0x578d5
leaq 0xac972(%rip), %rdi     # 0x10a8ac
callq 0x578d5
leaq 0xac96c(%rip), %rdi     # 0x10a8b2
callq 0x578d5
leaq 0xac966(%rip), %rdi     # 0x10a8b8
popq %rbp
jmp 0x578d5
pushq $0x24
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x57171
callq 0x5d5a6
popq %rbp
jmp 0x5d4f6
leaq 0xac949(%rip), %rdi     # 0x10a8c1
popq %rbp
jmp 0x57acc
movl $0x104, %edi            # imm = 0x104
popq %rbp
jmp 0x59749
movl $0x3ea, %edi            # imm = 0x3EA
callq 0x5dabd
movl $0x3eb, %edi            # imm = 0x3EB
popq %rbp
jmp 0x5dabd
leaq 0xac919(%rip), %rdi     # 0x10a8be
callq 0x59a28
xorl %edi, %edi
callq 0x523f2
popq %rbp
jmp 0x59aab
pushq $0x24
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_gps_time()
void request_gps_time()
{
   if(luxor) return;
   if(no_poll) return;

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

// Assembly:
leaq 0x1caf72(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x5dfd2
retq
leaq 0x2c3047(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x5dfd1
leaq 0x1a48eb(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5dfd1
pushq %rbp
movq %rsp, %rbp
pushq $0x21
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_sig_levels()
void request_sig_levels()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x27);
      send_tsip_end();
   }
   else if(rcvr_type == UBX_RCVR) {
      if(raw_msg_rate == 0) {   // poll for doppler, etc
         request_ubx_msg(UBX_SVN); // sat info
         request_ubx_msg(UBX_RAW);  
         request_ubx_msg(UBX_RAWX);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1caf36(%rip), %rax    # 0x228f3e
leaq 0x2c3011(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
je 0x5e017
popq %rbp
retq
leaq 0x1a48b2(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
jne 0x5e035
pushq $0x27
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
cmpq $0x4, %rax
jne 0x5e015
leaq 0x1a7336(%rip), %rax    # 0x205378
cmpl $0x0, (%rax)
jne 0x5e015
movl $0x130, %edi            # imm = 0x130
callq 0x59749
movl $0x210, %edi            # imm = 0x210
callq 0x59749
movl $0x215, %edi            # imm = 0x215
popq %rbp
jmp 0x59749
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_alm_health()
void request_alm_health()
{
   if(no_poll) return;
   if(res_t) return;
   if(luxor) return;

   if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) ;
      else if(ACU_360) ;
      else if(ACUTIME) ;
      else if(PALISADE) ;
      else if(SV6_FAMILY) return;
      send_tsip_start(0x29);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2c2fb3(%rip), %rax    # 0x321020
leaq 0x1a4890(%rip), %rcx    # 0x202904
movb (%rcx), %cl
orb (%rax), %cl
je 0x5e07b
retq
leaq 0x1caebc(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x5e07a
leaq 0x1a4842(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5e07a
leaq 0x1a6f39(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x5e07a
cmpl $0x36, %eax
je 0x5e07a
pushq %rbp
movq %rsp, %rbp
pushq $0x29
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_xyz(float, float, float)
void set_xyz(float x, float y, float z)
{
   if(read_only) return;
   if(luxor) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x31);
      send_single(x);
      send_single(y);
      send_single(z);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2c2f5a(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5e0c6
retq
leaq 0x1cae71(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x5e0c5
leaq 0x1a47f7(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5e0c5
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
pushq $0x31
popq %rdi
movss %xmm2, -0xc(%rbp)
movss %xmm1, -0x8(%rbp)
movss %xmm0, -0x4(%rbp)
callq 0x5707f
movss -0x4(%rbp), %xmm0
callq 0x52673
movss -0x8(%rbp), %xmm0
callq 0x52673
movss -0xc(%rbp), %xmm0
callq 0x52673
addq $0x10, %rsp
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_ref_input(int)
void set_ref_input(int ref)
{
   // ref=0: GPS
   // ref=1: AUX PPS input

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

   if(rcvr_type == STAR_RCVR) {
      if     (ref == 0) queue_star_cmd("INPUT_TYPE(1)=GPS;", STAR_INP_TYPE_MSG);       // gps input
      else if(ref == 1) queue_star_cmd("INPUT_TYPE(1)=AUX;", STAR_INP_TYPE_MSG);  // pps input
      queue_star_cmd("INPUT_TYPE(1);", STAR_INP_TYPE_MSG);  // !!! this command is not valid for ATDC model
   }
   else request_rcvr_config(7788);
}

// Assembly:
leaq 0x2c2eed(%rip), %rax    # 0x32101a
leaq 0x1cae0a(%rip), %rcx    # 0x228f3e
movb (%rcx), %cl
orb (%rax), %cl
je 0x5e13b
retq
leaq 0x1a478e(%rip), %rax    # 0x2028d0
cmpq $0x1000, (%rax)         # imm = 0x1000
jne 0x5e15d
testl %edi, %edi
je 0x5e167
cmpl $0x1, %edi
jne 0x5e17d
leaq 0xac781(%rip), %rdi     # 0x10a8dc
jmp 0x5e16e
movl $0x1e6c, %edi           # imm = 0x1E6C
jmp 0x5e18e
leaq 0xac75b(%rip), %rdi     # 0x10a8c9
pushq %rbp
movq %rsp, %rbp
movl $0xcb, %esi
callq 0x576d4
popq %rbp
leaq 0xac76b(%rip), %rdi     # 0x10a8ef
movl $0xcb, %esi
jmp 0x576d4
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_venus_survey(int, double, double, double)
void set_venus_survey(int mode, double slat,double slon,double salt)
{
   if(read_only) return;

   if(saw_venus_raw) send_venus_start(SET_VENUS_RTK_SURVEY);
   else              send_venus_start(SET_VENUS_SURVEY);
   send_byte(mode);       // 0=timing pvt mode  1=do survey  2=posn hold mode
   send_dword(do_survey);
   send_dword(100);             // standard deviation
   send_double(slat*180.0/PI);  // lla only used for position hold mode
   send_double(slon*180.0/PI);
   send_single((float)salt);
   send_venus_save(1);
}

// Assembly:
leaq 0x2c2a61(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5e5bf
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
leaq 0x2c9823(%rip), %rax    # 0x327df4
cmpl $0x0, (%rax)
pushq $0x54
popq %rax
pushq $0x22
popq %rdi
cmovel %eax, %edi
pushq $0x1f
popq %rsi
movsd %xmm2, -0x20(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm0, -0x10(%rbp)
callq 0x582b6
movzbl %bl, %edi
callq 0x523f2
leaq 0x299875(%rip), %rax    # 0x2f7e78
movl (%rax), %edi
callq 0x525e2
pushq $0x64
popq %rdi
callq 0x525e2
movsd -0x10(%rbp), %xmm0
mulsd 0x97289(%rip), %xmm0    # 0xf58a8
divsd 0x97279(%rip), %xmm0    # 0xf58a0
callq 0x526bd
movsd -0x18(%rbp), %xmm0
mulsd 0x9726f(%rip), %xmm0    # 0xf58a8
divsd 0x9725f(%rip), %xmm0    # 0xf58a0
callq 0x526bd
cvtsd2ss -0x20(%rbp), %xmm0
callq 0x52673
pushq $0x1
popq %rdi
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x58354
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_filter_factor(double)
void set_filter_factor(DATA_SIZE val)
{
   if(read_only) return;

   if(rcvr_type == NVS_RCVR) {
      send_nvs_start(0x0D);
      send_byte(0x04);
      send_single((float) val);
      send_nvs_end();
   }
}

// Assembly:
leaq 0x2c29b5(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
jne 0x5e6ab
leaq 0x1a425f(%rip), %rax    # 0x2028d0
cmpq $0x800, (%rax)          # imm = 0x800
jne 0x5e6ab
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
pushq $0xd
popq %rdi
movsd %xmm0, -0x8(%rbp)
callq 0x5707f
pushq $0x4
popq %rdi
callq 0x523f2
cvtsd2ss -0x8(%rbp), %xmm0
callq 0x52673
addq $0x10, %rsp
popq %rbp
jmp 0x57171
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rtcm_mode(int)
void set_rtcm_mode(int enable)
{
   if(rcvr_type == VENUS_RCVR) {  // raw Hz !!!!
      send_venus_start(SET_VENUS_RTCM);
      send_byte(enable);
      send_byte(0);   // 1Hz rnx2  0..6 -> 1/2/4/5/10/20/8 Hz

      send_byte(1);   // base station ARP
      if(gnss_mask & GPS)     send_byte(1);
      else                    send_byte(0);

      if(gnss_mask & GLONASS) send_byte(1);
      else                    send_byte(0);

      if(1)                   send_byte(0);  // reserved

      if(gnss_mask & SBAS)    send_byte(1);
      else                    send_byte(0);

      if(gnss_mask & QZSS)    send_byte(1);
      else                    send_byte(0);

      if(gnss_mask & BEIDOU)  send_byte(1);
      else                    send_byte(0);

      send_byte(0);  // reserved
      send_byte(0);  // reserved
      send_byte(0);  // reserved
      send_byte(0);  // reserved
      send_byte(0);  // reserved
      send_byte(0);  // reserved
      send_venus_save(1);
   }
}

// Assembly:
leaq 0x1a421d(%rip), %rax    # 0x2028d0
cmpq $0x80, (%rax)
jne 0x5e774
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
pushq $0x20
popq %rdi
pushq $0x11
popq %rsi
callq 0x582b6
movzbl %bl, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x523f2
leaq 0xfc580(%rip), %r14     # 0x15ac74
movl (%r14), %edi
andl $0x1, %edi
callq 0x523f2
movzbl (%r14), %edi
shrl %edi
andl $0x1, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
movl (%r14), %edi
shrl $0xf, %edi
andl $0x1, %edi
callq 0x523f2
movl (%r14), %edi
shrl $0xe, %edi
andl $0x1, %edi
callq 0x523f2
movzbl (%r14), %edi
shrl $0x3, %edi
andl $0x1, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x523f2
movl %ebx, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x58354
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_ubx_rate(int, int)
void set_ubx_rate(int id, int rate)
{
   // set periodic output rate for a UBX message
   if(read_only) return;

   send_ubx_start(UBX_SET_RATE, 3);
   send_byte((id >> 8) & 0xFF);
   send_byte(id & 0xFF);
   send_byte(rate);
   send_ubx_end();
}

// Assembly:
leaq 0x2c245f(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5ebc1
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
pushq $0x3
popq %rsi
movl $0x601, %edi            # imm = 0x601
callq 0x57bf3
movl %r14d, %edi
shrl $0x8, %edi
movl $0xff, %r15d
andl %r15d, %edi
callq 0x523f2
andl %r15d, %r14d
movl %r14d, %edi
callq 0x523f2
andl %r15d, %ebx
movl %ebx, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57cca
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rinex_site(char*)
void set_rinex_site(char *s)
{
   // set RINEX site name
   if(read_only) return;

   if(s == 0) return;

   if(rcvr_type == Z12_RCVR) {
      out[4] = 0;
      sprintf(out, "PASHS,SIT,%s", s);
      send_z12_cmd(out);
   }
}

// Assembly:
leaq 0x2c23fe(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5ec22
retq
movq %rdi, %rdx
testq %rdi, %rdi
je 0x5ec21
leaq 0x1a3c9f(%rip), %rax    # 0x2028d0
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, (%rax)
jne 0x5ec21
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2c75d3(%rip), %rbx    # 0x326220
movb $0x0, 0x4(%rbx)
leaq 0xabd3e(%rip), %rsi     # 0x10a996
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57b55
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_rftg_lla(int, int, int)
void set_rftg_lla(S32 slat, S32 slon, S32 salt)
{
   if(read_only) return;

   start_rftg_request2(0);

   send_rftg_start(0x32);
   send_dword(slat);
   send_dword(slon);
   send_dword(salt);
   send_rftg_end();
}

// Assembly:
leaq 0x2c172e(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5f8f2
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movl %edi, %r15d
xorl %edi, %edi
callq 0x5d465
pushq $0x32
popq %rdi
callq 0x5707f
movl %r15d, %edi
callq 0x525e2
movl %r14d, %edi
callq 0x525e2
movl %ebx, %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: set_zod_config(int, double, double, double, unsigned int, int)
void set_zod_config(int mode, double slat,double slon,double salt, u32 traim, int why)
{
S32 val;
u16 pps_suppress;

//sprintf(debug_text2, "set zod config: %d", why);
   if(read_only) return;

   send_zod_start(ZOD_SET_CONFIG, 24, 0);
   send_zod_seq();

   send_word(mode);
   send_word(1);     // power up in posn hold mode
   send_dword((S32) (cable_delay*1.0E9));
   send_word((u16) do_survey);  // hours

   val = (S32) (slat * 1.0E8);    // lat lon alt
   send_dword(val);
   val = (S32) (slon * 1.0E8);
   send_dword(val);
   val = (S32) (salt * 1.0E2);
   send_dword(val);

   pps_suppress = 0;  // !!!! zorky set to 1 to suppress PPS pulses if traim error

   if(time_flags & TFLAGS_UTC) send_word(0x0000 | pps_suppress);  // align to UTC
   else                        send_word(0x0002 | pps_suppress);  // align to GPS

   send_word(0x0007);  // traim alarm due to any time fault

   if(traim == 0) send_word(1);  // traim disabled
   else           send_word(0);  // traim enabled
   send_word(traim/50);

   send_dword(0);  // reserved

   send_zod_end();

   Sleep(200);  // zorky
   query_zod_msg(ZOD_TRAIM_CONFIG_MSG);
}

// Assembly:
leaq 0x2c1525(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5fafb
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %r15d
pushq $0x18
popq %rsi
movl $0x4e7, %edi            # imm = 0x4E7
xorl %edx, %edx
movsd %xmm2, -0x30(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm0, -0x20(%rbp)
callq 0x5c619
callq 0x5c6ed
movl $0xffff, %r14d          # imm = 0xFFFF
andl %r14d, %r15d
movl %r15d, %edi
callq 0x52599
pushq $0x1
popq %rdi
callq 0x52599
leaq 0x298278(%rip), %rax    # 0x2f7dc8
movsd (%rax), %xmm0
mulsd 0x934cc(%rip), %xmm0    # 0xf3028
cvttsd2si %xmm0, %edi
callq 0x525e2
leaq 0x29830c(%rip), %rax    # 0x2f7e78
movzwl (%rax), %edi
callq 0x52599
movsd -0x20(%rbp), %xmm0
mulsd 0xa86bf(%rip), %xmm0    # 0x108240
cvttsd2si %xmm0, %edi
callq 0x525e2
movsd -0x28(%rbp), %xmm0
mulsd 0xa86a9(%rip), %xmm0    # 0x108240
cvttsd2si %xmm0, %edi
callq 0x525e2
movsd -0x30(%rbp), %xmm0
mulsd 0x934b3(%rip), %xmm0    # 0xf3060
cvttsd2si %xmm0, %edi
callq 0x525e2
leaq 0x2978e7(%rip), %rax    # 0x2f74a4
movl (%rax), %edi
notl %edi
addl %edi, %edi
andl $0x2, %edi
callq 0x52599
pushq $0x7
popq %rdi
callq 0x52599
xorl %edi, %edi
testl %ebx, %ebx
sete %dil
callq 0x52599
pushq $0x32
popq %rcx
movl %ebx, %eax
xorl %edx, %edx
divl %ecx
andl %eax, %r14d
movl %r14d, %edi
callq 0x52599
xorl %edi, %edi
callq 0x525e2
callq 0x5c6fe
movl $0xc8, %edi
callq 0xae83
movl $0x41f, %edi            # imm = 0x41F
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5dabd
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_io_options()
void request_io_options()
{
   if(luxor) return;
   if(no_poll) return;

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

// Assembly:
leaq 0x1c9319(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x5fc2b
retq
leaq 0x2c13ee(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x5fc2a
leaq 0x1a2c92(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5fc2a
pushq %rbp
movq %rsp, %rbp
pushq $0x35
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_io_options(unsigned char, unsigned char, unsigned char, unsigned char)
void set_io_options(u08 posn, u08 vel, u08 timing, u08 aux)
{
   if(read_only) return;
   if(luxor) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x35);
      send_byte(posn);
      send_byte(vel);
      send_byte(timing);
      send_byte(aux);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x2c13bd(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x5fc63
retq
leaq 0x1c92d4(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x5fc62
leaq 0x1a2c5a(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5fc62
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %r15d
movl %edi, %r12d
pushq $0x35
popq %rdi
callq 0x5707f
movzbl %r12b, %edi
callq 0x523f2
movzbl %r15b, %edi
callq 0x523f2
movzbl %r14b, %edi
callq 0x523f2
movzbl %bl, %edi
callq 0x523f2
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_last_posn()
void request_last_posn()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) ;
      else if(ACU_360) ;
      else if(ACUTIME) ;
      else if(PALISADE) ;
      else if(SV6_FAMILY) return;
      send_tsip_start(0x37);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1c926d(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x5fcd7
retq
leaq 0x2c1342(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x5fcd6
leaq 0x1a2be6(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5fcd6
leaq 0x1a52dd(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x5fcd6
cmpl $0x36, %eax
je 0x5fcd6
pushq %rbp
movq %rsp, %rbp
pushq $0x37
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_gps_system_msg()
void request_gps_system_msg()
{
  // request GPS system message

   if(luxor) return;
   if(no_poll) return;

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

// Assembly:
leaq 0x1c9222(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x5fd22
retq
leaq 0x2c12f7(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x5fd21
leaq 0x1a2b9b(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5fd21
pushq %rbp
movq %rsp, %rbp
pushq $0x28
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_system_data(unsigned char, int)
void request_system_data(u08 mode, int prn)
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;
   if(have_info == 0) return;

   if(res_t == RES_T) {  // this message can hose up the original res-t for 3 seconds
      if(raw_msg_rate < 3) {  // user can force raw data by setting the rate to 3 secs
         return;
      }
   }

   // mode 2: almanac
   // mode 3: health page
   // mode 4: ionosphere
   // mode 5: UTC params
   // mode 6: ephemeris

   if((prn >= 1) && (prn <= MAX_PRN)) {  // flag that we have asked about this sat
      eph_polled |= (0x01 << (prn-1));
   }

   send_tsip_start(0x38);
   send_byte(0x01);
   send_byte(mode);
   send_byte((u08) prn);
   send_tsip_end();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x1c91e3(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x5fda2
leaq 0x2c12b9(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x5fda2
leaq 0x1a2b5d(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5fda2
leaq 0x297bf4(%rip), %rax    # 0x2f7974
cmpl $0x0, (%rax)
je 0x5fda2
movl %esi, %ebx
movl %edi, %r14d
leaq 0x1a2b73(%rip), %rax    # 0x202904
cmpb $0x1, (%rax)
jne 0x5fda7
leaq 0x1a55db(%rip), %rax    # 0x205378
cmpl $0x3, (%rax)
jge 0x5fda7
popq %rbx
popq %r14
popq %rbp
retq
leal -0x1(%rbx), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0x5fdc0
pushq $0x1
popq %rax
shll %cl, %eax
leaq 0x29768e(%rip), %rcx    # 0x2f744c
orl %eax, (%rcx)
pushq $0x38
popq %rdi
callq 0x5707f
pushq $0x1
popq %rdi
callq 0x523f2
movzbl %r14b, %edi
callq 0x523f2
movzbl %bl, %edi
callq 0x523f2
popq %rbx
popq %r14
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_health_config(unsigned char, int)
void set_health_config(u08 mode, int prn)
{
   // mode 1: enable sat
   // mode 2: disable sat
   // mode 3: get enable/disable status of all sats
   // mode 4: set sat healthy
   // mode 5: set sat unhealthy
   // mode 6: get health of all sats

   if(read_only) return;
   if(luxor) return;
   if((res_t && (res_t != RES_T))) return;
   if(rcvr_type != TSIP_RCVR) return;

   send_tsip_start(0x39); 
   send_byte(mode);
   send_byte((u08) prn);
   send_tsip_end();
}

// Assembly:
leaq 0x2c1229(%rip), %rax    # 0x32101a
leaq 0x1c9146(%rip), %rcx    # 0x228f3e
movb (%rcx), %cl
orb (%rax), %cl
je 0x5fdff
retq
leaq 0x1a2afe(%rip), %rax    # 0x202904
cmpb $0x1, (%rax)
ja 0x5fdfe
leaq 0x1a2abe(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x5fdfe
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
pushq $0x39
popq %rdi
callq 0x5707f
movzbl %r14b, %edi
callq 0x523f2
movzbl %bl, %edi
callq 0x523f2
popq %rbx
popq %r14
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_sat_health()
void request_sat_health()
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == BRANDY_RCVR) {
      queue_brandy_cmd("h", BRANDY_HEALTH_MSG);
   }
   else if(rcvr_type == FURUNO_RCVR) {
   }
   else if(rcvr_type == MOTO_RCVR) {
      send_moto_start("Am");
      send_byte(0xFF);
      send_dword(0);
      send_moto_end();
   }
   else if(rcvr_type == NVS_RCVR) {
      send_nvs_start(0x35);
      send_nvs_end();
   }
   else if(rcvr_type == RFTG_RCVR) {  // this is not sat health requests...
      request_rftg_ape();             // but is part of rcvr_config.  We break
      request_rftg_ape2();            // it up into two groups to avoid overloading
      request_rftg_delta_ape();       // the receiver with requests
      request_rftg_const_ape();
      request_rftg_corr_sched();

      set_rftg_normal();
   }
   else if(rcvr_type == SS_RCVR) {
      request_ss_msg(50);
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(ACU_GG) ;
      else if(ACU_360) ;
      else if(ACUTIME) ;
      else if(PALISADE) ;
      else if(SV6_FAMILY) return;
      set_health_config(3, 0x00);  // request enable/disable status of all sats
      set_health_config(6, 0x00);  // request heed/ignore status of all sats
   }
   else if(rcvr_type == ZODIAC_RCVR) {
      query_zod_msg(ZOD_SETTINGS_MSG);
   }
   else if(rcvr_type == ZYFER_RCVR) {
      send_zyfer_cmd("$SSLT");
      send_zyfer_cmd("$RSAH");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1c90ed(%rip), %rax    # 0x228f3e
leaq 0x2c11c8(%rip), %rcx    # 0x321020
movb (%rcx), %cl
orb (%rax), %cl
je 0x5fe60
popq %rbp
retq
leaq 0x1a2a69(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0x5ff4c
cmpq $0x20, %rax
je 0x5ff10
cmpq $0x100, %rax            # imm = 0x100
je 0x5ff41
cmpq $0x800, %rax            # imm = 0x800
je 0x5ff33
movabsq $0x800000000, %rcx      # imm = 0x800000000
cmpq %rcx, %rax
je 0x5fecf
cmpq $0x100000, %rax         # imm = 0x100000
je 0x5fef7
cmpq $0x400000, %rax         # imm = 0x400000
je 0x5fed8
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x5fe5e
leaq 0xa174b(%rip), %rdi     # 0x10160f
movl $0x194, %esi            # imm = 0x194
popq %rbp
jmp 0x576d4
pushq $0x32
popq %rdi
popq %rbp
jmp 0x5da7a
callq 0x5d6bb
callq 0x5d68d
callq 0x5d631
callq 0x5d65f
callq 0x5d717
popq %rbp
jmp 0x5d4f6
leaq 0xaabe1(%rip), %rdi     # 0x10aadf
callq 0x579af
leaq 0xaabdb(%rip), %rdi     # 0x10aae5
popq %rbp
jmp 0x579af
leaq 0xaabc4(%rip), %rdi     # 0x10aadb
callq 0x59a28
movl $0xff, %edi
callq 0x523f2
xorl %edi, %edi
callq 0x525e2
popq %rbp
jmp 0x59aab
pushq $0x35
popq %rdi
callq 0x5707f
popq %rbp
jmp 0x57171
movl $0x3f4, %edi            # imm = 0x3F4
popq %rbp
jmp 0x5dabd
leaq 0x1a5081(%rip), %rax    # 0x204fd4
movl (%rax), %eax
cmpl $0x33, %eax
je 0x5fe5e
cmpl $0x36, %eax
je 0x5fe5e
pushq $0x3
popq %rdi
xorl %esi, %esi
callq 0x5fdea
pushq $0x6
popq %rdi
xorl %esi, %esi
popq %rbp
jmp 0x5fdea
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: set_zod_sat_mask(unsigned int)
void set_zod_sat_mask(u32 val)
{
   if(read_only) return;

   send_zod_start(ZOD_SET_SAT_MASK, 10, 0);
   send_zod_seq();
   send_dword(val);
   send_word(0);     // don't write to EEPROM
   send_zod_end();

   query_zod_msg(ZOD_SETTINGS_MSG);
}

// Assembly:
leaq 0x2c045c(%rip), %rax    # 0x32101a
cmpb $0x0, (%rax)
je 0x60bc4
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0xa
popq %rsi
movl $0x4bd, %edi            # imm = 0x4BD
xorl %edx, %edx
callq 0x5c619
callq 0x5c6ed
movl %ebx, %edi
callq 0x525e2
xorl %edi, %edi
callq 0x52599
callq 0x5c6fe
movl $0x3f4, %edi            # imm = 0x3F4
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5dabd
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_eph_status(int)
void request_eph_status(int prn)
{
   if(res_t) return;
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;

   send_tsip_start(0x3B);
   send_byte((u08) prn);
   send_tsip_end();
}

// Assembly:
leaq 0x1a1cfa(%rip), %rax    # 0x202904
cmpb $0x0, (%rax)
jne 0x60c57
leaq 0x1c8328(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x60c57
leaq 0x2c03fe(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60c57
leaq 0x1a1ca2(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60c57
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x3b
popq %rdi
callq 0x5707f
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_last_raw(int)
void request_last_raw(int prn)
{
   if(luxor) return;
   if(no_poll) return;

   if(rcvr_type == TSIP_RCVR) {
      send_tsip_start(0x3A);
      send_byte((u08) prn);
      send_tsip_end();
   }
}

// Assembly:
leaq 0x1c82df(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x60c65
retq
leaq 0x2c03b4(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60c64
leaq 0x1a1c58(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60c64
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x3a
popq %rdi
callq 0x5707f
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: request_sat_status(int)
void request_sat_status(int prn)
{
   if(luxor) return;
   if(no_poll) return;
   if(rcvr_type != TSIP_RCVR) return;

   send_tsip_start(0x3C);
   send_byte((u08) prn);
   send_tsip_end();
}

// Assembly:
leaq 0x1c8296(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0x60ce9
leaq 0x2c036c(%rip), %rax    # 0x321020
cmpb $0x0, (%rax)
jne 0x60ce9
leaq 0x1a1c10(%rip), %rax    # 0x2028d0
cmpq $0x1, (%rax)
jne 0x60ce9
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x3c
popq %rdi
callq 0x5707f
movzbl %bl, %edi
callq 0x523f2
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x570f8
retq