int main() {
  int i, n, fp, sp, bool;
  i = 0;
  for (fp = 1; i < 10; fp++) {
    n = 2;
    bool = 1;
    do {
      if (fp % n == 0 && n != fp)
        bool = 0;
      n++;
    } while (fp < n || bool == 0);
    if (bool == 0)
      continue;
    else {
      sp = fp + 2;
      bool = 1;
      n = 2;
      do {
        if (sp % n == 0 && n != sp)
          bool = 0;
        n++;
      } while (sp < n || bool == 0);
      if (bool == 1) {
        printf("(%d,%d)\n", fp, sp);
        i++;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    124e <main+0x13e>
movl   $0x2,-0xc(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1168 <main+0x58>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     1168 <main+0x58>
movl   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x1,%al
cmp    -0xc(%rbp),%ecx
mov    %al,-0x19(%rbp)
jl     118c <main+0x7c>
cmpl   $0x0,-0x18(%rbp)
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1145 <main+0x35>
cmpl   $0x0,-0x18(%rbp)
jne    11a6 <main+0x96>
jmp    1240 <main+0x130>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    11e0 <main+0xd0>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     11e0 <main+0xd0>
movl   $0x0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x1,%al
cmp    -0xc(%rbp),%ecx
mov    %al,-0x1a(%rbp)
jl     1204 <main+0xf4>
cmpl   $0x0,-0x18(%rbp)
sete   %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
test   $0x1,%al
jne    11bd <main+0xad>
cmpl   $0x1,-0x18(%rbp)
jne    1236 <main+0x126>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    123b <main+0x12b>
jmp    1240 <main+0x130>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x8,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x9,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0xb,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0xc,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"(%d,%d)\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 3)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 2, i32 4)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3, i32 5)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4, i32 6)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 5, i32 7)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 6, i32 8)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 7, i32 9)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8, i32 10)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 9, i32 11)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 10, i32 12)
ret i32 0
}