#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(void) {
  int value1 = 44;
  int arr[4];
  int value2 = 88;
  int i;
  printf("value1 = %d, value2 = %d\n", value1, value2);
  for (i = -1; i <= 4; i++)
    arr[i] = 2 * i + 1;
  for (i = -1; i < 7; i++)
    printf("%2d %d\n", i, arr[i]);
  printf("value1 = %d, value2 = %d\n", value1, value2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2c,-0x8(%rbp)
movl   $0x58,-0x24(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x28(%rbp)
cmpl   $0x4,-0x28(%rbp)
jg     116f <main+0x5f>
mov    -0x28(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq -0x28(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1146 <main+0x36>
movl   $0xffffffff,-0x28(%rbp)
cmpl   $0x7,-0x28(%rbp)
jge    11a5 <main+0x95>
mov    -0x28(%rbp),%esi
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edx
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1176 <main+0x66>
mov    -0x8(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xe4e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
mov    %r14,%rdi
mov    $0x2c,%esi
mov    $0x58,%edx
call   1030 <printf@plt>
lea    0xee6(%rip),%rbx
mov    %rbx,%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x5,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x7,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x2c,%esi
mov    $0x58,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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