#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 n, i, mass = 1;
  float pac_man_x, pac_man_y, vector_x, vector_y, slider;
  scanf("%d", &n);
  while (n < 1)
    printf("Write real number of NACEPINS: ");
  float nacepin_x[n];
  float nacepin_y[n];
  scanf("%f", &pac_man_x);
  scanf("%f", &pac_man_y);
  for (i = 0; i < n; i++) {
    scanf("%f", &nacepin_x[i]);
    scanf("%f", &nacepin_y[i]);
  }
  for (i = 0; i < n; i++) {
    vector_x = nacepin_x[i] - pac_man_x;
    slider = vector_x / mass;
    vector_x += slider;
    vector_y = nacepin_y[i] - pac_man_y;
    slider = vector_y / mass;
    vector_y += slider;
    pac_man_x += vector_x;
    pac_man_y += vector_y;
    mass *= 2;
    printf("%.2f %.2f \n", vector_x, vector_y);
  }
  printf("%.2f %.2f \n", pac_man_x, pac_man_y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x1,-0x8(%rbp)
jge    1165 <main+0x45>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1148 <main+0x28>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%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,-0x40(%rbp)
lea    0xe70(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe5e(%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    122b <main+0x10b>
mov    -0x50(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x48(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d7 <main+0xb7>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1305 <main+0x1e5>
mov    -0x48(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movss  (%rcx,%rdx,4),%xmm0
subss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x20(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd36(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1232 <main+0x112>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd08(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x30(%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    $0x28,%rsp
lea    0xec8(%rip),%rdi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jg     1171 <main+0x51>
lea    0xeb2(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jle    1160 <main+0x40>
mov    %rsp,-0x48(%rbp)
mov    %eax,%eax
mov    %rsp,%r15
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    -0x2c(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
lea    0xe78(%rip),%rbx
lea    -0x34(%rbp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    -0x30(%rbp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    12b7 <main+0x197>
lea    0xe4b(%rip),%r14
mov    %r15,-0x40(%rbp)
mov    %r12,%rbx
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%r13
movslq -0x2c(%rbp),%rax
add    $0x4,%rbx
add    $0x4,%r15
cmp    %rax,%r13
jl     11f0 <main+0xd0>
test   %eax,%eax
mov    -0x40(%rbp),%r13
jle    12b7 <main+0x197>
mov    $0x1,%r15d
xor    %ebx,%ebx
lea    0xdec(%rip),%r14
nopw   0x0(%rax,%rax,1)
movss  0x0(%r13,%rbx,4),%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %r15d,%xmm1
movss  -0x34(%rbp),%xmm2
subss  %xmm2,%xmm0
movaps %xmm0,%xmm3
divss  %xmm1,%xmm3
addss  %xmm0,%xmm3
movss  (%r12,%rbx,4),%xmm0
movss  -0x30(%rbp),%xmm4
subss  %xmm4,%xmm0
movaps %xmm0,%xmm5
divss  %xmm1,%xmm5
addss  %xmm0,%xmm5
addss  %xmm3,%xmm2
movss  %xmm2,-0x34(%rbp)
addss  %xmm5,%xmm4
movss  %xmm4,-0x30(%rbp)
add    %r15d,%r15d
xorps  %xmm0,%xmm0
cvtss2sd %xmm3,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm5,%xmm1
mov    %r14,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
cmp    %rax,%rbx
jl     1240 <main+0x120>
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x30(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd56(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%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 = [32 x i8] c"Write real number of NACEPINS: \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [12 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 float
%8 = alloca float
%9 = alloca float
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
store i32 0, i32* %1
store i32 1, i32* %4
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %14
14: ; preds = %17, %0
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %14
19: ; preds = %14
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
%22 = call i8* @llvm.stacksave()
store i8* %22, i8** %10
%23 = alloca float, i64 %21
store i64 %21, i64* %11
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
%26 = alloca float, i64 %25
store i64 %25, i64* %12
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %5)
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %6)
store i32 0, i32* %3
br label %29
29: ; preds = %42, %19
%30 = load i32, i32* %3
%31 = load i32, i32* %2
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %45
33: ; preds = %29
%34 = load i32, i32* %3
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds float, float* %23, i64 %35
%37 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %36)
%38 = load i32, i32* %3
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds float, float* %26, i64 %39
%41 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %40)
br label %42
42: ; preds = %33
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %29
45: ; preds = %29
store i32 0, i32* %3
br label %46
46: ; preds = %90, %45
%47 = load i32, i32* %3
%48 = load i32, i32* %2
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %93
50: ; preds = %46
%51 = load i32, i32* %3
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds float, float* %23, i64 %52
%54 = load float, float* %53
%55 = load float, float* %5
%56 = fsub float %54, %55
store float %56, float* %7
%57 = load float, float* %7
%58 = load i32, i32* %4
%59 = sitofp i32 %58 to float
%60 = fdiv float %57, %59
store float %60, float* %9
%61 = load float, float* %9
%62 = load float, float* %7
%63 = fadd float %62, %61
store float %63, float* %7
%64 = load i32, i32* %3
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds float, float* %26, i64 %65
%67 = load float, float* %66
%68 = load float, float* %6
%69 = fsub float %67, %68
store float %69, float* %8
%70 = load float, float* %8
%71 = load i32, i32* %4
%72 = sitofp i32 %71 to float
%73 = fdiv float %70, %72
store float %73, float* %9
%74 = load float, float* %9
%75 = load float, float* %8
%76 = fadd float %75, %74
store float %76, float* %8
%77 = load float, float* %7
%78 = load float, float* %5
%79 = fadd float %78, %77
store float %79, float* %5
%80 = load float, float* %8
%81 = load float, float* %6
%82 = fadd float %81, %80
store float %82, float* %6
%83 = load i32, i32* %4
%84 = mul nsw i32 %83, 2
store i32 %84, i32* %4
%85 = load float, float* %7
%86 = fpext float %85 to double
%87 = load float, float* %8
%88 = fpext float %87 to double
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %86, double %88)
br label %90
90: ; preds = %50
%91 = load i32, i32* %3
%92 = add nsw i32 %91, 1
store i32 %92, i32* %3
br label %46
93: ; preds = %46
%94 = load float, float* %5
%95 = fpext float %94 to double
%96 = load float, float* %6
%97 = fpext float %96 to double
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %95, double %97)
store i32 0, i32* %1
%99 = load i8*, i8** %10
%100 = load i32, i32* %1
ret i32 %100
}

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