#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 *, ...);
int /*<<< orphan*/ scanf(char *, int *, ...);
int /*<<< orphan*/ stdin;
int main() {
  int n, l, r1, r2, m, z, i;
  freopen("track.in", "r", stdin);
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d %d %d %d %d", &l, &r1, &r2, &m, &z);
    printf("Track #%d: ", i);
    double mack = 2.0 * (3.141592653589793 * r1 + l) * m;
    double zack = 2.0 * (3.141592653589793 * r2 + l) * z;
    if (mack > zack)
      printf("Drats!\n");
    else
      printf("I've run %.0lf more meters than Mack!!!\n", zack - mack);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edx
lea    0xec1(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1040 <freopen@plt>
lea    0xec5(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1269 <main+0x139>
lea    0xe94(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x18(%rbp),%r8
lea    -0x1c(%rbp),%r9
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x20(%rbp),%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cvtsi2sdl -0x10(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe43(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe2b(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xe0f(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdf7(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    123e <main+0x10e>
lea    0xe04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1256 <main+0x126>
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
lea    0xdef(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    125b <main+0x12b>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1174 <main+0x44>
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
mov    0x2e93(%rip),%rax
mov    (%rax),%edx
lea    0xeb2(%rip),%rdi
lea    0xeb4(%rip),%rsi
call   1050 <freopen@plt>
lea    0xeb6(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,(%rsp)
jle    126b <main+0x12b>
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0x8(%rsp),%rbx
lea    0x4(%rsp),%rbp
lea    0xe8a(%rip),%r14
xor    %r15d,%r15d
jmp    11cc <main+0x8c>
cs nopw 0x0(%rax,%rax,1)
nop
subsd  %xmm1,%xmm0
lea    0xe7b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmp    (%rsp),%r15d
jge    126b <main+0x12b>
add    $0x1,%r15d
lea    0xe44(%rip),%rdi
lea    0x14(%rsp),%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
mov    %rbp,%r9
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r14,%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x14(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
movss  0x10(%rsp),%xmm2
unpcklps %xmm1,%xmm2
cvtdq2pd %xmm2,%xmm2
unpcklpd %xmm0,%xmm0
mulpd  0xddc(%rip),%xmm2
addpd  %xmm0,%xmm2
addpd  %xmm2,%xmm2
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
unpcklps %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
mulpd  %xmm2,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
ucomisd %xmm0,%xmm1
jbe    11b0 <main+0x70>
lea    0xe03(%rip),%rdi
call   1030 <puts@plt>
cmp    (%rsp),%r15d
jl     11cc <main+0x8c>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"track.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [15 x i8] c"%d %d %d %d %d\00"
@.str.4 = [12 x i8] c"Track #%d: \00"
@.str.5 = [8 x i8] c"Drats!\0A\00"
@.str.6 = [41 x i8] c"I've run %.0lf more meters than Mack!!!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
store i32 0, i32* %1
%11 = load i32, i32* @stdin
%12 = call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
store i32 1, i32* %8
br label %14
14: ; preds = %51, %0
%15 = load i32, i32* %8
%16 = load i32, i32* %2
%17 = icmp sle i32 %15, %16
br i1 %17, label %18, label %54
18: ; preds = %14
%19 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32* %3, i32* %4, i32* %5, i32* %6, i32* %7)
%20 = load i32, i32* %8
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %4
%23 = sitofp i32 %22 to double
%24 = load i32, i32* %3
%25 = sitofp i32 %24 to double
%26 = call double @llvm.fmuladd.f64(double 0x400921FB54442D18, double %23, double %25)
%27 = fmul double 2.000000e+00, %26
%28 = load i32, i32* %6
%29 = sitofp i32 %28 to double
%30 = fmul double %27, %29
store double %30, double* %9
%31 = load i32, i32* %5
%32 = sitofp i32 %31 to double
%33 = load i32, i32* %3
%34 = sitofp i32 %33 to double
%35 = call double @llvm.fmuladd.f64(double 0x400921FB54442D18, double %32, double %34)
%36 = fmul double 2.000000e+00, %35
%37 = load i32, i32* %7
%38 = sitofp i32 %37 to double
%39 = fmul double %36, %38
store double %39, double* %10
%40 = load double, double* %9
%41 = load double, double* %10
%42 = fcmp ogt double %40, %41
br i1 %42, label %43, label %45
43: ; preds = %18
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %50
45: ; preds = %18
%46 = load double, double* %10
%47 = load double, double* %9
%48 = fsub double %46, %47
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), double %48)
br label %50
50: ; preds = %45, %43
br label %51
51: ; preds = %50
%52 = load i32, i32* %8
%53 = add nsw i32 %52, 1
store i32 %53, i32* %8
br label %14
54: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"track.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [15 x i8] c"%d %d %d %d %d\00"
@.str.4 = [12 x i8] c"Track #%d: \00"
@.str.6 = [41 x i8] c"I've run %.0lf more meters than Mack!!!\0A\00"
@str = [7 x i8] c"Drats!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %1 to i8*
%8 = bitcast i32* %2 to i8*
%9 = bitcast i32* %3 to i8*
%10 = bitcast i32* %4 to i8*
%11 = bitcast i32* %5 to i8*
%12 = bitcast i32* %6 to i8*
%13 = load i32, i32* @stdin
%14 = tail call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%16 = load i32, i32* %1
%17 = icmp slt i32 %16, 1
br i1 %17, label %51, label %18
18: ; preds = %0, %47
%19 = phi i32 [ %48, %47 ], [ 1, %0 ]
%20 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5, i32* %6)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 %19)
%22 = load i32, i32* %3
%23 = load i32, i32* %2
%24 = sitofp i32 %23 to double
%25 = load i32, i32* %5
%26 = load i32, i32* %4
%27 = insertelement <2 x i32> poison, i32 %22, i64 0
%28 = insertelement <2 x i32> %27, i32 %26, i64 1
%29 = sitofp <2 x i32> %28 to <2 x double>
%30 = insertelement <2 x double> poison, double %24, i64 0
%31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %29, <2 x double> <double 0x400921FB54442D18, double 0x400921FB54442D18>, <2 x double> %31)
%33 = fmul <2 x double> %32, <double 2.000000e+00, double 2.000000e+00>
%34 = load i32, i32* %6
%35 = insertelement <2 x i32> poison, i32 %25, i64 0
%36 = insertelement <2 x i32> %35, i32 %34, i64 1
%37 = sitofp <2 x i32> %36 to <2 x double>
%38 = fmul <2 x double> %33, %37
%39 = extractelement <2 x double> %38, i64 0
%40 = extractelement <2 x double> %38, i64 1
%41 = fcmp ogt double %39, %40
br i1 %41, label %42, label %44
42: ; preds = %18
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %47
44: ; preds = %18
%45 = fsub double %40, %39
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), double %45)
br label %47
47: ; preds = %44, %42
%48 = add nuw nsw i32 %19, 1
%49 = load i32, i32* %1
%50 = icmp slt i32 %19, %49
br i1 %50, label %18, label %51
51: ; preds = %47, %0
ret i32 0
}