#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 */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int const, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ free_matrix2(double **);
double **new_matrix2(int, int);
int sscanf(char *, char *, ...);
int /*<<< orphan*/ stderr;
char *sword(char *, char *, int);
double **load_matrix(char *fin, int *n, int *m) {
  FILE *f = fopen(fin, "r");
  if (f == NULL) {
    fprintf(stderr, "Invalid filename: %s\n", fin);
    return NULL;
  }
  char sbuf0[128], *s = sbuf0;
  if (fgets(s, 128, f) == NULL || sscanf(s, "%d %d", n, m) < 2) {
    fprintf(stderr, "Corrupt matrix header in file %s\n", fin);
    fclose(f);
    return NULL;
  }
  double **X = new_matrix2(*n, *m);
  const int CHARS_PER_FLOAT = 20;
  const int buflen = CHARS_PER_FLOAT * (*m);
  char sbuf[buflen];
  int i, j;
  for (i = 0; i < *n; i++) {
    s = sbuf;
    if (fgets(s, buflen, f) == NULL)
      break;
    for (j = 0; j < *m; j++) {
      if (sscanf(s, "%lf", &X[i][j]) < 1)
        break;
      s = sword(s, " \t", 1);
    }
    if (j < *m)
      break;
  }
  if (i < *n) {
    fprintf(stderr, "Corrupt matrix file '%s' at line %d, element %d\n", fin,
            i + 2, j + 1);
    fclose(f);
    free_matrix2(X);
    return NULL;
  }
  fclose(f);
  return X;
}


x86 assembly (clang, -O0):
<load_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe5e(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    11de <load_matrix+0x5e>
mov    0x2e23(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe38(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movq   $0x0,-0x8(%rbp)
jmp    1470 <load_matrix+0x2f0>
lea    -0xb0(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x80,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     1231 <load_matrix+0xb1>
mov    -0xb8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xdf7(%rip),%rsi
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x2,%eax
jge    1262 <load_matrix+0xe2>
mov    0x2da8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xdd9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
movq   $0x0,-0x8(%rbp)
jmp    1470 <load_matrix+0x2f0>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
call   1090 <new_matrix2@plt>
mov    %rax,-0xc0(%rbp)
movl   $0x14,-0xc4(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
shl    $0x2,%ecx
mov    %ecx,%eax
lea    (%rax,%rax,4),%eax
mov    %eax,-0xc8(%rbp)
mov    -0xc8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0xd0(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xf0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0xd8(%rbp)
movl   $0x0,-0xdc(%rbp)
mov    -0xdc(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    13db <load_matrix+0x25b>
mov    -0xf0(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rdi
mov    -0xc8(%rbp),%esi
mov    -0x28(%rbp),%rdx
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    1319 <load_matrix+0x199>
jmp    13db <load_matrix+0x25b>
movl   $0x0,-0xe0(%rbp)
mov    -0xe0(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jge    13ab <load_matrix+0x22b>
mov    -0xb8(%rbp),%rdi
mov    -0xc0(%rbp),%rax
movslq -0xdc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
movslq -0xe0(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xcdd(%rip),%rsi
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x1,%eax
jge    1378 <load_matrix+0x1f8>
jmp    13ab <load_matrix+0x22b>
mov    -0xb8(%rbp),%rdi
lea    0xcbe(%rip),%rsi
mov    $0x1,%edx
call   1080 <sword@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    1323 <load_matrix+0x1a3>
mov    -0xe0(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jge    13c2 <load_matrix+0x242>
jmp    13db <load_matrix+0x25b>
jmp    13c7 <load_matrix+0x247>
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    12d4 <load_matrix+0x154>
mov    -0xdc(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1448 <load_matrix+0x2c8>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0xdc(%rbp),%ecx
add    $0x2,%ecx
mov    -0xe0(%rbp),%r8d
add    $0x1,%r8d
lea    0xc32(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0xc0(%rbp),%rdi
call   1060 <free_matrix2@plt>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0xe4(%rbp)
jmp    1466 <load_matrix+0x2e6>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0xc0(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0xe4(%rbp)
mov    -0xd0(%rbp),%rax
mov    %rax,%rsp
mov    -0x8(%rbp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_matrix>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
lea    0xe5c(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1215 <load_matrix+0x95>
mov    %rax,%r13
lea    -0xe0(%rbp),%rdi
mov    $0x80,%esi
mov    %rax,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
je     11ec <load_matrix+0x6c>
lea    0xe47(%rip),%rsi
xor    %ebx,%ebx
lea    -0xe0(%rbp),%rdi
mov    %r12,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1070 <sscanf@plt>
cmp    $0x1,%eax
jg     1236 <load_matrix+0xb6>
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
lea    0xe22(%rip),%rsi
xor    %ebx,%ebx
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r13,%rdi
call   1030 <fclose@plt>
jmp    13a7 <load_matrix+0x227>
mov    0x2dc4(%rip),%rax
mov    (%rax),%edi
lea    0xddd(%rip),%rsi
xor    %ebx,%ebx
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    13a7 <load_matrix+0x227>
mov    (%r12),%edi
mov    (%r14),%esi
call   1090 <new_matrix2@plt>
mov    %rax,-0x38(%rbp)
mov    %rsp,-0x40(%rbp)
mov    (%r14),%eax
shl    $0x2,%eax
lea    (%rax,%rax,4),%ecx
lea    0xf(%rcx),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rdi
sub    %rax,%rdi
mov    %rdi,%rsp
mov    (%r12),%eax
test   %eax,%eax
mov    %r15,-0x60(%rbp)
jle    134a <load_matrix+0x1ca>
mov    %r12,-0x58(%rbp)
mov    %rdi,-0x30(%rbp)
mov    %rcx,%r15
mov    %r15d,%esi
mov    %r13,%rdx
call   1040 <fgets@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     135c <load_matrix+0x1dc>
mov    %r13,-0x50(%rbp)
mov    %r15,-0x48(%rbp)
nopl   (%rax)
mov    (%r14),%eax
mov    $0x0,%r12d
test   %eax,%eax
mov    -0x30(%rbp),%rdi
jle    131f <load_matrix+0x19f>
xor    %r13d,%r13d
xor    %r12d,%r12d
mov    %rdi,%r15
nopw   0x0(%rax,%rax,1)
mov    -0x38(%rbp),%rax
mov    (%rax,%rbx,8),%rdx
add    %r13,%rdx
mov    %r15,%rdi
lea    0xd6b(%rip),%rsi
xor    %eax,%eax
call   1070 <sscanf@plt>
test   %eax,%eax
jle    1310 <load_matrix+0x190>
mov    %r15,%rdi
lea    0xd5a(%rip),%rsi
mov    $0x1,%edx
call   1080 <sword@plt>
mov    %rax,%r15
add    $0x1,%r12
movslq (%r14),%rax
add    $0x8,%r13
cmp    %rax,%r12
jl     12c0 <load_matrix+0x140>
jmp    1313 <load_matrix+0x193>
nopl   0x0(%rax)
mov    (%r14),%eax
mov    -0x50(%rbp),%r13
mov    -0x48(%rbp),%r15
mov    -0x30(%rbp),%rdi
cmp    %eax,%r12d
jl     135c <load_matrix+0x1dc>
add    $0x1,%rbx
mov    -0x58(%rbp),%rax
movslq (%rax),%rax
cmp    %rax,%rbx
jge    135c <load_matrix+0x1dc>
mov    %r15d,%esi
mov    %r13,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
jne    12a0 <load_matrix+0x120>
jmp    135c <load_matrix+0x1dc>
cmp    %eax,%ebx
jl     1366 <load_matrix+0x1e6>
mov    %r13,%rdi
call   1030 <fclose@plt>
mov    -0x38(%rbp),%rbx
jmp    13a0 <load_matrix+0x220>
mov    -0x58(%rbp),%rax
mov    (%rax),%eax
cmp    %eax,%ebx
jge    134e <load_matrix+0x1ce>
mov    0x2c73(%rip),%rax
mov    (%rax),%edi
add    $0x2,%ebx
add    $0x1,%r12d
lea    0xcca(%rip),%rsi
mov    -0x60(%rbp),%rdx
mov    %ebx,%ecx
mov    %r12d,%r8d
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %r13,%rdi
call   1030 <fclose@plt>
mov    -0x38(%rbp),%rdi
call   1060 <free_matrix2@plt>
xor    %ebx,%ebx
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
mov    %rbx,%rax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [22 x i8] c"Invalid filename: %s\0A\00"
@.str.2 = [6 x i8] c"%d %d\00"
@.str.3 = [34 x i8] c"Corrupt matrix header in file %s\0A\00"
@.str.4 = [4 x i8] c"%lf\00"
@.str.5 = [3 x i8] c" \09\00"
@.str.6 = [49 x i8] c"Corrupt matrix file '%s' at line %d, element %d\0A\00"
define double** @load_matrix(i8* %0, i32* %1, i32* %2) {
%4 = alloca double**
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca [128 x i8]
%10 = alloca i8*
%11 = alloca double**
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%19 = load i8*, i8** %5
%20 = call i32* @fopen(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %20, i32** %8
%21 = load i32*, i32** %8
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %27
23: ; preds = %3
%24 = load i32, i32* @stderr
%25 = load i8*, i8** %5
%26 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %25)
store double** null, double*** %4
br label %128
27: ; preds = %3
%28 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
store i8* %28, i8** %10
%29 = load i8*, i8** %10
%30 = load i32*, i32** %8
%31 = call i32* @fgets(i8* %29, i32 128, i32* %30)
%32 = icmp eq i32* %31, null
br i1 %32, label %39, label %33
33: ; preds = %27
%34 = load i8*, i8** %10
%35 = load i32*, i32** %6
%36 = load i32*, i32** %7
%37 = call i32 (i8*, i8*, ...) @sscanf(i8* %34, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %35, i32* %36)
%38 = icmp slt i32 %37, 2
br i1 %38, label %39, label %45
39: ; preds = %33, %27
%40 = load i32, i32* @stderr
%41 = load i8*, i8** %5
%42 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %41)
%43 = load i32*, i32** %8
%44 = call i32 @fclose(i32* %43)
store double** null, double*** %4
br label %128
45: ; preds = %33
%46 = load i32*, i32** %6
%47 = load i32, i32* %46
%48 = load i32*, i32** %7
%49 = load i32, i32* %48
%50 = call double** @new_matrix2(i32 %47, i32 %49)
store double** %50, double*** %11
store i32 20, i32* %12
%51 = load i32*, i32** %7
%52 = load i32, i32* %51
%53 = mul nsw i32 20, %52
store i32 %53, i32* %13
%54 = load i32, i32* %13
%55 = zext i32 %54 to i64
%56 = call i8* @llvm.stacksave()
store i8* %56, i8** %14
%57 = alloca i8, i64 %55
store i64 %55, i64* %15
store i32 0, i32* %16
br label %58
58: ; preds = %102, %45
%59 = load i32, i32* %16
%60 = load i32*, i32** %6
%61 = load i32, i32* %60
%62 = icmp slt i32 %59, %61
br i1 %62, label %63, label %105
63: ; preds = %58
store i8* %57, i8** %10
%64 = load i8*, i8** %10
%65 = load i32, i32* %13
%66 = load i32*, i32** %8
%67 = call i32* @fgets(i8* %64, i32 %65, i32* %66)
%68 = icmp eq i32* %67, null
br i1 %68, label %69, label %70
69: ; preds = %63
br label %105
70: ; preds = %63
store i32 0, i32* %17
br label %71
71: ; preds = %92, %70
%72 = load i32, i32* %17
%73 = load i32*, i32** %7
%74 = load i32, i32* %73
%75 = icmp slt i32 %72, %74
br i1 %75, label %76, label %95
76: ; preds = %71
%77 = load i8*, i8** %10
%78 = load double**, double*** %11
%79 = load i32, i32* %16
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double*, double** %78, i64 %80
%82 = load double*, double** %81
%83 = load i32, i32* %17
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %82, i64 %84
%86 = call i32 (i8*, i8*, ...) @sscanf(i8* %77, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %85)
%87 = icmp slt i32 %86, 1
br i1 %87, label %88, label %89
88: ; preds = %76
br label %95
89: ; preds = %76
%90 = load i8*, i8** %10
%91 = call i8* @sword(i8* %90, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 1)
store i8* %91, i8** %10
br label %92
92: ; preds = %89
%93 = load i32, i32* %17
%94 = add nsw i32 %93, 1
store i32 %94, i32* %17
br label %71
95: ; preds = %88, %71
%96 = load i32, i32* %17
%97 = load i32*, i32** %7
%98 = load i32, i32* %97
%99 = icmp slt i32 %96, %98
br i1 %99, label %100, label %101
100: ; preds = %95
br label %105
101: ; preds = %95
br label %102
102: ; preds = %101
%103 = load i32, i32* %16
%104 = add nsw i32 %103, 1
store i32 %104, i32* %16
br label %58
105: ; preds = %100, %69, %58
%106 = load i32, i32* %16
%107 = load i32*, i32** %6
%108 = load i32, i32* %107
%109 = icmp slt i32 %106, %108
br i1 %109, label %110, label %122
110: ; preds = %105
%111 = load i32, i32* @stderr
%112 = load i8*, i8** %5
%113 = load i32, i32* %16
%114 = add nsw i32 %113, 2
%115 = load i32, i32* %17
%116 = add nsw i32 %115, 1
%117 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %111, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i8* %112, i32 %114, i32 %116)
%118 = load i32*, i32** %8
%119 = call i32 @fclose(i32* %118)
%120 = load double**, double*** %11
%121 = call i32 @free_matrix2(double** %120)
store double** null, double*** %4
store i32 1, i32* %18
br label %126
122: ; preds = %105
%123 = load i32*, i32** %8
%124 = call i32 @fclose(i32* %123)
%125 = load double**, double*** %11
store double** %125, double*** %4
store i32 1, i32* %18
br label %126
126: ; preds = %122, %110
%127 = load i8*, i8** %14
br label %128
128: ; preds = %126, %39, %23
%129 = load double**, double*** %4
ret double** %129
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [22 x i8] c"Invalid filename: %s\0A\00"
@.str.2 = [6 x i8] c"%d %d\00"
@.str.3 = [34 x i8] c"Corrupt matrix header in file %s\0A\00"
@.str.4 = [4 x i8] c"%lf\00"
@.str.5 = [3 x i8] c" \09\00"
@.str.6 = [49 x i8] c"Corrupt matrix file '%s' at line %d, element %d\0A\00"
define double** @load_matrix(i8* %0, i32* %1, i32* %2) {
%4 = alloca [128 x i8]
%5 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %94
10: ; preds = %3
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%12 = call i32* @fgets(i8* %11, i32 128, i32* %5)
%13 = icmp eq i32* %12, null
br i1 %13, label %17, label %14
14: ; preds = %10
%15 = call i32 (i8*, i8*, ...) @sscanf(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32* %1, i32* %2)
%16 = icmp slt i32 %15, 2
br i1 %16, label %17, label %21
17: ; preds = %14, %10
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%20 = call i32 @fclose(i32* %5)
br label %92
21: ; preds = %14
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = call double** @new_matrix2(i32 %22, i32 %23)
%25 = load i32, i32* %2
%26 = mul nsw i32 %25, 20
%27 = zext i32 %26 to i64
%28 = call i8* @llvm.stacksave()
%29 = alloca i8, i64 %27
%30 = load i32, i32* %1
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %76
32: ; preds = %21
%33 = call i32* @fgets(i8* %29, i32 %26, i32* %5)
%34 = icmp eq i32* %33, null
br i1 %34, label %71, label %38
35: ; preds = %66
%36 = call i32* @fgets(i8* %29, i32 %26, i32* %5)
%37 = icmp eq i32* %36, null
br i1 %37, label %71, label %38
38: ; preds = %32, %35
%39 = phi i64 [ %67, %35 ], [ 0, %32 ]
%40 = getelementptr inbounds double*, double** %24, i64 %39
%41 = load i32, i32* %2
%42 = icmp sgt i32 %41, 0
br i1 %42, label %43, label %62
43: ; preds = %38, %52
%44 = phi i64 [ %54, %52 ], [ 0, %38 ]
%45 = phi i8* [ %53, %52 ], [ %29, %38 ]
%46 = load double*, double** %40
%47 = getelementptr inbounds double, double* %46, i64 %44
%48 = call i32 (i8*, i8*, ...) @sscanf(i8* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %47)
%49 = icmp slt i32 %48, 1
br i1 %49, label %50, label %52
50: ; preds = %43
%51 = load i32, i32* %2
br label %58
52: ; preds = %43
%53 = call i8* @sword(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 1)
%54 = add nuw nsw i64 %44, 1
%55 = load i32, i32* %2
%56 = sext i32 %55 to i64
%57 = icmp slt i64 %54, %56
br i1 %57, label %43, label %58
58: ; preds = %52, %50
%59 = phi i32 [ %51, %50 ], [ %55, %52 ]
%60 = phi i64 [ %44, %50 ], [ %54, %52 ]
%61 = trunc i64 %60 to i32
br label %62
62: ; preds = %58, %38
%63 = phi i32 [ %41, %38 ], [ %59, %58 ]
%64 = phi i32 [ 0, %38 ], [ %61, %58 ]
%65 = icmp slt i32 %64, %63
br i1 %65, label %71, label %66
66: ; preds = %62
%67 = add nuw nsw i64 %39, 1
%68 = load i32, i32* %1
%69 = sext i32 %68 to i64
%70 = icmp slt i64 %67, %69
br i1 %70, label %35, label %71
71: ; preds = %66, %35, %62, %32
%72 = phi i64 [ 0, %32 ], [ %67, %66 ], [ %67, %35 ], [ %39, %62 ]
%73 = phi i32 [ undef, %32 ], [ %64, %62 ], [ %64, %35 ], [ %64, %66 ]
%74 = trunc i64 %72 to i32
%75 = load i32, i32* %1
br label %76
76: ; preds = %71, %21
%77 = phi i32 [ %30, %21 ], [ %75, %71 ]
%78 = phi i32 [ 0, %21 ], [ %74, %71 ]
%79 = phi i32 [ undef, %21 ], [ %73, %71 ]
%80 = icmp slt i32 %78, %77
br i1 %80, label %81, label %88
81: ; preds = %76
%82 = load i32, i32* @stderr
%83 = add nuw nsw i32 %78, 2
%84 = add nsw i32 %79, 1
%85 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0), i8* %0, i32 %83, i32 %84)
%86 = call i32 @fclose(i32* %5)
%87 = call i32 @free_matrix2(double** %24)
br label %90
88: ; preds = %76
%89 = call i32 @fclose(i32* %5)
br label %90
90: ; preds = %88, %81
%91 = phi double** [ null, %81 ], [ %24, %88 ]
br label %92
92: ; preds = %90, %17
%93 = phi double** [ null, %17 ], [ %91, %90 ]
br label %94
94: ; preds = %92, %7
%95 = phi double** [ null, %7 ], [ %93, %92 ]
ret double** %95
}