; LLVM IR from mitdbg/deneva :: storage/index_btree.ll (ZN11index_btree15split_nl_insertE10glob_paramP7bt_nodejmS2_)

; 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"

%struct.glob_param = type { i64 }
%struct.bt_node = type { ptr, i8, ptr, ptr, i32, ptr, i8, %union.pthread_mutex_t, i32, i32 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%class.index_btree = type { %class.index_base, i64, i32, ptr, ptr, ptr }
%class.index_base = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@stdout = external global ptr, align 8
@.str.18 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

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

declare i32 @printf(ptr noundef, ...) #2

declare i32 @fflush(ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11index_btree15split_nl_insertE10glob_paramP7bt_nodejmS2_(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 %1, ptr noundef %2, i32 noundef %3, i64 noundef %4, ptr noundef %5) #4 align 2 {
  %7 = alloca i32, align 4
  %8 = alloca %struct.glob_param, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca [16 x i64], align 16
  %23 = alloca [17 x ptr], align 16
  %24 = alloca i32, align 4
  %25 = alloca %struct.glob_param, align 8
  %26 = getelementptr inbounds %struct.glob_param, ptr %8, i32 0, i32 0
  store i64 %1, ptr %26, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i64 %4, ptr %12, align 8, !tbaa !11
  store ptr %5, ptr %13, align 8, !tbaa !5
  %27 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %28 = getelementptr inbounds %struct.glob_param, ptr %8, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !13
  store i64 %29, ptr %21, align 8, !tbaa !11
  %30 = load i64, ptr %21, align 8, !tbaa !11
  %31 = call noundef i32 @_ZN11index_btree9make_nodeEmRP7bt_node(ptr noundef nonnull align 8 dereferenceable(56) %27, i64 noundef %30, ptr noundef nonnull align 8 dereferenceable(8) %19)
  store i32 %31, ptr %14, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 128, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 136, ptr %23) #6
  store i64 0, ptr %15, align 8, !tbaa !11
  store i64 0, ptr %16, align 8, !tbaa !11
  br label %32

32:                                               ; preds = %58, %6
  %33 = load i64, ptr %15, align 8, !tbaa !11
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.bt_node, ptr %34, i32 0, i32 4
  %36 = load i32, ptr %35, align 8, !tbaa !17
  %37 = add i32 %36, 1
  %38 = zext i32 %37 to i64
  %39 = icmp ult i64 %33, %38
  br i1 %39, label %40, label %63

40:                                               ; preds = %32
  %41 = load i64, ptr %16, align 8, !tbaa !11
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = add i32 %42, 1
  %44 = zext i32 %43 to i64
  %45 = icmp eq i64 %41, %44
  br i1 %45, label %46, label %49

46:                                               ; preds = %40
  %47 = load i64, ptr %16, align 8, !tbaa !11
  %48 = add i64 %47, 1
  store i64 %48, ptr %16, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %46, %40
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.bt_node, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  %53 = load i64, ptr %15, align 8, !tbaa !11
  %54 = getelementptr inbounds ptr, ptr %52, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = load i64, ptr %16, align 8, !tbaa !11
  %57 = getelementptr inbounds [17 x ptr], ptr %23, i64 0, i64 %56
  store ptr %55, ptr %57, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %49
  %59 = load i64, ptr %15, align 8, !tbaa !11
  %60 = add i64 %59, 1
  store i64 %60, ptr %15, align 8, !tbaa !11
  %61 = load i64, ptr %16, align 8, !tbaa !11
  %62 = add i64 %61, 1
  store i64 %62, ptr %16, align 8, !tbaa !11
  br label %32, !llvm.loop !22

63:                                               ; preds = %32
  store i64 0, ptr %15, align 8, !tbaa !11
  store i64 0, ptr %16, align 8, !tbaa !11
  br label %64

64:                                               ; preds = %88, %63
  %65 = load i64, ptr %15, align 8, !tbaa !11
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.bt_node, ptr %66, i32 0, i32 4
  %68 = load i32, ptr %67, align 8, !tbaa !17
  %69 = zext i32 %68 to i64
  %70 = icmp ult i64 %65, %69
  br i1 %70, label %71, label %93

71:                                               ; preds = %64
  %72 = load i64, ptr %16, align 8, !tbaa !11
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  %75 = icmp eq i64 %72, %74
  br i1 %75, label %76, label %79

76:                                               ; preds = %71
  %77 = load i64, ptr %16, align 8, !tbaa !11
  %78 = add i64 %77, 1
  store i64 %78, ptr %16, align 8, !tbaa !11
  br label %79

79:                                               ; preds = %76, %71
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.bt_node, ptr %80, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !24
  %83 = load i64, ptr %15, align 8, !tbaa !11
  %84 = getelementptr inbounds i64, ptr %82, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !11
  %86 = load i64, ptr %16, align 8, !tbaa !11
  %87 = getelementptr inbounds [16 x i64], ptr %22, i64 0, i64 %86
  store i64 %85, ptr %87, align 8, !tbaa !11
  br label %88

88:                                               ; preds = %79
  %89 = load i64, ptr %15, align 8, !tbaa !11
  %90 = add i64 %89, 1
  store i64 %90, ptr %15, align 8, !tbaa !11
  %91 = load i64, ptr %16, align 8, !tbaa !11
  %92 = add i64 %91, 1
  store i64 %92, ptr %16, align 8, !tbaa !11
  br label %64, !llvm.loop !25

93:                                               ; preds = %64
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = add i32 %95, 1
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds [17 x ptr], ptr %23, i64 0, i64 %97
  store ptr %94, ptr %98, align 8, !tbaa !5
  %99 = load i64, ptr %12, align 8, !tbaa !11
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds [16 x i64], ptr %22, i64 0, i64 %101
  store i64 %99, ptr %102, align 8, !tbaa !11
  %103 = getelementptr inbounds %class.index_btree, ptr %27, i32 0, i32 2
  %104 = load i32, ptr %103, align 8, !tbaa !26
  %105 = call noundef i32 @_ZN11index_btree3cutEj(ptr noundef nonnull align 8 dereferenceable(56) %27, i32 noundef %104)
  %106 = zext i32 %105 to i64
  store i64 %106, ptr %17, align 8, !tbaa !11
  %107 = load i32, ptr %14, align 4, !tbaa !15
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %111

109:                                              ; preds = %93
  %110 = load i32, ptr %14, align 4, !tbaa !15
  store i32 %110, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %261

111:                                              ; preds = %93
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.bt_node, ptr %112, i32 0, i32 4
  store i32 0, ptr %113, align 8, !tbaa !17
  store i64 0, ptr %15, align 8, !tbaa !11
  br label %114

114:                                              ; preds = %151, %111
  %115 = load i64, ptr %15, align 8, !tbaa !11
  %116 = load i64, ptr %17, align 8, !tbaa !11
  %117 = sub i64 %116, 1
  %118 = icmp ult i64 %115, %117
  br i1 %118, label %119, label %154

119:                                              ; preds = %114
  %120 = load i64, ptr %15, align 8, !tbaa !11
  %121 = getelementptr inbounds [17 x ptr], ptr %23, i64 0, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.bt_node, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !21
  %126 = load i64, ptr %15, align 8, !tbaa !11
  %127 = getelementptr inbounds ptr, ptr %125, i64 %126
  store ptr %122, ptr %127, align 8, !tbaa !5
  %128 = load i64, ptr %15, align 8, !tbaa !11
  %129 = getelementptr inbounds [16 x i64], ptr %22, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !11
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.bt_node, ptr %131, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !24
  %134 = load i64, ptr %15, align 8, !tbaa !11
  %135 = getelementptr inbounds i64, ptr %133, i64 %134
  store i64 %130, ptr %135, align 8, !tbaa !11
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.bt_node, ptr %136, i32 0, i32 4
  %138 = load i32, ptr %137, align 8, !tbaa !17
  %139 = add i32 %138, 1
  store i32 %139, ptr %137, align 8, !tbaa !17
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.bt_node, ptr %140, i32 0, i32 4
  %142 = load i32, ptr %141, align 8, !tbaa !17
  %143 = getelementptr inbounds %class.index_btree, ptr %27, i32 0, i32 2
  %144 = load i32, ptr %143, align 8, !tbaa !26
  %145 = icmp ult i32 %142, %144
  br i1 %145, label %150, label %146

146:                                              ; preds = %119
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 611, ptr noundef @.str.18)
  %148 = load ptr, ptr @stdout, align 8, !tbaa !5
  %149 = call i32 @fflush(ptr noundef %148)
  call void @exit(i32 noundef 0) #7
  unreachable

150:                                              ; preds = %119
  br label %151

151:                                              ; preds = %150
  %152 = load i64, ptr %15, align 8, !tbaa !11
  %153 = add i64 %152, 1
  store i64 %153, ptr %15, align 8, !tbaa !11
  br label %114, !llvm.loop !29

154:                                              ; preds = %114
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.bt_node, ptr %155, i32 0, i32 5
  %157 = load ptr, ptr %156, align 8, !tbaa !30
  %158 = load ptr, ptr %19, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.bt_node, ptr %158, i32 0, i32 5
  store ptr %157, ptr %159, align 8, !tbaa !30
  %160 = load ptr, ptr %19, align 8, !tbaa !5
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.bt_node, ptr %161, i32 0, i32 5
  store ptr %160, ptr %162, align 8, !tbaa !30
  %163 = load i64, ptr %15, align 8, !tbaa !11
  %164 = getelementptr inbounds [17 x ptr], ptr %23, i64 0, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.bt_node, ptr %166, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8, !tbaa !21
  %169 = load i64, ptr %15, align 8, !tbaa !11
  %170 = getelementptr inbounds ptr, ptr %168, i64 %169
  store ptr %165, ptr %170, align 8, !tbaa !5
  %171 = load i64, ptr %17, align 8, !tbaa !11
  %172 = sub i64 %171, 1
  %173 = getelementptr inbounds [16 x i64], ptr %22, i64 0, i64 %172
  %174 = load i64, ptr %173, align 8, !tbaa !11
  store i64 %174, ptr %18, align 8, !tbaa !11
  %175 = load i64, ptr %15, align 8, !tbaa !11
  %176 = add i64 %175, 1
  store i64 %176, ptr %15, align 8, !tbaa !11
  store i64 0, ptr %16, align 8, !tbaa !11
  br label %177

177:                                              ; preds = %215, %154
  %178 = load i64, ptr %15, align 8, !tbaa !11
  %179 = getelementptr inbounds %class.index_btree, ptr %27, i32 0, i32 2
  %180 = load i32, ptr %179, align 8, !tbaa !26
  %181 = zext i32 %180 to i64
  %182 = icmp ult i64 %178, %181
  br i1 %182, label %183, label %220

183:                                              ; preds = %177
  %184 = load i64, ptr %15, align 8, !tbaa !11
  %185 = getelementptr inbounds [17 x ptr], ptr %23, i64 0, i64 %184
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  %187 = load ptr, ptr %19, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.bt_node, ptr %187, i32 0, i32 0
  %189 = load ptr, ptr %188, align 8, !tbaa !21
  %190 = load i64, ptr %16, align 8, !tbaa !11
  %191 = getelementptr inbounds ptr, ptr %189, i64 %190
  store ptr %186, ptr %191, align 8, !tbaa !5
  %192 = load i64, ptr %15, align 8, !tbaa !11
  %193 = getelementptr inbounds [16 x i64], ptr %22, i64 0, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !11
  %195 = load ptr, ptr %19, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.bt_node, ptr %195, i32 0, i32 2
  %197 = load ptr, ptr %196, align 8, !tbaa !24
  %198 = load i64, ptr %16, align 8, !tbaa !11
  %199 = getelementptr inbounds i64, ptr %197, i64 %198
  store i64 %194, ptr %199, align 8, !tbaa !11
  %200 = load ptr, ptr %19, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.bt_node, ptr %200, i32 0, i32 4
  %202 = load i32, ptr %201, align 8, !tbaa !17
  %203 = add i32 %202, 1
  store i32 %203, ptr %201, align 8, !tbaa !17
  %204 = load ptr, ptr %10, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.bt_node, ptr %204, i32 0, i32 4
  %206 = load i32, ptr %205, align 8, !tbaa !17
  %207 = getelementptr inbounds %class.index_btree, ptr %27, i32 0, i32 2
  %208 = load i32, ptr %207, align 8, !tbaa !26
  %209 = icmp ult i32 %206, %208
  br i1 %209, label %214, label %210

210:                                              ; preds = %183
  %211 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 627, ptr noundef @.str.18)
  %212 = load ptr, ptr @stdout, align 8, !tbaa !5
  %213 = call i32 @fflush(ptr noundef %212)
  call void @exit(i32 noundef 0) #7
  unreachable

214:                                              ; preds = %183
  br label %215

215:                                              ; preds = %214
  %216 = load i64, ptr %15, align 8, !tbaa !11
  %217 = add i64 %216, 1
  store i64 %217, ptr %15, align 8, !tbaa !11
  %218 = load i64, ptr %16, align 8, !tbaa !11
  %219 = add i64 %218, 1
  store i64 %219, ptr %16, align 8, !tbaa !11
  br label %177, !llvm.loop !31

220:                                              ; preds = %177
  %221 = load i64, ptr %15, align 8, !tbaa !11
  %222 = getelementptr inbounds [17 x ptr], ptr %23, i64 0, i64 %221
  %223 = load ptr, ptr %222, align 8, !tbaa !5
  %224 = load ptr, ptr %19, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.bt_node, ptr %224, i32 0, i32 0
  %226 = load ptr, ptr %225, align 8, !tbaa !21
  %227 = load i64, ptr %16, align 8, !tbaa !11
  %228 = getelementptr inbounds ptr, ptr %226, i64 %227
  store ptr %223, ptr %228, align 8, !tbaa !5
  %229 = load ptr, ptr %10, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.bt_node, ptr %229, i32 0, i32 3
  %231 = load ptr, ptr %230, align 8, !tbaa !32
  %232 = load ptr, ptr %19, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.bt_node, ptr %232, i32 0, i32 3
  store ptr %231, ptr %233, align 8, !tbaa !32
  store i64 0, ptr %15, align 8, !tbaa !11
  br label %234

234:                                              ; preds = %251, %220
  %235 = load i64, ptr %15, align 8, !tbaa !11
  %236 = load ptr, ptr %19, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.bt_node, ptr %236, i32 0, i32 4
  %238 = load i32, ptr %237, align 8, !tbaa !17
  %239 = zext i32 %238 to i64
  %240 = icmp ule i64 %235, %239
  br i1 %240, label %241, label %254

241:                                              ; preds = %234
  %242 = load ptr, ptr %19, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.bt_node, ptr %242, i32 0, i32 0
  %244 = load ptr, ptr %243, align 8, !tbaa !21
  %245 = load i64, ptr %15, align 8, !tbaa !11
  %246 = getelementptr inbounds ptr, ptr %244, i64 %245
  %247 = load ptr, ptr %246, align 8, !tbaa !5
  store ptr %247, ptr %20, align 8, !tbaa !5
  %248 = load ptr, ptr %19, align 8, !tbaa !5
  %249 = load ptr, ptr %20, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.bt_node, ptr %249, i32 0, i32 3
  store ptr %248, ptr %250, align 8, !tbaa !32
  br label %251

251:                                              ; preds = %241
  %252 = load i64, ptr %15, align 8, !tbaa !11
  %253 = add i64 %252, 1
  store i64 %253, ptr %15, align 8, !tbaa !11
  br label %234, !llvm.loop !33

254:                                              ; preds = %234
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %8, i64 8, i1 false), !tbaa.struct !34
  %255 = load ptr, ptr %10, align 8, !tbaa !5
  %256 = load i64, ptr %18, align 8, !tbaa !11
  %257 = load ptr, ptr %19, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.glob_param, ptr %25, i32 0, i32 0
  %259 = load i64, ptr %258, align 8
  %260 = call noundef i32 @_ZN11index_btree18insert_into_parentE10glob_paramP7bt_nodemS2_(ptr noundef nonnull align 8 dereferenceable(56) %27, i64 %259, ptr noundef %255, i64 noundef %256, ptr noundef %257)
  store i32 %260, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %261

261:                                              ; preds = %254, %109
  call void @llvm.lifetime.end.p0(i64 136, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %262 = load i32, ptr %7, align 4
  ret i32 %262
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTS10glob_param", !12, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTS2RC", !7, i64 0}
!17 = !{!18, !10, i64 32}
!18 = !{!"_ZTS7bt_node", !6, i64 0, !19, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !19, i64 48, !7, i64 56, !20, i64 96, !10, i64 100}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTS7latch_t", !7, i64 0}
!21 = !{!18, !6, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!18, !6, i64 16}
!25 = distinct !{!25, !23}
!26 = !{!27, !10, i64 24}
!27 = !{!"_ZTS11index_btree", !28, i64 0, !12, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!28 = !{!"_ZTS10index_base", !6, i64 8}
!29 = distinct !{!29, !23}
!30 = !{!18, !6, i64 40}
!31 = distinct !{!31, !23}
!32 = !{!18, !6, i64 24}
!33 = distinct !{!33, !23}
!34 = !{i64 0, i64 8, !11}


; 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"

@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.18 = external hidden unnamed_addr constant [22 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN11index_btree9make_nodeEmRP7bt_node(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN11index_btree3cutEj(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN11index_btree18insert_into_parentE10glob_paramP7bt_nodemS2_(ptr noundef nonnull align 8 dereferenceable(56), i64, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11index_btree15split_nl_insertE10glob_paramP7bt_nodejmS2_(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 %1, ptr noundef %2, i32 noundef %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #3 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca [16 x i64], align 16
  %9 = alloca [17 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %10 = call noundef i32 @_ZN11index_btree9make_nodeEmRP7bt_node(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 136, ptr nonnull %9) #5
  %11 = getelementptr inbounds i8, ptr %2, i64 32
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = add i32 %12, 1
  %14 = zext i32 %13 to i64
  %.not104 = icmp eq i32 %13, 0
  br i1 %.not104, label %.lr.ph86, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %15 = add i32 %3, 1
  %16 = zext i32 %15 to i64
  %17 = load ptr, ptr %2, align 8, !tbaa !13
  %xtraiter = and i64 %14, 1
  %18 = icmp eq i32 %12, 0
  br i1 %18, label %.preheader.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %14, 4294967294
  br label %30

.preheader.unr-lcssa:                             ; preds = %30, %.lr.ph
  %.06683.unr = phi i64 [ 0, %.lr.ph ], [ %43, %30 ]
  %.06782.unr = phi i64 [ 0, %.lr.ph ], [ %44, %30 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.preheader.epilog-lcssa

.preheader.epilog-lcssa:                          ; preds = %.preheader.unr-lcssa
  %19 = icmp eq i64 %.06782.unr, %16
  %20 = zext i1 %19 to i64
  %spec.select.epil = add nuw nsw i64 %.06782.unr, %20
  %21 = getelementptr inbounds ptr, ptr %17, i64 %.06683.unr
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  %23 = getelementptr inbounds [17 x ptr], ptr %9, i64 0, i64 %spec.select.epil
  store ptr %22, ptr %23, align 8, !tbaa !14
  br label %.preheader

.preheader:                                       ; preds = %.preheader.unr-lcssa, %.preheader.epilog-lcssa
  %24 = zext i32 %12 to i64
  %.not105 = icmp eq i32 %12, 0
  br i1 %.not105, label %.preheader.._crit_edge_crit_edge, label %.lr.ph86

.preheader.._crit_edge_crit_edge:                 ; preds = %.preheader
  %.pre117 = zext i32 %3 to i64
  br label %._crit_edge

.lr.ph86:                                         ; preds = %6, %.preheader
  %25 = phi i64 [ %24, %.preheader ], [ 4294967295, %6 ]
  %26 = zext i32 %3 to i64
  %27 = getelementptr inbounds i8, ptr %2, i64 16
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %xtraiter129 = and i64 %25, 1
  %29 = icmp eq i64 %25, 1
  br i1 %29, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph86.new

.lr.ph86.new:                                     ; preds = %.lr.ph86
  %unroll_iter131 = and i64 %25, 4294967294
  br label %45

30:                                               ; preds = %30, %.lr.ph.new
  %.06683 = phi i64 [ 0, %.lr.ph.new ], [ %43, %30 ]
  %.06782 = phi i64 [ 0, %.lr.ph.new ], [ %44, %30 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %30 ]
  %31 = icmp eq i64 %.06782, %16
  %32 = zext i1 %31 to i64
  %spec.select = add nuw nsw i64 %.06782, %32
  %33 = getelementptr inbounds ptr, ptr %17, i64 %.06683
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  %35 = getelementptr inbounds [17 x ptr], ptr %9, i64 0, i64 %spec.select
  store ptr %34, ptr %35, align 8, !tbaa !14
  %36 = or disjoint i64 %.06683, 1
  %37 = add i64 %spec.select, 1
  %38 = icmp eq i64 %37, %16
  %39 = zext i1 %38 to i64
  %spec.select.1 = add nuw nsw i64 %37, %39
  %40 = getelementptr inbounds ptr, ptr %17, i64 %36
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  %42 = getelementptr inbounds [17 x ptr], ptr %9, i64 0, i64 %spec.select.1
  store ptr %41, ptr %42, align 8, !tbaa !14
  %43 = add nuw nsw i64 %.06683, 2
  %44 = add i64 %spec.select.1, 1
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.unr-lcssa, label %30, !llvm.loop !16

45:                                               ; preds = %45, %.lr.ph86.new
  %.185 = phi i64 [ 0, %.lr.ph86.new ], [ %58, %45 ]
  %.26984 = phi i64 [ 0, %.lr.ph86.new ], [ %59, %45 ]
  %niter132 = phi i64 [ 0, %.lr.ph86.new ], [ %niter132.next.1, %45 ]
  %46 = icmp eq i64 %.26984, %26
  %47 = zext i1 %46 to i64
  %spec.select75 = add nuw nsw i64 %.26984, %47
  %48 = getelementptr inbounds i64, ptr %28, i64 %.185
  %49 = load i64, ptr %48, align 8, !tbaa !18
  %50 = getelementptr inbounds [16 x i64], ptr %8, i64 0, i64 %spec.select75
  store i64 %49, ptr %50, align 8, !tbaa !18
  %51 = or disjoint i64 %.185, 1
  %52 = add i64 %spec.select75, 1
  %53 = icmp eq i64 %52, %26
  %54 = zext i1 %53 to i64
  %spec.select75.1 = add nuw nsw i64 %52, %54
  %55 = getelementptr inbounds i64, ptr %28, i64 %51
  %56 = load i64, ptr %55, align 8, !tbaa !18
  %57 = getelementptr inbounds [16 x i64], ptr %8, i64 0, i64 %spec.select75.1
  store i64 %56, ptr %57, align 8, !tbaa !18
  %58 = add nuw nsw i64 %.185, 2
  %59 = add i64 %spec.select75.1, 1
  %niter132.next.1 = add i64 %niter132, 2
  %niter132.ncmp.1 = icmp eq i64 %niter132.next.1, %unroll_iter131
  br i1 %niter132.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %45, !llvm.loop !20

._crit_edge.loopexit.unr-lcssa:                   ; preds = %45, %.lr.ph86
  %.185.unr = phi i64 [ 0, %.lr.ph86 ], [ %58, %45 ]
  %.26984.unr = phi i64 [ 0, %.lr.ph86 ], [ %59, %45 ]
  %lcmp.mod130.not = icmp eq i64 %xtraiter129, 0
  br i1 %lcmp.mod130.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %60 = icmp eq i64 %.26984.unr, %26
  %61 = zext i1 %60 to i64
  %spec.select75.epil = add nuw nsw i64 %.26984.unr, %61
  %62 = getelementptr inbounds i64, ptr %28, i64 %.185.unr
  %63 = load i64, ptr %62, align 8, !tbaa !18
  %64 = getelementptr inbounds [16 x i64], ptr %8, i64 0, i64 %spec.select75.epil
  store i64 %63, ptr %64, align 8, !tbaa !18
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %.preheader.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre117, %.preheader.._crit_edge_crit_edge ], [ %26, %._crit_edge.loopexit.unr-lcssa ], [ %26, %._crit_edge.loopexit.epilog-lcssa ]
  %65 = add i32 %3, 1
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds [17 x ptr], ptr %9, i64 0, i64 %66
  store ptr %5, ptr %67, align 8, !tbaa !14
  %68 = getelementptr inbounds [16 x i64], ptr %8, i64 0, i64 %.pre-phi
  store i64 %4, ptr %68, align 8, !tbaa !18
  %69 = getelementptr inbounds i8, ptr %0, i64 24
  %70 = load i32, ptr %69, align 8, !tbaa !21
  %71 = call noundef i32 @_ZN11index_btree3cutEj(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %70)
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %72, label %183

72:                                               ; preds = %._crit_edge
  %73 = zext i32 %71 to i64
  store i32 0, ptr %11, align 8, !tbaa !5
  %74 = add nsw i64 %73, -1
  %.not106 = icmp eq i64 %74, 0
  %.pre = load i32, ptr %69, align 8, !tbaa !21
  br i1 %.not106, label %94, label %.lr.ph89

.lr.ph89:                                         ; preds = %72
  %75 = getelementptr inbounds i8, ptr %2, i64 16
  br label %76

76:                                               ; preds = %.lr.ph89, %92
  %77 = phi i32 [ 0, %.lr.ph89 ], [ %86, %92 ]
  %.287 = phi i64 [ 0, %.lr.ph89 ], [ %93, %92 ]
  %78 = getelementptr inbounds [17 x ptr], ptr %9, i64 0, i64 %.287
  %79 = load ptr, ptr %78, align 8, !tbaa !14
  %80 = load ptr, ptr %2, align 8, !tbaa !13
  %81 = getelementptr inbounds ptr, ptr %80, i64 %.287
  store ptr %79, ptr %81, align 8, !tbaa !14
  %82 = getelementptr inbounds [16 x i64], ptr %8, i64 0, i64 %.287
  %83 = load i64, ptr %82, align 8, !tbaa !18
  %84 = load ptr, ptr %75, align 8, !tbaa !15
  %85 = getelementptr inbounds i64, ptr %84, i64 %.287
  store i64 %83, ptr %85, align 8, !tbaa !18
  %86 = add nuw i32 %77, 1
  %87 = icmp ult i32 %86, %.pre
  br i1 %87, label %92, label %88

88:                                               ; preds = %76
  store i32 %86, ptr %11, align 8, !tbaa !5
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull @.str.1, i32 noundef 611, ptr noundef nonnull @.str.18)
  %90 = load ptr, ptr @stdout, align 8, !tbaa !14
  %91 = call i32 @fflush(ptr noundef %90)
  call void @exit(i32 noundef 0) #6
  unreachable

92:                                               ; preds = %76
  %93 = add nuw nsw i64 %.287, 1
  %exitcond112.not = icmp eq i64 %93, %74
  br i1 %exitcond112.not, label %._crit_edge90, label %76, !llvm.loop !24

._crit_edge90:                                    ; preds = %92
  store i32 %86, ptr %11, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %._crit_edge90, %72
  %95 = getelementptr inbounds i8, ptr %2, i64 40
  %96 = load ptr, ptr %95, align 8, !tbaa !25
  %97 = load ptr, ptr %7, align 8, !tbaa !14
  %98 = getelementptr inbounds i8, ptr %97, i64 40
  store ptr %96, ptr %98, align 8, !tbaa !25
  store ptr %97, ptr %95, align 8, !tbaa !25
  %99 = getelementptr inbounds [17 x ptr], ptr %9, i64 0, i64 %74
  %100 = load ptr, ptr %99, align 8, !tbaa !14
  %101 = load ptr, ptr %2, align 8, !tbaa !13
  %102 = getelementptr inbounds ptr, ptr %101, i64 %74
  store ptr %100, ptr %102, align 8, !tbaa !14
  %103 = getelementptr inbounds [16 x i64], ptr %8, i64 0, i64 %74
  %104 = load i64, ptr %103, align 8, !tbaa !18
  %105 = icmp ult i32 %71, %.pre
  %.pre116 = load ptr, ptr %7, align 8, !tbaa !14
  br i1 %105, label %.lr.ph99.preheader, label %._crit_edge100

.lr.ph99.preheader:                               ; preds = %94
  %106 = zext i32 %.pre to i64
  %107 = sub nsw i64 %106, %73
  br label %.lr.ph99

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %128
  %108 = phi ptr [ %115, %128 ], [ %.pre116, %.lr.ph99.preheader ]
  %.397 = phi i64 [ %.3, %128 ], [ %73, %.lr.ph99.preheader ]
  %.47196 = phi i64 [ %129, %128 ], [ 0, %.lr.ph99.preheader ]
  %109 = getelementptr inbounds [17 x ptr], ptr %9, i64 0, i64 %.397
  %110 = load ptr, ptr %109, align 8, !tbaa !14
  %111 = load ptr, ptr %108, align 8, !tbaa !13
  %112 = getelementptr inbounds ptr, ptr %111, i64 %.47196
  store ptr %110, ptr %112, align 8, !tbaa !14
  %113 = getelementptr inbounds [16 x i64], ptr %8, i64 0, i64 %.397
  %114 = load i64, ptr %113, align 8, !tbaa !18
  %115 = load ptr, ptr %7, align 8, !tbaa !14
  %116 = getelementptr inbounds i8, ptr %115, i64 16
  %117 = load ptr, ptr %116, align 8, !tbaa !15
  %118 = getelementptr inbounds i64, ptr %117, i64 %.47196
  store i64 %114, ptr %118, align 8, !tbaa !18
  %119 = getelementptr inbounds i8, ptr %115, i64 32
  %120 = load i32, ptr %119, align 8, !tbaa !5
  %121 = add i32 %120, 1
  store i32 %121, ptr %119, align 8, !tbaa !5
  %122 = load i32, ptr %11, align 8, !tbaa !5
  %123 = icmp ult i32 %122, %.pre
  br i1 %123, label %128, label %124

124:                                              ; preds = %.lr.ph99
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull @.str.1, i32 noundef 627, ptr noundef nonnull @.str.18)
  %126 = load ptr, ptr @stdout, align 8, !tbaa !14
  %127 = call i32 @fflush(ptr noundef %126)
  call void @exit(i32 noundef 0) #6
  unreachable

128:                                              ; preds = %.lr.ph99
  %129 = add nuw nsw i64 %.47196, 1
  %.3 = add nuw nsw i64 %.397, 1
  %exitcond113.not = icmp eq i64 %129, %107
  br i1 %exitcond113.not, label %._crit_edge100, label %.lr.ph99, !llvm.loop !26

._crit_edge100:                                   ; preds = %128, %94
  %130 = phi ptr [ %.pre116, %94 ], [ %115, %128 ]
  %.471.lcssa = phi i64 [ 0, %94 ], [ %107, %128 ]
  %.3.lcssa = phi i64 [ %73, %94 ], [ %.3, %128 ]
  %131 = getelementptr inbounds [17 x ptr], ptr %9, i64 0, i64 %.3.lcssa
  %132 = load ptr, ptr %131, align 8, !tbaa !14
  %133 = load ptr, ptr %130, align 8, !tbaa !13
  %134 = getelementptr inbounds ptr, ptr %133, i64 %.471.lcssa
  store ptr %132, ptr %134, align 8, !tbaa !14
  %135 = getelementptr inbounds i8, ptr %2, i64 24
  %136 = load ptr, ptr %135, align 8, !tbaa !27
  %137 = load ptr, ptr %7, align 8, !tbaa !14
  %138 = getelementptr inbounds i8, ptr %137, i64 24
  store ptr %136, ptr %138, align 8, !tbaa !27
  %139 = getelementptr inbounds i8, ptr %137, i64 32
  %140 = load i32, ptr %139, align 8, !tbaa !5
  %141 = zext i32 %140 to i64
  %142 = load ptr, ptr %137, align 8, !tbaa !13
  %143 = add nuw nsw i64 %141, 1
  %xtraiter134 = and i64 %143, 7
  %144 = icmp ult i32 %140, 7
  br i1 %144, label %.unr-lcssa, label %._crit_edge100.new

._crit_edge100.new:                               ; preds = %._crit_edge100
  %unroll_iter136 = and i64 %143, 8589934584
  br label %145

145:                                              ; preds = %145, %._crit_edge100.new
  %.4103 = phi i64 [ 0, %._crit_edge100.new ], [ %177, %145 ]
  %niter137 = phi i64 [ 0, %._crit_edge100.new ], [ %niter137.next.7, %145 ]
  %146 = getelementptr inbounds ptr, ptr %142, i64 %.4103
  %147 = load ptr, ptr %146, align 8, !tbaa !14
  %148 = getelementptr inbounds i8, ptr %147, i64 24
  store ptr %137, ptr %148, align 8, !tbaa !27
  %149 = or disjoint i64 %.4103, 1
  %150 = getelementptr inbounds ptr, ptr %142, i64 %149
  %151 = load ptr, ptr %150, align 8, !tbaa !14
  %152 = getelementptr inbounds i8, ptr %151, i64 24
  store ptr %137, ptr %152, align 8, !tbaa !27
  %153 = or disjoint i64 %.4103, 2
  %154 = getelementptr inbounds ptr, ptr %142, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !14
  %156 = getelementptr inbounds i8, ptr %155, i64 24
  store ptr %137, ptr %156, align 8, !tbaa !27
  %157 = or disjoint i64 %.4103, 3
  %158 = getelementptr inbounds ptr, ptr %142, i64 %157
  %159 = load ptr, ptr %158, align 8, !tbaa !14
  %160 = getelementptr inbounds i8, ptr %159, i64 24
  store ptr %137, ptr %160, align 8, !tbaa !27
  %161 = or disjoint i64 %.4103, 4
  %162 = getelementptr inbounds ptr, ptr %142, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !14
  %164 = getelementptr inbounds i8, ptr %163, i64 24
  store ptr %137, ptr %164, align 8, !tbaa !27
  %165 = or disjoint i64 %.4103, 5
  %166 = getelementptr inbounds ptr, ptr %142, i64 %165
  %167 = load ptr, ptr %166, align 8, !tbaa !14
  %168 = getelementptr inbounds i8, ptr %167, i64 24
  store ptr %137, ptr %168, align 8, !tbaa !27
  %169 = or disjoint i64 %.4103, 6
  %170 = getelementptr inbounds ptr, ptr %142, i64 %169
  %171 = load ptr, ptr %170, align 8, !tbaa !14
  %172 = getelementptr inbounds i8, ptr %171, i64 24
  store ptr %137, ptr %172, align 8, !tbaa !27
  %173 = or disjoint i64 %.4103, 7
  %174 = getelementptr inbounds ptr, ptr %142, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !14
  %176 = getelementptr inbounds i8, ptr %175, i64 24
  store ptr %137, ptr %176, align 8, !tbaa !27
  %177 = add nuw nsw i64 %.4103, 8
  %niter137.next.7 = add i64 %niter137, 8
  %niter137.ncmp.7 = icmp eq i64 %niter137.next.7, %unroll_iter136
  br i1 %niter137.ncmp.7, label %.unr-lcssa, label %145, !llvm.loop !28

.unr-lcssa:                                       ; preds = %145, %._crit_edge100
  %.4103.unr = phi i64 [ 0, %._crit_edge100 ], [ %177, %145 ]
  %lcmp.mod135.not = icmp eq i64 %xtraiter134, 0
  br i1 %lcmp.mod135.not, label %.epilog-lcssa, label %.epil.preheader133

.epil.preheader133:                               ; preds = %.unr-lcssa, %.epil.preheader133
  %.4103.epil = phi i64 [ %181, %.epil.preheader133 ], [ %.4103.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader133 ], [ 0, %.unr-lcssa ]
  %178 = getelementptr inbounds ptr, ptr %142, i64 %.4103.epil
  %179 = load ptr, ptr %178, align 8, !tbaa !14
  %180 = getelementptr inbounds i8, ptr %179, i64 24
  store ptr %137, ptr %180, align 8, !tbaa !27
  %181 = add nuw nsw i64 %.4103.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter134
  br i1 %epil.iter.cmp.not, label %.epilog-lcssa, label %.epil.preheader133, !llvm.loop !29

.epilog-lcssa:                                    ; preds = %.epil.preheader133, %.unr-lcssa
  %182 = call noundef i32 @_ZN11index_btree18insert_into_parentE10glob_paramP7bt_nodemS2_(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 %1, ptr noundef nonnull %2, i64 noundef %104, ptr noundef nonnull %137)
  br label %183

183:                                              ; preds = %._crit_edge, %.epilog-lcssa
  %.0 = phi i32 [ %182, %.epilog-lcssa ], [ %10, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 136, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  ret i32 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree 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 #2 = { 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 #3 = { 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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, !11, i64 32}
!6 = !{!"_ZTS7bt_node", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !7, i64 40, !10, i64 48, !8, i64 56, !12, i64 96, !11, i64 100}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTS7latch_t", !8, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !7, i64 16}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = distinct !{!20, !17}
!21 = !{!22, !11, i64 24}
!22 = !{!"_ZTS11index_btree", !23, i64 0, !19, i64 16, !11, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!23 = !{!"_ZTS10index_base", !7, i64 8}
!24 = distinct !{!24, !17}
!25 = !{!6, !7, i64 40}
!26 = distinct !{!26, !17}
!27 = !{!6, !7, i64 24}
!28 = distinct !{!28, !17}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.unroll.disable"}


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