; LLVM IR from kazunetakahashi/atcoder :: 2017/0129_NJPC2017 (D)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@ans = external dso_local global [110 x [110 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) @M)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) @K)
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #7
  store i8 0, ptr %2, align 1, !tbaa !5
  %19 = load i32, ptr @N, align 4, !tbaa !9
  %20 = load i32, ptr @M, align 4, !tbaa !9
  %21 = icmp sgt i32 %19, %20
  br i1 %21, label %22, label %23

22:                                               ; preds = %0
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @M) #7
  store i8 1, ptr %2, align 1, !tbaa !5
  br label %23

23:                                               ; preds = %22, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 -1, ptr %3, align 4, !tbaa !9
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @ans, ptr noundef getelementptr inbounds (i32, ptr @ans, i64 12100), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #7
  %24 = load i32, ptr @N, align 4, !tbaa !9
  %25 = load i32, ptr @M, align 4, !tbaa !9
  %26 = mul nsw i32 %24, %25
  %27 = load i32, ptr @M, align 4, !tbaa !9
  %28 = sub nsw i32 %27, 1
  %29 = mul nsw i32 %26, %28
  %30 = sdiv i32 %29, 2
  %31 = load i32, ptr @K, align 4, !tbaa !9
  %32 = icmp sle i32 %30, %31
  %33 = zext i1 %32 to i8
  store i8 %33, ptr %4, align 1, !tbaa !5
  %34 = load i8, ptr %4, align 1, !tbaa !5, !range !11, !noundef !12
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %54

36:                                               ; preds = %23
  %37 = load i32, ptr @N, align 4, !tbaa !9
  %38 = load i32, ptr @M, align 4, !tbaa !9
  %39 = mul nsw i32 %37, %38
  %40 = load i32, ptr @M, align 4, !tbaa !9
  %41 = sub nsw i32 %40, 1
  %42 = mul nsw i32 %39, %41
  %43 = sdiv i32 %42, 2
  %44 = load i32, ptr @M, align 4, !tbaa !9
  %45 = load i32, ptr @N, align 4, !tbaa !9
  %46 = mul nsw i32 %44, %45
  %47 = load i32, ptr @N, align 4, !tbaa !9
  %48 = sub nsw i32 %47, 1
  %49 = mul nsw i32 %46, %48
  %50 = sdiv i32 %49, 2
  %51 = add nsw i32 %43, %50
  %52 = load i32, ptr @K, align 4, !tbaa !9
  %53 = sub nsw i32 %51, %52
  store i32 %53, ptr @K, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %36, %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %83, %54
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = load i32, ptr @N, align 4, !tbaa !9
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %86

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %79, %60
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = load i32, ptr @M, align 4, !tbaa !9
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %82

66:                                               ; preds = %61
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = load i32, ptr @M, align 4, !tbaa !9
  %69 = mul nsw i32 %67, %68
  %70 = add nsw i32 1, %69
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = add nsw i32 %70, %71
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %74
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [110 x i32], ptr %75, i64 0, i64 %77
  store i32 %72, ptr %78, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %66
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %7, align 4, !tbaa !9
  br label %61, !llvm.loop !13

82:                                               ; preds = %65
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %5, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %5, align 4, !tbaa !9
  br label %55, !llvm.loop !15

86:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %145, %86
  %88 = load i32, ptr @K, align 4, !tbaa !9
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %90, label %146

90:                                               ; preds = %87
  %91 = load i32, ptr %8, align 4, !tbaa !9
  %92 = load i32, ptr @N, align 4, !tbaa !9
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %90
  br label %97

95:                                               ; preds = %90
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 54, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

96:                                               ; No predecessors!
  br label %97

97:                                               ; preds = %96, %94
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = load i32, ptr @M, align 4, !tbaa !9
  %100 = sub nsw i32 %99, 1
  %101 = icmp slt i32 %98, %100
  br i1 %101, label %102, label %137

102:                                              ; preds = %97
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %104
  %106 = load i32, ptr %9, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [110 x i32], ptr %105, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !9
  %110 = load i32, ptr %8, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %111
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [110 x i32], ptr %112, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = icmp slt i32 %109, %117
  br i1 %118, label %119, label %137

119:                                              ; preds = %102
  %120 = load i32, ptr %8, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %121
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [110 x i32], ptr %122, i64 0, i64 %124
  %126 = load i32, ptr %8, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %127
  %129 = load i32, ptr %9, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [110 x i32], ptr %128, i64 0, i64 %131
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %125, ptr noundef nonnull align 4 dereferenceable(4) %132) #7
  %133 = load i32, ptr @K, align 4, !tbaa !9
  %134 = add nsw i32 %133, -1
  store i32 %134, ptr @K, align 4, !tbaa !9
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %9, align 4, !tbaa !9
  br label %145

137:                                              ; preds = %102, %97
  %138 = load i32, ptr %9, align 4, !tbaa !9
  %139 = icmp eq i32 %138, 0
  br i1 %139, label %140, label %143

140:                                              ; preds = %137
  %141 = load i32, ptr %8, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %8, align 4, !tbaa !9
  br label %144

143:                                              ; preds = %137
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %143, %140
  br label %145

145:                                              ; preds = %144, %119
  br label %87, !llvm.loop !16

146:                                              ; preds = %87
  %147 = load i8, ptr %2, align 1, !tbaa !5, !range !11, !noundef !12
  %148 = trunc i8 %147 to i1
  br i1 %148, label %149, label %182

149:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %178, %149
  %151 = load i32, ptr %10, align 4, !tbaa !9
  %152 = icmp slt i32 %151, 110
  br i1 %152, label %154, label %153

153:                                              ; preds = %150
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %181

154:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %11, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %174, %154
  %158 = load i32, ptr %11, align 4, !tbaa !9
  %159 = icmp slt i32 %158, 110
  br i1 %159, label %161, label %160

160:                                              ; preds = %157
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %177

161:                                              ; preds = %157
  %162 = load i32, ptr %10, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %163
  %165 = load i32, ptr %11, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [110 x i32], ptr %164, i64 0, i64 %166
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %169
  %171 = load i32, ptr %10, align 4, !tbaa !9
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [110 x i32], ptr %170, i64 0, i64 %172
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %167, ptr noundef nonnull align 4 dereferenceable(4) %173) #7
  br label %174

174:                                              ; preds = %161
  %175 = load i32, ptr %11, align 4, !tbaa !9
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %11, align 4, !tbaa !9
  br label %157, !llvm.loop !17

177:                                              ; preds = %160
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %10, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %10, align 4, !tbaa !9
  br label %150, !llvm.loop !18

181:                                              ; preds = %153
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @M) #7
  br label %182

182:                                              ; preds = %181, %146
  %183 = load i8, ptr %4, align 1, !tbaa !5, !range !11, !noundef !12
  %184 = trunc i8 %183 to i1
  br i1 %184, label %185, label %228

185:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %186

186:                                              ; preds = %224, %185
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = load i32, ptr @N, align 4, !tbaa !9
  %189 = icmp slt i32 %187, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %186
  store i32 16, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %227

191:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %192

192:                                              ; preds = %220, %191
  %193 = load i32, ptr %13, align 4, !tbaa !9
  %194 = load i32, ptr @M, align 4, !tbaa !9
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  store i32 19, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %223

197:                                              ; preds = %192
  %198 = load i32, ptr @N, align 4, !tbaa !9
  %199 = load i32, ptr @M, align 4, !tbaa !9
  %200 = mul nsw i32 %198, %199
  %201 = add nsw i32 %200, 1
  %202 = load i32, ptr %12, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %203
  %205 = load i32, ptr %13, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [110 x i32], ptr %204, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !9
  %209 = sub nsw i32 %201, %208
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %209)
  %211 = load i32, ptr %13, align 4, !tbaa !9
  %212 = load i32, ptr @M, align 4, !tbaa !9
  %213 = sub nsw i32 %212, 1
  %214 = icmp slt i32 %211, %213
  br i1 %214, label %215, label %217

215:                                              ; preds = %197
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %219

217:                                              ; preds = %197
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %219

219:                                              ; preds = %217, %215
  br label %220

220:                                              ; preds = %219
  %221 = load i32, ptr %13, align 4, !tbaa !9
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %13, align 4, !tbaa !9
  br label %192, !llvm.loop !19

223:                                              ; preds = %196
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %12, align 4, !tbaa !9
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %12, align 4, !tbaa !9
  br label %186, !llvm.loop !20

227:                                              ; preds = %190
  br label %266

228:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %229

229:                                              ; preds = %262, %228
  %230 = load i32, ptr %14, align 4, !tbaa !9
  %231 = load i32, ptr @N, align 4, !tbaa !9
  %232 = icmp slt i32 %230, %231
  br i1 %232, label %234, label %233

233:                                              ; preds = %229
  store i32 22, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %265

234:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %235

235:                                              ; preds = %258, %234
  %236 = load i32, ptr %15, align 4, !tbaa !9
  %237 = load i32, ptr @M, align 4, !tbaa !9
  %238 = icmp slt i32 %236, %237
  br i1 %238, label %240, label %239

239:                                              ; preds = %235
  store i32 25, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %261

240:                                              ; preds = %235
  %241 = load i32, ptr %14, align 4, !tbaa !9
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %242
  %244 = load i32, ptr %15, align 4, !tbaa !9
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [110 x i32], ptr %243, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !9
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %247)
  %249 = load i32, ptr %15, align 4, !tbaa !9
  %250 = load i32, ptr @M, align 4, !tbaa !9
  %251 = sub nsw i32 %250, 1
  %252 = icmp slt i32 %249, %251
  br i1 %252, label %253, label %255

253:                                              ; preds = %240
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %257

255:                                              ; preds = %240
  %256 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %257

257:                                              ; preds = %255, %253
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %15, align 4, !tbaa !9
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %15, align 4, !tbaa !9
  br label %235, !llvm.loop !21

261:                                              ; preds = %239
  br label %262

262:                                              ; preds = %261
  %263 = load i32, ptr %14, align 4, !tbaa !9
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %14, align 4, !tbaa !9
  br label %229, !llvm.loop !22

265:                                              ; preds = %233
  br label %266

266:                                              ; preds = %265, %227
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #7
  %267 = load i32, ptr %1, align 4
  ret i32 %267
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@ans = external dso_local global [110 x [110 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @M)
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) @K)
  %5 = load i32, ptr @N, align 4, !tbaa !5
  %6 = load i32, ptr @M, align 4, !tbaa !5
  %7 = icmp sgt i32 %5, %6
  br i1 %7, label %8, label %9

8:                                                ; preds = %0
  tail call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @M) #7
  br label %9

9:                                                ; preds = %8, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 -1, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @ans, ptr noundef nonnull getelementptr inbounds (i8, ptr @ans, i64 48400), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %10 = load i32, ptr @N, align 4, !tbaa !5
  %11 = load i32, ptr @M, align 4, !tbaa !5
  %12 = mul nsw i32 %11, %10
  %13 = add nsw i32 %11, -1
  %14 = mul nsw i32 %12, %13
  %15 = sdiv i32 %14, 2
  %16 = load i32, ptr @K, align 4, !tbaa !5
  %.not = icmp sgt i32 %15, %16
  br i1 %.not, label %23, label %17

17:                                               ; preds = %9
  %18 = add nsw i32 %10, -1
  %19 = mul nsw i32 %12, %18
  %20 = sdiv i32 %19, 2
  %21 = sub i32 %20, %16
  %22 = add i32 %21, %15
  store i32 %22, ptr @K, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %17, %9
  %24 = phi i32 [ %22, %17 ], [ %16, %9 ]
  %25 = icmp sgt i32 %10, 0
  %26 = icmp sgt i32 %11, 0
  %or.cond = and i1 %25, %26
  br i1 %or.cond, label %.preheader71.us.preheader, label %.preheader70

.preheader71.us.preheader:                        ; preds = %23
  %27 = zext nneg i32 %11 to i64
  %wide.trip.count96 = zext nneg i32 %10 to i64
  %min.iters.check = icmp ult i32 %11, 8
  %n.vec = and i64 %27, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %27
  br label %.preheader71.us

.preheader71.us:                                  ; preds = %.preheader71.us.preheader, %._crit_edge.us
  %indvars.iv93 = phi i64 [ 0, %.preheader71.us.preheader ], [ %indvars.iv.next94, %._crit_edge.us ]
  %28 = mul nuw nsw i64 %indvars.iv93, %27
  %29 = add nuw nsw i64 %28, 1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader71.us
  %broadcast.splatinsert = insertelement <4 x i64> poison, i64 %29, i64 0
  %broadcast.splat = shufflevector <4 x i64> %broadcast.splatinsert, <4 x i64> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i64> [ <i64 0, i64 1, i64 2, i64 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i64> %vec.ind, <i64 4, i64 4, i64 4, i64 4>
  %30 = add nuw nsw <4 x i64> %broadcast.splat, %vec.ind
  %31 = add nuw nsw <4 x i64> %broadcast.splat, %step.add
  %32 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %indvars.iv93, i64 %index
  %33 = trunc <4 x i64> %30 to <4 x i32>
  %34 = trunc <4 x i64> %31 to <4 x i32>
  %35 = getelementptr inbounds i8, ptr %32, i64 16
  store <4 x i32> %33, ptr %32, align 8, !tbaa !5
  store <4 x i32> %34, ptr %35, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i64> %vec.ind, <i64 8, i64 8, i64 8, i64 8>
  %36 = icmp eq i64 %index.next, %n.vec
  br i1 %36, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader71.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader71.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %37 = add nuw nsw i64 %29, %indvars.iv
  %38 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %indvars.iv93, i64 %indvars.iv
  %39 = trunc nuw i64 %37 to i32
  store i32 %39, ptr %38, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %27
  br i1 %exitcond.not, label %._crit_edge.us, label %scalar.ph, !llvm.loop !13

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %.preheader70, label %.preheader71.us, !llvm.loop !14

.preheader70:                                     ; preds = %._crit_edge.us, %23
  %40 = icmp sgt i32 %24, 0
  br i1 %40, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader70, %65
  %41 = phi i32 [ %66, %65 ], [ %24, %.preheader70 ]
  %42 = phi i32 [ %67, %65 ], [ %10, %.preheader70 ]
  %.05375 = phi i32 [ %.1, %65 ], [ 0, %.preheader70 ]
  %.05474 = phi i32 [ %.155, %65 ], [ 0, %.preheader70 ]
  %43 = icmp slt i32 %.05474, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 54, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #8
  unreachable

45:                                               ; preds = %.lr.ph
  %46 = load i32, ptr @M, align 4, !tbaa !5
  %47 = add nsw i32 %46, -1
  %48 = icmp slt i32 %.05375, %47
  br i1 %48, label %49, label %62

49:                                               ; preds = %45
  %50 = sext i32 %.05474 to i64
  %51 = sext i32 %.05375 to i64
  %52 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %50, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %.05375, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %50, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = icmp slt i32 %53, %57
  br i1 %58, label %59, label %62

59:                                               ; preds = %49
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %56) #7
  %60 = load i32, ptr @K, align 4, !tbaa !5
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr @K, align 4, !tbaa !5
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %65

62:                                               ; preds = %49, %45
  %63 = icmp eq i32 %.05375, 0
  %64 = zext i1 %63 to i32
  %spec.select = add nsw i32 %.05474, %64
  br label %65

65:                                               ; preds = %62, %59
  %66 = phi i32 [ %61, %59 ], [ %41, %62 ]
  %67 = phi i32 [ %.pre, %59 ], [ %42, %62 ]
  %.155 = phi i32 [ %.05474, %59 ], [ %spec.select, %62 ]
  %.1 = phi i32 [ %54, %59 ], [ 0, %62 ]
  %68 = icmp sgt i32 %66, 0
  br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %65, %.preheader70
  br i1 %7, label %.preheader69, label %73

.loopexit68:                                      ; preds = %.lr.ph78, %.preheader69
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %exitcond107.not = icmp eq i64 %indvars.iv.next105, 110
  br i1 %exitcond107.not, label %69, label %.preheader69, !llvm.loop !16

69:                                               ; preds = %.loopexit68
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) @N, ptr noundef nonnull align 4 dereferenceable(4) @M) #7
  br label %73

.preheader69:                                     ; preds = %._crit_edge, %.loopexit68
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %.loopexit68 ], [ 0, %._crit_edge ]
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %.loopexit68 ], [ 1, %._crit_edge ]
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %70 = icmp ult i64 %indvars.iv104, 109
  br i1 %70, label %.lr.ph78, label %.loopexit68

.lr.ph78:                                         ; preds = %.preheader69, %.lr.ph78
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %.lr.ph78 ], [ %indvars.iv98, %.preheader69 ]
  %71 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %indvars.iv104, i64 %indvars.iv100
  %72 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %indvars.iv100, i64 %indvars.iv104
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %71, ptr noundef nonnull align 4 dereferenceable(4) %72) #7
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond103.not = icmp eq i64 %indvars.iv.next101, 110
  br i1 %exitcond103.not, label %.loopexit68, label %.lr.ph78, !llvm.loop !17

73:                                               ; preds = %69, %._crit_edge
  %74 = load i32, ptr @N, align 4, !tbaa !5
  %75 = icmp sgt i32 %74, 0
  %76 = load i32, ptr @M, align 4
  %77 = icmp sgt i32 %76, 0
  %or.cond128 = select i1 %75, i1 %77, i1 false
  br i1 %.not, label %.preheader64, label %.preheader66

