#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 */
scalar_t__ is_prime(int);
int /*<<< orphan*/ printf(char *, int, int, int);
void conjecture(int low, int high) {
  int i, j, k, primeSumFound = 0;
  for (i = low; i <= high; i++) {
    if (i % 2 == 0) {
      for (j = 2; j < high; j++) {
        if (is_prime(j)) {
          for (k = j; k < high; k++) {
            if (k + j == i && is_prime(k)) {
              primeSumFound = 1;
              printf("%3i = %3i + %3i\n", i, j, k);
              break;
            }
          }
        }
        if (primeSumFound) {
          primeSumFound = 0;
          break;
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<conjecture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     122d <conjecture+0x10d>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    121a <conjecture+0xfa>
movl   $0x2,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1215 <conjecture+0xf5>
mov    -0x10(%rbp),%edi
call   1040 <is_prime@plt>
cmp    $0x0,%rax
je     11ec <conjecture+0xcc>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e7 <conjecture+0xc7>
mov    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11d4 <conjecture+0xb4>
mov    -0x14(%rbp),%edi
call   1040 <is_prime@plt>
cmp    $0x0,%rax
je     11d4 <conjecture+0xb4>
movl   $0x1,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
jmp    11e7 <conjecture+0xc7>
jmp    11d9 <conjecture+0xb9>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1186 <conjecture+0x66>
jmp    11ec <conjecture+0xcc>
cmpl   $0x0,-0x18(%rbp)
je     1202 <conjecture+0xe2>
movl   $0x0,-0x18(%rbp)
jmp    1215 <conjecture+0xf5>
jmp    1207 <conjecture+0xe7>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1162 <conjecture+0x42>
jmp    121a <conjecture+0xfa>
jmp    121f <conjecture+0xff>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <conjecture+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conjecture>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,0x4(%rsp)
cmp    %esi,%edi
jle    1145 <conjecture+0x25>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x4(%rsp),%eax
neg    %eax
mov    %rax,0x10(%rsp)
lea    -0x4(%rdi),%r13d
jmp    1174 <conjecture+0x54>
cs nopw 0x0(%rax,%rax,1)
mov    0x8(%rsp),%rcx
lea    0x1(%rcx),%eax
add    $0x1,%r13d
cmp    0x4(%rsp),%ecx
mov    %eax,%edi
je     1136 <conjecture+0x16>
mov    %rdi,0x8(%rsp)
test   $0x1,%dil
jne    1160 <conjecture+0x40>
cmpl   $0x3,0x4(%rsp)
jl     1160 <conjecture+0x40>
mov    $0x2,%ebp
mov    %r13d,%r14d
jmp    119d <conjecture+0x7d>
add    $0x1,%ebp
add    $0xfffffffe,%r14d
cmp    0x4(%rsp),%ebp
je     1160 <conjecture+0x40>
mov    %ebp,%edi
call   1040 <is_prime@plt>
test   %rax,%rax
je     1190 <conjecture+0x70>
mov    0x10(%rsp),%rax
lea    (%rax,%rbp,1),%r15d
xor    %r12d,%r12d
jmp    11cc <conjecture+0xac>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12d
mov    %r15d,%eax
add    %r12d,%eax
je     1190 <conjecture+0x70>
cmp    %r12d,%r14d
jne    11c0 <conjecture+0xa0>
lea    (%r12,%rbp,1),%ebx
mov    %ebx,%edi
call   1040 <is_prime@plt>
test   %rax,%rax
je     11c0 <conjecture+0xa0>
lea    0xe18(%rip),%rdi
mov    0x8(%rsp),%rsi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1030 <printf@plt>
jmp    1160 <conjecture+0x40>

LLVM IR (-O0):
@.str = [17 x i8] c"%3i = %3i + %3i\0A\00"
define void @conjecture(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %8
%9 = load i32, i32* %3
store i32 %9, i32* %5
br label %10
10: ; preds = %63, %2
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %66
14: ; preds = %10
%15 = load i32, i32* %5
%16 = srem i32 %15, 2
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %62
18: ; preds = %14
store i32 2, i32* %6
br label %19
19: ; preds = %58, %18
%20 = load i32, i32* %6
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %61
23: ; preds = %19
%24 = load i32, i32* %6
%25 = call i64 @is_prime(i32 %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %53
27: ; preds = %23
%28 = load i32, i32* %6
store i32 %28, i32* %7
br label %29
29: ; preds = %49, %27
%30 = load i32, i32* %7
%31 = load i32, i32* %4
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %52
33: ; preds = %29
%34 = load i32, i32* %7
%35 = load i32, i32* %6
%36 = add nsw i32 %34, %35
%37 = load i32, i32* %5
%38 = icmp eq i32 %36, %37
br i1 %38, label %39, label %48
39: ; preds = %33
%40 = load i32, i32* %7
%41 = call i64 @is_prime(i32 %40)
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %48
43: ; preds = %39
store i32 1, i32* %8
%44 = load i32, i32* %5
%45 = load i32, i32* %6
%46 = load i32, i32* %7
%47 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %44, i32 %45, i32 %46)
br label %52
48: ; preds = %39, %33
br label %49
49: ; preds = %48
%50 = load i32, i32* %7
%51 = add nsw i32 %50, 1
store i32 %51, i32* %7
br label %29
52: ; preds = %43, %29
br label %53
53: ; preds = %52, %23
%54 = load i32, i32* %8
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %53
store i32 0, i32* %8
br label %61
57: ; preds = %53
br label %58
58: ; preds = %57
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
br label %19
61: ; preds = %56, %19
br label %62
62: ; preds = %61, %14
br label %63
63: ; preds = %62
%64 = load i32, i32* %5
%65 = add nsw i32 %64, 1
store i32 %65, i32* %5
br label %10
66: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%3i = %3i + %3i\0A\00"
define void @conjecture(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %33, label %4
4: ; preds = %2
%5 = icmp slt i32 %1, 3
br label %6
6: ; preds = %4, %30
%7 = phi i32 [ %0, %4 ], [ %31, %30 ]
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
%10 = or i1 %9, %5
br i1 %10, label %30, label %11
11: ; preds = %6, %27
%12 = phi i32 [ %28, %27 ], [ 2, %6 ]
%13 = tail call i64 @is_prime(i32 %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %27, label %15
15: ; preds = %11, %24
%16 = phi i32 [ %25, %24 ], [ %12, %11 ]
%17 = add nuw nsw i32 %16, %12
%18 = icmp eq i32 %17, %7
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = tail call i64 @is_prime(i32 %16)
%21 = icmp eq i64 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %12, i32 %16)
br label %30
24: ; preds = %15, %19
%25 = add nuw i32 %16, 1
%26 = icmp eq i32 %25, %1
br i1 %26, label %27, label %15
27: ; preds = %24, %11
%28 = add nuw nsw i32 %12, 1
%29 = icmp eq i32 %28, %1
br i1 %29, label %30, label %11
30: ; preds = %27, %6, %22
%31 = add i32 %7, 1
%32 = icmp eq i32 %7, %1
br i1 %32, label %33, label %6
33: ; preds = %30, %2
ret void
}