// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0x4f2e
movl 0xc(%rbx), %eax
testl %eax, %eax
jle 0x4f29
xorl %r14d, %r14d
movq 0x48(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x4f15
callq 0x2220
movl 0xc(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x4f00
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x4f2e
callq 0x2220
movq 0x60(%rbx), %r14
testq %r14, %r14
je 0x4f80
movq -0x8(%r14), %r15
addq $-0x8, %r14
testq %r15, %r15
je 0x4f6c
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %r12
movq -0x10(%r14,%r12), %rdi
testq %rdi, %rdi
je 0x4f66
movq (%r14,%r12), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $-0x18, %r12
jne 0x4f50
leaq (%r15,%r15,2), %rax
leaq 0x8(,%rax,8), %rsi
movq %r14, %rdi
callq 0x2330
movq 0x58(%rbx), %r14
testq %r14, %r14
je 0x4fd2
movq -0x8(%r14), %r15
addq $-0x8, %r14
testq %r15, %r15
je 0x4fbe
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %r12
movq -0x10(%r14,%r12), %rdi
testq %rdi, %rdi
je 0x4fb8
movq (%r14,%r12), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $-0x18, %r12
jne 0x4fa2
leaq (%r15,%r15,2), %rax
leaq 0x8(,%rax,8), %rsi
movq %r14, %rdi
callq 0x2330
movq 0x68(%rbx), %r14
testq %r14, %r14
je 0x5024
movq -0x8(%r14), %r15
addq $-0x8, %r14
testq %r15, %r15
je 0x5010
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %r12
movq -0x10(%r14,%r12), %rdi
testq %rdi, %rdi
je 0x500a
movq (%r14,%r12), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $-0x18, %r12
jne 0x4ff4
leaq (%r15,%r15,2), %rax
leaq 0x8(,%rax,8), %rsi
movq %r14, %rdi
callq 0x2330
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x50ac
cmpl $0x0, 0xc(%rbx)
jle 0x50a7
xorl %r14d, %r14d
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x5080
cmpl $0x0, (%rax,%r14,4)
jle 0x5080
xorl %r15d, %r15d
movq 0x70(%rbx), %rcx
movq (%rcx,%r14,8), %rcx
movq (%rcx,%r15,8), %rdi
testq %rdi, %rdi
je 0x5074
movq 0x8(%rdi), %r12
movl $0x10, %esi
callq 0x21a0
movq %r12, %rdi
testq %r12, %r12
jne 0x505a
movq 0x30(%rbx), %rax
incq %r15
movslq (%rax,%r14,4), %rcx
cmpq %rcx, %r15
jl 0x5049
movq 0x70(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x5092
callq 0x2220
incq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r14
jl 0x5036
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x50ac
callq 0x2220
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x50ba
callq 0x2220
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x50c8
callq 0x2220
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x50d6
callq 0x2220
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x50e4
callq 0x2220
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x50f2
callq 0x2220
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x5133
movl 0xc(%rbx), %eax
testl %eax, %eax
jle 0x512e
xorl %r14d, %r14d
movq 0x50(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x511a
callq 0x2220
movl 0xc(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x5105
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x5133
callq 0x2220
movb $0x0, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop