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

; 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.Maths::Matrix3" = type { [3 x [3 x float]] }
%"class.Riemann::Capsule3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", float, float }

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

; 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)) #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEplERKS1_(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)) #1 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)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind noalias writable sret(%"class.Maths::TVector3") align 4) #4 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)) #1 align 2

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

; 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 #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann8Capsule311GetVerticesEiiRSt6vectorIN5Maths8TVector3IfEESaIS4_EEPS6_(ptr noundef nonnull align 4 dereferenceable(32) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef %4) #4 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = alloca %"class.Maths::TVector3", align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = alloca float, align 4
  %24 = alloca %"class.Maths::TVector3", align 4
  %25 = alloca %"class.Maths::TVector3", align 4
  %26 = alloca %"class.Maths::TVector3", align 4
  %27 = alloca %"class.Maths::TVector3", align 4
  %28 = alloca %"class.Maths::Matrix3", align 4
  %29 = alloca %"class.Maths::TVector3", align 4
  %30 = alloca %"class.Maths::TVector3", align 4
  %31 = alloca ptr, align 8
  %32 = alloca i64, align 8
  %33 = alloca %"class.Maths::TVector3", align 4
  %34 = alloca ptr, align 8
  %35 = alloca i64, align 8
  %36 = alloca %"class.Maths::TVector3", align 4
  %37 = alloca %"class.Maths::TVector3", align 4
  %38 = alloca ptr, align 8
  %39 = alloca i64, align 8
  %40 = alloca %"class.Maths::TVector3", align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %42 = call float @asinf(float noundef 1.000000e+00) #7
  %43 = fmul float 2.000000e+00, %42
  store float %43, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %44 = load float, ptr %11, align 4, !tbaa !11
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = sitofp i32 %45 to float
  %47 = fdiv float %44, %46
  store float %47, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %48 = load float, ptr %11, align 4, !tbaa !11
  %49 = fmul float 2.000000e+00, %48
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = sitofp i32 %50 to float
  %52 = fdiv float %49, %51
  store float %52, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  %53 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 1
  %54 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 0
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %53, ptr noundef nonnull align 4 dereferenceable(12) %54)
  %55 = call noundef float @_ZNK5Maths8TVector3IfE6LengthEv(ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  store float %55, ptr %14, align 4, !tbaa !11
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #7
  %57 = load float, ptr %14, align 4, !tbaa !11
  %58 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 2
  %59 = load float, ptr %58, align 4, !tbaa !13
  %60 = call float @llvm.fmuladd.f32(float %57, float 5.000000e-01, float %59)
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %16, float noundef 0.000000e+00, float noundef %60, float noundef 0.000000e+00)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %65

63:                                               ; preds = %5
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #7
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %17)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #7
  br label %65

65:                                               ; preds = %63, %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %131, %65
  %67 = load i32, ptr %18, align 4, !tbaa !9
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %134

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %72 = load i32, ptr %18, align 4, !tbaa !9
  %73 = sitofp i32 %72 to float
  %74 = load float, ptr %12, align 4, !tbaa !11
  %75 = fmul float %73, %74
  store float %75, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %76 = load i32, ptr %18, align 4, !tbaa !9
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = sdiv i32 %77, 2
  %79 = icmp sle i32 %76, %78
  br i1 %79, label %80, label %83

80:                                               ; preds = %71
  %81 = load float, ptr %14, align 4, !tbaa !11
  %82 = fmul float %81, 5.000000e-01
  br label %87

83:                                               ; preds = %71
  %84 = load float, ptr %14, align 4, !tbaa !11
  %85 = fneg float %84
  %86 = fmul float %85, 5.000000e-01
  br label %87

87:                                               ; preds = %83, %80
  %88 = phi float [ %82, %80 ], [ %86, %83 ]
  store float %88, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %127, %87
  %90 = load i32, ptr %22, align 4, !tbaa !9
  %91 = load i32, ptr %8, align 4, !tbaa !9
  %92 = icmp sle i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  store i32 5, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %130

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %95 = load i32, ptr %22, align 4, !tbaa !9
  %96 = sitofp i32 %95 to float
  %97 = load float, ptr %13, align 4, !tbaa !11
  %98 = fmul float %96, %97
  store float %98, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #7
  %99 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 2
  %100 = load float, ptr %99, align 4, !tbaa !13
  %101 = load float, ptr %20, align 4, !tbaa !11
  %102 = call float @sinf(float noundef %101) #7
  %103 = fmul float %100, %102
  %104 = load float, ptr %23, align 4, !tbaa !11
  %105 = call float @cosf(float noundef %104) #7
  %106 = fmul float %103, %105
  %107 = load float, ptr %21, align 4, !tbaa !11
  %108 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 2
  %109 = load float, ptr %108, align 4, !tbaa !13
  %110 = load float, ptr %20, align 4, !tbaa !11
  %111 = call float @cosf(float noundef %110) #7
  %112 = call float @llvm.fmuladd.f32(float %109, float %111, float %107)
  %113 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 2
  %114 = load float, ptr %113, align 4, !tbaa !13
  %115 = load float, ptr %20, align 4, !tbaa !11
  %116 = call float @sinf(float noundef %115) #7
  %117 = fmul float %114, %116
  %118 = load float, ptr %23, align 4, !tbaa !11
  %119 = call float @sinf(float noundef %118) #7
  %120 = fmul float %117, %119
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %24, float noundef %106, float noundef %112, float noundef %120)
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %121, ptr noundef nonnull align 4 dereferenceable(12) %24)
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = icmp ne ptr %122, null
  br i1 %123, label %124, label %126

124:                                              ; preds = %94
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %125, ptr noundef nonnull align 4 dereferenceable(12) %24)
  br label %126

126:                                              ; preds = %124, %94
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %22, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %22, align 4, !tbaa !9
  br label %89, !llvm.loop !16

130:                                              ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %18, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %18, align 4, !tbaa !9
  br label %66, !llvm.loop !18

134:                                              ; preds = %70
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #7
  %136 = load float, ptr %14, align 4, !tbaa !11
  %137 = fneg float %136
  %138 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 2
  %139 = load float, ptr %138, align 4, !tbaa !13
  %140 = fneg float %139
  %141 = call float @llvm.fmuladd.f32(float %137, float 5.000000e-01, float %140)
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %25, float noundef 0.000000e+00, float noundef %141, float noundef 0.000000e+00)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %135, ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #7
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %146

144:                                              ; preds = %134
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #7
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %27)
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %145, ptr noundef nonnull align 4 dereferenceable(12) %26)
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #7
  br label %146

146:                                              ; preds = %144, %134
  %147 = call noundef zeroext i1 @_ZNK7Riemann8Capsule314IsYAxisAlignedEv(ptr noundef nonnull align 4 dereferenceable(32) %41)
  br i1 %147, label %196, label %148

148:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 36, ptr %28) #7
  call void @_ZN5Maths7Matrix3C2Ev(ptr noundef nonnull align 4 dereferenceable(36) %28)
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #7
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %29)
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #7
  %149 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 1
  %150 = getelementptr inbounds %"class.Riemann::Capsule3", ptr %41, i32 0, i32 0
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %149, ptr noundef nonnull align 4 dereferenceable(12) %150)
  %151 = call noundef nonnull align 4 dereferenceable(36) ptr @_ZN5Maths7Matrix311FromTwoAxisERKNS_8TVector3IfEES4_(ptr noundef nonnull align 4 dereferenceable(36) %28, ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %30)
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = call noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %152) #7
  store ptr %153, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  store i64 0, ptr %32, align 8, !tbaa !19
  br label %154

154:                                              ; preds = %168, %148
  %155 = load i64, ptr %32, align 8, !tbaa !19
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %156) #7
  %158 = icmp ult i64 %155, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %154
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  br label %171

160:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #7
  %161 = load ptr, ptr %31, align 8, !tbaa !5
  %162 = load i64, ptr %32, align 8, !tbaa !19
  %163 = getelementptr inbounds %"class.Maths::TVector3", ptr %161, i64 %162
  call void @_ZNK5Maths7Matrix3mlERKNS_8TVector3IfEE(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %33, ptr noundef nonnull align 4 dereferenceable(36) %28, ptr noundef nonnull align 4 dereferenceable(12) %163)
  %164 = load ptr, ptr %31, align 8, !tbaa !5
  %165 = load i64, ptr %32, align 8, !tbaa !19
  %166 = getelementptr inbounds %"class.Maths::TVector3", ptr %164, i64 %165
  %167 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %166, ptr noundef nonnull align 4 dereferenceable(12) %33)
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #7
  br label %168

168:                                              ; preds = %160
  %169 = load i64, ptr %32, align 8, !tbaa !19
  %170 = add i64 %169, 1
  store i64 %170, ptr %32, align 8, !tbaa !19
  br label %154, !llvm.loop !21

171:                                              ; preds = %159
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = icmp ne ptr %172, null
  br i1 %173, label %174, label %195

174:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = call noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %175) #7
  store ptr %176, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  store i64 0, ptr %35, align 8, !tbaa !19
  br label %177

177:                                              ; preds = %191, %174
  %178 = load i64, ptr %35, align 8, !tbaa !19
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %179) #7
  %181 = icmp ult i64 %178, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %177
  store i32 11, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %194

183:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #7
  %184 = load ptr, ptr %34, align 8, !tbaa !5
  %185 = load i64, ptr %35, align 8, !tbaa !19
  %186 = getelementptr inbounds %"class.Maths::TVector3", ptr %184, i64 %185
  call void @_ZNK5Maths7Matrix3mlERKNS_8TVector3IfEE(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %36, ptr noundef nonnull align 4 dereferenceable(36) %28, ptr noundef nonnull align 4 dereferenceable(12) %186)
  %187 = load ptr, ptr %34, align 8, !tbaa !5
  %188 = load i64, ptr %35, align 8, !tbaa !19
  %189 = getelementptr inbounds %"class.Maths::TVector3", ptr %187, i64 %188
  %190 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %189, ptr noundef nonnull align 4 dereferenceable(12) %36)
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #7
  br label %191

191:                                              ; preds = %183
  %192 = load i64, ptr %35, align 8, !tbaa !19
  %193 = add i64 %192, 1
  store i64 %193, ptr %35, align 8, !tbaa !19
  br label %177, !llvm.loop !22

194:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %195

195:                                              ; preds = %194, %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %28) #7
  br label %196

196:                                              ; preds = %195, %146
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #7
  call void @_ZNK7Riemann8Capsule39GetCenterEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %37, ptr noundef nonnull align 4 dereferenceable(32) %41)
  %197 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %37)
  %198 = fcmp ogt float %197, 0x3F50624DE0000000
  br i1 %198, label %199, label %220

199:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = call noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %200) #7
  store ptr %201, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  store i64 0, ptr %39, align 8, !tbaa !19
  br label %202

202:                                              ; preds = %216, %199
  %203 = load i64, ptr %39, align 8, !tbaa !19
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %204) #7
  %206 = icmp ult i64 %203, %205
  br i1 %206, label %208, label %207

207:                                              ; preds = %202
  store i32 14, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %219

208:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #7
  %209 = load ptr, ptr %38, align 8, !tbaa !5
  %210 = load i64, ptr %39, align 8, !tbaa !19
  %211 = getelementptr inbounds %"class.Maths::TVector3", ptr %209, i64 %210
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %40, ptr noundef nonnull align 4 dereferenceable(12) %211, ptr noundef nonnull align 4 dereferenceable(12) %37)
  %212 = load ptr, ptr %38, align 8, !tbaa !5
  %213 = load i64, ptr %39, align 8, !tbaa !19
  %214 = getelementptr inbounds %"class.Maths::TVector3", ptr %212, i64 %213
  %215 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %214, ptr noundef nonnull align 4 dereferenceable(12) %40)
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #7
  br label %216

216:                                              ; preds = %208
  %217 = load i64, ptr %39, align 8, !tbaa !19
  %218 = add i64 %217, 1
  store i64 %218, ptr %39, align 8, !tbaa !19
  br label %202, !llvm.loop !23

219:                                              ; preds = %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  br label %220

220:                                              ; preds = %219, %196
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  ret void
}

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

; Function Attrs: nounwind
declare float @asinf(float noundef) #6

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

; Function Attrs: nounwind
declare float @sinf(float noundef) #6

; Function Attrs: nounwind
declare float @cosf(float noundef) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann8Capsule314IsYAxisAlignedEv(ptr noundef nonnull align 4 dereferenceable(32)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths7Matrix3C2Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #5 align 2

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !12, i64 24}
!14 = !{!"_ZTSN7Riemann8Capsule3E", !15, i64 0, !15, i64 12, !12, i64 24, !12, i64 28}
!15 = !{!"_ZTSN5Maths8TVector3IfEE", !12, i64 0, !12, i64 4, !12, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = distinct !{!23, !17}


; 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 }
%"class.Maths::Matrix3" = type { [3 x [3 x 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: 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 #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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Maths8TVector3IfEplERKS1_(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 #1 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 #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK5Maths8TVector3IfE6LengthEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 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 #4 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 #1 align 2

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

; 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 #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann8Capsule311GetVerticesEiiRSt6vectorIN5Maths8TVector3IfEESaIS4_EEPS6_(ptr noundef nonnull align 4 dereferenceable(32) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef %4) local_unnamed_addr #4 align 2 {
  %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::Matrix3", 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 %"class.Maths::TVector3", align 4
  %18 = alloca %"class.Maths::TVector3", align 4
  %19 = alloca %"class.Maths::TVector3", align 4
  %20 = sitofp i32 %1 to float
  %21 = fdiv float 0x400921FB60000000, %20
  %22 = sitofp i32 %2 to float
  %23 = fdiv float 0x401921FB60000000, %22
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %24 = getelementptr inbounds i8, ptr %0, i64 12
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %25 = call noundef float @_ZNK5Maths8TVector3IfE6LengthEv(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
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  %27 = load float, ptr %26, align 4, !tbaa !5
  %28 = call float @llvm.fmuladd.f32(float %25, float 5.000000e-01, float %27)
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef 0.000000e+00, float noundef %28, float noundef 0.000000e+00)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %30, label %29

29:                                               ; preds = %5
  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)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  br label %30

30:                                               ; preds = %29, %5
  %31 = icmp sgt i32 %1, 1
  br i1 %31, label %.lr.ph73, label %._crit_edge74

.lr.ph73:                                         ; preds = %30
  %32 = lshr i32 %1, 1
  %.not6769 = icmp slt i32 %2, 0
  br i1 %.not6769, label %._crit_edge74, label %.lr.ph73.split

.lr.ph73.split:                                   ; preds = %.lr.ph73
  br i1 %.not, label %.lr.ph.us, label %.lr.ph

.lr.ph.us:                                        ; preds = %.lr.ph73.split, %._crit_edge.split.us.us
  %.06071.us75 = phi i32 [ %53, %._crit_edge.split.us.us ], [ 1, %.lr.ph73.split ]
  %33 = uitofp nneg i32 %.06071.us75 to float
  %34 = fmul float %21, %33
  %.not66.us76 = icmp ugt i32 %.06071.us75, %32
  %.v.us77 = select i1 %.not66.us76, float -5.000000e-01, float 5.000000e-01
  %35 = fmul float %25, %.v.us77
  br label %36

36:                                               ; preds = %36, %.lr.ph.us
  %.06370.us.us = phi i32 [ 0, %.lr.ph.us ], [ %52, %36 ]
  %37 = uitofp nneg i32 %.06370.us.us to float
  %38 = fmul float %23, %37
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  %39 = load float, ptr %26, align 4, !tbaa !5
  %40 = call float @sinf(float noundef %34) #7
  %41 = fmul float %39, %40
  %42 = call float @cosf(float noundef %38) #7
  %43 = fmul float %41, %42
  %44 = load float, ptr %26, align 4, !tbaa !5
  %45 = call float @cosf(float noundef %34) #7
  %46 = call float @llvm.fmuladd.f32(float %44, float %45, float %35)
  %47 = load float, ptr %26, align 4, !tbaa !5
  %48 = call float @sinf(float noundef %34) #7
  %49 = fmul float %47, %48
  %50 = call float @sinf(float noundef %38) #7
  %51 = fmul float %49, %50
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef %43, float noundef %46, float noundef %51)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  %52 = add nuw i32 %.06370.us.us, 1
  %exitcond92.not = icmp eq i32 %.06370.us.us, %2
  br i1 %exitcond92.not, label %._crit_edge.split.us.us, label %36, !llvm.loop !11

._crit_edge.split.us.us:                          ; preds = %36
  %53 = add nuw nsw i32 %.06071.us75, 1
  %exitcond93.not = icmp eq i32 %53, %1
  br i1 %exitcond93.not, label %._crit_edge74, label %.lr.ph.us, !llvm.loop !13

._crit_edge74:                                    ; preds = %._crit_edge.split, %._crit_edge.split.us.us, %.lr.ph73, %30
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  %54 = fneg float %25
  %55 = load float, ptr %26, align 4, !tbaa !5
  %56 = fneg float %55
  %57 = call float @llvm.fmuladd.f32(float %54, float 5.000000e-01, float %56)
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef 0.000000e+00, float noundef %57, float noundef 0.000000e+00)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  br i1 %.not, label %80, label %79

.lr.ph:                                           ; preds = %.lr.ph73.split, %._crit_edge.split
  %.06071 = phi i32 [ %61, %._crit_edge.split ], [ 1, %.lr.ph73.split ]
  %58 = uitofp nneg i32 %.06071 to float
  %59 = fmul float %21, %58
  %.not66 = icmp ugt i32 %.06071, %32
  %.v = select i1 %.not66, float -5.000000e-01, float 5.000000e-01
  %60 = fmul float %25, %.v
  br label %62

._crit_edge.split:                                ; preds = %62
  %61 = add nuw nsw i32 %.06071, 1
  %exitcond91.not = icmp eq i32 %61, %1
  br i1 %exitcond91.not, label %._crit_edge74, label %.lr.ph, !llvm.loop !13

62:                                               ; preds = %.lr.ph, %62
  %.06370 = phi i32 [ 0, %.lr.ph ], [ %78, %62 ]
  %63 = uitofp nneg i32 %.06370 to float
  %64 = fmul float %23, %63
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  %65 = load float, ptr %26, align 4, !tbaa !5
  %66 = call float @sinf(float noundef %59) #7
  %67 = fmul float %65, %66
  %68 = call float @cosf(float noundef %64) #7
  %69 = fmul float %67, %68
  %70 = load float, ptr %26, align 4, !tbaa !5
  %71 = call float @cosf(float noundef %59) #7
  %72 = call float @llvm.fmuladd.f32(float %70, float %71, float %60)
  %73 = load float, ptr %26, align 4, !tbaa !5
  %74 = call float @sinf(float noundef %59) #7
  %75 = fmul float %73, %74
  %76 = call float @sinf(float noundef %64) #7
  %77 = fmul float %75, %76
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %9, float noundef %69, float noundef %72, float noundef %77)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  %78 = add nuw i32 %.06370, 1
  %exitcond.not = icmp eq i32 %.06370, %2
  br i1 %exitcond.not, label %._crit_edge.split, label %62, !llvm.loop !11

79:                                               ; preds = %._crit_edge74
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #7
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %12)
  call void @_ZNK5Maths8TVector3IfEngEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #7
  br label %80

80:                                               ; preds = %79, %._crit_edge74
  %81 = call noundef zeroext i1 @_ZNK7Riemann8Capsule314IsYAxisAlignedEv(ptr noundef nonnull align 4 dereferenceable(32) %0)
  br i1 %81, label %99, label %82

82:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %13) #7
  call void @_ZN5Maths7Matrix3C2Ev(ptr noundef nonnull align 4 dereferenceable(36) %13)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #7
  call void @_ZN5Maths8TVector3IfE5UnitYEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %14)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #7
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %83 = call noundef nonnull align 4 dereferenceable(36) ptr @_ZN5Maths7Matrix311FromTwoAxisERKNS_8TVector3IfEES4_(ptr noundef nonnull align 4 dereferenceable(36) %13, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #7
  %84 = call noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %85 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not86 = icmp eq i64 %85, 0
  br i1 %.not86, label %._crit_edge, label %.lr.ph79

._crit_edge:                                      ; preds = %.lr.ph79, %82
  br i1 %.not, label %.loopexit68, label %91

.lr.ph79:                                         ; preds = %82, %.lr.ph79
  %.06278 = phi i64 [ %88, %.lr.ph79 ], [ 0, %82 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #7
  %86 = getelementptr inbounds %"class.Maths::TVector3", ptr %84, i64 %.06278
  call void @_ZNK5Maths7Matrix3mlERKNS_8TVector3IfEE(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %16, ptr noundef nonnull align 4 dereferenceable(36) %13, ptr noundef nonnull align 4 dereferenceable(12) %86)
  %87 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %86, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #7
  %88 = add nuw i64 %.06278, 1
  %89 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %90 = icmp ult i64 %88, %89
  br i1 %90, label %.lr.ph79, label %._crit_edge, !llvm.loop !14

91:                                               ; preds = %._crit_edge
  %92 = call noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %93 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not87 = icmp eq i64 %93, 0
  br i1 %.not87, label %.loopexit68, label %.lr.ph82

.lr.ph82:                                         ; preds = %91, %.lr.ph82
  %.06180 = phi i64 [ %96, %.lr.ph82 ], [ 0, %91 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #7
  %94 = getelementptr inbounds %"class.Maths::TVector3", ptr %92, i64 %.06180
  call void @_ZNK5Maths7Matrix3mlERKNS_8TVector3IfEE(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %17, ptr noundef nonnull align 4 dereferenceable(36) %13, ptr noundef nonnull align 4 dereferenceable(12) %94)
  %95 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %94, ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #7
  %96 = add nuw i64 %.06180, 1
  %97 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %98 = icmp ult i64 %96, %97
  br i1 %98, label %.lr.ph82, label %.loopexit68, !llvm.loop !15

.loopexit68:                                      ; preds = %.lr.ph82, %91, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %13) #7
  br label %99

99:                                               ; preds = %.loopexit68, %80
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #7
  call void @_ZNK7Riemann8Capsule39GetCenterEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %18, ptr noundef nonnull align 4 dereferenceable(32) %0)
  %100 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %18)
  %101 = fcmp ogt float %100, 0x3F50624DE0000000
  br i1 %101, label %102, label %.loopexit

102:                                              ; preds = %99
  %103 = call noundef ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %104 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %.not88 = icmp eq i64 %104, 0
  br i1 %.not88, label %.loopexit, label %.lr.ph85

.lr.ph85:                                         ; preds = %102, %.lr.ph85
  %.083 = phi i64 [ %107, %.lr.ph85 ], [ 0, %102 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #7
  %105 = getelementptr inbounds %"class.Maths::TVector3", ptr %103, i64 %.083
  call void @_ZNK5Maths8TVector3IfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %19, ptr noundef nonnull align 4 dereferenceable(12) %105, ptr noundef nonnull align 4 dereferenceable(12) %18)
  %106 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %105, ptr noundef nonnull align 4 dereferenceable(12) %19)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #7
  %107 = add nuw i64 %.083, 1
  %108 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %109 = icmp ult i64 %107, %108
  br i1 %109, label %.lr.ph85, label %.loopexit, !llvm.loop !16

.loopexit:                                        ; preds = %.lr.ph85, %102, %99
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #7
  ret void
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sinf(float noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7Riemann8Capsule314IsYAxisAlignedEv(ptr noundef nonnull align 4 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Maths7Matrix3C2Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #5 align 2

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

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

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

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


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