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

; 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.cache_def = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.cache_handler = type { ptr, ptr, ptr }
%struct.bpt_node = type { ptr }

@ORDER = external dso_local global i32, align 4
@cache = external dso_local global %struct.cache_def, align 8
@bpt_node_cache_handler = external dso_local global %struct.cache_handler, align 8
@uint32_t_cache_handler = external dso_local global %struct.cache_handler, align 8

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

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

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

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

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

declare ptr @bpt_new_node(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @test_bpt_split_node_root() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %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 i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %15 = call ptr @simple_cache_init(i32 noundef 5, i32 noundef 1, ptr noundef null)
  store ptr %15, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !9
  store i32 4, ptr @ORDER, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %16 = call noalias ptr @malloc(i64 noundef 4) #5
  store ptr %16, ptr %3, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  store i32 2, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %18 = call noalias ptr @malloc(i64 noundef 4) #5
  store ptr %18, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 3, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %20 = call noalias ptr @malloc(i64 noundef 4) #5
  store ptr %20, ptr %5, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 4, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %22 = call noalias ptr @malloc(i64 noundef 4) #5
  store ptr %22, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 5, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %24 = call noalias ptr @malloc(i64 noundef 4) #5
  store ptr %24, ptr %7, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 6, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %26 = load i32, ptr %2, align 4, !tbaa !9
  %27 = call ptr @bpt_new_node(i32 noundef %26)
  store ptr %27, ptr %8, align 8, !tbaa !5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.bpt_node, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds i32, ptr %30, i64 2
  store i32 1, ptr %31, align 4, !tbaa !9
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.bpt_node, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds i32, ptr %34, i64 5
  store i32 5, ptr %35, align 4, !tbaa !9
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.bpt_node, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds i32, ptr %38, i64 6
  %40 = getelementptr inbounds i32, ptr %39, i64 0
  store i32 1, ptr %40, align 4, !tbaa !9
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.bpt_node, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds i32, ptr %43, i64 6
  %45 = getelementptr inbounds i32, ptr %44, i64 1
  store i32 2, ptr %45, align 4, !tbaa !9
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.bpt_node, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds i32, ptr %48, i64 6
  %50 = getelementptr inbounds i32, ptr %49, i64 2
  store i32 3, ptr %50, align 4, !tbaa !9
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.bpt_node, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds i32, ptr %53, i64 6
  %55 = getelementptr inbounds i32, ptr %54, i64 3
  store i32 4, ptr %55, align 4, !tbaa !9
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.bpt_node, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds i32, ptr %58, i64 6
  %60 = getelementptr inbounds i32, ptr %59, i64 4
  store i32 5, ptr %60, align 4, !tbaa !9
  %61 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %62 = load i32, ptr %2, align 4, !tbaa !9
  %63 = call i32 %61(i32 noundef %62)
  %64 = add i32 %63, 1
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.bpt_node, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = load i32, ptr @ORDER, align 4, !tbaa !9
  %69 = add i32 6, %68
  %70 = add i32 %69, 2
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %67, i64 %71
  %73 = getelementptr inbounds i32, ptr %72, i64 0
  store i32 %64, ptr %73, align 4, !tbaa !9
  %74 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 2), align 8, !tbaa !15
  %75 = load i32, ptr %2, align 4, !tbaa !9
  %76 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %77 = load i32, ptr %2, align 4, !tbaa !9
  %78 = call i32 %76(i32 noundef %77)
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  call void %74(i32 noundef %75, i32 noundef %78, ptr noundef %79, i64 noundef 4, ptr noundef @uint32_t_cache_handler)
  %80 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %81 = load i32, ptr %2, align 4, !tbaa !9
  %82 = call i32 %80(i32 noundef %81)
  %83 = add i32 %82, 1
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.bpt_node, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !11
  %87 = load i32, ptr @ORDER, align 4, !tbaa !9
  %88 = add i32 6, %87
  %89 = add i32 %88, 2
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %86, i64 %90
  %92 = getelementptr inbounds i32, ptr %91, i64 1
  store i32 %83, ptr %92, align 4, !tbaa !9
  %93 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 2), align 8, !tbaa !15
  %94 = load i32, ptr %2, align 4, !tbaa !9
  %95 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %96 = load i32, ptr %2, align 4, !tbaa !9
  %97 = call i32 %95(i32 noundef %96)
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  call void %93(i32 noundef %94, i32 noundef %97, ptr noundef %98, i64 noundef 4, ptr noundef @uint32_t_cache_handler)
  %99 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %100 = load i32, ptr %2, align 4, !tbaa !9
  %101 = call i32 %99(i32 noundef %100)
  %102 = add i32 %101, 1
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.bpt_node, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !11
  %106 = load i32, ptr @ORDER, align 4, !tbaa !9
  %107 = add i32 6, %106
  %108 = add i32 %107, 2
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds i32, ptr %105, i64 %109
  %111 = getelementptr inbounds i32, ptr %110, i64 2
  store i32 %102, ptr %111, align 4, !tbaa !9
  %112 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 2), align 8, !tbaa !15
  %113 = load i32, ptr %2, align 4, !tbaa !9
  %114 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %115 = load i32, ptr %2, align 4, !tbaa !9
  %116 = call i32 %114(i32 noundef %115)
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  call void %112(i32 noundef %113, i32 noundef %116, ptr noundef %117, i64 noundef 4, ptr noundef @uint32_t_cache_handler)
  %118 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %119 = load i32, ptr %2, align 4, !tbaa !9
  %120 = call i32 %118(i32 noundef %119)
  %121 = add i32 %120, 1
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.bpt_node, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !11
  %125 = load i32, ptr @ORDER, align 4, !tbaa !9
  %126 = add i32 6, %125
  %127 = add i32 %126, 2
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds i32, ptr %124, i64 %128
  %130 = getelementptr inbounds i32, ptr %129, i64 3
  store i32 %121, ptr %130, align 4, !tbaa !9
  %131 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 2), align 8, !tbaa !15
  %132 = load i32, ptr %2, align 4, !tbaa !9
  %133 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %134 = load i32, ptr %2, align 4, !tbaa !9
  %135 = call i32 %133(i32 noundef %134)
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  call void %131(i32 noundef %132, i32 noundef %135, ptr noundef %136, i64 noundef 4, ptr noundef @uint32_t_cache_handler)
  %137 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %138 = load i32, ptr %2, align 4, !tbaa !9
  %139 = call i32 %137(i32 noundef %138)
  %140 = add i32 %139, 1
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.bpt_node, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  %144 = load i32, ptr @ORDER, align 4, !tbaa !9
  %145 = add i32 6, %144
  %146 = add i32 %145, 2
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds i32, ptr %143, i64 %147
  %149 = getelementptr inbounds i32, ptr %148, i64 4
  store i32 %140, ptr %149, align 4, !tbaa !9
  %150 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 2), align 8, !tbaa !15
  %151 = load i32, ptr %2, align 4, !tbaa !9
  %152 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 1), align 8, !tbaa !13
  %153 = load i32, ptr %2, align 4, !tbaa !9
  %154 = call i32 %152(i32 noundef %153)
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  call void %150(i32 noundef %151, i32 noundef %154, ptr noundef %155, i64 noundef 4, ptr noundef @uint32_t_cache_handler)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %156 = load i32, ptr %2, align 4, !tbaa !9
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.bpt_node, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !11
  %160 = getelementptr inbounds i32, ptr %159, i64 0
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.bpt_node, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = getelementptr inbounds i32, ptr %164, i64 0
  %166 = load i32, ptr %165, align 4, !tbaa !9
  %167 = call i32 @bpt_split_node(i32 noundef %156, i32 noundef %161, i32 noundef %166, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef null)
  store i32 %167, ptr %12, align 4, !tbaa !9
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.bpt_node, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !11
  %171 = getelementptr inbounds i32, ptr %170, i64 0
  %172 = load i32, ptr %171, align 4, !tbaa !9
  %173 = zext i32 %172 to i64
  %174 = load i32, ptr %9, align 4, !tbaa !9
  %175 = zext i32 %174 to i64
  call void @UnityAssertEqualNumber(i64 noundef %173, i64 noundef %175, ptr noundef null, i64 noundef 469, i32 noundef 148)
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.bpt_node, ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !11
  %179 = getelementptr inbounds i32, ptr %178, i64 4
  %180 = load i32, ptr %179, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = load i32, ptr %10, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  call void @UnityAssertEqualNumber(i64 noundef %181, i64 noundef %183, ptr noundef null, i64 noundef 470, i32 noundef 148)
  %184 = load i32, ptr %11, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %185, ptr noundef null, i64 noundef 471, i32 noundef 148)
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.bpt_node, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !11
  %189 = getelementptr inbounds i32, ptr %188, i64 5
  %190 = load i32, ptr %189, align 4, !tbaa !9
  %191 = zext i32 %190 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %191, ptr noundef null, i64 noundef 474, i32 noundef 148)
  %192 = load ptr, ptr %8, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.bpt_node, ptr %192, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !11
  %195 = getelementptr inbounds i32, ptr %194, i64 2
  %196 = load i32, ptr %195, align 4, !tbaa !9
  %197 = zext i32 %196 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %197, ptr noundef null, i64 noundef 475, i32 noundef 148)
  %198 = load i32, ptr %12, align 4, !tbaa !9
  %199 = zext i32 %198 to i64
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.bpt_node, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !11
  %203 = getelementptr inbounds i32, ptr %202, i64 1
  %204 = load i32, ptr %203, align 4, !tbaa !9
  %205 = zext i32 %204 to i64
  call void @UnityAssertEqualNumber(i64 noundef %199, i64 noundef %205, ptr noundef null, i64 noundef 476, i32 noundef 148)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %206 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 3), align 8, !tbaa !16
  %207 = load i32, ptr %2, align 4, !tbaa !9
  %208 = load ptr, ptr %8, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.bpt_node, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !11
  %211 = getelementptr inbounds i32, ptr %210, i64 4
  %212 = load i32, ptr %211, align 4, !tbaa !9
  %213 = sub i32 %212, 1
  %214 = call ptr %206(i32 noundef %207, i32 noundef %213, ptr noundef @bpt_node_cache_handler)
  store ptr %214, ptr %13, align 8, !tbaa !5
  %215 = load ptr, ptr %13, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.bpt_node, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8, !tbaa !11
  %218 = getelementptr inbounds i32, ptr %217, i64 5
  %219 = load i32, ptr %218, align 4, !tbaa !9
  %220 = zext i32 %219 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %220, ptr noundef null, i64 noundef 481, i32 noundef 148)
  %221 = load i32, ptr %12, align 4, !tbaa !9
  %222 = zext i32 %221 to i64
  %223 = load ptr, ptr %13, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.bpt_node, ptr %223, i32 0, i32 0
  %225 = load ptr, ptr %224, align 8, !tbaa !11
  %226 = getelementptr inbounds i32, ptr %225, i64 1
  %227 = load i32, ptr %226, align 4, !tbaa !9
  %228 = zext i32 %227 to i64
  call void @UnityAssertEqualNumber(i64 noundef %222, i64 noundef %228, ptr noundef null, i64 noundef 482, i32 noundef 148)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %229 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 3), align 8, !tbaa !16
  %230 = load i32, ptr %2, align 4, !tbaa !9
  %231 = load i32, ptr %12, align 4, !tbaa !9
  %232 = sub i32 %231, 1
  %233 = call ptr %229(i32 noundef %230, i32 noundef %232, ptr noundef @bpt_node_cache_handler)
  store ptr %233, ptr %14, align 8, !tbaa !5
  %234 = load ptr, ptr %14, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.bpt_node, ptr %234, i32 0, i32 0
  %236 = load ptr, ptr %235, align 8, !tbaa !11
  %237 = getelementptr inbounds i32, ptr %236, i64 5
  %238 = load i32, ptr %237, align 4, !tbaa !9
  %239 = zext i32 %238 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %239, ptr noundef null, i64 noundef 487, i32 noundef 148)
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.bpt_node, ptr %240, i32 0, i32 0
  %242 = load ptr, ptr %241, align 8, !tbaa !11
  %243 = getelementptr inbounds i32, ptr %242, i64 6
  %244 = getelementptr inbounds i32, ptr %243, i64 0
  %245 = load i32, ptr %244, align 4, !tbaa !9
  %246 = zext i32 %245 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %246, ptr noundef null, i64 noundef 488, i32 noundef 148)
  %247 = load i32, ptr %9, align 4, !tbaa !9
  %248 = zext i32 %247 to i64
  %249 = load ptr, ptr %14, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.bpt_node, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !11
  %252 = load i32, ptr @ORDER, align 4, !tbaa !9
  %253 = add i32 6, %252
  %254 = add i32 %253, 2
  %255 = zext i32 %254 to i64
  %256 = getelementptr inbounds i32, ptr %251, i64 %255
  %257 = getelementptr inbounds i32, ptr %256, i64 0
  %258 = load i32, ptr %257, align 4, !tbaa !9
  %259 = zext i32 %258 to i64
  call void @UnityAssertEqualNumber(i64 noundef %248, i64 noundef %259, ptr noundef null, i64 noundef 489, i32 noundef 148)
  %260 = load i32, ptr %10, align 4, !tbaa !9
  %261 = zext i32 %260 to i64
  %262 = load ptr, ptr %14, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.bpt_node, ptr %262, i32 0, i32 0
  %264 = load ptr, ptr %263, align 8, !tbaa !11
  %265 = load i32, ptr @ORDER, align 4, !tbaa !9
  %266 = add i32 6, %265
  %267 = add i32 %266, 2
  %268 = zext i32 %267 to i64
  %269 = getelementptr inbounds i32, ptr %264, i64 %268
  %270 = getelementptr inbounds i32, ptr %269, i64 1
  %271 = load i32, ptr %270, align 4, !tbaa !9
  %272 = zext i32 %271 to i64
  call void @UnityAssertEqualNumber(i64 noundef %261, i64 noundef %272, ptr noundef null, i64 noundef 490, i32 noundef 148)
  %273 = load ptr, ptr getelementptr inbounds (%struct.cache_def, ptr @cache, i32 0, i32 6), align 8, !tbaa !17
  call void (...) %273()
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  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 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"bpt_node", !6, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"cache_def", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!15 = !{!14, !6, i64 16}
!16 = !{!14, !6, i64 24}
!17 = !{!14, !6, i64 48}


; 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.cache_def = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.cache_handler = type { ptr, ptr, ptr }

@ORDER = external dso_local local_unnamed_addr global i32, align 4
@cache = external dso_local local_unnamed_addr global %struct.cache_def, align 8
@bpt_node_cache_handler = external dso_local global %struct.cache_handler, align 8
@uint32_t_cache_handler = external dso_local global %struct.cache_handler, align 8

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

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

; 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

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

declare ptr @bpt_new_node(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @test_bpt_split_node_root() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call ptr @simple_cache_init(i32 noundef 5, i32 noundef 1, ptr noundef null) #4
  store i32 4, ptr @ORDER, align 4, !tbaa !5
  %5 = tail call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #5
  store i32 2, ptr %5, align 4, !tbaa !5
  %6 = tail call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #5
  store i32 3, ptr %6, align 4, !tbaa !5
  %7 = tail call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #5
  store i32 4, ptr %7, align 4, !tbaa !5
  %8 = tail call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #5
  store i32 5, ptr %8, align 4, !tbaa !5
  %9 = tail call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #5
  store i32 6, ptr %9, align 4, !tbaa !5
  %10 = tail call ptr @bpt_new_node(i32 noundef 0) #4
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  store i32 1, ptr %12, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %11, i64 20
  store <4 x i32> <i32 5, i32 1, i32 2, i32 3>, ptr %13, align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %11, i64 36
  store i32 4, ptr %14, align 4, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %11, i64 40
  store i32 5, ptr %15, align 4, !tbaa !5
  %16 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %17 = tail call i32 %16(i32 noundef 0) #4
  %18 = add i32 %17, 1
  %19 = load ptr, ptr %10, align 8, !tbaa !9
  %20 = load i32, ptr @ORDER, align 4, !tbaa !5
  %21 = add i32 %20, 8
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds i32, ptr %19, i64 %22
  store i32 %18, ptr %23, align 4, !tbaa !5
  %24 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 16), align 8, !tbaa !14
  %25 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %26 = tail call i32 %25(i32 noundef 0) #4
  tail call void %24(i32 noundef 0, i32 noundef %26, ptr noundef nonnull %5, i64 noundef 4, ptr noundef nonnull @uint32_t_cache_handler) #4
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %28 = tail call i32 %27(i32 noundef 0) #4
  %29 = add i32 %28, 1
  %30 = load ptr, ptr %10, align 8, !tbaa !9
  %31 = load i32, ptr @ORDER, align 4, !tbaa !5
  %32 = add i32 %31, 8
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds i32, ptr %30, i64 %33
  %35 = getelementptr inbounds i8, ptr %34, i64 4
  store i32 %29, ptr %35, align 4, !tbaa !5
  %36 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 16), align 8, !tbaa !14
  %37 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %38 = tail call i32 %37(i32 noundef 0) #4
  tail call void %36(i32 noundef 0, i32 noundef %38, ptr noundef nonnull %6, i64 noundef 4, ptr noundef nonnull @uint32_t_cache_handler) #4
  %39 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %40 = tail call i32 %39(i32 noundef 0) #4
  %41 = add i32 %40, 1
  %42 = load ptr, ptr %10, align 8, !tbaa !9
  %43 = load i32, ptr @ORDER, align 4, !tbaa !5
  %44 = add i32 %43, 8
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %42, i64 %45
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  store i32 %41, ptr %47, align 4, !tbaa !5
  %48 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 16), align 8, !tbaa !14
  %49 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %50 = tail call i32 %49(i32 noundef 0) #4
  tail call void %48(i32 noundef 0, i32 noundef %50, ptr noundef nonnull %7, i64 noundef 4, ptr noundef nonnull @uint32_t_cache_handler) #4
  %51 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %52 = tail call i32 %51(i32 noundef 0) #4
  %53 = add i32 %52, 1
  %54 = load ptr, ptr %10, align 8, !tbaa !9
  %55 = load i32, ptr @ORDER, align 4, !tbaa !5
  %56 = add i32 %55, 8
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %54, i64 %57
  %59 = getelementptr inbounds i8, ptr %58, i64 12
  store i32 %53, ptr %59, align 4, !tbaa !5
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 16), align 8, !tbaa !14
  %61 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %62 = tail call i32 %61(i32 noundef 0) #4
  tail call void %60(i32 noundef 0, i32 noundef %62, ptr noundef nonnull %8, i64 noundef 4, ptr noundef nonnull @uint32_t_cache_handler) #4
  %63 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %64 = tail call i32 %63(i32 noundef 0) #4
  %65 = add i32 %64, 1
  %66 = load ptr, ptr %10, align 8, !tbaa !9
  %67 = load i32, ptr @ORDER, align 4, !tbaa !5
  %68 = add i32 %67, 8
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %66, i64 %69
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  store i32 %65, ptr %71, align 4, !tbaa !5
  %72 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 16), align 8, !tbaa !14
  %73 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 8), align 8, !tbaa !12
  %74 = tail call i32 %73(i32 noundef 0) #4
  tail call void %72(i32 noundef 0, i32 noundef %74, ptr noundef nonnull %9, i64 noundef 4, ptr noundef nonnull @uint32_t_cache_handler) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %75 = load ptr, ptr %10, align 8, !tbaa !9
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = call i32 @bpt_split_node(i32 noundef 0, i32 noundef %76, i32 noundef %76, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef null) #4
  %78 = load ptr, ptr %10, align 8, !tbaa !9
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = zext i32 %79 to i64
  %81 = load i32, ptr %1, align 4, !tbaa !5
  %82 = zext i32 %81 to i64
  call void @UnityAssertEqualNumber(i64 noundef %80, i64 noundef %82, ptr noundef null, i64 noundef 469, i32 noundef 148) #4
  %83 = load ptr, ptr %10, align 8, !tbaa !9
  %84 = getelementptr inbounds i8, ptr %83, i64 16
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = zext i32 %85 to i64
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = zext i32 %87 to i64
  call void @UnityAssertEqualNumber(i64 noundef %86, i64 noundef %88, ptr noundef null, i64 noundef 470, i32 noundef 148) #4
  %89 = load i32, ptr %3, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %90, ptr noundef null, i64 noundef 471, i32 noundef 148) #4
  %91 = load ptr, ptr %10, align 8, !tbaa !9
  %92 = getelementptr inbounds i8, ptr %91, i64 20
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = zext i32 %93 to i64
  call void @UnityAssertEqualNumber(i64 noundef 2, i64 noundef %94, ptr noundef null, i64 noundef 474, i32 noundef 148) #4
  %95 = load ptr, ptr %10, align 8, !tbaa !9
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = zext i32 %97 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %98, ptr noundef null, i64 noundef 475, i32 noundef 148) #4
  %99 = zext i32 %77 to i64
  %100 = load ptr, ptr %10, align 8, !tbaa !9
  %101 = getelementptr inbounds i8, ptr %100, i64 4
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = zext i32 %102 to i64
  call void @UnityAssertEqualNumber(i64 noundef %99, i64 noundef %103, ptr noundef null, i64 noundef 476, i32 noundef 148) #4
  %104 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 24), align 8, !tbaa !15
  %105 = load ptr, ptr %10, align 8, !tbaa !9
  %106 = getelementptr inbounds i8, ptr %105, i64 16
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = add i32 %107, -1
  %109 = call ptr %104(i32 noundef 0, i32 noundef %108, ptr noundef nonnull @bpt_node_cache_handler) #4
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds i8, ptr %110, i64 20
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = zext i32 %112 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %113, ptr noundef null, i64 noundef 481, i32 noundef 148) #4
  %114 = load ptr, ptr %109, align 8, !tbaa !9
  %115 = getelementptr inbounds i8, ptr %114, i64 4
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = zext i32 %116 to i64
  call void @UnityAssertEqualNumber(i64 noundef %99, i64 noundef %117, ptr noundef null, i64 noundef 482, i32 noundef 148) #4
  %118 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 24), align 8, !tbaa !15
  %119 = add i32 %77, -1
  %120 = call ptr %118(i32 noundef 0, i32 noundef %119, ptr noundef nonnull @bpt_node_cache_handler) #4
  %121 = load ptr, ptr %120, align 8, !tbaa !9
  %122 = getelementptr inbounds i8, ptr %121, i64 20
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = zext i32 %123 to i64
  call void @UnityAssertEqualNumber(i64 noundef 1, i64 noundef %124, ptr noundef null, i64 noundef 487, i32 noundef 148) #4
  %125 = load ptr, ptr %120, align 8, !tbaa !9
  %126 = getelementptr inbounds i8, ptr %125, i64 24
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = zext i32 %127 to i64
  call void @UnityAssertEqualNumber(i64 noundef 3, i64 noundef %128, ptr noundef null, i64 noundef 488, i32 noundef 148) #4
  %129 = load i32, ptr %1, align 4, !tbaa !5
  %130 = zext i32 %129 to i64
  %131 = load ptr, ptr %120, align 8, !tbaa !9
  %132 = load i32, ptr @ORDER, align 4, !tbaa !5
  %133 = add i32 %132, 8
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds i32, ptr %131, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = zext i32 %136 to i64
  call void @UnityAssertEqualNumber(i64 noundef %130, i64 noundef %137, ptr noundef null, i64 noundef 489, i32 noundef 148) #4
  %138 = load i32, ptr %2, align 4, !tbaa !5
  %139 = zext i32 %138 to i64
  %140 = load ptr, ptr %120, align 8, !tbaa !9
  %141 = load i32, ptr @ORDER, align 4, !tbaa !5
  %142 = add i32 %141, 8
  %143 = zext i32 %142 to i64
  %144 = getelementptr inbounds i32, ptr %140, i64 %143
  %145 = getelementptr inbounds i8, ptr %144, i64 4
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = zext i32 %146 to i64
  call void @UnityAssertEqualNumber(i64 noundef %139, i64 noundef %147, ptr noundef null, i64 noundef 490, i32 noundef 148) #4
  %148 = load ptr, ptr getelementptr inbounds (i8, ptr @cache, i64 48), align 8, !tbaa !16
  call void (...) %148() #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  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 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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 0}
!10 = !{!"bpt_node", !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !11, i64 8}
!13 = !{!"cache_def", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48}
!14 = !{!13, !11, i64 16}
!15 = !{!13, !11, i64 24}
!16 = !{!13, !11, i64 48}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass