; LLVM IR from rahulyesantharao/b-epsilon-tree :: src/be_tree/be_tree.ll (ZN6BeNode9SplitLeafERj)

; 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.BeNode = type { %class.Serializable, ptr, i32, ptr, ptr, ptr, ptr, ptr }
%class.Serializable = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.8" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%struct.BeData = type { i32, [510 x i32], [510 x i32] }
%"struct.std::pair.11" = type { i32, i32 }

@.str.12 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@__PRETTY_FUNCTION__._ZN6BeNode9SplitLeafERj = external hidden unnamed_addr constant [39 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10DebugPrintNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr noundef, ptr noundef) #0

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6BeNode9SplitLeafERj(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(4) %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.BeNode, align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %"class.std::allocator.8", align 1
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %3, align 8
  %22 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 4
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %2
  br label %29

27:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.12, i32 noundef 165, ptr noundef @__PRETTY_FUNCTION__._ZN6BeNode9SplitLeafERj) #7
  unreachable

28:                                               ; No predecessors!
  br label %29

29:                                               ; preds = %28, %26
  call void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64) %21)
  %30 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = call noundef i32 @_ZN12BlockManager11CreateBlockEv(ptr noundef nonnull align 8 dereferenceable(64) %31)
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 %32, ptr %33, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #8
  %34 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = load i32, ptr %36, align 4, !tbaa !13
  call void @_ZN6BeNodeC1EP12BlockManagerj(ptr noundef nonnull align 8 dereferenceable(64) %5, ptr noundef %35, i32 noundef %37)
  %38 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 3
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  %40 = load i32, ptr %39, align 4, !tbaa !13
  %41 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !15
  store i32 %40, ptr %42, align 4, !tbaa !13
  %43 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 4
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = load i32, ptr %44, align 4, !tbaa !13
  %46 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  store i32 %45, ptr %47, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %48 unwind label %71

48:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  %49 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 3
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  %51 = load i32, ptr %50, align 4, !tbaa !13
  call void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, i32 noundef %51) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.21)
          to label %52 unwind label %75

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #8
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load i32, ptr %53, align 4, !tbaa !13
  call void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, i32 noundef %54) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %55 unwind label %79

55:                                               ; preds = %52
  invoke void @_Z10DebugPrintNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr noundef %6, ptr noundef %10)
          to label %56 unwind label %83

56:                                               ; preds = %55
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  %57 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = getelementptr inbounds %struct.BeData, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = zext i32 %60 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  call void @_ZNSaISt4pairIjjEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  invoke void @_ZNSt6vectorISt4pairIjjESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %61, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %62 unwind label %90

62:                                               ; preds = %56
  call void @_ZNSt15__new_allocatorISt4pairIjjEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !13
  br label %63

63:                                               ; preds = %117, %62
  %64 = load i32, ptr %16, align 4, !tbaa !13
  %65 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = getelementptr inbounds %struct.BeData, ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 4, !tbaa !17
  %69 = icmp ult i32 %64, %68
  br i1 %69, label %94, label %70

70:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %120

71:                                               ; preds = %29
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %8, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %9, align 4
  br label %89

75:                                               ; preds = %48
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %8, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %9, align 4
  br label %88

79:                                               ; preds = %52
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %8, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %9, align 4
  br label %87

83:                                               ; preds = %55
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %8, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %87

87:                                               ; preds = %83, %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %88

88:                                               ; preds = %87, %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %89

89:                                               ; preds = %88, %71
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  br label %245

90:                                               ; preds = %56
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %8, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %9, align 4
  call void @_ZNSt15__new_allocatorISt4pairIjjEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  br label %244

94:                                               ; preds = %63
  %95 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %96 = load ptr, ptr %95, align 8, !tbaa !16
  %97 = getelementptr inbounds %struct.BeData, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %16, align 4, !tbaa !13
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [510 x i32], ptr %97, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !13
  %102 = load i32, ptr %16, align 4, !tbaa !13
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIjjESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %103) #8
  %105 = getelementptr inbounds %"struct.std::pair.11", ptr %104, i32 0, i32 0
  store i32 %101, ptr %105, align 4, !tbaa !19
  %106 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %107 = load ptr, ptr %106, align 8, !tbaa !16
  %108 = getelementptr inbounds %struct.BeData, ptr %107, i32 0, i32 2
  %109 = load i32, ptr %16, align 4, !tbaa !13
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [510 x i32], ptr %108, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !13
  %113 = load i32, ptr %16, align 4, !tbaa !13
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIjjESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %114) #8
  %116 = getelementptr inbounds %"struct.std::pair.11", ptr %115, i32 0, i32 1
  store i32 %112, ptr %116, align 4, !tbaa !21
  br label %117

117:                                              ; preds = %94
  %118 = load i32, ptr %16, align 4, !tbaa !13
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %16, align 4, !tbaa !13
  br label %63, !llvm.loop !22

120:                                              ; preds = %70
  %121 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %122 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %121, ptr %122, align 8
  %123 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  %124 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %123, ptr %124, align 8
  %125 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8
  %127 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %126, ptr %128)
          to label %129 unwind label %138

129:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !13
  br label %130

130:                                              ; preds = %165, %129
  %131 = load i32, ptr %19, align 4, !tbaa !13
  %132 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %133 = load ptr, ptr %132, align 8, !tbaa !16
  %134 = getelementptr inbounds %struct.BeData, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 4, !tbaa !17
  %136 = icmp ult i32 %131, %135
  br i1 %136, label %142, label %137

137:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %168

138:                                              ; preds = %120
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %8, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %9, align 4
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  br label %244

142:                                              ; preds = %130
  %143 = load i32, ptr %19, align 4, !tbaa !13
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIjjESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %144) #8
  %146 = getelementptr inbounds %"struct.std::pair.11", ptr %145, i32 0, i32 0
  %147 = load i32, ptr %146, align 4, !tbaa !19
  %148 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %149 = load ptr, ptr %148, align 8, !tbaa !16
  %150 = getelementptr inbounds %struct.BeData, ptr %149, i32 0, i32 1
  %151 = load i32, ptr %19, align 4, !tbaa !13
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [510 x i32], ptr %150, i64 0, i64 %152
  store i32 %147, ptr %153, align 4, !tbaa !13
  %154 = load i32, ptr %19, align 4, !tbaa !13
  %155 = sext i32 %154 to i64
  %156 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIjjESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %155) #8
  %157 = getelementptr inbounds %"struct.std::pair.11", ptr %156, i32 0, i32 1
  %158 = load i32, ptr %157, align 4, !tbaa !21
  %159 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %160 = load ptr, ptr %159, align 8, !tbaa !16
  %161 = getelementptr inbounds %struct.BeData, ptr %160, i32 0, i32 2
  %162 = load i32, ptr %19, align 4, !tbaa !13
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [510 x i32], ptr %161, i64 0, i64 %163
  store i32 %158, ptr %164, align 4, !tbaa !13
  br label %165

165:                                              ; preds = %142
  %166 = load i32, ptr %19, align 4, !tbaa !13
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %19, align 4, !tbaa !13
  br label %130, !llvm.loop !24

168:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %169 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %170 = load ptr, ptr %169, align 8, !tbaa !16
  %171 = getelementptr inbounds %struct.BeData, ptr %170, i32 0, i32 0
  %172 = load i32, ptr %171, align 4, !tbaa !17
  %173 = udiv i32 %172, 2
  store i32 %173, ptr %20, align 4, !tbaa !13
  br label %174

174:                                              ; preds = %226, %168
  %175 = load i32, ptr %20, align 4, !tbaa !13
  %176 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %177 = load ptr, ptr %176, align 8, !tbaa !16
  %178 = getelementptr inbounds %struct.BeData, ptr %177, i32 0, i32 0
  %179 = load i32, ptr %178, align 4, !tbaa !17
  %180 = icmp ult i32 %175, %179
  br i1 %180, label %182, label %181

181:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %229

182:                                              ; preds = %174
  %183 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %184 = load ptr, ptr %183, align 8, !tbaa !16
  %185 = getelementptr inbounds %struct.BeData, ptr %184, i32 0, i32 1
  %186 = load i32, ptr %20, align 4, !tbaa !13
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [510 x i32], ptr %185, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !13
  %190 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 7
  %191 = load ptr, ptr %190, align 8, !tbaa !16
  %192 = getelementptr inbounds %struct.BeData, ptr %191, i32 0, i32 1
  %193 = load i32, ptr %20, align 4, !tbaa !13
  %194 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %195 = load ptr, ptr %194, align 8, !tbaa !16
  %196 = getelementptr inbounds %struct.BeData, ptr %195, i32 0, i32 0
  %197 = load i32, ptr %196, align 4, !tbaa !17
  %198 = udiv i32 %197, 2
  %199 = sub i32 %193, %198
  %200 = zext i32 %199 to i64
  %201 = getelementptr inbounds [510 x i32], ptr %192, i64 0, i64 %200
  store i32 %189, ptr %201, align 4, !tbaa !13
  %202 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %203 = load ptr, ptr %202, align 8, !tbaa !16
  %204 = getelementptr inbounds %struct.BeData, ptr %203, i32 0, i32 2
  %205 = load i32, ptr %20, align 4, !tbaa !13
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [510 x i32], ptr %204, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !13
  %209 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 7
  %210 = load ptr, ptr %209, align 8, !tbaa !16
  %211 = getelementptr inbounds %struct.BeData, ptr %210, i32 0, i32 2
  %212 = load i32, ptr %20, align 4, !tbaa !13
  %213 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %214 = load ptr, ptr %213, align 8, !tbaa !16
  %215 = getelementptr inbounds %struct.BeData, ptr %214, i32 0, i32 0
  %216 = load i32, ptr %215, align 4, !tbaa !17
  %217 = udiv i32 %216, 2
  %218 = sub i32 %212, %217
  %219 = zext i32 %218 to i64
  %220 = getelementptr inbounds [510 x i32], ptr %211, i64 0, i64 %219
  store i32 %208, ptr %220, align 4, !tbaa !13
  %221 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 7
  %222 = load ptr, ptr %221, align 8, !tbaa !16
  %223 = getelementptr inbounds %struct.BeData, ptr %222, i32 0, i32 0
  %224 = load i32, ptr %223, align 4, !tbaa !17
  %225 = add i32 %224, 1
  store i32 %225, ptr %223, align 4, !tbaa !17
  br label %226

226:                                              ; preds = %182
  %227 = load i32, ptr %20, align 4, !tbaa !13
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %20, align 4, !tbaa !13
  br label %174, !llvm.loop !25

229:                                              ; preds = %181
  %230 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 7
  %231 = load ptr, ptr %230, align 8, !tbaa !16
  %232 = getelementptr inbounds %struct.BeData, ptr %231, i32 0, i32 0
  %233 = load i32, ptr %232, align 4, !tbaa !17
  %234 = getelementptr inbounds %class.BeNode, ptr %21, i32 0, i32 7
  %235 = load ptr, ptr %234, align 8, !tbaa !16
  %236 = getelementptr inbounds %struct.BeData, ptr %235, i32 0, i32 0
  %237 = load i32, ptr %236, align 4, !tbaa !17
  %238 = sub i32 %237, %233
  store i32 %238, ptr %236, align 4, !tbaa !17
  %239 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 7
  %240 = load ptr, ptr %239, align 8, !tbaa !16
  %241 = getelementptr inbounds %struct.BeData, ptr %240, i32 0, i32 1
  %242 = getelementptr inbounds [510 x i32], ptr %241, i64 0, i64 0
  %243 = load i32, ptr %242, align 4, !tbaa !13
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #8
  ret i32 %243

244:                                              ; preds = %138, %90
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  br label %245

245:                                              ; preds = %244, %89
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #8
  br label %246

246:                                              ; preds = %245
  %247 = load ptr, ptr %8, align 8
  %248 = load i32, ptr %9, align 4
  %249 = insertvalue { ptr, i32 } poison, ptr %247, 0
  %250 = insertvalue { ptr, i32 } %249, i32 %248, 1
  resume { ptr, i32 } %250
}

declare noundef i32 @_ZN12BlockManager11CreateBlockEv(ptr noundef nonnull align 8 dereferenceable(64)) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #6

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

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

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

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

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

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

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

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

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

declare void @_ZN6BeNodeC1EP12BlockManagerj(ptr, ptr, i32)

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

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

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


; 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.BeNode = type { %class.Serializable, ptr, i32, ptr, ptr, ptr, ptr, ptr }
%class.Serializable = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.8" = type { i8 }

@.str.12 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@__PRETTY_FUNCTION__._ZN6BeNode9SplitLeafERj = external hidden unnamed_addr constant [39 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6BeNode9SplitLeafERj(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr nocapture noundef nonnull align 4 dereferenceable(4) %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.BeNode, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::allocator.8", align 1
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = load i32, ptr %13, align 4, !tbaa !12
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %15, label %16

15:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.12, i32 noundef 165, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6BeNode9SplitLeafERj) #7
  unreachable

16:                                               ; preds = %2
  tail call void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64) %0)
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = tail call noundef i32 @_ZN12BlockManager11CreateBlockEv(ptr noundef nonnull align 8 dereferenceable(64) %18)
  store i32 %19, ptr %1, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #8
  %20 = load ptr, ptr %17, align 8, !tbaa !13
  call void @_ZN6BeNodeC1EP12BlockManagerj(ptr noundef nonnull align 8 dereferenceable(64) %3, ptr noundef %20, i32 noundef %19)
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  %23 = load i32, ptr %22, align 4, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %3, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !14
  store i32 %23, ptr %25, align 4, !tbaa !12
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = load i32, ptr %26, align 4, !tbaa !12
  %28 = getelementptr inbounds i8, ptr %3, i64 32
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  store i32 %27, ptr %29, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %30 unwind label %48

30:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  %31 = load ptr, ptr %21, align 8, !tbaa !14
  %32 = load i32, ptr %31, align 4, !tbaa !12
  call void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, i32 noundef %32) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.21)
          to label %33 unwind label %50

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #8
  %34 = load i32, ptr %1, align 4, !tbaa !12
  call void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, i32 noundef %34) #8
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %35 unwind label %52

35:                                               ; preds = %33
  invoke void @_Z10DebugPrintNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr noundef nonnull %4, ptr noundef nonnull %6)
          to label %36 unwind label %54

36:                                               ; preds = %35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  %37 = getelementptr inbounds i8, ptr %0, i64 56
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = load i32, ptr %38, align 4, !tbaa !16
  %40 = zext i32 %39 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #8
  call void @_ZNSaISt4pairIjjEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  invoke void @_ZNSt6vectorISt4pairIjjESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %40, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %41 unwind label %59

41:                                               ; preds = %36
  call void @_ZNSt15__new_allocatorISt4pairIjjEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  %42 = load ptr, ptr %37, align 8, !tbaa !15
  %43 = load i32, ptr %42, align 4, !tbaa !16
  %.not53 = icmp eq i32 %43, 0
  br i1 %.not53, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %41
  %44 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %45 = call ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIjjESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %44, ptr %45)
          to label %.preheader unwind label %84

.preheader:                                       ; preds = %._crit_edge
  %46 = load ptr, ptr %37, align 8, !tbaa !15
  %47 = load i32, ptr %46, align 4, !tbaa !16
  %.not54 = icmp eq i32 %47, 0
  br i1 %.not54, label %._crit_edge46.._crit_edge51_crit_edge, label %.lr.ph45

48:                                               ; preds = %16
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %58

50:                                               ; preds = %30
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %57

52:                                               ; preds = %33
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %35
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  br label %57

57:                                               ; preds = %56, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %56 ], [ %51, %50 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %58

58:                                               ; preds = %57, %48
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %57 ], [ %49, %48 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  br label %127

59:                                               ; preds = %36
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIjjEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #8
  br label %126

.lr.ph:                                           ; preds = %41, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %41 ]
  %61 = phi ptr [ %72, %.lr.ph ], [ %42, %41 ]
  %62 = getelementptr inbounds i8, ptr %61, i64 4
  %63 = getelementptr inbounds [510 x i32], ptr %62, i64 0, i64 %indvars.iv
  %64 = load i32, ptr %63, align 4, !tbaa !12
  %65 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIjjESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #8
  store i32 %64, ptr %65, align 4, !tbaa !18
  %66 = load ptr, ptr %37, align 8, !tbaa !15
  %67 = getelementptr inbounds i8, ptr %66, i64 2044
  %68 = getelementptr inbounds [510 x i32], ptr %67, i64 0, i64 %indvars.iv
  %69 = load i32, ptr %68, align 4, !tbaa !12
  %70 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIjjESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #8
  %71 = getelementptr inbounds i8, ptr %70, i64 4
  store i32 %69, ptr %71, align 4, !tbaa !20
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %72 = load ptr, ptr %37, align 8, !tbaa !15
  %73 = load i32, ptr %72, align 4, !tbaa !16
  %74 = zext i32 %73 to i64
  %75 = icmp ult i64 %indvars.iv.next, %74
  br i1 %75, label %.lr.ph, label %._crit_edge, !llvm.loop !21

._crit_edge46:                                    ; preds = %.lr.ph45
  %.not66 = icmp eq i32 %97, 0
  br i1 %.not66, label %._crit_edge46.._crit_edge51_crit_edge, label %.lr.ph50

._crit_edge46.._crit_edge51_crit_edge:            ; preds = %.preheader, %._crit_edge46
  %.lcssa4270 = phi ptr [ %94, %._crit_edge46 ], [ %46, %.preheader ]
  %.phi.trans.insert = getelementptr inbounds i8, ptr %3, i64 56
  %.pre64 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !15
  %.pre65 = load i32, ptr %.pre64, align 4, !tbaa !16
  br label %._crit_edge51

.lr.ph50:                                         ; preds = %._crit_edge46
  %76 = getelementptr inbounds i8, ptr %94, i64 4
  %77 = getelementptr inbounds i8, ptr %3, i64 56
  %78 = load ptr, ptr %77, align 8, !tbaa !15
  %79 = getelementptr inbounds i8, ptr %78, i64 4
  %80 = getelementptr inbounds i8, ptr %94, i64 2044
  %81 = getelementptr inbounds i8, ptr %78, i64 2044
  %82 = lshr i32 %97, 1
  %83 = zext nneg i32 %82 to i64
  %.pre = load i32, ptr %78, align 4, !tbaa !16
  br label %105

84:                                               ; preds = %._crit_edge
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  br label %126

.lr.ph45:                                         ; preds = %.preheader, %.lr.ph45
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.lr.ph45 ], [ 0, %.preheader ]
  %86 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIjjESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv59) #8
  %87 = load i32, ptr %86, align 4, !tbaa !18
  %88 = load ptr, ptr %37, align 8, !tbaa !15
  %89 = getelementptr inbounds i8, ptr %88, i64 4
  %90 = getelementptr inbounds [510 x i32], ptr %89, i64 0, i64 %indvars.iv59
  store i32 %87, ptr %90, align 4, !tbaa !12
  %91 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIjjESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv59) #8
  %92 = getelementptr inbounds i8, ptr %91, i64 4
  %93 = load i32, ptr %92, align 4, !tbaa !20
  %94 = load ptr, ptr %37, align 8, !tbaa !15
  %95 = getelementptr inbounds i8, ptr %94, i64 2044
  %96 = getelementptr inbounds [510 x i32], ptr %95, i64 0, i64 %indvars.iv59
  store i32 %93, ptr %96, align 4, !tbaa !12
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %97 = load i32, ptr %94, align 4, !tbaa !16
  %98 = zext i32 %97 to i64
  %99 = icmp ult i64 %indvars.iv.next60, %98
  br i1 %99, label %.lr.ph45, label %._crit_edge46, !llvm.loop !23

._crit_edge51:                                    ; preds = %105, %._crit_edge46.._crit_edge51_crit_edge
  %.lcssa4269 = phi ptr [ %.lcssa4270, %._crit_edge46.._crit_edge51_crit_edge ], [ %94, %105 ]
  %100 = phi i32 [ %.pre65, %._crit_edge46.._crit_edge51_crit_edge ], [ %122, %105 ]
  %101 = phi ptr [ %.pre64, %._crit_edge46.._crit_edge51_crit_edge ], [ %78, %105 ]
  %.lcssa = phi i32 [ 0, %._crit_edge46.._crit_edge51_crit_edge ], [ %123, %105 ]
  %102 = sub i32 %.lcssa, %100
  store i32 %102, ptr %.lcssa4269, align 4, !tbaa !16
  %103 = getelementptr inbounds i8, ptr %101, i64 4
  %104 = load i32, ptr %103, align 4, !tbaa !12
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #8
  ret i32 %104

105:                                              ; preds = %.lr.ph50, %105
  %106 = phi i32 [ %.pre, %.lr.ph50 ], [ %122, %105 ]
  %indvars.iv62 = phi i64 [ %83, %.lr.ph50 ], [ %indvars.iv.next63, %105 ]
  %107 = phi i32 [ %97, %.lr.ph50 ], [ %123, %105 ]
  %108 = getelementptr inbounds [510 x i32], ptr %76, i64 0, i64 %indvars.iv62
  %109 = load i32, ptr %108, align 4, !tbaa !12
  %110 = lshr i32 %107, 1
  %111 = trunc nuw nsw i64 %indvars.iv62 to i32
  %112 = sub nsw i32 %111, %110
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds [510 x i32], ptr %79, i64 0, i64 %113
  store i32 %109, ptr %114, align 4, !tbaa !12
  %115 = getelementptr inbounds [510 x i32], ptr %80, i64 0, i64 %indvars.iv62
  %116 = load i32, ptr %115, align 4, !tbaa !12
  %117 = load i32, ptr %94, align 4, !tbaa !16
  %118 = lshr i32 %117, 1
  %119 = sub nsw i32 %111, %118
  %120 = zext i32 %119 to i64
  %121 = getelementptr inbounds [510 x i32], ptr %81, i64 0, i64 %120
  store i32 %116, ptr %121, align 4, !tbaa !12
  %122 = add i32 %106, 1
  store i32 %122, ptr %78, align 4, !tbaa !16
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %123 = load i32, ptr %94, align 4, !tbaa !16
  %124 = zext i32 %123 to i64
  %125 = icmp ult i64 %indvars.iv.next63, %124
  br i1 %125, label %105, label %._crit_edge51, !llvm.loop !24

126:                                              ; preds = %84, %59
  %.pn38 = phi { ptr, i32 } [ %85, %84 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  br label %127

127:                                              ; preds = %126, %58
  %.pn38.pn = phi { ptr, i32 } [ %.pn38, %126 ], [ %.pn.pn.pn, %58 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn38.pn
}

declare noundef i32 @_ZN12BlockManager11CreateBlockEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEj(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #6

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

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

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

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

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

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

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

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

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

declare void @_ZN6BeNodeC1EP12BlockManagerj(ptr, ptr, i32) local_unnamed_addr

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

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

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


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