// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %rbx
pushq %rax
leaq 0x1b4d7e(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x8962b
leaq 0x1b4e07(%rip), %rax    # 0x23e428
cmpl $0x0, (%rax)
je 0x8962b
callq 0x9420
leaq 0x1b593a(%rip), %rax    # 0x23ef6c
movl $0x0, (%rax)
leaq 0x2aec15(%rip), %rax    # 0x338254
movw $0x0, (%rax)
leaq 0x2aec07(%rip), %rcx    # 0x338252
cmpw $0x0, (%rcx)
je 0x89662
movw $0x1, (%rax)
leaq 0x2adbf3(%rip), %rax    # 0x337250
movzbl (%rax), %eax
jmp 0x89667
movl $0x2000, %eax           # imm = 0x2000
leaq 0x1b58ee(%rip), %rbx    # 0x23ef5c
movw %ax, (%rbx)
leaq 0x1b58e6(%rip), %rcx    # 0x23ef5e
xorl %edx, %edx
movb %dl, (%rcx)
leaq 0x2ad9a6(%rip), %rcx    # 0x337029
movb %dl, (%rcx)
leaq 0x1b590c(%rip), %rcx    # 0x23ef98
incq (%rcx)
movl %eax, 0x2e272f(%rip)    # 0x36bdc4
leaq 0x1b58d4(%rip), %rax    # 0x23ef70
movl $0x0, (%rax)
movw $0x0, 0x2e2715(%rip)    # 0x36bdc0
xorl %edi, %edi
callq 0x7f20c
movzbl (%rbx), %edx
movw %dx, (%rbx)
cmpl $0x56, %edx
jg 0x896fb
leal -0x20(%rdx), %eax
cmpl $0x9, %eax
ja 0x8974e
leaq 0x95b94(%rip), %rcx     # 0x11f264
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x99dde(%rip), %rdi     # 0x1234be
callq 0x58dc2
callq 0x58964
callq 0x58964
leaq 0x284342(%rip), %rcx    # 0x30da38
jmp 0x897da
leal -0x82(%rdx), %eax
cmpl $0x12, %eax
ja 0x89736
leaq 0x95b7f(%rip), %rcx     # 0x11f28c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x99efd(%rip), %rdi     # 0x12361a
callq 0x58dc2
callq 0x588d2
movzwl %ax, %eax
leaq 0x28430b(%rip), %rcx    # 0x30da3c
jmp 0x897da
cmpl $0x57, %edx
je 0x898c5
cmpl $0x63, %edx
jne 0x89795
callq 0x88ebc
jmp 0x898d1
cmpl $0x55, %edx
jne 0x89795
leaq 0x99e73(%rip), %rdi     # 0x1235cd
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
divsd 0x7f8b8(%rip), %xmm0    # 0x109028
divsd 0x82200(%rip), %xmm0    # 0x10b978
leaq 0x284649(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x283b2a(%rip), %rax    # 0x30d2b4
movl $0x1, (%rax)
jmp 0x898d1
leaq 0x2b2a84(%rip), %rbx    # 0x33c220
leaq 0x99f67(%rip), %rsi     # 0x12370a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
jmp 0x898cc
callq 0x89071
jmp 0x898d1
leaq 0x99f22(%rip), %rdi     # 0x1236e8
callq 0x58dc2
callq 0x588d2
movzwl %ax, %eax
leaq 0x28426a(%rip), %rcx    # 0x30da44
movl %eax, (%rcx)
jmp 0x898d1
leaq 0x99e4c(%rip), %rdi     # 0x123634
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x284223(%rip), %rax    # 0x30da20
jmp 0x8987c
leaq 0x99e61(%rip), %rdi     # 0x123667
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x2841fd(%rip), %rax    # 0x30da18
jmp 0x8987c
leaq 0x99e28(%rip), %rdi     # 0x12364c
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x2841ef(%rip), %rax    # 0x30da28
jmp 0x8987c
leaq 0x99e4a(%rip), %rdi     # 0x12368c
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x2841a9(%rip), %rax    # 0x30da00
jmp 0x8987c
callq 0x89033
jmp 0x898d1
leaq 0x99e13(%rip), %rdi     # 0x12367a
callq 0x58dc2
callq 0x58a30
cvtss2sd %xmm0, %xmm0
leaq 0x28418c(%rip), %rax    # 0x30da08
movsd %xmm0, (%rax)
jmp 0x898d1
callq 0x88a46
jmp 0x898d1
leaq 0x99d1c(%rip), %rdi     # 0x1235ac
jmp 0x898cc
callq 0x8871b
jmp 0x898d1
callq 0x887a8
jmp 0x898d1
callq 0x88ce5
jmp 0x898d1
callq 0x88685
jmp 0x898d1
callq 0x88a89
jmp 0x898d1
callq 0x88c13
jmp 0x898d1
leaq 0x99cd3(%rip), %rdi     # 0x123596
jmp 0x898cc
leaq 0x99d1b(%rip), %rdi     # 0x1235e7
callq 0x58dc2
leaq 0x1b56c8(%rip), %rax    # 0x23efa0
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq