#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*/ getchar();
int /*<<< orphan*/ printf(char *, char, int);
int main(void) {
  int a, b, c, d, e, x;
  int *variables[5];
  a = 1;
  b = a * 2;
  c = b * 2;
  d = c * 2;
  e = d * 2;
  variables[0] = &a;
  variables[1] = &b;
  variables[2] = &c;
  variables[3] = &d;
  variables[4] = &e;
  for (x = 0; x < 5; x++)
    printf("Variable %c = %d\n", 'a' + x, *variables[x]);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x5,-0x1c(%rbp)
jge    11c1 <main+0xa1>
mov    -0x1c(%rbp),%eax
add    $0x61,%eax
movslq -0x1c(%rbp),%rcx
mov    -0x50(%rbp,%rcx,8),%rcx
mov    (%rcx),%edx
lea    0xe55(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1189 <main+0x69>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x61,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x62,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x63,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x65,%esi
mov    $0x10,%edx
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"Variable %c = %d\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext 97, i32 1)
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext 98, i32 2)
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext 99, i32 4)
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext 100, i32 8)
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext 101, i32 16)
%6 = call i32 (...) @getchar()
ret i32 0
}