// File: jkingan[P]ladyheather/heathmsc.cpp
// Function: write_rinex_obs(_IO_FILE*)
void write_rinex_obs(FILE *file)
{
double delta;
double skipped_jd;
double old_obs;
int count;

   if(jd_obs == last_jd_obs) return;  // raw data has not updated
   if(rinex_header_written == 0) return;
   skipped_jd = last_jd_obs;

   delta = jd_obs - last_jd_obs;
   delta = delta - (double) (int) delta;
   delta *= 24.0*60.0*60.0;
   if(1 && have_raw_rate && rinex_fix && obs_data_written && last_jd_obs && (delta > (((double) raw_msg_rate) * 1.10))) {  // rnx3
      // time stamp skipped, output null observation headers for missing data
      old_obs = jd_obs;
      count = 0;
      while(skipped_jd < (old_obs-jtime(0,0,raw_msg_rate,JD_OBS_ROUND))) {  // output dummy obs headers
         skipped_jd += jtime(0,0,0, (double) raw_msg_rate);
         jd_obs = skipped_jd;
write_rinex_line(file, "#! missing observation", "COMMENT");  //rnx3
         write_rinex_obs_header(file, 1);
         if(++count > (raw_msg_rate*100)) break;  // prevent runaway loop
      }
      jd_obs = old_obs;
   }

   if(write_rinex_obs_header(file, 0)) {
      write_rinex_obs_data(file);
   }

   last_jd_obs = jd_obs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x2511cd(%rip), %rax    # 0x36c750
movsd (%rax), %xmm0
ucomisd 0x2be6d1(%rip), %xmm0   # 0x3d9c60
jne 0x11b598
jp 0x11b598
jmp 0x11b770
leaq 0x18202d(%rip), %rax    # 0x29d5cc
cmpl $0x0, (%rax)
jne 0x11b5a9
jmp 0x11b770
movsd 0x2be6af(%rip), %xmm0   # 0x3d9c60
movsd %xmm0, -0x18(%rbp)
leaq 0x251193(%rip), %rax    # 0x36c750
movsd (%rax), %xmm0
subsd 0x2be697(%rip), %xmm0   # 0x3d9c60
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
cvttsd2si -0x10(%rbp), %eax
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movsd 0x53a1b(%rip), %xmm0    # 0x16f008
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
leaq 0x15ef66(%rip), %rax    # 0x27a564
cmpl $0x0, (%rax)
je 0x11b744
leaq 0x18215a(%rip), %rax    # 0x29d768
cmpl $0x0, (%rax)
je 0x11b744
leaq 0x181fb6(%rip), %rax    # 0x29d5d4
cmpl $0x0, (%rax)
je 0x11b744
movsd 0x2be631(%rip), %xmm0   # 0x3d9c60
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x11b63f
jp 0x11b63f
jmp 0x11b744
movsd -0x10(%rbp), %xmm0
leaq 0x15ef0d(%rip), %rax    # 0x27a558
cvtsi2sdl (%rax), %xmm1
movsd 0x72c69(%rip), %xmm2    # 0x18e2c0
mulsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x11b744
leaq 0x2510e4(%rip), %rax    # 0x36c750
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x15eec1(%rip), %rax    # 0x27a558
movl (%rax), %edx
xorl %esi, %esi
movsd 0x72c25(%rip), %xmm0    # 0x18e2c8
movl %esi, %edi
callq 0x122210
movsd -0x38(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x30(%rbp), %xmm0
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x11b734
leaq 0x15ee90(%rip), %rax    # 0x27a558
cvtsi2sdl (%rax), %xmm0
xorl %edx, %edx
movl %edx, %edi
movl %edx, %esi
callq 0x122210
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
leaq 0x251063(%rip), %rax    # 0x36c750
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x7afe5(%rip), %rsi     # 0x1966e1
leaq 0x74ba9(%rip), %rdx     # 0x1902ac
callq 0x10d750
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x12f500
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
leaq 0x15ee32(%rip), %rcx    # 0x27a558
imull $0x64, (%rcx), %ecx
cmpl %ecx, %eax
jle 0x11b72f
jmp 0x11b734
jmp 0x11b67c
movsd -0x20(%rbp), %xmm0
leaq 0x251010(%rip), %rax    # 0x36c750
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x12f500
cmpl $0x0, %eax
je 0x11b75d
movq -0x8(%rbp), %rdi
callq 0x12fb70
leaq 0x250fec(%rip), %rax    # 0x36c750
movsd (%rax), %xmm0
movsd %xmm0, 0x2be4f0(%rip)   # 0x3d9c60
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)