// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]fase/Label.cpp
// Function: Label::fillNautyMatrix(char*, int, long long)
void Label::fillNautyMatrix(char* sadjM, int K, long long int mask)
{
  int i, j;
  for (i = 0; i < K * K; i++)
    sadjM[i] = '0';
  sadjM[K * K] = '\0';

  int acc = 0;
  for (i = K - 1; i >= 1; i--)
  {
    int gone = 0;
    for (j = 0; j < i; j++)
    {
      if (directed)
      {
        sadjM[j * K + i] =
          ((mask & (1LL << (2 * j + acc))) > 0) ? '1' : '0';
        sadjM[i * K + j] =
          ((mask & (1LL << ((2 * j + 1) + acc))) > 0) ? '1' : '0';
        gone += 2;
      }
      else
      {
        sadjM[i * K + j] = sadjM[j * K + i] =
          ((mask & (1LL << (j + acc))) > 0) ? '1' : '0';
        gone++;
      }
    }

    acc += gone;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0xc(%rbp), %ecx
imull -0xc(%rbp), %ecx
cmpl %ecx, %eax
jge 0x881b
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb $0x30, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x87f6
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
imull -0xc(%rbp), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movl $0x0, -0x24(%rbp)
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
jl 0x89ae
movl $0x0, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8997
testb $0x1, 0x1a4b0(%rip)     # 0x22d18
je 0x891c
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x20(%rbp), %eax
shll %eax
addl -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq -0x38(%rbp), %rcx
andq %rax, %rcx
movb $0x31, %al
movb $0x30, %dl
movb %dl, -0x2a(%rbp)
cmpq $0x0, %rcx
movb %al, -0x29(%rbp)
jg 0x88a7
movb -0x2a(%rbp), %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
imull -0xc(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x20(%rbp), %eax
shll %eax
addl $0x1, %eax
addl -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq -0x48(%rbp), %rcx
andq %rax, %rcx
movb $0x31, %al
movb $0x30, %dl
movb %dl, -0x3a(%rbp)
cmpq $0x0, %rcx
movb %al, -0x39(%rbp)
jg 0x88fa
movb -0x3a(%rbp), %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
imull -0xc(%rbp), %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x28(%rbp)
jmp 0x8987
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq -0x58(%rbp), %rcx
andq %rax, %rcx
movb $0x31, %al
movb $0x30, %dl
movb %dl, -0x4a(%rbp)
cmpq $0x0, %rcx
movb %al, -0x49(%rbp)
jg 0x8953
movb -0x4a(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
imull -0xc(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
imull -0xc(%rbp), %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8989
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8855
movl -0x28(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x883d
popq %rbp
retq