#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 *, float, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int N, i;
  scanf("%d", &N);
  float pacx, pacy, nacx[N], nacy[N], dx, dy, MuscleMass = 1.0f;
  scanf("%f %f", &pacx, &pacy);
  for (i = 0; i < N; i++) {
    scanf("%f %f", &nacx[i], &nacy[i]);
  }
  for (i = 0; i < N; i++) {
    dx = nacx[i] - pacx;
    dy = nacy[i] - pacy;
    dx += dx / MuscleMass;
    dy += dy / MuscleMass;
    printf("%.2f %.2f\n", dx, dy);
    pacx += dx;
    pacy += dy;
    MuscleMass *= 2;
  }
  printf("%.2f %.2f", pacx, pacy);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
xor    %eax,%eax
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
movss  0xe70(%rip),%xmm0
movss  %xmm0,-0x3c(%rbp)
lea    0xe6f(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11f8 <main+0xd8>
mov    -0x48(%rbp),%rdx
mov    -0x50(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b2 <main+0x92>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12b5 <main+0x195>
mov    -0x48(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movss  (%rcx,%rdx,4),%xmm0
subss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x34(%rbp),%xmm0
divss  -0x3c(%rbp),%xmm0
addss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x38(%rbp),%xmm0
divss  -0x3c(%rbp),%xmm0
addss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x34(%rbp),%xmm0
movss  -0x38(%rbp),%xmm1
lea    0xd9f(%rip),%rdi
call   1030 <printf@plt>
movss  -0x34(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x38(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xd67(%rip),%xmm0
mulss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ff <main+0xdf>
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    0xd56(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xecc(%rip),%rdi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rsp,%r15
mov    -0x2c(%rbp),%eax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
lea    0xe8a(%rip),%rdi
lea    -0x34(%rbp),%rsi
lea    -0x30(%rbp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    1283 <main+0x163>
mov    %r15,-0x48(%rbp)
lea    0xe66(%rip),%r14
mov    %rbx,-0x40(%rbp)
mov    %rbx,%r15
mov    %r12,%rbx
xor    %r13d,%r13d
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%r13
movslq -0x2c(%rbp),%rax
add    $0x4,%rbx
add    $0x4,%r15
cmp    %rax,%r13
jl     11b0 <main+0x90>
test   %eax,%eax
mov    -0x48(%rbp),%r15
mov    -0x40(%rbp),%r13
jle    1283 <main+0x163>
movss  -0x34(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
unpcklps %xmm0,%xmm1
movss  0xe06(%rip),%xmm3
xor    %ebx,%ebx
lea    0xe0a(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movaps %xmm3,-0x70(%rbp)
movss  0x0(%r13,%rbx,4),%xmm0
movss  (%r12,%rbx,4),%xmm2
unpcklps %xmm0,%xmm2
subps  %xmm1,%xmm2
movaps %xmm3,%xmm0
shufps $0x0,%xmm3,%xmm0
movaps %xmm2,%xmm1
divps  %xmm0,%xmm1
addps  %xmm2,%xmm1
movaps %xmm1,-0x60(%rbp)
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
movaps -0x70(%rbp),%xmm3
movss  -0x34(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
unpcklps %xmm0,%xmm1
addps  -0x60(%rbp),%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  %xmm1,-0x30(%rbp)
addss  %xmm3,%xmm3
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
cmp    %rax,%rbx
jl     1210 <main+0xf0>
jmp    1290 <main+0x170>
movss  -0x34(%rbp),%xmm0
movss  -0x30(%rbp),%xmm1
unpcklps %xmm0,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
lea    0xd7a(%rip),%rdi
call   1030 <printf@plt>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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