; LLVM IR from yanglr/leetcode-ac :: cpp-leetcode (leetcode430-flatten-a-multilevel-doubly-linked-list_dfs1)

; 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_ostream" = type { ptr, %"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.Solution = type { i8 }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%class.Node = type { i32, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [126 x i8], align 1
@constinit = external hidden constant [6 x i32], align 4
@constinit.3 = external hidden constant [12 x i32], align 4
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z14gengerateNodesSt6vectorIiSaIiEE(ptr noundef) #0

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11getNodeValsP4Node(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef) #0

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #6 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %class.Solution, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::initializer_list", align 8
  %9 = alloca [6 x i32], align 4
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.std::initializer_list", align 8
  %16 = alloca [4 x i32], align 4
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca ptr, align 8
  %19 = alloca %"class.std::vector", align 8
  %20 = alloca %"class.std::initializer_list", align 8
  %21 = alloca [2 x i32], align 4
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.std::initializer_list", align 8
  %24 = alloca [12 x i32], align 4
  %25 = alloca %"class.std::vector", align 8
  %26 = alloca %"class.std::initializer_list", align 8
  %27 = alloca [3 x i32], align 4
  %28 = alloca %"class.std::vector", align 8
  %29 = alloca %"class.std::initializer_list", align 8
  %30 = alloca %"class.std::vector", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #9
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 @constinit, i64 24, i1 false), !tbaa.struct !5
  %31 = getelementptr inbounds %"class.std::initializer_list", ptr %8, i32 0, i32 0
  store ptr %9, ptr %31, align 8, !tbaa !9
  %32 = getelementptr inbounds %"class.std::initializer_list", ptr %8, i32 0, i32 1
  store i64 6, ptr %32, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  %33 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %36 = load i64, ptr %35, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr %34, i64 %36, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %37 unwind label %92

37:                                               ; preds = %0
  %38 = invoke noundef ptr @_Z14gengerateNodesSt6vectorIiSaIiEE(ptr noundef %7)
          to label %39 unwind label %96

39:                                               ; preds = %37
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  store ptr %38, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #9
  store i32 7, ptr %16, align 4, !tbaa !15
  %40 = getelementptr inbounds i32, ptr %16, i64 1
  store i32 8, ptr %40, align 4, !tbaa !15
  %41 = getelementptr inbounds i32, ptr %16, i64 2
  store i32 9, ptr %41, align 4, !tbaa !15
  %42 = getelementptr inbounds i32, ptr %16, i64 3
  store i32 10, ptr %42, align 4, !tbaa !15
  %43 = getelementptr inbounds %"class.std::initializer_list", ptr %15, i32 0, i32 0
  store ptr %16, ptr %43, align 8, !tbaa !9
  %44 = getelementptr inbounds %"class.std::initializer_list", ptr %15, i32 0, i32 1
  store i64 4, ptr %44, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  %45 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8
  %47 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %48 = load i64, ptr %47, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr %46, i64 %48, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %49 unwind label %101

49:                                               ; preds = %39
  %50 = invoke noundef ptr @_Z14gengerateNodesSt6vectorIiSaIiEE(ptr noundef %14)
          to label %51 unwind label %105

51:                                               ; preds = %49
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #9
  store ptr %50, ptr %13, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  store i32 11, ptr %21, align 4, !tbaa !15
  %52 = getelementptr inbounds i32, ptr %21, i64 1
  store i32 12, ptr %52, align 4, !tbaa !15
  %53 = getelementptr inbounds %"class.std::initializer_list", ptr %20, i32 0, i32 0
  store ptr %21, ptr %53, align 8, !tbaa !9
  %54 = getelementptr inbounds %"class.std::initializer_list", ptr %20, i32 0, i32 1
  store i64 2, ptr %54, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #9
  %55 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8
  %57 = getelementptr inbounds { ptr, i64 }, ptr %20, i32 0, i32 1
  %58 = load i64, ptr %57, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr %56, i64 %58, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %59 unwind label %110

59:                                               ; preds = %51
  %60 = invoke noundef ptr @_Z14gengerateNodesSt6vectorIiSaIiEE(ptr noundef %19)
          to label %61 unwind label %114

61:                                               ; preds = %59
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  store ptr %60, ptr %18, align 8, !tbaa !14
  %62 = load ptr, ptr %13, align 8, !tbaa !14
  %63 = load ptr, ptr %6, align 8, !tbaa !14
  %64 = getelementptr inbounds %class.Node, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  %66 = getelementptr inbounds %class.Node, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  %68 = getelementptr inbounds %class.Node, ptr %67, i32 0, i32 3
  store ptr %62, ptr %68, align 8, !tbaa !19
  %69 = load ptr, ptr %18, align 8, !tbaa !14
  %70 = load ptr, ptr %13, align 8, !tbaa !14
  %71 = getelementptr inbounds %class.Node, ptr %70, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = getelementptr inbounds %class.Node, ptr %72, i32 0, i32 3
  store ptr %69, ptr %73, align 8, !tbaa !19
  %74 = load ptr, ptr %6, align 8, !tbaa !14
  store ptr %74, ptr %3, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 48, ptr %24) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 @constinit.3, i64 48, i1 false), !tbaa.struct !20
  %75 = getelementptr inbounds %"class.std::initializer_list", ptr %23, i32 0, i32 0
  store ptr %24, ptr %75, align 8, !tbaa !9
  %76 = getelementptr inbounds %"class.std::initializer_list", ptr %23, i32 0, i32 1
  store i64 12, ptr %76, align 8, !tbaa !13
  %77 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8
  %79 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %80 = load i64, ptr %79, align 8
  %81 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr %78, i64 %80)
          to label %82 unwind label %119

82:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 48, ptr %24) #9
  %83 = load ptr, ptr %3, align 8, !tbaa !14
  %84 = invoke noundef ptr @_ZN8Solution7flattenEP4Node(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef %83)
          to label %85 unwind label %123

85:                                               ; preds = %82
  store ptr %84, ptr %4, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #9
  %86 = load ptr, ptr %4, align 8, !tbaa !14
  invoke void @_Z11getNodeValsP4Node(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %25, ptr noundef %86)
          to label %87 unwind label %127

87:                                               ; preds = %85
  %88 = invoke noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %89 unwind label %131

89:                                               ; preds = %87
  br i1 %88, label %90, label %91

90:                                               ; preds = %89
  br label %136

91:                                               ; preds = %89
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 113, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

92:                                               ; preds = %0
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %11, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %12, align 4
  br label %100

96:                                               ; preds = %37
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %11, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #9
  br label %100

100:                                              ; preds = %96, %92
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #9
  br label %227

101:                                              ; preds = %39
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %11, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %12, align 4
  br label %109

105:                                              ; preds = %49
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %11, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #9
  br label %109

109:                                              ; preds = %105, %101
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #9
  br label %226

110:                                              ; preds = %51
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %11, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %12, align 4
  br label %118

114:                                              ; preds = %59
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %11, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #9
  br label %118

118:                                              ; preds = %114, %110
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %225

119:                                              ; preds = %61
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %11, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 48, ptr %24) #9
  br label %225

123:                                              ; preds = %220, %218, %198, %192, %155, %136, %82
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %11, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %12, align 4
  br label %225

127:                                              ; preds = %85
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %11, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %12, align 4
  br label %165

131:                                              ; preds = %87
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %11, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  br label %165

135:                                              ; No predecessors!
  br label %136

136:                                              ; preds = %135, %90
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #9
  %137 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #11
          to label %138 unwind label %123

138:                                              ; preds = %136
  %139 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #11
          to label %140 unwind label %166

140:                                              ; preds = %138
  invoke void @_ZN4NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %139, i32 noundef 2)
          to label %141 unwind label %170

141:                                              ; preds = %140
  %142 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #11
          to label %143 unwind label %166

143:                                              ; preds = %141
  invoke void @_ZN4NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %142, i32 noundef 3)
          to label %144 unwind label %174

144:                                              ; preds = %143
  invoke void @_ZN4NodeC2EiPS_S0_S0_(ptr noundef nonnull align 8 dereferenceable(32) %137, i32 noundef 1, ptr noundef %139, ptr noundef null, ptr noundef %142)
          to label %145 unwind label %166

145:                                              ; preds = %144
  store ptr %137, ptr %3, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #9
  store i32 1, ptr %27, align 4, !tbaa !15
  %146 = getelementptr inbounds i32, ptr %27, i64 1
  store i32 3, ptr %146, align 4, !tbaa !15
  %147 = getelementptr inbounds i32, ptr %27, i64 2
  store i32 2, ptr %147, align 4, !tbaa !15
  %148 = getelementptr inbounds %"class.std::initializer_list", ptr %26, i32 0, i32 0
  store ptr %27, ptr %148, align 8, !tbaa !9
  %149 = getelementptr inbounds %"class.std::initializer_list", ptr %26, i32 0, i32 1
  store i64 3, ptr %149, align 8, !tbaa !13
  %150 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8
  %152 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %153 = load i64, ptr %152, align 8
  %154 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr %151, i64 %153)
          to label %155 unwind label %179

155:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #9
  %156 = load ptr, ptr %3, align 8, !tbaa !14
  %157 = invoke noundef ptr @_ZN8Solution7flattenEP4Node(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef %156)
          to label %158 unwind label %123

158:                                              ; preds = %155
  store ptr %157, ptr %4, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #9
  %159 = load ptr, ptr %4, align 8, !tbaa !14
  invoke void @_Z11getNodeValsP4Node(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %28, ptr noundef %159)
          to label %160 unwind label %183

160:                                              ; preds = %158
  %161 = invoke noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %162 unwind label %187

162:                                              ; preds = %160
  br i1 %161, label %163, label %164

163:                                              ; preds = %162
  br label %192

164:                                              ; preds = %162
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 122, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

165:                                              ; preds = %131, %127
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #9
  br label %225

166:                                              ; preds = %144, %141, %138
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %11, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %12, align 4
  br label %178

170:                                              ; preds = %140
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %11, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %139, i64 noundef 32) #12
  br label %178

174:                                              ; preds = %143
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %11, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %142, i64 noundef 32) #12
  br label %178

178:                                              ; preds = %174, %170, %166
  call void @_ZdlPvm(ptr noundef %137, i64 noundef 32) #12
  br label %225

179:                                              ; preds = %145
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %11, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #9
  br label %225

183:                                              ; preds = %158
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %11, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %12, align 4
  br label %208

187:                                              ; preds = %160
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %11, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #9
  br label %208

191:                                              ; No predecessors!
  br label %192

192:                                              ; preds = %191, %163
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #9
  store ptr null, ptr %3, align 8, !tbaa !14
  call void @_ZNSt16initializer_listIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #9
  %193 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8
  %195 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 1
  %196 = load i64, ptr %195, align 8
  %197 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr %194, i64 %196)
          to label %198 unwind label %123

198:                                              ; preds = %192
  %199 = load ptr, ptr %3, align 8, !tbaa !14
  %200 = invoke noundef ptr @_ZN8Solution7flattenEP4Node(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef %199)
          to label %201 unwind label %123

201:                                              ; preds = %198
  store ptr %200, ptr %4, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #9
  %202 = load ptr, ptr %4, align 8, !tbaa !14
  invoke void @_Z11getNodeValsP4Node(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %30, ptr noundef %202)
          to label %203 unwind label %209

203:                                              ; preds = %201
  %204 = invoke noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %205 unwind label %213

205:                                              ; preds = %203
  br i1 %204, label %206, label %207

206:                                              ; preds = %205
  br label %218

207:                                              ; preds = %205
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 131, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

208:                                              ; preds = %187, %183
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #9
  br label %225

209:                                              ; preds = %201
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %11, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %12, align 4
  br label %224

213:                                              ; preds = %203
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %11, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %12, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #9
  br label %224

217:                                              ; No predecessors!
  br label %218

218:                                              ; preds = %217, %206
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #9
  %219 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
          to label %220 unwind label %123

220:                                              ; preds = %218
  %221 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %219, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %222 unwind label %123

222:                                              ; preds = %220
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #9
  %223 = load i32, ptr %1, align 4
  ret i32 %223

224:                                              ; preds = %213, %209
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #9
  br label %225

225:                                              ; preds = %224, %208, %179, %178, %165, %123, %119, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %226

226:                                              ; preds = %225, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %227

227:                                              ; preds = %226, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #9
  br label %228

228:                                              ; preds = %227
  %229 = load ptr, ptr %11, align 8
  %230 = load i32, ptr %12, align 4
  %231 = insertvalue { ptr, i32 } poison, ptr %229, 0
  %232 = insertvalue { ptr, i32 } %231, i32 %230, 1
  resume { ptr, i32 } %232
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #8

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { nobuiltin allocsize(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 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 = { nobuiltin nounwind "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 = { noreturn nounwind "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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin 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 = !{i64 0, i64 24, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listIiE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !11, i64 16}
!18 = !{!"_ZTS4Node", !16, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!18, !11, i64 24}
!20 = !{i64 0, i64 48, !6}


; 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_ostream" = type { ptr, %"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.Solution = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.std::initializer_list" = type { ptr, i64 }

@.str.1 = external hidden unnamed_addr constant [126 x i8], align 1
@constinit = external hidden local_unnamed_addr constant [6 x i32], align 4
@constinit.3 = external hidden local_unnamed_addr constant [12 x i32], align 4
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z14gengerateNodesSt6vectorIiSaIiEE(ptr noundef) 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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11getNodeValsP4Node(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.Solution, align 1
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca [6 x i32], align 4
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca [4 x i32], align 16
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca [2 x i32], align 4
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca [12 x i32], align 4
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca [3 x i32], align 4
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca %"class.std::initializer_list", align 8
  %17 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #9
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(24) @constinit, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr nonnull %4, i64 6, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %18 unwind label %44

18:                                               ; preds = %0
  %19 = invoke noundef ptr @_Z14gengerateNodesSt6vectorIiSaIiEE(ptr noundef nonnull %3)
          to label %20 unwind label %46

20:                                               ; preds = %18
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #9
  store <4 x i32> <i32 7, i32 8, i32 9, i32 10>, ptr %7, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr nonnull %7, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %21 unwind label %49

21:                                               ; preds = %20
  %22 = invoke noundef ptr @_Z14gengerateNodesSt6vectorIiSaIiEE(ptr noundef nonnull %6)
          to label %23 unwind label %51

23:                                               ; preds = %21
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  store i32 11, ptr %10, align 4, !tbaa !9
  %24 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 12, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr nonnull %10, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %25 unwind label %54

25:                                               ; preds = %23
  %26 = invoke noundef ptr @_Z14gengerateNodesSt6vectorIiSaIiEE(ptr noundef nonnull %9)
          to label %27 unwind label %56

27:                                               ; preds = %25
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  %28 = getelementptr inbounds i8, ptr %19, i64 16
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = getelementptr inbounds i8, ptr %31, i64 24
  store ptr %22, ptr %32, align 8, !tbaa !14
  %33 = getelementptr inbounds i8, ptr %22, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds i8, ptr %34, i64 24
  store ptr %26, ptr %35, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %12) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(48) @constinit.3, i64 48, i1 false), !tbaa.struct !15
  %36 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr nonnull %12, i64 12)
          to label %37 unwind label %59

37:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #9
  %38 = invoke noundef ptr @_ZN8Solution7flattenEP4Node(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull %19)
          to label %39 unwind label %61

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #9
  invoke void @_Z11getNodeValsP4Node(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %13, ptr noundef %38)
          to label %40 unwind label %63

40:                                               ; preds = %39
  %41 = invoke noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %42 unwind label %65

42:                                               ; preds = %40
  br i1 %41, label %67, label %43

43:                                               ; preds = %42
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 113, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

44:                                               ; preds = %0
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %18
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  br label %48

48:                                               ; preds = %46, %44
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  br label %116

49:                                               ; preds = %20
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %53

51:                                               ; preds = %21
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  br label %53

53:                                               ; preds = %51, %49
  %.pn31 = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #9
  br label %116

54:                                               ; preds = %23
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %58

56:                                               ; preds = %25
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  br label %58

58:                                               ; preds = %56, %54
  %.pn33 = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  br label %116

59:                                               ; preds = %27
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %12) #9
  br label %116

61:                                               ; preds = %112, %110, %98, %93, %77, %67, %37
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %116

63:                                               ; preds = %39
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %84

65:                                               ; preds = %40
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  br label %84

67:                                               ; preds = %42
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #9
  %68 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #11
          to label %69 unwind label %61

69:                                               ; preds = %67
  %70 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #11
          to label %71 unwind label %85

71:                                               ; preds = %69
  call void @_ZN4NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %70, i32 noundef 2)
  %72 = invoke noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #11
          to label %73 unwind label %85

73:                                               ; preds = %71
  call void @_ZN4NodeC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %72, i32 noundef 3)
  call void @_ZN4NodeC2EiPS_S0_S0_(ptr noundef nonnull align 8 dereferenceable(32) %68, i32 noundef 1, ptr noundef nonnull %70, ptr noundef null, ptr noundef nonnull %72)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #9
  store i32 1, ptr %14, align 4, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %14, i64 4
  store i32 3, ptr %74, align 4, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %14, i64 8
  store i32 2, ptr %75, align 4, !tbaa !9
  %76 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr nonnull %14, i64 3)
          to label %77 unwind label %87

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #9
  %78 = invoke noundef ptr @_ZN8Solution7flattenEP4Node(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull %68)
          to label %79 unwind label %61

79:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #9
  invoke void @_Z11getNodeValsP4Node(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %15, ptr noundef %78)
          to label %80 unwind label %89

80:                                               ; preds = %79
  %81 = invoke noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %82 unwind label %91

82:                                               ; preds = %80
  br i1 %81, label %93, label %83

83:                                               ; preds = %82
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 122, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

84:                                               ; preds = %65, %63
  %.pn35 = phi { ptr, i32 } [ %66, %65 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #9
  br label %116

85:                                               ; preds = %71, %69
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %68, i64 noundef 32) #12
  br label %116

87:                                               ; preds = %73
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #9
  br label %116

89:                                               ; preds = %79
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %105

91:                                               ; preds = %80
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  br label %105

93:                                               ; preds = %82
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #9
  call void @_ZNSt16initializer_listIiEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #9
  %94 = load ptr, ptr %16, align 8
  %95 = getelementptr inbounds i8, ptr %16, i64 8
  %96 = load i64, ptr %95, align 8
  %97 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr %94, i64 %96)
          to label %98 unwind label %61

98:                                               ; preds = %93
  %99 = invoke noundef ptr @_ZN8Solution7flattenEP4Node(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef null)
          to label %100 unwind label %61

100:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #9
  invoke void @_Z11getNodeValsP4Node(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %17, ptr noundef %99)
          to label %101 unwind label %106

101:                                              ; preds = %100
  %102 = invoke noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %103 unwind label %108

103:                                              ; preds = %101
  br i1 %102, label %110, label %104

104:                                              ; preds = %103
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 131, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

105:                                              ; preds = %91, %89
  %.pn37 = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #9
  br label %116

106:                                              ; preds = %100
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %115

108:                                              ; preds = %101
  %109 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #9
  br label %115

110:                                              ; preds = %103
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #9
  %111 = 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.5)
          to label %112 unwind label %61

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

114:                                              ; preds = %112
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #9
  ret i32 0

115:                                              ; preds = %108, %106
  %.pn39 = phi { ptr, i32 } [ %109, %108 ], [ %107, %106 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #9
  br label %116

116:                                              ; preds = %53, %115, %105, %87, %85, %84, %61, %59, %58, %48
  %.pn41.pn.pn = phi { ptr, i32 } [ %.pn, %48 ], [ %.pn31, %53 ], [ %62, %61 ], [ %.pn39, %115 ], [ %.pn37, %105 ], [ %88, %87 ], [ %86, %85 ], [ %.pn35, %84 ], [ %60, %59 ], [ %.pn33, %58 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn41.pn.pn
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #8

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { nobuiltin allocsize(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 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 = { nobuiltin nounwind "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 = { noreturn nounwind "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 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin 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 = !{i64 0, i64 24, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 16}
!12 = !{!"_ZTS4Node", !10, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!12, !13, i64 24}
!15 = !{i64 0, i64 48, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass