// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]fase/DynamicGraph.cpp
// Function: DynamicGraph::createGraph(int, GraphType)
void DynamicGraph::createGraph(int n, GraphType t) {
  _delete();
  
  int i;
  _num_nodes = n;
  _type = t;
  
  int tmp_log = 4 * (int)log2((double) n);
  _log_nodes = 1;
  while (_log_nodes < tmp_log)
    _log_nodes *= 2;
  _log_nodes--;
  
  _adjIn      = new vector<int>[n];
  _adjOut     = new vector<int>[n];
  _neighbours = new vector<int>[n];

  _in             = new int[n];
  _out            = new int[n];
  _num_neighbours = new int[n];
  _hash_out       = new int[n];

  zero();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xa390
movq -0x20(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0xc(%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0x8(%rax)
cvtsi2sdl -0xc(%rbp), %xmm0
callq 0x33a0
movq -0x20(%rbp), %rax
cvttsd2si %xmm0, %ecx
shll $0x2, %ecx
movl %ecx, -0x18(%rbp)
movl $0x1, 0x18(%rax)
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x18(%rbp), %eax
jge 0xabbb
movq -0x20(%rbp), %rax
movl 0x18(%rax), %ecx
shll %ecx
movl %ecx, 0x18(%rax)
jmp 0xaba1
movq -0x20(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movslq -0xc(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x28(%rbp)
cmpq $0x0, %rax
je 0xac4e
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x40(%rbp)
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0xbeb0
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x38(%rbp)
jne 0xac2c
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x60(%rax)
movslq -0xc(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x50(%rbp)
cmpq $0x0, %rax
je 0xace0
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x68(%rbp)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0xbeb0
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x60(%rbp)
jne 0xacbe
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, 0x58(%rax)
movslq -0xc(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x18, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
addq $0x8, %rdi
setb %al
orb %al, %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x80(%rbp), %rax
movq %rax, (%rcx)
addq $0x8, %rcx
movq %rcx, -0x78(%rbp)
cmpq $0x0, %rax
je 0xad87
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rcx
imulq $0x18, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x90(%rbp)
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0xbeb0
movq -0x98(%rbp), %rax
movq -0x90(%rbp), %rcx
addq $0x18, %rax
cmpq %rcx, %rax
movq %rax, -0x88(%rbp)
jne 0xad56
movq -0x20(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, 0x68(%rax)
movslq -0xc(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movslq -0xc(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movslq -0xc(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movslq -0xc(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq -0x20(%rbp), %rdi
movq %rax, 0x30(%rdi)
movq (%rdi), %rax
callq *0x20(%rax)
addq $0xa0, %rsp
popq %rbp
retq
nop