// File: /workspace/github_cpp_makefile_star2_O1/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 0x1b4d4f(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x8965a
leaq 0x1b4dd8(%rip), %rax    # 0x23e428
cmpl $0x0, (%rax)
je 0x8965a
callq 0x9420
leaq 0x1b590b(%rip), %rax    # 0x23ef6c
movl $0x0, (%rax)
leaq 0x2aebe6(%rip), %rax    # 0x338254
xorl %ecx, %ecx
movw %cx, (%rax)
movw %cx, 0x2e2746(%rip)     # 0x36bdc0
leaq 0x2aebd1(%rip), %rdx    # 0x338252
cmpw %cx, (%rdx)
je 0x89697
movw $0x1, (%rax)
leaq 0x2adbbe(%rip), %rax    # 0x337250
movzbl (%rax), %eax
jmp 0x8969c
movl $0x2000, %eax           # imm = 0x2000
leaq 0x1b58b9(%rip), %rbx    # 0x23ef5c
movw %ax, (%rbx)
leaq 0x1b58b1(%rip), %rcx    # 0x23ef5e
xorl %edx, %edx
movb %dl, (%rcx)
leaq 0x2ad971(%rip), %rcx    # 0x337029
movb %dl, (%rcx)
leaq 0x1b58d7(%rip), %rcx    # 0x23ef98
incq (%rcx)
movl %eax, 0x2e26fa(%rip)    # 0x36bdc4
leaq 0x1b589f(%rip), %rax    # 0x23ef70
movl $0x0, (%rax)
movw $0x0, 0x2e26e0(%rip)    # 0x36bdc0
xorl %edi, %edi
callq 0x7f3d1
movzbl (%rbx), %edx
movw %dx, (%rbx)
cmpl $0x56, %edx
jg 0x89730
leal -0x20(%rdx), %eax
cmpl $0x9, %eax
ja 0x89783
leaq 0x95a9f(%rip), %rcx     # 0x11f1a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x99cc9(%rip), %rdi     # 0x1233de
callq 0x58e77
callq 0x589b0
callq 0x589b0
leaq 0x28430d(%rip), %rcx    # 0x30da38
jmp 0x8980f
leal -0x82(%rdx), %eax
cmpl $0x12, %eax
ja 0x8976b
leaq 0x95a8a(%rip), %rcx     # 0x11f1cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x99de8(%rip), %rdi     # 0x12353a
callq 0x58e77
callq 0x588f0
movzwl %ax, %eax
leaq 0x2842d6(%rip), %rcx    # 0x30da3c
jmp 0x8980f
cmpl $0x57, %edx
je 0x898fa
cmpl $0x63, %edx
jne 0x897ca
callq 0x88eee
jmp 0x89906
cmpl $0x55, %edx
jne 0x897ca
leaq 0x99d5e(%rip), %rdi     # 0x1234ed
callq 0x58e77
callq 0x58aae
cvtss2sd %xmm0, %xmm0
divsd 0x7f883(%rip), %xmm0    # 0x109028
divsd 0x821c3(%rip), %xmm0    # 0x10b970
leaq 0x284614(%rip), %rax    # 0x30ddc8
movsd %xmm0, (%rax)
leaq 0x283af5(%rip), %rax    # 0x30d2b4
movl $0x1, (%rax)
jmp 0x89906
leaq 0x2b2a4f(%rip), %rbx    # 0x33c220
leaq 0x99e52(%rip), %rsi     # 0x12362a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
jmp 0x89901
callq 0x890a3
jmp 0x89906
leaq 0x99e0d(%rip), %rdi     # 0x123608
callq 0x58e77
callq 0x588f0
movzwl %ax, %eax
leaq 0x284235(%rip), %rcx    # 0x30da44
movl %eax, (%rcx)
jmp 0x89906
leaq 0x99d37(%rip), %rdi     # 0x123554
callq 0x58e77
callq 0x58aae
cvtss2sd %xmm0, %xmm0
leaq 0x2841ee(%rip), %rax    # 0x30da20
jmp 0x898b1
leaq 0x99d4c(%rip), %rdi     # 0x123587
callq 0x58e77
callq 0x58aae
cvtss2sd %xmm0, %xmm0
leaq 0x2841c8(%rip), %rax    # 0x30da18
jmp 0x898b1
leaq 0x99d13(%rip), %rdi     # 0x12356c
callq 0x58e77
callq 0x58aae
cvtss2sd %xmm0, %xmm0
leaq 0x2841ba(%rip), %rax    # 0x30da28
jmp 0x898b1
leaq 0x99d35(%rip), %rdi     # 0x1235ac
callq 0x58e77
callq 0x58aae
cvtss2sd %xmm0, %xmm0
leaq 0x284174(%rip), %rax    # 0x30da00
jmp 0x898b1
callq 0x89065
jmp 0x89906
leaq 0x99cfe(%rip), %rdi     # 0x12359a
callq 0x58e77
callq 0x58aae
cvtss2sd %xmm0, %xmm0
leaq 0x284157(%rip), %rax    # 0x30da08
movsd %xmm0, (%rax)
jmp 0x89906
callq 0x88a75
jmp 0x89906
leaq 0x99c07(%rip), %rdi     # 0x1234cc
jmp 0x89901
callq 0x8879e
jmp 0x89906
callq 0x8882b
jmp 0x89906
callq 0x88d17
jmp 0x89906
callq 0x88708
jmp 0x89906
callq 0x88ab8
jmp 0x89906
callq 0x88c45
jmp 0x89906
leaq 0x99bbe(%rip), %rdi     # 0x1234b6
jmp 0x89901
leaq 0x99c06(%rip), %rdi     # 0x123507
callq 0x58e77
leaq 0x1b5693(%rip), %rax    # 0x23efa0
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq