// File: /workspace/github_cpp_makefile_star2_O2/nompelis[P]INTecplotLib/intecplot.cpp
// Function: inTec_Zone::clear()
void inTec_Zone::clear()
{
#ifdef _DEBUG_
   printf(" i Zone object clearing\n");
#endif

   // deallocate data arrays
   std::vector< double * > :: iterator dpi;
   for( dpi = var_vec.begin() ; dpi != var_vec.end() ; ++dpi ) {
      if( (*dpi) != NULL ) {
         double *tp = (*dpi);
 //HACK  free( tp );
#warning "CLEAN THIS IF ERROR"
         free( tp );
         (*dpi) = NULL;
      }
   }
   var_vec.clear();

   // deallocate connectivity array
   if( icon != NULL ) free( icon );
   icon = NULL;

#ifdef _DEBUG_
   printf(" i Keywords in zone (%ld) \n", keywords.size());
   printf("   Index  Keyword=String \n");
   std::map< std::string, std::string > :: iterator imap;
   int i=0;
   for( imap = keywords.begin(); imap != keywords.end(); ++imap ) {
      printf("   %d  ", i++ );
      printf("   [%s] = %s\n", (*imap).first.c_str(), (*imap).second.c_str() );
   }
#endif
   keywords.clear();

#ifdef _DEBUG_
   printf("   Other data in zone \n");
   printf("    - T: %s \n", tkey);
   printf("    - Nodes: %ld \n", nodes);
   printf("    - Elements: %ld \n", elems);
   printf("    - im,jm,kn: %ld, %ld, %ld \n", im,jm,km);
   printf("    - Number of variables: %d \n", num_var);
   std::map< int, int > :: iterator it;
   for( it= ivar_loc.begin(); it != ivar_loc.end(); ++it ) {
      printf("      ==> %d location %d \n", (*it).first, (*it).second );
   }
#endif
   ivar_loc.clear();

   // drop T-keyword string
   if( tkey != NULL ) free( tkey );


   // initialize variables as if it were a fresh object
   istate = 0;
   ipos = 0;
   ipos_data = 0;
   ipos_conn = 0;

   // keyword-based variables
   tkey = NULL;
   ietype = -1;
   idatapack = -1;
   im = 0;
   jm = 0;
   km = 0;
   nodes = 0;
   elems = 0;
   nv = 0;
   parent_zone = -1;

   // old-style variables
   iold_n = 0;
   iold_e = 0;
   iold_et = -1;
   iold_f = -1;

   // utility variables
   iparse_num = 0;
   node_cnt = 0;
   elem_cnt = 0;
   var_cnt = 0;
   icon_cnt = 0;

   InitKeywords();

   file = NULL;
   num_var = 0;
   icon = NULL;
   ncon = 0;
   num_var = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x821b(%rip), %rdi      # 0x1002e
callq 0x77b0
movq 0x88(%rbx), %r14
cmpq 0x90(%rbx), %r14
je 0x7e3f
movq (%r14), %rdi
testq %rdi, %rdi
je 0x7e39
callq 0x75c0
andq $0x0, (%r14)
addq $0x8, %r14
jmp 0x7e1f
movq 0x88(%rbx), %rax
cmpq %rax, %r14
je 0x7e52
movq %rax, 0x90(%rbx)
leaq 0xa0(%rbx), %rax
movq %rax, (%rsp)
movq 0xa0(%rbx), %rdi
callq 0x75c0
andq $0x0, 0xa0(%rbx)
movq 0x110(%rbx), %rsi
leaq 0x7349(%rip), %rdi      # 0xf1c8
xorl %eax, %eax
callq 0x7060
leaq 0x81b9(%rip), %rdi      # 0x10046
callq 0x77b0
movq 0x100(%rbx), %r12
leaq 0xf0(%rbx), %rbp
leaq 0x733d(%rip), %r14      # 0xf1e4
leaq 0x733e(%rip), %r15      # 0xf1ec
xorl %esi, %esi
cmpq %rbp, %r12
je 0x7ee7
leal 0x1(%rsi), %r13d
movq %r14, %rdi
xorl %eax, %eax
callq 0x7060
movq 0x20(%r12), %rsi
movq 0x40(%r12), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x7060
movq %r12, %rdi
callq 0x72f0
movq %rax, %r12
movl %r13d, %esi
jmp 0x7eb0
leaq 0xe8(%rbx), %rdi
callq 0x70f0
leaq 0x8166(%rip), %rdi      # 0x10060
callq 0x77b0
movq 0x10(%rbx), %rsi
leaq 0x72f0(%rip), %rdi      # 0xf1fa
xorl %eax, %eax
callq 0x7060
movq 0x48(%rbx), %rsi
leaq 0x72ec(%rip), %rdi      # 0xf208
xorl %eax, %eax
callq 0x7060
movq 0x50(%rbx), %rsi
leaq 0x72ed(%rip), %rdi      # 0xf21b
xorl %eax, %eax
callq 0x7060
leaq 0x30(%rbx), %r12
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
movq 0x40(%rbx), %rcx
leaq 0x72e5(%rip), %rdi      # 0xf231
xorl %eax, %eax
callq 0x7060
movl 0x20(%rbx), %esi
leaq 0x72f4(%rip), %rdi      # 0xf251
xorl %eax, %eax
callq 0x7060
movq 0x70(%rbx), %r15
leaq 0x60(%rbx), %rbp
leaq 0x72fe(%rip), %r14      # 0xf271
cmpq %rbp, %r15
je 0x7f97
movl 0x20(%r15), %esi
movl 0x24(%r15), %edx
movq %r14, %rdi
xorl %eax, %eax
callq 0x7060
movq %r15, %rdi
callq 0x72f0
movq %rax, %r15
jmp 0x7f73
leaq 0x58(%rbx), %rdi
callq 0x70b0
movq 0x10(%rbx), %rdi
callq 0x75c0
andl $0x0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0xe0(%rbx)
movups %xmm0, 0xd0(%rbx)
orq $-0x1, 0x18(%rbx)
andl $0x0, 0x28(%rbx)
movups %xmm0, 0x10(%r12)
andq $0x0, 0x20(%r12)
movups %xmm0, (%r12)
orl $-0x1, 0x24(%rbx)
movups %xmm0, 0xb0(%rbx)
orq $-0x1, 0xc0(%rbx)
andl $0x0, 0x118(%rbx)
andq $0x0, 0x138(%rbx)
movups %xmm0, 0x120(%rbx)
andl $0x0, 0x130(%rbx)
movq %rbx, %rdi
callq 0x71a0
andq $0x0, 0xc8(%rbx)
andl $0x0, 0x20(%rbx)
movq (%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop