; LLVM IR from TLE-MEC/Hack-CP-DSA :: Codechef/Shortest route (SHROUTE)

; 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" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<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 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %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 %"class.std::map", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #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) %2)
  br label %23

23:                                               ; preds = %231, %0
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %24, -1
  store i32 %25, ptr %2, align 4, !tbaa !5
  %26 = icmp ne i32 %24, 0
  br i1 %26, label %27, label %240

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 48, ptr %6) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %29 unwind label %44

29:                                               ; preds = %27
  %30 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %31 unwind label %44

31:                                               ; preds = %29
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = zext i32 %32 to i64
  %34 = call ptr @llvm.stacksave.p0()
  store ptr %34, ptr %9, align 8
  %35 = alloca i32, i64 %33, align 16
  store i64 %33, ptr %10, align 8
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = zext i32 %36 to i64
  %38 = alloca i32, i64 %37, align 16
  store i64 %37, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %70, %31
  %40 = load i32, ptr %12, align 4, !tbaa !5
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %48, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %73

44:                                               ; preds = %29, %27
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  br label %239

48:                                               ; preds = %39
  %49 = load i32, ptr %12, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %35, i64 %50
  %52 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %51)
          to label %53 unwind label %62

53:                                               ; preds = %48
  %54 = load i32, ptr %12, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr %35, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %66

59:                                               ; preds = %53
  %60 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %61 unwind label %62

61:                                               ; preds = %59
  store i32 0, ptr %60, align 4, !tbaa !5
  br label %69

62:                                               ; preds = %66, %59, %48
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %7, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %239

66:                                               ; preds = %53
  %67 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %68 unwind label %62

68:                                               ; preds = %66
  store i32 1000000000, ptr %67, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %68, %61
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %12, align 4, !tbaa !5
  br label %39, !llvm.loop !9

73:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 1, ptr %13, align 4, !tbaa !5
  %74 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %75 unwind label %81

75:                                               ; preds = %73
  store i32 0, ptr %74, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 -1, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %123, %75
  %77 = load i32, ptr %15, align 4, !tbaa !5
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = icmp sle i32 %77, %78
  br i1 %79, label %85, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %127

81:                                               ; preds = %73
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %239

85:                                               ; preds = %76
  %86 = load i32, ptr %15, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i32, ptr %35, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = icmp eq i32 %89, 1
  br i1 %90, label %91, label %93

91:                                               ; preds = %85
  %92 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %92, ptr %14, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %91, %85
  %94 = load i32, ptr %14, align 4, !tbaa !5
  %95 = icmp ne i32 %94, -1
  br i1 %95, label %96, label %122

96:                                               ; preds = %93
  %97 = load i32, ptr %15, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %35, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %102, label %121

102:                                              ; preds = %96
  %103 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %104 unwind label %113

104:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %105 = load i32, ptr %15, align 4, !tbaa !5
  %106 = load i32, ptr %14, align 4, !tbaa !5
  %107 = sub nsw i32 %105, %106
  store i32 %107, ptr %16, align 4, !tbaa !5
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %103, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %109 unwind label %117

109:                                              ; preds = %104
  %110 = load i32, ptr %108, align 4, !tbaa !5
  %111 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %112 unwind label %117

112:                                              ; preds = %109
  store i32 %110, ptr %111, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %121

113:                                              ; preds = %102
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  br label %126

117:                                              ; preds = %109, %104
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %7, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %126

121:                                              ; preds = %112, %96
  br label %122

122:                                              ; preds = %121, %93
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %15, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %15, align 4, !tbaa !5
  br label %76, !llvm.loop !11

126:                                              ; preds = %117, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %238

127:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 -1, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %128 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %128, ptr %18, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %171, %127
  %130 = load i32, ptr %18, align 4, !tbaa !5
  %131 = icmp sge i32 %130, 1
  br i1 %131, label %133, label %132

132:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %175

133:                                              ; preds = %129
  %134 = load i32, ptr %18, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr %35, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 2
  br i1 %138, label %139, label %141

139:                                              ; preds = %133
  %140 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %140, ptr %17, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %139, %133
  %142 = load i32, ptr %17, align 4, !tbaa !5
  %143 = icmp ne i32 %142, -1
  br i1 %143, label %144, label %170

144:                                              ; preds = %141
  %145 = load i32, ptr %18, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds i32, ptr %35, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = icmp eq i32 %148, 0
  br i1 %149, label %150, label %169

150:                                              ; preds = %144
  %151 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %152 unwind label %161

152:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %153 = load i32, ptr %17, align 4, !tbaa !5
  %154 = load i32, ptr %18, align 4, !tbaa !5
  %155 = sub nsw i32 %153, %154
  store i32 %155, ptr %19, align 4, !tbaa !5
  %156 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %151, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %157 unwind label %165

157:                                              ; preds = %152
  %158 = load i32, ptr %156, align 4, !tbaa !5
  %159 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %160 unwind label %165

160:                                              ; preds = %157
  store i32 %158, ptr %159, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %169

161:                                              ; preds = %150
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %7, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %8, align 4
  br label %174

165:                                              ; preds = %157, %152
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %7, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %174

169:                                              ; preds = %160, %144
  br label %170

170:                                              ; preds = %169, %141
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %18, align 4, !tbaa !5
  %173 = add nsw i32 %172, -1
  store i32 %173, ptr %18, align 4, !tbaa !5
  br label %129, !llvm.loop !12

174:                                              ; preds = %165, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %237

175:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %204, %175
  %177 = load i32, ptr %20, align 4, !tbaa !5
  %178 = load i32, ptr %4, align 4, !tbaa !5
  %179 = icmp slt i32 %177, %178
  br i1 %179, label %181, label %180

180:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %207

181:                                              ; preds = %176
  %182 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %183 unwind label %192

183:                                              ; preds = %181
  %184 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %185 unwind label %192

185:                                              ; preds = %183
  %186 = load i32, ptr %184, align 4, !tbaa !5
  %187 = icmp eq i32 %186, 1000000000
  br i1 %187, label %188, label %196

188:                                              ; preds = %185
  %189 = load i32, ptr %20, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds i32, ptr %38, i64 %190
  store i32 -1, ptr %191, align 4, !tbaa !5
  br label %203

192:                                              ; preds = %196, %183, %181
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %7, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %237

196:                                              ; preds = %185
  %197 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %198 unwind label %192

198:                                              ; preds = %196
  %199 = load i32, ptr %197, align 4, !tbaa !5
  %200 = load i32, ptr %20, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds i32, ptr %38, i64 %201
  store i32 %199, ptr %202, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %198, %188
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %20, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %20, align 4, !tbaa !5
  br label %176, !llvm.loop !13

207:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %208

208:                                              ; preds = %222, %207
  %209 = load i32, ptr %21, align 4, !tbaa !5
  %210 = load i32, ptr %4, align 4, !tbaa !5
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %229

213:                                              ; preds = %208
  %214 = load i32, ptr %21, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds i32, ptr %38, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %217)
          to label %219 unwind label %225

219:                                              ; preds = %213
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %218, ptr noundef @.str)
          to label %221 unwind label %225

221:                                              ; preds = %219
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %21, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %21, align 4, !tbaa !5
  br label %208, !llvm.loop !14

225:                                              ; preds = %219, %213
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %7, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %237

229:                                              ; preds = %212
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %231 unwind label %233

231:                                              ; preds = %229
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  %232 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %232)
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #8
  br label %23, !llvm.loop !15

233:                                              ; preds = %229
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %7, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %8, align 4
  br label %237

237:                                              ; preds = %233, %225, %192, %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %238

238:                                              ; preds = %237, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %239

239:                                              ; preds = %238, %81, %62, %44
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %241

240:                                              ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  ret i32 0

241:                                              ; preds = %239
  %242 = load ptr, ptr %7, align 8
  %243 = load i32, ptr %8, align 4
  %244 = insertvalue { ptr, i32 } poison, ptr %242, 0
  %245 = insertvalue { ptr, i32 } %244, i32 %243, 1
  resume { ptr, i32 } %245
}

; 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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
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 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 #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 = { 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}


; 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" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<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 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = 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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::map", align 8
  %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) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %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
  %.not63 = icmp eq i32 %13, 0
  br i1 %.not63, label %._crit_edge66, label %.lr.ph65

.lr.ph65:                                         ; preds = %0, %134
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  %15 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %16 unwind label %28

16:                                               ; preds = %.lr.ph65
  %17 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %18 unwind label %28

18:                                               ; preds = %16
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = zext i32 %19 to i64
  %21 = call ptr @llvm.stacksave.p0()
  %22 = alloca i32, i64 %20, align 16
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = alloca i32, i64 %24, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 1, ptr %6, align 4, !tbaa !5
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %.not2744 = icmp slt i32 %26, 1
  br i1 %.not2744, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %46, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 1, ptr %7, align 4, !tbaa !5
  %27 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %50 unwind label %53

28:                                               ; preds = %16, %.lr.ph65
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %139

.lr.ph:                                           ; preds = %18, %46
  %storemerge45 = phi i32 [ %48, %46 ], [ 1, %18 ]
  %30 = sext i32 %storemerge45 to i64
  %31 = getelementptr inbounds i32, ptr %22, i64 %30
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %33 unwind label %41

33:                                               ; preds = %.lr.ph
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %22, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %.not38 = icmp eq i32 %37, 0
  br i1 %.not38, label %43, label %38

38:                                               ; preds = %33
  %39 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %40 unwind label %41

40:                                               ; preds = %38
  store i32 0, ptr %39, align 4, !tbaa !5
  br label %46

41:                                               ; preds = %43, %38, %.lr.ph
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  br label %139

43:                                               ; preds = %33
  %44 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %45 unwind label %41

45:                                               ; preds = %43
  store i32 1000000000, ptr %44, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %40, %45
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %6, align 4, !tbaa !5
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %.not27.not = icmp slt i32 %47, %49
  br i1 %.not27.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

50:                                               ; preds = %._crit_edge
  store i32 0, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 1, ptr %8, align 4, !tbaa !5
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %.not2946 = icmp slt i32 %51, 1
  br i1 %.not2946, label %._crit_edge51.thread, label %.lr.ph50

._crit_edge51.thread:                             ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  br label %._crit_edge56

._crit_edge51:                                    ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 %75, ptr %10, align 4, !tbaa !5
  %52 = icmp sgt i32 %75, 0
  br i1 %52, label %.lr.ph55, label %._crit_edge56

53:                                               ; preds = %._crit_edge
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %139

.lr.ph50:                                         ; preds = %50, %74
  %55 = phi i32 [ %75, %74 ], [ %51, %50 ]
  %.01548 = phi i32 [ %spec.select, %74 ], [ -1, %50 ]
  %storemerge2847 = phi i32 [ %77, %74 ], [ 1, %50 ]
  %56 = sext i32 %storemerge2847 to i64
  %57 = getelementptr inbounds i32, ptr %22, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = icmp eq i32 %58, 1
  %spec.select = select i1 %59, i32 %storemerge2847, i32 %.01548
  %.not34 = icmp ne i32 %spec.select, -1
  %60 = icmp eq i32 %58, 0
  %or.cond = and i1 %60, %.not34
  br i1 %or.cond, label %61, label %74

61:                                               ; preds = %.lr.ph50
  %62 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %63 unwind label %70

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = sub nsw i32 %64, %.01548
  store i32 %65, ptr %9, align 4, !tbaa !5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %62, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %69 unwind label %72

69:                                               ; preds = %63
  store i32 %67, ptr %68, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %.pre = load i32, ptr %8, align 4, !tbaa !5
  %.pre72 = load i32, ptr %2, align 4, !tbaa !5
  br label %74

70:                                               ; preds = %61
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %78

72:                                               ; preds = %63
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %78

74:                                               ; preds = %.lr.ph50, %69
  %75 = phi i32 [ %55, %.lr.ph50 ], [ %.pre72, %69 ]
  %76 = phi i32 [ %storemerge2847, %.lr.ph50 ], [ %.pre, %69 ]
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %8, align 4, !tbaa !5
  %.not29.not = icmp slt i32 %76, %75
  br i1 %.not29.not, label %.lr.ph50, label %._crit_edge51, !llvm.loop !11

78:                                               ; preds = %72, %70
  %.pn35 = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %139

._crit_edge56:                                    ; preds = %99, %._crit_edge51.thread, %._crit_edge51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = icmp sgt i32 %79, 0
  br i1 %80, label %.lr.ph59, label %._crit_edge62

