; LLVM IR from atlantis13579/Riemann :: Src/RigidBodyDynamics/CollidingContact.ll (ZN7Riemann15ContactManifold13MergeManifoldEv)

; 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.Riemann::StaticArray" = type { i32, [5 x %"class.Maths::TVector3"] }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::StaticArray.0" = type { i32, [5 x float] }
%"class.Riemann::ContactManifold" = type { i32, i32, [5 x %"struct.Riemann::Contact"], i32, ptr }
%"struct.Riemann::Contact" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", float, float, float, float }

@.str = external hidden unnamed_addr constant [47 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [98 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv = external hidden unnamed_addr constant [47 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann15ContactManifold13MergeManifoldEv(ptr noundef nonnull align 8 dereferenceable(520) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca float, align 4
  %4 = alloca %"class.Riemann::StaticArray", align 4
  %5 = alloca %"class.Riemann::StaticArray.0", align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.Maths::TVector3", align 4
  %12 = alloca %"class.Maths::TVector3", align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca float, align 4
  %16 = alloca %"class.Maths::TVector3", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca float, align 4
  %29 = alloca %"class.Maths::TVector3", align 4
  %30 = alloca float, align 4
  %31 = alloca %"class.Maths::TVector3", align 4
  %32 = alloca %"class.Maths::TVector3", align 4
  %33 = alloca i32, align 4
  %34 = alloca float, align 4
  %35 = alloca %"class.Maths::TVector3", align 4
  %36 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %37 = load ptr, ptr %2, align 8
  %38 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 3
  %39 = load i32, ptr %38, align 4, !tbaa !9
  %40 = icmp eq i32 %39, 5
  br i1 %40, label %41, label %42

41:                                               ; preds = %1
  br label %44

42:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 30, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv) #7
  unreachable

43:                                               ; No predecessors!
  br label %44

44:                                               ; preds = %43, %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store float 0x3EB0C6F7A0000000, ptr %3, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 64, ptr %4) #8
  call void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #8
  invoke void @_ZN7Riemann11StaticArrayIfLi5EEC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %5)
          to label %45 unwind label %52

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !14
  br label %46

46:                                               ; preds = %88, %45
  %47 = load i32, ptr %8, align 4, !tbaa !14
  %48 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 3
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = icmp slt i32 %47, %49
  br i1 %50, label %56, label %51

51:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %100

52:                                               ; preds = %44
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  br label %333

56:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %57 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 2
  %58 = load i32, ptr %8, align 4, !tbaa !14
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %57, i64 0, i64 %59
  store ptr %60, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.Riemann::Contact", ptr %61, i32 0, i32 2
  store ptr %62, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #8
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #8
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.Riemann::Contact", ptr %65, i32 0, i32 4
  %67 = invoke noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %64, ptr noundef nonnull align 4 dereferenceable(12) %66)
          to label %68 unwind label %91

68:                                               ; preds = %56
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.Riemann::Contact", ptr %69, i32 0, i32 4
  invoke void @_ZN5MathsmlIfEENS_8TVector3IT_EES2_RKS3_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %12, float noundef %67, ptr noundef nonnull align 4 dereferenceable(12) %70)
          to label %71 unwind label %91

71:                                               ; preds = %68
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %63, ptr noundef nonnull align 4 dereferenceable(12) %12)
          to label %72 unwind label %91

72:                                               ; preds = %71
  %73 = invoke noundef zeroext i1 @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE3addERKS3_(ptr noundef nonnull align 4 dereferenceable(64) %4, ptr noundef nonnull align 4 dereferenceable(12) %11)
          to label %74 unwind label %91

74:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.Riemann::Contact", ptr %75, i32 0, i32 0
  store ptr %76, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.Riemann::Contact", ptr %77, i32 0, i32 1
  store ptr %78, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #8
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %79, ptr noundef nonnull align 4 dereferenceable(12) %80)
          to label %81 unwind label %95

81:                                               ; preds = %74
  %82 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %83 unwind label %95

83:                                               ; preds = %81
  store float %82, ptr %15, align 4, !tbaa !12
  %84 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %85 unwind label %95

85:                                               ; preds = %83
  %86 = invoke noundef zeroext i1 @_ZN7Riemann11StaticArrayIfLi5EE3addERKf(ptr noundef nonnull align 4 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %84)
          to label %87 unwind label %95

87:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %8, align 4, !tbaa !14
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %8, align 4, !tbaa !14
  br label %46, !llvm.loop !15

91:                                               ; preds = %72, %71, %68, %56
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %6, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #8
  br label %99

95:                                               ; preds = %85, %83, %81, %74
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %6, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %99

99:                                               ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %332

100:                                              ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 -1, ptr %17, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 -1, ptr %18, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 -1, ptr %19, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 -1, ptr %20, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store float 0xC7EFFFFFE0000000, ptr %21, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !14
  br label %101

101:                                              ; preds = %132, %100
  %102 = load i32, ptr %22, align 4, !tbaa !14
  %103 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 3
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = icmp slt i32 %102, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %135

107:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %108 = load i32, ptr %22, align 4, !tbaa !14
  %109 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef %108)
          to label %110 unwind label %127

110:                                              ; preds = %107
  %111 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %109)
          to label %112 unwind label %127

112:                                              ; preds = %110
  store float %111, ptr %24, align 4, !tbaa !12
  %113 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %114 unwind label %127

114:                                              ; preds = %112
  %115 = load float, ptr %113, align 4, !tbaa !12
  %116 = load i32, ptr %22, align 4, !tbaa !14
  %117 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Riemann11StaticArrayIfLi5EEixEi(ptr noundef nonnull align 4 dereferenceable(24) %5, i32 noundef %116)
          to label %118 unwind label %127

118:                                              ; preds = %114
  %119 = load float, ptr %117, align 4, !tbaa !12
  %120 = fmul float %115, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  store float %120, ptr %23, align 4, !tbaa !12
  %121 = load float, ptr %21, align 4, !tbaa !12
  %122 = load float, ptr %23, align 4, !tbaa !12
  %123 = fcmp olt float %121, %122
  br i1 %123, label %124, label %131

124:                                              ; preds = %118
  %125 = load float, ptr %23, align 4, !tbaa !12
  store float %125, ptr %21, align 4, !tbaa !12
  %126 = load i32, ptr %22, align 4, !tbaa !14
  store i32 %126, ptr %17, align 4, !tbaa !14
  br label %131

127:                                              ; preds = %114, %112, %110, %107
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %6, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %331

131:                                              ; preds = %124, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %22, align 4, !tbaa !14
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %22, align 4, !tbaa !14
  br label %101, !llvm.loop !17

135:                                              ; preds = %106
  store float 0xC7EFFFFFE0000000, ptr %21, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !14
  br label %136

136:                                              ; preds = %179, %135
  %137 = load i32, ptr %25, align 4, !tbaa !14
  %138 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 3
  %139 = load i32, ptr %138, align 4, !tbaa !9
  %140 = icmp slt i32 %137, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %136
  store i32 8, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %182

142:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %143 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 2
  %144 = load i32, ptr %25, align 4, !tbaa !14
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %143, i64 0, i64 %145
  store ptr %146, ptr %27, align 8, !tbaa !5
  %147 = load i32, ptr %17, align 4, !tbaa !14
  %148 = load i32, ptr %25, align 4, !tbaa !14
  %149 = icmp eq i32 %147, %148
  br i1 %149, label %150, label %151

150:                                              ; preds = %142
  store i32 10, ptr %26, align 4
  br label %176

151:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #8
  %152 = load ptr, ptr %27, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.Riemann::Contact", ptr %152, i32 0, i32 0
  %154 = load i32, ptr %17, align 4, !tbaa !14
  %155 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef %154)
          to label %156 unwind label %171

156:                                              ; preds = %151
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %153, ptr noundef nonnull align 4 dereferenceable(12) %155)
          to label %157 unwind label %171

157:                                              ; preds = %156
  %158 = invoke noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %29)
          to label %159 unwind label %171

159:                                              ; preds = %157
  %160 = load i32, ptr %25, align 4, !tbaa !14
  %161 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Riemann11StaticArrayIfLi5EEixEi(ptr noundef nonnull align 4 dereferenceable(24) %5, i32 noundef %160)
          to label %162 unwind label %171

162:                                              ; preds = %159
  %163 = load float, ptr %161, align 4, !tbaa !12
  %164 = fmul float %158, %163
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #8
  store float %164, ptr %28, align 4, !tbaa !12
  %165 = load float, ptr %21, align 4, !tbaa !12
  %166 = load float, ptr %28, align 4, !tbaa !12
  %167 = fcmp olt float %165, %166
  br i1 %167, label %168, label %175

168:                                              ; preds = %162
  %169 = load float, ptr %28, align 4, !tbaa !12
  store float %169, ptr %21, align 4, !tbaa !12
  %170 = load i32, ptr %25, align 4, !tbaa !14
  store i32 %170, ptr %18, align 4, !tbaa !14
  br label %175

171:                                              ; preds = %159, %157, %156, %151
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %6, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %331

175:                                              ; preds = %168, %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  store i32 0, ptr %26, align 4
  br label %176

176:                                              ; preds = %175, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  %177 = load i32, ptr %26, align 4
  switch i32 %177, label %339 [
    i32 0, label %178
    i32 10, label %179
  ]

178:                                              ; preds = %176
  br label %179

179:                                              ; preds = %178, %176
  %180 = load i32, ptr %25, align 4, !tbaa !14
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %25, align 4, !tbaa !14
  br label %136, !llvm.loop !18

182:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store float 0.000000e+00, ptr %30, align 4, !tbaa !12
  store float 0.000000e+00, ptr %21, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #8
  %183 = load i32, ptr %18, align 4, !tbaa !14
  %184 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef %183)
          to label %185 unwind label %200

185:                                              ; preds = %182
  %186 = load i32, ptr %17, align 4, !tbaa !14
  %187 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef %186)
          to label %188 unwind label %200

188:                                              ; preds = %185
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %32, ptr noundef nonnull align 4 dereferenceable(12) %184, ptr noundef nonnull align 4 dereferenceable(12) %187)
          to label %189 unwind label %200

189:                                              ; preds = %188
  %190 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 2
  %191 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %190, i64 0, i64 0
  %192 = getelementptr inbounds %"struct.Riemann::Contact", ptr %191, i32 0, i32 4
  invoke void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %32, ptr noundef nonnull align 4 dereferenceable(12) %192)
          to label %193 unwind label %200

193:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  store i32 0, ptr %33, align 4, !tbaa !14
  br label %194

194:                                              ; preds = %246, %193
  %195 = load i32, ptr %33, align 4, !tbaa !14
  %196 = invoke noundef i32 @_ZNK7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(64) %4)
          to label %197 unwind label %204

197:                                              ; preds = %194
  %198 = icmp slt i32 %195, %196
  br i1 %198, label %208, label %199

199:                                              ; preds = %197
  store i32 11, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %250

200:                                              ; preds = %189, %188, %185, %182
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %6, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #8
  br label %330

204:                                              ; preds = %194
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %6, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %7, align 4
  br label %249

208:                                              ; preds = %197
  %209 = load i32, ptr %17, align 4, !tbaa !14
  %210 = load i32, ptr %33, align 4, !tbaa !14
  %211 = icmp eq i32 %209, %210
  br i1 %211, label %216, label %212

212:                                              ; preds = %208
  %213 = load i32, ptr %18, align 4, !tbaa !14
  %214 = load i32, ptr %33, align 4, !tbaa !14
  %215 = icmp eq i32 %213, %214
  br i1 %215, label %216, label %217

216:                                              ; preds = %212, %208
  br label %246

217:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #8
  %218 = load i32, ptr %33, align 4, !tbaa !14
  %219 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef %218)
          to label %220 unwind label %233

220:                                              ; preds = %217
  %221 = load i32, ptr %17, align 4, !tbaa !14
  %222 = invoke noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef %221)
          to label %223 unwind label %233

223:                                              ; preds = %220
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %35, ptr noundef nonnull align 4 dereferenceable(12) %219, ptr noundef nonnull align 4 dereferenceable(12) %222)
          to label %224 unwind label %233

224:                                              ; preds = %223
  %225 = invoke noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %35)
          to label %226 unwind label %233

226:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #8
  store float %225, ptr %34, align 4, !tbaa !12
  %227 = load float, ptr %34, align 4, !tbaa !12
  %228 = load float, ptr %30, align 4, !tbaa !12
  %229 = fcmp olt float %227, %228
  br i1 %229, label %230, label %237

230:                                              ; preds = %226
  %231 = load float, ptr %34, align 4, !tbaa !12
  store float %231, ptr %30, align 4, !tbaa !12
  %232 = load i32, ptr %33, align 4, !tbaa !14
  store i32 %232, ptr %19, align 4, !tbaa !14
  br label %245

233:                                              ; preds = %224, %223, %220, %217
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %6, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %249

237:                                              ; preds = %226
  %238 = load float, ptr %34, align 4, !tbaa !12
  %239 = load float, ptr %21, align 4, !tbaa !12
  %240 = fcmp ogt float %238, %239
  br i1 %240, label %241, label %244

241:                                              ; preds = %237
  %242 = load float, ptr %34, align 4, !tbaa !12
  store float %242, ptr %21, align 4, !tbaa !12
  %243 = load i32, ptr %33, align 4, !tbaa !14
  store i32 %243, ptr %20, align 4, !tbaa !14
  br label %244

244:                                              ; preds = %241, %237
  br label %245

245:                                              ; preds = %244, %230
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %246

246:                                              ; preds = %245, %216
  %247 = load i32, ptr %33, align 4, !tbaa !14
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %33, align 4, !tbaa !14
  br label %194, !llvm.loop !19

249:                                              ; preds = %233, %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %330

250:                                              ; preds = %199
  %251 = load i32, ptr %17, align 4, !tbaa !14
  %252 = load i32, ptr %18, align 4, !tbaa !14
  %253 = icmp ne i32 %251, %252
  br i1 %253, label %254, label %262

254:                                              ; preds = %250
  %255 = load i32, ptr %17, align 4, !tbaa !14
  %256 = load i32, ptr %19, align 4, !tbaa !14
  %257 = icmp ne i32 %255, %256
  br i1 %257, label %258, label %262

258:                                              ; preds = %254
  %259 = load i32, ptr %17, align 4, !tbaa !14
  %260 = load i32, ptr %20, align 4, !tbaa !14
  %261 = icmp ne i32 %259, %260
  br label %262

262:                                              ; preds = %258, %254, %250
  %263 = phi i1 [ false, %254 ], [ false, %250 ], [ %261, %258 ]
  br i1 %263, label %264, label %265

264:                                              ; preds = %262
  br label %267

265:                                              ; preds = %262
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 99, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv) #7
  unreachable

266:                                              ; No predecessors!
  br label %267

267:                                              ; preds = %266, %264
  %268 = load i32, ptr %18, align 4, !tbaa !14
  %269 = load i32, ptr %19, align 4, !tbaa !14
  %270 = icmp ne i32 %268, %269
  br i1 %270, label %271, label %275

271:                                              ; preds = %267
  %272 = load i32, ptr %18, align 4, !tbaa !14
  %273 = load i32, ptr %20, align 4, !tbaa !14
  %274 = icmp ne i32 %272, %273
  br label %275

275:                                              ; preds = %271, %267
  %276 = phi i1 [ false, %267 ], [ %274, %271 ]
  br i1 %276, label %277, label %278

277:                                              ; preds = %275
  br label %280

278:                                              ; preds = %275
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 100, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv) #7
  unreachable

279:                                              ; No predecessors!
  br label %280

280:                                              ; preds = %279, %277
  %281 = load i32, ptr %19, align 4, !tbaa !14
  %282 = load i32, ptr %20, align 4, !tbaa !14
  %283 = icmp ne i32 %281, %282
  br i1 %283, label %284, label %285

284:                                              ; preds = %280
  br label %287

285:                                              ; preds = %280
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 101, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv) #7
  unreachable

286:                                              ; No predecessors!
  br label %287

287:                                              ; preds = %286, %284
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  store i32 0, ptr %36, align 4, !tbaa !14
  br label %288

288:                                              ; preds = %325, %287
  %289 = load i32, ptr %36, align 4, !tbaa !14
  %290 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 3
  %291 = load i32, ptr %290, align 4, !tbaa !9
  %292 = icmp slt i32 %289, %291
  br i1 %292, label %294, label %293

293:                                              ; preds = %288
  store i32 14, ptr %26, align 4
  br label %328

294:                                              ; preds = %288
  %295 = load i32, ptr %36, align 4, !tbaa !14
  %296 = load i32, ptr %17, align 4, !tbaa !14
  %297 = icmp eq i32 %295, %296
  br i1 %297, label %310, label %298

