; LLVM IR from ravireddy07/cpp-book :: src/Coding-Blocks (MaxTipCalc)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<set, std::allocator<set>>::_Vector_impl" }
%"struct.std::_Vector_base<set, std::allocator<set>>::_Vector_impl" = type { %"struct.std::_Vector_base<set, std::allocator<set>>::_Vector_impl_data" }
%"struct.std::_Vector_base<set, std::allocator<set>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.set = type { i64, i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.myclass = type { i8 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %class.set, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %struct.myclass, align 1
  %19 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %23, label %26

23:                                               ; preds = %0
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %214

26:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %208, %26
  %28 = load i64, ptr %4, align 8, !tbaa !5
  %29 = load i64, ptr %2, align 8, !tbaa !5
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %213

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  call void @_ZNSt6vectorI3setSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !5
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %34 unwind label %44

34:                                               ; preds = %32
  %35 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %36 unwind label %44

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %38 unwind label %44

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %54, %38
  %40 = load i64, ptr %13, align 8, !tbaa !5
  %41 = load i64, ptr %5, align 8, !tbaa !5
  %42 = icmp slt i64 %40, %41
  br i1 %42, label %48, label %43

43:                                               ; preds = %39
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %66

44:                                               ; preds = %36, %34, %32
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  br label %212

48:                                               ; preds = %39
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %50 unwind label %57

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %51 = load i64, ptr %12, align 8, !tbaa !5
  invoke void @_ZN3setC1Ex(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %51)
          to label %52 unwind label %61

52:                                               ; preds = %50
  invoke void @_ZNSt6vectorI3setSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %53 unwind label %61

53:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %54

54:                                               ; preds = %53
  %55 = load i64, ptr %13, align 8, !tbaa !5
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %13, align 8, !tbaa !5
  br label %39, !llvm.loop !9

57:                                               ; preds = %48
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %10, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %11, align 4
  br label %65

61:                                               ; preds = %52, %50
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %10, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %65

65:                                               ; preds = %61, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %211

66:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %91, %66
  %68 = load i64, ptr %15, align 8, !tbaa !5
  %69 = load i64, ptr %5, align 8, !tbaa !5
  %70 = icmp slt i64 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %98

72:                                               ; preds = %67
  %73 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %74 unwind label %94

74:                                               ; preds = %72
  %75 = load i64, ptr %12, align 8, !tbaa !5
  %76 = load i64, ptr %15, align 8, !tbaa !5
  %77 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %76)
          to label %78 unwind label %94

78:                                               ; preds = %74
  %79 = getelementptr inbounds %class.set, ptr %77, i32 0, i32 1
  store i64 %75, ptr %79, align 8, !tbaa !11
  %80 = load i64, ptr %15, align 8, !tbaa !5
  %81 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %80)
          to label %82 unwind label %94

82:                                               ; preds = %78
  %83 = getelementptr inbounds %class.set, ptr %81, i32 0, i32 0
  %84 = load i64, ptr %83, align 8, !tbaa !13
  %85 = load i64, ptr %12, align 8, !tbaa !5
  %86 = sub nsw i64 %84, %85
  %87 = load i64, ptr %15, align 8, !tbaa !5
  %88 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %87)
          to label %89 unwind label %94

89:                                               ; preds = %82
  %90 = getelementptr inbounds %class.set, ptr %88, i32 0, i32 2
  store i64 %86, ptr %90, align 8, !tbaa !14
  br label %91

91:                                               ; preds = %89
  %92 = load i64, ptr %15, align 8, !tbaa !5
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %15, align 8, !tbaa !5
  br label %67, !llvm.loop !15

94:                                               ; preds = %82, %78, %74, %72
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %10, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %211

98:                                               ; preds = %71
  %99 = call ptr @_ZNSt6vectorI3setSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  %101 = call ptr @_ZNSt6vectorI3setSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %101, ptr %102, align 8
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8
  %105 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP3setSt6vectorIS2_SaIS2_EEEE7myclassEvT_S9_T0_(ptr %104, ptr %106)
          to label %107 unwind label %137

107:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store i64 0, ptr %19, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %155, %107
  %109 = load i64, ptr %6, align 8, !tbaa !5
  %110 = icmp sgt i64 %109, 0
  br i1 %110, label %111, label %118

111:                                              ; preds = %108
  %112 = load i64, ptr %7, align 8, !tbaa !5
  %113 = icmp sgt i64 %112, 0
  br i1 %113, label %114, label %118

114:                                              ; preds = %111
  %115 = load i64, ptr %19, align 8, !tbaa !5
  %116 = load i64, ptr %5, align 8, !tbaa !5
  %117 = icmp slt i64 %115, %116
  br label %118

118:                                              ; preds = %114, %111, %108
  %119 = phi i1 [ false, %111 ], [ false, %108 ], [ %117, %114 ]
  br i1 %119, label %120, label %158

120:                                              ; preds = %118
  %121 = load i64, ptr %19, align 8, !tbaa !5
  %122 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %121)
          to label %123 unwind label %141

123:                                              ; preds = %120
  %124 = getelementptr inbounds %class.set, ptr %122, i32 0, i32 2
  %125 = load i64, ptr %124, align 8, !tbaa !14
  %126 = icmp sgt i64 %125, 0
  br i1 %126, label %127, label %145

127:                                              ; preds = %123
  %128 = load i64, ptr %19, align 8, !tbaa !5
  %129 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %128)
          to label %130 unwind label %141

130:                                              ; preds = %127
  %131 = getelementptr inbounds %class.set, ptr %129, i32 0, i32 0
  %132 = load i64, ptr %131, align 8, !tbaa !13
  %133 = load i64, ptr %9, align 8, !tbaa !5
  %134 = add nsw i64 %133, %132
  store i64 %134, ptr %9, align 8, !tbaa !5
  %135 = load i64, ptr %6, align 8, !tbaa !5
  %136 = add nsw i64 %135, -1
  store i64 %136, ptr %6, align 8, !tbaa !5
  br label %155

137:                                              ; preds = %98
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %10, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %11, align 4
  br label %211

141:                                              ; preds = %205, %202, %190, %168, %145, %127, %120
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %10, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %211

145:                                              ; preds = %123
  %146 = load i64, ptr %19, align 8, !tbaa !5
  %147 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %146)
          to label %148 unwind label %141

148:                                              ; preds = %145
  %149 = getelementptr inbounds %class.set, ptr %147, i32 0, i32 1
  %150 = load i64, ptr %149, align 8, !tbaa !11
  %151 = load i64, ptr %9, align 8, !tbaa !5
  %152 = add nsw i64 %151, %150
  store i64 %152, ptr %9, align 8, !tbaa !5
  %153 = load i64, ptr %7, align 8, !tbaa !5
  %154 = add nsw i64 %153, -1
  store i64 %154, ptr %7, align 8, !tbaa !5
  br label %155

155:                                              ; preds = %148, %130
  %156 = load i64, ptr %19, align 8, !tbaa !5
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %19, align 8, !tbaa !5
  br label %108, !llvm.loop !16

158:                                              ; preds = %118
  br label %159

159:                                              ; preds = %171, %158
  %160 = load i64, ptr %6, align 8, !tbaa !5
  %161 = icmp sgt i64 %160, 0
  br i1 %161, label %162, label %166

162:                                              ; preds = %159
  %163 = load i64, ptr %19, align 8, !tbaa !5
  %164 = load i64, ptr %5, align 8, !tbaa !5
  %165 = icmp slt i64 %163, %164
  br label %166

166:                                              ; preds = %162, %159
  %167 = phi i1 [ false, %159 ], [ %165, %162 ]
  br i1 %167, label %168, label %180

168:                                              ; preds = %166
  %169 = load i64, ptr %19, align 8, !tbaa !5
  %170 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %169)
          to label %171 unwind label %141

171:                                              ; preds = %168
  %172 = getelementptr inbounds %class.set, ptr %170, i32 0, i32 0
  %173 = load i64, ptr %172, align 8, !tbaa !13
  %174 = load i64, ptr %9, align 8, !tbaa !5
  %175 = add nsw i64 %174, %173
  store i64 %175, ptr %9, align 8, !tbaa !5
  %176 = load i64, ptr %6, align 8, !tbaa !5
  %177 = add nsw i64 %176, -1
  store i64 %177, ptr %6, align 8, !tbaa !5
  %178 = load i64, ptr %19, align 8, !tbaa !5
  %179 = add nsw i64 %178, 1
  store i64 %179, ptr %19, align 8, !tbaa !5
  br label %159, !llvm.loop !17

180:                                              ; preds = %166
  br label %181

181:                                              ; preds = %193, %180
  %182 = load i64, ptr %7, align 8, !tbaa !5
  %183 = icmp sgt i64 %182, 0
  br i1 %183, label %184, label %188

184:                                              ; preds = %181
  %185 = load i64, ptr %19, align 8, !tbaa !5
  %186 = load i64, ptr %5, align 8, !tbaa !5
  %187 = icmp slt i64 %185, %186
  br label %188

188:                                              ; preds = %184, %181
  %189 = phi i1 [ false, %181 ], [ %187, %184 ]
  br i1 %189, label %190, label %202

190:                                              ; preds = %188
  %191 = load i64, ptr %19, align 8, !tbaa !5
  %192 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %191)
          to label %193 unwind label %141

193:                                              ; preds = %190
  %194 = getelementptr inbounds %class.set, ptr %192, i32 0, i32 1
  %195 = load i64, ptr %194, align 8, !tbaa !11
  %196 = load i64, ptr %9, align 8, !tbaa !5
  %197 = add nsw i64 %196, %195
  store i64 %197, ptr %9, align 8, !tbaa !5
  %198 = load i64, ptr %7, align 8, !tbaa !5
  %199 = add nsw i64 %198, -1
  store i64 %199, ptr %7, align 8, !tbaa !5
  %200 = load i64, ptr %19, align 8, !tbaa !5
  %201 = add nsw i64 %200, 1
  store i64 %201, ptr %19, align 8, !tbaa !5
  br label %181, !llvm.loop !18

202:                                              ; preds = %188
  %203 = load i64, ptr %9, align 8, !tbaa !5
  %204 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %203)
          to label %205 unwind label %141

205:                                              ; preds = %202
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %204, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %207 unwind label %141

207:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZNSt6vectorI3setSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %208

208:                                              ; preds = %207
  %209 = load i64, ptr %4, align 8, !tbaa !5
  %210 = add nsw i64 %209, 1
  store i64 %210, ptr %4, align 8, !tbaa !5
  br label %27, !llvm.loop !19

211:                                              ; preds = %141, %137, %94, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %212

212:                                              ; preds = %211, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZNSt6vectorI3setSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %216

213:                                              ; preds = %31
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %214

214:                                              ; preds = %213, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %215 = load i32, ptr %1, align 4
  ret i32 %215

216:                                              ; preds = %212
  %217 = load ptr, ptr %10, align 8
  %218 = load i32, ptr %11, align 4
  %219 = insertvalue { ptr, i32 } poison, ptr %217, 0
  %220 = insertvalue { ptr, i32 } %219, i32 %218, 1
  resume { ptr, i32 } %220
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI3setSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 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 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP3setSt6vectorIS2_SaIS2_EEEE7myclassEvT_S9_T0_(ptr, ptr) #4

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 align 2

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

declare void @_ZN3setC1Ex(ptr, i64)

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS3set", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!12, !6, i64 0}
!14 = !{!12, !6, i64 16}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<set, std::allocator<set>>::_Vector_impl" }
%"struct.std::_Vector_base<set, std::allocator<set>>::_Vector_impl" = type { %"struct.std::_Vector_base<set, std::allocator<set>>::_Vector_impl_data" }
%"struct.std::_Vector_base<set, std::allocator<set>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.set = type { i64, i64, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i64, align 8
  %7 = alloca %class.set, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  store i64 0, ptr %1, align 8, !tbaa !5
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %9 = load i64, ptr %1, align 8, !tbaa !5
  %10 = icmp eq i64 %9, 0
  br i1 %10, label %12, label %.preheader55

.preheader55:                                     ; preds = %0
  %11 = icmp sgt i64 %9, 0
  br i1 %11, label %.lr.ph82, label %.loopexit56

12:                                               ; preds = %0
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit56

.lr.ph82:                                         ; preds = %.preheader55, %129
  %.04181 = phi i64 [ %130, %129 ], [ 0, %.preheader55 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  store i64 0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 0, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorI3setSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %15 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %16 unwind label %24

16:                                               ; preds = %.lr.ph82
  %17 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %18 unwind label %24

18:                                               ; preds = %16
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %20 unwind label %24

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store i64 0, ptr %6, align 8, !tbaa !5
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

.preheader54:                                     ; preds = %30
  %23 = icmp sgt i64 %32, 0
  br i1 %23, label %.lr.ph64, label %._crit_edge

24:                                               ; preds = %18, %16, %.lr.ph82
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %133

.lr.ph:                                           ; preds = %20, %30
  %.03162 = phi i64 [ %31, %30 ], [ 0, %20 ]
  %26 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %27 unwind label %34

27:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %28 = load i64, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3setC1Ex(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %28)
          to label %29 unwind label %36

29:                                               ; preds = %27
  invoke void @_ZNSt6vectorI3setSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %30 unwind label %36

30:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  %31 = add nuw nsw i64 %.03162, 1
  %32 = load i64, ptr %2, align 8, !tbaa !5
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %.lr.ph, label %.preheader54, !llvm.loop !9

34:                                               ; preds = %.lr.ph
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

36:                                               ; preds = %29, %27
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %.loopexit.split-lp

._crit_edge:                                      ; preds = %57, %20, %.preheader54
  %38 = call ptr @_ZNSt6vectorI3setSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %39 = call ptr @_ZNSt6vectorI3setSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP3setSt6vectorIS2_SaIS2_EEEE7myclassEvT_S9_T0_(ptr %38, ptr %39)
          to label %.preheader51 unwind label %82

.preheader51:                                     ; preds = %._crit_edge
  %40 = load i64, ptr %3, align 8, !tbaa !5
  %41 = icmp sgt i64 %40, 0
  %42 = load i64, ptr %4, align 8
  %43 = icmp sgt i64 %42, 0
  %or.cond65 = select i1 %41, i1 %43, i1 false
  %44 = load i64, ptr %2, align 8
  %45 = icmp sgt i64 %44, 0
  %or.cond4766 = select i1 %or.cond65, i1 %45, i1 false
  br i1 %or.cond4766, label %.lr.ph69, label %.critedge.preheader

.lr.ph64:                                         ; preds = %.preheader54, %57
  %.03063 = phi i64 [ %60, %57 ], [ 0, %.preheader54 ]
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %47 unwind label %63

47:                                               ; preds = %.lr.ph64
  %48 = load i64, ptr %6, align 8, !tbaa !5
  %49 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.03063)
          to label %50 unwind label %63

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %49, i64 8
  store i64 %48, ptr %51, align 8, !tbaa !11
  %52 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.03063)
          to label %53 unwind label %63

53:                                               ; preds = %50
  %54 = load i64, ptr %52, align 8, !tbaa !13
  %55 = load i64, ptr %6, align 8, !tbaa !5
  %56 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.03063)
          to label %57 unwind label %63

57:                                               ; preds = %53
  %58 = sub nsw i64 %54, %55
  %59 = getelementptr inbounds i8, ptr %56, i64 16
  store i64 %58, ptr %59, align 8, !tbaa !14
  %60 = add nuw nsw i64 %.03063, 1
  %61 = load i64, ptr %2, align 8, !tbaa !5
  %62 = icmp slt i64 %60, %61
  br i1 %62, label %.lr.ph64, label %._crit_edge, !llvm.loop !15

63:                                               ; preds = %53, %50, %47, %.lr.ph64
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.critedge.preheader:                              ; preds = %91, %.preheader51
  %65 = phi i64 [ %42, %.preheader51 ], [ %92, %91 ]
  %66 = phi i64 [ %44, %.preheader51 ], [ %97, %91 ]
  %67 = phi i64 [ %40, %.preheader51 ], [ %93, %91 ]
  %.038.lcssa = phi i64 [ 0, %.preheader51 ], [ %.139, %91 ]
  %.0.lcssa = phi i64 [ 0, %.preheader51 ], [ %94, %91 ]
  %68 = icmp sgt i64 %67, 0
  %69 = icmp slt i64 %.0.lcssa, %66
  %70 = select i1 %68, i1 %69, i1 false
  br i1 %70, label %.lr.ph73, label %.preheader

.lr.ph69:                                         ; preds = %.preheader51, %91
  %.068 = phi i64 [ %94, %91 ], [ 0, %.preheader51 ]
  %.03867 = phi i64 [ %.139, %91 ], [ 0, %.preheader51 ]
  %71 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.068)
          to label %72 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

72:                                               ; preds = %.lr.ph69
  %73 = getelementptr inbounds i8, ptr %71, i64 16
  %74 = load i64, ptr %73, align 8, !tbaa !14
  %75 = icmp sgt i64 %74, 0
  br i1 %75, label %76, label %84

76:                                               ; preds = %72
  %77 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.068)
          to label %78 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

78:                                               ; preds = %76
  %79 = load i64, ptr %77, align 8, !tbaa !13
  %80 = load i64, ptr %3, align 8, !tbaa !5
  %81 = add nsw i64 %80, -1
  store i64 %81, ptr %3, align 8, !tbaa !5
  %.pre86 = load i64, ptr %4, align 8
  br label %91

82:                                               ; preds = %._crit_edge
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

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

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %.lr.ph69, %76, %84
  %lpad.loopexit52 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

84:                                               ; preds = %72
  %85 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.068)
          to label %86 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

86:                                               ; preds = %84
  %87 = getelementptr inbounds i8, ptr %85, i64 8
  %88 = load i64, ptr %87, align 8, !tbaa !11
  %89 = load i64, ptr %4, align 8, !tbaa !5
  %90 = add nsw i64 %89, -1
  store i64 %90, ptr %4, align 8, !tbaa !5
  %.pre = load i64, ptr %3, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %86, %78
  %92 = phi i64 [ %.pre86, %78 ], [ %90, %86 ]
  %93 = phi i64 [ %81, %78 ], [ %.pre, %86 ]
  %.pn = phi i64 [ %79, %78 ], [ %88, %86 ]
  %.139 = add nsw i64 %.pn, %.03867
  %94 = add nuw nsw i64 %.068, 1
  %95 = icmp sgt i64 %93, 0
  %96 = icmp sgt i64 %92, 0
  %or.cond = select i1 %95, i1 %96, i1 false
  %97 = load i64, ptr %2, align 8
  %98 = icmp slt i64 %94, %97
  %or.cond47 = select i1 %or.cond, i1 %98, i1 false
  br i1 %or.cond47, label %.lr.ph69, label %.critedge.preheader, !llvm.loop !16

.preheader.loopexit:                              ; preds = %.critedge
  %.pre87 = load i64, ptr %4, align 8, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.critedge.preheader
  %99 = phi i64 [ %66, %.critedge.preheader ], [ %111, %.preheader.loopexit ]
  %100 = phi i64 [ %65, %.critedge.preheader ], [ %.pre87, %.preheader.loopexit ]
  %.240.lcssa = phi i64 [ %.038.lcssa, %.critedge.preheader ], [ %106, %.preheader.loopexit ]
  %.1.lcssa = phi i64 [ %.0.lcssa, %.critedge.preheader ], [ %109, %.preheader.loopexit ]
  %101 = icmp sgt i64 %100, 0
  %102 = icmp slt i64 %.1.lcssa, %99
  %103 = select i1 %101, i1 %102, i1 false
  br i1 %103, label %.lr.ph78, label %._crit_edge79

.lr.ph73:                                         ; preds = %.critedge.preheader, %.critedge
  %.172 = phi i64 [ %109, %.critedge ], [ %.0.lcssa, %.critedge.preheader ]
  %.24071 = phi i64 [ %106, %.critedge ], [ %.038.lcssa, %.critedge.preheader ]
  %104 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.172)
          to label %.critedge unwind label %.loopexit.split-lp.loopexit

.critedge:                                        ; preds = %.lr.ph73
  %105 = load i64, ptr %104, align 8, !tbaa !13
  %106 = add nsw i64 %105, %.24071
  %107 = load i64, ptr %3, align 8, !tbaa !5
  %108 = add nsw i64 %107, -1
  store i64 %108, ptr %3, align 8, !tbaa !5
  %109 = add nuw nsw i64 %.172, 1
  %110 = icmp sgt i64 %107, 1
  %111 = load i64, ptr %2, align 8
  %112 = icmp slt i64 %109, %111
  %113 = select i1 %110, i1 %112, i1 false
  br i1 %113, label %.lr.ph73, label %.preheader.loopexit, !llvm.loop !17

.lr.ph78:                                         ; preds = %.preheader, %115
  %.277 = phi i64 [ %121, %115 ], [ %.1.lcssa, %.preheader ]
  %.376 = phi i64 [ %118, %115 ], [ %.240.lcssa, %.preheader ]
  %114 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.277)
          to label %115 unwind label %.loopexit

115:                                              ; preds = %.lr.ph78
  %116 = getelementptr inbounds i8, ptr %114, i64 8
  %117 = load i64, ptr %116, align 8, !tbaa !11
  %118 = add nsw i64 %117, %.376
  %119 = load i64, ptr %4, align 8, !tbaa !5
  %120 = add nsw i64 %119, -1
  store i64 %120, ptr %4, align 8, !tbaa !5
  %121 = add nuw nsw i64 %.277, 1
  %122 = icmp sgt i64 %119, 1
  %123 = load i64, ptr %2, align 8
  %124 = icmp slt i64 %121, %123
  %125 = select i1 %122, i1 %124, i1 false
  br i1 %125, label %.lr.ph78, label %._crit_edge79, !llvm.loop !18

._crit_edge79:                                    ; preds = %115, %.preheader
  %.3.lcssa = phi i64 [ %.240.lcssa, %.preheader ], [ %118, %115 ]
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.3.lcssa)
          to label %127 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

127:                                              ; preds = %._crit_edge79
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %129 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

129:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZNSt6vectorI3setSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  %130 = add nuw nsw i64 %.04181, 1
  %131 = load i64, ptr %1, align 8, !tbaa !5
  %132 = icmp slt i64 %130, %131
  br i1 %132, label %.lr.ph82, label %.loopexit56, !llvm.loop !19

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %34, %36, %82, %63
  %.pn42.pn = phi { ptr, i32 } [ %64, %63 ], [ %83, %82 ], [ %37, %36 ], [ %35, %34 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit48, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit52, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %133

133:                                              ; preds = %.loopexit.split-lp, %24
  %.pn42.pn.pn = phi { ptr, i32 } [ %.pn42.pn, %.loopexit.split-lp ], [ %25, %24 ]
  call void @_ZNSt6vectorI3setSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn42.pn.pn

.loopexit56:                                      ; preds = %129, %.preheader55, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI3setSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 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 8 dereferenceable(24) ptr @_ZNSt6vectorI3setSaIS0_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP3setSt6vectorIS2_SaIS2_EEEE7myclassEvT_S9_T0_(ptr, ptr) local_unnamed_addr #4

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

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

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

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

declare void @_ZN3setC1Ex(ptr, i64) local_unnamed_addr

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS3set", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!12, !6, i64 0}
!14 = !{!12, !6, i64 16}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


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