// File: jkingan[P]ladyheather/heathui.cpp
// Function: status_second(int)
int status_second(int seconds)
{
   // check if "seconds" is within the time interval where a long status message
   // is comming in.  If so, return next possible valid second, else return 0
   // NEW_RCVR

   if(rcvr_type == ACRON_RCVR) {
      if     (seconds == (SCPI_STATUS_SECOND+1)) return SCPI_STATUS_SECOND+4;
      else if(seconds == (SCPI_STATUS_SECOND+2)) return SCPI_STATUS_SECOND+4;
      else if(seconds == (SCPI_STATUS_SECOND+3)) return SCPI_STATUS_SECOND+4;
   }
   else if(rcvr_type == BRANDY_RCVR) {
      if     (seconds == (SCPI_STATUS_SECOND+1)) return SCPI_STATUS_SECOND+4;
      else if(seconds == (SCPI_STATUS_SECOND+2)) return SCPI_STATUS_SECOND+4;
      else if(seconds == (SCPI_STATUS_SECOND+3)) return SCPI_STATUS_SECOND+4;
   }
   else if(rcvr_type == SCPI_RCVR) {
      if(scpi_type == LUCENT_TYPE) {
         if     (seconds == (SCPI_STATUS_SECOND+1)) return SCPI_STATUS_SECOND+7;
         else if(seconds == (SCPI_STATUS_SECOND+2)) return SCPI_STATUS_SECOND+7;
         else if(seconds == (SCPI_STATUS_SECOND+3)) return SCPI_STATUS_SECOND+7;
         else if(seconds == (SCPI_STATUS_SECOND+4)) return SCPI_STATUS_SECOND+7;
         else if(seconds == (SCPI_STATUS_SECOND+5)) return SCPI_STATUS_SECOND+7;
         else if(seconds == (SCPI_STATUS_SECOND+6)) return SCPI_STATUS_SECOND+7;
      }
      else {
         if     (seconds == (SCPI_STATUS_SECOND+1)) return SCPI_STATUS_SECOND+6;
         else if(seconds == (SCPI_STATUS_SECOND+2)) return SCPI_STATUS_SECOND+6;
         else if(seconds == (SCPI_STATUS_SECOND+3)) return SCPI_STATUS_SECOND+6;
         else if(seconds == (SCPI_STATUS_SECOND+4)) return SCPI_STATUS_SECOND+6;
         else if(seconds == (SCPI_STATUS_SECOND+5)) return SCPI_STATUS_SECOND+6;
      }
   }
   else if(rcvr_type == STAR_RCVR) {
      if(star_type == NEC_TYPE) ;  // NEC device at 115,200 baud does not skip time stamps when sending sat info
      else if(seconds == (SCPI_STATUS_SECOND+1)) return SCPI_STATUS_SECOND+5;
      else if(seconds == (SCPI_STATUS_SECOND+2)) return SCPI_STATUS_SECOND+5;
      else if(seconds == (SCPI_STATUS_SECOND+3)) return SCPI_STATUS_SECOND+5;
      else if(seconds == (SCPI_STATUS_SECOND+4)) return SCPI_STATUS_SECOND+5;
   }
   else if(rcvr_type == UCCM_RCVR) {
      if     (seconds == (SCPI_STATUS_SECOND+1)) return SCPI_STATUS_SECOND+4;
      else if(seconds == (SCPI_STATUS_SECOND+2)) return SCPI_STATUS_SECOND+4;
      else if(seconds == (SCPI_STATUS_SECOND+3)) return SCPI_STATUS_SECOND+4;
   }

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
leaq 0x2137f2(%rip), %rax    # 0x277ab0
cmpq $0x4000, (%rax)         # imm = 0x4000
jne 0x64306
cmpl $0x21, -0x8(%rbp)
jne 0x642d9
movl $0x24, -0x4(%rbp)
jmp 0x64509
cmpl $0x22, -0x8(%rbp)
jne 0x642eb
movl $0x24, -0x4(%rbp)
jmp 0x64509
cmpl $0x23, -0x8(%rbp)
jne 0x642fd
movl $0x24, -0x4(%rbp)
jmp 0x64509
jmp 0x642ff
jmp 0x64301
jmp 0x64502
leaq 0x2137a3(%rip), %rax    # 0x277ab0
cmpq $0x40000, (%rax)        # imm = 0x40000
jne 0x64355
cmpl $0x21, -0x8(%rbp)
jne 0x64328
movl $0x24, -0x4(%rbp)
jmp 0x64509
cmpl $0x22, -0x8(%rbp)
jne 0x6433a
movl $0x24, -0x4(%rbp)
jmp 0x64509
cmpl $0x23, -0x8(%rbp)
jne 0x6434c
movl $0x24, -0x4(%rbp)
jmp 0x64509
jmp 0x6434e
jmp 0x64350
jmp 0x64500
leaq 0x213754(%rip), %rax    # 0x277ab0
cmpq $0x10, (%rax)
jne 0x64453
leaq 0x215e53(%rip), %rax    # 0x27a1c0
cmpl $0x4b, (%rax)
jne 0x643ea
cmpl $0x21, -0x8(%rbp)
jne 0x64384
movl $0x27, -0x4(%rbp)
jmp 0x64509
cmpl $0x22, -0x8(%rbp)
jne 0x64396
movl $0x27, -0x4(%rbp)
jmp 0x64509
cmpl $0x23, -0x8(%rbp)
jne 0x643a8
movl $0x27, -0x4(%rbp)
jmp 0x64509
cmpl $0x24, -0x8(%rbp)
jne 0x643ba
movl $0x27, -0x4(%rbp)
jmp 0x64509
cmpl $0x25, -0x8(%rbp)
jne 0x643cc
movl $0x27, -0x4(%rbp)
jmp 0x64509
cmpl $0x26, -0x8(%rbp)
jne 0x643de
movl $0x27, -0x4(%rbp)
jmp 0x64509
jmp 0x643e0
jmp 0x643e2
jmp 0x643e4
jmp 0x643e6
jmp 0x643e8
jmp 0x6444e
cmpl $0x21, -0x8(%rbp)
jne 0x643fc
movl $0x26, -0x4(%rbp)
jmp 0x64509
cmpl $0x22, -0x8(%rbp)
jne 0x6440e
movl $0x26, -0x4(%rbp)
jmp 0x64509
cmpl $0x23, -0x8(%rbp)
jne 0x64420
movl $0x26, -0x4(%rbp)
jmp 0x64509
cmpl $0x24, -0x8(%rbp)
jne 0x64432
movl $0x26, -0x4(%rbp)
jmp 0x64509
cmpl $0x25, -0x8(%rbp)
jne 0x64444
movl $0x26, -0x4(%rbp)
jmp 0x64509
jmp 0x64446
jmp 0x64448
jmp 0x6444a
jmp 0x6444c
jmp 0x6444e
jmp 0x644fe
leaq 0x213656(%rip), %rax    # 0x277ab0
cmpq $0x1000, (%rax)         # imm = 0x1000
jne 0x644ba
leaq 0x215d5e(%rip), %rax    # 0x27a1c8
cmpl $0x4e, (%rax)
jne 0x64471
jmp 0x644b8
cmpl $0x21, -0x8(%rbp)
jne 0x64483
movl $0x25, -0x4(%rbp)
jmp 0x64509
cmpl $0x22, -0x8(%rbp)
jne 0x64492
movl $0x25, -0x4(%rbp)
jmp 0x64509
cmpl $0x23, -0x8(%rbp)
jne 0x644a1
movl $0x25, -0x4(%rbp)
jmp 0x64509
cmpl $0x24, -0x8(%rbp)
jne 0x644b0
movl $0x25, -0x4(%rbp)
jmp 0x64509
jmp 0x644b2
jmp 0x644b4
jmp 0x644b6
jmp 0x644b8
jmp 0x644fc
leaq 0x2135ef(%rip), %rax    # 0x277ab0
cmpq $0x8, (%rax)
jne 0x644fa
cmpl $0x21, -0x8(%rbp)
jne 0x644d6
movl $0x24, -0x4(%rbp)
jmp 0x64509
cmpl $0x22, -0x8(%rbp)
jne 0x644e5
movl $0x24, -0x4(%rbp)
jmp 0x64509
cmpl $0x23, -0x8(%rbp)
jne 0x644f4
movl $0x24, -0x4(%rbp)
jmp 0x64509
jmp 0x644f6
jmp 0x644f8
jmp 0x644fa
jmp 0x644fc
jmp 0x644fe
jmp 0x64500
jmp 0x64502
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop