; LLVM IR from atlantis13579/Riemann :: Src/CollisionPrimitive (Cylinder3)

; 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.Maths::TVector3" = type { float, float, float }
%"class.Riemann::Cylinder3" = type { float, float, %"class.Maths::TVector3", %"class.Maths::TVector3" }

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(96) ptr @_ZN7Riemann9Cylinder316GetCylinderFacesEv() #3 align 2

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef i64 @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(96)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann9Cylinder37GetMeshERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEES7_(ptr noundef nonnull align 4 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.Maths::TVector3", align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca %"class.Maths::TVector3", align 4
  %14 = alloca %"class.Maths::TVector3", align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.Maths::TVector3", align 4
  %19 = alloca %"class.Maths::TVector3", align 4
  %20 = alloca %"class.Maths::TVector3", align 4
  %21 = alloca %"class.Maths::TVector3", align 4
  %22 = alloca %"class.Maths::TVector3", align 4
  %23 = alloca %"class.Maths::TVector3", align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  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
  %26 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %27 = call noundef nonnull align 4 dereferenceable(96) ptr @_ZN7Riemann9Cylinder316GetCylinderFacesEv()
  store ptr %27, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = call noundef i64 @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(96) %28) #7
  %30 = trunc i64 %29 to i32
  store i32 %30, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #6
  %31 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %26, i32 0, i32 0
  %32 = load float, ptr %31, align 4, !tbaa !11
  %33 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %26, i32 0, i32 1
  %34 = load float, ptr %33, align 4, !tbaa !15
  %35 = fmul float %34, 5.000000e-01
  %36 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %26, i32 0, i32 0
  %37 = load float, ptr %36, align 4, !tbaa !11
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %11, float noundef %32, float noundef %35, float noundef %37)
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = mul nsw i32 %39, 2
  %41 = add nsw i32 %40, 2
  %42 = sext i32 %41 to i64
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %42)
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = mul nsw i32 %44, 2
  %46 = add nsw i32 %45, 2
  %47 = sext i32 %46 to i64
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %47)
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  %48 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %26, i32 0, i32 1
  %49 = load float, ptr %48, align 4, !tbaa !15
  %50 = fmul float %49, 5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef 0.000000e+00, float noundef %50, float noundef 0.000000e+00)
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = mul nsw i32 2, %52
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %54) #6
  %56 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %55, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #6
  %57 = getelementptr inbounds %"class.Riemann::Cylinder3", ptr %26, i32 0, i32 1
  %58 = load float, ptr %57, align 4, !tbaa !15
  %59 = fneg float %58
  %60 = fmul float %59, 5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %13, float noundef 0.000000e+00, float noundef %60, float noundef 0.000000e+00)
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = mul nsw i32 2, %62
  %64 = add nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %65) #6
  %67 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %66, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #6
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %14)
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = mul nsw i32 2, %69
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %71) #6
  %73 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %72, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %16)
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %16)
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = load i32, ptr %10, align 4, !tbaa !9
  %76 = mul nsw i32 2, %75
  %77 = add nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %78) #6
  %80 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %79, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %167, %4
  %82 = load i32, ptr %17, align 4, !tbaa !9
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %170

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #6
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = load i32, ptr %17, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %87, i64 noundef %89) #6
  %91 = getelementptr inbounds %"class.Maths::TVector3", ptr %90, i32 0, i32 0
  %92 = load float, ptr %91, align 4, !tbaa !16
  %93 = getelementptr inbounds %"class.Maths::TVector3", ptr %11, i32 0, i32 0
  %94 = load float, ptr %93, align 4, !tbaa !16
  %95 = fmul float %92, %94
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = load i32, ptr %17, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %96, i64 noundef %98) #6
  %100 = getelementptr inbounds %"class.Maths::TVector3", ptr %99, i32 0, i32 1
  %101 = load float, ptr %100, align 4, !tbaa !17
  %102 = getelementptr inbounds %"class.Maths::TVector3", ptr %11, i32 0, i32 1
  %103 = load float, ptr %102, align 4, !tbaa !17
  %104 = fmul float %101, %103
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load i32, ptr %17, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %105, i64 noundef %107) #6
  %109 = getelementptr inbounds %"class.Maths::TVector3", ptr %108, i32 0, i32 2
  %110 = load float, ptr %109, align 4, !tbaa !18
  %111 = getelementptr inbounds %"class.Maths::TVector3", ptr %11, i32 0, i32 2
  %112 = load float, ptr %111, align 4, !tbaa !18
  %113 = fmul float %110, %112
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef %95, float noundef %104, float noundef %113)
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = load i32, ptr %17, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %116) #6
  %118 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %117, ptr noundef nonnull align 4 dereferenceable(12) %18)
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  %119 = getelementptr inbounds %"class.Maths::TVector3", ptr %18, i32 0, i32 0
  %120 = load float, ptr %119, align 4, !tbaa !16
  %121 = getelementptr inbounds %"class.Maths::TVector3", ptr %18, i32 0, i32 1
  %122 = load float, ptr %121, align 4, !tbaa !17
  %123 = fneg float %122
  %124 = getelementptr inbounds %"class.Maths::TVector3", ptr %18, i32 0, i32 2
  %125 = load float, ptr %124, align 4, !tbaa !18
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %19, float noundef %120, float noundef %123, float noundef %125)
  %126 = load ptr, ptr %6, align 8, !tbaa !5
  %127 = load i32, ptr %17, align 4, !tbaa !9
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = add nsw i32 %127, %128
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %130) #6
  %132 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %131, ptr noundef nonnull align 4 dereferenceable(12) %19)
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #6
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = load i32, ptr %17, align 4, !tbaa !9
  %135 = mul nsw i32 2, %134
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef %136) #6
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = mul nsw i32 2, %139
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %141) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %137, ptr noundef nonnull align 4 dereferenceable(12) %142)
  call void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %21)
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %143, i64 noundef %145) #6
  %147 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %146, ptr noundef nonnull align 4 dereferenceable(12) %20)
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #6
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = load i32, ptr %17, align 4, !tbaa !9
  %150 = mul nsw i32 2, %149
  %151 = add nsw i32 %150, 1
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %148, i64 noundef %152) #6
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = load i32, ptr %10, align 4, !tbaa !9
  %156 = mul nsw i32 2, %155
  %157 = add nsw i32 %156, 1
  %158 = sext i32 %157 to i64
  %159 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %158) #6
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %23, ptr noundef nonnull align 4 dereferenceable(12) %153, ptr noundef nonnull align 4 dereferenceable(12) %159)
  call void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %23)
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load i32, ptr %17, align 4, !tbaa !9
  %162 = load i32, ptr %10, align 4, !tbaa !9
  %163 = add nsw i32 %161, %162
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef %164) #6
  %166 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %165, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #6
  br label %167

167:                                              ; preds = %86
  %168 = load i32, ptr %17, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %17, align 4, !tbaa !9
  br label %81, !llvm.loop !19

170:                                              ; preds = %85
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = load i32, ptr %10, align 4, !tbaa !9
  %173 = mul nsw i32 12, %172
  %174 = sext i32 %173 to i64
  call void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %171, i64 noundef %174)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %175

175:                                              ; preds = %294, %170
  %176 = load i32, ptr %24, align 4, !tbaa !9
  %177 = load i32, ptr %10, align 4, !tbaa !9
  %178 = icmp slt i32 %176, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %297

180:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %181 = load i32, ptr %24, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  %183 = load i32, ptr %10, align 4, !tbaa !9
  %184 = srem i32 %182, %183
  store i32 %184, ptr %25, align 4, !tbaa !9
  %185 = load i32, ptr %25, align 4, !tbaa !9
  %186 = trunc i32 %185 to i16
  %187 = load ptr, ptr %7, align 8, !tbaa !5
  %188 = load i32, ptr %24, align 4, !tbaa !9
  %189 = mul nsw i32 12, %188
  %190 = add nsw i32 %189, 0
  %191 = sext i32 %190 to i64
  %192 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef %191) #6
  store i16 %186, ptr %192, align 2, !tbaa !21
  %193 = load i32, ptr %24, align 4, !tbaa !9
  %194 = trunc i32 %193 to i16
  %195 = load ptr, ptr %7, align 8, !tbaa !5
  %196 = load i32, ptr %24, align 4, !tbaa !9
  %197 = mul nsw i32 12, %196
  %198 = add nsw i32 %197, 1
  %199 = sext i32 %198 to i64
  %200 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %195, i64 noundef %199) #6
  store i16 %194, ptr %200, align 2, !tbaa !21
  %201 = load i32, ptr %24, align 4, !tbaa !9
  %202 = load i32, ptr %10, align 4, !tbaa !9
  %203 = add nsw i32 %201, %202
  %204 = trunc i32 %203 to i16
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = load i32, ptr %24, align 4, !tbaa !9
  %207 = mul nsw i32 12, %206
  %208 = add nsw i32 %207, 2
  %209 = sext i32 %208 to i64
  %210 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %205, i64 noundef %209) #6
  store i16 %204, ptr %210, align 2, !tbaa !21
  %211 = load i32, ptr %25, align 4, !tbaa !9
  %212 = load i32, ptr %10, align 4, !tbaa !9
  %213 = add nsw i32 %211, %212
  %214 = trunc i32 %213 to i16
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = load i32, ptr %24, align 4, !tbaa !9
  %217 = mul nsw i32 12, %216
  %218 = add nsw i32 %217, 3
  %219 = sext i32 %218 to i64
  %220 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %215, i64 noundef %219) #6
  store i16 %214, ptr %220, align 2, !tbaa !21
  %221 = load i32, ptr %25, align 4, !tbaa !9
  %222 = trunc i32 %221 to i16
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = load i32, ptr %24, align 4, !tbaa !9
  %225 = mul nsw i32 12, %224
  %226 = add nsw i32 %225, 4
  %227 = sext i32 %226 to i64
  %228 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %223, i64 noundef %227) #6
  store i16 %222, ptr %228, align 2, !tbaa !21
  %229 = load i32, ptr %24, align 4, !tbaa !9
  %230 = load i32, ptr %10, align 4, !tbaa !9
  %231 = add nsw i32 %229, %230
  %232 = trunc i32 %231 to i16
  %233 = load ptr, ptr %7, align 8, !tbaa !5
  %234 = load i32, ptr %24, align 4, !tbaa !9
  %235 = mul nsw i32 12, %234
  %236 = add nsw i32 %235, 5
  %237 = sext i32 %236 to i64
  %238 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %233, i64 noundef %237) #6
  store i16 %232, ptr %238, align 2, !tbaa !21
  %239 = load i32, ptr %24, align 4, !tbaa !9
  %240 = trunc i32 %239 to i16
  %241 = load ptr, ptr %7, align 8, !tbaa !5
  %242 = load i32, ptr %24, align 4, !tbaa !9
  %243 = mul nsw i32 12, %242
  %244 = add nsw i32 %243, 6
  %245 = sext i32 %244 to i64
  %246 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %241, i64 noundef %245) #6
  store i16 %240, ptr %246, align 2, !tbaa !21
  %247 = load i32, ptr %25, align 4, !tbaa !9
  %248 = trunc i32 %247 to i16
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  %250 = load i32, ptr %24, align 4, !tbaa !9
  %251 = mul nsw i32 12, %250
  %252 = add nsw i32 %251, 7
  %253 = sext i32 %252 to i64
  %254 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %249, i64 noundef %253) #6
  store i16 %248, ptr %254, align 2, !tbaa !21
  %255 = load i32, ptr %10, align 4, !tbaa !9
  %256 = mul nsw i32 2, %255
  %257 = trunc i32 %256 to i16
  %258 = load ptr, ptr %7, align 8, !tbaa !5
  %259 = load i32, ptr %24, align 4, !tbaa !9
  %260 = mul nsw i32 12, %259
  %261 = add nsw i32 %260, 8
  %262 = sext i32 %261 to i64
  %263 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %258, i64 noundef %262) #6
  store i16 %257, ptr %263, align 2, !tbaa !21
  %264 = load i32, ptr %24, align 4, !tbaa !9
  %265 = load i32, ptr %10, align 4, !tbaa !9
  %266 = add nsw i32 %264, %265
  %267 = trunc i32 %266 to i16
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = load i32, ptr %24, align 4, !tbaa !9
  %270 = mul nsw i32 12, %269
  %271 = add nsw i32 %270, 9
  %272 = sext i32 %271 to i64
  %273 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %268, i64 noundef %272) #6
  store i16 %267, ptr %273, align 2, !tbaa !21
  %274 = load i32, ptr %25, align 4, !tbaa !9
  %275 = load i32, ptr %10, align 4, !tbaa !9
  %276 = add nsw i32 %274, %275
  %277 = trunc i32 %276 to i16
  %278 = load ptr, ptr %7, align 8, !tbaa !5
  %279 = load i32, ptr %24, align 4, !tbaa !9
  %280 = mul nsw i32 12, %279
  %281 = add nsw i32 %280, 10
  %282 = sext i32 %281 to i64
  %283 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %278, i64 noundef %282) #6
  store i16 %277, ptr %283, align 2, !tbaa !21
  %284 = load i32, ptr %10, align 4, !tbaa !9
  %285 = mul nsw i32 2, %284
  %286 = add nsw i32 %285, 1
  %287 = trunc i32 %286 to i16
  %288 = load ptr, ptr %7, align 8, !tbaa !5
  %289 = load i32, ptr %24, align 4, !tbaa !9
  %290 = mul nsw i32 12, %289
  %291 = add nsw i32 %290, 11
  %292 = sext i32 %291 to i64
  %293 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %288, i64 noundef %292) #6
  store i16 %287, ptr %293, align 2, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %294

294:                                              ; preds = %180
  %295 = load i32, ptr %24, align 4, !tbaa !9
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %24, align 4, !tbaa !9
  br label %175, !llvm.loop !23

297:                                              ; preds = %179
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN7Riemann9Cylinder3E", !13, i64 0, !13, i64 4, !14, i64 8, !14, i64 20}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSN5Maths8TVector3IfEE", !13, i64 0, !13, i64 4, !13, i64 8}
!15 = !{!12, !13, i64 4}
!16 = !{!14, !13, i64 0}
!17 = !{!14, !13, i64 4}
!18 = !{!14, !13, i64 8}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = distinct !{!23, !20}


; 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.Maths::TVector3" = type { float, float, float }

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(96) ptr @_ZN7Riemann9Cylinder316GetCylinderFacesEv() local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef i64 @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(96)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann9Cylinder37GetMeshERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEES7_(ptr nocapture noundef nonnull readonly align 4 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %"class.Maths::TVector3", align 4
  %6 = alloca %"class.Maths::TVector3", align 4
  %7 = alloca %"class.Maths::TVector3", align 4
  %8 = alloca %"class.Maths::TVector3", align 4
  %9 = alloca %"class.Maths::TVector3", align 4
  %10 = alloca %"class.Maths::TVector3", align 4
  %11 = alloca %"class.Maths::TVector3", align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca %"class.Maths::TVector3", align 4
  %14 = alloca %"class.Maths::TVector3", align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = tail call noundef nonnull align 4 dereferenceable(96) ptr @_ZN7Riemann9Cylinder316GetCylinderFacesEv()
  %18 = tail call noundef i64 @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(96) %17) #6
  %19 = trunc i64 %18 to i32
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  %20 = load float, ptr %0, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 4
  %22 = load float, ptr %21, align 4, !tbaa !11
  %23 = fmul float %22, 5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef %20, float noundef %23, float noundef %20)
  %24 = shl nsw i32 %19, 1
  %25 = add nsw i32 %24, 2
  %26 = sext i32 %25 to i64
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %26)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %26)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %27 = load float, ptr %21, align 4, !tbaa !11
  %28 = fmul float %27, 5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef 0.000000e+00, float noundef %28, float noundef 0.000000e+00)
  %29 = sext i32 %24 to i64
  %30 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %29) #7
  %31 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  %32 = load float, ptr %21, align 4, !tbaa !11
  %33 = fmul float %32, -5.000000e-01
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 0.000000e+00, float noundef %33, float noundef 0.000000e+00)
  %34 = or disjoint i32 %24, 1
  %35 = sext i32 %34 to i64
  %36 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %35) #7
  %37 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #7
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %8)
  %38 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %29) #7
  %39 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %10)
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %10)
  %40 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %35) #7
  %41 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  %42 = icmp sgt i32 %19, 0
  br i1 %42, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %4
  %sext101 = mul i64 %18, 51539607552
  %43 = ashr exact i64 %sext101, 32
  call void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %43)
  br label %._crit_edge94

.lr.ph:                                           ; preds = %4
  %44 = getelementptr inbounds i8, ptr %5, i64 4
  %45 = getelementptr inbounds i8, ptr %5, i64 8
  %46 = getelementptr inbounds i8, ptr %11, i64 4
  %47 = getelementptr inbounds i8, ptr %11, i64 8
  %48 = and i64 %18, 2147483647
  br label %53

._crit_edge:                                      ; preds = %53
  %sext = mul i64 %18, 51539607552
  %49 = ashr exact i64 %sext, 32
  call void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %49)
  br i1 %42, label %.lr.ph93, label %._crit_edge94

.lr.ph93:                                         ; preds = %._crit_edge
  %50 = trunc i32 %24 to i16
  %51 = trunc i32 %34 to i16
  %52 = and i64 %18, 2147483647
  br label %87

53:                                               ; preds = %.lr.ph, %53
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %53 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %17, i64 noundef %indvars.iv) #7
  %55 = load float, ptr %54, align 4, !tbaa !12
  %56 = load float, ptr %5, align 4, !tbaa !12
  %57 = fmul float %55, %56
  %58 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %17, i64 noundef %indvars.iv) #7
  %59 = getelementptr inbounds i8, ptr %58, i64 4
  %60 = load float, ptr %59, align 4, !tbaa !13
  %61 = load float, ptr %44, align 4, !tbaa !13
  %62 = fmul float %60, %61
  %63 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt5arrayIN5Maths8TVector3IfEELm8EEixEm(ptr noundef nonnull align 4 dereferenceable(96) %17, i64 noundef %indvars.iv) #7
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  %65 = load float, ptr %64, align 4, !tbaa !14
  %66 = load float, ptr %45, align 4, !tbaa !14
  %67 = fmul float %65, %66
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %11, float noundef %57, float noundef %62, float noundef %67)
  %68 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #7
  %69 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %68, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #7
  %70 = load float, ptr %11, align 4, !tbaa !12
  %71 = load float, ptr %46, align 4, !tbaa !13
  %72 = fneg float %71
  %73 = load float, ptr %47, align 4, !tbaa !14
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %70, float noundef %72, float noundef %73)
  %74 = add nuw nsw i64 %indvars.iv, %48
  %75 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %74) #7
  %76 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %75, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #7
  %77 = shl nuw nsw i64 %indvars.iv, 1
  %78 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %77) #7
  %79 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %29) #7
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %78, ptr noundef nonnull align 4 dereferenceable(12) %79)
  call void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %14)
  %80 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  %81 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %80, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #7
  %82 = or disjoint i64 %77, 1
  %83 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %82) #7
  %84 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %35) #7
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %83, ptr noundef nonnull align 4 dereferenceable(12) %84)
  call void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %16)
  %85 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %74) #7
  %86 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %85, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %48
  br i1 %exitcond.not, label %._crit_edge, label %53, !llvm.loop !15

._crit_edge94:                                    ; preds = %87, %._crit_edge.thread, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  ret void

87:                                               ; preds = %.lr.ph93, %87
  %indvars.iv96 = phi i64 [ 0, %.lr.ph93 ], [ %indvars.iv.next97, %87 ]
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %88 = icmp eq i64 %indvars.iv.next97, %52
  %89 = trunc nuw nsw i64 %indvars.iv.next97 to i32
  %iv.rem = select i1 %88, i32 0, i32 %89
  %90 = trunc i32 %iv.rem to i16
  %91 = mul nuw nsw i64 %indvars.iv96, 12
  %92 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %91) #7
  store i16 %90, ptr %92, align 2, !tbaa !17
  %93 = trunc i64 %indvars.iv96 to i16
  %94 = or disjoint i64 %91, 1
  %95 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %94) #7
  store i16 %93, ptr %95, align 2, !tbaa !17
  %96 = add i64 %indvars.iv96, %18
  %97 = trunc i64 %96 to i16
  %98 = or disjoint i64 %91, 2
  %99 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %98) #7
  store i16 %97, ptr %99, align 2, !tbaa !17
  %100 = add nuw nsw i32 %iv.rem, %19
  %101 = trunc i32 %100 to i16
  %102 = or disjoint i64 %91, 3
  %103 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %102) #7
  store i16 %101, ptr %103, align 2, !tbaa !17
  %104 = add nuw nsw i64 %91, 4
  %105 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %104) #7
  store i16 %90, ptr %105, align 2, !tbaa !17
  %106 = add nuw nsw i64 %91, 5
  %107 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %106) #7
  store i16 %97, ptr %107, align 2, !tbaa !17
  %108 = add nuw nsw i64 %91, 6
  %109 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %108) #7
  store i16 %93, ptr %109, align 2, !tbaa !17
  %110 = add nuw nsw i64 %91, 7
  %111 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %110) #7
  store i16 %90, ptr %111, align 2, !tbaa !17
  %112 = add nuw nsw i64 %91, 8
  %113 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %112) #7
  store i16 %50, ptr %113, align 2, !tbaa !17
  %114 = add nuw nsw i64 %91, 9
  %115 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %114) #7
  store i16 %97, ptr %115, align 2, !tbaa !17
  %116 = add nuw nsw i64 %91, 10
  %117 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %116) #7
  store i16 %101, ptr %117, align 2, !tbaa !17
  %118 = add nuw nsw i64 %91, 11
  %119 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %118) #7
  store i16 %51, ptr %119, align 2, !tbaa !17
  %exitcond100.not = icmp eq i64 %indvars.iv.next97, %52
  br i1 %exitcond100.not, label %._crit_edge94, label %87, !llvm.loop !19
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

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

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

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


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