; LLVM IR from kazunetakahashi/atcoder :: 2019/1109_nikkei2019-2-qual/F.ll (Z8calc_oddiRSt6vectorIS_I5StateSaIS0_EESaIS2_EEi)

; 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.Mint = type { i64 }
%class.UnionFind = type { i32, %"class.std::vector.13" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = 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.22" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

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

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

declare i32 @__gxx_personality_v0(...)

; 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 noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

28:                                               ; preds = %68, %3
  %29 = load i32, ptr %10, align 4, !tbaa !5
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %71

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %34 = load i32, ptr %10, align 4, !tbaa !5
  %35 = add nsw i32 %34, 2
  store i32 %35, ptr %12, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %64, %33
  %37 = load i32, ptr %12, align 4, !tbaa !5
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %67

41:                                               ; preds = %36
  %42 = load ptr, ptr %6, align 8, !tbaa !9
  %43 = load i32, ptr %10, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %44) #4
  %46 = load i32, ptr %12, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %47) #4
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = icmp eq i32 %49, 3
  br i1 %50, label %51, label %63

51:                                               ; preds = %41
  %52 = load i32, ptr %10, align 4, !tbaa !5
  %53 = load i32, ptr %12, align 4, !tbaa !5
  %54 = invoke noundef zeroext i1 @_ZN9UnionFind5mergeEii(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %52, i32 noundef %53)
          to label %55 unwind label %59

55:                                               ; preds = %51
  br i1 %54, label %63, label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %8, align 4, !tbaa !5
  br label %63

59:                                               ; preds = %51
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %13, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %215

63:                                               ; preds = %56, %55, %41
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = add nsw i32 %65, 2
  store i32 %66, ptr %12, align 4, !tbaa !5
  br label %36, !llvm.loop !13

67:                                               ; preds = %40
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %10, align 4, !tbaa !5
  %70 = add nsw i32 %69, 2
  store i32 %70, ptr %10, align 4, !tbaa !5
  br label %28, !llvm.loop !15

71:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #4
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  store i8 0, ptr %16, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %15, i64 noundef %73, ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %74 unwind label %81

74:                                               ; preds = %71
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %75 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %75, ptr %18, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %195, %74
  %77 = load i32, ptr %18, align 4, !tbaa !5
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %85, label %80

80:                                               ; preds = %76
  store i32 8, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %200

81:                                               ; preds = %71
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %13, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  br label %214

85:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %86 = load i32, ptr %18, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %15, i64 noundef %87)
          to label %89 unwind label %96

89:                                               ; preds = %85
  %90 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %91 = extractvalue { ptr, i64 } %88, 0
  store ptr %91, ptr %90, align 8
  %92 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %93 = extractvalue { ptr, i64 } %88, 1
  store i64 %93, ptr %92, align 8
  %94 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %19) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  br i1 %94, label %95, label %100

95:                                               ; preds = %89
  br label %195

96:                                               ; preds = %85
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %13, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  br label %199

100:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %101 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %101, ptr %20, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %131, %100
  %103 = load i32, ptr %20, align 4, !tbaa !5
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 11, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %135

107:                                              ; preds = %102
  %108 = load i32, ptr %18, align 4, !tbaa !5
  %109 = load i32, ptr %20, align 4, !tbaa !5
  %110 = invoke noundef zeroext i1 @_ZN9UnionFind7is_sameEii(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %108, i32 noundef %109)
          to label %111 unwind label %122

111:                                              ; preds = %107
  br i1 %110, label %112, label %130

112:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  %113 = load i32, ptr %20, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %15, i64 noundef %114)
          to label %116 unwind label %126

116:                                              ; preds = %112
  %117 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %118 = extractvalue { ptr, i64 } %115, 0
  store ptr %118, ptr %117, align 8
  %119 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %120 = extractvalue { ptr, i64 } %115, 1
  store i64 %120, ptr %119, align 8
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %21, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  br label %130

122:                                              ; preds = %107
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %13, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %14, align 4
  br label %134

126:                                              ; preds = %112
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %13, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  br label %134

130:                                              ; preds = %116, %111
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %20, align 4, !tbaa !5
  %133 = add nsw i32 %132, 2
  store i32 %133, ptr %20, align 4, !tbaa !5
  br label %102, !llvm.loop !18

134:                                              ; preds = %126, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %199

135:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  store i32 0, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %136 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %136, ptr %23, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %181, %135
  %138 = load i32, ptr %23, align 4, !tbaa !5
  %139 = load i32, ptr %5, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  store i32 14, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %184

142:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %143 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %143, ptr %24, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %177, %142
  %145 = load i32, ptr %24, align 4, !tbaa !5
  %146 = load i32, ptr %5, align 4, !tbaa !5
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 17, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %180

149:                                              ; preds = %144
  %150 = load i32, ptr %18, align 4, !tbaa !5
  %151 = load i32, ptr %23, align 4, !tbaa !5
  %152 = invoke noundef zeroext i1 @_ZN9UnionFind7is_sameEii(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %150, i32 noundef %151)
          to label %153 unwind label %172

153:                                              ; preds = %149
  br i1 %152, label %154, label %176

154:                                              ; preds = %153
  %155 = load i32, ptr %18, align 4, !tbaa !5
  %156 = load i32, ptr %24, align 4, !tbaa !5
  %157 = invoke noundef zeroext i1 @_ZN9UnionFind7is_sameEii(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %155, i32 noundef %156)
          to label %158 unwind label %172

158:                                              ; preds = %154
  br i1 %157, label %176, label %159

159:                                              ; preds = %158
  %160 = load ptr, ptr %6, align 8, !tbaa !9
  %161 = load i32, ptr %23, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef %162) #4
  %164 = load i32, ptr %24, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %165) #4
  %167 = load i32, ptr %166, align 4, !tbaa !11
  %168 = icmp eq i32 %167, 1
  br i1 %168, label %169, label %176

169:                                              ; preds = %159
  %170 = load i32, ptr %22, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %22, align 4, !tbaa !5
  br label %176

172:                                              ; preds = %154, %149
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %13, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %198

176:                                              ; preds = %169, %159, %158, %153
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %24, align 4, !tbaa !5
  %179 = add nsw i32 %178, 2
  store i32 %179, ptr %24, align 4, !tbaa !5
  br label %144, !llvm.loop !19

180:                                              ; preds = %148
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %23, align 4, !tbaa !5
  %183 = add nsw i32 %182, 2
  store i32 %183, ptr %23, align 4, !tbaa !5
  br label %137, !llvm.loop !20

184:                                              ; preds = %141
  %185 = load i32, ptr %22, align 4, !tbaa !5
  %186 = srem i32 %185, 2
  %187 = icmp eq i32 %186, 1
  br i1 %187, label %188, label %194

188:                                              ; preds = %184
  invoke void @_Z2Nov()
          to label %189 unwind label %190

189:                                              ; preds = %188
  br label %194

190:                                              ; preds = %188
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %13, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %14, align 4
  br label %198

194:                                              ; preds = %189, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %195

195:                                              ; preds = %194, %95
  %196 = load i32, ptr %18, align 4, !tbaa !5
  %197 = add nsw i32 %196, 2
  store i32 %197, ptr %18, align 4, !tbaa !5
  br label %76, !llvm.loop !21

198:                                              ; preds = %190, %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %199

199:                                              ; preds = %198, %134, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %213

200:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  invoke void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %25, i64 noundef 2)
          to label %201 unwind label %209

201:                                              ; preds = %200
  %202 = load i32, ptr %8, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = invoke i64 @_ZN4MintILx998244353EE5powerEx(ptr noundef nonnull align 8 dereferenceable(8) %25, i64 noundef %203)
          to label %205 unwind label %209

205:                                              ; preds = %201
  %206 = getelementptr inbounds %class.Mint, ptr %4, i32 0, i32 0
  store i64 %204, ptr %206, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  store i32 1, ptr %11, align 4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  call void @_ZN9UnionFindD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %207 = getelementptr inbounds %class.Mint, ptr %4, i32 0, i32 0
  %208 = load i64, ptr %207, align 8
  ret i64 %208

209:                                              ; preds = %201, %200
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %13, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %213

213:                                              ; preds = %209, %199
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #4
  br label %214

214:                                              ; preds = %213, %81
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #4
  br label %215

215:                                              ; preds = %214, %59
  call void @_ZN9UnionFindD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %216

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9UnionFindC2Ei(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9UnionFind5mergeEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9UnionFind7is_sameEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 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) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9UnionFindD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 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 = { 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 #3 = { 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 #4 = { nounwind }

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

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


; 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.UnionFind = type { i32, %"class.std::vector.13" }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = 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.22" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%class.Mint = type { i64 }

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

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

declare i32 @__gxx_personality_v0(...)

; 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 noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local i64 @_Z8calc_oddiRSt6vectorIS_I5StateSaIS0_EESaIS2_EEi(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.UnionFind, align 8
  %5 = alloca %"class.std::vector.18", align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.std::allocator.22", align 1
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %class.Mint, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @_ZN9UnionFindC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %0)
  %11 = icmp slt i32 %2, %0
  br i1 %11, label %.lr.ph86.preheader, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %3
  %.pre = sext i32 %0 to i64
  br label %._crit_edge

.lr.ph86.preheader:                               ; preds = %3
  %12 = add i32 %2, 2
  %13 = sext i32 %12 to i64
  %14 = sext i32 %0 to i64
  %15 = sext i32 %2 to i64
  br label %.lr.ph86

.loopexit:                                        ; preds = %31
  %indvars.iv.next = add i64 %indvars.iv, 2
  br i1 %17, label %.lr.ph86, label %._crit_edge.loopexit, !llvm.loop !5

._crit_edge.loopexit:                             ; preds = %.loopexit, %.lr.ph86
  %.062.lcssa.ph = phi i32 [ %.06284, %.lr.ph86 ], [ %.264, %.loopexit ]
  %16 = sext i32 %.062.lcssa.ph to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %14, %._crit_edge.loopexit ]
  %.062.lcssa = phi i64 [ 0, %.._crit_edge_crit_edge ], [ %16, %._crit_edge.loopexit ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  store i8 0, ptr %6, align 1, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %.pre-phi, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %33 unwind label %84

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %.loopexit
  %indvars.iv128 = phi i64 [ %15, %.lr.ph86.preheader ], [ %indvars.iv.next129, %.loopexit ]
  %indvars.iv = phi i64 [ %13, %.lr.ph86.preheader ], [ %indvars.iv.next, %.loopexit ]
  %.06284 = phi i32 [ 0, %.lr.ph86.preheader ], [ %.264, %.loopexit ]
  %indvars.iv.next129 = add nsw i64 %indvars.iv128, 2
  %17 = icmp slt i64 %indvars.iv.next129, %14
  br i1 %17, label %.lr.ph, label %._crit_edge.loopexit

.lr.ph:                                           ; preds = %.lr.ph86
  %18 = trunc nsw i64 %indvars.iv128 to i32
  br label %19

19:                                               ; preds = %.lr.ph, %31
  %indvars.iv125 = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv.next126, %31 ]
  %.16382 = phi i32 [ %.06284, %.lr.ph ], [ %.264, %31 ]
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv128) #4
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv125) #4
  %22 = load i32, ptr %21, align 4, !tbaa !11
  %23 = icmp eq i32 %22, 3
  br i1 %23, label %24, label %31

24:                                               ; preds = %19
  %25 = trunc nsw i64 %indvars.iv125 to i32
  %26 = invoke noundef zeroext i1 @_ZN9UnionFind5mergeEii(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %18, i32 noundef %25)
          to label %27 unwind label %29

27:                                               ; preds = %24
  %not. = xor i1 %26, true
  %28 = zext i1 %not. to i32
  %spec.select = add nsw i32 %.16382, %28
  br label %31

29:                                               ; preds = %24
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %91

31:                                               ; preds = %27, %19
  %.264 = phi i32 [ %.16382, %19 ], [ %spec.select, %27 ]
  %indvars.iv.next126 = add nsw i64 %indvars.iv125, 2
  %32 = icmp slt i64 %indvars.iv.next126, %14
  br i1 %32, label %19, label %.loopexit, !llvm.loop !13

33:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  br i1 %11, label %.lr.ph103, label %._crit_edge104

.lr.ph103:                                        ; preds = %33
  %34 = getelementptr inbounds i8, ptr %8, i64 8
  %35 = getelementptr inbounds i8, ptr %9, i64 8
  %36 = sext i32 %2 to i64
  br label %37

37:                                               ; preds = %55, %.lr.ph103
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %55 ], [ %36, %.lr.ph103 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  %38 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %indvars.iv140)
          to label %39 unwind label %.split.us105

39:                                               ; preds = %37
  %40 = extractvalue { ptr, i64 } %38, 0
  store ptr %40, ptr %8, align 8
  %41 = extractvalue { ptr, i64 } %38, 1
  store i64 %41, ptr %34, align 8
  %42 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br i1 %42, label %55, label %.lr.ph89.us.preheader

43:                                               ; preds = %._crit_edge97.split.us.us
  invoke void @_Z2Nov()
          to label %55 unwind label %.split107.us

.lr.ph89.us:                                      ; preds = %.lr.ph89.us.preheader, %53
  %indvars.iv131 = phi i64 [ %36, %.lr.ph89.us.preheader ], [ %indvars.iv.next132, %53 ]
  %44 = trunc nsw i64 %indvars.iv131 to i32
  %45 = invoke noundef zeroext i1 @_ZN9UnionFind7is_sameEii(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %58, i32 noundef %44)
          to label %46 unwind label %.split110.us

46:                                               ; preds = %.lr.ph89.us
  br i1 %45, label %47, label %53

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  %48 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %5, i64 noundef %indvars.iv131)
          to label %49 unwind label %.split113.us

49:                                               ; preds = %47
  %50 = extractvalue { ptr, i64 } %48, 0
  store ptr %50, ptr %9, align 8
  %51 = extractvalue { ptr, i64 } %48, 1
  store i64 %51, ptr %35, align 8
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  br label %53

53:                                               ; preds = %49, %46
  %indvars.iv.next132 = add nsw i64 %indvars.iv131, 2
  %54 = icmp slt i64 %indvars.iv.next132, %.pre-phi
  br i1 %54, label %.lr.ph89.us, label %.preheader76.us, !llvm.loop !14

55:                                               ; preds = %43, %._crit_edge97.split.us.us, %39
  %indvars.iv.next141 = add nsw i64 %indvars.iv140, 2
  %56 = icmp slt i64 %indvars.iv.next141, %.pre-phi
  br i1 %56, label %37, label %._crit_edge104, !llvm.loop !15

.preheader76.us:                                  ; preds = %53
  %57 = trunc nsw i64 %indvars.iv140 to i32
  br label %.preheader.us.us

.lr.ph89.us.preheader:                            ; preds = %39
  %58 = trunc nsw i64 %indvars.iv140 to i32
  br label %.lr.ph89.us

.preheader.us.us:                                 ; preds = %._crit_edge93.us.us, %.preheader76.us
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %._crit_edge93.us.us ], [ %36, %.preheader76.us ]
  %.04895.us.us = phi i32 [ %.2.us.us, %._crit_edge93.us.us ], [ 0, %.preheader76.us ]
  %59 = trunc nsw i64 %indvars.iv137 to i32
  br label %60

60:                                               ; preds = %73, %.preheader.us.us
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %73 ], [ %36, %.preheader.us.us ]
  %.190.us.us = phi i32 [ %.2.us.us, %73 ], [ %.04895.us.us, %.preheader.us.us ]
  %61 = invoke noundef zeroext i1 @_ZN9UnionFind7is_sameEii(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %57, i32 noundef %59)
          to label %62 unwind label %.split.us.split.us

62:                                               ; preds = %60
  br i1 %61, label %63, label %73

63:                                               ; preds = %62
  %64 = trunc nsw i64 %indvars.iv134 to i32
  %65 = invoke noundef zeroext i1 @_ZN9UnionFind7is_sameEii(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %57, i32 noundef %64)
          to label %66 unwind label %.split.us.split.us

66:                                               ; preds = %63
  br i1 %65, label %73, label %67

67:                                               ; preds = %66
  %68 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I5StateSaIS0_EESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv137) #4
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI5StateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %indvars.iv134) #4
  %70 = load i32, ptr %69, align 4, !tbaa !11
  %71 = icmp eq i32 %70, 1
  %72 = zext i1 %71 to i32
  %spec.select75.us.us = add nsw i32 %.190.us.us, %72
  br label %73

73:                                               ; preds = %67, %66, %62
  %.2.us.us = phi i32 [ %.190.us.us, %66 ], [ %.190.us.us, %62 ], [ %spec.select75.us.us, %67 ]
  %indvars.iv.next135 = add nsw i64 %indvars.iv134, 2
  %74 = icmp slt i64 %indvars.iv.next135, %.pre-phi
  br i1 %74, label %60, label %._crit_edge93.us.us, !llvm.loop !16

._crit_edge93.us.us:                              ; preds = %73
  %indvars.iv.next138 = add nsw i64 %indvars.iv137, 2
  %75 = icmp slt i64 %indvars.iv.next138, %.pre-phi
  br i1 %75, label %.preheader.us.us, label %._crit_edge97.split.us.us, !llvm.loop !17

._crit_edge97.split.us.us:                        ; preds = %._crit_edge93.us.us
  %76 = and i32 %.2.us.us, -2147483647
  %77 = icmp eq i32 %76, 1
  br i1 %77, label %43, label %55

.split.us105:                                     ; preds = %37
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br label %89

.split107.us:                                     ; preds = %43
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %89

.split110.us:                                     ; preds = %.lr.ph89.us
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %89

.split113.us:                                     ; preds = %47
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  br label %89

.split.us.split.us:                               ; preds = %63, %60
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %89

._crit_edge104:                                   ; preds = %55, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @_ZN4MintILx998244353EEC2Ex(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef 2)
  %83 = invoke i64 @_ZN4MintILx998244353EE5powerEx(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef %.062.lcssa)
          to label %86 unwind label %87

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

86:                                               ; preds = %._crit_edge104
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  call void @_ZN9UnionFindD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  ret i64 %83

87:                                               ; preds = %._crit_edge104
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %89

89:                                               ; preds = %.split110.us, %.split.us105, %.split113.us, %.split107.us, %.split.us.split.us, %87
  %.pn68.pn.pn = phi { ptr, i32 } [ %88, %87 ], [ %78, %.split.us105 ], [ %81, %.split113.us ], [ %82, %.split.us.split.us ], [ %79, %.split107.us ], [ %80, %.split110.us ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #4
  br label %90

90:                                               ; preds = %89, %84
  %.pn68.pn.pn.pn = phi { ptr, i32 } [ %.pn68.pn.pn, %89 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #4
  br label %91

91:                                               ; preds = %90, %29
  %.pn73 = phi { ptr, i32 } [ %30, %29 ], [ %.pn68.pn.pn.pn, %90 ]
  call void @_ZN9UnionFindD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn73
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9UnionFindC2Ei(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9UnionFind5mergeEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9UnionFind7is_sameEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 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 #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9UnionFindD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"bool", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS5State", !9, i64 0}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}
!16 = distinct !{!16, !6}
!17 = distinct !{!17, !6}


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