// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: read_tie_file(char*)
void read_tie_file(char *s)
{
FILE *tie_file;
double cha, chb, chc, chd;
int n;
int count;

   // stop recording live signal strength data and load in signal strength 
   // data from a log file

   tie_file = topen(s, "r");
   if(tie_file == 0) return;

   ATYPE = A_MTIE;
   if(rcvr_type == TICC_RCVR) all_adevs = ALL_CHANS;
   else                       all_adevs = SINGLE_ADEVS;
   alloc_mtie(10);

   count = 0;

   while(fgets(out, sizeof out, tie_file) != NULL) {
      if((out[0] == '*') || (out[0] == ';') || (out[0] == '/') || (out[0] == '#')) {
         continue;  // comment line
      }
      n = sscanf(out, "%lg %lg %lg %lg", &cha, &chb, &chc, &chd);
      if(n >= 1) add_mtie_point(CHA_MTIE, cha);
      if(n >= 2) add_mtie_point(CHB_MTIE, chb);
      if(n >= 3) add_mtie_point(CHC_MTIE, chc);
      if(n >= 4) add_mtie_point(CHD_MTIE, chd);
      if(++count > adev_q_size) break;
   }

   fclose(tie_file);

   find_global_max();
   force_adev_redraw(10);
   config_screen(108);
   if(adevs_active(0)) last_was_adev = 'I';

// show_all_adevs();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x48bcc(%rip), %rsi     # 0x120d8d
callq 0x9a47
testq %rax, %rax
je 0xd8360
movq %rax, %rbx
leaq 0x14b437(%rip), %r13    # 0x223610
movl $0x9, (%r13)
leaq 0x1406e8(%rip), %rax    # 0x2188d0
xorl %ecx, %ecx
cmpq $0x10000, (%rax)        # imm = 0x10000
sete %cl
leal (%rcx,%rcx,4), %eax
leaq 0x164b40(%rip), %rcx    # 0x23cd3e
movb %al, (%rcx)
callq 0xd836f
leaq 0x264014(%rip), %r14    # 0x33c220
movabsq $0x800840800000000, %r12 # imm = 0x800840800000000
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x201, %esi            # imm = 0x201
movq %rbx, %rdx
callq 0x9600
testq %rax, %rax
je 0xd82d3
movzbl (%r14), %eax
cmpq $0x3b, %rax
ja 0xd8242
btq %rax, %r12
jb 0xd8219
movq %r14, %rdi
leaq 0x5aeac(%rip), %rsi     # 0x1330f8
leaq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x30(%rbp), %r9
xorl %eax, %eax
callq 0x9360
testl %eax, %eax
jle 0xd82b5
movl %eax, %r13d
movsd -0x48(%rbp), %xmm0
xorl %edi, %edi
callq 0xd83bd
cmpl $0x1, %r13d
je 0xd82b5
movsd -0x40(%rbp), %xmm0
movl $0x1, %edi
callq 0xd83bd
cmpl $0x3, %r13d
jb 0xd82b5
movsd -0x38(%rbp), %xmm0
movl $0x2, %edi
callq 0xd83bd
cmpl $0x3, %r13d
je 0xd82b5
movsd -0x30(%rbp), %xmm0
movl $0x3, %edi
callq 0xd83bd
leaq 0x1(%r15), %rax
leaq 0x164a18(%rip), %rcx    # 0x23ccd8
cmpq %r15, (%rcx)
movq %rax, %r15
leaq 0x14b343(%rip), %r13    # 0x223610
jg 0xd8219
movq %rbx, %rdi
callq 0x9370
callq 0xd872b
leaq 0x166bf5(%rip), %rax    # 0x23eedc
movb $0x0, (%rax)
leaq 0x16485f(%rip), %rax    # 0x23cb50
movl $0xa, %ecx
movl %ecx, (%rax)
leaq 0x1648a1(%rip), %rax    # 0x23cba0
movl %ecx, (%rax)
leaq 0x1648e8(%rip), %rax    # 0x23cbf0
movl %ecx, (%rax)
leaq 0x164927(%rip), %rax    # 0x23cc38
movl %ecx, (%rax)
leaq 0x164972(%rip), %rax    # 0x23cc8c
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x140497(%rip), %rax    # 0x2187bc
movl %ecx, (%rax)
leaq 0x140492(%rip), %rax    # 0x2187c0
movl %ecx, (%rax)
movl (%r13), %edi
movl $0x1, %esi
callq 0x103d0b
movl $0x6c, %edi
callq 0xcf89
xorl %edi, %edi
callq 0xd8c0d
testl %eax, %eax
je 0xd8360
leaq 0x142faa(%rip), %rax    # 0x21b304
movl $0x49, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq