; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/General/PyramidTest.ll (ZN11PyramidTest10InitializeEv)

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

%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.9", %"class.JPH::RefConst" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.5", i32, i32 }
%"class.JPH::RefConst.5" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.9" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%class.Test = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11PyramidTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(112) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.JPH::RefConst", align 8
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::BodyCreationSettings", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Quat", align 16
  %19 = alloca %"class.JPH::BodyID", align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %20 = load ptr, ptr %2, align 8
  %21 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112) %20, float noundef 2.000000e+02)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #10
  store float 2.000000e+00, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #10
  store float 5.000000e-01, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #10
  store float 1.000000e+00, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #10
  store i32 15, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %22 = call noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
  %23 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %24 unwind label %40

24:                                               ; preds = %1
  %25 = getelementptr inbounds %"class.JPH::Vec3", ptr %8, i32 0, i32 0
  %26 = getelementptr inbounds %union.anon, ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %28 = extractvalue { double, double } %23, 0
  store double %28, ptr %27, align 16
  %29 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %30 = extractvalue { double, double } %23, 1
  store double %30, ptr %29, align 8
  %31 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %32 = load double, ptr %31, align 16
  %33 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %34 = load double, ptr %33, align 8
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %22, double %32, double %34, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %35 unwind label %40

35:                                               ; preds = %24
  call void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %36

36:                                               ; preds = %136, %35
  %37 = load i32, ptr %11, align 4, !tbaa !11
  %38 = icmp slt i32 %37, 15
  br i1 %38, label %44, label %39

39:                                               ; preds = %36
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  br label %139

40:                                               ; preds = %24, %1
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %9, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %10, align 4
  call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %22) #10
  br label %140

44:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  %45 = load i32, ptr %11, align 4, !tbaa !11
  %46 = sdiv i32 %45, 2
  store i32 %46, ptr %13, align 4, !tbaa !11
  br label %47

47:                                               ; preds = %132, %44
  %48 = load i32, ptr %13, align 4, !tbaa !11
  %49 = load i32, ptr %11, align 4, !tbaa !11
  %50 = add nsw i32 %49, 1
  %51 = sdiv i32 %50, 2
  %52 = sub nsw i32 15, %51
  %53 = icmp slt i32 %48, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %47
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %135

55:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  %56 = load i32, ptr %11, align 4, !tbaa !11
  %57 = sdiv i32 %56, 2
  store i32 %57, ptr %14, align 4, !tbaa !11
  br label %58

58:                                               ; preds = %114, %55
  %59 = load i32, ptr %14, align 4, !tbaa !11
  %60 = load i32, ptr %11, align 4, !tbaa !11
  %61 = add nsw i32 %60, 1
  %62 = sdiv i32 %61, 2
  %63 = sub nsw i32 15, %62
  %64 = icmp slt i32 %59, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %58
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  br label %131

66:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #10
  %67 = load i32, ptr %13, align 4, !tbaa !11
  %68 = sitofp i32 %67 to float
  %69 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %68, float -1.500000e+01)
  %70 = load i32, ptr %11, align 4, !tbaa !11
  %71 = and i32 %70, 1
  %72 = icmp ne i32 %71, 0
  %73 = zext i1 %72 to i64
  %74 = select i1 %72, float 1.000000e+00, float 0.000000e+00
  %75 = fadd float %69, %74
  %76 = load i32, ptr %11, align 4, !tbaa !11
  %77 = sitofp i32 %76 to float
  %78 = call float @llvm.fmuladd.f32(float 2.500000e+00, float %77, float 1.000000e+00)
  %79 = load i32, ptr %14, align 4, !tbaa !11
  %80 = sitofp i32 %79 to float
  %81 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %80, float -1.500000e+01)
  %82 = load i32, ptr %11, align 4, !tbaa !11
  %83 = and i32 %82, 1
  %84 = icmp ne i32 %83, 0
  %85 = zext i1 %84 to i64
  %86 = select i1 %84, float 1.000000e+00, float 0.000000e+00
  %87 = fadd float %81, %86
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef %75, float noundef %78, float noundef %87)
          to label %88 unwind label %117

88:                                               ; preds = %66
  %89 = getelementptr inbounds %class.Test, ptr %20, i32 0, i32 3
  %90 = load ptr, ptr %89, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 256, ptr %16) #10
  %91 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %92 unwind label %121

92:                                               ; preds = %88
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %17, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !21
  %93 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %94 unwind label %121

94:                                               ; preds = %92
  %95 = getelementptr inbounds %"class.JPH::Quat", ptr %18, i32 0, i32 0
  %96 = getelementptr inbounds %"class.JPH::Vec4", ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds %union.anon.4, ptr %96, i32 0, i32 0
  %98 = getelementptr inbounds { double, double }, ptr %97, i32 0, i32 0
  %99 = extractvalue { double, double } %93, 0
  store double %99, ptr %98, align 16
  %100 = getelementptr inbounds { double, double }, ptr %97, i32 0, i32 1
  %101 = extractvalue { double, double } %93, 1
  store double %101, ptr %100, align 8
  %102 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %103 = load double, ptr %102, align 16
  %104 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %105 = load double, ptr %104, align 8
  %106 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %107 = load double, ptr %106, align 16
  %108 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %109 = load double, ptr %108, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %16, ptr noundef %91, double %103, double %105, double %107, double %109, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %110 unwind label %121

110:                                              ; preds = %94
  %111 = invoke i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %90, ptr noundef nonnull align 16 dereferenceable(256) %16, i32 noundef 0)
          to label %112 unwind label %125

112:                                              ; preds = %110
  %113 = getelementptr inbounds %"class.JPH::BodyID", ptr %19, i32 0, i32 0
  store i32 %111, ptr %113, align 4
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %16) #10
  call void @llvm.lifetime.end.p0(i64 256, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #10
  br label %114

114:                                              ; preds = %112
  %115 = load i32, ptr %14, align 4, !tbaa !11
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %14, align 4, !tbaa !11
  br label %58, !llvm.loop !23

117:                                              ; preds = %66
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %9, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %10, align 4
  br label %130

121:                                              ; preds = %94, %92, %88
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %9, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %10, align 4
  br label %129

125:                                              ; preds = %110
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %9, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %10, align 4
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %16) #10
  br label %129

129:                                              ; preds = %125, %121
  call void @llvm.lifetime.end.p0(i64 256, ptr %16) #10
  br label %130

130:                                              ; preds = %129, %117
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  br label %140

131:                                              ; preds = %65
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %13, align 4, !tbaa !11
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %13, align 4, !tbaa !11
  br label %47, !llvm.loop !25

135:                                              ; preds = %54
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %11, align 4, !tbaa !11
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %11, align 4, !tbaa !11
  br label %36, !llvm.loop !26

139:                                              ; preds = %39
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  ret void

140:                                              ; preds = %130, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  br label %141

141:                                              ; preds = %140
  %142 = load ptr, ptr %9, align 8
  %143 = load i32, ptr %10, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145
}

declare noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112), float noundef) #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef) #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80), double, double, float noundef, ptr noundef) unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8BoxShapedlEPv(ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #6 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #7

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #4 align 2

declare i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256), i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8)) #8 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef, double, double, double, double, i8 noundef zeroext, i16 noundef zeroext) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #8 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #10 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 24}
!14 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !15, i64 48, !16, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !17, i64 0}
!17 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !18, i64 8, !19, i64 16, !18, i64 24, !20, i64 32, !6, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!20 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !10, i64 0, !18, i64 8}
!21 = !{i64 0, i64 16, !22}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}


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

%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.9", %"class.JPH::RefConst" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.4 }
%union.anon.4 = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.5", i32, i32 }
%"class.JPH::RefConst.5" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.9" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11PyramidTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(112) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.JPH::RefConst", align 8
  %3 = alloca %"class.JPH::Vec3", align 16
  %4 = alloca %"class.JPH::BodyCreationSettings", align 16
  %5 = tail call noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112) %0, float noundef 2.000000e+02)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %6 = tail call noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef 80)
  %7 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %8 unwind label %14

8:                                                ; preds = %1
  %9 = extractvalue { double, double } %7, 0
  %10 = extractvalue { double, double } %7, 1
  invoke void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80) %6, double %9, double %10, float noundef 0x3FA99999A0000000, ptr noundef null)
          to label %11 unwind label %14

11:                                               ; preds = %8
  call void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull %6)
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %.sroa.23.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  br label %16

.loopexit:                                        ; preds = %._crit_edge.us, %16
  %exitcond.not = icmp eq i32 %18, 15
  br i1 %exitcond.not, label %13, label %16, !llvm.loop !5

13:                                               ; preds = %.loopexit
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  ret void

14:                                               ; preds = %8, %1
  %15 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH8BoxShapedlEPv(ptr noundef %6) #9
  br label %52

16:                                               ; preds = %11, %.loopexit
  %.02544 = phi i32 [ 0, %11 ], [ %18, %.loopexit ]
  %17 = lshr i32 %.02544, 1
  %18 = add nuw nsw i32 %.02544, 1
  %19 = lshr i32 %18, 1
  %20 = sub nuw nsw i32 15, %19
  %21 = icmp ult i32 %17, %20
  br i1 %21, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %16
  %22 = and i32 %.02544, 1
  %.not = icmp eq i32 %22, 0
  %23 = select i1 %.not, float 0.000000e+00, float 1.000000e+00
  %24 = uitofp nneg i32 %.02544 to float
  %25 = call float @llvm.fmuladd.f32(float %24, float 2.500000e+00, float 1.000000e+00)
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph
  %.02636.us = phi i32 [ %17, %.preheader.lr.ph ], [ %45, %._crit_edge.us ]
  %26 = uitofp nneg i32 %.02636.us to float
  %27 = call float @llvm.fmuladd.f32(float %26, float 2.000000e+00, float -1.500000e+01)
  %28 = fadd float %23, %27
  br label %29

29:                                               ; preds = %.preheader.us, %42
  %.02735.us = phi i32 [ %17, %.preheader.us ], [ %43, %42 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #9
  %30 = uitofp nneg i32 %.02735.us to float
  %31 = call float @llvm.fmuladd.f32(float %30, float 2.000000e+00, float -1.500000e+01)
  %32 = fadd float %23, %31
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %3, float noundef %28, float noundef %25, float noundef %32)
          to label %33 unwind label %.split.us

33:                                               ; preds = %29
  %34 = load ptr, ptr %12, align 8, !tbaa !7
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %4) #9
  %35 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.sroa.02.0.copyload.us = load double, ptr %3, align 16
  %.sroa.23.0.copyload.us = load double, ptr %.sroa.23.0..sroa_idx, align 8, !tbaa !19
  %36 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %37 unwind label %.split39.us

37:                                               ; preds = %33
  %38 = extractvalue { double, double } %36, 0
  %39 = extractvalue { double, double } %36, 1
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %4, ptr noundef %35, double %.sroa.02.0.copyload.us, double %.sroa.23.0.copyload.us, double %38, double %39, i8 noundef zeroext 2, i16 noundef zeroext 1)
          to label %40 unwind label %.split39.us

40:                                               ; preds = %37
  %41 = invoke i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 16 dereferenceable(256) %4, i32 noundef 0)
          to label %42 unwind label %.split42.us

42:                                               ; preds = %40
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %4) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  %43 = add nuw nsw i32 %.02735.us, 1
  %44 = icmp ult i32 %43, %20
  br i1 %44, label %29, label %._crit_edge.us, !llvm.loop !20

._crit_edge.us:                                   ; preds = %42
  %45 = add nuw nsw i32 %.02636.us, 1
  %46 = icmp ult i32 %45, %20
  br i1 %46, label %.preheader.us, label %.loopexit, !llvm.loop !21

.split.us:                                        ; preds = %29
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %51

.split39.us:                                      ; preds = %37, %33
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %50

.split42.us:                                      ; preds = %40
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %4) #9
  br label %50

50:                                               ; preds = %.split42.us, %.split39.us
  %.pn = phi { ptr, i32 } [ %49, %.split42.us ], [ %48, %.split39.us ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %4) #9
  br label %51

51:                                               ; preds = %50, %.split.us
  %.pn.pn = phi { ptr, i32 } [ %.pn, %50 ], [ %47, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #9
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #9
  br label %52

52:                                               ; preds = %51, %14
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %51 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn.pn.pn
}

declare noundef nonnull align 16 dereferenceable(122) ptr @_ZN4Test11CreateFloorEf(ptr noundef nonnull align 8 dereferenceable(112), float noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH8BoxShapenwEm(i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8BoxShapeC2ENS_4Vec3EfPKNS_15PhysicsMaterialE(ptr noundef nonnull align 16 dereferenceable(80), double, double, float noundef, ptr noundef) unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8BoxShapedlEPv(ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH8RefConstINS_5ShapeEEC2EPKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #6 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #7

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #4 align 2

declare i32 @_ZN3JPH13BodyInterface16CreateAndAddBodyERKNS_20BodyCreationSettingsENS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256), i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef, double, double, double, double, i8 noundef zeroext, i16 noundef zeroext) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #8 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 24}
!8 = !{!"_ZTS4Test", !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !12, i64 48, !13, i64 56}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"bool", !10, i64 0}
!13 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !14, i64 0}
!14 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !9, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !9, i64 48}
!15 = !{!"long", !10, i64 0}
!16 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !9, i64 0}
!17 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !18, i64 0, !15, i64 8}
!18 = !{!"float", !10, i64 0}
!19 = !{!10, !10, i64 0}
!20 = distinct !{!20, !6}
!21 = distinct !{!21, !6}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass