#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 *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int drum, counter, weight;
  float xPac_man, yPac_man, abcissian_coordinates[1000],
      ordinate_coordinates[1000];
  scanf("%d", &drum);
  scanf("%f", &xPac_man);
  scanf("%f", &yPac_man);
  for (counter = 0; counter < drum; counter++) {
    scanf("%f", &abcissian_coordinates[counter]);
    scanf("%f", &ordinate_coordinates[counter]);
  }
  printf("\n");
  float abcissian_vector, ordinate_vector;
  weight = 1;
  for (counter = 0; counter < drum; counter++) {
    abcissian_vector = abcissian_coordinates[counter] - xPac_man;
    ordinate_vector = ordinate_coordinates[counter] - yPac_man;
    abcissian_vector = abcissian_vector + abcissian_vector / weight;
    ordinate_vector = ordinate_vector + ordinate_vector / weight;
    printf("%.2f %.2f\n", abcissian_vector, ordinate_vector);
    xPac_man = xPac_man + abcissian_vector;
    yPac_man = yPac_man + ordinate_vector;
    weight = weight * 2;
  }
  printf("%.2f %.2f\n", xPac_man, yPac_man);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb8(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea6(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c9 <main+0xa9>
movslq -0xc(%rbp),%rax
lea    -0xfc0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movslq -0xc(%rbp),%rax
lea    -0x1f60(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116f <main+0x4f>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12d0 <main+0x1b0>
movslq -0xc(%rbp),%rax
movss  -0xfc0(%rbp,%rax,4),%xmm0
ff ff
subss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1f64(%rbp)
ff
movslq -0xc(%rbp),%rax
movss  -0x1f60(%rbp,%rax,4),%xmm0
ff ff
subss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1f68(%rbp)
ff
movss  -0x1f64(%rbp),%xmm0
ff
movss  -0x1f64(%rbp),%xmm1
ff
cvtsi2ssl -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x1f64(%rbp)
ff
movss  -0x1f68(%rbp),%xmm0
ff
movss  -0x1f68(%rbp),%xmm1
ff
cvtsi2ssl -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x1f68(%rbp)
ff
movss  -0x1f64(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x1f68(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
lea    0xd78(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
addss  -0x1f64(%rbp),%xmm0
ff
movss  %xmm0,-0x14(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x1f68(%rbp),%xmm0
ff
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11e5 <main+0xc5>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd1d(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1f70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x1f68,%rsp
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeac(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    11d0 <main+0xa0>
lea    0x20(%rsp),%r14
lea    0xfc0(%rsp),%rbx
lea    0xe73(%rip),%r15
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
add    $0x1,%rbp
movslq 0x4(%rsp),%rax
add    $0x4,%r14
add    $0x4,%rbx
cmp    %rax,%rbp
jl     11a0 <main+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x0,0x4(%rsp)
movss  0xc(%rsp),%xmm1
movss  0x8(%rsp),%xmm0
unpcklps %xmm1,%xmm0
jle    128e <main+0x15e>
mov    $0x1,%ebp
xor    %ebx,%ebx
lea    0xe04(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  0xfc0(%rsp,%rbx,4),%xmm1
movss  0x20(%rsp,%rbx,4),%xmm2
xorps  %xmm3,%xmm3
cvtsi2ss %ebp,%xmm3
unpcklps %xmm1,%xmm2
subps  %xmm0,%xmm2
shufps $0x0,%xmm3,%xmm3
movaps %xmm2,%xmm1
divps  %xmm3,%xmm1
addps  %xmm2,%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mov    %r14,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm1
movss  0x8(%rsp),%xmm0
unpcklps %xmm1,%xmm0
addps  0x10(%rsp),%xmm0
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
add    %ebp,%ebp
add    $0x1,%rbx
movslq 0x4(%rsp),%rax
cmp    %rax,%rbx
jl     1210 <main+0xe0>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd62(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1f68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [11 x i8] c"%.2f %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca [1000 x float]
%8 = alloca [1000 x float]
%9 = alloca float
%10 = alloca float
store i32 0, i32* %1
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
store i32 0, i32* %3
br label %14
14: ; preds = %27, %0
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %30
18: ; preds = %14
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [1000 x float], [1000 x float]* %7, i64 0, i64 %20
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %21)
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [1000 x float], [1000 x float]* %8, i64 0, i64 %24
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %25)
br label %27
27: ; preds = %18
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %14
30: ; preds = %14
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %4
store i32 0, i32* %3
br label %32
32: ; preds = %74, %30
%33 = load i32, i32* %3
%34 = load i32, i32* %2
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %77
36: ; preds = %32
%37 = load i32, i32* %3
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [1000 x float], [1000 x float]* %7, i64 0, i64 %38
%40 = load float, float* %39
%41 = load float, float* %5
%42 = fsub float %40, %41
store float %42, float* %9
%43 = load i32, i32* %3
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [1000 x float], [1000 x float]* %8, i64 0, i64 %44
%46 = load float, float* %45
%47 = load float, float* %6
%48 = fsub float %46, %47
store float %48, float* %10
%49 = load float, float* %9
%50 = load float, float* %9
%51 = load i32, i32* %4
%52 = sitofp i32 %51 to float
%53 = fdiv float %50, %52
%54 = fadd float %49, %53
store float %54, float* %9
%55 = load float, float* %10
%56 = load float, float* %10
%57 = load i32, i32* %4
%58 = sitofp i32 %57 to float
%59 = fdiv float %56, %58
%60 = fadd float %55, %59
store float %60, float* %10
%61 = load float, float* %9
%62 = fpext float %61 to double
%63 = load float, float* %10
%64 = fpext float %63 to double
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %62, double %64)
%66 = load float, float* %5
%67 = load float, float* %9
%68 = fadd float %66, %67
store float %68, float* %5
%69 = load float, float* %6
%70 = load float, float* %10
%71 = fadd float %69, %70
store float %71, float* %6
%72 = load i32, i32* %4
%73 = mul nsw i32 %72, 2
store i32 %73, i32* %4
br label %74
74: ; preds = %36
%75 = load i32, i32* %3
%76 = add nsw i32 %75, 1
store i32 %76, i32* %3
br label %32
77: ; preds = %32
%78 = load float, float* %5
%79 = fpext float %78 to double
%80 = load float, float* %6
%81 = fpext float %80 to double
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %79, double %81)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [11 x i8] c"%.2f %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca [1000 x float]
%5 = alloca [1000 x float]
%6 = bitcast i32* %1 to i8*
%7 = bitcast float* %2 to i8*
%8 = bitcast float* %3 to i8*
%9 = bitcast [1000 x float]* %4 to i8*
%10 = bitcast [1000 x float]* %5 to i8*
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%14 = load i32, i32* %1
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %26
16: ; preds = %0, %16
%17 = phi i64 [ %22, %16 ], [ 0, %0 ]
%18 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %17
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %18)
%20 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %17
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %20)
%22 = add nuw nsw i64 %17, 1
%23 = load i32, i32* %1
%24 = sext i32 %23 to i64
%25 = icmp slt i64 %22, %24
br i1 %25, label %16, label %26
26: ; preds = %16, %0
%27 = call i32 @putchar(i32 10)
%28 = load i32, i32* %1
%29 = icmp sgt i32 %28, 0
%30 = load float, float* %2
%31 = load float, float* %3
%32 = insertelement <2 x float> poison, float %31, i64 0
%33 = insertelement <2 x float> %32, float %30, i64 1
br i1 %29, label %34, label %67
34: ; preds = %26, %34
%35 = phi i64 [ %63, %34 ], [ 0, %26 ]
%36 = phi i32 [ %62, %34 ], [ 1, %26 ]
%37 = phi <2 x float> [ %59, %34 ], [ %33, %26 ]
%38 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %35
%39 = load float, float* %38
%40 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %35
%41 = load float, float* %40
%42 = insertelement <2 x float> poison, float %41, i64 0
%43 = insertelement <2 x float> %42, float %39, i64 1
%44 = fsub <2 x float> %43, %37
%45 = sitofp i32 %36 to float
%46 = insertelement <2 x float> poison, float %45, i64 0
%47 = shufflevector <2 x float> %46, <2 x float> poison, <2 x i32> zeroinitializer
%48 = fdiv <2 x float> %44, %47
%49 = fadd <2 x float> %44, %48
%50 = extractelement <2 x float> %49, i64 1
%51 = fpext float %50 to double
%52 = extractelement <2 x float> %49, i64 0
%53 = fpext float %52 to double
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %51, double %53)
%55 = load float, float* %2
%56 = load float, float* %3
%57 = insertelement <2 x float> poison, float %56, i64 0
%58 = insertelement <2 x float> %57, float %55, i64 1
%59 = fadd <2 x float> %49, %58
%60 = extractelement <2 x float> %59, i64 1
store float %60, float* %2
%61 = extractelement <2 x float> %59, i64 0
store float %61, float* %3
%62 = shl nsw i32 %36, 1
%63 = add nuw nsw i64 %35, 1
%64 = load i32, i32* %1
%65 = sext i32 %64 to i64
%66 = icmp slt i64 %63, %65
br i1 %66, label %34, label %67
67: ; preds = %34, %26
%68 = phi <2 x float> [ %33, %26 ], [ %59, %34 ]
%69 = extractelement <2 x float> %68, i64 1
%70 = fpext float %69 to double
%71 = extractelement <2 x float> %68, i64 0
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), double %70, double %72)
ret i32 0
}