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

; 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.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Riemann::HeightField3" = type { i32, i32, %"class.Maths::TAABB3", float, float, float, float, float, %"class.std::vector", ptr }
%"class.Maths::TAABB3" = type { %"class.Maths::TVector3", %"class.Maths::TVector3" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Riemann::HeightField3::CellInfo, std::allocator<Riemann::HeightField3::CellInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<Riemann::HeightField3::CellInfo, std::allocator<Riemann::HeightField3::CellInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<Riemann::HeightField3::CellInfo, std::allocator<Riemann::HeightField3::CellInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Riemann::HeightField3::CellInfo, std::allocator<Riemann::HeightField3::CellInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Riemann12HeightField37GetMeshERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEES7_ = external hidden unnamed_addr constant [109 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK7Riemann12HeightField39GetHeightEi(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) #3 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann12HeightField315GetCellTriangleEiiPj(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, ptr noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann12HeightField37GetMeshERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEES7_(ptr noundef nonnull align 8 dereferenceable(88) %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) #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca i32, align 4
  %14 = alloca [6 x i32], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::vector.10", align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i16, align 2
  %25 = alloca i16, align 2
  %26 = alloca i16, align 2
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca %"class.Maths::TVector3", align 4
  %31 = alloca %"class.Maths::TVector3", align 4
  %32 = alloca %"class.Maths::TVector3", align 4
  %33 = alloca %"class.Maths::TVector3", align 4
  %34 = alloca %"class.Maths::TVector3", align 4
  %35 = alloca %"class.Maths::TVector3", align 4
  %36 = alloca i64, align 8
  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
  %37 = load ptr, ptr %5, align 8
  %38 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !9
  %40 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = mul i32 %39, %41
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %45

44:                                               ; preds = %4
  br label %358

45:                                               ; preds = %4
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !19
  %49 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 1
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = mul i32 %48, %50
  %52 = zext i32 %51 to i64
  call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %52)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !20
  br label %53

53:                                               ; preds = %106, %45
  %54 = load i32, ptr %9, align 4, !tbaa !20
  %55 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 0
  %56 = load i32, ptr %55, align 8, !tbaa !19
  %57 = icmp ult i32 %54, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %53
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %109

59:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !20
  br label %60

60:                                               ; preds = %102, %59
  %61 = load i32, ptr %11, align 4, !tbaa !20
  %62 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = icmp ult i32 %61, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %60
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %105

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #8
  %67 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 2
  %68 = getelementptr inbounds %"class.Maths::TAABB3", ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds %"class.Maths::TVector3", ptr %68, i32 0, i32 0
  %70 = load float, ptr %69, align 8, !tbaa !21
  %71 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 3
  %72 = load float, ptr %71, align 8, !tbaa !22
  %73 = load i32, ptr %9, align 4, !tbaa !20
  %74 = uitofp i32 %73 to float
  %75 = call float @llvm.fmuladd.f32(float %72, float %74, float %70)
  %76 = load i32, ptr %9, align 4, !tbaa !20
  %77 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = mul i32 %76, %78
  %80 = load i32, ptr %11, align 4, !tbaa !20
  %81 = add i32 %79, %80
  %82 = call noundef float @_ZNK7Riemann12HeightField39GetHeightEi(ptr noundef nonnull align 8 dereferenceable(88) %37, i32 noundef %81)
  %83 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 2
  %84 = getelementptr inbounds %"class.Maths::TAABB3", ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %"class.Maths::TVector3", ptr %84, i32 0, i32 2
  %86 = load float, ptr %85, align 8, !tbaa !23
  %87 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 4
  %88 = load float, ptr %87, align 4, !tbaa !24
  %89 = load i32, ptr %11, align 4, !tbaa !20
  %90 = uitofp i32 %89 to float
  %91 = call float @llvm.fmuladd.f32(float %88, float %90, float %86)
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %12, float noundef %75, float noundef %82, float noundef %91)
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !20
  %94 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = mul i32 %93, %95
  %97 = load i32, ptr %11, align 4, !tbaa !20
  %98 = add i32 %96, %97
  %99 = zext i32 %98 to i64
  %100 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %99) #8
  %101 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %100, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #8
  br label %102

102:                                              ; preds = %66
  %103 = load i32, ptr %11, align 4, !tbaa !20
  %104 = add i32 %103, 1
  store i32 %104, ptr %11, align 4, !tbaa !20
  br label %60, !llvm.loop !25

105:                                              ; preds = %65
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %9, align 4, !tbaa !20
  %108 = add i32 %107, 1
  store i32 %108, ptr %9, align 4, !tbaa !20
  br label %53, !llvm.loop !27

