; 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 = type { 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: mustprogress uwtable
define dso_local void @_ZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref") align 8 %0, i32 noundef %1, i32 noundef %2, float noundef %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %6, ptr noundef nonnull align 4 dereferenceable(20) %7) #1 personality ptr @__gxx_personality_v0 {
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.JPH::SoftBodySharedSettings::Vertex", align 4
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %class.anon, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %"struct.JPH::SoftBodySharedSettings::Face", align 4
  store ptr %0, ptr %9, align 8
  store i32 %1, ptr %10, align 4, !tbaa !5
  store i32 %2, ptr %11, align 4, !tbaa !5
  store float %3, ptr %12, align 4, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !11
  store ptr %5, ptr %14, align 8, !tbaa !11
  store i32 %6, ptr %15, align 4, !tbaa !13
  store ptr %7, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %33 = load float, ptr %12, align 4, !tbaa !9
  %34 = fmul float -5.000000e-01, %33
  %35 = load i32, ptr %10, align 4, !tbaa !5
  %36 = sub i32 %35, 1
  %37 = uitofp i32 %36 to float
  %38 = fmul float %34, %37
  store float %38, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  %39 = load float, ptr %12, align 4, !tbaa !9
  %40 = fmul float -5.000000e-01, %39
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = sub i32 %41, 1
  %43 = uitofp i32 %42 to float
  %44 = fmul float %40, %43
  store float %44, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %45 = call noundef ptr @_ZN3JPH22SoftBodySharedSettingsnwEm(i64 noundef 304)
  invoke void @_ZN3JPH22SoftBodySharedSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(304) %45)
          to label %46 unwind label %52

46:                                               ; preds = %8
  store ptr %45, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %106, %46
  %48 = load i32, ptr %22, align 4, !tbaa !5
  %49 = load i32, ptr %11, align 4, !tbaa !5
  %50 = icmp ult i32 %48, %49
  br i1 %50, label %56, label %51

51:                                               ; preds = %47
  store i32 2, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %109

52:                                               ; preds = %8
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %20, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %21, align 4
  call void @_ZN3JPH22SoftBodySharedSettingsdlEPv(ptr noundef %45) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  br label %173

56:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %102, %56
  %58 = load i32, ptr %24, align 4, !tbaa !5
  %59 = load i32, ptr %10, align 4, !tbaa !5
  %60 = icmp ult i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  br label %105

62:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 28, ptr %25) #10
  call void @_ZN3JPH22SoftBodySharedSettings6VertexC2Ev(ptr noundef nonnull align 4 dereferenceable(28) %25)
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #10
  %63 = load ptr, ptr %14, align 8, !tbaa !11
  %64 = load i32, ptr %24, align 4, !tbaa !5
  %65 = load i32, ptr %22, align 4, !tbaa !5
  %66 = call { double, double } @_ZNKSt8functionIFN3JPH4Vec3EjjEEclEjj(ptr noundef nonnull align 8 dereferenceable(32) %63, i32 noundef %64, i32 noundef %65)
  %67 = getelementptr inbounds %"class.JPH::Vec3", ptr %27, 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 = load float, ptr %17, align 4, !tbaa !9
  %74 = load i32, ptr %24, align 4, !tbaa !5
  %75 = uitofp i32 %74 to float
  %76 = load float, ptr %12, align 4, !tbaa !9
  %77 = call float @llvm.fmuladd.f32(float %75, float %76, float %73)
  %78 = load float, ptr %18, align 4, !tbaa !9
  %79 = load i32, ptr %22, align 4, !tbaa !5
  %80 = uitofp i32 %79 to float
  %81 = load float, ptr %12, align 4, !tbaa !9
  %82 = call float @llvm.fmuladd.f32(float %80, float %81, float %78)
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %28, float noundef %77, float noundef 0.000000e+00, float noundef %82)
  %83 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %84 = load double, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %86 = load double, ptr %85, align 8
  %87 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %27, double %84, double %86)
  %88 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %89 = getelementptr inbounds %union.anon, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 0
  %91 = extractvalue { double, double } %87, 0
  store double %91, ptr %90, align 16
  %92 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 1
  %93 = extractvalue { double, double } %87, 1
  store double %93, ptr %92, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #10
  %94 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Vertex", ptr %25, i32 0, i32 0
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %26, ptr noundef %94)
  %95 = load ptr, ptr %13, align 8, !tbaa !11
  %96 = load i32, ptr %24, align 4, !tbaa !5
  %97 = load i32, ptr %22, align 4, !tbaa !5
  %98 = call noundef float @_ZNKSt8functionIFfjjEEclEjj(ptr noundef nonnull align 8 dereferenceable(32) %95, i32 noundef %96, i32 noundef %97)
  %99 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Vertex", ptr %25, i32 0, i32 2
  store float %98, ptr %99, align 4, !tbaa !15
  %100 = load ptr, ptr %19, align 8, !tbaa !11
  %101 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %100, i32 0, i32 1
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %101, ptr noundef nonnull align 4 dereferenceable(28) %25)
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #10
  call void @llvm.lifetime.end.p0(i64 28, ptr %25) #10
  br label %102

102:                                              ; preds = %62
  %103 = load i32, ptr %24, align 4, !tbaa !5
  %104 = add i32 %103, 1
  store i32 %104, ptr %24, align 4, !tbaa !5
  br label %57, !llvm.loop !18

105:                                              ; preds = %61
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %22, align 4, !tbaa !5
  %108 = add i32 %107, 1
  store i32 %108, ptr %22, align 4, !tbaa !5
  br label %47, !llvm.loop !20

109:                                              ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %110 = getelementptr inbounds %class.anon, ptr %29, i32 0, i32 0
  %111 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %111, ptr %110, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #10
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %163, %109
  %113 = load i32, ptr %30, align 4, !tbaa !5
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = sub i32 %114, 1
  %116 = icmp ult i32 %113, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %112
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #10
  br label %166

118:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #10
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %159, %118
  %120 = load i32, ptr %31, align 4, !tbaa !5
  %121 = load i32, ptr %10, align 4, !tbaa !5
  %122 = sub i32 %121, 1
  %123 = icmp ult i32 %120, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %119
  store i32 11, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #10
  br label %162

125:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #10
  call void @_ZN3JPH22SoftBodySharedSettings4FaceC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %32) #10
  %126 = load i32, ptr %31, align 4, !tbaa !5
  %127 = load i32, ptr %30, align 4, !tbaa !5
  %128 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef %126, i32 noundef %127)
  %129 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %32, i32 0, i32 0
  %130 = getelementptr inbounds [3 x i32], ptr %129, i64 0, i64 0
  store i32 %128, ptr %130, align 4, !tbaa !5
  %131 = load i32, ptr %31, align 4, !tbaa !5
  %132 = load i32, ptr %30, align 4, !tbaa !5
  %133 = add i32 %132, 1
  %134 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef %131, i32 noundef %133)
  %135 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %32, i32 0, i32 0
  %136 = getelementptr inbounds [3 x i32], ptr %135, i64 0, i64 1
  store i32 %134, ptr %136, align 4, !tbaa !5
  %137 = load i32, ptr %31, align 4, !tbaa !5
  %138 = add i32 %137, 1
  %139 = load i32, ptr %30, align 4, !tbaa !5
  %140 = add i32 %139, 1
  %141 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef %138, i32 noundef %140)
  %142 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %32, i32 0, i32 0
  %143 = getelementptr inbounds [3 x i32], ptr %142, i64 0, i64 2
  store i32 %141, ptr %143, align 4, !tbaa !5
  %144 = load ptr, ptr %19, align 8, !tbaa !11
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %144, ptr noundef nonnull align 4 dereferenceable(16) %32)
  %145 = load i32, ptr %31, align 4, !tbaa !5
  %146 = add i32 %145, 1
  %147 = load i32, ptr %30, align 4, !tbaa !5
  %148 = add i32 %147, 1
  %149 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef %146, i32 noundef %148)
  %150 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %32, i32 0, i32 0
  %151 = getelementptr inbounds [3 x i32], ptr %150, i64 0, i64 1
  store i32 %149, ptr %151, align 4, !tbaa !5
  %152 = load i32, ptr %31, align 4, !tbaa !5
  %153 = add i32 %152, 1
  %154 = load i32, ptr %30, align 4, !tbaa !5
  %155 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef %153, i32 noundef %154)
  %156 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Face", ptr %32, i32 0, i32 0
  %157 = getelementptr inbounds [3 x i32], ptr %156, i64 0, i64 2
  store i32 %155, ptr %157, align 4, !tbaa !5
  %158 = load ptr, ptr %19, align 8, !tbaa !11
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %158, ptr noundef nonnull align 4 dereferenceable(16) %32)
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #10
  br label %159

159:                                              ; preds = %125
  %160 = load i32, ptr %31, align 4, !tbaa !5
  %161 = add i32 %160, 1
  store i32 %161, ptr %31, align 4, !tbaa !5
  br label %119, !llvm.loop !23

162:                                              ; preds = %124
  br label %163

163:                                              ; preds = %162
  %164 = load i32, ptr %30, align 4, !tbaa !5
  %165 = add i32 %164, 1
  store i32 %165, ptr %30, align 4, !tbaa !5
  br label %112, !llvm.loop !24

166:                                              ; preds = %117
  %167 = load ptr, ptr %19, align 8, !tbaa !11
  %168 = load ptr, ptr %16, align 8, !tbaa !11
  %169 = load i32, ptr %15, align 4, !tbaa !13
  %170 = call noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef 8.000000e+00)
  call void @_ZN3JPH22SoftBodySharedSettings17CreateConstraintsEPKNS0_16VertexAttributesEjNS0_9EBendTypeEf(ptr noundef nonnull align 8 dereferenceable(304) %167, ptr noundef %168, i32 noundef 1, i32 noundef %169, float noundef %170)
  %171 = load ptr, ptr %19, align 8, !tbaa !11
  call void @_ZN3JPH22SoftBodySharedSettings8OptimizeEv(ptr noundef nonnull align 8 dereferenceable(304) %171)
  %172 = load ptr, ptr %19, align 8, !tbaa !11
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %172)
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  ret void

173:                                              ; preds = %52
  %174 = load ptr, ptr %20, align 8
  %175 = load i32, ptr %21, align 4
  %176 = insertvalue { ptr, i32 } poison, ptr %174, 0
  %177 = insertvalue { ptr, i32 } %176, i32 %175, 1
  resume { ptr, i32 } %177
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNKSt8functionIFN3JPH4Vec3EjjEEclEjj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #5 align 2

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

; 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 #5 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: mustprogress uwtable
declare dso_local noundef float @_ZNKSt8functionIFfjjEEclEjj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #1 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)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) #8 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)) #1 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 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 = { 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 #3 = { 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 #4 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #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 = { "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 #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 = !{!"int", !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 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN3JPH22SoftBodySharedSettings9EBendTypeE", !7, i64 0}
!15 = !{!16, !10, i64 24}
!16 = !{!"_ZTSN3JPH22SoftBodySharedSettings6VertexE", !17, i64 0, !17, i64 12, !10, i64 24}
!17 = !{!"_ZTSN3JPH6Float3E", !10, i64 0, !10, i64 4, !10, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTSZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEE3$_0", !6, i64 0}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}


; 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 = type { 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: mustprogress uwtable
define dso_local void @_ZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref") align 8 %0, i32 noundef %1, i32 noundef %2, float noundef %3, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %6, ptr noundef nonnull align 4 dereferenceable(20) %7) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %9 = alloca %"struct.JPH::SoftBodySharedSettings::Vertex", align 4
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %class.anon, align 4
  %14 = alloca %"struct.JPH::SoftBodySharedSettings::Face", align 4
  %15 = fmul float %3, -5.000000e-01
  %16 = add i32 %1, -1
  %17 = uitofp i32 %16 to float
  %18 = fmul float %15, %17
  %19 = add i32 %2, -1
  %20 = uitofp i32 %19 to float
  %21 = fmul float %15, %20
  %22 = tail call noundef ptr @_ZN3JPH22SoftBodySharedSettingsnwEm(i64 noundef 304)
  invoke void @_ZN3JPH22SoftBodySharedSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(304) %22)
          to label %.preheader52 unwind label %54

.preheader52:                                     ; preds = %8
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %._crit_edge55.thread, label %.preheader51.lr.ph

._crit_edge55.thread:                             ; preds = %.preheader52
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #10
  store i32 %1, ptr %13, align 4, !tbaa !5
  br label %.preheader.lr.ph

.preheader51.lr.ph:                               ; preds = %.preheader52
  %.not60 = icmp eq i32 %1, 0
  %23 = getelementptr inbounds i8, ptr %11, i64 8
  %24 = getelementptr inbounds i8, ptr %12, i64 8
  %25 = getelementptr inbounds i8, ptr %10, i64 8
  %26 = getelementptr inbounds i8, ptr %9, i64 24
  %27 = getelementptr inbounds i8, ptr %22, i64 8
  br i1 %.not60, label %._crit_edge55, label %.preheader51.us

.preheader51.us:                                  ; preds = %.preheader51.lr.ph, %._crit_edge.us
  %.05054.us = phi i32 [ %43, %._crit_edge.us ], [ 0, %.preheader51.lr.ph ]
  %28 = uitofp i32 %.05054.us to float
  %29 = call float @llvm.fmuladd.f32(float %28, float %3, float %21)
  br label %30

30:                                               ; preds = %.preheader51.us, %30
  %.04953.us = phi i32 [ 0, %.preheader51.us ], [ %42, %30 ]
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %9) #10
  call void @_ZN3JPH22SoftBodySharedSettings6VertexC2Ev(ptr noundef nonnull align 4 dereferenceable(28) %9)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #10
  %31 = call { double, double } @_ZNKSt8functionIFN3JPH4Vec3EjjEEclEjj(ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %.04953.us, i32 noundef %.05054.us)
  %32 = extractvalue { double, double } %31, 0
  store double %32, ptr %11, align 16
  %33 = extractvalue { double, double } %31, 1
  store double %33, ptr %23, align 8
  %34 = uitofp i32 %.04953.us to float
  %35 = call float @llvm.fmuladd.f32(float %34, float %3, float %18)
  call void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef %35, float noundef 0.000000e+00, float noundef %29)
  %36 = load double, ptr %12, align 16
  %37 = load double, ptr %24, align 8
  %38 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %36, double %37)
  %39 = extractvalue { double, double } %38, 0
  store double %39, ptr %10, align 16
  %40 = extractvalue { double, double } %38, 1
  store double %40, ptr %25, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #10
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %10, ptr noundef nonnull %9)
  %41 = call noundef float @_ZNKSt8functionIFfjjEEclEjj(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %.04953.us, i32 noundef %.05054.us)
  store float %41, ptr %26, align 4, !tbaa !10
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 4 dereferenceable(28) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #10
  %42 = add nuw i32 %.04953.us, 1
  %exitcond.not = icmp eq i32 %42, %1
  br i1 %exitcond.not, label %._crit_edge.us, label %30, !llvm.loop !14

._crit_edge.us:                                   ; preds = %30
  %43 = add nuw i32 %.05054.us, 1
  %exitcond65.not = icmp eq i32 %43, %2
  br i1 %exitcond65.not, label %._crit_edge55, label %.preheader51.us, !llvm.loop !16

._crit_edge55:                                    ; preds = %._crit_edge.us, %.preheader51.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #10
  store i32 %1, ptr %13, align 4, !tbaa !5
  %.not61 = icmp eq i32 %19, 0
  br i1 %.not61, label %._crit_edge58, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge55.thread, %._crit_edge55
  %.not62 = icmp eq i32 %16, 0
  %44 = getelementptr inbounds i8, ptr %14, i64 4
  %45 = getelementptr inbounds i8, ptr %14, i64 8
  br i1 %.not62, label %._crit_edge58, label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge.us59
  %.04857.us = phi i32 [ %46, %._crit_edge.us59 ], [ 0, %.preheader.lr.ph ]
  %46 = add nuw i32 %.04857.us, 1
  br label %47

47:                                               ; preds = %.preheader.us, %47
  %.056.us = phi i32 [ 0, %.preheader.us ], [ %50, %47 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #10
  call void @_ZN3JPH22SoftBodySharedSettings4FaceC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %14) #10
  %48 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %.056.us, i32 noundef %.04857.us)
  store i32 %48, ptr %14, align 4, !tbaa !17
  %49 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %.056.us, i32 noundef %46)
  store i32 %49, ptr %44, align 4, !tbaa !17
  %50 = add nuw i32 %.056.us, 1
  %51 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %50, i32 noundef %46)
  store i32 %51, ptr %45, align 4, !tbaa !17
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %22, ptr noundef nonnull align 4 dereferenceable(16) %14)
  %52 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %50, i32 noundef %46)
  store i32 %52, ptr %44, align 4, !tbaa !17
  %53 = call noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef %50, i32 noundef %.04857.us)
  store i32 %53, ptr %45, align 4, !tbaa !17
  call void @_ZN3JPH22SoftBodySharedSettings7AddFaceERKNS0_4FaceE(ptr noundef nonnull align 8 dereferenceable(304) %22, ptr noundef nonnull align 4 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #10
  %exitcond66.not = icmp eq i32 %50, %16
  br i1 %exitcond66.not, label %._crit_edge.us59, label %47, !llvm.loop !18

._crit_edge.us59:                                 ; preds = %47
  %exitcond67.not = icmp eq i32 %46, %19
  br i1 %exitcond67.not, label %._crit_edge58, label %.preheader.us, !llvm.loop !19

54:                                               ; preds = %8
  %55 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3JPH22SoftBodySharedSettingsdlEPv(ptr noundef %22) #10
  resume { ptr, i32 } %55

._crit_edge58:                                    ; preds = %._crit_edge.us59, %.preheader.lr.ph, %._crit_edge55
  %56 = call noundef float @_ZN3JPH16DegreesToRadiansEf(float noundef 8.000000e+00)
  call void @_ZN3JPH22SoftBodySharedSettings17CreateConstraintsEPKNS0_16VertexAttributesEjNS0_9EBendTypeEf(ptr noundef nonnull align 8 dereferenceable(304) %22, ptr noundef nonnull %7, i32 noundef 1, i32 noundef %6, float noundef %56)
  call void @_ZN3JPH22SoftBodySharedSettings8OptimizeEv(ptr noundef nonnull align 8 dereferenceable(304) %22)
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %22)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #10
  ret void
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNKSt8functionIFN3JPH4Vec3EjjEEclEjj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #5 align 2

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

; 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 #5 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: mustprogress uwtable
declare dso_local noundef float @_ZNKSt8functionIFfjjEEclEjj(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #1 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 #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @"_ZZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEENK3$_0clEjj"(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) local_unnamed_addr #8 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 #1 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 #9

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #3 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 = { 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 #3 = { 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 #4 = { 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 #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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #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 = { "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 #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, !7, i64 0}
!6 = !{!"_ZTSZN15SoftBodyCreator11CreateClothEjjfRKSt8functionIFfjjEERKS0_IFN3JPH4Vec3EjjEENS5_22SoftBodySharedSettings9EBendTypeERKNSB_16VertexAttributesEE3$_0", !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !13, i64 24}
!11 = !{!"_ZTSN3JPH22SoftBodySharedSettings6VertexE", !12, i64 0, !12, i64 12, !13, i64 24}
!12 = !{!"_ZTSN3JPH6Float3E", !13, i64 0, !13, i64 4, !13, i64 8}
!13 = !{!"float", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}


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