#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 nacepin) {
  float x_vector[1000];
  float y_vector[1000];
  float x_kord[1000];
  float y_kord[1000];
  float mass;
  int i;
  float xkrai, ykrai;
  printf("Vavedi nachalni kordinati na Pac-man\n");
  printf("x = ");
  scanf("%f", &x_kord[0]);
  printf("\n");
  printf("y = ");
  scanf("%f", &y_kord[0]);
  for (i = 1; i <= nacepin; i++) {
    printf("Vavedi kordinati na %d bidon :\n", i);
    printf("x = ");
    scanf("%f", &x_kord[i]);
    printf("\n");
    printf("y = ");
    scanf("%f", &y_kord[i]);
  }
  mass = 0.5;
  x_vector[0] = x_kord[0];
  y_vector[0] = y_kord[0];
  xkrai = 0;
  ykrai = 0;
  for (i = 1; i <= nacepin; i++) {
    mass = mass * 2;
    x_vector[i] = x_kord[i] - x_vector[i - 1];
    x_vector[i] = x_vector[i] + x_vector[i] / mass;
    y_vector[i] = y_kord[i] - y_vector[i - 1];
    y_vector[i] = y_vector[i] + y_vector[i] / mass;
    xkrai = xkrai + x_vector[i];
    ykrai = ykrai + y_vector[i];
    printf("Vektor %d :\n", i);
    printf("%.02f %.02f \n", x_vector[i], y_vector[i]);
    x_vector[i] = x_vector[i] + x_vector[i - 1];
    y_vector[i] = y_vector[i] + y_vector[i - 1];
  }
  xkrai = xkrai + x_kord[0];
  ykrai = ykrai + y_kord[0];
  printf("Kraini kordinati na Pac-man :\n");
  printf("%.02f ", xkrai);
  printf("%.02f ", ykrai);
  printf("\n");
}


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    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2ef0(%rbp),%rsi
lea    0xedb(%rip),%rdi
call   1040 <scanf@plt>
lea    0xf10(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x3e90(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x1,-0x3e98(%rbp)
mov    -0x3e98(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1239 <pac_nacepin+0x119>
mov    -0x3e98(%rbp),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x3e98(%rbp),%rax
lea    -0x2ef0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe50(%rip),%rdi
call   1040 <scanf@plt>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x3e98(%rbp),%rax
lea    -0x3e90(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe13(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x3e98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3e98(%rbp)
jmp    1196 <pac_nacepin+0x76>
movss  0xdbf(%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,-0x3e9c(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x3ea0(%rbp)
ff
movl   $0x1,-0x3e98(%rbp)
mov    -0x3e98(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1496 <pac_nacepin+0x376>
movss  0xd64(%rip),%xmm0
mulss  -0x3e94(%rbp),%xmm0
ff
movss  %xmm0,-0x3e94(%rbp)
ff
movslq -0x3e98(%rbp),%rax
movss  -0x2ef0(%rbp,%rax,4),%xmm0
ff ff
mov    -0x3e98(%rbp),%eax
sub    $0x1,%eax
cltq
subss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3e98(%rbp),%rax
movss  %xmm0,-0xfb0(%rbp,%rax,4)
ff ff
movslq -0x3e98(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3e98(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm1
ff ff
divss  -0x3e94(%rbp),%xmm1
ff
addss  %xmm1,%xmm0
movslq -0x3e98(%rbp),%rax
movss  %xmm0,-0xfb0(%rbp,%rax,4)
ff ff
movslq -0x3e98(%rbp),%rax
movss  -0x3e90(%rbp,%rax,4),%xmm0
ff ff
mov    -0x3e98(%rbp),%eax
sub    $0x1,%eax
cltq
subss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3e98(%rbp),%rax
movss  %xmm0,-0x1f50(%rbp,%rax,4)
ff ff
movslq -0x3e98(%rbp),%rax
movss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3e98(%rbp),%rax
movss  -0x1f50(%rbp,%rax,4),%xmm1
ff ff
divss  -0x3e94(%rbp),%xmm1
ff
addss  %xmm1,%xmm0
movslq -0x3e98(%rbp),%rax
movss  %xmm0,-0x1f50(%rbp,%rax,4)
ff ff
movss  -0x3e9c(%rbp),%xmm0
ff
movslq -0x3e98(%rbp),%rax
addss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0x3e9c(%rbp)
ff
movss  -0x3ea0(%rbp),%xmm0
ff
movslq -0x3e98(%rbp),%rax
addss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0x3ea0(%rbp)
ff
mov    -0x3e98(%rbp),%esi
lea    0xc7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x3e98(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
cvtss2sd %xmm0,%xmm0
movslq -0x3e98(%rbp),%rax
movss  -0x1f50(%rbp,%rax,4),%xmm1
ff ff
cvtss2sd %xmm1,%xmm1
lea    0xc55(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movslq -0x3e98(%rbp),%rax
movss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
mov    -0x3e98(%rbp),%eax
sub    $0x1,%eax
cltq
addss  -0xfb0(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3e98(%rbp),%rax
movss  %xmm0,-0xfb0(%rbp,%rax,4)
ff ff
movslq -0x3e98(%rbp),%rax
movss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
mov    -0x3e98(%rbp),%eax
sub    $0x1,%eax
cltq
addss  -0x1f50(%rbp,%rax,4),%xmm0
ff ff
movslq -0x3e98(%rbp),%rax
movss  %xmm0,-0x1f50(%rbp,%rax,4)
ff ff
mov    -0x3e98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3e98(%rbp)
jmp    1289 <pac_nacepin+0x169>
movss  -0x3e9c(%rbp),%xmm0
ff
addss  -0x2ef0(%rbp),%xmm0
ff
movss  %xmm0,-0x3e9c(%rbp)
ff
movss  -0x3ea0(%rbp),%xmm0
ff
addss  -0x3e90(%rbp),%xmm0
ff
movss  %xmm0,-0x3ea0(%rbp)
ff
lea    0xba9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x3e9c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xbae(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x3ea0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xb94(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xb65(%rip),%rdi
mov    $0x0,%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    0xef9(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe95(%rip),%rbx
lea    0xfe0(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe77(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
test   %ebp,%ebp
jle    1313 <pac_nacepin+0x1d3>
mov    %rbp,(%rsp)
add    $0x1,%ebp
lea    0x44(%rsp),%r15
lea    0xfe4(%rsp),%r12
mov    $0x1,%ebx
lea    0xe38(%rip),%r14
lea    0xe34(%rip),%r13
nopl   0x0(%rax,%rax,1)
lea    0xe2a(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe0d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
add    $0x1,%rbx
add    $0x4,%r15
add    $0x4,%r12
cmp    %rbx,%rbp
jne    11e0 <pac_nacepin+0xa0>
movss  0xfe0(%rsp),%xmm3
movss  0x40(%rsp),%xmm0
cmpl   $0x0,(%rsp)
jle    1327 <pac_nacepin+0x1e7>
unpcklps %xmm0,%xmm3
xorps  %xmm2,%xmm2
movss  0xda0(%rip),%xmm4
mov    $0x1,%ebx
lea    0xdc5(%rip),%r14
lea    0xdcb(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movaps %xmm3,0x10(%rsp)
addss  %xmm4,%xmm4
movaps %xmm4,0x30(%rsp)
movss  0x40(%rsp,%rbx,4),%xmm0
movss  0xfe0(%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,(%rsp)
addps  %xmm3,%xmm2
movaps %xmm2,0x20(%rsp)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movaps (%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm1
cvtss2sd %xmm1,%xmm1
mov    %r15,%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movaps 0x30(%rsp),%xmm4
movaps 0x10(%rsp),%xmm3
movaps 0x20(%rsp),%xmm2
addps  (%rsp),%xmm3
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1280 <pac_nacepin+0x140>
movss  0xfe0(%rsp),%xmm3
jmp    131f <pac_nacepin+0x1df>
movss  0xfe0(%rsp),%xmm3
xorps  %xmm2,%xmm2
movss  0x40(%rsp),%xmm0
jmp    132a <pac_nacepin+0x1ea>
xorps  %xmm2,%xmm2
addss  %xmm2,%xmm3
movaps %xmm3,0x10(%rsp)
shufps $0x55,%xmm2,%xmm2
addss  %xmm0,%xmm2
movaps %xmm2,0x20(%rsp)
lea    0xd31(%rip),%rdi
call   1040 <puts@plt>
movaps 0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xcf0(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movaps 0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1f88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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