#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(int argc, const char *argv[]) {
  int i = 17;
  int *addressOfI = &i;
  printf("i stores ites values at %p.\n", addressOfI);
  printf("this function starts at %p.\n", main);
  printf("The int stored at addressOfI is %d.\n", *addressOfI);
  *addressOfI = 89;
  printf("Now i is %d.\n", i);
  printf("An int is %zu bytes.\n", sizeof(int));
  printf("A pointer is %zu bytes.\n", sizeof(int *));
  printf("short \t int \t long \t longlong \t float \t double\n");
  printf("%zu \t\t %zu \t\t %zu \t\t %zu \t\t\t %zu \t\t %zu\n", sizeof(short),
         sizeof(int), sizeof(long), sizeof(long long), sizeof(float),
         sizeof(double));
  printf("The NULL starts at %p.\n", NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x11,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    0x2e93(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
movl   $0x59,(%rax)
mov    -0x14(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x2,%esi
mov    $0x4,%r9d
mov    $0x8,%r8d
mov    %r9,%rdx
mov    %r8,%rcx
movq   $0x8,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x11,0x14(%rsp)
lea    0xecd(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
mov    0x2e9b(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x59,0x14(%rsp)
lea    0xeea(%rip),%rdi
mov    $0x59,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
movq   $0x8,(%rsp)
lea    0xeda(%rip),%rdi
mov    $0x2,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
mov    $0x8,%r8d
mov    $0x4,%r9d
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"i stores ites values at %p.\0A\00"
@.str.1 = [29 x i8] c"this function starts at %p.\0A\00"
@.str.2 = [37 x i8] c"The int stored at addressOfI is %d.\0A\00"
@.str.3 = [14 x i8] c"Now i is %d.\0A\00"
@.str.4 = [22 x i8] c"An int is %zu bytes.\0A\00"
@.str.5 = [25 x i8] c"A pointer is %zu bytes.\0A\00"
@.str.6 = [48 x i8] c"short \09 int \09 long \09 longlong \09 float \09 double\0A\00"
@.str.7 = [41 x i8] c"%zu \09\09 %zu \09\09 %zu \09\09 %zu \09\09\09 %zu \09\09 %zu\0A\00"
@.str.8 = [24 x i8] c"The NULL starts at %p.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 17, i32* %6
store i32* %6, i32** %7
%8 = load i32*, i32** %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 (i32, i8**)* @main)
%11 = load i32*, i32** %7
%12 = load i32, i32* %11
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = load i32*, i32** %7
store i32 89, i32* %14
%15 = load i32, i32* %6
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i64 4)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i64 8)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i64 2, i64 4, i64 8, i64 8, i64 4, i64 8)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"i stores ites values at %p.\0A\00"
@.str.1 = [29 x i8] c"this function starts at %p.\0A\00"
@.str.2 = [37 x i8] c"The int stored at addressOfI is %d.\0A\00"
@.str.3 = [14 x i8] c"Now i is %d.\0A\00"
@.str.4 = [22 x i8] c"An int is %zu bytes.\0A\00"
@.str.5 = [25 x i8] c"A pointer is %zu bytes.\0A\00"
@.str.7 = [41 x i8] c"%zu \09\09 %zu \09\09 %zu \09\09 %zu \09\09\09 %zu \09\09 %zu\0A\00"
@.str.8 = [24 x i8] c"The NULL starts at %p.\0A\00"
@str = [47 x i8] c"short \09 int \09 long \09 longlong \09 float \09 double\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 17, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 (i32, i8**)* @main)
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %7)
store i32 89, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 89)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i64 4)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i64 8)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i64 2, i64 4, i64 8, i64 8, i64 4, i64 8)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i8* null)
ret i32 0
}