// File: 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
subq $0x10, %rsp
movl $0x1, %edi
callq 0xae4a0
leaq 0x2bc217(%rip), %rax    # 0x39aa10
movb $0x0, (%rax)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
leaq 0x2b8c25(%rip), %rcx    # 0x397432
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xde859
callq 0x7a510
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %dl
movslq -0x8(%rbp), %rcx
leaq 0x2bc1e6(%rip), %rax    # 0x39aa10
movb %dl, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x2bc1d3(%rip), %rax    # 0x39aa10
movb $0x0, (%rax,%rcx)
cmpl $0x1f5, -0x8(%rbp)      # imm = 0x1F5
jl 0xde84c
jmp 0xde859
jmp 0xde84e
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xde803
leaq 0x2bc5c4(%rip), %rax    # 0x39ae24
movl $0x0, (%rax)
movl $0x3, %edi
callq 0xb4d60
leaq 0x2bc3a9(%rip), %rdi    # 0x39ac20
leaq 0xaa536(%rip), %rsi     # 0x188db4
callq 0x9510
cmpl $0x0, %eax
jne 0xde892
callq 0xde100
jmp 0xdeaa7
leaq 0x2bc387(%rip), %rdi    # 0x39ac20
leaq 0xaa518(%rip), %rsi     # 0x188db8
callq 0x9510
cmpl $0x0, %eax
jne 0xde8b4
callq 0xde100
jmp 0xdeaa5
leaq 0x2bc365(%rip), %rdi    # 0x39ac20
leaq 0xaa4fa(%rip), %rsi     # 0x188dbc
callq 0x9510
cmpl $0x0, %eax
jne 0xde8d6
callq 0xde100
jmp 0xdeaa3
leaq 0x2bc343(%rip), %rdi    # 0x39ac20
leaq 0xaa4dc(%rip), %rsi     # 0x188dc0
callq 0x9510
cmpl $0x0, %eax
jne 0xde8f8
callq 0xde100
jmp 0xdeaa1
leaq 0x2bc321(%rip), %rdi    # 0x39ac20
leaq 0xaa4be(%rip), %rsi     # 0x188dc4
callq 0x9510
cmpl $0x0, %eax
jne 0xde91a
callq 0xde100
jmp 0xdea9f
leaq 0x2bc2ff(%rip), %rdi    # 0x39ac20
leaq 0xa5234(%rip), %rsi     # 0x183b5c
callq 0x9510
cmpl $0x0, %eax
jne 0xde93c
callq 0xde470
jmp 0xdea9d
leaq 0x2bc2dd(%rip), %rdi    # 0x39ac20
leaq 0xaa47e(%rip), %rsi     # 0x188dc8
callq 0x9510
cmpl $0x0, %eax
jne 0xde95e
callq 0xde100
jmp 0xdea9b
leaq 0x2bc2bb(%rip), %rdi    # 0x39ac20
leaq 0xaa460(%rip), %rsi     # 0x188dcc
callq 0x9510
cmpl $0x0, %eax
jne 0xde980
callq 0xde110
jmp 0xdea99
leaq 0x2bc299(%rip), %rdi    # 0x39ac20
leaq 0xaa442(%rip), %rsi     # 0x188dd0
callq 0x9510
cmpl $0x0, %eax
jne 0xde9a2
callq 0xde100
jmp 0xdea97
leaq 0x2bc277(%rip), %rdi    # 0x39ac20
leaq 0xaa424(%rip), %rsi     # 0x188dd4
callq 0x9510
cmpl $0x0, %eax
jne 0xde9c4
callq 0xde100
jmp 0xdea95
leaq 0x2bc255(%rip), %rdi    # 0x39ac20
leaq 0xaa406(%rip), %rsi     # 0x188dd8
callq 0x9510
cmpl $0x0, %eax
jne 0xde9e6
callq 0xde100
jmp 0xdea93
leaq 0x2bc233(%rip), %rdi    # 0x39ac20
leaq 0xa7765(%rip), %rsi     # 0x186159
callq 0x9510
cmpl $0x0, %eax
jne 0xdea08
callq 0xde100
jmp 0xdea91
leaq 0x2bc211(%rip), %rdi    # 0x39ac20
leaq 0xaa3c6(%rip), %rsi     # 0x188ddc
callq 0x9510
cmpl $0x0, %eax
jne 0xdea27
callq 0xde100
jmp 0xdea8f
leaq 0x2bc1f2(%rip), %rdi    # 0x39ac20
leaq 0xa5030(%rip), %rsi     # 0x183a65
callq 0x9510
cmpl $0x0, %eax
jne 0xdea46
callq 0xde4a0
jmp 0xdea8d
leaq 0x2bc1d3(%rip), %rdi    # 0x39ac20
leaq 0xaa38c(%rip), %rsi     # 0x188de0
callq 0x9510
cmpl $0x0, %eax
jne 0xdea65
callq 0xddee0
jmp 0xdea8b
leaq 0x2bc1b4(%rip), %rdi    # 0x39ac20
leaq 0xaa371(%rip), %rsi     # 0x188de4
callq 0x9510
cmpl $0x0, %eax
jne 0xdea84
callq 0xde710
jmp 0xdea89
callq 0xde100
jmp 0xdea8b
jmp 0xdea8d
jmp 0xdea8f
jmp 0xdea91
jmp 0xdea93
jmp 0xdea95
jmp 0xdea97
jmp 0xdea99
jmp 0xdea9b
jmp 0xdea9d
jmp 0xdea9f
jmp 0xdeaa1
jmp 0xdeaa3
jmp 0xdeaa5
jmp 0xdeaa7
leaq 0x1beaf2(%rip), %rax    # 0x29d5a0
cmpq $0x0, (%rax)
je 0xdead2
leaq 0x1a3d25(%rip), %rax    # 0x2827e0
cmpq $0x0, (%rax)
je 0xdead2
leaq 0x1a3d18(%rip), %rax    # 0x2827e0
movq (%rax), %rax
movl %eax, %edi
callq 0xb8b0
leaq 0x1bf6a7(%rip), %rax    # 0x29e180
movl $0x1, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)