#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 /*<<< orphan*/ vymen(double *, double *);
int main() {
  double x = 1.5;
  double y = 3.3;
  printf("X=%lf @ %p\n", x, &x);
  printf("Y=%lf @ %p\n", y, &y);
  vymen(&x, &y);
  printf("X=%lf\n", x);
  printf("Y=%lf\n", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xebb(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xeb0(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1040 <printf@plt>
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <vymen@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xe98(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movabs $0x3ff8000000000000,%rax
mov    %rax,0x10(%rsp)
movabs $0x400a666666666666,%rax
66 0a 40
mov    %rax,0x8(%rsp)
lea    0xec4(%rip),%rdi
movsd  0xeac(%rip),%xmm0
lea    0x10(%rsp),%r14
mov    %r14,%rsi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeb2(%rip),%rdi
movsd  0xe96(%rip),%xmm0
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <vymen@plt>
movsd  0x10(%rsp),%xmm0
lea    0xe8f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
lea    0xe82(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"X=%lf @ %p\0A\00"
@.str.1 = [12 x i8] c"Y=%lf @ %p\0A\00"
@.str.2 = [7 x i8] c"X=%lf\0A\00"
@.str.3 = [7 x i8] c"Y=%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 1.500000e+00, double* %2
store double 3.300000e+00, double* %3
%4 = load double, double* %2
%5 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double %4, double* %2)
%6 = load double, double* %3
%7 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double %6, double* %3)
%8 = call i32 @vymen(double* %2, double* %3)
%9 = load double, double* %2
%10 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %9)
%11 = load double, double* %3
%12 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"X=%lf @ %p\0A\00"
@.str.1 = [12 x i8] c"Y=%lf @ %p\0A\00"
@.str.2 = [7 x i8] c"X=%lf\0A\00"
@.str.3 = [7 x i8] c"Y=%lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
store double 1.500000e+00, double* %1
%4 = bitcast double* %2 to i8*
store double 3.300000e+00, double* %2
%5 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double 1.500000e+00, double* %1)
%6 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double 3.300000e+00, double* %2)
%7 = call i32 @vymen(double* %1, double* %2)
%8 = load double, double* %1
%9 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %8)
%10 = load double, double* %2
%11 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), double %10)
ret i32 0
}