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

; 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
@.str.19 = external hidden unnamed_addr constant [31 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: mustprogress uwtable
declare dso_local noundef i32 @_ZN11index_btree7make_lfEmRP7bt_node(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #1 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) #2

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

declare i32 @fflush(ptr noundef) #3

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

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

32:                                               ; preds = %5
  %33 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %33, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %280

34:                                               ; preds = %5
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.bt_node, ptr %35, i32 0, i32 4
  %37 = load i32, ptr %36, align 8, !tbaa !15
  %38 = getelementptr inbounds %class.index_btree, ptr %25, i32 0, i32 2
  %39 = load i32, ptr %38, align 8, !tbaa !20
  %40 = sub i32 %39, 1
  %41 = icmp eq i32 %37, %40
  br i1 %41, label %46, label %42

42:                                               ; preds = %34
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 432, ptr noundef @.str.19)
  %44 = load ptr, ptr @stdout, align 8, !tbaa !5
  %45 = call i32 @fflush(ptr noundef %44)
  call void @exit(i32 noundef 0) #7
  unreachable

46:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 128, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %22) #6
  store i32 0, ptr %13, align 4, !tbaa !23
  br label %47

47:                                               ; preds = %65, %46
  %48 = load i32, ptr %13, align 4, !tbaa !23
  %49 = getelementptr inbounds %class.index_btree, ptr %25, i32 0, i32 2
  %50 = load i32, ptr %49, align 8, !tbaa !20
  %51 = sub i32 %50, 1
  %52 = icmp ult i32 %48, %51
  br i1 %52, label %53, label %63

53:                                               ; preds = %47
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.bt_node, ptr %54, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !24
  %57 = load i32, ptr %13, align 4, !tbaa !23
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds i64, ptr %56, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = load i64, ptr %10, align 8, !tbaa !9
  %62 = icmp ult i64 %60, %61
  br label %63

63:                                               ; preds = %53, %47
  %64 = phi i1 [ false, %47 ], [ %62, %53 ]
  br i1 %64, label %65, label %68

65:                                               ; preds = %63
  %66 = load i32, ptr %13, align 4, !tbaa !23
  %67 = add i32 %66, 1
  store i32 %67, ptr %13, align 4, !tbaa !23
  br label %47, !llvm.loop !25

68:                                               ; preds = %63
  store i32 0, ptr %15, align 4, !tbaa !23
  store i32 0, ptr %16, align 4, !tbaa !23
  br label %69

69:                                               ; preds = %103, %68
  %70 = load i32, ptr %15, align 4, !tbaa !23
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.bt_node, ptr %71, i32 0, i32 4
  %73 = load i32, ptr %72, align 8, !tbaa !15
  %74 = icmp ult i32 %70, %73
  br i1 %74, label %75, label %108

75:                                               ; preds = %69
  %76 = load i32, ptr %16, align 4, !tbaa !23
  %77 = load i32, ptr %13, align 4, !tbaa !23
  %78 = icmp eq i32 %76, %77
  br i1 %78, label %79, label %82

79:                                               ; preds = %75
  %80 = load i32, ptr %16, align 4, !tbaa !23
  %81 = add i32 %80, 1
  store i32 %81, ptr %16, align 4, !tbaa !23
  br label %82

82:                                               ; preds = %79, %75
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.bt_node, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !24
  %86 = load i32, ptr %15, align 4, !tbaa !23
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds i64, ptr %85, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = load i32, ptr %16, align 4, !tbaa !23
  %91 = zext i32 %90 to i64
  %92 = getelementptr inbounds [16 x i64], ptr %21, i64 0, i64 %91
  store i64 %89, ptr %92, align 8, !tbaa !9
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.bt_node, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !27
  %96 = load i32, ptr %15, align 4, !tbaa !23
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %95, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = load i32, ptr %16, align 4, !tbaa !23
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds [16 x ptr], ptr %22, i64 0, i64 %101
  store ptr %99, ptr %102, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %82
  %104 = load i32, ptr %15, align 4, !tbaa !23
  %105 = add i32 %104, 1
  store i32 %105, ptr %15, align 4, !tbaa !23
  %106 = load i32, ptr %16, align 4, !tbaa !23
  %107 = add i32 %106, 1
  store i32 %107, ptr %16, align 4, !tbaa !23
  br label %69, !llvm.loop !28

108:                                              ; preds = %69
  %109 = load i64, ptr %10, align 8, !tbaa !9
  %110 = load i32, ptr %13, align 4, !tbaa !23
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds [16 x i64], ptr %21, i64 0, i64 %111
  store i64 %109, ptr %112, align 8, !tbaa !9
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = load i32, ptr %13, align 4, !tbaa !23
  %115 = zext i32 %114 to i64
  %116 = getelementptr inbounds [16 x ptr], ptr %22, i64 0, i64 %115
  store ptr %113, ptr %116, align 8, !tbaa !5
  %117 = getelementptr inbounds %class.index_btree, ptr %25, i32 0, i32 2
  %118 = load i32, ptr %117, align 8, !tbaa !20
  %119 = sub i32 %118, 1
  %120 = call noundef i32 @_ZN11index_btree3cutEj(ptr noundef nonnull align 8 dereferenceable(56) %25, i32 noundef %119)
  store i32 %120, ptr %14, align 4, !tbaa !23
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.bt_node, ptr %121, i32 0, i32 4
  store i32 0, ptr %122, align 8, !tbaa !15
  store i32 0, ptr %15, align 4, !tbaa !23
  br label %123

123:                                              ; preds = %163, %108
  %124 = load i32, ptr %15, align 4, !tbaa !23
  %125 = load i32, ptr %14, align 4, !tbaa !23
  %126 = icmp ult i32 %124, %125
  br i1 %126, label %127, label %166

127:                                              ; preds = %123
  %128 = load i32, ptr %15, align 4, !tbaa !23
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds [16 x ptr], ptr %22, i64 0, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.bt_node, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !27
  %135 = load i32, ptr %15, align 4, !tbaa !23
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds ptr, ptr %134, i64 %136
  store ptr %131, ptr %137, align 8, !tbaa !5
  %138 = load i32, ptr %15, align 4, !tbaa !23
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds [16 x i64], ptr %21, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !9
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.bt_node, ptr %142, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !24
  %145 = load i32, ptr %15, align 4, !tbaa !23
  %146 = zext i32 %145 to i64
  %147 = getelementptr inbounds i64, ptr %144, i64 %146
  store i64 %141, ptr %147, align 8, !tbaa !9
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.bt_node, ptr %148, i32 0, i32 4
  %150 = load i32, ptr %149, align 8, !tbaa !15
  %151 = add i32 %150, 1
  store i32 %151, ptr %149, align 8, !tbaa !15
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.bt_node, ptr %152, i32 0, i32 4
  %154 = load i32, ptr %153, align 8, !tbaa !15
  %155 = getelementptr inbounds %class.index_btree, ptr %25, i32 0, i32 2
  %156 = load i32, ptr %155, align 8, !tbaa !20
  %157 = icmp ult i32 %154, %156
  br i1 %157, label %162, label %158

158:                                              ; preds = %127
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 461, ptr noundef @.str.18)
  %160 = load ptr, ptr @stdout, align 8, !tbaa !5
  %161 = call i32 @fflush(ptr noundef %160)
  call void @exit(i32 noundef 0) #7
  unreachable

162:                                              ; preds = %127
  br label %163

163:                                              ; preds = %162
  %164 = load i32, ptr %15, align 4, !tbaa !23
  %165 = add i32 %164, 1
  store i32 %165, ptr %15, align 4, !tbaa !23
  br label %123, !llvm.loop !29

166:                                              ; preds = %123
  %167 = load i32, ptr %14, align 4, !tbaa !23
  store i32 %167, ptr %15, align 4, !tbaa !23
  store i32 0, ptr %16, align 4, !tbaa !23
  br label %168

168:                                              ; preds = %209, %166
  %169 = load i32, ptr %15, align 4, !tbaa !23
  %170 = getelementptr inbounds %class.index_btree, ptr %25, i32 0, i32 2
  %171 = load i32, ptr %170, align 8, !tbaa !20
  %172 = icmp ult i32 %169, %171
  br i1 %172, label %173, label %214

173:                                              ; preds = %168
  %174 = load i32, ptr %15, align 4, !tbaa !23
  %175 = zext i32 %174 to i64
  %176 = getelementptr inbounds [16 x ptr], ptr %22, i64 0, i64 %175
  %177 = load ptr, ptr %176, align 8, !tbaa !5
  %178 = load ptr, ptr %19, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.bt_node, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !27
  %181 = load i32, ptr %16, align 4, !tbaa !23
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds ptr, ptr %180, i64 %182
  store ptr %177, ptr %183, align 8, !tbaa !5
  %184 = load i32, ptr %15, align 4, !tbaa !23
  %185 = zext i32 %184 to i64
  %186 = getelementptr inbounds [16 x i64], ptr %21, i64 0, i64 %185
  %187 = load i64, ptr %186, align 8, !tbaa !9
  %188 = load ptr, ptr %19, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.bt_node, ptr %188, i32 0, i32 2
  %190 = load ptr, ptr %189, align 8, !tbaa !24
  %191 = load i32, ptr %16, align 4, !tbaa !23
  %192 = zext i32 %191 to i64
  %193 = getelementptr inbounds i64, ptr %190, i64 %192
  store i64 %187, ptr %193, align 8, !tbaa !9
  %194 = load ptr, ptr %19, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.bt_node, ptr %194, i32 0, i32 4
  %196 = load i32, ptr %195, align 8, !tbaa !15
  %197 = add i32 %196, 1
  store i32 %197, ptr %195, align 8, !tbaa !15
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.bt_node, ptr %198, i32 0, i32 4
  %200 = load i32, ptr %199, align 8, !tbaa !15
  %201 = getelementptr inbounds %class.index_btree, ptr %25, i32 0, i32 2
  %202 = load i32, ptr %201, align 8, !tbaa !20
  %203 = icmp ult i32 %200, %202
  br i1 %203, label %208, label %204

204:                                              ; preds = %173
  %205 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 469, ptr noundef @.str.18)
  %206 = load ptr, ptr @stdout, align 8, !tbaa !5
  %207 = call i32 @fflush(ptr noundef %206)
  call void @exit(i32 noundef 0) #7
  unreachable

208:                                              ; preds = %173
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %15, align 4, !tbaa !23
  %211 = add i32 %210, 1
  store i32 %211, ptr %15, align 4, !tbaa !23
  %212 = load i32, ptr %16, align 4, !tbaa !23
  %213 = add i32 %212, 1
  store i32 %213, ptr %16, align 4, !tbaa !23
  br label %168, !llvm.loop !30

214:                                              ; preds = %168
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.bt_node, ptr %215, i32 0, i32 5
  %217 = load ptr, ptr %216, align 8, !tbaa !31
  %218 = load ptr, ptr %19, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.bt_node, ptr %218, i32 0, i32 5
  store ptr %217, ptr %219, align 8, !tbaa !31
  %220 = load ptr, ptr %19, align 8, !tbaa !5
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.bt_node, ptr %221, i32 0, i32 5
  store ptr %220, ptr %222, align 8, !tbaa !31
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.bt_node, ptr %223, i32 0, i32 4
  %225 = load i32, ptr %224, align 8, !tbaa !15
  store i32 %225, ptr %15, align 4, !tbaa !23
  br label %226

226:                                              ; preds = %239, %214
  %227 = load i32, ptr %15, align 4, !tbaa !23
  %228 = getelementptr inbounds %class.index_btree, ptr %25, i32 0, i32 2
  %229 = load i32, ptr %228, align 8, !tbaa !20
  %230 = sub i32 %229, 1
  %231 = icmp ult i32 %227, %230
  br i1 %231, label %232, label %242

232:                                              ; preds = %226
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.bt_node, ptr %233, i32 0, i32 0
  %235 = load ptr, ptr %234, align 8, !tbaa !27
  %236 = load i32, ptr %15, align 4, !tbaa !23
  %237 = zext i32 %236 to i64
  %238 = getelementptr inbounds ptr, ptr %235, i64 %237
  store ptr null, ptr %238, align 8, !tbaa !5
  br label %239

239:                                              ; preds = %232
  %240 = load i32, ptr %15, align 4, !tbaa !23
  %241 = add i32 %240, 1
  store i32 %241, ptr %15, align 4, !tbaa !23
  br label %226, !llvm.loop !32

242:                                              ; preds = %226
  %243 = load ptr, ptr %19, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.bt_node, ptr %243, i32 0, i32 4
  %245 = load i32, ptr %244, align 8, !tbaa !15
  store i32 %245, ptr %15, align 4, !tbaa !23
  br label %246

246:                                              ; preds = %259, %242
  %247 = load i32, ptr %15, align 4, !tbaa !23
  %248 = getelementptr inbounds %class.index_btree, ptr %25, i32 0, i32 2
  %249 = load i32, ptr %248, align 8, !tbaa !20
  %250 = sub i32 %249, 1
  %251 = icmp ult i32 %247, %250
  br i1 %251, label %252, label %262

252:                                              ; preds = %246
  %253 = load ptr, ptr %19, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.bt_node, ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8, !tbaa !27
  %256 = load i32, ptr %15, align 4, !tbaa !23
  %257 = zext i32 %256 to i64
  %258 = getelementptr inbounds ptr, ptr %255, i64 %257
  store ptr null, ptr %258, align 8, !tbaa !5
  br label %259

259:                                              ; preds = %252
  %260 = load i32, ptr %15, align 4, !tbaa !23
  %261 = add i32 %260, 1
  store i32 %261, ptr %15, align 4, !tbaa !23
  br label %246, !llvm.loop !33

262:                                              ; preds = %246
  %263 = load ptr, ptr %9, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.bt_node, ptr %263, i32 0, i32 3
  %265 = load ptr, ptr %264, align 8, !tbaa !34
  %266 = load ptr, ptr %19, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.bt_node, ptr %266, i32 0, i32 3
  store ptr %265, ptr %267, align 8, !tbaa !34
  %268 = load ptr, ptr %19, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.bt_node, ptr %268, i32 0, i32 2
  %270 = load ptr, ptr %269, align 8, !tbaa !24
  %271 = getelementptr inbounds i64, ptr %270, i64 0
  %272 = load i64, ptr %271, align 8, !tbaa !9
  store i64 %272, ptr %17, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %7, i64 8, i1 false), !tbaa.struct !35
  %273 = load ptr, ptr %9, align 8, !tbaa !5
  %274 = load i64, ptr %17, align 8, !tbaa !9
  %275 = load ptr, ptr %19, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.glob_param, ptr %23, i32 0, i32 0
  %277 = load i64, ptr %276, align 8
  %278 = call noundef i32 @_ZN11index_btree18insert_into_parentE10glob_paramP7bt_nodemS2_(ptr noundef nonnull align 8 dereferenceable(56) %25, i64 %277, ptr noundef %273, i64 noundef %274, ptr noundef %275)
  store i32 %278, ptr %12, align 4, !tbaa !13
  %279 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %279, ptr %6, align 4
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 128, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %21) #6
  br label %280

280:                                              ; preds = %262, %32
  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 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %281 = load i32, ptr %6, align 4
  ret i32 %281
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { 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 #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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS10glob_param", !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS2RC", !7, i64 0}
!15 = !{!16, !18, i64 32}
!16 = !{!"_ZTS7bt_node", !6, i64 0, !17, i64 8, !6, i64 16, !6, i64 24, !18, i64 32, !6, i64 40, !17, i64 48, !7, i64 56, !19, i64 96, !18, i64 100}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTS7latch_t", !7, i64 0}
!20 = !{!21, !18, i64 24}
!21 = !{!"_ZTS11index_btree", !22, i64 0, !10, i64 16, !18, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!22 = !{!"_ZTS10index_base", !6, i64 8}
!23 = !{!18, !18, i64 0}
!24 = !{!16, !6, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!16, !6, i64 0}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}
!30 = distinct !{!30, !26}
!31 = !{!16, !6, i64 40}
!32 = distinct !{!32, !26}
!33 = distinct !{!33, !26}
!34 = !{!16, !6, i64 24}
!35 = !{i64 0, i64 8, !9}


; 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
@.str.19 = external hidden unnamed_addr constant [31 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: mustprogress uwtable
declare dso_local noundef i32 @_ZN11index_btree7make_lfEmRP7bt_node(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN11index_btree15split_lf_insertE10glob_paramP7bt_nodemP8itemid_t(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) local_unnamed_addr #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca [16 x i64], align 16
  %8 = alloca [16 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %9 = call noundef i32 @_ZN11index_btree7make_lfEmRP7bt_node(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %10, label %169

10:                                               ; preds = %5
  %11 = getelementptr inbounds i8, ptr %2, i64 32
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = load i32, ptr %13, align 8, !tbaa !13
  %15 = add i32 %14, -1
  %16 = icmp eq i32 %12, %15
  br i1 %16, label %21, label %17

17:                                               ; preds = %10
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull @.str.1, i32 noundef 432, ptr noundef nonnull @.str.19)
  %19 = load ptr, ptr @stdout, align 8, !tbaa !17
  %20 = call i32 @fflush(ptr noundef %19)
  call void @exit(i32 noundef 0) #6
  unreachable

21:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %8) #5
  %.not98 = icmp eq i32 %12, 0
  br i1 %.not98, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %21
  %22 = getelementptr inbounds i8, ptr %2, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %wide.trip.count = zext i32 %12 to i64
  br label %24

24:                                               ; preds = %.lr.ph, %28
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %28 ]
  %25 = getelementptr inbounds i64, ptr %23, i64 %indvars.iv
  %26 = load i64, ptr %25, align 8, !tbaa !19
  %27 = icmp ult i64 %26, %3
  br i1 %27, label %28, label %.critedge.split.loop.exit

28:                                               ; preds = %24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge, label %24, !llvm.loop !20

.critedge.split.loop.exit:                        ; preds = %24
  %29 = trunc nuw i64 %indvars.iv to i32
  br label %.critedge

.critedge:                                        ; preds = %28, %.critedge.split.loop.exit
  %.064.lcssa = phi i32 [ %29, %.critedge.split.loop.exit ], [ %12, %28 ]
  br i1 %.not98, label %._crit_edge, label %.lr.ph78

.lr.ph78:                                         ; preds = %.critedge
  %30 = getelementptr inbounds i8, ptr %2, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !18
  %32 = load ptr, ptr %2, align 8, !tbaa !22
  %xtraiter = and i64 %wide.trip.count, 1
  %33 = icmp eq i32 %12, 1
  br i1 %33, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph78.new

.lr.ph78.new:                                     ; preds = %.lr.ph78
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  br label %34

34:                                               ; preds = %34, %.lr.ph78.new
  %indvars.iv103 = phi i64 [ 0, %.lr.ph78.new ], [ %indvars.iv.next104.1, %34 ]
  %.06577 = phi i32 [ 0, %.lr.ph78.new ], [ %54, %34 ]
  %niter = phi i64 [ 0, %.lr.ph78.new ], [ %niter.next.1, %34 ]
  %35 = icmp eq i32 %.06577, %.064.lcssa
  %36 = zext i1 %35 to i32
  %spec.select = add i32 %.06577, %36
  %37 = getelementptr inbounds i64, ptr %31, i64 %indvars.iv103
  %38 = load i64, ptr %37, align 8, !tbaa !19
  %39 = zext i32 %spec.select to i64
  %40 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %39
  store i64 %38, ptr %40, align 8, !tbaa !19
  %41 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv103
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  %43 = getelementptr inbounds [16 x ptr], ptr %8, i64 0, i64 %39
  store ptr %42, ptr %43, align 8, !tbaa !17
  %indvars.iv.next104 = or disjoint i64 %indvars.iv103, 1
  %44 = add i32 %spec.select, 1
  %45 = icmp eq i32 %44, %.064.lcssa
  %46 = zext i1 %45 to i32
  %spec.select.1 = add i32 %44, %46
  %47 = getelementptr inbounds i64, ptr %31, i64 %indvars.iv.next104
  %48 = load i64, ptr %47, align 8, !tbaa !19
  %49 = zext i32 %spec.select.1 to i64
  %50 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %49
  store i64 %48, ptr %50, align 8, !tbaa !19
  %51 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv.next104
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  %53 = getelementptr inbounds [16 x ptr], ptr %8, i64 0, i64 %49
  store ptr %52, ptr %53, align 8, !tbaa !17
  %indvars.iv.next104.1 = add nuw nsw i64 %indvars.iv103, 2
  %54 = add i32 %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 %._crit_edge.loopexit.unr-lcssa, label %34, !llvm.loop !23

._crit_edge.loopexit.unr-lcssa:                   ; preds = %34, %.lr.ph78
  %indvars.iv103.unr = phi i64 [ 0, %.lr.ph78 ], [ %indvars.iv.next104.1, %34 ]
  %.06577.unr = phi i32 [ 0, %.lr.ph78 ], [ %54, %34 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %55 = icmp eq i32 %.06577.unr, %.064.lcssa
  %56 = zext i1 %55 to i32
  %spec.select.epil = add i32 %.06577.unr, %56
  %57 = getelementptr inbounds i64, ptr %31, i64 %indvars.iv103.unr
  %58 = load i64, ptr %57, align 8, !tbaa !19
  %59 = zext i32 %spec.select.epil to i64
  %60 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %59
  store i64 %58, ptr %60, align 8, !tbaa !19
  %61 = getelementptr inbounds ptr, ptr %32, i64 %indvars.iv103.unr
  %62 = load ptr, ptr %61, align 8, !tbaa !17
  %63 = getelementptr inbounds [16 x ptr], ptr %8, i64 0, i64 %59
  store ptr %62, ptr %63, align 8, !tbaa !17
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %21, %.critedge
  %.064.lcssa136 = phi i32 [ %.064.lcssa, %.critedge ], [ 0, %21 ], [ %.064.lcssa, %._crit_edge.loopexit.unr-lcssa ], [ %.064.lcssa, %._crit_edge.loopexit.epilog-lcssa ]
  %64 = zext i32 %.064.lcssa136 to i64
  %65 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %64
  store i64 %3, ptr %65, align 8, !tbaa !19
  %66 = getelementptr inbounds [16 x ptr], ptr %8, i64 0, i64 %64
  store ptr %4, ptr %66, align 8, !tbaa !17
  %67 = call noundef i32 @_ZN11index_btree3cutEj(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %12)
  store i32 0, ptr %11, align 8, !tbaa !5
  %.not100 = icmp eq i32 %67, 0
  %.pre = load i32, ptr %13, align 8, !tbaa !13
  br i1 %.not100, label %.preheader, label %.lr.ph81

.lr.ph81:                                         ; preds = %._crit_edge
  %68 = getelementptr inbounds i8, ptr %2, i64 16
  %wide.trip.count111 = zext i32 %67 to i64
  br label %74

69:                                               ; preds = %74
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %exitcond112.not = icmp eq i64 %indvars.iv.next109, %wide.trip.count111
  br i1 %exitcond112.not, label %..preheader_crit_edge, label %74, !llvm.loop !24

..preheader_crit_edge:                            ; preds = %69
  store i32 %84, ptr %11, align 8, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %..preheader_crit_edge, %._crit_edge
  %70 = phi i32 [ %84, %..preheader_crit_edge ], [ 0, %._crit_edge ]
  %71 = icmp ult i32 %67, %.pre
  %.pre132 = load ptr, ptr %6, align 8, !tbaa !17
  br i1 %71, label %.lr.ph86.preheader, label %._crit_edge87

.lr.ph86.preheader:                               ; preds = %.preheader
  %72 = zext i32 %67 to i64
  %73 = sub i32 %.pre, %67
  br label %.lr.ph86

74:                                               ; preds = %.lr.ph81, %69
  %indvars.iv108 = phi i64 [ 0, %.lr.ph81 ], [ %indvars.iv.next109, %69 ]
  %75 = phi i32 [ 0, %.lr.ph81 ], [ %84, %69 ]
  %76 = getelementptr inbounds [16 x ptr], ptr %8, i64 0, i64 %indvars.iv108
  %77 = load ptr, ptr %76, align 8, !tbaa !17
  %78 = load ptr, ptr %2, align 8, !tbaa !22
  %79 = getelementptr inbounds ptr, ptr %78, i64 %indvars.iv108
  store ptr %77, ptr %79, align 8, !tbaa !17
  %80 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %indvars.iv108
  %81 = load i64, ptr %80, align 8, !tbaa !19
  %82 = load ptr, ptr %68, align 8, !tbaa !18
  %83 = getelementptr inbounds i64, ptr %82, i64 %indvars.iv108
  store i64 %81, ptr %83, align 8, !tbaa !19
  %84 = add i32 %75, 1
  %85 = icmp ult i32 %84, %.pre
  br i1 %85, label %69, label %86

86:                                               ; preds = %74
  store i32 %84, ptr %11, align 8, !tbaa !5
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull @.str.1, i32 noundef 461, ptr noundef nonnull @.str.18)
  %88 = load ptr, ptr @stdout, align 8, !tbaa !17
  %89 = call i32 @fflush(ptr noundef %88)
  call void @exit(i32 noundef 0) #6
  unreachable

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %110
  %90 = phi ptr [ %.pre132, %.lr.ph86.preheader ], [ %97, %110 ]
  %indvars.iv115 = phi i64 [ %72, %.lr.ph86.preheader ], [ %indvars.iv.next116, %110 ]
  %indvars.iv113 = phi i64 [ 0, %.lr.ph86.preheader ], [ %indvars.iv.next114, %110 ]
  %91 = getelementptr inbounds [16 x ptr], ptr %8, i64 0, i64 %indvars.iv115
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = load ptr, ptr %90, align 8, !tbaa !22
  %94 = getelementptr inbounds ptr, ptr %93, i64 %indvars.iv113
  store ptr %92, ptr %94, align 8, !tbaa !17
  %95 = getelementptr inbounds [16 x i64], ptr %7, i64 0, i64 %indvars.iv115
  %96 = load i64, ptr %95, align 8, !tbaa !19
  %97 = load ptr, ptr %6, align 8, !tbaa !17
  %98 = getelementptr inbounds i8, ptr %97, i64 16
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  %100 = getelementptr inbounds i64, ptr %99, i64 %indvars.iv113
  store i64 %96, ptr %100, align 8, !tbaa !19
  %101 = getelementptr inbounds i8, ptr %97, i64 32
  %102 = load i32, ptr %101, align 8, !tbaa !5
  %103 = add i32 %102, 1
  store i32 %103, ptr %101, align 8, !tbaa !5
  %104 = load i32, ptr %11, align 8, !tbaa !5
  %105 = icmp ult i32 %104, %.pre
  br i1 %105, label %110, label %106

106:                                              ; preds = %.lr.ph86
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull @.str.1, i32 noundef 469, ptr noundef nonnull @.str.18)
  %108 = load ptr, ptr @stdout, align 8, !tbaa !17
  %109 = call i32 @fflush(ptr noundef %108)
  call void @exit(i32 noundef 0) #6
  unreachable

110:                                              ; preds = %.lr.ph86
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next114 to i32
  %exitcond120.not = icmp eq i32 %73, %lftr.wideiv
  br i1 %exitcond120.not, label %._crit_edge87, label %.lr.ph86, !llvm.loop !25

._crit_edge87:                                    ; preds = %110, %.preheader
  %111 = phi i32 [ %70, %.preheader ], [ %104, %110 ]
  %112 = phi ptr [ %.pre132, %.preheader ], [ %97, %110 ]
  %113 = getelementptr inbounds i8, ptr %2, i64 40
  %114 = load ptr, ptr %113, align 8, !tbaa !26
  %115 = getelementptr inbounds i8, ptr %112, i64 40
  store ptr %114, ptr %115, align 8, !tbaa !26
  store ptr %112, ptr %113, align 8, !tbaa !26
  %116 = add i32 %.pre, -1
  %117 = icmp ult i32 %111, %116
  br i1 %117, label %.lr.ph91.preheader, label %._crit_edge92

.lr.ph91.preheader:                               ; preds = %._crit_edge87
  %118 = zext i32 %111 to i64
  %wide.trip.count124 = zext i32 %116 to i64
  %119 = sub nsw i64 %wide.trip.count124, %118
  %xtraiter153 = and i64 %119, 3
  %lcmp.mod154.not = icmp eq i64 %xtraiter153, 0
  br i1 %lcmp.mod154.not, label %.lr.ph91.prol.loopexit, label %.lr.ph91.prol

.lr.ph91.prol:                                    ; preds = %.lr.ph91.preheader, %.lr.ph91.prol
  %indvars.iv121.prol = phi i64 [ %indvars.iv.next122.prol, %.lr.ph91.prol ], [ %118, %.lr.ph91.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph91.prol ], [ 0, %.lr.ph91.preheader ]
  %120 = load ptr, ptr %2, align 8, !tbaa !22
  %121 = getelementptr inbounds ptr, ptr %120, i64 %indvars.iv121.prol
  store ptr null, ptr %121, align 8, !tbaa !17
  %indvars.iv.next122.prol = add nuw nsw i64 %indvars.iv121.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter153
  br i1 %prol.iter.cmp.not, label %.lr.ph91.prol.loopexit, label %.lr.ph91.prol, !llvm.loop !27

.lr.ph91.prol.loopexit:                           ; preds = %.lr.ph91.prol, %.lr.ph91.preheader
  %indvars.iv121.unr = phi i64 [ %118, %.lr.ph91.preheader ], [ %indvars.iv.next122.prol, %.lr.ph91.prol ]
  %122 = sub nsw i64 %118, %wide.trip.count124
  %123 = icmp ugt i64 %122, -4
  br i1 %123, label %._crit_edge92.loopexit, label %.lr.ph91

.lr.ph91:                                         ; preds = %.lr.ph91.prol.loopexit, %.lr.ph91
  %indvars.iv121 = phi i64 [ %indvars.iv.next122.3, %.lr.ph91 ], [ %indvars.iv121.unr, %.lr.ph91.prol.loopexit ]
  %124 = load ptr, ptr %2, align 8, !tbaa !22
  %125 = getelementptr inbounds ptr, ptr %124, i64 %indvars.iv121
  store ptr null, ptr %125, align 8, !tbaa !17
  %126 = load ptr, ptr %2, align 8, !tbaa !22
  %127 = getelementptr ptr, ptr %126, i64 %indvars.iv121
  %128 = getelementptr i8, ptr %127, i64 8
  store ptr null, ptr %128, align 8, !tbaa !17
  %129 = load ptr, ptr %2, align 8, !tbaa !22
  %130 = getelementptr ptr, ptr %129, i64 %indvars.iv121
  %131 = getelementptr i8, ptr %130, i64 16
  store ptr null, ptr %131, align 8, !tbaa !17
  %132 = load ptr, ptr %2, align 8, !tbaa !22
  %133 = getelementptr ptr, ptr %132, i64 %indvars.iv121
  %134 = getelementptr i8, ptr %133, i64 24
  store ptr null, ptr %134, align 8, !tbaa !17
  %indvars.iv.next122.3 = add nuw nsw i64 %indvars.iv121, 4
  %exitcond125.not.3 = icmp eq i64 %indvars.iv.next122.3, %wide.trip.count124
  br i1 %exitcond125.not.3, label %._crit_edge92.loopexit, label %.lr.ph91, !llvm.loop !29

._crit_edge92.loopexit:                           ; preds = %.lr.ph91, %.lr.ph91.prol.loopexit
  %.pre133 = load ptr, ptr %6, align 8, !tbaa !17
  br label %._crit_edge92

._crit_edge92:                                    ; preds = %._crit_edge92.loopexit, %._crit_edge87
  %135 = phi ptr [ %.pre133, %._crit_edge92.loopexit ], [ %112, %._crit_edge87 ]
  %136 = getelementptr inbounds i8, ptr %135, i64 32
  %137 = load i32, ptr %136, align 8, !tbaa !5
  %138 = icmp ult i32 %137, %116
  br i1 %138, label %.lr.ph96.preheader, label %._crit_edge97

.lr.ph96.preheader:                               ; preds = %._crit_edge92
  %139 = zext i32 %137 to i64
  %wide.trip.count129 = zext i32 %116 to i64
  %140 = sub nsw i64 %wide.trip.count129, %139
  %xtraiter155 = and i64 %140, 3
  %lcmp.mod156.not = icmp eq i64 %xtraiter155, 0
  br i1 %lcmp.mod156.not, label %.lr.ph96.prol.loopexit, label %.lr.ph96.prol

.lr.ph96.prol:                                    ; preds = %.lr.ph96.preheader, %.lr.ph96.prol
  %indvars.iv126.prol = phi i64 [ %indvars.iv.next127.prol, %.lr.ph96.prol ], [ %139, %.lr.ph96.preheader ]
  %prol.iter157 = phi i64 [ %prol.iter157.next, %.lr.ph96.prol ], [ 0, %.lr.ph96.preheader ]
  %141 = load ptr, ptr %6, align 8, !tbaa !17
  %142 = load ptr, ptr %141, align 8, !tbaa !22
  %143 = getelementptr inbounds ptr, ptr %142, i64 %indvars.iv126.prol
  store ptr null, ptr %143, align 8, !tbaa !17
  %indvars.iv.next127.prol = add nuw nsw i64 %indvars.iv126.prol, 1
  %prol.iter157.next = add i64 %prol.iter157, 1
  %prol.iter157.cmp.not = icmp eq i64 %prol.iter157.next, %xtraiter155
  br i1 %prol.iter157.cmp.not, label %.lr.ph96.prol.loopexit, label %.lr.ph96.prol, !llvm.loop !30

.lr.ph96.prol.loopexit:                           ; preds = %.lr.ph96.prol, %.lr.ph96.preheader
  %indvars.iv126.unr = phi i64 [ %139, %.lr.ph96.preheader ], [ %indvars.iv.next127.prol, %.lr.ph96.prol ]
  %144 = sub nsw i64 %139, %wide.trip.count129
  %145 = icmp ugt i64 %144, -4
  br i1 %145, label %._crit_edge97.loopexit, label %.lr.ph96

.lr.ph96:                                         ; preds = %.lr.ph96.prol.loopexit, %.lr.ph96
  %indvars.iv126 = phi i64 [ %indvars.iv.next127.3, %.lr.ph96 ], [ %indvars.iv126.unr, %.lr.ph96.prol.loopexit ]
  %146 = load ptr, ptr %6, align 8, !tbaa !17
  %147 = load ptr, ptr %146, align 8, !tbaa !22
  %148 = getelementptr inbounds ptr, ptr %147, i64 %indvars.iv126
  store ptr null, ptr %148, align 8, !tbaa !17
  %149 = load ptr, ptr %6, align 8, !tbaa !17
  %150 = load ptr, ptr %149, align 8, !tbaa !22
  %151 = getelementptr ptr, ptr %150, i64 %indvars.iv126
  %152 = getelementptr i8, ptr %151, i64 8
  store ptr null, ptr %152, align 8, !tbaa !17
  %153 = load ptr, ptr %6, align 8, !tbaa !17
  %154 = load ptr, ptr %153, align 8, !tbaa !22
  %155 = getelementptr ptr, ptr %154, i64 %indvars.iv126
  %156 = getelementptr i8, ptr %155, i64 16
  store ptr null, ptr %156, align 8, !tbaa !17
  %157 = load ptr, ptr %6, align 8, !tbaa !17
  %158 = load ptr, ptr %157, align 8, !tbaa !22
  %159 = getelementptr ptr, ptr %158, i64 %indvars.iv126
  %160 = getelementptr i8, ptr %159, i64 24
  store ptr null, ptr %160, align 8, !tbaa !17
  %indvars.iv.next127.3 = add nuw nsw i64 %indvars.iv126, 4
  %exitcond130.not.3 = icmp eq i64 %indvars.iv.next127.3, %wide.trip.count129
  br i1 %exitcond130.not.3, label %._crit_edge97.loopexit, label %.lr.ph96, !llvm.loop !31

._crit_edge97.loopexit:                           ; preds = %.lr.ph96, %.lr.ph96.prol.loopexit
  %.pre134 = load ptr, ptr %6, align 8, !tbaa !17
  br label %._crit_edge97

._crit_edge97:                                    ; preds = %._crit_edge97.loopexit, %._crit_edge92
  %161 = phi ptr [ %.pre134, %._crit_edge97.loopexit ], [ %135, %._crit_edge92 ]
  %162 = getelementptr inbounds i8, ptr %2, i64 24
  %163 = load ptr, ptr %162, align 8, !tbaa !32
  %164 = getelementptr inbounds i8, ptr %161, i64 24
  store ptr %163, ptr %164, align 8, !tbaa !32
  %165 = getelementptr inbounds i8, ptr %161, i64 16
  %166 = load ptr, ptr %165, align 8, !tbaa !18
  %167 = load i64, ptr %166, align 8, !tbaa !19
  %168 = call noundef i32 @_ZN11index_btree18insert_into_parentE10glob_paramP7bt_nodemS2_(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 %1, ptr noundef %2, i64 noundef %167, ptr noundef %161)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #5
  br label %169

169:                                              ; preds = %5, %._crit_edge97
  %.0 = phi i32 [ %168, %._crit_edge97 ], [ %9, %5 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  ret i32 %.0
}

; 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 #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 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 = !{!14, !11, i64 24}
!14 = !{!"_ZTS11index_btree", !15, i64 0, !16, i64 16, !11, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!15 = !{!"_ZTS10index_base", !7, i64 8}
!16 = !{!"long", !8, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!6, !7, i64 16}
!19 = !{!16, !16, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !7, i64 0}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21}
!26 = !{!6, !7, i64 40}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !21}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !21}
!32 = !{!6, !7, i64 24}


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