; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #771 (Div. 2)/C. Inversion Graph.ll (Z5solvev)

; 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::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.0" = type { i8 }
%struct.DSU = type { %"class.std::vector.3", %"class.std::vector.3", i64, i64 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.DSU, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = call ptr @llvm.stacksave.p0()
  store ptr %23, ptr %2, align 8
  %24 = alloca i64, i64 %22, align 16
  store i64 %22, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %34, %0
  %26 = load i64, ptr %4, align 8, !tbaa !5
  %27 = load i64, ptr %1, align 8, !tbaa !5
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %37

30:                                               ; preds = %25
  %31 = load i64, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds i64, ptr %24, i64 %31
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %32)
  br label %34

34:                                               ; preds = %30
  %35 = load i64, ptr %4, align 8, !tbaa !5
  %36 = add nsw i64 %35, 1
  store i64 %36, ptr %4, align 8, !tbaa !5
  br label %25, !llvm.loop !9

37:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #6
  %38 = load i64, ptr %1, align 8, !tbaa !5
  %39 = add nsw i64 %38, 7
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  store i8 0, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %39, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %40 unwind label %50

40:                                               ; preds = %37
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #6
  %41 = load i64, ptr %1, align 8, !tbaa !5
  invoke void @_ZN3DSUC2El(ptr noundef nonnull align 8 dereferenceable(64) %10, i64 noundef %41)
          to label %42 unwind label %54

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %43 = load i64, ptr %1, align 8, !tbaa !5
  store i64 %43, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %44 = load i64, ptr %1, align 8, !tbaa !5
  %45 = sub nsw i64 %44, 1
  store i64 %45, ptr %12, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %190, %42
  %47 = load i64, ptr %12, align 8, !tbaa !5
  %48 = icmp sge i64 %47, 0
  br i1 %48, label %58, label %49

49:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %194

50:                                               ; preds = %37
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %8, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  br label %208

54:                                               ; preds = %40
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %8, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %9, align 4
  br label %207

58:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %59 = load i64, ptr %12, align 8, !tbaa !5
  %60 = getelementptr inbounds i64, ptr %24, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %61)
          to label %63 unwind label %107

63:                                               ; preds = %58
  %64 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 0
  %65 = extractvalue { ptr, i64 } %62, 0
  store ptr %65, ptr %64, align 8
  %66 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 1
  %67 = extractvalue { ptr, i64 } %62, 1
  store i64 %67, ptr %66, align 8
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %13, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %69 = load i64, ptr %12, align 8, !tbaa !5
  %70 = getelementptr inbounds i64, ptr %24, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !5
  store i64 %71, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %72 = load i64, ptr %14, align 8, !tbaa !5
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %74 = load i64, ptr %12, align 8, !tbaa !5
  %75 = sub nsw i64 %74, 1
  store i64 %75, ptr %16, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %187, %63
  %77 = load i64, ptr %16, align 8, !tbaa !5
  %78 = icmp sge i64 %77, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  br i1 %78, label %79, label %100

79:                                               ; preds = %76
  %80 = load i64, ptr %15, align 8, !tbaa !5
  %81 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %80)
          to label %82 unwind label %111

82:                                               ; preds = %79
  %83 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %84 = extractvalue { ptr, i64 } %81, 0
  store ptr %84, ptr %83, align 8
  %85 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %86 = extractvalue { ptr, i64 } %81, 1
  store i64 %86, ptr %85, align 8
  %87 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  br i1 %87, label %88, label %98

88:                                               ; preds = %82
  %89 = load i64, ptr %11, align 8, !tbaa !5
  %90 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %89)
          to label %91 unwind label %115

91:                                               ; preds = %88
  %92 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %93 = extractvalue { ptr, i64 } %90, 0
  store ptr %93, ptr %92, align 8
  %94 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %95 = extractvalue { ptr, i64 } %90, 1
  store i64 %95, ptr %94, align 8
  %96 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  %97 = xor i1 %96, true
  br label %98

98:                                               ; preds = %91, %82
  %99 = phi i1 [ true, %82 ], [ %97, %91 ]
  br label %100

100:                                              ; preds = %98, %76
  %101 = phi i1 [ false, %76 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br i1 %101, label %102, label %190

102:                                              ; preds = %100
  %103 = load i64, ptr %11, align 8, !tbaa !5
  %104 = load i64, ptr %15, align 8, !tbaa !5
  %105 = icmp slt i64 %103, %104
  br i1 %105, label %106, label %120

106:                                              ; preds = %102
  br label %190

107:                                              ; preds = %58
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %8, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %193

111:                                              ; preds = %79
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %8, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %9, align 4
  br label %119

115:                                              ; preds = %88
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %8, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  br label %119

119:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  br label %192

120:                                              ; preds = %102
  %121 = load i64, ptr %16, align 8, !tbaa !5
  %122 = getelementptr inbounds i64, ptr %24, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !5
  %124 = load i64, ptr %11, align 8, !tbaa !5
  %125 = icmp eq i64 %123, %124
  br i1 %125, label %126, label %129

126:                                              ; preds = %120
  %127 = load i64, ptr %11, align 8, !tbaa !5
  %128 = add nsw i64 %127, -1
  store i64 %128, ptr %11, align 8, !tbaa !5
  br label %129

129:                                              ; preds = %126, %120
  %130 = load i64, ptr %14, align 8, !tbaa !5
  %131 = load i64, ptr %16, align 8, !tbaa !5
  %132 = getelementptr inbounds i64, ptr %24, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !5
  %134 = invoke noundef zeroext i1 @_ZN3DSU5UnionEll(ptr noundef nonnull align 8 dereferenceable(64) %10, i64 noundef %130, i64 noundef %133)
          to label %135 unwind label %157

135:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %136 = load i64, ptr %16, align 8, !tbaa !5
  %137 = getelementptr inbounds i64, ptr %24, i64 %136
  %138 = load i64, ptr %137, align 8, !tbaa !5
  %139 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %138)
          to label %140 unwind label %161

140:                                              ; preds = %135
  %141 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %142 = extractvalue { ptr, i64 } %139, 0
  store ptr %142, ptr %141, align 8
  %143 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %144 = extractvalue { ptr, i64 } %139, 1
  store i64 %144, ptr %143, align 8
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  %146 = load i64, ptr %16, align 8, !tbaa !5
  %147 = getelementptr inbounds i64, ptr %24, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !5
  %149 = load i64, ptr %14, align 8, !tbaa !5
  %150 = icmp slt i64 %148, %149
  br i1 %150, label %151, label %165

151:                                              ; preds = %140
  %152 = load i64, ptr %16, align 8, !tbaa !5
  %153 = getelementptr inbounds i64, ptr %24, i64 %152
  %154 = load i64, ptr %153, align 8, !tbaa !5
  store i64 %154, ptr %14, align 8, !tbaa !5
  %155 = load i64, ptr %14, align 8, !tbaa !5
  %156 = add nsw i64 %155, 1
  store i64 %156, ptr %15, align 8, !tbaa !5
  br label %165

157:                                              ; preds = %129
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %8, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %9, align 4
  br label %192

161:                                              ; preds = %135
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %8, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br label %192

165:                                              ; preds = %151, %140
  br label %166

166:                                              ; preds = %180, %165
  %167 = load i64, ptr %11, align 8, !tbaa !5
  %168 = icmp sgt i64 %167, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  br i1 %168, label %169, label %178

169:                                              ; preds = %166
  %170 = load i64, ptr %11, align 8, !tbaa !5
  %171 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %170)
          to label %172 unwind label %183

172:                                              ; preds = %169
  %173 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %174 = extractvalue { ptr, i64 } %171, 0
  store ptr %174, ptr %173, align 8
  %175 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %176 = extractvalue { ptr, i64 } %171, 1
  store i64 %176, ptr %175, align 8
  %177 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #6
  br label %178

178:                                              ; preds = %172, %166
  %179 = phi i1 [ false, %166 ], [ %177, %172 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  br i1 %179, label %180, label %187

180:                                              ; preds = %178
  %181 = load i64, ptr %11, align 8, !tbaa !5
  %182 = add nsw i64 %181, -1
  store i64 %182, ptr %11, align 8, !tbaa !5
  br label %166, !llvm.loop !13

183:                                              ; preds = %169
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %8, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  br label %192

187:                                              ; preds = %178
  %188 = load i64, ptr %16, align 8, !tbaa !5
  %189 = add nsw i64 %188, -1
  store i64 %189, ptr %16, align 8, !tbaa !5
  br label %76, !llvm.loop !14

190:                                              ; preds = %106, %100
  %191 = load i64, ptr %16, align 8, !tbaa !5
  store i64 %191, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %46, !llvm.loop !15

192:                                              ; preds = %183, %161, %157, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %193

193:                                              ; preds = %192, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %206

194:                                              ; preds = %49
  %195 = invoke noundef i64 @_ZN3DSU14CntofComponentEv(ptr noundef nonnull align 8 dereferenceable(64) %10)
          to label %196 unwind label %202

196:                                              ; preds = %194
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %195)
          to label %198 unwind label %202

198:                                              ; preds = %196
  %199 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %197, ptr noundef @.str)
          to label %200 unwind label %202

200:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %10) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  %201 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %201)
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret void

202:                                              ; preds = %198, %196, %194
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %8, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %9, align 4
  br label %206

206:                                              ; preds = %202, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %10) #6
  br label %207

207:                                              ; preds = %206, %54
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  br label %208

208:                                              ; preds = %207, %50
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %8, align 8
  %211 = load i32, ptr %9, align 4
  %212 = insertvalue { ptr, i32 } poison, ptr %210, 0
  %213 = insertvalue { ptr, i32 } %212, i32 %211, 1
  resume { ptr, i32 } %213
}

; 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 @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3DSUC2El(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3DSU5UnionEll(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef, i64 noundef) #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) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3DSU14CntofComponentEv(ptr noundef nonnull align 8 dereferenceable(64)) #3 align 2

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.0" = type { i8 }
%struct.DSU = type { %"class.std::vector.3", %"class.std::vector.3", i64, i64 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i8, align 1
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca %struct.DSU, align 8
  %6 = alloca %"struct.std::_Bit_reference", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %13 = call ptr @llvm.stacksave.p0()
  %14 = alloca i64, i64 %12, align 16
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = icmp sgt i64 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa = phi i64 [ %15, %0 ], [ %21, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #7
  %17 = add nsw i64 %.lcssa, 7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  store i8 0, ptr %3, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %17, ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %23 unwind label %36

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.05079 = phi i64 [ %20, %.lr.ph ], [ 0, %0 ]
  %18 = getelementptr inbounds i64, ptr %14, i64 %.05079
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %20 = add nuw nsw i64 %.05079, 1
  %21 = load i64, ptr %1, align 8, !tbaa !5
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !11

23:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #7
  %24 = load i64, ptr %1, align 8, !tbaa !5
  invoke void @_ZN3DSUC2El(ptr noundef nonnull align 8 dereferenceable(64) %5, i64 noundef %24)
          to label %25 unwind label %38

25:                                               ; preds = %23
  %26 = load i64, ptr %1, align 8, !tbaa !5
  %27 = icmp sgt i64 %26, 0
  br i1 %27, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %25
  %28 = add nsw i64 %26, -1
  %29 = getelementptr inbounds i8, ptr %6, i64 8
  %30 = getelementptr inbounds i8, ptr %7, i64 8
  %31 = getelementptr inbounds i8, ptr %8, i64 8
  %32 = getelementptr inbounds i8, ptr %9, i64 8
  %33 = getelementptr inbounds i8, ptr %10, i64 8
  br label %.loopexit61

._crit_edge97:                                    ; preds = %.loopexit61.thread, %25
  %34 = call noundef i64 @_ZN3DSU14CntofComponentEv(ptr noundef nonnull align 8 dereferenceable(64) %5)
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %34)
          to label %101 unwind label %104

36:                                               ; preds = %._crit_edge
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %108

38:                                               ; preds = %23
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %107

.loopexit61.loopexit:                             ; preds = %.critedge2, %57
  br label %.loopexit61

.loopexit61:                                      ; preds = %.loopexit61.loopexit, %.lr.ph96
  %.03794 = phi i64 [ %28, %.lr.ph96 ], [ %.088, %.loopexit61.loopexit ]
  %.03893 = phi i64 [ %26, %.lr.ph96 ], [ %.13985, %.loopexit61.loopexit ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %40 = getelementptr inbounds i64, ptr %14, i64 %.03794
  %41 = load i64, ptr %40, align 8, !tbaa !5
  %42 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %41)
          to label %43 unwind label %62

43:                                               ; preds = %.loopexit61
  %44 = extractvalue { ptr, i64 } %42, 0
  store ptr %44, ptr %6, align 8
  %45 = extractvalue { ptr, i64 } %42, 1
  store i64 %45, ptr %29, align 8
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %6, i1 noundef zeroext true) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  %47 = load i64, ptr %40, align 8, !tbaa !5
  %48 = icmp sgt i64 %.03794, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  br i1 %48, label %.lr.ph90.preheader, label %.loopexit61.thread

.lr.ph90.preheader:                               ; preds = %43
  %49 = add nsw i64 %47, 1
  br label %.lr.ph90

.lr.ph90:                                         ; preds = %.lr.ph90.preheader, %.loopexit
  %.088.in = phi i64 [ %.088, %.loopexit ], [ %.03794, %.lr.ph90.preheader ]
  %.03487 = phi i64 [ %spec.select60, %.loopexit ], [ %49, %.lr.ph90.preheader ]
  %.03586 = phi i64 [ %spec.select59, %.loopexit ], [ %47, %.lr.ph90.preheader ]
  %.13985 = phi i64 [ %.364, %.loopexit ], [ %.03893, %.lr.ph90.preheader ]
  %.088 = add nsw i64 %.088.in, -1
  %50 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.03487)
          to label %51 unwind label %64

51:                                               ; preds = %.lr.ph90
  %52 = extractvalue { ptr, i64 } %50, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i64 } %50, 1
  store i64 %53, ptr %30, align 8
  %54 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  br i1 %54, label %55, label %.critedge2

55:                                               ; preds = %51
  %56 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.13985)
          to label %57 unwind label %66

57:                                               ; preds = %55
  %58 = extractvalue { ptr, i64 } %56, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i64 } %56, 1
  store i64 %59, ptr %31, align 8
  %60 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  %61 = icmp slt i64 %.13985, %.03487
  %or.cond = select i1 %60, i1 true, i1 %61
  br i1 %or.cond, label %.loopexit61.loopexit, label %69, !llvm.loop !13

.critedge2:                                       ; preds = %51
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  %.old = icmp slt i64 %.13985, %.03487
  br i1 %.old, label %.loopexit61.loopexit, label %69, !llvm.loop !13

62:                                               ; preds = %.loopexit61
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %106

64:                                               ; preds = %.lr.ph90
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %68

66:                                               ; preds = %55
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %68

68:                                               ; preds = %66, %64
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %106

69:                                               ; preds = %57, %.critedge2
  %70 = getelementptr inbounds i64, ptr %14, i64 %.088
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = icmp eq i64 %71, %.13985
  %73 = sext i1 %72 to i64
  %spec.select = add nsw i64 %.13985, %73
  %74 = invoke noundef zeroext i1 @_ZN3DSU5UnionEll(ptr noundef nonnull align 8 dereferenceable(64) %5, i64 noundef %.03586, i64 noundef %71)
          to label %75 unwind label %86

75:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %76 = load i64, ptr %70, align 8, !tbaa !5
  %77 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %76)
          to label %78 unwind label %88

78:                                               ; preds = %75
  %79 = extractvalue { ptr, i64 } %77, 0
  store ptr %79, ptr %9, align 8
  %80 = extractvalue { ptr, i64 } %77, 1
  store i64 %80, ptr %32, align 8
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext true) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  %82 = load i64, ptr %70, align 8, !tbaa !5
  %83 = icmp slt i64 %82, %.03586
  %84 = add nsw i64 %82, 1
  %spec.select59 = call i64 @llvm.smin.i64(i64 %82, i64 %.03586)
  %spec.select60 = select i1 %83, i64 %84, i64 %.03487
  %85 = icmp sgt i64 %spec.select, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  br i1 %85, label %.lr.ph82, label %.critedge4

86:                                               ; preds = %69
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %106

88:                                               ; preds = %75
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %106

.lr.ph82:                                         ; preds = %78, %95
  %.380 = phi i64 [ %96, %95 ], [ %spec.select, %78 ]
  %90 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.380)
          to label %91 unwind label %98

91:                                               ; preds = %.lr.ph82
  %92 = extractvalue { ptr, i64 } %90, 0
  store ptr %92, ptr %10, align 8
  %93 = extractvalue { ptr, i64 } %90, 1
  store i64 %93, ptr %33, align 8
  %94 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br i1 %94, label %95, label %.loopexit

95:                                               ; preds = %91
  %96 = add nsw i64 %.380, -1
  %97 = icmp sgt i64 %.380, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  br i1 %97, label %.lr.ph82, label %.critedge4, !llvm.loop !14

98:                                               ; preds = %.lr.ph82
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %106

.critedge4:                                       ; preds = %95, %78
  %.3.lcssa = phi i64 [ %spec.select, %78 ], [ 0, %95 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %.loopexit

.loopexit:                                        ; preds = %91, %.critedge4
  %.364 = phi i64 [ %.3.lcssa, %.critedge4 ], [ %.380, %91 ]
  %100 = icmp sgt i64 %.088.in, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  br i1 %100, label %.lr.ph90, label %.loopexit61.thread, !llvm.loop !15

.loopexit61.thread:                               ; preds = %43, %.loopexit
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %._crit_edge97

101:                                              ; preds = %._crit_edge97
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @.str)
          to label %103 unwind label %104

103:                                              ; preds = %101
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #7
  call void @llvm.stackrestore.p0(ptr %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret void

104:                                              ; preds = %101, %._crit_edge97
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %106

106:                                              ; preds = %62, %98, %88, %86, %68, %104
  %.pn53.pn.pn = phi { ptr, i32 } [ %105, %104 ], [ %63, %62 ], [ %99, %98 ], [ %89, %88 ], [ %87, %86 ], [ %.pn, %68 ]
  call void @_ZN3DSUD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #7
  br label %107

107:                                              ; preds = %106, %38
  %.pn53.pn.pn.pn = phi { ptr, i32 } [ %.pn53.pn.pn, %106 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #7
  br label %108

108:                                              ; preds = %107, %36
  %.pn53.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn53.pn.pn.pn, %107 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn53.pn.pn.pn.pn
}

; 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 @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3DSUC2El(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3DSU5UnionEll(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef, i64 noundef) 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 #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3DSU14CntofComponentEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #6

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

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

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


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