#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 *, double, ...);
int main() {
  int i, *ptr1 = &i;
  char c, *ptr2 = &c;
  float f, *ptr3 = &f;
  double d, *ptr4 = &d;
  i = 10;
  c = 'A';
  f = 10.5;
  d = 11.6;
  printf("The address of i:%d is %p. value:%d\n", i, &ptr1, *ptr1);
  printf("The addres of c:%c is %p. value:%c\n", c, &ptr2, *ptr2);
  printf("The address of f:%f is %p. value:%f\n", f, &ptr3, *ptr3);
  printf("The address of d:%f is %p. value:%f\n", d, &ptr4, *ptr4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x11(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x24(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    -0x38(%rbp),%rax
mov    %rax,-0x40(%rbp)
movl   $0xa,-0x8(%rbp)
movb   $0x41,-0x11(%rbp)
movl   $0x41280000,-0x24(%rbp)
movabs $0x4027333333333333,%rax
33 27 40
mov    %rax,-0x38(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xe8f(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsbl (%rax),%edx
lea    0xe93(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe90(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x38(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm1
lea    0xe96(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
lea    0xc(%rsp),%rax
mov    %rax,0x30(%rsp)
lea    0x7(%rsp),%rax
mov    %rax,0x28(%rsp)
lea    0x8(%rsp),%rax
mov    %rax,0x20(%rsp)
lea    0x10(%rsp),%rax
mov    %rax,0x18(%rsp)
movl   $0xa,0xc(%rsp)
movb   $0x41,0x7(%rsp)
movl   $0x41280000,0x8(%rsp)
41
movabs $0x4027333333333333,%rax
33 27 40
mov    %rax,0x10(%rsp)
lea    0xea1(%rip),%rdi
movsd  0xe91(%rip),%xmm0
lea    0x30(%rsp),%rsi
mov    $0xa,%edx
mov    $0x1,%al
call   1030 <printf@plt>
movsbl 0x7(%rsp),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
lea    0xe9a(%rip),%rdi
lea    0x28(%rsp),%rsi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xea1(%rip),%rdi
lea    0x20(%rsp),%rsi
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
movsd  0x10(%rsp),%xmm0
lea    0xeaa(%rip),%rdi
lea    0x18(%rsp),%rsi
movaps %xmm0,%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"The address of i:%d is %p. value:%d\0A\00"
@.str.1 = [36 x i8] c"The addres of c:%c is %p. value:%c\0A\00"
@.str.2 = [37 x i8] c"The address of f:%f is %p. value:%f\0A\00"
@.str.3 = [37 x i8] c"The address of d:%f is %p. value:%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i8
%5 = alloca i8*
%6 = alloca float
%7 = alloca float*
%8 = alloca double
%9 = alloca double*
store i32 0, i32* %1
store i32* %2, i32** %3
store i8* %4, i8** %5
store float* %6, float** %7
store double* %8, double** %9
store i32 10, i32* %2
store i8 65, i8* %4
store float 1.050000e+01, float* %6
store double 1.160000e+01, double* %8
%10 = load i32, i32* %2
%11 = sitofp i32 %10 to double
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double %11, i32** %3, i32 %13)
%15 = load i8, i8* %4
%16 = sitofp i8 %15 to double
%17 = load i8*, i8** %5
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), double %16, i8** %5, i32 %19)
%21 = load float, float* %6
%22 = fpext float %21 to double
%23 = load float*, float** %7
%24 = load float, float* %23
%25 = fpext float %24 to double
%26 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), double %22, float** %7, double %25)
%27 = load double, double* %8
%28 = load double*, double** %9
%29 = load double, double* %28
%30 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), double %27, double** %9, double %29)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"The address of i:%d is %p. value:%d\0A\00"
@.str.1 = [36 x i8] c"The addres of c:%c is %p. value:%c\0A\00"
@.str.2 = [37 x i8] c"The address of f:%f is %p. value:%f\0A\00"
@.str.3 = [37 x i8] c"The address of d:%f is %p. value:%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8*
%5 = alloca float
%6 = alloca float*
%7 = alloca double
%8 = alloca double*
%9 = bitcast i32* %1 to i8*
%10 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%11 = bitcast i8** %4 to i8*
store i8* %3, i8** %4
%12 = bitcast float* %5 to i8*
%13 = bitcast float** %6 to i8*
store float* %5, float** %6
%14 = bitcast double* %7 to i8*
%15 = bitcast double** %8 to i8*
store double* %7, double** %8
store i32 10, i32* %1
store i8 65, i8* %3
store float 1.050000e+01, float* %5
store double 1.160000e+01, double* %7
%16 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), double 1.000000e+01, i32** %2, i32 10)
%17 = load i8, i8* %3
%18 = sitofp i8 %17 to double
%19 = sext i8 %17 to i32
%20 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), double %18, i8** %4, i32 %19)
%21 = load float, float* %5
%22 = fpext float %21 to double
%23 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), double %22, float** %6, double %22)
%24 = load double, double* %7
%25 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), double %24, double** %8, double %24)
ret i32 0
}