109:                                              ; preds = %58
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #8
  %112 = icmp ult i64 %111, 65535
  br i1 %112, label %113, label %114

113:                                              ; preds = %109
  br label %116

114:                                              ; preds = %109
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 492, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann12HeightField37GetMeshERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEES7_) #9
  unreachable

115:                                              ; No predecessors!
  br label %116

116:                                              ; preds = %115, %113
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = sub i32 %119, 1
  %121 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !19
  %123 = sub i32 %122, 1
  %124 = mul i32 %120, %123
  %125 = mul i32 %124, 2
  %126 = mul i32 %125, 3
  %127 = zext i32 %126 to i64
  call void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %127)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !20
  br label %128

128:                                              ; preds = %200, %116
  %129 = load i32, ptr %15, align 4, !tbaa !20
  %130 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 1
  %131 = load i32, ptr %130, align 4, !tbaa !9
  %132 = sub i32 %131, 1
  %133 = icmp ult i32 %129, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %128
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %203

135:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !20
  br label %136

136:                                              ; preds = %196, %135
  %137 = load i32, ptr %16, align 4, !tbaa !20
  %138 = getelementptr inbounds %"class.Riemann::HeightField3", ptr %37, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !19
  %140 = sub i32 %139, 1
  %141 = icmp ult i32 %137, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %136
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %199

143:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %144 = load i32, ptr %15, align 4, !tbaa !20
  %145 = load i32, ptr %16, align 4, !tbaa !20
  %146 = getelementptr inbounds [6 x i32], ptr %14, i64 0, i64 0
  %147 = call noundef i32 @_ZNK7Riemann12HeightField315GetCellTriangleEiiPj(ptr noundef nonnull align 8 dereferenceable(88) %37, i32 noundef %144, i32 noundef %145, ptr noundef %146)
  store i32 %147, ptr %17, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !20
  br label %148

148:                                              ; preds = %192, %143
  %149 = load i32, ptr %18, align 4, !tbaa !20
  %150 = load i32, ptr %17, align 4, !tbaa !20
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %195

153:                                              ; preds = %148
  %154 = load i32, ptr %18, align 4, !tbaa !20
  %155 = add nsw i32 %154, 0
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [6 x i32], ptr %14, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !20
  %159 = trunc i32 %158 to i16
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = load i32, ptr %13, align 4, !tbaa !20
  %162 = mul nsw i32 3, %161
  %163 = add nsw i32 %162, 0
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef %164) #8
  store i16 %159, ptr %165, align 2, !tbaa !28
  %166 = load i32, ptr %18, align 4, !tbaa !20
  %167 = add nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [6 x i32], ptr %14, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !20
  %171 = trunc i32 %170 to i16
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = load i32, ptr %13, align 4, !tbaa !20
  %174 = mul nsw i32 3, %173
  %175 = add nsw i32 %174, 1
  %176 = sext i32 %175 to i64
  %177 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %176) #8
  store i16 %171, ptr %177, align 2, !tbaa !28
  %178 = load i32, ptr %18, align 4, !tbaa !20
  %179 = add nsw i32 %178, 2
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [6 x i32], ptr %14, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !20
  %183 = trunc i32 %182 to i16
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = load i32, ptr %13, align 4, !tbaa !20
  %186 = mul nsw i32 3, %185
  %187 = add nsw i32 %186, 2
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %188) #8
  store i16 %183, ptr %189, align 2, !tbaa !28
  %190 = load i32, ptr %13, align 4, !tbaa !20
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %13, align 4, !tbaa !20
  br label %192

192:                                              ; preds = %153
  %193 = load i32, ptr %18, align 4, !tbaa !20
  %194 = add nsw i32 %193, 3
  store i32 %194, ptr %18, align 4, !tbaa !20
  br label %148, !llvm.loop !30

195:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %196

196:                                              ; preds = %195
  %197 = load i32, ptr %16, align 4, !tbaa !20
  %198 = add i32 %197, 1
  store i32 %198, ptr %16, align 4, !tbaa !20
  br label %136, !llvm.loop !31

199:                                              ; preds = %142
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %15, align 4, !tbaa !20
  %202 = add i32 %201, 1
  store i32 %202, ptr %15, align 4, !tbaa !20
  br label %128, !llvm.loop !32

203:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %204) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !20
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %205, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %206 unwind label %221

206:                                              ; preds = %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %208) #8
  invoke void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %207, i64 noundef %209)
          to label %210 unwind label %225

210:                                              ; preds = %206
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  %212 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %211, i64 noundef 0) #8
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  %214 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %213) #8
  %215 = mul i64 12, %214
  call void @llvm.memset.p0.i64(ptr align 4 %212, i8 0, i64 %215, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !20
  br label %216

216:                                              ; preds = %303, %210
  %217 = load i32, ptr %23, align 4, !tbaa !20
  %218 = load i32, ptr %13, align 4, !tbaa !20
  %219 = icmp slt i32 %217, %218
  br i1 %219, label %229, label %220

220:                                              ; preds = %216
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %328

221:                                              ; preds = %203
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %21, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %359

225:                                              ; preds = %206
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %21, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %22, align 4
  br label %359

229:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #8
  %230 = load ptr, ptr %7, align 8, !tbaa !5
  %231 = load i32, ptr %23, align 4, !tbaa !20
  %232 = mul nsw i32 3, %231
  %233 = add nsw i32 %232, 0
  %234 = sext i32 %233 to i64
  %235 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %230, i64 noundef %234) #8
  %236 = load i16, ptr %235, align 2, !tbaa !28
  store i16 %236, ptr %24, align 2, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 2, ptr %25) #8
  %237 = load ptr, ptr %7, align 8, !tbaa !5
  %238 = load i32, ptr %23, align 4, !tbaa !20
  %239 = mul nsw i32 3, %238
  %240 = add nsw i32 %239, 1
  %241 = sext i32 %240 to i64
  %242 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %241) #8
  %243 = load i16, ptr %242, align 2, !tbaa !28
  store i16 %243, ptr %25, align 2, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 2, ptr %26) #8
  %244 = load ptr, ptr %7, align 8, !tbaa !5
  %245 = load i32, ptr %23, align 4, !tbaa !20
  %246 = mul nsw i32 3, %245
  %247 = add nsw i32 %246, 2
  %248 = sext i32 %247 to i64
  %249 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %244, i64 noundef %248) #8
  %250 = load i16, ptr %249, align 2, !tbaa !28
  store i16 %250, ptr %26, align 2, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %251 = load ptr, ptr %6, align 8, !tbaa !5
  %252 = load i16, ptr %24, align 2, !tbaa !28
  %253 = zext i16 %252 to i64
  %254 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %251, i64 noundef %253) #8
  store ptr %254, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %255 = load ptr, ptr %6, align 8, !tbaa !5
  %256 = load i16, ptr %25, align 2, !tbaa !28
  %257 = zext i16 %256 to i64
  %258 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %255, i64 noundef %257) #8
  store ptr %258, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %259 = load ptr, ptr %6, align 8, !tbaa !5
  %260 = load i16, ptr %26, align 2, !tbaa !28
  %261 = zext i16 %260 to i64
  %262 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %259, i64 noundef %261) #8
  store ptr %262, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #8
  %263 = load ptr, ptr %28, align 8, !tbaa !5
  %264 = load ptr, ptr %27, align 8, !tbaa !5
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %263, ptr noundef nonnull align 4 dereferenceable(12) %264)
          to label %265 unwind label %306

265:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #8
  %266 = load ptr, ptr %29, align 8, !tbaa !5
  %267 = load ptr, ptr %27, align 8, !tbaa !5
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %32, ptr noundef nonnull align 4 dereferenceable(12) %266, ptr noundef nonnull align 4 dereferenceable(12) %267)
          to label %268 unwind label %310

268:                                              ; preds = %265
  invoke void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %32)
          to label %269 unwind label %310

269:                                              ; preds = %268
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #8
  invoke void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %33, ptr noundef nonnull align 4 dereferenceable(12) %30)
          to label %270 unwind label %315

270:                                              ; preds = %269
  %271 = load ptr, ptr %8, align 8, !tbaa !5
  %272 = load i16, ptr %24, align 2, !tbaa !28
  %273 = zext i16 %272 to i64
  %274 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %271, i64 noundef %273) #8
  invoke void @_ZN5Maths8TVector3IfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %274, ptr noundef nonnull align 4 dereferenceable(12) %33)
          to label %275 unwind label %315

275:                                              ; preds = %270
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #8
  %276 = load i16, ptr %24, align 2, !tbaa !28
  %277 = zext i16 %276 to i64
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %277) #8
  %279 = load i32, ptr %278, align 4, !tbaa !20
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %278, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #8
  invoke void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %34, ptr noundef nonnull align 4 dereferenceable(12) %30)
          to label %281 unwind label %319

281:                                              ; preds = %275
  %282 = load ptr, ptr %8, align 8, !tbaa !5
  %283 = load i16, ptr %25, align 2, !tbaa !28
  %284 = zext i16 %283 to i64
  %285 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %282, i64 noundef %284) #8
  invoke void @_ZN5Maths8TVector3IfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %285, ptr noundef nonnull align 4 dereferenceable(12) %34)
          to label %286 unwind label %319

286:                                              ; preds = %281
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #8
  %287 = load i16, ptr %25, align 2, !tbaa !28
  %288 = zext i16 %287 to i64
  %289 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %288) #8
  %290 = load i32, ptr %289, align 4, !tbaa !20
  %291 = add nsw i32 %290, 1
  store i32 %291, ptr %289, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #8
  invoke void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %35, ptr noundef nonnull align 4 dereferenceable(12) %30)
          to label %292 unwind label %323

292:                                              ; preds = %286
  %293 = load ptr, ptr %8, align 8, !tbaa !5
  %294 = load i16, ptr %26, align 2, !tbaa !28
  %295 = zext i16 %294 to i64
  %296 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %293, i64 noundef %295) #8
  invoke void @_ZN5Maths8TVector3IfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %296, ptr noundef nonnull align 4 dereferenceable(12) %35)
          to label %297 unwind label %323

297:                                              ; preds = %292
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #8
  %298 = load i16, ptr %26, align 2, !tbaa !28
  %299 = zext i16 %298 to i64
  %300 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %299) #8
  %301 = load i32, ptr %300, align 4, !tbaa !20
  %302 = add nsw i32 %301, 1
  store i32 %302, ptr %300, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #8
  br label %303

303:                                              ; preds = %297
  %304 = load i32, ptr %23, align 4, !tbaa !20
  %305 = add nsw i32 %304, 1
  store i32 %305, ptr %23, align 4, !tbaa !20
  br label %216, !llvm.loop !33

306:                                              ; preds = %229
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %21, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %22, align 4
  br label %314

310:                                              ; preds = %268, %265
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %21, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #8
  br label %314

314:                                              ; preds = %310, %306
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #8
  br label %327

315:                                              ; preds = %270, %269
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %21, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #8
  br label %327

319:                                              ; preds = %281, %275
  %320 = landingpad { ptr, i32 }
          cleanup
  %321 = extractvalue { ptr, i32 } %320, 0
  store ptr %321, ptr %21, align 8
  %322 = extractvalue { ptr, i32 } %320, 1
  store i32 %322, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #8
  br label %327

323:                                              ; preds = %292, %286
  %324 = landingpad { ptr, i32 }
          cleanup
  %325 = extractvalue { ptr, i32 } %324, 0
  store ptr %325, ptr %21, align 8
  %326 = extractvalue { ptr, i32 } %324, 1
  store i32 %326, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #8
  br label %327

327:                                              ; preds = %323, %319, %315, %314
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %359

328:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  store i64 0, ptr %36, align 8, !tbaa !34
  br label %329

329:                                              ; preds = %350, %328
  %330 = load i64, ptr %36, align 8, !tbaa !34
  %331 = load ptr, ptr %8, align 8, !tbaa !5
  %332 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %331) #8
  %333 = icmp ult i64 %330, %332
  br i1 %333, label %335, label %334

334:                                              ; preds = %329
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %357

335:                                              ; preds = %329
  %336 = load i64, ptr %36, align 8, !tbaa !34
  %337 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %336) #8
  %338 = load i32, ptr %337, align 4, !tbaa !20
  %339 = sitofp i32 %338 to float
  %340 = fdiv float 1.000000e+00, %339
  %341 = load ptr, ptr %8, align 8, !tbaa !5
  %342 = load i64, ptr %36, align 8, !tbaa !34
  %343 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %341, i64 noundef %342) #8
  invoke void @_ZN5Maths8TVector3IfEmLEf(ptr noundef nonnull align 4 dereferenceable(12) %343, float noundef %340)
          to label %344 unwind label %353

344:                                              ; preds = %335
  %345 = load ptr, ptr %8, align 8, !tbaa !5
  %346 = load i64, ptr %36, align 8, !tbaa !34
  %347 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %345, i64 noundef %346) #8
  %348 = invoke noundef float @_ZN5Maths8TVector3IfE9NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %347)
          to label %349 unwind label %353

349:                                              ; preds = %344
  br label %350

350:                                              ; preds = %349
  %351 = load i64, ptr %36, align 8, !tbaa !34
  %352 = add i64 %351, 1
  store i64 %352, ptr %36, align 8, !tbaa !34
  br label %329, !llvm.loop !36

353:                                              ; preds = %344, %335
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %21, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %359

357:                                              ; preds = %334
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %358

358:                                              ; preds = %357, %44
  ret void

359:                                              ; preds = %353, %327, %225, %221
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %360

360:                                              ; preds = %359
  %361 = load ptr, ptr %21, align 8
  %362 = load i32, ptr %22, align 4
  %363 = insertvalue { ptr, i32 } poison, ptr %361, 0
  %364 = insertvalue { ptr, i32 } %363, i32 %362, 1
  resume { ptr, i32 } %364
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 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) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 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) #3 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn 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, !11, i64 4}
!10 = !{!"_ZTSN7Riemann12HeightField3E", !11, i64 0, !11, i64 4, !12, i64 8, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !15, i64 56, !6, i64 80}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN5Maths6TAABB3IfEE", !13, i64 0, !13, i64 12}
!13 = !{!"_ZTSN5Maths8TVector3IfEE", !14, i64 0, !14, i64 4, !14, i64 8}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIN7Riemann12HeightField38CellInfoESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN7Riemann12HeightField38CellInfoESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN7Riemann12HeightField38CellInfoESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN7Riemann12HeightField38CellInfoESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!10, !11, i64 0}
!20 = !{!11, !11, i64 0}
!21 = !{!10, !14, i64 8}
!22 = !{!10, !14, i64 32}
!23 = !{!10, !14, i64 16}
!24 = !{!10, !14, i64 36}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = !{!29, !29, i64 0}
!29 = !{!"short", !7, i64 0}
!30 = distinct !{!30, !26}
!31 = distinct !{!31, !26}
!32 = distinct !{!32, !26}
!33 = distinct !{!33, !26}
!34 = !{!35, !35, i64 0}
!35 = !{!"long", !7, i64 0}
!36 = distinct !{!36, !26}


; 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.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Riemann12HeightField37GetMeshERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEES7_ = external hidden unnamed_addr constant [109 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK7Riemann12HeightField39GetHeightEi(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) local_unnamed_addr #3 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann12HeightField315GetCellTriangleEiiPj(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Riemann12HeightField37GetMeshERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEES7_(ptr noundef nonnull align 8 dereferenceable(88) %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 #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.Maths::TVector3", align 4
  %6 = alloca [6 x i32], align 16
  %7 = alloca %"class.std::vector.10", align 8
  %8 = alloca i32, 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 = getelementptr inbounds i8, ptr %0, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = mul i32 %16, %16
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %171, label %19

19:                                               ; preds = %4
  %20 = load i32, ptr %0, align 8, !tbaa !18
  %21 = mul i32 %20, %16
  %22 = zext i32 %21 to i64
  tail call void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %22)
  %23 = load i32, ptr %0, align 8, !tbaa !18
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %._crit_edge97, label %.preheader94.lr.ph

.preheader94.lr.ph:                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  %25 = getelementptr inbounds i8, ptr %0, i64 32
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  %27 = getelementptr inbounds i8, ptr %0, i64 36
  %28 = load i32, ptr %15, align 4, !tbaa !5
  %.not118 = icmp eq i32 %28, 0
  br i1 %.not118, label %._crit_edge97, label %.preheader94

.preheader94:                                     ; preds = %.preheader94.lr.ph, %._crit_edge
  %29 = phi i32 [ %34, %._crit_edge ], [ %23, %.preheader94.lr.ph ]
  %30 = phi i32 [ %35, %._crit_edge ], [ %28, %.preheader94.lr.ph ]
  %.07696 = phi i32 [ %36, %._crit_edge ], [ 0, %.preheader94.lr.ph ]
  %.not119 = icmp eq i32 %30, 0
  br i1 %.not119, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader94
  %31 = uitofp i32 %.07696 to float
  br label %38

._crit_edge97:                                    ; preds = %._crit_edge, %.preheader94.lr.ph, %19
  %32 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  %33 = icmp ult i64 %32, 65535
  br i1 %33, label %60, label %59

._crit_edge.loopexit:                             ; preds = %38
  %.pre = load i32, ptr %0, align 8, !tbaa !18
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader94
  %34 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %29, %.preheader94 ]
  %35 = phi i32 [ %57, %._crit_edge.loopexit ], [ 0, %.preheader94 ]
  %36 = add nuw i32 %.07696, 1
  %37 = icmp ult i32 %36, %34
  br i1 %37, label %.preheader94, label %._crit_edge97, !llvm.loop !19

38:                                               ; preds = %.lr.ph, %38
  %39 = phi i32 [ %30, %.lr.ph ], [ %57, %38 ]
  %.07795 = phi i32 [ 0, %.lr.ph ], [ %56, %38 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #8
  %40 = load float, ptr %24, align 8, !tbaa !22
  %41 = load float, ptr %25, align 8, !tbaa !23
  %42 = call float @llvm.fmuladd.f32(float %41, float %31, float %40)
  %43 = mul i32 %39, %.07696
  %44 = add i32 %43, %.07795
  %45 = call noundef float @_ZNK7Riemann12HeightField39GetHeightEi(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %44)
  %46 = load float, ptr %26, align 8, !tbaa !24
  %47 = load float, ptr %27, align 4, !tbaa !25
  %48 = uitofp i32 %.07795 to float
  %49 = call float @llvm.fmuladd.f32(float %47, float %48, float %46)
  call void @_ZN5Maths8TVector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef %42, float noundef %45, float noundef %49)
  %50 = load i32, ptr %15, align 4, !tbaa !5
  %51 = mul i32 %50, %.07696
  %52 = add i32 %51, %.07795
  %53 = zext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %53) #8
  %55 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  %56 = add nuw i32 %.07795, 1
  %57 = load i32, ptr %15, align 4, !tbaa !5
  %58 = icmp ult i32 %56, %57
  br i1 %58, label %38, label %._crit_edge.loopexit, !llvm.loop !26

59:                                               ; preds = %._crit_edge97
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 492, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann12HeightField37GetMeshERSt6vectorIN5Maths8TVector3IfEESaIS4_EERS1_ItSaItEES7_) #9
  unreachable

60:                                               ; preds = %._crit_edge97
  %61 = load i32, ptr %15, align 4, !tbaa !5
  %62 = load i32, ptr %0, align 8, !tbaa !18
  %63 = add i32 %62, 2147483647
  %64 = mul i32 %61, 6
  %65 = add i32 %64, -6
  %66 = mul i32 %65, %63
  %67 = zext i32 %66 to i64
  call void @_ZNSt6vectorItSaItEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %67)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  %68 = load i32, ptr %15, align 4, !tbaa !5
  %.not120 = icmp eq i32 %68, 1
  br i1 %.not120, label %._crit_edge110, label %.preheader93.preheader

.preheader93.preheader:                           ; preds = %60
  %.pre132 = load i32, ptr %0, align 8, !tbaa !18
  br label %.preheader93

.preheader93:                                     ; preds = %.preheader93.preheader, %._crit_edge106
  %69 = phi i32 [ %72, %._crit_edge106 ], [ %68, %.preheader93.preheader ]
  %70 = phi i32 [ %73, %._crit_edge106 ], [ %.pre132, %.preheader93.preheader ]
  %.078109 = phi i32 [ %.1.lcssa, %._crit_edge106 ], [ 0, %.preheader93.preheader ]
  %.079108 = phi i32 [ %74, %._crit_edge106 ], [ 0, %.preheader93.preheader ]
  %.not121 = icmp eq i32 %70, 1
  br i1 %.not121, label %._crit_edge106, label %.lr.ph105

._crit_edge110:                                   ; preds = %._crit_edge106, %60
  %.078.lcssa = phi i32 [ 0, %60 ], [ %.1.lcssa, %._crit_edge106 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %71 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !27
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %71, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %104 unwind label %112

._crit_edge106.loopexit:                          ; preds = %._crit_edge102
  %.pre133 = load i32, ptr %15, align 4, !tbaa !5
  br label %._crit_edge106

._crit_edge106:                                   ; preds = %._crit_edge106.loopexit, %.preheader93
  %72 = phi i32 [ %69, %.preheader93 ], [ %.pre133, %._crit_edge106.loopexit ]
  %73 = phi i32 [ 1, %.preheader93 ], [ %82, %._crit_edge106.loopexit ]
  %.1.lcssa = phi i32 [ %.078109, %.preheader93 ], [ %.2.lcssa, %._crit_edge106.loopexit ]
  %74 = add nuw i32 %.079108, 1
  %75 = add i32 %72, -1
  %76 = icmp ult i32 %74, %75
  br i1 %76, label %.preheader93, label %._crit_edge110, !llvm.loop !28

.lr.ph105:                                        ; preds = %.preheader93, %._crit_edge102
  %.1104 = phi i32 [ %.2.lcssa, %._crit_edge102 ], [ %.078109, %.preheader93 ]
  %.080103 = phi i32 [ %81, %._crit_edge102 ], [ 0, %.preheader93 ]
  %77 = call noundef i32 @_ZNK7Riemann12HeightField315GetCellTriangleEiiPj(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %.079108, i32 noundef %.080103, ptr noundef nonnull %6)
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %.lr.ph101.preheader, label %._crit_edge102

.lr.ph101.preheader:                              ; preds = %.lr.ph105
  %79 = sext i32 %.1104 to i64
  br label %.lr.ph101

._crit_edge102.loopexit:                          ; preds = %.lr.ph101
  %80 = trunc nsw i64 %indvars.iv.next to i32
  br label %._crit_edge102

._crit_edge102:                                   ; preds = %._crit_edge102.loopexit, %.lr.ph105
  %.2.lcssa = phi i32 [ %.1104, %.lr.ph105 ], [ %80, %._crit_edge102.loopexit ]
  %81 = add nuw i32 %.080103, 1
  %82 = load i32, ptr %0, align 8, !tbaa !18
  %83 = add i32 %82, -1
  %84 = icmp ult i32 %81, %83
  br i1 %84, label %.lr.ph105, label %._crit_edge106.loopexit, !llvm.loop !29

.lr.ph101:                                        ; preds = %.lr.ph101.preheader, %.lr.ph101
  %indvars.iv124 = phi i64 [ 0, %.lr.ph101.preheader ], [ %indvars.iv.next125, %.lr.ph101 ]
  %indvars.iv = phi i64 [ %79, %.lr.ph101.preheader ], [ %indvars.iv.next, %.lr.ph101 ]
  %85 = getelementptr inbounds [6 x i32], ptr %6, i64 0, i64 %indvars.iv124
  %86 = load i32, ptr %85, align 4, !tbaa !27
  %87 = trunc i32 %86 to i16
  %88 = mul nsw i64 %indvars.iv, 3
  %89 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %88) #8
  store i16 %87, ptr %89, align 2, !tbaa !30
  %90 = add nuw nsw i64 %indvars.iv124, 1
  %91 = getelementptr inbounds [6 x i32], ptr %6, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !27
  %93 = trunc i32 %92 to i16
  %94 = add nsw i64 %88, 1
  %95 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %94) #8
  store i16 %93, ptr %95, align 2, !tbaa !30
  %96 = add nuw nsw i64 %indvars.iv124, 2
  %97 = getelementptr inbounds [6 x i32], ptr %6, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !27
  %99 = trunc i32 %98 to i16
  %100 = add nsw i64 %88, 2
  %101 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %100) #8
  store i16 %99, ptr %101, align 2, !tbaa !30
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 3
  %102 = trunc nuw i64 %indvars.iv.next125 to i32
  %103 = icmp sgt i32 %77, %102
  br i1 %103, label %.lr.ph101, label %._crit_edge102.loopexit, !llvm.loop !32

104:                                              ; preds = %._crit_edge110
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %105 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  invoke void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %105)
          to label %106 unwind label %114

106:                                              ; preds = %104
  %107 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #8
  %108 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %109 = mul i64 %108, 12
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %107, i8 0, i64 %109, i1 false)
  %110 = icmp sgt i32 %.078.lcssa, 0
  br i1 %110, label %.lr.ph114.preheader, label %.preheader

.lr.ph114.preheader:                              ; preds = %106
  %wide.trip.count = zext nneg i32 %.078.lcssa to i64
  br label %.lr.ph114

.preheader:                                       ; preds = %144, %106
  %111 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %.not122 = icmp eq i64 %111, 0
  br i1 %.not122, label %._crit_edge117, label %.lr.ph116

112:                                              ; preds = %._crit_edge110
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %172

114:                                              ; preds = %104
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %172

.lr.ph114:                                        ; preds = %.lr.ph114.preheader, %144
  %indvars.iv129 = phi i64 [ 0, %.lr.ph114.preheader ], [ %indvars.iv.next130, %144 ]
  %116 = mul nuw nsw i64 %indvars.iv129, 3
  %117 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %116) #8
  %118 = load i16, ptr %117, align 2, !tbaa !30
  %119 = add nuw nsw i64 %116, 1
  %120 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %119) #8
  %121 = load i16, ptr %120, align 2, !tbaa !30
  %122 = add nuw nsw i64 %116, 2
  %123 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNSt6vectorItSaItEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %122) #8
  %124 = load i16, ptr %123, align 2, !tbaa !30
  %125 = zext i16 %118 to i64
  %126 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %125) #8
  %127 = zext i16 %121 to i64
  %128 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %127) #8
  %129 = zext i16 %124 to i64
  %130 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %129) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #8
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %128, ptr noundef nonnull align 4 dereferenceable(12) %126)
          to label %131 unwind label %149

131:                                              ; preds = %.lr.ph114
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #8
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %130, ptr noundef nonnull align 4 dereferenceable(12) %126)
          to label %132 unwind label %151

132:                                              ; preds = %131
  invoke void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %11)
          to label %133 unwind label %151

133:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #8
  invoke void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %9)
          to label %134 unwind label %154

134:                                              ; preds = %133
  %135 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %125) #8
  call void @_ZN5Maths8TVector3IfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %135, ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %125) #8
  %137 = load i32, ptr %136, align 4, !tbaa !27
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %136, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #8
  invoke void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %9)
          to label %139 unwind label %156

139:                                              ; preds = %134
  %140 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %127) #8
  call void @_ZN5Maths8TVector3IfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %140, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  %141 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %127) #8
  %142 = load i32, ptr %141, align 4, !tbaa !27
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %141, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #8
  invoke void @_ZNK5Maths8TVector3IfE4UnitEv(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %9)
          to label %144 unwind label %158

144:                                              ; preds = %139
  %145 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %129) #8
  call void @_ZN5Maths8TVector3IfEpLERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %145, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #8
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %129) #8
  %147 = load i32, ptr %146, align 4, !tbaa !27
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %146, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #8
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next130, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph114, !llvm.loop !33

149:                                              ; preds = %.lr.ph114
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %153

151:                                              ; preds = %132, %131
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  br label %153

153:                                              ; preds = %151, %149
  %.pn = phi { ptr, i32 } [ %152, %151 ], [ %150, %149 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  br label %160

154:                                              ; preds = %133
  %155 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  br label %160

156:                                              ; preds = %134
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  br label %160

158:                                              ; preds = %139
  %159 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #8
  br label %160

160:                                              ; preds = %158, %156, %154, %153
  %.pn90 = phi { ptr, i32 } [ %159, %158 ], [ %157, %156 ], [ %155, %154 ], [ %.pn, %153 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #8
  br label %172

._crit_edge117:                                   ; preds = %.lr.ph116, %.preheader
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %171

.lr.ph116:                                        ; preds = %.preheader, %.lr.ph116
  %.0115 = phi i64 [ %168, %.lr.ph116 ], [ 0, %.preheader ]
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.0115) #8
  %162 = load i32, ptr %161, align 4, !tbaa !27
  %163 = sitofp i32 %162 to float
  %164 = fdiv float 1.000000e+00, %163
  %165 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0115) #8
  call void @_ZN5Maths8TVector3IfEmLEf(ptr noundef nonnull align 4 dereferenceable(12) %165, float noundef %164)
  %166 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.0115) #8
  %167 = call noundef float @_ZN5Maths8TVector3IfE9NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %166)
  %168 = add nuw i64 %.0115, 1
  %169 = call noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %170 = icmp ult i64 %168, %169
  br i1 %170, label %.lr.ph116, label %._crit_edge117, !llvm.loop !34

171:                                              ; preds = %4, %._crit_edge117
  ret void

172:                                              ; preds = %160, %114, %112
  %.pn90.pn = phi { ptr, i32 } [ %.pn90, %160 ], [ %115, %114 ], [ %113, %112 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  resume { ptr, i32 } %.pn90.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Maths8TVector3IfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 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 #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN5Maths8TVector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) 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 #5 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 #3 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 4}
!6 = !{!"_ZTSN7Riemann12HeightField3E", !7, i64 0, !7, i64 4, !10, i64 8, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !13, i64 56, !17, i64 80}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN5Maths6TAABB3IfEE", !11, i64 0, !11, i64 12}
!11 = !{!"_ZTSN5Maths8TVector3IfEE", !12, i64 0, !12, i64 4, !12, i64 8}
!12 = !{!"float", !8, i64 0}
!13 = !{!"_ZTSSt6vectorIN7Riemann12HeightField38CellInfoESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN7Riemann12HeightField38CellInfoESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN7Riemann12HeightField38CellInfoESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN7Riemann12HeightField38CellInfoESaIS2_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!6, !7, i64 0}
!19 = distinct !{!19, !20, !21}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = !{!6, !12, i64 8}
!23 = !{!6, !12, i64 32}
!24 = !{!6, !12, i64 16}
!25 = !{!6, !12, i64 36}
!26 = distinct !{!26, !20}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !20}
!29 = distinct !{!29, !20}
!30 = !{!31, !31, i64 0}
!31 = !{!"short", !8, i64 0}
!32 = distinct !{!32, !20}
!33 = distinct !{!33, !20}
!34 = distinct !{!34, !20}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass