; LLVM IR from atlantis13579/Riemann :: Src/Geometry (Polygon3)

; 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 }

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann29ClipPolygonByProjectPolygon3DEPKN5Maths8TVector3IfEEiS4_iRS3_PS2_Pi(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann29ClipPolygonByProjectSegment3DEPKN5Maths8TVector3IfEEiRS3_S5_S5_PS2_Pi(ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann25ClipPolygonAgainPolygon3DEPKN5Maths8TVector3IfEEiS4_iRS3_fPS2_PiS6_S7_(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) #3 {
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca float, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca [64 x %"class.Maths::TVector3"], align 16
  %23 = alloca i32, 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::TVector3", align 4
  %29 = alloca %"class.Maths::TVector3", align 4
  %30 = alloca %"class.Maths::TVector3", align 4
  %31 = alloca i8, align 1
  %32 = alloca float, align 4
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca float, align 4
  %36 = alloca %"class.Maths::TVector3", align 4
  %37 = alloca %"class.Maths::TVector3", align 4
  %38 = alloca %"class.Maths::TVector3", align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store i32 %1, ptr %13, align 4, !tbaa !9
  store ptr %2, ptr %14, align 8, !tbaa !5
  store i32 %3, ptr %15, align 4, !tbaa !9
  store ptr %4, ptr %16, align 8, !tbaa !5
  store float %5, ptr %17, align 4, !tbaa !11
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  %39 = load ptr, ptr %19, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %10
  %42 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 0, ptr %42, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %41, %10
  %44 = load ptr, ptr %21, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %48

46:                                               ; preds = %43
  %47 = load ptr, ptr %21, align 8, !tbaa !5
  store i32 0, ptr %47, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %46, %43
  %49 = load i32, ptr %13, align 4, !tbaa !9
  %50 = icmp slt i32 %49, 2
  br i1 %50, label %54, label %51

51:                                               ; preds = %48
  %52 = load i32, ptr %15, align 4, !tbaa !9
  %53 = icmp slt i32 %52, 3
  br i1 %53, label %54, label %55

54:                                               ; preds = %51, %48
  store i1 false, ptr %11, align 1
  br label %167

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 768, ptr %22) #4
  %56 = getelementptr inbounds [64 x %"class.Maths::TVector3"], ptr %22, i32 0, i32 0
  %57 = getelementptr inbounds %"class.Maths::TVector3", ptr %56, i64 64
  br label %58

58:                                               ; preds = %58, %55
  %59 = phi ptr [ %56, %55 ], [ %60, %58 ]
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %59)
  %60 = getelementptr inbounds %"class.Maths::TVector3", ptr %59, i64 1
  %61 = icmp eq ptr %60, %57
  br i1 %61, label %62, label %58

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 0, ptr %23, align 4, !tbaa !9
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = icmp sge i32 %63, 3
  br i1 %64, label %65, label %72

65:                                               ; preds = %62
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = load i32, ptr %15, align 4, !tbaa !9
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  %71 = getelementptr inbounds [64 x %"class.Maths::TVector3"], ptr %22, i64 0, i64 0
  call void @_ZN7Riemann29ClipPolygonByProjectPolygon3DEPKN5Maths8TVector3IfEEiS4_iRS3_PS2_Pi(ptr noundef %66, i32 noundef %67, ptr noundef %68, i32 noundef %69, ptr noundef nonnull align 4 dereferenceable(12) %70, ptr noundef %71, ptr noundef %23)
  br label %85

72:                                               ; preds = %62
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = icmp eq i32 %73, 2
  br i1 %74, label %75, label %84

75:                                               ; preds = %72
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = load i32, ptr %15, align 4, !tbaa !9
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.Maths::TVector3", ptr %78, i64 0
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.Maths::TVector3", ptr %80, i64 1
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = getelementptr inbounds [64 x %"class.Maths::TVector3"], ptr %22, i64 0, i64 0
  call void @_ZN7Riemann29ClipPolygonByProjectSegment3DEPKN5Maths8TVector3IfEEiRS3_S5_S5_PS2_Pi(ptr noundef %76, i32 noundef %77, ptr noundef nonnull align 4 dereferenceable(12) %79, ptr noundef nonnull align 4 dereferenceable(12) %81, ptr noundef nonnull align 4 dereferenceable(12) %82, ptr noundef %83, ptr noundef %23)
  br label %84

84:                                               ; preds = %75, %72
  br label %85

85:                                               ; preds = %84, %65
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #4
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.Maths::TVector3", ptr %86, i64 0
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %87)
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #4
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #4
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.Maths::TVector3", ptr %88, i64 1
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %89, ptr noundef nonnull align 4 dereferenceable(12) %24)
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = icmp sge i32 %90, 3
  br i1 %91, label %92, label %96

92:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #4
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.Maths::TVector3", ptr %93, i64 2
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %28, ptr noundef nonnull align 4 dereferenceable(12) %94, ptr noundef nonnull align 4 dereferenceable(12) %24)
  call void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %27, ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %28)
  %95 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #4
  br label %99

96:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #4
  %97 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %97)
  call void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %98 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %29)
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #4
  br label %99

99:                                               ; preds = %96, %92
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #4
  store i8 0, ptr %31, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  %100 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %25)
  store float %100, ptr %32, align 4, !tbaa !11
  %101 = load float, ptr %32, align 4, !tbaa !11
  %102 = fcmp ogt float %101, 0.000000e+00
  br i1 %102, label %103, label %164

103:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %160, %103
  %105 = load i32, ptr %33, align 4, !tbaa !9
  %106 = load i32, ptr %23, align 4, !tbaa !9
  %107 = icmp slt i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  br label %163

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  %110 = load i32, ptr %33, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [64 x %"class.Maths::TVector3"], ptr %22, i64 0, i64 %111
  store ptr %112, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #4
  %113 = load ptr, ptr %34, align 8, !tbaa !5
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %36, ptr noundef nonnull align 4 dereferenceable(12) %113, ptr noundef nonnull align 4 dereferenceable(12) %24)
  %114 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #4
  store float %114, ptr %35, align 4, !tbaa !11
  %115 = load float, ptr %35, align 4, !tbaa !11
  %116 = fcmp ole float %115, 0.000000e+00
  br i1 %116, label %125, label %117

117:                                              ; preds = %109
  %118 = load float, ptr %35, align 4, !tbaa !11
  %119 = load float, ptr %35, align 4, !tbaa !11
  %120 = fmul float %118, %119
  %121 = load float, ptr %17, align 4, !tbaa !11
  %122 = load float, ptr %32, align 4, !tbaa !11
  %123 = fmul float %121, %122
  %124 = fcmp olt float %120, %123
  br i1 %124, label %125, label %159

125:                                              ; preds = %117, %109
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #4
  %126 = load ptr, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %38) #4
  %127 = load float, ptr %35, align 4, !tbaa !11
  %128 = load float, ptr %32, align 4, !tbaa !11
  %129 = fdiv float %127, %128
  call void @_ZN5MathsmlIfEENS_8TVector3IT_EES2_RKS3_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %38, float noundef %129, ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %37, ptr noundef nonnull align 4 dereferenceable(12) %126, ptr noundef nonnull align 4 dereferenceable(12) %38)
  call void @llvm.lifetime.end.p0(i64 12, ptr %38) #4
  %130 = load ptr, ptr %18, align 8, !tbaa !5
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %143

132:                                              ; preds = %125
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = icmp ne ptr %133, null
  br i1 %134, label %135, label %143

135:                                              ; preds = %132
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  %137 = load ptr, ptr %19, align 8, !tbaa !5
  %138 = load i32, ptr %137, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %137, align 4, !tbaa !9
  %140 = sext i32 %138 to i64
  %141 = getelementptr inbounds %"class.Maths::TVector3", ptr %136, i64 %140
  %142 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %141, ptr noundef nonnull align 4 dereferenceable(12) %37)
  br label %143

143:                                              ; preds = %135, %132, %125
  %144 = load ptr, ptr %20, align 8, !tbaa !5
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %158

146:                                              ; preds = %143
  %147 = load ptr, ptr %21, align 8, !tbaa !5
  %148 = icmp ne ptr %147, null
  br i1 %148, label %149, label %158

149:                                              ; preds = %146
  %150 = load ptr, ptr %34, align 8, !tbaa !5
  %151 = load ptr, ptr %20, align 8, !tbaa !5
  %152 = load ptr, ptr %21, align 8, !tbaa !5
  %153 = load i32, ptr %152, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %152, align 4, !tbaa !9
  %155 = sext i32 %153 to i64
  %156 = getelementptr inbounds %"class.Maths::TVector3", ptr %151, i64 %155
  %157 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %156, ptr noundef nonnull align 4 dereferenceable(12) %150)
  br label %158

158:                                              ; preds = %149, %146, %143
  store i8 1, ptr %31, align 1, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #4
  br label %159

159:                                              ; preds = %158, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %33, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %33, align 4, !tbaa !9
  br label %104, !llvm.loop !15

163:                                              ; preds = %108
  br label %164

164:                                              ; preds = %163, %99
  %165 = load i8, ptr %31, align 1, !tbaa !13, !range !17, !noundef !18
  %166 = trunc i8 %165 to i1
  store i1 %166, ptr %11, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 768, ptr %22) #4
  br label %167

167:                                              ; preds = %164, %54
  %168 = load i1, ptr %11, align 1
  ret i1 %168
}

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


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

%"class.Maths::TVector3" = type { float, float, float }

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann29ClipPolygonByProjectPolygon3DEPKN5Maths8TVector3IfEEiS4_iRS3_PS2_Pi(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann29ClipPolygonByProjectSegment3DEPKN5Maths8TVector3IfEEiRS3_S5_S5_PS2_Pi(ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann25ClipPolygonAgainPolygon3DEPKN5Maths8TVector3IfEEiS4_iRS3_fPS2_PiS6_S7_(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #3 {
  %11 = alloca [64 x %"class.Maths::TVector3"], align 16
  %12 = alloca i32, align 4
  %13 = alloca %"class.Maths::TVector3", align 4
  %14 = alloca %"class.Maths::TVector3", align 4
  %15 = alloca %"class.Maths::TVector3", align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = alloca %"class.Maths::TVector3", align 4
  %18 = alloca %"class.Maths::TVector3", align 4
  %19 = alloca %"class.Maths::TVector3", align 4
  %20 = alloca %"class.Maths::TVector3", align 4
  %21 = alloca %"class.Maths::TVector3", align 4
  %22 = alloca %"class.Maths::TVector3", align 4
  %23 = icmp ne ptr %7, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %10
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %24, %10
  %26 = icmp ne ptr %9, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %25
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %27, %25
  %29 = icmp slt i32 %1, 2
  %30 = icmp slt i32 %3, 3
  %or.cond = or i1 %29, %30
  br i1 %or.cond, label %101, label %31

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 768, ptr nonnull %11) #4
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
  %.ptr.1 = getelementptr inbounds i8, ptr %11, i64 12
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %11, i64 24
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %11, i64 36
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %11, i64 48
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %11, i64 60
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.5)
  %.ptr.6 = getelementptr inbounds i8, ptr %11, i64 72
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.6)
  %.ptr.7 = getelementptr inbounds i8, ptr %11, i64 84
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.7)
  %.ptr.8 = getelementptr inbounds i8, ptr %11, i64 96
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.8)
  %.ptr.9 = getelementptr inbounds i8, ptr %11, i64 108
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.9)
  %.ptr.10 = getelementptr inbounds i8, ptr %11, i64 120
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.10)
  %.ptr.11 = getelementptr inbounds i8, ptr %11, i64 132
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.11)
  %.ptr.12 = getelementptr inbounds i8, ptr %11, i64 144
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.12)
  %.ptr.13 = getelementptr inbounds i8, ptr %11, i64 156
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.13)
  %.ptr.14 = getelementptr inbounds i8, ptr %11, i64 168
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.14)
  %.ptr.15 = getelementptr inbounds i8, ptr %11, i64 180
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.15)
  %.ptr.16 = getelementptr inbounds i8, ptr %11, i64 192
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.16)
  %.ptr.17 = getelementptr inbounds i8, ptr %11, i64 204
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.17)
  %.ptr.18 = getelementptr inbounds i8, ptr %11, i64 216
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.18)
  %.ptr.19 = getelementptr inbounds i8, ptr %11, i64 228
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.19)
  %.ptr.20 = getelementptr inbounds i8, ptr %11, i64 240
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.20)
  %.ptr.21 = getelementptr inbounds i8, ptr %11, i64 252
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.21)
  %.ptr.22 = getelementptr inbounds i8, ptr %11, i64 264
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.22)
  %.ptr.23 = getelementptr inbounds i8, ptr %11, i64 276
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.23)
  %.ptr.24 = getelementptr inbounds i8, ptr %11, i64 288
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.24)
  %.ptr.25 = getelementptr inbounds i8, ptr %11, i64 300
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.25)
  %.ptr.26 = getelementptr inbounds i8, ptr %11, i64 312
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.26)
  %.ptr.27 = getelementptr inbounds i8, ptr %11, i64 324
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.27)
  %.ptr.28 = getelementptr inbounds i8, ptr %11, i64 336
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.28)
  %.ptr.29 = getelementptr inbounds i8, ptr %11, i64 348
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.29)
  %.ptr.30 = getelementptr inbounds i8, ptr %11, i64 360
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.30)
  %.ptr.31 = getelementptr inbounds i8, ptr %11, i64 372
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.31)
  %.ptr.32 = getelementptr inbounds i8, ptr %11, i64 384
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.32)
  %.ptr.33 = getelementptr inbounds i8, ptr %11, i64 396
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.33)
  %.ptr.34 = getelementptr inbounds i8, ptr %11, i64 408
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.34)
  %.ptr.35 = getelementptr inbounds i8, ptr %11, i64 420
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.35)
  %.ptr.36 = getelementptr inbounds i8, ptr %11, i64 432
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.36)
  %.ptr.37 = getelementptr inbounds i8, ptr %11, i64 444
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.37)
  %.ptr.38 = getelementptr inbounds i8, ptr %11, i64 456
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.38)
  %.ptr.39 = getelementptr inbounds i8, ptr %11, i64 468
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.39)
  %.ptr.40 = getelementptr inbounds i8, ptr %11, i64 480
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.40)
  %.ptr.41 = getelementptr inbounds i8, ptr %11, i64 492
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.41)
  %.ptr.42 = getelementptr inbounds i8, ptr %11, i64 504
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.42)
  %.ptr.43 = getelementptr inbounds i8, ptr %11, i64 516
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.43)
  %.ptr.44 = getelementptr inbounds i8, ptr %11, i64 528
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.44)
  %.ptr.45 = getelementptr inbounds i8, ptr %11, i64 540
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.45)
  %.ptr.46 = getelementptr inbounds i8, ptr %11, i64 552
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.46)
  %.ptr.47 = getelementptr inbounds i8, ptr %11, i64 564
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.47)
  %.ptr.48 = getelementptr inbounds i8, ptr %11, i64 576
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.48)
  %.ptr.49 = getelementptr inbounds i8, ptr %11, i64 588
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.49)
  %.ptr.50 = getelementptr inbounds i8, ptr %11, i64 600
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.50)
  %.ptr.51 = getelementptr inbounds i8, ptr %11, i64 612
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.51)
  %.ptr.52 = getelementptr inbounds i8, ptr %11, i64 624
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.52)
  %.ptr.53 = getelementptr inbounds i8, ptr %11, i64 636
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.53)
  %.ptr.54 = getelementptr inbounds i8, ptr %11, i64 648
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.54)
  %.ptr.55 = getelementptr inbounds i8, ptr %11, i64 660
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.55)
  %.ptr.56 = getelementptr inbounds i8, ptr %11, i64 672
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.56)
  %.ptr.57 = getelementptr inbounds i8, ptr %11, i64 684
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.57)
  %.ptr.58 = getelementptr inbounds i8, ptr %11, i64 696
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.58)
  %.ptr.59 = getelementptr inbounds i8, ptr %11, i64 708
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.59)
  %.ptr.60 = getelementptr inbounds i8, ptr %11, i64 720
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.60)
  %.ptr.61 = getelementptr inbounds i8, ptr %11, i64 732
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.61)
  %.ptr.62 = getelementptr inbounds i8, ptr %11, i64 744
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.62)
  %.ptr.63 = getelementptr inbounds i8, ptr %11, i64 756
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.63)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  %32 = icmp ugt i32 %1, 2
  br i1 %32, label %33, label %34

33:                                               ; preds = %31
  call void @_ZN7Riemann29ClipPolygonByProjectPolygon3DEPKN5Maths8TVector3IfEEiS4_iRS3_PS2_Pi(ptr noundef %2, i32 noundef %3, ptr noundef %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull %11, ptr noundef nonnull %12)
  br label %36

34:                                               ; preds = %31
  %35 = getelementptr inbounds i8, ptr %0, i64 12
  call void @_ZN7Riemann29ClipPolygonByProjectSegment3DEPKN5Maths8TVector3IfEEiRS3_S5_S5_PS2_Pi(ptr noundef %2, i32 noundef %3, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull %11, ptr noundef nonnull %12)
  br label %36

36:                                               ; preds = %34, %33
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #4
  call void @_ZN5Maths8TVector3IfEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #4
  call void @_ZN5Maths8TVector3IfEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #4
  %37 = getelementptr inbounds i8, ptr %0, i64 12
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %13)
  br i1 %32, label %38, label %41

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #4
  %39 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %40 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #4
  br label %43

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #4
  call void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %19, ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %18, ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %15)
  %42 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %18)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #4
  br label %43

43:                                               ; preds = %41, %38
  %44 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %14)
  %45 = fcmp ogt float %44, 0.000000e+00
  %46 = load i32, ptr %12, align 4
  %47 = icmp sgt i32 %46, 0
  %or.cond78 = select i1 %45, i1 %47, i1 false
  br i1 %or.cond78, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %43
  %48 = fmul float %44, %5
  %49 = icmp ne ptr %6, null
  %or.cond3 = and i1 %49, %23
  %50 = icmp ne ptr %8, null
  %or.cond5 = and i1 %50, %26
  br i1 %or.cond3, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %70
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %70 ], [ 0, %.lr.ph ]
  %.05165.us = phi i1 [ %.1.us, %70 ], [ false, %.lr.ph ]
  %51 = getelementptr inbounds [64 x %"class.Maths::TVector3"], ptr %11, i64 0, i64 %indvars.iv83
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #4
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %52 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #4
  %53 = fcmp ole float %52, 0.000000e+00
  %54 = fmul float %52, %52
  %55 = fcmp olt float %54, %48
  %or.cond72 = or i1 %53, %55
  br i1 %or.cond72, label %56, label %70

56:                                               ; preds = %.lr.ph.split.us
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #4
  %57 = fdiv float %52, %44
  call void @_ZN5MathsmlIfEENS_8TVector3IT_EES2_RKS3_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %22, float noundef %57, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #4
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %7, align 4, !tbaa !5
  %60 = sext i32 %58 to i64
  %61 = getelementptr inbounds %"class.Maths::TVector3", ptr %6, i64 %60
  %62 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %61, ptr noundef nonnull align 4 dereferenceable(12) %21)
  br i1 %or.cond5, label %63, label %69

63:                                               ; preds = %56
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %9, align 4, !tbaa !5
  %66 = sext i32 %64 to i64
  %67 = getelementptr inbounds %"class.Maths::TVector3", ptr %8, i64 %66
  %68 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %67, ptr noundef nonnull align 4 dereferenceable(12) %51)
  br label %69

69:                                               ; preds = %63, %56
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #4
  br label %70

70:                                               ; preds = %.lr.ph.split.us, %69
  %.1.us = phi i1 [ true, %69 ], [ %.05165.us, %.lr.ph.split.us ]
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next84, %72
  br i1 %73, label %.lr.ph.split.us, label %.loopexit, !llvm.loop !9

.lr.ph.split:                                     ; preds = %.lr.ph
  br i1 %or.cond5, label %.lr.ph.split.split.us, label %.lr.ph.split.split

.lr.ph.split.split.us:                            ; preds = %.lr.ph.split, %86
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %86 ], [ 0, %.lr.ph.split ]
  %.05165.us66 = phi i1 [ %.1.us68, %86 ], [ false, %.lr.ph.split ]
  %74 = getelementptr inbounds [64 x %"class.Maths::TVector3"], ptr %11, i64 0, i64 %indvars.iv81
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #4
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %74, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %75 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #4
  %76 = fcmp ole float %75, 0.000000e+00
  %77 = fmul float %75, %75
  %78 = fcmp olt float %77, %48
  %or.cond74 = or i1 %76, %78
  br i1 %or.cond74, label %79, label %86

79:                                               ; preds = %.lr.ph.split.split.us
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #4
  %80 = fdiv float %75, %44
  call void @_ZN5MathsmlIfEENS_8TVector3IT_EES2_RKS3_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %22, float noundef %80, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %74, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #4
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %9, align 4, !tbaa !5
  %83 = sext i32 %81 to i64
  %84 = getelementptr inbounds %"class.Maths::TVector3", ptr %8, i64 %83
  %85 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN5Maths8TVector3IfEaSERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %84, ptr noundef nonnull align 4 dereferenceable(12) %74)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #4
  br label %86

86:                                               ; preds = %.lr.ph.split.split.us, %79
  %.1.us68 = phi i1 [ true, %79 ], [ %.05165.us66, %.lr.ph.split.split.us ]
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %87 = load i32, ptr %12, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next82, %88
  br i1 %89, label %.lr.ph.split.split.us, label %.loopexit, !llvm.loop !9

.lr.ph.split.split:                               ; preds = %.lr.ph.split, %97
  %indvars.iv = phi i64 [ %indvars.iv.next, %97 ], [ 0, %.lr.ph.split ]
  %.05165 = phi i1 [ %.1, %97 ], [ false, %.lr.ph.split ]
  %90 = getelementptr inbounds [64 x %"class.Maths::TVector3"], ptr %11, i64 0, i64 %indvars.iv
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #4
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %90, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %91 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #4
  %92 = fcmp ole float %91, 0.000000e+00
  %93 = fmul float %91, %91
  %94 = fcmp olt float %93, %48
  %or.cond76 = or i1 %92, %94
  br i1 %or.cond76, label %95, label %97

95:                                               ; preds = %.lr.ph.split.split
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #4
  %96 = fdiv float %91, %44
  call void @_ZN5MathsmlIfEENS_8TVector3IT_EES2_RKS3_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %22, float noundef %96, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %90, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #4
  br label %97

97:                                               ; preds = %.lr.ph.split.split, %95
  %.1 = phi i1 [ true, %95 ], [ %.05165, %.lr.ph.split.split ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %98 = load i32, ptr %12, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = icmp slt i64 %indvars.iv.next, %99
  br i1 %100, label %.lr.ph.split.split, label %.loopexit, !llvm.loop !9

.loopexit:                                        ; preds = %97, %86, %70, %43
  %.2 = phi i1 [ false, %43 ], [ %.1.us, %70 ], [ %.1.us68, %86 ], [ %.1, %97 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 768, ptr nonnull %11) #4
  br label %101

101:                                              ; preds = %28, %.loopexit
  %.0 = phi i1 [ %.2, %.loopexit ], [ false, %28 ]
  ret i1 %.0
}

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


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