#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *, int, double);
int /*<<< orphan*/ system(char *);
int main() {
  int numcases;
  int casenum;
  int speed;
  double time;
  double radius;
  double area;
  FILE *input = fopen("jetski.in", "r");
  fscanf(input, "%d", &numcases);
  for (casenum = 1; casenum <= numcases; casenum++) {
    fscanf(input, "%d", &speed);
    fscanf(input, "%lf", &time);
    time /= 60;
    radius = ((double)(speed)) * time;
    area = 3.1415926535898 * radius * radius;
    area /= 2.0;
    printf("Data Set %d: %0.2lf\n", casenum, area);
  }
  fclose(input);
  system("PAUSE");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb2(%rip),%rdi
lea    0xeb5(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
lea    0xea3(%rip),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     123f <main+0xef>
mov    -0x30(%rbp),%rdi
lea    0xe7a(%rip),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
mov    -0x30(%rbp),%rdi
lea    0xe67(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1060 <fscanf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  0xe38(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe10(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xdec(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0xc(%rbp),%esi
movsd  -0x28(%rbp),%xmm0
lea    0xdff(%rip),%rdi
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1193 <main+0x43>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xdf1(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeb3(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,%rbx
lea    0xea9(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   1060 <fscanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    1223 <main+0xd3>
lea    0xc(%rsp),%r15
lea    0xe86(%rip),%r12
lea    0x10(%rsp),%r13
lea    0xe7e(%rip),%rbp
xor    %r14d,%r14d
add    $0x1,%r14d
mov    %rbx,%rdi
lea    0xe66(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <fscanf@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xe1a(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sdl 0xc(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mulsd  0xe03(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xdff(%rip),%xmm0
mov    %rbp,%rdi
mov    %r14d,%esi
call   1050 <printf@plt>
cmp    0x8(%rsp),%r14d
jl     11b0 <main+0x60>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xe0e(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"jetski.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c"%lf\00"
@.str.4 = [21 x i8] c"Data Set %d: %0.2lf\0A\00"
@.str.5 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32*
store i32 0, i32* %1
%9 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %9, i32** %8
%10 = load i32*, i32** %8
%11 = call i32 (i32*, i8*, ...) @fscanf(i32* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
store i32 1, i32* %3
br label %12
12: ; preds = %36, %0
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %39
16: ; preds = %12
%17 = load i32*, i32** %8
%18 = call i32 (i32*, i8*, ...) @fscanf(i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%19 = load i32*, i32** %8
%20 = call i32 (i32*, i8*, ...) @fscanf(i32* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %5)
%21 = load double, double* %5
%22 = fdiv double %21, 6.000000e+01
store double %22, double* %5
%23 = load i32, i32* %4
%24 = sitofp i32 %23 to double
%25 = load double, double* %5
%26 = fmul double %24, %25
store double %26, double* %6
%27 = load double, double* %6
%28 = fmul double 0x400921FB54442D28, %27
%29 = load double, double* %6
%30 = fmul double %28, %29
store double %30, double* %7
%31 = load double, double* %7
%32 = fdiv double %31, 2.000000e+00
store double %32, double* %7
%33 = load i32, i32* %3
%34 = load double, double* %7
%35 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %33, double %34)
br label %36
36: ; preds = %16
%37 = load i32, i32* %3
%38 = add nsw i32 %37, 1
store i32 %38, i32* %3
br label %12
39: ; preds = %12
%40 = load i32*, i32** %8
%41 = call i32 @fclose(i32* %40)
%42 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"jetski.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c"%lf\00"
@.str.4 = [21 x i8] c"Data Set %d: %0.2lf\0A\00"
@.str.5 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32*, i8*, ...) @fscanf(i32* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%9 = load i32, i32* %1
%10 = icmp slt i32 %9, 1
br i1 %10, label %27, label %11
11: ; preds = %0, %11
%12 = phi i32 [ %24, %11 ], [ 1, %0 ]
%13 = call i32 (i32*, i8*, ...) @fscanf(i32* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%14 = call i32 (i32*, i8*, ...) @fscanf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %3)
%15 = load double, double* %3
%16 = fdiv double %15, 6.000000e+01
store double %16, double* %3
%17 = load i32, i32* %2
%18 = sitofp i32 %17 to double
%19 = fmul double %16, %18
%20 = fmul double %19, 0x400921FB54442D28
%21 = fmul double %19, %20
%22 = fmul double %21, 5.000000e-01
%23 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %12, double %22)
%24 = add nuw nsw i32 %12, 1
%25 = load i32, i32* %1
%26 = icmp slt i32 %12, %25
br i1 %26, label %11, label %27
27: ; preds = %11, %0
%28 = call i32 @fclose(i32* %7)
%29 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}