// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_taip_nav()
void parse_taip_nav()
{
int num_sv;
int prn;
int mode;
u08 iode;
float az;

   get_fixed_field(8);  // GPS time
   if(get_fixed_field(10)) {
      lat = atof(msg_field) / 1.0E7 * (PI/180.0);
   }
   if(get_fixed_field(11)) {
      lon = atof(msg_field) / 1.0E7 * (PI/180.0);
   }
   if(get_fixed_field(9)) {
      alt = (atof(msg_field) / 1.0E2) / FEET_PER_METER;
   }

   if(get_fixed_field(4)) {
      speed = (atof(msg_field) / 10.0);  // mph
      have_speed = 55;
   }
   if(get_fixed_field(5)) {
   }
   if(get_fixed_field(4)) {
      heading = (atof(msg_field) / 10.0);  // mph
      have_heading = 55;
   }

   if(get_fixed_field(2)) {  // sat prn's and iode
      reset_sat_tracking();
      num_sv = atoi(msg_field);
      while(num_sv-- > 0) {
         get_fixed_field(2);
         prn = atoi(msg_field);
         iode = (u08) get_fixed_field(2);        // iode

         if((prn >= 1) && (prn <= MAX_PRN)) {   // we fake a lot of this
            sat[prn].level_msg = 1;
            az = (float) (prn*10);
            set_sat_azel(prn, az, (float) 30.0);
            sat[prn].sig_level = (float) 40.0;
            sat[prn].tracking = prn;
            sat[prn].iode = iode;
            have_sat_azel = 33;
            level_type = "SNR";
            have_snr |= rinex_gnss(prn);

            record_sig_levels(prn);
         }
      }
   }

   get_fixed_field(10);  // reserved

   if(get_fixed_field(1)) {  // nav source
      mode = atoi(msg_field);
      if     (mode == 0) rcvr_mode = RCVR_MODE_2D;
      else if(mode == 1) rcvr_mode = RCVR_MODE_3D;
      else if(mode == 2) rcvr_mode = RCVR_MODE_DGPS;
      else if(mode == 3) rcvr_mode = RCVR_MODE_DGPS;
      else               rcvr_mode = RCVR_MODE_UNKNOWN;
   }

   if(get_fixed_field(1)) {  // age
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x8
popq %rdi
callq 0x78198
pushq $0xa
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x94962
leaq 0x2910fe(%rip), %rdi    # 0x325a40
callq 0x9470
divsd 0x61001(%rip), %xmm0    # 0xf5950
mulsd 0x61031(%rip), %xmm0    # 0xf5988
leaq 0x262672(%rip), %rax    # 0x2f6fd0
movsd %xmm0, (%rax)
pushq $0xb
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x94995
leaq 0x2910cb(%rip), %rdi    # 0x325a40
callq 0x9470
divsd 0x60fce(%rip), %xmm0    # 0xf5950
mulsd 0x60ffe(%rip), %xmm0    # 0xf5988
leaq 0x262647(%rip), %rax    # 0x2f6fd8
movsd %xmm0, (%rax)
pushq $0x9
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x949c8
leaq 0x291098(%rip), %rdi    # 0x325a40
callq 0x9470
divsd 0x5e6ab(%rip), %xmm0    # 0xf3060
divsd 0x60f63(%rip), %xmm0    # 0xf5920
leaq 0x26261c(%rip), %rax    # 0x2f6fe0
movsd %xmm0, (%rax)
pushq $0x4
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x94a00
leaq 0x291065(%rip), %rdi    # 0x325a40
callq 0x9470
divsd 0x5e6c0(%rip), %xmm0    # 0xf30a8
leaq 0x262631(%rip), %rax    # 0x2f7020
movsd %xmm0, (%rax)
leaq 0x26293e(%rip), %rax    # 0x2f7338
movl $0x37, (%rax)
pushq $0x5
popq %rdi
callq 0x78198
pushq $0x4
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x94a40
leaq 0x291025(%rip), %rdi    # 0x325a40
callq 0x9470
divsd 0x5e680(%rip), %xmm0    # 0xf30a8
leaq 0x2625f9(%rip), %rax    # 0x2f7028
movsd %xmm0, (%rax)
leaq 0x2628fa(%rip), %rax    # 0x2f7334
movl $0x37, (%rax)
pushq $0x2
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x94b33
callq 0x56b1c
leaq 0x290fe4(%rip), %r15    # 0x325a40
movq %r15, %rdi
callq 0x95e0
movl %eax, %r14d
pushq $0x2
popq %rbx
testl %r14d, %r14d
jle 0x94b33
movl %ebx, %edi
callq 0x78198
movq %r15, %rdi
callq 0x95e0
movl %eax, %r12d
movl %ebx, %edi
callq 0x78198
movl %eax, %r13d
leal -0x1(%r12), %eax
cmpl $0x3e6, %eax            # imm = 0x3E6
ja 0x94b2b
movl %r12d, %eax
imulq $0x348, %rax, %r15      # imm = 0x348
leaq 0x194500(%rip), %rbx    # 0x228fb0
movl $0x1, 0x1c(%rbx,%r15)
imull $0xa, %r12d, %eax
cvtsi2ss %eax, %xmm0
movl %r12d, %edi
movss 0x73f1c(%rip), %xmm1    # 0x1089e8
callq 0x53b74
movl $0x42200000, 0x20(%rbx,%r15) # imm = 0x42200000
movl %r12d, 0x218(%rbx,%r15)
movb %r13b, 0x1f1(%rbx,%r15)
leaq 0x290f4f(%rip), %r15    # 0x325a40
pushq $0x2
popq %rbx
leaq 0x262799(%rip), %rax    # 0x2f7294
movl $0x21, (%rax)
leaq 0x7356e(%rip), %rax     # 0x108076
leaq 0x1943e9(%rip), %rcx    # 0x228ef8
movq %rax, (%rcx)
movl %r12d, %edi
callq 0xca4da
leaq 0x26282b(%rip), %rcx    # 0x2f734c
orl %eax, (%rcx)
movl %r12d, %edi
callq 0x559ba
decl %r14d
jmp 0x94a6a
pushq $0xa
popq %rdi
callq 0x78198
pushq $0x1
popq %rdi
callq 0x78198
testl %eax, %eax
je 0x94b73
leaq 0x290ef2(%rip), %rdi    # 0x325a40
callq 0x95e0
leal (,%rax,8), %ecx
movl $0x5050403, %edx        # imm = 0x5050403
shrl %cl, %edx
cmpl $0x4, %eax
pushq $0x63
popq %rax
cmovbl %edx, %eax
leaq 0x26255f(%rip), %rcx    # 0x2f70d0
movb %al, (%rcx)
pushq $0x1
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x78198