#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*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, double);
int /*<<< orphan*/ scanf(char *, ...);
double sqrt(double);
int /*<<< orphan*/ stdin;
int main() {
  freopen("tingling.in", "r", stdin);
  int numVillians;
  scanf("%d", &numVillians);
  int i;
  for (i = 0; i < numVillians; i++) {
    char villianName[50];
    scanf("%s", villianName);
    double p;
    scanf("%lf", &p);
    double r = p / sqrt(3.141592653589793);
    printf("%s is %.3lf feet away.\n", villianName, r);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
lea    0xea9(%rip),%rdi
lea    0xeae(%rip),%rsi
call   1040 <freopen@plt>
lea    0xea4(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ff <main+0xbf>
lea    -0x40(%rbp),%rsi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe73(%rip),%rdi
lea    -0x48(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe3a(%rip),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
lea    -0x40(%rbp),%rsi
movsd  -0x50(%rbp),%xmm0
lea    0xe34(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1184 <main+0x44>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
lea    0xeba(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1040 <freopen@plt>
lea    0xeb5(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11dc <main+0xac>
lea    0xe9e(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0xe95(%rip),%r15
lea    0x8(%rsp),%r12
lea    0xe8d(%rip),%r13
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
divsd  0xe38(%rip),%xmm0
mov    %r13,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    0x4(%rsp),%ebp
jl     11a0 <main+0x70>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"tingling.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [4 x i8] c"%lf\00"
@.str.5 = [24 x i8] c"%s is %.3lf feet away.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [50 x i8]
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
%7 = load i32, i32* @stdin
%8 = call i32 @freopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
store i32 0, i32* %3
br label %10
10: ; preds = %24, %0
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %5)
%18 = load double, double* %5
%19 = call double @sqrt(double 0x400921FB54442D18)
%20 = fdiv double %18, %19
store double %20, double* %6
%21 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%22 = load double, double* %6
%23 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %21, double %22)
br label %24
24: ; preds = %14
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %10
27: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"tingling.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [4 x i8] c"%lf\00"
@.str.5 = [24 x i8] c"%s is %.3lf feet away.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca double
%4 = load i32, i32* @stdin
%5 = tail call i32 @freopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = bitcast i32* %1 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %0
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%12 = bitcast double* %3 to i8*
br label %13
13: ; preds = %10, %13
%14 = phi i32 [ 0, %10 ], [ %20, %13 ]
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %11)
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %3)
%17 = load double, double* %3
%18 = fdiv double %17, 0x3FFC5BF891B4EF6A
%19 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %11, double %18)
%20 = add nuw nsw i32 %14, 1
%21 = load i32, i32* %1
%22 = icmp slt i32 %20, %21
br i1 %22, label %13, label %23
23: ; preds = %13, %0
ret i32 0
}