// File: /workspace/github_c_makefile_star2_O0/ComplexNetworks-DCC-FCUP[P]gtrieScanner/nauty/naugraph.c
// Function: testcanlab
int
testcanlab(graph *g, graph *canong, int *lab, int *samerows, int m, int n)
{
	int i,j;
	set *ph;

#if !MAXN
	DYNALLOC1(permutation,workperm,workperm_sz,n,"testcanlab");
	DYNALLOC1(set,workset,workset_sz,m,"testcanlab");
#endif

	for (i = 0; i < n; ++i) workperm[lab[i]] = i;

	for (i = 0, ph = canong; i < n; ++i, ph += M)
	{
	    permset(GRAPHROW(g,lab[i],M),workset,M,workperm);
	    for (j = 0; j < M; ++j)
	        if (workset[j] < ph[j])
	        {
	            *samerows = i;
	            return -1;
	        }
	        else if (workset[j] > ph[j])
	        {
	            *samerows = i;
	            return 1;
	        }
	}

	*samerows = n;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
movslq -0x30(%rbp), %rax
cmpq 0x1f4c5(%rip), %rax     # 0x3d540
jbe 0x1e0c6
cmpq $0x0, 0x1f4bb(%rip)     # 0x3d540
je 0x1e093
movq 0x1f4ba(%rip), %rdi     # 0x3d548
callq 0x3320
movslq -0x30(%rbp), %rax
movq %rax, 0x1f4a2(%rip)     # 0x3d540
movslq -0x30(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3370
movq %rax, 0x1f496(%rip)     # 0x3d548
cmpq $0x0, %rax
jne 0x1e0c4
leaq 0x2df5(%rip), %rdi      # 0x20eb4
callq 0x1d260
jmp 0x1e0c6
movslq -0x2c(%rbp), %rax
cmpq 0x1f47f(%rip), %rax     # 0x3d550
jbe 0x1e11c
cmpq $0x0, 0x1f475(%rip)     # 0x3d550
je 0x1e0e9
movq 0x1f474(%rip), %rdi     # 0x3d558
callq 0x3320
movslq -0x2c(%rbp), %rax
movq %rax, 0x1f45c(%rip)     # 0x3d550
movslq -0x2c(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3370
movq %rax, 0x1f450(%rip)     # 0x3d558
cmpq $0x0, %rax
jne 0x1e11a
leaq 0x2d9f(%rip), %rdi      # 0x20eb4
callq 0x1d260
jmp 0x1e11c
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x1e14f
movl -0x34(%rbp), %edx
movq 0x1f413(%rip), %rax     # 0x3d548
movq -0x20(%rbp), %rcx
movslq -0x34(%rbp), %rsi
movslq (%rcx,%rsi,4), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1e123
movl $0x0, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x1e23c
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
movslq -0x2c(%rbp), %rcx
imulq %rcx, %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x1f3c8(%rip), %rsi     # 0x3d558
movl -0x2c(%rbp), %edx
movq 0x1f3ae(%rip), %rcx     # 0x3d548
callq 0x1cbb0
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1e217
movq 0x1f3a3(%rip), %rax     # 0x3d558
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x40(%rbp), %rcx
movslq -0x38(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jae 0x1e1db
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1e24c
movq 0x1f376(%rip), %rax     # 0x3d558
movslq -0x38(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x40(%rbp), %rcx
movslq -0x38(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jbe 0x1e208
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x1e24c
jmp 0x1e20a
jmp 0x1e20c
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x1e1a6
jmp 0x1e219
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x1e15e
movl -0x30(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)