#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 *, int, ...);
int main(int argc, const char *argv[]) {
  float weight;
  weight = 14.2;
  printf("Weight of turkey is %f.\n", weight);
  float cookingTime;
  cookingTime = 15.0 + 15.0 * weight;
  printf("Cook for %f minutes.\n", cookingTime);
  int hours;
  hours = (int)(cookingTime / 60);
  int minutes = (int)(cookingTime - 60.0 * hours);
  printf("Which is %d hours and %d minutes.\n", hours, minutes);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xee6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
cvttss2si -0x14(%rbp),%esi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb1(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
cvttss2si -0x18(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
movss  0xe88(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x1c(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xe57(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0xe4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x3,%esi
mov    $0x30,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Weight of turkey is %f.\0A\00"
@.str.1 = [22 x i8] c"Cook for %f minutes.\0A\00"
@.str.2 = [35 x i8] c"Which is %d hours and %d minutes.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 0x402C666660000000, float* %6
%10 = load float, float* %6
%11 = fptosi float %10 to i32
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load float, float* %6
%14 = fpext float %13 to double
%15 = call double @llvm.fmuladd.f64(double 1.500000e+01, double %14, double 1.500000e+01)
%16 = fptrunc double %15 to float
store float %16, float* %7
%17 = load float, float* %7
%18 = fptosi float %17 to i32
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = load float, float* %7
%21 = fdiv float %20, 6.000000e+01
%22 = fptosi float %21 to i32
store i32 %22, i32* %8
%23 = load float, float* %7
%24 = fpext float %23 to double
%25 = load i32, i32* %8
%26 = sitofp i32 %25 to double
%27 = call double @llvm.fmuladd.f64(double -6.000000e+01, double %26, double %24)
%28 = fptosi double %27 to i32
store i32 %28, i32* %9
%29 = load i32, i32* %8
%30 = load i32, i32* %9
%31 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %29, i32 %30)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Weight of turkey is %f.\0A\00"
@.str.1 = [22 x i8] c"Cook for %f minutes.\0A\00"
@.str.2 = [35 x i8] c"Which is %d hours and %d minutes.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 14)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 228)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 48)
ret i32 0
}