#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 algebra1(int);
int algebra2(int);
int /*<<< orphan*/ cu_fail_assertation(char *, int, char *);
int /*<<< orphan*/ cu_success_assertation();
void testAlgebra(void) {
  int x;
  int left, right;
  for (x = 0; x < 10; x++) {
    left = algebra1(x);
    right = algebra2(x);
    if (((left)) == ((right))) {
      cu_success_assertation();
    } else {
      cu_fail_assertation(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/esromneb/embedded-c-unit-test/refs/heads/"
          "master/demo/tests.c",
          81,
          "left"
          " not equals "
          "right");
    };
  }
}


x86 assembly (clang, -O0):
<testAlgebra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    11b2 <testAlgebra+0x72>
mov    -0x4(%rbp),%edi
call   1050 <algebra1@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <algebra2@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1187 <testAlgebra+0x47>
mov    $0x0,%al
call   1040 <cu_success_assertation@plt>
jmp    119f <testAlgebra+0x5f>
lea    0xe72(%rip),%rdi
mov    $0x51,%esi
lea    0xefd(%rip),%rdx
call   1030 <cu_fail_assertation@plt>
jmp    11a4 <testAlgebra+0x64>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114f <testAlgebra+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAlgebra>:
push   %rbx
xor    %edi,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    115e <testAlgebra+0x1e>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    1176 <testAlgebra+0x36>
lea    0xe9b(%rip),%rdi
lea    0xf2b(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x1,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    1199 <testAlgebra+0x59>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    11b1 <testAlgebra+0x71>
lea    0xe60(%rip),%rdi
lea    0xef0(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x2,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    11d4 <testAlgebra+0x94>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    11ec <testAlgebra+0xac>
lea    0xe25(%rip),%rdi
lea    0xeb5(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x3,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x3,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    120f <testAlgebra+0xcf>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    1227 <testAlgebra+0xe7>
lea    0xdea(%rip),%rdi
lea    0xe7a(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x4,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x4,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    124a <testAlgebra+0x10a>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    1262 <testAlgebra+0x122>
lea    0xdaf(%rip),%rdi
lea    0xe3f(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x5,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x5,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    1285 <testAlgebra+0x145>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    129d <testAlgebra+0x15d>
lea    0xd74(%rip),%rdi
lea    0xe04(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x6,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x6,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    12c0 <testAlgebra+0x180>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    12d8 <testAlgebra+0x198>
lea    0xd39(%rip),%rdi
lea    0xdc9(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x7,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x7,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    12fb <testAlgebra+0x1bb>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    1313 <testAlgebra+0x1d3>
lea    0xcfe(%rip),%rdi
lea    0xd8e(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x8,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x8,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    1336 <testAlgebra+0x1f6>
xor    %eax,%eax
call   1040 <cu_success_assertation@plt>
jmp    134e <testAlgebra+0x20e>
lea    0xcc3(%rip),%rdi
lea    0xd53(%rip),%rdx
mov    $0x51,%esi
call   1030 <cu_fail_assertation@plt>
mov    $0x9,%edi
call   1050 <algebra1@plt>
mov    %eax,%ebx
mov    $0x9,%edi
call   1060 <algebra2@plt>
cmp    %eax,%ebx
jne    1370 <testAlgebra+0x230>
xor    %eax,%eax
pop    %rbx
jmp    1040 <cu_success_assertation@plt>
lea    0xc89(%rip),%rdi
lea    0xd19(%rip),%rdx
mov    $0x51,%esi
pop    %rbx
jmp    1030 <cu_fail_assertation@plt>

LLVM IR (-O0):
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/esromneb/embedded-c-unit-test/refs/heads/master/demo/tests.c\00"
@.str.1 = [22 x i8] c"left not equals right\00"
define void @testAlgebra() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %20, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %23
7: ; preds = %4
%8 = load i32, i32* %1
%9 = call i32 @algebra1(i32 %8)
store i32 %9, i32* %2
%10 = load i32, i32* %1
%11 = call i32 @algebra2(i32 %10)
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %7
%16 = call i32 (...) @cu_success_assertation()
br label %19
17: ; preds = %7
%18 = call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %20
20: ; preds = %19
%21 = load i32, i32* %1
%22 = add nsw i32 %21, 1
store i32 %22, i32* %1
br label %4
23: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/esromneb/embedded-c-unit-test/refs/heads/master/demo/tests.c\00"
@.str.1 = [22 x i8] c"left not equals right\00"
define void @testAlgebra() {
%1 = tail call i32 @algebra1(i32 0)
%2 = tail call i32 @algebra2(i32 0)
%3 = icmp eq i32 %1, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @cu_success_assertation()
br label %8
6: ; preds = %0
%7 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %4, %6
%9 = tail call i32 @algebra1(i32 1)
%10 = tail call i32 @algebra2(i32 1)
%11 = icmp eq i32 %9, %10
br i1 %11, label %14, label %12
12: ; preds = %8
%13 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %16
14: ; preds = %8
%15 = tail call i32 (...) @cu_success_assertation()
br label %16
16: ; preds = %14, %12
%17 = tail call i32 @algebra1(i32 2)
%18 = tail call i32 @algebra2(i32 2)
%19 = icmp eq i32 %17, %18
br i1 %19, label %22, label %20
20: ; preds = %16
%21 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %24
22: ; preds = %16
%23 = tail call i32 (...) @cu_success_assertation()
br label %24
24: ; preds = %22, %20
%25 = tail call i32 @algebra1(i32 3)
%26 = tail call i32 @algebra2(i32 3)
%27 = icmp eq i32 %25, %26
br i1 %27, label %30, label %28
28: ; preds = %24
%29 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %32
30: ; preds = %24
%31 = tail call i32 (...) @cu_success_assertation()
br label %32
32: ; preds = %30, %28
%33 = tail call i32 @algebra1(i32 4)
%34 = tail call i32 @algebra2(i32 4)
%35 = icmp eq i32 %33, %34
br i1 %35, label %38, label %36
36: ; preds = %32
%37 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %40
38: ; preds = %32
%39 = tail call i32 (...) @cu_success_assertation()
br label %40
40: ; preds = %38, %36
%41 = tail call i32 @algebra1(i32 5)
%42 = tail call i32 @algebra2(i32 5)
%43 = icmp eq i32 %41, %42
br i1 %43, label %46, label %44
44: ; preds = %40
%45 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %48
46: ; preds = %40
%47 = tail call i32 (...) @cu_success_assertation()
br label %48
48: ; preds = %46, %44
%49 = tail call i32 @algebra1(i32 6)
%50 = tail call i32 @algebra2(i32 6)
%51 = icmp eq i32 %49, %50
br i1 %51, label %54, label %52
52: ; preds = %48
%53 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %56
54: ; preds = %48
%55 = tail call i32 (...) @cu_success_assertation()
br label %56
56: ; preds = %54, %52
%57 = tail call i32 @algebra1(i32 7)
%58 = tail call i32 @algebra2(i32 7)
%59 = icmp eq i32 %57, %58
br i1 %59, label %62, label %60
60: ; preds = %56
%61 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %64
62: ; preds = %56
%63 = tail call i32 (...) @cu_success_assertation()
br label %64
64: ; preds = %62, %60
%65 = tail call i32 @algebra1(i32 8)
%66 = tail call i32 @algebra2(i32 8)
%67 = icmp eq i32 %65, %66
br i1 %67, label %70, label %68
68: ; preds = %64
%69 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %72
70: ; preds = %64
%71 = tail call i32 (...) @cu_success_assertation()
br label %72
72: ; preds = %70, %68
%73 = tail call i32 @algebra1(i32 9)
%74 = tail call i32 @algebra2(i32 9)
%75 = icmp eq i32 %73, %74
br i1 %75, label %78, label %76
76: ; preds = %72
%77 = tail call i32 @cu_fail_assertation(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %80
78: ; preds = %72
%79 = tail call i32 (...) @cu_success_assertation()
br label %80
80: ; preds = %78, %76
ret void
}