#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 */
double convertToFahrenheit(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *, int *);
int main(void) {
  int minutes;
  double hours, temperature;
  printf("Please enter the time in whole hours and minutes (HH MM) > ");
  scanf("%lf %d", &hours, &minutes);
  hours = hours + (minutes / 60.0);
  temperature = (4 * (hours * hours)) / (hours + 2) - 20;
  printf("After %.2f hours, the temperature in the freezer will be %.3f °C, or "
         "%.3f °F \n",
         hours, temperature, convertToFahrenheit(temperature));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xea5(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xe7e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe6a(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe51(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <convertToFahrenheit@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
lea    0xe79(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1050 <scanf@plt>
cvtsi2sdl 0xc(%rsp),%xmm1
divsd  0xe9a(%rip),%xmm1
addsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xe80(%rip),%xmm0
movsd  0xe80(%rip),%xmm2
addsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
addsd  0xe78(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
call   1040 <convertToFahrenheit@plt>
movapd %xmm0,%xmm2
lea    0xead(%rip),%rdi
movsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [60 x i8] c"Please enter the time in whole hours and minutes (HH MM) > \00"
@.str.1 = [7 x i8] c"%lf %d\00"
@.str.2 = [81 x i8] c"After %.2f hours, the temperature in the freezer will be %.3f \C2\B0C, or %.3f \C2\B0F \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %3, i32* %2)
%7 = load double, double* %3
%8 = load i32, i32* %2
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 6.000000e+01
%11 = fadd double %7, %10
store double %11, double* %3
%12 = load double, double* %3
%13 = load double, double* %3
%14 = fmul double %12, %13
%15 = fmul double 4.000000e+00, %14
%16 = load double, double* %3
%17 = fadd double %16, 2.000000e+00
%18 = fdiv double %15, %17
%19 = fsub double %18, 2.000000e+01
store double %19, double* %4
%20 = load double, double* %3
%21 = load double, double* %4
%22 = load double, double* %4
%23 = call double @convertToFahrenheit(double %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0), double %20, double %21, double %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [60 x i8] c"Please enter the time in whole hours and minutes (HH MM) > \00"
@.str.1 = [7 x i8] c"%lf %d\00"
@.str.2 = [81 x i8] c"After %.2f hours, the temperature in the freezer will be %.3f \C2\B0C, or %.3f \C2\B0F \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %2, i32* %1)
%7 = load double, double* %2
%8 = load i32, i32* %1
%9 = sitofp i32 %8 to double
%10 = fdiv double %9, 6.000000e+01
%11 = fadd double %7, %10
store double %11, double* %2
%12 = fmul double %11, %11
%13 = fmul double %12, 4.000000e+00
%14 = fadd double %11, 2.000000e+00
%15 = fdiv double %13, %14
%16 = fadd double %15, -2.000000e+01
%17 = call double @convertToFahrenheit(double %16)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0), double %11, double %16, double %17)
ret i32 0
}