// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_ss_status()
void parse_ss_status()
{
int sys_flag;
int nav_flag;

   log_packet_id("Receiver status");

   sys_flag = tsip_byte(); // system mode
   tsip_byte();
   tsip_word();            // almanac week

   gps_week = tsip_word(); // gps week
   have_week = 333;

   ss_deleted_gps = tsip_dword();       // GPS sat disable bitmask
   sats_enabled = (~ss_deleted_gps);
   update_disable_list(sats_enabled);

   tsip_byte();        // rsvd

   ss_deleted_sbas = tsip_dword();      // !!!! needs work SBAS sat disabled bitmask

   tsip_byte();        // min idle time
   tsip_byte();        // idle time

   el_mask = ((float) tsip_word()) / 100.0F;

   tsip_byte();        // discretes

   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd

   // sys_flag 0: self test
   // sys_flag 1: initializing
   // sys_flag 2: acquisition
   // sys_flag 3: navigation
   // sys_flag 4: fault

   // nav_flag 0: init required
   // nav_flag 1: initialized
   // nav_flag 2: nav 3d
   // nav_flag 3: nav 2d
   // nav_flag 4: differential 3d
   // nav_flag 5: differential 2d
   // nav_flag 6: dead reconing
   // nav_flag 7: reserved
   // nav_flag 8: base station
   nav_flag = tsip_byte(); // nav mode

   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd
   tsip_byte();        // rsvd

   tsip_word();        // differential word count
   tsip_word();        // parity error count
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x9ba01(%rip), %rdi     # 0x1232a3
callq 0x58e77
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x878bd
leaq 0x1b76b6(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x878d3
leaq 0x1b76a0(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
callq 0x588f0
leaq 0x285e54(%rip), %rcx    # 0x30d738
movw %ax, (%rcx)
leaq 0x285a3e(%rip), %rax    # 0x30d32c
movl $0x14d, (%rax)          # imm = 0x14D
callq 0x589b0
leaq 0x2864b0(%rip), %rcx    # 0x30ddb0
movl %eax, (%rcx)
movl %eax, %ecx
notl %ecx
leaq 0x2857d7(%rip), %rdx    # 0x30d0e4
movl %ecx, (%rdx)
movl $0x349, %ecx            # imm = 0x349
addq 0xc8625(%rip), %rcx     # 0x14ff40
xorl %edx, %edx
btl %edx, %eax
setb (%rcx)
incq %rdx
addq $0x348, %rcx            # imm = 0x348
cmpq $0x20, %rdx
jne 0x8791d
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87949
leaq 0x1b762a(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x589b0
leaq 0x28645f(%rip), %rcx    # 0x30ddb4
movl %eax, (%rcx)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x8796d
leaq 0x1b7606(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87983
leaq 0x1b75f0(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x85641(%rip), %xmm0    # 0x10cfd8
leaq 0x285716(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x879b8
leaq 0x1b75bb(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x879ce
leaq 0x1b75a5(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x879e4
leaq 0x1b758f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x879fa
leaq 0x1b7579(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a10
leaq 0x1b7563(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a26
leaq 0x1b754d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a3c
leaq 0x1b7537(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a52
leaq 0x1b7521(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a68
leaq 0x1b750b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a7e
leaq 0x1b74f5(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a94
leaq 0x1b74df(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87aaa
leaq 0x1b74c9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87ac0
leaq 0x1b74b3(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87ad6
leaq 0x1b749d(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x87aec
leaq 0x1b7487(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588f0
popq %rbp
jmp 0x588f0