#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*/ fprintf(int /*<<< orphan*/, char *, float);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  double d1, d2, d3;
  float f1, f2, f3;
  d1 = 15.67789;
  d2 = 59.8465;
  d3 = d1 * d2;
  fprintf(stdout, "d3 = %g\n", d3);
  f1 = 5.268;
  f2 = 8.547;
  f3 = f1 / f2;
  fprintf(stdout, "f3 = %g\n", f3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
movsd  -0x28(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
movss  0xe8f(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xe7e(%rip),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x2c(%rbp),%xmm0
divss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
movss  -0x34(%rbp),%xmm0
lea    0xe76(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xee7(%rip),%rsi
movss  0xed7(%rip),%xmm0
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeda(%rip),%rsi
movss  0xec5(%rip),%xmm0
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [9 x i8] c"d3 = %g\0A\00"
@.str.1 = [9 x i8] c"f3 = %g\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca float
%10 = alloca float
%11 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 0x402F5B1465E89225, double* %6
store double 0x404DEC5A1CAC0831, double* %7
%12 = load double, double* %6
%13 = load double, double* %7
%14 = fmul double %12, %13
store double %14, double* %8
%15 = load i32, i32* @stdout
%16 = load double, double* %8
%17 = fptrunc double %16 to float
%18 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %17)
store float 0x4015126EA0000000, float* %9
store float 0x4021181060000000, float* %10
%19 = load float, float* %9
%20 = load float, float* %10
%21 = fdiv float %19, %20
store float %21, float* %11
%22 = load i32, i32* @stdout
%23 = load float, float* %11
%24 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float %23)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [9 x i8] c"d3 = %g\0A\00"
@.str.1 = [9 x i8] c"f3 = %g\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float 0x408D522280000000)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float 0x3FE3B93180000000)
ret i32 0
}