int main() {
  double body[4][2];
  double vAB[2], vBC[2];
  double eps = 1e-8;
  int isRectangle = 1;
  for (int i = 0; i < 4; i++) {
    printf("Bod #%d:\n", i + 1);
    if (scanf("%lf%lf", &body[i][0], &body[i][1]) != 2) {
      printf("Nespravny vstup.\n");
      return 1;
    }
    if (isRectangle == 1) {
      for (int j = 0; j < i; j++) {
        if (body[j][0] == body[i][0] && body[j][1] == body[i][1]) {
          isRectangle = 0;
        }
      }
    }
  }
  if (isRectangle) {
    vAB[0] = body[1][0] - body[0][0];
    vAB[1] = body[1][1] - body[0][1];
    vBC[0] = body[2][0] - body[1][0];
    vBC[1] = body[2][1] - body[1][1];
    isRectangle = 0;
    double t = fabs(body[2][0] - vAB[0] - body[3][0]);
    double a =
        (fabs(body[2][0] - vAB[0] - body[3][0]) <= fabs(eps * vAB[0])) ? 0 : 1;
    double b =
        (fabs(body[2][1] - vAB[1] - body[3][1]) <= fabs(eps * vAB[1])) ? 0 : 1;
    double c =
        (fabs(body[3][0] - vBC[0] - body[0][0]) <= fabs(eps * vBC[0])) ? 0 : 1;
    double d =
        (fabs(body[3][1] - vBC[1] - body[0][1]) <= fabs(eps * vBC[1])) ? 0 : 1;
    double e =
        (fabs(vAB[0] * vBC[0] + vAB[1] * vBC[1]) <= fabs(eps * vAB[1] * vBC[1]))
            ? 0
            : 1;
    if (fabs(body[2][0] - vAB[0] - body[3][0]) <= eps * body[3][0] &&
        fabs(body[2][1] - vAB[1] - body[3][1]) <= eps * body[3][1] &&
        fabs(body[3][0] - vBC[0] - body[0][0]) <= eps * body[0][0] &&
        fabs(body[3][1] - vBC[1] - body[0][1]) <= eps * body[0][1] &&
        fabs(vAB[0] * vBC[0] + vAB[1] * vBC[1]) <= eps) {
      isRectangle = 1;
    }
  }
  printf("Body %stvori obdelnik.\n", isRectangle == 0 ? "ne" : "");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x1,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
cmpl   $0x4,-0x80(%rbp)
jge    1285 <main+0x165>
mov    -0x80(%rbp),%esi
add    $0x1,%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x80(%rbp),%rax
lea    -0x50(%rbp),%rsi
shl    $0x4,%rax
add    %rax,%rsi
movslq -0x80(%rbp),%rax
lea    -0x50(%rbp),%rdx
shl    $0x4,%rax
add    %rax,%rdx
add    $0x8,%rdx
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
cmp    $0x2,%eax
je     11be <main+0x9e>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    159a <main+0x47a>
cmpl   $0x1,-0x7c(%rbp)
jne    1272 <main+0x152>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x80(%rbp),%eax
jge    126d <main+0x14d>
movslq -0x84(%rbp),%rcx
lea    -0x50(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
movslq -0x80(%rbp),%rcx
lea    -0x50(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
ucomisd (%rax),%xmm0
jne    1254 <main+0x134>
jp     1254 <main+0x134>
movslq -0x84(%rbp),%rcx
lea    -0x50(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
movslq -0x80(%rbp),%rcx
lea    -0x50(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
ucomisd 0x8(%rax),%xmm0
jne    1254 <main+0x134>
jp     1254 <main+0x134>
movl   $0x0,-0x7c(%rbp)
jmp    1259 <main+0x139>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    11d2 <main+0xb2>
jmp    1272 <main+0x152>
jmp    1277 <main+0x157>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    114d <main+0x2d>
cmpl   $0x0,-0x7c(%rbp)
je     156d <main+0x44d>
movsd  -0x40(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x7c(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movaps 0xd28(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
subsd  -0x60(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movaps 0xd06(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movaps 0xcf1(%rip),%xmm2
pand   %xmm2,%xmm0
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x28(%rbp),%xmm1
subsd  -0x58(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movaps 0xcbd(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movaps 0xca8(%rip),%xmm2
pand   %xmm2,%xmm0
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x20(%rbp),%xmm1
subsd  -0x70(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movaps 0xc74(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movaps 0xc5f(%rip),%xmm2
pand   %xmm2,%xmm0
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm1
subsd  -0x68(%rbp),%xmm1
subsd  -0x48(%rbp),%xmm1
movaps 0xc2b(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movaps 0xc16(%rip),%xmm2
pand   %xmm2,%xmm0
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x60(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movaps 0xbd5(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movaps 0xbbb(%rip),%xmm2
pand   %xmm2,%xmm0
mov    $0x1,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
cmovae %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x30(%rbp),%xmm1
subsd  -0x60(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movaps 0xb87(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1568 <main+0x448>
movsd  -0x28(%rbp),%xmm1
subsd  -0x58(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movaps 0xb59(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1568 <main+0x448>
movsd  -0x20(%rbp),%xmm1
subsd  -0x70(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movaps 0xb2b(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1568 <main+0x448>
movsd  -0x18(%rbp),%xmm1
subsd  -0x68(%rbp),%xmm1
subsd  -0x48(%rbp),%xmm1
movaps 0xafd(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1568 <main+0x448>
movsd  -0x60(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movaps 0xac2(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1568 <main+0x448>
movl   $0x1,-0x7c(%rbp)
jmp    156d <main+0x44d>
mov    -0x7c(%rbp),%ecx
lea    0xae3(%rip),%rsi
lea    0xadd(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rsi
lea    0xab7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
lea    0xef9(%rip),%rdi
mov    $0x1,%ebx
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rdx
lea    0xee6(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1404 <main+0x2d4>
lea    0xec2(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0xeaf(%rip),%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1404 <main+0x2d4>
movsd  (%rsp),%xmm0
mov    $0x1,%bpl
ucomisd 0x10(%rsp),%xmm0
jne    11c7 <main+0x97>
jp     11c7 <main+0x97>
movsd  0x8(%rsp),%xmm0
ucomisd 0x18(%rsp),%xmm0
jne    11c7 <main+0x97>
jp     11c7 <main+0x97>
xor    %ebp,%ebp
lea    0xe6a(%rip),%rdi
xor    %r14d,%r14d
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x20(%rsp),%rsi
lea    0x28(%rsp),%rdx
lea    0xe54(%rip),%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1404 <main+0x2d4>
test   %bpl,%bpl
je     1250 <main+0x120>
movsd  (%rsp),%xmm1
movsd  0x20(%rsp),%xmm0
mov    $0x1,%r14d
ucomisd %xmm0,%xmm1
jne    122f <main+0xff>
jp     122f <main+0xff>
movsd  0x8(%rsp),%xmm1
ucomisd 0x28(%rsp),%xmm1
jne    122f <main+0xff>
jp     122f <main+0xff>
xor    %r14d,%r14d
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    1250 <main+0x120>
jp     1250 <main+0x120>
movsd  0x18(%rsp),%xmm0
ucomisd 0x28(%rsp),%xmm0
jne    1250 <main+0x120>
jp     1250 <main+0x120>
xor    %r14d,%r14d
lea    0xde1(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x30(%rsp),%rsi
lea    0x38(%rsp),%rdx
lea    0xdce(%rip),%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
cmp    $0x2,%eax
jne    1404 <main+0x2d4>
lea    0xdd6(%rip),%rsi
test   %r14d,%r14d
je     13f2 <main+0x2c2>
movsd  (%rsp),%xmm1
movsd  0x30(%rsp),%xmm0
mov    $0x1,%eax
ucomisd %xmm0,%xmm1
jne    12be <main+0x18e>
jp     12be <main+0x18e>
movsd  0x8(%rsp),%xmm1
ucomisd 0x38(%rsp),%xmm1
jne    12be <main+0x18e>
jp     12be <main+0x18e>
xor    %eax,%eax
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    12de <main+0x1ae>
jp     12de <main+0x1ae>
movsd  0x18(%rsp),%xmm1
ucomisd 0x38(%rsp),%xmm1
jne    12de <main+0x1ae>
jp     12de <main+0x1ae>
xor    %eax,%eax
movsd  0x20(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    1300 <main+0x1d0>
jp     1300 <main+0x1d0>
movsd  0x28(%rsp),%xmm0
ucomisd 0x38(%rsp),%xmm0
jne    1300 <main+0x1d0>
jnp    13f2 <main+0x2c2>
test   %eax,%eax
je     13f2 <main+0x2c2>
movsd  (%rsp),%xmm2
movupd 0x8(%rsp),%xmm0
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
subsd  %xmm2,%xmm3
movupd 0x18(%rsp),%xmm4
movupd 0x28(%rsp),%xmm1
movapd %xmm4,%xmm5
unpckhpd %xmm4,%xmm5
subsd  %xmm3,%xmm5
movapd %xmm1,%xmm6
unpckhpd %xmm1,%xmm6
subsd  %xmm6,%xmm5
andpd  0xcb5(%rip),%xmm5
mulsd  0xcdd(%rip),%xmm6
ucomisd %xmm5,%xmm6
jb     13f2 <main+0x2c2>
movapd %xmm1,%xmm5
subpd  %xmm4,%xmm5
subpd  %xmm0,%xmm4
movsd  0x38(%rsp),%xmm6
movapd %xmm4,%xmm7
mulsd  %xmm5,%xmm7
subpd  %xmm4,%xmm1
unpckhpd %xmm4,%xmm4
mulsd  %xmm4,%xmm3
addsd  %xmm7,%xmm3
movapd %xmm6,%xmm4
subsd  %xmm5,%xmm4
subsd  %xmm0,%xmm4
unpcklpd %xmm3,%xmm4
unpcklpd %xmm2,%xmm6
subpd  %xmm6,%xmm1
movapd 0xc59(%rip),%xmm2
andpd  %xmm2,%xmm4
andpd  %xmm2,%xmm1
mulpd  0xc59(%rip),%xmm6
mulsd  0xc71(%rip),%xmm0
cmpnlepd %xmm6,%xmm1
shufpd $0x2,0xc53(%rip),%xmm0
cmpnlepd %xmm0,%xmm4
shufps $0x88,%xmm4,%xmm1
pslld  $0x1f,%xmm1
movmskps %xmm1,%eax
test   %eax,%eax
lea    0xc79(%rip),%rax
lea    0xc73(%rip),%rsi
cmove  %rax,%rsi
lea    0xc50(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1410 <main+0x2e0>
lea    0xc59(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Bod #%d:\0A\00"
@.str.1 = [7 x i8] c"%lf%lf\00"
@.str.2 = [18 x i8] c"Nespravny vstup.\0A\00"
@.str.3 = [24 x i8] c"Body %stvori obdelnik.\0A\00"
@.str.4 = [3 x i8] c"ne\00"
@.str.5 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [2 x double]]
%3 = alloca [2 x double]
%4 = alloca [2 x double]
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store i32 0, i32* %1
store double 1.000000e-08, double* %5
store i32 1, i32* %6
store i32 0, i32* %7
br label %15
15: ; preds = %73, %0
%16 = load i32, i32* %7
%17 = icmp slt i32 %16, 4
br i1 %17, label %18, label %76
18: ; preds = %15
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 %23
%25 = getelementptr inbounds [2 x double], [2 x double]* %24, i64 0, i64 0
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 %27
%29 = getelementptr inbounds [2 x double], [2 x double]* %28, i64 0, i64 1
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %25, double* %29)
%31 = icmp ne i32 %30, 2
br i1 %31, label %32, label %34
32: ; preds = %18
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %1
br label %319
34: ; preds = %18
%35 = load i32, i32* %6
%36 = icmp eq i32 %35, 1
br i1 %36, label %37, label %72
37: ; preds = %34
store i32 0, i32* %8
br label %38
38: ; preds = %68, %37
%39 = load i32, i32* %8
%40 = load i32, i32* %7
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %71
42: ; preds = %38
%43 = load i32, i32* %8
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 %44
%46 = getelementptr inbounds [2 x double], [2 x double]* %45, i64 0, i64 0
%47 = load double, double* %46
%48 = load i32, i32* %7
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 %49
%51 = getelementptr inbounds [2 x double], [2 x double]* %50, i64 0, i64 0
%52 = load double, double* %51
%53 = fcmp oeq double %47, %52
br i1 %53, label %54, label %67
54: ; preds = %42
%55 = load i32, i32* %8
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 %56
%58 = getelementptr inbounds [2 x double], [2 x double]* %57, i64 0, i64 1
%59 = load double, double* %58
%60 = load i32, i32* %7
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 %61
%63 = getelementptr inbounds [2 x double], [2 x double]* %62, i64 0, i64 1
%64 = load double, double* %63
%65 = fcmp oeq double %59, %64
br i1 %65, label %66, label %67
66: ; preds = %54
store i32 0, i32* %6
br label %67
67: ; preds = %66, %54, %42
br label %68
68: ; preds = %67
%69 = load i32, i32* %8
%70 = add nsw i32 %69, 1
store i32 %70, i32* %8
br label %38
71: ; preds = %38
br label %72
72: ; preds = %71, %34
br label %73
73: ; preds = %72
%74 = load i32, i32* %7
%75 = add nsw i32 %74, 1
store i32 %75, i32* %7
br label %15
76: ; preds = %15
%77 = load i32, i32* %6
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %313
79: ; preds = %76
%80 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 1
%81 = getelementptr inbounds [2 x double], [2 x double]* %80, i64 0, i64 0
%82 = load double, double* %81
%83 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 0
%84 = getelementptr inbounds [2 x double], [2 x double]* %83, i64 0, i64 0
%85 = load double, double* %84
%86 = fsub double %82, %85
%87 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
store double %86, double* %87
%88 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 1
%89 = getelementptr inbounds [2 x double], [2 x double]* %88, i64 0, i64 1
%90 = load double, double* %89
%91 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 0
%92 = getelementptr inbounds [2 x double], [2 x double]* %91, i64 0, i64 1
%93 = load double, double* %92
%94 = fsub double %90, %93
%95 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
store double %94, double* %95
%96 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 2
%97 = getelementptr inbounds [2 x double], [2 x double]* %96, i64 0, i64 0
%98 = load double, double* %97
%99 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 1
%100 = getelementptr inbounds [2 x double], [2 x double]* %99, i64 0, i64 0
%101 = load double, double* %100
%102 = fsub double %98, %101
%103 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
store double %102, double* %103
%104 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 2
%105 = getelementptr inbounds [2 x double], [2 x double]* %104, i64 0, i64 1
%106 = load double, double* %105
%107 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 1
%108 = getelementptr inbounds [2 x double], [2 x double]* %107, i64 0, i64 1
%109 = load double, double* %108
%110 = fsub double %106, %109
%111 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
store double %110, double* %111
store i32 0, i32* %6
%112 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 2
%113 = getelementptr inbounds [2 x double], [2 x double]* %112, i64 0, i64 0
%114 = load double, double* %113
%115 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%116 = load double, double* %115
%117 = fsub double %114, %116
%118 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%119 = getelementptr inbounds [2 x double], [2 x double]* %118, i64 0, i64 0
%120 = load double, double* %119
%121 = fsub double %117, %120
%122 = call double @llvm.fabs.f64(double %121)
store double %122, double* %9
%123 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 2
%124 = getelementptr inbounds [2 x double], [2 x double]* %123, i64 0, i64 0
%125 = load double, double* %124
%126 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%127 = load double, double* %126
%128 = fsub double %125, %127
%129 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%130 = getelementptr inbounds [2 x double], [2 x double]* %129, i64 0, i64 0
%131 = load double, double* %130
%132 = fsub double %128, %131
%133 = call double @llvm.fabs.f64(double %132)
%134 = load double, double* %5
%135 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%136 = load double, double* %135
%137 = fmul double %134, %136
%138 = call double @llvm.fabs.f64(double %137)
%139 = fcmp ole double %133, %138
%140 = zext i1 %139 to i64
%141 = select i1 %139, i32 0, i32 1
%142 = sitofp i32 %141 to double
store double %142, double* %10
%143 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 2
%144 = getelementptr inbounds [2 x double], [2 x double]* %143, i64 0, i64 1
%145 = load double, double* %144
%146 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%147 = load double, double* %146
%148 = fsub double %145, %147
%149 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%150 = getelementptr inbounds [2 x double], [2 x double]* %149, i64 0, i64 1
%151 = load double, double* %150
%152 = fsub double %148, %151
%153 = call double @llvm.fabs.f64(double %152)
%154 = load double, double* %5
%155 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%156 = load double, double* %155
%157 = fmul double %154, %156
%158 = call double @llvm.fabs.f64(double %157)
%159 = fcmp ole double %153, %158
%160 = zext i1 %159 to i64
%161 = select i1 %159, i32 0, i32 1
%162 = sitofp i32 %161 to double
store double %162, double* %11
%163 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%164 = getelementptr inbounds [2 x double], [2 x double]* %163, i64 0, i64 0
%165 = load double, double* %164
%166 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%167 = load double, double* %166
%168 = fsub double %165, %167
%169 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 0
%170 = getelementptr inbounds [2 x double], [2 x double]* %169, i64 0, i64 0
%171 = load double, double* %170
%172 = fsub double %168, %171
%173 = call double @llvm.fabs.f64(double %172)
%174 = load double, double* %5
%175 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%176 = load double, double* %175
%177 = fmul double %174, %176
%178 = call double @llvm.fabs.f64(double %177)
%179 = fcmp ole double %173, %178
%180 = zext i1 %179 to i64
%181 = select i1 %179, i32 0, i32 1
%182 = sitofp i32 %181 to double
store double %182, double* %12
%183 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%184 = getelementptr inbounds [2 x double], [2 x double]* %183, i64 0, i64 1
%185 = load double, double* %184
%186 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%187 = load double, double* %186
%188 = fsub double %185, %187
%189 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 0
%190 = getelementptr inbounds [2 x double], [2 x double]* %189, i64 0, i64 1
%191 = load double, double* %190
%192 = fsub double %188, %191
%193 = call double @llvm.fabs.f64(double %192)
%194 = load double, double* %5
%195 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%196 = load double, double* %195
%197 = fmul double %194, %196
%198 = call double @llvm.fabs.f64(double %197)
%199 = fcmp ole double %193, %198
%200 = zext i1 %199 to i64
%201 = select i1 %199, i32 0, i32 1
%202 = sitofp i32 %201 to double
store double %202, double* %13
%203 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%204 = load double, double* %203
%205 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%206 = load double, double* %205
%207 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%208 = load double, double* %207
%209 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%210 = load double, double* %209
%211 = fmul double %208, %210
%212 = call double @llvm.fmuladd.f64(double %204, double %206, double %211)
%213 = call double @llvm.fabs.f64(double %212)
%214 = load double, double* %5
%215 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%216 = load double, double* %215
%217 = fmul double %214, %216
%218 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%219 = load double, double* %218
%220 = fmul double %217, %219
%221 = call double @llvm.fabs.f64(double %220)
%222 = fcmp ole double %213, %221
%223 = zext i1 %222 to i64
%224 = select i1 %222, i32 0, i32 1
%225 = sitofp i32 %224 to double
store double %225, double* %14
%226 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 2
%227 = getelementptr inbounds [2 x double], [2 x double]* %226, i64 0, i64 0
%228 = load double, double* %227
%229 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%230 = load double, double* %229
%231 = fsub double %228, %230
%232 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%233 = getelementptr inbounds [2 x double], [2 x double]* %232, i64 0, i64 0
%234 = load double, double* %233
%235 = fsub double %231, %234
%236 = call double @llvm.fabs.f64(double %235)
%237 = load double, double* %5
%238 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%239 = getelementptr inbounds [2 x double], [2 x double]* %238, i64 0, i64 0
%240 = load double, double* %239
%241 = fmul double %237, %240
%242 = fcmp ole double %236, %241
br i1 %242, label %243, label %312
243: ; preds = %79
%244 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 2
%245 = getelementptr inbounds [2 x double], [2 x double]* %244, i64 0, i64 1
%246 = load double, double* %245
%247 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%248 = load double, double* %247
%249 = fsub double %246, %248
%250 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%251 = getelementptr inbounds [2 x double], [2 x double]* %250, i64 0, i64 1
%252 = load double, double* %251
%253 = fsub double %249, %252
%254 = call double @llvm.fabs.f64(double %253)
%255 = load double, double* %5
%256 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%257 = getelementptr inbounds [2 x double], [2 x double]* %256, i64 0, i64 1
%258 = load double, double* %257
%259 = fmul double %255, %258
%260 = fcmp ole double %254, %259
br i1 %260, label %261, label %312
261: ; preds = %243
%262 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%263 = getelementptr inbounds [2 x double], [2 x double]* %262, i64 0, i64 0
%264 = load double, double* %263
%265 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%266 = load double, double* %265
%267 = fsub double %264, %266
%268 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 0
%269 = getelementptr inbounds [2 x double], [2 x double]* %268, i64 0, i64 0
%270 = load double, double* %269
%271 = fsub double %267, %270
%272 = call double @llvm.fabs.f64(double %271)
%273 = load double, double* %5
%274 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 0
%275 = getelementptr inbounds [2 x double], [2 x double]* %274, i64 0, i64 0
%276 = load double, double* %275
%277 = fmul double %273, %276
%278 = fcmp ole double %272, %277
br i1 %278, label %279, label %312
279: ; preds = %261
%280 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 3
%281 = getelementptr inbounds [2 x double], [2 x double]* %280, i64 0, i64 1
%282 = load double, double* %281
%283 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%284 = load double, double* %283
%285 = fsub double %282, %284
%286 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 0
%287 = getelementptr inbounds [2 x double], [2 x double]* %286, i64 0, i64 1
%288 = load double, double* %287
%289 = fsub double %285, %288
%290 = call double @llvm.fabs.f64(double %289)
%291 = load double, double* %5
%292 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %2, i64 0, i64 0
%293 = getelementptr inbounds [2 x double], [2 x double]* %292, i64 0, i64 1
%294 = load double, double* %293
%295 = fmul double %291, %294
%296 = fcmp ole double %290, %295
br i1 %296, label %297, label %312
297: ; preds = %279
%298 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
%299 = load double, double* %298
%300 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%301 = load double, double* %300
%302 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
%303 = load double, double* %302
%304 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%305 = load double, double* %304
%306 = fmul double %303, %305
%307 = call double @llvm.fmuladd.f64(double %299, double %301, double %306)
%308 = call double @llvm.fabs.f64(double %307)
%309 = load double, double* %5
%310 = fcmp ole double %308, %309
br i1 %310, label %311, label %312
311: ; preds = %297
store i32 1, i32* %6
br label %312
312: ; preds = %311, %297, %279, %261, %243, %79
br label %313
313: ; preds = %312, %76
%314 = load i32, i32* %6
%315 = icmp eq i32 %314, 0
%316 = zext i1 %315 to i64
%317 = select i1 %315, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%318 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %317)
store i32 0, i32* %1
br label %319
319: ; preds = %313, %32
%320 = load i32, i32* %1
ret i32 %320
}

LLVM IR (-O2):
@.str = [10 x i8] c"Bod #%d:\0A\00"
@.str.1 = [7 x i8] c"%lf%lf\00"
@.str.3 = [24 x i8] c"Body %stvori obdelnik.\0A\00"
@.str.4 = [3 x i8] c"ne\00"
@.str.5 = [1 x i8] zeroinitializer
@str = [17 x i8] c"Nespravny vstup.\00"
define i32 @main() {
%1 = alloca [4 x [2 x double]]
%2 = bitcast [4 x [2 x double]]* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %1, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %1, i64 0, i64 0, i64 1
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %4, double* %5)
%7 = icmp eq i32 %6, 2
br i1 %7, label %10, label %8
8: ; preds = %51, %25, %10, %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %140
10: ; preds = %0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2)
%12 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %1, i64 0, i64 1, i64 0
%13 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %1, i64 0, i64 1, i64 1
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %12, double* %13)
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %8
16: ; preds = %10
%17 = load double, double* %12
%18 = load double, double* %4
%19 = fcmp oeq double %18, %17
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = load double, double* %5
%22 = load double, double* %13
%23 = fcmp oeq double %21, %22
br i1 %23, label %24, label %25
24: ; preds = %20
br label %25
25: ; preds = %16, %20, %24
%26 = phi i1 [ true, %16 ], [ true, %20 ], [ false, %24 ]
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 3)
%28 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %1, i64 0, i64 2, i64 0
%29 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %1, i64 0, i64 2, i64 1
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %28, double* %29)
%31 = icmp eq i32 %30, 2
br i1 %31, label %32, label %8
32: ; preds = %25
br i1 %26, label %33, label %51
33: ; preds = %32
%34 = load double, double* %28
%35 = load double, double* %4
%36 = fcmp oeq double %35, %34
br i1 %36, label %37, label %42
37: ; preds = %33
%38 = load double, double* %5
%39 = load double, double* %29
%40 = fcmp oeq double %38, %39
br i1 %40, label %41, label %42
41: ; preds = %37
br label %42
42: ; preds = %41, %37, %33
%43 = phi i32 [ 0, %41 ], [ 1, %37 ], [ 1, %33 ]
%44 = load double, double* %12
%45 = fcmp oeq double %44, %34
br i1 %45, label %46, label %51
46: ; preds = %42
%47 = load double, double* %13
%48 = load double, double* %29
%49 = fcmp oeq double %47, %48
br i1 %49, label %50, label %51
50: ; preds = %46
br label %51
51: ; preds = %42, %46, %50, %32
%52 = phi i32 [ 0, %32 ], [ 0, %50 ], [ %43, %46 ], [ %43, %42 ]
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4)
%54 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %1, i64 0, i64 3, i64 0
%55 = getelementptr inbounds [4 x [2 x double]], [4 x [2 x double]]* %1, i64 0, i64 3, i64 1
%56 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double* %54, double* %55)
%57 = icmp eq i32 %56, 2
br i1 %57, label %58, label %8
58: ; preds = %51
%59 = icmp eq i32 %52, 1
br i1 %59, label %60, label %137
60: ; preds = %58
%61 = load double, double* %54
%62 = load double, double* %4
%63 = fcmp oeq double %62, %61
br i1 %63, label %64, label %69
64: ; preds = %60
%65 = load double, double* %5
%66 = load double, double* %55
%67 = fcmp oeq double %65, %66
br i1 %67, label %68, label %69
68: ; preds = %64
br label %69
69: ; preds = %68, %64, %60
%70 = phi i32 [ 0, %68 ], [ 1, %64 ], [ 1, %60 ]
%71 = load double, double* %12
%72 = fcmp oeq double %71, %61
br i1 %72, label %73, label %78
73: ; preds = %69
%74 = load double, double* %13
%75 = load double, double* %55
%76 = fcmp oeq double %74, %75
br i1 %76, label %77, label %78
77: ; preds = %73
br label %78
78: ; preds = %77, %73, %69
%79 = phi i32 [ 0, %77 ], [ %70, %73 ], [ %70, %69 ]
%80 = load double, double* %28
%81 = fcmp oeq double %80, %61
br i1 %81, label %82, label %88
82: ; preds = %78
%83 = load double, double* %29
%84 = load double, double* %55
%85 = fcmp oeq double %83, %84
%86 = icmp eq i32 %79, 0
%87 = or i1 %85, %86
br i1 %87, label %137, label %90
88: ; preds = %78
%89 = icmp eq i32 %79, 0
br i1 %89, label %137, label %90
90: ; preds = %82, %88
%91 = load double, double* %4
%92 = bitcast double* %5 to <2 x double>*
%93 = load <2 x double>, <2 x double>* %92
%94 = extractelement <2 x double> %93, i64 1
%95 = fsub double %94, %91
%96 = bitcast double* %13 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = fsub <2 x double> %97, %93
%99 = bitcast double* %29 to <2 x double>*
%100 = load <2 x double>, <2 x double>* %99
%101 = fsub <2 x double> %100, %97
%102 = extractelement <2 x double> %97, i64 1
%103 = fsub double %102, %95
%104 = extractelement <2 x double> %100, i64 1
%105 = fsub double %103, %104
%106 = call double @llvm.fabs.f64(double %105)
%107 = load double, double* %55
%108 = fmul double %104, 1.000000e-08
%109 = fcmp ugt double %106, %108
br i1 %109, label %137, label %110
110: ; preds = %90
%111 = extractelement <2 x double> %101, i64 0
%112 = fmul <2 x double> %98, %101
%113 = extractelement <2 x double> %112, i64 0
%114 = extractelement <2 x double> %98, i64 1
%115 = call double @llvm.fmuladd.f64(double %95, double %114, double %113)
%116 = fsub double %107, %111
%117 = extractelement <2 x double> %93, i64 0
%118 = fsub double %116, %117
%119 = fsub <2 x double> %100, %98
%120 = insertelement <2 x double> poison, double %107, i64 0
%121 = insertelement <2 x double> %120, double %91, i64 1
%122 = fsub <2 x double> %119, %121
%123 = shufflevector <2 x double> %122, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%124 = insertelement <4 x double> %123, double %118, i64 2
%125 = insertelement <4 x double> %124, double %115, i64 3
%126 = call <4 x double> @llvm.fabs.v4f64(<4 x double> %125)
%127 = fmul <2 x double> %121, <double 1.000000e-08, double 1.000000e-08>
%128 = fmul double %117, 1.000000e-08
%129 = shufflevector <2 x double> %127, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%130 = insertelement <4 x double> %129, double 1.000000e-08, i64 3
%131 = insertelement <4 x double> %130, double %128, i64 2
%132 = fcmp ugt <4 x double> %126, %131
%133 = freeze <4 x i1> %132
%134 = bitcast <4 x i1> %133 to i4
%135 = icmp eq i4 %134, 0
%136 = select i1 %135, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0)
br label %137
137: ; preds = %82, %58, %110, %90, %88
%138 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %88 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %90 ], [ %136, %110 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %58 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), %82 ]
%139 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %138)
br label %140
140: ; preds = %8, %137
%141 = phi i32 [ 0, %137 ], [ 1, %8 ]
ret i32 %141
}