; LLVM IR from jrouwe/JoltPhysics :: Samples/Utils (SoftBodyCreator)

; 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::Ref" = type { ptr }
%"struct.JPH::SoftBodySharedSettings::Vertex" = type { %"class.JPH::Float3", %"class.JPH::Float3", float }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%class.anon.38 = type { i32, i32 }
%"struct.JPH::SoftBodySharedSettings::Face" = type { [3 x i32], i32 }
%"class.JPH::SoftBodySharedSettings" = type { %"class.JPH::RefTarget", %"class.JPH::Array", %"class.JPH::Array.0", %"class.JPH::Array.3", %"class.JPH::Array.6", %"class.JPH::Array.9", %"class.JPH::Array.12", %"class.JPH::Array.15", %"class.JPH::Array.18", %"class.JPH::Array.21", float, %"class.JPH::Array.24", %"class.JPH::Array.27", %"class.JPH::Array.30" }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.0" = type { i64, i64, ptr }
%"class.JPH::Array.3" = type { i64, i64, ptr }
%"class.JPH::Array.6" = type { i64, i64, ptr }
%"class.JPH::Array.9" = type { i64, i64, ptr }
%"class.JPH::Array.12" = type { i64, i64, ptr }
%"class.JPH::Array.15" = type { i64, i64, ptr }
%"class.JPH::Array.18" = type { i64, i64, ptr }
%"class.JPH::Array.21" = type { i64, i64, ptr }
%"class.JPH::Array.24" = type { i64, i64, ptr }
%"class.JPH::Array.27" = type { i64, i64, ptr }
%"class.JPH::Array.30" = type { i64, i64, ptr }

; 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: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH22SoftBodySharedSettingsnwEm(i64 noundef) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings6VertexC2Ev(ptr noundef nonnull align 4 dereferenceable(28)) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(28)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings4FaceC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304), ptr noundef nonnull align 4 dereferenceable(16)) #4 align 2

declare void @_ZN3JPH22SoftBodySharedSettings17CreateConstraintsEPKNS0_16VertexAttributesEjNS0_9EBendTypeEf(ptr noundef nonnull align 8 dereferenceable(304), ptr noundef, i32 noundef, i32 noundef, float noundef) #7

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings8OptimizeEv(ptr noundef nonnull align 8 dereferenceable(304)) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref") align 8 %0, float noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef nonnull align 4 dereferenceable(20) %5) #4 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.JPH::SoftBodySharedSettings::Vertex", align 4
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %class.anon.38, align 4
  %27 = alloca %"struct.JPH::SoftBodySharedSettings::Face", align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store ptr %0, ptr %7, align 8
  store float %1, ptr %8, align 4, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !11
  store ptr %5, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %30 = call noundef ptr @_ZN3JPH22SoftBodySharedSettingsnwEm(i64 noundef 304)
  invoke void @_ZN3JPH22SoftBodySharedSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(304) %30)
          to label %31 unwind label %82

31:                                               ; preds = %6
  store ptr %30, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 28, ptr %16) #9
  call void @_ZN3JPH22SoftBodySharedSettings6VertexC2Ev(ptr noundef nonnull align 4 dereferenceable(28) %16)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #9
  %32 = load float, ptr %8, align 4, !tbaa !5
  %33 = call { double, double } @_ZN3JPH4Vec314sUnitSphericalEff(float noundef 0.000000e+00, float noundef 0.000000e+00)
  %34 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %35 = getelementptr inbounds %union.anon, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %37 = extractvalue { double, double } %33, 0
  store double %37, ptr %36, align 16
  %38 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %39 = extractvalue { double, double } %33, 1
  store double %39, ptr %38, align 8
  %40 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %41 = load double, ptr %40, align 16
  %42 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %43 = load double, ptr %42, align 8
  %44 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %32, double %41, double %43)
  %45 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %46 = getelementptr inbounds %union.anon, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %48 = extractvalue { double, double } %44, 0
  store double %48, ptr %47, align 16
  %49 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %50 = extractvalue { double, double } %44, 1
  store double %50, ptr %49, align 8
  %51 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Vertex", ptr %16, i32 0, i32 0
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef %51)
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #9
  %52 = load ptr, ptr %13, align 8, !tbaa !13
  %53 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %52, i32 0, i32 1
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 4 dereferenceable(28) %16)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #9
  %54 = load float, ptr %8, align 4, !tbaa !5
  %55 = call { double, double } @_ZN3JPH4Vec314sUnitSphericalEff(float noundef 0x400921FB60000000, float noundef 0.000000e+00)
  %56 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %57 = getelementptr inbounds %union.anon, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 0
  %59 = extractvalue { double, double } %55, 0
  store double %59, ptr %58, align 16
  %60 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 1
  %61 = extractvalue { double, double } %55, 1
  store double %61, ptr %60, align 8
  %62 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %63 = load double, ptr %62, align 16
  %64 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %65 = load double, ptr %64, align 8
  %66 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %54, double %63, double %65)
  %67 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %68 = getelementptr inbounds %union.anon, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 0
  %70 = extractvalue { double, double } %66, 0
  store double %70, ptr %69, align 16
  %71 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 1
  %72 = extractvalue { double, double } %66, 1
  store double %72, ptr %71, align 8
  %73 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Vertex", ptr %16, i32 0, i32 0
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %19, ptr noundef %73)
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  %74 = load ptr, ptr %13, align 8, !tbaa !13
  %75 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %74, i32 0, i32 1
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 4 dereferenceable(28) %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 1, ptr %21, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %132, %31
  %77 = load i32, ptr %21, align 4, !tbaa !9
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = sub i32 %78, 1
  %80 = icmp ult i32 %77, %79
  br i1 %80, label %86, label %81

81:                                               ; preds = %76
  store i32 2, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %135

82:                                               ; preds = %6
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %14, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %15, align 4
  call void @_ZN3JPH22SoftBodySharedSettingsdlEPv(ptr noundef %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %223

86:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %128, %86
  %88 = load i32, ptr %23, align 4, !tbaa !9
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = icmp ult i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 5, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %131

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #9
  %93 = load float, ptr %8, align 4, !tbaa !5
  %94 = load i32, ptr %21, align 4, !tbaa !9
  %95 = uitofp i32 %94 to float
  %96 = fmul float 0x400921FB60000000, %95
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = sub i32 %97, 1
  %99 = uitofp i32 %98 to float
  %100 = fdiv float %96, %99
  %101 = load i32, ptr %23, align 4, !tbaa !9
  %102 = uitofp i32 %101 to float
  %103 = fmul float 0x401921FB60000000, %102
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = uitofp i32 %104 to float
  %106 = fdiv float %103, %105
  %107 = call { double, double } @_ZN3JPH4Vec314sUnitSphericalEff(float noundef %100, float noundef %106)
  %108 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %109 = getelementptr inbounds %union.anon, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds { double, double }, ptr %109, i32 0, i32 0
  %111 = extractvalue { double, double } %107, 0
  store double %111, ptr %110, align 16
  %112 = getelementptr inbounds { double, double }, ptr %109, i32 0, i32 1
  %113 = extractvalue { double, double } %107, 1
  store double %113, ptr %112, align 8
  %114 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %115 = load double, ptr %114, align 16
  %116 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %117 = load double, ptr %116, align 8
  %118 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %93, double %115, double %117)
  %119 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %120 = getelementptr inbounds %union.anon, ptr %119, i32 0, i32 0
  %121 = getelementptr inbounds { double, double }, ptr %120, i32 0, i32 0
  %122 = extractvalue { double, double } %118, 0
  store double %122, ptr %121, align 16
  %123 = getelementptr inbounds { double, double }, ptr %120, i32 0, i32 1
  %124 = extractvalue { double, double } %118, 1
  store double %124, ptr %123, align 8
  %125 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Vertex", ptr %16, i32 0, i32 0
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %24, ptr noundef %125)
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #9
  %126 = load ptr, ptr %13, align 8, !tbaa !13
  %127 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %126, i32 0, i32 1
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %127, ptr noundef nonnull align 4 dereferenceable(28) %16)
  br label %128

128:                                              ; preds = %92
  %129 = load i32, ptr %23, align 4, !tbaa !9
  %130 = add i32 %129, 1
  store i32 %130, ptr %23, align 4, !tbaa !9
  br label %87, !llvm.loop !15

131:                                              ; preds = %91
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %21, align 4, !tbaa !9
  %134 = add i32 %133, 1
  store i32 %134, ptr %21, align 4, !tbaa !9
  br label %76, !llvm.loop !17

135:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %136 = getelementptr inbounds %class.anon.38, ptr %26, i32 0, i32 0
  %137 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %137, ptr %136, align 4, !tbaa !18
  %138 = getelementptr inbounds %class.anon.38, ptr %26, i32 0, i32 1
  %139 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %139, ptr %138, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #9
  call void @_ZN3JPH22SoftBodySharedSettings4FaceC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %27) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %213, %135
  %141 = load i32, ptr %28, align 4, !tbaa !9
  %142 = load i32, ptr %10, align 4, !tbaa !9
  %143 = icmp ult i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 8, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %216

145:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %190, %145
  %147 = load i32, ptr %29, align 4, !tbaa !9
  %148 = load i32, ptr %9, align 4, !tbaa !9
  %149 = sub i32 %148, 2
  %150 = icmp ult i32 %147, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %146
  store i32 11, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  br label %193

152:                                              ; preds = %146
  %153 = load i32, ptr %29, align 4, !tbaa !9
  %154 = load i32, ptr %28, align 4, !tbaa !9
  %155 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %153, i32 noundef %154)
  %156 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %27, i32 0, i32 0
  %157 = getelementptr inbounds [3 x i32], ptr %156, i64 0, i64 0
  store i32 %155, ptr %157, align 4, !tbaa !9
  %158 = load i32, ptr %29, align 4, !tbaa !9
  %159 = add i32 %158, 1
  %160 = load i32, ptr %28, align 4, !tbaa !9
  %161 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %159, i32 noundef %160)
  %162 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %27, i32 0, i32 0
  %163 = getelementptr inbounds [3 x i32], ptr %162, i64 0, i64 1
  store i32 %161, ptr %163, align 4, !tbaa !9
  %164 = load i32, ptr %29, align 4, !tbaa !9
  %165 = add i32 %164, 1
  %166 = load i32, ptr %28, align 4, !tbaa !9
  %167 = add i32 %166, 1
  %168 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %165, i32 noundef %167)
  %169 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %27, i32 0, i32 0
  %170 = getelementptr inbounds [3 x i32], ptr %169, i64 0, i64 2
  store i32 %168, ptr %170, align 4, !tbaa !9
  %171 = load ptr, ptr %13, align 8, !tbaa !13
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %171, ptr noundef nonnull align 4 dereferenceable(16) %27)
  %172 = load i32, ptr %29, align 4, !tbaa !9
  %173 = icmp ugt i32 %172, 0
  br i1 %173, label %174, label %189

174:                                              ; preds = %152
  %175 = load i32, ptr %29, align 4, !tbaa !9
  %176 = add i32 %175, 1
  %177 = load i32, ptr %28, align 4, !tbaa !9
  %178 = add i32 %177, 1
  %179 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %176, i32 noundef %178)
  %180 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %27, i32 0, i32 0
  %181 = getelementptr inbounds [3 x i32], ptr %180, i64 0, i64 1
  store i32 %179, ptr %181, align 4, !tbaa !9
  %182 = load i32, ptr %29, align 4, !tbaa !9
  %183 = load i32, ptr %28, align 4, !tbaa !9
  %184 = add i32 %183, 1
  %185 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %182, i32 noundef %184)
  %186 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %27, i32 0, i32 0
  %187 = getelementptr inbounds [3 x i32], ptr %186, i64 0, i64 2
  store i32 %185, ptr %187, align 4, !tbaa !9
  %188 = load ptr, ptr %13, align 8, !tbaa !13
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %188, ptr noundef nonnull align 4 dereferenceable(16) %27)
  br label %189

189:                                              ; preds = %174, %152
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %29, align 4, !tbaa !9
  %192 = add i32 %191, 1
  store i32 %192, ptr %29, align 4, !tbaa !9
  br label %146, !llvm.loop !21

193:                                              ; preds = %151
  %194 = load i32, ptr %9, align 4, !tbaa !9
  %195 = sub i32 %194, 2
  %196 = load i32, ptr %28, align 4, !tbaa !9
  %197 = add i32 %196, 1
  %198 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %195, i32 noundef %197)
  %199 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %27, i32 0, i32 0
  %200 = getelementptr inbounds [3 x i32], ptr %199, i64 0, i64 0
  store i32 %198, ptr %200, align 4, !tbaa !9
  %201 = load i32, ptr %9, align 4, !tbaa !9
  %202 = sub i32 %201, 2
  %203 = load i32, ptr %28, align 4, !tbaa !9
  %204 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %202, i32 noundef %203)
  %205 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %27, i32 0, i32 0
  %206 = getelementptr inbounds [3 x i32], ptr %205, i64 0, i64 1
  store i32 %204, ptr %206, align 4, !tbaa !9
  %207 = load i32, ptr %9, align 4, !tbaa !9
  %208 = sub i32 %207, 1
  %209 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %208, i32 noundef 0)
  %210 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %27, i32 0, i32 0
  %211 = getelementptr inbounds [3 x i32], ptr %210, i64 0, i64 2
  store i32 %209, ptr %211, align 4, !tbaa !9
  %212 = load ptr, ptr %13, align 8, !tbaa !13
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %212, ptr noundef nonnull align 4 dereferenceable(16) %27)
  br label %213

213:                                              ; preds = %193
  %214 = load i32, ptr %28, align 4, !tbaa !9
  %215 = add i32 %214, 1
  store i32 %215, ptr %28, align 4, !tbaa !9
  br label %140, !llvm.loop !22

216:                                              ; preds = %144
  %217 = load ptr, ptr %13, align 8, !tbaa !13
  %218 = load ptr, ptr %12, align 8, !tbaa !13
  %219 = load i32, ptr %11, align 4, !tbaa !11
  %220 = call noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef 8.000000e+00)
  call void @_ZN3JPH22SoftBodySharedSettings17CreateConstraintsEPKNS0_16VertexAttributesEjNS0_9EBendTypeEf(ptr noundef nonnull align 8 dereferenceable(304) %217, ptr noundef %218, i32 noundef 1, i32 noundef %219, float noundef %220)
  %221 = load ptr, ptr %13, align 8, !tbaa !13
  call void @_ZN3JPH22SoftBodySharedSettings8OptimizeEv(ptr noundef nonnull align 8 dereferenceable(304) %221)
  %222 = load ptr, ptr %13, align 8, !tbaa !13
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %222)
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 28, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  ret void

223:                                              ; preds = %82
  %224 = load ptr, ptr %14, align 8
  %225 = load i32, ptr %15, align 4
  %226 = insertvalue { ptr, i32 } poison, ptr %224, 0
  %227 = insertvalue { ptr, i32 } %226, i32 %225, 1
  resume { ptr, i32 } %227
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) #8 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { "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 = { 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 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN3JPH22SoftBodySharedSettings9EBendTypeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEE3$_0", !10, i64 0, !10, i64 4}
!20 = !{!19, !10, i64 4}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}


; 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::Ref" = type { ptr }
%"struct.JPH::SoftBodySharedSettings::Vertex" = type { %"class.JPH::Float3", %"class.JPH::Float3", float }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%class.anon.38 = type { i32, i32 }
%"struct.JPH::SoftBodySharedSettings::Face" = type { [3 x i32], i32 }

; 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: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH22SoftBodySharedSettingsnwEm(i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings6VertexC2Ev(ptr noundef nonnull align 4 dereferenceable(28)) unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(28)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings4FaceC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #4 align 2

declare void @_ZN3JPH22SoftBodySharedSettings17CreateConstraintsEPKNS0_16VertexAttributesEjNS0_9EBendTypeEf(ptr noundef nonnull align 8 dereferenceable(304), ptr noundef, i32 noundef, i32 noundef, float noundef) local_unnamed_addr #7

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettings8OptimizeEv(ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref") align 8 %0, float noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef nonnull align 4 dereferenceable(20) %5) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"struct.JPH::SoftBodySharedSettings::Vertex", align 4
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %class.anon.38, align 4
  %12 = alloca %"struct.JPH::SoftBodySharedSettings::Face", align 4
  %13 = tail call noundef ptr @_ZN3JPH22SoftBodySharedSettingsnwEm(i64 noundef 304)
  invoke void @_ZN3JPH22SoftBodySharedSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(304) %13)
          to label %14 unwind label %68

14:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %7) #9
  call void @_ZN3JPH22SoftBodySharedSettings6VertexC2Ev(ptr noundef nonnull align 4 dereferenceable(28) %7)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #9
  %15 = call { double, double } @_ZN3JPH4Vec314sUnitSphericalEff(float noundef 0.000000e+00, float noundef 0.000000e+00)
  %16 = extractvalue { double, double } %15, 0
  %17 = extractvalue { double, double } %15, 1
  %18 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %1, double %16, double %17)
  %19 = extractvalue { double, double } %18, 0
  store double %19, ptr %8, align 16
  %20 = getelementptr inbounds i8, ptr %8, i64 8
  %21 = extractvalue { double, double } %18, 1
  store double %21, ptr %20, align 8
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  %22 = getelementptr inbounds i8, ptr %13, i64 8
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 4 dereferenceable(28) %7)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #9
  %23 = call { double, double } @_ZN3JPH4Vec314sUnitSphericalEff(float noundef 0x400921FB60000000, float noundef 0.000000e+00)
  %24 = extractvalue { double, double } %23, 0
  %25 = extractvalue { double, double } %23, 1
  %26 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %1, double %24, double %25)
  %27 = extractvalue { double, double } %26, 0
  store double %27, ptr %9, align 16
  %28 = getelementptr inbounds i8, ptr %9, i64 8
  %29 = extractvalue { double, double } %26, 1
  store double %29, ptr %28, align 8
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %9, ptr noundef nonnull %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #9
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 4 dereferenceable(28) %7)
  %30 = add i32 %2, -1
  %31 = icmp ugt i32 %30, 1
  br i1 %31, label %.preheader59.lr.ph, label %._crit_edge63

.preheader59.lr.ph:                               ; preds = %14
  %.not = icmp eq i32 %3, 0
  %32 = uitofp i32 %30 to float
  %33 = uitofp i32 %3 to float
  %34 = getelementptr inbounds i8, ptr %10, i64 8
  br i1 %.not, label %._crit_edge63, label %.preheader59.us

.preheader59.us:                                  ; preds = %.preheader59.lr.ph, %._crit_edge.us
  %.05462.us = phi i32 [ %49, %._crit_edge.us ], [ 1, %.preheader59.lr.ph ]
  %35 = uitofp i32 %.05462.us to float
  %36 = fmul float %35, 0x400921FB60000000
  %37 = fdiv float %36, %32
  br label %38

38:                                               ; preds = %.preheader59.us, %38
  %.05561.us = phi i32 [ 0, %.preheader59.us ], [ %48, %38 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #9
  %39 = uitofp i32 %.05561.us to float
  %40 = fmul float %39, 0x401921FB60000000
  %41 = fdiv float %40, %33
  %42 = call { double, double } @_ZN3JPH4Vec314sUnitSphericalEff(float noundef %37, float noundef %41)
  %43 = extractvalue { double, double } %42, 0
  %44 = extractvalue { double, double } %42, 1
  %45 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %1, double %43, double %44)
  %46 = extractvalue { double, double } %45, 0
  store double %46, ptr %10, align 16
  %47 = extractvalue { double, double } %45, 1
  store double %47, ptr %34, align 8
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 4 dereferenceable(28) %7)
  %48 = add nuw i32 %.05561.us, 1
  %exitcond.not = icmp eq i32 %48, %3
  br i1 %exitcond.not, label %._crit_edge.us, label %38, !llvm.loop !5

._crit_edge.us:                                   ; preds = %38
  %49 = add nuw i32 %.05462.us, 1
  %exitcond73.not = icmp eq i32 %49, %30
  br i1 %exitcond73.not, label %._crit_edge63, label %.preheader59.us, !llvm.loop !7

._crit_edge63:                                    ; preds = %._crit_edge.us, %.preheader59.lr.ph, %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  store i32 %2, ptr %11, align 4, !tbaa !8
  %50 = getelementptr inbounds i8, ptr %11, i64 4
  store i32 %3, ptr %50, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #9
  call void @_ZN3JPH22SoftBodySharedSettings4FaceC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %12) #9
  %.not69 = icmp eq i32 %3, 0
  br i1 %.not69, label %._crit_edge67, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge63
  %51 = add i32 %2, -2
  %.not70 = icmp eq i32 %51, 0
  %52 = getelementptr inbounds i8, ptr %12, i64 4
  %53 = getelementptr inbounds i8, ptr %12, i64 8
  br i1 %.not70, label %.preheader, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %exitcond74.peel.not = icmp eq i32 %51, 1
  br label %54

54:                                               ; preds = %._crit_edge.us68, %.preheader.us.preheader
  %.05366.us = phi i32 [ %55, %._crit_edge.us68 ], [ 0, %.preheader.us.preheader ]
  %55 = add nuw i32 %.05366.us, 1
  %56 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef 0, i32 noundef %.05366.us)
  store i32 %56, ptr %12, align 4, !tbaa !14
  %57 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef 1, i32 noundef %.05366.us)
  store i32 %57, ptr %52, align 4, !tbaa !14
  %58 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef 1, i32 noundef %55)
  store i32 %58, ptr %53, align 4, !tbaa !14
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %13, ptr noundef nonnull align 4 dereferenceable(16) %12)
  br i1 %exitcond74.peel.not, label %._crit_edge.us68, label %.peel.next

.peel.next:                                       ; preds = %54, %.peel.next
  %.064.us = phi i32 [ %60, %.peel.next ], [ 1, %54 ]
  %59 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %.064.us, i32 noundef %.05366.us)
  store i32 %59, ptr %12, align 4, !tbaa !14
  %60 = add nuw i32 %.064.us, 1
  %61 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %60, i32 noundef %.05366.us)
  store i32 %61, ptr %52, align 4, !tbaa !14
  %62 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %60, i32 noundef %55)
  store i32 %62, ptr %53, align 4, !tbaa !14
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %13, ptr noundef nonnull align 4 dereferenceable(16) %12)
  %63 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %60, i32 noundef %55)
  store i32 %63, ptr %52, align 4, !tbaa !14
  %64 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %.064.us, i32 noundef %55)
  store i32 %64, ptr %53, align 4, !tbaa !14
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %13, ptr noundef nonnull align 4 dereferenceable(16) %12)
  %exitcond74.not = icmp eq i32 %60, %51
  br i1 %exitcond74.not, label %._crit_edge.us68, label %.peel.next, !llvm.loop !15

._crit_edge.us68:                                 ; preds = %.peel.next, %54
  %65 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %51, i32 noundef %55)
  store i32 %65, ptr %12, align 4, !tbaa !14
  %66 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %51, i32 noundef %.05366.us)
  store i32 %66, ptr %52, align 4, !tbaa !14
  %67 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %30, i32 noundef 0)
  store i32 %67, ptr %53, align 4, !tbaa !14
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %13, ptr noundef nonnull align 4 dereferenceable(16) %12)
  %exitcond76.not = icmp eq i32 %55, %3
  br i1 %exitcond76.not, label %._crit_edge67, label %54, !llvm.loop !17

68:                                               ; preds = %6
  %69 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH22SoftBodySharedSettingsdlEPv(ptr noundef %13) #9
  resume { ptr, i32 } %69

.preheader:                                       ; preds = %.preheader.lr.ph, %.preheader
  %.05366 = phi i32 [ %70, %.preheader ], [ 0, %.preheader.lr.ph ]
  %70 = add nuw i32 %.05366, 1
  %71 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef 0, i32 noundef %70)
  store i32 %71, ptr %12, align 4, !tbaa !14
  %72 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef 0, i32 noundef %.05366)
  store i32 %72, ptr %52, align 4, !tbaa !14
  %73 = call noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %30, i32 noundef 0)
  store i32 %73, ptr %53, align 4, !tbaa !14
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %13, ptr noundef nonnull align 4 dereferenceable(16) %12)
  %exitcond77.not = icmp eq i32 %70, %3
  br i1 %exitcond77.not, label %._crit_edge67, label %.preheader, !llvm.loop !17

._crit_edge67:                                    ; preds = %._crit_edge.us68, %.preheader, %._crit_edge63
  %74 = call noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef 8.000000e+00)
  call void @_ZN3JPH22SoftBodySharedSettings17CreateConstraintsEPKNS0_16VertexAttributesEjNS0_9EBendTypeEf(ptr noundef nonnull align 8 dereferenceable(304) %13, ptr noundef nonnull %5, i32 noundef 1, i32 noundef %4, float noundef %74)
  call void @_ZN3JPH22SoftBodySharedSettings8OptimizeEv(ptr noundef nonnull align 8 dereferenceable(304) %13)
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %7) #9
  ret void
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @"_ZZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, i32 noundef) local_unnamed_addr #8 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { "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 = { 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 = distinct !{!7, !6}
!8 = !{!9, !10, i64 0}
!9 = !{!"_ZTSZN15SoftBodyCreator12CreateSphereEfjjN3JPH22SoftBodySharedSettings9EBendTypeERKNS1_16VertexAttributesEE3$_0", !10, i64 0, !10, i64 4}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!9, !10, i64 4}
!14 = !{!10, !10, i64 0}
!15 = distinct !{!15, !6, !16}
!16 = !{!"llvm.loop.peeled.count", i32 1}
!17 = distinct !{!17, !6}


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