#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 *, float *);
double sqrt(int);
int main() {
  float r, l, c = 0.01, c1;
  printf("Enter the Value of R L: ");
  scanf("%f %f", &r, &l);
  printf("For R = %.2f, And L= %.2f \n", r, l);
  r = r * r;
  printf("C\tF \n");
  for (c; c <= 0.1; c += 0.01) {
    c1 = 4 * c * c;
    printf("%.2f\t%.2f \n", c, sqrt((1 / l * c) - (r / c1)));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xeb9(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xeb8(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe54(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     125e <main+0x12e>
movss  0xe3a(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  0xe11(%rip),%xmm0
divss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
divss  -0x14(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
lea    0xe2d(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdcc(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11ab <main+0x7b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1050 <scanf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x4(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xec6(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  (%rsp),%xmm0
mulss  %xmm0,%xmm0
movss  %xmm0,(%rsp)
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
movss  0xe56(%rip),%xmm0
movsd  0xe5e(%rip),%xmm1
lea    0xeaa(%rip),%rbx
nopl   0x0(%rax)
movsd  %xmm1,0x8(%rsp)
movaps %xmm0,%xmm1
mulss  0xe33(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  0xe2b(%rip),%xmm2
divss  0x4(%rsp),%xmm2
movss  (%rsp),%xmm3
divss  %xmm1,%xmm3
mulss  %xmm0,%xmm2
addss  %xmm3,%xmm2
cvttss2si %xmm2,%edi
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xdfa(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xdef(%rip),%xmm2
ucomisd %xmm1,%xmm2
jae    11c0 <main+0x80>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Enter the Value of R L: \00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [28 x i8] c"For R = %.2f, And L= %.2f \0A\00"
@.str.3 = [6 x i8] c"C\09F \0A\00"
@.str.4 = [12 x i8] c"%.2f\09%.2f \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store float 0x3F847AE140000000, float* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3)
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %9, double %11)
%13 = load float, float* %2
%14 = load float, float* %2
%15 = fmul float %13, %14
store float %15, float* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%17 = load float, float* %4
br label %18
18: ; preds = %40, %0
%19 = load float, float* %4
%20 = fpext float %19 to double
%21 = fcmp ole double %20, 1.000000e-01
br i1 %21, label %22, label %45
22: ; preds = %18
%23 = load float, float* %4
%24 = fmul float 4.000000e+00, %23
%25 = load float, float* %4
%26 = fmul float %24, %25
store float %26, float* %5
%27 = load float, float* %4
%28 = fpext float %27 to double
%29 = load float, float* %3
%30 = fdiv float 1.000000e+00, %29
%31 = load float, float* %4
%32 = load float, float* %2
%33 = load float, float* %5
%34 = fdiv float %32, %33
%35 = fneg float %34
%36 = call float @llvm.fmuladd.f32(float %30, float %31, float %35)
%37 = fptosi float %36 to i32
%38 = call double @sqrt(i32 %37)
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), double %28, double %38)
br label %40
40: ; preds = %22
%41 = load float, float* %4
%42 = fpext float %41 to double
%43 = fadd double %42, 1.000000e-02
%44 = fptrunc double %43 to float
store float %44, float* %4
br label %18
45: ; preds = %18
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Enter the Value of R L: \00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [28 x i8] c"For R = %.2f, And L= %.2f \0A\00"
@.str.4 = [12 x i8] c"%.2f\09%.2f \0A\00"
@str = [5 x i8] c"C\09F \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 ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2)
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %8, double %10)
%12 = load float, float* %1
%13 = fmul float %12, %12
store float %13, float* %1
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %15
15: ; preds = %0, %15
%16 = phi double [ 0x3F847AE140000000, %0 ], [ %31, %15 ]
%17 = phi float [ 0x3F847AE140000000, %0 ], [ %30, %15 ]
%18 = fmul float %17, 4.000000e+00
%19 = fmul float %17, %18
%20 = load float, float* %2
%21 = fdiv float 1.000000e+00, %20
%22 = load float, float* %1
%23 = fneg float %22
%24 = fdiv float %23, %19
%25 = call float @llvm.fmuladd.f32(float %21, float %17, float %24)
%26 = fptosi float %25 to i32
%27 = call double @sqrt(i32 %26)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), double %16, double %27)
%29 = fadd double %16, 1.000000e-02
%30 = fptrunc double %29 to float
%31 = fpext float %30 to double
%32 = fcmp ugt double %31, 1.000000e-01
br i1 %32, label %33, label %15
33: ; preds = %15
ret i32 0
}