#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int compare_output(int idominator1[], int idominator2[], int no_of_vertices) {
  int i;
  for (i = 0; i < no_of_vertices; i++)
    if (idominator1[i] != idominator2[i]) {
      fprintf(stderr, "Dominator tree verification failed...\n");
      return 0;
    }
  fprintf(stderr, "Dominator tree verification successful...\n");
  return 1;
}


x86 assembly (clang, -O0):
<compare_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1186 <compare_output+0x76>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     1173 <compare_output+0x63>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11a2 <compare_output+0x92>
jmp    1178 <compare_output+0x68>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112a <compare_output+0x1a>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_output>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rax
mov    $0x1,%ebp
lea    0xf05(%rip),%rsi
test   %edx,%edx
jle    1158 <compare_output+0x48>
mov    %edx,%ecx
xor    %edx,%edx
lea    0xecf(%rip),%r8
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rdi,%rdx,4),%ebx
cmp    (%rax,%rdx,4),%ebx
jne    1153 <compare_output+0x43>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1140 <compare_output+0x30>
jmp    1158 <compare_output+0x48>
mov    %r8,%rsi
xor    %ebp,%ebp
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Dominator tree verification failed...\0A\00"
@.str.1 = [43 x i8] c"Dominator tree verification successful...\0A\00"
define i32 @compare_output(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %29, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %32
13: ; preds = %9
%14 = load i32*, i32** %5
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = load i32*, i32** %6
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
%23 = load i32, i32* %22
%24 = icmp ne i32 %18, %23
br i1 %24, label %25, label %28
25: ; preds = %13
%26 = load i32, i32* @stderr
%27 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %35
28: ; preds = %13
br label %29
29: ; preds = %28
%30 = load i32, i32* %8
%31 = add nsw i32 %30, 1
store i32 %31, i32* %8
br label %9
32: ; preds = %9
%33 = load i32, i32* @stderr
%34 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %4
br label %35
35: ; preds = %32, %25
%36 = load i32, i32* %4
ret i32 %36
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Dominator tree verification failed...\0A\00"
@.str.1 = [43 x i8] c"Dominator tree verification successful...\0A\00"
define i32 @compare_output(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %1, i64 %10
%14 = load i32, i32* %13
%15 = icmp eq i32 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %7, %9, %3
%18 = phi i8* [ getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), %9 ], [ getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), %7 ]
%19 = phi i32 [ 1, %3 ], [ 0, %9 ], [ 1, %7 ]
%20 = load i32, i32* @stderr
%21 = tail call i32 @fprintf(i32 %20, i8* %18)
ret i32 %19
}