#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*/ abort();
void check(double a[128][128], double b[128][128]) {
  int i, j;
  for (i = 0; i < 128; i++)
    for (j = 0; j < 128; j++)
      if (a[i][j] - b[i][j] > 0.0000000000000001 ||
          b[i][j] - a[i][j] > 0.0000000000000001)
        abort();
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x80,-0x14(%rbp)
jge    11f9 <check+0xe9>
movl   $0x0,-0x18(%rbp)
cmpl   $0x80,-0x18(%rbp)
jge    11e6 <check+0xd6>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  0xe80(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     11cc <check+0xbc>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0xa,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  0xe3e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11d3 <check+0xc3>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11d8 <check+0xc8>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113b <check+0x2b>
jmp    11eb <check+0xdb>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <check+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rax
add    $0x8,%rdi
add    $0x8,%rsi
xor    %eax,%eax
movsd  0xedd(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  -0x8(%rdi,%rcx,8),%xmm2
movsd  -0x8(%rsi,%rcx,8),%xmm1
movapd %xmm2,%xmm3
subsd  %xmm1,%xmm3
ucomisd %xmm0,%xmm3
ja     11af <check+0x9f>
subsd  %xmm2,%xmm1
ucomisd %xmm0,%xmm1
ja     11af <check+0x9f>
movsd  (%rdi,%rcx,8),%xmm2
movsd  (%rsi,%rcx,8),%xmm1
movapd %xmm2,%xmm3
subsd  %xmm1,%xmm3
ucomisd %xmm0,%xmm3
ja     11af <check+0x9f>
subsd  %xmm2,%xmm1
ucomisd %xmm0,%xmm1
ja     11af <check+0x9f>
add    $0x2,%rcx
cmp    $0x80,%rcx
jne    1140 <check+0x30>
add    $0x1,%rax
add    $0x400,%rdi
add    $0x400,%rsi
cmp    $0x80,%rax
jne    1130 <check+0x20>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @check([128 x double]* %0, [128 x double]* %1) {
%3 = alloca [128 x double]*
%4 = alloca [128 x double]*
%5 = alloca i32
%6 = alloca i32
store [128 x double]* %0, [128 x double]** %3
store [128 x double]* %1, [128 x double]** %4
store i32 0, i32* %5
br label %7
7: ; preds = %59, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 128
br i1 %9, label %10, label %62
10: ; preds = %7
store i32 0, i32* %6
br label %11
11: ; preds = %55, %10
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 128
br i1 %13, label %14, label %58
14: ; preds = %11
%15 = load [128 x double]*, [128 x double]** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [128 x double], [128 x double]* %15, i64 %17
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [128 x double], [128 x double]* %18, i64 0, i64 %20
%22 = load double, double* %21
%23 = load [128 x double]*, [128 x double]** %4
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [128 x double], [128 x double]* %23, i64 %25
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [128 x double], [128 x double]* %26, i64 0, i64 %28
%30 = load double, double* %29
%31 = fsub double %22, %30
%32 = fcmp ogt double %31, 0x3C9CD2B297D889BC
br i1 %32, label %52, label %33
33: ; preds = %14
%34 = load [128 x double]*, [128 x double]** %4
%35 = load i32, i32* %5
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [128 x double], [128 x double]* %34, i64 %36
%38 = load i32, i32* %6
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [128 x double], [128 x double]* %37, i64 0, i64 %39
%41 = load double, double* %40
%42 = load [128 x double]*, [128 x double]** %3
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [128 x double], [128 x double]* %42, i64 %44
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [128 x double], [128 x double]* %45, i64 0, i64 %47
%49 = load double, double* %48
%50 = fsub double %41, %49
%51 = fcmp ogt double %50, 0x3C9CD2B297D889BC
br i1 %51, label %52, label %54
52: ; preds = %33, %14
%53 = call i32 (...) @abort()
unreachable
54: ; preds = %33
br label %55
55: ; preds = %54
%56 = load i32, i32* %6
%57 = add nsw i32 %56, 1
store i32 %57, i32* %6
br label %11
58: ; preds = %11
br label %59
59: ; preds = %58
%60 = load i32, i32* %5
%61 = add nsw i32 %60, 1
store i32 %61, i32* %5
br label %7
62: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @check([128 x double]* nocapture %0, [128 x double]* nocapture %1) {
br label %3
3: ; preds = %2, %32
%4 = phi i64 [ 0, %2 ], [ %33, %32 ]
br label %19
5: ; preds = %19
%6 = or i64 %20, 1
%7 = getelementptr inbounds [128 x double], [128 x double]* %0, i64 %4, i64 %6
%8 = load double, double* %7
%9 = getelementptr inbounds [128 x double], [128 x double]* %1, i64 %4, i64 %6
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = fcmp ogt double %11, 0x3C9CD2B297D889BC
%13 = fsub double %10, %8
%14 = fcmp ogt double %13, 0x3C9CD2B297D889BC
%15 = or i1 %12, %14
br i1 %15, label %30, label %16
16: ; preds = %5
%17 = add nuw nsw i64 %20, 2
%18 = icmp eq i64 %17, 128
br i1 %18, label %32, label %19
19: ; preds = %16, %3
%20 = phi i64 [ 0, %3 ], [ %17, %16 ]
%21 = getelementptr inbounds [128 x double], [128 x double]* %0, i64 %4, i64 %20
%22 = load double, double* %21
%23 = getelementptr inbounds [128 x double], [128 x double]* %1, i64 %4, i64 %20
%24 = load double, double* %23
%25 = fsub double %22, %24
%26 = fcmp ogt double %25, 0x3C9CD2B297D889BC
%27 = fsub double %24, %22
%28 = fcmp ogt double %27, 0x3C9CD2B297D889BC
%29 = or i1 %26, %28
br i1 %29, label %30, label %5
30: ; preds = %5, %19
%31 = tail call i32 (...) @abort()
unreachable
32: ; preds = %16
%33 = add nuw nsw i64 %4, 1
%34 = icmp eq i64 %33, 128
br i1 %34, label %35, label %3
35: ; preds = %32
ret void
}