#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 *, long, ...);
int main(int argc, const char *argv[]) {
  char c = 'a';
  int i = 100;
  double d = 2.5;
  long l = 999;
  printf("char = %c  %p \n", c, &c);
  printf("int = %d  %p \n", i, &i);
  printf("double = %e  %p \n", d, &d);
  printf("long = %ld  %p \n", l, &l);
  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)
movb   $0x61,-0x11(%rbp)
movl   $0x64,-0x18(%rbp)
movsd  0xec7(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movq   $0x3e7,-0x28(%rbp)
movsbq -0x11(%rbp),%rsi
lea    0xeb6(%rip),%rdi
lea    -0x11(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x18(%rbp),%rsi
lea    0xeb0(%rip),%rdi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
cvttsd2si -0x20(%rbp),%rsi
lea    0xea7(%rip),%rdi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xea3(%rip),%rdi
lea    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x61,0x3(%rsp)
movl   $0x64,0x4(%rsp)
movabs $0x4004000000000000,%rax
mov    %rax,0x10(%rsp)
movq   $0x3e7,0x8(%rsp)
lea    0xec0(%rip),%rdi
lea    0x3(%rsp),%rdx
mov    $0x61,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rdx
mov    $0x64,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    0x10(%rsp),%rdx
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea9(%rip),%rdi
lea    0x8(%rsp),%rdx
mov    $0x3e7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"char = %c %p \0A\00"
@.str.1 = [15 x i8] c"int = %d %p \0A\00"
@.str.2 = [18 x i8] c"double = %e %p \0A\00"
@.str.3 = [17 x i8] c"long = %ld %p \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i32
%8 = alloca double
%9 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 97, i8* %6
store i32 100, i32* %7
store double 2.500000e+00, double* %8
store i64 999, i64* %9
%10 = load i8, i8* %6
%11 = sext i8 %10 to i64
%12 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %11, i8* %6)
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 %14, i32* %7)
%16 = load double, double* %8
%17 = fptosi double %16 to i64
%18 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i64 %17, double* %8)
%19 = load i64, i64* %9
%20 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i64 %19, i64* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"char = %c %p \0A\00"
@.str.1 = [15 x i8] c"int = %d %p \0A\00"
@.str.2 = [18 x i8] c"double = %e %p \0A\00"
@.str.3 = [17 x i8] c"long = %ld %p \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = alloca i32
%5 = alloca double
%6 = alloca i64
store i8 97, i8* %3
%7 = bitcast i32* %4 to i8*
store i32 100, i32* %4
%8 = bitcast double* %5 to i8*
store double 2.500000e+00, double* %5
%9 = bitcast i64* %6 to i8*
store i64 999, i64* %6
%10 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 97, i8* %3)
%11 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 100, i32* %4)
%12 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i64 2, double* %5)
%13 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i64 999, i64* %6)
ret i32 0
}