#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 */
scalar_t__ ceil(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  FILE *ifp;
  ifp = fopen("pizza.in", "r");
  int cases = 0;
  fscanf(ifp, "%d", &cases);
  int i = 0;
  for (i = 1; i <= cases; i++) {
    int p = 0;
    int t = 0;
    int c = 0;
    fscanf(ifp, "%d", &p);
    fscanf(ifp, "%d", &t);
    fscanf(ifp, "%d", &c);
    int ans = ((int)ceil((((p * p) / (4 * 3.14159265)) / t) * c * 10));
    printf("Perfectly Popular Pizza %d: Perry consumed %d calories.\n", i, ans);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea3(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1050 <fscanf@plt>
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     124d <main+0x10d>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe60(%rip),%rsi
lea    -0x1c(%rbp),%rdx
call   1050 <fscanf@plt>
mov    -0x10(%rbp),%rdi
lea    0xe4c(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1050 <fscanf@plt>
mov    -0x10(%rbp),%rdi
lea    0xe38(%rip),%rsi
lea    -0x24(%rbp),%rdx
call   1050 <fscanf@plt>
mov    -0x1c(%rbp),%eax
imul   -0x1c(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe09(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xde3(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <ceil@plt>
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xde4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    118f <main+0x4f>
mov    -0x4(%rbp),%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    0xebb(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
movl   $0x0,0x8(%rsp)
lea    0xea8(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %rax,%rdi
call   1050 <fscanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    124e <main+0x10e>
xor    %ebp,%ebp
lea    0xe87(%rip),%r14
lea    0x10(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0xe79(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebp
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
lea    0x14(%rsp),%rdx
call   1050 <fscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1050 <fscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
call   1050 <fscanf@plt>
mov    0x14(%rsp),%eax
imul   %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl 0x10(%rsp),%xmm1
divsd  0xdea(%rip),%xmm0
divsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl 0xc(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xdd9(%rip),%xmm1
cvttsd2si %xmm1,%edi
call   1030 <ceil@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
cmp    0x8(%rsp),%ebp
jl     11b0 <main+0x70>
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"pizza.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [57 x i8] c"Perfectly Popular Pizza %d: Perry consumed %d calories.\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
store i32 0, i32* %1
%9 = call i32* @fopen(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))
store i32* %9, i32** %2
store i32 0, i32* %3
%10 = load i32*, i32** %2
%11 = call i32 @fscanf(i32* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
store i32 0, i32* %4
store i32 1, i32* %4
br label %12
12: ; preds = %41, %0
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %44
16: ; preds = %12
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%17 = load i32*, i32** %2
%18 = call i32 @fscanf(i32* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %5)
%19 = load i32*, i32** %2
%20 = call i32 @fscanf(i32* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %6)
%21 = load i32*, i32** %2
%22 = call i32 @fscanf(i32* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%23 = load i32, i32* %5
%24 = load i32, i32* %5
%25 = mul nsw i32 %23, %24
%26 = sitofp i32 %25 to double
%27 = fdiv double %26, 0x402921FB53C8D4F1
%28 = load i32, i32* %6
%29 = sitofp i32 %28 to double
%30 = fdiv double %27, %29
%31 = load i32, i32* %7
%32 = sitofp i32 %31 to double
%33 = fmul double %30, %32
%34 = fmul double %33, 1.000000e+01
%35 = fptosi double %34 to i32
%36 = call i64 @ceil(i32 %35)
%37 = trunc i64 %36 to i32
store i32 %37, i32* %8
%38 = load i32, i32* %4
%39 = load i32, i32* %8
%40 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0), i32 %38, i32 %39)
br label %41
41: ; preds = %16
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %12
44: ; preds = %12
%45 = load i32, i32* %1
ret i32 %45
}

LLVM IR (-O2):
@.str = [9 x i8] c"pizza.in\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [57 x i8] c"Perfectly Popular Pizza %d: Perry consumed %d calories.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = tail call i32* @fopen(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))
%6 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%7 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 1
br i1 %9, label %37, label %10
10: ; preds = %0
%11 = bitcast i32* %2 to i8*
%12 = bitcast i32* %3 to i8*
%13 = bitcast i32* %4 to i8*
br label %14
14: ; preds = %10, %14
%15 = phi i32 [ 1, %10 ], [ %34, %14 ]
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%16 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%17 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%18 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%19 = load i32, i32* %2
%20 = mul nsw i32 %19, %19
%21 = sitofp i32 %20 to double
%22 = fdiv double %21, 0x402921FB53C8D4F1
%23 = load i32, i32* %3
%24 = sitofp i32 %23 to double
%25 = fdiv double %22, %24
%26 = load i32, i32* %4
%27 = sitofp i32 %26 to double
%28 = fmul double %25, %27
%29 = fmul double %28, 1.000000e+01
%30 = fptosi double %29 to i32
%31 = call i64 @ceil(i32 %30)
%32 = trunc i64 %31 to i32
%33 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.3, i64 0, i64 0), i32 %15, i32 %32)
%34 = add nuw nsw i32 %15, 1
%35 = load i32, i32* %1
%36 = icmp slt i32 %15, %35
br i1 %36, label %14, label %37
37: ; preds = %14, %0
ret i32 0
}