#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);
int main(int argc, char **argv) {
  int integer;
  double double_var;
  char c;
  printf("Size of int is    : %d\n",
         (char *)(&integer + 1) - (char *)(&integer));
  printf("Size of double is : %d\n",
         (char *)(&double_var + 1) - (char *)(&double_var));
  printf("Size of char is    : %d\n", (char *)(&c + 1) - (char *)(&c));
  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)
lea    -0x14(%rbp),%rax
add    $0x4,%rax
lea    -0x14(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rax
add    $0x8,%rax
lea    -0x20(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    -0x21(%rbp),%rax
add    $0x1,%rax
lea    -0x21(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"Size of int is : %d\0A\00"
@.str.1 = [24 x i8] c"Size of double is : %d\0A\00"
@.str.2 = [25 x i8] c"Size of char is : %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 0
}