int main() {
  int a = 5;
  int i = 0;
  int *p;
  int *arr[10];
  char *strings[10];
  printf("a = %d;\n", a);
  p = &a;
  printf("a = %d;\n", a);
  printf("* p = %d;\n", *p);
  for (i = 0; i < 10; i++) {
    *arr = i;
    printf("i = %d; * arr = %d;\n", i, *arr);
    (*arr)++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11b6 <main+0xa6>
movslq -0xc(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x70(%rbp),%rdx
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x70(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x70(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1175 <main+0x65>
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x2,%edx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x3,%edx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x4,%edx
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x5,%edx
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x6,%edx
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x7,%edx
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x8,%edx
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x9,%edx
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"a = %d;\0A\00"
@.str.1 = [11 x i8] c"* p = %d;\0A\00"
@.str.2 = [21 x i8] c"i = %d; * arr = %d;\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 5)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 5)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 0, i32* null)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 1, i32* inttoptr (i64 1 to i32*))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 2, i32* inttoptr (i64 2 to i32*))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 3, i32* inttoptr (i64 3 to i32*))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 4, i32* inttoptr (i64 4 to i32*))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 5, i32* inttoptr (i64 5 to i32*))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 6, i32* inttoptr (i64 6 to i32*))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 7, i32* inttoptr (i64 7 to i32*))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 8, i32* inttoptr (i64 8 to i32*))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 9, i32* inttoptr (i64 9 to i32*))
ret i32 0
}