#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 */
typedef int i;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fourn(double *, int *, int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
scalar_t__ malloc(long);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, long);
int /*<<< orphan*/ stderr;
int main() {
  int i, j, k, l, m, npasses = 63, faedge;
  double *fdata;
  static int nsize[] = {0, 0, 0};
  long fanum, fasize;
  double mapbase, mapscale, rmin, rmax, imin, imax;
  faedge = 256;
  fanum = faedge * faedge;
  fasize = ((fanum + 1) * 2 * sizeof(double));
  nsize[1] = nsize[2] = faedge;
  fdata = (double *)malloc(fasize);
  if (fdata == NULL) {
    fprintf(stderr, "Can't allocate data array.\n");
    exit(1);
  }
  memset(fdata, 0, fasize);
  for (i = 0; i < faedge; i++) {
    for (j = 0; j < faedge; j++) {
      if (((i & 15) == 8) || ((j & 15) == 8))
        fdata[1 + (faedge * (i) + (j)) * 2] = 128.0;
    }
  }
  for (i = 0; i < npasses; i++) {
    fourn(fdata, nsize, 2, 1);
    fourn(fdata, nsize, 2, -1);
  }
  {
    double r, ij, ar, ai;
    rmin = 1e10;
    rmax = -1e10;
    imin = 1e10;
    imax = -1e10;
    ar = 0;
    ai = 0;
    for (i = 1; i <= fanum; i += 2) {
      r = fdata[i];
      ij = fdata[i + 1];
      ar += r;
      ai += ij;
      rmin = ((r) <= (rmin) ? (r) : (rmin));
      rmax = ((r) > (rmax) ? (r) : (rmax));
      imin = ((ij) <= (imin) ? (ij) : (imin));
      imax = ((ij) > (imax) ? (ij) : (imax));
    }
    mapbase = rmin;
    mapscale = 255 / (rmax - rmin);
  }
  m = 0;
  for (i = 0; i < faedge; i++) {
    for (j = 0; j < faedge; j++) {
      k = (fdata[1 + (faedge * (i) + (j)) * 2] - mapbase) * mapscale;
      l = (((i & 15) == 8) || ((j & 15) == 8)) ? 255 : 0;
      if (k != l) {
        m++;
        fprintf(stderr, "Wrong answer at (%d,%d)!  Expected %d, got %d.\n", i,
                j, l, k);
      }
    }
  }
  if (m == 0) {
    fprintf(stderr, "%d passes.  No errors in results.\n", npasses);
  } else {
    fprintf(stderr, "%d passes.  %d errors in results.\n", npasses, m);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3f,-0x1c(%rbp)
movl   $0x100,-0x20(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x20(%rbp),%eax
cltq
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
shl    $0x1,%rax
shl    $0x3,%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,0x2eba(%rip)
mov    %eax,0x2eb0(%rip)
mov    -0x38(%rbp),%rdi
call   1060 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    11d9 <main+0x89>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
lea    0xe58(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    -0x38(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1276 <main+0x126>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1263 <main+0x113>
mov    -0x8(%rbp),%eax
and    $0xf,%eax
cmp    $0x8,%eax
je     122c <main+0xdc>
mov    -0xc(%rbp),%eax
and    $0xf,%eax
cmp    $0x8,%eax
jne    1250 <main+0x100>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xdcd(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1255 <main+0x105>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1202 <main+0xb2>
jmp    1268 <main+0x118>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11ef <main+0x9f>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12cb <main+0x17b>
mov    -0x28(%rbp),%rdi
lea    0x2db8(%rip),%rsi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <fourn@plt>
mov    -0x28(%rbp),%rdi
lea    0x2d9e(%rip),%rsi
mov    $0x2,%edx
mov    $0xffffffff,%ecx
call   1030 <fourn@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    127d <main+0x12d>
movsd  0xd35(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xd20(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd1b(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xd06(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x1,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    -0x30(%rbp),%rax
jg     147a <main+0x32a>
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     139a <main+0x24a>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    13a7 <main+0x257>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x50(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    13d6 <main+0x286>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    13e3 <main+0x293>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x58(%rbp)
movsd  -0x78(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1416 <main+0x2c6>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    1423 <main+0x2d3>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x60(%rbp)
movsd  -0x78(%rbp),%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    1452 <main+0x302>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    145f <main+0x30f>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1319 <main+0x1c9>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x58(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movsd  0xb7a(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1598 <main+0x448>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1585 <main+0x435>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
and    $0xf,%ecx
mov    $0x1,%al
cmp    $0x8,%ecx
mov    %al,-0xa9(%rbp)
je     1522 <main+0x3d2>
mov    -0xc(%rbp),%eax
and    $0xf,%eax
cmp    $0x8,%eax
sete   %al
mov    %al,-0xa9(%rbp)
mov    -0xa9(%rbp),%dl
xor    %eax,%eax
mov    $0xff,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1572 <main+0x422>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    0x2a8c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x10(%rbp),%r9d
lea    0xad1(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1577 <main+0x427>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    14c0 <main+0x370>
jmp    158a <main+0x43a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    14ad <main+0x35d>
cmpl   $0x0,-0x18(%rbp)
jne    15c1 <main+0x471>
mov    0x2a37(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
lea    0xab7(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    15de <main+0x48e>
mov    0x2a18(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xab8(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movabs $0x10000000100,%rax
mov    %rax,0x2ee1(%rip)
mov    $0x100010,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     1417 <main+0x2c7>
mov    %rax,%r15
xor    %ebx,%ebx
mov    $0x100010,%edx
mov    %rax,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
lea    0x18(%r15),%rax
movabs $0x4060000000000000,%rcx
jmp    11c3 <main+0x73>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
add    $0x1000,%rax
cmp    $0x100,%rbx
je     11fe <main+0xae>
mov    %ebx,%edx
and    $0xf,%edx
mov    %rax,%rsi
xor    %ebp,%ebp
jmp    11e1 <main+0x91>
nop
add    $0x2,%rbp
add    $0x20,%rsi
cmp    $0x100,%rbp
je     11b0 <main+0x60>
cmp    $0x8,%edx
je     11f0 <main+0xa0>
mov    %ebp,%edi
and    $0xe,%edi
cmp    $0x8,%edi
jne    11f4 <main+0xa4>
mov    %rcx,-0x10(%rsi)
cmp    $0x8,%edx
jne    11d0 <main+0x80>
mov    %rcx,(%rsi)
jmp    11d0 <main+0x80>
mov    $0x3f,%ebp
lea    0x2e42(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <fourn@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
mov    $0xffffffff,%ecx
call   1030 <fourn@plt>
add    $0xffffffff,%ebp
jne    1210 <main+0xc0>
movsd  0xdb9(%rip),%xmm5
movsd  0xdb9(%rip),%xmm0
mov    $0xfffffffffffffff9,%rax
cs nopw 0x0(%rax,%rax,1)
movsd  0x40(%r15,%rax,8),%xmm2
movsd  0x50(%r15,%rax,8),%xmm1
movapd %xmm2,%xmm3
cmplesd %xmm5,%xmm3
movapd %xmm3,%xmm4
andpd  %xmm2,%xmm4
andnpd %xmm5,%xmm3
orpd   %xmm4,%xmm3
maxsd  %xmm0,%xmm2
movapd %xmm1,%xmm0
cmplesd %xmm3,%xmm0
movapd %xmm0,%xmm4
andnpd %xmm3,%xmm4
andpd  %xmm1,%xmm0
orpd   %xmm4,%xmm0
maxsd  %xmm2,%xmm1
movsd  0x60(%r15,%rax,8),%xmm2
movapd %xmm2,%xmm3
cmplesd %xmm0,%xmm3
movapd %xmm3,%xmm4
andnpd %xmm0,%xmm4
andpd  %xmm2,%xmm3
orpd   %xmm4,%xmm3
maxsd  %xmm1,%xmm2
movsd  0x70(%r15,%rax,8),%xmm0
movapd %xmm0,%xmm5
cmplesd %xmm3,%xmm5
movapd %xmm5,%xmm1
andnpd %xmm3,%xmm1
andpd  %xmm0,%xmm5
orpd   %xmm1,%xmm5
maxsd  %xmm2,%xmm0
add    $0x8,%rax
cmp    $0xfff9,%rax
jb     1260 <main+0x110>
subsd  %xmm5,%xmm0
movsd  0xd04(%rip),%xmm1
divsd  %xmm0,%xmm1
add    $0x8,%r15
mov    $0xff,%r14d
xor    %r12d,%r12d
xor    %ebp,%ebp
movapd %xmm5,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
jmp    134c <main+0x1fc>
nopl   (%rax)
add    $0x1,%r12
mov    (%rsp),%r15
add    $0x1000,%r15
cmp    $0x100,%r12
je     13cf <main+0x27f>
mov    %r12d,%r13d
and    $0xf,%r13d
mov    %r15,(%rsp)
xor    %ebx,%ebx
jmp    1371 <main+0x221>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
add    $0x10,%r15
cmp    $0x100,%rbx
je     1330 <main+0x1e0>
mov    %ebx,%eax
and    $0xf,%eax
cmp    $0x8,%eax
mov    $0x0,%r8d
cmove  %r14d,%r8d
movsd  (%r15),%xmm0
subsd  %xmm5,%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%r9d
cmp    $0x8,%r13d
cmove  %r14d,%r8d
cmp    %r9d,%r8d
je     1360 <main+0x210>
add    $0x1,%ebp
mov    0x2c34(%rip),%rax
mov    (%rax),%edi
lea    0xc7f(%rip),%rsi
mov    %r12d,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
movsd  0x8(%rsp),%xmm1
movapd 0x10(%rsp),%xmm5
jmp    1360 <main+0x210>
mov    0x2c0a(%rip),%rax
mov    (%rax),%edi
test   %ebp,%ebp
je     13f3 <main+0x2a3>
lea    0xca4(%rip),%rsi
mov    $0x3f,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1406 <main+0x2b6>
lea    0xc6a(%rip),%rsi
mov    $0x3f,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2bc2(%rip),%rax
mov    (%rax),%edi
lea    0xbf1(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@main.nsize = internal global [3 x i32] zeroinitializer
@stderr = global i32 0
@.str = [28 x i8] c"Can't allocate data array.\0A\00"
@.str.1 = [48 x i8] c"Wrong answer at (%d,%d)! Expected %d, got %d.\0A\00"
@.str.2 = [35 x i8] c"%d passes. No errors in results.\0A\00"
@.str.3 = [35 x i8] c"%d passes. %d errors in results.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca i64
%11 = alloca i64
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i32 0, i32* %1
store i32 63, i32* %7
store i32 256, i32* %8
%22 = load i32, i32* %8
%23 = load i32, i32* %8
%24 = mul nsw i32 %22, %23
%25 = sext i32 %24 to i64
store i64 %25, i64* %10
%26 = load i64, i64* %10
%27 = add nsw i64 %26, 1
%28 = mul nsw i64 %27, 2
%29 = mul i64 %28, 8
store i64 %29, i64* %11
%30 = load i32, i32* %8
store i32 %30, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.nsize, i64 0, i64 2)
store i32 %30, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.nsize, i64 0, i64 1)
%31 = load i64, i64* %11
%32 = call i64 @malloc(i64 %31)
%33 = inttoptr i64 %32 to double*
store double* %33, double** %9
%34 = load double*, double** %9
%35 = icmp eq double* %34, null
br i1 %35, label %36, label %40
36: ; preds = %0
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%39 = call i32 @exit(i32 1)
unreachable
40: ; preds = %0
%41 = load double*, double** %9
%42 = load i64, i64* %11
%43 = call i32 @memset(double* %41, i32 0, i64 %42)
store i32 0, i32* %2
br label %44
44: ; preds = %77, %40
%45 = load i32, i32* %2
%46 = load i32, i32* %8
%47 = icmp slt i32 %45, %46
br i1 %47, label %48, label %80
48: ; preds = %44
store i32 0, i32* %3
br label %49
49: ; preds = %73, %48
%50 = load i32, i32* %3
%51 = load i32, i32* %8
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %76
53: ; preds = %49
%54 = load i32, i32* %2
%55 = and i32 %54, 15
%56 = icmp eq i32 %55, 8
br i1 %56, label %61, label %57
57: ; preds = %53
%58 = load i32, i32* %3
%59 = and i32 %58, 15
%60 = icmp eq i32 %59, 8
br i1 %60, label %61, label %72
61: ; preds = %57, %53
%62 = load double*, double** %9
%63 = load i32, i32* %8
%64 = load i32, i32* %2
%65 = mul nsw i32 %63, %64
%66 = load i32, i32* %3
%67 = add nsw i32 %65, %66
%68 = mul nsw i32 %67, 2
%69 = add nsw i32 1, %68
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %62, i64 %70
store double 1.280000e+02, double* %71
br label %72
72: ; preds = %61, %57
br label %73
73: ; preds = %72
%74 = load i32, i32* %3
%75 = add nsw i32 %74, 1
store i32 %75, i32* %3
br label %49
76: ; preds = %49
br label %77
77: ; preds = %76
%78 = load i32, i32* %2
%79 = add nsw i32 %78, 1
store i32 %79, i32* %2
br label %44
80: ; preds = %44
store i32 0, i32* %2
br label %81
81: ; preds = %90, %80
%82 = load i32, i32* %2
%83 = load i32, i32* %7
%84 = icmp slt i32 %82, %83
br i1 %84, label %85, label %93
85: ; preds = %81
%86 = load double*, double** %9
%87 = call i32 @fourn(double* %86, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.nsize, i64 0, i64 0), i32 2, i32 1)
%88 = load double*, double** %9
%89 = call i32 @fourn(double* %88, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.nsize, i64 0, i64 0), i32 2, i32 -1)
br label %90
90: ; preds = %85
%91 = load i32, i32* %2
%92 = add nsw i32 %91, 1
store i32 %92, i32* %2
br label %81
93: ; preds = %81
store double 1.000000e+10, double* %14
store double -1.000000e+10, double* %15
store double 1.000000e+10, double* %16
store double -1.000000e+10, double* %17
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %21
store i32 1, i32* %2
br label %94
94: ; preds = %153, %93
%95 = load i32, i32* %2
%96 = sext i32 %95 to i64
%97 = load i64, i64* %10
%98 = icmp sle i64 %96, %97
br i1 %98, label %99, label %156
99: ; preds = %94
%100 = load double*, double** %9
%101 = load i32, i32* %2
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double, double* %100, i64 %102
%104 = load double, double* %103
store double %104, double* %18
%105 = load double*, double** %9
%106 = load i32, i32* %2
%107 = add nsw i32 %106, 1
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %105, i64 %108
%110 = load double, double* %109
store double %110, double* %19
%111 = load double, double* %18
%112 = load double, double* %20
%113 = fadd double %112, %111
store double %113, double* %20
%114 = load double, double* %19
%115 = load double, double* %21
%116 = fadd double %115, %114
store double %116, double* %21
%117 = load double, double* %18
%118 = load double, double* %14
%119 = fcmp ole double %117, %118
br i1 %119, label %120, label %122
120: ; preds = %99
%121 = load double, double* %18
br label %124
122: ; preds = %99
%123 = load double, double* %14
br label %124
124: ; preds = %122, %120
%125 = phi double [ %121, %120 ], [ %123, %122 ]
store double %125, double* %14
%126 = load double, double* %18
%127 = load double, double* %15
%128 = fcmp ogt double %126, %127
br i1 %128, label %129, label %131
129: ; preds = %124
%130 = load double, double* %18
br label %133
131: ; preds = %124
%132 = load double, double* %15
br label %133
133: ; preds = %131, %129
%134 = phi double [ %130, %129 ], [ %132, %131 ]
store double %134, double* %15
%135 = load double, double* %19
%136 = load double, double* %16
%137 = fcmp ole double %135, %136
br i1 %137, label %138, label %140
138: ; preds = %133
%139 = load double, double* %19
br label %142
140: ; preds = %133
%141 = load double, double* %16
br label %142
142: ; preds = %140, %138
%143 = phi double [ %139, %138 ], [ %141, %140 ]
store double %143, double* %16
%144 = load double, double* %19
%145 = load double, double* %17
%146 = fcmp ogt double %144, %145
br i1 %146, label %147, label %149
147: ; preds = %142
%148 = load double, double* %19
br label %151
149: ; preds = %142
%150 = load double, double* %17
br label %151
151: ; preds = %149, %147
%152 = phi double [ %148, %147 ], [ %150, %149 ]
store double %152, double* %17
br label %153
153: ; preds = %151
%154 = load i32, i32* %2
%155 = add nsw i32 %154, 2
store i32 %155, i32* %2
br label %94
156: ; preds = %94
%157 = load double, double* %14
store double %157, double* %12
%158 = load double, double* %15
%159 = load double, double* %14
%160 = fsub double %158, %159
%161 = fdiv double 2.550000e+02, %160
store double %161, double* %13
store i32 0, i32* %6
store i32 0, i32* %2
br label %162
162: ; preds = %216, %156
%163 = load i32, i32* %2
%164 = load i32, i32* %8
%165 = icmp slt i32 %163, %164
br i1 %165, label %166, label %219
166: ; preds = %162
store i32 0, i32* %3
br label %167
167: ; preds = %212, %166
%168 = load i32, i32* %3
%169 = load i32, i32* %8
%170 = icmp slt i32 %168, %169
br i1 %170, label %171, label %215
171: ; preds = %167
%172 = load double*, double** %9
%173 = load i32, i32* %8
%174 = load i32, i32* %2
%175 = mul nsw i32 %173, %174
%176 = load i32, i32* %3
%177 = add nsw i32 %175, %176
%178 = mul nsw i32 %177, 2
%179 = add nsw i32 1, %178
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double, double* %172, i64 %180
%182 = load double, double* %181
%183 = load double, double* %12
%184 = fsub double %182, %183
%185 = load double, double* %13
%186 = fmul double %184, %185
%187 = fptosi double %186 to i32
store i32 %187, i32* %4
%188 = load i32, i32* %2
%189 = and i32 %188, 15
%190 = icmp eq i32 %189, 8
br i1 %190, label %195, label %191
191: ; preds = %171
%192 = load i32, i32* %3
%193 = and i32 %192, 15
%194 = icmp eq i32 %193, 8
br label %195
195: ; preds = %191, %171
%196 = phi i1 [ true, %171 ], [ %194, %191 ]
%197 = zext i1 %196 to i64
%198 = select i1 %196, i32 255, i32 0
store i32 %198, i32* %5
%199 = load i32, i32* %4
%200 = load i32, i32* %5
%201 = icmp ne i32 %199, %200
br i1 %201, label %202, label %211
202: ; preds = %195
%203 = load i32, i32* %6
%204 = add nsw i32 %203, 1
store i32 %204, i32* %6
%205 = load i32, i32* @stderr
%206 = load i32, i32* %2
%207 = load i32, i32* %3
%208 = load i32, i32* %5
%209 = load i32, i32* %4
%210 = call i32 (i32, i8*, ...) @fprintf(i32 %205, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %206, i32 %207, i32 %208, i32 %209)
br label %211
211: ; preds = %202, %195
br label %212
212: ; preds = %211
%213 = load i32, i32* %3
%214 = add nsw i32 %213, 1
store i32 %214, i32* %3
br label %167
215: ; preds = %167
br label %216
216: ; preds = %215
%217 = load i32, i32* %2
%218 = add nsw i32 %217, 1
store i32 %218, i32* %2
br label %162
219: ; preds = %162
%220 = load i32, i32* %6
%221 = icmp eq i32 %220, 0
br i1 %221, label %222, label %226
222: ; preds = %219
%223 = load i32, i32* @stderr
%224 = load i32, i32* %7
%225 = call i32 (i32, i8*, ...) @fprintf(i32 %223, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %224)
br label %231
226: ; preds = %219
%227 = load i32, i32* @stderr
%228 = load i32, i32* %7
%229 = load i32, i32* %6
%230 = call i32 (i32, i8*, ...) @fprintf(i32 %227, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 %228, i32 %229)
br label %231
231: ; preds = %226, %222
ret i32 0
}

LLVM IR (-O2):
@main.nsize = internal global [3 x i32] zeroinitializer
@stderr = global i32 0
@.str = [28 x i8] c"Can't allocate data array.\0A\00"
@.str.1 = [48 x i8] c"Wrong answer at (%d,%d)! Expected %d, got %d.\0A\00"
@.str.2 = [35 x i8] c"%d passes. No errors in results.\0A\00"
@.str.3 = [35 x i8] c"%d passes. %d errors in results.\0A\00"
define i32 @main() {
store i32 256, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.nsize, i64 0, i64 2)
store i32 256, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.nsize, i64 0, i64 1)
%1 = tail call i64 @malloc(i64 1048592)
%2 = inttoptr i64 %1 to double*
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = tail call i32 @memset(double* %2, i32 0, i64 1048592)
br label %10
10: ; preds = %8, %35
%11 = phi i64 [ 0, %8 ], [ %36, %35 ]
%12 = and i64 %11, 15
%13 = icmp eq i64 %12, 8
%14 = shl nsw i64 %11, 8
br label %15
15: ; preds = %32, %10
%16 = phi i64 [ 0, %10 ], [ %33, %32 ]
%17 = and i64 %16, 14
%18 = icmp eq i64 %17, 8
%19 = select i1 %13, i1 true, i1 %18
br i1 %19, label %20, label %25
20: ; preds = %15
%21 = add nuw nsw i64 %16, %14
%22 = shl nuw nsw i64 %21, 1
%23 = or i64 %22, 1
%24 = getelementptr inbounds double, double* %2, i64 %23
store double 1.280000e+02, double* %24
br label %25
25: ; preds = %15, %20
br i1 %13, label %26, label %32
26: ; preds = %25
%27 = or i64 %16, 1
%28 = add nuw nsw i64 %27, %14
%29 = shl nuw nsw i64 %28, 1
%30 = or i64 %29, 1
%31 = getelementptr inbounds double, double* %2, i64 %30
store double 1.280000e+02, double* %31
br label %32
32: ; preds = %26, %25
%33 = add nuw nsw i64 %16, 2
%34 = icmp eq i64 %33, 256
br i1 %34, label %35, label %15
35: ; preds = %32
%36 = add nuw nsw i64 %11, 1
%37 = icmp eq i64 %36, 256
br i1 %37, label %38, label %10
38: ; preds = %35, %38
%39 = phi i32 [ %42, %38 ], [ 0, %35 ]
%40 = tail call i32 @fourn(double* %2, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.nsize, i64 0, i64 0), i32 2, i32 1)
%41 = tail call i32 @fourn(double* %2, i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.nsize, i64 0, i64 0), i32 2, i32 -1)
%42 = add nuw nsw i32 %39, 1
%43 = icmp eq i32 %42, 63
br i1 %43, label %44, label %38
44: ; preds = %38, %44
%45 = phi i64 [ %75, %44 ], [ 1, %38 ]
%46 = phi double [ %74, %44 ], [ -1.000000e+10, %38 ]
%47 = phi double [ %72, %44 ], [ 1.000000e+10, %38 ]
%48 = getelementptr inbounds double, double* %2, i64 %45
%49 = load double, double* %48
%50 = fcmp ole double %49, %47
%51 = select i1 %50, double %49, double %47
%52 = fcmp ogt double %49, %46
%53 = select i1 %52, double %49, double %46
%54 = add nuw nsw i64 %45, 2
%55 = getelementptr inbounds double, double* %2, i64 %54
%56 = load double, double* %55
%57 = fcmp ole double %56, %51
%58 = select i1 %57, double %56, double %51
%59 = fcmp ogt double %56, %53
%60 = select i1 %59, double %56, double %53
%61 = add nuw nsw i64 %45, 4
%62 = getelementptr inbounds double, double* %2, i64 %61
%63 = load double, double* %62
%64 = fcmp ole double %63, %58
%65 = select i1 %64, double %63, double %58
%66 = fcmp ogt double %63, %60
%67 = select i1 %66, double %63, double %60
%68 = add nuw nsw i64 %45, 6
%69 = getelementptr inbounds double, double* %2, i64 %68
%70 = load double, double* %69
%71 = fcmp ole double %70, %65
%72 = select i1 %71, double %70, double %65
%73 = fcmp ogt double %70, %67
%74 = select i1 %73, double %70, double %67
%75 = add nuw nsw i64 %45, 8
%76 = icmp ult i64 %45, 65529
br i1 %76, label %44, label %77
77: ; preds = %44
%78 = fsub double %74, %72
%79 = fdiv double 2.550000e+02, %78
br label %80
80: ; preds = %77, %112
%81 = phi i64 [ 0, %77 ], [ %113, %112 ]
%82 = phi i32 [ 0, %77 ], [ %109, %112 ]
%83 = shl nsw i64 %81, 8
%84 = trunc i64 %81 to i32
%85 = and i32 %84, 15
%86 = icmp eq i32 %85, 8
br label %87
87: ; preds = %80, %108
%88 = phi i64 [ 0, %80 ], [ %110, %108 ]
%89 = phi i32 [ %82, %80 ], [ %109, %108 ]
%90 = add nuw nsw i64 %88, %83
%91 = shl nuw nsw i64 %90, 1
%92 = or i64 %91, 1
%93 = getelementptr inbounds double, double* %2, i64 %92
%94 = load double, double* %93
%95 = fsub double %94, %72
%96 = fmul double %79, %95
%97 = fptosi double %96 to i32
%98 = trunc i64 %88 to i32
%99 = and i32 %98, 15
%100 = icmp eq i32 %99, 8
%101 = select i1 %86, i1 true, i1 %100
%102 = select i1 %101, i32 255, i32 0
%103 = icmp eq i32 %102, %97
br i1 %103, label %108, label %104
104: ; preds = %87
%105 = add nsw i32 %89, 1
%106 = load i32, i32* @stderr
%107 = tail call i32 (i32, i8*, ...) @fprintf(i32 %106, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %84, i32 %98, i32 %102, i32 %97)
br label %108
108: ; preds = %87, %104
%109 = phi i32 [ %105, %104 ], [ %89, %87 ]
%110 = add nuw nsw i64 %88, 1
%111 = icmp eq i64 %110, 256
br i1 %111, label %112, label %87
112: ; preds = %108
%113 = add nuw nsw i64 %81, 1
%114 = icmp eq i64 %113, 256
br i1 %114, label %115, label %80
115: ; preds = %112
%116 = icmp eq i32 %109, 0
%117 = load i32, i32* @stderr
br i1 %116, label %118, label %120
118: ; preds = %115
%119 = tail call i32 (i32, i8*, ...) @fprintf(i32 %117, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 63)
br label %122
120: ; preds = %115
%121 = tail call i32 (i32, i8*, ...) @fprintf(i32 %117, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i32 63, i32 %109)
br label %122
122: ; preds = %120, %118
ret i32 0
}