// File: /workspace/github_c_makefile_star2_O1/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
cmpq $0x0, 0x48(%rdi)
je 0x4f09
cmpl $0x0, 0xc(%rbx)
jle 0x4efb
xorl %r14d, %r14d
movq 0x48(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x4eef
callq 0x2220
incq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r14
jl 0x4edd
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x4f09
callq 0x2220
movq 0x60(%rbx), %r14
testq %r14, %r14
je 0x4f5b
movq -0x8(%r14), %r15
addq $-0x8, %r14
testq %r15, %r15
je 0x4f47
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %r12
movq -0x10(%r14,%r12), %rdi
testq %rdi, %rdi
je 0x4f41
movq (%r14,%r12), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $-0x18, %r12
jne 0x4f2b
leaq (%r15,%r15,2), %rax
leaq 0x8(,%rax,8), %rsi
movq %r14, %rdi
callq 0x2330
movq 0x58(%rbx), %r14
testq %r14, %r14
je 0x4fad
movq -0x8(%r14), %r15
addq $-0x8, %r14
testq %r15, %r15
je 0x4f99
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %r12
movq -0x10(%r14,%r12), %rdi
testq %rdi, %rdi
je 0x4f93
movq (%r14,%r12), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $-0x18, %r12
jne 0x4f7d
leaq (%r15,%r15,2), %rax
leaq 0x8(,%rax,8), %rsi
movq %r14, %rdi
callq 0x2330
movq 0x68(%rbx), %r14
testq %r14, %r14
je 0x4fff
movq -0x8(%r14), %r15
addq $-0x8, %r14
testq %r15, %r15
je 0x4feb
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %r12
movq -0x10(%r14,%r12), %rdi
testq %rdi, %rdi
je 0x4fe5
movq (%r14,%r12), %rsi
subq %rdi, %rsi
callq 0x21a0
addq $-0x18, %r12
jne 0x4fcf
leaq (%r15,%r15,2), %rax
leaq 0x8(,%rax,8), %rsi
movq %r14, %rdi
callq 0x2330
cmpq $0x0, 0x70(%rbx)
je 0x508b
cmpl $0x0, 0xc(%rbx)
jle 0x507d
xorl %r14d, %r14d
cmpq $0x0, 0x30(%rbx)
je 0x505f
movq 0x30(%rbx), %rax
cmpl $0x0, (%rax,%r14,4)
jle 0x505f
xorl %r15d, %r15d
movq 0x70(%rbx), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x504f
movq 0x8(%rdi), %r12
movl $0x10, %esi
callq 0x21a0
movq %r12, %rdi
testq %r12, %r12
jne 0x5039
incq %r15
movq 0x30(%rbx), %rax
movslq (%rax,%r14,4), %rax
cmpq %rax, %r15
jl 0x5028
movq 0x70(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x5071
callq 0x2220
incq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r14
jl 0x5013
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x508b
callq 0x2220
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x5099
callq 0x2220
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x50a7
callq 0x2220
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x50b5
callq 0x2220
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x50c3
callq 0x2220
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x50d1
callq 0x2220
cmpq $0x0, 0x50(%rbx)
je 0x510d
cmpl $0x0, 0xc(%rbx)
jle 0x50ff
xorl %r14d, %r14d
movq 0x50(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x50f3
callq 0x2220
incq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r14
jl 0x50e1
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x510d
callq 0x2220
movb $0x0, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop