// File: jkingan[P]ladyheather/heathgps.cpp
// Function: decode_rftg_message()
void decode_rftg_message()
{ 
   flush_debug();

   msg_fault = 0x00;
   tsip_rptr = 0;
   msg_id = get_next_tsip();

   subcode = 0x00;
   first_msg = 0;
   last_msg = msg_id;
   ++wakeup_tsip_msg; // we have seen a TSIP message
   tsip_error = 0;    // this flag gets set if we see something wrong in a message
   early_end = 0;
   new_packet(0);

   msg_id &= 0xFF;
   if     (msg_id == 0x20) parse_rftg_runtime();
   else if(msg_id == 0x21) parse_rftg_21();
   else if(msg_id == 0x22) parse_rftg_phase();
   else if(msg_id == 0x23) parse_rftg_voltages();
   else if(msg_id == 0x24) parse_rftg_correction();
   else if(msg_id == 0x25) parse_rftg_sigs();
   else if(msg_id == 0x26) parse_rftg_posn();
   else if(msg_id == 0x27) parse_rftg_additional_status();
   else if(msg_id == 0x28) parse_rftg_28();
   else if(msg_id == 0x29) parse_rftg_corr_history();
   else if(msg_id == 0x55) parse_rftg_cable();
   else if(msg_id == 0x57) parse_rftg_errlog();
   else if(msg_id == 0x63) parse_rftg_traim();
   else if(msg_id == 0x82) parse_rftg_warmup();
   else if(msg_id == 0x85) parse_rftg_delta_ape();  
   else if(msg_id == 0x86) parse_rftg_const_ape();  
   else if(msg_id == 0x88) parse_rftg_ape2();  
   else if(msg_id == 0x89) parse_rftg_ape();  
   else if(msg_id == 0x90) parse_rftg_delta_temp();
   else if(msg_id == 0x91) parse_rftg_hw_ver();
   else if(msg_id == 0x92) parse_rftg_avg_sample();
   else if(msg_id == 0x94) parse_rftg_corr_sched();
   else                    parse_rftg_unknown(msg_id);

   saw_rcvr_msg = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x798d0
leaq 0x1e256c(%rip), %rax    # 0x29e14c
movl $0x0, (%rax)
leaq 0x2db847(%rip), %rax    # 0x397434
movw $0x0, (%rax)
callq 0x7a380
movw %ax, %cx
leaq 0x1e253b(%rip), %rax    # 0x29e13c
movw %cx, (%rax)
leaq 0x1e2533(%rip), %rax    # 0x29e13e
movb $0x0, (%rax)
leaq 0x2da5f4(%rip), %rax    # 0x396209
movb $0x0, (%rax)
leaq 0x1e251d(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
movl %eax, 0x30f37c(%rip)    # 0x3cafa4
leaq 0x1e2549(%rip), %rax    # 0x29e178
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x1e253b(%rip), %rax    # 0x29e178
movq %rcx, (%rax)
leaq 0x1e2509(%rip), %rax    # 0x29e150
movl $0x0, (%rax)
movw $0x0, 0x30f34a(%rip)    # 0x3cafa0
xorl %edi, %edi
callq 0xae3c0
leaq 0x1e24d8(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
andl $0xff, %eax
movw %ax, %cx
leaq 0x1e24c6(%rip), %rax    # 0x29e13c
movw %cx, (%rax)
leaq 0x1e24bc(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x20, %eax
jne 0xbbc92
callq 0xba9d0
jmp 0xbbedb
leaq 0x1e24a3(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x21, %eax
jne 0xbbcab
callq 0xbaa10
jmp 0xbbed9
leaq 0x1e248a(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x22, %eax
jne 0xbbcc4
callq 0xbaa40
jmp 0xbbed7
leaq 0x1e2471(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x23, %eax
jne 0xbbcdd
callq 0xbaad0
jmp 0xbbed5
leaq 0x1e2458(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x24, %eax
jne 0xbbcf6
callq 0xbad80
jmp 0xbbed3
leaq 0x1e243f(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x25, %eax
jne 0xbbd0f
callq 0xbade0
jmp 0xbbed1
leaq 0x1e2426(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x26, %eax
jne 0xbbd28
callq 0xbaf40
jmp 0xbbecf
leaq 0x1e240d(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x27, %eax
jne 0xbbd41
callq 0xbb040
jmp 0xbbecd
leaq 0x1e23f4(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x28, %eax
jne 0xbbd5a
callq 0xbb0e0
jmp 0xbbecb
leaq 0x1e23db(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x29, %eax
jne 0xbbd73
callq 0xbb100
jmp 0xbbec9
leaq 0x1e23c2(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x55, %eax
jne 0xbbd8c
callq 0xbb120
jmp 0xbbec7
leaq 0x1e23a9(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x57, %eax
jne 0xbbda5
callq 0xbb1b0
jmp 0xbbec5
leaq 0x1e2390(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x63, %eax
jne 0xbbdbe
callq 0xbb1d0
jmp 0xbbec3
leaq 0x1e2377(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x82, %eax
jne 0xbbdd9
callq 0xbb200
jmp 0xbbec1
leaq 0x1e235c(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x85, %eax
jne 0xbbdf4
callq 0xbb230
jmp 0xbbebf
leaq 0x1e2341(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x86, %eax
jne 0xbbe0f
callq 0xbb260
jmp 0xbbebd
leaq 0x1e2326(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x88, %eax
jne 0xbbe2a
callq 0xbb290
jmp 0xbbebb
leaq 0x1e230b(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x89, %eax
jne 0xbbe42
callq 0xbb2c0
jmp 0xbbeb9
leaq 0x1e22f3(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x90, %eax
jne 0xbbe5a
callq 0xbb2f0
jmp 0xbbeb7
leaq 0x1e22db(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x91, %eax
jne 0xbbe72
callq 0xbb320
jmp 0xbbeb5
leaq 0x1e22c3(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x92, %eax
jne 0xbbe8a
callq 0xbb360
jmp 0xbbeb3
leaq 0x1e22ab(%rip), %rax    # 0x29e13c
movzwl (%rax), %eax
cmpl $0x94, %eax
jne 0xbbea2
callq 0xbb390
jmp 0xbbeb1
leaq 0x1e2293(%rip), %rax    # 0x29e13c
movzwl (%rax), %edi
callq 0xbb3c0
jmp 0xbbeb3
jmp 0xbbeb5
jmp 0xbbeb7
jmp 0xbbeb9
jmp 0xbbebb
jmp 0xbbebd
jmp 0xbbebf
jmp 0xbbec1
jmp 0xbbec3
jmp 0xbbec5
jmp 0xbbec7
jmp 0xbbec9
jmp 0xbbecb
jmp 0xbbecd
jmp 0xbbecf
jmp 0xbbed1
jmp 0xbbed3
jmp 0xbbed5
jmp 0xbbed7
jmp 0xbbed9
jmp 0xbbedb
leaq 0x1e229e(%rip), %rax    # 0x29e180
movl $0x1, (%rax)
popq %rbp
retq
nopw (%rax,%rax)