; LLVM IR from eyangch/competitive-programming :: USACOtraining/3.2 (ratios)

; 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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = 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 [3 x i32], align 4
  %3 = alloca [3 x [3 x i32]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [4 x i32], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [3 x i32], align 4
  %13 = alloca [3 x i8], align 1
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %18 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = load ptr, ptr @stdin, align 8, !tbaa !8
  %25 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %24)
  %26 = load ptr, ptr @stdout, align 8, !tbaa !8
  %27 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %26)
  call void @llvm.lifetime.start.p0(i64 12, ptr %2) #7
  %28 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 0
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %30 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 1
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %32 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 2
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 4 dereferenceable(4) %32)
  call void @llvm.lifetime.start.p0(i64 36, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !11
  br label %34

34:                                               ; preds = %55, %0
  %35 = load i32, ptr %4, align 4, !tbaa !11
  %36 = icmp slt i32 %35, 3
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %39

39:                                               ; preds = %51, %38
  %40 = load i32, ptr %6, align 4, !tbaa !11
  %41 = icmp slt i32 %40, 3
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %39
  %44 = load i32, ptr %4, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 %45
  %47 = load i32, ptr %6, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [3 x i32], ptr %46, i64 0, i64 %48
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %49)
  br label %51

51:                                               ; preds = %43
  %52 = load i32, ptr %6, align 4, !tbaa !11
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %6, align 4, !tbaa !11
  br label %39, !llvm.loop !13

54:                                               ; preds = %42
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %4, align 4, !tbaa !11
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %4, align 4, !tbaa !11
  br label %34, !llvm.loop !15

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

59:                                               ; preds = %303, %58
  %60 = load i32, ptr %9, align 4, !tbaa !11
  %61 = icmp slt i32 %60, 100
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %306

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %64

64:                                               ; preds = %299, %63
  %65 = load i32, ptr %10, align 4, !tbaa !11
  %66 = icmp slt i32 %65, 100
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %302

68:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %69

69:                                               ; preds = %295, %68
  %70 = load i32, ptr %11, align 4, !tbaa !11
  %71 = icmp slt i32 %70, 100
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %298

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #7
  %74 = load i32, ptr %9, align 4, !tbaa !11
  %75 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 0
  %76 = getelementptr inbounds [3 x i32], ptr %75, i64 0, i64 0
  %77 = load i32, ptr %76, align 16, !tbaa !11
  %78 = mul nsw i32 %74, %77
  %79 = load i32, ptr %10, align 4, !tbaa !11
  %80 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 1
  %81 = getelementptr inbounds [3 x i32], ptr %80, i64 0, i64 0
  %82 = load i32, ptr %81, align 4, !tbaa !11
  %83 = mul nsw i32 %79, %82
  %84 = add nsw i32 %78, %83
  %85 = load i32, ptr %11, align 4, !tbaa !11
  %86 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 2
  %87 = getelementptr inbounds [3 x i32], ptr %86, i64 0, i64 0
  %88 = load i32, ptr %87, align 8, !tbaa !11
  %89 = mul nsw i32 %85, %88
  %90 = add nsw i32 %84, %89
  %91 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 0
  store i32 %90, ptr %91, align 4, !tbaa !11
  %92 = load i32, ptr %9, align 4, !tbaa !11
  %93 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 0
  %94 = getelementptr inbounds [3 x i32], ptr %93, i64 0, i64 1
  %95 = load i32, ptr %94, align 4, !tbaa !11
  %96 = mul nsw i32 %92, %95
  %97 = load i32, ptr %10, align 4, !tbaa !11
  %98 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 1
  %99 = getelementptr inbounds [3 x i32], ptr %98, i64 0, i64 1
  %100 = load i32, ptr %99, align 4, !tbaa !11
  %101 = mul nsw i32 %97, %100
  %102 = add nsw i32 %96, %101
  %103 = load i32, ptr %11, align 4, !tbaa !11
  %104 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 2
  %105 = getelementptr inbounds [3 x i32], ptr %104, i64 0, i64 1
  %106 = load i32, ptr %105, align 4, !tbaa !11
  %107 = mul nsw i32 %103, %106
  %108 = add nsw i32 %102, %107
  %109 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 1
  store i32 %108, ptr %109, align 4, !tbaa !11
  %110 = load i32, ptr %9, align 4, !tbaa !11
  %111 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 0
  %112 = getelementptr inbounds [3 x i32], ptr %111, i64 0, i64 2
  %113 = load i32, ptr %112, align 8, !tbaa !11
  %114 = mul nsw i32 %110, %113
  %115 = load i32, ptr %10, align 4, !tbaa !11
  %116 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 1
  %117 = getelementptr inbounds [3 x i32], ptr %116, i64 0, i64 2
  %118 = load i32, ptr %117, align 4, !tbaa !11
  %119 = mul nsw i32 %115, %118
  %120 = add nsw i32 %114, %119
  %121 = load i32, ptr %11, align 4, !tbaa !11
  %122 = getelementptr inbounds [3 x [3 x i32]], ptr %3, i64 0, i64 2
  %123 = getelementptr inbounds [3 x i32], ptr %122, i64 0, i64 2
  %124 = load i32, ptr %123, align 8, !tbaa !11
  %125 = mul nsw i32 %121, %124
  %126 = add nsw i32 %120, %125
  %127 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 2
  store i32 %126, ptr %127, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 3, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %128

128:                                              ; preds = %142, %73
  %129 = load i32, ptr %14, align 4, !tbaa !11
  %130 = icmp slt i32 %129, 3
  br i1 %130, label %132, label %131

131:                                              ; preds = %128
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %145

132:                                              ; preds = %128
  %133 = load i32, ptr %14, align 4, !tbaa !11
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !11
  %137 = icmp eq i32 %136, 0
  %138 = load i32, ptr %14, align 4, !tbaa !11
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [3 x i8], ptr %13, i64 0, i64 %139
  %141 = zext i1 %137 to i8
  store i8 %141, ptr %140, align 1, !tbaa !16
  br label %142

142:                                              ; preds = %132
  %143 = load i32, ptr %14, align 4, !tbaa !11
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %14, align 4, !tbaa !11
  br label %128, !llvm.loop !18

145:                                              ; preds = %131
  %146 = getelementptr inbounds [3 x i8], ptr %13, i64 0, i64 0
  %147 = load i8, ptr %146, align 1, !tbaa !16, !range !19, !noundef !20
  %148 = trunc i8 %147 to i1
  br i1 %148, label %156, label %149

149:                                              ; preds = %145
  %150 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 0
  %151 = load i32, ptr %150, align 4, !tbaa !11
  %152 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 0
  %153 = load i32, ptr %152, align 4, !tbaa !11
  %154 = srem i32 %151, %153
  %155 = icmp eq i32 %154, 0
  br i1 %155, label %156, label %294

156:                                              ; preds = %149, %145
  %157 = getelementptr inbounds [3 x i8], ptr %13, i64 0, i64 1
  %158 = load i8, ptr %157, align 1, !tbaa !16, !range !19, !noundef !20
  %159 = trunc i8 %158 to i1
  br i1 %159, label %167, label %160

160:                                              ; preds = %156
  %161 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 1
  %162 = load i32, ptr %161, align 4, !tbaa !11
  %163 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 1
  %164 = load i32, ptr %163, align 4, !tbaa !11
  %165 = srem i32 %162, %164
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %167, label %294

167:                                              ; preds = %160, %156
  %168 = getelementptr inbounds [3 x i8], ptr %13, i64 0, i64 2
  %169 = load i8, ptr %168, align 1, !tbaa !16, !range !19, !noundef !20
  %170 = trunc i8 %169 to i1
  br i1 %170, label %178, label %171

171:                                              ; preds = %167
  %172 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 2
  %173 = load i32, ptr %172, align 4, !tbaa !11
  %174 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 2
  %175 = load i32, ptr %174, align 4, !tbaa !11
  %176 = srem i32 %173, %175
  %177 = icmp eq i32 %176, 0
  br i1 %177, label %178, label %294

178:                                              ; preds = %171, %167
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 1, ptr %15, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %179

