// File: /workspace/github_c_makefile_star2_O0/pwelke[P]GraphMiningTools/graphPrinting.c
// Function: diffGraphs
char diffGraphs(char* name, struct Graph *g, struct Graph* h) {
	int n = 300;
	int diffs = 0;
	char* s1 = malloc(n * sizeof(char));
	char* s2 = malloc(n * sizeof(char));
	int i;
	cleanString(s1,n);
	cleanString(s2,n);

	sprintf(s1, "%s has %i vertices and %i edges:\n", name, g->n, g->m);
	sprintf(s2, "%s has %i vertices and %i edges:\n", name, h->n, h->m);

	if (strcmp(s1, s2) != 0) {
		++diffs;
	}
	for (i=0; i<g->n; ++i) {
		int store1 = 0;
		int store2 = 0;
		cleanString(s1, n);
		cleanString(s2, n);
		store1 += sprintf(s1, "%i: ", i);
		if (g->vertices[i]) {
			struct VertexList *idx;
			for (idx = g->vertices[i]->neighborhood; idx; idx = idx->next) {
				store1 += sprintf(s1+store1, "%i ", idx->endPoint->number);	
			}
		}
			store2 += sprintf(s2, "%i: ", i);
		if (h->vertices[i]) {
			struct VertexList *idx;
			for (idx = h->vertices[i]->neighborhood; idx; idx = idx->next) {
				store2 += sprintf(s2+store2, "%i ", idx->endPoint->number);	
			}
		}
		if (strcmp(s1, s2) != 0) {
			printf("%s", s1);
			printf("\n");
			printf("%s", s2);
			printf("\n\n");
			++diffs;
		}
	}
	free(s1);
	free(s2);

	if (diffs > 0) {
		printf("%s has %i vertices and %i edges:\n", name, g->n, g->m);
		printf("%s has %i vertices and %i edges:\n", name, h->n, h->m);
	}
	fflush(stdout);
	return diffs;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl $0x12c, 0x3c(%rsp)      # imm = 0x12C
movl $0x0, 0x38(%rsp)
movslq 0x3c(%rsp), %rdi
shlq $0x0, %rdi
callq 0x1170
movq %rax, 0x30(%rsp)
movslq 0x3c(%rsp), %rdi
shlq $0x0, %rdi
callq 0x1170
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0xc970
movq 0x28(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0xc970
movq 0x30(%rsp), %rdi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rax
movl (%rax), %ecx
movq 0x48(%rsp), %rax
movl 0x4(%rax), %r8d
leaq 0x2899e(%rip), %rsi     # 0x353d4
movb $0x0, %al
callq 0x11f0
movq 0x28(%rsp), %rdi
movq 0x50(%rsp), %rdx
movq 0x40(%rsp), %rax
movl (%rax), %ecx
movq 0x40(%rsp), %rax
movl 0x4(%rax), %r8d
leaq 0x28976(%rip), %rsi     # 0x353d4
movb $0x0, %al
callq 0x11f0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x1120
cmpl $0x0, %eax
je 0xca84
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x48(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xcc6c
movl $0x0, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x30(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0xc970
movq 0x28(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0xc970
movq 0x30(%rsp), %rdi
movl 0x24(%rsp), %edx
leaq 0x288f6(%rip), %rsi     # 0x353cf
movb $0x0, %al
callq 0x11f0
addl 0x20(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xcb61
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0xcb5f
movq 0x30(%rsp), %rdi
movslq 0x20(%rsp), %rax
addq %rax, %rdi
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %edx
leaq 0x294c1(%rip), %rsi     # 0x36001
movb $0x0, %al
callq 0x11f0
addl 0x20(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0xcb18
jmp 0xcb61
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %edx
leaq 0x2885e(%rip), %rsi     # 0x353cf
movb $0x0, %al
callq 0x11f0
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xcbf9
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0xcbf7
movq 0x28(%rsp), %rdi
movslq 0x1c(%rsp), %rax
addq %rax, %rdi
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %edx
leaq 0x29429(%rip), %rsi     # 0x36001
movb $0x0, %al
callq 0x11f0
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0xcbb0
jmp 0xcbf9
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x1120
cmpl $0x0, %eax
je 0xcc5a
movq 0x30(%rsp), %rsi
leaq 0x2853c(%rip), %rdi     # 0x35155
movb $0x0, %al
callq 0x1090
leaq 0x2848e(%rip), %rdi     # 0x350b5
movb $0x0, %al
callq 0x1090
movq 0x28(%rsp), %rsi
leaq 0x2851b(%rip), %rdi     # 0x35155
movb $0x0, %al
callq 0x1090
leaq 0x2846c(%rip), %rdi     # 0x350b4
movb $0x0, %al
callq 0x1090
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0xcc5c
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0xca8c
movq 0x30(%rsp), %rdi
callq 0x1030
movq 0x28(%rsp), %rdi
callq 0x1030
cmpl $0x0, 0x38(%rsp)
jle 0xcccb
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rax
movl (%rax), %edx
movq 0x48(%rsp), %rax
movl 0x4(%rax), %ecx
leaq 0x28732(%rip), %rdi     # 0x353d4
movb $0x0, %al
callq 0x1090
movq 0x50(%rsp), %rsi
movq 0x40(%rsp), %rax
movl (%rax), %edx
movq 0x40(%rsp), %rax
movl 0x4(%rax), %ecx
leaq 0x28710(%rip), %rdi     # 0x353d4
movb $0x0, %al
callq 0x1090
movq 0x312f6(%rip), %rax     # 0x3dfc8
movq (%rax), %rdi
callq 0x1180
movl 0x38(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)