#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 xCoor = -999.99;
  float radius = -999.99;
  float y = -999.99;
  float area = -999.99;
  float circumference = -999.99;
  printf("Please input a/an x coordinate:");
  scanf("%f", &xCoor);
  y = .5;
  y *= xCoor;
  y += 2;
  printf("Please give a/an radius for a circle:");
  scanf("%f", &radius);
  area = 3.1415926535897932384626433832795;
  area *= radius;
  area *= radius;
  circumference = 2;
  circumference *= 3.1415926535897932384626433832795;
  circumference *= radius;
  printf("\n");
  printf("Your y coordinate is %.0f.\n", y);
  printf("Your area  for the circle is %.1f.\n", area);
  printf("Your circumference for the circle is %.1f.\n", circumference);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xec3(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xeb6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xea9(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xe7a(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe56(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe67(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xe2a(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xdfb(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xddd(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe04(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe09(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe16(%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
movl   $0xc479ff5c,0x10(%rsp)
c4
movl   $0xc479ff5c,0xc(%rsp)
c4
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed6(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0x10(%rsp),%xmm0
mulss  0xe8b(%rip),%xmm0
addss  0xe87(%rip),%xmm0
movss  %xmm0,0x1c(%rsp)
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0xe5c(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x14(%rsp)
mulss  0xe4a(%rip),%xmm0
movss  %xmm0,0x18(%rsp)
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  0x1c(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe76(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7a(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x18(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe86(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Please input a/an x coordinate:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [38 x i8] c"Please give a/an radius for a circle:\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [28 x i8] c"Your y coordinate is %.0f.\0A\00"
@.str.5 = [36 x i8] c"Your area for the circle is %.1f.\0A\00"
@.str.6 = [44 x i8] c"Your circumference for the circle is %.1f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
store float 0xC08F3FEB80000000, float* %2
store float 0xC08F3FEB80000000, float* %3
store float 0xC08F3FEB80000000, float* %4
store float 0xC08F3FEB80000000, float* %5
store float 0xC08F3FEB80000000, float* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
store float 5.000000e-01, float* %4
%9 = load float, float* %2
%10 = load float, float* %4
%11 = fmul float %10, %9
store float %11, float* %4
%12 = load float, float* %4
%13 = fadd float %12, 2.000000e+00
store float %13, float* %4
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
store float 0x400921FB60000000, float* %5
%16 = load float, float* %3
%17 = load float, float* %5
%18 = fmul float %17, %16
store float %18, float* %5
%19 = load float, float* %3
%20 = load float, float* %5
%21 = fmul float %20, %19
store float %21, float* %5
store float 2.000000e+00, float* %6
%22 = load float, float* %6
%23 = fpext float %22 to double
%24 = fmul double %23, 0x400921FB54442D18
%25 = fptrunc double %24 to float
store float %25, float* %6
%26 = load float, float* %3
%27 = load float, float* %6
%28 = fmul float %27, %26
store float %28, float* %6
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%30 = load float, float* %4
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), double %31)
%33 = load float, float* %5
%34 = fpext float %33 to double
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), double %34)
%36 = load float, float* %6
%37 = fpext float %36 to double
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), double %37)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Please input a/an x coordinate:\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [38 x i8] c"Please give a/an radius for a circle:\00"
@.str.4 = [28 x i8] c"Your y coordinate is %.0f.\0A\00"
@.str.5 = [36 x i8] c"Your area for the circle is %.1f.\0A\00"
@.str.6 = [44 x i8] c"Your circumference for the circle is %.1f.\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
store float 0xC08F3FEB80000000, float* %1
%4 = bitcast float* %2 to i8*
store float 0xC08F3FEB80000000, float* %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = load float, float* %1
%8 = fmul float %7, 5.000000e-01
%9 = fadd float %8, 2.000000e+00
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%12 = load float, float* %2
%13 = fmul float %12, 0x400921FB60000000
%14 = fmul float %12, %13
%15 = fmul float %12, 0x401921FB60000000
%16 = call i32 @putchar(i32 10)
%17 = fpext float %9 to double
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), double %17)
%19 = fpext float %14 to double
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0), double %19)
%21 = fpext float %15 to double
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0), double %21)
ret i32 0
}