int main() {
  int a = 1;
  char b = 'a';
  float c = 1.3;
  long d = 10;
  printf("nome | indirizzo  | dim.    | valore\n");
  printf("---------------------------------------\n");
  printf("  a  | %d | %lu bytes | %d\n", &a, sizeof(a), a);
  printf("  b  | %d | %lu bytes | %c\n", &b, sizeof(b), b);
  printf("  c  | %d | %lu bytes | %f\n", &c, sizeof(c), c);
  printf("  d  | %d | %lu bytes | %lu\n", &d, sizeof(d), d);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movb   $0x61,-0x9(%rbp)
movss  0xece(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movq   $0xa,-0x18(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%ecx
lea    0xeee(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x9(%rbp),%ecx
lea    0xeef(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeeb(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x4,%edx
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rcx
lea    0xeec(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x1,0xc(%rsp)
movb   $0x61,0x7(%rsp)
movl   $0x3fa66666,0x8(%rsp)
3f
movq   $0xa,0x10(%rsp)
lea    0xf30(%rip),%rdi
call   1030 <puts@plt>
lea    0xf49(%rip),%rdi
call   1030 <puts@plt>
lea    0xea7(%rip),%rdi
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea6(%rip),%rdi
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
mov    $0x61,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea5(%rip),%rdi
lea    0x8(%rsp),%rsi
movsd  0xe58(%rip),%xmm0
mov    $0x4,%edx
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xea1(%rip),%rdi
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
mov    $0xa,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"nome | indirizzo | dim. | valore\0A\00"
@.str.1 = [41 x i8] c"---------------------------------------\0A\00"
@.str.2 = [28 x i8] c" a | %d | %lu bytes | %d\0A\00"
@.str.3 = [28 x i8] c" b | %d | %lu bytes | %c\0A\00"
@.str.4 = [28 x i8] c" c | %d | %lu bytes | %f\0A\00"
@.str.5 = [29 x i8] c" d | %d | %lu bytes | %lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca float
%5 = alloca i64
store i32 0, i32* %1
store i32 1, i32* %2
store i8 97, i8* %3
store float 0x3FF4CCCCC0000000, float* %4
store i64 10, i64* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32* %2, i64 4, i32 %8)
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* %3, i64 1, i32 %11)
%13 = load float, float* %4
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), float* %4, i64 4, double %14)
%16 = load i64, i64* %5
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i64* %5, i64 8, i64 %16)
ret i32 1
}

LLVM IR (-O2):
@.str.2 = [28 x i8] c" a | %d | %lu bytes | %d\0A\00"
@.str.3 = [28 x i8] c" b | %d | %lu bytes | %c\0A\00"
@.str.4 = [28 x i8] c" c | %d | %lu bytes | %f\0A\00"
@.str.5 = [29 x i8] c" d | %d | %lu bytes | %lu\0A\00"
@str = [37 x i8] c"nome | indirizzo | dim. | valore\00"
@str.6 = [40 x i8] c"---------------------------------------\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca float
%4 = alloca i64
%5 = bitcast i32* %1 to i8*
store i32 1, i32* %1
store i8 97, i8* %2
%6 = bitcast float* %3 to i8*
store float 0x3FF4CCCCC0000000, float* %3
%7 = bitcast i64* %4 to i8*
store i64 10, i64* %4
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.6, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32* %1, i64 4, i32 1)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* %2, i64 1, i32 97)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), float* %3, i64 4, double 0x3FF4CCCCC0000000)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i64* %4, i64 8, i64 10)
ret i32 1
}