// File: /workspace/github_cpp_makefile_star2_O1/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, 0x30725b(%rip)    # 0x325cd4
je 0x1eab9
movl 0x30501f(%rip), %eax    # 0x323aa0
movl 0x30501d(%rip), %edx    # 0x323aa4
testl %eax, %eax
jne 0x1ead9
testl %edx, %edx
jne 0x1ead9
cmpb $0x0, 0x305117(%rip)    # 0x323bad
je 0x1ead9
leaq 0x31d781(%rip), %rdi    # 0x33c220
leaq 0xec3d2(%rip), %rsi     # 0x10ae78
leaq 0x305100(%rip), %rdx    # 0x323bad
xorl %eax, %eax
callq 0x9060
jmp 0x1eb75
cmpq $0x0, 0x21f8ff(%rip)    # 0x23e3c0
je 0x1eb24
leaq 0xec481(%rip), %rcx     # 0x10af4b
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
popq %rbp
jmp 0xe7d0
movb 0x22045a(%rip), %cl     # 0x23ef39
testb %cl, %cl
sete %sil
testl %eax, %eax
sete %dil
orb %sil, %dil
jne 0x1eb00
leaq 0x31d729(%rip), %rdi    # 0x33c220
leaq 0xec397(%rip), %rsi     # 0x10ae95
jmp 0x1eb6c
testb %cl, %cl
setne %cl
testl %edx, %edx
setne %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x1eb56
leaq 0x31d705(%rip), %rdi    # 0x33c220
leaq 0xec396(%rip), %rsi     # 0x10aeb8
jmp 0x1eb6e
leaq 0xec440(%rip), %rcx     # 0x10af6b
xorl %edi, %edi
xorl %esi, %esi
movl $0xe, %edx
callq 0xe7d0
callq 0xab5f
cmpl $0x0, 0x220413(%rip)    # 0x23ef58
jne 0x1ebec
movl $0xf4240, %edi          # imm = 0xF4240
popq %rbp
jmp 0x9540
testl %eax, %eax
je 0x1ebee
leaq 0x31d6bb(%rip), %rdi    # 0x33c220
leaq 0xec36f(%rip), %rsi     # 0x10aedb
movl %eax, %edx
xorl %eax, %eax
callq 0x9060
leaq 0x31d6a4(%rip), %rcx    # 0x33c220
xorl %edi, %edi
xorl %esi, %esi
movl $0xc, %edx
callq 0xe7d0
callq 0xab5f
cmpl $0x0, 0x2203c2(%rip)    # 0x23ef58
jne 0x1eba2
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x9540
cmpl $0x0, 0x318467(%rip)    # 0x337010
jne 0x1ebba
movl $0x3, %edi
movl $0x1, %esi
callq 0x61765
movl $0xa, %edi
callq 0xb9c3
testl %eax, %eax
je 0x1ebec
callq 0xd1865
movsd 0x2eeb93(%rip), %xmm0   # 0x30d768
movsd %xmm0, 0x30710b(%rip)   # 0x325ce8
movb $0x0, 0x30710c(%rip)    # 0x325cf0
xorl %edi, %edi
popq %rbp
jmp 0x58f50
popq %rbp
retq
testl %edx, %edx
je 0x1ec1c
cmpl $0x3e7, %edx            # imm = 0x3E7
je 0x1ec02
cmpl $0x270f, %edx           # imm = 0x270F
jne 0x1ec40
leaq 0x31d617(%rip), %rdi    # 0x33c220
leaq 0xec2ea(%rip), %rsi     # 0x10aefa
leaq 0x304e95(%rip), %rdx    # 0x323aac
jmp 0x1eaad
movups 0xec312(%rip), %xmm0    # 0x10af35
movaps %xmm0, 0x31d5f6(%rip)   # 0x33c220
movabsq $0x444e554f462045, %rax # imm = 0x444E554F462045
movq %rax, 0x31d5f3(%rip)    # 0x33c22e
jmp 0x1eb75
leaq 0x31d5d9(%rip), %rdi    # 0x33c220
leaq 0xec2c8(%rip), %rsi     # 0x10af16
jmp 0x1eb6e