#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 /*<<< orphan*/ FILE;

/* Variables and functions */
double atof(char *);
int /*<<< orphan*/ clean_line(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ freex(double **);
int /*<<< orphan*/ freexy(double **);
int /*<<< orphan*/ *get_line_cf(char *, int, int /*<<< orphan*/ *);
scalar_t__ is_a_number(char *);
int /*<<< orphan*/ willus_mem_alloc(double **, size_t, char *);
int readx(char *filename, double **x, int *n, FILE *output) {
  FILE *f;
  static char *notenough = "There is not enough memory to read in file %s.\n";
  static char *internal = "Internal error re-reading file %s.\n";
  char buf[200];
  long memsize;
  int i;
  size_t memsizest;
  static char *funcname = "readx";
  (*x) = NULL;
  (*n) = 0;
  f = fopen(filename, "r");
  if (f == NULL) {
    if (output != NULL)
      fprintf(output, "Cannot open file %s for reading array pairs.\n",
              filename);
    return (-2);
  }
  while (get_line_cf(buf, 199, f) != NULL) {
    clean_line(buf);
    if (is_a_number(buf))
      (*n)++;
  }
  fclose(f);
  if ((*n) == 0) {
    if (output != NULL)
      fprintf(output, "There are no array pairs in file %s.\n", filename);
    return (0);
  }
  memsize = (long)sizeof(double) * (*n);
  memsizest = (size_t)memsize;
  if (memsize != memsizest) {
    if (output != NULL)
      fprintf(output, notenough, filename);
    return (-1);
  }
  if (!willus_mem_alloc(x, memsizest, funcname)) {
    if (output != NULL)
      fprintf(output, notenough, filename);
    return (-1);
  }
  i = 0;
  f = fopen(filename, "r");
  if (f == NULL) {
    freex(x);
    if (output != NULL)
      fprintf(output, internal, filename);
    return (-3);
  }
  while (get_line_cf(buf, 199, f) != NULL) {
    clean_line(buf);
    if (is_a_number(buf)) {
      if (i >= (*n)) {
        fclose(f);
        freex(x);
        if (output != NULL)
          fprintf(output, internal, filename);
        return (-3);
      }
      (*x)[i] = atof(buf);
      i++;
    }
  }
  fclose(f);
  if (i != (*n)) {
    freexy(x);
    if (output != NULL)
      fprintf(output, internal, filename);
    return (-3);
  }
  return (0);
}


x86 assembly (clang, -O0):
<readx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    121a <readx+0x7a>
cmpq   $0x0,-0x28(%rbp)
je     120e <readx+0x6e>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe53(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    14d6 <readx+0x336>
jmp    121f <readx+0x7f>
lea    -0x100(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    $0xc7,%esi
call   10c0 <get_line_cf@plt>
cmp    $0x0,%rax
je     1270 <readx+0xd0>
lea    -0x100(%rbp),%rdi
call   10a0 <clean_line@plt>
lea    -0x100(%rbp),%rdi
call   1090 <is_a_number@plt>
cmp    $0x0,%rax
je     126b <readx+0xcb>
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    121f <readx+0x7f>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
jne    12b1 <readx+0x111>
cmpq   $0x0,-0x28(%rbp)
je     12a5 <readx+0x105>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xdea(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14d6 <readx+0x336>
mov    -0x20(%rbp),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x108(%rbp),%rax
cmp    -0x118(%rbp),%rax
je     1310 <readx+0x170>
cmpq   $0x0,-0x28(%rbp)
je     1304 <readx+0x164>
mov    -0x28(%rbp),%rdi
mov    0x2d75(%rip),%rsi
mov    -0x10(%rbp),%rdx
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14d6 <readx+0x336>
mov    -0x18(%rbp),%rdi
mov    -0x118(%rbp),%rsi
mov    0x2d5e(%rip),%rdx
call   1040 <willus_mem_alloc@plt>
cmp    $0x0,%eax
jne    135b <readx+0x1bb>
cmpq   $0x0,-0x28(%rbp)
je     134f <readx+0x1af>
mov    -0x28(%rbp),%rdi
mov    0x2d2a(%rip),%rsi
mov    -0x10(%rbp),%rdx
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    14d6 <readx+0x336>
movl   $0x0,-0x10c(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xcea(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    13b8 <readx+0x218>
mov    -0x18(%rbp),%rdi
call   1080 <freex@plt>
cmpq   $0x0,-0x28(%rbp)
je     13ac <readx+0x20c>
mov    -0x28(%rbp),%rdi
mov    0x2cd5(%rip),%rsi
mov    -0x10(%rbp),%rdx
call   1060 <fprintf@plt>
movl   $0xfffffffd,-0x4(%rbp)
jmp    14d6 <readx+0x336>
jmp    13bd <readx+0x21d>
lea    -0x100(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    $0xc7,%esi
call   10c0 <get_line_cf@plt>
cmp    $0x0,%rax
je     1480 <readx+0x2e0>
lea    -0x100(%rbp),%rdi
call   10a0 <clean_line@plt>
lea    -0x100(%rbp),%rdi
call   1090 <is_a_number@plt>
cmp    $0x0,%rax
je     147b <readx+0x2db>
mov    -0x10c(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jl     144d <readx+0x2ad>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1080 <freex@plt>
cmpq   $0x0,-0x28(%rbp)
je     1441 <readx+0x2a1>
mov    -0x28(%rbp),%rdi
mov    0x2c40(%rip),%rsi
mov    -0x10(%rbp),%rdx
call   1060 <fprintf@plt>
movl   $0xfffffffd,-0x4(%rbp)
jmp    14d6 <readx+0x336>
lea    -0x100(%rbp),%rdi
call   1030 <atof@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x10c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    13bd <readx+0x21d>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x10c(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
je     14cf <readx+0x32f>
mov    -0x18(%rbp),%rdi
call   1070 <freexy@plt>
cmpq   $0x0,-0x28(%rbp)
je     14c3 <readx+0x323>
mov    -0x28(%rbp),%rdi
mov    0x2bbe(%rip),%rsi
mov    -0x10(%rbp),%rdx
call   1060 <fprintf@plt>
movl   $0xfffffffd,-0x4(%rbp)
jmp    14d6 <readx+0x336>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readx>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %rcx,%rbx
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%r14
movq   $0x0,(%rsi)
movl   $0x0,(%rdx)
lea    0xe89(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1310 <readx+0x170>
mov    %rax,%rbp
mov    %rbx,(%rsp)
lea    0x10(%rsp),%rdi
mov    $0xc7,%esi
mov    %rax,%rdx
call   10c0 <get_line_cf@plt>
test   %rax,%rax
je     1240 <readx+0xa0>
lea    0x10(%rsp),%rbx
jmp    1225 <readx+0x85>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0xc7,%esi
mov    %rbp,%rdx
call   10c0 <get_line_cf@plt>
test   %rax,%rax
je     1240 <readx+0xa0>
mov    %rbx,%rdi
call   10a0 <clean_line@plt>
mov    %rbx,%rdi
call   1090 <is_a_number@plt>
test   %rax,%rax
je     1210 <readx+0x70>
addl   $0x1,(%r15)
jmp    1210 <readx+0x70>
mov    %rbp,%rdi
call   1050 <fclose@plt>
movslq (%r15),%rsi
test   %rsi,%rsi
je     1331 <readx+0x191>
shl    $0x3,%rsi
lea    0xdf5(%rip),%rdx
mov    %r12,%rdi
call   1040 <willus_mem_alloc@plt>
test   %eax,%eax
je     1350 <readx+0x1b0>
lea    0xde4(%rip),%rsi
mov    %r14,%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1382 <readx+0x1e2>
mov    %rax,%rbp
mov    %r14,0x8(%rsp)
lea    0x10(%rsp),%rdi
mov    $0xc7,%esi
mov    %rax,%rdx
call   10c0 <get_line_cf@plt>
xor    %r13d,%r13d
mov    $0x0,%ebx
test   %rax,%rax
je     136b <readx+0x1cb>
xor    %ebx,%ebx
lea    0x10(%rsp),%r14
jmp    12d9 <readx+0x139>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0xc7,%esi
mov    %rbp,%rdx
call   10c0 <get_line_cf@plt>
test   %rax,%rax
je     136b <readx+0x1cb>
mov    %r14,%rdi
call   10a0 <clean_line@plt>
mov    %r14,%rdi
call   1090 <is_a_number@plt>
test   %rax,%rax
je     12c0 <readx+0x120>
cmp    (%r15),%ebx
jge    13a5 <readx+0x205>
mov    %r14,%rdi
call   1030 <atof@plt>
mov    (%r12),%rax
movslq %ebx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%ebx
jmp    12c0 <readx+0x120>
mov    $0xfffffffe,%r13d
test   %rbx,%rbx
je     13d5 <readx+0x235>
lea    0xd36(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
jmp    13d0 <readx+0x230>
xor    %r13d,%r13d
mov    (%rsp),%rdi
test   %rdi,%rdi
je     13d5 <readx+0x235>
lea    0xd42(%rip),%rsi
mov    %r14,%rdx
jmp    13d0 <readx+0x230>
mov    $0xffffffff,%r13d
mov    (%rsp),%rdi
test   %rdi,%rdi
je     13d5 <readx+0x235>
lea    0xc9a(%rip),%rsi
mov    %r14,%rdx
jmp    13d0 <readx+0x230>
mov    %rbp,%rdi
call   1050 <fclose@plt>
cmp    (%r15),%ebx
je     13d5 <readx+0x235>
mov    %r12,%rdi
call   1070 <freexy@plt>
jmp    13b5 <readx+0x215>
mov    %r12,%rdi
call   1080 <freex@plt>
mov    $0xfffffffd,%r13d
mov    (%rsp),%rdi
test   %rdi,%rdi
je     13d5 <readx+0x235>
lea    0xc90(%rip),%rsi
mov    %r14,%rdx
jmp    13d0 <readx+0x230>
mov    %rbp,%rdi
call   1050 <fclose@plt>
mov    %r12,%rdi
call   1080 <freex@plt>
mov    $0xfffffffd,%r13d
mov    (%rsp),%rdi
test   %rdi,%rdi
je     13d5 <readx+0x235>
lea    0xc65(%rip),%rsi
mov    0x8(%rsp),%rdx
call   1060 <fprintf@plt>
mov    %r13d,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@readx.notenough = internal global i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i32 0, i32 0)
@.str = [48 x i8] c"There is not enough memory to read in file %s.\0A\00"
@readx.internal = internal global i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i32 0, i32 0)
@.str.1 = [36 x i8] c"Internal error re-reading file %s.\0A\00"
@readx.funcname = internal global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0)
@.str.2 = [6 x i8] c"readx\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [46 x i8] c"Cannot open file %s for reading array pairs.\0A\00"
@.str.5 = [38 x i8] c"There are no array pairs in file %s.\0A\00"
define i32 @readx(i8* %0, double** %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca double**
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca [200 x i8]
%12 = alloca i64
%13 = alloca i32
%14 = alloca i64
store i8* %0, i8** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
%15 = load double**, double*** %7
store double* null, double** %15
%16 = load i32*, i32** %8
store i32 0, i32* %16
%17 = load i8*, i8** %6
%18 = call i32* @fopen(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %18, i32** %10
%19 = load i32*, i32** %10
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %29
21: ; preds = %4
%22 = load i32*, i32** %9
%23 = icmp ne i32* %22, null
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = load i32*, i32** %9
%26 = load i8*, i8** %6
%27 = call i32 @fprintf(i32* %25, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %24, %21
store i32 -2, i32* %5
br label %169
29: ; preds = %4
br label %30
30: ; preds = %45, %29
%31 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%32 = load i32*, i32** %10
%33 = call i32* @get_line_cf(i8* %31, i32 199, i32* %32)
%34 = icmp ne i32* %33, null
br i1 %34, label %35, label %46
35: ; preds = %30
%36 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%37 = call i32 @clean_line(i8* %36)
%38 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%39 = call i64 @is_a_number(i8* %38)
%40 = icmp ne i64 %39, 0
br i1 %40, label %41, label %45
41: ; preds = %35
%42 = load i32*, i32** %8
%43 = load i32, i32* %42
%44 = add nsw i32 %43, 1
store i32 %44, i32* %42
br label %45
45: ; preds = %41, %35
br label %30
46: ; preds = %30
%47 = load i32*, i32** %10
%48 = call i32 @fclose(i32* %47)
%49 = load i32*, i32** %8
%50 = load i32, i32* %49
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %60
52: ; preds = %46
%53 = load i32*, i32** %9
%54 = icmp ne i32* %53, null
br i1 %54, label %55, label %59
55: ; preds = %52
%56 = load i32*, i32** %9
%57 = load i8*, i8** %6
%58 = call i32 @fprintf(i32* %56, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8* %57)
br label %59
59: ; preds = %55, %52
store i32 0, i32* %5
br label %169
60: ; preds = %46
%61 = load i32*, i32** %8
%62 = load i32, i32* %61
%63 = sext i32 %62 to i64
%64 = mul nsw i64 8, %63
store i64 %64, i64* %12
%65 = load i64, i64* %12
store i64 %65, i64* %14
%66 = load i64, i64* %12
%67 = load i64, i64* %14
%68 = icmp ne i64 %66, %67
br i1 %68, label %69, label %78
69: ; preds = %60
%70 = load i32*, i32** %9
%71 = icmp ne i32* %70, null
br i1 %71, label %72, label %77
72: ; preds = %69
%73 = load i32*, i32** %9
%74 = load i8*, i8** @readx.notenough
%75 = load i8*, i8** %6
%76 = call i32 @fprintf(i32* %73, i8* %74, i8* %75)
br label %77
77: ; preds = %72, %69
store i32 -1, i32* %5
br label %169
78: ; preds = %60
%79 = load double**, double*** %7
%80 = load i64, i64* %14
%81 = load i8*, i8** @readx.funcname
%82 = call i32 @willus_mem_alloc(double** %79, i64 %80, i8* %81)
%83 = icmp ne i32 %82, 0
br i1 %83, label %93, label %84
84: ; preds = %78
%85 = load i32*, i32** %9
%86 = icmp ne i32* %85, null
br i1 %86, label %87, label %92
87: ; preds = %84
%88 = load i32*, i32** %9
%89 = load i8*, i8** @readx.notenough
%90 = load i8*, i8** %6
%91 = call i32 @fprintf(i32* %88, i8* %89, i8* %90)
br label %92
92: ; preds = %87, %84
store i32 -1, i32* %5
br label %169
93: ; preds = %78
store i32 0, i32* %13
%94 = load i8*, i8** %6
%95 = call i32* @fopen(i8* %94, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %95, i32** %10
%96 = load i32*, i32** %10
%97 = icmp eq i32* %96, null
br i1 %97, label %98, label %109
98: ; preds = %93
%99 = load double**, double*** %7
%100 = call i32 @freex(double** %99)
%101 = load i32*, i32** %9
%102 = icmp ne i32* %101, null
br i1 %102, label %103, label %108
103: ; preds = %98
%104 = load i32*, i32** %9
%105 = load i8*, i8** @readx.internal
%106 = load i8*, i8** %6
%107 = call i32 @fprintf(i32* %104, i8* %105, i8* %106)
br label %108
108: ; preds = %103, %98
store i32 -3, i32* %5
br label %169
109: ; preds = %93
br label %110
110: ; preds = %149, %109
%111 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%112 = load i32*, i32** %10
%113 = call i32* @get_line_cf(i8* %111, i32 199, i32* %112)
%114 = icmp ne i32* %113, null
br i1 %114, label %115, label %150
115: ; preds = %110
%116 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%117 = call i32 @clean_line(i8* %116)
%118 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%119 = call i64 @is_a_number(i8* %118)
%120 = icmp ne i64 %119, 0
br i1 %120, label %121, label %149
121: ; preds = %115
%122 = load i32, i32* %13
%123 = load i32*, i32** %8
%124 = load i32, i32* %123
%125 = icmp sge i32 %122, %124
br i1 %125, label %126, label %139
126: ; preds = %121
%127 = load i32*, i32** %10
%128 = call i32 @fclose(i32* %127)
%129 = load double**, double*** %7
%130 = call i32 @freex(double** %129)
%131 = load i32*, i32** %9
%132 = icmp ne i32* %131, null
br i1 %132, label %133, label %138
133: ; preds = %126
%134 = load i32*, i32** %9
%135 = load i8*, i8** @readx.internal
%136 = load i8*, i8** %6
%137 = call i32 @fprintf(i32* %134, i8* %135, i8* %136)
br label %138
138: ; preds = %133, %126
store i32 -3, i32* %5
br label %169
139: ; preds = %121
%140 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%141 = call double @atof(i8* %140)
%142 = load double**, double*** %7
%143 = load double*, double** %142
%144 = load i32, i32* %13
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %143, i64 %145
store double %141, double* %146
%147 = load i32, i32* %13
%148 = add nsw i32 %147, 1
store i32 %148, i32* %13
br label %149
149: ; preds = %139, %115
br label %110
150: ; preds = %110
%151 = load i32*, i32** %10
%152 = call i32 @fclose(i32* %151)
%153 = load i32, i32* %13
%154 = load i32*, i32** %8
%155 = load i32, i32* %154
%156 = icmp ne i32 %153, %155
br i1 %156, label %157, label %168
157: ; preds = %150
%158 = load double**, double*** %7
%159 = call i32 @freexy(double** %158)
%160 = load i32*, i32** %9
%161 = icmp ne i32* %160, null
br i1 %161, label %162, label %167
162: ; preds = %157
%163 = load i32*, i32** %9
%164 = load i8*, i8** @readx.internal
%165 = load i8*, i8** %6
%166 = call i32 @fprintf(i32* %163, i8* %164, i8* %165)
br label %167
167: ; preds = %162, %157
store i32 -3, i32* %5
br label %169
168: ; preds = %150
store i32 0, i32* %5
br label %169
169: ; preds = %168, %167, %138, %108, %92, %77, %59, %28
%170 = load i32, i32* %5
ret i32 %170
}

LLVM IR (-O2):
@.str = [48 x i8] c"There is not enough memory to read in file %s.\0A\00"
@.str.1 = [36 x i8] c"Internal error re-reading file %s.\0A\00"
@.str.2 = [6 x i8] c"readx\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [46 x i8] c"Cannot open file %s for reading array pairs.\0A\00"
@.str.5 = [38 x i8] c"There are no array pairs in file %s.\0A\00"
define i32 @readx(i8* %0, double** %1, i32* nocapture %2, i32* %3) {
%5 = alloca [200 x i8]
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
store double* null, double** %1
store i32 0, i32* %2
%7 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = call i32* @get_line_cf(i8* %6, i32 199, i32* %7)
%11 = icmp eq i32* %10, null
br i1 %11, label %26, label %16
12: ; preds = %4
%13 = icmp eq i32* %3, null
br i1 %13, label %88, label %14
14: ; preds = %12
%15 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i8* %0)
br label %88
16: ; preds = %9, %23
%17 = call i32 @clean_line(i8* %6)
%18 = call i64 @is_a_number(i8* %6)
%19 = icmp eq i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %16
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %23
23: ; preds = %20, %16
%24 = call i32* @get_line_cf(i8* %6, i32 199, i32* %7)
%25 = icmp eq i32* %24, null
br i1 %25, label %26, label %16
26: ; preds = %23, %9
%27 = call i32 @fclose(i32* %7)
%28 = load i32, i32* %2
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = icmp eq i32* %3, null
br i1 %31, label %88, label %32
32: ; preds = %30
%33 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0), i8* %0)
br label %88
34: ; preds = %26
%35 = sext i32 %28 to i64
%36 = shl nsw i64 %35, 3
%37 = call i32 @willus_mem_alloc(double** %1, i64 %36, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %43
39: ; preds = %34
%40 = icmp eq i32* %3, null
br i1 %40, label %88, label %41
41: ; preds = %39
%42 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %88
43: ; preds = %34
%44 = call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%45 = icmp eq i32* %44, null
br i1 %45, label %49, label %46
46: ; preds = %43
%47 = call i32* @get_line_cf(i8* %6, i32 199, i32* %44)
%48 = icmp eq i32* %47, null
br i1 %48, label %78, label %54
49: ; preds = %43
%50 = call i32 @freex(double** %1)
%51 = icmp eq i32* %3, null
br i1 %51, label %88, label %52
52: ; preds = %49
%53 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %88
54: ; preds = %46, %74
%55 = phi i32 [ %75, %74 ], [ 0, %46 ]
%56 = call i32 @clean_line(i8* %6)
%57 = call i64 @is_a_number(i8* %6)
%58 = icmp eq i64 %57, 0
br i1 %58, label %74, label %59
59: ; preds = %54
%60 = load i32, i32* %2
%61 = icmp slt i32 %55, %60
br i1 %61, label %68, label %62
62: ; preds = %59
%63 = call i32 @fclose(i32* %44)
%64 = call i32 @freex(double** %1)
%65 = icmp eq i32* %3, null
br i1 %65, label %88, label %66
66: ; preds = %62
%67 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %88
68: ; preds = %59
%69 = call double @atof(i8* %6)
%70 = load double*, double** %1
%71 = sext i32 %55 to i64
%72 = getelementptr inbounds double, double* %70, i64 %71
store double %69, double* %72
%73 = add nsw i32 %55, 1
br label %74
74: ; preds = %68, %54
%75 = phi i32 [ %73, %68 ], [ %55, %54 ]
%76 = call i32* @get_line_cf(i8* %6, i32 199, i32* %44)
%77 = icmp eq i32* %76, null
br i1 %77, label %78, label %54
78: ; preds = %74, %46
%79 = phi i32 [ 0, %46 ], [ %75, %74 ]
%80 = call i32 @fclose(i32* %44)
%81 = load i32, i32* %2
%82 = icmp eq i32 %79, %81
br i1 %82, label %88, label %83
83: ; preds = %78
%84 = call i32 @freexy(double** %1)
%85 = icmp eq i32* %3, null
br i1 %85, label %88, label %86
86: ; preds = %83
%87 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %88
88: ; preds = %78, %83, %86, %62, %66, %49, %52, %39, %41, %30, %32, %12, %14
%89 = phi i32 [ -2, %14 ], [ -2, %12 ], [ 0, %32 ], [ 0, %30 ], [ -1, %41 ], [ -1, %39 ], [ -3, %52 ], [ -3, %49 ], [ -3, %66 ], [ -3, %62 ], [ -3, %86 ], [ -3, %83 ], [ 0, %78 ]
ret i32 %89
}