#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 *, float);
int main() {
  float f1;
  float f2;
  double d1;
  double d2;
  f1 = 2.333f;
  f2 = 33.3f;
  d1 = 1.23456789;
  d2 = 2.3456789;
  printf("lf\n", f1 + f2);
  printf("lf\n", d1 / d2);
  printf("lf\n", f1 * d1);
  printf("lf\n", f2 - d2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xeed(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xedc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movsd  0xec7(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb2(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  -0x20(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef8(%rip),%rbx
movss  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xed4(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xec8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xebc(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
store float 0x4002A9FBE0000000, float* %2
store float 0x4040A66660000000, float* %3
store double 0x3FF3C0CA4283DE1B, double* %4
store double 0x4002C3F34C935689, double* %5
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fadd float %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %8)
%10 = load double, double* %4
%11 = load double, double* %5
%12 = fdiv double %10, %11
%13 = fptrunc double %12 to float
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %13)
%15 = load float, float* %2
%16 = fpext float %15 to double
%17 = load double, double* %4
%18 = fmul double %16, %17
%19 = fptrunc double %18 to float
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %19)
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = load double, double* %5
%24 = fsub double %22, %23
%25 = fptrunc double %24 to float
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"lf\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 0x4041D10620000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 0x3FE0D79440000000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 0x40070ABEE0000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 0x403EF44E60000000)
ret i32 0
}