298:                                              ; preds = %294
  %299 = load i32, ptr %36, align 4, !tbaa !14
  %300 = load i32, ptr %18, align 4, !tbaa !14
  %301 = icmp eq i32 %299, %300
  br i1 %301, label %310, label %302

302:                                              ; preds = %298
  %303 = load i32, ptr %36, align 4, !tbaa !14
  %304 = load i32, ptr %19, align 4, !tbaa !14
  %305 = icmp eq i32 %303, %304
  br i1 %305, label %310, label %306

306:                                              ; preds = %302
  %307 = load i32, ptr %36, align 4, !tbaa !14
  %308 = load i32, ptr %20, align 4, !tbaa !14
  %309 = icmp eq i32 %307, %308
  br i1 %309, label %310, label %311

310:                                              ; preds = %306, %302, %298, %294
  br label %325

311:                                              ; preds = %306
  %312 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 3
  %313 = load i32, ptr %312, align 4, !tbaa !9
  %314 = add nsw i32 %313, -1
  store i32 %314, ptr %312, align 4, !tbaa !9
  %315 = load i32, ptr %36, align 4, !tbaa !14
  %316 = icmp eq i32 %315, 4
  br i1 %316, label %317, label %318

317:                                              ; preds = %311
  store i32 14, ptr %26, align 4
  br label %328

318:                                              ; preds = %311
  %319 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 2
  %320 = load i32, ptr %36, align 4, !tbaa !14
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %319, i64 0, i64 %321
  %323 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %37, i32 0, i32 2
  %324 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %323, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %322, ptr align 8 %324, i64 100, i1 false)
  store i32 14, ptr %26, align 4
  br label %328

325:                                              ; preds = %310
  %326 = load i32, ptr %36, align 4, !tbaa !14
  %327 = add nsw i32 %326, 1
  store i32 %327, ptr %36, align 4, !tbaa !14
  br label %288, !llvm.loop !20

328:                                              ; preds = %318, %317, %293
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %329

329:                                              ; preds = %328
  store i32 1, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @_ZN7Riemann11StaticArrayIfLi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  call void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(64) %4) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret i1 true

330:                                              ; preds = %249, %200
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %331

331:                                              ; preds = %330, %171, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %332

332:                                              ; preds = %331, %99
  call void @_ZN7Riemann11StaticArrayIfLi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(24) %5) #8
  br label %333

333:                                              ; preds = %332, %52
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  call void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(64) %4) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %334

334:                                              ; preds = %333
  %335 = load ptr, ptr %6, align 8
  %336 = load i32, ptr %7, align 4
  %337 = insertvalue { ptr, i32 } poison, ptr %335, 0
  %338 = insertvalue { ptr, i32 } %337, i32 %336, 1
  resume { ptr, i32 } %338

339:                                              ; preds = %176
  unreachable
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE3addERKS3_(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(12)) #4 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)) #5 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)) #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann11StaticArrayIfLi5EE3addERKf(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Riemann11StaticArrayIfLi5EEixEi(ptr noundef nonnull align 4 dereferenceable(24), i32 noundef) #4 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)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(64)) #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 508}
!10 = !{!"_ZTSN7Riemann15ContactManifoldE", !11, i64 0, !11, i64 4, !7, i64 8, !11, i64 508, !6, i64 512}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}


; 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.Riemann::StaticArray" = type { i32, [5 x %"class.Maths::TVector3"] }
%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::StaticArray.0" = type { i32, [5 x float] }
%"struct.Riemann::Contact" = type { %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", %"class.Maths::TVector3", float, float, float, float }

@.str = external hidden unnamed_addr constant [47 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [98 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv = external hidden unnamed_addr constant [47 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann15ContactManifold13MergeManifoldEv(ptr noundef nonnull align 8 dereferenceable(520) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca float, align 4
  %3 = alloca %"class.Riemann::StaticArray", align 4
  %4 = alloca %"class.Riemann::StaticArray.0", align 4
  %5 = alloca %"class.Maths::TVector3", align 4
  %6 = alloca %"class.Maths::TVector3", align 4
  %7 = alloca float, align 4
  %8 = alloca %"class.Maths::TVector3", align 4
  %9 = alloca float, 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 = getelementptr inbounds i8, ptr %0, i64 508
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 5
  br i1 %16, label %18, label %17

17:                                               ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 30, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv) #7
  unreachable

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  store float 0x3EB0C6F7A0000000, ptr %2, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #8
  call void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN7Riemann11StaticArrayIfLi5EEC2Ev(ptr noundef nonnull align 4 dereferenceable(24) %4)
  %19 = load i32, ptr %14, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %18
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  br label %23

.preheader123:                                    ; preds = %32
  %22 = icmp sgt i32 %36, 0
  br i1 %22, label %.lr.ph133, label %._crit_edge

23:                                               ; preds = %.lr.ph, %32
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %32 ]
  %24 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %21, i64 0, i64 %indvars.iv
  %25 = getelementptr inbounds i8, ptr %24, i64 24
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #8
  %26 = getelementptr inbounds i8, ptr %24, i64 48
  %27 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %26)
  invoke void @_ZN5MathsmlIfEENS_8TVector3IT_EES2_RKS3_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %6, float noundef %27, ptr noundef nonnull align 4 dereferenceable(12) %26)
          to label %28 unwind label %39

28:                                               ; preds = %23
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %29 unwind label %39

29:                                               ; preds = %28
  %30 = call noundef zeroext i1 @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE3addERKS3_(ptr noundef nonnull align 4 dereferenceable(64) %3, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  %31 = getelementptr inbounds i8, ptr %24, i64 12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #8
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %31)
          to label %32 unwind label %41

32:                                               ; preds = %29
  %33 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
  store float %33, ptr %7, align 4, !tbaa !11
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %35 = call noundef zeroext i1 @_ZN7Riemann11StaticArrayIfLi5EE3addERKf(ptr noundef nonnull align 4 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %34)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i32, ptr %14, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = icmp slt i64 %indvars.iv.next, %37
  br i1 %38, label %23, label %.preheader123, !llvm.loop !13

39:                                               ; preds = %28, %23
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #8
  br label %126

41:                                               ; preds = %29
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %126

.preheader122:                                    ; preds = %.lr.ph133
  %43 = icmp sgt i32 %55, 0
  br i1 %43, label %.lr.ph137, label %._crit_edge

.lr.ph137:                                        ; preds = %.preheader122
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  %45 = zext i32 %.188 to i64
  br label %59

.lr.ph133:                                        ; preds = %.preheader123, %.lr.ph133
  %.087132 = phi i32 [ %.188, %.lr.ph133 ], [ -1, %.preheader123 ]
  %.089131 = phi i32 [ %54, %.lr.ph133 ], [ 0, %.preheader123 ]
  %.090130 = phi float [ %.191, %.lr.ph133 ], [ 0xC7EFFFFFE0000000, %.preheader123 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %46 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %3, i32 noundef %.089131)
  %47 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %46)
  store float %47, ptr %9, align 4, !tbaa !11
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %49 = load float, ptr %48, align 4, !tbaa !11
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Riemann11StaticArrayIfLi5EEixEi(ptr noundef nonnull align 4 dereferenceable(24) %4, i32 noundef %.089131)
  %51 = load float, ptr %50, align 4, !tbaa !11
  %52 = fmul float %49, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %53 = fcmp olt float %.090130, %52
  %.191 = select i1 %53, float %52, float %.090130
  %.188 = select i1 %53, i32 %.089131, i32 %.087132
  %54 = add nuw nsw i32 %.089131, 1
  %55 = load i32, ptr %14, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %.lr.ph133, label %.preheader122, !llvm.loop !15

._crit_edge:                                      ; preds = %74, %18, %.preheader123, %.preheader122
  %.087.lcssa157 = phi i32 [ %.188, %.preheader122 ], [ -1, %.preheader123 ], [ -1, %18 ], [ %.188, %74 ]
  %.0100.lcssa = phi i32 [ -1, %.preheader122 ], [ -1, %.preheader123 ], [ -1, %18 ], [ %.2102, %74 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #8
  %57 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %3, i32 noundef %.0100.lcssa)
  %58 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %3, i32 noundef %.087.lcssa157)
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %57, ptr noundef nonnull align 4 dereferenceable(12) %58)
          to label %78 unwind label %84

59:                                               ; preds = %.lr.ph137, %74
  %60 = phi i32 [ %55, %.lr.ph137 ], [ %75, %74 ]
  %indvars.iv153 = phi i64 [ 0, %.lr.ph137 ], [ %indvars.iv.next154, %74 ]
  %.292135 = phi float [ 0xC7EFFFFFE0000000, %.lr.ph137 ], [ %.4, %74 ]
  %.0100134 = phi i32 [ -1, %.lr.ph137 ], [ %.2102, %74 ]
  %61 = icmp eq i64 %indvars.iv153, %45
  br i1 %61, label %74, label %62

62:                                               ; preds = %59
  %63 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %44, i64 0, i64 %indvars.iv153
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #8
  %64 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %3, i32 noundef %.188)
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %63, ptr noundef nonnull align 4 dereferenceable(12) %64)
          to label %65 unwind label %72

65:                                               ; preds = %62
  %66 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %67 = trunc nuw nsw i64 %indvars.iv153 to i32
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Riemann11StaticArrayIfLi5EEixEi(ptr noundef nonnull align 4 dereferenceable(24) %4, i32 noundef %67)
  %69 = load float, ptr %68, align 4, !tbaa !11
  %70 = fmul float %66, %69
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  %71 = fcmp olt float %.292135, %70
  %.1101 = select i1 %71, i32 %67, i32 %.0100134
  %.393 = select i1 %71, float %70, float %.292135
  %.pre = load i32, ptr %14, align 4, !tbaa !5
  br label %74

72:                                               ; preds = %62
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  br label %126

74:                                               ; preds = %59, %65
  %75 = phi i32 [ %.pre, %65 ], [ %60, %59 ]
  %.2102 = phi i32 [ %.1101, %65 ], [ %.0100134, %59 ]
  %.4 = phi float [ %.393, %65 ], [ %.292135, %59 ]
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %76 = sext i32 %75 to i64
  %77 = icmp slt i64 %indvars.iv.next154, %76
  br i1 %77, label %59, label %._crit_edge, !llvm.loop !16

78:                                               ; preds = %._crit_edge
  %79 = getelementptr inbounds i8, ptr %0, i64 8
  %80 = getelementptr inbounds i8, ptr %0, i64 56
  invoke void @_ZNK5Maths8TVector3IfE5CrossERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %80)
          to label %81 unwind label %84

81:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  %82 = call noundef i32 @_ZNK7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(64) %3)
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %.lr.ph145, label %._crit_edge146

._crit_edge146:                                   ; preds = %99, %81
  %.097.lcssa = phi i32 [ -1, %81 ], [ %.299, %99 ]
  %.094.lcssa = phi i32 [ -1, %81 ], [ %.296, %99 ]
  %.not = icmp eq i32 %.087.lcssa157, %.0100.lcssa
  %.not108 = icmp eq i32 %.087.lcssa157, %.097.lcssa
  %or.cond117 = select i1 %.not, i1 true, i1 %.not108
  %.not109 = icmp eq i32 %.087.lcssa157, %.094.lcssa
  %or.cond118 = select i1 %or.cond117, i1 true, i1 %.not109
  br i1 %or.cond118, label %.critedge, label %103

84:                                               ; preds = %78, %._crit_edge
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  br label %125

.lr.ph145:                                        ; preds = %81, %99
  %.077143 = phi i32 [ %100, %99 ], [ 0, %81 ]
  %.078142 = phi float [ %.280, %99 ], [ 0.000000e+00, %81 ]
  %.5141 = phi float [ %.7, %99 ], [ 0.000000e+00, %81 ]
  %.094140 = phi i32 [ %.296, %99 ], [ -1, %81 ]
  %.097139 = phi i32 [ %.299, %99 ], [ -1, %81 ]
  %86 = icmp eq i32 %.087.lcssa157, %.077143
  %87 = icmp eq i32 %.0100.lcssa, %.077143
  %or.cond = or i1 %86, %87
  br i1 %or.cond, label %99, label %88

88:                                               ; preds = %.lr.ph145
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #8
  %89 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %3, i32 noundef %.077143)
  %90 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %3, i32 noundef %.087.lcssa157)
  invoke void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %89, ptr noundef nonnull align 4 dereferenceable(12) %90)
          to label %91 unwind label %94

91:                                               ; preds = %88
  %92 = call noundef float @_ZNK5Maths8TVector3IfE3DotERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  %93 = fcmp olt float %92, %.078142
  br i1 %93, label %99, label %96

94:                                               ; preds = %88
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  br label %125

96:                                               ; preds = %91
  %97 = fcmp ogt float %92, %.5141
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  br label %99

99:                                               ; preds = %98, %96, %91, %.lr.ph145
  %.299 = phi i32 [ %.097139, %.lr.ph145 ], [ %.097139, %98 ], [ %.097139, %96 ], [ %.077143, %91 ]
  %.296 = phi i32 [ %.094140, %.lr.ph145 ], [ %.077143, %98 ], [ %.094140, %96 ], [ %.094140, %91 ]
  %.7 = phi float [ %.5141, %.lr.ph145 ], [ %92, %98 ], [ %.5141, %96 ], [ %.5141, %91 ]
  %.280 = phi float [ %.078142, %.lr.ph145 ], [ %.078142, %98 ], [ %.078142, %96 ], [ %92, %91 ]
  %100 = add nuw nsw i32 %.077143, 1
  %101 = call noundef i32 @_ZNK7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(64) %3)
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %.lr.ph145, label %._crit_edge146, !llvm.loop !17

.critedge:                                        ; preds = %._crit_edge146
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 99, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv) #7
  unreachable

103:                                              ; preds = %._crit_edge146
  %104 = icmp ne i32 %.0100.lcssa, %.097.lcssa
  %105 = icmp ne i32 %.0100.lcssa, %.094.lcssa
  %106 = select i1 %104, i1 %105, i1 false
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 100, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv) #7
  unreachable

108:                                              ; preds = %103
  %.not110 = icmp eq i32 %.097.lcssa, %.094.lcssa
  br i1 %.not110, label %111, label %.preheader

.preheader:                                       ; preds = %108
  %109 = load i32, ptr %14, align 4, !tbaa !5
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %.lr.ph150, label %.loopexit

111:                                              ; preds = %108
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 101, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold13MergeManifoldEv) #7
  unreachable

.lr.ph150:                                        ; preds = %.preheader, %123
  %.0149 = phi i32 [ %124, %123 ], [ 0, %.preheader ]
  %112 = icmp eq i32 %.0149, %.087.lcssa157
  %113 = icmp eq i32 %.0149, %.0100.lcssa
  %or.cond119 = or i1 %112, %113
  %114 = icmp eq i32 %.0149, %.097.lcssa
  %or.cond120 = select i1 %or.cond119, i1 true, i1 %114
  %115 = icmp eq i32 %.0149, %.094.lcssa
  %or.cond121 = select i1 %or.cond120, i1 true, i1 %115
  br i1 %or.cond121, label %123, label %116

116:                                              ; preds = %.lr.ph150
  %117 = add nsw i32 %109, -1
  store i32 %117, ptr %14, align 4, !tbaa !5
  %118 = icmp eq i32 %.0149, 4
  br i1 %118, label %.loopexit, label %119

119:                                              ; preds = %116
  %120 = zext nneg i32 %.0149 to i64
  %121 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %79, i64 0, i64 %120
  %122 = getelementptr inbounds i8, ptr %0, i64 408
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(100) %121, ptr noundef nonnull align 8 dereferenceable(100) %122, i64 100, i1 false)
  br label %.loopexit

123:                                              ; preds = %.lr.ph150
  %124 = add nuw nsw i32 %.0149, 1
  %exitcond.not = icmp eq i32 %124, %109
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph150, !llvm.loop !18

.loopexit:                                        ; preds = %123, %.preheader, %116, %119
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  call void @_ZN7Riemann11StaticArrayIfLi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(64) %3) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  ret i1 true

125:                                              ; preds = %94, %84
  %.pn = phi { ptr, i32 } [ %95, %94 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  br label %126

126:                                              ; preds = %72, %125, %39, %41
  %.pn114.pn = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ], [ %73, %72 ], [ %.pn, %125 ]
  call void @_ZN7Riemann11StaticArrayIfLi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(64) %3) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn114.pn
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE3addERKS3_(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 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 #5 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 #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7Riemann11StaticArrayIfLi5EE3addERKf(ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN7Riemann11StaticArrayIfLi5EEixEi(ptr noundef nonnull align 4 dereferenceable(24), i32 noundef) local_unnamed_addr #4 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 #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Riemann11StaticArrayIN5Maths8TVector3IfEELi5EED2Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 508}
!6 = !{!"_ZTSN7Riemann15ContactManifoldE", !7, i64 0, !7, i64 4, !8, i64 8, !7, i64 508, !10, i64 512}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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