#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*/ printf(char *, int, int);
int main() {
  int divi = 0;
  int div = 0;
  int t1 = 0;
  int t2 = 0;
  int i = 0;
  for (divi = 2, div = 2, t1 = 3; i < 10; t1 += 2) {
    divi = 2;
    while (t1 % divi != 0) {
      divi++;
    }
    if (t1 == divi) {
      t2 = t1 + 2;
      div = 2;
      while (t2 % div != 0) {
        div++;
      }
      if (t2 == div) {
        i++;
        printf("(%d, %d)\n", t1, t2);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
cmpl   $0xa,-0x18(%rbp)
jge    11ff <main+0xef>
movl   $0x2,-0x8(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
je     1186 <main+0x76>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1168 <main+0x58>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    11ec <main+0xdc>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
je     11c0 <main+0xb0>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a2 <main+0x92>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    11e7 <main+0xd7>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe1e(%rip),%rdi
call   1030 <printf@plt>
jmp    11ec <main+0xdc>
jmp    11f1 <main+0xe1>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
jmp    1157 <main+0x47>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x3,%ebp
xor    %ebx,%ebx
lea    0xedb(%rip),%r14
xor    %r15d,%r15d
jmp    1139 <main+0x29>
nopw   0x0(%rax,%rax,1)
add    $0xfffffffe,%ebx
cmp    $0xa,%r15d
jge    1184 <main+0x74>
mov    %ebp,%esi
mov    $0x2,%ecx
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
add    $0x1,%ecx
test   %edx,%edx
jne    1140 <main+0x30>
add    %ebx,%ecx
lea    0x2(%rsi),%ebp
cmp    $0x4,%ecx
jne    1130 <main+0x20>
mov    $0x2,%ecx
nopl   0x0(%rax)
mov    %ebp,%eax
xor    %edx,%edx
div    %ecx
add    $0x1,%ecx
test   %edx,%edx
jne    1160 <main+0x50>
add    %ebx,%ecx
cmp    $0x6,%ecx
jne    1130 <main+0x20>
add    $0x1,%r15d
mov    %r14,%rdi
mov    %ebp,%edx
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 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 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 2, i32* %2
store i32 2, i32* %3
store i32 3, i32* %4
br label %7
7: ; preds = %46, %0
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %49
10: ; preds = %7
store i32 2, i32* %2
br label %11
11: ; preds = %16, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = srem i32 %12, %13
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %11
19: ; preds = %11
%20 = load i32, i32* %4
%21 = load i32, i32* %2
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %45
23: ; preds = %19
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 2
store i32 %25, i32* %5
store i32 2, i32* %3
br label %26
26: ; preds = %31, %23
%27 = load i32, i32* %5
%28 = load i32, i32* %3
%29 = srem i32 %27, %28
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %26
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %26
34: ; preds = %26
%35 = load i32, i32* %5
%36 = load i32, i32* %3
%37 = icmp eq i32 %35, %36
br i1 %37, label %38, label %44
38: ; preds = %34
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 1
store i32 %40, i32* %6
%41 = load i32, i32* %4
%42 = load i32, i32* %5
%43 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %41, i32 %42)
br label %44
44: ; preds = %38, %34
br label %45
45: ; preds = %44, %19
br label %46
46: ; preds = %45
%47 = load i32, i32* %4
%48 = add nsw i32 %47, 2
store i32 %48, i32* %4
br label %7
49: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"(%d, %d)\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %22
%2 = phi i32 [ 0, %0 ], [ %23, %22 ]
%3 = phi i32 [ 3, %0 ], [ %11, %22 ]
br label %4
4: ; preds = %4, %1
%5 = phi i32 [ %8, %4 ], [ 2, %1 ]
%6 = urem i32 %3, %5
%7 = icmp eq i32 %6, 0
%8 = add nuw nsw i32 %5, 1
br i1 %7, label %9, label %4
9: ; preds = %4
%10 = icmp eq i32 %3, %5
%11 = add nuw nsw i32 %3, 2
br i1 %10, label %12, label %22
12: ; preds = %9, %12
%13 = phi i32 [ %16, %12 ], [ 2, %9 ]
%14 = urem i32 %11, %13
%15 = icmp eq i32 %14, 0
%16 = add nuw nsw i32 %13, 1
br i1 %15, label %17, label %12
17: ; preds = %12
%18 = icmp eq i32 %11, %13
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = add nsw i32 %2, 1
%21 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %11)
br label %22
22: ; preds = %9, %19, %17
%23 = phi i32 [ %20, %19 ], [ %2, %17 ], [ %2, %9 ]
%24 = icmp slt i32 %23, 10
br i1 %24, label %1, label %25
25: ; preds = %22
ret i32 0
}