179:                                              ; preds = %253, %178
  %180 = load i32, ptr %16, align 4, !tbaa !11
  %181 = icmp slt i32 %180, 3
  br i1 %181, label %183, label %182

182:                                              ; preds = %179
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %256

183:                                              ; preds = %179
  %184 = load i32, ptr %16, align 4, !tbaa !11
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !11
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %196

189:                                              ; preds = %183
  %190 = load i32, ptr %16, align 4, !tbaa !11
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !11
  %194 = icmp eq i32 %193, 0
  br i1 %194, label %195, label %196

195:                                              ; preds = %189
  store i8 0, ptr %15, align 1, !tbaa !16
  br label %196

196:                                              ; preds = %195, %189, %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %197 = load i32, ptr %16, align 4, !tbaa !11
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %17, align 4, !tbaa !11
  br label %199

199:                                              ; preds = %249, %196
  %200 = load i32, ptr %17, align 4, !tbaa !11
  %201 = icmp slt i32 %200, 3
  br i1 %201, label %203, label %202

202:                                              ; preds = %199
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %252

203:                                              ; preds = %199
  %204 = load i32, ptr %16, align 4, !tbaa !11
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !11
  %208 = icmp eq i32 %207, 0
  br i1 %208, label %215, label %209

209:                                              ; preds = %203
  %210 = load i32, ptr %17, align 4, !tbaa !11
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !11
  %214 = icmp eq i32 %213, 0
  br i1 %214, label %215, label %216

215:                                              ; preds = %209, %203
  br label %249

216:                                              ; preds = %209
  %217 = load i32, ptr %16, align 4, !tbaa !11
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !11
  %221 = load i32, ptr %16, align 4, !tbaa !11
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !11
  %225 = sdiv i32 %220, %224
  %226 = load i32, ptr %17, align 4, !tbaa !11
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !11
  %230 = load i32, ptr %17, align 4, !tbaa !11
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 %231
  %233 = load i32, ptr %232, align 4, !tbaa !11
  %234 = sdiv i32 %229, %233
  %235 = icmp ne i32 %225, %234
  br i1 %235, label %247, label %236

236:                                              ; preds = %216
  %237 = load i32, ptr %16, align 4, !tbaa !11
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !11
  %241 = load i32, ptr %16, align 4, !tbaa !11
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 %242
  %244 = load i32, ptr %243, align 4, !tbaa !11
  %245 = sdiv i32 %240, %244
  %246 = icmp eq i32 %245, 0
  br i1 %246, label %247, label %248

247:                                              ; preds = %236, %216
  store i8 0, ptr %15, align 1, !tbaa !16
  br label %248

248:                                              ; preds = %247, %236
  br label %249

249:                                              ; preds = %248, %215
  %250 = load i32, ptr %17, align 4, !tbaa !11
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %17, align 4, !tbaa !11
  br label %199, !llvm.loop !21

252:                                              ; preds = %202
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %16, align 4, !tbaa !11
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %16, align 4, !tbaa !11
  br label %179, !llvm.loop !22

256:                                              ; preds = %182
  %257 = load i8, ptr %15, align 1, !tbaa !16, !range !19, !noundef !20
  %258 = trunc i8 %257 to i1
  br i1 %258, label %259, label %293

259:                                              ; preds = %256
  %260 = load i32, ptr %9, align 4, !tbaa !11
  %261 = load i32, ptr %10, align 4, !tbaa !11
  %262 = add nsw i32 %260, %261
  %263 = load i32, ptr %11, align 4, !tbaa !11
  %264 = add nsw i32 %262, %263
  %265 = load i32, ptr %7, align 4, !tbaa !11
  %266 = icmp slt i32 %264, %265
  br i1 %266, label %267, label %293

