#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(void) {
  int size_char = sizeof(char);
  int size_int = sizeof(int);
  int size_long = sizeof(long);
  int size_long_long = sizeof(long long);
  int size_float = sizeof(float);
  printf("Size of a char: %d byte(s)\n", size_char);
  printf("Size of an int: %d byte(s)\n", size_int);
  printf("Size of a long int: %d byte(s)\n", size_long);
  printf("Size of a long long int: %d byte(s)\n", size_long_long);
  printf("Size of a float: %d byte(s)\n", size_float);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
movl   $0x8,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [28 x i8] c"Size of a char: %d byte(s)\0A\00"
@.str.1 = [28 x i8] c"Size of an int: %d byte(s)\0A\00"
@.str.2 = [32 x i8] c"Size of a long int: %d byte(s)\0A\00"
@.str.3 = [37 x i8] c"Size of a long long int: %d byte(s)\0A\00"
@.str.4 = [29 x i8] c"Size of a float: %d byte(s)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 4, i32* %3
store i32 8, i32* %4
store i32 8, i32* %5
store i32 4, i32* %6
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %5
%14 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"Size of a char: %d byte(s)\0A\00"
@.str.1 = [28 x i8] c"Size of an int: %d byte(s)\0A\00"
@.str.2 = [32 x i8] c"Size of a long int: %d byte(s)\0A\00"
@.str.3 = [37 x i8] c"Size of a long long int: %d byte(s)\0A\00"
@.str.4 = [29 x i8] c"Size of a float: %d byte(s)\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 8)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i32 4)
ret i32 0
}