; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/Physics/SoftBody (SoftBodySharedSettings)

; 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::Array.71" = type { i64, i64, ptr }
%"class.std::priority_queue" = type <{ %"class.JPH::Array.74", [8 x i8] }>
%"class.JPH::Array.74" = type { i64, i64, ptr }
%struct.Open = type { i32, float }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::SoftBodySharedSettings" = type { %"class.JPH::RefTarget", %"class.JPH::Array", %"class.JPH::Array.38", %"class.JPH::Array.41", %"class.JPH::Array.44", %"class.JPH::Array.47", %"class.JPH::Array.50", %"class.JPH::Array.53", %"class.JPH::Array.56", %"class.JPH::Array.59", float, %"class.JPH::Array.62", %"class.JPH::Array.65", %"class.JPH::Array.68" }
%"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.38" = type { i64, i64, ptr }
%"class.JPH::Array.41" = type { i64, i64, ptr }
%"class.JPH::Array.44" = type { i64, i64, ptr }
%"class.JPH::Array.47" = type { i64, i64, ptr }
%"class.JPH::Array.50" = type { i64, i64, ptr }
%"class.JPH::Array.53" = type { i64, i64, ptr }
%"class.JPH::Array.56" = type { i64, i64, ptr }
%"class.JPH::Array.59" = type { i64, i64, ptr }
%"class.JPH::Array.62" = type { i64, i64, ptr }
%"class.JPH::Array.65" = type { i64, i64, ptr }
%"class.JPH::Array.68" = type { i64, i64, ptr }
%"struct.JPH::SoftBodySharedSettings::Edge" = type { [2 x i32], float, float }
%"struct.JPH::SoftBodySharedSettings::Vertex" = type { %"class.JPH::Float3", %"class.JPH::Float3", float }
%"class.JPH::Float3" = type { float, float, float }
%"struct.JPH::SoftBodySharedSettings::ClosestKinematic" = type { i32, float }

; 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 @_ZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEv(ptr noundef nonnull align 8 dereferenceable(304) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.JPH::Array.71", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::priority_queue", align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.Open, align 4
  %13 = alloca %struct.Open, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %struct.Open, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8
  %24 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 11
  %25 = call noundef zeroext i1 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %24)
  br i1 %25, label %27, label %26

26:                                               ; preds = %1
  br label %285

27:                                               ; preds = %1
  %28 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 11
  %29 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 1
  %30 = call noundef i64 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29)
  call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %30)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #8
  call void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %31 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 1
  %32 = invoke noundef i64 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %33 unwind label %47

33:                                               ; preds = %27
  invoke void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %32)
          to label %34 unwind label %47

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %35 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 3
  store ptr %35, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = invoke noundef ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings4EdgeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36)
          to label %38 unwind label %51

38:                                               ; preds = %34
  store ptr %37, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = invoke noundef ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings4EdgeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %39)
          to label %41 unwind label %55

41:                                               ; preds = %38
  store ptr %40, ptr %8, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %83, %41
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = icmp ne ptr %43, %44
  br i1 %45, label %59, label %46

46:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %92

47:                                               ; preds = %33, %27
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %4, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %5, align 4
  br label %288

51:                                               ; preds = %34
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %4, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %5, align 4
  br label %91

55:                                               ; preds = %38
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %4, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %5, align 4
  br label %90

59:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %60, ptr %9, align 8, !tbaa !5
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Edge", ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds [2 x i32], ptr %62, i64 0, i64 0
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %65)
          to label %67 unwind label %86

67:                                               ; preds = %59
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Edge", ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds [2 x i32], ptr %69, i64 0, i64 1
  invoke void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %66, ptr noundef nonnull align 4 dereferenceable(4) %70)
          to label %71 unwind label %86

71:                                               ; preds = %67
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Edge", ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds [2 x i32], ptr %73, i64 0, i64 1
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %76)
          to label %78 unwind label %86

78:                                               ; preds = %71
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Edge", ptr %79, i32 0, i32 0
  %81 = getelementptr inbounds [2 x i32], ptr %80, i64 0, i64 0
  invoke void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 4 dereferenceable(4) %81)
          to label %82 unwind label %86

82:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Edge", ptr %84, i32 1
  store ptr %85, ptr %7, align 8, !tbaa !5
  br label %42

86:                                               ; preds = %78, %71, %67, %59
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %4, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %90

90:                                               ; preds = %86, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %91

91:                                               ; preds = %90, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %288

92:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  invoke void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EEC2IS6_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %93 unwind label %102

93:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %142, %93
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 1
  %98 = invoke noundef i64 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %97)
          to label %99 unwind label %106

99:                                               ; preds = %94
  %100 = icmp ult i64 %96, %98
  br i1 %100, label %110, label %101

101:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %146

102:                                              ; preds = %92
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %4, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %5, align 4
  br label %287

106:                                              ; preds = %125, %119, %110, %94
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %4, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %5, align 4
  br label %145

110:                                              ; preds = %99
  %111 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 1
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113)
          to label %115 unwind label %106

115:                                              ; preds = %110
  %116 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Vertex", ptr %114, i32 0, i32 2
  %117 = load float, ptr %116, align 4, !tbaa !11
  %118 = fcmp oeq float %117, 0.000000e+00
  br i1 %118, label %119, label %141

119:                                              ; preds = %115
  %120 = load i32, ptr %11, align 4, !tbaa !9
  %121 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 11
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = zext i32 %122 to i64
  %124 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123)
          to label %125 unwind label %106

125:                                              ; preds = %119
  %126 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::ClosestKinematic", ptr %124, i32 0, i32 0
  store i32 %120, ptr %126, align 4, !tbaa !15
  %127 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 11
  %128 = load i32, ptr %11, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %129)
          to label %131 unwind label %106

131:                                              ; preds = %125
  %132 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::ClosestKinematic", ptr %130, i32 0, i32 1
  store float 0.000000e+00, ptr %132, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %133 = getelementptr inbounds %struct.Open, ptr %12, i32 0, i32 0
  %134 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %134, ptr %133, align 4, !tbaa !18
  %135 = getelementptr inbounds %struct.Open, ptr %12, i32 0, i32 1
  store float 0.000000e+00, ptr %135, align 4, !tbaa !20
  invoke void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %10, ptr noundef nonnull align 4 dereferenceable(8) %12)
          to label %136 unwind label %137

136:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %141

137:                                              ; preds = %131
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %4, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %145

141:                                              ; preds = %136, %115
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %11, align 4, !tbaa !9
  %144 = add i32 %143, 1
  store i32 %144, ptr %11, align 4, !tbaa !9
  br label %94, !llvm.loop !21

145:                                              ; preds = %137, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %286

146:                                              ; preds = %101
  br label %147

147:                                              ; preds = %282, %146
  %148 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %149 unwind label %171

149:                                              ; preds = %147
  %150 = xor i1 %148, true
  br i1 %150, label %151, label %284

151:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %152 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %153 unwind label %175

153:                                              ; preds = %151
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %152, i64 8, i1 false), !tbaa.struct !23
  invoke void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %10)
          to label %154 unwind label %175

154:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %155 = getelementptr inbounds %struct.Open, ptr %13, i32 0, i32 0
  %156 = load i32, ptr %155, align 4, !tbaa !18
  %157 = zext i32 %156 to i64
  %158 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %157)
          to label %159 unwind label %179

159:                                              ; preds = %154
  store ptr %158, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %160 = load ptr, ptr %14, align 8, !tbaa !5
  %161 = invoke noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %160)
          to label %162 unwind label %183

162:                                              ; preds = %159
  store ptr %161, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %163 = load ptr, ptr %14, align 8, !tbaa !5
  %164 = invoke noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %163)
          to label %165 unwind label %187

165:                                              ; preds = %162
  store ptr %164, ptr %16, align 8, !tbaa !5
  br label %166

166:                                              ; preds = %275, %165
  %167 = load ptr, ptr %15, align 8, !tbaa !5
  %168 = load ptr, ptr %16, align 8, !tbaa !5
  %169 = icmp ne ptr %167, %168
  br i1 %169, label %191, label %170

170:                                              ; preds = %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %282

171:                                              ; preds = %147
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %4, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %5, align 4
  br label %286

175:                                              ; preds = %153, %151
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %4, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %5, align 4
  br label %283

179:                                              ; preds = %154
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %4, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %5, align 4
  br label %281

183:                                              ; preds = %159
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %4, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %5, align 4
  br label %280

187:                                              ; preds = %162
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %4, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %5, align 4
  br label %279

191:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  %193 = load i32, ptr %192, align 4, !tbaa !9
  store i32 %193, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %194 = getelementptr inbounds %struct.Open, ptr %13, i32 0, i32 1
  %195 = load float, ptr %194, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  %196 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 1
  %197 = load i32, ptr %17, align 4, !tbaa !9
  %198 = zext i32 %197 to i64
  %199 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %196, i64 noundef %198)
          to label %200 unwind label %262

200:                                              ; preds = %191
  %201 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Vertex", ptr %199, i32 0, i32 0
  invoke void @_ZN3JPH4Vec3C2ERKNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(12) %201)
          to label %202 unwind label %262

202:                                              ; preds = %200
  %203 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 1
  %204 = getelementptr inbounds %struct.Open, ptr %13, i32 0, i32 0
  %205 = load i32, ptr %204, align 4, !tbaa !18
  %206 = zext i32 %205 to i64
  %207 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %203, i64 noundef %206)
          to label %208 unwind label %262

208:                                              ; preds = %202
  %209 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::Vertex", ptr %207, i32 0, i32 0
  invoke void @_ZN3JPH4Vec3C2ERKNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(12) %209)
          to label %210 unwind label %262

210:                                              ; preds = %208
  %211 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %212 = load double, ptr %211, align 16
  %213 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %214 = load double, ptr %213, align 8
  %215 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %20, double %212, double %214)
          to label %216 unwind label %262

216:                                              ; preds = %210
  %217 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %218 = getelementptr inbounds %union.anon, ptr %217, i32 0, i32 0
  %219 = getelementptr inbounds { double, double }, ptr %218, i32 0, i32 0
  %220 = extractvalue { double, double } %215, 0
  store double %220, ptr %219, align 16
  %221 = getelementptr inbounds { double, double }, ptr %218, i32 0, i32 1
  %222 = extractvalue { double, double } %215, 1
  store double %222, ptr %221, align 8
  %223 = invoke noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %19)
          to label %224 unwind label %262

224:                                              ; preds = %216
  %225 = fadd float %195, %223
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  store float %225, ptr %18, align 4, !tbaa !24
  %226 = load float, ptr %18, align 4, !tbaa !24
  %227 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 11
  %228 = load i32, ptr %17, align 4, !tbaa !9
  %229 = zext i32 %228 to i64
  %230 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %227, i64 noundef %229)
          to label %231 unwind label %266

231:                                              ; preds = %224
  %232 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::ClosestKinematic", ptr %230, i32 0, i32 1
  %233 = load float, ptr %232, align 4, !tbaa !17
  %234 = fcmp olt float %226, %233
  br i1 %234, label %235, label %274

235:                                              ; preds = %231
  %236 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 11
  %237 = getelementptr inbounds %struct.Open, ptr %13, i32 0, i32 0
  %238 = load i32, ptr %237, align 4, !tbaa !18
  %239 = zext i32 %238 to i64
  %240 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %236, i64 noundef %239)
          to label %241 unwind label %266

241:                                              ; preds = %235
  %242 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::ClosestKinematic", ptr %240, i32 0, i32 0
  %243 = load i32, ptr %242, align 4, !tbaa !15
  %244 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 11
  %245 = load i32, ptr %17, align 4, !tbaa !9
  %246 = zext i32 %245 to i64
  %247 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %244, i64 noundef %246)
          to label %248 unwind label %266

248:                                              ; preds = %241
  %249 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::ClosestKinematic", ptr %247, i32 0, i32 0
  store i32 %243, ptr %249, align 4, !tbaa !15
  %250 = load float, ptr %18, align 4, !tbaa !24
  %251 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %23, i32 0, i32 11
  %252 = load i32, ptr %17, align 4, !tbaa !9
  %253 = zext i32 %252 to i64
  %254 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %251, i64 noundef %253)
          to label %255 unwind label %266

255:                                              ; preds = %248
  %256 = getelementptr inbounds %"struct.JPH::SoftBodySharedSettings::ClosestKinematic", ptr %254, i32 0, i32 1
  store float %250, ptr %256, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %257 = getelementptr inbounds %struct.Open, ptr %22, i32 0, i32 0
  %258 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %258, ptr %257, align 4, !tbaa !18
  %259 = getelementptr inbounds %struct.Open, ptr %22, i32 0, i32 1
  %260 = load float, ptr %18, align 4, !tbaa !24
  store float %260, ptr %259, align 4, !tbaa !20
  invoke void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %10, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %261 unwind label %270

261:                                              ; preds = %255
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %274

262:                                              ; preds = %216, %210, %208, %202, %200, %191
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %4, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  br label %278

266:                                              ; preds = %248, %241, %235, %224
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %4, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %5, align 4
  br label %278

270:                                              ; preds = %255
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %4, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %278

274:                                              ; preds = %261, %231
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %275

275:                                              ; preds = %274
  %276 = load ptr, ptr %15, align 8, !tbaa !5
  %277 = getelementptr inbounds i32, ptr %276, i32 1
  store ptr %277, ptr %15, align 8, !tbaa !5
  br label %166

278:                                              ; preds = %270, %266, %262
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %279

279:                                              ; preds = %278, %187
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %280

280:                                              ; preds = %279, %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %281

281:                                              ; preds = %280, %179
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %283

282:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %147, !llvm.loop !25

283:                                              ; preds = %281, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %286

284:                                              ; preds = %149
  call void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  call void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  br label %285

285:                                              ; preds = %284, %26
  ret void

286:                                              ; preds = %283, %171, %145
  call void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %10) #8
  br label %287

287:                                              ; preds = %286, %102
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  br label %288

288:                                              ; preds = %287, %91, %47
  call void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #8
  br label %289

289:                                              ; preds = %288
  %290 = load ptr, ptr %4, align 8
  %291 = load i32, ptr %5, align 4
  %292 = insertvalue { ptr, i32 } poison, ptr %290, 0
  %293 = insertvalue { ptr, i32 } %292, i32 %291, 1
  resume { ptr, i32 } %293
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EEC2IS6_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZNKSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #1 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) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #1 align 2

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16)) #7 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 = { 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 #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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 #8 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !14, i64 24}
!12 = !{!"_ZTSN3JPH22SoftBodySharedSettings6VertexE", !13, i64 0, !13, i64 12, !14, i64 24}
!13 = !{!"_ZTSN3JPH6Float3E", !14, i64 0, !14, i64 4, !14, i64 8}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSN3JPH22SoftBodySharedSettings16ClosestKinematicE", !10, i64 0, !14, i64 4}
!17 = !{!16, !14, i64 4}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4Open", !10, i64 0, !14, i64 4}
!20 = !{!19, !14, i64 4}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{i64 0, i64 4, !9, i64 4, i64 4, !24}
!24 = !{!14, !14, i64 0}
!25 = distinct !{!25, !22}


; 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::Array.71" = type { i64, i64, ptr }
%"class.std::priority_queue" = type <{ %"class.JPH::Array.74", [8 x i8] }>
%"class.JPH::Array.74" = type { i64, i64, ptr }
%struct.Open = type { i32, float }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

; 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 @_ZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEv(ptr noundef nonnull align 8 dereferenceable(304) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.JPH::Array.71", align 8
  %3 = alloca %"class.std::priority_queue", align 8
  %4 = alloca %struct.Open, align 4
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %struct.Open, align 4
  %9 = getelementptr inbounds i8, ptr %0, i64 232
  %10 = tail call noundef zeroext i1 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  br i1 %10, label %11, label %121

11:                                               ; preds = %1
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = tail call noundef i64 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  tail call void @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %13)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  call void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %14 = call noundef i64 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  invoke void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %14)
          to label %15 unwind label %21

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  %17 = call noundef ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings4EdgeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = call noundef ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings4EdgeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %.not55 = icmp eq ptr %17, %18
  br i1 %.not55, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %33, %15
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EEC2IS6_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  %19 = call noundef i64 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %.not64 = icmp eq i64 %19, 0
  br i1 %.not64, label %.preheader, label %.lr.ph59

.lr.ph59:                                         ; preds = %._crit_edge
  %20 = getelementptr inbounds i8, ptr %4, i64 4
  br label %42

21:                                               ; preds = %11
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %123

.lr.ph:                                           ; preds = %15, %33
  %.04156 = phi ptr [ %34, %33 ], [ %17, %15 ]
  %23 = load i32, ptr %.04156, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %24)
          to label %26 unwind label %35

26:                                               ; preds = %.lr.ph
  %27 = getelementptr inbounds i8, ptr %.04156, i64 4
  invoke void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 4 dereferenceable(4) %27)
          to label %28 unwind label %35

28:                                               ; preds = %26
  %29 = load i32, ptr %27, align 4, !tbaa !5
  %30 = zext i32 %29 to i64
  %31 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %30)
          to label %32 unwind label %35

32:                                               ; preds = %28
  invoke void @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(4) %.04156)
          to label %33 unwind label %35

33:                                               ; preds = %32
  %34 = getelementptr inbounds i8, ptr %.04156, i64 16
  %.not = icmp eq ptr %34, %18
  br i1 %.not, label %._crit_edge, label %.lr.ph

35:                                               ; preds = %32, %28, %26, %.lr.ph
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %123

.preheader:                                       ; preds = %58, %._crit_edge
  %37 = getelementptr inbounds i8, ptr %7, i64 8
  %38 = getelementptr inbounds i8, ptr %5, i64 8
  %39 = getelementptr inbounds i8, ptr %8, i64 4
  br label %.loopexit

40:                                               ; preds = %51, %49, %42
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %122

42:                                               ; preds = %.lr.ph59, %58
  %43 = phi i64 [ 0, %.lr.ph59 ], [ %60, %58 ]
  %.04357 = phi i32 [ 0, %.lr.ph59 ], [ %59, %58 ]
  %44 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %43)
          to label %45 unwind label %40

45:                                               ; preds = %42
  %46 = getelementptr inbounds i8, ptr %44, i64 24
  %47 = load float, ptr %46, align 4, !tbaa !9
  %48 = fcmp oeq float %47, 0.000000e+00
  br i1 %48, label %49, label %58

49:                                               ; preds = %45
  %50 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %43)
          to label %51 unwind label %40

51:                                               ; preds = %49
  store i32 %.04357, ptr %50, align 4, !tbaa !13
  %52 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %43)
          to label %53 unwind label %40

53:                                               ; preds = %51
  %54 = getelementptr inbounds i8, ptr %52, i64 4
  store float 0.000000e+00, ptr %54, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store i32 %.04357, ptr %4, align 4, !tbaa !16
  store float 0.000000e+00, ptr %20, align 4, !tbaa !18
  invoke void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %55 unwind label %56

55:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %58

56:                                               ; preds = %53
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %122

58:                                               ; preds = %45, %55
  %59 = add i32 %.04357, 1
  %60 = zext i32 %59 to i64
  %61 = call noundef i64 @_ZNK3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %62 = icmp ugt i64 %61, %60
  br i1 %62, label %42, label %.preheader, !llvm.loop !19

.loopexit:                                        ; preds = %.loopexit.backedge, %.preheader
  %63 = invoke noundef zeroext i1 @_ZNKSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %64 unwind label %74

64:                                               ; preds = %.loopexit
  br i1 %63, label %120, label %65

65:                                               ; preds = %64
  %66 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %67 unwind label %76

67:                                               ; preds = %65
  %.sroa.0.0.copyload = load i32, ptr %66, align 4, !tbaa !5
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %66, i64 4
  %.sroa.7.0.copyload = load float, ptr %.sroa.7.0..sroa_idx, align 4, !tbaa !21
  invoke void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %68 unwind label %76

68:                                               ; preds = %67
  %69 = zext i32 %.sroa.0.0.copyload to i64
  %70 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %69)
          to label %71 unwind label %78

71:                                               ; preds = %68
  %72 = call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %70)
  %73 = call noundef ptr @_ZN3JPH5ArrayIjNS_12STLAllocatorIjEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %70)
  %.not4660 = icmp eq ptr %72, %73
  br i1 %.not4660, label %.loopexit.backedge, label %.lr.ph63

.loopexit.backedge:                               ; preds = %118, %71
  br label %.loopexit, !llvm.loop !22

74:                                               ; preds = %.loopexit
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %122

76:                                               ; preds = %67, %65
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %122

78:                                               ; preds = %68
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %122

.lr.ph63:                                         ; preds = %71, %118
  %.04261 = phi ptr [ %119, %118 ], [ %72, %71 ]
  %80 = load i32, ptr %.04261, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %81 = zext i32 %80 to i64
  %82 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %81)
          to label %83 unwind label %112

83:                                               ; preds = %.lr.ph63
  invoke void @_ZN3JPH4Vec3C2ERKNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(12) %82)
          to label %84 unwind label %112

84:                                               ; preds = %83
  %85 = invoke noundef nonnull align 4 dereferenceable(28) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %69)
          to label %86 unwind label %112

86:                                               ; preds = %84
  invoke void @_ZN3JPH4Vec3C2ERKNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(12) %85)
          to label %87 unwind label %112

87:                                               ; preds = %86
  %88 = load double, ptr %7, align 16
  %89 = load double, ptr %37, align 8
  %90 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %88, double %89)
          to label %91 unwind label %112

91:                                               ; preds = %87
  %92 = extractvalue { double, double } %90, 0
  store double %92, ptr %5, align 16
  %93 = extractvalue { double, double } %90, 1
  store double %93, ptr %38, align 8
  %94 = invoke noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %5)
          to label %95 unwind label %112

95:                                               ; preds = %91
  %96 = fadd float %.sroa.7.0.copyload, %94
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %97 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %81)
          to label %98 unwind label %114

98:                                               ; preds = %95
  %99 = getelementptr inbounds i8, ptr %97, i64 4
  %100 = load float, ptr %99, align 4, !tbaa !15
  %101 = fcmp olt float %96, %100
  br i1 %101, label %102, label %118

102:                                              ; preds = %98
  %103 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %69)
          to label %104 unwind label %114

104:                                              ; preds = %102
  %105 = load i32, ptr %103, align 4, !tbaa !13
  %106 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %81)
          to label %107 unwind label %114

107:                                              ; preds = %104
  store i32 %105, ptr %106, align 4, !tbaa !13
  %108 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_22SoftBodySharedSettings16ClosestKinematicENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %81)
          to label %109 unwind label %114

109:                                              ; preds = %107
  %110 = getelementptr inbounds i8, ptr %108, i64 4
  store float %96, ptr %110, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store i32 %80, ptr %8, align 4, !tbaa !16
  store float %96, ptr %39, align 4, !tbaa !18
  invoke void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %111 unwind label %116

111:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %118

112:                                              ; preds = %91, %87, %86, %84, %83, %.lr.ph63
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %122

114:                                              ; preds = %107, %104, %102, %95
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %122

116:                                              ; preds = %109
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %122

118:                                              ; preds = %111, %98
  %119 = getelementptr inbounds i8, ptr %.04261, i64 4
  %.not46 = icmp eq ptr %119, %73
  br i1 %.not46, label %.loopexit.backedge, label %.lr.ph63, !llvm.loop !22

120:                                              ; preds = %64
  call void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  br label %121

121:                                              ; preds = %1, %120
  ret void

122:                                              ; preds = %76, %112, %114, %116, %78, %40, %56, %74
  %.pn50.pn = phi { ptr, i32 } [ %75, %74 ], [ %57, %56 ], [ %41, %40 ], [ %77, %76 ], [ %79, %78 ], [ %117, %116 ], [ %115, %114 ], [ %113, %112 ]
  call void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %123

123:                                              ; preds = %122, %35, %21
  %.pn53 = phi { ptr, i32 } [ %36, %35 ], [ %.pn50.pn, %122 ], [ %22, %21 ]
  call void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn53
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EEC2IS6_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE4pushEOS2_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZNKSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZNSt14priority_queueIZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4OpenNS0_5ArrayIS2_NS0_12STLAllocatorIS2_EEEESt4lessIS2_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS0_IjNS_12STLAllocatorIjEEEENS1_IS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 = { 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 #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 = { 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 = { 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 #7 = { 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, !12, i64 24}
!10 = !{!"_ZTSN3JPH22SoftBodySharedSettings6VertexE", !11, i64 0, !11, i64 12, !12, i64 24}
!11 = !{!"_ZTSN3JPH6Float3E", !12, i64 0, !12, i64 4, !12, i64 8}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN3JPH22SoftBodySharedSettings16ClosestKinematicE", !6, i64 0, !12, i64 4}
!15 = !{!14, !12, i64 4}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSZN3JPH22SoftBodySharedSettings25CalculateClosestKinematicEvE4Open", !6, i64 0, !12, i64 4}
!18 = !{!17, !12, i64 4}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !12, i64 0}
!22 = distinct !{!22, !20}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass