// File: jkingan[P]ladyheather/heathmsc.cpp
// Function: log_ticc_info()
void log_ticc_info()
{
   strcpy(log_text, "#");
   write_log_comment(1);

   if(ticc_type == TAPR_TICC) {
      sprintf(log_text, "#   Unit type:     TAPR TICC");
      write_log_comment(1);
      sprintf(log_text, "#   Serial number: %s", ticc_sn);
      write_log_comment(1);
      sprintf(log_text, "#   Firmware ver:  %s", ticc_fw);
      write_log_comment(1);
      sprintf(log_text, "#   Board ver:     %s", ticc_board);
      write_log_comment(1);
      sprintf(log_text, "#   EEPROM ver:    %d", ticc_eeprom);
      write_log_comment(1);
      sprintf(log_text, "#");
      write_log_comment(1);
   }
   else if(ticc_type == HP_TICC) {
      sprintf(log_text, "#   Unit type:     HP-53xxx interval counter");
      write_log_comment(1);
   }
   else if(ticc_type == PICPET_TICC) {
      sprintf(log_text, "#   Unit type:     PICPET timestamp  counter");
      write_log_comment(1);
   }
   else if(ticc_type == LARS_TICC) {
      sprintf(log_text, "#   Unit type:     LARS GPSDO TIC");
      write_log_comment(1);
   }
   else {
      sprintf(log_text, "#   Unit type:     Generic interval counter");
      write_log_comment(1);
   }

   if(have_ticc_mode) {
      if     (ticc_mode == 'F') sprintf(log_text, "#   Mode:          Frequency");
      else if(ticc_mode == 'H') sprintf(log_text, "#   Mode:          Phase");
      else if(ticc_mode == 'I') sprintf(log_text, "#   Mode:          Interval");
      else if(ticc_mode == 'P') sprintf(log_text, "#   Mode:          Period");
      else if(ticc_mode == 'T') sprintf(log_text, "#   Mode:          Timestamp");
      else if(ticc_mode == 'D') sprintf(log_text, "#   Mode:          Debug");
      else if(ticc_mode == 'L') sprintf(log_text, "#   Mode:          Timelab");
      else                      sprintf(log_text, "#   Mode:          Unknown: %c", ticc_mode);
      write_log_comment(1);
   }
   if(have_ticc_syncmode) {
      sprintf(log_text, "#   Sync mode:     %c", ticc_syncmode);
      write_log_comment(1);
   }
   if(have_ticc_cal) {
      sprintf(log_text, "#   Cal periods:   %d", ticc_cal);
      write_log_comment(1);
   }
   if(have_ticc_timeout) {
      sprintf(log_text, "#   Timeout:       %d", ticc_timeout);
      write_log_comment(1);
   }
   if(have_ticc_speed) {
      sprintf(log_text, "#   Clock speed:   %f MHz", ticc_speed);
      write_log_comment(1);
   }
   if(have_ticc_coarse) {
      sprintf(log_text, "#   Coarse speed:  %f usec", ticc_coarse);
      write_log_comment(1);
   }

   if(have_ticc_edges & 0x01) {
      sprintf(log_text, "#   chA edge:      %c", edge_a);
      write_log_comment(1);
   }
   if(have_ticc_edges & 0x02) {
      sprintf(log_text, "#   chB edge:      %c", edge_b);
      write_log_comment(1);
   }
   if(have_ticc_edges & 0x04) {
      sprintf(log_text, "#   chC edge:      %c", edge_c);
      write_log_comment(1);
   }
   if(have_ticc_edges & 0x08) {
      sprintf(log_text, "#   chD edge:      %c", edge_d);
      write_log_comment(1);
   }

   if(have_ticc_fudge & 0x01) {
      sprintf(log_text, "#   chA Fudge:     %g ps", fudge_a);
      write_log_comment(1);
   }
   if(have_ticc_fudge & 0x02) {
      sprintf(log_text, "#   chB Fudge:     %g ps", fudge_b);
      write_log_comment(1);
   }
   if(have_ticc_fudge & 0x04) {
      sprintf(log_text, "#   chC Fudge:     %g ps", fudge_c);
      write_log_comment(1);
   }
   if(have_ticc_fudge & 0x08) {
      sprintf(log_text, "#   chD Fudge:     %g ps", fudge_d);
      write_log_comment(1);
   }

   if(have_ticc_time2 & 0x01) {
      sprintf(log_text, "#   chA TIME2:     %d", time2_a);
      write_log_comment(1);
   }
   if(have_ticc_time2 & 0x02) {
      sprintf(log_text, "#   chB TIME2:     %d", time2_b);
      write_log_comment(1);
   }
   if(have_ticc_time2 & 0x04) {
      sprintf(log_text, "#   chC TIME2:     %d", time2_c);
      write_log_comment(1);
   }
   if(have_ticc_time2 & 0x08) {
      sprintf(log_text, "#   chD TIME2:     %d", time2_d);
      write_log_comment(1);
   }

   if(have_ticc_dilat & 0x01) {
      sprintf(log_text, "#   chA Dilation   %d", dilat_a);
      write_log_comment(1);
   }
   if(have_ticc_dilat & 0x02) {
      sprintf(log_text, "#   chB Dilation   %d", dilat_b);
      write_log_comment(1);
   }
   if(have_ticc_dilat & 0x04) {
      sprintf(log_text, "#   chC Dilation   %d", dilat_c);
      write_log_comment(1);
   }
   if(have_ticc_dilat & 0x08) {
      sprintf(log_text, "#   chD Dilation   %d", dilat_d);
      write_log_comment(1);
   }

   strcpy(log_text, "#");
   write_log_comment(1);
   strcpy(log_text, "#");
   write_log_comment(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x18f205(%rip), %rdi    # 0x29cb40
leaq 0x6445a(%rip), %rsi     # 0x171d9c
callq 0x9350
movl $0x1, %edi
callq 0x10cbe0
leaq 0x16a190(%rip), %rax    # 0x277ae8
cmpl $0x54, (%rax)
jne 0x10da3e
leaq 0x18f1d8(%rip), %rdi    # 0x29cb40
leaq 0x82a10(%rip), %rsi     # 0x19037f
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x18f1b9(%rip), %rdi    # 0x29cb40
leaq 0x82a0e(%rip), %rsi     # 0x19039c
leaq 0x25e50b(%rip), %rdx    # 0x36bea0
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x18f193(%rip), %rdi    # 0x29cb40
leaq 0x829fe(%rip), %rsi     # 0x1903b2
leaq 0x25e4c5(%rip), %rdx    # 0x36be80
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x18f16d(%rip), %rdi    # 0x29cb40
leaq 0x829ee(%rip), %rsi     # 0x1903c8
leaq 0x25e4df(%rip), %rdx    # 0x36bec0
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e4e7(%rip), %rax    # 0x36bee0
movl (%rax), %edx
leaq 0x18f13e(%rip), %rdi    # 0x29cb40
leaq 0x829d5(%rip), %rsi     # 0x1903de
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x18f11f(%rip), %rdi    # 0x29cb40
leaq 0x64374(%rip), %rsi     # 0x171d9c
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
jmp 0x10daea
leaq 0x16a0a3(%rip), %rax    # 0x277ae8
cmpl $0x48, (%rax)
jne 0x10da6b
leaq 0x18f0ef(%rip), %rdi    # 0x29cb40
leaq 0x8299c(%rip), %rsi     # 0x1903f4
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
jmp 0x10dae8
leaq 0x16a076(%rip), %rax    # 0x277ae8
cmpl $0x50, (%rax)
jne 0x10da98
leaq 0x18f0c2(%rip), %rdi    # 0x29cb40
leaq 0x8299c(%rip), %rsi     # 0x190421
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
jmp 0x10dae6
leaq 0x16a049(%rip), %rax    # 0x277ae8
cmpl $0x4c, (%rax)
jne 0x10dac5
leaq 0x18f095(%rip), %rdi    # 0x29cb40
leaq 0x8299c(%rip), %rsi     # 0x19044e
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
jmp 0x10dae4
leaq 0x18f074(%rip), %rdi    # 0x29cb40
leaq 0x8299d(%rip), %rsi     # 0x190470
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
jmp 0x10dae6
jmp 0x10dae8
jmp 0x10daea
leaq 0x25e3ff(%rip), %rax    # 0x36bef0
cmpl $0x0, (%rax)
je 0x10dc2f
leaq 0x25e3eb(%rip), %rax    # 0x36beec
cmpl $0x46, (%rax)
jne 0x10db20
leaq 0x18f033(%rip), %rdi    # 0x29cb40
leaq 0x82988(%rip), %rsi     # 0x19049c
movb $0x0, %al
callq 0x9060
jmp 0x10dc25
leaq 0x25e3c5(%rip), %rax    # 0x36beec
cmpl $0x48, (%rax)
jne 0x10db46
leaq 0x18f00d(%rip), %rdi    # 0x29cb40
leaq 0x8297f(%rip), %rsi     # 0x1904b9
movb $0x0, %al
callq 0x9060
jmp 0x10dc23
leaq 0x25e39f(%rip), %rax    # 0x36beec
cmpl $0x49, (%rax)
jne 0x10db6c
leaq 0x18efe7(%rip), %rdi    # 0x29cb40
leaq 0x82972(%rip), %rsi     # 0x1904d2
movb $0x0, %al
callq 0x9060
jmp 0x10dc21
leaq 0x25e379(%rip), %rax    # 0x36beec
cmpl $0x50, (%rax)
jne 0x10db92
leaq 0x18efc1(%rip), %rdi    # 0x29cb40
leaq 0x82968(%rip), %rsi     # 0x1904ee
movb $0x0, %al
callq 0x9060
jmp 0x10dc1f
leaq 0x25e353(%rip), %rax    # 0x36beec
cmpl $0x54, (%rax)
jne 0x10dbb5
leaq 0x18ef9b(%rip), %rdi    # 0x29cb40
leaq 0x8295c(%rip), %rsi     # 0x190508
movb $0x0, %al
callq 0x9060
jmp 0x10dc1d
leaq 0x25e330(%rip), %rax    # 0x36beec
cmpl $0x44, (%rax)
jne 0x10dbd8
leaq 0x18ef78(%rip), %rdi    # 0x29cb40
leaq 0x82956(%rip), %rsi     # 0x190525
movb $0x0, %al
callq 0x9060
jmp 0x10dc1b
leaq 0x25e30d(%rip), %rax    # 0x36beec
cmpl $0x4c, (%rax)
jne 0x10dbfb
leaq 0x18ef55(%rip), %rdi    # 0x29cb40
leaq 0x8294c(%rip), %rsi     # 0x19053e
movb $0x0, %al
callq 0x9060
jmp 0x10dc19
leaq 0x25e2ea(%rip), %rax    # 0x36beec
movl (%rax), %edx
leaq 0x18ef35(%rip), %rdi    # 0x29cb40
leaq 0x82947(%rip), %rsi     # 0x190559
movb $0x0, %al
callq 0x9060
jmp 0x10dc1b
jmp 0x10dc1d
jmp 0x10dc1f
jmp 0x10dc21
jmp 0x10dc23
jmp 0x10dc25
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e2c6(%rip), %rax    # 0x36befc
cmpl $0x0, (%rax)
je 0x10dc63
leaq 0x25e2b6(%rip), %rax    # 0x36bef8
movl (%rax), %edx
leaq 0x18eef5(%rip), %rdi    # 0x29cb40
leaq 0x82926(%rip), %rsi     # 0x190578
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e29a(%rip), %rax    # 0x36bf04
cmpl $0x0, (%rax)
je 0x10dc97
leaq 0x25e28a(%rip), %rax    # 0x36bf00
movl (%rax), %edx
leaq 0x18eec1(%rip), %rdi    # 0x29cb40
leaq 0x82908(%rip), %rsi     # 0x19058e
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e26e(%rip), %rax    # 0x36bf0c
cmpl $0x0, (%rax)
je 0x10dccb
leaq 0x25e25e(%rip), %rax    # 0x36bf08
movl (%rax), %edx
leaq 0x18ee8d(%rip), %rdi    # 0x29cb40
leaq 0x828ea(%rip), %rsi     # 0x1905a4
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e246(%rip), %rax    # 0x36bf18
cmpl $0x0, (%rax)
je 0x10dd01
leaq 0x25e232(%rip), %rax    # 0x36bf10
movsd (%rax), %xmm0
leaq 0x18ee57(%rip), %rdi    # 0x29cb40
leaq 0x828ca(%rip), %rsi     # 0x1905ba
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e220(%rip), %rax    # 0x36bf28
cmpl $0x0, (%rax)
je 0x10dd37
leaq 0x25e20c(%rip), %rax    # 0x36bf20
movsd (%rax), %xmm0
leaq 0x18ee21(%rip), %rdi    # 0x29cb40
leaq 0x828ae(%rip), %rsi     # 0x1905d4
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e226(%rip), %rax    # 0x36bf64
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10dd70
leaq 0x25e205(%rip), %rax    # 0x36bf54
movl (%rax), %edx
leaq 0x18ede8(%rip), %rdi    # 0x29cb40
leaq 0x82890(%rip), %rsi     # 0x1905ef
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e1ed(%rip), %rax    # 0x36bf64
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x10dda9
leaq 0x25e1d0(%rip), %rax    # 0x36bf58
movl (%rax), %edx
leaq 0x18edaf(%rip), %rdi    # 0x29cb40
leaq 0x8286d(%rip), %rsi     # 0x190605
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e1b4(%rip), %rax    # 0x36bf64
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x10dde2
leaq 0x25e19b(%rip), %rax    # 0x36bf5c
movl (%rax), %edx
leaq 0x18ed76(%rip), %rdi    # 0x29cb40
leaq 0x8284a(%rip), %rsi     # 0x19061b
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e17b(%rip), %rax    # 0x36bf64
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x10de1b
leaq 0x25e166(%rip), %rax    # 0x36bf60
movl (%rax), %edx
leaq 0x18ed3d(%rip), %rdi    # 0x29cb40
leaq 0x82827(%rip), %rsi     # 0x190631
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e12e(%rip), %rax    # 0x36bf50
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10de56
leaq 0x25e0fd(%rip), %rax    # 0x36bf30
movsd (%rax), %xmm0
leaq 0x18ed02(%rip), %rdi    # 0x29cb40
leaq 0x82802(%rip), %rsi     # 0x190647
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e0f3(%rip), %rax    # 0x36bf50
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x10de91
leaq 0x25e0ca(%rip), %rax    # 0x36bf38
movsd (%rax), %xmm0
leaq 0x18ecc7(%rip), %rdi    # 0x29cb40
leaq 0x827e0(%rip), %rsi     # 0x190660
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e0b8(%rip), %rax    # 0x36bf50
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x10decc
leaq 0x25e097(%rip), %rax    # 0x36bf40
movsd (%rax), %xmm0
leaq 0x18ec8c(%rip), %rdi    # 0x29cb40
leaq 0x827be(%rip), %rsi     # 0x190679
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e07d(%rip), %rax    # 0x36bf50
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x10df07
leaq 0x25e064(%rip), %rax    # 0x36bf48
movsd (%rax), %xmm0
leaq 0x18ec51(%rip), %rdi    # 0x29cb40
leaq 0x8279c(%rip), %rsi     # 0x190692
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e06a(%rip), %rax    # 0x36bf78
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10df40
leaq 0x25e049(%rip), %rax    # 0x36bf68
movl (%rax), %edx
leaq 0x18ec18(%rip), %rdi    # 0x29cb40
leaq 0x8277c(%rip), %rsi     # 0x1906ab
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25e031(%rip), %rax    # 0x36bf78
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x10df79
leaq 0x25e014(%rip), %rax    # 0x36bf6c
movl (%rax), %edx
leaq 0x18ebdf(%rip), %rdi    # 0x29cb40
leaq 0x82759(%rip), %rsi     # 0x1906c1
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25dff8(%rip), %rax    # 0x36bf78
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x10dfb2
leaq 0x25dfdf(%rip), %rax    # 0x36bf70
movl (%rax), %edx
leaq 0x18eba6(%rip), %rdi    # 0x29cb40
leaq 0x82736(%rip), %rsi     # 0x1906d7
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25dfbf(%rip), %rax    # 0x36bf78
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x10dfeb
leaq 0x25dfaa(%rip), %rax    # 0x36bf74
movl (%rax), %edx
leaq 0x18eb6d(%rip), %rdi    # 0x29cb40
leaq 0x82713(%rip), %rsi     # 0x1906ed
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25df9a(%rip), %rax    # 0x36bf8c
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10e024
leaq 0x25df79(%rip), %rax    # 0x36bf7c
movl (%rax), %edx
leaq 0x18eb34(%rip), %rdi    # 0x29cb40
leaq 0x826f0(%rip), %rsi     # 0x190703
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25df61(%rip), %rax    # 0x36bf8c
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x10e05d
leaq 0x25df44(%rip), %rax    # 0x36bf80
movl (%rax), %edx
leaq 0x18eafb(%rip), %rdi    # 0x29cb40
leaq 0x826cd(%rip), %rsi     # 0x190719
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25df28(%rip), %rax    # 0x36bf8c
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x10e096
leaq 0x25df0f(%rip), %rax    # 0x36bf84
movl (%rax), %edx
leaq 0x18eac2(%rip), %rdi    # 0x29cb40
leaq 0x826aa(%rip), %rsi     # 0x19072f
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x25deef(%rip), %rax    # 0x36bf8c
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x10e0cf
leaq 0x25deda(%rip), %rax    # 0x36bf88
movl (%rax), %edx
leaq 0x18ea89(%rip), %rdi    # 0x29cb40
leaq 0x82687(%rip), %rsi     # 0x190745
movb $0x0, %al
callq 0x9060
movl $0x1, %edi
callq 0x10cbe0
leaq 0x18ea6a(%rip), %rdi    # 0x29cb40
leaq 0x63cbf(%rip), %rsi     # 0x171d9c
callq 0x9350
movl $0x1, %edi
callq 0x10cbe0
leaq 0x18ea4d(%rip), %rdi    # 0x29cb40
leaq 0x63ca2(%rip), %rsi     # 0x171d9c
callq 0x9350
movl $0x1, %edi
callq 0x10cbe0
popq %rbp
retq
nopl (%rax,%rax)