// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x5d296(%rip), %rsi     # 0x18400d
callq 0x9b20
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x126d8c
jmp 0x126eff
leaq 0x15ba5d(%rip), %rax    # 0x2827f0
movl $0x9, (%rax)
leaq 0x150d10(%rip), %rax    # 0x277ab0
cmpq $0x10000, (%rax)        # imm = 0x10000
jne 0x126db5
leaq 0x17516e(%rip), %rax    # 0x29bf1e
movb $0x5, (%rax)
jmp 0x126dbf
leaq 0x175162(%rip), %rax    # 0x29bf1e
movb $0x0, (%rax)
movl $0xa, %edi
callq 0x126f10
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdx
leaq 0x274625(%rip), %rdi    # 0x39b400
movl $0x201, %esi            # imm = 0x201
callq 0x95e0
cmpq $0x0, %rax
je 0x126ec4
leaq 0x27460a(%rip), %rax    # 0x39b400
movsbl (%rax), %eax
cmpl $0x2a, %eax
je 0x126e2b
leaq 0x2745fb(%rip), %rax    # 0x39b400
movsbl (%rax), %eax
cmpl $0x3b, %eax
je 0x126e2b
leaq 0x2745ec(%rip), %rax    # 0x39b400
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x126e2b
leaq 0x2745dd(%rip), %rax    # 0x39b400
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x126e2d
jmp 0x126dd0
leaq 0x2745cc(%rip), %rdi    # 0x39b400
leaq 0x6ee25(%rip), %rsi     # 0x195c60
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
leaq -0x28(%rbp), %r8
leaq -0x30(%rbp), %r9
movb $0x0, %al
callq 0x9370
movl %eax, -0x34(%rbp)
cmpl $0x1, -0x34(%rbp)
jl 0x126e67
movsd -0x18(%rbp), %xmm0
xorl %edi, %edi
callq 0x126f90
cmpl $0x2, -0x34(%rbp)
jl 0x126e7c
movsd -0x20(%rbp), %xmm0
movl $0x1, %edi
callq 0x126f90
cmpl $0x3, -0x34(%rbp)
jl 0x126e91
movsd -0x28(%rbp), %xmm0
movl $0x2, %edi
callq 0x126f90
cmpl $0x4, -0x34(%rbp)
jl 0x126ea6
movsd -0x30(%rbp), %xmm0
movl $0x3, %edi
callq 0x126f90
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
cltq
leaq 0x175000(%rip), %rcx    # 0x29beb8
cmpq (%rcx), %rax
jle 0x126ebf
jmp 0x126ec4
jmp 0x126dd0
movq -0x10(%rbp), %rdi
callq 0x9380
callq 0x127650
movl $0xa, %edi
callq 0x127cf0
movl $0x6c, %edi
callq 0xeaf0
xorl %edi, %edi
callq 0x127d80
cmpl $0x0, %eax
je 0x126eff
leaq 0x1535eb(%rip), %rax    # 0x27a4e4
movl $0x49, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)