// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]gtrieScanner/Isomorphism.cpp
// Function: Isomorphism::canonicalNauty(char const*, char*, int)
void Isomorphism::canonicalNauty(const char *in, char *best, int size) {
  int i, j, aux;

  for (i=0; i<n; i++) {
    gv = GRAPHROW(g,i,m);
    EMPTYSET(gv,m);
    for (j=0; j<n; j++)
      if (in[i*size+j]=='1') ADDELEMENT(gv,j);
  }

  nauty(g,lab,ptn,NULL,orbits,&options,&stats,
	workspace,WORKSPACE_SIZE,m,n,mm);

  aux=0;
  for (i=0; i<n; i++) {
    gv = GRAPHROW(mm,i,m); 
    for (j=0; j<n; j++)
         best[aux++] = ISELEMENT(gv,j)?'1':'0';
  }
  best[aux]=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0x26f6a(%rip), %eax     # 0x34fb0
jge 0xe11c
movslq -0x28(%rbp), %rcx
movslq 0x26f5d(%rip), %rax     # 0x34fb4
imulq %rax, %rcx
leaq 0x26f5e(%rip), %rax     # 0x34fc0
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x26f48(%rip)     # 0x34fb8
movq 0x26f41(%rip), %rax     # 0x34fb8
movslq 0x26f36(%rip), %rcx     # 0x34fb4
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x38(%rbp)
cmpq 0x26f1c(%rip), %rax     # 0x34fb8
jb 0xe0aa
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
jmp 0xe089
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0x26ef6(%rip), %eax     # 0x34fb0
jge 0xe10c
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
imull -0x24(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x31, %eax
jne 0xe0ff
movl -0x2c(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
leaq 0x1d22a(%rip), %rax     # 0x2b310
movl (%rax,%rcx,4), %edx
movq 0x26ec8(%rip), %rax     # 0x34fb8
movl -0x2c(%rbp), %ecx
sarl $0x5, %ecx
movslq %ecx, %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
jmp 0xe101
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe0b1
jmp 0xe10e
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xe03d
movl 0x26e91(%rip), %r11d    # 0x34fb4
movl 0x26e86(%rip), %r10d    # 0x34fb0
leaq 0x26e8f(%rip), %rdi     # 0x34fc0
leaq 0x27018(%rip), %rsi     # 0x35150
leaq 0x270e1(%rip), %rdx     # 0x35220
xorl %eax, %eax
movl %eax, %ecx
leaq 0x271a6(%rip), %r8      # 0x352f0
leaq 0x1d14f(%rip), %r9      # 0x2b2a0
leaq 0x27268(%rip), %r14     # 0x353c0
leaq 0x1f151(%rip), %rbx     # 0x2d2b0
leaq 0x272ba(%rip), %rax     # 0x35420
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movl $0x1f40, 0x10(%rsp)     # imm = 0x1F40
movl %r11d, 0x18(%rsp)
movl %r10d, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x1a040
movl $0x0, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0x26e0e(%rip), %eax     # 0x34fb0
jge 0xe24c
movslq -0x28(%rbp), %rcx
movslq 0x26e01(%rip), %rax     # 0x34fb4
imulq %rax, %rcx
leaq 0x27262(%rip), %rax     # 0x35420
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x26dec(%rip)     # 0x34fb8
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0x26dd4(%rip), %eax     # 0x34fb0
jge 0xe23c
movq 0x26dd3(%rip), %rax     # 0x34fb8
movl -0x2c(%rbp), %ecx
sarl $0x5, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ecx
movl -0x2c(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rdx
leaq 0x1d10f(%rip), %rax     # 0x2b310
andl (%rax,%rdx,4), %ecx
movb $0x31, %al
movb $0x30, %dl
movb %dl, -0x3a(%rbp)
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
jne 0xe219
movb -0x3a(%rbp), %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %dl
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x30(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xe1d3
jmp 0xe23e
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xe199
movq -0x20(%rbp), %rax
movslq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)