; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/DP Level 1/Philosophers Stone (philo)

; 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 [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %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
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %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) %2)
  br label %25

25:                                               ; preds = %273, %0
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %2, align 4, !tbaa !5
  %28 = icmp ne i32 %26, 0
  br i1 %28, label %29, label %278

29:                                               ; preds = %25
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3, ptr noundef %4)
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = zext i32 %31 to i64
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = zext i32 %33 to i64
  %35 = call ptr @llvm.stacksave.p0()
  store ptr %35, ptr %6, align 8
  %36 = mul nuw i64 %32, %34
  %37 = alloca i32, i64 %36, align 16
  store i64 %32, ptr %7, align 8
  store i64 %34, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %50, %29
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %53

43:                                               ; preds = %38
  %44 = mul nsw i64 0, %34
  %45 = getelementptr inbounds i32, ptr %37, i64 %44
  %46 = load i32, ptr %10, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %45, i64 %47
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %48)
  br label %50

50:                                               ; preds = %43
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %10, align 4, !tbaa !5
  br label %38, !llvm.loop !9

53:                                               ; preds = %42
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 1
  br i1 %55, label %56, label %240

56:                                               ; preds = %53
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = icmp sge i32 %57, 2
  br i1 %58, label %59, label %220

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %184, %59
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

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

65:                                               ; preds = %60
  %66 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = sext i32 %68 to i64
  %70 = mul nsw i64 %69, %34
  %71 = getelementptr inbounds i32, ptr %37, i64 %70
  %72 = getelementptr inbounds i32, ptr %71, i64 0
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = add nsw i32 %73, %74
  store i32 %75, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = mul nsw i64 %78, %34
  %80 = getelementptr inbounds i32, ptr %37, i64 %79
  %81 = getelementptr inbounds i32, ptr %80, i64 1
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = add nsw i32 %82, %83
  store i32 %84, ptr %14, align 4, !tbaa !5
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = mul nsw i64 %88, %34
  %90 = getelementptr inbounds i32, ptr %37, i64 %89
  %91 = getelementptr inbounds i32, ptr %90, i64 0
  store i32 %86, ptr %91, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %145, %65
  %93 = load i32, ptr %15, align 4, !tbaa !5
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  %96 = icmp slt i32 %93, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %148

98:                                               ; preds = %92
  %99 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = sub nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = mul nsw i64 %102, %34
  %104 = getelementptr inbounds i32, ptr %37, i64 %103
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = sub nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i32, ptr %104, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = add nsw i32 %109, %110
  store i32 %111, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = sub nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = mul nsw i64 %114, %34
  %116 = getelementptr inbounds i32, ptr %37, i64 %115
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %116, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = load i32, ptr %5, align 4, !tbaa !5
  %122 = add nsw i32 %120, %121
  store i32 %122, ptr %17, align 4, !tbaa !5
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %124 = load i32, ptr %11, align 4, !tbaa !5
  %125 = sub nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = mul nsw i64 %126, %34
  %128 = getelementptr inbounds i32, ptr %37, i64 %127
  %129 = load i32, ptr %15, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %128, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = load i32, ptr %5, align 4, !tbaa !5
  %135 = add nsw i32 %133, %134
  store i32 %135, ptr %18, align 4, !tbaa !5
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %123, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = load i32, ptr %11, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = mul nsw i64 %139, %34
  %141 = getelementptr inbounds i32, ptr %37, i64 %140
  %142 = load i32, ptr %15, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds i32, ptr %141, i64 %143
  store i32 %137, ptr %144, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %145

145:                                              ; preds = %98
  %146 = load i32, ptr %15, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %15, align 4, !tbaa !5
  br label %92, !llvm.loop !11

148:                                              ; preds = %97
  %149 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = sub nsw i32 %150, 1
  %152 = sext i32 %151 to i64
  %153 = mul nsw i64 %152, %34
  %154 = getelementptr inbounds i32, ptr %37, i64 %153
  %155 = load i32, ptr %4, align 4, !tbaa !5
  %156 = sub nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i32, ptr %154, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = load i32, ptr %5, align 4, !tbaa !5
  %161 = add nsw i32 %159, %160
  store i32 %161, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %162 = load i32, ptr %11, align 4, !tbaa !5
  %163 = sub nsw i32 %162, 1
  %164 = sext i32 %163 to i64
  %165 = mul nsw i64 %164, %34
  %166 = getelementptr inbounds i32, ptr %37, i64 %165
  %167 = load i32, ptr %4, align 4, !tbaa !5
  %168 = sub nsw i32 %167, 2
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i32, ptr %166, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = add nsw i32 %171, %172
  store i32 %173, ptr %20, align 4, !tbaa !5
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = load i32, ptr %11, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = mul nsw i64 %177, %34
  %179 = getelementptr inbounds i32, ptr %37, i64 %178
  %180 = load i32, ptr %4, align 4, !tbaa !5
  %181 = sub nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds i32, ptr %179, i64 %182
  store i32 %175, ptr %183, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %184

184:                                              ; preds = %148
  %185 = load i32, ptr %11, align 4, !tbaa !5
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %11, align 4, !tbaa !5
  br label %60, !llvm.loop !12

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

188:                                              ; preds = %216, %187
  %189 = load i32, ptr %21, align 4, !tbaa !5
  %190 = load i32, ptr %4, align 4, !tbaa !5
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %219

193:                                              ; preds = %188
  %194 = load i32, ptr %3, align 4, !tbaa !5
  %195 = sub nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = mul nsw i64 %196, %34
  %198 = getelementptr inbounds i32, ptr %37, i64 %197
  %199 = load i32, ptr %21, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds i32, ptr %198, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = load i32, ptr %9, align 4, !tbaa !5
  %204 = icmp sgt i32 %202, %203
  br i1 %204, label %205, label %215

205:                                              ; preds = %193
  %206 = load i32, ptr %3, align 4, !tbaa !5
  %207 = sub nsw i32 %206, 1
  %208 = sext i32 %207 to i64
  %209 = mul nsw i64 %208, %34
  %210 = getelementptr inbounds i32, ptr %37, i64 %209
  %211 = load i32, ptr %21, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds i32, ptr %210, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  store i32 %214, ptr %9, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %205, %193
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %21, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %21, align 4, !tbaa !5
  br label %188, !llvm.loop !13

219:                                              ; preds = %192
  br label %239

220:                                              ; preds = %56
  %221 = mul nsw i64 0, %34
  %222 = getelementptr inbounds i32, ptr %37, i64 %221
  %223 = getelementptr inbounds i32, ptr %222, i64 0
  %224 = load i32, ptr %223, align 4, !tbaa !5
  store i32 %224, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %225

225:                                              ; preds = %235, %220
  %226 = load i32, ptr %22, align 4, !tbaa !5
  %227 = load i32, ptr %3, align 4, !tbaa !5
  %228 = icmp slt i32 %226, %227
  br i1 %228, label %230, label %229

229:                                              ; preds = %225
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %238

230:                                              ; preds = %225
  %231 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %5)
  %232 = load i32, ptr %5, align 4, !tbaa !5
  %233 = load i32, ptr %9, align 4, !tbaa !5
  %234 = add nsw i32 %233, %232
  store i32 %234, ptr %9, align 4, !tbaa !5
  br label %235

235:                                              ; preds = %230
  %236 = load i32, ptr %22, align 4, !tbaa !5
  %237 = add nsw i32 %236, 1
  store i32 %237, ptr %22, align 4, !tbaa !5
  br label %225, !llvm.loop !14

238:                                              ; preds = %229
  br label %239

239:                                              ; preds = %238, %219
  br label %273

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

241:                                              ; preds = %269, %240
  %242 = load i32, ptr %23, align 4, !tbaa !5
  %243 = load i32, ptr %4, align 4, !tbaa !5
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 19, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %272

246:                                              ; preds = %241
  %247 = load i32, ptr %3, align 4, !tbaa !5
  %248 = sub nsw i32 %247, 1
  %249 = sext i32 %248 to i64
  %250 = mul nsw i64 %249, %34
  %251 = getelementptr inbounds i32, ptr %37, i64 %250
  %252 = load i32, ptr %23, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds i32, ptr %251, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %256 = load i32, ptr %9, align 4, !tbaa !5
  %257 = icmp sgt i32 %255, %256
  br i1 %257, label %258, label %268

258:                                              ; preds = %246
  %259 = load i32, ptr %3, align 4, !tbaa !5
  %260 = sub nsw i32 %259, 1
  %261 = sext i32 %260 to i64
  %262 = mul nsw i64 %261, %34
  %263 = getelementptr inbounds i32, ptr %37, i64 %262
  %264 = load i32, ptr %23, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds i32, ptr %263, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !5
  store i32 %267, ptr %9, align 4, !tbaa !5
  br label %268

268:                                              ; preds = %258, %246
  br label %269

269:                                              ; preds = %268
  %270 = load i32, ptr %23, align 4, !tbaa !5
  %271 = add nsw i32 %270, 1
  store i32 %271, ptr %23, align 4, !tbaa !5
  br label %241, !llvm.loop !15

272:                                              ; preds = %245
  br label %273

273:                                              ; preds = %272, %239
  %274 = load i32, ptr %9, align 4, !tbaa !5
  %275 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %274)
  %276 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %275, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %277 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %277)
  br label %25, !llvm.loop !16

278:                                              ; preds = %25
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %279 = load i32, ptr %1, align 4
  ret i32 %279
}

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

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; 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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 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)) #6

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 }
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 = { 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 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; 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 [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %12 = 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)
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %1, align 4, !tbaa !5
  %.not72 = icmp eq i32 %13, 0
  br i1 %.not72, label %._crit_edge75, label %.lr.ph74

.lr.ph74:                                         ; preds = %0, %.loopexit
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = zext i32 %16 to i64
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = zext i32 %18 to i64
  %20 = call ptr @llvm.stacksave.p0()
  %21 = mul nuw i64 %19, %17
  %22 = alloca i32, i64 %21, align 16
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph74
  %.lcssa = phi i32 [ %23, %.lr.ph74 ], [ %40, %.lr.ph ]
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = icmp sgt i32 %25, 1
  br i1 %26, label %43, label %.preheader48

.preheader48:                                     ; preds = %._crit_edge
  %27 = icmp sgt i32 %.lcssa, 0
  br i1 %27, label %.lr.ph54, label %.loopexit

.lr.ph54:                                         ; preds = %.preheader48
  %28 = add nsw i32 %25, -1
  %29 = sext i32 %28 to i64
  %30 = mul nsw i64 %29, %19
  %31 = getelementptr inbounds i32, ptr %22, i64 %30
  %wide.trip.count = zext nneg i32 %.lcssa to i64
  %min.iters.check112 = icmp ult i32 %.lcssa, 8
  br i1 %min.iters.check112, label %scalar.ph111.preheader, label %vector.ph113

scalar.ph111.preheader:                           ; preds = %middle.block110, %.lr.ph54
  %indvars.iv82.ph = phi i64 [ 0, %.lr.ph54 ], [ %n.vec115, %middle.block110 ]
  %.352.ph = phi i32 [ 0, %.lr.ph54 ], [ %37, %middle.block110 ]
  br label %scalar.ph111

vector.ph113:                                     ; preds = %.lr.ph54
  %n.vec115 = and i64 %wide.trip.count, 2147483640
  br label %vector.body117

vector.body117:                                   ; preds = %vector.body117, %vector.ph113
  %index118 = phi i64 [ 0, %vector.ph113 ], [ %index.next123, %vector.body117 ]
  %vec.phi119 = phi <4 x i32> [ zeroinitializer, %vector.ph113 ], [ %34, %vector.body117 ]
  %vec.phi120 = phi <4 x i32> [ zeroinitializer, %vector.ph113 ], [ %35, %vector.body117 ]
  %32 = getelementptr inbounds i32, ptr %31, i64 %index118
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %wide.load121 = load <4 x i32>, ptr %32, align 4, !tbaa !5
  %wide.load122 = load <4 x i32>, ptr %33, align 4, !tbaa !5
  %34 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load121, <4 x i32> %vec.phi119)
  %35 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load122, <4 x i32> %vec.phi120)
  %index.next123 = add nuw i64 %index118, 8
  %36 = icmp eq i64 %index.next123, %n.vec115
  br i1 %36, label %middle.block110, label %vector.body117, !llvm.loop !9

middle.block110:                                  ; preds = %vector.body117
  %rdx.minmax124 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %34, <4 x i32> %35)
  %37 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax124)
  %cmp.n125 = icmp eq i64 %n.vec115, %wide.trip.count
  br i1 %cmp.n125, label %.loopexit, label %scalar.ph111.preheader

.lr.ph:                                           ; preds = %.lr.ph74, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph74 ]
  %38 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %38)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !13

43:                                               ; preds = %._crit_edge
  %44 = icmp sgt i32 %.lcssa, 1
  br i1 %44, label %.lr.ph66, label %.lr.ph59.preheader

.preheader:                                       ; preds = %._crit_edge64
  %45 = icmp sgt i32 %85, 0
  br i1 %45, label %.lr.ph70, label %.loopexit

.lr.ph70:                                         ; preds = %.preheader
  %46 = add nsw i32 %89, -1
  %47 = sext i32 %46 to i64
  %48 = mul nsw i64 %47, %19
  %49 = getelementptr inbounds i32, ptr %22, i64 %48
  %wide.trip.count94 = zext nneg i32 %85 to i64
  %min.iters.check = icmp ult i32 %85, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph70
  %indvars.iv91.ph = phi i64 [ 0, %.lr.ph70 ], [ %n.vec, %middle.block ]
  %.04168.ph = phi i32 [ 0, %.lr.ph70 ], [ %55, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph70
  %n.vec = and i64 %wide.trip.count94, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %52, %vector.body ]
  %vec.phi108 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %53, %vector.body ]
  %50 = getelementptr inbounds i32, ptr %49, i64 %index
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %wide.load = load <4 x i32>, ptr %50, align 4, !tbaa !5
  %wide.load109 = load <4 x i32>, ptr %51, align 4, !tbaa !5
  %52 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load, <4 x i32> %vec.phi)
  %53 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load109, <4 x i32> %vec.phi108)
  %index.next = add nuw i64 %index, 8
  %54 = icmp eq i64 %index.next, %n.vec
  br i1 %54, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %rdx.minmax = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %52, <4 x i32> %53)
  %55 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count94
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

.lr.ph66:                                         ; preds = %43, %._crit_edge64
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %._crit_edge64 ], [ 1, %43 ]
  %56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %57 = add nsw i64 %indvars.iv88, -1
  %58 = mul nuw nsw i64 %57, %19
  %59 = getelementptr inbounds i32, ptr %22, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = add nsw i32 %61, %60
  store i32 %62, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  %63 = getelementptr inbounds i8, ptr %59, i64 4
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = add nsw i32 %64, %61
  store i32 %65, ptr %6, align 4, !tbaa !5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = mul nuw nsw i64 %indvars.iv88, %19
  %69 = getelementptr inbounds i32, ptr %22, i64 %68
  store i32 %67, ptr %69, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = icmp sgt i32 %70, 2
  br i1 %71, label %.lr.ph63, label %._crit_edge64

._crit_edge64:                                    ; preds = %.lr.ph63, %.lr.ph66
  %72 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr i32, ptr %59, i64 %74
  %76 = getelementptr i8, ptr %75, i64 -4
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr %4, align 4, !tbaa !5
  %79 = add nsw i32 %78, %77
  store i32 %79, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #9
  %80 = getelementptr i8, ptr %75, i64 -8
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = add nsw i32 %81, %78
  store i32 %82, ptr %11, align 4, !tbaa !5
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr i32, ptr %69, i64 %86
  %88 = getelementptr i8, ptr %87, i64 -4
  store i32 %84, ptr %88, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = icmp slt i64 %indvars.iv.next89, %90
  br i1 %91, label %.lr.ph66, label %.preheader, !llvm.loop !15

.lr.ph63:                                         ; preds = %.lr.ph66, %.lr.ph63
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %.lr.ph63 ], [ 1, %.lr.ph66 ]
  %92 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %93 = getelementptr i32, ptr %59, i64 %indvars.iv85
  %94 = getelementptr i8, ptr %93, i64 -4
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load i32, ptr %4, align 4, !tbaa !5
  %97 = add nsw i32 %96, %95
  store i32 %97, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  %98 = load i32, ptr %93, align 4, !tbaa !5
  %99 = add nsw i32 %98, %96
  store i32 %99, ptr %8, align 4, !tbaa !5
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %101 = getelementptr inbounds i32, ptr %59, i64 %indvars.iv.next86
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = add nsw i32 %103, %102
  store i32 %104, ptr %9, align 4, !tbaa !5
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %100, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = getelementptr inbounds i32, ptr %69, i64 %indvars.iv85
  store i32 %106, ptr %107, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = add nsw i32 %108, -1
  %110 = sext i32 %109 to i64
  %111 = icmp slt i64 %indvars.iv.next86, %110
  br i1 %111, label %.lr.ph63, label %._crit_edge64, !llvm.loop !16

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %scalar.ph ], [ %indvars.iv91.ph, %scalar.ph.preheader ]
  %.04168 = phi i32 [ %spec.select, %scalar.ph ], [ %.04168.ph, %scalar.ph.preheader ]
  %112 = getelementptr inbounds i32, ptr %49, i64 %indvars.iv91
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %spec.select = call i32 @llvm.smax.i32(i32 %113, i32 %.04168)
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %exitcond95.not = icmp eq i64 %indvars.iv.next92, %wide.trip.count94
  br i1 %exitcond95.not, label %.loopexit, label %scalar.ph, !llvm.loop !17

.lr.ph59.preheader:                               ; preds = %43
  %114 = load i32, ptr %22, align 16, !tbaa !5
  br label %.lr.ph59

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %.lr.ph59
  %.03657 = phi i32 [ %118, %.lr.ph59 ], [ 1, %.lr.ph59.preheader ]
  %.256 = phi i32 [ %117, %.lr.ph59 ], [ %114, %.lr.ph59.preheader ]
  %115 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %4)
  %116 = load i32, ptr %4, align 4, !tbaa !5
  %117 = add nsw i32 %116, %.256
  %118 = add nuw nsw i32 %.03657, 1
  %119 = load i32, ptr %2, align 4, !tbaa !5
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %.lr.ph59, label %.loopexit, !llvm.loop !18

scalar.ph111:                                     ; preds = %scalar.ph111.preheader, %scalar.ph111
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %scalar.ph111 ], [ %indvars.iv82.ph, %scalar.ph111.preheader ]
  %.352 = phi i32 [ %spec.select45, %scalar.ph111 ], [ %.352.ph, %scalar.ph111.preheader ]
  %121 = getelementptr inbounds i32, ptr %31, i64 %indvars.iv82
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %spec.select45 = call i32 @llvm.smax.i32(i32 %122, i32 %.352)
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next83, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %scalar.ph111, !llvm.loop !19

.loopexit:                                        ; preds = %scalar.ph111, %.lr.ph59, %scalar.ph, %middle.block110, %middle.block, %.preheader48, %.preheader
  %.5 = phi i32 [ 0, %.preheader ], [ 0, %.preheader48 ], [ %55, %middle.block ], [ %37, %middle.block110 ], [ %spec.select, %scalar.ph ], [ %117, %.lr.ph59 ], [ %spec.select45, %scalar.ph111 ]
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.5)
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.stackrestore.p0(ptr %20)
  %125 = load i32, ptr %1, align 4, !tbaa !5
  %126 = add nsw i32 %125, -1
  store i32 %126, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %125, 0
  br i1 %.not, label %._crit_edge75, label %.lr.ph74, !llvm.loop !20

._crit_edge75:                                    ; preds = %.loopexit, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret i32 0
}

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

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 #2

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #8

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nofree 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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 #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 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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}
!14 = distinct !{!14, !10, !11, !12}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !12, !11}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !12, !11}
!20 = distinct !{!20, !10}


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