267:                                              ; preds = %259
  %268 = load i32, ptr %9, align 4, !tbaa !11
  %269 = load i32, ptr %10, align 4, !tbaa !11
  %270 = add nsw i32 %268, %269
  %271 = load i32, ptr %11, align 4, !tbaa !11
  %272 = add nsw i32 %270, %271
  store i32 %272, ptr %7, align 4, !tbaa !11
  %273 = load i32, ptr %9, align 4, !tbaa !11
  %274 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  store i32 %273, ptr %274, align 16, !tbaa !11
  %275 = load i32, ptr %10, align 4, !tbaa !11
  %276 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 1
  store i32 %275, ptr %276, align 4, !tbaa !11
  %277 = load i32, ptr %11, align 4, !tbaa !11
  %278 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 2
  store i32 %277, ptr %278, align 8, !tbaa !11
  %279 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 0
  %280 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 1
  %281 = getelementptr inbounds [3 x i32], ptr %12, i64 0, i64 2
  %282 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %280, ptr noundef nonnull align 4 dereferenceable(4) %281)
  %283 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %279, ptr noundef nonnull align 4 dereferenceable(4) %282)
  %284 = load i32, ptr %283, align 4, !tbaa !11
  %285 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 0
  %286 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 1
  %287 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 2
  %288 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %286, ptr noundef nonnull align 4 dereferenceable(4) %287)
  %289 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %285, ptr noundef nonnull align 4 dereferenceable(4) %288)
  %290 = load i32, ptr %289, align 4, !tbaa !11
  %291 = sdiv i32 %284, %290
  %292 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 3
  store i32 %291, ptr %292, align 4, !tbaa !11
  br label %293

293:                                              ; preds = %267, %259, %256
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  br label %294

294:                                              ; preds = %293, %171, %160, %149
  call void @llvm.lifetime.end.p0(i64 3, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #7
  br label %295

295:                                              ; preds = %294
  %296 = load i32, ptr %11, align 4, !tbaa !11
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %11, align 4, !tbaa !11
  br label %69, !llvm.loop !23

298:                                              ; preds = %72
  br label %299

299:                                              ; preds = %298
  %300 = load i32, ptr %10, align 4, !tbaa !11
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %10, align 4, !tbaa !11
  br label %64, !llvm.loop !24

302:                                              ; preds = %67
  br label %303

303:                                              ; preds = %302
  %304 = load i32, ptr %9, align 4, !tbaa !11
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %9, align 4, !tbaa !11
  br label %59, !llvm.loop !25

306:                                              ; preds = %62
  %307 = load i32, ptr %7, align 4, !tbaa !11
  %308 = icmp eq i32 %307, 2147483647
  br i1 %308, label %309, label %312

309:                                              ; preds = %306
  %310 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %311 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %310, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %329

312:                                              ; preds = %306
  %313 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 0
  %314 = load i32, ptr %313, align 16, !tbaa !11
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %314)
  %316 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %315, ptr noundef @.str.5)
  %317 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 1
  %318 = load i32, ptr %317, align 4, !tbaa !11
  %319 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %316, i32 noundef %318)
  %320 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %319, ptr noundef @.str.5)
  %321 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 2
  %322 = load i32, ptr %321, align 8, !tbaa !11
  %323 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %320, i32 noundef %322)
  %324 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %323, ptr noundef @.str.5)
  %325 = getelementptr inbounds [4 x i32], ptr %8, i64 0, i64 3
  %326 = load i32, ptr %325, align 4, !tbaa !11
  %327 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %324, i32 noundef %326)
  %328 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %327, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %329

329:                                              ; preds = %312, %309
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #7
  %330 = load i32, ptr %1, align 4
  ret i32 %330
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

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.end.p0(i64 immarg, ptr nocapture) #3

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

; 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) #5

; 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)) #5

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

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 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #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 }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = distinct !{!18, !14}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = 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 {
.preheader73:
  %0 = alloca [3 x i32], align 4
  %1 = alloca [3 x [3 x i32]], align 16
  %2 = alloca [3 x i32], align 4
  %3 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  %9 = load ptr, ptr @stdin, align 8, !tbaa !8
  %10 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %9)
  %11 = load ptr, ptr @stdout, align 8, !tbaa !8
  %12 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %0) #7
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %1) #7
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %19 = getelementptr inbounds i8, ptr %1, i64 4
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %23 = getelementptr inbounds i8, ptr %1, i64 12
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %25 = getelementptr inbounds i8, ptr %1, i64 16
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %27 = getelementptr inbounds i8, ptr %1, i64 20
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %29 = getelementptr inbounds i8, ptr %1, i64 24
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = getelementptr inbounds i8, ptr %1, i64 28
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %33 = getelementptr inbounds i8, ptr %1, i64 32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %35 = getelementptr inbounds i8, ptr %2, i64 4
  %36 = getelementptr inbounds i8, ptr %2, i64 8
  br label %.preheader71

.preheader71:                                     ; preds = %.preheader73, %40
  %.05898 = phi i32 [ 0, %.preheader73 ], [ %41, %40 ]
  %.sroa.0.097 = phi i32 [ undef, %.preheader73 ], [ %.sroa.0.4, %40 ]
  %.sroa.4.096 = phi i32 [ undef, %.preheader73 ], [ %.sroa.4.4, %40 ]
  %.sroa.6.095 = phi i32 [ undef, %.preheader73 ], [ %.sroa.6.4, %40 ]
  %.sroa.8.094 = phi i32 [ undef, %.preheader73 ], [ %.sroa.8.4, %40 ]
  %.05993 = phi i32 [ 2147483647, %.preheader73 ], [ %.4, %40 ]
  br label %.preheader

37:                                               ; preds = %40
  %38 = icmp eq i32 %.4, 2147483647
  br i1 %38, label %116, label %118

.preheader:                                       ; preds = %.preheader71, %42
  %.05792 = phi i32 [ 0, %.preheader71 ], [ %43, %42 ]
  %.sroa.0.191 = phi i32 [ %.sroa.0.097, %.preheader71 ], [ %.sroa.0.4, %42 ]
  %.sroa.4.190 = phi i32 [ %.sroa.4.096, %.preheader71 ], [ %.sroa.4.4, %42 ]
  %.sroa.6.189 = phi i32 [ %.sroa.6.095, %.preheader71 ], [ %.sroa.6.4, %42 ]
  %.sroa.8.188 = phi i32 [ %.sroa.8.094, %.preheader71 ], [ %.sroa.8.4, %42 ]
  %.16087 = phi i32 [ %.05993, %.preheader71 ], [ %.4, %42 ]
  %39 = add nuw nsw i32 %.05792, %.05898
  br label %44

40:                                               ; preds = %42
  %41 = add nuw nsw i32 %.05898, 1
  %exitcond115.not = icmp eq i32 %41, 100
  br i1 %exitcond115.not, label %37, label %.preheader71, !llvm.loop !11

42:                                               ; preds = %114
  %43 = add nuw nsw i32 %.05792, 1
  %exitcond114.not = icmp eq i32 %43, 100
  br i1 %exitcond114.not, label %40, label %.preheader, !llvm.loop !13

44:                                               ; preds = %.preheader, %114
  %.05686 = phi i32 [ 0, %.preheader ], [ %115, %114 ]
  %.sroa.0.285 = phi i32 [ %.sroa.0.191, %.preheader ], [ %.sroa.0.4, %114 ]
  %.sroa.4.284 = phi i32 [ %.sroa.4.190, %.preheader ], [ %.sroa.4.4, %114 ]
  %.sroa.6.283 = phi i32 [ %.sroa.6.189, %.preheader ], [ %.sroa.6.4, %114 ]
  %.sroa.8.282 = phi i32 [ %.sroa.8.188, %.preheader ], [ %.sroa.8.4, %114 ]
  %.26181 = phi i32 [ %.16087, %.preheader ], [ %.4, %114 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #7
  %45 = load i32, ptr %1, align 16, !tbaa !14
  %46 = mul nsw i32 %45, %.05898
  %47 = load i32, ptr %23, align 4, !tbaa !14
  %48 = mul nsw i32 %47, %.05792
  %49 = add nsw i32 %48, %46
  %50 = load i32, ptr %29, align 8, !tbaa !14
  %51 = mul nsw i32 %50, %.05686
  %52 = add nsw i32 %49, %51
  store i32 %52, ptr %2, align 4, !tbaa !14
  %53 = load i32, ptr %19, align 4, !tbaa !14
  %54 = mul nsw i32 %53, %.05898
  %55 = load i32, ptr %25, align 16, !tbaa !14
  %56 = mul nsw i32 %55, %.05792
  %57 = add nsw i32 %56, %54
  %58 = load i32, ptr %31, align 4, !tbaa !14
  %59 = mul nsw i32 %58, %.05686
  %60 = add nsw i32 %57, %59
  store i32 %60, ptr %35, align 4, !tbaa !14
  %61 = load i32, ptr %21, align 8, !tbaa !14
  %62 = mul nsw i32 %61, %.05898
  %63 = load i32, ptr %27, align 4, !tbaa !14
  %64 = mul nsw i32 %63, %.05792
  %65 = add nsw i32 %64, %62
  %66 = load i32, ptr %33, align 16, !tbaa !14
  %67 = mul nsw i32 %66, %.05686
  %68 = add nsw i32 %65, %67
  store i32 %68, ptr %36, align 4, !tbaa !14
  %69 = load i32, ptr %0, align 4, !tbaa !14
  %70 = icmp eq i32 %69, 0
  %71 = load i32, ptr %14, align 4, !tbaa !14
  %72 = icmp eq i32 %71, 0
  %73 = load i32, ptr %16, align 4, !tbaa !14
  %74 = icmp eq i32 %73, 0
  br i1 %70, label %78, label %75

75:                                               ; preds = %44
  %76 = srem i32 %52, %69
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %114

78:                                               ; preds = %75, %44
  br i1 %72, label %82, label %79

79:                                               ; preds = %78
  %80 = srem i32 %60, %71
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %82, label %114

82:                                               ; preds = %79, %78
  br i1 %74, label %.lr.ph, label %83

83:                                               ; preds = %82
  %84 = srem i32 %68, %73
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %.lr.ph, label %114

.lr.ph:                                           ; preds = %83, %82
  %.not = icmp eq i32 %52, 0
  %86 = icmp ne i32 %69, 0
  %spec.select = or i1 %.not, %86
  br i1 %70, label %.loopexit, label %.lr.ph.split.preheader

.loopexit:                                        ; preds = %.lr.ph.split.1109, %99, %.lr.ph
  %.2.lcssa = phi i1 [ %spec.select, %.lr.ph ], [ %.3, %.lr.ph.split.1109 ], [ %spec.select70.1112, %99 ]
  %.not.1 = icmp eq i32 %60, 0
  br i1 %.not.1, label %.lr.ph.1, label %87

87:                                               ; preds = %.loopexit
  %88 = icmp ne i32 %71, 0
  %spec.select.1 = select i1 %88, i1 %.2.lcssa, i1 false
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.loopexit, %87
  %.1.1 = phi i1 [ %.2.lcssa, %.loopexit ], [ %spec.select.1, %87 ]
  %brmerge = select i1 %72, i1 true, i1 %74
  br i1 %brmerge, label %.loopexit.1, label %89

89:                                               ; preds = %.lr.ph.1
  %90 = sdiv i32 %60, %71
  %91 = sdiv i32 %68, %73
  %.not69.1 = icmp eq i32 %90, %91
  %92 = icmp ne i32 %90, 0
  %or.cond.not.1 = and i1 %92, %.not69.1
  %spec.select70.1 = select i1 %or.cond.not.1, i1 %.1.1, i1 false
  br label %.loopexit.1

.loopexit.1:                                      ; preds = %.lr.ph.1, %89
  %.2.lcssa.1 = phi i1 [ %spec.select70.1, %89 ], [ %.1.1, %.lr.ph.1 ]
  %.not.2 = icmp eq i32 %68, 0
  br i1 %.not.2, label %.loopexit.2, label %93

93:                                               ; preds = %.loopexit.1
  %94 = icmp ne i32 %73, 0
  %spec.select.2 = select i1 %94, i1 %.2.lcssa.1, i1 false
  br i1 %spec.select.2, label %103, label %114

.loopexit.2:                                      ; preds = %.loopexit.1
  br i1 %.2.lcssa.1, label %103, label %114

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  br i1 %72, label %.lr.ph.split.1109, label %95

95:                                               ; preds = %.lr.ph.split.preheader
  %96 = sdiv i32 %52, %69
  %97 = sdiv i32 %60, %71
  %.not69 = icmp eq i32 %96, %97
  %98 = icmp ne i32 %96, 0
  %or.cond.not = and i1 %98, %.not69
  %spec.select70 = and i1 %or.cond.not, %86
  br label %.lr.ph.split.1109

.lr.ph.split.1109:                                ; preds = %95, %.lr.ph.split.preheader
  %.3 = phi i1 [ %spec.select, %.lr.ph.split.preheader ], [ %spec.select70, %95 ]
  br i1 %74, label %.loopexit, label %99

99:                                               ; preds = %.lr.ph.split.1109
  %100 = sdiv i32 %52, %69
  %101 = sdiv i32 %68, %73
  %.not69.1110 = icmp eq i32 %100, %101
  %102 = icmp ne i32 %100, 0
  %or.cond.not.1111 = and i1 %102, %.not69.1110
  %spec.select70.1112 = select i1 %or.cond.not.1111, i1 %.3, i1 false
  br label %.loopexit

103:                                              ; preds = %93, %.loopexit.2
  %104 = add nuw nsw i32 %39, %.05686
  %105 = icmp slt i32 %104, %.26181
  br i1 %105, label %106, label %114

106:                                              ; preds = %103
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %107)
  %109 = load i32, ptr %108, align 4, !tbaa !14
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 4 dereferenceable(4) %110)
  %112 = load i32, ptr %111, align 4, !tbaa !14
  %113 = sdiv i32 %109, %112
  br label %114

114:                                              ; preds = %93, %.loopexit.2, %103, %106, %83, %79, %75
  %.4 = phi i32 [ %.26181, %83 ], [ %.26181, %79 ], [ %.26181, %75 ], [ %104, %106 ], [ %.26181, %103 ], [ %.26181, %.loopexit.2 ], [ %.26181, %93 ]
  %.sroa.8.4 = phi i32 [ %.sroa.8.282, %83 ], [ %.sroa.8.282, %79 ], [ %.sroa.8.282, %75 ], [ %113, %106 ], [ %.sroa.8.282, %103 ], [ %.sroa.8.282, %.loopexit.2 ], [ %.sroa.8.282, %93 ]
  %.sroa.6.4 = phi i32 [ %.sroa.6.283, %83 ], [ %.sroa.6.283, %79 ], [ %.sroa.6.283, %75 ], [ %.05686, %106 ], [ %.sroa.6.283, %103 ], [ %.sroa.6.283, %.loopexit.2 ], [ %.sroa.6.283, %93 ]
  %.sroa.4.4 = phi i32 [ %.sroa.4.284, %83 ], [ %.sroa.4.284, %79 ], [ %.sroa.4.284, %75 ], [ %.05792, %106 ], [ %.sroa.4.284, %103 ], [ %.sroa.4.284, %.loopexit.2 ], [ %.sroa.4.284, %93 ]
  %.sroa.0.4 = phi i32 [ %.sroa.0.285, %83 ], [ %.sroa.0.285, %79 ], [ %.sroa.0.285, %75 ], [ %.05898, %106 ], [ %.sroa.0.285, %103 ], [ %.sroa.0.285, %.loopexit.2 ], [ %.sroa.0.285, %93 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  %115 = add nuw nsw i32 %.05686, 1
  %exitcond.not = icmp eq i32 %115, 100
  br i1 %exitcond.not, label %42, label %44, !llvm.loop !16

116:                                              ; preds = %37
  %117 = 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.4)
  br label %126

118:                                              ; preds = %37
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.sroa.0.4)
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull @.str.5)
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %120, i32 noundef %.sroa.4.4)
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef nonnull @.str.5)
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %122, i32 noundef %.sroa.6.4)
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull @.str.5)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %124, i32 noundef %.sroa.8.4)
  br label %126

126:                                              ; preds = %118, %116
  %.sink = phi ptr [ %125, %118 ], [ %117, %116 ]
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %1) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %0) #7
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) 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) #3

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.end.p0(i64 immarg, ptr nocapture) #3

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

; 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 #5

; 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)) #5

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

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 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #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 }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !10, i64 0}
!16 = distinct !{!16, !12}


; Effective O3 passes: AggressiveInstCombinePass,BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass