#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*/ clr_file(char *);
int /*<<< orphan*/ file2mtrx(char *, int, int **);
int get_file_mtrx_size(char *);
scalar_t__ mds(int, int **);
int /*<<< orphan*/ mtrx2file(char *, int, int **);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ wrt2file(char *, char *);
void get_mds(char *filename) {
  clr_file("mds.txt");
  int mtrx_size = get_file_mtrx_size(filename);
  if (mtrx_size >= 4 && mtrx_size <= 16) {
    int mat[mtrx_size][mtrx_size];
    file2mtrx(filename, mtrx_size, mat);
    if (mds(mtrx_size, mat)) {
      wrt2file("mds.txt", "Girilen matris MDS matristir\n\n");
      printf("\nGirilen matris MDS matristir\n");
    } else {
      wrt2file("mds.txt", "Girilen matris MDS degildir\n\n");
      printf("\nGirilen matris MDS degildir\n");
    }
    int i, j, ioff, joff, off_cnt;
    int sub_mtrx_size;
    for (sub_mtrx_size = mtrx_size; sub_mtrx_size > 1; sub_mtrx_size--) {
      int tmp_mtrx[sub_mtrx_size][sub_mtrx_size];
      off_cnt = mtrx_size - sub_mtrx_size + 1;
      for (ioff = 0; ioff < off_cnt; ioff++) {
        for (joff = 0; joff < off_cnt; joff++) {
          for (i = 0; i < sub_mtrx_size; i++) {
            for (j = 0; j < sub_mtrx_size; j++) {
              tmp_mtrx[i][j] = mat[i + ioff][j + joff];
            }
          }
          if (mds(sub_mtrx_size, tmp_mtrx)) {
            mtrx2file("mds.txt", sub_mtrx_size, tmp_mtrx);
          }
        }
      }
    }
  } else {
    printf("get_mds(): Hatali matris formati\n");
  }
}


x86 assembly (clang, -O0):
<get_mds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xe7a(%rip),%rdi
call   1030 <clr_file@plt>
mov    -0x8(%rbp),%rdi
call   1060 <get_file_mtrx_size@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jl     13c5 <get_mds+0x255>
cmpl   $0x10,-0xc(%rbp)
jg     13c5 <get_mds+0x255>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,%rdx
imul   %rdx,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x60(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <file2mtrx@plt>
mov    -0x60(%rbp),%rsi
mov    -0xc(%rbp),%edi
call   1090 <mds@plt>
cmp    $0x0,%rax
je     122c <get_mds+0xbc>
lea    0xdf1(%rip),%rdi
lea    0xdf2(%rip),%rsi
call   1080 <wrt2file@plt>
lea    0xe05(%rip),%rdi
call   1040 <printf@plt>
jmp    124b <get_mds+0xdb>
lea    0xdcd(%rip),%rdi
lea    0xe0c(%rip),%rsi
call   1080 <wrt2file@plt>
lea    0xe1e(%rip),%rdi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x1,-0x40(%rbp)
jle    13b9 <get_mds+0x249>
mov    -0x40(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x48(%rbp)
mov    %rcx,%rdx
imul   %rdx,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x70(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x50(%rbp)
mov    %rax,-0x58(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    13a4 <get_mds+0x234>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1391 <get_mds+0x221>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    1355 <get_mds+0x1e5>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    1342 <get_mds+0x1d2>
mov    -0x70(%rbp),%rax
mov    -0x78(%rbp),%rsi
mov    -0x60(%rbp),%rcx
mov    -0x68(%rbp),%rdi
mov    -0x2c(%rbp),%edx
add    -0x34(%rbp),%edx
movslq %edx,%rdx
imul   %rdi,%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
mov    -0x30(%rbp),%edx
add    -0x38(%rbp),%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%edx
movslq -0x2c(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12e2 <get_mds+0x172>
jmp    1347 <get_mds+0x1d7>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12cf <get_mds+0x15f>
mov    -0x70(%rbp),%rsi
mov    -0x40(%rbp),%edi
call   1090 <mds@plt>
cmp    $0x0,%rax
je     137e <get_mds+0x20e>
mov    -0x70(%rbp),%rdx
mov    -0x40(%rbp),%esi
lea    0xc87(%rip),%rdi
call   1070 <mtrx2file@plt>
jmp    1383 <get_mds+0x213>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12bc <get_mds+0x14c>
jmp    1396 <get_mds+0x226>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12a9 <get_mds+0x139>
mov    -0x48(%rbp),%rax
mov    %rax,%rsp
mov    -0x40(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x40(%rbp)
jmp    1251 <get_mds+0xe1>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
jmp    13d1 <get_mds+0x261>
lea    0xcb6(%rip),%rdi
call   1040 <printf@plt>
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mds>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %rdi,%r14
lea    0xe62(%rip),%rdi
call   1030 <clr_file@plt>
mov    %r14,%rdi
call   1070 <get_file_mtrx_size@plt>
mov    %eax,%ebx
lea    -0x4(%rbx),%eax
cmp    $0xc,%eax
ja     14d3 <get_mds+0x353>
mov    %rsp,-0x80(%rbp)
mov    %ebx,%r15d
mov    %r15,%rax
imul   %r15,%rax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r12,%rdx
call   1050 <file2mtrx@plt>
mov    %ebx,%edi
mov    %r12,%rsi
call   10a0 <mds@plt>
test   %rax,%rax
lea    0xe2a(%rip),%rax
lea    0xe04(%rip),%rsi
cmove  %rax,%rsi
lea    0xe57(%rip),%rax
lea    0xe6d(%rip),%r14
cmove  %rax,%r14
lea    0xddf(%rip),%rdi
call   1090 <wrt2file@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0x0(,%r15,4),%rax
add    $0xffffffff,%ebx
mov    %r15,%rcx
neg    %rcx
mov    %rcx,-0xc0(%rbp)
mov    %r12,-0x50(%rbp)
lea    (%r12,%r15,4),%rcx
mov    %rcx,-0x88(%rbp)
lea    0x0(,%r15,8),%r14
mov    $0x1,%ecx
mov    %rcx,-0x38(%rbp)
mov    %r14,%r13
mov    %rax,-0x48(%rbp)
mov    %rax,%r9
xor    %eax,%eax
mov    %r15,-0x30(%rbp)
mov    %rbx,-0x90(%rbp)
mov    %r14,-0xf0(%rbp)
jmp    12c3 <get_mds+0x143>
cs nopw 0x0(%rax,%rax,1)
mov    -0x98(%rbp),%rsp
add    $0xffffffffffffffff,%r15
mov    -0xa0(%rbp),%rax
add    $0x1,%rax
addq   $0x1,-0x38(%rbp)
add    $0xfffffffffffffffc,%r9
add    $0xfffffffffffffff8,%r13
mov    -0x90(%rbp),%rbx
cmp    %rbx,%rax
je     14ed <get_mds+0x36d>
mov    %r15,-0xd0(%rbp)
mov    %rsp,-0x98(%rbp)
mov    %r15,%r12
and    $0xfffffffffffffffe,%r12
mov    %rax,%rdx
not    %rdx
mov    %rdx,-0xc8(%rbp)
mov    -0x30(%rbp),%rdx
sub    %rax,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %rax,-0xa0(%rbp)
lea    0x0(,%rax,4),%rax
mov    -0x48(%rbp),%rdx
sub    %rax,%rdx
mov    %r15,%rax
imul   %r15,%rax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    -0x50(%rbp),%rsi
mov    -0x88(%rbp),%rcx
xor    %eax,%eax
mov    %rbx,-0x58(%rbp)
mov    %r9,-0x70(%rbp)
mov    %r12,-0xf8(%rbp)
mov    %rdx,-0x60(%rbp)
mov    %r13,-0x68(%rbp)
jmp    136f <get_mds+0x1ef>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
mov    -0x48(%rbp),%r8
add    %r8,%rcx
mov    -0xa8(%rbp),%rsi
add    %r8,%rsi
cmp    -0x38(%rbp),%rax
je     1290 <get_mds+0x110>
mov    %rax,-0xd8(%rbp)
mov    %rcx,-0xe0(%rbp)
imul   -0x30(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    %rsi,-0xa8(%rbp)
mov    %rcx,%rdi
xor    %eax,%eax
mov    %rax,-0x40(%rbp)
jmp    13e2 <get_mds+0x262>
nopl   0x0(%rax,%rax,1)
mov    -0x40(%rbp),%rcx
add    $0x1,%rcx
mov    -0xe8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x78(%rbp),%rsi
add    $0x4,%rsi
mov    %rcx,%rax
mov    %rcx,-0x40(%rbp)
cmp    -0x38(%rbp),%rcx
mov    -0x70(%rbp),%r9
mov    -0x60(%rbp),%rdx
mov    -0xe0(%rbp),%rcx
mov    -0xd8(%rbp),%rax
je     1350 <get_mds+0x1d0>
mov    %rsi,-0x78(%rbp)
mov    -0xc8(%rbp),%rax
cmp    -0xc0(%rbp),%rax
jne    1400 <get_mds+0x280>
xor    %r13d,%r13d
mov    %rdi,%r15
jmp    144f <get_mds+0x2cf>
xchg   %ax,%ax
mov    %rbx,%r14
xor    %r12d,%r12d
xor    %r13d,%r13d
mov    %rdx,%rbx
mov    %rdi,%r15
nop
mov    -0x78(%rbp),%rax
lea    (%rax,%r12,1),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1060 <memcpy@plt>
lea    (%r15,%r12,1),%rsi
mov    -0x70(%rbp),%rax
lea    (%r14,%rax,1),%rdi
mov    %rbx,%rdx
call   1060 <memcpy@plt>
add    $0x2,%r13
add    -0xf0(%rbp),%r12
add    -0x68(%rbp),%r14
cmp    %r13,-0xf8(%rbp)
jne    1410 <get_mds+0x290>
mov    %r15,-0xe8(%rbp)
mov    -0x68(%rbp),%r12
mov    -0xd0(%rbp),%r15
test   $0x1,%r15b
je     14a1 <get_mds+0x321>
mov    -0xb8(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    %rcx,%rax
mov    -0xb0(%rbp),%rcx
imul   %r13,%rcx
imul   -0x30(%rbp),%r13
add    %rax,%r13
mov    -0x50(%rbp),%rax
lea    (%rax,%r13,4),%rsi
mov    -0x58(%rbp),%rax
lea    (%rax,%rcx,4),%rdi
mov    -0x60(%rbp),%rdx
call   1060 <memcpy@plt>
mov    %r15d,%edi
mov    -0x58(%rbp),%rbx
mov    %rbx,%rsi
call   10a0 <mds@plt>
test   %rax,%rax
mov    %r12,%r13
je     13a0 <get_mds+0x220>
lea    0xb3d(%rip),%rdi
mov    %r15d,%esi
mov    %rbx,%rdx
call   1080 <mtrx2file@plt>
jmp    13a0 <get_mds+0x220>
lea    0xb6b(%rip),%rdi
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>
mov    -0x80(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"mds.txt\00"
@.str.1 = [31 x i8] c"Girilen matris MDS matristir\0A\0A\00"
@.str.2 = [31 x i8] c"\0AGirilen matris MDS matristir\0A\00"
@.str.3 = [30 x i8] c"Girilen matris MDS degildir\0A\0A\00"
@.str.4 = [30 x i8] c"\0AGirilen matris MDS degildir\0A\00"
@.str.5 = [34 x i8] c"get_mds(): Hatali matris formati\0A\00"
define void @get_mds(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i64
%15 = alloca i64
store i8* %0, i8** %2
%16 = call i32 @clr_file(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%17 = load i8*, i8** %2
%18 = call i32 @get_file_mtrx_size(i8* %17)
store i32 %18, i32* %3
%19 = load i32, i32* %3
%20 = icmp sge i32 %19, 4
br i1 %20, label %21, label %133
21: ; preds = %1
%22 = load i32, i32* %3
%23 = icmp sle i32 %22, 16
br i1 %23, label %24, label %133
24: ; preds = %21
%25 = load i32, i32* %3
%26 = zext i32 %25 to i64
%27 = load i32, i32* %3
%28 = zext i32 %27 to i64
%29 = call i8* @llvm.stacksave()
store i8* %29, i8** %4
%30 = mul nuw i64 %26, %28
%31 = alloca i32, i64 %30
store i64 %26, i64* %5
store i64 %28, i64* %6
%32 = load i8*, i8** %2
%33 = load i32, i32* %3
%34 = bitcast i32* %31 to i32**
%35 = call i32 @file2mtrx(i8* %32, i32 %33, i32** %34)
%36 = load i32, i32* %3
%37 = bitcast i32* %31 to i32**
%38 = call i64 @mds(i32 %36, i32** %37)
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %43
40: ; preds = %24
%41 = call i32 @wrt2file(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%42 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %46
43: ; preds = %24
%44 = call i32 @wrt2file(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%45 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
br label %46
46: ; preds = %43, %40
%47 = load i32, i32* %3
store i32 %47, i32* %12
br label %48
48: ; preds = %128, %46
%49 = load i32, i32* %12
%50 = icmp sgt i32 %49, 1
br i1 %50, label %51, label %131
51: ; preds = %48
%52 = load i32, i32* %12
%53 = zext i32 %52 to i64
%54 = load i32, i32* %12
%55 = zext i32 %54 to i64
%56 = call i8* @llvm.stacksave()
store i8* %56, i8** %13
%57 = mul nuw i64 %53, %55
%58 = alloca i32, i64 %57
store i64 %53, i64* %14
store i64 %55, i64* %15
%59 = load i32, i32* %3
%60 = load i32, i32* %12
%61 = sub nsw i32 %59, %60
%62 = add nsw i32 %61, 1
store i32 %62, i32* %11
store i32 0, i32* %9
br label %63
63: ; preds = %123, %51
%64 = load i32, i32* %9
%65 = load i32, i32* %11
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %126
67: ; preds = %63
store i32 0, i32* %10
br label %68
68: ; preds = %119, %67
%69 = load i32, i32* %10
%70 = load i32, i32* %11
%71 = icmp slt i32 %69, %70
br i1 %71, label %72, label %122
72: ; preds = %68
store i32 0, i32* %7
br label %73
73: ; preds = %106, %72
%74 = load i32, i32* %7
%75 = load i32, i32* %12
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %109
77: ; preds = %73
store i32 0, i32* %8
br label %78
78: ; preds = %102, %77
%79 = load i32, i32* %8
%80 = load i32, i32* %12
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %105
82: ; preds = %78
%83 = load i32, i32* %7
%84 = load i32, i32* %9
%85 = add nsw i32 %83, %84
%86 = sext i32 %85 to i64
%87 = mul nsw i64 %86, %28
%88 = getelementptr inbounds i32, i32* %31, i64 %87
%89 = load i32, i32* %8
%90 = load i32, i32* %10
%91 = add nsw i32 %89, %90
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i32, i32* %88, i64 %92
%94 = load i32, i32* %93
%95 = load i32, i32* %7
%96 = sext i32 %95 to i64
%97 = mul nsw i64 %96, %55
%98 = getelementptr inbounds i32, i32* %58, i64 %97
%99 = load i32, i32* %8
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %98, i64 %100
store i32 %94, i32* %101
br label %102
102: ; preds = %82
%103 = load i32, i32* %8
%104 = add nsw i32 %103, 1
store i32 %104, i32* %8
br label %78
105: ; preds = %78
br label %106
106: ; preds = %105
%107 = load i32, i32* %7
%108 = add nsw i32 %107, 1
store i32 %108, i32* %7
br label %73
109: ; preds = %73
%110 = load i32, i32* %12
%111 = bitcast i32* %58 to i32**
%112 = call i64 @mds(i32 %110, i32** %111)
%113 = icmp ne i64 %112, 0
br i1 %113, label %114, label %118
114: ; preds = %109
%115 = load i32, i32* %12
%116 = bitcast i32* %58 to i32**
%117 = call i32 @mtrx2file(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %115, i32** %116)
br label %118
118: ; preds = %114, %109
br label %119
119: ; preds = %118
%120 = load i32, i32* %10
%121 = add nsw i32 %120, 1
store i32 %121, i32* %10
br label %68
122: ; preds = %68
br label %123
123: ; preds = %122
%124 = load i32, i32* %9
%125 = add nsw i32 %124, 1
store i32 %125, i32* %9
br label %63
126: ; preds = %63
%127 = load i8*, i8** %13
br label %128
128: ; preds = %126
%129 = load i32, i32* %12
%130 = add nsw i32 %129, -1
store i32 %130, i32* %12
br label %48
131: ; preds = %48
%132 = load i8*, i8** %4
br label %135
133: ; preds = %21, %1
%134 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %135
135: ; preds = %133, %131
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"mds.txt\00"
@.str.1 = [31 x i8] c"Girilen matris MDS matristir\0A\0A\00"
@.str.3 = [30 x i8] c"Girilen matris MDS degildir\0A\0A\00"
@str = [33 x i8] c"get_mds(): Hatali matris formati\00"
@str.6 = [29 x i8] c"\0AGirilen matris MDS degildir\00"
@str.7 = [30 x i8] c"\0AGirilen matris MDS matristir\00"
define void @get_mds(i8* %0) {
%2 = tail call i32 @clr_file(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @get_file_mtrx_size(i8* %0)
%4 = add i32 %3, -4
%5 = icmp ult i32 %4, 13
br i1 %5, label %6, label %94
6: ; preds = %1
%7 = zext i32 %3 to i64
%8 = tail call i8* @llvm.stacksave()
%9 = mul nuw nsw i64 %7, %7
%10 = alloca i32, i64 %9
%11 = bitcast i32* %10 to i32**
%12 = call i32 @file2mtrx(i8* %0, i32 %3, i32** %11)
%13 = call i64 @mds(i32 %3, i32** %11)
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0)
%16 = select i1 %14, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @str.7, i64 0, i64 0)
%17 = call i32 @wrt2file(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %15)
%18 = call i32 @puts(i8* dereferenceable(1) %16)
%19 = shl nuw nsw i64 %7, 2
%20 = add nsw i32 %3, -1
%21 = zext i32 %20 to i64
%22 = sub nsw i64 0, %7
br label %23
23: ; preds = %88, %6
%24 = phi i64 [ %7, %6 ], [ %89, %88 ]
%25 = phi i64 [ 1, %6 ], [ %91, %88 ]
%26 = phi i64 [ 0, %6 ], [ %90, %88 ]
%27 = xor i64 %26, -1
%28 = sub nsw i64 %7, %26
%29 = mul nsw i64 %26, -4
%30 = add nsw i64 %19, %29
%31 = call i8* @llvm.stacksave()
%32 = mul nuw nsw i64 %24, %24
%33 = alloca i32, i64 %32
%34 = bitcast i32* %33 to i32**
%35 = trunc i64 %24 to i32
%36 = and i64 %24, 1
%37 = icmp eq i64 %27, %22
%38 = and i64 %24, -2
%39 = icmp eq i64 %36, 0
br label %40
40: ; preds = %85, %23
%41 = phi i64 [ 0, %23 ], [ %86, %85 ]
%42 = mul nuw nsw i64 %41, %7
br label %43
43: ; preds = %82, %40
%44 = phi i64 [ 0, %40 ], [ %83, %82 ]
%45 = add nuw nsw i64 %42, %44
br i1 %37, label %67, label %46
46: ; preds = %43, %46
%47 = phi i64 [ %64, %46 ], [ 0, %43 ]
%48 = phi i64 [ %65, %46 ], [ 0, %43 ]
%49 = mul nuw nsw i64 %47, %7
%50 = add nuw i64 %45, %49
%51 = getelementptr i32, i32* %10, i64 %50
%52 = bitcast i32* %51 to i8*
%53 = mul nsw i64 %28, %47
%54 = getelementptr i32, i32* %33, i64 %53
%55 = bitcast i32* %54 to i8*
%56 = or i64 %47, 1
%57 = mul nuw nsw i64 %56, %7
%58 = add nuw i64 %45, %57
%59 = getelementptr i32, i32* %10, i64 %58
%60 = bitcast i32* %59 to i8*
%61 = mul nsw i64 %28, %56
%62 = getelementptr i32, i32* %33, i64 %61
%63 = bitcast i32* %62 to i8*
%64 = add nuw nsw i64 %47, 2
%65 = add i64 %48, 2
%66 = icmp eq i64 %65, %38
br i1 %66, label %67, label %46
67: ; preds = %46, %43
%68 = phi i64 [ 0, %43 ], [ %64, %46 ]
br i1 %39, label %77, label %69
69: ; preds = %67
%70 = mul nuw nsw i64 %68, %7
%71 = add nuw i64 %45, %70
%72 = getelementptr i32, i32* %10, i64 %71
%73 = bitcast i32* %72 to i8*
%74 = mul nsw i64 %28, %68
%75 = getelementptr i32, i32* %33, i64 %74
%76 = bitcast i32* %75 to i8*
br label %77
77: ; preds = %67, %69
%78 = call i64 @mds(i32 %35, i32** %34)
%79 = icmp eq i64 %78, 0
br i1 %79, label %82, label %80
80: ; preds = %77
%81 = call i32 @mtrx2file(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %35, i32** %34)
br label %82
82: ; preds = %77, %80
%83 = add nuw nsw i64 %44, 1
%84 = icmp eq i64 %83, %25
br i1 %84, label %85, label %43
85: ; preds = %82
%86 = add nuw nsw i64 %41, 1
%87 = icmp eq i64 %86, %25
br i1 %87, label %88, label %40
88: ; preds = %85
%89 = add nsw i64 %24, -1
%90 = add nuw nsw i64 %26, 1
%91 = add nuw nsw i64 %25, 1
%92 = icmp eq i64 %90, %21
br i1 %92, label %93, label %23
93: ; preds = %88
br label %96
94: ; preds = %1
%95 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
br label %96
96: ; preds = %94, %93
ret void
}