// File: 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
subq $0x10, %rsp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x1(%rbp)
movb %al, -0x2(%rbp)
movl %edx, -0x8(%rbp)
leaq 0x2fb59c(%rip), %rax    # 0x3961fa
cmpb $0x0, (%rax)
je 0x9ac68
jmp 0x9ae79
leaq 0x2034af(%rip), %rax    # 0x29e11e
cmpb $0x0, (%rax)
je 0x9ac79
jmp 0x9ae79
leaq 0x1dce30(%rip), %rax    # 0x277ab0
cmpq $0x20000000, (%rax)     # imm = 0x20000000
jne 0x9ac8e
jmp 0x9ae79
leaq 0x1dce1b(%rip), %rax    # 0x277ab0
cmpq $0x20, (%rax)
jne 0x9acca
leaq 0xe94b0(%rip), %rdi     # 0x184152
callq 0x86190
cmpb $0x0, -0x1(%rbp)
je 0x9acb9
movl $0x3, %edi
callq 0x7b210
jmp 0x9acc0
xorl %edi, %edi
callq 0x7b210
callq 0x86230
jmp 0x9ae77
leaq 0x1dcddf(%rip), %rax    # 0x277ab0
cmpq $0x800, (%rax)          # imm = 0x800
jne 0x9ad24
cmpl $0x5a0, -0x8(%rbp)      # imm = 0x5A0
jbe 0x9acec
movl $0x5a0, -0x8(%rbp)      # imm = 0x5A0
jmp 0x9acfb
cmpl $0x14, -0x8(%rbp)
jae 0x9acf9
movl $0x14, -0x8(%rbp)
jmp 0x9acfb
movl $0x1d, %edi
callq 0x824f0
movl $0x6, %edi
callq 0x7b210
movl -0x8(%rbp), %eax
movzwl %ax, %edi
callq 0x7b4b0
callq 0x82630
jmp 0x9ae75
leaq 0x1dcd85(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0x9ae4e
leaq 0x1dcd74(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0x9ad5f
leaq 0x1df46b(%rip), %rax    # 0x27a1b4
cmpl $0x41, (%rax)
jne 0x9ad5f
leaq 0x1dcd83(%rip), %rax    # 0x277ad8
cmpl $0x47, (%rax)
jne 0x9ad5f
jmp 0x9ae12
leaq 0x1dcd4a(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0x9ad92
leaq 0x1df441(%rip), %rax    # 0x27a1b4
cmpl $0x41, (%rax)
jne 0x9ad92
leaq 0x1dcd59(%rip), %rax    # 0x277ad8
cmpl $0x33, (%rax)
je 0x9ad90
leaq 0x1dcd4d(%rip), %rax    # 0x277ad8
cmpl $0x47, (%rax)
jne 0x9ad92
jmp 0x9ae10
leaq 0x1dcd17(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0x9adad
leaq 0x1df40e(%rip), %rax    # 0x27a1b4
cmpl $0x41, (%rax)
jne 0x9adad
jmp 0x9ae0e
leaq 0x1dccfc(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0x9adcb
leaq 0x1df3f3(%rip), %rax    # 0x27a1b4
cmpl $0x50, (%rax)
jne 0x9adcb
jmp 0x9ae79
leaq 0x1dccde(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0x9ae0a
leaq 0x1df3d5(%rip), %rax    # 0x27a1b4
cmpl $0x36, (%rax)
je 0x9ae08
leaq 0x1df3c9(%rip), %rax    # 0x27a1b4
cmpl $0x33, (%rax)
je 0x9ae08
leaq 0x1df3bd(%rip), %rax    # 0x27a1b4
cmpl $0x50, (%rax)
je 0x9ae08
leaq 0x1df3b1(%rip), %rax    # 0x27a1b4
cmpl $0x41, (%rax)
jne 0x9ae0a
jmp 0x9ae79
jmp 0x9ae0c
jmp 0x9ae0e
jmp 0x9ae10
jmp 0x9ae12
movl $0x8e, %edi
callq 0x824f0
movl $0xa9, %edi
callq 0x7b210
movzbl -0x1(%rbp), %edi
callq 0x7b210
movzbl -0x2(%rbp), %edi
callq 0x7b210
movl -0x8(%rbp), %edi
callq 0x7b520
xorl %edi, %edi
callq 0x7b520
callq 0x82590
jmp 0x9ae73
leaq 0x1dcc5b(%rip), %rax    # 0x277ab0
cmpq $0x200000, (%rax)       # imm = 0x200000
jne 0x9ae60
jmp 0x9ae71
leaq 0x1dcc49(%rip), %rax    # 0x277ab0
cmpq $0x4, (%rax)
jne 0x9ae6f
jmp 0x9ae6f
jmp 0x9ae71
jmp 0x9ae73
jmp 0x9ae75
jmp 0x9ae77
jmp 0x9ae79
addq $0x10, %rsp
popq %rbp
retq
nop