// File: /workspace/github_cpp_makefile_star2_O3/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 0x922b9(%rip), %rdi     # 0x124396
callq 0x58dc2
leaq 0x188f0f(%rip), %rbx    # 0x21aff8
movl (%rbx), %eax
testl %eax, %eax
je 0x92145
decl %eax
movl %eax, (%rbx)
callq 0x810b1
callq 0x810b1
testl %eax, %eax
je 0x921c3
leaq 0x2a9934(%rip), %rax    # 0x33ba40
movl $0x5f4d3031, %ecx       # imm = 0x5F4D3031
xorl (%rax), %ecx
movzwl 0x4(%rax), %edx
xorl $0x53, %edx
orl %ecx, %edx
je 0x92175
movl $0x53505031, %ecx       # imm = 0x53505031
xorl (%rax), %ecx
movzbl 0x4(%rax), %edx
orl %ecx, %edx
je 0x9216b
movl $0x5f4d3031, %ecx       # imm = 0x5F4D3031
xorl (%rax), %ecx
movzwl 0x4(%rax), %eax
xorl $0x4c, %eax
orl %ecx, %eax
jne 0x921c3
jmp 0x92175
callq 0x810b1
testl %eax, %eax
je 0x921c3
leaq 0x188ea7(%rip), %rax    # 0x21affc
movl $0xd2, (%rax)
leaq 0x2a98de(%rip), %rdi    # 0x33ba40
callq 0x95e0
movl %eax, (%rbx)
jmp 0x921c3
leaq 0x27bbae(%rip), %rax    # 0x30dd20
movb $0x1, (%rax)
callq 0x810b1
testl %eax, %eax
je 0x921c3
leaq 0x2a98bb(%rip), %rdi    # 0x33ba40
leaq 0x9548d(%rip), %rsi     # 0x127619
callq 0x9090
testq %rax, %rax
jne 0x921a0
leaq 0x27b2fa(%rip), %rax    # 0x30d497
movb $0x4, (%rax)
leaq 0x2a9899(%rip), %rdi    # 0x33ba40
movl $0x3b, %esi
callq 0x9100
testq %rax, %rax
je 0x921c3
xorl %eax, %eax
movl %eax, (%rbx)
leaq 0x188e3b(%rip), %rcx    # 0x21affc
movl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq