// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
leaq 0x179e7e(%rip), %rbx    # 0x23d960
movw $0x23, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x154e10(%rip), %rax    # 0x218908
movl (%rax), %eax
addl $-0x48, %eax
roll $0x1e, %eax
cmpl $0x3, %eax
ja 0xc3c2a
leaq 0x672f0(%rip), %rcx     # 0x12ae00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movups 0x69d05(%rip), %xmm0    # 0x12d825
movups %xmm0, 0x1d(%rbx)
movups 0x69ced(%rip), %xmm0    # 0x12d818
movaps %xmm0, 0x10(%rbx)
movups 0x69cd2(%rip), %xmm0    # 0x12d808
jmp 0xc3c47
movups 0x69d10(%rip), %xmm0    # 0x12d852
movups %xmm0, 0x1d(%rbx)
movups 0x69cf8(%rip), %xmm0    # 0x12d845
movaps %xmm0, 0x10(%rbx)
movups 0x69cdd(%rip), %xmm0    # 0x12d835
jmp 0xc3c47
movups 0x69c3c(%rip), %xmm0    # 0x12d7a0
movups %xmm0, 0xd(%rbx)
movups 0x69c24(%rip), %xmm0    # 0x12d793
movaps %xmm0, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x69c2d(%rip), %rsi     # 0x12d7b0
leaq 0x249136(%rip), %rdx    # 0x30ccc0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x69c21(%rip), %rsi     # 0x12d7c6
leaq 0x2490f4(%rip), %rdx    # 0x30cca0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x69c15(%rip), %rsi     # 0x12d7dc
leaq 0x249112(%rip), %rdx    # 0x30cce0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x249117(%rip), %rax    # 0x30cd00
movl (%rax), %edx
leaq 0x69c00(%rip), %rsi     # 0x12d7f2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, (%rbx)
jmp 0xc3c4a
movups 0x69c5e(%rip), %xmm0    # 0x12d872
movaps %xmm0, 0x10(%rbx)
movups 0x69c43(%rip), %xmm0    # 0x12d862
movaps %xmm0, (%rbx)
movw $0x43, 0x20(%rbx)
jmp 0xc3c4a
movups 0x69c6f(%rip), %xmm0    # 0x12d8a0
movups %xmm0, 0x1c(%rbx)
movups 0x69c58(%rip), %xmm0    # 0x12d894
movaps %xmm0, 0x10(%rbx)
movups 0x69c3d(%rip), %xmm0    # 0x12d884
movaps %xmm0, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x2490b5(%rip), %rax    # 0x30cd10
cmpl $0x0, (%rax)
je 0xc3d36
leaq 0x2490a1(%rip), %rax    # 0x30cd0c
movl (%rax), %edx
leal -0x44(%rdx), %eax
cmpl $0x10, %eax
ja 0xc3c9c
leaq 0x67194(%rip), %rcx     # 0x12ae10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movups 0x69cb6(%rip), %xmm0    # 0x12d942
movups %xmm0, 0x9(%rbx)
movups 0x69ca2(%rip), %xmm0    # 0x12d939
jmp 0xc3d29
leaq 0x179cbd(%rip), %rdi    # 0x23d960
leaq 0x69cc3(%rip), %rsi     # 0x12d96d
xorl %eax, %eax
callq 0x9060
jmp 0xc3d2c
movups 0x69c52(%rip), %xmm0    # 0x12d90c
movups %xmm0, 0xa(%rbx)
movups 0x69c3d(%rip), %xmm0    # 0x12d902
jmp 0xc3d29
movups 0x69bef(%rip), %xmm0    # 0x12d8bd
movups %xmm0, 0xd(%rbx)
movups 0x69bd7(%rip), %xmm0    # 0x12d8b0
jmp 0xc3d29
movups 0x69c47(%rip), %xmm0    # 0x12d929
movups %xmm0, 0xd(%rbx)
movups 0x69c2f(%rip), %xmm0    # 0x12d91c
jmp 0xc3d29
movups 0x69be0(%rip), %xmm0    # 0x12d8d6
movups %xmm0, 0x9(%rbx)
movups 0x69bcc(%rip), %xmm0    # 0x12d8cd
jmp 0xc3d29
movups 0x69be8(%rip), %xmm0    # 0x12d8f2
movups %xmm0, 0xc(%rbx)
movups 0x69bd1(%rip), %xmm0    # 0x12d8e6
jmp 0xc3d29
movups 0x69c3f(%rip), %xmm0    # 0x12d95d
movups %xmm0, 0xb(%rbx)
movups 0x69c29(%rip), %xmm0    # 0x12d952
movaps %xmm0, (%rbx)
movl $0x1, %edi
callq 0xc3105
leaq 0x248fdf(%rip), %rax    # 0x30cd1c
cmpl $0x0, (%rax)
je 0xc3d6a
leaq 0x248fcf(%rip), %rax    # 0x30cd18
movl (%rax), %edx
leaq 0x179c0e(%rip), %rdi    # 0x23d960
leaq 0x69c33(%rip), %rsi     # 0x12d98c
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x248fb3(%rip), %rax    # 0x30cd24
cmpl $0x0, (%rax)
je 0xc3d9e
leaq 0x248fa3(%rip), %rax    # 0x30cd20
movl (%rax), %edx
leaq 0x179bda(%rip), %rdi    # 0x23d960
leaq 0x69c15(%rip), %rsi     # 0x12d9a2
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x248f87(%rip), %rax    # 0x30cd2c
cmpl $0x0, (%rax)
je 0xc3dd2
leaq 0x248f77(%rip), %rax    # 0x30cd28
movl (%rax), %edx
leaq 0x179ba6(%rip), %rdi    # 0x23d960
leaq 0x69bf7(%rip), %rsi     # 0x12d9b8
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x248f5f(%rip), %rax    # 0x30cd38
cmpl $0x0, (%rax)
je 0xc3e08
leaq 0x248f4b(%rip), %rax    # 0x30cd30
movsd (%rax), %xmm0
leaq 0x179b70(%rip), %rdi    # 0x23d960
leaq 0x69bd7(%rip), %rsi     # 0x12d9ce
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x248f39(%rip), %rax    # 0x30cd48
cmpl $0x0, (%rax)
je 0xc3e3e
leaq 0x248f25(%rip), %rax    # 0x30cd40
movsd (%rax), %xmm0
leaq 0x179b3a(%rip), %rdi    # 0x23d960
leaq 0x69bbb(%rip), %rsi     # 0x12d9e8
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x248f3f(%rip), %r14    # 0x30cd84
testb $0x1, (%r14)
je 0xc3e73
leaq 0x248f22(%rip), %rax    # 0x30cd74
movl (%rax), %edx
leaq 0x179b05(%rip), %rdi    # 0x23d960
leaq 0x69ba1(%rip), %rsi     # 0x12da03
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x2, (%r14)
je 0xc3ea1
leaq 0x248ef8(%rip), %rax    # 0x30cd78
movl (%rax), %edx
leaq 0x179ad7(%rip), %rdi    # 0x23d960
leaq 0x69b89(%rip), %rsi     # 0x12da19
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x4, (%r14)
je 0xc3ecf
leaq 0x248ece(%rip), %rax    # 0x30cd7c
movl (%rax), %edx
leaq 0x179aa9(%rip), %rdi    # 0x23d960
leaq 0x69b71(%rip), %rsi     # 0x12da2f
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x8, (%r14)
je 0xc3efd
leaq 0x248ea4(%rip), %rax    # 0x30cd80
movl (%rax), %edx
leaq 0x179a7b(%rip), %rdi    # 0x23d960
leaq 0x69b59(%rip), %rsi     # 0x12da45
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x248e6c(%rip), %r14    # 0x30cd70
testb $0x1, (%r14)
je 0xc3f34
leaq 0x248e3f(%rip), %rax    # 0x30cd50
movsd (%rax), %xmm0
leaq 0x179a44(%rip), %rdi    # 0x23d960
leaq 0x69b38(%rip), %rsi     # 0x12da5b
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x2, (%r14)
je 0xc3f64
leaq 0x248e17(%rip), %rax    # 0x30cd58
movsd (%rax), %xmm0
leaq 0x179a14(%rip), %rdi    # 0x23d960
leaq 0x69b21(%rip), %rsi     # 0x12da74
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x4, (%r14)
je 0xc3f94
leaq 0x248def(%rip), %rax    # 0x30cd60
movsd (%rax), %xmm0
leaq 0x1799e4(%rip), %rdi    # 0x23d960
leaq 0x69b0a(%rip), %rsi     # 0x12da8d
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x8, (%r14)
je 0xc3fc4
leaq 0x248dc7(%rip), %rax    # 0x30cd68
movsd (%rax), %xmm0
leaq 0x1799b4(%rip), %rdi    # 0x23d960
leaq 0x69af3(%rip), %rsi     # 0x12daa6
movb $0x1, %al
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x248dcd(%rip), %r14    # 0x30cd98
testb $0x1, (%r14)
je 0xc3ff9
leaq 0x248db0(%rip), %rax    # 0x30cd88
movl (%rax), %edx
leaq 0x17997f(%rip), %rdi    # 0x23d960
leaq 0x69ad7(%rip), %rsi     # 0x12dabf
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x2, (%r14)
je 0xc4027
leaq 0x248d86(%rip), %rax    # 0x30cd8c
movl (%rax), %edx
leaq 0x179951(%rip), %rdi    # 0x23d960
leaq 0x69abf(%rip), %rsi     # 0x12dad5
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x4, (%r14)
je 0xc4055
leaq 0x248d5c(%rip), %rax    # 0x30cd90
movl (%rax), %edx
leaq 0x179923(%rip), %rdi    # 0x23d960
leaq 0x69aa7(%rip), %rsi     # 0x12daeb
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x8, (%r14)
je 0xc4083
leaq 0x248d32(%rip), %rax    # 0x30cd94
movl (%rax), %edx
leaq 0x1798f5(%rip), %rdi    # 0x23d960
leaq 0x69a8f(%rip), %rsi     # 0x12db01
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
leaq 0x248d22(%rip), %r14    # 0x30cdac
testb $0x1, (%r14)
je 0xc40b8
leaq 0x248d05(%rip), %rax    # 0x30cd9c
movl (%rax), %edx
leaq 0x1798c0(%rip), %rdi    # 0x23d960
leaq 0x69a70(%rip), %rsi     # 0x12db17
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x2, (%r14)
je 0xc40e6
leaq 0x248cdb(%rip), %rax    # 0x30cda0
movl (%rax), %edx
leaq 0x179892(%rip), %rdi    # 0x23d960
leaq 0x69a58(%rip), %rsi     # 0x12db2d
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x4, (%r14)
je 0xc4114
leaq 0x248cb1(%rip), %rax    # 0x30cda4
movl (%rax), %edx
leaq 0x179864(%rip), %rdi    # 0x23d960
leaq 0x69a40(%rip), %rsi     # 0x12db43
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
testb $0x8, (%r14)
je 0xc4142
leaq 0x248c87(%rip), %rax    # 0x30cda8
movl (%rax), %edx
leaq 0x179836(%rip), %rdi    # 0x23d960
leaq 0x69a28(%rip), %rsi     # 0x12db59
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc3105
movw $0x23, %r14w
movw %r14w, (%rbx)
movl $0x1, %edi
callq 0xc3105
movw %r14w, (%rbx)
movl $0x1, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0xc3105