// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_star_state()
void parse_star_state()  
{
   // process the multi-line output state message
   log_packet_id("Star state");

   if(star_line) {  // info lines
      --star_line;
      get_msg_field();      // eat the line number
      if(get_msg_field()) {
         // !!!!!! get and process the info
         if(!strcmp(msg_field, "10M_S")) {      // sinewave output
            if(get_msg_field()) {
               if(strstr(msg_field, "OK")) {   
               }
               else {
                  discipline_mode = DIS_MODE_RECOVERY;
               }
               if(strchr(msg_field, ';')) {  // end of list
                  star_line = 0;
                  star_msg = 0;
               }
            }
         }
         else if(!strcmp(msg_field, "1PPS")) {  // 1PPS
            pps_enabled = 1;
            if(get_msg_field()) {
               if(strstr(msg_field, "OK")) {   
               }
               else {
                  discipline_mode = DIS_MODE_RECOVERY;
               }
               if(strchr(msg_field, ';')) {  // end of list
                  star_line = 0;
                  star_msg = 0;
               }
            }
         }
         else if(!strcmp(msg_field, "10M_L")) { // logic level output
            if(get_msg_field()) {
               if(strstr(msg_field, "OK")) {   
               }
               else {
                  discipline_mode = DIS_MODE_RECOVERY;
               }
               if(strchr(msg_field, ';')) {  // end of list
                  star_line = 0;
                  star_msg = 0;
               }
            }
         }
      }
   }
   else if(get_msg_field()) {  // first line of state message
      star_msg = STAR_STATE_MSG;
      star_line = atoi(msg_field);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xbf8d8(%rip), %rdi     # 0x187683
callq 0x7add0
leaq 0x1b2421(%rip), %rax    # 0x27a1d8
cmpl $0x0, (%rax)
je 0xc7f71
leaq 0x1b2411(%rip), %rax    # 0x27a1d8
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0x1b2405(%rip), %rax    # 0x27a1d8
movl %ecx, (%rax)
callq 0xb0bd0
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc7f6f
leaq 0x2d2e31(%rip), %rdi    # 0x39ac20
leaq 0xbf898(%rip), %rsi     # 0x18768e
callq 0x9510
cmpl $0x0, %eax
jne 0xc7e67
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc7e62
leaq 0x2d2e0f(%rip), %rdi    # 0x39ac20
leaq 0xc2bbb(%rip), %rsi     # 0x18a9d3
callq 0x9090
cmpq $0x0, %rax
je 0xc7e25
jmp 0xc7e2f
leaq 0x2a484b(%rip), %rax    # 0x36c677
movb $0x4, (%rax)
leaq 0x2d2dea(%rip), %rdi    # 0x39ac20
movl $0x3b, %esi
callq 0x9100
cmpq $0x0, %rax
je 0xc7e60
leaq 0x1b238b(%rip), %rax    # 0x27a1d8
movl $0x0, (%rax)
leaq 0x1b2382(%rip), %rax    # 0x27a1dc
movl $0x0, (%rax)
jmp 0xc7e62
jmp 0xc7f6d
leaq 0x2d2db2(%rip), %rdi    # 0x39ac20
leaq 0xc17a3(%rip), %rsi     # 0x189618
callq 0x9510
cmpl $0x0, %eax
jne 0xc7eed
leaq 0x2a507a(%rip), %rax    # 0x36cf00
movb $0x1, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc7eeb
leaq 0x2d2d86(%rip), %rdi    # 0x39ac20
leaq 0xc2b32(%rip), %rsi     # 0x18a9d3
callq 0x9090
cmpq $0x0, %rax
je 0xc7eae
jmp 0xc7eb8
leaq 0x2a47c2(%rip), %rax    # 0x36c677
movb $0x4, (%rax)
leaq 0x2d2d61(%rip), %rdi    # 0x39ac20
movl $0x3b, %esi
callq 0x9100
cmpq $0x0, %rax
je 0xc7ee9
leaq 0x1b2302(%rip), %rax    # 0x27a1d8
movl $0x0, (%rax)
leaq 0x1b22f9(%rip), %rax    # 0x27a1dc
movl $0x0, (%rax)
jmp 0xc7eeb
jmp 0xc7f6b
leaq 0x2d2d2c(%rip), %rdi    # 0x39ac20
leaq 0xbf799(%rip), %rsi     # 0x187694
callq 0x9510
cmpl $0x0, %eax
jne 0xc7f69
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc7f67
leaq 0x2d2d0a(%rip), %rdi    # 0x39ac20
leaq 0xc2ab6(%rip), %rsi     # 0x18a9d3
callq 0x9090
cmpq $0x0, %rax
je 0xc7f2a
jmp 0xc7f34
leaq 0x2a4746(%rip), %rax    # 0x36c677
movb $0x4, (%rax)
leaq 0x2d2ce5(%rip), %rdi    # 0x39ac20
movl $0x3b, %esi
callq 0x9100
cmpq $0x0, %rax
je 0xc7f65
leaq 0x1b2286(%rip), %rax    # 0x27a1d8
movl $0x0, (%rax)
leaq 0x1b227d(%rip), %rax    # 0x27a1dc
movl $0x0, (%rax)
jmp 0xc7f67
jmp 0xc7f69
jmp 0xc7f6b
jmp 0xc7f6d
jmp 0xc7f6f
jmp 0xc7fa1
callq 0xb0bd0
cmpl $0x0, %eax
je 0xc7f9f
leaq 0x1b225a(%rip), %rax    # 0x27a1dc
movl $0xd2, (%rax)
leaq 0x2d2c91(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, %ecx
leaq 0x1b223b(%rip), %rax    # 0x27a1d8
movl %ecx, (%rax)
jmp 0xc7fa1
popq %rbp
retq
nopw %cs:(%rax,%rax)