// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: tim_command(char*)
int tim_command(char *line)
{
   if(line == 0) return 1;

   if(!strnicmp(line, "BLN", 3)) {  // new format file
      return 1;
   }
   else if(!strnicmp(line, "DBL", 3)) {
      return 1;
   }
   else if(!strnicmp(line, "S32", 3)) {
      return 1;
   }
   else if(!strnicmp(line, "STR", 3)) {
      return 1;
   }

   else if(!strnicmp(line, "CAP", 3)) {
      if(strlen(line) > 4) {
         if(saw_log_title) strcat(plot_title, " | ");
         strcat(plot_title, &line[4]);
         set_log_title(plot_title);
         return 1;
      }
   }
   else if(!strnicmp(line, "DRIVER", 6)) {
      if(strlen(line) > 6+2) {
         if(saw_log_title) strcat(plot_title, " | ");
         strcat(plot_title, &line[6+2]);
         set_log_title(plot_title);
         return 1;
      }
   }
   else if(!strnicmp(line, "IMO", 3)) {
      if(strlen(line) > 4) {
         if(saw_log_title) strcat(plot_title, " | ");
         strcat(plot_title, &line[4]);
         set_log_title(plot_title);
         return 1;
      }
   }
   else if(!strnicmp(line, "INSTRUMENT", 10)) {
      if(strlen(line) > 10+2) {
         if(saw_log_title) strcat(plot_title, " | ");
         strcat(plot_title, &line[10+2]);
         set_log_title(plot_title);
         return 1;
      }
   }
   else if(!strnicmp(line, "MJD", 3)) {  // modified Julian date
      if(strlen(line) > 4) {
         sscanf(&line[4], "%lf", &read_log_jd);
         read_log_jd += JD_MJD;
         return 1;
      }
   }
   else if(!strnicmp(line, "NOM", 3)) {  // nominal freq
      if(strlen(line) > 4) {
         log_freq = NOMINAL_FREQ;
         sscanf(&line[4], "%lf", &log_freq);
         if(log_freq > 0.0) cha_phase_wrap_interval = 1.0 / log_freq;
         else               cha_phase_wrap_interval = 1.0 / NOMINAL_FREQ;
         return 1;
      }
   }           
   else if(!strnicmp(line, "PER", 3)) {
      if(strlen(line) > 4) {
         adev_period = 1.0;
         sscanf(&line[4], "%lf", &adev_period);   // aaaaaapppppp other periods 
         pps_adev_period = adev_period;
         osc_adev_period = adev_period;
         chc_adev_period = adev_period;
         chd_adev_period = adev_period;
         return 1;
      }
   }
   else if(!strnicmp(line, "SCA", 3)) {
      if(strlen(line) > 4) {
         log_pps_scale = log_osc_scale = 1.0;
         sscanf(&line[4], "%lf %lf", &log_pps_scale, &log_osc_scale);
         return 1;
      }
   }
   else if(!strnicmp(line, "TIC", 3)) {
      saw_timelab_tic = 1;
      return 1;
   }
   else if(!strnicmp(line, "TIM", 3)) {
      if(strlen(line) > 4) {
         if(saw_log_title) strcat(plot_title, " | ");
         strcat(plot_title, &line[4]);
         set_log_title(plot_title);
         return 1;
      }
   }
   else {
      saw_timelab_tic = 0;
      return 1;
   }

   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x1, %ebx
testq %rdi, %rdi
je 0xd8190
movq %rdi, %r14
leaq 0x5b309(%rip), %rsi     # 0x1330c2
movl $0x3, %edx
callq 0x94a0
testl %eax, %eax
je 0xd8190
leaq 0x5b2f4(%rip), %rsi     # 0x1330c6
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd8190
leaq 0x5b2dc(%rip), %rsi     # 0x1330ca
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd8190
leaq 0x5b2c4(%rip), %rsi     # 0x1330ce
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd8190
leaq 0x32dab(%rip), %rsi     # 0x10abd1
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd7f42
leaq 0x5b290(%rip), %rsi     # 0x1330d2
movl $0x6, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd7f7a
leaq 0x5b27b(%rip), %rsi     # 0x1330d9
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd7f42
leaq 0x5b263(%rip), %rsi     # 0x1330dd
movl $0xa, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd7fb2
leaq 0x5b252(%rip), %rsi     # 0x1330e8
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd8007
leaq 0x5b23a(%rip), %rsi     # 0x1330ec
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd8052
leaq 0x5b222(%rip), %rsi     # 0x1330f0
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd80d2
leaq 0x5b20a(%rip), %rsi     # 0x1330f4
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd8143
leaq 0x55a6a(%rip), %rsi     # 0x12d970
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd819d
leaq 0x5b252(%rip), %rsi     # 0x133174
movl $0x3, %edx
movq %r14, %rdi
callq 0x94a0
testl %eax, %eax
je 0xd7f42
movl $0x0, 0x2a2763(%rip)    # 0x37a6a0
jmp 0xd8190
movq %r14, %rdi
callq 0x9120
cmpq $0x5, %rax
jb 0xd818e
cmpl $0x0, 0x2a2719(%rip)    # 0x37a674
je 0xd7f74
leaq 0x2668ec(%rip), %r15    # 0x33e850
movq %r15, %rdi
callq 0x9120
movl $0x207c20, (%r15,%rax)  # imm = 0x207C20
addq $0x4, %r14
jmp 0xd7fe8
movq %r14, %rdi
callq 0x9120
cmpq $0x9, %rax
jb 0xd818e
cmpl $0x0, 0x2a26e1(%rip)    # 0x37a674
je 0xd7fac
leaq 0x2668b4(%rip), %r15    # 0x33e850
movq %r15, %rdi
callq 0x9120
movl $0x207c20, (%r15,%rax)  # imm = 0x207C20
addq $0x8, %r14
jmp 0xd7fe8
movq %r14, %rdi
callq 0x9120
cmpq $0xd, %rax
jb 0xd818e
cmpl $0x0, 0x2a26a9(%rip)    # 0x37a674
je 0xd7fe4
leaq 0x26687c(%rip), %r15    # 0x33e850
movq %r15, %rdi
callq 0x9120
movl $0x207c20, (%r15,%rax)  # imm = 0x207C20
addq $0xc, %r14
leaq 0x266861(%rip), %r15    # 0x33e850
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
movq %r15, %rdi
callq 0xd72b6
jmp 0xd8190
movq %r14, %rdi
callq 0x9120
cmpq $0x5, %rax
jb 0xd818e
addq $0x4, %r14
leaq 0x5b24c(%rip), %rsi     # 0x133270
leaq 0x2a267d(%rip), %rdx    # 0x37a6a8
movq %r14, %rdi
xorl %eax, %eax
callq 0x9360
movsd 0x2a266b(%rip), %xmm0   # 0x37a6a8
addsd 0x46783(%rip), %xmm0    # 0x11e7c8
movsd %xmm0, 0x2a265b(%rip)   # 0x37a6a8
jmp 0xd8190
movq %r14, %rdi
callq 0x9120
cmpq $0x5, %rax
jb 0xd818e
movabsq $0x416312d000000000, %rax # imm = 0x416312D000000000
movq %rax, 0x2a2623(%rip)    # 0x37a698
leaq 0x2a261c(%rip), %rdx    # 0x37a698
addq $0x4, %r14
leaq 0x5b1e9(%rip), %rsi     # 0x133270
movq %r14, %rdi
xorl %eax, %eax
callq 0x9360
movsd 0x2a25ff(%rip), %xmm0   # 0x37a698
movsd 0x30fcf(%rip), %xmm1    # 0x109070
divsd %xmm0, %xmm1
xorpd %xmm2, %xmm2
cmpltsd %xmm0, %xmm2
andpd %xmm2, %xmm1
movsd 0x4619e(%rip), %xmm0    # 0x11e258
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
leaq 0x2348bf(%rip), %rax    # 0x30c988
movlpd %xmm2, (%rax)
jmp 0xd8190
movq %r14, %rdi
callq 0x9120
cmpq $0x5, %rax
jb 0xd818e
leaq 0x164c0d(%rip), %r15    # 0x23ccf8
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%r15)
addq $0x4, %r14
leaq 0x5b16d(%rip), %rsi     # 0x133270
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x9360
movsd (%r15), %xmm0
leaq 0x164be4(%rip), %rax    # 0x23cd00
movsd %xmm0, (%rax)
leaq 0x164be1(%rip), %rax    # 0x23cd08
movsd %xmm0, (%rax)
leaq 0x164bde(%rip), %rax    # 0x23cd10
movsd %xmm0, (%rax)
leaq 0x164bdb(%rip), %rax    # 0x23cd18
movsd %xmm0, (%rax)
jmp 0xd8190
movq %r14, %rdi
callq 0x9120
cmpq $0x5, %rax
jb 0xd818e
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x2a251e(%rip)    # 0x37a680
leaq 0x2a2517(%rip), %rcx    # 0x37a680
movq %rax, 0x2a2508(%rip)    # 0x37a678
leaq 0x2a2501(%rip), %rdx    # 0x37a678
addq $0x4, %r14
leaq 0x5b0ea(%rip), %rsi     # 0x13326c
movq %r14, %rdi
xorl %eax, %eax
callq 0x9360
jmp 0xd8190
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, 0x2a24f9(%rip)    # 0x37a6a0
jmp 0xd8190