; LLVM IR from jrouwe/JoltPhysics :: TestFramework/Renderer (DebugRendererImp)

; 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::Color" = type { %union.anon.0 }
%union.anon.0 = type { i32 }
%"class.JPH::Ref.17" = type { ptr }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Float2" = type { float, float }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::DebugRenderer::Vertex" = type { %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float2", %"class.JPH::Color" }
%"class.JPH::IndexedTriangleNoMaterial" = type { [3 x i32] }

@_ZN3JPH5Color6sWhiteE = external global %"class.JPH::Color", align 4

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) #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) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6Float3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13DebugRenderer19CreateTriangleBatchERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS1_INS_25IndexedTriangleNoMaterialENS3_IS8_EEEE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref.17") align 8 %0, ptr noundef nonnull align 8 dereferenceable(320) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #7 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.JPH::Array", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca %"class.JPH::Float3", align 4
  %14 = alloca %"class.JPH::Float2", align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca [3 x %"class.JPH::Vec3"], align 16
  %19 = alloca i32, align 4
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca i32, align 4
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca i64, align 8
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  call void @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = invoke noundef i64 @_ZNK3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
          to label %37 unwind label %46

37:                                               ; preds = %4
  invoke void @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %36)
          to label %38 unwind label %46

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %39

39:                                               ; preds = %77, %38
  %40 = load i64, ptr %12, align 8, !tbaa !9
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = invoke noundef i64 @_ZNK3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %41)
          to label %43 unwind label %50

43:                                               ; preds = %39
  %44 = icmp ult i64 %40, %42
  br i1 %44, label %54, label %45

45:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %89

46:                                               ; preds = %315, %310, %306, %304, %302, %37, %4
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %10, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %11, align 4
  br label %322

50:                                               ; preds = %71, %58, %54, %39
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %10, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %11, align 4
  br label %88

54:                                               ; preds = %43
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = load i64, ptr %12, align 8, !tbaa !9
  %57 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %56)
          to label %58 unwind label %50

58:                                               ; preds = %54
  %59 = load i64, ptr %12, align 8, !tbaa !9
  %60 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %59)
          to label %61 unwind label %50

61:                                               ; preds = %58
  %62 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %60, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %62, ptr align 4 %57, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #8
  invoke void @_ZN3JPH6Float3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %63 unwind label %80

63:                                               ; preds = %61
  %64 = load i64, ptr %12, align 8, !tbaa !9
  %65 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %64)
          to label %66 unwind label %80

66:                                               ; preds = %63
  %67 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %65, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %67, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  invoke void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef 0.000000e+00, float noundef 0.000000e+00)
          to label %68 unwind label %84

68:                                               ; preds = %66
  %69 = load i64, ptr %12, align 8, !tbaa !9
  %70 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %69)
          to label %71 unwind label %84

71:                                               ; preds = %68
  %72 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %70, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %72, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  %73 = load i64, ptr %12, align 8, !tbaa !9
  %74 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %73)
          to label %75 unwind label %50

75:                                               ; preds = %71
  %76 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %74, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %76, ptr align 4 @_ZN3JPH5Color6sWhiteE, i64 4, i1 false), !tbaa.struct !15
  br label %77

77:                                               ; preds = %75
  %78 = load i64, ptr %12, align 8, !tbaa !9
  %79 = add i64 %78, 1
  store i64 %79, ptr %12, align 8, !tbaa !9
  br label %39, !llvm.loop !17

80:                                               ; preds = %63, %61
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %10, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #8
  br label %88

84:                                               ; preds = %68, %66
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %10, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %88

88:                                               ; preds = %84, %80, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %322

89:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %250, %89
  %91 = load i64, ptr %15, align 8, !tbaa !9
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = invoke noundef i64 @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %92)
          to label %94 unwind label %97

94:                                               ; preds = %90
  %95 = icmp ult i64 %91, %93
  br i1 %95, label %101, label %96

96:                                               ; preds = %94
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %257

97:                                               ; preds = %90
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %10, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %11, align 4
  br label %256

101:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = load i64, ptr %15, align 8, !tbaa !9
  %104 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %103)
          to label %105 unwind label %110

105:                                              ; preds = %101
  store ptr %104, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !19
  br label %106

106:                                              ; preds = %136, %105
  %107 = load i32, ptr %19, align 4, !tbaa !19
  %108 = icmp slt i32 %107, 3
  br i1 %108, label %114, label %109

109:                                              ; preds = %106
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %143

110:                                              ; preds = %101
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %10, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %11, align 4
  br label %255

114:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  %115 = load ptr, ptr %17, align 8, !tbaa !5
  %116 = getelementptr inbounds %"class.JPH::IndexedTriangleNoMaterial", ptr %115, i32 0, i32 0
  %117 = load i32, ptr %19, align 4, !tbaa !19
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [3 x i32], ptr %116, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !19
  %121 = zext i32 %120 to i64
  %122 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %121)
          to label %123 unwind label %139

123:                                              ; preds = %114
  %124 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %122, i32 0, i32 0
  %125 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %124)
          to label %126 unwind label %139

126:                                              ; preds = %123
  %127 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %128 = getelementptr inbounds %union.anon, ptr %127, i32 0, i32 0
  %129 = getelementptr inbounds { double, double }, ptr %128, i32 0, i32 0
  %130 = extractvalue { double, double } %125, 0
  store double %130, ptr %129, align 16
  %131 = getelementptr inbounds { double, double }, ptr %128, i32 0, i32 1
  %132 = extractvalue { double, double } %125, 1
  store double %132, ptr %131, align 8
  %133 = load i32, ptr %19, align 4, !tbaa !19
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 %134
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %135, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %136

136:                                              ; preds = %126
  %137 = load i32, ptr %19, align 4, !tbaa !19
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %19, align 4, !tbaa !19
  br label %106, !llvm.loop !22

139:                                              ; preds = %123, %114
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %10, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %254

143:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  %144 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 1
  %145 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %145, i64 16, i1 false), !tbaa.struct !21
  %146 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %147 = load double, ptr %146, align 16
  %148 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %149 = load double, ptr %148, align 8
  %150 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %144, double %147, double %149)
          to label %151 unwind label %196

151:                                              ; preds = %143
  %152 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %153 = getelementptr inbounds %union.anon, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds { double, double }, ptr %153, i32 0, i32 0
  %155 = extractvalue { double, double } %150, 0
  store double %155, ptr %154, align 16
  %156 = getelementptr inbounds { double, double }, ptr %153, i32 0, i32 1
  %157 = extractvalue { double, double } %150, 1
  store double %157, ptr %156, align 8
  %158 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 2
  %159 = getelementptr inbounds [3 x %"class.JPH::Vec3"], ptr %18, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %159, i64 16, i1 false), !tbaa.struct !21
  %160 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %161 = load double, ptr %160, align 16
  %162 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %163 = load double, ptr %162, align 8
  %164 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %158, double %161, double %163)
          to label %165 unwind label %196

165:                                              ; preds = %151
  %166 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %167 = getelementptr inbounds %union.anon, ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 0
  %169 = extractvalue { double, double } %164, 0
  store double %169, ptr %168, align 16
  %170 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 1
  %171 = extractvalue { double, double } %164, 1
  store double %171, ptr %170, align 8
  %172 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %173 = load double, ptr %172, align 16
  %174 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %175 = load double, ptr %174, align 8
  %176 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %23, double %173, double %175)
          to label %177 unwind label %196

177:                                              ; preds = %165
  %178 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %179 = getelementptr inbounds %union.anon, ptr %178, i32 0, i32 0
  %180 = getelementptr inbounds { double, double }, ptr %179, i32 0, i32 0
  %181 = extractvalue { double, double } %176, 0
  store double %181, ptr %180, align 16
  %182 = getelementptr inbounds { double, double }, ptr %179, i32 0, i32 1
  %183 = extractvalue { double, double } %176, 1
  store double %183, ptr %182, align 8
  %184 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %22)
          to label %185 unwind label %196

185:                                              ; preds = %177
  %186 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %187 = getelementptr inbounds %union.anon, ptr %186, i32 0, i32 0
  %188 = getelementptr inbounds { double, double }, ptr %187, i32 0, i32 0
  %189 = extractvalue { double, double } %184, 0
  store double %189, ptr %188, align 16
  %190 = getelementptr inbounds { double, double }, ptr %187, i32 0, i32 1
  %191 = extractvalue { double, double } %184, 1
  store double %191, ptr %190, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !19
  br label %192

192:                                              ; preds = %242, %185
  %193 = load i32, ptr %27, align 4, !tbaa !19
  %194 = icmp slt i32 %193, 3
  br i1 %194, label %200, label %195

195:                                              ; preds = %192
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %249

196:                                              ; preds = %177, %165, %151, %143
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %10, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %253

200:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  %201 = load ptr, ptr %17, align 8, !tbaa !5
  %202 = getelementptr inbounds %"class.JPH::IndexedTriangleNoMaterial", ptr %201, i32 0, i32 0
  %203 = load i32, ptr %27, align 4, !tbaa !19
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [3 x i32], ptr %202, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !19
  %207 = zext i32 %206 to i64
  %208 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %207)
          to label %209 unwind label %245

209:                                              ; preds = %200
  %210 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %208, i32 0, i32 1
  %211 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %210)
          to label %212 unwind label %245

212:                                              ; preds = %209
  %213 = getelementptr inbounds %"class.JPH::Vec3", ptr %29, i32 0, i32 0
  %214 = getelementptr inbounds %union.anon, ptr %213, i32 0, i32 0
  %215 = getelementptr inbounds { double, double }, ptr %214, i32 0, i32 0
  %216 = extractvalue { double, double } %211, 0
  store double %216, ptr %215, align 16
  %217 = getelementptr inbounds { double, double }, ptr %214, i32 0, i32 1
  %218 = extractvalue { double, double } %211, 1
  store double %218, ptr %217, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %21, i64 16, i1 false), !tbaa.struct !21
  %219 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %220 = load double, ptr %219, align 16
  %221 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %222 = load double, ptr %221, align 8
  %223 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %29, double %220, double %222)
          to label %224 unwind label %245

224:                                              ; preds = %212
  %225 = getelementptr inbounds %"class.JPH::Vec3", ptr %28, i32 0, i32 0
  %226 = getelementptr inbounds %union.anon, ptr %225, i32 0, i32 0
  %227 = getelementptr inbounds { double, double }, ptr %226, i32 0, i32 0
  %228 = extractvalue { double, double } %223, 0
  store double %228, ptr %227, align 16
  %229 = getelementptr inbounds { double, double }, ptr %226, i32 0, i32 1
  %230 = extractvalue { double, double } %223, 1
  store double %230, ptr %229, align 8
  %231 = load ptr, ptr %17, align 8, !tbaa !5
  %232 = getelementptr inbounds %"class.JPH::IndexedTriangleNoMaterial", ptr %231, i32 0, i32 0
  %233 = load i32, ptr %27, align 4, !tbaa !19
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [3 x i32], ptr %232, i64 0, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !19
  %237 = zext i32 %236 to i64
  %238 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %237)
          to label %239 unwind label %245

239:                                              ; preds = %224
  %240 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %238, i32 0, i32 1
  invoke void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %28, ptr noundef %240)
          to label %241 unwind label %245

241:                                              ; preds = %239
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  br label %242

242:                                              ; preds = %241
  %243 = load i32, ptr %27, align 4, !tbaa !19
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %27, align 4, !tbaa !19
  br label %192, !llvm.loop !23

245:                                              ; preds = %239, %224, %212, %209, %200
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %10, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %253

249:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %250

250:                                              ; preds = %249
  %251 = load i64, ptr %15, align 8, !tbaa !9
  %252 = add i64 %251, 1
  store i64 %252, ptr %15, align 8, !tbaa !9
  br label %90, !llvm.loop !24

253:                                              ; preds = %245, %196
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #8
  br label %254

254:                                              ; preds = %253, %139
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #8
  br label %255

255:                                              ; preds = %254, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %256

256:                                              ; preds = %255, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %322

257:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  store i64 0, ptr %31, align 8, !tbaa !9
  br label %258

258:                                              ; preds = %294, %257
  %259 = load i64, ptr %31, align 8, !tbaa !9
  %260 = invoke noundef i64 @_ZNK3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %261 unwind label %264

261:                                              ; preds = %258
  %262 = icmp ult i64 %259, %260
  br i1 %262, label %268, label %263

263:                                              ; preds = %261
  store i32 14, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %302

264:                                              ; preds = %258
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %10, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %11, align 4
  br label %301

268:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #8
  %269 = load i64, ptr %31, align 8, !tbaa !9
  %270 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %269)
          to label %271 unwind label %297

271:                                              ; preds = %268
  %272 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %270, i32 0, i32 1
  %273 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %272)
          to label %274 unwind label %297

274:                                              ; preds = %271
  %275 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %276 = getelementptr inbounds %union.anon, ptr %275, i32 0, i32 0
  %277 = getelementptr inbounds { double, double }, ptr %276, i32 0, i32 0
  %278 = extractvalue { double, double } %273, 0
  store double %278, ptr %277, align 16
  %279 = getelementptr inbounds { double, double }, ptr %276, i32 0, i32 1
  %280 = extractvalue { double, double } %273, 1
  store double %280, ptr %279, align 8
  %281 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %33)
          to label %282 unwind label %297

282:                                              ; preds = %274
  %283 = getelementptr inbounds %"class.JPH::Vec3", ptr %32, i32 0, i32 0
  %284 = getelementptr inbounds %union.anon, ptr %283, i32 0, i32 0
  %285 = getelementptr inbounds { double, double }, ptr %284, i32 0, i32 0
  %286 = extractvalue { double, double } %281, 0
  store double %286, ptr %285, align 16
  %287 = getelementptr inbounds { double, double }, ptr %284, i32 0, i32 1
  %288 = extractvalue { double, double } %281, 1
  store double %288, ptr %287, align 8
  %289 = load i64, ptr %31, align 8, !tbaa !9
  %290 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %289)
          to label %291 unwind label %297

291:                                              ; preds = %282
  %292 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %290, i32 0, i32 1
  invoke void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %32, ptr noundef %292)
          to label %293 unwind label %297

293:                                              ; preds = %291
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  br label %294

294:                                              ; preds = %293
  %295 = load i64, ptr %31, align 8, !tbaa !9
  %296 = add i64 %295, 1
  store i64 %296, ptr %31, align 8, !tbaa !9
  br label %258, !llvm.loop !25

297:                                              ; preds = %291, %282, %274, %271, %268
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %10, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  br label %301

301:                                              ; preds = %297, %264
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %322

302:                                              ; preds = %263
  %303 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0)
          to label %304 unwind label %46

304:                                              ; preds = %302
  %305 = invoke noundef i64 @_ZNK3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %306 unwind label %46

306:                                              ; preds = %304
  %307 = trunc i64 %305 to i32
  %308 = load ptr, ptr %8, align 8, !tbaa !5
  %309 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %308, i64 noundef 0)
          to label %310 unwind label %46

310:                                              ; preds = %306
  %311 = getelementptr inbounds %"class.JPH::IndexedTriangleNoMaterial", ptr %309, i32 0, i32 0
  %312 = getelementptr inbounds [3 x i32], ptr %311, i64 0, i64 0
  %313 = load ptr, ptr %8, align 8, !tbaa !5
  %314 = invoke noundef i64 @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %313)
          to label %315 unwind label %46

315:                                              ; preds = %310
  %316 = mul i64 3, %314
  %317 = trunc i64 %316 to i32
  %318 = load ptr, ptr %34, align 8, !tbaa !26
  %319 = getelementptr inbounds ptr, ptr %318, i64 5
  %320 = load ptr, ptr %319, align 8
  invoke void %320(ptr dead_on_unwind writable sret(%"class.JPH::Ref.17") align 8 %0, ptr noundef nonnull align 8 dereferenceable(320) %34, ptr noundef %303, i32 noundef %307, ptr noundef %312, i32 noundef %317)
          to label %321 unwind label %46

321:                                              ; preds = %315
  store i32 1, ptr %16, align 4
  call void @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  ret void

322:                                              ; preds = %301, %256, %88, %46
  call void @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  br label %323

323:                                              ; preds = %322
  %324 = load ptr, ptr %10, align 8
  %325 = load i32, ptr %11, align 4
  %326 = insertvalue { ptr, i32 } poison, ptr %324, 0
  %327 = insertvalue { ptr, i32 } %326, i32 %325, 1
  resume { ptr, i32 } %327
}

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress 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 = !{!"long", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{i64 0, i64 4, !12, i64 4, i64 4, !12}
!15 = !{i64 0, i64 4, !16}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{i64 0, i64 16, !16}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !8, i64 0}


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

%"class.JPH::Color" = type { %union.anon.0 }
%union.anon.0 = type { i32 }
%"class.JPH::Ref.17" = type { ptr }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Float2" = type { float, float }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

@_ZN3JPH5Color6sWhiteE = external local_unnamed_addr global %"class.JPH::Color", align 4

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #4 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 #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6Float3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13DebugRenderer19CreateTriangleBatchERKNS_5ArrayINS_6Float3ENS_12STLAllocatorIS2_EEEERKNS1_INS_25IndexedTriangleNoMaterialENS3_IS8_EEEE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Ref.17") align 8 %0, ptr noundef nonnull align 8 dereferenceable(320) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #7 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.JPH::Array", align 8
  %6 = alloca %"class.JPH::Float3", align 4
  %7 = alloca %"class.JPH::Float2", align 8
  %8 = alloca [3 x %"class.JPH::Vec3"], align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %15 = call noundef i64 @_ZNK3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  invoke void @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %15)
          to label %.preheader61 unwind label %24

.preheader61:                                     ; preds = %4
  %16 = call noundef i64 @_ZNK3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %.not = icmp eq i64 %16, 0
  br i1 %.not, label %.preheader60, label %.lr.ph

.preheader60:                                     ; preds = %40, %.preheader61
  %17 = call noundef i64 @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %.not69 = icmp eq i64 %17, 0
  br i1 %.not69, label %.preheader, label %.lr.ph66

.lr.ph66:                                         ; preds = %.preheader60
  %18 = getelementptr inbounds i8, ptr %8, i64 16
  %.sroa.213.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  %19 = getelementptr inbounds i8, ptr %10, i64 8
  %20 = getelementptr inbounds i8, ptr %8, i64 32
  %21 = getelementptr inbounds i8, ptr %9, i64 8
  %22 = getelementptr inbounds i8, ptr %12, i64 8
  %23 = getelementptr inbounds i8, ptr %11, i64 8
  %.sroa.516.0..sroa_idx.1 = getelementptr inbounds i8, ptr %8, i64 24
  %.sroa.516.0..sroa_idx.2 = getelementptr inbounds i8, ptr %8, i64 40
  br label %53

24:                                               ; preds = %192, %189, %._crit_edge, %4
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %201

26:                                               ; preds = %36, %29, %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %201

.lr.ph:                                           ; preds = %.preheader61, %40
  %.05062 = phi i64 [ %43, %40 ], [ 0, %.preheader61 ]
  %28 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05062)
          to label %29 unwind label %26

29:                                               ; preds = %.lr.ph
  %30 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.05062)
          to label %31 unwind label %26

31:                                               ; preds = %29
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %28, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #8
  call void @_ZN3JPH6Float3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %32 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.05062)
          to label %33 unwind label %46

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %32, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %6, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %35 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.05062)
          to label %36 unwind label %48

36:                                               ; preds = %33
  %37 = getelementptr inbounds i8, ptr %35, i64 24
  %38 = load i64, ptr %7, align 8
  store i64 %38, ptr %37, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  %39 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.05062)
          to label %40 unwind label %26

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %39, i64 32
  %42 = load i32, ptr @_ZN3JPH5Color6sWhiteE, align 4, !tbaa !10
  store i32 %42, ptr %41, align 4, !tbaa !10
  %43 = add nuw i64 %.05062, 1
  %44 = call noundef i64 @_ZNK3JPH5ArrayINS_6Float3ENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %45 = icmp ult i64 %43, %44
  br i1 %45, label %.lr.ph, label %.preheader60, !llvm.loop !11

46:                                               ; preds = %31
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  br label %201

48:                                               ; preds = %33
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %201

.preheader:                                       ; preds = %160, %.preheader60
  %50 = call noundef i64 @_ZNK3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %.not70 = icmp eq i64 %50, 0
  br i1 %.not70, label %._crit_edge, label %.lr.ph68

.lr.ph68:                                         ; preds = %.preheader
  %51 = getelementptr inbounds i8, ptr %14, i64 8
  %52 = getelementptr inbounds i8, ptr %13, i64 8
  br label %168

53:                                               ; preds = %.lr.ph66, %160
  %.05165 = phi i64 [ 0, %.lr.ph66 ], [ %161, %160 ]
  %54 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.05165)
          to label %55 unwind label %59

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #8
  %56 = load i32, ptr %54, align 4, !tbaa !13
  %57 = zext i32 %56 to i64
  %58 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %57)
          to label %61 unwind label %85

59:                                               ; preds = %53
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %201

61:                                               ; preds = %55
  %62 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %58)
          to label %63 unwind label %85

63:                                               ; preds = %61
  %64 = extractvalue { double, double } %62, 0
  %65 = extractvalue { double, double } %62, 1
  store double %64, ptr %8, align 16
  store double %65, ptr %.sroa.213.0..sroa_idx, align 8, !tbaa !10
  %66 = getelementptr inbounds i8, ptr %54, i64 4
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = zext i32 %67 to i64
  %69 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %68)
          to label %70 unwind label %85

70:                                               ; preds = %63
  %71 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %69)
          to label %72 unwind label %85

72:                                               ; preds = %70
  %73 = extractvalue { double, double } %71, 0
  %74 = extractvalue { double, double } %71, 1
  store double %73, ptr %18, align 16
  store double %74, ptr %.sroa.516.0..sroa_idx.1, align 8, !tbaa !10
  %75 = getelementptr inbounds i8, ptr %54, i64 8
  %76 = load i32, ptr %75, align 4, !tbaa !13
  %77 = zext i32 %76 to i64
  %78 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %77)
          to label %79 unwind label %85

79:                                               ; preds = %72
  %80 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %78)
          to label %81 unwind label %85

81:                                               ; preds = %79
  %82 = extractvalue { double, double } %80, 0
  %83 = extractvalue { double, double } %80, 1
  store double %82, ptr %20, align 16
  store double %83, ptr %.sroa.516.0..sroa_idx.2, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %.sroa.012.0.copyload = load double, ptr %8, align 16
  %.sroa.213.0.copyload = load double, ptr %.sroa.213.0..sroa_idx, align 8, !tbaa !10
  %84 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %.sroa.012.0.copyload, double %.sroa.213.0.copyload)
          to label %87 unwind label %105

85:                                               ; preds = %79, %72, %70, %63, %61, %55
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %166

87:                                               ; preds = %81
  %88 = extractvalue { double, double } %84, 0
  store double %88, ptr %10, align 16
  %89 = extractvalue { double, double } %84, 1
  store double %89, ptr %19, align 8
  %.sroa.08.0.copyload = load double, ptr %8, align 16
  %.sroa.29.0.copyload = load double, ptr %.sroa.213.0..sroa_idx, align 8, !tbaa !10
  %90 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %20, double %.sroa.08.0.copyload, double %.sroa.29.0.copyload)
          to label %91 unwind label %105

91:                                               ; preds = %87
  %92 = extractvalue { double, double } %90, 0
  %93 = extractvalue { double, double } %90, 1
  %94 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %92, double %93)
          to label %95 unwind label %105

95:                                               ; preds = %91
  %96 = extractvalue { double, double } %94, 0
  store double %96, ptr %9, align 16
  %97 = extractvalue { double, double } %94, 1
  store double %97, ptr %21, align 8
  %98 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %9)
          to label %99 unwind label %105

99:                                               ; preds = %95
  %100 = extractvalue { double, double } %98, 0
  %101 = extractvalue { double, double } %98, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  %102 = load i32, ptr %54, align 4, !tbaa !13
  %103 = zext i32 %102 to i64
  %104 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %103)
          to label %107 unwind label %164

105:                                              ; preds = %95, %91, %87, %81
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br label %166

107:                                              ; preds = %99
  %108 = getelementptr inbounds i8, ptr %104, i64 12
  %109 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %108)
          to label %110 unwind label %164

110:                                              ; preds = %107
  %111 = extractvalue { double, double } %109, 0
  store double %111, ptr %12, align 16
  %112 = extractvalue { double, double } %109, 1
  store double %112, ptr %22, align 8
  %113 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %100, double %101)
          to label %114 unwind label %164

114:                                              ; preds = %110
  %115 = extractvalue { double, double } %113, 0
  store double %115, ptr %11, align 16
  %116 = extractvalue { double, double } %113, 1
  store double %116, ptr %23, align 8
  %117 = load i32, ptr %54, align 4, !tbaa !13
  %118 = zext i32 %117 to i64
  %119 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %118)
          to label %120 unwind label %164

120:                                              ; preds = %114
  %121 = getelementptr inbounds i8, ptr %119, i64 12
  invoke void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull %121)
          to label %122 unwind label %164

122:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  %123 = load i32, ptr %66, align 4, !tbaa !13
  %124 = zext i32 %123 to i64
  %125 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %124)
          to label %126 unwind label %164

126:                                              ; preds = %122
  %127 = getelementptr inbounds i8, ptr %125, i64 12
  %128 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %127)
          to label %129 unwind label %164

129:                                              ; preds = %126
  %130 = extractvalue { double, double } %128, 0
  store double %130, ptr %12, align 16
  %131 = extractvalue { double, double } %128, 1
  store double %131, ptr %22, align 8
  %132 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %100, double %101)
          to label %133 unwind label %164

133:                                              ; preds = %129
  %134 = extractvalue { double, double } %132, 0
  store double %134, ptr %11, align 16
  %135 = extractvalue { double, double } %132, 1
  store double %135, ptr %23, align 8
  %136 = load i32, ptr %66, align 4, !tbaa !13
  %137 = zext i32 %136 to i64
  %138 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %137)
          to label %139 unwind label %164

139:                                              ; preds = %133
  %140 = getelementptr inbounds i8, ptr %138, i64 12
  invoke void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull %140)
          to label %141 unwind label %164

141:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  %142 = load i32, ptr %75, align 4, !tbaa !13
  %143 = zext i32 %142 to i64
  %144 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %143)
          to label %145 unwind label %164

145:                                              ; preds = %141
  %146 = getelementptr inbounds i8, ptr %144, i64 12
  %147 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %146)
          to label %148 unwind label %164

148:                                              ; preds = %145
  %149 = extractvalue { double, double } %147, 0
  store double %149, ptr %12, align 16
  %150 = extractvalue { double, double } %147, 1
  store double %150, ptr %22, align 8
  %151 = invoke { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %100, double %101)
          to label %152 unwind label %164

152:                                              ; preds = %148
  %153 = extractvalue { double, double } %151, 0
  store double %153, ptr %11, align 16
  %154 = extractvalue { double, double } %151, 1
  store double %154, ptr %23, align 8
  %155 = load i32, ptr %75, align 4, !tbaa !13
  %156 = zext i32 %155 to i64
  %157 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %156)
          to label %158 unwind label %164

158:                                              ; preds = %152
  %159 = getelementptr inbounds i8, ptr %157, i64 12
  invoke void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %11, ptr noundef nonnull %159)
          to label %160 unwind label %164

160:                                              ; preds = %158
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #8
  %161 = add nuw i64 %.05165, 1
  %162 = call noundef i64 @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %163 = icmp ult i64 %161, %162
  br i1 %163, label %53, label %.preheader, !llvm.loop !15

164:                                              ; preds = %158, %152, %148, %145, %141, %139, %133, %129, %126, %122, %120, %114, %110, %107, %99
  %165 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  br label %166

166:                                              ; preds = %105, %164, %85
  %.pn54 = phi { ptr, i32 } [ %86, %85 ], [ %165, %164 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #8
  br label %201

._crit_edge:                                      ; preds = %183, %.preheader
  %167 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0)
          to label %189 unwind label %24

168:                                              ; preds = %.lr.ph68, %183
  %.067 = phi i64 [ 0, %.lr.ph68 ], [ %184, %183 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  %169 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.067)
          to label %170 unwind label %187

170:                                              ; preds = %168
  %171 = getelementptr inbounds i8, ptr %169, i64 12
  %172 = invoke { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12) %171)
          to label %173 unwind label %187

173:                                              ; preds = %170
  %174 = extractvalue { double, double } %172, 0
  store double %174, ptr %14, align 16
  %175 = extractvalue { double, double } %172, 1
  store double %175, ptr %51, align 8
  %176 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
          to label %177 unwind label %187

177:                                              ; preds = %173
  %178 = extractvalue { double, double } %176, 0
  store double %178, ptr %13, align 16
  %179 = extractvalue { double, double } %176, 1
  store double %179, ptr %52, align 8
  %180 = invoke noundef nonnull align 4 dereferenceable(36) ptr @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %.067)
          to label %181 unwind label %187

181:                                              ; preds = %177
  %182 = getelementptr inbounds i8, ptr %180, i64 12
  invoke void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull %182)
          to label %183 unwind label %187

183:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  %184 = add nuw i64 %.067, 1
  %185 = call noundef i64 @_ZNK3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %186 = icmp ult i64 %184, %185
  br i1 %186, label %168, label %._crit_edge, !llvm.loop !16

187:                                              ; preds = %181, %177, %173, %170, %168
  %188 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %201

189:                                              ; preds = %._crit_edge
  %190 = call noundef i64 @_ZNK3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %191 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0)
          to label %192 unwind label %24

192:                                              ; preds = %189
  %193 = trunc i64 %190 to i32
  %194 = call noundef i64 @_ZNK3JPH5ArrayINS_25IndexedTriangleNoMaterialENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %195 = trunc i64 %194 to i32
  %196 = mul i32 %195, 3
  %197 = load ptr, ptr %1, align 8, !tbaa !17
  %198 = getelementptr inbounds i8, ptr %197, i64 40
  %199 = load ptr, ptr %198, align 8
  invoke void %199(ptr dead_on_unwind writable sret(%"class.JPH::Ref.17") align 8 %0, ptr noundef nonnull align 8 dereferenceable(320) %1, ptr noundef nonnull %167, i32 noundef %193, ptr noundef nonnull %191, i32 noundef %196)
          to label %200 unwind label %24

200:                                              ; preds = %192
  call void @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  ret void

201:                                              ; preds = %59, %166, %26, %46, %48, %187, %24
  %.pn57.pn = phi { ptr, i32 } [ %188, %187 ], [ %25, %24 ], [ %27, %26 ], [ %49, %48 ], [ %47, %46 ], [ %.pn54, %166 ], [ %60, %59 ]
  call void @_ZN3JPH5ArrayINS_13DebugRenderer6VertexENS_12STLAllocatorIS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  resume { ptr, i32 } %.pn57.pn
}

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec317sLoadFloat3UnsafeERKNS_6Float3E(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress 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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !9, i64 0}


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