// File: /workspace/github_cpp_makefile_star2_O1/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 0x7f47d
leaq 0x2978b8(%rip), %rbx    # 0x33b830
movb $0x0, (%rbx)
xorl %r14d, %r14d
leaq 0x2942cd(%rip), %r15    # 0x338252
leaq 0x19afe4(%rip), %r12    # 0x23ef70
movzwl (%r15), %eax
cmpq %rax, %r14
jae 0xa3fbc
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0xa3fa6
orb $0x8, (%r12)
movb %al, (%r14,%rbx)
movb $0x0, 0x1(%r14,%rbx)
incq %r14
cmpq $0x1f6, %r14            # imm = 0x1F6
jne 0xa3f8c
leaq 0x297c81(%rip), %rax    # 0x33bc44
movl $0x0, (%rax)
movl $0x3, %edi
callq 0x83e83
leaq 0x297a66(%rip), %rax    # 0x33ba40
movl (%rax), %eax
cmpl $0x4e4c51, %eax         # imm = 0x4E4C51
jle 0xa3fff
cmpl $0x4e4c52, %eax         # imm = 0x4E4C52
je 0xa4014
cmpl $0x525652, %eax         # imm = 0x525652
je 0xa401b
cmpl $0x545352, %eax         # imm = 0x545352
jne 0xa4027
callq 0xa3d9b
jmp 0xa4027
cmpl $0x444952, %eax         # imm = 0x444952
je 0xa4022
cmpl $0x4d5452, %eax         # imm = 0x4D5452
jne 0xa4027
callq 0xa388a
jmp 0xa4027
callq 0xa3abc
jmp 0xa4027
callq 0xa3ea2
jmp 0xa4027
callq 0xa3d72
leaq 0x19a392(%rip), %rax    # 0x23e3c0
cmpq $0x0, (%rax)
setne %al
leaq 0x17f5c4(%rip), %rcx    # 0x223600
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xa4051
callq 0xaff7
leaq 0x19af48(%rip), %rax    # 0x23efa0
movl $0x1, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq