#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 ssize_t;
typedef int mode_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int O_CREAT;
int O_RDWR;
int /*<<< orphan*/ SEEK_SET;
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_IWUSR;
double **array2d(int, int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fillarray2d(double **, int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
int open(char *, int, int);
int /*<<< orphan*/ printarray2d(double **, int, int);
int read(int, double *, int);
int /*<<< orphan*/ stdout;
int write(int, double *, int);
int main(int argc, char **argv) {
  double **bw;
  double **br;
  int fd;
  int oflag = O_CREAT | O_RDWR;
  mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
  int i, j;
  ssize_t ret, total;
  assert(argc == 2);
  fd = open(argv[1], oflag, mode);
  assert(fd > -1);
  bw = array2d(8, 8);
  fillarray2d(bw, 8, 8);
  total = 0;
  for (i = 0; i < 8; i++)
    for (j = 0; j < 8; j++) {
      ret = write(fd, &bw[i][j], sizeof(double));
      assert(ret > -1);
      total += ret;
    }
  fprintf(stdout, "%ld bytes written.\n", total);
  br = array2d(8, 8);
  total = 0;
  lseek(fd, 0, SEEK_SET);
  for (i = 0; i < 8; i++)
    for (j = 0; j < 8; j++) {
      ret = read(fd, &br[i][j], sizeof(double));
      assert(ret > -1);
      total += ret;
    }
  fprintf(stdout, "%ld bytes read.\n", total);
  printarray2d(br, 8, 8);
  close(fd);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e2b(%rip),%rax
mov    (%rax),%eax
mov    0x2e0a(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x28(%rbp)
mov    0x2dc6(%rip),%rax
mov    (%rax),%eax
mov    0x2ded(%rip),%rcx
or     (%rcx),%eax
mov    0x2dcc(%rip),%rcx
or     (%rcx),%eax
mov    0x2dbb(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   10a0 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x28(%rbp),%esi
mov    -0x2c(%rbp),%edx
call   10c0 <open@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   10a0 <assert@plt>
mov    $0x8,%esi
mov    %esi,%edi
call   1040 <array2d@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x8,%edx
mov    %edx,%esi
call   1060 <fillarray2d@plt>
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x8,-0x30(%rbp)
jge    12e5 <main+0x135>
movl   $0x0,-0x34(%rbp)
cmpl   $0x8,-0x34(%rbp)
jge    12d2 <main+0x122>
mov    -0x24(%rbp),%edi
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0xffffffff,-0x38(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   10a0 <assert@plt>
mov    -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1279 <main+0xc9>
jmp    12d7 <main+0x127>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1268 <main+0xb8>
mov    0x2cb4(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%edx
lea    0xd08(%rip),%rsi
call   10b0 <fprintf@plt>
mov    $0x8,%esi
mov    %esi,%edi
call   1040 <array2d@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x24(%rbp),%edi
mov    0x2caa(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <lseek@plt>
movl   $0x0,-0x30(%rbp)
cmpl   $0x8,-0x30(%rbp)
jge    13ab <main+0x1fb>
movl   $0x0,-0x34(%rbp)
cmpl   $0x8,-0x34(%rbp)
jge    1398 <main+0x1e8>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,-0x38(%rbp)
cmpl   $0xffffffff,-0x38(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   10a0 <assert@plt>
mov    -0x38(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    133f <main+0x18f>
jmp    139d <main+0x1ed>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    132e <main+0x17e>
mov    0x2bee(%rip),%rax
mov    (%rax),%edi
mov    -0x3c(%rbp),%edx
lea    0xc56(%rip),%rsi
call   10b0 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    $0x8,%edx
mov    %edx,%esi
call   1080 <printarray2d@plt>
mov    -0x24(%rbp),%edi
call   1070 <close@plt>
mov    0x2bce(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e36(%rip),%rax
mov    0x2e17(%rip),%rcx
mov    (%rcx),%ebx
or     (%rax),%ebx
mov    0x2dd4(%rip),%rax
mov    0x2dfd(%rip),%rcx
mov    (%rcx),%ebp
or     (%rax),%ebp
mov    0x2dda(%rip),%rax
or     (%rax),%ebp
mov    0x2dc9(%rip),%rax
or     (%rax),%ebp
mov    %rsi,%r14
xor    %eax,%eax
cmp    $0x2,%edi
sete   %al
mov    %eax,%edi
call   10a0 <assert@plt>
mov    0x8(%r14),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
call   10c0 <open@plt>
mov    %eax,%r14d
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
mov    $0x8,%edi
mov    $0x8,%esi
call   1040 <array2d@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    $0x8,%esi
mov    $0x8,%edx
call   1060 <fillarray2d@plt>
xor    %r12d,%r12d
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    (%r15,%r12,8),%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r12,8),%rsi
add    $0x8,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r12,8),%rsi
add    $0x10,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r12,8),%rsi
add    $0x18,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r12,8),%rsi
add    $0x20,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r12,8),%rsi
add    $0x28,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r12,8),%rsi
add    $0x30,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r12,8),%rsi
add    $0x38,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
add    $0x1,%r12
cmp    $0x8,%r12
jne    1250 <main+0xa0>
mov    0x2c17(%rip),%r12
mov    (%r12),%edi
lea    0xc6c(%rip),%rsi
mov    %ebp,%edx
call   10b0 <fprintf@plt>
mov    $0x8,%edi
mov    $0x8,%esi
call   1040 <array2d@plt>
mov    %rax,%r15
mov    0x2c14(%rip),%rax
mov    (%rax),%edx
xor    %r13d,%r13d
mov    %r14d,%edi
xor    %esi,%esi
call   1050 <lseek@plt>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%r13,8),%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r13,8),%rsi
add    $0x8,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r13,8),%rsi
add    $0x10,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r13,8),%rsi
add    $0x18,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r13,8),%rsi
add    $0x20,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r13,8),%rsi
add    $0x28,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r13,8),%rsi
add    $0x30,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
mov    (%r15,%r13,8),%rsi
add    $0x38,%rsi
mov    %r14d,%edi
mov    $0x8,%edx
call   1090 <read@plt>
mov    %eax,%ebx
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   10a0 <assert@plt>
add    %ebx,%ebp
add    $0x1,%r13
cmp    $0x8,%r13
jne    13d0 <main+0x220>
mov    (%r12),%edi
lea    0xb07(%rip),%rsi
mov    %ebp,%edx
call   10b0 <fprintf@plt>
mov    %r15,%rdi
mov    $0x8,%esi
mov    $0x8,%edx
call   1080 <printarray2d@plt>
mov    %r14d,%edi
call   1070 <close@plt>
mov    0x2a7b(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IRGRP = global i32 0
@S_IROTH = global i32 0
@stdout = global i32 0
@.str = [20 x i8] c"%ld bytes written.\0A\00"
@SEEK_SET = global i32 0
@.str.1 = [17 x i8] c"%ld bytes read.\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = load i32, i32* @O_CREAT
%16 = load i32, i32* @O_RDWR
%17 = or i32 %15, %16
store i32 %17, i32* %9
%18 = load i32, i32* @S_IRUSR
%19 = load i32, i32* @S_IWUSR
%20 = or i32 %18, %19
%21 = load i32, i32* @S_IRGRP
%22 = or i32 %20, %21
%23 = load i32, i32* @S_IROTH
%24 = or i32 %22, %23
store i32 %24, i32* %10
%25 = load i32, i32* %4
%26 = icmp eq i32 %25, 2
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = load i32, i32* %9
%33 = load i32, i32* %10
%34 = call i32 @open(i8* %31, i32 %32, i32 %33)
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = icmp sgt i32 %35, -1
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = call double** @array2d(i32 8, i32 8)
store double** %39, double*** %6
%40 = load double**, double*** %6
%41 = call i32 @fillarray2d(double** %40, i32 8, i32 8)
store i32 0, i32* %14
store i32 0, i32* %11
br label %42
42: ; preds = %71, %2
%43 = load i32, i32* %11
%44 = icmp slt i32 %43, 8
br i1 %44, label %45, label %74
45: ; preds = %42
store i32 0, i32* %12
br label %46
46: ; preds = %67, %45
%47 = load i32, i32* %12
%48 = icmp slt i32 %47, 8
br i1 %48, label %49, label %70
49: ; preds = %46
%50 = load i32, i32* %8
%51 = load double**, double*** %6
%52 = load i32, i32* %11
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double*, double** %51, i64 %53
%55 = load double*, double** %54
%56 = load i32, i32* %12
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
%59 = call i32 @write(i32 %50, double* %58, i32 8)
store i32 %59, i32* %13
%60 = load i32, i32* %13
%61 = icmp sgt i32 %60, -1
%62 = zext i1 %61 to i32
%63 = call i32 @assert(i32 %62)
%64 = load i32, i32* %13
%65 = load i32, i32* %14
%66 = add nsw i32 %65, %64
store i32 %66, i32* %14
br label %67
67: ; preds = %49
%68 = load i32, i32* %12
%69 = add nsw i32 %68, 1
store i32 %69, i32* %12
br label %46
70: ; preds = %46
br label %71
71: ; preds = %70
%72 = load i32, i32* %11
%73 = add nsw i32 %72, 1
store i32 %73, i32* %11
br label %42
74: ; preds = %42
%75 = load i32, i32* @stdout
%76 = load i32, i32* %14
%77 = call i32 @fprintf(i32 %75, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %76)
%78 = call double** @array2d(i32 8, i32 8)
store double** %78, double*** %7
store i32 0, i32* %14
%79 = load i32, i32* %8
%80 = load i32, i32* @SEEK_SET
%81 = call i32 @lseek(i32 %79, i32 0, i32 %80)
store i32 0, i32* %11
br label %82
82: ; preds = %111, %74
%83 = load i32, i32* %11
%84 = icmp slt i32 %83, 8
br i1 %84, label %85, label %114
85: ; preds = %82
store i32 0, i32* %12
br label %86
86: ; preds = %107, %85
%87 = load i32, i32* %12
%88 = icmp slt i32 %87, 8
br i1 %88, label %89, label %110
89: ; preds = %86
%90 = load i32, i32* %8
%91 = load double**, double*** %7
%92 = load i32, i32* %11
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double*, double** %91, i64 %93
%95 = load double*, double** %94
%96 = load i32, i32* %12
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double, double* %95, i64 %97
%99 = call i32 @read(i32 %90, double* %98, i32 8)
store i32 %99, i32* %13
%100 = load i32, i32* %13
%101 = icmp sgt i32 %100, -1
%102 = zext i1 %101 to i32
%103 = call i32 @assert(i32 %102)
%104 = load i32, i32* %13
%105 = load i32, i32* %14
%106 = add nsw i32 %105, %104
store i32 %106, i32* %14
br label %107
107: ; preds = %89
%108 = load i32, i32* %12
%109 = add nsw i32 %108, 1
store i32 %109, i32* %12
br label %86
110: ; preds = %86
br label %111
111: ; preds = %110
%112 = load i32, i32* %11
%113 = add nsw i32 %112, 1
store i32 %113, i32* %11
br label %82
114: ; preds = %82
%115 = load i32, i32* @stdout
%116 = load i32, i32* %14
%117 = call i32 @fprintf(i32 %115, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %116)
%118 = load double**, double*** %7
%119 = call i32 @printarray2d(double** %118, i32 8, i32 8)
%120 = load i32, i32* %8
%121 = call i32 @close(i32 %120)
%122 = load i32, i32* @EXIT_FAILURE
%123 = call i32 @exit(i32 %122)
unreachable
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_RDWR = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@S_IRGRP = global i32 0
@S_IROTH = global i32 0
@stdout = global i32 0
@.str = [20 x i8] c"%ld bytes written.\0A\00"
@SEEK_SET = global i32 0
@.str.1 = [17 x i8] c"%ld bytes read.\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @O_CREAT
%4 = load i32, i32* @O_RDWR
%5 = or i32 %4, %3
%6 = load i32, i32* @S_IRUSR
%7 = load i32, i32* @S_IWUSR
%8 = or i32 %7, %6
%9 = load i32, i32* @S_IRGRP
%10 = or i32 %8, %9
%11 = load i32, i32* @S_IROTH
%12 = or i32 %10, %11
%13 = icmp eq i32 %0, 2
%14 = zext i1 %13 to i32
%15 = tail call i32 @assert(i32 %14)
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = tail call i32 @open(i8* %17, i32 %5, i32 %12)
%19 = xor i32 %18, -1
%20 = lshr i32 %19, 31
%21 = tail call i32 @assert(i32 %20)
%22 = tail call double** @array2d(i32 8, i32 8)
%23 = tail call i32 @fillarray2d(double** %22, i32 8, i32 8)
br label %24
24: ; preds = %2, %24
%25 = phi i64 [ 0, %2 ], [ %83, %24 ]
%26 = phi i32 [ 0, %2 ], [ %82, %24 ]
%27 = getelementptr inbounds double*, double** %22, i64 %25
%28 = load double*, double** %27
%29 = tail call i32 @write(i32 %18, double* %28, i32 8)
%30 = xor i32 %29, -1
%31 = lshr i32 %30, 31
%32 = tail call i32 @assert(i32 %31)
%33 = add nsw i32 %29, %26
%34 = load double*, double** %27
%35 = getelementptr inbounds double, double* %34, i64 1
%36 = tail call i32 @write(i32 %18, double* %35, i32 8)
%37 = xor i32 %36, -1
%38 = lshr i32 %37, 31
%39 = tail call i32 @assert(i32 %38)
%40 = add nsw i32 %36, %33
%41 = load double*, double** %27
%42 = getelementptr inbounds double, double* %41, i64 2
%43 = tail call i32 @write(i32 %18, double* %42, i32 8)
%44 = xor i32 %43, -1
%45 = lshr i32 %44, 31
%46 = tail call i32 @assert(i32 %45)
%47 = add nsw i32 %43, %40
%48 = load double*, double** %27
%49 = getelementptr inbounds double, double* %48, i64 3
%50 = tail call i32 @write(i32 %18, double* %49, i32 8)
%51 = xor i32 %50, -1
%52 = lshr i32 %51, 31
%53 = tail call i32 @assert(i32 %52)
%54 = add nsw i32 %50, %47
%55 = load double*, double** %27
%56 = getelementptr inbounds double, double* %55, i64 4
%57 = tail call i32 @write(i32 %18, double* %56, i32 8)
%58 = xor i32 %57, -1
%59 = lshr i32 %58, 31
%60 = tail call i32 @assert(i32 %59)
%61 = add nsw i32 %57, %54
%62 = load double*, double** %27
%63 = getelementptr inbounds double, double* %62, i64 5
%64 = tail call i32 @write(i32 %18, double* %63, i32 8)
%65 = xor i32 %64, -1
%66 = lshr i32 %65, 31
%67 = tail call i32 @assert(i32 %66)
%68 = add nsw i32 %64, %61
%69 = load double*, double** %27
%70 = getelementptr inbounds double, double* %69, i64 6
%71 = tail call i32 @write(i32 %18, double* %70, i32 8)
%72 = xor i32 %71, -1
%73 = lshr i32 %72, 31
%74 = tail call i32 @assert(i32 %73)
%75 = add nsw i32 %71, %68
%76 = load double*, double** %27
%77 = getelementptr inbounds double, double* %76, i64 7
%78 = tail call i32 @write(i32 %18, double* %77, i32 8)
%79 = xor i32 %78, -1
%80 = lshr i32 %79, 31
%81 = tail call i32 @assert(i32 %80)
%82 = add nsw i32 %78, %75
%83 = add nuw nsw i64 %25, 1
%84 = icmp eq i64 %83, 8
br i1 %84, label %85, label %24
85: ; preds = %24
%86 = load i32, i32* @stdout
%87 = tail call i32 @fprintf(i32 %86, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %82)
%88 = tail call double** @array2d(i32 8, i32 8)
%89 = load i32, i32* @SEEK_SET
%90 = tail call i32 @lseek(i32 %18, i32 0, i32 %89)
br label %91
91: ; preds = %85, %91
%92 = phi i64 [ 0, %85 ], [ %150, %91 ]
%93 = phi i32 [ 0, %85 ], [ %149, %91 ]
%94 = getelementptr inbounds double*, double** %88, i64 %92
%95 = load double*, double** %94
%96 = tail call i32 @read(i32 %18, double* %95, i32 8)
%97 = xor i32 %96, -1
%98 = lshr i32 %97, 31
%99 = tail call i32 @assert(i32 %98)
%100 = add nsw i32 %96, %93
%101 = load double*, double** %94
%102 = getelementptr inbounds double, double* %101, i64 1
%103 = tail call i32 @read(i32 %18, double* %102, i32 8)
%104 = xor i32 %103, -1
%105 = lshr i32 %104, 31
%106 = tail call i32 @assert(i32 %105)
%107 = add nsw i32 %103, %100
%108 = load double*, double** %94
%109 = getelementptr inbounds double, double* %108, i64 2
%110 = tail call i32 @read(i32 %18, double* %109, i32 8)
%111 = xor i32 %110, -1
%112 = lshr i32 %111, 31
%113 = tail call i32 @assert(i32 %112)
%114 = add nsw i32 %110, %107
%115 = load double*, double** %94
%116 = getelementptr inbounds double, double* %115, i64 3
%117 = tail call i32 @read(i32 %18, double* %116, i32 8)
%118 = xor i32 %117, -1
%119 = lshr i32 %118, 31
%120 = tail call i32 @assert(i32 %119)
%121 = add nsw i32 %117, %114
%122 = load double*, double** %94
%123 = getelementptr inbounds double, double* %122, i64 4
%124 = tail call i32 @read(i32 %18, double* %123, i32 8)
%125 = xor i32 %124, -1
%126 = lshr i32 %125, 31
%127 = tail call i32 @assert(i32 %126)
%128 = add nsw i32 %124, %121
%129 = load double*, double** %94
%130 = getelementptr inbounds double, double* %129, i64 5
%131 = tail call i32 @read(i32 %18, double* %130, i32 8)
%132 = xor i32 %131, -1
%133 = lshr i32 %132, 31
%134 = tail call i32 @assert(i32 %133)
%135 = add nsw i32 %131, %128
%136 = load double*, double** %94
%137 = getelementptr inbounds double, double* %136, i64 6
%138 = tail call i32 @read(i32 %18, double* %137, i32 8)
%139 = xor i32 %138, -1
%140 = lshr i32 %139, 31
%141 = tail call i32 @assert(i32 %140)
%142 = add nsw i32 %138, %135
%143 = load double*, double** %94
%144 = getelementptr inbounds double, double* %143, i64 7
%145 = tail call i32 @read(i32 %18, double* %144, i32 8)
%146 = xor i32 %145, -1
%147 = lshr i32 %146, 31
%148 = tail call i32 @assert(i32 %147)
%149 = add nsw i32 %145, %142
%150 = add nuw nsw i64 %92, 1
%151 = icmp eq i64 %150, 8
br i1 %151, label %152, label %91
152: ; preds = %91
%153 = load i32, i32* @stdout
%154 = tail call i32 @fprintf(i32 %153, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %149)
%155 = tail call i32 @printarray2d(double** %88, i32 8, i32 8)
%156 = tail call i32 @close(i32 %18)
%157 = load i32, i32* @EXIT_FAILURE
%158 = tail call i32 @exit(i32 %157)
unreachable
}