// File: 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
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x1f73e2(%rip), %rax    # 0x29bea4
cmpl $0x0, (%rax)
je 0xa4acc
jmp 0xa4ecf
leaq 0x1d2fdd(%rip), %rax    # 0x277ab0
cmpq $0x10000, (%rax)        # imm = 0x10000
je 0xa4ae6
callq 0x992e0
cmpl $0x0, %eax
je 0xa4b23
leaq 0x2c792b(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4b02
leaq 0x2c6e9f(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
leaq 0x2c790b(%rip), %rax    # 0x36c414
cmpl $0x0, (%rax)
je 0xa4b1e
leaq 0x2c6e8b(%rip), %rax    # 0x36b9a0
movsd (%rax), %xmm0
callq 0xa4a20
jmp 0xa4ecf
leaq 0x1d2f86(%rip), %rax    # 0x277ab0
cmpq $0x40000, (%rax)        # imm = 0x40000
jne 0xa4b48
leaq 0x2c6e5e(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
jmp 0xa4ecd
leaq 0x1d2f61(%rip), %rax    # 0x277ab0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0xa4b95
leaq 0x2c78b9(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4b74
leaq 0x2c6e2d(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
leaq 0x2c7899(%rip), %rax    # 0x36c414
cmpl $0x0, (%rax)
je 0xa4b90
leaq 0x2c6e19(%rip), %rax    # 0x36b9a0
movsd (%rax), %xmm0
callq 0xa4a20
jmp 0xa4ecb
leaq 0x1d2f14(%rip), %rax    # 0x277ab0
cmpq $0x400000, (%rax)       # imm = 0x400000
jne 0xa4bba
leaq 0x2c6dec(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
jmp 0xa4ec9
leaq 0x1d2eef(%rip), %rax    # 0x277ab0
cmpq $0x10, (%rax)
jne 0xa4bf4
leaq 0x2c784a(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4bef
leaq 0x2c6dbe(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
movsd 0xca46a(%rip), %xmm1    # 0x16f050
divsd %xmm1, %xmm0
callq 0xa4990
jmp 0xa4ec7
leaq 0x1d2eb5(%rip), %rax    # 0x277ab0
cmpq $0x8, (%rax)
jne 0xa4cb2
leaq 0x2c780c(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4cad
leaq 0x1d55a4(%rip), %rax    # 0x27a1c0
cmpl $0x50, (%rax)
jne 0xa4c4b
leaq 0x2c6d70(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
movsd 0xca41c(%rip), %xmm1    # 0x16f050
divsd %xmm1, %xmm0
movsd 0xde050(%rip), %xmm1    # 0x182c90
mulsd %xmm1, %xmm0
callq 0xa4990
jmp 0xa4cab
leaq 0x1d556e(%rip), %rax    # 0x27a1c0
cmpl $0x53, (%rax)
jne 0xa4c81
leaq 0x2c6d3a(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
movsd 0xca3e6(%rip), %xmm1    # 0x16f050
divsd %xmm1, %xmm0
movsd 0xde012(%rip), %xmm1    # 0x182c88
mulsd %xmm1, %xmm0
callq 0xa4990
jmp 0xa4ca9
leaq 0x2c6d10(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
movsd 0xca3bc(%rip), %xmm1    # 0x16f050
divsd %xmm1, %xmm0
movsd 0xddfe0(%rip), %xmm1    # 0x182c80
mulsd %xmm1, %xmm0
callq 0xa4990
jmp 0xa4cab
jmp 0xa4cad
jmp 0xa4ec5
leaq 0x1d2df7(%rip), %rax    # 0x277ab0
cmpq $0x200, (%rax)          # imm = 0x200
jne 0xa4cff
leaq 0x2c774f(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4cde
leaq 0x2c6cc3(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
leaq 0x2c772f(%rip), %rax    # 0x36c414
cmpl $0x0, (%rax)
je 0xa4cfa
leaq 0x2c6caf(%rip), %rax    # 0x36b9a0
movsd (%rax), %xmm0
callq 0xa4a20
jmp 0xa4ec3
leaq 0x1d2daa(%rip), %rax    # 0x277ab0
cmpq $0x20, (%rax)
jne 0xa4d49
leaq 0x2c7705(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4d28
leaq 0x2c6c79(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
leaq 0x2c76e5(%rip), %rax    # 0x36c414
cmpl $0x0, (%rax)
je 0xa4d44
leaq 0x2c6c65(%rip), %rax    # 0x36b9a0
movsd (%rax), %xmm0
callq 0xa4a20
jmp 0xa4ec1
leaq 0x1d2d60(%rip), %rax    # 0x277ab0
cmpq $0x800, (%rax)          # imm = 0x800
jne 0xa4d7a
leaq 0x2c76b8(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4d75
leaq 0x2c6c2c(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
jmp 0xa4ebf
leaq 0x1d2d2f(%rip), %rax    # 0x277ab0
cmpq $0x40, (%rax)
jne 0xa4dc4
leaq 0x2c768a(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4da3
leaq 0x2c6bfe(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
leaq 0x2c766a(%rip), %rax    # 0x36c414
cmpl $0x0, (%rax)
je 0xa4dbf
leaq 0x2c6bea(%rip), %rax    # 0x36b9a0
movsd (%rax), %xmm0
callq 0xa4a20
jmp 0xa4ebd
leaq 0x1d2ce5(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0xa4e26
leaq 0x2c7640(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4df9
leaq 0x2c6bb4(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
movsd 0xca260(%rip), %xmm1    # 0x16f050
divsd %xmm1, %xmm0
callq 0xa4990
leaq 0x2c7614(%rip), %rax    # 0x36c414
cmpl $0x0, (%rax)
je 0xa4e21
leaq 0x2c6b94(%rip), %rax    # 0x36b9a0
movsd (%rax), %xmm0
movsd 0xca238(%rip), %xmm1    # 0x16f050
divsd %xmm1, %xmm0
callq 0xa4a20
jmp 0xa4ebb
leaq 0x1d2c83(%rip), %rax    # 0x277ab0
cmpq $0x4, (%rax)
jne 0xa4e6d
leaq 0x2c75de(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4e4f
leaq 0x2c6b52(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
leaq 0x2c75be(%rip), %rax    # 0x36c414
cmpl $0x0, (%rax)
je 0xa4e6b
leaq 0x2c6b3e(%rip), %rax    # 0x36b9a0
movsd (%rax), %xmm0
callq 0xa4a20
jmp 0xa4eb9
leaq 0x1d2c3c(%rip), %rax    # 0x277ab0
cmpq $0x100, (%rax)          # imm = 0x100
jne 0xa4eb7
leaq 0x2c7594(%rip), %rax    # 0x36c418
cmpl $0x0, (%rax)
je 0xa4e99
leaq 0x2c6b08(%rip), %rax    # 0x36b998
movsd (%rax), %xmm0
callq 0xa4990
leaq 0x2c7574(%rip), %rax    # 0x36c414
cmpl $0x0, (%rax)
je 0xa4eb5
leaq 0x2c6af4(%rip), %rax    # 0x36b9a0
movsd (%rax), %xmm0
callq 0xa4a20
jmp 0xa4eb7
jmp 0xa4eb9
jmp 0xa4ebb
jmp 0xa4ebd
jmp 0xa4ebf
jmp 0xa4ec1
jmp 0xa4ec3
jmp 0xa4ec5
jmp 0xa4ec7
jmp 0xa4ec9
jmp 0xa4ecb
jmp 0xa4ecd
jmp 0xa4ecf
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)