int main(void) {
  int a;
  int *ptra, *aptra;
  int **ptrptra;
  a = 5;
  ptra = &a;
  ptrptra = &ptra;
  aptra = &a;
  printf(" %d %d %d \n", a, *ptra, **ptrptra);
  printf(" %x %x", (unsigned long)ptra, (unsigned long)*ptrptra);
  *ptra = fact(5);
  printf(" %x\n", ptra);
  printf(" sizeof( long long ) is %d\n", sizeof(long long));
  printf(" sizeof( long long int ) is %d\n", sizeof(long long int));
  printf(" sizeof( long double ) is %d\n", sizeof(long double));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rax
mov    (%rax),%rdx
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x0,%al
call   1040 <fact@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rsi
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe64(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6d(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x10,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x5,0xc(%rsp)
lea    0xecc(%rip),%rdi
mov    $0x5,%esi
mov    $0x5,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x5,%edi
xor    %eax,%eax
call   1040 <fact@plt>
mov    %eax,0xc(%rsp)
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe96(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c" %d %d %d \0A\00"
@.str.1 = [7 x i8] c" %x %x\00"
@.str.2 = [5 x i8] c" %x\0A\00"
@.str.3 = [28 x i8] c" sizeof( long long ) is %d\0A\00"
@.str.4 = [32 x i8] c" sizeof( long long int ) is %d\0A\00"
@.str.5 = [30 x i8] c" sizeof( long double ) is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32**
store i32 0, i32* %1
store i32 5, i32* %2
store i32* %2, i32** %3
store i32** %3, i32*** %5
store i32* %2, i32** %4
%6 = load i32, i32* %2
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = load i32**, i32*** %5
%10 = load i32*, i32** %9
%11 = load i32, i32* %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8, i32 %11)
%13 = load i32*, i32** %3
%14 = ptrtoint i32* %13 to i64
%15 = load i32**, i32*** %5
%16 = load i32*, i32** %15
%17 = ptrtoint i32* %16 to i64
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 %14, i64 %17)
%19 = call i32 (i32, ...) bitcast (i32 (...)* @fact to i32 (i32, ...)*)(i32 5)
%20 = load i32*, i32** %3
store i32 %19, i32* %20
%21 = load i32*, i32** %3
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32* %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i64 8)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i64 8)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i64 16)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c" %d %d %d \0A\00"
@.str.1 = [7 x i8] c" %x %x\00"
@.str.2 = [5 x i8] c" %x\0A\00"
@.str.3 = [28 x i8] c" sizeof( long long ) is %d\0A\00"
@.str.4 = [32 x i8] c" sizeof( long long int ) is %d\0A\00"
@.str.5 = [30 x i8] c" sizeof( long double ) is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 5, i32 5, i32 5)
%4 = ptrtoint i32* %1 to i64
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i64 %4, i64 %4)
%6 = call i32 (i32, ...) bitcast (i32 (...)* @fact to i32 (i32, ...)*)(i32 5)
store i32 %6, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i64 8)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i64 8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i64 16)
ret i32 0
}