; LLVM IR from xirc/cp-algorithm :: aoj/DSL/DSL1B (main_union-find-tree-generic)

; 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.UnionFindTree = type { i64, %"class.std::vector", %"class.std::function", %"class.std::function.0", %"class.std::function.3", %"class.std::function.5", %"class.std::function.7" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<UnionFindTree<Data, int>::node, std::allocator<UnionFindTree<Data, int>::node>>::_Vector_impl" }
%"struct.std::_Vector_base<UnionFindTree<Data, int>::node, std::allocator<UnionFindTree<Data, int>::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<UnionFindTree<Data, int>::node, std::allocator<UnionFindTree<Data, int>::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UnionFindTree<Data, int>::node, std::allocator<UnionFindTree<Data, int>::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.0" = type { %"class.std::_Function_base", ptr }
%"class.std::function.3" = type { %"class.std::_Function_base", ptr }
%"class.std::function.5" = type { %"class.std::_Function_base", ptr }
%"class.std::function.7" = type { %"class.std::_Function_base", ptr }
%class.anon = type { i8 }
%"struct.std::negate" = type { i8 }
%"struct.UnionFindTree<Data, int>::node" = type { i64, i64, %struct.Data }
%struct.Data = type { 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 norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %class.UnionFindTree, align 8
  %5 = alloca %"class.std::function", align 8
  %6 = alloca %class.anon, align 1
  %7 = alloca %"class.std::function.0", align 8
  %8 = alloca %"struct.std::negate", align 1
  %9 = alloca %"class.std::function.3", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::function.5", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.std::function.7", align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca %"struct.UnionFindTree<Data, int>::node", align 8
  %26 = alloca %"struct.UnionFindTree<Data, int>::node", align 8
  %27 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %28 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %29 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %30 = getelementptr i8, ptr %29, i64 -24
  %31 = load i64, ptr %30, align 8
  %32 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %31
  %33 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %32, ptr noundef null)
  %34 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %35 = getelementptr i8, ptr %34, i64 -24
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %36
  %38 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %37, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 192, ptr %4) #7
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = sext i32 %41 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  call void @_ZNSt8functionIF4DatamEEC2IZN13UnionFindTreeIS0_iEC1EmRKS2_RKS_IFiRKiEERKS_IFvRS0_RKS0_EERKS_IFvSE_SG_SG_S9_EERKS_IFvSE_SE_SG_SG_S9_EEEd3_UlmE_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  call void @_ZNSt8functionIFiRKiEEC2ISt6negateIiEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr @_ZN4Data8compressERS_RKS_, ptr %10, align 8, !tbaa !11
  call void @_ZNSt8functionIFvR4DataRKS0_EEC2IPS4_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr @_ZN4Data10unite_sameERS_RKS_S2_RKi, ptr %12, align 8, !tbaa !11
  call void @_ZNSt8functionIFvR4DataRKS0_S3_RKiEEC2IPS6_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr @_ZN4Data10unite_diffERS_S0_RKS_S2_i, ptr %14, align 8, !tbaa !11
  call void @_ZNSt8functionIFvR4DataS1_RKS0_S3_RKiEEC2IPFvS1_S1_S3_S3_iEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  invoke void @_ZN13UnionFindTreeI4DataiEC2EmRKSt8functionIFS0_mEERKS2_IFiRKiEERKS2_IFvRS0_RKS0_EERKS2_IFvSD_SF_SF_S8_EERKS2_IFvSD_SD_SF_SF_S8_EE(ptr noundef nonnull align 8 dereferenceable(192) %4, i64 noundef %42, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %43 unwind label %49

43:                                               ; preds = %0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %44

44:                                               ; preds = %141, %43
  %45 = load i32, ptr %17, align 4, !tbaa !8
  %46 = load i32, ptr %3, align 4, !tbaa !8
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %53, label %48

48:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %145

49:                                               ; preds = %0
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %15, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %16, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  br label %147

53:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %54 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %55 unwind label %72

55:                                               ; preds = %53
  %56 = load i32, ptr %18, align 4, !tbaa !8
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %80

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %59 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %60 unwind label %76

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %62 unwind label %76

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %64 unwind label %76

64:                                               ; preds = %62
  %65 = load i32, ptr %20, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = load i32, ptr %19, align 4, !tbaa !8
  %68 = sext i32 %67 to i64
  %69 = load i32, ptr %21, align 4, !tbaa !8
  %70 = invoke noundef zeroext i1 @_ZN13UnionFindTreeI4DataiE5uniteEmmi(ptr noundef nonnull align 8 dereferenceable(192) %4, i64 noundef %66, i64 noundef %68, i32 noundef %69)
          to label %71 unwind label %76

71:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %140

72:                                               ; preds = %138, %53
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %15, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %16, align 4
  br label %144

76:                                               ; preds = %64, %62, %60, %58
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %15, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %144

80:                                               ; preds = %55
  %81 = load i32, ptr %18, align 4, !tbaa !8
  %82 = icmp eq i32 %81, 1
  br i1 %82, label %83, label %138

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %84 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %85 unwind label %113

85:                                               ; preds = %83
  %86 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %84, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %87 unwind label %113

87:                                               ; preds = %85
  %88 = load i32, ptr %22, align 4, !tbaa !8
  %89 = sext i32 %88 to i64
  %90 = load i32, ptr %23, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = invoke noundef zeroext i1 @_ZN13UnionFindTreeI4DataiE4sameEmm(ptr noundef nonnull align 8 dereferenceable(192) %4, i64 noundef %89, i64 noundef %91)
          to label %93 unwind label %113

93:                                               ; preds = %87
  br i1 %92, label %94, label %131

94:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  %95 = load i32, ptr %22, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  invoke void @_ZN13UnionFindTreeI4DataiE4findEm(ptr dead_on_unwind writable sret(%"struct.UnionFindTree<Data, int>::node") align 8 %25, ptr noundef nonnull align 8 dereferenceable(192) %4, i64 noundef %96)
          to label %97 unwind label %117

97:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #7
  %98 = load i32, ptr %23, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  invoke void @_ZN13UnionFindTreeI4DataiE4findEm(ptr dead_on_unwind writable sret(%"struct.UnionFindTree<Data, int>::node") align 8 %26, ptr noundef nonnull align 8 dereferenceable(192) %4, i64 noundef %99)
          to label %100 unwind label %121

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %101 = getelementptr inbounds %"struct.UnionFindTree<Data, int>::node", ptr %26, i32 0, i32 2
  %102 = getelementptr inbounds %struct.Data, ptr %101, i32 0, i32 0
  %103 = load i64, ptr %102, align 8, !tbaa !13
  %104 = getelementptr inbounds %"struct.UnionFindTree<Data, int>::node", ptr %25, i32 0, i32 2
  %105 = getelementptr inbounds %struct.Data, ptr %104, i32 0, i32 0
  %106 = load i64, ptr %105, align 8, !tbaa !13
  %107 = sub nsw i64 %103, %106
  store i64 %107, ptr %27, align 8, !tbaa !18
  %108 = load i64, ptr %27, align 8, !tbaa !18
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %108)
          to label %110 unwind label %125

110:                                              ; preds = %100
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %112 unwind label %125

112:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  br label %136

113:                                              ; preds = %133, %131, %87, %85, %83
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %15, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %16, align 4
  br label %137

117:                                              ; preds = %94
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %15, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %16, align 4
  br label %130

121:                                              ; preds = %97
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %15, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %16, align 4
  br label %129

125:                                              ; preds = %110, %100
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %15, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %129

129:                                              ; preds = %125, %121
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #7
  br label %130

130:                                              ; preds = %129, %117
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  br label %137

131:                                              ; preds = %93
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %133 unwind label %113

133:                                              ; preds = %131
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %135 unwind label %113

135:                                              ; preds = %133
  br label %136

136:                                              ; preds = %135, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %139

137:                                              ; preds = %130, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %144

138:                                              ; preds = %80
  invoke void @__cxa_rethrow() #8
          to label %153 unwind label %72

139:                                              ; preds = %136
  br label %140

140:                                              ; preds = %139, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %17, align 4, !tbaa !8
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %17, align 4, !tbaa !8
  br label %44, !llvm.loop !19

144:                                              ; preds = %137, %76, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @_ZN13UnionFindTreeI4DataiED2Ev(ptr noundef nonnull align 8 dereferenceable(192) %4) #7
  br label %147

145:                                              ; preds = %48
  store i32 0, ptr %1, align 4
  call void @_ZN13UnionFindTreeI4DataiED2Ev(ptr noundef nonnull align 8 dereferenceable(192) %4) #7
  call void @llvm.lifetime.end.p0(i64 192, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %146 = load i32, ptr %1, align 4
  ret i32 %146

147:                                              ; preds = %144, %49
  call void @llvm.lifetime.end.p0(i64 192, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %15, align 8
  %150 = load i32, ptr %16, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152

153:                                              ; preds = %138
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13UnionFindTreeI4DataiEC2EmRKSt8functionIFS0_mEERKS2_IFiRKiEERKS2_IFvRS0_RKS0_EERKS2_IFvSD_SF_SF_S8_EERKS2_IFvSD_SD_SF_SF_S8_EE(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13UnionFindTreeI4DataiE5uniteEmmi(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef, i64 noundef, i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13UnionFindTreeI4DataiE4sameEmm(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef, i64 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13UnionFindTreeI4DataiE4findEm(ptr dead_on_unwind noalias writable sret(%"struct.UnionFindTree<Data, int>::node") align 8, ptr noundef nonnull align 8 dereferenceable(192), i64 noundef) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

declare void @__cxa_rethrow()

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13UnionFindTreeI4DataiED2Ev(ptr noundef nonnull align 8 dereferenceable(192)) unnamed_addr #6 align 2

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!14, !17, i64 16}
!14 = !{!"_ZTSN13UnionFindTreeI4DataiE4nodeE", !15, i64 0, !15, i64 8, !16, i64 16}
!15 = !{!"long", !10, i64 0}
!16 = !{!"_ZTS4Data", !17, i64 0}
!17 = !{!"long long", !10, i64 0}
!18 = !{!17, !17, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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.UnionFindTree = type { i64, %"class.std::vector", %"class.std::function", %"class.std::function.0", %"class.std::function.3", %"class.std::function.5", %"class.std::function.7" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<UnionFindTree<Data, int>::node, std::allocator<UnionFindTree<Data, int>::node>>::_Vector_impl" }
%"struct.std::_Vector_base<UnionFindTree<Data, int>::node, std::allocator<UnionFindTree<Data, int>::node>>::_Vector_impl" = type { %"struct.std::_Vector_base<UnionFindTree<Data, int>::node, std::allocator<UnionFindTree<Data, int>::node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<UnionFindTree<Data, int>::node, std::allocator<UnionFindTree<Data, int>::node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.0" = type { %"class.std::_Function_base", ptr }
%"class.std::function.3" = type { %"class.std::_Function_base", ptr }
%"class.std::function.5" = type { %"class.std::_Function_base", ptr }
%"class.std::function.7" = type { %"class.std::_Function_base", ptr }
%class.anon = type { i8 }
%"struct.std::negate" = type { i8 }
%"struct.UnionFindTree<Data, int>::node" = type { i64, i64, %struct.Data }
%struct.Data = type { 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %class.UnionFindTree, align 8
  %4 = alloca %"class.std::function", align 8
  %5 = alloca %class.anon, align 1
  %6 = alloca %"class.std::function.0", align 8
  %7 = alloca %"struct.std::negate", align 1
  %8 = alloca %"class.std::function.3", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::function.5", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::function.7", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.UnionFindTree<Data, int>::node", align 8
  %21 = alloca %"struct.UnionFindTree<Data, int>::node", align 8
  %22 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %23 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %24 = getelementptr i8, ptr %23, i64 -24
  %25 = load i64, ptr %24, align 8
  %26 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %25
  %27 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %26, ptr noundef null)
  %28 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %29 = getelementptr i8, ptr %28, i64 -24
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %30
  %32 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %31, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %3) #7
  %35 = load i32, ptr %1, align 4, !tbaa !8
  %36 = sext i32 %35 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSt8functionIF4DatamEEC2IZN13UnionFindTreeIS0_iEC1EmRKS2_RKS_IFiRKiEERKS_IFvRS0_RKS0_EERKS_IFvSE_SG_SG_S9_EERKS_IFvSE_SE_SG_SG_S9_EEEd3_UlmE_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSt8functionIFiRKiEEC2ISt6negateIiEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store ptr @_ZN4Data8compressERS_RKS_, ptr %9, align 8, !tbaa !11
  call void @_ZNSt8functionIFvR4DataRKS0_EEC2IPS4_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store ptr @_ZN4Data10unite_sameERS_RKS_S2_RKi, ptr %11, align 8, !tbaa !11
  call void @_ZNSt8functionIFvR4DataRKS0_S3_RKiEEC2IPS6_vEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  store ptr @_ZN4Data10unite_diffERS_S0_RKS_S2_i, ptr %13, align 8, !tbaa !11
  call void @_ZNSt8functionIFvR4DataS1_RKS0_S3_RKiEEC2IPFvS1_S1_S3_S3_iEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  invoke void @_ZN13UnionFindTreeI4DataiEC2EmRKSt8functionIFS0_mEERKS2_IFiRKiEERKS2_IFvRS0_RKS0_EERKS2_IFvSD_SF_SF_S8_EERKS2_IFvSD_SD_SF_SF_S8_EE(ptr noundef nonnull align 8 dereferenceable(192) %3, i64 noundef %36, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %37 unwind label %42

37:                                               ; preds = %0
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %37
  %40 = getelementptr inbounds i8, ptr %21, i64 16
  %41 = getelementptr inbounds i8, ptr %20, i64 16
  br label %44

._crit_edge:                                      ; preds = %106, %37
  call void @_ZN13UnionFindTreeI4DataiED2Ev(ptr noundef nonnull align 8 dereferenceable(192) %3) #7
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

42:                                               ; preds = %0
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %111

44:                                               ; preds = %.lr.ph, %106
  %.0518 = phi i32 [ 0, %.lr.ph ], [ %107, %106 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %45 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %46 unwind label %.loopexit

46:                                               ; preds = %44
  %47 = load i32, ptr %14, align 4, !tbaa !8
  switch i32 %47, label %105 [
    i32 0, label %48
    i32 1, label %64
  ]

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %50 unwind label %62

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %52 unwind label %62

52:                                               ; preds = %50
  %53 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %54 unwind label %62

54:                                               ; preds = %52
  %55 = load i32, ptr %16, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = load i32, ptr %15, align 4, !tbaa !8
  %58 = sext i32 %57 to i64
  %59 = load i32, ptr %17, align 4, !tbaa !8
  %60 = invoke noundef zeroext i1 @_ZN13UnionFindTreeI4DataiE5uniteEmmi(ptr noundef nonnull align 8 dereferenceable(192) %3, i64 noundef %56, i64 noundef %58, i32 noundef %59)
          to label %61 unwind label %62

61:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %106

.loopexit:                                        ; preds = %44
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %110

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

62:                                               ; preds = %54, %52, %50, %48
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  br label %110

64:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  %65 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %66 unwind label %89

66:                                               ; preds = %64
  %67 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %68 unwind label %89

68:                                               ; preds = %66
  %69 = load i32, ptr %18, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = load i32, ptr %19, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = invoke noundef zeroext i1 @_ZN13UnionFindTreeI4DataiE4sameEmm(ptr noundef nonnull align 8 dereferenceable(192) %3, i64 noundef %70, i64 noundef %72)
          to label %74 unwind label %89

74:                                               ; preds = %68
  br i1 %73, label %75, label %99

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #7
  %76 = load i32, ptr %18, align 4, !tbaa !8
  %77 = sext i32 %76 to i64
  invoke void @_ZN13UnionFindTreeI4DataiE4findEm(ptr dead_on_unwind nonnull writable sret(%"struct.UnionFindTree<Data, int>::node") align 8 %20, ptr noundef nonnull align 8 dereferenceable(192) %3, i64 noundef %77)
          to label %78 unwind label %91

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #7
  %79 = load i32, ptr %19, align 4, !tbaa !8
  %80 = sext i32 %79 to i64
  invoke void @_ZN13UnionFindTreeI4DataiE4findEm(ptr dead_on_unwind nonnull writable sret(%"struct.UnionFindTree<Data, int>::node") align 8 %21, ptr noundef nonnull align 8 dereferenceable(192) %3, i64 noundef %80)
          to label %81 unwind label %93

81:                                               ; preds = %78
  %82 = load i64, ptr %40, align 8, !tbaa !13
  %83 = load i64, ptr %41, align 8, !tbaa !13
  %84 = sub nsw i64 %82, %83
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %84)
          to label %86 unwind label %95

86:                                               ; preds = %81
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %88 unwind label %95

88:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #7
  br label %103

89:                                               ; preds = %101, %99, %68, %66, %64
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %104

91:                                               ; preds = %75
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %98

93:                                               ; preds = %78
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

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

97:                                               ; preds = %95, %93
  %.pn = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #7
  br label %98

98:                                               ; preds = %97, %91
  %.pn.pn = phi { ptr, i32 } [ %.pn, %97 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #7
  br label %104

99:                                               ; preds = %74
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %101 unwind label %89

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %103 unwind label %89

103:                                              ; preds = %101, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  br label %106

104:                                              ; preds = %98, %89
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %98 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  br label %110

105:                                              ; preds = %46
  invoke void @__cxa_rethrow() #8
          to label %112 unwind label %.loopexit.split-lp

106:                                              ; preds = %103, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  %107 = add nuw nsw i32 %.0518, 1
  %108 = load i32, ptr %2, align 4, !tbaa !8
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %44, label %._crit_edge, !llvm.loop !18

110:                                              ; preds = %.loopexit, %.loopexit.split-lp, %104, %62
  %.pn15 = phi { ptr, i32 } [ %63, %62 ], [ %.pn.pn.pn, %104 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @_ZN13UnionFindTreeI4DataiED2Ev(ptr noundef nonnull align 8 dereferenceable(192) %3) #7
  br label %111

111:                                              ; preds = %110, %42
  %.pn15.pn = phi { ptr, i32 } [ %.pn15, %110 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn15.pn

112:                                              ; preds = %105
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13UnionFindTreeI4DataiEC2EmRKSt8functionIFS0_mEERKS2_IFiRKiEERKS2_IFvRS0_RKS0_EERKS2_IFvSD_SF_SF_S8_EERKS2_IFvSD_SD_SF_SF_S8_EE(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13UnionFindTreeI4DataiE5uniteEmmi(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13UnionFindTreeI4DataiE4sameEmm(ptr noundef nonnull align 8 dereferenceable(192), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13UnionFindTreeI4DataiE4findEm(ptr dead_on_unwind noalias writable sret(%"struct.UnionFindTree<Data, int>::node") align 8, ptr noundef nonnull align 8 dereferenceable(192), i64 noundef) local_unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

declare void @__cxa_rethrow() local_unnamed_addr

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13UnionFindTreeI4DataiED2Ev(ptr noundef nonnull align 8 dereferenceable(192)) unnamed_addr #6 align 2

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!14, !17, i64 16}
!14 = !{!"_ZTSN13UnionFindTreeI4DataiE4nodeE", !15, i64 0, !15, i64 8, !16, i64 16}
!15 = !{!"long", !10, i64 0}
!16 = !{!"_ZTS4Data", !17, i64 0}
!17 = !{!"long long", !10, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass