// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_nvs_config()
void parse_nvs_config()
{
u08 nav_sys;

   // 0x51 packet
   log_packet_id("nvs_config");

   nav_sys = tsip_byte();
   tsip_byte();    // rsvd
   tsip_byte();    // coord sys
   el_mask = (float) (s08) tsip_byte();
   amu_mask = (float) tsip_byte();
   tsip_word();    // max rms error
   nvs_filter = tsip_single();  // filtration degree

   have_el_mask = 1;
   have_amu = 1;

   // nav system:
   //  0=GPS+GLONASS
   //  1=GPS
   //  2=GLONASS
   //  3=Galileo
   // 10=GPS+GLONASS+SBAS
   // 11=GPS+SBAS
   // 12=GLONASS+SBAS
   have_gnss_mask = 3;
   if     (nav_sys == 0)  gnss_mask = (GPS | GLONASS);
   else if(nav_sys == 1)  gnss_mask = (GPS);
   else if(nav_sys == 2)  gnss_mask = (GLONASS);
   else if(nav_sys == 3)  gnss_mask = (GALILEO);
   else if(nav_sys == 10) gnss_mask = (GPS | GLONASS | SBAS);
   else if(nav_sys == 11) gnss_mask = (GPS | SBAS);
   else if(nav_sys == 12) gnss_mask = (GLONASS | SBAS);
   else if(nav_sys == 13) gnss_mask = (GALILEO | SBAS);
   else have_gnss_mask = 0;
// sprintf(plot_title, "nav sys:%d", nav_sys); //qqqqqqqqq
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x7dcca(%rip), %rdi     # 0x125ebc
callq 0x58e77
callq 0x587d1
movl %eax, %ebx
cmpl $0x100, %eax            # imm = 0x100
jb 0xa820f
leaq 0x196d64(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0xa8225
leaq 0x196d4e(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0xa823b
leaq 0x196d38(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0xa8251
leaq 0x196d22(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movsbl %al, %eax
cvtsi2ss %eax, %xmm0
leaq 0x264e55(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0xa8279
leaq 0x196cfa(%rip), %rcx    # 0x23ef70
orb $0x8, (%rcx)
movzbl %al, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
leaq 0x264e2e(%rip), %rax    # 0x30d0b8
movss %xmm0, (%rax)
callq 0x588f0
callq 0x58aae
cvtss2sd %xmm0, %xmm0
leaq 0x264dfd(%rip), %rax    # 0x30d0a0
movsd %xmm0, (%rax)
leaq 0x26514e(%rip), %rax    # 0x30d3fc
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x26513c(%rip), %rax    # 0x30d3f8
movl %ecx, (%rax)
leaq 0xc89b3(%rip), %rax     # 0x170c78
movl $0x3, (%rax)
cmpb $0xd, %bl
ja 0xa82f2
movzbl %bl, %ecx
leaq 0x7779e(%rip), %rdx     # 0x11fa78
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0xc898a(%rip), %rax     # 0x170c74
movl $0x3, (%rax)
jmp 0xa8361
movl $0x0, (%rax)
jmp 0xa8361
leaq 0xc8973(%rip), %rax     # 0x170c74
movl $0x8001, (%rax)         # imm = 0x8001
jmp 0xa8361
leaq 0xc8964(%rip), %rax     # 0x170c74
movl $0x1, (%rax)
jmp 0xa8361
leaq 0xc8955(%rip), %rax     # 0x170c74
movl $0x8002, (%rax)         # imm = 0x8002
jmp 0xa8361
leaq 0xc8946(%rip), %rax     # 0x170c74
movl $0x8004, (%rax)         # imm = 0x8004
jmp 0xa8361
leaq 0xc8937(%rip), %rax     # 0x170c74
movl $0x2, (%rax)
jmp 0xa8361
leaq 0xc8928(%rip), %rax     # 0x170c74
movl $0x4, (%rax)
jmp 0xa8361
leaq 0xc8919(%rip), %rax     # 0x170c74
movl $0x8003, (%rax)         # imm = 0x8003
addq $0x8, %rsp
popq %rbx
popq %rbp
retq