// File: /workspace/github_cpp_makefile_star2_O3/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 0x9bb6d(%rip), %rdi     # 0x123383
callq 0x58dc2
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87831
leaq 0x1b7742(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87847
leaq 0x1b772c(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
callq 0x588d2
leaq 0x285ee0(%rip), %rcx    # 0x30d738
movw %ax, (%rcx)
leaq 0x285aca(%rip), %rax    # 0x30d32c
movl $0x14d, (%rax)          # imm = 0x14D
callq 0x58964
leaq 0x28653c(%rip), %rcx    # 0x30ddb0
movl %eax, (%rcx)
movl %eax, %ecx
notl %ecx
leaq 0x285863(%rip), %rdx    # 0x30d0e4
movl %ecx, (%rdx)
movl $0x349, %ecx            # imm = 0x349
addq 0xc86b1(%rip), %rcx     # 0x14ff40
xorl %edx, %edx
btl %edx, %eax
setb (%rcx)
incq %rdx
addq $0x348, %rcx            # imm = 0x348
cmpq $0x20, %rdx
jne 0x87891
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x878bd
leaq 0x1b76b6(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x58964
leaq 0x2864eb(%rip), %rcx    # 0x30ddb4
movl %eax, (%rcx)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x878e1
leaq 0x1b7692(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x878f7
leaq 0x1b767c(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
movzwl %ax, %eax
cvtsi2ss %eax, %xmm0
divss 0x85765(%rip), %xmm0    # 0x10d070
leaq 0x2857a2(%rip), %rax    # 0x30d0b4
movss %xmm0, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8792c
leaq 0x1b7647(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87942
leaq 0x1b7631(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87958
leaq 0x1b761b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8796e
leaq 0x1b7605(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87984
leaq 0x1b75ef(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x8799a
leaq 0x1b75d9(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x879b0
leaq 0x1b75c3(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x879c6
leaq 0x1b75ad(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x879dc
leaq 0x1b7597(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x879f2
leaq 0x1b7581(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a08
leaq 0x1b756b(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a1e
leaq 0x1b7555(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a34
leaq 0x1b753f(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a4a
leaq 0x1b7529(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x587be
cmpl $0x100, %eax            # imm = 0x100
jb 0x87a60
leaq 0x1b7513(%rip), %rax    # 0x23ef70
orb $0x8, (%rax)
callq 0x588d2
popq %rbp
jmp 0x588d2