.preheader66:                                     ; preds = %73
  br i1 %or.cond128, label %.preheader65, label %.loopexit

.preheader64:                                     ; preds = %73
  br i1 %or.cond128, label %.preheader, label %.loopexit

.preheader65:                                     ; preds = %.preheader66, %._crit_edge82
  %78 = phi i32 [ %81, %._crit_edge82 ], [ %74, %.preheader66 ]
  %79 = phi i32 [ %82, %._crit_edge82 ], [ %76, %.preheader66 ]
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %._crit_edge82 ], [ 0, %.preheader66 ]
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.lr.ph81, label %._crit_edge82

._crit_edge82.loopexit:                           ; preds = %101
  %.pre121 = load i32, ptr @N, align 4, !tbaa !5
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %._crit_edge82.loopexit, %.preheader65
  %81 = phi i32 [ %.pre121, %._crit_edge82.loopexit ], [ %78, %.preheader65 ]
  %82 = phi i32 [ %102, %._crit_edge82.loopexit ], [ %79, %.preheader65 ]
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %83 = sext i32 %81 to i64
  %84 = icmp slt i64 %indvars.iv.next112, %83
  br i1 %84, label %.preheader65, label %.loopexit, !llvm.loop !18

.lr.ph81:                                         ; preds = %.preheader65, %101
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %101 ], [ 0, %.preheader65 ]
  %85 = phi i32 [ %102, %101 ], [ %79, %.preheader65 ]
  %86 = load i32, ptr @N, align 4, !tbaa !5
  %87 = mul nsw i32 %86, %85
  %88 = add nsw i32 %87, 1
  %89 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %indvars.iv111, i64 %indvars.iv108
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = sub i32 %88, %90
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %91)
  %93 = load i32, ptr @M, align 4, !tbaa !5
  %94 = add nsw i32 %93, -1
  %95 = sext i32 %94 to i64
  %96 = icmp slt i64 %indvars.iv108, %95
  br i1 %96, label %97, label %99

97:                                               ; preds = %.lr.ph81
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  br label %101

99:                                               ; preds = %.lr.ph81
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %101

101:                                              ; preds = %97, %99
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %102 = load i32, ptr @M, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = icmp slt i64 %indvars.iv.next109, %103
  br i1 %104, label %.lr.ph81, label %._crit_edge82.loopexit, !llvm.loop !20

.preheader:                                       ; preds = %.preheader64, %._crit_edge86
  %105 = phi i32 [ %108, %._crit_edge86 ], [ %74, %.preheader64 ]
  %106 = phi i32 [ %109, %._crit_edge86 ], [ %76, %.preheader64 ]
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %._crit_edge86 ], [ 0, %.preheader64 ]
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %.lr.ph85, label %._crit_edge86

._crit_edge86.loopexit:                           ; preds = %123
  %.pre122 = load i32, ptr @N, align 4, !tbaa !5
  br label %._crit_edge86

._crit_edge86:                                    ; preds = %._crit_edge86.loopexit, %.preheader
  %108 = phi i32 [ %.pre122, %._crit_edge86.loopexit ], [ %105, %.preheader ]
  %109 = phi i32 [ %124, %._crit_edge86.loopexit ], [ %106, %.preheader ]
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %110 = sext i32 %108 to i64
  %111 = icmp slt i64 %indvars.iv.next118, %110
  br i1 %111, label %.preheader, label %.loopexit, !llvm.loop !21

.lr.ph85:                                         ; preds = %.preheader, %123
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %123 ], [ 0, %.preheader ]
  %112 = getelementptr inbounds [110 x [110 x i32]], ptr @ans, i64 0, i64 %indvars.iv117, i64 %indvars.iv114
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %113)
  %115 = load i32, ptr @M, align 4, !tbaa !5
  %116 = add nsw i32 %115, -1
  %117 = sext i32 %116 to i64
  %118 = icmp slt i64 %indvars.iv114, %117
  br i1 %118, label %119, label %121

119:                                              ; preds = %.lr.ph85
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  br label %123

121:                                              ; preds = %.lr.ph85
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %123

123:                                              ; preds = %119, %121
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %124 = load i32, ptr @M, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = icmp slt i64 %indvars.iv.next115, %125
  br i1 %126, label %.lr.ph85, label %._crit_edge86.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %._crit_edge82, %._crit_edge86, %.preheader66, %.preheader64
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !19}
!19 = !{!"llvm.loop.unswitch.partial.disable"}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !19}
!22 = distinct !{!22, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass