// File: jkingan[P]ladyheather/heathgps.cpp
// Function: decode_true_message()
void decode_true_message()
{
char c;
int i;
static int row = 0;

   venus_nmea = 0;
   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_msg buffer
   get_msg_field(); // get the NMEA message type 

   if     (!strcmp(msg_field, "CLOCK"))          parse_true_clock();
   else if(!strcmp(msg_field, "DISCARD"))        parse_true_discard();
   else if(!strcmp(msg_field, "ESN"))            parse_true_esn();
   else if(!strcmp(msg_field, "EXTSTATUS"))      parse_true_extstatus();
   else if(!strcmp(msg_field, "GETA"))           parse_true_geta();
   else if(!strcmp(msg_field, "GETBDELAY"))      parse_true_getbdelay();
   else if(!strcmp(msg_field, "GETDELAY"))       parse_true_getdelay();
   else if(!strcmp(msg_field, "GETPOS"))         parse_true_getpos(0);
   else if(!strcmp(msg_field, "GETP"))           parse_true_getp();
   else if(!strcmp(msg_field, "GETSCALEFACTOR")) parse_true_scale();
   else if(!strcmp(msg_field, "GETVER"))         parse_true_getver();
   else if(!strcmp(msg_field, "KALDBG"))         parse_true_kaldbg();
   else if(!strcmp(msg_field, "LEAVE"))          parse_true_leave();
   else if(!strcmp(msg_field, "PPSDBG"))         parse_true_ppsdbg();
   else if(!strcmp(msg_field, "PROCEED")) ;
   else if(!strcmp(msg_field, "SAT"))            parse_true_sat();
   else if(!strcmp(msg_field, "SET1PPS"))        parse_true_set1pps();
   else if(!strcmp(msg_field, "SPIW"))           parse_true_spiw();
   else if(!strcmp(msg_field, "STATUS"))         parse_true_status();
   else if(!strcmp(msg_field, "SURVEY"))         parse_true_getpos(1);
   else if(!strcmp(msg_field, "TRAIM"))          parse_true_traim();
   else if(!strcmp(msg_field, "UPDATE"))         parse_true_update();
   else if(!strcmp(msg_field, "WSAT"))           parse_true_wsat();
   else if(debug_file) {
      fprintf(debug_file, "Unknown message:%s\n", nmea_msg);
   }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, 0x312da2(%rip)    # 0x3cbcc4
movl $0x1, %edi
callq 0xae4a0
leaq 0x2e1add(%rip), %rax    # 0x39aa10
movb $0x0, (%rax)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
leaq 0x2de4eb(%rip), %rcx    # 0x397432
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jge 0xb8f93
callq 0x7a510
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %dl
movslq -0x8(%rbp), %rcx
leaq 0x2e1aac(%rip), %rax    # 0x39aa10
movb %dl, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x2e1a99(%rip), %rax    # 0x39aa10
movb $0x0, (%rax,%rcx)
cmpl $0x1f5, -0x8(%rbp)      # imm = 0x1F5
jl 0xb8f86
jmp 0xb8f93
jmp 0xb8f88
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xb8f3d
leaq 0x2e1e8a(%rip), %rax    # 0x39ae24
movl $0x0, (%rax)
callq 0xb0bd0
leaq 0x2e1c74(%rip), %rdi    # 0x39ac20
leaq 0xce9b3(%rip), %rsi     # 0x187966
callq 0x9510
cmpl $0x0, %eax
jne 0xb8fc7
callq 0xe74c0
jmp 0xb9306
leaq 0x2e1c52(%rip), %rdi    # 0x39ac20
leaq 0xd061d(%rip), %rsi     # 0x1895f2
callq 0x9510
cmpl $0x0, %eax
jne 0xb8fe9
callq 0xe83a0
jmp 0xb9304
leaq 0x2e1c30(%rip), %rdi    # 0x39ac20
leaq 0xd0603(%rip), %rsi     # 0x1895fa
callq 0x9510
cmpl $0x0, %eax
jne 0xb900b
callq 0xe83c0
jmp 0xb9302
leaq 0x2e1c0e(%rip), %rdi    # 0x39ac20
leaq 0xd05e5(%rip), %rsi     # 0x1895fe
callq 0x9510
cmpl $0x0, %eax
jne 0xb902d
callq 0xe75d0
jmp 0xb9300
leaq 0x2e1bec(%rip), %rdi    # 0x39ac20
leaq 0xcab6a(%rip), %rsi     # 0x183ba5
callq 0x9510
cmpl $0x0, %eax
jne 0xb904f
callq 0xe76b0
jmp 0xb92fe
leaq 0x2e1bca(%rip), %rdi    # 0x39ac20
leaq 0xcb017(%rip), %rsi     # 0x184074
callq 0x9510
cmpl $0x0, %eax
jne 0xb9071
callq 0xe77c0
jmp 0xb92fc
leaq 0x2e1ba8(%rip), %rdi    # 0x39ac20
leaq 0xcafeb(%rip), %rsi     # 0x18406a
callq 0x9510
cmpl $0x0, %eax
jne 0xb9093
callq 0xe7770
jmp 0xb92fa
leaq 0x2e1b86(%rip), %rdi    # 0x39ac20
leaq 0xcab59(%rip), %rsi     # 0x183bfa
callq 0x9510
cmpl $0x0, %eax
jne 0xb90b7
xorl %edi, %edi
callq 0xe7990
jmp 0xb92f8
leaq 0x2e1b62(%rip), %rdi    # 0x39ac20
leaq 0xcafba(%rip), %rsi     # 0x18407f
callq 0x9510
cmpl $0x0, %eax
jne 0xb90d9
callq 0xe76f0
jmp 0xb92f6
leaq 0x2e1b40(%rip), %rdi    # 0x39ac20
leaq 0xcaf9e(%rip), %rsi     # 0x184085
callq 0x9510
cmpl $0x0, %eax
jne 0xb90fb
callq 0xe7950
jmp 0xb92f4
leaq 0x2e1b1e(%rip), %rdi    # 0x39ac20
leaq 0xcaa46(%rip), %rsi     # 0x183b4f
callq 0x9510
cmpl $0x0, %eax
jne 0xb911d
callq 0xe7be0
jmp 0xb92f2
leaq 0x2e1afc(%rip), %rdi    # 0x39ac20
leaq 0xd04dd(%rip), %rsi     # 0x189608
callq 0x9510
cmpl $0x0, %eax
jne 0xb913f
callq 0xe78e0
jmp 0xb92f0
leaq 0x2e1ada(%rip), %rdi    # 0x39ac20
leaq 0xd04c2(%rip), %rsi     # 0x18960f
callq 0x9510
cmpl $0x0, %eax
jne 0xb9161
callq 0xe83e0
jmp 0xb92ee
leaq 0x2e1ab8(%rip), %rdi    # 0x39ac20
leaq 0xcb8f2(%rip), %rsi     # 0x184a61
callq 0x9510
cmpl $0x0, %eax
jne 0xb9183
callq 0xe7820
jmp 0xb92ec
leaq 0x2e1a96(%rip), %rdi    # 0x39ac20
leaq 0xcb8c7(%rip), %rsi     # 0x184a58
callq 0x9510
cmpl $0x0, %eax
jne 0xb91a0
jmp 0xb92ea
leaq 0x2e1a79(%rip), %rdi    # 0x39ac20
leaq 0xde99d(%rip), %rsi     # 0x197b4b
callq 0x9510
cmpl $0x0, %eax
jne 0xb91c2
callq 0xe7d20
jmp 0xb92e8
leaq 0x2e1a57(%rip), %rdi    # 0x39ac20
leaq 0xd0445(%rip), %rsi     # 0x189615
callq 0x9510
cmpl $0x0, %eax
jne 0xb91e4
callq 0xe8140
jmp 0xb92e6
leaq 0x2e1a35(%rip), %rdi    # 0x39ac20
leaq 0xd042b(%rip), %rsi     # 0x18961d
callq 0x9510
cmpl $0x0, %eax
jne 0xb9206
callq 0xe8400
jmp 0xb92e4
leaq 0x2e1a13(%rip), %rdi    # 0x39ac20
leaq 0xd03ed(%rip), %rsi     # 0x189601
callq 0x9510
cmpl $0x0, %eax
jne 0xb9228
callq 0xe8160
jmp 0xb92e2
leaq 0x2e19f1(%rip), %rdi    # 0x39ac20
leaq 0xcf5e7(%rip), %rsi     # 0x18881d
callq 0x9510
cmpl $0x0, %eax
jne 0xb924f
movl $0x1, %edi
callq 0xe7990
jmp 0xb92e0
leaq 0x2e19ca(%rip), %rdi    # 0x39ac20
leaq 0xd03c5(%rip), %rsi     # 0x189622
callq 0x9510
cmpl $0x0, %eax
jne 0xb926e
callq 0xe8420
jmp 0xb92de
leaq 0x2e19ab(%rip), %rdi    # 0x39ac20
leaq 0xd03ac(%rip), %rsi     # 0x189628
callq 0x9510
cmpl $0x0, %eax
jne 0xb928d
callq 0xe8380
jmp 0xb92dc
leaq 0x2e198c(%rip), %rdi    # 0x39ac20
leaq 0xd0394(%rip), %rsi     # 0x18962f
callq 0x9510
cmpl $0x0, %eax
jne 0xb92ac
callq 0xe7f30
jmp 0xb92da
leaq 0x1e42bd(%rip), %rax    # 0x29d570
cmpq $0x0, (%rax)
je 0xb92d8
leaq 0x1e42b0(%rip), %rax    # 0x29d570
movq (%rax), %rdi
leaq 0xd036a(%rip), %rsi     # 0x189634
leaq 0x2e173f(%rip), %rdx    # 0x39aa10
movb $0x0, %al
callq 0x9550
jmp 0xb92da
jmp 0xb92dc
jmp 0xb92de
jmp 0xb92e0
jmp 0xb92e2
jmp 0xb92e4
jmp 0xb92e6
jmp 0xb92e8
jmp 0xb92ea
jmp 0xb92ec
jmp 0xb92ee
jmp 0xb92f0
jmp 0xb92f2
jmp 0xb92f4
jmp 0xb92f6
jmp 0xb92f8
jmp 0xb92fa
jmp 0xb92fc
jmp 0xb92fe
jmp 0xb9300
jmp 0xb9302
jmp 0xb9304
jmp 0xb9306
leaq 0x1e4293(%rip), %rax    # 0x29d5a0
cmpq $0x0, (%rax)
je 0xb9331
leaq 0x1c94c6(%rip), %rax    # 0x2827e0
cmpq $0x0, (%rax)
je 0xb9331
leaq 0x1c94b9(%rip), %rax    # 0x2827e0
movq (%rax), %rax
movl %eax, %edi
callq 0xb8b0
leaq 0x1e4e48(%rip), %rax    # 0x29e180
movl $0x1, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)