// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x174981(%rip), %rbx    # 0x227960
movw $0x23, (%rbx)
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x14f915(%rip), %rax    # 0x202908
movl (%rax), %eax
addl $-0x48, %eax
roll $0x1e, %eax
cmpl $0x3, %eax
ja 0xb311f
leaq 0x61e05(%rip), %rcx     # 0x114e10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movups 0x6481a(%rip), %xmm0    # 0x117835
movups %xmm0, 0x1d(%rbx)
movups 0x64802(%rip), %xmm0    # 0x117828
movaps %xmm0, 0x10(%rbx)
movups 0x647e7(%rip), %xmm0    # 0x117818
jmp 0xb313c
movups 0x64825(%rip), %xmm0    # 0x117862
movups %xmm0, 0x1d(%rbx)
movups 0x6480d(%rip), %xmm0    # 0x117855
movaps %xmm0, 0x10(%rbx)
movups 0x647f2(%rip), %xmm0    # 0x117845
jmp 0xb313c
movups 0x64751(%rip), %xmm0    # 0x1177b0
movups %xmm0, 0xd(%rbx)
movups 0x64739(%rip), %xmm0    # 0x1177a3
movaps %xmm0, (%rbx)
pushq $0x1
popq %r14
movl %r14d, %edi
callq 0xb25f5
leaq 0x64740(%rip), %rsi     # 0x1177c0
leaq 0x243c39(%rip), %rdx    # 0x2f6cc0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl %r14d, %edi
callq 0xb25f5
leaq 0x64736(%rip), %rsi     # 0x1177d6
leaq 0x243bf9(%rip), %rdx    # 0x2f6ca0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl %r14d, %edi
callq 0xb25f5
leaq 0x6472c(%rip), %rsi     # 0x1177ec
leaq 0x243c19(%rip), %rdx    # 0x2f6ce0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl %r14d, %edi
callq 0xb25f5
leaq 0x243c20(%rip), %rax    # 0x2f6d00
movl (%rax), %edx
leaq 0x64719(%rip), %rsi     # 0x117802
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movl %r14d, %edi
callq 0xb25f5
movw $0x23, (%rbx)
jmp 0xb313f
movups 0x64779(%rip), %xmm0    # 0x117882
movaps %xmm0, 0x10(%rbx)
movups 0x6475e(%rip), %xmm0    # 0x117872
movaps %xmm0, (%rbx)
movw $0x43, 0x20(%rbx)
jmp 0xb313f
movups 0x6478a(%rip), %xmm0    # 0x1178b0
movups %xmm0, 0x1c(%rbx)
movups 0x64773(%rip), %xmm0    # 0x1178a4
movaps %xmm0, 0x10(%rbx)
movups 0x64758(%rip), %xmm0    # 0x117894
movaps %xmm0, (%rbx)
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243bc2(%rip), %rax    # 0x2f6d10
cmpl $0x0, (%rax)
je 0xb3227
leaq 0x243bae(%rip), %rax    # 0x2f6d0c
movl (%rax), %edx
leal -0x44(%rdx), %eax
cmpl $0x10, %eax
ja 0xb318f
leaq 0x61cb1(%rip), %rcx     # 0x114e20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movups 0x647d3(%rip), %xmm0    # 0x117952
movups %xmm0, 0x9(%rbx)
movups 0x647bf(%rip), %xmm0    # 0x117949
jmp 0xb321c
leaq 0x1747ca(%rip), %rdi    # 0x227960
leaq 0x647e0(%rip), %rsi     # 0x11797d
xorl %eax, %eax
callq 0x9060
jmp 0xb321f
movups 0x6476f(%rip), %xmm0    # 0x11791c
movups %xmm0, 0xa(%rbx)
movups 0x6475a(%rip), %xmm0    # 0x117912
jmp 0xb321c
movups 0x6470c(%rip), %xmm0    # 0x1178cd
movups %xmm0, 0xd(%rbx)
movups 0x646f4(%rip), %xmm0    # 0x1178c0
jmp 0xb321c
movups 0x64764(%rip), %xmm0    # 0x117939
movups %xmm0, 0xd(%rbx)
movups 0x6474c(%rip), %xmm0    # 0x11792c
jmp 0xb321c
movups 0x646fd(%rip), %xmm0    # 0x1178e6
movups %xmm0, 0x9(%rbx)
movups 0x646e9(%rip), %xmm0    # 0x1178dd
jmp 0xb321c
movups 0x64705(%rip), %xmm0    # 0x117902
movups %xmm0, 0xc(%rbx)
movups 0x646ee(%rip), %xmm0    # 0x1178f6
jmp 0xb321c
movups 0x6475c(%rip), %xmm0    # 0x11796d
movups %xmm0, 0xb(%rbx)
movups 0x64746(%rip), %xmm0    # 0x117962
movaps %xmm0, (%rbx)
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243aee(%rip), %rax    # 0x2f6d1c
cmpl $0x0, (%rax)
je 0xb3259
leaq 0x243ade(%rip), %rax    # 0x2f6d18
movl (%rax), %edx
leaq 0x17471d(%rip), %rdi    # 0x227960
leaq 0x64752(%rip), %rsi     # 0x11799c
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243ac4(%rip), %rax    # 0x2f6d24
cmpl $0x0, (%rax)
je 0xb328b
leaq 0x243ab4(%rip), %rax    # 0x2f6d20
movl (%rax), %edx
leaq 0x1746eb(%rip), %rdi    # 0x227960
leaq 0x64736(%rip), %rsi     # 0x1179b2
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243a9a(%rip), %rax    # 0x2f6d2c
cmpl $0x0, (%rax)
je 0xb32bd
leaq 0x243a8a(%rip), %rax    # 0x2f6d28
movl (%rax), %edx
leaq 0x1746b9(%rip), %rdi    # 0x227960
leaq 0x6471a(%rip), %rsi     # 0x1179c8
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243a74(%rip), %rax    # 0x2f6d38
cmpl $0x0, (%rax)
je 0xb32f1
leaq 0x243a60(%rip), %rax    # 0x2f6d30
movsd (%rax), %xmm0
leaq 0x174685(%rip), %rdi    # 0x227960
leaq 0x646fc(%rip), %rsi     # 0x1179de
movb $0x1, %al
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243a50(%rip), %rax    # 0x2f6d48
cmpl $0x0, (%rax)
je 0xb3325
leaq 0x243a3c(%rip), %rax    # 0x2f6d40
movsd (%rax), %xmm0
leaq 0x174651(%rip), %rdi    # 0x227960
leaq 0x646e2(%rip), %rsi     # 0x1179f8
movb $0x1, %al
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243a58(%rip), %r14    # 0x2f6d84
movl (%r14), %eax
testb $0x1, %al
je 0xb335c
leaq 0x243a3a(%rip), %rax    # 0x2f6d74
movl (%rax), %edx
leaq 0x17461d(%rip), %rdi    # 0x227960
leaq 0x646c9(%rip), %rsi     # 0x117a13
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x2, %al
je 0xb3389
leaq 0x243a11(%rip), %rax    # 0x2f6d78
movl (%rax), %edx
leaq 0x1745f0(%rip), %rdi    # 0x227960
leaq 0x646b2(%rip), %rsi     # 0x117a29
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x4, %al
je 0xb33b6
leaq 0x2439e8(%rip), %rax    # 0x2f6d7c
movl (%rax), %edx
leaq 0x1745c3(%rip), %rdi    # 0x227960
leaq 0x6469b(%rip), %rsi     # 0x117a3f
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x8, %al
je 0xb33e0
leaq 0x2439bf(%rip), %rax    # 0x2f6d80
movl (%rax), %edx
leaq 0x174596(%rip), %rdi    # 0x227960
leaq 0x64684(%rip), %rsi     # 0x117a55
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243989(%rip), %r14    # 0x2f6d70
movl (%r14), %eax
testb $0x1, %al
je 0xb3419
leaq 0x24395b(%rip), %rax    # 0x2f6d50
movsd (%rax), %xmm0
leaq 0x174560(%rip), %rdi    # 0x227960
leaq 0x64664(%rip), %rsi     # 0x117a6b
movb $0x1, %al
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x2, %al
je 0xb3448
leaq 0x243934(%rip), %rax    # 0x2f6d58
movsd (%rax), %xmm0
leaq 0x174531(%rip), %rdi    # 0x227960
leaq 0x6464e(%rip), %rsi     # 0x117a84
movb $0x1, %al
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x4, %al
je 0xb3477
leaq 0x24390d(%rip), %rax    # 0x2f6d60
movsd (%rax), %xmm0
leaq 0x174502(%rip), %rdi    # 0x227960
leaq 0x64638(%rip), %rsi     # 0x117a9d
movb $0x1, %al
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x8, %al
je 0xb34a3
leaq 0x2438e6(%rip), %rax    # 0x2f6d68
movsd (%rax), %xmm0
leaq 0x1744d3(%rip), %rdi    # 0x227960
leaq 0x64622(%rip), %rsi     # 0x117ab6
movb $0x1, %al
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x2438ee(%rip), %r14    # 0x2f6d98
movl (%r14), %eax
testb $0x1, %al
je 0xb34da
leaq 0x2438d0(%rip), %rax    # 0x2f6d88
movl (%rax), %edx
leaq 0x17449f(%rip), %rdi    # 0x227960
leaq 0x64607(%rip), %rsi     # 0x117acf
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x2, %al
je 0xb3507
leaq 0x2438a7(%rip), %rax    # 0x2f6d8c
movl (%rax), %edx
leaq 0x174472(%rip), %rdi    # 0x227960
leaq 0x645f0(%rip), %rsi     # 0x117ae5
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x4, %al
je 0xb3534
leaq 0x24387e(%rip), %rax    # 0x2f6d90
movl (%rax), %edx
leaq 0x174445(%rip), %rdi    # 0x227960
leaq 0x645d9(%rip), %rsi     # 0x117afb
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x8, %al
je 0xb355e
leaq 0x243855(%rip), %rax    # 0x2f6d94
movl (%rax), %edx
leaq 0x174418(%rip), %rdi    # 0x227960
leaq 0x645c2(%rip), %rsi     # 0x117b11
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
leaq 0x243847(%rip), %r14    # 0x2f6dac
movl (%r14), %eax
testb $0x1, %al
je 0xb3595
leaq 0x243829(%rip), %rax    # 0x2f6d9c
movl (%rax), %edx
leaq 0x1743e4(%rip), %rdi    # 0x227960
leaq 0x645a4(%rip), %rsi     # 0x117b27
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x2, %al
je 0xb35c2
leaq 0x243800(%rip), %rax    # 0x2f6da0
movl (%rax), %edx
leaq 0x1743b7(%rip), %rdi    # 0x227960
leaq 0x6458d(%rip), %rsi     # 0x117b3d
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x4, %al
je 0xb35ef
leaq 0x2437d7(%rip), %rax    # 0x2f6da4
movl (%rax), %edx
leaq 0x17438a(%rip), %rdi    # 0x227960
leaq 0x64576(%rip), %rsi     # 0x117b53
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movl (%r14), %eax
testb $0x8, %al
je 0xb3619
leaq 0x2437ae(%rip), %rax    # 0x2f6da8
movl (%rax), %edx
leaq 0x17435d(%rip), %rdi    # 0x227960
leaq 0x6455f(%rip), %rsi     # 0x117b69
xorl %eax, %eax
callq 0x9060
pushq $0x1
popq %rdi
callq 0xb25f5
movw $0x23, %r15w
movw %r15w, (%rbx)
pushq $0x1
popq %r14
movl %r14d, %edi
callq 0xb25f5
movw %r15w, (%rbx)
movl %r14d, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xb25f5