// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: add_rcvr_adev_point(int)
void add_rcvr_adev_point(int why)
{
   // NEW_RCVR

   // add receiver derived pps/osc values to adev queues
   if(jitter_adev) return;  // adev queues in use measuring message timing
    
   if(TICC_USED) {    // ADEV data comes from external time interval counter
      if(have_pps_offset) do_pps_adev(pps_offset);
      if(have_osc_offset) do_osc_adev(osc_offset);
   }
   else if(rcvr_type == BRANDY_RCVR) {
      do_pps_adev(pps_offset);
   }
   else if(rcvr_type == PRS_RCVR) {
      if(have_pps_offset) do_pps_adev(pps_offset);
      if(have_osc_offset) do_osc_adev(osc_offset);
   }
   else if(rcvr_type == RFTG_RCVR) {
///   if(have_pps_offset && last_rftg_phase) do_pps_adev(pps_offset-last_rftg_phase);  
///   last_rftg_phase = pps_offset;
      do_pps_adev(pps_offset);
   }
   else if(rcvr_type == SCPI_RCVR) {  // TINT adevs
      if(have_pps_offset) do_pps_adev(pps_offset/100.00);  
//    if(have_osc_offset) do_osc_adev(osc_offset);  // makes no sense to ADEV
   }
   else if(rcvr_type == UCCM_RCVR) {  // TINT adevs
      if(have_pps_offset) {
         if(scpi_type == UCCMP_TYPE) {
            do_pps_adev((pps_offset/100.00)*UCCMP_PPS_ADEV_SCALE);
         }
         else if(scpi_type == SAMSUNG_TYPE) {
            do_pps_adev((pps_offset/100.00)*SAMSUNG_PPS_ADEV_SCALE);
         }
         else {
            do_pps_adev((pps_offset/100.00)*UCCM_PPS_ADEV_SCALE);
         }
      }

      if(0 && have_osc_offset) {  // UCCM DIAG:LOOP? adevs
         do_osc_adev(osc_offset);  // we don't know what this value actually is, so dont ADEV_STUFF it
      }
   }
   else if(0) {  // adadad
   }
   else if(rcvr_type == GPSD_RCVR) {
      if(have_pps_offset) do_pps_adev(pps_offset);
      if(have_osc_offset) do_osc_adev(osc_offset);
   }
   else if(rcvr_type == MOTO_RCVR) {
      if(have_pps_offset) do_pps_adev(pps_offset);
      if(have_osc_offset) do_osc_adev(osc_offset);
   }
   else if(rcvr_type == NVS_RCVR) {
      if(have_pps_offset) do_pps_adev(pps_offset);
   }
   else if(rcvr_type == SIRF_RCVR) {
      if(have_pps_offset) do_pps_adev(pps_offset);
      if(have_osc_offset) do_osc_adev(osc_offset);
   }
   else if(rcvr_type == TSIP_RCVR) {
      if(have_pps_offset) do_pps_adev(pps_offset / 100.0);
      if(have_osc_offset) do_osc_adev(osc_offset / 100.0);
   }
   else if(rcvr_type == UBX_RCVR) {
      if(have_pps_offset) do_pps_adev(pps_offset);
      if(have_osc_offset) do_osc_adev(osc_offset);
   }
   else if(rcvr_type == ZODIAC_RCVR) {
      if(have_pps_offset) do_pps_adev(pps_offset);
      if(have_osc_offset) do_osc_adev(osc_offset);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1b92a5(%rip), %rax    # 0x226cc4
cmpl $0x0, (%rax)
je 0x6da2b
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x194e9e(%rip), %rax    # 0x2028d0
movq (%rax), %rbx
cmpq $0x10000, %rbx          # imm = 0x10000
je 0x6da47
callq 0x66b41
testl %eax, %eax
je 0x6da85
leaq 0x2897ea(%rip), %rax    # 0x2f7238
cmpl $0x0, (%rax)
je 0x6da63
leaq 0x288d5e(%rip), %rax    # 0x2f67b8
movsd (%rax), %xmm0
callq 0x6d95e
leaq 0x2897ca(%rip), %rax    # 0x2f7234
cmpl $0x0, (%rax)
je 0x6da24
leaq 0x288d4a(%rip), %rax    # 0x2f67c0
movsd (%rax), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6d9b8
cmpq $0x1, %rbx
je 0x6db1a
cmpq $0x4, %rbx
je 0x6da47
cmpq $0x8, %rbx
je 0x6db8b
cmpq $0x10, %rbx
je 0x6db66
cmpq $0x20, %rbx
je 0x6da47
cmpq $0x40, %rbx
je 0x6da47
cmpq $0x100, %rbx            # imm = 0x100
je 0x6da47
cmpq $0x200, %rbx            # imm = 0x200
je 0x6da47
cmpq $0x800, %rbx            # imm = 0x800
je 0x6daf4
cmpq $0x1000000, %rbx        # imm = 0x1000000
je 0x6da47
cmpq $0x400000, %rbx         # imm = 0x400000
je 0x6db04
cmpq $0x40000, %rbx          # imm = 0x40000
je 0x6db04
jmp 0x6da24
leaq 0x28973d(%rip), %rax    # 0x2f7238
cmpl $0x0, (%rax)
je 0x6da24
leaq 0x288cad(%rip), %rax    # 0x2f67b8
movsd (%rax), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x6d95e
leaq 0x289717(%rip), %rax    # 0x2f7238
cmpl $0x0, (%rax)
je 0x6db3e
leaq 0x288c8b(%rip), %rax    # 0x2f67b8
movsd (%rax), %xmm0
divsd 0x85527(%rip), %xmm0    # 0xf3060
callq 0x6d95e
leaq 0x2896ef(%rip), %rax    # 0x2f7234
cmpl $0x0, (%rax)
je 0x6da24
leaq 0x288c6b(%rip), %rax    # 0x2f67c0
movsd (%rax), %xmm0
divsd 0x854ff(%rip), %xmm0    # 0xf3060
jmp 0x6da7a
leaq 0x2896cb(%rip), %rax    # 0x2f7238
cmpl $0x0, (%rax)
je 0x6da24
leaq 0x288c3b(%rip), %rax    # 0x2f67b8
movsd (%rax), %xmm0
divsd 0x854d7(%rip), %xmm0    # 0xf3060
jmp 0x6db0f
leaq 0x2896a6(%rip), %rax    # 0x2f7238
cmpl $0x0, (%rax)
je 0x6da24
leaq 0x19743e(%rip), %rax    # 0x204fe0
movl (%rax), %eax
leaq 0x288c0d(%rip), %rcx    # 0x2f67b8
movsd (%rcx), %xmm0
divsd 0x854a9(%rip), %xmm0    # 0xf3060
cmpl $0x53, %eax
je 0x6dbce
cmpl $0x50, %eax
jne 0x6dbdb
mulsd 0x9a74f(%rip), %xmm0    # 0x108318
jmp 0x6db0f
mulsd 0x9a73a(%rip), %xmm0    # 0x108310
jmp 0x6db0f
mulsd 0x9a73d(%rip), %xmm0    # 0x108320
jmp 0x6db0f