// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
pushq %rax
leaq 0x8912b(%rip), %rdi     # 0x10e2de
callq 0x520bf
leaq 0x17fe39(%rip), %rbx    # 0x204ff8
movl (%rbx), %eax
testl %eax, %eax
je 0x8522b
decl %eax
movl %eax, (%rbx)
callq 0x75767
callq 0x75767
testl %eax, %eax
je 0x852a7
leaq 0x2a085e(%rip), %rdi    # 0x325a40
leaq 0x89100(%rip), %rsi     # 0x10e2e9
pushq $0x6
popq %rdx
callq 0x9380
testl %eax, %eax
je 0x8525b
leaq 0x2a0844(%rip), %rdi    # 0x325a40
leaq 0x890ec(%rip), %rsi     # 0x10e2ef
pushq $0x5
popq %rdx
callq 0x9380
testl %eax, %eax
je 0x85251
leaq 0x2a082a(%rip), %rdi    # 0x325a40
leaq 0x890d7(%rip), %rsi     # 0x10e2f4
pushq $0x6
popq %rdx
callq 0x9380
testl %eax, %eax
jne 0x852a7
jmp 0x8525b
callq 0x75767
testl %eax, %eax
je 0x852a7
leaq 0x17fdc1(%rip), %rax    # 0x204ffc
movl $0xd2, (%rax)
leaq 0x2a07f8(%rip), %rdi    # 0x325a40
callq 0x95e0
movl %eax, (%rbx)
jmp 0x852a7
leaq 0x272ac8(%rip), %rax    # 0x2f7d20
movb $0x1, (%rax)
callq 0x75767
testl %eax, %eax
je 0x852a7
leaq 0x2a07d5(%rip), %rdi    # 0x325a40
leaq 0x8c2ec(%rip), %rsi     # 0x11155e
callq 0x9090
testq %rax, %rax
jne 0x85286
leaq 0x272214(%rip), %rax    # 0x2f7497
movb $0x4, (%rax)
leaq 0x2a07b3(%rip), %rdi    # 0x325a40
pushq $0x3b
popq %rsi
callq 0x9100
testq %rax, %rax
je 0x852a7
andl $0x0, (%rbx)
leaq 0x17fd58(%rip), %rax    # 0x204ffc
andl $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq