// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_taip_msg()
void decode_taip_msg()
{
char c;
int i;

   start_msg_decode(1);

   nmea_msg[0] = 0;
   for(i=0; i<tsip_wptr; i++) {  // copy message from tsip buffer to nmea buffer
      c = tsip_byte();
      nmea_msg[i] = c;
      nmea_msg[i+1] = 0;
      if(i >= ((int)sizeof(nmea_msg)-12)) break;
   }

   msg_col = 0;      // index of next char to get from nmea buffer
   get_fixed_field(3); // get the TAIP message type 
   if     (!strcmp(msg_field, "RAL")) ignore_taip();        // altitude up
   else if(!strcmp(msg_field, "RAP")) ignore_taip();        // set port config
   else if(!strcmp(msg_field, "RCP")) ignore_taip();        // compact position
   else if(!strcmp(msg_field, "RDC")) ignore_taip();        // set diff corrs
   else if(!strcmp(msg_field, "RDD")) ignore_taip();        // set delta diffs
   else if(!strcmp(msg_field, "RID")) parse_taip_id();      // set/get unit id
   else if(!strcmp(msg_field, "RIP")) ignore_taip();        // set initial posn
   else if(!strcmp(msg_field, "RLN")) parse_taip_nav();     // long nav msg
   else if(!strcmp(msg_field, "RPR")) ignore_taip();        // set protcol (unsupported)
   else if(!strcmp(msg_field, "RPT")) ignore_taip();        // set port config 
   else if(!strcmp(msg_field, "RPV")) ignore_taip();        // position/velocity
   else if(!strcmp(msg_field, "RRM")) ignore_taip();        // set reporting mode 
   else if(!strcmp(msg_field, "RRT")) ignore_taip();        // reset
   else if(!strcmp(msg_field, "RST")) parse_taip_status();  // status
   else if(!strcmp(msg_field, "RTM")) parse_taip_time();    // time/date
   else if(!strcmp(msg_field, "RVR")) parse_taip_version(); // receiver id
   else                                ignore_taip();

   if(sim_file && sim_delay) {  // throttle sim file messages
      Sleep(sim_delay);
   }
   
   saw_rcvr_msg = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rdi
callq 0x73dcb
leaq 0x290abb(%rip), %rbx    # 0x325830
movb $0x0, (%rbx)
xorl %r14d, %r14d
leaq 0x28d4d0(%rip), %r15    # 0x322252
movzwl (%r15), %eax
cmpq %rax, %r14
jae 0x94da6
callq 0x51c47
movb %al, (%r14,%rbx)
movb $0x0, 0x1(%r14,%rbx)
incq %r14
cmpq $0x1f6, %r14            # imm = 0x1F6
jne 0x94d82
leaq 0x290e97(%rip), %rax    # 0x325c44
andl $0x0, (%rax)
pushq $0x3
popq %rdi
callq 0x78198
leaq 0x290c81(%rip), %rax    # 0x325a40
movl (%rax), %eax
cmpl $0x545352, %eax         # imm = 0x545352
je 0x94e00
cmpl $0x4d5452, %eax         # imm = 0x4D5452
je 0x94deb
cmpl $0x4e4c52, %eax         # imm = 0x4E4C52
je 0x94df9
cmpl $0x525652, %eax         # imm = 0x525652
je 0x94df2
cmpl $0x444952, %eax         # imm = 0x444952
jne 0x94e05
callq 0x94b89
jmp 0x94e05
callq 0x94775
jmp 0x94e05
callq 0x94caa
jmp 0x94e05
callq 0x94919
jmp 0x94e05
callq 0x94bb0
leaq 0x1935b4(%rip), %rax    # 0x2283c0
cmpq $0x0, (%rax)
setne %al
leaq 0x1787e6(%rip), %rcx    # 0x20d600
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x94e2f
callq 0xae83
leaq 0x19416a(%rip), %rax    # 0x228fa0
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq