#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() {
  float x;
  float y;
  float area;
  float circumference;
  float radius;
  printf("What is x ? \n");
  scanf(" %f", &x);
  y = 6 * x + 3;
  y = 6;
  y *= x;
  y += 3;
  printf(" y = %.2f \n", y);
  printf("What is the radius ? \n");
  scanf(" %f", &radius);
  area = 3.14 * radius * radius;
  area = 3.14;
  area *= radius;
  area *= radius;
  circumference = 2 * 3.14 * radius;
  circumference = 2;
  circumference *= 3.14;
  circumference *= radius;
  printf(" The y coordinate = %.2f \n", y);
  printf(" The area = %.2f \n", area);
  printf(" the circumference = %.2f \n", circumference);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
movss  0xec9(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xeb9(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe8c(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6c(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe24(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe16(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdd6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xdc9(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xda3(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdcc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdd0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdcc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x14(%rsp),%xmm0
mulss  0xe9d(%rip),%xmm0
addss  0xe99(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0xe98(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x10(%rsp),%xmm0
movss  0xe5e(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x8(%rsp)
mulss  0xe4c(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
lea    0xe53(%rip),%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe50(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"What is x ? \0A\00"
@.str.1 = [4 x i8] c" %f\00"
@.str.2 = [12 x i8] c" y = %.2f \0A\00"
@.str.3 = [23 x i8] c"What is the radius ? \0A\00"
@.str.4 = [27 x i8] c" The y coordinate = %.2f \0A\00"
@.str.5 = [19 x i8] c" The area = %.2f \0A\00"
@.str.6 = [28 x i8] c" the circumference = %.2f \0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %1)
%8 = load float, float* %1
%9 = call float @llvm.fmuladd.f32(float 6.000000e+00, float %8, float 3.000000e+00)
store float %9, float* %2
store float 6.000000e+00, float* %2
%10 = load float, float* %1
%11 = load float, float* %2
%12 = fmul float %11, %10
store float %12, float* %2
%13 = load float, float* %2
%14 = fadd float %13, 3.000000e+00
store float %14, float* %2
%15 = load float, float* %2
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %5)
%20 = load float, float* %5
%21 = fpext float %20 to double
%22 = fmul double 3.140000e+00, %21
%23 = load float, float* %5
%24 = fpext float %23 to double
%25 = fmul double %22, %24
%26 = fptrunc double %25 to float
store float %26, float* %3
store float 0x40091EB860000000, float* %3
%27 = load float, float* %5
%28 = load float, float* %3
%29 = fmul float %28, %27
store float %29, float* %3
%30 = load float, float* %5
%31 = load float, float* %3
%32 = fmul float %31, %30
store float %32, float* %3
%33 = load float, float* %5
%34 = fpext float %33 to double
%35 = fmul double 6.280000e+00, %34
%36 = fptrunc double %35 to float
store float %36, float* %4
store float 2.000000e+00, float* %4
%37 = load float, float* %4
%38 = fpext float %37 to double
%39 = fmul double %38, 3.140000e+00
%40 = fptrunc double %39 to float
store float %40, float* %4
%41 = load float, float* %5
%42 = load float, float* %4
%43 = fmul float %42, %41
store float %43, float* %4
%44 = load float, float* %2
%45 = fpext float %44 to double
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %45)
%47 = load float, float* %3
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), double %48)
%50 = load float, float* %4
%51 = fpext float %50 to double
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double %51)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c" %f\00"
@.str.2 = [12 x i8] c" y = %.2f \0A\00"
@.str.4 = [27 x i8] c" The y coordinate = %.2f \0A\00"
@.str.5 = [19 x i8] c" The area = %.2f \0A\00"
@.str.6 = [28 x i8] c" the circumference = %.2f \0A\00"
@str = [13 x i8] c"What is x ? \00"
@str.7 = [22 x i8] c"What is the radius ? \00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = load float, float* %1
%8 = fmul float %7, 6.000000e+00
%9 = fadd float %8, 3.000000e+00
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %10)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.7, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float* %2)
%14 = load float, float* %2
%15 = fmul float %14, 0x40091EB860000000
%16 = fmul float %14, %15
%17 = fmul float %14, 0x40191EB860000000
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %10)
%19 = fpext float %16 to double
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), double %19)
%21 = fpext float %17 to double
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), double %21)
ret i32 0
}