; LLVM IR from Slingshot-Physics/slingshot-community :: common/geometry/src/mesh.ll (ZN8geometry4mesh13loadShapeMeshENS_5types7shape_tE)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.geometry::types::triangleMesh_t" = type { i32, i32, [1000 x %"struct.geometry::types::meshTriangle_t"], [500 x %class.Vector3] }
%"struct.geometry::types::meshTriangle_t" = type { [3 x i32], %class.Vector3 }
%class.Vector3 = type { [3 x float] }
%"struct.geometry::types::shape_t" = type { i32, %union.anon }
%union.anon = type { %"struct.geometry::types::shapeCube_t" }
%"struct.geometry::types::shapeCube_t" = type { float, float, float }
%class.Matrix33 = type { [9 x float] }
%"struct.geometry::types::shapeCapsule_t" = type { float, float }
%"struct.geometry::types::shapeCylinder_t" = type { float, float }
%"struct.geometry::types::shapeSphere_t" = type { float }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

; 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
declare dso_local void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(30008)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, <2 x float> } @_ZN8geometry4mesh12defaultShapeENS_5types11enumShape_tE(i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry4mesh13loadShapeMeshENS_5types7shape_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %0, i64 %1, <2 x float> %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.geometry::types::shape_t", align 4
  %6 = alloca %"struct.geometry::types::shape_t", align 4
  %7 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %8 = alloca float, align 4
  %9 = alloca %class.Matrix33, align 4
  %10 = alloca %class.Vector3, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca %class.Matrix33, align 4
  %18 = alloca %class.Vector3, align 4
  %19 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %20 = alloca float, align 4
  %21 = alloca %class.Matrix33, align 4
  %22 = alloca %class.Vector3, align 4
  %23 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca %class.Matrix33, align 4
  %28 = alloca %class.Vector3, align 4
  %29 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  store ptr %0, ptr %4, align 8
  %30 = getelementptr inbounds { i64, <2 x float> }, ptr %5, i32 0, i32 0
  store i64 %1, ptr %30, align 4
  %31 = getelementptr inbounds { i64, <2 x float> }, ptr %5, i32 0, i32 1
  store <2 x float> %2, ptr %31, align 4
  call void @_ZN8geometry5types14triangleMesh_tC2Ev(ptr noundef nonnull align 4 dereferenceable(30008) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #7
  %32 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 0
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = call { i64, <2 x float> } @_ZN8geometry4mesh12defaultShapeENS_5types11enumShape_tE(i32 noundef %33)
  %35 = getelementptr inbounds { i64, <2 x float> }, ptr %6, i32 0, i32 0
  %36 = extractvalue { i64, <2 x float> } %34, 0
  store i64 %36, ptr %35, align 4
  %37 = getelementptr inbounds { i64, <2 x float> }, ptr %6, i32 0, i32 1
  %38 = extractvalue { i64, <2 x float> } %34, 1
  store <2 x float> %38, ptr %37, align 4
  %39 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 0
  %40 = load i32, ptr %39, align 4, !tbaa !5
  switch i32 %40, label %198 [
    i32 7, label %41
    i32 1, label %129
    i32 4, label %152
    i32 0, label %172
  ]

41:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 30008, ptr %7) #7
  call void @_ZN8geometry4meshL15loadCapsuleMeshEv(ptr dead_on_unwind writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %7)
  %42 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %7)
  call void @llvm.lifetime.end.p0(i64 30008, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %43 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %6, i32 0, i32 1
  %44 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %43, i32 0, i32 0
  %45 = load float, ptr %44, align 4, !tbaa !10
  store float %45, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 36, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #7
  %46 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %47 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %46, i32 0, i32 0
  %48 = load float, ptr %47, align 4, !tbaa !10
  %49 = load float, ptr %8, align 4, !tbaa !11
  %50 = fdiv float %48, %49
  %51 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %52 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %51, i32 0, i32 0
  %53 = load float, ptr %52, align 4, !tbaa !10
  %54 = load float, ptr %8, align 4, !tbaa !11
  %55 = fdiv float %53, %54
  %56 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %57 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %56, i32 0, i32 0
  %58 = load float, ptr %57, align 4, !tbaa !10
  %59 = load float, ptr %8, align 4, !tbaa !11
  %60 = fdiv float %58, %59
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef %50, float noundef %55, float noundef %60)
  call void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind writable sret(%class.Matrix33) align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #7
  call void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36) %9, ptr noundef nonnull align 4 dereferenceable(30008) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %61 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %62 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %61, i32 0, i32 0
  %63 = load float, ptr %62, align 4, !tbaa !10
  %64 = fmul float 2.000000e+00, %63
  %65 = load float, ptr %8, align 4, !tbaa !11
  %66 = fdiv float %64, %65
  store float %66, ptr %11, align 4, !tbaa !11
  %67 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %68 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %67, i32 0, i32 1
  %69 = load float, ptr %68, align 4, !tbaa !10
  %70 = load float, ptr %11, align 4, !tbaa !11
  %71 = fsub float %69, %70
  %72 = fpext float %71 to double
  %73 = call double @llvm.fabs.f64(double %72)
  %74 = fcmp ogt double %73, 0x3EE4F8B580000000
  br i1 %74, label %75, label %128

75:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %76 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %77 = getelementptr inbounds %"struct.geometry::types::shapeCapsule_t", ptr %76, i32 0, i32 1
  %78 = load float, ptr %77, align 4, !tbaa !10
  %79 = load float, ptr %11, align 4, !tbaa !11
  %80 = fsub float %78, %79
  store float %80, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %81

81:                                               ; preds = %124, %75
  %82 = load i32, ptr %13, align 4, !tbaa !13
  %83 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %0, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !15
  %85 = icmp ult i32 %82, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %127

87:                                               ; preds = %81
  %88 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %0, i32 0, i32 3
  %89 = load i32, ptr %13, align 4, !tbaa !13
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds [500 x %class.Vector3], ptr %88, i64 0, i64 %90
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %91, i32 noundef 2)
  %93 = load float, ptr %92, align 4, !tbaa !11
  %94 = fcmp ogt float %93, 0.000000e+00
  br i1 %94, label %95, label %105

95:                                               ; preds = %87
  %96 = load float, ptr %12, align 4, !tbaa !11
  %97 = fdiv float %96, 2.000000e+00
  %98 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %0, i32 0, i32 3
  %99 = load i32, ptr %13, align 4, !tbaa !13
  %100 = zext i32 %99 to i64
  %101 = getelementptr inbounds [500 x %class.Vector3], ptr %98, i64 0, i64 %100
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %101, i32 noundef 2)
  %103 = load float, ptr %102, align 4, !tbaa !11
  %104 = fadd float %103, %97
  store float %104, ptr %102, align 4, !tbaa !11
  br label %105

105:                                              ; preds = %95, %87
  %106 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %0, i32 0, i32 3
  %107 = load i32, ptr %13, align 4, !tbaa !13
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds [500 x %class.Vector3], ptr %106, i64 0, i64 %108
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %109, i32 noundef 2)
  %111 = load float, ptr %110, align 4, !tbaa !11
  %112 = fcmp olt float %111, 0.000000e+00
  br i1 %112, label %113, label %123

113:                                              ; preds = %105
  %114 = load float, ptr %12, align 4, !tbaa !11
  %115 = fdiv float %114, 2.000000e+00
  %116 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %0, i32 0, i32 3
  %117 = load i32, ptr %13, align 4, !tbaa !13
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds [500 x %class.Vector3], ptr %116, i64 0, i64 %118
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %119, i32 noundef 2)
  %121 = load float, ptr %120, align 4, !tbaa !11
  %122 = fsub float %121, %115
  store float %122, ptr %120, align 4, !tbaa !11
  br label %123

123:                                              ; preds = %113, %105
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %13, align 4, !tbaa !13
  %126 = add i32 %125, 1
  store i32 %126, ptr %13, align 4, !tbaa !13
  br label %81, !llvm.loop !17

127:                                              ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %128

128:                                              ; preds = %127, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %205

129:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 30008, ptr %14) #7
  call void @_ZN8geometry4meshL16loadCylinderMeshEv(ptr dead_on_unwind writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %14)
  %130 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %14)
  call void @llvm.lifetime.end.p0(i64 30008, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %131 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %6, i32 0, i32 1
  %132 = getelementptr inbounds %"struct.geometry::types::shapeCylinder_t", ptr %131, i32 0, i32 0
  %133 = load float, ptr %132, align 4, !tbaa !10
  store float %133, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %134 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %6, i32 0, i32 1
  %135 = getelementptr inbounds %"struct.geometry::types::shapeCylinder_t", ptr %134, i32 0, i32 1
  %136 = load float, ptr %135, align 4, !tbaa !10
  store float %136, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 36, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #7
  %137 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %138 = getelementptr inbounds %"struct.geometry::types::shapeCylinder_t", ptr %137, i32 0, i32 0
  %139 = load float, ptr %138, align 4, !tbaa !10
  %140 = load float, ptr %15, align 4, !tbaa !11
  %141 = fdiv float %139, %140
  %142 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %143 = getelementptr inbounds %"struct.geometry::types::shapeCylinder_t", ptr %142, i32 0, i32 0
  %144 = load float, ptr %143, align 4, !tbaa !10
  %145 = load float, ptr %15, align 4, !tbaa !11
  %146 = fdiv float %144, %145
  %147 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %148 = getelementptr inbounds %"struct.geometry::types::shapeCylinder_t", ptr %147, i32 0, i32 1
  %149 = load float, ptr %148, align 4, !tbaa !10
  %150 = load float, ptr %16, align 4, !tbaa !11
  %151 = fdiv float %149, %150
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef %141, float noundef %146, float noundef %151)
  call void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind writable sret(%class.Matrix33) align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %18)
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #7
  call void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36) %17, ptr noundef nonnull align 4 dereferenceable(30008) %0)
  call void @llvm.lifetime.end.p0(i64 36, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %205

152:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 30008, ptr %19) #7
  call void @_ZN8geometry4meshL14loadSphereMeshEv(ptr dead_on_unwind writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %19)
  %153 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %19)
  call void @llvm.lifetime.end.p0(i64 30008, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %154 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %6, i32 0, i32 1
  %155 = getelementptr inbounds %"struct.geometry::types::shapeSphere_t", ptr %154, i32 0, i32 0
  %156 = load float, ptr %155, align 4, !tbaa !10
  store float %156, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 36, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #7
  %157 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %158 = getelementptr inbounds %"struct.geometry::types::shapeSphere_t", ptr %157, i32 0, i32 0
  %159 = load float, ptr %158, align 4, !tbaa !10
  %160 = load float, ptr %20, align 4, !tbaa !11
  %161 = fdiv float %159, %160
  %162 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %163 = getelementptr inbounds %"struct.geometry::types::shapeSphere_t", ptr %162, i32 0, i32 0
  %164 = load float, ptr %163, align 4, !tbaa !10
  %165 = load float, ptr %20, align 4, !tbaa !11
  %166 = fdiv float %164, %165
  %167 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %168 = getelementptr inbounds %"struct.geometry::types::shapeSphere_t", ptr %167, i32 0, i32 0
  %169 = load float, ptr %168, align 4, !tbaa !10
  %170 = load float, ptr %20, align 4, !tbaa !11
  %171 = fdiv float %169, %170
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %22, float noundef %161, float noundef %166, float noundef %171)
  call void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind writable sret(%class.Matrix33) align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #7
  call void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36) %21, ptr noundef nonnull align 4 dereferenceable(30008) %0)
  call void @llvm.lifetime.end.p0(i64 36, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %205

172:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 30008, ptr %23) #7
  call void @_ZN8geometry4meshL12loadCubeMeshEv(ptr dead_on_unwind writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %23)
  %173 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %23)
  call void @llvm.lifetime.end.p0(i64 30008, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %174 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %6, i32 0, i32 1
  %175 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %174, i32 0, i32 0
  %176 = load float, ptr %175, align 4, !tbaa !10
  store float %176, ptr %24, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %177 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %6, i32 0, i32 1
  %178 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %177, i32 0, i32 1
  %179 = load float, ptr %178, align 4, !tbaa !10
  store float %179, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %180 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %6, i32 0, i32 1
  %181 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %180, i32 0, i32 2
  %182 = load float, ptr %181, align 4, !tbaa !10
  store float %182, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 36, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #7
  %183 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %184 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %183, i32 0, i32 0
  %185 = load float, ptr %184, align 4, !tbaa !10
  %186 = load float, ptr %24, align 4, !tbaa !11
  %187 = fdiv float %185, %186
  %188 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %189 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %188, i32 0, i32 1
  %190 = load float, ptr %189, align 4, !tbaa !10
  %191 = load float, ptr %25, align 4, !tbaa !11
  %192 = fdiv float %190, %191
  %193 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 1
  %194 = getelementptr inbounds %"struct.geometry::types::shapeCube_t", ptr %193, i32 0, i32 2
  %195 = load float, ptr %194, align 4, !tbaa !10
  %196 = load float, ptr %26, align 4, !tbaa !11
  %197 = fdiv float %195, %196
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %28, float noundef %187, float noundef %192, float noundef %197)
  call void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind writable sret(%class.Matrix33) align 4 %27, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #7
  call void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36) %27, ptr noundef nonnull align 4 dereferenceable(30008) %0)
  call void @llvm.lifetime.end.p0(i64 36, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %205

198:                                              ; preds = %3
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %200 = getelementptr inbounds %"struct.geometry::types::shape_t", ptr %5, i32 0, i32 0
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %199, i32 noundef %201)
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 30008, ptr %29) #7
  call void @_ZN8geometry4meshL12loadCubeMeshEv(ptr dead_on_unwind writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %29)
  %204 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %29)
  call void @llvm.lifetime.end.p0(i64 30008, ptr %29) #7
  br label %205

205:                                              ; preds = %198, %172, %152, %129, %128
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8geometry4meshL15loadCapsuleMeshEv(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008), ptr noundef nonnull align 4 dereferenceable(30008)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind noalias writable sret(%class.Matrix33) align 4, ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8geometry4meshL16loadCylinderMeshEv(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8geometry4meshL14loadSphereMeshEv(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8geometry4meshL12loadCubeMeshEv(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4) #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #6

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 = { 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 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { "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, !7, i64 0}
!6 = !{!"_ZTSN8geometry5types7shape_tE", !7, i64 0, !8, i64 4}
!7 = !{!"_ZTSN8geometry5types11enumShape_tE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!16, !14, i64 4}
!16 = !{!"_ZTSN8geometry5types14triangleMesh_tE", !14, i64 0, !14, i64 4, !8, i64 8, !8, i64 24008}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.geometry::types::triangleMesh_t" = type { i32, i32, [1000 x %"struct.geometry::types::meshTriangle_t"], [500 x %class.Vector3] }
%"struct.geometry::types::meshTriangle_t" = type { [3 x i32], %class.Vector3 }
%class.Vector3 = type { [3 x float] }
%class.Matrix33 = type { [9 x float] }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

; 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
declare dso_local void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(30008)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, <2 x float> } @_ZN8geometry4mesh12defaultShapeENS_5types11enumShape_tE(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry4mesh13loadShapeMeshENS_5types7shape_tE(ptr dead_on_unwind noalias nonnull writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %0, i64 %1, <2 x float> %2) local_unnamed_addr #3 {
  %4 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %5 = alloca %class.Matrix33, align 4
  %6 = alloca %class.Vector3, align 4
  %7 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %8 = alloca %class.Matrix33, align 4
  %9 = alloca %class.Vector3, align 4
  %10 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %11 = alloca %class.Matrix33, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %14 = alloca %class.Matrix33, align 4
  %15 = alloca %class.Vector3, align 4
  %16 = alloca %"struct.geometry::types::triangleMesh_t", align 4
  %.sroa.0.0.extract.trunc = trunc i64 %1 to i32
  %.sroa.4.0.extract.shift = lshr i64 %1, 32
  %.sroa.4.0.extract.trunc = trunc nuw i64 %.sroa.4.0.extract.shift to i32
  %17 = bitcast i32 %.sroa.4.0.extract.trunc to float
  tail call void @_ZN8geometry5types14triangleMesh_tC2Ev(ptr noundef nonnull align 4 dereferenceable(30008) %0)
  %18 = tail call { i64, <2 x float> } @_ZN8geometry4mesh12defaultShapeENS_5types11enumShape_tE(i32 noundef %.sroa.0.0.extract.trunc)
  %19 = extractvalue { i64, <2 x float> } %18, 0
  %.sroa.0.sroa.3.0.extract.shift = lshr i64 %19, 32
  %.sroa.0.sroa.3.0.extract.trunc = trunc nuw i64 %.sroa.0.sroa.3.0.extract.shift to i32
  %20 = bitcast i32 %.sroa.0.sroa.3.0.extract.trunc to float
  %21 = extractvalue { i64, <2 x float> } %18, 1
  switch i32 %.sroa.0.0.extract.trunc, label %67 [
    i32 7, label %22
    i32 1, label %55
    i32 4, label %59
    i32 0, label %62
  ]

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 30008, ptr nonnull %4) #7
  call void @_ZN8geometry4meshL15loadCapsuleMeshEv(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %4)
  %23 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %4)
  call void @llvm.lifetime.end.p0(i64 30008, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %24 = fdiv float %17, %20
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef %24, float noundef %24, float noundef %24)
  call void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Matrix33) align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  call void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36) %5, ptr noundef nonnull align 4 dereferenceable(30008) %0)
  %25 = fmul float %17, 2.000000e+00
  %26 = fdiv float %25, %20
  %.sroa.14.8.vec.extract = extractelement <2 x float> %2, i64 0
  %27 = fsub float %.sroa.14.8.vec.extract, %26
  %28 = call float @llvm.fabs.f32(float %27)
  %29 = fcmp ogt float %28, 0x3EE4F8B580000000
  br i1 %29, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %22
  %30 = getelementptr inbounds i8, ptr %0, i64 4
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %.not = icmp eq i32 %31, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %32 = getelementptr inbounds i8, ptr %0, i64 24008
  %33 = fmul float %27, 5.000000e-01
  br label %34

34:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %35 = getelementptr inbounds [500 x %class.Vector3], ptr %32, i64 0, i64 %indvars.iv
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %35, i32 noundef 2)
  %37 = load float, ptr %36, align 4, !tbaa !10
  %38 = fcmp ogt float %37, 0.000000e+00
  br i1 %38, label %39, label %43

39:                                               ; preds = %34
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %35, i32 noundef 2)
  %41 = load float, ptr %40, align 4, !tbaa !10
  %42 = fadd float %33, %41
  store float %42, ptr %40, align 4, !tbaa !10
  br label %43

43:                                               ; preds = %39, %34
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %35, i32 noundef 2)
  %45 = load float, ptr %44, align 4, !tbaa !10
  %46 = fcmp olt float %45, 0.000000e+00
  br i1 %46, label %47, label %51

47:                                               ; preds = %43
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12) %35, i32 noundef 2)
  %49 = load float, ptr %48, align 4, !tbaa !10
  %50 = fsub float %49, %33
  store float %50, ptr %48, align 4, !tbaa !10
  br label %51

51:                                               ; preds = %43, %47
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = load i32, ptr %30, align 4, !tbaa !5
  %53 = zext i32 %52 to i64
  %54 = icmp ult i64 %indvars.iv.next, %53
  br i1 %54, label %34, label %.loopexit, !llvm.loop !12

.loopexit:                                        ; preds = %51, %.preheader, %22
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %5) #7
  br label %72

55:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 30008, ptr nonnull %7) #7
  call void @_ZN8geometry4meshL16loadCylinderMeshEv(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %7)
  %56 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %7)
  call void @llvm.lifetime.end.p0(i64 30008, ptr nonnull %7) #7
  %.sroa.7.8.vec.extract = extractelement <2 x float> %21, i64 0
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  %57 = fdiv float %17, %20
  %.sroa.14.8.vec.extract44 = extractelement <2 x float> %2, i64 0
  %58 = fdiv float %.sroa.14.8.vec.extract44, %.sroa.7.8.vec.extract
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef %57, float noundef %57, float noundef %58)
  call void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Matrix33) align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  call void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36) %8, ptr noundef nonnull align 4 dereferenceable(30008) %0)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %8) #7
  br label %72

59:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 30008, ptr nonnull %10) #7
  call void @_ZN8geometry4meshL14loadSphereMeshEv(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %10)
  %60 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %10)
  call void @llvm.lifetime.end.p0(i64 30008, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #7
  %61 = fdiv float %17, %20
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %61, float noundef %61, float noundef %61)
  call void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Matrix33) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  call void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36) %11, ptr noundef nonnull align 4 dereferenceable(30008) %0)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %11) #7
  br label %72

62:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 30008, ptr nonnull %13) #7
  call void @_ZN8geometry4meshL12loadCubeMeshEv(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %13)
  %63 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %13)
  call void @llvm.lifetime.end.p0(i64 30008, ptr nonnull %13) #7
  %.sroa.7.8.vec.extract29 = extractelement <2 x float> %21, i64 0
  %.sroa.7.12.vec.extract = extractelement <2 x float> %21, i64 1
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #7
  %64 = fdiv float %17, %20
  %.sroa.14.8.vec.extract46 = extractelement <2 x float> %2, i64 0
  %65 = fdiv float %.sroa.14.8.vec.extract46, %.sroa.7.8.vec.extract29
  %.sroa.14.12.vec.extract = extractelement <2 x float> %2, i64 1
  %66 = fdiv float %.sroa.14.12.vec.extract, %.sroa.7.12.vec.extract
  call void @_ZN7Vector3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %15, float noundef %64, float noundef %65, float noundef %66)
  call void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Matrix33) align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #7
  call void @_ZN8geometry4mesh9scaleMeshERK8Matrix33RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(36) %14, ptr noundef nonnull align 4 dereferenceable(30008) %0)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %14) #7
  br label %72

67:                                               ; preds = %3
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %68, i32 noundef %.sroa.0.0.extract.trunc)
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @.str.1)
  call void @llvm.lifetime.start.p0(i64 30008, ptr nonnull %16) #7
  call void @_ZN8geometry4meshL12loadCubeMeshEv(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::triangleMesh_t") align 4 %16)
  %71 = call noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(30008) %16)
  call void @llvm.lifetime.end.p0(i64 30008, ptr nonnull %16) #7
  br label %72

72:                                               ; preds = %67, %62, %59, %55, %.loopexit
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8geometry4meshL15loadCapsuleMeshEv(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(30008) ptr @_ZN8geometry5types14triangleMesh_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(30008), ptr noundef nonnull align 4 dereferenceable(30008)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Matrix334diagERK7Vector3(ptr dead_on_unwind noalias writable sret(%class.Matrix33) align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Vector3ixEj(ptr noundef nonnull align 4 dereferenceable(12), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8geometry4meshL16loadCylinderMeshEv(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8geometry4meshL14loadSphereMeshEv(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN8geometry4meshL12loadCubeMeshEv(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::triangleMesh_t") align 4) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 4}
!6 = !{!"_ZTSN8geometry5types14triangleMesh_tE", !7, i64 0, !7, i64 4, !8, i64 8, !8, i64 24008}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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