// File: /workspace/github_cpp_makefile_star2_O1/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 0x9377(%rip), %rdi      # 0xef96
callq 0x5580
movq 0x88(%rbx), %r14
movq 0x90(%rbx), %rax
cmpq %rax, %r14
je 0x5c51
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5c4b
callq 0x5430
movq $0x0, (%r14)
addq $0x8, %r14
jmp 0x5c2b
movq 0x88(%rbx), %rcx
cmpq %rcx, %rax
je 0x5c64
movq %rcx, 0x90(%rbx)
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x5c75
callq 0x5430
movq $0x0, 0xa0(%rbx)
leaq 0xe8(%rbx), %rax
movq %rax, (%rsp)
movq 0x110(%rbx), %rsi
leaq 0x8497(%rip), %rdi      # 0xe130
xorl %eax, %eax
callq 0x5060
leaq 0x9307(%rip), %rdi      # 0xefae
callq 0x5580
movq 0x100(%rbx), %r15
leaq 0xf0(%rbx), %rbp
cmpq %rbp, %r15
je 0x5d02
leaq 0x8486(%rip), %r12      # 0xe14c
leaq 0x8487(%rip), %r13      # 0xe154
xorl %esi, %esi
leal 0x1(%rsi), %r14d
movq %r12, %rdi
xorl %eax, %eax
callq 0x5060
movq 0x20(%r15), %rsi
movq 0x40(%r15), %rdx
movq %r13, %rdi
xorl %eax, %eax
callq 0x5060
movq %r15, %rdi
callq 0x5200
movq %rax, %r15
movl %r14d, %esi
cmpq %rbp, %rax
jne 0x5ccf
movq (%rsp), %rdi
callq 0x5090
leaq 0x92b6(%rip), %rdi      # 0xefc8
callq 0x5580
movq 0x10(%rbx), %rsi
leaq 0x8440(%rip), %rdi      # 0xe162
xorl %eax, %eax
callq 0x5060
movq 0x48(%rbx), %rsi
leaq 0x843c(%rip), %rdi      # 0xe170
xorl %eax, %eax
callq 0x5060
movq 0x50(%rbx), %rsi
leaq 0x843d(%rip), %rdi      # 0xe183
xorl %eax, %eax
callq 0x5060
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
movq 0x40(%rbx), %rcx
leaq 0x8439(%rip), %rdi      # 0xe199
xorl %eax, %eax
callq 0x5060
movl 0x20(%rbx), %esi
leaq 0x8448(%rip), %rdi      # 0xe1b9
xorl %eax, %eax
callq 0x5060
leaq 0x58(%rbx), %r14
movq 0x70(%rbx), %r15
leaq 0x60(%rbx), %r13
cmpq %r13, %r15
je 0x5db2
leaq 0x8449(%rip), %r12      # 0xe1d9
movl 0x20(%r15), %esi
movl 0x24(%r15), %edx
movq %r12, %rdi
xorl %eax, %eax
callq 0x5060
movq %r15, %rdi
callq 0x5200
movq %rax, %r15
cmpq %r13, %rax
jne 0x5d90
leaq 0xa0(%rbx), %r15
leaq 0x30(%rbx), %r12
movq %r14, %rdi
callq 0x5080
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x5dd3
callq 0x5430
xorl %r14d, %r14d
movl %r14d, 0x8(%rbx)
movq %r14, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rbx)
movq %r14, 0xe0(%rbx)
movq $-0x1, %rax
movq %rax, 0x18(%rbx)
movl %r14d, 0x28(%rbx)
movq %r14, 0x20(%r12)
movups %xmm0, 0x10(%r12)
movups %xmm0, (%r12)
movl $0xffffffff, 0x24(%rbx) # imm = 0xFFFFFFFF
movups %xmm0, 0xb0(%rbx)
movq %rax, 0xc0(%rbx)
movl %r14d, 0x118(%rbx)
movq %r14, 0x138(%rbx)
movups %xmm0, 0x120(%rbx)
movl %r14d, 0x130(%rbx)
movq %rbx, %rdi
callq 0x50f0
movq %r14, 0xc8(%rbx)
movl %r14d, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq