// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heather.cpp
// Function: show_com_state()
void show_com_state()
{
   if(com[RCVR_PORT].process_com) {       // we are using the serial port
      if((com[RCVR_PORT].com_port == 0) && (com[RCVR_PORT].usb_port == 0) && com[RCVR_PORT].IP_addr[0]) {   // TCP
         sprintf(out, "WAITING FOR CONNECTION TO:%s", com[RCVR_PORT].IP_addr);
      }
      else if(nortel && com[RCVR_PORT].com_port)   sprintf(out, "Waking up Nortel receiver on COM%d", com[RCVR_PORT].com_port);
      else if(nortel && com[RCVR_PORT].usb_port)   sprintf(out, "Waking up Nortel receiver on USB%d", com[RCVR_PORT].usb_port);
      else if(com[RCVR_PORT].com_port) sprintf(out, "NO COM%d SERIAL PORT DATA SEEN", com[RCVR_PORT].com_port);
      else if(com[RCVR_PORT].usb_port) {
         if(com[RCVR_PORT].usb_port == USE_IDEV_NAME) {
            sprintf(out, "NO %s SERIAL PORT DATA SEEN", com[RCVR_PORT].com_dev);
         }
         else if(com[RCVR_PORT].usb_port == USE_DEV_NAME) {
            sprintf(out, "NO %s SERIAL PORT DATA SEEN", com[RCVR_PORT].com_dev);
         }
         else {
            sprintf(out, "NO USB%d SERIAL PORT DATA SEEN", com[RCVR_PORT].usb_port);
         }
      }
      else                             sprintf(out, "NO INPUT DEVICE FOUND");
      vidstr(0,0, RED, out);
      refresh_page();
if(first_key == 0) Sleep(1000);

//    set_single_sat(0x00);
      if(!did_init1) init_messages(3, 1);     // send init messages and request various data

#ifdef USE_X11
      while(0 && !SERIAL_DATA_AVAILABLE(RCVR_PORT)) {  // !!!!
         if(IDLE_SLEEP) Sleep(IDLE_SLEEP);
         check_com_timer(RCVR_PORT);
         get_x11_event();
         if(display) XFlush(display);
         if(KBHIT()) {
            break;
         }
      }
#endif
#ifdef USE_SDL
      while(0 && !SERIAL_DATA_AVAILABLE(RCVR_PORT)) {  // !!!!
         if(IDLE_SLEEP) Sleep(IDLE_SLEEP);
         check_com_timer(RCVR_PORT);
         get_sdl_event();
         if(KBHIT()) {
            break;
         }
      }
#endif
      if(SERIAL_DATA_AVAILABLE(RCVR_PORT)) {
         reset_com_timer(RCVR_PORT);
         find_msg_end();  // skip data till we see an end of message code
      }
   }
   else if(sim_file) {
      vidstr(0,0, YELLOW, "SIMULATION FILE IN USE         ");
   }
   else {                  // user has disabled the serial port
      vidstr(0,0, YELLOW, "SERIAL PORT PROCESSING DISABLED");
      refresh_page();
if(first_key == 0) Sleep(1000);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x30727c(%rip)    # 0x325cd4
je 0x1ea98
movl 0x305040(%rip), %eax    # 0x323aa0
movl 0x30503e(%rip), %edx    # 0x323aa4
testl %eax, %eax
jne 0x1eab8
testl %edx, %edx
jne 0x1eab8
cmpb $0x0, 0x305138(%rip)    # 0x323bad
je 0x1eab8
leaq 0x31d7a2(%rip), %rdi    # 0x33c220
leaq 0xec403(%rip), %rsi     # 0x10ae88
leaq 0x305121(%rip), %rdx    # 0x323bad
xorl %eax, %eax
callq 0x9060
jmp 0x1eb54
cmpq $0x0, 0x21f920(%rip)    # 0x23e3c0
je 0x1eb03
leaq 0xec4b2(%rip), %rcx     # 0x10af5b
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
popq %rbp
jmp 0xe787
movb 0x22047b(%rip), %cl     # 0x23ef39
testb %cl, %cl
sete %sil
testl %eax, %eax
sete %dil
orb %sil, %dil
jne 0x1eadf
leaq 0x31d74a(%rip), %rdi    # 0x33c220
leaq 0xec3c8(%rip), %rsi     # 0x10aea5
jmp 0x1eb4b
testb %cl, %cl
setne %cl
testl %edx, %edx
setne %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x1eb35
leaq 0x31d726(%rip), %rdi    # 0x33c220
leaq 0xec3c7(%rip), %rsi     # 0x10aec8
jmp 0x1eb4d
leaq 0xec471(%rip), %rcx     # 0x10af7b
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
callq 0xe787
callq 0xab54
cmpl $0x0, 0x220434(%rip)    # 0x23ef58
jne 0x1ebcb
movl $0xf4240, %edi          # imm = 0xF4240
popq %rbp
jmp 0x9540
testl %eax, %eax
je 0x1ebcd
leaq 0x31d6dc(%rip), %rdi    # 0x33c220
leaq 0xec3a0(%rip), %rsi     # 0x10aeeb
movl %eax, %edx
xorl %eax, %eax
callq 0x9060
leaq 0x31d6c5(%rip), %rcx    # 0x33c220
xorl %edi, %edi
xorl %esi, %esi
movl $0xc, %edx
callq 0xe787
callq 0xab54
cmpl $0x0, 0x2203e3(%rip)    # 0x23ef58
jne 0x1eb81
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x9540
cmpl $0x0, 0x318488(%rip)    # 0x337010
jne 0x1eb99
movl $0x3, %edi
movl $0x1, %esi
callq 0x616de
movl $0xa, %edi
callq 0xb9ad
testl %eax, %eax
je 0x1ebcb
callq 0xd1efe
movsd 0x2eebb4(%rip), %xmm0   # 0x30d768
movsd %xmm0, 0x30712c(%rip)   # 0x325ce8
movb $0x0, 0x30712d(%rip)    # 0x325cf0
xorl %edi, %edi
popq %rbp
jmp 0x58e9b
popq %rbp
retq
testl %edx, %edx
je 0x1ebfb
cmpl $0x3e7, %edx            # imm = 0x3E7
je 0x1ebe1
cmpl $0x270f, %edx           # imm = 0x270F
jne 0x1ec1f
leaq 0x31d638(%rip), %rdi    # 0x33c220
leaq 0xec31b(%rip), %rsi     # 0x10af0a
leaq 0x304eb6(%rip), %rdx    # 0x323aac
jmp 0x1ea8c
movups 0xec343(%rip), %xmm0    # 0x10af45
movaps %xmm0, 0x31d617(%rip)   # 0x33c220
movabsq $0x444e554f462045, %rax # imm = 0x444E554F462045
movq %rax, 0x31d614(%rip)    # 0x33c22e
jmp 0x1eb54
leaq 0x31d5fa(%rip), %rdi    # 0x33c220
leaq 0xec2f9(%rip), %rsi     # 0x10af26
jmp 0x1eb4d