#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*/ abort();
int addinv(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, int, int);
int multiinv(int);
int plus(int, int);
int /*<<< orphan*/ stderr;
int times(int, int);
void verify_naive(void) {
  register int a, b = -1, c = -1;
  for (a = 0; a < 256; a++) {
    do {
      if (!(plus(a, 0) == a)) {
        fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                "plus(a, 0) == a", a, b, c);
        abort();
      }
    } while (0);
    do {
      if (!(times(a, 1) == a)) {
        fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                "times(a, 1) == a", a, b, c);
        abort();
      }
    } while (0);
    do {
      if (!(plus(addinv(a), a) == 0)) {
        fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                "plus(addinv(a), a) == 0", a, b, c);
        abort();
      }
    } while (0);
    if (a != 0) {
      do {
        if (!(times(multiinv(a), a) == 1)) {
          fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                  "times(multiinv(a), a) == 1", a, b, c);
          abort();
        }
      } while (0);
    }
    for (b = 0; b < 256; b++) {
      do {
        if (!(plus(a, b) == plus(b, a))) {
          fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                  "plus(a, b) == plus(b, a)", a, b, c);
          abort();
        }
      } while (0);
      do {
        if (!(times(a, b) == times(b, a))) {
          fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                  "times(a, b) == times(b, a)", a, b, c);
          abort();
        }
      } while (0);
      for (c = 0; c < 256; c++) {
        do {
          if (!(plus(plus(a, b), c) == plus(a, plus(b, c)))) {
            fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                    "plus(plus(a, b), c) == plus(a, plus(b, c))", a, b, c);
            abort();
          }
        } while (0);
        do {
          if (!(times(times(a, b), c) == times(a, times(b, c)))) {
            fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                    "times(times(a, b), c) == times(a, times(b, c))", a, b, c);
            abort();
          }
        } while (0);
        do {
          if (!(times(a, plus(b, c)) == plus(times(a, b), times(a, c)))) {
            fprintf(stderr, "Assertion failed: %s (with a=%d b=%d c=%d)\n",
                    "times(a, plus(b, c)) == plus(times(a, b), times(a, c))", a,
                    b, c);
            abort();
          }
        } while (0);
      }
    }
  }
}


