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

; 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::__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.BeNode = type { %class.Serializable, ptr, i32, ptr, ptr, ptr, ptr, ptr }
%class.Serializable = type { ptr }
%"class.std::allocator" = type { i8 }
%struct.BePivots = type { i32, [15 x i32], [16 x i32] }
%struct.BeBuffer = type { i32, i32, [247 x %struct.BeUpsert] }
%struct.BeUpsert = type { i32, i32, i32, i32 }

@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1
@__PRETTY_FUNCTION__._ZN6BeNode13SplitInternalERj = external hidden unnamed_addr constant [43 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [14 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

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 uwtable
define dso_local noundef i32 @_ZN6BeNode13SplitInternalERj(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.BeNode, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8
  call void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64) %22)
  %23 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 4
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = load i32, ptr %24, align 4, !tbaa !13
  %26 = icmp ne i32 %25, 0
  %27 = xor i1 %26, true
  br i1 %27, label %28, label %29

28:                                               ; preds = %2
  br label %31

29:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.12, i32 noundef 218, ptr noundef @__PRETTY_FUNCTION__._ZN6BeNode13SplitInternalERj) #8
  unreachable

30:                                               ; No predecessors!
  br label %31

31:                                               ; preds = %30, %28
  %32 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = getelementptr inbounds %struct.BePivots, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 4, !tbaa !15
  %36 = icmp eq i32 %35, 15
  br i1 %36, label %37, label %38

37:                                               ; preds = %31
  br label %40

38:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.12, i32 noundef 219, ptr noundef @__PRETTY_FUNCTION__._ZN6BeNode13SplitInternalERj) #8
  unreachable

39:                                               ; No predecessors!
  br label %40

40:                                               ; preds = %39, %37
  %41 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  %43 = call noundef i32 @_ZN12BlockManager11CreateBlockEv(ptr noundef nonnull align 8 dereferenceable(64) %42)
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 %43, ptr %44, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #9
  %45 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load i32, ptr %47, align 4, !tbaa !13
  call void @_ZN6BeNodeC1EP12BlockManagerj(ptr noundef nonnull align 8 dereferenceable(64) %5, ptr noundef %46, i32 noundef %48)
  %49 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 4
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 4
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  store i32 %51, ptr %53, align 4, !tbaa !13
  %54 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 3
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = load i32, ptr %55, align 4, !tbaa !13
  %57 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  store i32 %56, ptr %58, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.26, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %59 unwind label %87

59:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #9
  %60 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 3
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = load i32, ptr %61, 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 %62) #9
  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 %63 unwind label %91

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #9
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = load i32, ptr %64, 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 %65) #9
  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 %66 unwind label %95

66:                                               ; preds = %63
  invoke void @_Z10DebugPrintNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr noundef %6, ptr noundef %10)
          to label %67 unwind label %99

67:                                               ; preds = %66
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #9
  %68 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load i32, ptr %70, align 4, !tbaa !13
  call void @_ZN6BeNodeC1EP12BlockManagerj(ptr noundef nonnull align 8 dereferenceable(64) %14, ptr noundef %69, i32 noundef %71)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %72 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %73 = load ptr, ptr %72, align 8, !tbaa !14
  %74 = getelementptr inbounds %struct.BePivots, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 4, !tbaa !15
  %76 = add i32 %75, 1
  %77 = udiv i32 %76, 2
  store i32 %77, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %78 = load i32, ptr %15, align 4, !tbaa !13
  store i32 %78, ptr %16, align 4, !tbaa !13
  br label %79

79:                                               ; preds = %161, %67
  %80 = load i32, ptr %16, align 4, !tbaa !13
  %81 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %82 = load ptr, ptr %81, align 8, !tbaa !14
  %83 = getelementptr inbounds %struct.BePivots, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 4, !tbaa !15
  %85 = icmp ule i32 %80, %84
  br i1 %85, label %106, label %86

86:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %164

87:                                               ; preds = %40
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %8, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %9, align 4
  br label %105

91:                                               ; preds = %59
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %8, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %9, align 4
  br label %104

95:                                               ; preds = %63
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %8, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %9, align 4
  br label %103

99:                                               ; preds = %66
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %8, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #9
  br label %103

103:                                              ; preds = %99, %95
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  br label %104

104:                                              ; preds = %103, %91
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  br label %105

105:                                              ; preds = %104, %87
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #9
  br label %373

106:                                              ; preds = %79
  call void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64) %22)
  call void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64) %5)
  %107 = load i32, ptr %16, align 4, !tbaa !13
  %108 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %109 = load ptr, ptr %108, align 8, !tbaa !14
  %110 = getelementptr inbounds %struct.BePivots, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !15
  %112 = icmp ult i32 %107, %111
  br i1 %112, label %113, label %134

113:                                              ; preds = %106
  %114 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %115 = load ptr, ptr %114, align 8, !tbaa !14
  %116 = getelementptr inbounds %struct.BePivots, ptr %115, i32 0, i32 1
  %117 = load i32, ptr %16, align 4, !tbaa !13
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [15 x i32], ptr %116, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !13
  %121 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 6
  %122 = load ptr, ptr %121, align 8, !tbaa !14
  %123 = getelementptr inbounds %struct.BePivots, ptr %122, i32 0, i32 1
  %124 = load i32, ptr %16, align 4, !tbaa !13
  %125 = load i32, ptr %15, align 4, !tbaa !13
  %126 = sub nsw i32 %124, %125
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [15 x i32], ptr %123, i64 0, i64 %127
  store i32 %120, ptr %128, align 4, !tbaa !13
  %129 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 6
  %130 = load ptr, ptr %129, align 8, !tbaa !14
  %131 = getelementptr inbounds %struct.BePivots, ptr %130, i32 0, i32 0
  %132 = load i32, ptr %131, align 4, !tbaa !15
  %133 = add i32 %132, 1
  store i32 %133, ptr %131, align 4, !tbaa !15
  br label %134

134:                                              ; preds = %113, %106
  %135 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %136 = load ptr, ptr %135, align 8, !tbaa !14
  %137 = getelementptr inbounds %struct.BePivots, ptr %136, i32 0, i32 2
  %138 = load i32, ptr %16, align 4, !tbaa !13
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [16 x i32], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !13
  %142 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 6
  %143 = load ptr, ptr %142, align 8, !tbaa !14
  %144 = getelementptr inbounds %struct.BePivots, ptr %143, i32 0, i32 2
  %145 = load i32, ptr %16, align 4, !tbaa !13
  %146 = load i32, ptr %15, align 4, !tbaa !13
  %147 = sub nsw i32 %145, %146
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [16 x i32], ptr %144, i64 0, i64 %148
  store i32 %141, ptr %149, align 4, !tbaa !13
  %150 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %151 = load ptr, ptr %150, align 8, !tbaa !14
  %152 = getelementptr inbounds %struct.BePivots, ptr %151, i32 0, i32 2
  %153 = load i32, ptr %16, align 4, !tbaa !13
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [16 x i32], ptr %152, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !13
  call void @_ZN6BeNode5SetIdEj(ptr noundef nonnull align 8 dereferenceable(64) %14, i32 noundef %156)
  %157 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 2
  %158 = load i32, ptr %157, align 8, !tbaa !19
  %159 = getelementptr inbounds %class.BeNode, ptr %14, i32 0, i32 3
  %160 = load ptr, ptr %159, align 8, !tbaa !18
  store i32 %158, ptr %160, align 4, !tbaa !13
  br label %161

161:                                              ; preds = %134
  %162 = load i32, ptr %16, align 4, !tbaa !13
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %16, align 4, !tbaa !13
  br label %79, !llvm.loop !20

164:                                              ; preds = %86
  %165 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 6
  %166 = load ptr, ptr %165, align 8, !tbaa !14
  %167 = getelementptr inbounds %struct.BePivots, ptr %166, i32 0, i32 0
  %168 = load i32, ptr %167, align 4, !tbaa !15
  %169 = add i32 %168, 1
  %170 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %171 = load ptr, ptr %170, align 8, !tbaa !14
  %172 = getelementptr inbounds %struct.BePivots, ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 4, !tbaa !15
  %174 = sub i32 %173, %169
  store i32 %174, ptr %172, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %175 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %176 = load ptr, ptr %175, align 8, !tbaa !14
  %177 = getelementptr inbounds %struct.BePivots, ptr %176, i32 0, i32 1
  %178 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 6
  %179 = load ptr, ptr %178, align 8, !tbaa !14
  %180 = getelementptr inbounds %struct.BePivots, ptr %179, i32 0, i32 0
  %181 = load i32, ptr %180, align 4, !tbaa !15
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds [15 x i32], ptr %177, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !13
  store i32 %184, ptr %17, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 0, ptr %18, align 4, !tbaa !13
  br label %185

185:                                              ; preds = %238, %164
  %186 = load i32, ptr %18, align 4, !tbaa !13
  %187 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %188 = load ptr, ptr %187, align 8, !tbaa !22
  %189 = getelementptr inbounds %struct.BeBuffer, ptr %188, i32 0, i32 0
  %190 = load i32, ptr %189, align 4, !tbaa !23
  %191 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %192 = load ptr, ptr %191, align 8, !tbaa !22
  %193 = getelementptr inbounds %struct.BeBuffer, ptr %192, i32 0, i32 1
  %194 = load i32, ptr %193, align 4, !tbaa !25
  %195 = sub i32 %190, %194
  %196 = icmp ult i32 %186, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %241

198:                                              ; preds = %185
  %199 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %200 = load ptr, ptr %199, align 8, !tbaa !22
  %201 = getelementptr inbounds %struct.BeBuffer, ptr %200, i32 0, i32 2
  %202 = load i32, ptr %18, align 4, !tbaa !13
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %201, i64 0, i64 %203
  %205 = getelementptr inbounds %struct.BeUpsert, ptr %204, i32 0, i32 0
  %206 = load i32, ptr %205, align 4, !tbaa !26
  %207 = load i32, ptr %17, align 4, !tbaa !13
  %208 = icmp uge i32 %206, %207
  br i1 %208, label %209, label %237

209:                                              ; preds = %198
  %210 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %211 = load ptr, ptr %210, align 8, !tbaa !22
  %212 = getelementptr inbounds %struct.BeBuffer, ptr %211, i32 0, i32 2
  %213 = load i32, ptr %18, align 4, !tbaa !13
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %212, i64 0, i64 %214
  %216 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 5
  %217 = load ptr, ptr %216, align 8, !tbaa !22
  %218 = getelementptr inbounds %struct.BeBuffer, ptr %217, i32 0, i32 2
  %219 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 5
  %220 = load ptr, ptr %219, align 8, !tbaa !22
  %221 = getelementptr inbounds %struct.BeBuffer, ptr %220, i32 0, i32 0
  %222 = load i32, ptr %221, align 4, !tbaa !23
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %218, i64 0, i64 %223
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %224, ptr align 4 %215, i64 16, i1 false), !tbaa.struct !29
  %225 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 5
  %226 = load ptr, ptr %225, align 8, !tbaa !22
  %227 = getelementptr inbounds %struct.BeBuffer, ptr %226, i32 0, i32 0
  %228 = load i32, ptr %227, align 4, !tbaa !23
  %229 = add i32 %228, 1
  store i32 %229, ptr %227, align 4, !tbaa !23
  %230 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %231 = load ptr, ptr %230, align 8, !tbaa !22
  %232 = getelementptr inbounds %struct.BeBuffer, ptr %231, i32 0, i32 2
  %233 = load i32, ptr %18, align 4, !tbaa !13
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %232, i64 0, i64 %234
  %236 = getelementptr inbounds %struct.BeUpsert, ptr %235, i32 0, i32 1
  store i32 3, ptr %236, align 4, !tbaa !31
  br label %237

237:                                              ; preds = %209, %198
  br label %238

238:                                              ; preds = %237
  %239 = load i32, ptr %18, align 4, !tbaa !13
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %18, align 4, !tbaa !13
  br label %185, !llvm.loop !32

241:                                              ; preds = %197
  %242 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %243 = load ptr, ptr %242, align 8, !tbaa !22
  %244 = getelementptr inbounds %struct.BeBuffer, ptr %243, i32 0, i32 2
  %245 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %246 = load ptr, ptr %245, align 8, !tbaa !22
  %247 = getelementptr inbounds %struct.BeBuffer, ptr %246, i32 0, i32 0
  %248 = load i32, ptr %247, align 4, !tbaa !23
  %249 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %250 = load ptr, ptr %249, align 8, !tbaa !22
  %251 = getelementptr inbounds %struct.BeBuffer, ptr %250, i32 0, i32 1
  %252 = load i32, ptr %251, align 4, !tbaa !25
  %253 = sub i32 %248, %252
  %254 = zext i32 %253 to i64
  %255 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %244, i64 0, i64 %254
  %256 = getelementptr inbounds %struct.BeUpsert, ptr %255, i32 0, i32 0
  %257 = load i32, ptr %256, align 4, !tbaa !26
  %258 = load i32, ptr %17, align 4, !tbaa !13
  %259 = icmp uge i32 %257, %258
  br i1 %259, label %260, label %329

260:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %261 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %262 = load ptr, ptr %261, align 8, !tbaa !22
  %263 = getelementptr inbounds %struct.BeBuffer, ptr %262, i32 0, i32 0
  %264 = load i32, ptr %263, align 4, !tbaa !23
  %265 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %266 = load ptr, ptr %265, align 8, !tbaa !22
  %267 = getelementptr inbounds %struct.BeBuffer, ptr %266, i32 0, i32 1
  %268 = load i32, ptr %267, align 4, !tbaa !25
  %269 = sub i32 %264, %268
  store i32 %269, ptr %19, align 4, !tbaa !13
  br label %270

270:                                              ; preds = %306, %260
  %271 = load i32, ptr %19, align 4, !tbaa !13
  %272 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %273 = load ptr, ptr %272, align 8, !tbaa !22
  %274 = getelementptr inbounds %struct.BeBuffer, ptr %273, i32 0, i32 0
  %275 = load i32, ptr %274, align 4, !tbaa !23
  %276 = icmp ult i32 %271, %275
  br i1 %276, label %278, label %277

277:                                              ; preds = %270
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %309

278:                                              ; preds = %270
  %279 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %280 = load ptr, ptr %279, align 8, !tbaa !22
  %281 = getelementptr inbounds %struct.BeBuffer, ptr %280, i32 0, i32 2
  %282 = load i32, ptr %19, align 4, !tbaa !13
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %281, i64 0, i64 %283
  %285 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 5
  %286 = load ptr, ptr %285, align 8, !tbaa !22
  %287 = getelementptr inbounds %struct.BeBuffer, ptr %286, i32 0, i32 2
  %288 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 5
  %289 = load ptr, ptr %288, align 8, !tbaa !22
  %290 = getelementptr inbounds %struct.BeBuffer, ptr %289, i32 0, i32 0
  %291 = load i32, ptr %290, align 4, !tbaa !23
  %292 = zext i32 %291 to i64
  %293 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %287, i64 0, i64 %292
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %293, ptr align 4 %284, i64 16, i1 false), !tbaa.struct !29
  %294 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 5
  %295 = load ptr, ptr %294, align 8, !tbaa !22
  %296 = getelementptr inbounds %struct.BeBuffer, ptr %295, i32 0, i32 0
  %297 = load i32, ptr %296, align 4, !tbaa !23
  %298 = add i32 %297, 1
  store i32 %298, ptr %296, align 4, !tbaa !23
  %299 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %300 = load ptr, ptr %299, align 8, !tbaa !22
  %301 = getelementptr inbounds %struct.BeBuffer, ptr %300, i32 0, i32 2
  %302 = load i32, ptr %19, align 4, !tbaa !13
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %301, i64 0, i64 %303
  %305 = getelementptr inbounds %struct.BeUpsert, ptr %304, i32 0, i32 1
  store i32 3, ptr %305, align 4, !tbaa !31
  br label %306

306:                                              ; preds = %278
  %307 = load i32, ptr %19, align 4, !tbaa !13
  %308 = add nsw i32 %307, 1
  store i32 %308, ptr %19, align 4, !tbaa !13
  br label %270, !llvm.loop !33

309:                                              ; preds = %277
  %310 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %311 = load ptr, ptr %310, align 8, !tbaa !22
  %312 = getelementptr inbounds %struct.BeBuffer, ptr %311, i32 0, i32 1
  %313 = load i32, ptr %312, align 4, !tbaa !25
  %314 = getelementptr inbounds %class.BeNode, ptr %5, i32 0, i32 5
  %315 = load ptr, ptr %314, align 8, !tbaa !22
  %316 = getelementptr inbounds %struct.BeBuffer, ptr %315, i32 0, i32 1
  store i32 %313, ptr %316, align 4, !tbaa !25
  %317 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %318 = load ptr, ptr %317, align 8, !tbaa !22
  %319 = getelementptr inbounds %struct.BeBuffer, ptr %318, i32 0, i32 1
  %320 = load i32, ptr %319, align 4, !tbaa !25
  %321 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %322 = load ptr, ptr %321, align 8, !tbaa !22
  %323 = getelementptr inbounds %struct.BeBuffer, ptr %322, i32 0, i32 0
  %324 = load i32, ptr %323, align 4, !tbaa !23
  %325 = sub i32 %324, %320
  store i32 %325, ptr %323, align 4, !tbaa !23
  %326 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %327 = load ptr, ptr %326, align 8, !tbaa !22
  %328 = getelementptr inbounds %struct.BeBuffer, ptr %327, i32 0, i32 1
  store i32 0, ptr %328, align 4, !tbaa !25
  br label %329

329:                                              ; preds = %309, %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 0, ptr %21, align 4, !tbaa !13
  br label %330

330:                                              ; preds = %364, %329
  %331 = load i32, ptr %21, align 4, !tbaa !13
  %332 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %333 = load ptr, ptr %332, align 8, !tbaa !22
  %334 = getelementptr inbounds %struct.BeBuffer, ptr %333, i32 0, i32 0
  %335 = load i32, ptr %334, align 4, !tbaa !23
  %336 = icmp ult i32 %331, %335
  br i1 %336, label %338, label %337

337:                                              ; preds = %330
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %367

338:                                              ; preds = %330
  %339 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %340 = load ptr, ptr %339, align 8, !tbaa !22
  %341 = getelementptr inbounds %struct.BeBuffer, ptr %340, i32 0, i32 2
  %342 = load i32, ptr %21, align 4, !tbaa !13
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %341, i64 0, i64 %343
  %345 = getelementptr inbounds %struct.BeUpsert, ptr %344, i32 0, i32 1
  %346 = load i32, ptr %345, align 4, !tbaa !31
  %347 = icmp ne i32 %346, 3
  br i1 %347, label %348, label %363

348:                                              ; preds = %338
  %349 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %350 = load ptr, ptr %349, align 8, !tbaa !22
  %351 = getelementptr inbounds %struct.BeBuffer, ptr %350, i32 0, i32 2
  %352 = load i32, ptr %21, align 4, !tbaa !13
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %351, i64 0, i64 %353
  %355 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %356 = load ptr, ptr %355, align 8, !tbaa !22
  %357 = getelementptr inbounds %struct.BeBuffer, ptr %356, i32 0, i32 2
  %358 = load i32, ptr %20, align 4, !tbaa !13
  %359 = zext i32 %358 to i64
  %360 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %357, i64 0, i64 %359
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %360, ptr align 4 %354, i64 16, i1 false), !tbaa.struct !29
  %361 = load i32, ptr %20, align 4, !tbaa !13
  %362 = add i32 %361, 1
  store i32 %362, ptr %20, align 4, !tbaa !13
  br label %363

363:                                              ; preds = %348, %338
  br label %364

364:                                              ; preds = %363
  %365 = load i32, ptr %21, align 4, !tbaa !13
  %366 = add nsw i32 %365, 1
  store i32 %366, ptr %21, align 4, !tbaa !13
  br label %330, !llvm.loop !34

367:                                              ; preds = %337
  %368 = load i32, ptr %20, align 4, !tbaa !13
  %369 = getelementptr inbounds %class.BeNode, ptr %22, i32 0, i32 5
  %370 = load ptr, ptr %369, align 8, !tbaa !22
  %371 = getelementptr inbounds %struct.BeBuffer, ptr %370, i32 0, i32 0
  store i32 %368, ptr %371, align 4, !tbaa !23
  %372 = load i32, ptr %17, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #9
  ret i32 %372

373:                                              ; preds = %105
  %374 = load ptr, ptr %8, align 8
  %375 = load i32, ptr %9, align 4
  %376 = insertvalue { ptr, i32 } poison, ptr %374, 0
  %377 = insertvalue { ptr, i32 } %376, i32 %375, 1
  resume { ptr, i32 } %377
}

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

; 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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 48}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTS8BePivots", !12, i64 0, !7, i64 4, !7, i64 64}
!17 = !{!10, !6, i64 8}
!18 = !{!10, !6, i64 24}
!19 = !{!10, !12, i64 16}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !6, i64 40}
!23 = !{!24, !12, i64 0}
!24 = !{!"_ZTS8BeBuffer", !12, i64 0, !12, i64 4, !7, i64 8}
!25 = !{!24, !12, i64 4}
!26 = !{!27, !12, i64 0}
!27 = !{!"_ZTS8BeUpsert", !12, i64 0, !28, i64 4, !12, i64 8, !12, i64 12}
!28 = !{!"_ZTS14UpsertFunction", !7, i64 0}
!29 = !{i64 0, i64 4, !13, i64 4, i64 4, !30, i64 8, i64 4, !13, i64 12, i64 4, !13}
!30 = !{!28, !28, i64 0}
!31 = !{!27, !28, i64 4}
!32 = distinct !{!32, !21}
!33 = distinct !{!33, !21}
!34 = distinct !{!34, !21}


; 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::__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.BeNode = type { %class.Serializable, ptr, i32, ptr, ptr, ptr, ptr, ptr }
%class.Serializable = type { ptr }
%"class.std::allocator" = type { i8 }
%struct.BeUpsert = type { i32, i32, i32, i32 }

@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1
@__PRETTY_FUNCTION__._ZN6BeNode13SplitInternalERj = external hidden unnamed_addr constant [43 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [14 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

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 uwtable
define dso_local noundef i32 @_ZN6BeNode13SplitInternalERj(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.BeNode, align 8
  tail call void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64) %0)
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = load i32, ptr %12, align 4, !tbaa !12
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %15, label %14

14:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12, i32 noundef 218, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6BeNode13SplitInternalERj) #8
  unreachable

15:                                               ; preds = %2
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = load i32, ptr %17, align 4, !tbaa !14
  %19 = icmp eq i32 %18, 15
  br i1 %19, label %21, label %20

20:                                               ; preds = %15
  tail call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.12, i32 noundef 219, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6BeNode13SplitInternalERj) #8
  unreachable

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %24 = tail call noundef i32 @_ZN12BlockManager11CreateBlockEv(ptr noundef nonnull align 8 dereferenceable(64) %23)
  store i32 %24, ptr %1, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #9
  %25 = load ptr, ptr %22, align 8, !tbaa !16
  call void @_ZN6BeNodeC1EP12BlockManagerj(ptr noundef nonnull align 8 dereferenceable(64) %3, ptr noundef %25, i32 noundef %24)
  %26 = load ptr, ptr %11, 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
  %30 = getelementptr inbounds i8, ptr %0, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = load i32, ptr %31, align 4, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %3, i64 24
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  store i32 %32, ptr %34, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.26, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %35 unwind label %68

35:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #9
  %36 = load ptr, ptr %30, align 8, !tbaa !17
  %37 = load i32, ptr %36, 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 %37) #9
  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 %38 unwind label %70

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  %39 = 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 %39) #9
  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 %40 unwind label %72

40:                                               ; preds = %38
  invoke void @_Z10DebugPrintNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_(ptr noundef nonnull %4, ptr noundef nonnull %6)
          to label %41 unwind label %74

41:                                               ; preds = %40
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(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.start.p0(i64 64, ptr nonnull %10) #9
  %42 = load ptr, ptr %22, align 8, !tbaa !16
  %43 = load i32, ptr %1, align 4, !tbaa !12
  call void @_ZN6BeNodeC1EP12BlockManagerj(ptr noundef nonnull align 8 dereferenceable(64) %10, ptr noundef %42, i32 noundef %43)
  %44 = load ptr, ptr %16, align 8, !tbaa !13
  %45 = load i32, ptr %44, align 4, !tbaa !14
  %46 = add i32 %45, 1
  %47 = lshr i32 %46, 1
  %.not5061 = icmp ugt i32 %47, %45
  br i1 %.not5061, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %41
  %48 = getelementptr inbounds i8, ptr %3, i64 48
  %49 = getelementptr inbounds i8, ptr %3, i64 16
  %50 = getelementptr inbounds i8, ptr %10, i64 24
  %51 = lshr i32 %46, 1
  %52 = zext nneg i32 %51 to i64
  %53 = zext nneg i32 %47 to i64
  br label %79

._crit_edge:                                      ; preds = %93, %41
  %.lcssa60 = phi ptr [ %44, %41 ], [ %101, %93 ]
  %.lcssa59 = phi i32 [ %45, %41 ], [ %102, %93 ]
  %54 = getelementptr inbounds i8, ptr %3, i64 48
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = load i32, ptr %55, align 4, !tbaa !14
  %.neg = xor i32 %56, -1
  %57 = add i32 %.lcssa59, %.neg
  store i32 %57, ptr %.lcssa60, align 4, !tbaa !14
  %58 = getelementptr inbounds i8, ptr %.lcssa60, i64 4
  %59 = zext i32 %57 to i64
  %60 = getelementptr inbounds [15 x i32], ptr %58, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !12
  %62 = getelementptr inbounds i8, ptr %0, i64 40
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = load i32, ptr %63, align 4, !tbaa !19
  %65 = getelementptr inbounds i8, ptr %63, i64 4
  %66 = load i32, ptr %65, align 4, !tbaa !21
  %.not83 = icmp eq i32 %64, %66
  br i1 %.not83, label %._crit_edge67, label %.lr.ph66

.lr.ph66:                                         ; preds = %._crit_edge
  %67 = getelementptr inbounds i8, ptr %3, i64 40
  br label %113

68:                                               ; preds = %21
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %78

70:                                               ; preds = %35
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %77

72:                                               ; preds = %38
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %76

74:                                               ; preds = %40
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  br label %76

76:                                               ; preds = %74, %72
  %.pn = phi { ptr, i32 } [ %75, %74 ], [ %73, %72 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  br label %77

77:                                               ; preds = %76, %70
  %.pn.pn = phi { ptr, i32 } [ %.pn, %76 ], [ %71, %70 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  br label %78

78:                                               ; preds = %77, %68
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %77 ], [ %69, %68 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(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 64, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn.pn.pn

79:                                               ; preds = %.lr.ph, %93
  %indvars.iv = phi i64 [ %52, %.lr.ph ], [ %indvars.iv.next, %93 ]
  call void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64) %0)
  call void @_ZN6BeNode4OpenEv(ptr noundef nonnull align 8 dereferenceable(64) %3)
  %80 = load ptr, ptr %16, align 8, !tbaa !13
  %81 = load i32, ptr %80, align 4, !tbaa !14
  %82 = zext i32 %81 to i64
  %83 = icmp ult i64 %indvars.iv, %82
  %.pre = load ptr, ptr %48, align 8, !tbaa !13
  br i1 %83, label %84, label %._crit_edge107

._crit_edge107:                                   ; preds = %79
  %.pre108 = sub nuw nsw i64 %indvars.iv, %53
  br label %93

84:                                               ; preds = %79
  %85 = getelementptr inbounds i8, ptr %80, i64 4
  %86 = getelementptr inbounds [15 x i32], ptr %85, i64 0, i64 %indvars.iv
  %87 = load i32, ptr %86, align 4, !tbaa !12
  %88 = getelementptr inbounds i8, ptr %.pre, i64 4
  %89 = sub nuw nsw i64 %indvars.iv, %53
  %90 = getelementptr inbounds [15 x i32], ptr %88, i64 0, i64 %89
  store i32 %87, ptr %90, align 4, !tbaa !12
  %91 = load i32, ptr %.pre, align 4, !tbaa !14
  %92 = add i32 %91, 1
  store i32 %92, ptr %.pre, align 4, !tbaa !14
  br label %93

93:                                               ; preds = %._crit_edge107, %84
  %.pre-phi = phi i64 [ %.pre108, %._crit_edge107 ], [ %89, %84 ]
  %94 = getelementptr inbounds i8, ptr %80, i64 64
  %95 = getelementptr inbounds [16 x i32], ptr %94, i64 0, i64 %indvars.iv
  %96 = load i32, ptr %95, align 4, !tbaa !12
  %97 = getelementptr inbounds i8, ptr %.pre, i64 64
  %98 = getelementptr inbounds [16 x i32], ptr %97, i64 0, i64 %.pre-phi
  store i32 %96, ptr %98, align 4, !tbaa !12
  call void @_ZN6BeNode5SetIdEj(ptr noundef nonnull align 8 dereferenceable(64) %10, i32 noundef %96)
  %99 = load i32, ptr %49, align 8, !tbaa !22
  %100 = load ptr, ptr %50, align 8, !tbaa !17
  store i32 %99, ptr %100, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %101 = load ptr, ptr %16, align 8, !tbaa !13
  %102 = load i32, ptr %101, align 4, !tbaa !14
  %103 = zext i32 %102 to i64
  %.not50.not = icmp ult i64 %indvars.iv, %103
  br i1 %.not50.not, label %79, label %._crit_edge, !llvm.loop !23

._crit_edge67:                                    ; preds = %131, %._crit_edge
  %104 = phi i32 [ %64, %._crit_edge ], [ %132, %131 ]
  %105 = phi ptr [ %63, %._crit_edge ], [ %133, %131 ]
  %.lcssa56 = phi i32 [ 0, %._crit_edge ], [ %136, %131 ]
  %106 = getelementptr inbounds i8, ptr %105, i64 8
  %107 = zext i32 %.lcssa56 to i64
  %108 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %106, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !25
  %.not51 = icmp ult i32 %109, %61
  br i1 %.not51, label %162, label %.preheader

.preheader:                                       ; preds = %._crit_edge67
  %110 = icmp ult i32 %.lcssa56, %104
  %111 = getelementptr inbounds i8, ptr %3, i64 40
  br i1 %110, label %.lr.ph72, label %.preheader.._crit_edge73_crit_edge

.preheader.._crit_edge73_crit_edge:               ; preds = %.preheader
  %.pre104 = load ptr, ptr %111, align 8, !tbaa !18
  br label %._crit_edge73

.lr.ph72:                                         ; preds = %.preheader
  %112 = sext i32 %.lcssa56 to i64
  %.pre102 = load ptr, ptr %111, align 8, !tbaa !18
  %.pre103 = load i32, ptr %.pre102, align 4, !tbaa !19
  br label %144

113:                                              ; preds = %.lr.ph66, %131
  %114 = phi i32 [ %64, %.lr.ph66 ], [ %132, %131 ]
  %115 = phi ptr [ %63, %.lr.ph66 ], [ %133, %131 ]
  %indvars.iv92 = phi i64 [ 0, %.lr.ph66 ], [ %indvars.iv.next93, %131 ]
  %116 = getelementptr inbounds i8, ptr %115, i64 8
  %117 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %116, i64 0, i64 %indvars.iv92
  %118 = load i32, ptr %117, align 4, !tbaa !25
  %.not53 = icmp ult i32 %118, %61
  br i1 %.not53, label %131, label %119

119:                                              ; preds = %113
  %120 = load ptr, ptr %67, align 8, !tbaa !18
  %121 = getelementptr inbounds i8, ptr %120, i64 8
  %122 = load i32, ptr %120, align 4, !tbaa !19
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %121, i64 0, i64 %123
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %124, ptr noundef nonnull align 4 dereferenceable(16) %117, i64 16, i1 false), !tbaa.struct !28
  %125 = load ptr, ptr %67, align 8, !tbaa !18
  %126 = load i32, ptr %125, align 4, !tbaa !19
  %127 = add i32 %126, 1
  store i32 %127, ptr %125, align 4, !tbaa !19
  %128 = load ptr, ptr %62, align 8, !tbaa !18
  %129 = getelementptr inbounds i8, ptr %128, i64 8
  %130 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %129, i64 0, i64 %indvars.iv92, i32 1
  store i32 3, ptr %130, align 4, !tbaa !30
  %.pre101 = load i32, ptr %128, align 4, !tbaa !19
  br label %131

131:                                              ; preds = %113, %119
  %132 = phi i32 [ %114, %113 ], [ %.pre101, %119 ]
  %133 = phi ptr [ %115, %113 ], [ %128, %119 ]
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %134 = getelementptr inbounds i8, ptr %133, i64 4
  %135 = load i32, ptr %134, align 4, !tbaa !21
  %136 = sub i32 %132, %135
  %137 = zext i32 %136 to i64
  %138 = icmp ult i64 %indvars.iv.next93, %137
  br i1 %138, label %113, label %._crit_edge67, !llvm.loop !31

._crit_edge73:                                    ; preds = %144, %.preheader.._crit_edge73_crit_edge
  %139 = phi ptr [ %.pre104, %.preheader.._crit_edge73_crit_edge ], [ %153, %144 ]
  %.lcssa55 = phi ptr [ %105, %.preheader.._crit_edge73_crit_edge ], [ %156, %144 ]
  %.lcssa54 = phi i32 [ %104, %.preheader.._crit_edge73_crit_edge ], [ %159, %144 ]
  %140 = getelementptr inbounds i8, ptr %.lcssa55, i64 4
  %141 = load i32, ptr %140, align 4, !tbaa !21
  %142 = getelementptr inbounds i8, ptr %139, i64 4
  store i32 %141, ptr %142, align 4, !tbaa !21
  %143 = sub i32 %.lcssa54, %141
  store i32 %143, ptr %.lcssa55, align 4, !tbaa !19
  store i32 0, ptr %140, align 4, !tbaa !21
  br label %162

144:                                              ; preds = %.lr.ph72, %144
  %145 = phi i32 [ %.pre103, %.lr.ph72 ], [ %155, %144 ]
  %146 = phi ptr [ %.pre102, %.lr.ph72 ], [ %153, %144 ]
  %indvars.iv95 = phi i64 [ %112, %.lr.ph72 ], [ %indvars.iv.next96, %144 ]
  %147 = phi ptr [ %105, %.lr.ph72 ], [ %156, %144 ]
  %148 = getelementptr inbounds i8, ptr %147, i64 8
  %149 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %148, i64 0, i64 %indvars.iv95
  %150 = getelementptr inbounds i8, ptr %146, i64 8
  %151 = zext i32 %145 to i64
  %152 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %150, i64 0, i64 %151
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %152, ptr noundef nonnull align 4 dereferenceable(16) %149, i64 16, i1 false), !tbaa.struct !28
  %153 = load ptr, ptr %111, align 8, !tbaa !18
  %154 = load i32, ptr %153, align 4, !tbaa !19
  %155 = add i32 %154, 1
  store i32 %155, ptr %153, align 4, !tbaa !19
  %156 = load ptr, ptr %62, align 8, !tbaa !18
  %157 = getelementptr inbounds i8, ptr %156, i64 8
  %158 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %157, i64 0, i64 %indvars.iv95, i32 1
  store i32 3, ptr %158, align 4, !tbaa !30
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %159 = load i32, ptr %156, align 4, !tbaa !19
  %160 = trunc nsw i64 %indvars.iv.next96 to i32
  %161 = icmp ugt i32 %159, %160
  br i1 %161, label %144, label %._crit_edge73, !llvm.loop !32

162:                                              ; preds = %._crit_edge73, %._crit_edge67
  %163 = phi i32 [ %143, %._crit_edge73 ], [ %104, %._crit_edge67 ]
  %164 = phi ptr [ %.lcssa55, %._crit_edge73 ], [ %105, %._crit_edge67 ]
  %.not84 = icmp eq i32 %163, 0
  br i1 %.not84, label %._crit_edge80, label %.lr.ph79

._crit_edge80:                                    ; preds = %175, %162
  %.036.lcssa = phi i32 [ 0, %162 ], [ %.1, %175 ]
  %.lcssa = phi ptr [ %164, %162 ], [ %177, %175 ]
  store i32 %.036.lcssa, ptr %.lcssa, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #9
  ret i32 %61

.lr.ph79:                                         ; preds = %162, %175
  %165 = phi i32 [ %176, %175 ], [ %163, %162 ]
  %166 = phi ptr [ %177, %175 ], [ %164, %162 ]
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %175 ], [ 0, %162 ]
  %.03676 = phi i32 [ %.1, %175 ], [ 0, %162 ]
  %167 = getelementptr inbounds i8, ptr %166, i64 8
  %168 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %167, i64 0, i64 %indvars.iv98
  %169 = getelementptr inbounds i8, ptr %168, i64 4
  %170 = load i32, ptr %169, align 4, !tbaa !30
  %.not52 = icmp eq i32 %170, 3
  br i1 %.not52, label %175, label %171

171:                                              ; preds = %.lr.ph79
  %172 = zext i32 %.03676 to i64
  %173 = getelementptr inbounds [247 x %struct.BeUpsert], ptr %167, i64 0, i64 %172
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %173, ptr noundef nonnull align 4 dereferenceable(16) %168, i64 16, i1 false), !tbaa.struct !28
  %174 = add i32 %.03676, 1
  %.pre105 = load ptr, ptr %62, align 8, !tbaa !18
  %.pre106 = load i32, ptr %.pre105, align 4, !tbaa !19
  br label %175

175:                                              ; preds = %.lr.ph79, %171
  %176 = phi i32 [ %.pre106, %171 ], [ %165, %.lr.ph79 ]
  %177 = phi ptr [ %.pre105, %171 ], [ %166, %.lr.ph79 ]
  %.1 = phi i32 [ %174, %171 ], [ %.03676, %.lr.ph79 ]
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %178 = zext i32 %176 to i64
  %179 = icmp ult i64 %indvars.iv.next99, %178
  br i1 %179, label %.lr.ph79, label %._crit_edge80, !llvm.loop !33
}

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

; 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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 48}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTS8BePivots", !11, i64 0, !9, i64 4, !9, i64 64}
!16 = !{!6, !8, i64 8}
!17 = !{!6, !8, i64 24}
!18 = !{!6, !8, i64 40}
!19 = !{!20, !11, i64 0}
!20 = !{!"_ZTS8BeBuffer", !11, i64 0, !11, i64 4, !9, i64 8}
!21 = !{!20, !11, i64 4}
!22 = !{!6, !11, i64 16}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !11, i64 0}
!26 = !{!"_ZTS8BeUpsert", !11, i64 0, !27, i64 4, !11, i64 8, !11, i64 12}
!27 = !{!"_ZTS14UpsertFunction", !9, i64 0}
!28 = !{i64 0, i64 4, !12, i64 4, i64 4, !29, i64 8, i64 4, !12, i64 12, i64 4, !12}
!29 = !{!27, !27, i64 0}
!30 = !{!26, !27, i64 4}
!31 = distinct !{!31, !24}
!32 = distinct !{!32, !24}
!33 = distinct !{!33, !24}


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