#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 _atoi(char *);
scalar_t__ _check_input(char *);
int _inputtoi(char *);
int _isalldigit(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int read_input(int *n, int **adjMtx) {
  int i;
  int value;
  int idx = 0;
  int cnt = 0;
  int sz = 0x7fffffff;
  char str[64];
  while (1) {
    printf("please input the cities:\n");
    scanf("%s", str);
    sz = 0x7fffffff;
    if (_isalldigit(str) == 1) {
      sz = _atoi(str);
    }
    if (sz <= 1 || sz >= 100) {
      printf("first parameter %s isn't in [%d, %d]\n", str, 1, 100);
    } else {
      break;
    }
  }
  *n = sz;
  *adjMtx = (int *)malloc(sz * sz * sizeof(int));
  if (*adjMtx == NULL) {
    printf("not enough memory\n");
    return 0;
  }
  while (++idx < sz) {
    while (1) {
      printf("please input [%d] elements for [%d]th line of half matrix:\n",
             idx, idx);
      cnt = 0;
      i = idx;
      while (i--) {
        scanf("%s", str);
        if (_check_input(str) == 0) {
          printf("input must be a number without sign or character x: %s\n",
                 str);
          scanf("%*[^\n]");
          break;
        } else {
          value = _inputtoi(str);
          (*adjMtx)[idx * sz + cnt] = value;
          (*adjMtx)[cnt * sz + idx] = value;
          ++cnt;
        }
      }
      if (cnt == idx) {
        scanf("%*[^\n]");
        break;
      }
    }
  }
  for (i = 0; i < sz; ++i) {
    (*adjMtx)[i * sz + i] = 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<read_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x7fffffff,-0x2c(%rbp)
lea    0xe64(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
movl   $0x7fffffff,-0x2c(%rbp)
lea    -0x70(%rbp),%rdi
call   1090 <_isalldigit@plt>
cmp    $0x1,%eax
jne    11da <read_input+0x6a>
lea    -0x70(%rbp),%rdi
call   1030 <_atoi@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
jle    11ee <read_input+0x7e>
cmpl   $0x64,-0x2c(%rbp)
jl     120f <read_input+0x9f>
lea    -0x70(%rbp),%rsi
lea    0xe24(%rip),%rdi
mov    $0x1,%edx
mov    $0x64,%ecx
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1214 <read_input+0xa4>
jmp    1219 <read_input+0xa9>
jmp    1195 <read_input+0x25>
mov    -0x2c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x2c(%rbp),%eax
imul   -0x2c(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1268 <read_input+0xf8>
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13bd <read_input+0x24d>
jmp    126d <read_input+0xfd>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmp    -0x2c(%rbp),%eax
jge    137a <read_input+0x20a>
jmp    1284 <read_input+0x114>
mov    -0x24(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xdc5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
je     1351 <read_input+0x1e1>
lea    -0x70(%rbp),%rsi
lea    0xd56(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1060 <_check_input@plt>
cmp    $0x0,%rax
jne    1303 <read_input+0x193>
lea    -0x70(%rbp),%rsi
lea    0xda9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
jmp    1351 <read_input+0x1e1>
lea    -0x70(%rbp),%rdi
call   1050 <_inputtoi@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x24(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x28(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12a5 <read_input+0x135>
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    1370 <read_input+0x200>
lea    0xd66(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
jmp    1375 <read_input+0x205>
jmp    1284 <read_input+0x114>
jmp    126d <read_input+0xfd>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13b6 <read_input+0x246>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1381 <read_input+0x211>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_input>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsi,0x8(%rsp)
mov    %rdi,%r14
lea    0xf07(%rip),%r12
lea    0xe5c(%rip),%r13
lea    0x20(%rsp),%rbp
lea    0xe53(%rip),%rbx
jmp    11d7 <read_input+0x57>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x1,%edx
mov    $0x64,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %rbp,%rdi
call   10a0 <_isalldigit@plt>
cmp    $0x1,%eax
jne    11c0 <read_input+0x40>
mov    %rbp,%rdi
call   1030 <_atoi@plt>
lea    -0x64(%rax),%ecx
cmp    $0xffffff9d,%ecx
jbe    11c0 <read_input+0x40>
mov    %eax,(%r14)
mov    %rax,%rbx
mov    %ebx,%edi
imul   %ebx,%edi
shl    $0x2,%edi
call   1080 <malloc@plt>
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx)
test   %rax,%rax
je     141d <read_input+0x29d>
mov    %rbx,0x10(%rsp)
mov    %ebx,%ecx
lea    0x0(,%rcx,4),%r12
mov    $0x1,%r14d
lea    0x20(%rsp),%rbp
mov    %r12,0x18(%rsp)
jmp    1273 <read_input+0xf3>
xchg   %ax,%ax
lea    0xe46(%rip),%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
add    $0x1,%r14
add    0x18(%rsp),%r12
mov    %r15,%rcx
cmp    %r15,%r14
je     1317 <read_input+0x197>
mov    %rcx,%r15
jmp    12a7 <read_input+0x127>
nopl   0x0(%rax,%rax,1)
lea    0xdde(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe05(%rip),%rdi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %r13d,%eax
cmp    %r14,%rax
je     1250 <read_input+0xd0>
lea    0xd7b(%rip),%rdi
mov    %r14d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rbx
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xd29(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1090 <scanf@plt>
mov    %rbp,%rdi
call   1070 <_check_input@plt>
test   %rax,%rax
je     1280 <read_input+0x100>
mov    %rbp,%rdi
call   1060 <_inputtoi@plt>
mov    0x8(%rsp),%rcx
mov    (%rcx),%rcx
lea    (%rcx,%r12,1),%rdx
mov    %eax,(%rdx,%r13,4)
mov    %eax,(%rcx,%rbx,4)
add    $0x1,%r13
add    %r15,%rbx
cmp    %r13d,%r14d
jne    12d0 <read_input+0x150>
jmp    129f <read_input+0x11f>
mov    $0x1,%eax
mov    0x10(%rsp),%rdi
test   %edi,%edi
jle    142b <read_input+0x2ab>
mov    0x8(%rsp),%rdx
mov    (%rdx),%r8
lea    -0x1(%rcx),%rdx
mov    %ecx,%r10d
and    $0x3,%r10d
xor    %esi,%esi
cmp    $0x3,%rdx
jb     13ec <read_input+0x26c>
mov    %rdi,%rdx
add    %edi,%edi
lea    0x0(,%rdx,4),%r9d
lea    (%rdx,%rdx,2),%ebx
and    $0xfffffffc,%ecx
neg    %rcx
mov    $0x2,%r11d
mov    $0x1,%r15d
mov    $0x3,%r12d
xor    %r14d,%r14d
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rdi
movslq %edx,%rdx
movslq %esi,%rsi
lea    (%rsi,%r13,1),%rbp
movl   $0x0,(%r8,%rbp,4)
lea    (%r15,%rdx,1),%rbp
movl   $0x0,(%r8,%rbp,4)
lea    (%r11,%rdi,1),%rbp
movslq %ebx,%rbx
movl   $0x0,(%r8,%rbp,4)
lea    (%r12,%rbx,1),%rbp
movl   $0x0,(%r8,%rbp,4)
add    $0x4,%r13
add    %r9d,%esi
add    $0x4,%r11
add    %r9d,%edi
add    $0x4,%r15
add    %r9d,%edx
add    $0x4,%r12
add    %r9d,%ebx
add    $0xfffffffffffffffc,%r14
cmp    %r14,%rcx
jne    1380 <read_input+0x200>
neg    %r14
mov    %r14,%rsi
mov    0x10(%rsp),%rdi
test   %r10,%r10
je     142b <read_input+0x2ab>
mov    %esi,%ecx
imul   %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
movslq %ecx,%rcx
lea    (%rsi,%rcx,1),%rdx
movl   $0x0,(%r8,%rdx,4)
add    $0x1,%rsi
add    %edi,%ecx
add    $0xffffffffffffffff,%r10
jne    1400 <read_input+0x280>
jmp    142b <read_input+0x2ab>
lea    0xc99(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"please input the cities:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [38 x i8] c"first parameter %s isn't in [%d, %d]\0A\00"
@.str.3 = [19 x i8] c"not enough memory\0A\00"
@.str.4 = [60 x i8] c"please input [%d] elements for [%d]th line of half matrix:\0A\00"
@.str.5 = [56 x i8] c"input must be a number without sign or character x: %s\0A\00"
@.str.6 = [7 x i8] c"%*[^\0A]\00"
define i32 @read_input(i32* %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [64 x i8]
store i32* %0, i32** %4
store i32** %1, i32*** %5
store i32 0, i32* %8
store i32 0, i32* %9
store i32 2147483647, i32* %10
br label %12
12: ; preds = %2, %32
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
store i32 2147483647, i32* %10
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%17 = call i32 @_isalldigit(i8* %16)
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %22
19: ; preds = %12
%20 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%21 = call i32 @_atoi(i8* %20)
store i32 %21, i32* %10
br label %22
22: ; preds = %19, %12
%23 = load i32, i32* %10
%24 = icmp sle i32 %23, 1
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = load i32, i32* %10
%27 = icmp sge i32 %26, 100
br i1 %27, label %28, label %31
28: ; preds = %25, %22
%29 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %29, i32 1, i32 100)
br label %32
31: ; preds = %25
br label %33
32: ; preds = %28
br label %12
33: ; preds = %31
%34 = load i32, i32* %10
%35 = load i32*, i32** %4
store i32 %34, i32* %35
%36 = load i32, i32* %10
%37 = load i32, i32* %10
%38 = mul nsw i32 %36, %37
%39 = sext i32 %38 to i64
%40 = mul i64 %39, 4
%41 = trunc i64 %40 to i32
%42 = call i64 @malloc(i32 %41)
%43 = inttoptr i64 %42 to i32*
%44 = load i32**, i32*** %5
store i32* %43, i32** %44
%45 = load i32**, i32*** %5
%46 = load i32*, i32** %45
%47 = icmp eq i32* %46, null
br i1 %47, label %48, label %50
48: ; preds = %33
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %129
50: ; preds = %33
br label %51
51: ; preds = %109, %50
%52 = load i32, i32* %8
%53 = add nsw i32 %52, 1
store i32 %53, i32* %8
%54 = load i32, i32* %10
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %110
56: ; preds = %51
br label %57
57: ; preds = %56, %108
%58 = load i32, i32* %8
%59 = load i32, i32* %8
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0), i32 %58, i32 %59)
store i32 0, i32* %9
%61 = load i32, i32* %8
store i32 %61, i32* %6
br label %62
62: ; preds = %101, %57
%63 = load i32, i32* %6
%64 = add nsw i32 %63, -1
store i32 %64, i32* %6
%65 = icmp ne i32 %63, 0
br i1 %65, label %66, label %102
66: ; preds = %62
%67 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%68 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %67)
%69 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%70 = call i64 @_check_input(i8* %69)
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %76
72: ; preds = %66
%73 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i8* %73)
%75 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %102
76: ; preds = %66
%77 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%78 = call i32 @_inputtoi(i8* %77)
store i32 %78, i32* %7
%79 = load i32, i32* %7
%80 = load i32**, i32*** %5
%81 = load i32*, i32** %80
%82 = load i32, i32* %8
%83 = load i32, i32* %10
%84 = mul nsw i32 %82, %83
%85 = load i32, i32* %9
%86 = add nsw i32 %84, %85
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i32, i32* %81, i64 %87
store i32 %79, i32* %88
%89 = load i32, i32* %7
%90 = load i32**, i32*** %5
%91 = load i32*, i32** %90
%92 = load i32, i32* %9
%93 = load i32, i32* %10
%94 = mul nsw i32 %92, %93
%95 = load i32, i32* %8
%96 = add nsw i32 %94, %95
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %91, i64 %97
store i32 %89, i32* %98
%99 = load i32, i32* %9
%100 = add nsw i32 %99, 1
store i32 %100, i32* %9
br label %101
101: ; preds = %76
br label %62
102: ; preds = %72, %62
%103 = load i32, i32* %9
%104 = load i32, i32* %8
%105 = icmp eq i32 %103, %104
br i1 %105, label %106, label %108
106: ; preds = %102
%107 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %109
108: ; preds = %102
br label %57
109: ; preds = %106
br label %51
110: ; preds = %51
store i32 0, i32* %6
br label %111
111: ; preds = %125, %110
%112 = load i32, i32* %6
%113 = load i32, i32* %10
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %128
115: ; preds = %111
%116 = load i32**, i32*** %5
%117 = load i32*, i32** %116
%118 = load i32, i32* %6
%119 = load i32, i32* %10
%120 = mul nsw i32 %118, %119
%121 = load i32, i32* %6
%122 = add nsw i32 %120, %121
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i32, i32* %117, i64 %123
store i32 0, i32* %124
br label %125
125: ; preds = %115
%126 = load i32, i32* %6
%127 = add nsw i32 %126, 1
store i32 %127, i32* %6
br label %111
128: ; preds = %111
store i32 1, i32* %3
br label %129
129: ; preds = %128, %48
%130 = load i32, i32* %3
ret i32 %130
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [38 x i8] c"first parameter %s isn't in [%d, %d]\0A\00"
@.str.4 = [60 x i8] c"please input [%d] elements for [%d]th line of half matrix:\0A\00"
@.str.5 = [56 x i8] c"input must be a number without sign or character x: %s\0A\00"
@.str.6 = [7 x i8] c"%*[^\0A]\00"
@str = [25 x i8] c"please input the cities:\00"
@str.7 = [18 x i8] c"not enough memory\00"
define i32 @read_input(i32* nocapture writeonly %0, i32** nocapture %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %14, %2
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%8 = call i32 @_isalldigit(i8* %4)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = call i32 @_atoi(i8* %4)
%12 = add i32 %11, -100
%13 = icmp ult i32 %12, -98
br i1 %13, label %14, label %16
14: ; preds = %5, %10
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %4, i32 1, i32 100)
br label %5
16: ; preds = %10
store i32 %11, i32* %0
%17 = shl nuw nsw i32 %11, 2
%18 = mul nuw nsw i32 %17, %11
%19 = call i64 @malloc(i32 %18)
%20 = inttoptr i64 %19 to i32*
store i32* %20, i32** %1
%21 = icmp eq i64 %19, 0
br i1 %21, label %25, label %22
22: ; preds = %16
%23 = zext i32 %11 to i64
%24 = zext i32 %11 to i64
br label %27
25: ; preds = %16
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.7, i64 0, i64 0))
br label %114
27: ; preds = %22, %67
%28 = phi i64 [ 1, %22 ], [ %69, %67 ]
%29 = phi i32 [ 0, %22 ], [ %30, %67 ]
%30 = trunc i64 %28 to i32
%31 = mul nsw i64 %28, %23
br label %41
32: ; preds = %67
%33 = icmp sgt i32 %11, 0
br i1 %33, label %34, label %114
34: ; preds = %32
%35 = load i32*, i32** %1
%36 = add nsw i64 %24, -1
%37 = and i64 %24, 3
%38 = icmp ult i64 %36, 3
br i1 %38, label %100, label %39
39: ; preds = %34
%40 = and i64 %24, 4294967292
br label %71
41: ; preds = %27, %63
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.4, i64 0, i64 0), i32 %30, i32 %30)
br label %43
43: ; preds = %41, %52
%44 = phi i64 [ 0, %41 ], [ %60, %52 ]
%45 = phi i32 [ %29, %41 ], [ %61, %52 ]
%46 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%47 = call i64 @_check_input(i8* %4)
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %52
49: ; preds = %43
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i8* %4)
%51 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %63
52: ; preds = %43
%53 = call i32 @_inputtoi(i8* %4)
%54 = load i32*, i32** %1
%55 = add nuw nsw i64 %44, %31
%56 = getelementptr inbounds i32, i32* %54, i64 %55
store i32 %53, i32* %56
%57 = mul nsw i64 %44, %23
%58 = add nuw nsw i64 %57, %28
%59 = getelementptr inbounds i32, i32* %54, i64 %58
store i32 %53, i32* %59
%60 = add nuw nsw i64 %44, 1
%61 = add nsw i32 %45, -1
%62 = icmp eq i32 %45, 0
br i1 %62, label %63, label %43
63: ; preds = %52, %49
%64 = phi i64 [ %44, %49 ], [ %60, %52 ]
%65 = and i64 %64, 4294967295
%66 = icmp eq i64 %65, %28
br i1 %66, label %67, label %41
67: ; preds = %63
%68 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%69 = add nuw nsw i64 %28, 1
%70 = icmp eq i64 %69, %24
br i1 %70, label %32, label %27
71: ; preds = %71, %39
%72 = phi i64 [ 0, %39 ], [ %97, %71 ]
%73 = phi i64 [ 0, %39 ], [ %98, %71 ]
%74 = trunc i64 %72 to i32
%75 = mul nsw i32 %11, %74
%76 = sext i32 %75 to i64
%77 = add nsw i64 %72, %76
%78 = getelementptr inbounds i32, i32* %35, i64 %77
store i32 0, i32* %78
%79 = or i64 %72, 1
%80 = trunc i64 %79 to i32
%81 = mul nsw i32 %11, %80
%82 = sext i32 %81 to i64
%83 = add nsw i64 %79, %82
%84 = getelementptr inbounds i32, i32* %35, i64 %83
store i32 0, i32* %84
%85 = or i64 %72, 2
%86 = trunc i64 %85 to i32
%87 = mul nsw i32 %11, %86
%88 = sext i32 %87 to i64
%89 = add nsw i64 %85, %88
%90 = getelementptr inbounds i32, i32* %35, i64 %89
store i32 0, i32* %90
%91 = or i64 %72, 3
%92 = trunc i64 %91 to i32
%93 = mul nsw i32 %11, %92
%94 = sext i32 %93 to i64
%95 = add nsw i64 %91, %94
%96 = getelementptr inbounds i32, i32* %35, i64 %95
store i32 0, i32* %96
%97 = add nuw nsw i64 %72, 4
%98 = add i64 %73, 4
%99 = icmp eq i64 %98, %40
br i1 %99, label %100, label %71
100: ; preds = %71, %34
%101 = phi i64 [ 0, %34 ], [ %97, %71 ]
%102 = icmp eq i64 %37, 0
br i1 %102, label %114, label %103
103: ; preds = %100, %103
%104 = phi i64 [ %111, %103 ], [ %101, %100 ]
%105 = phi i64 [ %112, %103 ], [ 0, %100 ]
%106 = trunc i64 %104 to i32
%107 = mul nsw i32 %11, %106
%108 = sext i32 %107 to i64
%109 = add nsw i64 %104, %108
%110 = getelementptr inbounds i32, i32* %35, i64 %109
store i32 0, i32* %110
%111 = add nuw nsw i64 %104, 1
%112 = add i64 %105, 1
%113 = icmp eq i64 %112, %37
br i1 %113, label %114, label %103
114: ; preds = %100, %103, %32, %25
%115 = phi i32 [ 0, %25 ], [ 1, %32 ], [ 1, %103 ], [ 1, %100 ]
ret i32 %115
}