#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 main(void) {
  int a = 42, i;
  float b = 3.141592f;
  char c[17] = "Hello World!";
  printf("LOCAL VAR ADDRESSES:\na -> %p\nb -> %p\n", &a, &b);
  for (i = 0; i < 17; i++)
    printf("Char %d: %p\n", i, &c[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed1(%rip),%al
mov    %al,-0x20(%rbp)
lea    0xec8(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x11,-0xc(%rbp)
jge    11a3 <main+0x93>
mov    -0xc(%rbp),%esi
movslq -0xc(%rbp),%rax
lea    -0x30(%rbp),%rdx
add    %rax,%rdx
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116f <main+0x5f>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movl   $0x2a,0x24(%rsp)
movl   $0x40490fd8,0x20(%rsp)
40
movaps 0xed2(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x10(%rsp)
lea    0x10(%rsp),%r14
lea    0xece(%rip),%rdi
lea    0x24(%rsp),%rsi
lea    0x20(%rsp),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedc(%rip),%rbx
mov    %rsp,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x1(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x2(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x3(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x5(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x6(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x7(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x9(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xa(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xb(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.c = [17 x i8] c"Hello World!\00\00\00\00\00"
@.str = [38 x i8] c"LOCAL VAR ADDRESSES:\0Aa -> %p\0Ab -> %p\0A\00"
@.str.1 = [13 x i8] c"Char %d: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca [17 x i8]
store i32 0, i32* %1
store i32 42, i32* %2
store float 0x400921FB00000000, float* %4
%6 = bitcast [17 x i8]* %5 to i8*
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32* %2, float* %4)
store i32 0, i32* %3
br label %8
8: ; preds = %17, %0
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 17
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [17 x i8], [17 x i8]* %5, i64 0, i64 %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %12, i8* %15)
br label %17
17: ; preds = %11
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %8
20: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@__const.main.c = [17 x i8] c"Hello World!\00\00\00\00\00"
@.str = [38 x i8] c"LOCAL VAR ADDRESSES:\0Aa -> %p\0Ab -> %p\0A\00"
@.str.1 = [13 x i8] c"Char %d: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca [17 x i8]
%4 = bitcast i32* %1 to i8*
store i32 42, i32* %1
%5 = bitcast float* %2 to i8*
store float 0x400921FB00000000, float* %2
%6 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32* %1, float* %2)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 0, i8* %6)
%9 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 1
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 1, i8* %9)
%11 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 2
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %11)
%13 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 3
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 3, i8* %13)
%15 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 4
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 4, i8* %15)
%17 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 5
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 5, i8* %17)
%19 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 6
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 6, i8* %19)
%21 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 7
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 7, i8* %21)
%23 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 8
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 8, i8* %23)
%25 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 9
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 9, i8* %25)
%27 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 10
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 10, i8* %27)
%29 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 11
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 11, i8* %29)
%31 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 12
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 12, i8* %31)
%33 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 13
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 13, i8* %33)
%35 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 14
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 14, i8* %35)
%37 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 15
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 15, i8* %37)
%39 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 16
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 16, i8* %39)
ret i32 0
}