#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*/ calc_travel_path(float *, float *, float *, float *,
                                    float **, float **, float *);
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  float pacMuscleWeight = 1;
  int numNacepin;
  float pX = 0;
  float pY = 0;
  scanf("%d", &numNacepin);
  scanf("%f %f", &pX, &pY);
  float nacepinCans[numNacepin];
  int i;
  float nacX, nacY;
  for (i = 0; i < numNacepin; i++) {
    scanf("%f %f", &nacX, &nacY);
    nacepinCans[i] = nacX * 10 + nacY;
  }
  float travelVector[2];
  float slideVector[2];
  float translocVector[2];
  int curNacepin = 0;
  while (curNacepin < numNacepin) {
    nacX = (int)nacepinCans[curNacepin] / 10;
    nacY = (int)nacepinCans[curNacepin] % 10;
    calc_travel_path(&pX, &pY, &nacX, &nacY, &travelVector, &slideVector,
                     &pacMuscleWeight);
    translocVector[0] = (travelVector[0] + slideVector[0]);
    translocVector[1] = (travelVector[1] + slideVector[1]);
    pX += translocVector[0];
    pY += translocVector[1];
    printf("%.2f %.2f\n", translocVector[0], translocVector[1]);
    pacMuscleWeight *= 2;
    curNacepin++;
  }
  printf("%.2f %.2f", pX, pY);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3f800000,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xead(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x59(%rbp)
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x59(%rbp),%al
lea    0xe98(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0xc(%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,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1205 <main+0xd5>
lea    0xe4a(%rip),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x34(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x58(%rbp),%rax
movss  -0x30(%rbp),%xmm0
movss  -0x34(%rbp),%xmm1
movss  0xe1e(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movslq -0x2c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11ae <main+0x7e>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12f5 <main+0x1c5>
mov    -0x58(%rbp),%rax
movslq -0x50(%rbp),%rcx
cvttss2si (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x58(%rbp),%rax
cvtsi2ss %ecx,%xmm0
movss  %xmm0,-0x30(%rbp)
movslq -0x50(%rbp),%rcx
cvttss2si (%rax,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cvtsi2ss %edx,%xmm0
movss  %xmm0,-0x34(%rbp)
lea    -0x3c(%rbp),%r8
lea    -0x44(%rbp),%r9
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x34(%rbp),%rcx
lea    -0x8(%rbp),%rax
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1040 <calc_travel_path@plt>
add    $0x10,%rsp
movss  -0x3c(%rbp),%xmm0
addss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x4c(%rbp)
movss  -0x38(%rbp),%xmm0
addss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x4c(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x48(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4c(%rbp),%xmm0
movss  -0x48(%rbp),%xmm1
lea    0xd41(%rip),%rdi
call   1030 <printf@plt>
movss  0xd23(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    120c <main+0xdc>
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    0xd16(%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    $0x38,%rsp
movl   $0x3f800000,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x34(%rbp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xe98(%rip),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rsp,-0x58(%rbp)
mov    -0x34(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
cmpl   $0x0,-0x34(%rbp)
jle    12ca <main+0x19a>
lea    0xe5c(%rip),%r14
lea    -0x3c(%rbp),%r15
lea    -0x38(%rbp),%r13
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movss  -0x3c(%rbp),%xmm0
mulss  0xe23(%rip),%xmm0
addss  -0x38(%rbp),%xmm0
movss  %xmm0,(%r12,%rbx,4)
add    $0x1,%rbx
movslq -0x34(%rbp),%rax
cmp    %rax,%rbx
jl     11c0 <main+0x90>
test   %eax,%eax
jle    12ca <main+0x19a>
xor    %r13d,%r13d
lea    -0x50(%rbp),%rbx
lea    -0x48(%rbp),%r14
lea    0xdfe(%rip),%r15
nop
cvttss2si (%r12,%r13,4),%eax
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
movss  %xmm0,-0x3c(%rbp)
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x38(%rbp)
sub    $0x8,%rsp
lea    -0x30(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x3c(%rbp),%rdx
lea    -0x38(%rbp),%rcx
mov    %rbx,%r8
mov    %r14,%r9
lea    -0x40(%rbp),%rax
push   %rax
call   1040 <calc_travel_path@plt>
add    $0x10,%rsp
movss  -0x50(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm1
addss  -0x48(%rbp),%xmm0
addss  -0x44(%rbp),%xmm1
movss  -0x30(%rbp),%xmm2
addss  %xmm0,%xmm2
movss  %xmm2,-0x30(%rbp)
movss  -0x2c(%rbp),%xmm2
addss  %xmm1,%xmm2
movss  %xmm2,-0x2c(%rbp)
mov    %r15,%rdi
call   1030 <printf@plt>
movss  -0x40(%rbp),%xmm0
addss  %xmm0,%xmm0
movss  %xmm0,-0x40(%rbp)
add    $0x1,%r13
movslq -0x34(%rbp),%rax
cmp    %rax,%r13
jl     1210 <main+0xe0>
movss  -0x30(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
lea    0xd3d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x58(%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 = [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 i32
%4 = alloca float
%5 = alloca float
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
%9 = alloca float
%10 = alloca float
%11 = alloca [2 x float]
%12 = alloca [2 x float]
%13 = alloca [2 x float]
%14 = alloca i32
store i32 0, i32* %1
store float 1.000000e+00, float* %2
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %4, float* %5)
%17 = load i32, i32* %3
%18 = zext i32 %17 to i64
%19 = call i8* @llvm.stacksave()
store i8* %19, i8** %6
%20 = alloca float, i64 %18
store i64 %18, i64* %7
store i32 0, i32* %8
br label %21
21: ; preds = %33, %0
%22 = load i32, i32* %8
%23 = load i32, i32* %3
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %36
25: ; preds = %21
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %9, float* %10)
%27 = load float, float* %9
%28 = load float, float* %10
%29 = call float @llvm.fmuladd.f32(float %27, float 1.000000e+01, float %28)
%30 = load i32, i32* %8
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds float, float* %20, i64 %31
store float %29, float* %32
br label %33
33: ; preds = %25
%34 = load i32, i32* %8
%35 = add nsw i32 %34, 1
store i32 %35, i32* %8
br label %21
36: ; preds = %21
store i32 0, i32* %14
br label %37
37: ; preds = %41, %36
%38 = load i32, i32* %14
%39 = load i32, i32* %3
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %88
41: ; preds = %37
%42 = load i32, i32* %14
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds float, float* %20, i64 %43
%45 = load float, float* %44
%46 = fptosi float %45 to i32
%47 = sdiv i32 %46, 10
%48 = sitofp i32 %47 to float
store float %48, float* %9
%49 = load i32, i32* %14
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds float, float* %20, i64 %50
%52 = load float, float* %51
%53 = fptosi float %52 to i32
%54 = srem i32 %53, 10
%55 = sitofp i32 %54 to float
store float %55, float* %10
%56 = bitcast [2 x float]* %11 to float**
%57 = bitcast [2 x float]* %12 to float**
%58 = call i32 @calc_travel_path(float* %4, float* %5, float* %9, float* %10, float** %56, float** %57, float* %2)
%59 = getelementptr inbounds [2 x float], [2 x float]* %11, i64 0, i64 0
%60 = load float, float* %59
%61 = getelementptr inbounds [2 x float], [2 x float]* %12, i64 0, i64 0
%62 = load float, float* %61
%63 = fadd float %60, %62
%64 = getelementptr inbounds [2 x float], [2 x float]* %13, i64 0, i64 0
store float %63, float* %64
%65 = getelementptr inbounds [2 x float], [2 x float]* %11, i64 0, i64 1
%66 = load float, float* %65
%67 = getelementptr inbounds [2 x float], [2 x float]* %12, i64 0, i64 1
%68 = load float, float* %67
%69 = fadd float %66, %68
%70 = getelementptr inbounds [2 x float], [2 x float]* %13, i64 0, i64 1
store float %69, float* %70
%71 = getelementptr inbounds [2 x float], [2 x float]* %13, i64 0, i64 0
%72 = load float, float* %71
%73 = load float, float* %4
%74 = fadd float %73, %72
store float %74, float* %4
%75 = getelementptr inbounds [2 x float], [2 x float]* %13, i64 0, i64 1
%76 = load float, float* %75
%77 = load float, float* %5
%78 = fadd float %77, %76
store float %78, float* %5
%79 = getelementptr inbounds [2 x float], [2 x float]* %13, i64 0, i64 0
%80 = load float, float* %79
%81 = getelementptr inbounds [2 x float], [2 x float]* %13, i64 0, i64 1
%82 = load float, float* %81
%83 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %80, float %82)
%84 = load float, float* %2
%85 = fmul float %84, 2.000000e+00
store float %85, float* %2
%86 = load i32, i32* %14
%87 = add nsw i32 %86, 1
store i32 %87, i32* %14
br label %37
88: ; preds = %37
%89 = load float, float* %4
%90 = load float, float* %5
%91 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), float %89, float %90)
store i32 0, i32* %1
%92 = load i8*, i8** %6
%93 = load i32, i32* %1
ret i32 %93
}

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 float
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float*
%8 = bitcast float** %7 to [2 x float]*
%9 = alloca float*
%10 = bitcast float** %9 to [2 x float]*
%11 = bitcast float* %1 to i8*
store float 1.000000e+00, float* %1
%12 = bitcast i32* %2 to i8*
%13 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%14 = bitcast float* %4 to i8*
store float 0.000000e+00, float* %4
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %3, float* %4)
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = call i8* @llvm.stacksave()
%20 = alloca float, i64 %18
%21 = bitcast float* %5 to i8*
%22 = bitcast float* %6 to i8*
%23 = load i32, i32* %2
%24 = icmp sgt i32 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %0
%26 = bitcast float** %7 to i8*
%27 = bitcast float** %9 to i8*
br label %75
28: ; preds = %0, %28
%29 = phi i64 [ %35, %28 ], [ 0, %0 ]
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %5, float* %6)
%31 = load float, float* %5
%32 = load float, float* %6
%33 = call float @llvm.fmuladd.f32(float %31, float 1.000000e+01, float %32)
%34 = getelementptr inbounds float, float* %20, i64 %29
store float %33, float* %34
%35 = add nuw nsw i64 %29, 1
%36 = load i32, i32* %2
%37 = sext i32 %36 to i64
%38 = icmp slt i64 %35, %37
br i1 %38, label %28, label %39
39: ; preds = %28
%40 = bitcast float** %7 to i8*
%41 = bitcast float** %9 to i8*
%42 = icmp sgt i32 %36, 0
br i1 %42, label %43, label %75
43: ; preds = %39
%44 = bitcast float** %7 to float*
%45 = bitcast float** %9 to float*
%46 = getelementptr inbounds [2 x float], [2 x float]* %8, i64 0, i64 1
%47 = getelementptr inbounds [2 x float], [2 x float]* %10, i64 0, i64 1
br label %48
48: ; preds = %43, %48
%49 = phi i64 [ 0, %43 ], [ %71, %48 ]
%50 = getelementptr inbounds float, float* %20, i64 %49
%51 = load float, float* %50
%52 = fptosi float %51 to i32
%53 = sdiv i32 %52, 10
%54 = sitofp i32 %53 to float
store float %54, float* %5
%55 = srem i32 %52, 10
%56 = sitofp i32 %55 to float
store float %56, float* %6
%57 = call i32 @calc_travel_path(float* %3, float* %4, float* %5, float* %6, float** %7, float** %9, float* %1)
%58 = load float, float* %44
%59 = load float, float* %45
%60 = fadd float %58, %59
%61 = load float, float* %46
%62 = load float, float* %47
%63 = fadd float %61, %62
%64 = load float, float* %3
%65 = fadd float %60, %64
store float %65, float* %3
%66 = load float, float* %4
%67 = fadd float %63, %66
store float %67, float* %4
%68 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %60, float %63)
%69 = load float, float* %1
%70 = fmul float %69, 2.000000e+00
store float %70, float* %1
%71 = add nuw nsw i64 %49, 1
%72 = load i32, i32* %2
%73 = sext i32 %72 to i64
%74 = icmp slt i64 %71, %73
br i1 %74, label %48, label %75
75: ; preds = %48, %25, %39
%76 = bitcast float** %7 to i8*
%77 = bitcast float** %9 to i8*
%78 = load float, float* %3
%79 = load float, float* %4
%80 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), float %78, float %79)
ret i32 0
}