#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 *, ...);
void conversioni(void) {
  double x = 6.9, *px;
  int *y;
  px = &x;
  y = (int *)&x;
  printf("%e\n", x);
  printf("%p\t%p\n", px, y);
  printf("%d\t%p\n", *y, y);
}


x86 assembly (clang, -O0):
<conversioni>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xec7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rdx
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conversioni>:
push   %rbx
sub    $0x10,%rsp
movabs $0x401b99999999999a,%rax
99 1b 40
mov    %rax,0x8(%rsp)
lea    0xedd(%rip),%rdi
movsd  0xecd(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
lea    0xeb5(%rip),%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%e\0A\00"
@.str.1 = [7 x i8] c"%p\09%p\0A\00"
@.str.2 = [7 x i8] c"%d\09%p\0A\00"
define void @conversioni() {
%1 = alloca double
%2 = alloca double*
%3 = alloca i32*
store double 6.900000e+00, double* %1
store double* %1, double** %2
%4 = bitcast double* %1 to i32*
store i32* %4, i32** %3
%5 = load double, double* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %5)
%7 = load double*, double** %2
%8 = load i32*, i32** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %7, i32* %8)
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
%12 = load i32*, i32** %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32* %12)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%e\0A\00"
@.str.1 = [7 x i8] c"%p\09%p\0A\00"
@.str.2 = [7 x i8] c"%d\09%p\0A\00"
define void @conversioni() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 6.900000e+00, double* %1
%3 = bitcast double* %1 to i32*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 6.900000e+00)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %1)
%6 = load i32, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %6, double* %1)
ret void
}