// File: /workspace/github_cpp_makefile_star2_O1/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 0x4922c(%rip), %rsi     # 0x120cad
callq 0x9a4d
testq %rax, %rax
je 0xd7c20
movq %rax, %rbx
leaq 0x14bb77(%rip), %r13    # 0x223610
movl $0x9, (%r13)
leaq 0x140e28(%rip), %rax    # 0x2188d0
xorl %ecx, %ecx
cmpq $0x10000, (%rax)        # imm = 0x10000
sete %cl
leal (%rcx,%rcx,4), %eax
leaq 0x165280(%rip), %rcx    # 0x23cd3e
movb %al, (%rcx)
callq 0xd7c2f
leaq 0x264754(%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 0xd7b93
movzbl (%r14), %eax
cmpq $0x3b, %rax
ja 0xd7b02
btq %rax, %r12
jb 0xd7ad9
movq %r14, %rdi
leaq 0x5b4fc(%rip), %rsi     # 0x133008
leaq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x30(%rbp), %r9
xorl %eax, %eax
callq 0x9360
movl %eax, %r13d
testl %eax, %eax
jle 0xd7b36
movsd -0x48(%rbp), %xmm0
xorl %edi, %edi
callq 0xd7c7d
cmpl $0x2, %r13d
jl 0xd7b4b
movsd -0x40(%rbp), %xmm0
movl $0x1, %edi
callq 0xd7c7d
cmpl $0x3, %r13d
jl 0xd7b60
movsd -0x38(%rbp), %xmm0
movl $0x2, %edi
callq 0xd7c7d
cmpl $0x4, %r13d
jl 0xd7b75
movsd -0x30(%rbp), %xmm0
movl $0x3, %edi
callq 0xd7c7d
leaq 0x1(%r15), %rax
leaq 0x165158(%rip), %rcx    # 0x23ccd8
cmpq %r15, (%rcx)
movq %rax, %r15
leaq 0x14ba83(%rip), %r13    # 0x223610
jg 0xd7ad9
movq %rbx, %rdi
callq 0x9370
callq 0xd801e
leaq 0x167335(%rip), %rax    # 0x23eedc
movb $0x0, (%rax)
leaq 0x164f9f(%rip), %rax    # 0x23cb50
movl $0xa, %ecx
movl %ecx, (%rax)
leaq 0x164fe1(%rip), %rax    # 0x23cba0
movl %ecx, (%rax)
leaq 0x165028(%rip), %rax    # 0x23cbf0
movl %ecx, (%rax)
leaq 0x165067(%rip), %rax    # 0x23cc38
movl %ecx, (%rax)
leaq 0x1650b2(%rip), %rax    # 0x23cc8c
xorl %ecx, %ecx
movl %ecx, (%rax)
leaq 0x140bd7(%rip), %rax    # 0x2187bc
movl %ecx, (%rax)
leaq 0x140bd2(%rip), %rax    # 0x2187c0
movl %ecx, (%rax)
movl (%r13), %edi
movl $0x1, %esi
callq 0x103663
movl $0x6c, %edi
callq 0xcf81
xorl %edi, %edi
callq 0xd84d7
testl %eax, %eax
je 0xd7c20
leaq 0x1436ea(%rip), %rax    # 0x21b304
movl $0x49, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq