; LLVM IR from ryanlayer/giggle :: test/unit (test_bulk_insert)

; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }
%struct.giggle_index = type { ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.bpt_node = type { ptr }

@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@OFFSET_INDEX_FILE_NAME = external dso_local global ptr, align 8
@CHRM_INDEX_FILE_NAME = external dso_local global ptr, align 8
@ORDER = external dso_local global i32, align 4
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@CACHE_FILE_NAME_PREFIX = external dso_local global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [61 x i8], align 1
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_keys = external hidden unnamed_addr constant [2 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_values = external hidden unnamed_addr constant [3 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_keys = external hidden unnamed_addr constant [2 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_values = external hidden unnamed_addr constant [3 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_keys = external hidden unnamed_addr constant [2 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_values = external hidden unnamed_addr constant [3 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_keys = external hidden unnamed_addr constant [2 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_values = external hidden unnamed_addr constant [3 x i32], align 4

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

declare i32 @giggle_bulk_insert_open_files(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @UnityAssertEqualNumber(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) #1

declare void @input_file_destroy(ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; 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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nounwind
declare i32 @stat(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @mkdir(ptr noundef, i32 noundef) #2

declare i32 @rmrf(ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @asprintf(ptr noundef, ptr noundef, ...) #2

declare ptr @offset_index_init(i32 noundef, ptr noundef) #1

declare ptr @chrm_index_init(i32 noundef, ptr noundef) #1

declare ptr @priq_new(i32 noundef) #1

declare void @giggle_bulk_insert_prime_pqs(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare void @priq_free(ptr noundef) #1

declare void @giggle_bulk_insert_build_leaf_levels(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare void @giggle_bulk_insert_build_tree_on_leaves(ptr noundef) #1

declare ptr @disk_store_load(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

declare ptr @disk_store_get(ptr noundef, i32 noundef, ptr noundef) #1

declare i64 @bpt_node_deserialize(ptr noundef, i64 noundef, ptr noundef) #1

declare void @giggle_index_destroy(ptr noundef) #1

declare void @disk_store_destroy(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @test_giggle_bulk_insert_build_tree_on_leaves_few_order_2() #6 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca %struct.stat, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i64, align 8
  %22 = alloca [2 x i32], align 4
  %23 = alloca [3 x i32], align 4
  %24 = alloca [2 x i32], align 4
  %25 = alloca [3 x i32], align 4
  %26 = alloca [2 x i32], align 4
  %27 = alloca [3 x i32], align 4
  %28 = alloca [2 x i32], align 4
  %29 = alloca [3 x i32], align 4
  store i32 2, ptr @ORDER, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #7
  store ptr @.str.4, ptr %1, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store ptr @.str.10, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 144, ptr %3) #7
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 144, i1 false)
  %30 = load ptr, ptr %2, align 8, !tbaa !9
  %31 = call i32 @stat(ptr noundef %30, ptr noundef %3) #7
  %32 = icmp eq i32 %31, -1
  br i1 %32, label %33, label %36

33:                                               ; preds = %0
  %34 = load ptr, ptr %2, align 8, !tbaa !9
  %35 = call i32 @mkdir(ptr noundef %34, i32 noundef 448) #7
  br label %41

36:                                               ; preds = %0
  %37 = load ptr, ptr %2, align 8, !tbaa !9
  %38 = call i32 @rmrf(ptr noundef %37)
  %39 = load ptr, ptr %2, align 8, !tbaa !9
  %40 = call i32 @mkdir(ptr noundef %39, i32 noundef 448) #7
  br label %41

41:                                               ; preds = %36, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %42 = call noalias ptr @malloc(i64 noundef 64) #8
  store ptr %42, ptr %4, align 8, !tbaa !9
  %43 = load ptr, ptr %2, align 8, !tbaa !9
  %44 = call noalias ptr @strdup(ptr noundef %43) #7
  %45 = load ptr, ptr %4, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.giggle_index, ptr %45, i32 0, i32 7
  store ptr %44, ptr %46, align 8, !tbaa !11
  %47 = load ptr, ptr %4, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct.giggle_index, ptr %47, i32 0, i32 4
  store ptr null, ptr %48, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store ptr null, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %49 = load ptr, ptr %1, align 8, !tbaa !9
  %50 = load ptr, ptr %4, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.giggle_index, ptr %50, i32 0, i32 7
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = load ptr, ptr %4, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.giggle_index, ptr %53, i32 0, i32 4
  %55 = call i32 @giggle_bulk_insert_open_files(ptr noundef %49, ptr noundef %52, ptr noundef %5, ptr noundef %54)
  store i32 %55, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %56 = load ptr, ptr %4, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.giggle_index, ptr %56, i32 0, i32 7
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load ptr, ptr @OFFSET_INDEX_FILE_NAME, align 8, !tbaa !9
  %60 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %7, ptr noundef @.str.2, ptr noundef %58, ptr noundef %59) #7
  store i32 %60, ptr %8, align 4, !tbaa !5
  %61 = load ptr, ptr %7, align 8, !tbaa !9
  %62 = call ptr @offset_index_init(i32 noundef 1000, ptr noundef %61)
  %63 = load ptr, ptr %4, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.giggle_index, ptr %63, i32 0, i32 5
  store ptr %62, ptr %64, align 8, !tbaa !14
  %65 = load ptr, ptr %7, align 8, !tbaa !9
  call void @free(ptr noundef %65) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !9
  %66 = load ptr, ptr %4, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.giggle_index, ptr %66, i32 0, i32 7
  %68 = load ptr, ptr %67, align 8, !tbaa !11
  %69 = load ptr, ptr @CHRM_INDEX_FILE_NAME, align 8, !tbaa !9
  %70 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %9, ptr noundef @.str.2, ptr noundef %68, ptr noundef %69) #7
  store i32 %70, ptr %8, align 4, !tbaa !5
  %71 = load ptr, ptr %9, align 8, !tbaa !9
  %72 = call ptr @chrm_index_init(i32 noundef 24, ptr noundef %71)
  %73 = load ptr, ptr %4, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.giggle_index, ptr %73, i32 0, i32 3
  store ptr %72, ptr %74, align 8, !tbaa !15
  %75 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %75) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = call ptr @priq_new(i32 noundef %76)
  store ptr %77, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = zext i32 %78 to i64
  %80 = mul i64 %79, 16
  %81 = call noalias ptr @malloc(i64 noundef %80) #8
  store ptr %81, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = call ptr @priq_new(i32 noundef %82)
  store ptr %83, ptr %12, align 8, !tbaa !9
  %84 = load ptr, ptr %4, align 8, !tbaa !9
  %85 = load ptr, ptr %11, align 8, !tbaa !9
  %86 = load ptr, ptr %5, align 8, !tbaa !9
  %87 = load i32, ptr %6, align 4, !tbaa !5
  call void @giggle_bulk_insert_prime_pqs(ptr noundef %84, ptr noundef %10, ptr noundef %85, ptr noundef %12, ptr noundef %86, i32 noundef %87)
  %88 = load ptr, ptr %4, align 8, !tbaa !9
  %89 = load ptr, ptr %11, align 8, !tbaa !9
  %90 = load ptr, ptr %5, align 8, !tbaa !9
  %91 = load i32, ptr %6, align 4, !tbaa !5
  call void @giggle_bulk_insert_build_leaf_levels(ptr noundef %88, ptr noundef %10, ptr noundef %89, ptr noundef %12, ptr noundef %90, i32 noundef %91)
  %92 = load ptr, ptr %12, align 8, !tbaa !9
  call void @priq_free(ptr noundef %92)
  %93 = load ptr, ptr %10, align 8, !tbaa !9
  call void @priq_free(ptr noundef %93)
  %94 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %94) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %104, %41
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = icmp ult i32 %96, %97
  br i1 %98, label %99, label %107

99:                                               ; preds = %95
  %100 = load ptr, ptr %5, align 8, !tbaa !9
  %101 = load i32, ptr %13, align 4, !tbaa !5
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  call void @input_file_destroy(ptr noundef %103)
  br label %104

104:                                              ; preds = %99
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = add i32 %105, 1
  store i32 %106, ptr %13, align 4, !tbaa !5
  br label %95, !llvm.loop !16

107:                                              ; preds = %95
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %108) #7
  %109 = load ptr, ptr %4, align 8, !tbaa !9
  call void @giggle_bulk_insert_build_tree_on_leaves(ptr noundef %109)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %110 = load ptr, ptr %4, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.giggle_index, ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !18
  %113 = getelementptr inbounds i32, ptr %112, i64 0
  %114 = load i32, ptr %113, align 4, !tbaa !5
  store i32 %114, ptr %14, align 4, !tbaa !5
  %115 = load i32, ptr %14, align 4, !tbaa !5
  %116 = zext i32 %115 to i64
  call void @UnityAssertEqualNumber(i64 noundef 41, i64 noundef %116, ptr noundef null, i64 noundef 1830, i32 noundef 148)
  call void @giggle_index_destroy(ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr null, ptr %16, align 8, !tbaa !9
  %117 = load ptr, ptr %2, align 8, !tbaa !9
  %118 = load ptr, ptr @CACHE_FILE_NAME_PREFIX, align 8, !tbaa !9
  %119 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %15, ptr noundef @.str.6, ptr noundef %117, ptr noundef %118) #7
  store i32 %119, ptr %8, align 4, !tbaa !5
  %120 = load ptr, ptr %2, align 8, !tbaa !9
  %121 = load ptr, ptr @CACHE_FILE_NAME_PREFIX, align 8, !tbaa !9
  %122 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %16, ptr noundef @.str.7, ptr noundef %120, ptr noundef %121) #7
  store i32 %122, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %123 = load ptr, ptr %15, align 8, !tbaa !9
  %124 = load ptr, ptr %16, align 8, !tbaa !9
  %125 = call ptr @disk_store_load(ptr noundef null, ptr noundef %123, ptr noundef null, ptr noundef %124)
  store ptr %125, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %126 = load ptr, ptr %17, align 8, !tbaa !9
  %127 = load i32, ptr %14, align 4, !tbaa !5
  %128 = sub i32 %127, 1
  %129 = call ptr @disk_store_get(ptr noundef %126, i32 noundef %128, ptr noundef %18)
  store ptr %129, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %130 = load ptr, ptr %19, align 8, !tbaa !9
  %131 = load i64, ptr %18, align 8, !tbaa !19
  %132 = call i64 @bpt_node_deserialize(ptr noundef %130, i64 noundef %131, ptr noundef %20)
  store i64 %132, ptr %21, align 8, !tbaa !19
  %133 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %133) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_keys, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_values, i64 12, i1 false)
  %134 = load ptr, ptr %20, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.bpt_node, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !21
  %137 = getelementptr inbounds i32, ptr %136, i64 5
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = zext i32 %138 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %139, ptr noundef null, i64 noundef 1859, i32 noundef 148)
  %140 = getelementptr inbounds [2 x i32], ptr %22, i64 0, i64 0
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = zext i32 %141 to i64
  %143 = load ptr, ptr %20, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.bpt_node, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !21
  %146 = getelementptr inbounds i32, ptr %145, i64 6
  %147 = getelementptr inbounds i32, ptr %146, i64 0
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = zext i32 %148 to i64
  call void @UnityAssertEqualNumber(i64 noundef %142, i64 noundef %149, ptr noundef null, i64 noundef 1860, i32 noundef 148)
  %150 = getelementptr inbounds [2 x i32], ptr %22, i64 0, i64 1
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = zext i32 %151 to i64
  %153 = load ptr, ptr %20, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.bpt_node, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !21
  %156 = getelementptr inbounds i32, ptr %155, i64 6
  %157 = getelementptr inbounds i32, ptr %156, i64 1
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = zext i32 %158 to i64
  call void @UnityAssertEqualNumber(i64 noundef %152, i64 noundef %159, ptr noundef null, i64 noundef 1861, i32 noundef 148)
  %160 = getelementptr inbounds [3 x i32], ptr %23, i64 0, i64 0
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = zext i32 %161 to i64
  %163 = load ptr, ptr %20, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.bpt_node, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !21
  %166 = load i32, ptr @ORDER, align 4, !tbaa !5
  %167 = add i32 6, %166
  %168 = add i32 %167, 2
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds i32, ptr %165, i64 %169
  %171 = getelementptr inbounds i32, ptr %170, i64 0
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = zext i32 %172 to i64
  call void @UnityAssertEqualNumber(i64 noundef %162, i64 noundef %173, ptr noundef null, i64 noundef 1862, i32 noundef 148)
  %174 = getelementptr inbounds [3 x i32], ptr %23, i64 0, i64 1
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = zext i32 %175 to i64
  %177 = load ptr, ptr %20, align 8, !tbaa !9
  %178 = getelementptr inbounds %struct.bpt_node, ptr %177, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8, !tbaa !21
  %180 = load i32, ptr @ORDER, align 4, !tbaa !5
  %181 = add i32 6, %180
  %182 = add i32 %181, 2
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds i32, ptr %179, i64 %183
  %185 = getelementptr inbounds i32, ptr %184, i64 1
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = zext i32 %186 to i64
  call void @UnityAssertEqualNumber(i64 noundef %176, i64 noundef %187, ptr noundef null, i64 noundef 1863, i32 noundef 148)
  %188 = getelementptr inbounds [3 x i32], ptr %23, i64 0, i64 2
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = zext i32 %189 to i64
  %191 = load ptr, ptr %20, align 8, !tbaa !9
  %192 = getelementptr inbounds %struct.bpt_node, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !21
  %194 = load i32, ptr @ORDER, align 4, !tbaa !5
  %195 = add i32 6, %194
  %196 = add i32 %195, 2
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds i32, ptr %193, i64 %197
  %199 = getelementptr inbounds i32, ptr %198, i64 2
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = zext i32 %200 to i64
  call void @UnityAssertEqualNumber(i64 noundef %190, i64 noundef %201, ptr noundef null, i64 noundef 1864, i32 noundef 148)
  %202 = load ptr, ptr %20, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.bpt_node, ptr %202, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8, !tbaa !21
  call void @free(ptr noundef %204) #7
  %205 = load ptr, ptr %20, align 8, !tbaa !9
  call void @free(ptr noundef %205) #7
  %206 = load ptr, ptr %17, align 8, !tbaa !9
  %207 = getelementptr inbounds [3 x i32], ptr %23, i64 0, i64 0
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = sub i32 %208, 1
  %210 = call ptr @disk_store_get(ptr noundef %206, i32 noundef %209, ptr noundef %18)
  store ptr %210, ptr %19, align 8, !tbaa !9
  %211 = load ptr, ptr %19, align 8, !tbaa !9
  %212 = load i64, ptr %18, align 8, !tbaa !19
  %213 = call i64 @bpt_node_deserialize(ptr noundef %211, i64 noundef %212, ptr noundef %20)
  store i64 %213, ptr %21, align 8, !tbaa !19
  %214 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %214) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_keys, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_values, i64 12, i1 false)
  %215 = load ptr, ptr %20, align 8, !tbaa !9
  %216 = getelementptr inbounds %struct.bpt_node, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8, !tbaa !21
  %218 = getelementptr inbounds i32, ptr %217, i64 5
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = zext i32 %219 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %220, ptr noundef null, i64 noundef 1877, i32 noundef 148)
  %221 = getelementptr inbounds [2 x i32], ptr %24, i64 0, i64 0
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = zext i32 %222 to i64
  %224 = load ptr, ptr %20, align 8, !tbaa !9
  %225 = getelementptr inbounds %struct.bpt_node, ptr %224, i32 0, i32 0
  %226 = load ptr, ptr %225, align 8, !tbaa !21
  %227 = getelementptr inbounds i32, ptr %226, i64 6
  %228 = getelementptr inbounds i32, ptr %227, i64 0
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = zext i32 %229 to i64
  call void @UnityAssertEqualNumber(i64 noundef %223, i64 noundef %230, ptr noundef null, i64 noundef 1878, i32 noundef 148)
  %231 = getelementptr inbounds [2 x i32], ptr %24, i64 0, i64 1
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = zext i32 %232 to i64
  %234 = load ptr, ptr %20, align 8, !tbaa !9
  %235 = getelementptr inbounds %struct.bpt_node, ptr %234, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !21
  %237 = getelementptr inbounds i32, ptr %236, i64 6
  %238 = getelementptr inbounds i32, ptr %237, i64 1
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = zext i32 %239 to i64
  call void @UnityAssertEqualNumber(i64 noundef %233, i64 noundef %240, ptr noundef null, i64 noundef 1879, i32 noundef 148)
  %241 = getelementptr inbounds [3 x i32], ptr %25, i64 0, i64 0
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = zext i32 %242 to i64
  %244 = load ptr, ptr %20, align 8, !tbaa !9
  %245 = getelementptr inbounds %struct.bpt_node, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !21
  %247 = load i32, ptr @ORDER, align 4, !tbaa !5
  %248 = add i32 6, %247
  %249 = add i32 %248, 2
  %250 = zext i32 %249 to i64
  %251 = getelementptr inbounds i32, ptr %246, i64 %250
  %252 = getelementptr inbounds i32, ptr %251, i64 0
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = zext i32 %253 to i64
  call void @UnityAssertEqualNumber(i64 noundef %243, i64 noundef %254, ptr noundef null, i64 noundef 1880, i32 noundef 148)
  %255 = getelementptr inbounds [3 x i32], ptr %25, i64 0, i64 1
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = zext i32 %256 to i64
  %258 = load ptr, ptr %20, align 8, !tbaa !9
  %259 = getelementptr inbounds %struct.bpt_node, ptr %258, i32 0, i32 0
  %260 = load ptr, ptr %259, align 8, !tbaa !21
  %261 = load i32, ptr @ORDER, align 4, !tbaa !5
  %262 = add i32 6, %261
  %263 = add i32 %262, 2
  %264 = zext i32 %263 to i64
  %265 = getelementptr inbounds i32, ptr %260, i64 %264
  %266 = getelementptr inbounds i32, ptr %265, i64 1
  %267 = load i32, ptr %266, align 4, !tbaa !5
  %268 = zext i32 %267 to i64
  call void @UnityAssertEqualNumber(i64 noundef %257, i64 noundef %268, ptr noundef null, i64 noundef 1881, i32 noundef 148)
  %269 = getelementptr inbounds [3 x i32], ptr %25, i64 0, i64 2
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = zext i32 %270 to i64
  %272 = load ptr, ptr %20, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.bpt_node, ptr %272, i32 0, i32 0
  %274 = load ptr, ptr %273, align 8, !tbaa !21
  %275 = load i32, ptr @ORDER, align 4, !tbaa !5
  %276 = add i32 6, %275
  %277 = add i32 %276, 2
  %278 = zext i32 %277 to i64
  %279 = getelementptr inbounds i32, ptr %274, i64 %278
  %280 = getelementptr inbounds i32, ptr %279, i64 2
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = zext i32 %281 to i64
  call void @UnityAssertEqualNumber(i64 noundef %271, i64 noundef %282, ptr noundef null, i64 noundef 1882, i32 noundef 148)
  %283 = load ptr, ptr %20, align 8, !tbaa !9
  %284 = getelementptr inbounds %struct.bpt_node, ptr %283, i32 0, i32 0
  %285 = load ptr, ptr %284, align 8, !tbaa !21
  call void @free(ptr noundef %285) #7
  %286 = load ptr, ptr %20, align 8, !tbaa !9
  call void @free(ptr noundef %286) #7
  %287 = load ptr, ptr %17, align 8, !tbaa !9
  %288 = getelementptr inbounds [3 x i32], ptr %23, i64 0, i64 1
  %289 = load i32, ptr %288, align 4, !tbaa !5
  %290 = sub i32 %289, 1
  %291 = call ptr @disk_store_get(ptr noundef %287, i32 noundef %290, ptr noundef %18)
  store ptr %291, ptr %19, align 8, !tbaa !9
  %292 = load ptr, ptr %19, align 8, !tbaa !9
  %293 = load i64, ptr %18, align 8, !tbaa !19
  %294 = call i64 @bpt_node_deserialize(ptr noundef %292, i64 noundef %293, ptr noundef %20)
  store i64 %294, ptr %21, align 8, !tbaa !19
  %295 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %295) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_keys, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_values, i64 12, i1 false)
  %296 = load ptr, ptr %20, align 8, !tbaa !9
  %297 = getelementptr inbounds %struct.bpt_node, ptr %296, i32 0, i32 0
  %298 = load ptr, ptr %297, align 8, !tbaa !21
  %299 = getelementptr inbounds i32, ptr %298, i64 5
  %300 = load i32, ptr %299, align 4, !tbaa !5
  %301 = zext i32 %300 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %301, ptr noundef null, i64 noundef 1896, i32 noundef 148)
  %302 = getelementptr inbounds [2 x i32], ptr %26, i64 0, i64 0
  %303 = load i32, ptr %302, align 4, !tbaa !5
  %304 = zext i32 %303 to i64
  %305 = load ptr, ptr %20, align 8, !tbaa !9
  %306 = getelementptr inbounds %struct.bpt_node, ptr %305, i32 0, i32 0
  %307 = load ptr, ptr %306, align 8, !tbaa !21
  %308 = getelementptr inbounds i32, ptr %307, i64 6
  %309 = getelementptr inbounds i32, ptr %308, i64 0
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = zext i32 %310 to i64
  call void @UnityAssertEqualNumber(i64 noundef %304, i64 noundef %311, ptr noundef null, i64 noundef 1897, i32 noundef 148)
  %312 = getelementptr inbounds [2 x i32], ptr %26, i64 0, i64 1
  %313 = load i32, ptr %312, align 4, !tbaa !5
  %314 = zext i32 %313 to i64
  %315 = load ptr, ptr %20, align 8, !tbaa !9
  %316 = getelementptr inbounds %struct.bpt_node, ptr %315, i32 0, i32 0
  %317 = load ptr, ptr %316, align 8, !tbaa !21
  %318 = getelementptr inbounds i32, ptr %317, i64 6
  %319 = getelementptr inbounds i32, ptr %318, i64 1
  %320 = load i32, ptr %319, align 4, !tbaa !5
  %321 = zext i32 %320 to i64
  call void @UnityAssertEqualNumber(i64 noundef %314, i64 noundef %321, ptr noundef null, i64 noundef 1898, i32 noundef 148)
  %322 = getelementptr inbounds [3 x i32], ptr %27, i64 0, i64 0
  %323 = load i32, ptr %322, align 4, !tbaa !5
  %324 = zext i32 %323 to i64
  %325 = load ptr, ptr %20, align 8, !tbaa !9
  %326 = getelementptr inbounds %struct.bpt_node, ptr %325, i32 0, i32 0
  %327 = load ptr, ptr %326, align 8, !tbaa !21
  %328 = load i32, ptr @ORDER, align 4, !tbaa !5
  %329 = add i32 6, %328
  %330 = add i32 %329, 2
  %331 = zext i32 %330 to i64
  %332 = getelementptr inbounds i32, ptr %327, i64 %331
  %333 = getelementptr inbounds i32, ptr %332, i64 0
  %334 = load i32, ptr %333, align 4, !tbaa !5
  %335 = zext i32 %334 to i64
  call void @UnityAssertEqualNumber(i64 noundef %324, i64 noundef %335, ptr noundef null, i64 noundef 1899, i32 noundef 148)
  %336 = getelementptr inbounds [3 x i32], ptr %27, i64 0, i64 1
  %337 = load i32, ptr %336, align 4, !tbaa !5
  %338 = zext i32 %337 to i64
  %339 = load ptr, ptr %20, align 8, !tbaa !9
  %340 = getelementptr inbounds %struct.bpt_node, ptr %339, i32 0, i32 0
  %341 = load ptr, ptr %340, align 8, !tbaa !21
  %342 = load i32, ptr @ORDER, align 4, !tbaa !5
  %343 = add i32 6, %342
  %344 = add i32 %343, 2
  %345 = zext i32 %344 to i64
  %346 = getelementptr inbounds i32, ptr %341, i64 %345
  %347 = getelementptr inbounds i32, ptr %346, i64 1
  %348 = load i32, ptr %347, align 4, !tbaa !5
  %349 = zext i32 %348 to i64
  call void @UnityAssertEqualNumber(i64 noundef %338, i64 noundef %349, ptr noundef null, i64 noundef 1900, i32 noundef 148)
  %350 = getelementptr inbounds [3 x i32], ptr %27, i64 0, i64 2
  %351 = load i32, ptr %350, align 4, !tbaa !5
  %352 = zext i32 %351 to i64
  %353 = load ptr, ptr %20, align 8, !tbaa !9
  %354 = getelementptr inbounds %struct.bpt_node, ptr %353, i32 0, i32 0
  %355 = load ptr, ptr %354, align 8, !tbaa !21
  %356 = load i32, ptr @ORDER, align 4, !tbaa !5
  %357 = add i32 6, %356
  %358 = add i32 %357, 2
  %359 = zext i32 %358 to i64
  %360 = getelementptr inbounds i32, ptr %355, i64 %359
  %361 = getelementptr inbounds i32, ptr %360, i64 2
  %362 = load i32, ptr %361, align 4, !tbaa !5
  %363 = zext i32 %362 to i64
  call void @UnityAssertEqualNumber(i64 noundef %352, i64 noundef %363, ptr noundef null, i64 noundef 1901, i32 noundef 148)
  %364 = load ptr, ptr %20, align 8, !tbaa !9
  %365 = getelementptr inbounds %struct.bpt_node, ptr %364, i32 0, i32 0
  %366 = load ptr, ptr %365, align 8, !tbaa !21
  call void @free(ptr noundef %366) #7
  %367 = load ptr, ptr %20, align 8, !tbaa !9
  call void @free(ptr noundef %367) #7
  %368 = load ptr, ptr %17, align 8, !tbaa !9
  %369 = getelementptr inbounds [3 x i32], ptr %23, i64 0, i64 2
  %370 = load i32, ptr %369, align 4, !tbaa !5
  %371 = sub i32 %370, 1
  %372 = call ptr @disk_store_get(ptr noundef %368, i32 noundef %371, ptr noundef %18)
  store ptr %372, ptr %19, align 8, !tbaa !9
  %373 = load ptr, ptr %19, align 8, !tbaa !9
  %374 = load i64, ptr %18, align 8, !tbaa !19
  %375 = call i64 @bpt_node_deserialize(ptr noundef %373, i64 noundef %374, ptr noundef %20)
  store i64 %375, ptr %21, align 8, !tbaa !19
  %376 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %376) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_keys, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_values, i64 12, i1 false)
  %377 = load ptr, ptr %20, align 8, !tbaa !9
  %378 = getelementptr inbounds %struct.bpt_node, ptr %377, i32 0, i32 0
  %379 = load ptr, ptr %378, align 8, !tbaa !21
  %380 = getelementptr inbounds i32, ptr %379, i64 5
  %381 = load i32, ptr %380, align 4, !tbaa !5
  %382 = zext i32 %381 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %382, ptr noundef null, i64 noundef 1915, i32 noundef 148)
  %383 = getelementptr inbounds [2 x i32], ptr %28, i64 0, i64 0
  %384 = load i32, ptr %383, align 4, !tbaa !5
  %385 = zext i32 %384 to i64
  %386 = load ptr, ptr %20, align 8, !tbaa !9
  %387 = getelementptr inbounds %struct.bpt_node, ptr %386, i32 0, i32 0
  %388 = load ptr, ptr %387, align 8, !tbaa !21
  %389 = getelementptr inbounds i32, ptr %388, i64 6
  %390 = getelementptr inbounds i32, ptr %389, i64 0
  %391 = load i32, ptr %390, align 4, !tbaa !5
  %392 = zext i32 %391 to i64
  call void @UnityAssertEqualNumber(i64 noundef %385, i64 noundef %392, ptr noundef null, i64 noundef 1916, i32 noundef 148)
  %393 = getelementptr inbounds [2 x i32], ptr %28, i64 0, i64 1
  %394 = load i32, ptr %393, align 4, !tbaa !5
  %395 = zext i32 %394 to i64
  %396 = load ptr, ptr %20, align 8, !tbaa !9
  %397 = getelementptr inbounds %struct.bpt_node, ptr %396, i32 0, i32 0
  %398 = load ptr, ptr %397, align 8, !tbaa !21
  %399 = getelementptr inbounds i32, ptr %398, i64 6
  %400 = getelementptr inbounds i32, ptr %399, i64 1
  %401 = load i32, ptr %400, align 4, !tbaa !5
  %402 = zext i32 %401 to i64
  call void @UnityAssertEqualNumber(i64 noundef %395, i64 noundef %402, ptr noundef null, i64 noundef 1917, i32 noundef 148)
  %403 = getelementptr inbounds [3 x i32], ptr %29, i64 0, i64 0
  %404 = load i32, ptr %403, align 4, !tbaa !5
  %405 = zext i32 %404 to i64
  %406 = load ptr, ptr %20, align 8, !tbaa !9
  %407 = getelementptr inbounds %struct.bpt_node, ptr %406, i32 0, i32 0
  %408 = load ptr, ptr %407, align 8, !tbaa !21
  %409 = load i32, ptr @ORDER, align 4, !tbaa !5
  %410 = add i32 6, %409
  %411 = add i32 %410, 2
  %412 = zext i32 %411 to i64
  %413 = getelementptr inbounds i32, ptr %408, i64 %412
  %414 = getelementptr inbounds i32, ptr %413, i64 0
  %415 = load i32, ptr %414, align 4, !tbaa !5
  %416 = zext i32 %415 to i64
  call void @UnityAssertEqualNumber(i64 noundef %405, i64 noundef %416, ptr noundef null, i64 noundef 1918, i32 noundef 148)
  %417 = getelementptr inbounds [3 x i32], ptr %29, i64 0, i64 1
  %418 = load i32, ptr %417, align 4, !tbaa !5
  %419 = zext i32 %418 to i64
  %420 = load ptr, ptr %20, align 8, !tbaa !9
  %421 = getelementptr inbounds %struct.bpt_node, ptr %420, i32 0, i32 0
  %422 = load ptr, ptr %421, align 8, !tbaa !21
  %423 = load i32, ptr @ORDER, align 4, !tbaa !5
  %424 = add i32 6, %423
  %425 = add i32 %424, 2
  %426 = zext i32 %425 to i64
  %427 = getelementptr inbounds i32, ptr %422, i64 %426
  %428 = getelementptr inbounds i32, ptr %427, i64 1
  %429 = load i32, ptr %428, align 4, !tbaa !5
  %430 = zext i32 %429 to i64
  call void @UnityAssertEqualNumber(i64 noundef %419, i64 noundef %430, ptr noundef null, i64 noundef 1919, i32 noundef 148)
  %431 = getelementptr inbounds [3 x i32], ptr %29, i64 0, i64 2
  %432 = load i32, ptr %431, align 4, !tbaa !5
  %433 = zext i32 %432 to i64
  %434 = load ptr, ptr %20, align 8, !tbaa !9
  %435 = getelementptr inbounds %struct.bpt_node, ptr %434, i32 0, i32 0
  %436 = load ptr, ptr %435, align 8, !tbaa !21
  %437 = load i32, ptr @ORDER, align 4, !tbaa !5
  %438 = add i32 6, %437
  %439 = add i32 %438, 2
  %440 = zext i32 %439 to i64
  %441 = getelementptr inbounds i32, ptr %436, i64 %440
  %442 = getelementptr inbounds i32, ptr %441, i64 2
  %443 = load i32, ptr %442, align 4, !tbaa !5
  %444 = zext i32 %443 to i64
  call void @UnityAssertEqualNumber(i64 noundef %433, i64 noundef %444, ptr noundef null, i64 noundef 1920, i32 noundef 148)
  %445 = load ptr, ptr %20, align 8, !tbaa !9
  %446 = getelementptr inbounds %struct.bpt_node, ptr %445, i32 0, i32 0
  %447 = load ptr, ptr %446, align 8, !tbaa !21
  call void @free(ptr noundef %447) #7
  %448 = load ptr, ptr %20, align 8, !tbaa !9
  call void @free(ptr noundef %448) #7
  call void @disk_store_destroy(ptr noundef %17)
  %449 = load ptr, ptr %2, align 8, !tbaa !9
  %450 = call i32 @rmrf(ptr noundef %449)
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 144, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  ret void
}

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 48}
!12 = !{!"giggle_index", !10, i64 0, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!13 = !{!12, !10, i64 24}
!14 = !{!12, !10, i64 32}
!15 = !{!12, !10, i64 16}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!12, !10, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!22, !10, i64 0}
!22 = !{!"bpt_node", !10, i64 0}


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

%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@OFFSET_INDEX_FILE_NAME = external dso_local local_unnamed_addr global ptr, align 8
@CHRM_INDEX_FILE_NAME = external dso_local local_unnamed_addr global ptr, align 8
@ORDER = external dso_local local_unnamed_addr global i32, align 4
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@CACHE_FILE_NAME_PREFIX = external dso_local local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [61 x i8], align 1
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_keys = external hidden unnamed_addr constant [2 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_values = external hidden unnamed_addr constant [3 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_keys = external hidden unnamed_addr constant [2 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_values = external hidden unnamed_addr constant [3 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_keys = external hidden unnamed_addr constant [2 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_values = external hidden unnamed_addr constant [3 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_keys = external hidden unnamed_addr constant [2 x i32], align 4
@__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_values = external hidden unnamed_addr constant [3 x i32], align 4

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

declare i32 @giggle_bulk_insert_open_files(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @UnityAssertEqualNumber(i64 noundef, i64 noundef, ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

declare void @input_file_destroy(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

; 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 nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nofree nounwind
declare noundef i32 @stat(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @mkdir(ptr nocapture noundef readonly, i32 noundef) local_unnamed_addr #4

declare i32 @rmrf(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #6

; Function Attrs: nounwind
declare i32 @asprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #7

declare ptr @offset_index_init(i32 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @chrm_index_init(i32 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @priq_new(i32 noundef) local_unnamed_addr #1

declare void @giggle_bulk_insert_prime_pqs(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @priq_free(ptr noundef) local_unnamed_addr #1

declare void @giggle_bulk_insert_build_leaf_levels(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @giggle_bulk_insert_build_tree_on_leaves(ptr noundef) local_unnamed_addr #1

declare ptr @disk_store_load(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @disk_store_get(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare i64 @bpt_node_deserialize(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare void @giggle_index_destroy(ptr noundef) local_unnamed_addr #1

declare void @disk_store_destroy(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @test_giggle_bulk_insert_build_tree_on_leaves_few_order_2() local_unnamed_addr #8 {
  %1 = alloca %struct.stat, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  store i32 2, ptr @ORDER, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %1) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 0, i64 144, i1 false)
  %13 = call i32 @stat(ptr noundef nonnull @.str.10, ptr noundef nonnull %1) #9
  %14 = icmp eq i32 %13, -1
  br i1 %14, label %17, label %15

15:                                               ; preds = %0
  %16 = tail call i32 @rmrf(ptr noundef nonnull @.str.10) #9
  br label %17

17:                                               ; preds = %0, %15
  %18 = tail call i32 @mkdir(ptr noundef nonnull @.str.10, i32 noundef 448) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %19 = tail call noalias dereferenceable_or_null(64) ptr @malloc(i64 noundef 64) #10
  store ptr %19, ptr %2, align 8, !tbaa !9
  %20 = tail call noalias ptr @strdup(ptr noundef nonnull @.str.10) #9
  %21 = getelementptr inbounds i8, ptr %19, i64 48
  store ptr %20, ptr %21, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %19, i64 24
  store ptr null, ptr %22, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  store ptr null, ptr %3, align 8, !tbaa !9
  %23 = call i32 @giggle_bulk_insert_open_files(ptr noundef nonnull @.str.4, ptr noundef %20, ptr noundef nonnull %3, ptr noundef nonnull %22) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  store ptr null, ptr %4, align 8, !tbaa !9
  %24 = load ptr, ptr %21, align 8, !tbaa !11
  %25 = load ptr, ptr @OFFSET_INDEX_FILE_NAME, align 8, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.2, ptr noundef %24, ptr noundef %25) #9
  %27 = load ptr, ptr %4, align 8, !tbaa !9
  %28 = call ptr @offset_index_init(i32 noundef 1000, ptr noundef %27) #9
  %29 = getelementptr inbounds i8, ptr %19, i64 32
  store ptr %28, ptr %29, align 8, !tbaa !14
  %30 = load ptr, ptr %4, align 8, !tbaa !9
  call void @free(ptr noundef %30) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  store ptr null, ptr %5, align 8, !tbaa !9
  %31 = load ptr, ptr %21, align 8, !tbaa !11
  %32 = load ptr, ptr @CHRM_INDEX_FILE_NAME, align 8, !tbaa !9
  %33 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %5, ptr noundef nonnull @.str.2, ptr noundef %31, ptr noundef %32) #9
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = call ptr @chrm_index_init(i32 noundef 24, ptr noundef %34) #9
  %36 = getelementptr inbounds i8, ptr %19, i64 16
  store ptr %35, ptr %36, align 8, !tbaa !15
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %37) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %38 = call ptr @priq_new(i32 noundef %23) #9
  store ptr %38, ptr %6, align 8, !tbaa !9
  %39 = zext i32 %23 to i64
  %40 = shl nuw nsw i64 %39, 4
  %41 = call noalias ptr @malloc(i64 noundef %40) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %42 = call ptr @priq_new(i32 noundef %23) #9
  store ptr %42, ptr %7, align 8, !tbaa !9
  %43 = load ptr, ptr %3, align 8, !tbaa !9
  call void @giggle_bulk_insert_prime_pqs(ptr noundef %19, ptr noundef nonnull %6, ptr noundef %41, ptr noundef nonnull %7, ptr noundef %43, i32 noundef %23) #9
  %44 = load ptr, ptr %3, align 8, !tbaa !9
  call void @giggle_bulk_insert_build_leaf_levels(ptr noundef %19, ptr noundef nonnull %6, ptr noundef %41, ptr noundef nonnull %7, ptr noundef %44, i32 noundef %23) #9
  %45 = load ptr, ptr %7, align 8, !tbaa !9
  call void @priq_free(ptr noundef %45) #9
  %46 = load ptr, ptr %6, align 8, !tbaa !9
  call void @priq_free(ptr noundef %46) #9
  call void @free(ptr noundef %41) #9
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %17, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %17 ]
  %47 = load ptr, ptr %3, align 8, !tbaa !9
  %48 = getelementptr inbounds ptr, ptr %47, i64 %indvars.iv
  call void @input_file_destroy(ptr noundef %48) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %39
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph, %17
  %49 = load ptr, ptr %3, align 8, !tbaa !9
  call void @free(ptr noundef %49) #9
  call void @giggle_bulk_insert_build_tree_on_leaves(ptr noundef %19) #9
  %50 = load ptr, ptr %19, align 8, !tbaa !18
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = zext i32 %51 to i64
  call void @UnityAssertEqualNumber(i64 noundef 41, i64 noundef %52, ptr noundef null, i64 noundef 1830, i32 noundef 148) #9
  call void @giggle_index_destroy(ptr noundef nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  store ptr null, ptr %9, align 8, !tbaa !9
  %53 = load ptr, ptr @CACHE_FILE_NAME_PREFIX, align 8, !tbaa !9
  %54 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %8, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.10, ptr noundef %53) #9
  %55 = load ptr, ptr @CACHE_FILE_NAME_PREFIX, align 8, !tbaa !9
  %56 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %9, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.10, ptr noundef %55) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  %57 = load ptr, ptr %8, align 8, !tbaa !9
  %58 = load ptr, ptr %9, align 8, !tbaa !9
  %59 = call ptr @disk_store_load(ptr noundef null, ptr noundef %57, ptr noundef null, ptr noundef %58) #9
  store ptr %59, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %60 = add i32 %51, -1
  %61 = call ptr @disk_store_get(ptr noundef %59, i32 noundef %60, ptr noundef nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %62 = load i64, ptr %11, align 8, !tbaa !19
  %63 = call i64 @bpt_node_deserialize(ptr noundef %61, i64 noundef %62, ptr noundef nonnull %12) #9
  call void @free(ptr noundef %61) #9
  %.sroa.018.0.copyload = load i32, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_keys, align 4
  %.sroa.419.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_keys, i64 4), align 4
  %.sroa.013.0.copyload = load i32, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_values, align 4
  %.sroa.515.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_values, i64 4), align 4
  %.sroa.7.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.root_values, i64 8), align 4
  %64 = load ptr, ptr %12, align 8, !tbaa !9
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = getelementptr inbounds i8, ptr %65, i64 20
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = zext i32 %67 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %68, ptr noundef null, i64 noundef 1859, i32 noundef 148) #9
  %69 = zext i32 %.sroa.018.0.copyload to i64
  %70 = load ptr, ptr %12, align 8, !tbaa !9
  %71 = load ptr, ptr %70, align 8, !tbaa !21
  %72 = getelementptr inbounds i8, ptr %71, i64 24
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = zext i32 %73 to i64
  call void @UnityAssertEqualNumber(i64 noundef %69, i64 noundef %74, ptr noundef null, i64 noundef 1860, i32 noundef 148) #9
  %75 = zext i32 %.sroa.419.0.copyload to i64
  %76 = load ptr, ptr %12, align 8, !tbaa !9
  %77 = load ptr, ptr %76, align 8, !tbaa !21
  %78 = getelementptr inbounds i8, ptr %77, i64 28
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = zext i32 %79 to i64
  call void @UnityAssertEqualNumber(i64 noundef %75, i64 noundef %80, ptr noundef null, i64 noundef 1861, i32 noundef 148) #9
  %81 = zext i32 %.sroa.013.0.copyload to i64
  %82 = load ptr, ptr %12, align 8, !tbaa !9
  %83 = load ptr, ptr %82, align 8, !tbaa !21
  %84 = load i32, ptr @ORDER, align 4, !tbaa !5
  %85 = add i32 %84, 8
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %83, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = zext i32 %88 to i64
  call void @UnityAssertEqualNumber(i64 noundef %81, i64 noundef %89, ptr noundef null, i64 noundef 1862, i32 noundef 148) #9
  %90 = zext i32 %.sroa.515.0.copyload to i64
  %91 = load ptr, ptr %12, align 8, !tbaa !9
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  %93 = load i32, ptr @ORDER, align 4, !tbaa !5
  %94 = add i32 %93, 8
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds i32, ptr %92, i64 %95
  %97 = getelementptr inbounds i8, ptr %96, i64 4
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = zext i32 %98 to i64
  call void @UnityAssertEqualNumber(i64 noundef %90, i64 noundef %99, ptr noundef null, i64 noundef 1863, i32 noundef 148) #9
  %100 = zext i32 %.sroa.7.0.copyload to i64
  %101 = load ptr, ptr %12, align 8, !tbaa !9
  %102 = load ptr, ptr %101, align 8, !tbaa !21
  %103 = load i32, ptr @ORDER, align 4, !tbaa !5
  %104 = add i32 %103, 8
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %102, i64 %105
  %107 = getelementptr inbounds i8, ptr %106, i64 8
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = zext i32 %108 to i64
  call void @UnityAssertEqualNumber(i64 noundef %100, i64 noundef %109, ptr noundef null, i64 noundef 1864, i32 noundef 148) #9
  %110 = load ptr, ptr %12, align 8, !tbaa !9
  %111 = load ptr, ptr %110, align 8, !tbaa !21
  call void @free(ptr noundef %111) #9
  %112 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %112) #9
  %113 = add i32 %.sroa.013.0.copyload, -1
  %114 = call ptr @disk_store_get(ptr noundef %59, i32 noundef %113, ptr noundef nonnull %11) #9
  %115 = load i64, ptr %11, align 8, !tbaa !19
  %116 = call i64 @bpt_node_deserialize(ptr noundef %114, i64 noundef %115, ptr noundef nonnull %12) #9
  call void @free(ptr noundef %114) #9
  %.sroa.011.0.copyload = load i32, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_keys, align 4
  %.sroa.412.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_keys, i64 4), align 4
  %.sroa.08.0.copyload = load i32, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_values, align 4
  %.sroa.49.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_values, i64 4), align 4
  %.sroa.510.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.left_values, i64 8), align 4
  %117 = load ptr, ptr %12, align 8, !tbaa !9
  %118 = load ptr, ptr %117, align 8, !tbaa !21
  %119 = getelementptr inbounds i8, ptr %118, i64 20
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = zext i32 %120 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %121, ptr noundef null, i64 noundef 1877, i32 noundef 148) #9
  %122 = zext i32 %.sroa.011.0.copyload to i64
  %123 = load ptr, ptr %12, align 8, !tbaa !9
  %124 = load ptr, ptr %123, align 8, !tbaa !21
  %125 = getelementptr inbounds i8, ptr %124, i64 24
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = zext i32 %126 to i64
  call void @UnityAssertEqualNumber(i64 noundef %122, i64 noundef %127, ptr noundef null, i64 noundef 1878, i32 noundef 148) #9
  %128 = zext i32 %.sroa.412.0.copyload to i64
  %129 = load ptr, ptr %12, align 8, !tbaa !9
  %130 = load ptr, ptr %129, align 8, !tbaa !21
  %131 = getelementptr inbounds i8, ptr %130, i64 28
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = zext i32 %132 to i64
  call void @UnityAssertEqualNumber(i64 noundef %128, i64 noundef %133, ptr noundef null, i64 noundef 1879, i32 noundef 148) #9
  %134 = zext i32 %.sroa.08.0.copyload to i64
  %135 = load ptr, ptr %12, align 8, !tbaa !9
  %136 = load ptr, ptr %135, align 8, !tbaa !21
  %137 = load i32, ptr @ORDER, align 4, !tbaa !5
  %138 = add i32 %137, 8
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %136, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = zext i32 %141 to i64
  call void @UnityAssertEqualNumber(i64 noundef %134, i64 noundef %142, ptr noundef null, i64 noundef 1880, i32 noundef 148) #9
  %143 = zext i32 %.sroa.49.0.copyload to i64
  %144 = load ptr, ptr %12, align 8, !tbaa !9
  %145 = load ptr, ptr %144, align 8, !tbaa !21
  %146 = load i32, ptr @ORDER, align 4, !tbaa !5
  %147 = add i32 %146, 8
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr %145, i64 %148
  %150 = getelementptr inbounds i8, ptr %149, i64 4
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = zext i32 %151 to i64
  call void @UnityAssertEqualNumber(i64 noundef %143, i64 noundef %152, ptr noundef null, i64 noundef 1881, i32 noundef 148) #9
  %153 = zext i32 %.sroa.510.0.copyload to i64
  %154 = load ptr, ptr %12, align 8, !tbaa !9
  %155 = load ptr, ptr %154, align 8, !tbaa !21
  %156 = load i32, ptr @ORDER, align 4, !tbaa !5
  %157 = add i32 %156, 8
  %158 = zext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %155, i64 %158
  %160 = getelementptr inbounds i8, ptr %159, i64 8
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = zext i32 %161 to i64
  call void @UnityAssertEqualNumber(i64 noundef %153, i64 noundef %162, ptr noundef null, i64 noundef 1882, i32 noundef 148) #9
  %163 = load ptr, ptr %12, align 8, !tbaa !9
  %164 = load ptr, ptr %163, align 8, !tbaa !21
  call void @free(ptr noundef %164) #9
  %165 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %165) #9
  %166 = load ptr, ptr %10, align 8, !tbaa !9
  %167 = add i32 %.sroa.515.0.copyload, -1
  %168 = call ptr @disk_store_get(ptr noundef %166, i32 noundef %167, ptr noundef nonnull %11) #9
  %169 = load i64, ptr %11, align 8, !tbaa !19
  %170 = call i64 @bpt_node_deserialize(ptr noundef %168, i64 noundef %169, ptr noundef nonnull %12) #9
  call void @free(ptr noundef %168) #9
  %.sroa.06.0.copyload = load i32, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_keys, align 4
  %.sroa.47.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_keys, i64 4), align 4
  %.sroa.03.0.copyload = load i32, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_values, align 4
  %.sroa.44.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_values, i64 4), align 4
  %.sroa.55.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.middle_values, i64 8), align 4
  %171 = load ptr, ptr %12, align 8, !tbaa !9
  %172 = load ptr, ptr %171, align 8, !tbaa !21
  %173 = getelementptr inbounds i8, ptr %172, i64 20
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = zext i32 %174 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %175, ptr noundef null, i64 noundef 1896, i32 noundef 148) #9
  %176 = zext i32 %.sroa.06.0.copyload to i64
  %177 = load ptr, ptr %12, align 8, !tbaa !9
  %178 = load ptr, ptr %177, align 8, !tbaa !21
  %179 = getelementptr inbounds i8, ptr %178, i64 24
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = zext i32 %180 to i64
  call void @UnityAssertEqualNumber(i64 noundef %176, i64 noundef %181, ptr noundef null, i64 noundef 1897, i32 noundef 148) #9
  %182 = zext i32 %.sroa.47.0.copyload to i64
  %183 = load ptr, ptr %12, align 8, !tbaa !9
  %184 = load ptr, ptr %183, align 8, !tbaa !21
  %185 = getelementptr inbounds i8, ptr %184, i64 28
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = zext i32 %186 to i64
  call void @UnityAssertEqualNumber(i64 noundef %182, i64 noundef %187, ptr noundef null, i64 noundef 1898, i32 noundef 148) #9
  %188 = zext i32 %.sroa.03.0.copyload to i64
  %189 = load ptr, ptr %12, align 8, !tbaa !9
  %190 = load ptr, ptr %189, align 8, !tbaa !21
  %191 = load i32, ptr @ORDER, align 4, !tbaa !5
  %192 = add i32 %191, 8
  %193 = zext i32 %192 to i64
  %194 = getelementptr inbounds i32, ptr %190, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = zext i32 %195 to i64
  call void @UnityAssertEqualNumber(i64 noundef %188, i64 noundef %196, ptr noundef null, i64 noundef 1899, i32 noundef 148) #9
  %197 = zext i32 %.sroa.44.0.copyload to i64
  %198 = load ptr, ptr %12, align 8, !tbaa !9
  %199 = load ptr, ptr %198, align 8, !tbaa !21
  %200 = load i32, ptr @ORDER, align 4, !tbaa !5
  %201 = add i32 %200, 8
  %202 = zext i32 %201 to i64
  %203 = getelementptr inbounds i32, ptr %199, i64 %202
  %204 = getelementptr inbounds i8, ptr %203, i64 4
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = zext i32 %205 to i64
  call void @UnityAssertEqualNumber(i64 noundef %197, i64 noundef %206, ptr noundef null, i64 noundef 1900, i32 noundef 148) #9
  %207 = zext i32 %.sroa.55.0.copyload to i64
  %208 = load ptr, ptr %12, align 8, !tbaa !9
  %209 = load ptr, ptr %208, align 8, !tbaa !21
  %210 = load i32, ptr @ORDER, align 4, !tbaa !5
  %211 = add i32 %210, 8
  %212 = zext i32 %211 to i64
  %213 = getelementptr inbounds i32, ptr %209, i64 %212
  %214 = getelementptr inbounds i8, ptr %213, i64 8
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = zext i32 %215 to i64
  call void @UnityAssertEqualNumber(i64 noundef %207, i64 noundef %216, ptr noundef null, i64 noundef 1901, i32 noundef 148) #9
  %217 = load ptr, ptr %12, align 8, !tbaa !9
  %218 = load ptr, ptr %217, align 8, !tbaa !21
  call void @free(ptr noundef %218) #9
  %219 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %219) #9
  %220 = add i32 %.sroa.7.0.copyload, -1
  %221 = call ptr @disk_store_get(ptr noundef %166, i32 noundef %220, ptr noundef nonnull %11) #9
  %222 = load i64, ptr %11, align 8, !tbaa !19
  %223 = call i64 @bpt_node_deserialize(ptr noundef %221, i64 noundef %222, ptr noundef nonnull %12) #9
  call void @free(ptr noundef %221) #9
  %.sroa.01.0.copyload = load i32, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_keys, align 4
  %.sroa.42.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_keys, i64 4), align 4
  %.sroa.0.0.copyload = load i32, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_values, align 4
  %.sroa.4.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_values, i64 4), align 4
  %.sroa.5.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.test_giggle_bulk_insert_build_tree_on_leaves_few_order_2.right_values, i64 8), align 4
  %224 = load ptr, ptr %12, align 8, !tbaa !9
  %225 = load ptr, ptr %224, align 8, !tbaa !21
  %226 = getelementptr inbounds i8, ptr %225, i64 20
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = zext i32 %227 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %228, ptr noundef null, i64 noundef 1915, i32 noundef 148) #9
  %229 = zext i32 %.sroa.01.0.copyload to i64
  %230 = load ptr, ptr %12, align 8, !tbaa !9
  %231 = load ptr, ptr %230, align 8, !tbaa !21
  %232 = getelementptr inbounds i8, ptr %231, i64 24
  %233 = load i32, ptr %232, align 4, !tbaa !5
  %234 = zext i32 %233 to i64
  call void @UnityAssertEqualNumber(i64 noundef %229, i64 noundef %234, ptr noundef null, i64 noundef 1916, i32 noundef 148) #9
  %235 = zext i32 %.sroa.42.0.copyload to i64
  %236 = load ptr, ptr %12, align 8, !tbaa !9
  %237 = load ptr, ptr %236, align 8, !tbaa !21
  %238 = getelementptr inbounds i8, ptr %237, i64 28
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = zext i32 %239 to i64
  call void @UnityAssertEqualNumber(i64 noundef %235, i64 noundef %240, ptr noundef null, i64 noundef 1917, i32 noundef 148) #9
  %241 = zext i32 %.sroa.0.0.copyload to i64
  %242 = load ptr, ptr %12, align 8, !tbaa !9
  %243 = load ptr, ptr %242, align 8, !tbaa !21
  %244 = load i32, ptr @ORDER, align 4, !tbaa !5
  %245 = add i32 %244, 8
  %246 = zext i32 %245 to i64
  %247 = getelementptr inbounds i32, ptr %243, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = zext i32 %248 to i64
  call void @UnityAssertEqualNumber(i64 noundef %241, i64 noundef %249, ptr noundef null, i64 noundef 1918, i32 noundef 148) #9
  %250 = zext i32 %.sroa.4.0.copyload to i64
  %251 = load ptr, ptr %12, align 8, !tbaa !9
  %252 = load ptr, ptr %251, align 8, !tbaa !21
  %253 = load i32, ptr @ORDER, align 4, !tbaa !5
  %254 = add i32 %253, 8
  %255 = zext i32 %254 to i64
  %256 = getelementptr inbounds i32, ptr %252, i64 %255
  %257 = getelementptr inbounds i8, ptr %256, i64 4
  %258 = load i32, ptr %257, align 4, !tbaa !5
  %259 = zext i32 %258 to i64
  call void @UnityAssertEqualNumber(i64 noundef %250, i64 noundef %259, ptr noundef null, i64 noundef 1919, i32 noundef 148) #9
  %260 = zext i32 %.sroa.5.0.copyload to i64
  %261 = load ptr, ptr %12, align 8, !tbaa !9
  %262 = load ptr, ptr %261, align 8, !tbaa !21
  %263 = load i32, ptr @ORDER, align 4, !tbaa !5
  %264 = add i32 %263, 8
  %265 = zext i32 %264 to i64
  %266 = getelementptr inbounds i32, ptr %262, i64 %265
  %267 = getelementptr inbounds i8, ptr %266, i64 8
  %268 = load i32, ptr %267, align 4, !tbaa !5
  %269 = zext i32 %268 to i64
  call void @UnityAssertEqualNumber(i64 noundef %260, i64 noundef %269, ptr noundef null, i64 noundef 1920, i32 noundef 148) #9
  %270 = load ptr, ptr %12, align 8, !tbaa !9
  %271 = load ptr, ptr %270, align 8, !tbaa !21
  call void @free(ptr noundef %271) #9
  %272 = load ptr, ptr %12, align 8, !tbaa !9
  call void @free(ptr noundef %272) #9
  call void @disk_store_destroy(ptr noundef nonnull %10) #9
  %273 = call i32 @rmrf(ptr noundef nonnull @.str.10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %1) #9
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 48}
!12 = !{!"giggle_index", !10, i64 0, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!13 = !{!12, !10, i64 24}
!14 = !{!12, !10, i64 32}
!15 = !{!12, !10, i64 16}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!12, !10, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!22, !10, i64 0}
!22 = !{!"bpt_node", !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass