; LLVM IR from ahr9n/psolving-paradigms :: 5.other-techniques (UVa 11536 - Smallest Sub-Array)

; 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 [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7quickenv() #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 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 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 ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.std::map", align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @_Z7quickenv()
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %19

19:                                               ; preds = %192, %0
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = add nsw i32 %20, -1
  store i32 %21, ptr %2, align 4, !tbaa !5
  %22 = icmp ne i32 %20, 0
  br i1 %22, label %23, label %195

23:                                               ; preds = %19
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i32 0, ptr %9, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !5
  store i32 2147483647, ptr %8, align 4, !tbaa !5
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  %29 = zext i32 %28 to i64
  %30 = call ptr @llvm.stacksave.p0()
  store ptr %30, ptr %11, align 8
  %31 = alloca i32, i64 %29, align 16
  store i64 %29, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  %32 = getelementptr inbounds i32, ptr %31, i64 0
  store i32 1, ptr %32, align 16, !tbaa !5
  %33 = getelementptr inbounds i32, ptr %31, i64 1
  store i32 2, ptr %33, align 4, !tbaa !5
  %34 = getelementptr inbounds i32, ptr %31, i64 2
  store i32 3, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 3, ptr %14, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %64, %23
  %36 = load i32, ptr %14, align 4, !tbaa !5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = icmp sle i32 %36, %37
  br i1 %38, label %40, label %39

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

40:                                               ; preds = %35
  %41 = load i32, ptr %14, align 4, !tbaa !5
  %42 = sub nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i32, ptr %31, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = load i32, ptr %14, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 2
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %31, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %45, %50
  %52 = load i32, ptr %14, align 4, !tbaa !5
  %53 = sub nsw i32 %52, 3
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i32, ptr %31, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %51, %56
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = srem i32 %57, %58
  %60 = add nsw i32 %59, 1
  %61 = load i32, ptr %14, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %31, i64 %62
  store i32 %60, ptr %63, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %40
  %65 = load i32, ptr %14, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %14, align 4, !tbaa !5
  br label %35, !llvm.loop !9

67:                                               ; preds = %39
  br label %68

68:                                               ; preds = %167, %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %72, label %76

72:                                               ; preds = %68
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br label %76

76:                                               ; preds = %72, %68
  %77 = phi i1 [ false, %68 ], [ %75, %72 ]
  br i1 %77, label %78, label %170

78:                                               ; preds = %76
  br label %79

79:                                               ; preds = %108, %78
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = icmp ne i32 %80, %81
  br i1 %82, label %83, label %87

83:                                               ; preds = %79
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br label %87

87:                                               ; preds = %83, %79
  %88 = phi i1 [ false, %79 ], [ %86, %83 ]
  br i1 %88, label %89, label %113

89:                                               ; preds = %87
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr %31, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = icmp sle i32 %93, %94
  br i1 %95, label %96, label %108

96:                                               ; preds = %89
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %31, i64 %98
  %100 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 4 dereferenceable(4) %99)
          to label %101 unwind label %104

101:                                              ; preds = %96
  %102 = load i32, ptr %100, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %100, align 4, !tbaa !5
  br label %108

104:                                              ; preds = %189, %186, %183, %181, %176, %172, %170, %158, %143, %135, %96
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %15, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %16, align 4
  br label %194

108:                                              ; preds = %101, %89
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %7, align 4, !tbaa !5
  %111 = call noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  %112 = trunc i64 %111 to i32
  store i32 %112, ptr %9, align 4, !tbaa !5
  br label %79, !llvm.loop !11

113:                                              ; preds = %87
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = load i32, ptr %5, align 4, !tbaa !5
  %116 = icmp eq i32 %114, %115
  br i1 %116, label %117, label %128

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %118 = load i32, ptr %7, align 4, !tbaa !5
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = sub nsw i32 %118, %119
  store i32 %120, ptr %17, align 4, !tbaa !5
  %121 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %122 unwind label %124

122:                                              ; preds = %117
  %123 = load i32, ptr %121, align 4, !tbaa !5
  store i32 %123, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %128

124:                                              ; preds = %117
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %15, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %194

128:                                              ; preds = %122, %113
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %31, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = load i32, ptr %5, align 4, !tbaa !5
  %134 = icmp sle i32 %132, %133
  br i1 %134, label %135, label %151

135:                                              ; preds = %128
  %136 = load i32, ptr %6, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %31, i64 %137
  %139 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 4 dereferenceable(4) %138)
          to label %140 unwind label %104

140:                                              ; preds = %135
  %141 = load i32, ptr %139, align 4, !tbaa !5
  %142 = icmp eq i32 %141, 1
  br i1 %142, label %143, label %151

143:                                              ; preds = %140
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i32, ptr %31, i64 %145
  %147 = invoke noundef i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 4 dereferenceable(4) %146)
          to label %148 unwind label %104

148:                                              ; preds = %143
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = add nsw i32 %149, -1
  store i32 %150, ptr %9, align 4, !tbaa !5
  br label %167

151:                                              ; preds = %140, %128
  %152 = load i32, ptr %6, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %31, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = load i32, ptr %5, align 4, !tbaa !5
  %157 = icmp sle i32 %155, %156
  br i1 %157, label %158, label %166

158:                                              ; preds = %151
  %159 = load i32, ptr %6, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i32, ptr %31, i64 %160
  %162 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 4 dereferenceable(4) %161)
          to label %163 unwind label %104

163:                                              ; preds = %158
  %164 = load i32, ptr %162, align 4, !tbaa !5
  %165 = add nsw i32 %164, -1
  store i32 %165, ptr %162, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %163, %151
  br label %167

167:                                              ; preds = %166, %148
  %168 = load i32, ptr %6, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %6, align 4, !tbaa !5
  br label %68, !llvm.loop !12

170:                                              ; preds = %76
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %172 unwind label %104

172:                                              ; preds = %170
  %173 = load i32, ptr %10, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %10, align 4, !tbaa !5
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %171, i32 noundef %174)
          to label %176 unwind label %104

176:                                              ; preds = %172
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %175, ptr noundef @.str.1)
          to label %178 unwind label %104

178:                                              ; preds = %176
  %179 = load i32, ptr %8, align 4, !tbaa !5
  %180 = icmp eq i32 %179, 2147483647
  br i1 %180, label %181, label %186

181:                                              ; preds = %178
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %183 unwind label %104

183:                                              ; preds = %181
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %182, i8 noundef signext 10)
          to label %185 unwind label %104

185:                                              ; preds = %183
  br label %192

186:                                              ; preds = %178
  %187 = load i32, ptr %8, align 4, !tbaa !5
  %188 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %187)
          to label %189 unwind label %104

189:                                              ; preds = %186
  %190 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %188, i8 noundef signext 10)
          to label %191 unwind label %104

191:                                              ; preds = %189
  br label %192

192:                                              ; preds = %191, %185
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  %193 = load ptr, ptr %11, align 8
  call void @llvm.stackrestore.p0(ptr %193)
  br label %19, !llvm.loop !13

194:                                              ; preds = %124, %104
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, 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 %197

195:                                              ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, 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
  %196 = load i32, ptr %1, align 4
  ret i32 %196

197:                                              ; preds = %194
  %198 = load ptr, ptr %15, align 8
  %199 = load i32, ptr %16, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

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

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

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

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

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

; 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)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #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: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(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) #4

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


; 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 [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7quickenv() local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 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 i32, align 4
  tail call void @_Z7quickenv()
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %8 = 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)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr %1, align 4, !tbaa !5
  %.not56 = icmp eq i32 %9, 0
  br i1 %.not56, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %0, %127
  %.03257 = phi i32 [ %114, %127 ], [ 0, %0 ]
  %11 = 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)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i32 2147483647, ptr %5, align 4, !tbaa !5
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = add nsw i32 %14, 1
  %16 = zext i32 %15 to i64
  %17 = call ptr @llvm.stacksave.p0()
  %18 = alloca i32, i64 %16, align 16
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #8
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  store i32 1, ptr %18, align 16, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  store i32 2, ptr %19, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %18, i64 8
  store i32 3, ptr %20, align 8, !tbaa !5
  %21 = load i32, ptr %2, align 4
  %.not3546 = icmp slt i32 %21, 3
  br i1 %.not3546, label %.preheader39, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph59
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %scevgep = getelementptr i8, ptr %18, i64 8
  %load_initial = load i32, ptr %scevgep, align 8
  %23 = zext nneg i32 %21 to i64
  %xtraiter = and i64 %23, 1
  %24 = icmp eq i32 %21, 3
  br i1 %24, label %.preheader39.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %25 = and i64 %23, 2147483646
  %26 = add nsw i64 %25, -4
  br label %37

.preheader39.loopexit.unr-lcssa:                  ; preds = %37, %.lr.ph
  %store_forwarded.unr = phi i32 [ %load_initial, %.lr.ph ], [ %54, %37 ]
  %indvars.iv.unr = phi i64 [ 3, %.lr.ph ], [ %indvars.iv.next.1, %37 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader39, label %.preheader39.loopexit.epilog-lcssa

.preheader39.loopexit.epilog-lcssa:               ; preds = %.preheader39.loopexit.unr-lcssa
  %27 = getelementptr i32, ptr %18, i64 %indvars.iv.unr
  %28 = getelementptr i8, ptr %27, i64 -8
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = add nsw i32 %29, %store_forwarded.unr
  %31 = getelementptr i8, ptr %27, i64 -12
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %30, %32
  %34 = srem i32 %33, %22
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %27, align 4, !tbaa !5
  br label %.preheader39

.preheader39:                                     ; preds = %.preheader39.loopexit.epilog-lcssa, %.preheader39.loopexit.unr-lcssa, %.lr.ph59
  %36 = icmp sgt i32 %21, 0
  br i1 %36, label %.preheader, label %._crit_edge55

37:                                               ; preds = %37, %.lr.ph.new
  %store_forwarded = phi i32 [ %load_initial, %.lr.ph.new ], [ %54, %37 ]
  %indvars.iv = phi i64 [ 3, %.lr.ph.new ], [ %indvars.iv.next.1, %37 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %37 ]
  %38 = getelementptr i32, ptr %18, i64 %indvars.iv
  %39 = getelementptr i8, ptr %38, i64 -8
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = add nsw i32 %40, %store_forwarded
  %42 = getelementptr i8, ptr %38, i64 -12
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = add nsw i32 %41, %43
  %45 = srem i32 %44, %22
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %38, align 4, !tbaa !5
  %47 = getelementptr i32, ptr %18, i64 %indvars.iv
  %48 = getelementptr i8, ptr %47, i64 4
  %49 = getelementptr i8, ptr %47, i64 -4
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, %46
  %52 = add nsw i32 %51, %40
  %53 = srem i32 %52, %22
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %48, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter, %26
  br i1 %niter.ncmp.1, label %.preheader39.loopexit.unr-lcssa, label %37, !llvm.loop !9

.preheader:                                       ; preds = %.preheader39, %106
  %55 = phi i32 [ %109, %106 ], [ %21, %.preheader39 ]
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %106 ], [ 0, %.preheader39 ]
  %.02853 = phi i32 [ %.1.lcssa, %106 ], [ 0, %.preheader39 ]
  %.03052 = phi i32 [ %.2, %106 ], [ 0, %.preheader39 ]
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = icmp ne i32 %.03052, %56
  %58 = icmp slt i32 %.02853, %55
  %59 = select i1 %57, i1 %58, i1 false
  br i1 %59, label %.lr.ph49.preheader, label %._crit_edge

.lr.ph49.preheader:                               ; preds = %.preheader
  %60 = sext i32 %.02853 to i64
  br label %.lr.ph49

.lr.ph49:                                         ; preds = %.lr.ph49.preheader, %69
  %indvars.iv65 = phi i64 [ %60, %.lr.ph49.preheader ], [ %indvars.iv.next66, %69 ]
  %61 = phi i32 [ %56, %.lr.ph49.preheader ], [ %72, %69 ]
  %62 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv65
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %.not38 = icmp sgt i32 %63, %61
  br i1 %.not38, label %69, label %64

64:                                               ; preds = %.lr.ph49
  %65 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %62)
          to label %66 unwind label %.loopexit

66:                                               ; preds = %64
  %67 = load i32, ptr %65, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %65, align 4, !tbaa !5
  br label %69

.loopexit:                                        ; preds = %64
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %101, %94, %89
  %lpad.loopexit40 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %.invoke, %123, %121, %116, %113, %._crit_edge55
  %lpad.loopexit.split-lp41 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit40, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp41, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, 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 } %lpad.phi

69:                                               ; preds = %66, %.lr.ph49
  %indvars.iv.next66 = add nsw i64 %indvars.iv65, 1
  %70 = call noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  %71 = trunc i64 %70 to i32
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = icmp ne i32 %72, %71
  %74 = load i32, ptr %2, align 4
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next66, %75
  %77 = select i1 %73, i1 %76, i1 false
  br i1 %77, label %.lr.ph49, label %._crit_edge.loopexit, !llvm.loop !11

._crit_edge.loopexit:                             ; preds = %69
  %78 = trunc nsw i64 %indvars.iv.next66 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.131.lcssa = phi i32 [ %.03052, %.preheader ], [ %71, %._crit_edge.loopexit ]
  %.1.lcssa = phi i32 [ %.02853, %.preheader ], [ %78, %._crit_edge.loopexit ]
  %.lcssa = phi i32 [ %56, %.preheader ], [ %72, %._crit_edge.loopexit ]
  %79 = icmp eq i32 %.131.lcssa, %.lcssa
  br i1 %79, label %80, label %85

80:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %81 = trunc nuw nsw i64 %indvars.iv68 to i32
  %82 = sub nsw i32 %.1.lcssa, %81
  store i32 %82, ptr %7, align 4, !tbaa !5
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %84 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %84, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %80, %._crit_edge
  %86 = phi i32 [ %.pre, %80 ], [ %.lcssa, %._crit_edge ]
  %87 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv68
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %.not36 = icmp sgt i32 %88, %86
  br i1 %.not36, label %98, label %89

89:                                               ; preds = %85
  %90 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %87)
          to label %91 unwind label %.loopexit.split-lp.loopexit

91:                                               ; preds = %89
  %92 = load i32, ptr %90, align 4, !tbaa !5
  %93 = icmp eq i32 %92, 1
  br i1 %93, label %94, label %._crit_edge71

._crit_edge71:                                    ; preds = %91
  %.pre72 = load i32, ptr %87, align 4, !tbaa !5
  %.pre73 = load i32, ptr %4, align 4, !tbaa !5
  br label %98

94:                                               ; preds = %91
  %95 = invoke noundef i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %87)
          to label %96 unwind label %.loopexit.split-lp.loopexit

96:                                               ; preds = %94
  %97 = add nsw i32 %.131.lcssa, -1
  br label %106

98:                                               ; preds = %._crit_edge71, %85
  %99 = phi i32 [ %.pre73, %._crit_edge71 ], [ %86, %85 ]
  %100 = phi i32 [ %.pre72, %._crit_edge71 ], [ %88, %85 ]
  %.not37 = icmp sgt i32 %100, %99
  br i1 %.not37, label %106, label %101

101:                                              ; preds = %98
  %102 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 4 dereferenceable(4) %87)
          to label %103 unwind label %.loopexit.split-lp.loopexit

103:                                              ; preds = %101
  %104 = load i32, ptr %102, align 4, !tbaa !5
  %105 = add nsw i32 %104, -1
  store i32 %105, ptr %102, align 4, !tbaa !5
  br label %106

106:                                              ; preds = %98, %103, %96
  %.2 = phi i32 [ %97, %96 ], [ %.131.lcssa, %103 ], [ %.131.lcssa, %98 ]
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %107 = sext i32 %.1.lcssa to i64
  %108 = icmp slt i64 %indvars.iv68, %107
  %109 = load i32, ptr %2, align 4
  %110 = icmp slt i32 %.1.lcssa, %109
  %111 = select i1 %108, i1 %110, i1 false
  br i1 %111, label %.preheader, label %._crit_edge55, !llvm.loop !12

._crit_edge55:                                    ; preds = %106, %.preheader39
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %113 unwind label %.loopexit.split-lp.loopexit.split-lp

113:                                              ; preds = %._crit_edge55
  %114 = add nuw nsw i32 %.03257, 1
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %112, i32 noundef %114)
          to label %116 unwind label %.loopexit.split-lp.loopexit.split-lp

116:                                              ; preds = %113
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull @.str.1)
          to label %118 unwind label %.loopexit.split-lp.loopexit.split-lp

118:                                              ; preds = %116
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = icmp eq i32 %119, 2147483647
  br i1 %120, label %121, label %123

121:                                              ; preds = %118
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %.invoke unwind label %.loopexit.split-lp.loopexit.split-lp

123:                                              ; preds = %118
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %119)
          to label %.invoke unwind label %.loopexit.split-lp.loopexit.split-lp

.invoke:                                          ; preds = %123, %121
  %125 = phi ptr [ %122, %121 ], [ %124, %123 ]
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %125, i8 noundef signext 10)
          to label %127 unwind label %.loopexit.split-lp.loopexit.split-lp

127:                                              ; preds = %.invoke
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #8
  call void @llvm.stackrestore.p0(ptr %17)
  %128 = load i32, ptr %1, align 4, !tbaa !5
  %129 = add nsw i32 %128, -1
  store i32 %129, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %128, 0
  br i1 %.not, label %._crit_edge60, label %.lr.ph59, !llvm.loop !13

._crit_edge60:                                    ; preds = %127, %0
  call void @llvm.lifetime.end.p0(i64 4, 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
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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) #2

; 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt3mapIiiSt4lessIiESaISt4pairIKiiEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) 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: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(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) #4

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


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