#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);
int main(void) {
  int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  int i;
  int flag = 1, max, sum_array_3_number = 0;
  max = array[0] + array[1] + array[2];
  for (i = 0 + 1; i < 10 - 1; i++) {
    sum_array_3_number = (array[i - 1] + array[i] + array[i + 1]);
    if (sum_array_3_number > max)
      flag = i;
  }
  printf("%d %d %d\n", array[flag - 1], array[flag], array[flag + 1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
movl   $0x1,-0x38(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x30(%rbp),%eax
add    -0x2c(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movl   $0x1,-0x34(%rbp)
cmpl   $0x9,-0x34(%rbp)
jge    11b8 <main+0x98>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%eax
movslq -0x34(%rbp),%rcx
add    -0x30(%rbp,%rcx,4),%eax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
add    -0x30(%rbp,%rcx,4),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jle    11a5 <main+0x85>
mov    -0x34(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    11aa <main+0x8a>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1165 <main+0x45>
mov    -0x38(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%esi
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
mov    -0x38(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%ecx
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x8,%esi
mov    $0x9,%edx
mov    $0xa,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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