.lr.ph55:                                         ; preds = %._crit_edge51, %99
  %.01453 = phi i32 [ %spec.select41, %99 ], [ -1, %._crit_edge51 ]
  %storemerge3052 = phi i32 [ %101, %99 ], [ %75, %._crit_edge51 ]
  %81 = zext nneg i32 %storemerge3052 to i64
  %82 = getelementptr inbounds i32, ptr %22, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = icmp eq i32 %83, 2
  %spec.select41 = select i1 %84, i32 %storemerge3052, i32 %.01453
  %.not31 = icmp ne i32 %spec.select41, -1
  %85 = icmp eq i32 %83, 0
  %or.cond76 = and i1 %.not31, %85
  br i1 %or.cond76, label %86, label %99

86:                                               ; preds = %.lr.ph55
  %87 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %88 unwind label %95

88:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = sub nsw i32 %.01453, %89
  store i32 %90, ptr %11, align 4, !tbaa !5
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %87, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %94 unwind label %97

94:                                               ; preds = %88
  store i32 %92, ptr %93, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  %.pre73 = load i32, ptr %10, align 4, !tbaa !5
  br label %99

95:                                               ; preds = %86
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %103

97:                                               ; preds = %88
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %103

99:                                               ; preds = %.lr.ph55, %94
  %100 = phi i32 [ %storemerge3052, %.lr.ph55 ], [ %.pre73, %94 ]
  %101 = add nsw i32 %100, -1
  store i32 %101, ptr %10, align 4, !tbaa !5
  %102 = icmp sgt i32 %100, 1
  br i1 %102, label %.lr.ph55, label %._crit_edge56, !llvm.loop !12

103:                                              ; preds = %97, %95
  %.pn = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %139

.preheader:                                       ; preds = %117
  %104 = icmp sgt i32 %119, 0
  br i1 %104, label %.lr.ph61, label %._crit_edge62

.lr.ph59:                                         ; preds = %._crit_edge56, %117
  %indvars.iv = phi i64 [ %indvars.iv.next, %117 ], [ 0, %._crit_edge56 ]
  %105 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %106 unwind label %111

106:                                              ; preds = %.lr.ph59
  %107 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %108 unwind label %111

108:                                              ; preds = %106
  %109 = load i32, ptr %107, align 4, !tbaa !5
  %110 = icmp eq i32 %109, 1000000000
  br i1 %110, label %117, label %113

111:                                              ; preds = %113, %106, %.lr.ph59
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %139

113:                                              ; preds = %108
  %114 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %115 unwind label %111

115:                                              ; preds = %113
  %116 = load i32, ptr %114, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %108, %115
  %.sink = phi i32 [ %116, %115 ], [ -1, %108 ]
  %118 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv
  store i32 %.sink, ptr %118, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %119 = load i32, ptr %3, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = icmp slt i64 %indvars.iv.next, %120
  br i1 %121, label %.lr.ph59, label %.preheader, !llvm.loop !13

._crit_edge62:                                    ; preds = %128, %._crit_edge56, %.preheader
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %134 unwind label %137

.lr.ph61:                                         ; preds = %.preheader, %128
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %128 ], [ 0, %.preheader ]
  %123 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv69
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %124)
          to label %126 unwind label %132

126:                                              ; preds = %.lr.ph61
  %127 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull @.str)
          to label %128 unwind label %132

128:                                              ; preds = %126
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %129 = load i32, ptr %3, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = icmp slt i64 %indvars.iv.next70, %130
  br i1 %131, label %.lr.ph61, label %._crit_edge62, !llvm.loop !14

132:                                              ; preds = %126, %.lr.ph61
  %133 = landingpad { ptr, i32 }
          cleanup
  br label %139

134:                                              ; preds = %._crit_edge62
  call void @llvm.stackrestore.p0(ptr %21)
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #8
  %135 = load i32, ptr %1, align 4, !tbaa !5
  %136 = add nsw i32 %135, -1
  store i32 %136, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %135, 0
  br i1 %.not, label %._crit_edge66, label %.lr.ph65, !llvm.loop !15

137:                                              ; preds = %._crit_edge62
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %139

139:                                              ; preds = %78, %137, %132, %111, %103, %53, %41, %28
  %.pn39 = phi { ptr, i32 } [ %42, %41 ], [ %54, %53 ], [ %29, %28 ], [ %.pn35, %78 ], [ %.pn, %103 ], [ %112, %111 ], [ %133, %132 ], [ %138, %137 ]
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn39

._crit_edge66:                                    ; preds = %134, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; 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 uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixEOi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

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

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

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

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

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 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 #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 = { 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}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass