; LLVM IR from ravireddy07/cpp-book :: src/Code-Chef/Feb2021-Long/MULGAME.ll (Z5harryv)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair.0" = type { %"struct.std::pair", i32 }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5harryv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca [1000001 x i32], align 16
  %8 = alloca %"class.std::map", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca %"struct.std::pair.0", 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
  %24 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1, ptr noundef %2, ptr noundef %3)
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = call ptr @llvm.stacksave.p0()
  store ptr %28, ptr %4, align 8
  %29 = alloca i32, i64 %27, align 16
  store i64 %27, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %40, %0
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %43

35:                                               ; preds = %30
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %29, i64 %37
  %39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %38)
  br label %40

40:                                               ; preds = %35
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %6, align 4, !tbaa !5
  br label %30, !llvm.loop !9

43:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4000004, ptr %7) #7
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 4000004, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #7
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  br label %44

44:                                               ; preds = %137, %135, %43
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = add nsw i32 %45, -1
  store i32 %46, ptr %2, align 4, !tbaa !5
  %47 = icmp ne i32 %45, 0
  br i1 %47, label %48, label %139

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %49 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %9, ptr noundef %10)
          to label %50 unwind label %62

50:                                               ; preds = %48
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = add nsw i32 %51, -1
  store i32 %52, ptr %9, align 4, !tbaa !5
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = add nsw i32 %53, -1
  store i32 %54, ptr %10, align 4, !tbaa !5
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i32, ptr %29, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = icmp sgt i32 %58, %59
  br i1 %60, label %61, label %66

61:                                               ; preds = %50
  store i32 5, ptr %13, align 4
  br label %135, !llvm.loop !11

62:                                               ; preds = %48
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %11, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %12, align 4
  br label %138

66:                                               ; preds = %50
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %29, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %73, label %95

73:                                               ; preds = %66
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %29, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = icmp sgt i32 %77, %78
  br i1 %79, label %80, label %95

80:                                               ; preds = %73
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %29, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %86, align 4, !tbaa !5
  %89 = load i32, ptr %3, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = add nsw i32 %93, -1
  store i32 %94, ptr %92, align 4, !tbaa !5
  br label %133

95:                                               ; preds = %73, %66
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds i32, ptr %29, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = icmp sle i32 %99, %100
  br i1 %101, label %102, label %132

102:                                              ; preds = %95
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %29, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %108, align 4, !tbaa !5
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = add nsw i32 %115, -1
  store i32 %116, ptr %114, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %117 = load i32, ptr %9, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %29, i64 %118
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %29, i64 %121
  invoke void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %119, ptr noundef nonnull align 4 dereferenceable(4) %122)
          to label %123 unwind label %128

123:                                              ; preds = %102
  %124 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %125 unwind label %128

125:                                              ; preds = %123
  %126 = load i32, ptr %124, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %124, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %132

128:                                              ; preds = %123, %102
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %11, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %138

132:                                              ; preds = %125, %95
  br label %133

133:                                              ; preds = %132, %80
  br label %134

134:                                              ; preds = %133
  store i32 0, ptr %13, align 4
  br label %135

135:                                              ; preds = %134, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %136 = load i32, ptr %13, align 4
  switch i32 %136, label %256 [
    i32 0, label %137
    i32 5, label %44
  ]

137:                                              ; preds = %135
  br label %44, !llvm.loop !11

138:                                              ; preds = %128, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %250

139:                                              ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr %8, ptr %15, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %140 = load ptr, ptr %15, align 8, !tbaa !12
  %141 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %140) #7
  %142 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %16, i32 0, i32 0
  store ptr %141, ptr %142, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %143 = load ptr, ptr %15, align 8, !tbaa !12
  %144 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %143) #7
  %145 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %17, i32 0, i32 0
  store ptr %144, ptr %145, align 8
  br label %146

146:                                              ; preds = %208, %139
  %147 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br i1 %147, label %149, label %148

148:                                              ; preds = %146
  store i32 7, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %210

149:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #7
  %150 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %150, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %151 = getelementptr inbounds %"struct.std::pair.0", ptr %18, i32 0, i32 0
  %152 = getelementptr inbounds %"struct.std::pair", ptr %151, i32 0, i32 0
  %153 = load i32, ptr %152, align 4, !tbaa !14
  store i32 %153, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %154 = getelementptr inbounds %"struct.std::pair.0", ptr %18, i32 0, i32 0
  %155 = getelementptr inbounds %"struct.std::pair", ptr %154, i32 0, i32 1
  %156 = load i32, ptr %155, align 4, !tbaa !17
  store i32 %156, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %157 = getelementptr inbounds %"struct.std::pair.0", ptr %18, i32 0, i32 1
  %158 = load i32, ptr %157, align 4, !tbaa !18
  store i32 %158, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %159 = load i32, ptr %20, align 4, !tbaa !5
  %160 = load i32, ptr %19, align 4, !tbaa !5
  %161 = mul nsw i32 2, %160
  %162 = add nsw i32 %159, %161
  store i32 %162, ptr %22, align 4, !tbaa !5
  %163 = load i32, ptr %21, align 4, !tbaa !5
  %164 = load i32, ptr %20, align 4, !tbaa !5
  %165 = load i32, ptr %19, align 4, !tbaa !5
  %166 = add nsw i32 %164, %165
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = sub nsw i32 %169, %163
  store i32 %170, ptr %168, align 4, !tbaa !5
  %171 = load i32, ptr %21, align 4, !tbaa !5
  %172 = load i32, ptr %20, align 4, !tbaa !5
  %173 = load i32, ptr %19, align 4, !tbaa !5
  %174 = mul nsw i32 2, %173
  %175 = add nsw i32 %172, %174
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = add nsw i32 %178, %171
  store i32 %179, ptr %177, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %186, %149
  %181 = load i32, ptr %22, align 4, !tbaa !5
  %182 = load i32, ptr %20, align 4, !tbaa !5
  %183 = add nsw i32 %181, %182
  %184 = load i32, ptr %3, align 4, !tbaa !5
  %185 = icmp sle i32 %183, %184
  br i1 %185, label %186, label %207

186:                                              ; preds = %180
  %187 = load i32, ptr %20, align 4, !tbaa !5
  %188 = load i32, ptr %22, align 4, !tbaa !5
  %189 = add nsw i32 %188, %187
  store i32 %189, ptr %22, align 4, !tbaa !5
  %190 = load i32, ptr %21, align 4, !tbaa !5
  %191 = load i32, ptr %22, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = sub nsw i32 %194, %190
  store i32 %195, ptr %193, align 4, !tbaa !5
  %196 = load i32, ptr %21, align 4, !tbaa !5
  %197 = load i32, ptr %22, align 4, !tbaa !5
  %198 = load i32, ptr %19, align 4, !tbaa !5
  %199 = add nsw i32 %197, %198
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = add nsw i32 %202, %196
  store i32 %203, ptr %201, align 4, !tbaa !5
  %204 = load i32, ptr %19, align 4, !tbaa !5
  %205 = load i32, ptr %22, align 4, !tbaa !5
  %206 = add nsw i32 %205, %204
  store i32 %206, ptr %22, align 4, !tbaa !5
  br label %180, !llvm.loop !19

207:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #7
  br label %208

208:                                              ; preds = %207
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %146

210:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 1, ptr %24, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %233, %210
  %212 = load i32, ptr %24, align 4, !tbaa !5
  %213 = load i32, ptr %3, align 4, !tbaa !5
  %214 = icmp sle i32 %212, %213
  br i1 %214, label %216, label %215

215:                                              ; preds = %211
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %240

216:                                              ; preds = %211
  %217 = load i32, ptr %24, align 4, !tbaa !5
  %218 = sub nsw i32 %217, 1
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !5
  %222 = load i32, ptr %24, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !5
  %226 = add nsw i32 %225, %221
  store i32 %226, ptr %224, align 4, !tbaa !5
  %227 = load i32, ptr %24, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [1000001 x i32], ptr %7, i64 0, i64 %228
  %230 = load i32, ptr %229, align 4, !tbaa !5
  %231 = invoke noundef i32 @_Z4amaxIiiET_RS0_T0_(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 noundef %230)
          to label %232 unwind label %236

232:                                              ; preds = %216
  store i32 %231, ptr %23, align 4, !tbaa !5
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %24, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %24, align 4, !tbaa !5
  br label %211, !llvm.loop !20

236:                                              ; preds = %216
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %11, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %249

240:                                              ; preds = %215
  %241 = load i32, ptr %23, align 4, !tbaa !5
  %242 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %241)
          to label %243 unwind label %245

243:                                              ; preds = %240
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4000004, ptr %7) #7
  %244 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %244)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret void

245:                                              ; preds = %240
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %11, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %12, align 4
  br label %249

249:                                              ; preds = %245, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %250

250:                                              ; preds = %249, %138
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4000004, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  br label %251

251:                                              ; preds = %250
  %252 = load ptr, ptr %11, align 8
  %253 = load i32, ptr %12, align 4
  %254 = insertvalue { ptr, i32 } poison, ptr %252, 0
  %255 = insertvalue { ptr, i32 } %254, i32 %253, 1
  resume { ptr, i32 } %255

256:                                              ; preds = %135
  unreachable
}

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

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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

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

attributes #0 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTSSt4pairIKS_IiiEiE", !16, i64 0, !6, i64 8}
!16 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!17 = !{!15, !6, i64 4}
!18 = !{!15, !6, i64 8}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5harryv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [1000001 x i32], align 16
  %5 = alloca %"class.std::map", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = zext i32 %13 to i64
  %15 = call ptr @llvm.stacksave.p0()
  %16 = alloca i32, i64 %14, align 16
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 4000004, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000004) %4, i8 0, i64 4000004, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #6
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr %2, align 4, !tbaa !5
  %.not40 = icmp eq i32 %19, 0
  br i1 %.not40, label %._crit_edge43, label %.lr.ph42

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %21 = getelementptr inbounds i32, ptr %16, i64 %indvars.iv
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %21)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = icmp slt i64 %indvars.iv.next, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph42:                                         ; preds = %._crit_edge, %57
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr %6, align 4, !tbaa !5
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = add nsw i32 %29, -1
  store i32 %30, ptr %7, align 4, !tbaa !5
  %31 = sext i32 %28 to i64
  %32 = getelementptr inbounds i32, ptr %16, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = icmp sgt i32 %33, %34
  br i1 %35, label %57, label %36, !llvm.loop !11

36:                                               ; preds = %.lr.ph42
  %37 = sext i32 %30 to i64
  %38 = getelementptr inbounds i32, ptr %16, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = icmp sgt i32 %39, %34
  %41 = sext i32 %33 to i64
  %42 = getelementptr inbounds [1000001 x i32], ptr %4, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %42, align 4, !tbaa !5
  %45 = add nsw i32 %34, 1
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1000001 x i32], ptr %4, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add nsw i32 %48, -1
  store i32 %49, ptr %47, align 4, !tbaa !5
  br i1 %40, label %57, label %50

50:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %51 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %52 unwind label %55

52:                                               ; preds = %50
  %53 = load i32, ptr %51, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %57

55:                                               ; preds = %50
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4000004, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %56

57:                                               ; preds = %36, %52, %.lr.ph42
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %58, 0
  br i1 %.not, label %._crit_edge43, label %.lr.ph42

._crit_edge43:                                    ; preds = %57, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %60 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  store ptr %60, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %61 = call ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  store ptr %61, ptr %10, align 8
  %62 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %62, label %.lr.ph49, label %._crit_edge50

._crit_edge50:                                    ; preds = %._crit_edge47, %._crit_edge43
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %.not3651 = icmp slt i32 %63, 1
  br i1 %.not3651, label %._crit_edge55, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %._crit_edge50
  %.pre = load i32, ptr %4, align 16, !tbaa !5
  br label %.lr.ph54

.lr.ph49:                                         ; preds = %._crit_edge43, %._crit_edge47
  %64 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %.sroa.0.0.copyload = load i32, ptr %64, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %64, i64 4
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %64, i64 8
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4
  %65 = shl nsw i32 %.sroa.0.0.copyload, 1
  %66 = add nsw i32 %.sroa.4.0.copyload, %65
  %67 = add nsw i32 %.sroa.4.0.copyload, %.sroa.0.0.copyload
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [1000001 x i32], ptr %4, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sub nsw i32 %70, %.sroa.5.0.copyload
  store i32 %71, ptr %69, align 4, !tbaa !5
  %72 = sext i32 %66 to i64
  %73 = getelementptr inbounds [1000001 x i32], ptr %4, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = add nsw i32 %74, %.sroa.5.0.copyload
  store i32 %75, ptr %73, align 4, !tbaa !5
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = add nsw i32 %66, %.sroa.4.0.copyload
  %.not3744 = icmp sgt i32 %77, %76
  br i1 %.not3744, label %._crit_edge47, label %.lr.ph46

.lr.ph46:                                         ; preds = %.lr.ph49, %.lr.ph46
  %78 = phi i32 [ %88, %.lr.ph46 ], [ %77, %.lr.ph49 ]
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1000001 x i32], ptr %4, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sub nsw i32 %81, %.sroa.5.0.copyload
  store i32 %82, ptr %80, align 4, !tbaa !5
  %83 = add nsw i32 %78, %.sroa.0.0.copyload
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1000001 x i32], ptr %4, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = add nsw i32 %86, %.sroa.5.0.copyload
  store i32 %87, ptr %85, align 4, !tbaa !5
  %88 = add nsw i32 %83, %.sroa.4.0.copyload
  %.not37 = icmp sgt i32 %88, %76
  br i1 %.not37, label %._crit_edge47, label %.lr.ph46, !llvm.loop !12

._crit_edge47:                                    ; preds = %.lr.ph46, %.lr.ph49
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %90 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %90, label %.lr.ph49, label %._crit_edge50

._crit_edge55:                                    ; preds = %.lr.ph54, %._crit_edge50
  %91 = phi i32 [ 0, %._crit_edge50 ], [ %97, %.lr.ph54 ]
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %91)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4000004, ptr nonnull %4) #6
  call void @llvm.stackrestore.p0(ptr %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph54:                                         ; preds = %.lr.ph54.preheader, %.lr.ph54
  %93 = phi i32 [ %.pre, %.lr.ph54.preheader ], [ %96, %.lr.ph54 ]
  %indvars.iv57 = phi i64 [ 1, %.lr.ph54.preheader ], [ %indvars.iv.next58, %.lr.ph54 ]
  %94 = getelementptr inbounds [1000001 x i32], ptr %4, i64 0, i64 %indvars.iv57
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = add nsw i32 %95, %93
  store i32 %96, ptr %94, align 4, !tbaa !5
  %97 = call noundef i32 @_Z4amaxIiiET_RS0_T0_(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef %96)
  store i32 %97, ptr %11, align 4, !tbaa !5
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %98 = load i32, ptr %3, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %.not36.not = icmp slt i64 %indvars.iv57, %99
  br i1 %.not36.not, label %.lr.ph54, label %._crit_edge55, !llvm.loop !13
}

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IRiS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEES6_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKS0_IiiEiEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

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

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


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass