#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 r;
  float area;
  float circumference;
  printf("x coordinate of the line: ");
  scanf("%f", &x);
  y = 2;
  y *= x;
  y += 4;
  printf("radius of the circle: ");
  scanf("%f", &r);
  area = 3.14;
  area *= r;
  area *= r;
  circumference = 2;
  circumference *= 3.14;
  circumference *= r;
  printf("the y coordinate is: %f\n", y);
  printf("the area is: %f\n", area);
  printf("the circumference is: %f\n", circumference);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xeba(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xea6(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xe72(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe43(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe25(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe42(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe44(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe3e(%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    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeed(%rip),%rbx
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x1c(%rsp),%xmm0
addss  %xmm0,%xmm0
addss  0xea7(%rip),%xmm0
movss  %xmm0,0x14(%rsp)
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0x18(%rsp),%xmm0
movss  0xe7c(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
mulss  0xe6a(%rip),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe86(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"x coordinate of the line: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [23 x i8] c"radius of the circle: \00"
@.str.3 = [25 x i8] c"the y coordinate is: %f\0A\00"
@.str.4 = [17 x i8] c"the area is: %f\0A\00"
@.str.5 = [26 x i8] c"the circumference is: %f\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 ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
store float 2.000000e+00, float* %2
%8 = load float, float* %1
%9 = load float, float* %2
%10 = fmul float %9, %8
store float %10, float* %2
%11 = load float, float* %2
%12 = fadd float %11, 4.000000e+00
store float %12, float* %2
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
store float 0x40091EB860000000, float* %4
%15 = load float, float* %3
%16 = load float, float* %4
%17 = fmul float %16, %15
store float %17, float* %4
%18 = load float, float* %3
%19 = load float, float* %4
%20 = fmul float %19, %18
store float %20, float* %4
store float 2.000000e+00, float* %5
%21 = load float, float* %5
%22 = fpext float %21 to double
%23 = fmul double %22, 3.140000e+00
%24 = fptrunc double %23 to float
store float %24, float* %5
%25 = load float, float* %3
%26 = load float, float* %5
%27 = fmul float %26, %25
store float %27, float* %5
%28 = load float, float* %2
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), double %29)
%31 = load float, float* %4
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %32)
%34 = load float, float* %5
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), double %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"x coordinate of the line: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [23 x i8] c"radius of the circle: \00"
@.str.3 = [25 x i8] c"the y coordinate is: %f\0A\00"
@.str.4 = [17 x i8] c"the area is: %f\0A\00"
@.str.5 = [26 x i8] c"the circumference is: %f\0A\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 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 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, 2.000000e+00
%9 = fadd float %8, 4.000000e+00
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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, 0x40091EB860000000
%14 = fmul float %12, %13
%15 = fmul float %12, 0x40191EB860000000
%16 = fpext float %9 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), double %16)
%18 = fpext float %14 to double
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double %18)
%20 = fpext float %15 to double
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), double %20)
ret i32 0
}