#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 const);
void Temperatures(const double fahr) {
  double c, k;
  c = 5.0 / 9.0 * (fahr - 32.0);
  k = c + 273.16;
  printf("Fahrenheit Temperature = %.2f ℉\n", fahr);
  printf("Celsius Temperature = %.2f ℃\n", c);
  printf("Kelvin Temperature = %.2f K\n", k);
}


x86 assembly (clang, -O0):
<Temperatures>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xee6(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb9(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Temperatures>:
sub    $0x18,%rsp
movsd  0xee4(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  0xee0(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0xeda(%rip),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
movsd  0x8(%rsp),%xmm0
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Fahrenheit Temperature = %.2f \E2\84\89\0A\00"
@.str.1 = [32 x i8] c"Celsius Temperature = %.2f \E2\84\83\0A\00"
@.str.2 = [29 x i8] c"Kelvin Temperature = %.2f K\0A\00"
define void @Temperatures(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 0x3FE1C71C71C71C72, %6
store double %7, double* %3
%8 = load double, double* %3
%9 = fadd double %8, 2.731600e+02
store double %9, double* %4
%10 = load double, double* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), double %10)
%12 = load double, double* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), double %12)
%14 = load double, double* %4
%15 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %14)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Fahrenheit Temperature = %.2f \E2\84\89\0A\00"
@.str.1 = [32 x i8] c"Celsius Temperature = %.2f \E2\84\83\0A\00"
@.str.2 = [29 x i8] c"Kelvin Temperature = %.2f K\0A\00"
define void @Temperatures(double %0) {
%2 = fadd double %0, -3.200000e+01
%3 = fmul double %2, 0x3FE1C71C71C71C72
%4 = fadd double %3, 2.731600e+02
%5 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), double %0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), double %3)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %4)
ret void
}