; 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.pri_queue_t = type { ptr, i32, i32 }
%struct.offset_index = type { ptr, ptr, i32, ptr, i32 }
%struct.file_id_offset_pairs = type { i64, i64, ptr }
%struct.chrm_index = type { ptr, ptr }
%struct.ordered_set = type { ptr, i32, i32, ptr, ptr, ptr }
%struct.disk_store = type { ptr, ptr, ptr, ptr, i32, i32, i64, i64, ptr, ptr, i8, ptr }
%struct.bpt_node = type { ptr }
%struct.leaf_data = type { i64, i64, i64, ptr, ptr, ptr, ptr, ptr, 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.5 = external hidden unnamed_addr constant [52 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
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_keys = external hidden unnamed_addr constant [6 x [5 x i32]], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_starts_ens = external hidden unnamed_addr constant [6 x [5 x [2 x i32]]], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leaf_sizes = external hidden unnamed_addr constant [6 x [3 x i32]], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_1 = external hidden unnamed_addr constant [3 x i64], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_2 = external hidden unnamed_addr constant [4 x i64], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_3 = external hidden unnamed_addr constant [3 x i64], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_4 = external hidden unnamed_addr constant [4 x i64], align 16

; 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

declare void @file_index_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 @offset_index_destroy(ptr noundef) #1

declare void @chrm_index_destroy(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @test_giggle_bulk_insert_build_leaf_levels_few() #5 {
  %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 ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca [6 x [5 x i32]], align 16
  %18 = alloca [6 x [5 x [2 x i32]]], align 16
  %19 = alloca [6 x [3 x i32]], align 16
  %20 = alloca [3 x i64], align 16
  %21 = alloca [4 x i64], align 16
  %22 = alloca [3 x i64], align 16
  %23 = alloca [4 x i64], align 16
  %24 = alloca [5 x i64], align 16
  %25 = alloca [6 x ptr], align 16
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i64, align 8
  %32 = alloca ptr, align 8
  store i32 5, 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.5, 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)
  %33 = load ptr, ptr %2, align 8, !tbaa !9
  %34 = call i32 @stat(ptr noundef %33, ptr noundef %3) #7
  %35 = icmp eq i32 %34, -1
  br i1 %35, label %36, label %39

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

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

44:                                               ; preds = %39, %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %45 = call noalias ptr @malloc(i64 noundef 64) #8
  store ptr %45, ptr %4, align 8, !tbaa !9
  %46 = load ptr, ptr %2, align 8, !tbaa !9
  %47 = call noalias ptr @strdup(ptr noundef %46) #7
  %48 = load ptr, ptr %4, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.giggle_index, ptr %48, i32 0, i32 7
  store ptr %47, ptr %49, align 8, !tbaa !11
  %50 = load ptr, ptr %4, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.giggle_index, ptr %50, i32 0, i32 4
  store ptr null, ptr %51, 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
  %52 = load ptr, ptr %1, align 8, !tbaa !9
  %53 = load ptr, ptr %4, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.giggle_index, ptr %53, i32 0, i32 7
  %55 = load ptr, ptr %54, align 8, !tbaa !11
  %56 = load ptr, ptr %4, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.giggle_index, ptr %56, i32 0, i32 4
  %58 = call i32 @giggle_bulk_insert_open_files(ptr noundef %52, ptr noundef %55, ptr noundef %5, ptr noundef %57)
  store i32 %58, ptr %6, align 4, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = zext i32 %59 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %60, ptr noundef null, i64 noundef 1109, i32 noundef 148)
  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
  %61 = load ptr, ptr %4, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.giggle_index, ptr %61, i32 0, i32 7
  %63 = load ptr, ptr %62, align 8, !tbaa !11
  %64 = load ptr, ptr @OFFSET_INDEX_FILE_NAME, align 8, !tbaa !9
  %65 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %7, ptr noundef @.str.2, ptr noundef %63, ptr noundef %64) #7
  store i32 %65, ptr %8, align 4, !tbaa !5
  %66 = load ptr, ptr %7, align 8, !tbaa !9
  %67 = call ptr @offset_index_init(i32 noundef 1000, ptr noundef %66)
  %68 = load ptr, ptr %4, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.giggle_index, ptr %68, i32 0, i32 5
  store ptr %67, ptr %69, align 8, !tbaa !14
  %70 = load ptr, ptr %7, align 8, !tbaa !9
  call void @free(ptr noundef %70) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !9
  %71 = load ptr, ptr %4, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct.giggle_index, ptr %71, i32 0, i32 7
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = load ptr, ptr @CHRM_INDEX_FILE_NAME, align 8, !tbaa !9
  %75 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %9, ptr noundef @.str.2, ptr noundef %73, ptr noundef %74) #7
  store i32 %75, ptr %8, align 4, !tbaa !5
  %76 = load ptr, ptr %9, align 8, !tbaa !9
  %77 = call ptr @chrm_index_init(i32 noundef 24, ptr noundef %76)
  %78 = load ptr, ptr %4, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.giggle_index, ptr %78, i32 0, i32 3
  store ptr %77, ptr %79, align 8, !tbaa !15
  %80 = load ptr, ptr %9, align 8, !tbaa !9
  call void @free(ptr noundef %80) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = call ptr @priq_new(i32 noundef %81)
  store ptr %82, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = zext i32 %83 to i64
  %85 = mul i64 %84, 16
  %86 = call noalias ptr @malloc(i64 noundef %85) #8
  store ptr %86, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = call ptr @priq_new(i32 noundef %87)
  store ptr %88, ptr %12, align 8, !tbaa !9
  %89 = load ptr, ptr %4, align 8, !tbaa !9
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  %91 = load ptr, ptr %5, align 8, !tbaa !9
  %92 = load i32, ptr %6, align 4, !tbaa !5
  call void @giggle_bulk_insert_prime_pqs(ptr noundef %89, ptr noundef %10, ptr noundef %90, ptr noundef %12, ptr noundef %91, i32 noundef %92)
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = zext i32 %93 to i64
  %95 = load ptr, ptr %10, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.pri_queue_t, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 8, !tbaa !16
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  call void @UnityAssertEqualNumber(i64 noundef %94, i64 noundef %99, ptr noundef null, i64 noundef 1145, i32 noundef 148)
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = zext i32 %100 to i64
  %102 = load ptr, ptr %12, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.pri_queue_t, ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 8, !tbaa !16
  %105 = sub nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  call void @UnityAssertEqualNumber(i64 noundef %101, i64 noundef %106, ptr noundef null, i64 noundef 1146, i32 noundef 148)
  %107 = load ptr, ptr %4, align 8, !tbaa !9
  %108 = load ptr, ptr %11, align 8, !tbaa !9
  %109 = load ptr, ptr %5, align 8, !tbaa !9
  %110 = load i32, ptr %6, align 4, !tbaa !5
  call void @giggle_bulk_insert_build_leaf_levels(ptr noundef %107, ptr noundef %10, ptr noundef %108, ptr noundef %12, ptr noundef %109, i32 noundef %110)
  %111 = load ptr, ptr %4, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.giggle_index, ptr %111, i32 0, i32 5
  %113 = load ptr, ptr %112, align 8, !tbaa !14
  %114 = getelementptr inbounds %struct.offset_index, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !18
  %116 = getelementptr inbounds %struct.file_id_offset_pairs, ptr %115, i32 0, i32 0
  %117 = load i64, ptr %116, align 8, !tbaa !20
  call void @UnityAssertEqualNumber(i64 noundef 16, i64 noundef %117, ptr noundef null, i64 noundef 1155, i32 noundef 148)
  %118 = load ptr, ptr %4, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.giggle_index, ptr %118, i32 0, i32 3
  %120 = load ptr, ptr %119, align 8, !tbaa !15
  %121 = getelementptr inbounds %struct.chrm_index, ptr %120, i32 0, i32 1
  %122 = load ptr, ptr %121, align 8, !tbaa !23
  %123 = getelementptr inbounds %struct.ordered_set, ptr %122, i32 0, i32 1
  %124 = load i32, ptr %123, align 8, !tbaa !25
  %125 = zext i32 %124 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %125, ptr noundef null, i64 noundef 1156, i32 noundef 148)
  %126 = load ptr, ptr %10, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.pri_queue_t, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 8, !tbaa !16
  %129 = sub nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %130, ptr noundef null, i64 noundef 1158, i32 noundef 148)
  %131 = load ptr, ptr %12, align 8, !tbaa !9
  %132 = getelementptr inbounds %struct.pri_queue_t, ptr %131, i32 0, i32 1
  %133 = load i32, ptr %132, align 8, !tbaa !16
  %134 = sub nsw i32 %133, 1
  %135 = sext i32 %134 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %135, ptr noundef null, i64 noundef 1159, i32 noundef 148)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %145, %44
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = load i32, ptr %6, align 4, !tbaa !5
  %139 = icmp ult i32 %137, %138
  br i1 %139, label %140, label %148

140:                                              ; preds = %136
  %141 = load ptr, ptr %5, align 8, !tbaa !9
  %142 = load i32, ptr %13, align 4, !tbaa !5
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds ptr, ptr %141, i64 %143
  call void @input_file_destroy(ptr noundef %144)
  br label %145

145:                                              ; preds = %140
  %146 = load i32, ptr %13, align 4, !tbaa !5
  %147 = add i32 %146, 1
  store i32 %147, ptr %13, align 4, !tbaa !5
  br label %136, !llvm.loop !27

148:                                              ; preds = %136
  %149 = load ptr, ptr %5, align 8, !tbaa !9
  call void @free(ptr noundef %149) #7
  %150 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %150) #7
  %151 = load ptr, ptr %10, align 8, !tbaa !9
  call void @priq_free(ptr noundef %151)
  %152 = load ptr, ptr %12, align 8, !tbaa !9
  call void @priq_free(ptr noundef %152)
  %153 = load ptr, ptr %4, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.giggle_index, ptr %153, i32 0, i32 7
  %155 = load ptr, ptr %154, align 8, !tbaa !11
  call void @free(ptr noundef %155) #7
  %156 = load ptr, ptr %4, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.giggle_index, ptr %156, i32 0, i32 4
  call void @file_index_destroy(ptr noundef %157)
  %158 = load ptr, ptr %4, align 8, !tbaa !9
  %159 = getelementptr inbounds %struct.giggle_index, ptr %158, i32 0, i32 5
  call void @offset_index_destroy(ptr noundef %159)
  %160 = load ptr, ptr %4, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.giggle_index, ptr %160, i32 0, i32 3
  call void @chrm_index_destroy(ptr noundef %161)
  %162 = load ptr, ptr %4, align 8, !tbaa !9
  call void @free(ptr noundef %162) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr null, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !9
  %163 = load ptr, ptr %2, align 8, !tbaa !9
  %164 = load ptr, ptr @CACHE_FILE_NAME_PREFIX, align 8, !tbaa !9
  %165 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %14, ptr noundef @.str.6, ptr noundef %163, ptr noundef %164) #7
  store i32 %165, ptr %8, align 4, !tbaa !5
  %166 = load ptr, ptr %2, align 8, !tbaa !9
  %167 = load ptr, ptr @CACHE_FILE_NAME_PREFIX, align 8, !tbaa !9
  %168 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef %15, ptr noundef @.str.7, ptr noundef %166, ptr noundef %167) #7
  store i32 %168, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %169 = load ptr, ptr %14, align 8, !tbaa !9
  %170 = load ptr, ptr %15, align 8, !tbaa !9
  %171 = call ptr @disk_store_load(ptr noundef null, ptr noundef %169, ptr noundef null, ptr noundef %170)
  store ptr %171, ptr %16, align 8, !tbaa !9
  %172 = load ptr, ptr %16, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.disk_store, ptr %172, i32 0, i32 5
  %174 = load i32, ptr %173, align 4, !tbaa !29
  %175 = zext i32 %174 to i64
  call void @UnityAssertEqualNumber(i64 noundef 12, i64 noundef %175, ptr noundef null, i64 noundef 1191, i32 noundef 148)
  call void @llvm.lifetime.start.p0(i64 120, ptr %17) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_keys, i64 120, i1 false)
  call void @llvm.lifetime.start.p0(i64 240, ptr %18) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_starts_ens, i64 240, i1 false)
  call void @llvm.lifetime.start.p0(i64 72, ptr %19) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leaf_sizes, i64 72, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_1, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_2, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_3, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_4, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #7
  call void @llvm.memset.p0.i64(ptr align 16 %24, i8 0, i64 40, i1 false)
  %176 = getelementptr inbounds [5 x i64], ptr %24, i32 0, i32 1
  store i64 1, ptr %176, align 8
  %177 = getelementptr inbounds [5 x i64], ptr %24, i32 0, i32 2
  store i64 2, ptr %177, align 16
  %178 = getelementptr inbounds [5 x i64], ptr %24, i32 0, i32 3
  store i64 14, ptr %178, align 8
  %179 = getelementptr inbounds [5 x i64], ptr %24, i32 0, i32 4
  store i64 15, ptr %179, align 16
  call void @llvm.lifetime.start.p0(i64 48, ptr %25) #7
  store ptr null, ptr %25, align 8, !tbaa !9
  %180 = getelementptr inbounds ptr, ptr %25, i64 1
  %181 = getelementptr inbounds [3 x i64], ptr %20, i64 0, i64 0
  store ptr %181, ptr %180, align 8, !tbaa !9
  %182 = getelementptr inbounds ptr, ptr %25, i64 2
  %183 = getelementptr inbounds [4 x i64], ptr %21, i64 0, i64 0
  store ptr %183, ptr %182, align 8, !tbaa !9
  %184 = getelementptr inbounds ptr, ptr %25, i64 3
  %185 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 0
  store ptr %185, ptr %184, align 8, !tbaa !9
  %186 = getelementptr inbounds ptr, ptr %25, i64 4
  %187 = getelementptr inbounds [4 x i64], ptr %23, i64 0, i64 0
  store ptr %187, ptr %186, align 8, !tbaa !9
  %188 = getelementptr inbounds ptr, ptr %25, i64 5
  %189 = getelementptr inbounds [5 x i64], ptr %24, i64 0, i64 0
  store ptr %189, ptr %188, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  store i32 1, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %190

190:                                              ; preds = %383, %148
  %191 = load i32, ptr %26, align 4, !tbaa !5
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %396

193:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %194 = load ptr, ptr %16, align 8, !tbaa !9
  %195 = load i32, ptr %26, align 4, !tbaa !5
  %196 = sub i32 %195, 1
  %197 = call ptr @disk_store_get(ptr noundef %194, i32 noundef %196, ptr noundef %28)
  store ptr %197, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %198 = load ptr, ptr %29, align 8, !tbaa !9
  %199 = load i64, ptr %28, align 8, !tbaa !31
  %200 = call i64 @bpt_node_deserialize(ptr noundef %198, i64 noundef %199, ptr noundef %30)
  store i64 %200, ptr %31, align 8, !tbaa !31
  %201 = load ptr, ptr %29, align 8, !tbaa !9
  call void @free(ptr noundef %201) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %202 = load ptr, ptr %16, align 8, !tbaa !9
  %203 = load ptr, ptr %30, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.bpt_node, ptr %203, i32 0, i32 0
  %205 = load ptr, ptr %204, align 8, !tbaa !32
  %206 = load i32, ptr @ORDER, align 4, !tbaa !5
  %207 = add i32 6, %206
  %208 = add i32 %207, 1
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds i32, ptr %205, i64 %209
  %211 = getelementptr inbounds i32, ptr %210, i64 0
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = sub i32 %212, 1
  %214 = call ptr @disk_store_get(ptr noundef %202, i32 noundef %213, ptr noundef %28)
  store ptr %214, ptr %29, align 8, !tbaa !9
  %215 = load ptr, ptr %29, align 8, !tbaa !9
  %216 = load i64, ptr %28, align 8, !tbaa !31
  %217 = call i64 @leaf_data_deserialize(ptr noundef %215, i64 noundef %216, ptr noundef %32)
  store i64 %217, ptr %31, align 8, !tbaa !31
  %218 = load i32, ptr %26, align 4, !tbaa !5
  %219 = zext i32 %218 to i64
  %220 = load ptr, ptr %30, align 8, !tbaa !9
  %221 = getelementptr inbounds %struct.bpt_node, ptr %220, i32 0, i32 0
  %222 = load ptr, ptr %221, align 8, !tbaa !32
  %223 = getelementptr inbounds i32, ptr %222, i64 0
  %224 = load i32, ptr %223, align 4, !tbaa !5
  %225 = zext i32 %224 to i64
  call void @UnityAssertEqualNumber(i64 noundef %219, i64 noundef %225, ptr noundef null, i64 noundef 1237, i32 noundef 148)
  %226 = load i32, ptr %26, align 4, !tbaa !5
  %227 = add i32 %226, 1
  %228 = zext i32 %227 to i64
  %229 = load ptr, ptr %30, align 8, !tbaa !9
  %230 = getelementptr inbounds %struct.bpt_node, ptr %229, i32 0, i32 0
  %231 = load ptr, ptr %230, align 8, !tbaa !32
  %232 = load i32, ptr @ORDER, align 4, !tbaa !5
  %233 = add i32 6, %232
  %234 = add i32 %233, 1
  %235 = zext i32 %234 to i64
  %236 = getelementptr inbounds i32, ptr %231, i64 %235
  %237 = getelementptr inbounds i32, ptr %236, i64 0
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = zext i32 %238 to i64
  call void @UnityAssertEqualNumber(i64 noundef %228, i64 noundef %239, ptr noundef null, i64 noundef 1238, i32 noundef 148)
  %240 = load i32, ptr %26, align 4, !tbaa !5
  %241 = icmp ult i32 %240, 11
  br i1 %241, label %242, label %252

242:                                              ; preds = %193
  %243 = load i32, ptr %26, align 4, !tbaa !5
  %244 = add i32 %243, 2
  %245 = zext i32 %244 to i64
  %246 = load ptr, ptr %30, align 8, !tbaa !9
  %247 = getelementptr inbounds %struct.bpt_node, ptr %246, i32 0, i32 0
  %248 = load ptr, ptr %247, align 8, !tbaa !32
  %249 = getelementptr inbounds i32, ptr %248, i64 4
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = zext i32 %250 to i64
  call void @UnityAssertEqualNumber(i64 noundef %245, i64 noundef %251, ptr noundef null, i64 noundef 1240, i32 noundef 148)
  br label %259

252:                                              ; preds = %193
  %253 = load ptr, ptr %30, align 8, !tbaa !9
  %254 = getelementptr inbounds %struct.bpt_node, ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8, !tbaa !32
  %256 = getelementptr inbounds i32, ptr %255, i64 4
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = zext i32 %257 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %258, ptr noundef null, i64 noundef 1242, i32 noundef 148)
  br label %259

259:                                              ; preds = %252, %242
  %260 = load ptr, ptr %30, align 8, !tbaa !9
  %261 = getelementptr inbounds %struct.bpt_node, ptr %260, i32 0, i32 0
  %262 = load ptr, ptr %261, align 8, !tbaa !32
  %263 = getelementptr inbounds i32, ptr %262, i64 5
  %264 = load i32, ptr %263, align 4, !tbaa !5
  %265 = zext i32 %264 to i64
  call void @UnityAssertEqualNumber(i64 noundef 5, i64 noundef %265, ptr noundef null, i64 noundef 1245, i32 noundef 148)
  %266 = load i32, ptr %27, align 4, !tbaa !5
  %267 = zext i32 %266 to i64
  %268 = getelementptr inbounds [6 x [3 x i32]], ptr %19, i64 0, i64 %267
  %269 = getelementptr inbounds [3 x i32], ptr %268, i64 0, i64 0
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = zext i32 %270 to i64
  %272 = load ptr, ptr %32, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.leaf_data, ptr %272, i32 0, i32 0
  %274 = load i64, ptr %273, align 8, !tbaa !34
  call void @UnityAssertEqualNumber(i64 noundef %271, i64 noundef %274, ptr noundef null, i64 noundef 1247, i32 noundef 148)
  %275 = load i32, ptr %27, align 4, !tbaa !5
  %276 = zext i32 %275 to i64
  %277 = getelementptr inbounds [6 x [3 x i32]], ptr %19, i64 0, i64 %276
  %278 = getelementptr inbounds [3 x i32], ptr %277, i64 0, i64 1
  %279 = load i32, ptr %278, align 4, !tbaa !5
  %280 = zext i32 %279 to i64
  %281 = load ptr, ptr %32, align 8, !tbaa !9
  %282 = getelementptr inbounds %struct.leaf_data, ptr %281, i32 0, i32 1
  %283 = load i64, ptr %282, align 8, !tbaa !36
  call void @UnityAssertEqualNumber(i64 noundef %280, i64 noundef %283, ptr noundef null, i64 noundef 1248, i32 noundef 148)
  %284 = load i32, ptr %27, align 4, !tbaa !5
  %285 = zext i32 %284 to i64
  %286 = getelementptr inbounds [6 x [3 x i32]], ptr %19, i64 0, i64 %285
  %287 = getelementptr inbounds [3 x i32], ptr %286, i64 0, i64 2
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = zext i32 %288 to i64
  %290 = load ptr, ptr %32, align 8, !tbaa !9
  %291 = getelementptr inbounds %struct.leaf_data, ptr %290, i32 0, i32 2
  %292 = load i64, ptr %291, align 8, !tbaa !37
  call void @UnityAssertEqualNumber(i64 noundef %289, i64 noundef %292, ptr noundef null, i64 noundef 1249, i32 noundef 148)
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %293

293:                                              ; preds = %316, %259
  %294 = load i32, ptr %13, align 4, !tbaa !5
  %295 = zext i32 %294 to i64
  %296 = load ptr, ptr %32, align 8, !tbaa !9
  %297 = getelementptr inbounds %struct.leaf_data, ptr %296, i32 0, i32 0
  %298 = load i64, ptr %297, align 8, !tbaa !34
  %299 = icmp ult i64 %295, %298
  br i1 %299, label %300, label %319

300:                                              ; preds = %293
  %301 = load i32, ptr %27, align 4, !tbaa !5
  %302 = zext i32 %301 to i64
  %303 = getelementptr inbounds [6 x ptr], ptr %25, i64 0, i64 %302
  %304 = load ptr, ptr %303, align 8, !tbaa !9
  %305 = load i32, ptr %13, align 4, !tbaa !5
  %306 = zext i32 %305 to i64
  %307 = getelementptr inbounds i64, ptr %304, i64 %306
  %308 = load i64, ptr %307, align 8, !tbaa !31
  %309 = load ptr, ptr %32, align 8, !tbaa !9
  %310 = getelementptr inbounds %struct.leaf_data, ptr %309, i32 0, i32 5
  %311 = load ptr, ptr %310, align 8, !tbaa !38
  %312 = load i32, ptr %13, align 4, !tbaa !5
  %313 = zext i32 %312 to i64
  %314 = getelementptr inbounds i64, ptr %311, i64 %313
  %315 = load i64, ptr %314, align 8, !tbaa !31
  call void @UnityAssertEqualNumber(i64 noundef %308, i64 noundef %315, ptr noundef null, i64 noundef 1252, i32 noundef 148)
  br label %316

316:                                              ; preds = %300
  %317 = load i32, ptr %13, align 4, !tbaa !5
  %318 = add i32 %317, 1
  store i32 %318, ptr %13, align 4, !tbaa !5
  br label %293, !llvm.loop !39

319:                                              ; preds = %293
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %320

320:                                              ; preds = %380, %319
  %321 = load i32, ptr %13, align 4, !tbaa !5
  %322 = load ptr, ptr %30, align 8, !tbaa !9
  %323 = getelementptr inbounds %struct.bpt_node, ptr %322, i32 0, i32 0
  %324 = load ptr, ptr %323, align 8, !tbaa !32
  %325 = getelementptr inbounds i32, ptr %324, i64 5
  %326 = load i32, ptr %325, align 4, !tbaa !5
  %327 = icmp ult i32 %321, %326
  br i1 %327, label %328, label %383

328:                                              ; preds = %320
  %329 = load i32, ptr %27, align 4, !tbaa !5
  %330 = zext i32 %329 to i64
  %331 = getelementptr inbounds [6 x [5 x i32]], ptr %17, i64 0, i64 %330
  %332 = load i32, ptr %13, align 4, !tbaa !5
  %333 = zext i32 %332 to i64
  %334 = getelementptr inbounds [5 x i32], ptr %331, i64 0, i64 %333
  %335 = load i32, ptr %334, align 4, !tbaa !5
  %336 = zext i32 %335 to i64
  %337 = load ptr, ptr %30, align 8, !tbaa !9
  %338 = getelementptr inbounds %struct.bpt_node, ptr %337, i32 0, i32 0
  %339 = load ptr, ptr %338, align 8, !tbaa !32
  %340 = getelementptr inbounds i32, ptr %339, i64 6
  %341 = load i32, ptr %13, align 4, !tbaa !5
  %342 = zext i32 %341 to i64
  %343 = getelementptr inbounds i32, ptr %340, i64 %342
  %344 = load i32, ptr %343, align 4, !tbaa !5
  %345 = zext i32 %344 to i64
  call void @UnityAssertEqualNumber(i64 noundef %336, i64 noundef %345, ptr noundef null, i64 noundef 1255, i32 noundef 148)
  %346 = load i32, ptr %27, align 4, !tbaa !5
  %347 = zext i32 %346 to i64
  %348 = getelementptr inbounds [6 x [5 x [2 x i32]]], ptr %18, i64 0, i64 %347
  %349 = load i32, ptr %13, align 4, !tbaa !5
  %350 = zext i32 %349 to i64
  %351 = getelementptr inbounds [5 x [2 x i32]], ptr %348, i64 0, i64 %350
  %352 = getelementptr inbounds [2 x i32], ptr %351, i64 0, i64 0
  %353 = load i32, ptr %352, align 8, !tbaa !5
  %354 = zext i32 %353 to i64
  %355 = load ptr, ptr %32, align 8, !tbaa !9
  %356 = getelementptr inbounds %struct.leaf_data, ptr %355, i32 0, i32 3
  %357 = load ptr, ptr %356, align 8, !tbaa !40
  %358 = load i32, ptr %13, align 4, !tbaa !5
  %359 = zext i32 %358 to i64
  %360 = getelementptr inbounds i32, ptr %357, i64 %359
  %361 = load i32, ptr %360, align 4, !tbaa !5
  %362 = zext i32 %361 to i64
  call void @UnityAssertEqualNumber(i64 noundef %354, i64 noundef %362, ptr noundef null, i64 noundef 1258, i32 noundef 148)
  %363 = load i32, ptr %27, align 4, !tbaa !5
  %364 = zext i32 %363 to i64
  %365 = getelementptr inbounds [6 x [5 x [2 x i32]]], ptr %18, i64 0, i64 %364
  %366 = load i32, ptr %13, align 4, !tbaa !5
  %367 = zext i32 %366 to i64
  %368 = getelementptr inbounds [5 x [2 x i32]], ptr %365, i64 0, i64 %367
  %369 = getelementptr inbounds [2 x i32], ptr %368, i64 0, i64 1
  %370 = load i32, ptr %369, align 4, !tbaa !5
  %371 = zext i32 %370 to i64
  %372 = load ptr, ptr %32, align 8, !tbaa !9
  %373 = getelementptr inbounds %struct.leaf_data, ptr %372, i32 0, i32 4
  %374 = load ptr, ptr %373, align 8, !tbaa !41
  %375 = load i32, ptr %13, align 4, !tbaa !5
  %376 = zext i32 %375 to i64
  %377 = getelementptr inbounds i32, ptr %374, i64 %376
  %378 = load i32, ptr %377, align 4, !tbaa !5
  %379 = zext i32 %378 to i64
  call void @UnityAssertEqualNumber(i64 noundef %371, i64 noundef %379, ptr noundef null, i64 noundef 1261, i32 noundef 148)
  br label %380

380:                                              ; preds = %328
  %381 = load i32, ptr %13, align 4, !tbaa !5
  %382 = add i32 %381, 1
  store i32 %382, ptr %13, align 4, !tbaa !5
  br label %320, !llvm.loop !42

383:                                              ; preds = %320
  %384 = load ptr, ptr %30, align 8, !tbaa !9
  %385 = getelementptr inbounds %struct.bpt_node, ptr %384, i32 0, i32 0
  %386 = load ptr, ptr %385, align 8, !tbaa !32
  %387 = getelementptr inbounds i32, ptr %386, i64 4
  %388 = load i32, ptr %387, align 4, !tbaa !5
  store i32 %388, ptr %26, align 4, !tbaa !5
  %389 = load i32, ptr %27, align 4, !tbaa !5
  %390 = add i32 %389, 1
  store i32 %390, ptr %27, align 4, !tbaa !5
  %391 = load ptr, ptr %29, align 8, !tbaa !9
  call void @free(ptr noundef %391) #7
  %392 = load ptr, ptr %30, align 8, !tbaa !9
  %393 = getelementptr inbounds %struct.bpt_node, ptr %392, i32 0, i32 0
  %394 = load ptr, ptr %393, align 8, !tbaa !32
  call void @free(ptr noundef %394) #7
  %395 = load ptr, ptr %30, align 8, !tbaa !9
  call void @free(ptr noundef %395) #7
  call void @leaf_data_free_mem(ptr noundef %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %190, !llvm.loop !43

396:                                              ; preds = %190
  %397 = load ptr, ptr %2, align 8, !tbaa !9
  %398 = call i32 @rmrf(ptr noundef %397)
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 240, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 120, 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 8, 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
}

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) #6

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 i64 @leaf_data_deserialize(ptr noundef, i64 noundef, ptr noundef) #1

declare void @leaf_data_free_mem(ptr noundef) #1

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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!17, !6, i64 8}
!17 = !{!"", !10, i64 0, !6, i64 8, !6, i64 12}
!18 = !{!19, !10, i64 0}
!19 = !{!"offset_index", !10, i64 0, !10, i64 8, !6, i64 16, !10, i64 24, !6, i64 32}
!20 = !{!21, !22, i64 0}
!21 = !{!"file_id_offset_pairs", !22, i64 0, !22, i64 8, !10, i64 16}
!22 = !{!"long", !7, i64 0}
!23 = !{!24, !10, i64 8}
!24 = !{!"chrm_index", !10, i64 0, !10, i64 8}
!25 = !{!26, !6, i64 8}
!26 = !{!"ordered_set", !10, i64 0, !6, i64 8, !6, i64 12, !10, i64 16, !10, i64 24, !10, i64 32}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !6, i64 36}
!30 = !{!"disk_store", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 36, !22, i64 40, !22, i64 48, !10, i64 56, !10, i64 64, !7, i64 72, !10, i64 80}
!31 = !{!22, !22, i64 0}
!32 = !{!33, !10, i64 0}
!33 = !{!"bpt_node", !10, i64 0}
!34 = !{!35, !22, i64 0}
!35 = !{!"leaf_data", !22, i64 0, !22, i64 8, !22, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!36 = !{!35, !22, i64 8}
!37 = !{!35, !22, i64 16}
!38 = !{!35, !10, i64 40}
!39 = distinct !{!39, !28}
!40 = !{!35, !10, i64 24}
!41 = !{!35, !10, i64 32}
!42 = distinct !{!42, !28}
!43 = distinct !{!43, !28}


; 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.5 = external hidden unnamed_addr constant [52 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
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_keys = external hidden unnamed_addr constant [6 x [5 x i32]], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_starts_ens = external hidden unnamed_addr constant [6 x [5 x [2 x i32]]], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leaf_sizes = external hidden unnamed_addr constant [6 x [3 x i32]], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_1 = external hidden unnamed_addr constant [3 x i64], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_2 = external hidden unnamed_addr constant [4 x i64], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_3 = external hidden unnamed_addr constant [3 x i64], align 16
@__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_4 = external hidden unnamed_addr constant [4 x i64], align 16

; 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

declare void @file_index_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 @offset_index_destroy(ptr noundef) local_unnamed_addr #1

declare void @chrm_index_destroy(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

; Function Attrs: nounwind uwtable
define dso_local void @test_giggle_bulk_insert_build_leaf_levels_few() 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 [3 x i64], align 16
  %10 = alloca [4 x i64], align 16
  %11 = alloca [3 x i64], align 16
  %12 = alloca [4 x i64], align 16
  %13 = alloca [5 x i64], align 16
  %14 = alloca [6 x ptr], align 16
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store i32 5, ptr @ORDER, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %1) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(144) %1, i8 0, i64 144, i1 false)
  %18 = call i32 @stat(ptr noundef nonnull @.str.5, ptr noundef nonnull %1) #10
  %19 = icmp eq i32 %18, -1
  br i1 %19, label %22, label %20

20:                                               ; preds = %0
  %21 = tail call i32 @rmrf(ptr noundef nonnull @.str.5) #10
  br label %22

22:                                               ; preds = %0, %20
  %23 = tail call i32 @mkdir(ptr noundef nonnull @.str.5, i32 noundef 448) #10
  %24 = tail call noalias dereferenceable_or_null(64) ptr @malloc(i64 noundef 64) #11
  %25 = tail call noalias ptr @strdup(ptr noundef nonnull @.str.5) #10
  %26 = getelementptr inbounds i8, ptr %24, i64 48
  store ptr %25, ptr %26, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %24, i64 24
  store ptr null, ptr %27, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #10
  store ptr null, ptr %2, align 8, !tbaa !13
  %28 = call i32 @giggle_bulk_insert_open_files(ptr noundef nonnull @.str.4, ptr noundef %25, ptr noundef nonnull %2, ptr noundef nonnull %27) #10
  %29 = zext i32 %28 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %29, ptr noundef null, i64 noundef 1109, i32 noundef 148) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #10
  store ptr null, ptr %3, align 8, !tbaa !13
  %30 = load ptr, ptr %26, align 8, !tbaa !9
  %31 = load ptr, ptr @OFFSET_INDEX_FILE_NAME, align 8, !tbaa !13
  %32 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.2, ptr noundef %30, ptr noundef %31) #10
  %33 = load ptr, ptr %3, align 8, !tbaa !13
  %34 = call ptr @offset_index_init(i32 noundef 1000, ptr noundef %33) #10
  %35 = getelementptr inbounds i8, ptr %24, i64 32
  store ptr %34, ptr %35, align 8, !tbaa !14
  %36 = load ptr, ptr %3, align 8, !tbaa !13
  call void @free(ptr noundef %36) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  store ptr null, ptr %4, align 8, !tbaa !13
  %37 = load ptr, ptr %26, align 8, !tbaa !9
  %38 = load ptr, ptr @CHRM_INDEX_FILE_NAME, align 8, !tbaa !13
  %39 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %4, ptr noundef nonnull @.str.2, ptr noundef %37, ptr noundef %38) #10
  %40 = load ptr, ptr %4, align 8, !tbaa !13
  %41 = call ptr @chrm_index_init(i32 noundef 24, ptr noundef %40) #10
  %42 = getelementptr inbounds i8, ptr %24, i64 16
  store ptr %41, ptr %42, align 8, !tbaa !15
  %43 = load ptr, ptr %4, align 8, !tbaa !13
  call void @free(ptr noundef %43) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %44 = call ptr @priq_new(i32 noundef %28) #10
  store ptr %44, ptr %5, align 8, !tbaa !13
  %45 = shl nuw nsw i64 %29, 4
  %46 = call noalias ptr @malloc(i64 noundef %45) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  %47 = call ptr @priq_new(i32 noundef %28) #10
  store ptr %47, ptr %6, align 8, !tbaa !13
  %48 = load ptr, ptr %2, align 8, !tbaa !13
  call void @giggle_bulk_insert_prime_pqs(ptr noundef %24, ptr noundef nonnull %5, ptr noundef %46, ptr noundef nonnull %6, ptr noundef %48, i32 noundef %28) #10
  %49 = load ptr, ptr %5, align 8, !tbaa !13
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = load i32, ptr %50, align 8, !tbaa !16
  %52 = add nsw i32 %51, -1
  %53 = sext i32 %52 to i64
  call void @UnityAssertEqualNumber(i64 noundef %29, i64 noundef %53, ptr noundef null, i64 noundef 1145, i32 noundef 148) #10
  %54 = load ptr, ptr %6, align 8, !tbaa !13
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = load i32, ptr %55, align 8, !tbaa !16
  %57 = add nsw i32 %56, -1
  %58 = sext i32 %57 to i64
  call void @UnityAssertEqualNumber(i64 noundef %29, i64 noundef %58, ptr noundef null, i64 noundef 1146, i32 noundef 148) #10
  %59 = load ptr, ptr %2, align 8, !tbaa !13
  call void @giggle_bulk_insert_build_leaf_levels(ptr noundef %24, ptr noundef nonnull %5, ptr noundef %46, ptr noundef nonnull %6, ptr noundef %59, i32 noundef %28) #10
  %60 = load ptr, ptr %35, align 8, !tbaa !14
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = load i64, ptr %61, align 8, !tbaa !20
  call void @UnityAssertEqualNumber(i64 noundef 16, i64 noundef %62, ptr noundef null, i64 noundef 1155, i32 noundef 148) #10
  %63 = load ptr, ptr %42, align 8, !tbaa !15
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !23
  %66 = getelementptr inbounds i8, ptr %65, i64 8
  %67 = load i32, ptr %66, align 8, !tbaa !25
  %68 = zext i32 %67 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %68, ptr noundef null, i64 noundef 1156, i32 noundef 148) #10
  %69 = load ptr, ptr %5, align 8, !tbaa !13
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i32, ptr %70, align 8, !tbaa !16
  %72 = add nsw i32 %71, -1
  %73 = sext i32 %72 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %73, ptr noundef null, i64 noundef 1158, i32 noundef 148) #10
  %74 = load ptr, ptr %6, align 8, !tbaa !13
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  %76 = load i32, ptr %75, align 8, !tbaa !16
  %77 = add nsw i32 %76, -1
  %78 = sext i32 %77 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %78, ptr noundef null, i64 noundef 1159, i32 noundef 148) #10
  %.not85 = icmp eq i32 %28, 0
  br i1 %.not85, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %22, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %22 ]
  %79 = load ptr, ptr %2, align 8, !tbaa !13
  %80 = getelementptr inbounds ptr, ptr %79, i64 %indvars.iv
  call void @input_file_destroy(ptr noundef %80) #10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %29
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !27

._crit_edge:                                      ; preds = %.lr.ph, %22
  %81 = load ptr, ptr %2, align 8, !tbaa !13
  call void @free(ptr noundef %81) #10
  call void @free(ptr noundef %46) #10
  %82 = load ptr, ptr %5, align 8, !tbaa !13
  call void @priq_free(ptr noundef %82) #10
  %83 = load ptr, ptr %6, align 8, !tbaa !13
  call void @priq_free(ptr noundef %83) #10
  %84 = load ptr, ptr %26, align 8, !tbaa !9
  call void @free(ptr noundef %84) #10
  call void @file_index_destroy(ptr noundef nonnull %27) #10
  call void @offset_index_destroy(ptr noundef nonnull %35) #10
  call void @chrm_index_destroy(ptr noundef nonnull %42) #10
  call void @free(ptr noundef %24) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  store ptr null, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  store ptr null, ptr %8, align 8, !tbaa !13
  %85 = load ptr, ptr @CACHE_FILE_NAME_PREFIX, align 8, !tbaa !13
  %86 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.5, ptr noundef %85) #10
  %87 = load ptr, ptr @CACHE_FILE_NAME_PREFIX, align 8, !tbaa !13
  %88 = call i32 (ptr, ptr, ...) @asprintf(ptr noundef nonnull %8, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.5, ptr noundef %87) #10
  %89 = load ptr, ptr %7, align 8, !tbaa !13
  %90 = load ptr, ptr %8, align 8, !tbaa !13
  %91 = call ptr @disk_store_load(ptr noundef null, ptr noundef %89, ptr noundef null, ptr noundef %90) #10
  %92 = getelementptr inbounds i8, ptr %91, i64 36
  %93 = load i32, ptr %92, align 4, !tbaa !29
  %94 = zext i32 %93 to i64
  call void @UnityAssertEqualNumber(i64 noundef 12, i64 noundef %94, ptr noundef null, i64 noundef 1191, i32 noundef 148) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %9, ptr noundef nonnull align 16 dereferenceable(24) @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_1, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %10, ptr noundef nonnull align 16 dereferenceable(32) @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_2, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %11, ptr noundef nonnull align 16 dereferenceable(24) @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_3, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %12, ptr noundef nonnull align 16 dereferenceable(32) @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leading_vals_4, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %13, i8 0, i64 16, i1 false)
  %95 = getelementptr inbounds i8, ptr %13, i64 8
  store i64 1, ptr %95, align 8
  %96 = getelementptr inbounds i8, ptr %13, i64 16
  store i64 2, ptr %96, align 16
  %97 = getelementptr inbounds i8, ptr %13, i64 24
  store i64 14, ptr %97, align 8
  %98 = getelementptr inbounds i8, ptr %13, i64 32
  store i64 15, ptr %98, align 16
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %14) #10
  store ptr null, ptr %14, align 16, !tbaa !13
  %99 = getelementptr inbounds i8, ptr %14, i64 8
  store ptr %9, ptr %99, align 8, !tbaa !13
  %100 = getelementptr inbounds i8, ptr %14, i64 16
  store ptr %10, ptr %100, align 16, !tbaa !13
  %101 = getelementptr inbounds i8, ptr %14, i64 24
  store ptr %11, ptr %101, align 8, !tbaa !13
  %102 = getelementptr inbounds i8, ptr %14, i64 32
  store ptr %12, ptr %102, align 16, !tbaa !13
  %103 = getelementptr inbounds i8, ptr %14, i64 40
  store ptr %13, ptr %103, align 8, !tbaa !13
  br label %104

104:                                              ; preds = %._crit_edge, %._crit_edge82
  %.084 = phi i32 [ 0, %._crit_edge ], [ %230, %._crit_edge82 ]
  %.07383 = phi i32 [ 1, %._crit_edge ], [ %229, %._crit_edge82 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  %105 = add i32 %.07383, -1
  %106 = call ptr @disk_store_get(ptr noundef %91, i32 noundef %105, ptr noundef nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #10
  %107 = load i64, ptr %15, align 8, !tbaa !31
  %108 = call i64 @bpt_node_deserialize(ptr noundef %106, i64 noundef %107, ptr noundef nonnull %16) #10
  call void @free(ptr noundef %106) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  %109 = load ptr, ptr %16, align 8, !tbaa !13
  %110 = load ptr, ptr %109, align 8, !tbaa !32
  %111 = load i32, ptr @ORDER, align 4, !tbaa !5
  %112 = add i32 %111, 7
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr %110, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = add i32 %115, -1
  %117 = call ptr @disk_store_get(ptr noundef %91, i32 noundef %116, ptr noundef nonnull %15) #10
  %118 = load i64, ptr %15, align 8, !tbaa !31
  %119 = call i64 @leaf_data_deserialize(ptr noundef %117, i64 noundef %118, ptr noundef nonnull %17) #10
  %120 = zext i32 %.07383 to i64
  %121 = load ptr, ptr %16, align 8, !tbaa !13
  %122 = load ptr, ptr %121, align 8, !tbaa !32
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = zext i32 %123 to i64
  call void @UnityAssertEqualNumber(i64 noundef %120, i64 noundef %124, ptr noundef null, i64 noundef 1237, i32 noundef 148) #10
  %125 = add i32 %.07383, 1
  %126 = zext i32 %125 to i64
  %127 = load ptr, ptr %16, align 8, !tbaa !13
  %128 = load ptr, ptr %127, align 8, !tbaa !32
  %129 = load i32, ptr @ORDER, align 4, !tbaa !5
  %130 = add i32 %129, 7
  %131 = zext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %128, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = zext i32 %133 to i64
  call void @UnityAssertEqualNumber(i64 noundef %126, i64 noundef %134, ptr noundef null, i64 noundef 1238, i32 noundef 148) #10
  %135 = icmp ult i32 %.07383, 11
  br i1 %135, label %136, label %144

136:                                              ; preds = %104
  %137 = add nuw nsw i32 %.07383, 2
  %138 = zext nneg i32 %137 to i64
  %139 = load ptr, ptr %16, align 8, !tbaa !13
  %140 = load ptr, ptr %139, align 8, !tbaa !32
  %141 = getelementptr inbounds i8, ptr %140, i64 16
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = zext i32 %142 to i64
  call void @UnityAssertEqualNumber(i64 noundef %138, i64 noundef %143, ptr noundef null, i64 noundef 1240, i32 noundef 148) #10
  br label %150

144:                                              ; preds = %104
  %145 = load ptr, ptr %16, align 8, !tbaa !13
  %146 = load ptr, ptr %145, align 8, !tbaa !32
  %147 = getelementptr inbounds i8, ptr %146, i64 16
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = zext i32 %148 to i64
  call void @UnityAssertEqualNumber(i64 noundef 0, i64 noundef %149, ptr noundef null, i64 noundef 1242, i32 noundef 148) #10
  br label %150

150:                                              ; preds = %144, %136
  %151 = load ptr, ptr %16, align 8, !tbaa !13
  %152 = load ptr, ptr %151, align 8, !tbaa !32
  %153 = getelementptr inbounds i8, ptr %152, i64 20
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = zext i32 %154 to i64
  call void @UnityAssertEqualNumber(i64 noundef 5, i64 noundef %155, ptr noundef null, i64 noundef 1245, i32 noundef 148) #10
  %156 = zext i32 %.084 to i64
  %157 = getelementptr inbounds [6 x [3 x i32]], ptr @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_leaf_sizes, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = zext i32 %158 to i64
  %160 = load ptr, ptr %17, align 8, !tbaa !13
  %161 = load i64, ptr %160, align 8, !tbaa !34
  call void @UnityAssertEqualNumber(i64 noundef %159, i64 noundef %161, ptr noundef null, i64 noundef 1247, i32 noundef 148) #10
  %162 = getelementptr inbounds i8, ptr %157, i64 4
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = zext i32 %163 to i64
  %165 = load ptr, ptr %17, align 8, !tbaa !13
  %166 = getelementptr inbounds i8, ptr %165, i64 8
  %167 = load i64, ptr %166, align 8, !tbaa !36
  call void @UnityAssertEqualNumber(i64 noundef %164, i64 noundef %167, ptr noundef null, i64 noundef 1248, i32 noundef 148) #10
  %168 = getelementptr inbounds i8, ptr %157, i64 8
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = zext i32 %169 to i64
  %171 = load ptr, ptr %17, align 8, !tbaa !13
  %172 = getelementptr inbounds i8, ptr %171, i64 16
  %173 = load i64, ptr %172, align 8, !tbaa !37
  call void @UnityAssertEqualNumber(i64 noundef %170, i64 noundef %173, ptr noundef null, i64 noundef 1249, i32 noundef 148) #10
  %174 = load ptr, ptr %17, align 8, !tbaa !13
  %175 = load i64, ptr %174, align 8, !tbaa !34
  %.not86 = icmp eq i64 %175, 0
  br i1 %.not86, label %.preheader, label %.lr.ph79

.lr.ph79:                                         ; preds = %150
  %176 = getelementptr inbounds [6 x ptr], ptr %14, i64 0, i64 %156
  %177 = load ptr, ptr %176, align 8, !tbaa !13
  br label %182

.preheader:                                       ; preds = %182, %150
  %178 = load ptr, ptr %16, align 8, !tbaa !13
  %179 = load ptr, ptr %178, align 8, !tbaa !32
  %180 = getelementptr inbounds i8, ptr %179, i64 20
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %.not87 = icmp eq i32 %181, 0
  br i1 %.not87, label %._crit_edge82, label %.lr.ph81

182:                                              ; preds = %.lr.ph79, %182
  %183 = phi ptr [ %174, %.lr.ph79 ], [ %193, %182 ]
  %184 = phi i64 [ 0, %.lr.ph79 ], [ %192, %182 ]
  %.177 = phi i32 [ 0, %.lr.ph79 ], [ %191, %182 ]
  %185 = getelementptr inbounds i64, ptr %177, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !31
  %187 = getelementptr inbounds i8, ptr %183, i64 40
  %188 = load ptr, ptr %187, align 8, !tbaa !38
  %189 = getelementptr inbounds i64, ptr %188, i64 %184
  %190 = load i64, ptr %189, align 8, !tbaa !31
  call void @UnityAssertEqualNumber(i64 noundef %186, i64 noundef %190, ptr noundef null, i64 noundef 1252, i32 noundef 148) #10
  %191 = add i32 %.177, 1
  %192 = zext i32 %191 to i64
  %193 = load ptr, ptr %17, align 8, !tbaa !13
  %194 = load i64, ptr %193, align 8, !tbaa !34
  %195 = icmp ugt i64 %194, %192
  br i1 %195, label %182, label %.preheader, !llvm.loop !39

.lr.ph81:                                         ; preds = %.preheader, %.lr.ph81
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %.lr.ph81 ], [ 0, %.preheader ]
  %196 = phi ptr [ %223, %.lr.ph81 ], [ %179, %.preheader ]
  %197 = getelementptr inbounds [6 x [5 x i32]], ptr @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_keys, i64 0, i64 %156, i64 %indvars.iv90
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds i8, ptr %196, i64 24
  %201 = getelementptr inbounds i32, ptr %200, i64 %indvars.iv90
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = zext i32 %202 to i64
  call void @UnityAssertEqualNumber(i64 noundef %199, i64 noundef %203, ptr noundef null, i64 noundef 1255, i32 noundef 148) #10
  %204 = getelementptr inbounds [6 x [5 x [2 x i32]]], ptr @__const.test_giggle_bulk_insert_build_leaf_levels_few.A_starts_ens, i64 0, i64 %156, i64 %indvars.iv90
  %205 = load i32, ptr %204, align 8, !tbaa !5
  %206 = zext i32 %205 to i64
  %207 = load ptr, ptr %17, align 8, !tbaa !13
  %208 = getelementptr inbounds i8, ptr %207, i64 24
  %209 = load ptr, ptr %208, align 8, !tbaa !40
  %210 = getelementptr inbounds i32, ptr %209, i64 %indvars.iv90
  %211 = load i32, ptr %210, align 4, !tbaa !5
  %212 = zext i32 %211 to i64
  call void @UnityAssertEqualNumber(i64 noundef %206, i64 noundef %212, ptr noundef null, i64 noundef 1258, i32 noundef 148) #10
  %213 = getelementptr inbounds i8, ptr %204, i64 4
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = zext i32 %214 to i64
  %216 = load ptr, ptr %17, align 8, !tbaa !13
  %217 = getelementptr inbounds i8, ptr %216, i64 32
  %218 = load ptr, ptr %217, align 8, !tbaa !41
  %219 = getelementptr inbounds i32, ptr %218, i64 %indvars.iv90
  %220 = load i32, ptr %219, align 4, !tbaa !5
  %221 = zext i32 %220 to i64
  call void @UnityAssertEqualNumber(i64 noundef %215, i64 noundef %221, ptr noundef null, i64 noundef 1261, i32 noundef 148) #10
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %222 = load ptr, ptr %16, align 8, !tbaa !13
  %223 = load ptr, ptr %222, align 8, !tbaa !32
  %224 = getelementptr inbounds i8, ptr %223, i64 20
  %225 = load i32, ptr %224, align 4, !tbaa !5
  %226 = zext i32 %225 to i64
  %227 = icmp ult i64 %indvars.iv.next91, %226
  br i1 %227, label %.lr.ph81, label %._crit_edge82, !llvm.loop !42

._crit_edge82:                                    ; preds = %.lr.ph81, %.preheader
  %.lcssa = phi ptr [ %179, %.preheader ], [ %223, %.lr.ph81 ]
  %228 = getelementptr inbounds i8, ptr %.lcssa, i64 16
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = add i32 %.084, 1
  call void @free(ptr noundef %117) #10
  %231 = load ptr, ptr %16, align 8, !tbaa !13
  %232 = load ptr, ptr %231, align 8, !tbaa !32
  call void @free(ptr noundef %232) #10
  %233 = load ptr, ptr %16, align 8, !tbaa !13
  call void @free(ptr noundef %233) #10
  call void @leaf_data_free_mem(ptr noundef nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  %.not = icmp eq i32 %229, 0
  br i1 %.not, label %234, label %104, !llvm.loop !43

234:                                              ; preds = %._crit_edge82
  %235 = call i32 @rmrf(ptr noundef nonnull @.str.5) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #10
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %1) #10
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #9

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 i64 @leaf_data_deserialize(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare void @leaf_data_free_mem(ptr noundef) local_unnamed_addr #1

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #10 = { nounwind }
attributes #11 = { 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, !11, i64 48}
!10 = !{!"giggle_index", !11, i64 0, !6, i64 8, !6, i64 12, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 24}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 32}
!15 = !{!10, !11, i64 16}
!16 = !{!17, !6, i64 8}
!17 = !{!"", !11, i64 0, !6, i64 8, !6, i64 12}
!18 = !{!19, !11, i64 0}
!19 = !{!"offset_index", !11, i64 0, !11, i64 8, !6, i64 16, !11, i64 24, !6, i64 32}
!20 = !{!21, !22, i64 0}
!21 = !{!"file_id_offset_pairs", !22, i64 0, !22, i64 8, !11, i64 16}
!22 = !{!"long", !7, i64 0}
!23 = !{!24, !11, i64 8}
!24 = !{!"chrm_index", !11, i64 0, !11, i64 8}
!25 = !{!26, !6, i64 8}
!26 = !{!"ordered_set", !11, i64 0, !6, i64 8, !6, i64 12, !11, i64 16, !11, i64 24, !11, i64 32}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !6, i64 36}
!30 = !{!"disk_store", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !6, i64 36, !22, i64 40, !22, i64 48, !11, i64 56, !11, i64 64, !7, i64 72, !11, i64 80}
!31 = !{!22, !22, i64 0}
!32 = !{!33, !11, i64 0}
!33 = !{!"bpt_node", !11, i64 0}
!34 = !{!35, !22, i64 0}
!35 = !{!"leaf_data", !22, i64 0, !22, i64 8, !22, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64}
!36 = !{!35, !22, i64 8}
!37 = !{!35, !22, i64 16}
!38 = !{!35, !11, i64 40}
!39 = distinct !{!39, !28}
!40 = !{!35, !11, i64 24}
!41 = !{!35, !11, i64 32}
!42 = distinct !{!42, !28}
!43 = distinct !{!43, !28}


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