int main(void) {
  volatile double d;
  volatile float f;
  double *dp = malloc(sizeof(double));
  float *fp = malloc(sizeof(float));
  int *ip = (int *)0x1234567;
  d += 1.0;
  f += 10.0;
  *dp += (d > 0.1 ? 2.0 : 3.0);
  *fp += (f > 0.1 ? 20.0 : 21.0);
  free(dp);
  free(fp);
  *dp += 3.0;
  *fp += 30.0;
  free(ip);
  ip = malloc(sizeof(int));
  *((double *)ip) = 1.2 + d;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x1234567,%eax
mov    %rax,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xedf(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebd(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xe9b(%rip),%xmm3
movsd  0xe73(%rip),%xmm2
movsd  0xe83(%rip),%xmm0
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe42(%rip),%xmm3
movsd  0xe42(%rip),%xmm2
movsd  0xe42(%rip),%xmm1
cmpltsd %xmm0,%xmm1
movaps %xmm1,%xmm0
andpd  %xmm3,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
movsd  0xde0(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdbc(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xd84(%rip),%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movsd  0x10(%rsp),%xmm0
addsd  0xede(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
addss  0xed2(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
movsd  0x10(%rsp),%xmm0
movss  0xc(%rsp),%xmm0
mov    $0x1234567,%edi
call   1030 <free@plt>
movsd  0x10(%rsp),%xmm0
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca float
%4 = alloca double*
%5 = alloca float*
%6 = alloca i32*
store i32 0, i32* %1
%7 = call i8* @malloc(i64 8)
%8 = bitcast i8* %7 to double*
store double* %8, double** %4
%9 = call i8* @malloc(i64 4)
%10 = bitcast i8* %9 to float*
store float* %10, float** %5
store i32* inttoptr (i64 19088743 to i32*), i32** %6
%11 = load volatile double, double* %2
%12 = fadd double %11, 1.000000e+00
store volatile double %12, double* %2
%13 = load volatile float, float* %3
%14 = fpext float %13 to double
%15 = fadd double %14, 1.000000e+01
%16 = fptrunc double %15 to float
store volatile float %16, float* %3
%17 = load volatile double, double* %2
%18 = fcmp ogt double %17, 1.000000e-01
%19 = zext i1 %18 to i64
%20 = select i1 %18, double 2.000000e+00, double 3.000000e+00
%21 = load double*, double** %4
%22 = load double, double* %21
%23 = fadd double %22, %20
store double %23, double* %21
%24 = load volatile float, float* %3
%25 = fpext float %24 to double
%26 = fcmp ogt double %25, 1.000000e-01
%27 = zext i1 %26 to i64
%28 = select i1 %26, double 2.000000e+01, double 2.100000e+01
%29 = load float*, float** %5
%30 = load float, float* %29
%31 = fpext float %30 to double
%32 = fadd double %31, %28
%33 = fptrunc double %32 to float
store float %33, float* %29
%34 = load double*, double** %4
%35 = bitcast double* %34 to i8*
%36 = load float*, float** %5
%37 = bitcast float* %36 to i8*
%38 = load double*, double** %4
%39 = load double, double* %38
%40 = fadd double %39, 3.000000e+00
store double %40, double* %38
%41 = load float*, float** %5
%42 = load float, float* %41
%43 = fpext float %42 to double
%44 = fadd double %43, 3.000000e+01
%45 = fptrunc double %44 to float
store float %45, float* %41
%46 = load i32*, i32** %6
%47 = bitcast i32* %46 to i8*
%48 = call i8* @malloc(i64 4)
%49 = bitcast i8* %48 to i32*
store i32* %49, i32** %6
%50 = load volatile double, double* %2
%51 = fadd double 1.200000e+00, %50
%52 = load i32*, i32** %6
%53 = bitcast i32* %52 to double*
store double %51, double* %53
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca double
%2 = alloca float
%3 = bitcast double* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = load volatile double, double* %1
%6 = fadd double %5, 1.000000e+00
store volatile double %6, double* %1
%7 = load volatile float, float* %2
%8 = fadd float %7, 1.000000e+01
store volatile float %8, float* %2
%9 = load volatile double, double* %1
%10 = load volatile float, float* %2
tail call void @free(i8* inttoptr (i64 19088743 to i8*))
%11 = load volatile double, double* %1
ret i32 0
}