// File: jkingan[P]ladyheather/heathmsc.cpp
// Function: free_mtie_data(int)
void free_mtie_data(int id)
{
int i;

   if(id < 0) return;
   if(id > MAX_MTIE_CHANS) return;
   if(mtie_taus[id] == 0) return;

   for(i=0; i<mtie_kmax; i++) {
      if(mtie_taus[id][i].vals) {
         if(mtie_taus[id][i].vals->min_vals) free(mtie_taus[id][i].vals->min_vals);
         if(mtie_taus[id][i].vals->max_vals) free(mtie_taus[id][i].vals->max_vals);
      }
   }

   for(i=0; i<mtie_kmax; i++) {
      if(mtie_taus[id][i].vals) {
         free(mtie_taus[id][i].vals);
      }
   }

   free(mtie_taus[id]);
   mtie_taus[id] = 0;

   if(mtie_buf[id]) {
      free(mtie_buf[id]);
      mtie_buf[id] = 0;
   }

   mtie_q_count[id] = 0;
   mtie_q_in = mtie_q_out = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jge 0x15da66
jmp 0x15dc1f
cmpl $0x4, -0x4(%rbp)
jle 0x15da71
jmp 0x15dc1f
movslq -0x4(%rbp), %rcx
leaq 0x356f44(%rip), %rax    # 0x4b49c0
cmpq $0x0, (%rax,%rcx,8)
jne 0x15da88
jmp 0x15dc1f
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x356f4c(%rip), %eax    # 0x4b49e4
jge 0x15db44
movslq -0x4(%rbp), %rcx
leaq 0x356f17(%rip), %rax    # 0x4b49c0
movq (%rax,%rcx,8), %rax
movslq -0x8(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x15db34
movslq -0x4(%rbp), %rcx
leaq 0x356efd(%rip), %rax    # 0x4b49c0
movq (%rax,%rcx,8), %rax
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, (%rax)
je 0x15daf4
movslq -0x4(%rbp), %rcx
leaq 0x356ee0(%rip), %rax    # 0x4b49c0
movq (%rax,%rcx,8), %rax
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rdi
callq 0x9450
movslq -0x4(%rbp), %rcx
leaq 0x356ec1(%rip), %rax    # 0x4b49c0
movq (%rax,%rcx,8), %rax
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x8(%rax)
je 0x15db32
movslq -0x4(%rbp), %rcx
leaq 0x356ea3(%rip), %rax    # 0x4b49c0
movq (%rax,%rcx,8), %rax
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rdi
callq 0x9450
jmp 0x15db34
jmp 0x15db36
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x15da8f
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x356e90(%rip), %eax    # 0x4b49e4
jge 0x15db99
movslq -0x4(%rbp), %rcx
leaq 0x356e5f(%rip), %rax    # 0x4b49c0
movq (%rax,%rcx,8), %rax
movslq -0x8(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x15db8c
movslq -0x4(%rbp), %rcx
leaq 0x356e45(%rip), %rax    # 0x4b49c0
movq (%rax,%rcx,8), %rax
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x9450
jmp 0x15db8e
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x15db4b
movslq -0x4(%rbp), %rcx
leaq 0x356e1c(%rip), %rax    # 0x4b49c0
movq (%rax,%rcx,8), %rdi
callq 0x9450
movslq -0x4(%rbp), %rcx
leaq 0x356e08(%rip), %rax    # 0x4b49c0
movq $0x0, (%rax,%rcx,8)
movslq -0x4(%rbp), %rcx
leaq 0x356715(%rip), %rax    # 0x4b42e0
cmpq $0x0, (%rax,%rcx,8)
je 0x15dbf9
movslq -0x4(%rbp), %rcx
leaq 0x356703(%rip), %rax    # 0x4b42e0
movq (%rax,%rcx,8), %rdi
callq 0x9450
movslq -0x4(%rbp), %rcx
leaq 0x3566ef(%rip), %rax    # 0x4b42e0
movq $0x0, (%rax,%rcx,8)
movslq -0x4(%rbp), %rcx
leaq 0x3566fc(%rip), %rax    # 0x4b4300
movl $0x0, (%rax,%rcx,4)
movl $0x0, 0x356dd7(%rip)    # 0x4b49ec
movl $0x0, 0x356dc9(%rip)    # 0x4b49e8
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)