// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: decode_sro_msg()
void decode_sro_msg()
{
char c;
int i;

   start_msg_decode(0);

   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

   tsip_wptr = tsip_rptr = 0;
   tsip_sync = 0;

   // get the response from the reciver and pass it to (HOPEFULLY) the routine
   // that expects it...

   strupr(nmea_msg);

if(debug_file) fprintf(debug_file, "Decode msg %d:[%s]\n", polled_msg_id, nmea_msg);
//sprintf(debug_text, "Decode msg %d:[%s]", polled_msg_id, nmea_msg);


   sro_msg_id = polled_msg_id;
   if     (strstr(nmea_msg,  "TNTSRO")) parse_sro_id();
   else if(strstr(nmea_msg,  "RESET")) sro_msg_id = 0;
   else if(strstr(nmea_msg,  "TNT")) sro_msg_id = 0;
   else if(strstr(nmea_msg,  "?")) {
      sro_msg_id = 0;
   }

   else if(sro_msg_id == SRO_M_MSG)      parse_sro_m();
   else if(sro_msg_id == SRO_ID_MSG)     parse_sro_id();
   else if(sro_msg_id == SRO_SN_MSG)     parse_sro_sn();
   else if(sro_msg_id == SRO_ST_MSG)     parse_sro_st();
   else if(sro_msg_id == SRO_TR_MSG)     parse_sro_tr();
   else if(sro_msg_id == SRO_SY_MSG)     parse_sro_sy();
   else if(sro_msg_id == SRO_DE_MSG)     parse_sro_de();
   else if(sro_msg_id == SRO_PW_MSG)     parse_sro_pw();
   else if(sro_msg_id == SRO_FC_MSG)     parse_sro_fc();
   else if(sro_msg_id == SRO_FS_MSG)     parse_sro_fs();
   else if(sro_msg_id == SRO_TW_MSG)     parse_sro_tw();
   else if(sro_msg_id == SRO_AW_MSG)     parse_sro_aw();
   else if(sro_msg_id == SRO_TC_MSG)     parse_sro_tc();
   else if(sro_msg_id == SRO_VS_MSG)     parse_sro_vs();
   else if(sro_msg_id == SRO_VT_MSG)     parse_sro_vt();
   else if(sro_msg_id == SRO_GF_MSG)     parse_sro_gf();
   else if(sro_msg_id == SRO_RA_MSG)     parse_sro_ra();

   else if(sro_msg_id == SRO_L05_MSG)    parse_sro_l05();
   else if(sro_msg_id == SRO_L06_MSG)    parse_sro_l06();
   else if(sro_msg_id == SRO_R05_MSG)    parse_sro_r05();
   else if(sro_msg_id == SRO_R06_MSG)    parse_sro_r06();
   else if(sro_msg_id == SRO_R14_MSG)    parse_sro_r14();
   else if(sro_msg_id == SRO_R15_MSG)    parse_sro_r15();
   else if(sro_msg_id == SRO_R48_MSG)    parse_sro_r48();
   else if(sro_msg_id == SRO_R49_MSG)    parse_sro_r49();
   else if(sro_msg_id == SRO_R4F_MSG)    parse_sro_r4F();

   else if(sro_msg_id == SRO_TD_MSG)     parse_sro_td();
   else if(sro_msg_id == SRO_DT_MSG)     parse_sro_dt();
   else if(sro_msg_id == SRO_RAQUIK_MSG) parse_sro_raquik();

   else if(sro_msg_id == SCPI_USER_MSG)     parse_scpi_user();
   else if(sro_msg_id == (0-SCPI_USER_MSG)) parse_scpi_user();

   i = get_norcvr_message();   // returns true if seconds just ticked
///   if(SLOW_PRS_POLL && (seconds & 0x01));  // enable this to trigger high priority message polls every seoncd
                                              // ... but this slows polling loop cycle to around 1 minute
///   else if(i && (prs_poll_tick == 0)) prs_poll_tick = 1;  // trigger high priority message polls
   poll_next_sro();

   sro_msg_id = 0;

   if(sim_file && sim_delay) {  // throttle sim file messages
      Sleep(sim_delay);
   }

   saw_rcvr_msg = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x73dcb
leaq 0x2a649f(%rip), %r15    # 0x325830
movb $0x0, (%r15)
leaq 0x2a2eb6(%rip), %r14    # 0x322252
movzwl (%r14), %eax
cmpq %rax, %rbx
jae 0x7f3c0
callq 0x51c47
movb %al, (%rbx,%r15)
movb $0x0, 0x1(%rbx,%r15)
incq %rbx
cmpq $0x1f6, %rbx            # imm = 0x1F6
jne 0x7f39c
leaq 0x2a687d(%rip), %rax    # 0x325c44
andl $0x0, (%rax)
leaq 0x2a2e83(%rip), %rax    # 0x322254
andw $0x0, (%rax)
andw $0x0, (%r14)
leaq 0x2a2e75(%rip), %rax    # 0x322256
andw $0x0, (%rax)
leaq 0x2a6444(%rip), %rdi    # 0x325830
callq 0x988f
leaq 0x1a8f98(%rip), %rax    # 0x228390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x7f41b
movl 0x2d77fa(%rip), %edx    # 0x356c00
leaq 0x8e541(%rip), %rsi     # 0x10d94e
leaq 0x2a641c(%rip), %rcx    # 0x325830
xorl %eax, %eax
callq 0x9560
movl 0x2d77df(%rip), %ebx    # 0x356c00
movl %ebx, 0x2d77ed(%rip)    # 0x356c14
leaq 0x2a6402(%rip), %rdi    # 0x325830
leaq 0x8e52d(%rip), %rsi     # 0x10d962
callq 0x9090
testq %rax, %rax
je 0x7f446
callq 0x7e70f
jmp 0x7f491
leaq 0x2a63e3(%rip), %rdi    # 0x325830
leaq 0x8b260(%rip), %rsi     # 0x10a6b4
callq 0x9090
testq %rax, %rax
jne 0x7f48a
leaq 0x2a63cb(%rip), %rdi    # 0x325830
leaq 0x8e4fd(%rip), %rsi     # 0x10d969
callq 0x9090
testq %rax, %rax
jne 0x7f48a
leaq 0x2a63b3(%rip), %rdi    # 0x325830
pushq $0x3f
popq %rsi
callq 0x9100
testq %rax, %rax
je 0x7f4e4
andl $0x0, 0x2d7783(%rip)    # 0x356c14
callq 0x76a3e
callq 0x6624f
andl $0x0, 0x2d7772(%rip)    # 0x356c14
leaq 0x1a8f17(%rip), %rax    # 0x2283c0
cmpq $0x0, (%rax)
setne %al
leaq 0x18e149(%rip), %rcx    # 0x20d600
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x7f4cc
callq 0xae83
leaq 0x1a9acd(%rip), %rax    # 0x228fa0
movl $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leal -0x320(%rbx), %eax
cmpl $0x26, %eax
ja 0x7f506
leaq 0x89da6(%rip), %rcx     # 0x10929c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x7e532
jmp 0x7f491
cmpl $-0x25, %ebx
je 0x7f510
cmpl $0x25, %ebx
jne 0x7f491
callq 0x7f628
jmp 0x7f491
callq 0x7ec14
jmp 0x7f491
callq 0x7ee4d
jmp 0x7f491
callq 0x7e992
jmp 0x7f491
callq 0x7ebab
jmp 0x7f491
callq 0x7ea83
jmp 0x7f491
callq 0x7e75a
jmp 0x7f491
callq 0x7e8f2
jmp 0x7f491
callq 0x7e8a2
jmp 0x7f491
callq 0x7eab9
jmp 0x7f491
callq 0x7e9c8
jmp 0x7f491
callq 0x7e800
jmp 0x7f491
callq 0x7e7a5
jmp 0x7f491
callq 0x7ee0b
jmp 0x7f491
callq 0x7eb09
jmp 0x7f491
callq 0x7e836
jmp 0x7f491
callq 0x7e86c
jmp 0x7f491
callq 0x7ec4a
jmp 0x7f491
callq 0x7ed88
jmp 0x7f491
callq 0x7e95c
jmp 0x7f491
callq 0x7edd5
jmp 0x7f491
callq 0x7e9fe
jmp 0x7f491
callq 0x7eb3f
jmp 0x7f491
callq 0x7ee2c
jmp 0x7f491
callq 0x7ece9
jmp 0x7f491
callq 0x7eb75
jmp 0x7f491
callq 0x7ecb3
jmp 0x7f491
callq 0x7ed52
jmp 0x7f491