// File: /workspace/github_cpp_makefile_star2_O3/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
leaq 0x1c4da9(%rip), %rax    # 0x23ccc4
cmpl $0x0, (%rax)
je 0x77f22
popq %rbp
retq
leaq 0x1a09a7(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x10000, %rax          # imm = 0x10000
je 0x77f5a
leaq 0x1c645d(%rip), %rcx    # 0x23e398
cmpq $0x0, (%rcx)
jne 0x77f5a
leaq 0x296398(%rip), %rcx    # 0x30e2e0
cmpl $0x0, 0x1e114(%rcx)
je 0x77f93
cmpl $0x0, 0x1e110(%rcx)
jle 0x77f93
leaq 0x2952d7(%rip), %rax    # 0x30d238
cmpl $0x0, (%rax)
je 0x77f76
leaq 0x29484b(%rip), %rax    # 0x30c7b8
movsd (%rax), %xmm0
callq 0x77e50
leaq 0x2952b7(%rip), %rax    # 0x30d234
cmpl $0x0, (%rax)
je 0x77f20
leaq 0x294837(%rip), %rax    # 0x30c7c0
movsd (%rax), %xmm0
popq %rbp
jmp 0x77eb0
cmpq $0xff, %rax
jg 0x7800a
cmpq $0xf, %rax
jg 0x78047
cmpq $0x1, %rax
je 0x7809b
cmpq $0x4, %rax
je 0x77f5a
cmpq $0x8, %rax
jne 0x77f20
leaq 0x295272(%rip), %rax    # 0x30d238
cmpl $0x0, (%rax)
je 0x77f20
leaq 0x1a300a(%rip), %rax    # 0x21afe0
movl (%rax), %eax
leaq 0x2947d9(%rip), %rcx    # 0x30c7b8
movsd (%rcx), %xmm0
divsd 0x91075(%rip), %xmm0    # 0x109060
cmpl $0x53, %eax
je 0x7810c
cmpl $0x50, %eax
jne 0x78119
mulsd 0xa629b(%rip), %xmm0    # 0x11e2a0
jmp 0x78095
cmpq $0x3ffff, %rax          # imm = 0x3FFFF
jg 0x7806a
cmpq $0x100, %rax            # imm = 0x100
je 0x77f5a
cmpq $0x200, %rax            # imm = 0x200
je 0x77f5a
cmpq $0x800, %rax            # imm = 0x800
jne 0x77f20
leaq 0x2951fb(%rip), %rax    # 0x30d238
cmpl $0x0, (%rax)
jne 0x7808a
jmp 0x77f20
cmpq $0x10, %rax
je 0x780e7
cmpq $0x20, %rax
je 0x77f5a
cmpq $0x40, %rax
je 0x77f5a
jmp 0x77f20
cmpq $0x1000000, %rax        # imm = 0x1000000
je 0x77f5a
cmpq $0x400000, %rax         # imm = 0x400000
je 0x7808a
cmpq $0x40000, %rax          # imm = 0x40000
jne 0x77f20
leaq 0x294727(%rip), %rax    # 0x30c7b8
movsd (%rax), %xmm0
popq %rbp
jmp 0x77e50
leaq 0x295196(%rip), %rax    # 0x30d238
cmpl $0x0, (%rax)
je 0x780bf
leaq 0x29470a(%rip), %rax    # 0x30c7b8
movsd (%rax), %xmm0
divsd 0x90fa6(%rip), %xmm0    # 0x109060
callq 0x77e50
leaq 0x29516e(%rip), %rax    # 0x30d234
cmpl $0x0, (%rax)
je 0x77f20
leaq 0x2946ea(%rip), %rax    # 0x30c7c0
movsd (%rax), %xmm0
divsd 0x90f7e(%rip), %xmm0    # 0x109060
jmp 0x77f8d
leaq 0x29514a(%rip), %rax    # 0x30d238
cmpl $0x0, (%rax)
je 0x77f20
leaq 0x2946ba(%rip), %rax    # 0x30c7b8
movsd (%rax), %xmm0
divsd 0x90f56(%rip), %xmm0    # 0x109060
jmp 0x78095
mulsd 0xa6184(%rip), %xmm0    # 0x11e298
jmp 0x78095
mulsd 0xa6187(%rip), %xmm0    # 0x11e2a8
jmp 0x78095