; LLVM IR from zig-gamedev/zphysics :: libs/JoltC (JoltPhysicsC_Tests)

; 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.BufferStreamOutImpl = type { ptr, ptr, i64, i8 }
%struct.BufferStreamInImpl = type { ptr, ptr, i64, i64, i8 }

@__const.JoltCTest_Serialization.half_extent = external hidden unnamed_addr constant [3 x float], align 4
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@__PRETTY_FUNCTION__.JoltCTest_Serialization = external hidden unnamed_addr constant [39 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [66 x i8], align 1
@__const.JoltCTest_Serialization.translation = external hidden unnamed_addr constant [3 x float], align 4
@.str.4 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [66 x i8], align 1
@__const.JoltCTest_Serialization.translation.7 = external hidden unnamed_addr constant [3 x float], align 4
@__const.JoltCTest_Serialization.half_extent_alt = external hidden unnamed_addr constant [3 x float], align 4
@.str.8 = external hidden unnamed_addr constant [70 x i8], align 1

declare void @JPC_RegisterDefaultAllocator() #0

declare void @JPC_CreateFactory() #0

declare void @JPC_RegisterTypes() #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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) #2

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

declare ptr @JPC_BoxShapeSettings_Create(ptr noundef) #0

declare ptr @JPC_ShapeSettings_CreateShape(ptr noundef) #0

declare zeroext i8 @JPC_Shape_GetSubType(ptr noundef) #0

declare void @JPC_DestroyFactory() #0

declare ptr @JPC_TempAllocator_Create(i32 noundef) #0

declare void @JPC_TempAllocator_Destroy(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @JoltCTest_Serialization() #3 {
  %1 = alloca ptr, align 8
  %2 = alloca [3 x float], align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.BufferStreamOutImpl, align 8
  %6 = alloca %struct.BufferStreamInImpl, align 8
  %7 = alloca ptr, align 8
  %8 = alloca [3 x float], align 4
  %9 = alloca [3 x float], align 4
  %10 = alloca %struct.BufferStreamOutImpl, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [4 x float], align 4
  %14 = alloca ptr, align 8
  %15 = alloca %struct.BufferStreamInImpl, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca [3 x float], align 4
  %20 = alloca [3 x float], align 4
  %21 = alloca %struct.BufferStreamOutImpl, align 8
  %22 = alloca [3 x float], align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca [4 x float], align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca %struct.BufferStreamInImpl, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca [3 x float], align 4
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca [3 x float], align 4
  %40 = alloca [3 x float], align 4
  call void @JPC_RegisterDefaultAllocator()
  call void @JPC_CreateFactory()
  call void @JPC_RegisterTypes()
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #8
  %41 = call ptr @JPC_TempAllocator_Create(i32 noundef 10485760)
  store ptr %41, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %2) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 4 @__const.JoltCTest_Serialization.half_extent, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %42 = getelementptr inbounds [3 x float], ptr %2, i64 0, i64 0
  %43 = call ptr @JPC_BoxShapeSettings_Create(ptr noundef %42)
  store ptr %43, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = call ptr @JPC_ShapeSettings_CreateShape(ptr noundef %44)
  store ptr %45, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #8
  call void @BufferedStreamOutImpl_Init(ptr dead_on_unwind writable sret(%struct.BufferStreamOutImpl) align 8 %5)
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  call void @JPC_Shape_SaveBinaryState(ptr noundef %46, ptr noundef %5)
  %47 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %5, i32 0, i32 3
  %48 = load i8, ptr %47, align 8, !tbaa !9, !range !13, !noundef !14
  %49 = trunc i8 %48 to i1
  br i1 %49, label %51, label %50

50:                                               ; preds = %0
  br label %52

51:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1013, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #8
  call void @BufferedStreamInImpl_Init(ptr dead_on_unwind writable sret(%struct.BufferStreamInImpl) align 8 %6)
  %53 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %5, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !15
  %55 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %6, i32 0, i32 1
  store ptr %54, ptr %55, align 8, !tbaa !16
  %56 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %5, i32 0, i32 2
  %57 = load i64, ptr %56, align 8, !tbaa !18
  %58 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %6, i32 0, i32 2
  store i64 %57, ptr %58, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %59 = call ptr @JPC_Shape_sRestoreFromBinaryState(ptr noundef %6)
  store ptr %59, ptr %7, align 8, !tbaa !5
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %60)
  %62 = zext i8 %61 to i32
  %63 = icmp eq i32 1, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %52
  br label %66

65:                                               ; preds = %52
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 1020, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #8
  call void @llvm.memset.p0.i64(ptr align 4 %8, i8 0, i64 12, i1 false)
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds [3 x float], ptr %8, i64 0, i64 0
  call void @JPC_BoxShape_GetHalfExtent(ptr noundef %67, ptr noundef %68)
  %69 = getelementptr inbounds [3 x float], ptr %2, i64 0, i64 0
  %70 = getelementptr inbounds [3 x float], ptr %8, i64 0, i64 0
  %71 = call i32 @memcmp(ptr noundef %69, ptr noundef %70, i64 noundef 12) #10
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %66
  br label %75

74:                                               ; preds = %66
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 1024, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

75:                                               ; preds = %73
  %76 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %6, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  call void @free(ptr noundef %77) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 @__const.JoltCTest_Serialization.translation, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  call void @BufferedStreamOutImpl_Init(ptr dead_on_unwind writable sret(%struct.BufferStreamOutImpl) align 8 %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %78 = getelementptr inbounds [3 x float], ptr %2, i64 0, i64 0
  %79 = call ptr @JPC_BoxShapeSettings_Create(ptr noundef %78)
  store ptr %79, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %80 = load ptr, ptr %11, align 8, !tbaa !5
  store float 0.000000e+00, ptr %13, align 4, !tbaa !20
  %81 = getelementptr inbounds float, ptr %13, i64 1
  store float 0.000000e+00, ptr %81, align 4, !tbaa !20
  %82 = getelementptr inbounds float, ptr %13, i64 2
  store float 0.000000e+00, ptr %82, align 4, !tbaa !20
  %83 = getelementptr inbounds float, ptr %13, i64 3
  store float 1.000000e+00, ptr %83, align 4, !tbaa !20
  %84 = getelementptr inbounds [4 x float], ptr %13, i64 0, i64 0
  %85 = getelementptr inbounds [3 x float], ptr %9, i64 0, i64 0
  %86 = call ptr @JPC_RotatedTranslatedShapeSettings_Create(ptr noundef %80, ptr noundef %84, ptr noundef %85)
  store ptr %86, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = call ptr @JPC_ShapeSettings_CreateShape(ptr noundef %87)
  store ptr %88, ptr %14, align 8, !tbaa !5
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  call void @JPC_Shape_SaveWithChildren_All(ptr noundef %89, ptr noundef %10)
  %90 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %10, i32 0, i32 3
  %91 = load i8, ptr %90, align 8, !tbaa !9, !range !13, !noundef !14
  %92 = trunc i8 %91 to i1
  br i1 %92, label %94, label %93

93:                                               ; preds = %75
  br label %95

94:                                               ; preds = %75
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1043, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

95:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #8
  call void @BufferedStreamInImpl_Init(ptr dead_on_unwind writable sret(%struct.BufferStreamInImpl) align 8 %15)
  %96 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %10, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !15
  %98 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %15, i32 0, i32 1
  store ptr %97, ptr %98, align 8, !tbaa !16
  %99 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %10, i32 0, i32 2
  %100 = load i64, ptr %99, align 8, !tbaa !18
  %101 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %15, i32 0, i32 2
  store i64 %100, ptr %101, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %102 = call ptr @JPC_Shape_sRestoreWithChildren_All(ptr noundef %15)
  store ptr %102, ptr %16, align 8, !tbaa !5
  %103 = load ptr, ptr %16, align 8, !tbaa !5
  %104 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %103)
  %105 = zext i8 %104 to i32
  %106 = icmp eq i32 9, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %95
  br label %109

108:                                              ; preds = %95
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 1052, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

109:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %110, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %111 = load ptr, ptr %17, align 8, !tbaa !5
  %112 = call ptr @JPC_DecoratedShape_GetInnerShape(ptr noundef %111)
  store ptr %112, ptr %18, align 8, !tbaa !5
  %113 = load ptr, ptr %18, align 8, !tbaa !5
  %114 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %113)
  %115 = zext i8 %114 to i32
  %116 = icmp eq i32 1, %115
  br i1 %116, label %117, label %118

117:                                              ; preds = %109
  br label %119

118:                                              ; preds = %109
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 1056, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

119:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #8
  call void @llvm.memset.p0.i64(ptr align 4 %19, i8 0, i64 12, i1 false)
  %120 = load ptr, ptr %18, align 8, !tbaa !5
  %121 = getelementptr inbounds [3 x float], ptr %19, i64 0, i64 0
  call void @JPC_BoxShape_GetHalfExtent(ptr noundef %120, ptr noundef %121)
  %122 = getelementptr inbounds [3 x float], ptr %2, i64 0, i64 0
  %123 = getelementptr inbounds [3 x float], ptr %19, i64 0, i64 0
  %124 = call i32 @memcmp(ptr noundef %122, ptr noundef %123, i64 noundef 12) #10
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %119
  br label %128

127:                                              ; preds = %119
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 1060, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

128:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #8
  %129 = load ptr, ptr %16, align 8, !tbaa !5
  %130 = getelementptr inbounds [3 x float], ptr %20, i64 0, i64 0
  call void @JPC_RotatedTranslatedShape_GetPosition(ptr noundef %129, ptr noundef %130)
  %131 = getelementptr inbounds [3 x float], ptr %9, i64 0, i64 0
  %132 = getelementptr inbounds [3 x float], ptr %20, i64 0, i64 0
  %133 = call i32 @memcmp(ptr noundef %131, ptr noundef %132, i64 noundef 12) #10
  %134 = icmp eq i32 %133, 0
  br i1 %134, label %135, label %136

135:                                              ; preds = %128
  br label %137

136:                                              ; preds = %128
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 1064, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

137:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %138 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %15, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !16
  call void @free(ptr noundef %139) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #8
  call void @BufferedStreamOutImpl_Init(ptr dead_on_unwind writable sret(%struct.BufferStreamOutImpl) align 8 %21)
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 @__const.JoltCTest_Serialization.translation.7, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %140 = getelementptr inbounds [3 x float], ptr %2, i64 0, i64 0
  %141 = call ptr @JPC_BoxShapeSettings_Create(ptr noundef %140)
  store ptr %141, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %142 = load ptr, ptr %23, align 8, !tbaa !5
  store float 0.000000e+00, ptr %25, align 4, !tbaa !20
  %143 = getelementptr inbounds float, ptr %25, i64 1
  store float 0.000000e+00, ptr %143, align 4, !tbaa !20
  %144 = getelementptr inbounds float, ptr %25, i64 2
  store float 0.000000e+00, ptr %144, align 4, !tbaa !20
  %145 = getelementptr inbounds float, ptr %25, i64 3
  store float 1.000000e+00, ptr %145, align 4, !tbaa !20
  %146 = getelementptr inbounds [4 x float], ptr %25, i64 0, i64 0
  %147 = getelementptr inbounds [3 x float], ptr %22, i64 0, i64 0
  %148 = call ptr @JPC_RotatedTranslatedShapeSettings_Create(ptr noundef %142, ptr noundef %146, ptr noundef %147)
  store ptr %148, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %149 = load ptr, ptr %24, align 8, !tbaa !5
  %150 = call ptr @JPC_ShapeSettings_CreateShape(ptr noundef %149)
  store ptr %150, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %151 = load ptr, ptr %26, align 8, !tbaa !5
  %152 = call ptr @JPC_DecoratedShape_GetInnerShape(ptr noundef %151)
  store ptr %152, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %153 = call ptr (...) @JPC_ShapeToIDMap_Create()
  store ptr %153, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %154 = call ptr (...) @JPC_MaterialToIDMap_Create()
  store ptr %154, ptr %29, align 8, !tbaa !5
  %155 = load ptr, ptr %28, align 8, !tbaa !5
  call void @JPC_ShapeToIDMap_Add(ptr noundef %155, ptr noundef %27, i32 noundef 1)
  %156 = load ptr, ptr %26, align 8, !tbaa !5
  %157 = load ptr, ptr %28, align 8, !tbaa !5
  %158 = load ptr, ptr %29, align 8, !tbaa !5
  call void @JPC_Shape_SaveWithChildren(ptr noundef %156, ptr noundef %21, ptr noundef %157, ptr noundef %158)
  %159 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %21, i32 0, i32 3
  %160 = load i8, ptr %159, align 8, !tbaa !9, !range !13, !noundef !14
  %161 = trunc i8 %160 to i1
  br i1 %161, label %163, label %162

162:                                              ; preds = %137
  br label %164

163:                                              ; preds = %137
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1089, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

164:                                              ; preds = %162
  %165 = load ptr, ptr %28, align 8, !tbaa !5
  call void @JPC_ShapeToIDMap_Destroy(ptr noundef %165)
  %166 = load ptr, ptr %29, align 8, !tbaa !5
  call void @JPC_MaterialToIDMap_Destroy(ptr noundef %166)
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr %30) #8
  call void @BufferedStreamInImpl_Init(ptr dead_on_unwind writable sret(%struct.BufferStreamInImpl) align 8 %30)
  %167 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %21, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8, !tbaa !15
  %169 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %30, i32 0, i32 1
  store ptr %168, ptr %169, align 8, !tbaa !16
  %170 = getelementptr inbounds %struct.BufferStreamOutImpl, ptr %21, i32 0, i32 2
  %171 = load i64, ptr %170, align 8, !tbaa !18
  %172 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %30, i32 0, i32 2
  store i64 %171, ptr %172, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %173 = call ptr (...) @JPC_IDToShapeMap_Create()
  store ptr %173, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %174 = call ptr (...) @JPC_IDToMaterialMap_Create()
  store ptr %174, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 @__const.JoltCTest_Serialization.half_extent_alt, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %175 = getelementptr inbounds [3 x float], ptr %33, i64 0, i64 0
  %176 = call ptr @JPC_BoxShapeSettings_Create(ptr noundef %175)
  store ptr %176, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %177 = load ptr, ptr %34, align 8, !tbaa !5
  %178 = call ptr @JPC_ShapeSettings_CreateShape(ptr noundef %177)
  store ptr %178, ptr %35, align 8, !tbaa !5
  %179 = load ptr, ptr %31, align 8, !tbaa !5
  call void @JPC_IDToShapeMap_Add(ptr noundef %179, ptr noundef %35, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %180 = load ptr, ptr %31, align 8, !tbaa !5
  %181 = load ptr, ptr %32, align 8, !tbaa !5
  %182 = call ptr @JPC_Shape_sRestoreWithChildren(ptr noundef %30, ptr noundef %180, ptr noundef %181)
  store ptr %182, ptr %36, align 8, !tbaa !5
  %183 = load ptr, ptr %36, align 8, !tbaa !5
  %184 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %183)
  %185 = zext i8 %184 to i32
  %186 = icmp eq i32 9, %185
  br i1 %186, label %187, label %188

187:                                              ; preds = %164
  br label %189

188:                                              ; preds = %164
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 1108, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

189:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %190 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %190, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %191 = load ptr, ptr %37, align 8, !tbaa !5
  %192 = call ptr @JPC_DecoratedShape_GetInnerShape(ptr noundef %191)
  store ptr %192, ptr %38, align 8, !tbaa !5
  %193 = load ptr, ptr %38, align 8, !tbaa !5
  %194 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %193)
  %195 = zext i8 %194 to i32
  %196 = icmp eq i32 1, %195
  br i1 %196, label %197, label %198

197:                                              ; preds = %189
  br label %199

198:                                              ; preds = %189
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 1112, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

199:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #8
  call void @llvm.memset.p0.i64(ptr align 4 %39, i8 0, i64 12, i1 false)
  %200 = load ptr, ptr %38, align 8, !tbaa !5
  %201 = getelementptr inbounds [3 x float], ptr %39, i64 0, i64 0
  call void @JPC_BoxShape_GetHalfExtent(ptr noundef %200, ptr noundef %201)
  %202 = getelementptr inbounds [3 x float], ptr %33, i64 0, i64 0
  %203 = getelementptr inbounds [3 x float], ptr %39, i64 0, i64 0
  %204 = call i32 @memcmp(ptr noundef %202, ptr noundef %203, i64 noundef 12) #10
  %205 = icmp eq i32 %204, 0
  br i1 %205, label %206, label %207

206:                                              ; preds = %199
  br label %208

207:                                              ; preds = %199
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 1116, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

208:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #8
  %209 = load ptr, ptr %36, align 8, !tbaa !5
  %210 = getelementptr inbounds [3 x float], ptr %40, i64 0, i64 0
  call void @JPC_RotatedTranslatedShape_GetPosition(ptr noundef %209, ptr noundef %210)
  %211 = getelementptr inbounds [3 x float], ptr %22, i64 0, i64 0
  %212 = getelementptr inbounds [3 x float], ptr %40, i64 0, i64 0
  %213 = call i32 @memcmp(ptr noundef %211, ptr noundef %212, i64 noundef 12) #10
  %214 = icmp eq i32 %213, 0
  br i1 %214, label %215, label %216

215:                                              ; preds = %208
  br label %217

216:                                              ; preds = %208
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 1120, ptr noundef @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

217:                                              ; preds = %215
  %218 = load ptr, ptr %31, align 8, !tbaa !5
  call void @JPC_ShapeToIDMap_Destroy(ptr noundef %218)
  %219 = load ptr, ptr %32, align 8, !tbaa !5
  call void @JPC_MaterialToIDMap_Destroy(ptr noundef %219)
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  %220 = getelementptr inbounds %struct.BufferStreamInImpl, ptr %30, i32 0, i32 1
  %221 = load ptr, ptr %220, align 8, !tbaa !16
  call void @free(ptr noundef %221) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #8
  %222 = load ptr, ptr %1, align 8, !tbaa !5
  call void @JPC_TempAllocator_Destroy(ptr noundef %222)
  call void @JPC_DestroyFactory()
  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #8
  ret i32 1
}

; Function Attrs: nounwind uwtable
declare hidden void @BufferedStreamOutImpl_Init(ptr dead_on_unwind noalias writable sret(%struct.BufferStreamOutImpl) align 8) #3

declare void @JPC_Shape_SaveBinaryState(ptr noundef, ptr noundef) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @BufferedStreamInImpl_Init(ptr dead_on_unwind noalias writable sret(%struct.BufferStreamInImpl) align 8) #3

declare ptr @JPC_Shape_sRestoreFromBinaryState(ptr noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare void @JPC_BoxShape_GetHalfExtent(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #6

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

declare ptr @JPC_RotatedTranslatedShapeSettings_Create(ptr noundef, ptr noundef, ptr noundef) #0

declare void @JPC_Shape_SaveWithChildren_All(ptr noundef, ptr noundef) #0

declare ptr @JPC_Shape_sRestoreWithChildren_All(ptr noundef) #0

declare ptr @JPC_DecoratedShape_GetInnerShape(ptr noundef) #0

declare void @JPC_RotatedTranslatedShape_GetPosition(ptr noundef, ptr noundef) #0

declare ptr @JPC_ShapeToIDMap_Create(...) #0

declare ptr @JPC_MaterialToIDMap_Create(...) #0

declare void @JPC_ShapeToIDMap_Add(ptr noundef, ptr noundef, i32 noundef) #0

declare void @JPC_Shape_SaveWithChildren(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare void @JPC_ShapeToIDMap_Destroy(ptr noundef) #0

declare void @JPC_MaterialToIDMap_Destroy(ptr noundef) #0

declare ptr @JPC_IDToShapeMap_Create(...) #0

declare ptr @JPC_IDToMaterialMap_Create(...) #0

declare void @JPC_IDToShapeMap_Add(ptr noundef, ptr noundef, i32 noundef) #0

declare ptr @JPC_Shape_sRestoreWithChildren(ptr noundef, ptr noundef, ptr noundef) #0

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

!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, !12, i64 24}
!10 = !{!"BufferStreamOutImpl", !6, i64 0, !6, i64 8, !11, i64 16, !12, i64 24}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!10, !6, i64 8}
!16 = !{!17, !6, i64 8}
!17 = !{!"BufferStreamInImpl", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 24, !12, i64 32}
!18 = !{!10, !11, i64 16}
!19 = !{!17, !11, i64 16}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.BufferStreamOutImpl = type { ptr, ptr, i64, i8 }
%struct.BufferStreamInImpl = type { ptr, ptr, i64, i64, i8 }

@__const.JoltCTest_Serialization.half_extent = external hidden unnamed_addr constant [3 x float], align 4
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [86 x i8], align 1
@__PRETTY_FUNCTION__.JoltCTest_Serialization = external hidden unnamed_addr constant [39 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [66 x i8], align 1
@__const.JoltCTest_Serialization.translation = external hidden unnamed_addr constant [3 x float], align 4
@.str.4 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [66 x i8], align 1
@__const.JoltCTest_Serialization.translation.7 = external hidden unnamed_addr constant [3 x float], align 4
@__const.JoltCTest_Serialization.half_extent_alt = external hidden unnamed_addr constant [3 x float], align 4
@.str.8 = external hidden unnamed_addr constant [70 x i8], align 1

declare void @JPC_RegisterDefaultAllocator() local_unnamed_addr #0

declare void @JPC_CreateFactory() local_unnamed_addr #0

declare void @JPC_RegisterTypes() local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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) #2

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

declare ptr @JPC_BoxShapeSettings_Create(ptr noundef) local_unnamed_addr #0

declare ptr @JPC_ShapeSettings_CreateShape(ptr noundef) local_unnamed_addr #0

declare zeroext i8 @JPC_Shape_GetSubType(ptr noundef) local_unnamed_addr #0

declare void @JPC_DestroyFactory() local_unnamed_addr #0

declare ptr @JPC_TempAllocator_Create(i32 noundef) local_unnamed_addr #0

declare void @JPC_TempAllocator_Destroy(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @JoltCTest_Serialization() local_unnamed_addr #3 {
  %1 = alloca [3 x float], align 4
  %2 = alloca %struct.BufferStreamOutImpl, align 8
  %3 = alloca %struct.BufferStreamInImpl, align 8
  %4 = alloca [3 x float], align 4
  %5 = alloca [3 x float], align 4
  %6 = alloca %struct.BufferStreamOutImpl, align 8
  %7 = alloca [4 x float], align 16
  %8 = alloca %struct.BufferStreamInImpl, align 8
  %9 = alloca [3 x float], align 4
  %10 = alloca [3 x float], align 4
  %11 = alloca %struct.BufferStreamOutImpl, align 8
  %12 = alloca [3 x float], align 4
  %13 = alloca [4 x float], align 16
  %14 = alloca ptr, align 8
  %15 = alloca %struct.BufferStreamInImpl, align 8
  %16 = alloca [3 x float], align 4
  %17 = alloca ptr, align 8
  %18 = alloca [3 x float], align 4
  %19 = alloca [3 x float], align 4
  tail call void @JPC_RegisterDefaultAllocator() #8
  tail call void @JPC_CreateFactory() #8
  tail call void @JPC_RegisterTypes() #8
  %20 = tail call ptr @JPC_TempAllocator_Create(i32 noundef 10485760) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %1) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) @__const.JoltCTest_Serialization.half_extent, i64 12, i1 false)
  %21 = call ptr @JPC_BoxShapeSettings_Create(ptr noundef nonnull %1) #8
  %22 = call ptr @JPC_ShapeSettings_CreateShape(ptr noundef %21) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #8
  call void @BufferedStreamOutImpl_Init(ptr dead_on_unwind nonnull writable sret(%struct.BufferStreamOutImpl) align 8 %2)
  call void @JPC_Shape_SaveBinaryState(ptr noundef %22, ptr noundef nonnull %2) #8
  %23 = getelementptr inbounds i8, ptr %2, i64 24
  %24 = load i8, ptr %23, align 8, !tbaa !5, !range !12, !noundef !13
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %26, label %27

26:                                               ; preds = %0
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 1013, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

27:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #8
  call void @BufferedStreamInImpl_Init(ptr dead_on_unwind nonnull writable sret(%struct.BufferStreamInImpl) align 8 %3)
  %28 = getelementptr inbounds i8, ptr %2, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %29, ptr %30, align 8, !tbaa !15
  %31 = getelementptr inbounds i8, ptr %2, i64 16
  %32 = load i64, ptr %31, align 8, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %3, i64 16
  store i64 %32, ptr %33, align 8, !tbaa !18
  %34 = call ptr @JPC_Shape_sRestoreFromBinaryState(ptr noundef nonnull %3) #8
  %35 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %34) #8
  %36 = icmp eq i8 %35, 1
  br i1 %36, label %38, label %37

37:                                               ; preds = %27
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 1020, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

38:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %4, i8 0, i64 12, i1 false)
  call void @JPC_BoxShape_GetHalfExtent(ptr noundef %34, ptr noundef nonnull %4) #8
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %1, ptr noundef nonnull dereferenceable(12) %4, i64 12)
  %39 = icmp eq i32 %bcmp, 0
  br i1 %39, label %41, label %40

40:                                               ; preds = %38
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 1024, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

41:                                               ; preds = %38
  %42 = load ptr, ptr %30, align 8, !tbaa !15
  call void @free(ptr noundef %42) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) @__const.JoltCTest_Serialization.translation, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  call void @BufferedStreamOutImpl_Init(ptr dead_on_unwind nonnull writable sret(%struct.BufferStreamOutImpl) align 8 %6)
  %43 = call ptr @JPC_BoxShapeSettings_Create(ptr noundef nonnull %1) #8
  store <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, ptr %7, align 16, !tbaa !19
  %44 = call ptr @JPC_RotatedTranslatedShapeSettings_Create(ptr noundef %43, ptr noundef nonnull %7, ptr noundef nonnull %5) #8
  %45 = call ptr @JPC_ShapeSettings_CreateShape(ptr noundef %44) #8
  call void @JPC_Shape_SaveWithChildren_All(ptr noundef %45, ptr noundef nonnull %6) #8
  %46 = getelementptr inbounds i8, ptr %6, i64 24
  %47 = load i8, ptr %46, align 8, !tbaa !5, !range !12, !noundef !13
  %48 = trunc nuw i8 %47 to i1
  br i1 %48, label %49, label %50

49:                                               ; preds = %41
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 1043, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

50:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #8
  call void @BufferedStreamInImpl_Init(ptr dead_on_unwind nonnull writable sret(%struct.BufferStreamInImpl) align 8 %8)
  %51 = getelementptr inbounds i8, ptr %6, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !14
  %53 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %52, ptr %53, align 8, !tbaa !15
  %54 = getelementptr inbounds i8, ptr %6, i64 16
  %55 = load i64, ptr %54, align 8, !tbaa !17
  %56 = getelementptr inbounds i8, ptr %8, i64 16
  store i64 %55, ptr %56, align 8, !tbaa !18
  %57 = call ptr @JPC_Shape_sRestoreWithChildren_All(ptr noundef nonnull %8) #8
  %58 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %57) #8
  %59 = icmp eq i8 %58, 9
  br i1 %59, label %61, label %60

60:                                               ; preds = %50
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 1052, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

61:                                               ; preds = %50
  %62 = call ptr @JPC_DecoratedShape_GetInnerShape(ptr noundef %57) #8
  %63 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %62) #8
  %64 = icmp eq i8 %63, 1
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 1056, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %9, i8 0, i64 12, i1 false)
  call void @JPC_BoxShape_GetHalfExtent(ptr noundef %62, ptr noundef nonnull %9) #8
  %bcmp35 = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %1, ptr noundef nonnull dereferenceable(12) %9, i64 12)
  %67 = icmp eq i32 %bcmp35, 0
  br i1 %67, label %69, label %68

68:                                               ; preds = %66
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 1060, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #8
  call void @JPC_RotatedTranslatedShape_GetPosition(ptr noundef %57, ptr noundef nonnull %10) #8
  %bcmp36 = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %5, ptr noundef nonnull dereferenceable(12) %10, i64 12)
  %70 = icmp eq i32 %bcmp36, 0
  br i1 %70, label %72, label %71

71:                                               ; preds = %69
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 1064, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

72:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #8
  %73 = load ptr, ptr %53, align 8, !tbaa !15
  call void @free(ptr noundef %73) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #8
  call void @BufferedStreamOutImpl_Init(ptr dead_on_unwind nonnull writable sret(%struct.BufferStreamOutImpl) align 8 %11)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) @__const.JoltCTest_Serialization.translation.7, i64 12, i1 false)
  %74 = call ptr @JPC_BoxShapeSettings_Create(ptr noundef nonnull %1) #8
  store <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, ptr %13, align 16, !tbaa !19
  %75 = call ptr @JPC_RotatedTranslatedShapeSettings_Create(ptr noundef %74, ptr noundef nonnull %13, ptr noundef nonnull %12) #8
  %76 = call ptr @JPC_ShapeSettings_CreateShape(ptr noundef %75) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %77 = call ptr @JPC_DecoratedShape_GetInnerShape(ptr noundef %76) #8
  store ptr %77, ptr %14, align 8, !tbaa !21
  %78 = call ptr (...) @JPC_ShapeToIDMap_Create() #8
  %79 = call ptr (...) @JPC_MaterialToIDMap_Create() #8
  call void @JPC_ShapeToIDMap_Add(ptr noundef %78, ptr noundef nonnull %14, i32 noundef 1) #8
  call void @JPC_Shape_SaveWithChildren(ptr noundef %76, ptr noundef nonnull %11, ptr noundef %78, ptr noundef %79) #8
  %80 = getelementptr inbounds i8, ptr %11, i64 24
  %81 = load i8, ptr %80, align 8, !tbaa !5, !range !12, !noundef !13
  %82 = trunc nuw i8 %81 to i1
  br i1 %82, label %83, label %84

83:                                               ; preds = %72
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 1089, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

84:                                               ; preds = %72
  call void @JPC_ShapeToIDMap_Destroy(ptr noundef %78) #8
  call void @JPC_MaterialToIDMap_Destroy(ptr noundef %79) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #8
  call void @BufferedStreamInImpl_Init(ptr dead_on_unwind nonnull writable sret(%struct.BufferStreamInImpl) align 8 %15)
  %85 = getelementptr inbounds i8, ptr %11, i64 8
  %86 = load ptr, ptr %85, align 8, !tbaa !14
  %87 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %86, ptr %87, align 8, !tbaa !15
  %88 = getelementptr inbounds i8, ptr %11, i64 16
  %89 = load i64, ptr %88, align 8, !tbaa !17
  %90 = getelementptr inbounds i8, ptr %15, i64 16
  store i64 %89, ptr %90, align 8, !tbaa !18
  %91 = call ptr (...) @JPC_IDToShapeMap_Create() #8
  %92 = call ptr (...) @JPC_IDToMaterialMap_Create() #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) @__const.JoltCTest_Serialization.half_extent_alt, i64 12, i1 false)
  %93 = call ptr @JPC_BoxShapeSettings_Create(ptr noundef nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %94 = call ptr @JPC_ShapeSettings_CreateShape(ptr noundef %93) #8
  store ptr %94, ptr %17, align 8, !tbaa !21
  call void @JPC_IDToShapeMap_Add(ptr noundef %91, ptr noundef nonnull %17, i32 noundef 1) #8
  %95 = call ptr @JPC_Shape_sRestoreWithChildren(ptr noundef nonnull %15, ptr noundef %91, ptr noundef %92) #8
  %96 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %95) #8
  %97 = icmp eq i8 %96, 9
  br i1 %97, label %99, label %98

98:                                               ; preds = %84
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 1108, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

99:                                               ; preds = %84
  %100 = call ptr @JPC_DecoratedShape_GetInnerShape(ptr noundef %95) #8
  %101 = call zeroext i8 @JPC_Shape_GetSubType(ptr noundef %100) #8
  %102 = icmp eq i8 %101, 1
  br i1 %102, label %104, label %103

103:                                              ; preds = %99
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 1112, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

104:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %18, i8 0, i64 12, i1 false)
  call void @JPC_BoxShape_GetHalfExtent(ptr noundef %100, ptr noundef nonnull %18) #8
  %bcmp37 = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %16, ptr noundef nonnull dereferenceable(12) %18, i64 12)
  %105 = icmp eq i32 %bcmp37, 0
  br i1 %105, label %107, label %106

106:                                              ; preds = %104
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 1116, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

107:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #8
  call void @JPC_RotatedTranslatedShape_GetPosition(ptr noundef %95, ptr noundef nonnull %19) #8
  %bcmp38 = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %12, ptr noundef nonnull dereferenceable(12) %19, i64 12)
  %108 = icmp eq i32 %bcmp38, 0
  br i1 %108, label %110, label %109

109:                                              ; preds = %107
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 1120, ptr noundef nonnull @__PRETTY_FUNCTION__.JoltCTest_Serialization) #9
  unreachable

110:                                              ; preds = %107
  call void @JPC_ShapeToIDMap_Destroy(ptr noundef %91) #8
  call void @JPC_MaterialToIDMap_Destroy(ptr noundef %92) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #8
  %111 = load ptr, ptr %87, align 8, !tbaa !15
  call void @free(ptr noundef %111) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #8
  call void @JPC_TempAllocator_Destroy(ptr noundef %20) #8
  call void @JPC_DestroyFactory() #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %1) #8
  ret i32 1
}

; Function Attrs: nounwind uwtable
declare hidden void @BufferedStreamOutImpl_Init(ptr dead_on_unwind noalias writable sret(%struct.BufferStreamOutImpl) align 8) local_unnamed_addr #3

declare void @JPC_Shape_SaveBinaryState(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @BufferedStreamInImpl_Init(ptr dead_on_unwind noalias writable sret(%struct.BufferStreamInImpl) align 8) local_unnamed_addr #3

declare ptr @JPC_Shape_sRestoreFromBinaryState(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare void @JPC_BoxShape_GetHalfExtent(ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare ptr @JPC_RotatedTranslatedShapeSettings_Create(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @JPC_Shape_SaveWithChildren_All(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @JPC_Shape_sRestoreWithChildren_All(ptr noundef) local_unnamed_addr #0

declare ptr @JPC_DecoratedShape_GetInnerShape(ptr noundef) local_unnamed_addr #0

declare void @JPC_RotatedTranslatedShape_GetPosition(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @JPC_ShapeToIDMap_Create(...) local_unnamed_addr #0

declare ptr @JPC_MaterialToIDMap_Create(...) local_unnamed_addr #0

declare void @JPC_ShapeToIDMap_Add(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare void @JPC_Shape_SaveWithChildren(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @JPC_ShapeToIDMap_Destroy(ptr noundef) local_unnamed_addr #0

declare void @JPC_MaterialToIDMap_Destroy(ptr noundef) local_unnamed_addr #0

declare ptr @JPC_IDToShapeMap_Create(...) local_unnamed_addr #0

declare ptr @JPC_IDToMaterialMap_Create(...) local_unnamed_addr #0

declare void @JPC_IDToShapeMap_Add(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @JPC_Shape_sRestoreWithChildren(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 24}
!6 = !{!"BufferStreamOutImpl", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !7, i64 8}
!15 = !{!16, !7, i64 8}
!16 = !{!"BufferStreamInImpl", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !11, i64 32}
!17 = !{!6, !10, i64 16}
!18 = !{!16, !10, i64 16}
!19 = !{!20, !20, i64 0}
!20 = !{!"float", !8, i64 0}
!21 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass