// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
movl $0x1, %edi
callq 0x7f2b8
leaq 0x2976a1(%rip), %rbx    # 0x33b830
movb $0x0, (%rbx)
xorl %r14d, %r14d
leaq 0x2940b6(%rip), %r15    # 0x338252
leaq 0x19adcd(%rip), %r12    # 0x23ef70
movzwl (%r15), %eax
cmpq %rax, %r14
jae 0xa41d3
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0xa41bd
orb $0x8, (%r12)
movb %al, (%r14,%rbx)
movb $0x0, 0x1(%r14,%rbx)
incq %r14
cmpq $0x1f6, %r14            # imm = 0x1F6
jne 0xa41a3
leaq 0x297a6a(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
movl $0x3, %edi
callq 0x83d8c
leaq 0x29784f(%rip), %rax    # 0x33ba40
movl (%rax), %eax
cmpl $0x4e4c51, %eax         # imm = 0x4E4C51
jle 0xa4216
cmpl $0x4e4c52, %eax         # imm = 0x4E4C52
je 0xa422b
cmpl $0x525652, %eax         # imm = 0x525652
je 0xa4232
cmpl $0x545352, %eax         # imm = 0x545352
jne 0xa423e
callq 0xa3fb2
jmp 0xa423e
cmpl $0x444952, %eax         # imm = 0x444952
je 0xa4239
cmpl $0x4d5452, %eax         # imm = 0x4D5452
jne 0xa423e
callq 0xa3aa1
jmp 0xa423e
callq 0xa3cd3
jmp 0xa423e
callq 0xa40b9
jmp 0xa423e
callq 0xa3f89
leaq 0x19a17b(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
setne %al
leaq 0x17f3ad(%rip), %rcx    # 0x223600
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xa4268
callq 0xafe8
leaq 0x19ad31(%rip), %rax    # 0x23efa0
movl $0x1, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq