// File: /workspace/github_cpp_makefile_star2_O1/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 0x92255(%rip), %rdi     # 0x1242b6
callq 0x58e77
leaq 0x188f8b(%rip), %rbx    # 0x21aff8
movl (%rbx), %eax
testl %eax, %eax
je 0x920c9
decl %eax
movl %eax, (%rbx)
callq 0x811da
callq 0x811da
testl %eax, %eax
je 0x92147
leaq 0x2a99b0(%rip), %rax    # 0x33ba40
movl $0x5f4d3031, %ecx       # imm = 0x5F4D3031
xorl (%rax), %ecx
movzwl 0x4(%rax), %edx
xorl $0x53, %edx
orl %ecx, %edx
je 0x920f9
movl $0x53505031, %ecx       # imm = 0x53505031
xorl (%rax), %ecx
movzbl 0x4(%rax), %edx
orl %ecx, %edx
je 0x920ef
movl $0x5f4d3031, %ecx       # imm = 0x5F4D3031
xorl (%rax), %ecx
movzwl 0x4(%rax), %eax
xorl $0x4c, %eax
orl %ecx, %eax
jne 0x92147
jmp 0x920f9
callq 0x811da
testl %eax, %eax
je 0x92147
leaq 0x188f23(%rip), %rax    # 0x21affc
movl $0xd2, (%rax)
leaq 0x2a995a(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, (%rbx)
jmp 0x92147
leaq 0x27bc2a(%rip), %rax    # 0x30dd20
movb $0x1, (%rax)
callq 0x811da
testl %eax, %eax
je 0x92147
leaq 0x2a9937(%rip), %rdi    # 0x33ba40
leaq 0x9543e(%rip), %rsi     # 0x12754e
callq 0x9090
testq %rax, %rax
jne 0x92124
leaq 0x27b376(%rip), %rax    # 0x30d497
movb $0x4, (%rax)
leaq 0x2a9915(%rip), %rdi    # 0x33ba40
movl $0x3b, %esi
callq 0x9100
testq %rax, %rax
je 0x92147
xorl %eax, %eax
movl %eax, (%rbx)
leaq 0x188eb7(%rip), %rcx    # 0x21affc
movl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq