#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*/ getch();
int /*<<< orphan*/ printf(char *, int, int);
void main() {
  int i = 0, j = 9;
  int a[4] = {2, 7, 11, 15};
  for (i = 0; i <= 4; i++) {
    if (a[i] + a[i + 1] == j)
      printf("the numbers are %d %d", a[i], a[i + 1]);
  }
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x9,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jg     11ae <main+0x8e>
movslq -0x4(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
add    -0x20(%rbp,%rcx,4),%eax
cmp    -0x8(%rbp),%eax
jne    119b <main+0x7b>
movslq -0x4(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x20(%rbp,%rax,4),%edx
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
jmp    11a0 <main+0x80>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <main+0x33>
mov    $0x0,%al
call   1040 <getch@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x2,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getch@plt>

LLVM IR (-O0):
@__const.main.a = [4 x i32] [i32 2, i32 7, i32 11, i32 15]
@.str = [22 x i8] c"the numbers are %d %d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i32]
store i32 0, i32* %1
store i32 9, i32* %2
%4 = bitcast [4 x i32]* %3 to i8*
store i32 0, i32* %1
br label %5
5: ; preds = %33, %0
%6 = load i32, i32* %1
%7 = icmp sle i32 %6, 4
br i1 %7, label %8, label %36
8: ; preds = %5
%9 = load i32, i32* %1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %10
%12 = load i32, i32* %11
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %15
%17 = load i32, i32* %16
%18 = add nsw i32 %12, %17
%19 = load i32, i32* %2
%20 = icmp eq i32 %18, %19
br i1 %20, label %21, label %32
21: ; preds = %8
%22 = load i32, i32* %1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = load i32, i32* %1
%27 = add nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %30)
br label %32
32: ; preds = %21, %8
br label %33
33: ; preds = %32
%34 = load i32, i32* %1
%35 = add nsw i32 %34, 1
store i32 %35, i32* %1
br label %5
36: ; preds = %5
%37 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"the numbers are %d %d\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 2, i32 7)
%2 = tail call i32 (...) @getch()
ret void
}