#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 /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float cup;
  printf("Enter a volume in cups: ");
  scanf("%f", &cup);
  printf("%.1f cups in pints is %.2f.\n", cup, cup / 2.0f);
  printf("%.1f cups in ounces is %.1f.\n", cup, cup * 8.0f);
  printf("%.1f cups in tablespoons is %.1f.\n", cup, cup * 8.0f * 2.0f);
  printf("%.1f cups in teaspoons is %.1f.\n", cup, cup * 8.0f * 2.0f * 3.0f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xea1(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xeb6(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0xe7e(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xeab(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0xe56(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe45(%rip),%xmm2
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe95(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0xe22(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe11(%rip),%xmm2
mulss  %xmm2,%xmm1
movss  0xe01(%rip),%xmm2
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe78(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm0
mulss  0xeae(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xecb(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulss  0xe8b(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xec1(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulss  0xe64(%rip),%xmm1
addss  %xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xeb4(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulss  0xe39(%rip),%xmm1
addss  %xmm1,%xmm1
mulss  0xe31(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xea4(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Enter a volume in cups: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [29 x i8] c"%.1f cups in pints is %.2f.\0A\00"
@.str.3 = [30 x i8] c"%.1f cups in ounces is %.1f.\0A\00"
@.str.4 = [35 x i8] c"%.1f cups in tablespoons is %.1f.\0A\00"
@.str.5 = [33 x i8] c"%.1f cups in teaspoons is %.1f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = load float, float* %2
%8 = fdiv float %7, 2.000000e+00
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %6, double %9)
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = load float, float* %2
%14 = fmul float %13, 8.000000e+00
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), double %12, double %15)
%17 = load float, float* %2
%18 = fpext float %17 to double
%19 = load float, float* %2
%20 = fmul float %19, 8.000000e+00
%21 = fmul float %20, 2.000000e+00
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), double %18, double %22)
%24 = load float, float* %2
%25 = fpext float %24 to double
%26 = load float, float* %2
%27 = fmul float %26, 8.000000e+00
%28 = fmul float %27, 2.000000e+00
%29 = fmul float %28, 3.000000e+00
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), double %25, double %30)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Enter a volume in cups: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [29 x i8] c"%.1f cups in pints is %.2f.\0A\00"
@.str.3 = [30 x i8] c"%.1f cups in ounces is %.1f.\0A\00"
@.str.4 = [35 x i8] c"%.1f cups in tablespoons is %.1f.\0A\00"
@.str.5 = [33 x i8] c"%.1f cups in teaspoons is %.1f.\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fmul float %5, 5.000000e-01
%8 = fpext float %7 to double
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), double %6, double %8)
%10 = load float, float* %1
%11 = fpext float %10 to double
%12 = fmul float %10, 8.000000e+00
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), double %11, double %13)
%15 = load float, float* %1
%16 = fpext float %15 to double
%17 = fmul float %15, 8.000000e+00
%18 = fmul float %17, 2.000000e+00
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), double %16, double %19)
%21 = load float, float* %1
%22 = fpext float %21 to double
%23 = fmul float %21, 8.000000e+00
%24 = fmul float %23, 2.000000e+00
%25 = fmul float %24, 3.000000e+00
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), double %22, double %26)
ret i32 0
}