#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 *, double);
int /*<<< orphan*/ scanf(char *, double *, ...);
double sqrt(double);
int main() {
  double Vs, R, C, w;
  int num_examples;
  scanf("%lf %lf %lf %d", &Vs, &R, &C, &num_examples);
  for (int i = 0; i < num_examples; ++i) {
    scanf("%lf", &w);
    printf("%.3f\n", R * C * w * Vs * sqrt(1.0 / (R * R * C * C * w * w + 1)));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x2c(%rbp),%r8
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1200 <main+0xd0>
lea    0xea0(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe3b(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe2f(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1164 <main+0x34>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xecf(%rip),%rdi
lea    0x30(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0xc(%rsp),%r8
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1216 <main+0xe6>
lea    0xeb1(%rip),%r14
lea    0x18(%rsp),%r15
lea    0xea9(%rip),%rbx
xor    %ebp,%ebp
jmp    11aa <main+0x7a>
xchg   %ax,%ax
movsd  %xmm3,0x10(%rsp)
call   1050 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
mulsd  %xmm0,%xmm3
mov    %rbx,%rdi
movapd %xmm3,%xmm0
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jge    1216 <main+0xe6>
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm0
movapd %xmm1,%xmm3
mulsd  %xmm0,%xmm3
movsd  0x18(%rsp),%xmm2
mulsd  %xmm2,%xmm3
mulsd  0x30(%rsp),%xmm3
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe09(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
ucomisd 0xe01(%rip),%xmm0
jb     1180 <main+0x50>
sqrtsd %xmm0,%xmm0
jmp    1191 <main+0x61>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%lf %lf %lf %d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4, i32* %6)
store i32 0, i32* %7
br label %9
9: ; preds = %37, %0
%10 = load i32, i32* %7
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %40
13: ; preds = %9
%14 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%15 = load double, double* %3
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = load double, double* %5
%19 = fmul double %17, %18
%20 = load double, double* %2
%21 = fmul double %19, %20
%22 = load double, double* %3
%23 = load double, double* %3
%24 = fmul double %22, %23
%25 = load double, double* %4
%26 = fmul double %24, %25
%27 = load double, double* %4
%28 = fmul double %26, %27
%29 = load double, double* %5
%30 = fmul double %28, %29
%31 = load double, double* %5
%32 = call double @llvm.fmuladd.f64(double %30, double %31, double 1.000000e+00)
%33 = fdiv double 1.000000e+00, %32
%34 = call double @sqrt(double %33)
%35 = fmul double %21, %34
%36 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %35)
br label %37
37: ; preds = %13
%38 = load i32, i32* %7
%39 = add nsw i32 %38, 1
store i32 %39, i32* %7
br label %9
40: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%lf %lf %lf %d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = bitcast double* %1 to i8*
%7 = bitcast double* %2 to i8*
%8 = bitcast double* %3 to i8*
%9 = bitcast double* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, i32* %5)
%12 = load i32, i32* %5
%13 = icmp sgt i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %15, %0
ret i32 0
15: ; preds = %0, %15
%16 = phi i32 [ %34, %15 ], [ 0, %0 ]
%17 = call i32 (i8*, double*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%18 = load double, double* %2
%19 = load double, double* %3
%20 = fmul double %18, %19
%21 = load double, double* %4
%22 = fmul double %20, %21
%23 = load double, double* %1
%24 = fmul double %22, %23
%25 = fmul double %18, %18
%26 = fmul double %25, %19
%27 = fmul double %19, %26
%28 = fmul double %21, %27
%29 = call double @llvm.fmuladd.f64(double %28, double %21, double 1.000000e+00)
%30 = fdiv double 1.000000e+00, %29
%31 = call double @sqrt(double %30)
%32 = fmul double %24, %31
%33 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %32)
%34 = add nuw nsw i32 %16, 1
%35 = load i32, i32* %5
%36 = icmp slt i32 %34, %35
br i1 %36, label %15, label %14
}