#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*/ Fail(char *, int, char *);
int /*<<< orphan*/ RunContainsASTTreeTestCases();
int /*<<< orphan*/ RunContainsSubtreeTestCases();
int /*<<< orphan*/ RunCopyASTTestCases();
int /*<<< orphan*/ RunEqualASTTreeTestCases();
int /*<<< orphan*/ RunEqualNodeTestCases();
int /*<<< orphan*/ RunGetAllMatchingSubtreeTestCase();
int /*<<< orphan*/ RunPatternEqualTestCases();
int /*<<< orphan*/ RunPatternMatchReplaceTestCases();
int /*<<< orphan*/ RunReplaceASTTestCases();
int /*<<< orphan*/ RunReplaceAllMatchingSubtreeTestCases();
int /*<<< orphan*/ RunReplaceSyntaxSubtreeTestCases();
int /*<<< orphan*/ printf(char *);
void RunAllEqualsTests() {
  int numErrors = 0;
  printf("\nRunning Equals Tests \n");
  if (!RunEqualNodeTestCases())
    numErrors++;
  if (!RunEqualASTTreeTestCases())
    numErrors++;
  if (!RunContainsASTTreeTestCases())
    numErrors++;
  if (!RunReplaceASTTestCases())
    numErrors++;
  if (!RunContainsSubtreeTestCases())
    numErrors++;
  if (!RunReplaceSyntaxSubtreeTestCases())
    numErrors++;
  if (!RunCopyASTTestCases())
    numErrors++;
  if (!RunGetAllMatchingSubtreeTestCase())
    numErrors++;
  if (!RunReplaceAllMatchingSubtreeTestCases())
    numErrors++;
  if (!RunPatternEqualTestCases())
    numErrors++;
  if (!RunPatternMatchReplaceTestCases())
    numErrors++;
  printf("\n");
  if (numErrors == 0) {
    printf("\nPassed all equals tests. \n");
  } else {
    Fail("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/106ohm/eigengraph/refs/heads/develop/"
         "cilk-5.4.6/cilk2c/testEquals.c",
         88, "\nFailed Equals Tests. \n");
  }
}


x86 assembly (clang, -O0):
<RunAllEqualsTests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe1a(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   1060 <RunEqualNodeTestCases@plt>
cmp    $0x0,%eax
jne    1204 <RunAllEqualsTests+0x34>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10c0 <RunEqualASTTreeTestCases@plt>
cmp    $0x0,%eax
jne    121d <RunAllEqualsTests+0x4d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1070 <RunContainsASTTreeTestCases@plt>
cmp    $0x0,%eax
jne    1236 <RunAllEqualsTests+0x66>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1080 <RunReplaceASTTestCases@plt>
cmp    $0x0,%eax
jne    124f <RunAllEqualsTests+0x7f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10d0 <RunContainsSubtreeTestCases@plt>
cmp    $0x0,%eax
jne    1268 <RunAllEqualsTests+0x98>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10f0 <RunReplaceSyntaxSubtreeTestCases@plt>
cmp    $0x0,%eax
jne    1281 <RunAllEqualsTests+0xb1>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <RunCopyASTTestCases@plt>
cmp    $0x0,%eax
jne    129a <RunAllEqualsTests+0xca>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <RunGetAllMatchingSubtreeTestCase@plt>
cmp    $0x0,%eax
jne    12b3 <RunAllEqualsTests+0xe3>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10b0 <RunReplaceAllMatchingSubtreeTestCases@plt>
cmp    $0x0,%eax
jne    12cc <RunAllEqualsTests+0xfc>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10a0 <RunPatternEqualTestCases@plt>
cmp    $0x0,%eax
jne    12e5 <RunAllEqualsTests+0x115>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <RunPatternMatchReplaceTestCases@plt>
cmp    $0x0,%eax
jne    12fe <RunAllEqualsTests+0x12e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xde3(%rip),%rdi
call   1090 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jne    1325 <RunAllEqualsTests+0x155>
lea    0xcfd(%rip),%rdi
call   1090 <printf@plt>
jmp    133d <RunAllEqualsTests+0x16d>
lea    0xd08(%rip),%rdi
mov    $0x58,%esi
lea    0xd9a(%rip),%rdx
call   10e0 <Fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RunAllEqualsTests>:
push   %rbp
push   %r14
push   %rbx
lea    0xecb(%rip),%rdi
call   1080 <puts@plt>
xor    %eax,%eax
call   1070 <RunEqualNodeTestCases@plt>
xor    %r14d,%r14d
test   %eax,%eax
sete   %r14b
xor    %eax,%eax
call   10d0 <RunEqualASTTreeTestCases@plt>
lea    0x1(%r14),%ebx
test   %eax,%eax
cmovne %r14d,%ebx
xor    %eax,%eax
call   1090 <RunContainsASTTreeTestCases@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
call   10a0 <RunReplaceASTTestCases@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
call   10e0 <RunContainsSubtreeTestCases@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
call   1100 <RunReplaceSyntaxSubtreeTestCases@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
call   1060 <RunCopyASTTestCases@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
call   1040 <RunGetAllMatchingSubtreeTestCase@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
call   10c0 <RunReplaceAllMatchingSubtreeTestCases@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
call   10b0 <RunPatternEqualTestCases@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
call   1030 <RunPatternMatchReplaceTestCases@plt>
cmp    $0x1,%eax
sbb    %ebp,%ebp
mov    $0xa,%edi
call   1050 <putchar@plt>
cmp    %ebp,%ebx
jne    12a3 <RunAllEqualsTests+0xc3>
lea    0xe33(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1080 <puts@plt>
lea    0xd56(%rip),%rdi
lea    0xded(%rip),%rdx
mov    $0x58,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    10f0 <Fail@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\0ARunning Equals Tests \0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [28 x i8] c"\0APassed all equals tests. \0A\00"
@.str.3 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/106ohm/eigengraph/refs/heads/develop/cilk-5.4.6/cilk2c/testEquals.c\00"
@.str.4 = [24 x i8] c"\0AFailed Equals Tests. \0A\00"
define void @RunAllEqualsTests() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @RunEqualNodeTestCases()
%4 = icmp ne i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %8
8: ; preds = %5, %0
%9 = call i32 (...) @RunEqualASTTreeTestCases()
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %14
14: ; preds = %11, %8
%15 = call i32 (...) @RunContainsASTTreeTestCases()
%16 = icmp ne i32 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %1
%19 = add nsw i32 %18, 1
store i32 %19, i32* %1
br label %20
20: ; preds = %17, %14
%21 = call i32 (...) @RunReplaceASTTestCases()
%22 = icmp ne i32 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %26
26: ; preds = %23, %20
%27 = call i32 (...) @RunContainsSubtreeTestCases()
%28 = icmp ne i32 %27, 0
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
br label %32
32: ; preds = %29, %26
%33 = call i32 (...) @RunReplaceSyntaxSubtreeTestCases()
%34 = icmp ne i32 %33, 0
br i1 %34, label %38, label %35
35: ; preds = %32
%36 = load i32, i32* %1
%37 = add nsw i32 %36, 1
store i32 %37, i32* %1
br label %38
38: ; preds = %35, %32
%39 = call i32 (...) @RunCopyASTTestCases()
%40 = icmp ne i32 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %38
%42 = load i32, i32* %1
%43 = add nsw i32 %42, 1
store i32 %43, i32* %1
br label %44
44: ; preds = %41, %38
%45 = call i32 (...) @RunGetAllMatchingSubtreeTestCase()
%46 = icmp ne i32 %45, 0
br i1 %46, label %50, label %47
47: ; preds = %44
%48 = load i32, i32* %1
%49 = add nsw i32 %48, 1
store i32 %49, i32* %1
br label %50
50: ; preds = %47, %44
%51 = call i32 (...) @RunReplaceAllMatchingSubtreeTestCases()
%52 = icmp ne i32 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %50
%54 = load i32, i32* %1
%55 = add nsw i32 %54, 1
store i32 %55, i32* %1
br label %56
56: ; preds = %53, %50
%57 = call i32 (...) @RunPatternEqualTestCases()
%58 = icmp ne i32 %57, 0
br i1 %58, label %62, label %59
59: ; preds = %56
%60 = load i32, i32* %1
%61 = add nsw i32 %60, 1
store i32 %61, i32* %1
br label %62
62: ; preds = %59, %56
%63 = call i32 (...) @RunPatternMatchReplaceTestCases()
%64 = icmp ne i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %62
%66 = load i32, i32* %1
%67 = add nsw i32 %66, 1
store i32 %67, i32* %1
br label %68
68: ; preds = %65, %62
%69 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%70 = load i32, i32* %1
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %76
74: ; preds = %68
%75 = call i32 @Fail(i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.3, i64 0, i64 0), i32 88, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %76
76: ; preds = %74, %72
ret void
}

LLVM IR (-O2):
@.str.3 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/106ohm/eigengraph/refs/heads/develop/cilk-5.4.6/cilk2c/testEquals.c\00"
@.str.4 = [24 x i8] c"\0AFailed Equals Tests. \0A\00"
@str = [23 x i8] c"\0ARunning Equals Tests \00"
@str.5 = [27 x i8] c"\0APassed all equals tests. \00"
define void @RunAllEqualsTests() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @RunEqualNodeTestCases()
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 (...) @RunEqualASTTreeTestCases()
%6 = icmp eq i32 %5, 0
%7 = select i1 %3, i32 2, i32 1
%8 = select i1 %6, i32 %7, i32 %4
%9 = tail call i32 (...) @RunContainsASTTreeTestCases()
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %8, %11
%13 = tail call i32 (...) @RunReplaceASTTestCases()
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = add nuw nsw i32 %12, %15
%17 = tail call i32 (...) @RunContainsSubtreeTestCases()
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = add nuw nsw i32 %16, %19
%21 = tail call i32 (...) @RunReplaceSyntaxSubtreeTestCases()
%22 = icmp eq i32 %21, 0
%23 = zext i1 %22 to i32
%24 = add nuw nsw i32 %20, %23
%25 = tail call i32 (...) @RunCopyASTTestCases()
%26 = icmp eq i32 %25, 0
%27 = zext i1 %26 to i32
%28 = add nuw nsw i32 %24, %27
%29 = tail call i32 (...) @RunGetAllMatchingSubtreeTestCase()
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = add nuw nsw i32 %28, %31
%33 = tail call i32 (...) @RunReplaceAllMatchingSubtreeTestCases()
%34 = icmp eq i32 %33, 0
%35 = zext i1 %34 to i32
%36 = add nuw nsw i32 %32, %35
%37 = tail call i32 (...) @RunPatternEqualTestCases()
%38 = icmp eq i32 %37, 0
%39 = zext i1 %38 to i32
%40 = add nuw nsw i32 %36, %39
%41 = tail call i32 (...) @RunPatternMatchReplaceTestCases()
%42 = icmp eq i32 %41, 0
%43 = sext i1 %42 to i32
%44 = tail call i32 @putchar(i32 10)
%45 = icmp eq i32 %40, %43
br i1 %45, label %46, label %48
46: ; preds = %0
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.5, i64 0, i64 0))
br label %50
48: ; preds = %0
%49 = tail call i32 @Fail(i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.3, i64 0, i64 0), i32 88, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %50
50: ; preds = %48, %46
ret void
}