x86 assembly (clang, -O0):
<verify_naive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0xffffffff,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    156b <verify_naive+0x40b>
jmp    118f <verify_naive+0x2f>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <plus@plt>
cmp    -0x4(%rbp),%eax
je     11d0 <verify_naive+0x70>
mov    0x2e37(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xe43(%rip),%rsi
lea    0xe68(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    11d5 <verify_naive+0x75>
jmp    11da <verify_naive+0x7a>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1080 <times@plt>
cmp    -0x4(%rbp),%eax
je     121e <verify_naive+0xbe>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xdf5(%rip),%rsi
lea    0xe2a(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    1223 <verify_naive+0xc3>
jmp    1228 <verify_naive+0xc8>
mov    -0x4(%rbp),%edi
call   1070 <addinv@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1030 <plus@plt>
cmp    $0x0,%eax
je     1271 <verify_naive+0x111>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xda2(%rip),%rsi
lea    0xde8(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    1276 <verify_naive+0x116>
cmpl   $0x0,-0x4(%rbp)
je     12d8 <verify_naive+0x178>
jmp    1285 <verify_naive+0x125>
mov    -0x4(%rbp),%edi
call   1050 <multiinv@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1080 <times@plt>
cmp    $0x1,%eax
je     12ce <verify_naive+0x16e>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xd45(%rip),%rsi
lea    0xda3(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    12d3 <verify_naive+0x173>
jmp    12d8 <verify_naive+0x178>
movl   $0x0,-0x8(%rbp)
cmpl   $0x100,-0x8(%rbp)
jge    1558 <verify_naive+0x3f8>
jmp    12f1 <verify_naive+0x191>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <plus@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1030 <plus@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
je     1345 <verify_naive+0x1e5>
mov    0x2cc2(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xcce(%rip),%rsi
lea    0xd47(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    134a <verify_naive+0x1ea>
jmp    134f <verify_naive+0x1ef>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1080 <times@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1080 <times@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
je     13a3 <verify_naive+0x243>
mov    0x2c64(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xc70(%rip),%rsi
lea    0xd02(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    13a8 <verify_naive+0x248>
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    1545 <verify_naive+0x3e5>
jmp    13c1 <verify_naive+0x261>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <plus@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1030 <plus@plt>
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <plus@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1030 <plus@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
je     142f <verify_naive+0x2cf>
mov    0x2bd8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xbe4(%rip),%rsi
lea    0xc91(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    1434 <verify_naive+0x2d4>
jmp    1439 <verify_naive+0x2d9>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1080 <times@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1080 <times@plt>
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1080 <times@plt>
mov    -0x24(%rbp),%edi
mov    %eax,%esi
call   1080 <times@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
je     14a7 <verify_naive+0x347>
mov    0x2b60(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xb6c(%rip),%rsi
lea    0xc44(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    14ac <verify_naive+0x34c>
jmp    14b1 <verify_naive+0x351>
mov    -0x4(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <plus@plt>
mov    -0x30(%rbp),%edi
mov    %eax,%esi
call   1080 <times@plt>
mov    %eax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1080 <times@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1080 <times@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%esi
call   1030 <plus@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
cmp    %ecx,%eax
je     152d <verify_naive+0x3cd>
mov    0x2ada(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xae6(%rip),%rsi
lea    0xbed(%rip),%rdx
call   1060 <fprintf@plt>
mov    $0x0,%al
call   1040 <abort@plt>
jmp    1532 <verify_naive+0x3d2>
jmp    1537 <verify_naive+0x3d7>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13af <verify_naive+0x24f>
jmp    154a <verify_naive+0x3ea>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12df <verify_naive+0x17f>
jmp    155d <verify_naive+0x3fd>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117d <verify_naive+0x1d>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_naive>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %r15d,%r15d
mov    $0xffffffff,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15d,%edi
xor    %esi,%esi
call   1030 <plus@plt>
cmp    %r15d,%eax
jne    13bf <verify_naive+0x25f>
mov    %r15d,%edi
mov    $0x1,%esi
call   1080 <times@plt>
cmp    %r15d,%eax
jne    13d8 <verify_naive+0x278>
mov    %r15d,%edi
call   1070 <addinv@plt>
mov    %eax,%edi
mov    %r15d,%esi
call   1030 <plus@plt>
test   %eax,%eax
jne    13f1 <verify_naive+0x291>
test   %r15d,%r15d
je     11e3 <verify_naive+0x83>
mov    %r15d,%edi
call   1050 <multiinv@plt>
mov    %eax,%edi
mov    %r15d,%esi
call   1080 <times@plt>
cmp    $0x1,%eax
jne    140a <verify_naive+0x2aa>
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
mov    %r15d,%edi
mov    %r12d,%esi
call   1030 <plus@plt>
mov    %eax,%ebx
mov    %r12d,%edi
mov    %r15d,%esi
call   1030 <plus@plt>
cmp    %eax,%ebx
jne    1384 <verify_naive+0x224>
mov    %r15d,%edi
mov    %r12d,%esi
call   1080 <times@plt>
mov    %eax,%ebx
mov    %r12d,%edi
mov    %r15d,%esi
call   1080 <times@plt>
cmp    %eax,%ebx
jne    139d <verify_naive+0x23d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15d,%edi
mov    %r12d,%esi
call   1030 <plus@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <plus@plt>
mov    %eax,%ebp
mov    %r12d,%edi
mov    %ebx,%esi
call   1030 <plus@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1030 <plus@plt>
cmp    %eax,%ebp
jne    1326 <verify_naive+0x1c6>
mov    %r15d,%edi
mov    %r12d,%esi
call   1080 <times@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1080 <times@plt>
mov    %eax,%ebp
mov    %r12d,%edi
mov    %ebx,%esi
call   1080 <times@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1080 <times@plt>
cmp    %eax,%ebp
jne    133f <verify_naive+0x1df>
mov    %r12d,%edi
mov    %ebx,%esi
call   1030 <plus@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   1080 <times@plt>
mov    %eax,%r14d
mov    %r15d,%edi
mov    %r12d,%esi
call   1080 <times@plt>
mov    %eax,%ebp
mov    %r15d,%edi
mov    %ebx,%esi
call   1080 <times@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <plus@plt>
cmp    %eax,%r14d
jne    1358 <verify_naive+0x1f8>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1240 <verify_naive+0xe0>
add    $0x1,%r12d
mov    $0x100,%r14d
cmp    $0x100,%r12d
jne    11f0 <verify_naive+0x90>
add    $0x1,%r15d
mov    $0x100,%r14d
cmp    $0x100,%r15d
jne    1180 <verify_naive+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cb3(%rip),%rax
mov    (%rax),%edi
lea    0xcca(%rip),%rsi
lea    0xd77(%rip),%rdx
jmp    136f <verify_naive+0x20f>
mov    0x2c9a(%rip),%rax
mov    (%rax),%edi
lea    0xcb1(%rip),%rsi
lea    0xd89(%rip),%rdx
jmp    136f <verify_naive+0x20f>
mov    0x2c81(%rip),%rax
mov    (%rax),%edi
lea    0xc98(%rip),%rsi
lea    0xd9f(%rip),%rdx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %ebx,%r9d
call   1060 <fprintf@plt>
xor    %eax,%eax
call   1040 <abort@plt>
mov    0x2c55(%rip),%rax
mov    (%rax),%edi
lea    0xc6c(%rip),%rsi
lea    0xce5(%rip),%rdx
jmp    13b4 <verify_naive+0x254>
mov    0x2c3c(%rip),%rax
mov    (%rax),%edi
lea    0xc53(%rip),%rsi
lea    0xce5(%rip),%rdx
mov    %r15d,%ecx
mov    %r12d,%r8d
mov    %r14d,%r9d
jmp    1378 <verify_naive+0x218>
mov    0x2c1a(%rip),%rax
mov    (%rax),%edi
lea    0xc31(%rip),%rsi
lea    0xc56(%rip),%rdx
jmp    1421 <verify_naive+0x2c1>
mov    0x2c01(%rip),%rax
mov    (%rax),%edi
lea    0xc18(%rip),%rsi
lea    0xc4d(%rip),%rdx
jmp    1421 <verify_naive+0x2c1>
mov    0x2be8(%rip),%rax
mov    (%rax),%edi
lea    0xbff(%rip),%rsi
lea    0xc45(%rip),%rdx
jmp    1421 <verify_naive+0x2c1>
mov    0x2bcf(%rip),%rax
mov    (%rax),%edi
lea    0xbe6(%rip),%rsi
lea    0xc44(%rip),%rdx
mov    %r15d,%ecx
mov    %r14d,%r8d
jmp    13ba <verify_naive+0x25a>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"Assertion failed: %s (with a=%d b=%d c=%d)\0A\00"
@.str.1 = [16 x i8] c"plus(a, 0) == a\00"
@.str.2 = [17 x i8] c"times(a, 1) == a\00"
@.str.3 = [24 x i8] c"plus(addinv(a), a) == 0\00"
@.str.4 = [27 x i8] c"times(multiinv(a), a) == 1\00"
@.str.5 = [25 x i8] c"plus(a, b) == plus(b, a)\00"
@.str.6 = [27 x i8] c"times(a, b) == times(b, a)\00"
@.str.7 = [43 x i8] c"plus(plus(a, b), c) == plus(a, plus(b, c))\00"
@.str.8 = [47 x i8] c"times(times(a, b), c) == times(a, times(b, c))\00"
@.str.9 = [55 x i8] c"times(a, plus(b, c)) == plus(times(a, b), times(a, c))\00"
define void @verify_naive() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 -1, i32* %2
store i32 -1, i32* %3
store i32 0, i32* %1
br label %4
4: ; preds = %185, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 256
br i1 %6, label %7, label %188
7: ; preds = %4
br label %8
8: ; preds = %7
%9 = load i32, i32* %1
%10 = call i32 @plus(i32 %9, i32 0)
%11 = load i32, i32* %1
%12 = icmp eq i32 %10, %11
br i1 %12, label %20, label %13
13: ; preds = %8
%14 = load i32, i32* @stderr
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %16, i32 %17)
%19 = call i32 (...) @abort()
unreachable
20: ; preds = %8
br label %21
21: ; preds = %20
br label %22
22: ; preds = %21
%23 = load i32, i32* %1
%24 = call i32 @times(i32 %23, i32 1)
%25 = load i32, i32* %1
%26 = icmp eq i32 %24, %25
br i1 %26, label %34, label %27
27: ; preds = %22
%28 = load i32, i32* @stderr
%29 = load i32, i32* %1
%30 = load i32, i32* %2
%31 = load i32, i32* %3
%32 = call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %29, i32 %30, i32 %31)
%33 = call i32 (...) @abort()
unreachable
34: ; preds = %22
br label %35
35: ; preds = %34
br label %36
36: ; preds = %35
%37 = load i32, i32* %1
%38 = call i32 @addinv(i32 %37)
%39 = load i32, i32* %1
%40 = call i32 @plus(i32 %38, i32 %39)
%41 = icmp eq i32 %40, 0
br i1 %41, label %49, label %42
42: ; preds = %36
%43 = load i32, i32* @stderr
%44 = load i32, i32* %1
%45 = load i32, i32* %2
%46 = load i32, i32* %3
%47 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %44, i32 %45, i32 %46)
%48 = call i32 (...) @abort()
unreachable
49: ; preds = %36
br label %50
50: ; preds = %49
%51 = load i32, i32* %1
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %69
53: ; preds = %50
br label %54
54: ; preds = %53
%55 = load i32, i32* %1
%56 = call i32 @multiinv(i32 %55)
%57 = load i32, i32* %1
%58 = call i32 @times(i32 %56, i32 %57)
%59 = icmp eq i32 %58, 1
br i1 %59, label %67, label %60
60: ; preds = %54
%61 = load i32, i32* @stderr
%62 = load i32, i32* %1
%63 = load i32, i32* %2
%64 = load i32, i32* %3
%65 = call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 %62, i32 %63, i32 %64)
%66 = call i32 (...) @abort()
unreachable
67: ; preds = %54
br label %68
68: ; preds = %67
br label %69
69: ; preds = %68, %50
store i32 0, i32* %2
br label %70
70: ; preds = %181, %69
%71 = load i32, i32* %2
%72 = icmp slt i32 %71, 256
br i1 %72, label %73, label %184
73: ; preds = %70
br label %74
74: ; preds = %73
%75 = load i32, i32* %1
%76 = load i32, i32* %2
%77 = call i32 @plus(i32 %75, i32 %76)
%78 = load i32, i32* %2
%79 = load i32, i32* %1
%80 = call i32 @plus(i32 %78, i32 %79)
%81 = icmp eq i32 %77, %80
br i1 %81, label %89, label %82
82: ; preds = %74
%83 = load i32, i32* @stderr
%84 = load i32, i32* %1
%85 = load i32, i32* %2
%86 = load i32, i32* %3
%87 = call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %84, i32 %85, i32 %86)
%88 = call i32 (...) @abort()
unreachable
89: ; preds = %74
br label %90
90: ; preds = %89
br label %91
91: ; preds = %90
%92 = load i32, i32* %1
%93 = load i32, i32* %2
%94 = call i32 @times(i32 %92, i32 %93)
%95 = load i32, i32* %2
%96 = load i32, i32* %1
%97 = call i32 @times(i32 %95, i32 %96)
%98 = icmp eq i32 %94, %97
br i1 %98, label %106, label %99
99: ; preds = %91
%100 = load i32, i32* @stderr
%101 = load i32, i32* %1
%102 = load i32, i32* %2
%103 = load i32, i32* %3
%104 = call i32 @fprintf(i32 %100, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 %101, i32 %102, i32 %103)
%105 = call i32 (...) @abort()
unreachable
106: ; preds = %91
br label %107
107: ; preds = %106
store i32 0, i32* %3
br label %108
108: ; preds = %177, %107
%109 = load i32, i32* %3
%110 = icmp slt i32 %109, 256
br i1 %110, label %111, label %180
111: ; preds = %108
br label %112
112: ; preds = %111
%113 = load i32, i32* %1
%114 = load i32, i32* %2
%115 = call i32 @plus(i32 %113, i32 %114)
%116 = load i32, i32* %3
%117 = call i32 @plus(i32 %115, i32 %116)
%118 = load i32, i32* %1
%119 = load i32, i32* %2
%120 = load i32, i32* %3
%121 = call i32 @plus(i32 %119, i32 %120)
%122 = call i32 @plus(i32 %118, i32 %121)
%123 = icmp eq i32 %117, %122
br i1 %123, label %131, label %124
124: ; preds = %112
%125 = load i32, i32* @stderr
%126 = load i32, i32* %1
%127 = load i32, i32* %2
%128 = load i32, i32* %3
%129 = call i32 @fprintf(i32 %125, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i32 %126, i32 %127, i32 %128)
%130 = call i32 (...) @abort()
unreachable
131: ; preds = %112
br label %132
132: ; preds = %131
br label %133
133: ; preds = %132
%134 = load i32, i32* %1
%135 = load i32, i32* %2
%136 = call i32 @times(i32 %134, i32 %135)
%137 = load i32, i32* %3
%138 = call i32 @times(i32 %136, i32 %137)
%139 = load i32, i32* %1
%140 = load i32, i32* %2
%141 = load i32, i32* %3
%142 = call i32 @times(i32 %140, i32 %141)
%143 = call i32 @times(i32 %139, i32 %142)
%144 = icmp eq i32 %138, %143
br i1 %144, label %152, label %145
145: ; preds = %133
%146 = load i32, i32* @stderr
%147 = load i32, i32* %1
%148 = load i32, i32* %2
%149 = load i32, i32* %3
%150 = call i32 @fprintf(i32 %146, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i32 %147, i32 %148, i32 %149)
%151 = call i32 (...) @abort()
unreachable
152: ; preds = %133
br label %153
153: ; preds = %152
br label %154
154: ; preds = %153
%155 = load i32, i32* %1
%156 = load i32, i32* %2
%157 = load i32, i32* %3
%158 = call i32 @plus(i32 %156, i32 %157)
%159 = call i32 @times(i32 %155, i32 %158)
%160 = load i32, i32* %1
%161 = load i32, i32* %2
%162 = call i32 @times(i32 %160, i32 %161)
%163 = load i32, i32* %1
%164 = load i32, i32* %3
%165 = call i32 @times(i32 %163, i32 %164)
%166 = call i32 @plus(i32 %162, i32 %165)
%167 = icmp eq i32 %159, %166
br i1 %167, label %175, label %168
168: ; preds = %154
%169 = load i32, i32* @stderr
%170 = load i32, i32* %1
%171 = load i32, i32* %2
%172 = load i32, i32* %3
%173 = call i32 @fprintf(i32 %169, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0), i32 %170, i32 %171, i32 %172)
%174 = call i32 (...) @abort()
unreachable
175: ; preds = %154
br label %176
176: ; preds = %175
br label %177
177: ; preds = %176
%178 = load i32, i32* %3
%179 = add nsw i32 %178, 1
store i32 %179, i32* %3
br label %108
180: ; preds = %108
br label %181
181: ; preds = %180
%182 = load i32, i32* %2
%183 = add nsw i32 %182, 1
store i32 %183, i32* %2
br label %70
184: ; preds = %70
br label %185
185: ; preds = %184
%186 = load i32, i32* %1
%187 = add nsw i32 %186, 1
store i32 %187, i32* %1
br label %4
188: ; preds = %4
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"Assertion failed: %s (with a=%d b=%d c=%d)\0A\00"
@.str.1 = [16 x i8] c"plus(a, 0) == a\00"
@.str.2 = [17 x i8] c"times(a, 1) == a\00"
@.str.3 = [24 x i8] c"plus(addinv(a), a) == 0\00"
@.str.4 = [27 x i8] c"times(multiinv(a), a) == 1\00"
@.str.5 = [25 x i8] c"plus(a, b) == plus(b, a)\00"
@.str.6 = [27 x i8] c"times(a, b) == times(b, a)\00"
@.str.7 = [43 x i8] c"plus(plus(a, b), c) == plus(a, plus(b, c))\00"
@.str.8 = [47 x i8] c"times(times(a, b), c) == times(a, times(b, c))\00"
@.str.9 = [55 x i8] c"times(a, plus(b, c)) == plus(times(a, b), times(a, c))\00"
define void @verify_naive() {
br label %1
1: ; preds = %0, %92
%2 = phi i32 [ -1, %0 ], [ 256, %92 ]
%3 = phi i32 [ 0, %0 ], [ %93, %92 ]
%4 = tail call i32 @plus(i32 %3, i32 0)
%5 = icmp eq i32 %4, %3
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %2, i32 %2)
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %1
%11 = tail call i32 @times(i32 %3, i32 1)
%12 = icmp eq i32 %11, %3
br i1 %12, label %17, label %13
13: ; preds = %10
%14 = load i32, i32* @stderr
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %3, i32 %2, i32 %2)
%16 = tail call i32 (...) @abort()
unreachable
17: ; preds = %10
%18 = tail call i32 @addinv(i32 %3)
%19 = tail call i32 @plus(i32 %18, i32 %3)
%20 = icmp eq i32 %19, 0
br i1 %20, label %25, label %21
21: ; preds = %17
%22 = load i32, i32* @stderr
%23 = tail call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %3, i32 %2, i32 %2)
%24 = tail call i32 (...) @abort()
unreachable
25: ; preds = %17
%26 = icmp eq i32 %3, 0
br i1 %26, label %27, label %28
27: ; preds = %28, %25
br label %36
28: ; preds = %25
%29 = tail call i32 @multiinv(i32 %3)
%30 = tail call i32 @times(i32 %29, i32 %3)
%31 = icmp eq i32 %30, 1
br i1 %31, label %27, label %32
32: ; preds = %28
%33 = load i32, i32* @stderr
%34 = tail call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 %3, i32 %2, i32 %2)
%35 = tail call i32 (...) @abort()
unreachable
36: ; preds = %27, %89
%37 = phi i32 [ 256, %89 ], [ %2, %27 ]
%38 = phi i32 [ %90, %89 ], [ 0, %27 ]
%39 = tail call i32 @plus(i32 %3, i32 %38)
%40 = tail call i32 @plus(i32 %38, i32 %3)
%41 = icmp eq i32 %39, %40
br i1 %41, label %46, label %42
42: ; preds = %36
%43 = load i32, i32* @stderr
%44 = tail call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %3, i32 %38, i32 %37)
%45 = tail call i32 (...) @abort()
unreachable
46: ; preds = %36
%47 = tail call i32 @times(i32 %3, i32 %38)
%48 = tail call i32 @times(i32 %38, i32 %3)
%49 = icmp eq i32 %47, %48
br i1 %49, label %54, label %50
50: ; preds = %46
%51 = load i32, i32* @stderr
%52 = tail call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i32 %3, i32 %38, i32 %37)
%53 = tail call i32 (...) @abort()
unreachable
54: ; preds = %46, %86
%55 = phi i32 [ %87, %86 ], [ 0, %46 ]
%56 = tail call i32 @plus(i32 %3, i32 %38)
%57 = tail call i32 @plus(i32 %56, i32 %55)
%58 = tail call i32 @plus(i32 %38, i32 %55)
%59 = tail call i32 @plus(i32 %3, i32 %58)
%60 = icmp eq i32 %57, %59
br i1 %60, label %65, label %61
61: ; preds = %54
%62 = load i32, i32* @stderr
%63 = tail call i32 @fprintf(i32 %62, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i32 %3, i32 %38, i32 %55)
%64 = tail call i32 (...) @abort()
unreachable
65: ; preds = %54
%66 = tail call i32 @times(i32 %3, i32 %38)
%67 = tail call i32 @times(i32 %66, i32 %55)
%68 = tail call i32 @times(i32 %38, i32 %55)
%69 = tail call i32 @times(i32 %3, i32 %68)
%70 = icmp eq i32 %67, %69
br i1 %70, label %75, label %71
71: ; preds = %65
%72 = load i32, i32* @stderr
%73 = tail call i32 @fprintf(i32 %72, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0), i32 %3, i32 %38, i32 %55)
%74 = tail call i32 (...) @abort()
unreachable
75: ; preds = %65
%76 = tail call i32 @plus(i32 %38, i32 %55)
%77 = tail call i32 @times(i32 %3, i32 %76)
%78 = tail call i32 @times(i32 %3, i32 %38)
%79 = tail call i32 @times(i32 %3, i32 %55)
%80 = tail call i32 @plus(i32 %78, i32 %79)
%81 = icmp eq i32 %77, %80
br i1 %81, label %86, label %82
82: ; preds = %75
%83 = load i32, i32* @stderr
%84 = tail call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0), i32 %3, i32 %38, i32 %55)
%85 = tail call i32 (...) @abort()
unreachable
86: ; preds = %75
%87 = add nuw nsw i32 %55, 1
%88 = icmp eq i32 %87, 256
br i1 %88, label %89, label %54
89: ; preds = %86
%90 = add nuw nsw i32 %38, 1
%91 = icmp eq i32 %90, 256
br i1 %91, label %92, label %36
92: ; preds = %89
%93 = add nuw nsw i32 %3, 1
%94 = icmp eq i32 %93, 256
br i1 %94, label %95, label %1
95: ; preds = %92
ret void
}