#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 */
scalar_t__ pow(float, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
float sqrt(scalar_t__);
void main() {
  int ar_uf, i, flag = 0;
  float min_dis, X[200], Y[200], X_center = 0, Y_center = 0, max_dis = 0,
                                 riza_xy, R, x, y, center_dis, uf_dis;
  do {
    printf("Enter number of shelfs: ");
    scanf("%d", &ar_uf);
    if (ar_uf <= 0 || ar_uf > 200)
      printf("Number of shelfs must be 0 and %d\n", 200);
  } while (ar_uf <= 0 || ar_uf > 200);
  do {
    printf("Enter minimum safe distance: ");
    scanf("%f", &min_dis);
    if (min_dis < 0)
      printf("Minimum safe distance must be positive or zero/n");
  } while (min_dis < 0);
  for (i = 0; i < ar_uf; i++) {
    printf("Enter coordinate X of shelf: ");
    scanf("%f", &X[i]);
    printf("Enter coordinate Y of shelf: ");
    scanf("%f", &Y[i]);
    X_center += (X[i] / ar_uf);
    Y_center += (Y[i] / ar_uf);
  }
  for (i = 0; i < ar_uf; i++) {
    riza_xy = sqrt(pow((X[i] - X_center), 2) + pow((Y[i] - Y_center), 2));
    if (riza_xy > max_dis)
      max_dis = riza_xy;
  }
  R = max_dis + min_dis;
  for (;;) {
    int ep_uf = 0;
    printf("Enter coordinate X of ship: ");
    scanf("%f", &x);
    printf("Enter coordinate Y of ship: ");
    scanf("%f", &y);
    center_dis = sqrt(pow((X_center - x), 2) + pow((Y_center - y), 2));
    if (center_dis <= R) {
      flag = 1;
      printf("Dangerous field with shelfs.\n\n");
      for (i = 0; i < ar_uf; i++) {
        uf_dis = sqrt(pow((X[i] - x), 2) + pow((Y[i] - y), 2));
        if (uf_dis <= min_dis) {
          ep_uf += 1;
          printf("DANGER!!! The ship is only %f metres from shelf with "
                 "coordinates (%f,%f).\n\n",
                 uf_dis, X[i], Y[i]);
        }
      }
      printf(
          "The shelfs that are in dangerous position with the ship are: %d\n\n",
          ep_uf);
    } else {
      if (flag == 1) {
        printf("Exit from dangerous field with shelfs!");
        break;
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x6a0,%rsp
movl   $0x0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x654(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x658(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x65c(%rbp)
ff
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x4(%rbp)
jle    11aa <main+0x6a>
cmpl   $0xc8,-0x4(%rbp)
jle    11bd <main+0x7d>
lea    0xe6b(%rip),%rdi
mov    $0xc8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c2 <main+0x82>
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x679(%rbp)
jle    11e4 <main+0xa4>
cmpl   $0xc8,-0x4(%rbp)
setg   %al
mov    %al,-0x679(%rbp)
mov    -0x679(%rbp),%al
test   $0x1,%al
jne    1173 <main+0x33>
jmp    11f7 <main+0xb7>
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1232 <main+0xf2>
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1237 <main+0xf7>
xorps  %xmm0,%xmm0
ucomiss -0x10(%rbp),%xmm0
ja     11f7 <main+0xb7>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    130d <main+0x1cd>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
lea    -0x330(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
lea    -0x650(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movslq -0x8(%rbp),%rax
movss  -0x330(%rbp,%rax,4),%xmm0
ff ff
cvtsi2ssl -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
addss  -0x654(%rbp),%xmm0
ff
movss  %xmm0,-0x654(%rbp)
ff
movslq -0x8(%rbp),%rax
movss  -0x650(%rbp,%rax,4),%xmm0
ff ff
cvtsi2ssl -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
addss  -0x658(%rbp),%xmm0
ff
movss  %xmm0,-0x658(%rbp)
ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    124b <main+0x10b>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13b4 <main+0x274>
movslq -0x8(%rbp),%rax
movss  -0x330(%rbp,%rax,4),%xmm0
ff ff
subss  -0x654(%rbp),%xmm0
ff
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x688(%rbp)
movslq -0x8(%rbp),%rax
movss  -0x650(%rbp,%rax,4),%xmm0
ff ff
subss  -0x658(%rbp),%xmm0
ff
mov    $0x2,%edi
call   1050 <pow@plt>
mov    -0x688(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
movss  %xmm0,-0x660(%rbp)
ff
movss  -0x660(%rbp),%xmm0
ff
ucomiss -0x65c(%rbp),%xmm0
jbe    13a1 <main+0x261>
movss  -0x660(%rbp),%xmm0
ff
movss  %xmm0,-0x65c(%rbp)
ff
jmp    13a6 <main+0x266>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1314 <main+0x1d4>
movss  -0x65c(%rbp),%xmm0
ff
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x664(%rbp)
ff
movl   $0x0,-0x678(%rbp)
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc75(%rip),%rdi
lea    -0x668(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xced(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc52(%rip),%rdi
lea    -0x66c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x654(%rbp),%xmm0
ff
subss  -0x668(%rbp),%xmm0
ff
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x690(%rbp)
movss  -0x658(%rbp),%xmm0
ff
subss  -0x66c(%rbp),%xmm0
ff
mov    $0x2,%edi
call   1050 <pow@plt>
mov    -0x690(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
movss  %xmm0,-0x670(%rbp)
ff
movss  -0x670(%rbp),%xmm1
ff
movss  -0x664(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jb     1595 <main+0x455>
movl   $0x1,-0xc(%rbp)
lea    0xc75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    157c <main+0x43c>
movslq -0x8(%rbp),%rax
movss  -0x330(%rbp,%rax,4),%xmm0
ff ff
subss  -0x668(%rbp),%xmm0
ff
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,-0x698(%rbp)
movslq -0x8(%rbp),%rax
movss  -0x650(%rbp,%rax,4),%xmm0
ff ff
subss  -0x66c(%rbp),%xmm0
ff
mov    $0x2,%edi
call   1050 <pow@plt>
mov    -0x698(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
movss  %xmm0,-0x674(%rbp)
ff
movss  -0x674(%rbp),%xmm1
ff
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1569 <main+0x429>
mov    -0x678(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x678(%rbp)
movss  -0x674(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movslq -0x8(%rbp),%rax
movss  -0x330(%rbp,%rax,4),%xmm1
ff ff
cvtss2sd %xmm1,%xmm1
movslq -0x8(%rbp),%rax
movss  -0x650(%rbp,%rax,4),%xmm2
ff ff
cvtss2sd %xmm2,%xmm2
lea    0xbc4(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
jmp    156e <main+0x42e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14a0 <main+0x360>
mov    -0x678(%rbp),%esi
lea    0xbe9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    15b7 <main+0x477>
cmpl   $0x1,-0xc(%rbp)
jne    15b2 <main+0x472>
lea    0xc0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    15bc <main+0x47c>
jmp    15b7 <main+0x477>
jmp    13c9 <main+0x289>
add    $0x6a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x688,%rsp
lea    0xe98(%rip),%r14
lea    0xeaa(%rip),%r15
lea    0x8(%rsp),%r12
mov    $0xffffff37,%ebx
lea    0xe9c(%rip),%rbp
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x8(%rsp),%eax
add    %ebx,%eax
cmp    $0xffffff37,%eax
ja     11c0 <main+0x70>
mov    %rbp,%rdi
mov    $0xc8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%eax
add    %ebx,%eax
cmp    $0xffffff38,%eax
jb     1180 <main+0x30>
lea    0xe78(%rip),%r14
lea    0xe8f(%rip),%rbp
lea    0x10(%rsp),%rbx
lea    0xe86(%rip),%r15
jmp    11e5 <main+0x95>
nopl   0x0(%rax)
ucomiss %xmm0,%xmm1
jbe    121f <main+0xcf>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
xorps  %xmm1,%xmm1
movss  0x10(%rsp),%xmm0
ucomiss %xmm0,%xmm1
jbe    11e0 <main+0x90>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xorps  %xmm1,%xmm1
movss  0x10(%rsp),%xmm0
jmp    11e0 <main+0x90>
xorps  %xmm0,%xmm0
cmpl   $0x0,0x8(%rsp)
jle    1341 <main+0x1f1>
xorps  %xmm1,%xmm1
lea    0x40(%rsp),%rbx
lea    0x360(%rsp),%rbp
lea    0xe4d(%rip),%r14
lea    0xe12(%rip),%r15
lea    0xe5d(%rip),%r12
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nop
movaps %xmm1,0x20(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movslq 0x8(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  (%rbx),%xmm1
movss  0x0(%rbp),%xmm2
unpcklps %xmm1,%xmm2
movaps 0x20(%rsp),%xmm1
shufps $0x0,%xmm0,%xmm0
divps  %xmm0,%xmm2
addps  %xmm2,%xmm1
add    $0x1,%r13
add    $0x4,%rbx
add    $0x4,%rbp
cmp    %rax,%r13
jl     1260 <main+0x110>
test   %eax,%eax
jle    1346 <main+0x1f6>
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
movaps %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
xor    %ebp,%ebp
movaps %xmm1,0x20(%rsp)
movss  %xmm0,0xc(%rsp)
movss  0x360(%rsp,%rbp,4),%xmm0
subss  %xmm1,%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
mov    %rax,%rbx
movss  0x40(%rsp,%rbp,4),%xmm0
subss  0x30(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1070 <sqrt@plt>
movaps 0x20(%rsp),%xmm1
maxss  0xc(%rsp),%xmm0
add    $0x1,%rbp
movslq 0x8(%rsp),%rax
cmp    %rax,%rbp
jl     12e0 <main+0x190>
jmp    1349 <main+0x1f9>
xorps  %xmm1,%xmm1
jmp    1349 <main+0x1f9>
xorps  %xmm0,%xmm0
addss  0x10(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movaps %xmm1,0x20(%rsp)
shufps $0x55,%xmm1,%xmm1
movaps %xmm1,0x30(%rsp)
lea    0xd63(%rip),%r14
lea    0xcec(%rip),%r15
lea    0x14(%rsp),%r12
lea    0xd8a(%rip),%r13
xor    %ebp,%ebp
jmp    13a1 <main+0x251>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   $0x1,%bpl
jne    1509 <main+0x3b9>
ucomiss %xmm0,%xmm1
setae  %bpl
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xd2b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movaps 0x20(%rsp),%xmm0
subss  0x14(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
mov    %rax,%rbx
movaps 0x30(%rsp),%xmm0
subss  0x18(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1070 <sqrt@plt>
movss  0xc(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jb     1390 <main+0x240>
movss  %xmm0,0x1c(%rsp)
lea    0xd93(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,0x8(%rsp)
jle    14d8 <main+0x388>
xor    %r12d,%r12d
xor    %r14d,%r14d
jmp    145e <main+0x30e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
movslq 0x8(%rsp),%rax
cmp    %rax,%r12
jge    14db <main+0x38b>
movss  0x360(%rsp,%r12,4),%xmm0
subss  0x14(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
mov    %rax,%rbx
movss  0x40(%rsp,%r12,4),%xmm0
subss  0x18(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1070 <sqrt@plt>
movss  0x10(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jb     1450 <main+0x300>
add    $0x1,%r14d
cvtss2sd %xmm0,%xmm0
movss  0x360(%rsp,%r12,4),%xmm1
cvtss2sd %xmm1,%xmm1
movss  0x40(%rsp,%r12,4),%xmm2
cvtss2sd %xmm2,%xmm2
mov    %r13,%rdi
mov    $0x3,%al
call   1040 <printf@plt>
jmp    1450 <main+0x300>
xor    %r14d,%r14d
lea    0xc71(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm1
lea    0xbd4(%rip),%r14
lea    0x14(%rsp),%r12
movss  0x1c(%rsp),%xmm0
jmp    139a <main+0x24a>
lea    0xc85(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x688,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Enter number of shelfs: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [35 x i8] c"Number of shelfs must be 0 and %d\0A\00"
@.str.3 = [30 x i8] c"Enter minimum safe distance: \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [49 x i8] c"Minimum safe distance must be positive or zero/n\00"
@.str.6 = [30 x i8] c"Enter coordinate X of shelf: \00"
@.str.7 = [30 x i8] c"Enter coordinate Y of shelf: \00"
@.str.8 = [29 x i8] c"Enter coordinate X of ship: \00"
@.str.9 = [29 x i8] c"Enter coordinate Y of ship: \00"
@.str.10 = [31 x i8] c"Dangerous field with shelfs.\0A\0A\00"
@.str.11 = [76 x i8] c"DANGER!!! The ship is only %f metres from shelf with coordinates (%f,%f).\0A\0A\00"
@.str.12 = [66 x i8] c"The shelfs that are in dangerous position with the ship are: %d\0A\0A\00"
@.str.13 = [39 x i8] c"Exit from dangerous field with shelfs!\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca [200 x float]
%6 = alloca [200 x float]
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca i32
store i32 0, i32* %3
store float 0.000000e+00, float* %7
store float 0.000000e+00, float* %8
store float 0.000000e+00, float* %9
br label %17
17: ; preds = %34, %0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%20 = load i32, i32* %1
%21 = icmp sle i32 %20, 0
br i1 %21, label %25, label %22
22: ; preds = %17
%23 = load i32, i32* %1
%24 = icmp sgt i32 %23, 200
br i1 %24, label %25, label %27
25: ; preds = %22, %17
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 200)
br label %27
27: ; preds = %25, %22
br label %28
28: ; preds = %27
%29 = load i32, i32* %1
%30 = icmp sle i32 %29, 0
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = load i32, i32* %1
%33 = icmp sgt i32 %32, 200
br label %34
34: ; preds = %31, %28
%35 = phi i1 [ true, %28 ], [ %33, %31 ]
br i1 %35, label %17, label %36
36: ; preds = %34
br label %37
37: ; preds = %45, %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%39 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %4)
%40 = load float, float* %4
%41 = fcmp olt float %40, 0.000000e+00
br i1 %41, label %42, label %44
42: ; preds = %37
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
br label %44
44: ; preds = %42, %37
br label %45
45: ; preds = %44
%46 = load float, float* %4
%47 = fcmp olt float %46, 0.000000e+00
br i1 %47, label %37, label %48
48: ; preds = %45
store i32 0, i32* %2
br label %49
49: ; preds = %82, %48
%50 = load i32, i32* %2
%51 = load i32, i32* %1
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %85
53: ; preds = %49
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%55 = load i32, i32* %2
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [200 x float], [200 x float]* %5, i64 0, i64 %56
%58 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %57)
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%60 = load i32, i32* %2
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [200 x float], [200 x float]* %6, i64 0, i64 %61
%63 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %62)
%64 = load i32, i32* %2
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [200 x float], [200 x float]* %5, i64 0, i64 %65
%67 = load float, float* %66
%68 = load i32, i32* %1
%69 = sitofp i32 %68 to float
%70 = fdiv float %67, %69
%71 = load float, float* %7
%72 = fadd float %71, %70
store float %72, float* %7
%73 = load i32, i32* %2
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [200 x float], [200 x float]* %6, i64 0, i64 %74
%76 = load float, float* %75
%77 = load i32, i32* %1
%78 = sitofp i32 %77 to float
%79 = fdiv float %76, %78
%80 = load float, float* %8
%81 = fadd float %80, %79
store float %81, float* %8
br label %82
82: ; preds = %53
%83 = load i32, i32* %2
%84 = add nsw i32 %83, 1
store i32 %84, i32* %2
br label %49
85: ; preds = %49
store i32 0, i32* %2
br label %86
86: ; preds = %113, %85
%87 = load i32, i32* %2
%88 = load i32, i32* %1
%89 = icmp slt i32 %87, %88
br i1 %89, label %90, label %116
90: ; preds = %86
%91 = load i32, i32* %2
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [200 x float], [200 x float]* %5, i64 0, i64 %92
%94 = load float, float* %93
%95 = load float, float* %7
%96 = fsub float %94, %95
%97 = call i64 @pow(float %96, i32 2)
%98 = load i32, i32* %2
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [200 x float], [200 x float]* %6, i64 0, i64 %99
%101 = load float, float* %100
%102 = load float, float* %8
%103 = fsub float %101, %102
%104 = call i64 @pow(float %103, i32 2)
%105 = add nsw i64 %97, %104
%106 = call float @sqrt(i64 %105)
store float %106, float* %10
%107 = load float, float* %10
%108 = load float, float* %9
%109 = fcmp ogt float %107, %108
br i1 %109, label %110, label %112
110: ; preds = %90
%111 = load float, float* %10
store float %111, float* %9
br label %112
112: ; preds = %110, %90
br label %113
113: ; preds = %112
%114 = load i32, i32* %2
%115 = add nsw i32 %114, 1
store i32 %115, i32* %2
br label %86
116: ; preds = %86
%117 = load float, float* %9
%118 = load float, float* %4
%119 = fadd float %117, %118
store float %119, float* %11
br label %120
120: ; preds = %193, %116
store i32 0, i32* %16
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%122 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %12)
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
%124 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %13)
%125 = load float, float* %7
%126 = load float, float* %12
%127 = fsub float %125, %126
%128 = call i64 @pow(float %127, i32 2)
%129 = load float, float* %8
%130 = load float, float* %13
%131 = fsub float %129, %130
%132 = call i64 @pow(float %131, i32 2)
%133 = add nsw i64 %128, %132
%134 = call float @sqrt(i64 %133)
store float %134, float* %14
%135 = load float, float* %14
%136 = load float, float* %11
%137 = fcmp ole float %135, %136
br i1 %137, label %138, label %187
138: ; preds = %120
store i32 1, i32* %3
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %2
br label %140
140: ; preds = %181, %138
%141 = load i32, i32* %2
%142 = load i32, i32* %1
%143 = icmp slt i32 %141, %142
br i1 %143, label %144, label %184
144: ; preds = %140
%145 = load i32, i32* %2
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds [200 x float], [200 x float]* %5, i64 0, i64 %146
%148 = load float, float* %147
%149 = load float, float* %12
%150 = fsub float %148, %149
%151 = call i64 @pow(float %150, i32 2)
%152 = load i32, i32* %2
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [200 x float], [200 x float]* %6, i64 0, i64 %153
%155 = load float, float* %154
%156 = load float, float* %13
%157 = fsub float %155, %156
%158 = call i64 @pow(float %157, i32 2)
%159 = add nsw i64 %151, %158
%160 = call float @sqrt(i64 %159)
store float %160, float* %15
%161 = load float, float* %15
%162 = load float, float* %4
%163 = fcmp ole float %161, %162
br i1 %163, label %164, label %180
164: ; preds = %144
%165 = load i32, i32* %16
%166 = add nsw i32 %165, 1
store i32 %166, i32* %16
%167 = load float, float* %15
%168 = fpext float %167 to double
%169 = load i32, i32* %2
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds [200 x float], [200 x float]* %5, i64 0, i64 %170
%172 = load float, float* %171
%173 = fpext float %172 to double
%174 = load i32, i32* %2
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds [200 x float], [200 x float]* %6, i64 0, i64 %175
%177 = load float, float* %176
%178 = fpext float %177 to double
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.11, i64 0, i64 0), double %168, double %173, double %178)
br label %180
180: ; preds = %164, %144
br label %181
181: ; preds = %180
%182 = load i32, i32* %2
%183 = add nsw i32 %182, 1
store i32 %183, i32* %2
br label %140
184: ; preds = %140
%185 = load i32, i32* %16
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.12, i64 0, i64 0), i32 %185)
br label %193
187: ; preds = %120
%188 = load i32, i32* %3
%189 = icmp eq i32 %188, 1
br i1 %189, label %190, label %192
190: ; preds = %187
%191 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
br label %194
192: ; preds = %187
br label %193
193: ; preds = %192, %184
br label %120
194: ; preds = %190
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Enter number of shelfs: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [35 x i8] c"Number of shelfs must be 0 and %d\0A\00"
@.str.3 = [30 x i8] c"Enter minimum safe distance: \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [49 x i8] c"Minimum safe distance must be positive or zero/n\00"
@.str.6 = [30 x i8] c"Enter coordinate X of shelf: \00"
@.str.7 = [30 x i8] c"Enter coordinate Y of shelf: \00"
@.str.8 = [29 x i8] c"Enter coordinate X of ship: \00"
@.str.9 = [29 x i8] c"Enter coordinate Y of ship: \00"
@.str.11 = [76 x i8] c"DANGER!!! The ship is only %f metres from shelf with coordinates (%f,%f).\0A\0A\00"
@.str.12 = [66 x i8] c"The shelfs that are in dangerous position with the ship are: %d\0A\0A\00"
@.str.13 = [39 x i8] c"Exit from dangerous field with shelfs!\00"
@str = [30 x i8] c"Dangerous field with shelfs.\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca [200 x float]
%4 = alloca [200 x float]
%5 = alloca float
%6 = alloca float
%7 = bitcast i32* %1 to i8*
%8 = bitcast float* %2 to i8*
%9 = bitcast [200 x float]* %3 to i8*
%10 = bitcast [200 x float]* %4 to i8*
%11 = bitcast float* %5 to i8*
%12 = bitcast float* %6 to i8*
br label %13
13: ; preds = %19, %0
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%16 = load i32, i32* %1
%17 = add i32 %16, -201
%18 = icmp ult i32 %17, -200
br i1 %18, label %19, label %24
19: ; preds = %13
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 200)
%21 = load i32, i32* %1
%22 = add i32 %21, -201
%23 = icmp ult i32 %22, -200
br i1 %23, label %13, label %24
24: ; preds = %13, %19
br label %25
25: ; preds = %24, %33
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %2)
%28 = load float, float* %2
%29 = fcmp olt float %28, 0.000000e+00
br i1 %29, label %30, label %33
30: ; preds = %25
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0))
%32 = load float, float* %2
br label %33
33: ; preds = %25, %30
%34 = phi float [ %28, %25 ], [ %32, %30 ]
%35 = fcmp olt float %34, 0.000000e+00
br i1 %35, label %25, label %36
36: ; preds = %33
%37 = load i32, i32* %1
%38 = icmp sgt i32 %37, 0
br i1 %38, label %44, label %85
39: ; preds = %44
%40 = icmp sgt i32 %54, 0
br i1 %40, label %41, label %85
41: ; preds = %39
%42 = extractelement <2 x float> %62, i64 0
%43 = extractelement <2 x float> %62, i64 1
br label %66
44: ; preds = %36, %44
%45 = phi i64 [ %63, %44 ], [ 0, %36 ]
%46 = phi <2 x float> [ %62, %44 ], [ zeroinitializer, %36 ]
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0))
%48 = getelementptr inbounds [200 x float], [200 x float]* %3, i64 0, i64 %45
%49 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %48)
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%51 = getelementptr inbounds [200 x float], [200 x float]* %4, i64 0, i64 %45
%52 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %51)
%53 = load float, float* %48
%54 = load i32, i32* %1
%55 = sitofp i32 %54 to float
%56 = load float, float* %51
%57 = insertelement <2 x float> poison, float %53, i64 0
%58 = insertelement <2 x float> %57, float %56, i64 1
%59 = insertelement <2 x float> poison, float %55, i64 0
%60 = shufflevector <2 x float> %59, <2 x float> poison, <2 x i32> zeroinitializer
%61 = fdiv <2 x float> %58, %60
%62 = fadd <2 x float> %46, %61
%63 = add nuw nsw i64 %45, 1
%64 = sext i32 %54 to i64
%65 = icmp slt i64 %63, %64
br i1 %65, label %44, label %39
66: ; preds = %41, %66
%67 = phi i64 [ %81, %66 ], [ 0, %41 ]
%68 = phi float [ %80, %66 ], [ 0.000000e+00, %41 ]
%69 = getelementptr inbounds [200 x float], [200 x float]* %3, i64 0, i64 %67
%70 = load float, float* %69
%71 = fsub float %70, %42
%72 = call i64 @pow(float %71, i32 2)
%73 = getelementptr inbounds [200 x float], [200 x float]* %4, i64 0, i64 %67
%74 = load float, float* %73
%75 = fsub float %74, %43
%76 = call i64 @pow(float %75, i32 2)
%77 = add nsw i64 %76, %72
%78 = call float @sqrt(i64 %77)
%79 = fcmp ogt float %78, %68
%80 = select i1 %79, float %78, float %68
%81 = add nuw nsw i64 %67, 1
%82 = load i32, i32* %1
%83 = sext i32 %82 to i64
%84 = icmp slt i64 %81, %83
br i1 %84, label %66, label %85
85: ; preds = %66, %36, %39
%86 = phi float [ 0.000000e+00, %39 ], [ 0.000000e+00, %36 ], [ %80, %66 ]
%87 = phi <2 x float> [ %62, %39 ], [ zeroinitializer, %36 ], [ %62, %66 ]
%88 = load float, float* %2
%89 = fadd float %86, %88
%90 = extractelement <2 x float> %87, i64 0
%91 = extractelement <2 x float> %87, i64 1
br label %92
92: ; preds = %145, %85
%93 = phi i1 [ false, %85 ], [ %146, %145 ]
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%95 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %5)
%96 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0))
%97 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %6)
%98 = load float, float* %5
%99 = fsub float %90, %98
%100 = call i64 @pow(float %99, i32 2)
%101 = load float, float* %6
%102 = fsub float %91, %101
%103 = call i64 @pow(float %102, i32 2)
%104 = add nsw i64 %103, %100
%105 = call float @sqrt(i64 %104)
%106 = fcmp ugt float %105, %89
br i1 %106, label %147, label %107
107: ; preds = %92
%108 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%109 = load i32, i32* %1
%110 = icmp sgt i32 %109, 0
br i1 %110, label %111, label %142
111: ; preds = %107, %136
%112 = phi i64 [ %138, %136 ], [ 0, %107 ]
%113 = phi i32 [ %137, %136 ], [ 0, %107 ]
%114 = getelementptr inbounds [200 x float], [200 x float]* %3, i64 0, i64 %112
%115 = load float, float* %114
%116 = load float, float* %5
%117 = fsub float %115, %116
%118 = call i64 @pow(float %117, i32 2)
%119 = getelementptr inbounds [200 x float], [200 x float]* %4, i64 0, i64 %112
%120 = load float, float* %119
%121 = load float, float* %6
%122 = fsub float %120, %121
%123 = call i64 @pow(float %122, i32 2)
%124 = add nsw i64 %123, %118
%125 = call float @sqrt(i64 %124)
%126 = load float, float* %2
%127 = fcmp ugt float %125, %126
br i1 %127, label %136, label %128
128: ; preds = %111
%129 = add nsw i32 %113, 1
%130 = fpext float %125 to double
%131 = load float, float* %114
%132 = fpext float %131 to double
%133 = load float, float* %119
%134 = fpext float %133 to double
%135 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.11, i64 0, i64 0), double %130, double %132, double %134)
br label %136
136: ; preds = %111, %128
%137 = phi i32 [ %129, %128 ], [ %113, %111 ]
%138 = add nuw nsw i64 %112, 1
%139 = load i32, i32* %1
%140 = sext i32 %139 to i64
%141 = icmp slt i64 %138, %140
br i1 %141, label %111, label %142
142: ; preds = %136, %107
%143 = phi i32 [ 0, %107 ], [ %137, %136 ]
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.12, i64 0, i64 0), i32 %143)
br label %145
145: ; preds = %142, %147
%146 = xor i1 %106, true
br label %92
147: ; preds = %92
br i1 %93, label %148, label %145
148: ; preds = %147
%149 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
ret void
}