#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 *, float *);
pac_nacepin(int nace) {
  float vec_x[1000], vec_y[1000], coor_x[1000], coor_y[1000];
  float m, end_x, end_y;
  int i;
  printf("Enter starting position of Pac-man\n");
  printf("x = ");
  scanf("%f", &coor_x[0]);
  printf("y = ");
  scanf("%f", &coor_y[0]);
  for (i = 1; i <= nace; i++) {
    printf("Enter coordinates of %d nacepin :\n", i);
    printf("x = ");
    scanf("%f", &coor_x[i]);
    printf("y = ");
    scanf("%f", &coor_y[i]);
  }
  m = 0.5;
  vec_x[0] = coor_x[0];
  vec_y[0] = coor_y[0];
  end_x = 0;
  end_y = 0;
  for (i = 1; i <= nace; i++) {
    m = m * 2;
    vec_x[i] = coor_x[i] - vec_x[i - 1];
    vec_x[i] = vec_x[i] + vec_x[i] / m;
    vec_y[i] = coor_y[i] - vec_y[i - 1];
    vec_y[i] = vec_y[i] + vec_y[i] / m;
    end_x = end_x + vec_x[i];
    end_y = end_y + vec_y[i];
    printf("Vector %d :", i);
    printf("(%.02f ; %.02f)\n ", vec_x[i], vec_y[i]);
    vec_x[i] = vec_x[i] + vec_x[i - 1];
    vec_y[i] = vec_y[i] + vec_y[i - 1];
  }
  end_x = end_x + coor_x[0];
  end_x = end_y + coor_y[0];
  printf("Target coordinates of Pac-man :");
  printf("(%.02f ; ", end_x);
  printf("%.02f) \n", end_y);
}


x86 assembly (clang, -O0):
<pac_nacepin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3ea0,%rsp
mov    %edi,-0x8(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2ef0(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1040 <scanf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x3e90(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x1,-0x3ea0(%rbp)
mov    -0x3ea0(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     121d <pac_nacepin+0xfd>
mov    -0x3ea0(%rbp),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x3ea0(%rbp),%rax
lea    -0x2ef0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe5c(%rip),%rdi
call   1040 <scanf@plt>
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x3ea0(%rbp),%rax
lea    -0x3e90(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe2d(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x3ea0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3ea0(%rbp)
jmp    1188 <pac_nacepin+0x68>
movss  0xddb(%rip),%xmm0
movss  %xmm0,-0x3e94(%rbp)
ff
movss  -0x2ef0(%rbp),%xmm0
ff
movss  %xmm0,-0xfb0(%rbp)
ff
movss  -0x3e90(%rbp),%xmm0
ff
movss  %xmm0,-0x1f50(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3e98(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3e9c(%rbp)
ff
movl   $0x1,-0x3ea0(%rbp)
mov    -0x3ea0(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     147a <pac_nacepin+0x35a>
movss  0xd80(%rip),%xmm0
mulss  -0x3e94(%rbp),%xmm0
ff
movss  %xmm0,-0x3e94(%rbp)
ff
movslq -0x3ea0(%rbp),%rax
movss  -0x2ef0(%rbp,%rax,4),%xmm0
ff ff
mov    -0x3ea0(%rbp),%eax
sub    $0x1,%eax
cltq
subss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3ea0(%rbp),%rax
movss  %xmm0,-0xfb0(%rbp,%rax,4)
ff ff
movslq -0x3ea0(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3ea0(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm1
ff ff
divss  -0x3e94(%rbp),%xmm1
ff
addss  %xmm1,%xmm0
movslq -0x3ea0(%rbp),%rax
movss  %xmm0,-0xfb0(%rbp,%rax,4)
ff ff
movslq -0x3ea0(%rbp),%rax
movss  -0x3e90(%rbp,%rax,4),%xmm0
ff ff
mov    -0x3ea0(%rbp),%eax
sub    $0x1,%eax
cltq
subss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3ea0(%rbp),%rax
movss  %xmm0,-0x1f50(%rbp,%rax,4)
ff ff
movslq -0x3ea0(%rbp),%rax
movss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3ea0(%rbp),%rax
movss  -0x1f50(%rbp,%rax,4),%xmm1
ff ff
divss  -0x3e94(%rbp),%xmm1
ff
addss  %xmm1,%xmm0
movslq -0x3ea0(%rbp),%rax
movss  %xmm0,-0x1f50(%rbp,%rax,4)
ff ff
movss  -0x3e98(%rbp),%xmm0
ff
movslq -0x3ea0(%rbp),%rax
addss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0x3e98(%rbp)
ff
movss  -0x3e9c(%rbp),%xmm0
ff
movslq -0x3ea0(%rbp),%rax
addss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0x3e9c(%rbp)
ff
mov    -0x3ea0(%rbp),%esi
lea    0xc9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x3ea0(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
cvtss2sd %xmm0,%xmm0
movslq -0x3ea0(%rbp),%rax
movss  -0x1f50(%rbp,%rax,4),%xmm1
ff ff
cvtss2sd %xmm1,%xmm1
lea    0xc71(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movslq -0x3ea0(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
mov    -0x3ea0(%rbp),%eax
sub    $0x1,%eax
cltq
addss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3ea0(%rbp),%rax
movss  %xmm0,-0xfb0(%rbp,%rax,4)
ff ff
movslq -0x3ea0(%rbp),%rax
movss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
mov    -0x3ea0(%rbp),%eax
sub    $0x1,%eax
cltq
addss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3ea0(%rbp),%rax
movss  %xmm0,-0x1f50(%rbp,%rax,4)
ff ff
mov    -0x3ea0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3ea0(%rbp)
jmp    126d <pac_nacepin+0x14d>
movss  -0x3e98(%rbp),%xmm0
ff
addss  -0x2ef0(%rbp),%xmm0
ff
movss  %xmm0,-0x3e98(%rbp)
ff
movss  -0x3e9c(%rbp),%xmm0
ff
addss  -0x3e90(%rbp),%xmm0
ff
movss  %xmm0,-0x3e98(%rbp)
ff
lea    0xbc9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x3e98(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xbcf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x3e9c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xbbf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x3ea0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pac_nacepin>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1f88,%rsp
mov    %edi,%ebp
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea5(%rip),%rbx
lea    0xfe0(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xe91(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
test   %ebp,%ebp
jle    12e0 <pac_nacepin+0x1b0>
mov    %rbp,0x10(%rsp)
add    $0x1,%ebp
lea    0x44(%rsp),%r15
lea    0xfe4(%rsp),%r12
mov    $0x1,%ebx
lea    0xe51(%rip),%r14
lea    0xe4d(%rip),%r13
nop
lea    0xe4a(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe2d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
add    $0x1,%rbx
add    $0x4,%r15
add    $0x4,%r12
cmp    %rbx,%rbp
jne    11c0 <pac_nacepin+0x90>
movss  0x40(%rsp),%xmm3
cmpl   $0x0,0x10(%rsp)
jle    12eb <pac_nacepin+0x1bb>
movss  0xfe0(%rsp),%xmm0
unpcklps %xmm0,%xmm3
movss  0xdcc(%rip),%xmm4
xorps  %xmm2,%xmm2
mov    $0x1,%ebx
lea    0xdf1(%rip),%r14
lea    0xdf6(%rip),%r15
nopw   0x0(%rax,%rax,1)
movaps %xmm3,0x20(%rsp)
addss  %xmm4,%xmm4
movaps %xmm4,0x30(%rsp)
movss  0xfe0(%rsp,%rbx,4),%xmm0
movss  0x40(%rsp,%rbx,4),%xmm1
unpcklps %xmm0,%xmm1
subps  %xmm3,%xmm1
movaps %xmm4,%xmm0
shufps $0x0,%xmm4,%xmm0
movaps %xmm1,%xmm3
divps  %xmm0,%xmm3
addps  %xmm1,%xmm3
movaps %xmm3,0x10(%rsp)
addss  %xmm3,%xmm2
movss  %xmm2,0xc(%rsp)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movaps 0x10(%rsp),%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mov    %r15,%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movaps 0x30(%rsp),%xmm4
movaps 0x20(%rsp),%xmm3
movss  0xc(%rsp),%xmm2
addps  0x10(%rsp),%xmm3
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1250 <pac_nacepin+0x120>
jmp    12e3 <pac_nacepin+0x1b3>
xorps  %xmm2,%xmm2
movss  0x40(%rsp),%xmm3
jmp    12ee <pac_nacepin+0x1be>
xorps  %xmm2,%xmm2
movss  %xmm2,0xc(%rsp)
addss  %xmm2,%xmm3
movaps %xmm3,0x20(%rsp)
lea    0xd4e(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movaps 0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd57(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd49(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1f88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Enter starting position of Pac-man\0A\00"
@.str.1 = [5 x i8] c"x = \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [5 x i8] c"y = \00"
@.str.4 = [35 x i8] c"Enter coordinates of %d nacepin :\0A\00"
@.str.5 = [12 x i8] c"Vector %d :\00"
@.str.6 = [18 x i8] c"(%.02f ; %.02f)\0A \00"
@.str.7 = [32 x i8] c"Target coordinates of Pac-man :\00"
@.str.8 = [10 x i8] c"(%.02f ; \00"
@.str.9 = [9 x i8] c"%.02f) \0A\00"
define i32 @pac_nacepin(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1000 x float]
%5 = alloca [1000 x float]
%6 = alloca [1000 x float]
%7 = alloca [1000 x float]
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca i32
store i32 %0, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%14 = getelementptr inbounds [1000 x float], [1000 x float]* %6, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%17 = getelementptr inbounds [1000 x float], [1000 x float]* %7, i64 0, i64 0
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %17)
store i32 1, i32* %11
br label %19
19: ; preds = %36, %1
%20 = load i32, i32* %11
%21 = load i32, i32* %3
%22 = icmp sle i32 %20, %21
br i1 %22, label %23, label %39
23: ; preds = %19
%24 = load i32, i32* %11
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %24)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%27 = load i32, i32* %11
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [1000 x float], [1000 x float]* %6, i64 0, i64 %28
%30 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %29)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%32 = load i32, i32* %11
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [1000 x float], [1000 x float]* %7, i64 0, i64 %33
%35 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %34)
br label %36
36: ; preds = %23
%37 = load i32, i32* %11
%38 = add nsw i32 %37, 1
store i32 %38, i32* %11
br label %19
39: ; preds = %19
store float 5.000000e-01, float* %8
%40 = getelementptr inbounds [1000 x float], [1000 x float]* %6, i64 0, i64 0
%41 = load float, float* %40
%42 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 0
store float %41, float* %42
%43 = getelementptr inbounds [1000 x float], [1000 x float]* %7, i64 0, i64 0
%44 = load float, float* %43
%45 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 0
store float %44, float* %45
store float 0.000000e+00, float* %9
store float 0.000000e+00, float* %10
store i32 1, i32* %11
br label %46
46: ; preds = %158, %39
%47 = load i32, i32* %11
%48 = load i32, i32* %3
%49 = icmp sle i32 %47, %48
br i1 %49, label %50, label %161
50: ; preds = %46
%51 = load float, float* %8
%52 = fmul float %51, 2.000000e+00
store float %52, float* %8
%53 = load i32, i32* %11
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [1000 x float], [1000 x float]* %6, i64 0, i64 %54
%56 = load float, float* %55
%57 = load i32, i32* %11
%58 = sub nsw i32 %57, 1
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %59
%61 = load float, float* %60
%62 = fsub float %56, %61
%63 = load i32, i32* %11
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %64
store float %62, float* %65
%66 = load i32, i32* %11
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %67
%69 = load float, float* %68
%70 = load i32, i32* %11
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %71
%73 = load float, float* %72
%74 = load float, float* %8
%75 = fdiv float %73, %74
%76 = fadd float %69, %75
%77 = load i32, i32* %11
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %78
store float %76, float* %79
%80 = load i32, i32* %11
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [1000 x float], [1000 x float]* %7, i64 0, i64 %81
%83 = load float, float* %82
%84 = load i32, i32* %11
%85 = sub nsw i32 %84, 1
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %86
%88 = load float, float* %87
%89 = fsub float %83, %88
%90 = load i32, i32* %11
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %91
store float %89, float* %92
%93 = load i32, i32* %11
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %94
%96 = load float, float* %95
%97 = load i32, i32* %11
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %98
%100 = load float, float* %99
%101 = load float, float* %8
%102 = fdiv float %100, %101
%103 = fadd float %96, %102
%104 = load i32, i32* %11
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %105
store float %103, float* %106
%107 = load float, float* %9
%108 = load i32, i32* %11
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %109
%111 = load float, float* %110
%112 = fadd float %107, %111
store float %112, float* %9
%113 = load float, float* %10
%114 = load i32, i32* %11
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %115
%117 = load float, float* %116
%118 = fadd float %113, %117
store float %118, float* %10
%119 = load i32, i32* %11
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %119)
%121 = load i32, i32* %11
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %122
%124 = load float, float* %123
%125 = fpext float %124 to double
%126 = load i32, i32* %11
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %127
%129 = load float, float* %128
%130 = fpext float %129 to double
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), double %125, double %130)
%132 = load i32, i32* %11
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %133
%135 = load float, float* %134
%136 = load i32, i32* %11
%137 = sub nsw i32 %136, 1
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %138
%140 = load float, float* %139
%141 = fadd float %135, %140
%142 = load i32, i32* %11
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [1000 x float], [1000 x float]* %4, i64 0, i64 %143
store float %141, float* %144
%145 = load i32, i32* %11
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %146
%148 = load float, float* %147
%149 = load i32, i32* %11
%150 = sub nsw i32 %149, 1
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %151
%153 = load float, float* %152
%154 = fadd float %148, %153
%155 = load i32, i32* %11
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds [1000 x float], [1000 x float]* %5, i64 0, i64 %156
store float %154, float* %157
br label %158
158: ; preds = %50
%159 = load i32, i32* %11
%160 = add nsw i32 %159, 1
store i32 %160, i32* %11
br label %46
161: ; preds = %46
%162 = load float, float* %9
%163 = getelementptr inbounds [1000 x float], [1000 x float]* %6, i64 0, i64 0
%164 = load float, float* %163
%165 = fadd float %162, %164
store float %165, float* %9
%166 = load float, float* %10
%167 = getelementptr inbounds [1000 x float], [1000 x float]* %7, i64 0, i64 0
%168 = load float, float* %167
%169 = fadd float %166, %168
store float %169, float* %9
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%171 = load float, float* %9
%172 = fpext float %171 to double
%173 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), double %172)
%174 = load float, float* %10
%175 = fpext float %174 to double
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %175)
%177 = load i32, i32* %2
ret i32 %177
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"x = \00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [5 x i8] c"y = \00"
@.str.4 = [35 x i8] c"Enter coordinates of %d nacepin :\0A\00"
@.str.5 = [12 x i8] c"Vector %d :\00"
@.str.6 = [18 x i8] c"(%.02f ; %.02f)\0A \00"
@.str.7 = [32 x i8] c"Target coordinates of Pac-man :\00"
@.str.8 = [10 x i8] c"(%.02f ; \00"
@.str.9 = [9 x i8] c"%.02f) \0A\00"
@str = [35 x i8] c"Enter starting position of Pac-man\00"
define i32 @pac_nacepin(i32 %0) {
%2 = alloca [1000 x float]
%3 = alloca [1000 x float]
%4 = bitcast [1000 x float]* %2 to i8*
%5 = bitcast [1000 x float]* %3 to i8*
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [1000 x float], [1000 x float]* %2, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%11 = getelementptr inbounds [1000 x float], [1000 x float]* %3, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %11)
%13 = icmp slt i32 %0, 1
br i1 %13, label %14, label %16
14: ; preds = %1
%15 = load float, float* %11
br label %69
16: ; preds = %1
%17 = add nuw i32 %0, 1
%18 = zext i32 %17 to i64
br label %19
19: ; preds = %16, %19
%20 = phi i64 [ 1, %16 ], [ %29, %19 ]
%21 = trunc i64 %20 to i32
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %21)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%24 = getelementptr inbounds [1000 x float], [1000 x float]* %2, i64 0, i64 %20
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %24)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%27 = getelementptr inbounds [1000 x float], [1000 x float]* %3, i64 0, i64 %20
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %27)
%29 = add nuw nsw i64 %20, 1
%30 = icmp eq i64 %29, %18
br i1 %30, label %31, label %19
31: ; preds = %19
%32 = load float, float* %11
br i1 %13, label %69, label %33
33: ; preds = %31
%34 = load float, float* %8
%35 = add nuw i32 %0, 1
%36 = zext i32 %35 to i64
%37 = insertelement <2 x float> poison, float %32, i64 0
%38 = insertelement <2 x float> %37, float %34, i64 1
br label %39
39: ; preds = %33, %39
%40 = phi i64 [ 1, %33 ], [ %65, %39 ]
%41 = phi float [ 0.000000e+00, %33 ], [ %57, %39 ]
%42 = phi float [ 5.000000e-01, %33 ], [ %44, %39 ]
%43 = phi <2 x float> [ %38, %33 ], [ %64, %39 ]
%44 = fmul float %42, 2.000000e+00
%45 = getelementptr inbounds [1000 x float], [1000 x float]* %2, i64 0, i64 %40
%46 = load float, float* %45
%47 = getelementptr inbounds [1000 x float], [1000 x float]* %3, i64 0, i64 %40
%48 = load float, float* %47
%49 = insertelement <2 x float> poison, float %48, i64 0
%50 = insertelement <2 x float> %49, float %46, i64 1
%51 = fsub <2 x float> %50, %43
%52 = insertelement <2 x float> poison, float %44, i64 0
%53 = shufflevector <2 x float> %52, <2 x float> poison, <2 x i32> zeroinitializer
%54 = fdiv <2 x float> %51, %53
%55 = fadd <2 x float> %51, %54
%56 = extractelement <2 x float> %55, i64 0
%57 = fadd float %41, %56
%58 = trunc i64 %40 to i32
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %58)
%60 = extractelement <2 x float> %55, i64 1
%61 = fpext float %60 to double
%62 = fpext float %56 to double
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), double %61, double %62)
%64 = fadd <2 x float> %55, %43
%65 = add nuw nsw i64 %40, 1
%66 = icmp eq i64 %65, %36
br i1 %66, label %67, label %39
67: ; preds = %39
%68 = load float, float* %11
br label %69
69: ; preds = %14, %67, %31
%70 = phi float [ %32, %31 ], [ %68, %67 ], [ %15, %14 ]
%71 = phi float [ 0.000000e+00, %31 ], [ %57, %67 ], [ 0.000000e+00, %14 ]
%72 = fadd float %71, %70
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%74 = fpext float %72 to double
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), double %74)
%76 = fpext float %71 to double
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), double %76)
ret i32 undef
}