// File: /workspace/github_c_makefile_star2_O2/ComplexNetworks-DCC-FCUP[P]fase/DynamicGraph.cpp
// Function: DynamicGraph::_delete()
void DynamicGraph::_delete() {
  int i;

  if (_adjM != NULL) {
    for (i = 0; i < _num_nodes; i++)
      if (_adjM[i] != NULL)
        delete[] _adjM[i];
    delete[] _adjM;
  }
  
  if (_adjIn!=NULL) delete[] _adjIn;
  if (_adjOut!=NULL) delete[] _adjOut;
  if (_neighbours!=NULL) delete[] _neighbours;

  if (_hashM != NULL) {
    int j;
    for (i = 0; i < _num_nodes; i++) {
      if (_hash_out != NULL) {
        for (j = 0; j < _hash_out[i]; j++) {
          l_list* cur = _hashM[i][j], *prev;
          while (cur != NULL) {
            prev = cur;
            cur = cur->next;
            delete prev;
          }
        }
      }

      delete[] _hashM[i];
    }
    delete[] _hashM;
  }
    
  if (_in != NULL) delete[] _in;
  if (_out != NULL) delete[] _out;
  if (_hash_out != NULL) delete[] _hash_out;
  if (_num_neighbours != NULL) delete[] _num_neighbours;

  if (hybrid_ch != NULL) delete[] hybrid_ch;

  if (_array_neighbours != NULL) {
    for (i = 0; i < _num_nodes; i++)
      if (_array_neighbours[i] != NULL)
        delete[] _array_neighbours[i];
    delete[] _array_neighbours;
  }

  ready = false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x48(%rdi)
je 0x473a
xorl %r14d, %r14d
movslq 0xc(%rbx), %rax
movq 0x48(%rbx), %rdi
cmpq %rax, %r14
jge 0x4730
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x472b
callq 0x2230
incq %r14
jmp 0x4710
testq %rdi, %rdi
je 0x473a
callq 0x2230
movq 0x60(%rbx), %r15
testq %r15, %r15
je 0x4777
leaq -0x8(%r15), %r14
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x4767
addq $-0x18, %r15
imulq $0x18, %r12, %r13
leaq (%r15,%r13), %rdi
callq 0x541c
addq $-0x18, %r13
jne 0x4758
imulq $0x18, %r12, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x2360
movq 0x58(%rbx), %r15
testq %r15, %r15
je 0x47b4
leaq -0x8(%r15), %r14
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x47a4
addq $-0x18, %r15
imulq $0x18, %r12, %r13
leaq (%r15,%r13), %rdi
callq 0x541c
addq $-0x18, %r13
jne 0x4795
imulq $0x18, %r12, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x2360
movq 0x68(%rbx), %r15
testq %r15, %r15
je 0x47f1
leaq -0x8(%r15), %r14
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x47e1
addq $-0x18, %r15
imulq $0x18, %r12, %r13
leaq (%r15,%r13), %rdi
callq 0x541c
addq $-0x18, %r13
jne 0x47d2
imulq $0x18, %r12, %rsi
addq $0x8, %rsi
movq %r14, %rdi
callq 0x2360
cmpq $0x0, 0x70(%rbx)
je 0x486d
xorl %r15d, %r15d
pushq $0x10
popq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r15
jge 0x485f
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x4848
xorl %r12d, %r12d
movslq (%rax,%r15,4), %rax
cmpq %rax, %r12
jge 0x4848
movq 0x70(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x483f
movq 0x8(%rdi), %r13
movq %r14, %rsi
callq 0x21b0
movq %r13, %rdi
jmp 0x4829
incq %r12
movq 0x30(%rbx), %rax
jmp 0x4814
movq 0x70(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x485a
callq 0x2230
incq %r15
jmp 0x47ff
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x486d
callq 0x2230
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x487b
callq 0x2230
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x4889
callq 0x2230
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x4897
callq 0x2230
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x48a5
callq 0x2230
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x48b3
callq 0x2230
cmpq $0x0, 0x50(%rbx)
je 0x48e7
xorl %r14d, %r14d
movslq 0xc(%rbx), %rax
movq 0x50(%rbx), %rdi
cmpq %rax, %r14
jge 0x48dd
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0x48d8
callq 0x2230
incq %r14
jmp 0x48bd
testq %rdi, %rdi
je 0x48e7
callq 0x2230
movb $0x0, 0x78(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop