#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 */
typedef int /*<<< orphan*/ t;
typedef int /*<<< orphan*/ p;

/* Variables and functions */
int /*<<< orphan*/ fun(char *, unsigned int *);
int /*<<< orphan*/ printf(char *, int, ...);
int main(int argc, char *argv[]) {
  char t[40];
  unsigned int *p[10];
  int var;
  void *ptr;
  ptr = &var;
  *(int *)ptr = 5;
  printf("var=%d and *ptr=%d", var, *(int *)ptr);
  fun(t, p[0]);
  printf("sizeof(int):%ld\n", sizeof(int));
  printf("sizeof t, as in t[40] is :%ld\n", sizeof(t));
  printf("sizeof p, as in p[10] is :%ld\n", sizeof(p));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x94(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x94(%rbp),%esi
mov    -0xa0(%rbp),%rax
mov    (%rax),%edx
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x40(%rbp),%rdi
mov    -0x90(%rbp),%rsi
call   1030 <fun@plt>
lea    0xe92(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x28,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    $0x50,%esi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
mov    $0x5,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rdi
call   1030 <fun@plt>
lea    0xec8(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x28,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x50,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"var=%d and *ptr=%d\00"
@.str.1 = [17 x i8] c"sizeof(int):%ld\0A\00"
@.str.2 = [31 x i8] c"sizeof t, as in t[40] is :%ld\0A\00"
@.str.3 = [31 x i8] c"sizeof p, as in p[10] is :%ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [40 x i8]
%6 = alloca [10 x i32*]
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = bitcast i32* %7 to i8*
store i8* %9, i8** %8
%10 = load i8*, i8** %8
%11 = bitcast i8* %10 to i32*
store i32 5, i32* %11
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = bitcast i8* %13 to i32*
%15 = load i32, i32* %14
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %15)
%17 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%18 = getelementptr inbounds [10 x i32*], [10 x i32*]* %6, i64 0, i64 0
%19 = load i32*, i32** %18
%20 = call i32 @fun(i8* %17, i32* %19)
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 4)
%22 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 40)
%23 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 80)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"var=%d and *ptr=%d\00"
@.str.1 = [17 x i8] c"sizeof(int):%ld\0A\00"
@.str.2 = [31 x i8] c"sizeof t, as in t[40] is :%ld\0A\00"
@.str.3 = [31 x i8] c"sizeof p, as in p[10] is :%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [40 x i8]
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 5, i32 5)
%6 = call i32 @fun(i8* %4, i32* undef)
%7 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 4)
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 40)
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 80)
ret i32 0
}