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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.Maths::TVector3" = type { float, float, float }
%"class.Riemann::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__._ZN7Riemann15ContactManifold14MergeManifold2Ev = external hidden unnamed_addr constant [48 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1

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

30:                                               ; preds = %1
  br label %33

31:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 123, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold14MergeManifold2Ev) #7
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store float 0xC7EFFFFFE0000000, ptr %4, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !14
  br label %34

34:                                               ; preds = %56, %33
  %35 = load i32, ptr %5, align 4, !tbaa !14
  %36 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 3
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = icmp slt i32 %35, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %59

40:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %41 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 2
  %42 = load i32, ptr %5, align 4, !tbaa !14
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %41, i64 0, i64 %43
  store ptr %44, ptr %6, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.Riemann::Contact", ptr %45, i32 0, i32 7
  %47 = load float, ptr %46, align 4, !tbaa !15
  %48 = load float, ptr %4, align 4, !tbaa !12
  %49 = fcmp ogt float %47, %48
  br i1 %49, label %50, label %55

50:                                               ; preds = %40
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.Riemann::Contact", ptr %51, i32 0, i32 7
  %53 = load float, ptr %52, align 4, !tbaa !15
  store float %53, ptr %4, align 4, !tbaa !12
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %54, ptr %3, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %50, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %5, align 4, !tbaa !14
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %5, align 4, !tbaa !14
  br label %34, !llvm.loop !18

59:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store float 0xC7EFFFFFE0000000, ptr %8, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !14
  br label %60

60:                                               ; preds = %91, %59
  %61 = load i32, ptr %9, align 4, !tbaa !14
  %62 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 3
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = icmp slt i32 %61, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %67 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 2
  %68 = load i32, ptr %9, align 4, !tbaa !14
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %67, i64 0, i64 %69
  store ptr %70, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = icmp eq ptr %71, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %66
  store i32 7, ptr %10, align 4
  br label %88

75:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #8
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.Riemann::Contact", ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.Riemann::Contact", ptr %78, i32 0, i32 0
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind writable sret(%"class.Maths::TVector3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %77, ptr noundef nonnull align 4 dereferenceable(12) %79)
  %80 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #8
  store float %80, ptr %12, align 4, !tbaa !12
  %81 = load float, ptr %12, align 4, !tbaa !12
  %82 = load float, ptr %8, align 4, !tbaa !12
  %83 = fcmp ogt float %81, %82
  br i1 %83, label %84, label %87

84:                                               ; preds = %75
  %85 = load float, ptr %12, align 4, !tbaa !12
  store float %85, ptr %8, align 4, !tbaa !12
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %86, ptr %7, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %84, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  store i32 0, ptr %10, align 4
  br label %88

88:                                               ; preds = %87, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  %89 = load i32, ptr %10, align 4
  switch i32 %89, label %265 [
    i32 0, label %90
    i32 7, label %91
  ]

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %90, %88
  %92 = load i32, ptr %9, align 4, !tbaa !14
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %9, align 4, !tbaa !14
  br label %60, !llvm.loop !20

94:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store float 0xC7EFFFFFE0000000, ptr %15, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !14
  br label %95

95:                                               ; preds = %132, %94
  %96 = load i32, ptr %16, align 4, !tbaa !14
  %97 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 3
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = icmp slt i32 %96, %98
  br i1 %99, label %101, label %100

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

101:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %102 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 2
  %103 = load i32, ptr %16, align 4, !tbaa !14
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %102, i64 0, i64 %104
  store ptr %105, ptr %17, align 8, !tbaa !5
  %106 = load ptr, ptr %17, align 8, !tbaa !5
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = icmp eq ptr %106, %107
  br i1 %108, label %113, label %109

109:                                              ; preds = %101
  %110 = load ptr, ptr %17, align 8, !tbaa !5
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = icmp eq ptr %110, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %109, %101
  store i32 10, ptr %10, align 4
  br label %129

114:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %115 = load ptr, ptr %17, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.Riemann::Contact", ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.Riemann::Contact", ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.Riemann::Contact", ptr %119, i32 0, i32 0
  %121 = call noundef float @_ZN7Riemann8Segment325SqrDistancePointToSegmentERKN5Maths8TVector3IfEES5_S5_(ptr noundef nonnull align 4 dereferenceable(12) %116, ptr noundef nonnull align 4 dereferenceable(12) %118, ptr noundef nonnull align 4 dereferenceable(12) %120)
  store float %121, ptr %18, align 4, !tbaa !12
  %122 = load float, ptr %18, align 4, !tbaa !12
  %123 = load float, ptr %15, align 4, !tbaa !12
  %124 = fcmp ogt float %122, %123
  br i1 %124, label %125, label %128

125:                                              ; preds = %114
  %126 = load float, ptr %18, align 4, !tbaa !12
  store float %126, ptr %15, align 4, !tbaa !12
  %127 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %127, ptr %14, align 8, !tbaa !5
  br label %128

128:                                              ; preds = %125, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  store i32 0, ptr %10, align 4
  br label %129

129:                                              ; preds = %128, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  %130 = load i32, ptr %10, align 4
  switch i32 %130, label %265 [
    i32 0, label %131
    i32 10, label %132
  ]

131:                                              ; preds = %129
  br label %132

132:                                              ; preds = %131, %129
  %133 = load i32, ptr %16, align 4, !tbaa !14
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %16, align 4, !tbaa !14
  br label %95, !llvm.loop !21

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

136:                                              ; preds = %179, %135
  %137 = load i32, ptr %21, align 4, !tbaa !14
  %138 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, 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 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %182

142:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %143 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 2
  %144 = load i32, ptr %21, 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 %22, align 8, !tbaa !5
  %147 = load ptr, ptr %22, align 8, !tbaa !5
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = icmp eq ptr %147, %148
  br i1 %149, label %158, label %150

150:                                              ; preds = %142
  %151 = load ptr, ptr %22, align 8, !tbaa !5
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = icmp eq ptr %151, %152
  br i1 %153, label %158, label %154

154:                                              ; preds = %150
  %155 = load ptr, ptr %22, align 8, !tbaa !5
  %156 = load ptr, ptr %14, align 8, !tbaa !5
  %157 = icmp eq ptr %155, %156
  br i1 %157, label %158, label %159

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

159:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %160 = load ptr, ptr %22, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.Riemann::Contact", ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.Riemann::Contact", ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.Riemann::Contact", ptr %164, i32 0, i32 0
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = getelementptr inbounds %"struct.Riemann::Contact", ptr %166, i32 0, i32 0
  %168 = call noundef float @_ZN7Riemann9Triangle326SqrDistancePointToTriangleERKN5Maths8TVector3IfEES5_S5_S5_(ptr noundef nonnull align 4 dereferenceable(12) %161, ptr noundef nonnull align 4 dereferenceable(12) %163, ptr noundef nonnull align 4 dereferenceable(12) %165, ptr noundef nonnull align 4 dereferenceable(12) %167)
  store float %168, ptr %23, align 4, !tbaa !12
  %169 = load float, ptr %23, align 4, !tbaa !12
  %170 = load float, ptr %20, align 4, !tbaa !12
  %171 = fcmp ogt float %169, %170
  br i1 %171, label %172, label %175

172:                                              ; preds = %159
  %173 = load float, ptr %23, align 4, !tbaa !12
  store float %173, ptr %20, align 4, !tbaa !12
  %174 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %174, ptr %19, align 8, !tbaa !5
  br label %175

175:                                              ; preds = %172, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  store i32 0, ptr %10, align 4
  br label %176

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

178:                                              ; preds = %176
  br label %179

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

182:                                              ; preds = %141
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = icmp ne ptr %183, %184
  br i1 %185, label %186, label %194

186:                                              ; preds = %182
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = load ptr, ptr %14, align 8, !tbaa !5
  %189 = icmp ne ptr %187, %188
  br i1 %189, label %190, label %194

190:                                              ; preds = %186
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = load ptr, ptr %19, align 8, !tbaa !5
  %193 = icmp ne ptr %191, %192
  br label %194

194:                                              ; preds = %190, %186, %182
  %195 = phi i1 [ false, %186 ], [ false, %182 ], [ %193, %190 ]
  br i1 %195, label %196, label %197

196:                                              ; preds = %194
  br label %199

197:                                              ; preds = %194
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 186, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold14MergeManifold2Ev) #7
  unreachable

198:                                              ; No predecessors!
  br label %199

199:                                              ; preds = %198, %196
  %200 = load ptr, ptr %7, align 8, !tbaa !5
  %201 = load ptr, ptr %14, align 8, !tbaa !5
  %202 = icmp ne ptr %200, %201
  br i1 %202, label %203, label %207

203:                                              ; preds = %199
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = load ptr, ptr %19, align 8, !tbaa !5
  %206 = icmp ne ptr %204, %205
  br label %207

207:                                              ; preds = %203, %199
  %208 = phi i1 [ false, %199 ], [ %206, %203 ]
  br i1 %208, label %209, label %210

209:                                              ; preds = %207
  br label %212

210:                                              ; preds = %207
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 187, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold14MergeManifold2Ev) #7
  unreachable

211:                                              ; No predecessors!
  br label %212

212:                                              ; preds = %211, %209
  %213 = load ptr, ptr %14, align 8, !tbaa !5
  %214 = load ptr, ptr %19, align 8, !tbaa !5
  %215 = icmp ne ptr %213, %214
  br i1 %215, label %216, label %217

216:                                              ; preds = %212
  br label %219

217:                                              ; preds = %212
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 188, ptr noundef @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold14MergeManifold2Ev) #7
  unreachable

218:                                              ; No predecessors!
  br label %219

219:                                              ; preds = %218, %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !14
  br label %220

220:                                              ; preds = %260, %219
  %221 = load i32, ptr %24, align 4, !tbaa !14
  %222 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 3
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = icmp slt i32 %221, %223
  br i1 %224, label %226, label %225

225:                                              ; preds = %220
  store i32 14, ptr %10, align 4
  br label %263

226:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %227 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 2
  %228 = load i32, ptr %24, align 4, !tbaa !14
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %227, i64 0, i64 %229
  store ptr %230, ptr %25, align 8, !tbaa !5
  %231 = load ptr, ptr %25, align 8, !tbaa !5
  %232 = load ptr, ptr %3, align 8, !tbaa !5
  %233 = icmp eq ptr %231, %232
  br i1 %233, label %246, label %234

234:                                              ; preds = %226
  %235 = load ptr, ptr %25, align 8, !tbaa !5
  %236 = load ptr, ptr %7, align 8, !tbaa !5
  %237 = icmp eq ptr %235, %236
  br i1 %237, label %246, label %238

238:                                              ; preds = %234
  %239 = load ptr, ptr %25, align 8, !tbaa !5
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  %241 = icmp eq ptr %239, %240
  br i1 %241, label %246, label %242

242:                                              ; preds = %238
  %243 = load ptr, ptr %25, align 8, !tbaa !5
  %244 = load ptr, ptr %19, align 8, !tbaa !5
  %245 = icmp eq ptr %243, %244
  br i1 %245, label %246, label %247

246:                                              ; preds = %242, %238, %234, %226
  store i32 16, ptr %10, align 4
  br label %258

247:                                              ; preds = %242
  %248 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 3
  %249 = load i32, ptr %248, align 4, !tbaa !9
  %250 = add nsw i32 %249, -1
  store i32 %250, ptr %248, align 4, !tbaa !9
  %251 = load i32, ptr %24, align 4, !tbaa !14
  %252 = icmp eq i32 %251, 4
  br i1 %252, label %253, label %254

253:                                              ; preds = %247
  store i32 14, ptr %10, align 4
  br label %258

254:                                              ; preds = %247
  %255 = load ptr, ptr %25, align 8, !tbaa !5
  %256 = getelementptr inbounds %"class.Riemann::ContactManifold", ptr %26, i32 0, i32 2
  %257 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %256, i64 0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %255, ptr align 8 %257, i64 100, i1 false)
  store i32 14, ptr %10, align 4
  br label %258

258:                                              ; preds = %254, %253, %246
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  %259 = load i32, ptr %10, align 4
  switch i32 %259, label %263 [
    i32 16, label %260
  ]

260:                                              ; preds = %258
  %261 = load i32, ptr %24, align 4, !tbaa !14
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %24, align 4, !tbaa !14
  br label %220, !llvm.loop !23

263:                                              ; preds = %258, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %264

264:                                              ; preds = %263
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #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 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret i1 true

265:                                              ; preds = %176, %129, %88
  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: 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)) #3 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 float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12)) #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) #5

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

declare noundef float @_ZN7Riemann9Triangle326SqrDistancePointToTriangleERKN5Maths8TVector3IfEES5_S5_S5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #6

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 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!16, !13, i64 84}
!16 = !{!"_ZTSN7Riemann7ContactE", !17, i64 0, !17, i64 12, !17, i64 24, !17, i64 36, !17, i64 48, !17, i64 60, !17, i64 72, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96}
!17 = !{!"_ZTSN5Maths8TVector3IfEE", !13, i64 0, !13, i64 4, !13, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}


; 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 }
%"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__._ZN7Riemann15ContactManifold14MergeManifold2Ev = external hidden unnamed_addr constant [48 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7Riemann15ContactManifold14MergeManifold2Ev(ptr noundef nonnull align 8 dereferenceable(520) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %"class.Maths::TVector3", align 4
  %3 = getelementptr inbounds i8, ptr %0, i64 508
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 5
  br i1 %5, label %.preheader124, label %26

.preheader124:                                    ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = getelementptr inbounds i8, ptr %0, i64 92
  %8 = load float, ptr %7, align 4, !tbaa !11
  %9 = fcmp ogt float %8, 0xC7EFFFFFE0000000
  %.177 = select i1 %9, float %8, float 0xC7EFFFFFE0000000
  %.1 = select i1 %9, ptr %6, ptr null
  %10 = getelementptr inbounds i8, ptr %0, i64 108
  %11 = getelementptr inbounds i8, ptr %0, i64 192
  %12 = load float, ptr %11, align 8, !tbaa !11
  %13 = fcmp ogt float %12, %.177
  %.177.1 = select i1 %13, float %12, float %.177
  %.1.1 = select i1 %13, ptr %10, ptr %.1
  %14 = getelementptr inbounds i8, ptr %0, i64 208
  %15 = getelementptr inbounds i8, ptr %0, i64 292
  %16 = load float, ptr %15, align 4, !tbaa !11
  %17 = fcmp ogt float %16, %.177.1
  %.177.2 = select i1 %17, float %16, float %.177.1
  %.1.2 = select i1 %17, ptr %14, ptr %.1.1
  %18 = getelementptr inbounds i8, ptr %0, i64 308
  %19 = getelementptr inbounds i8, ptr %0, i64 392
  %20 = load float, ptr %19, align 8, !tbaa !11
  %21 = fcmp ogt float %20, %.177.2
  %.177.3 = select i1 %21, float %20, float %.177.2
  %.1.3 = select i1 %21, ptr %18, ptr %.1.2
  %22 = getelementptr inbounds i8, ptr %0, i64 408
  %23 = getelementptr inbounds i8, ptr %0, i64 492
  %24 = load float, ptr %23, align 4, !tbaa !11
  %25 = fcmp ogt float %24, %.177.3
  %.1.4 = select i1 %25, ptr %22, ptr %.1.3
  br label %.lr.ph

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

.preheader122:                                    ; preds = %34
  %27 = icmp sgt i32 %35, 0
  br i1 %27, label %.lr.ph136, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader124, %34
  %28 = phi i32 [ %35, %34 ], [ 5, %.preheader124 ]
  %indvars.iv150 = phi i64 [ %indvars.iv.next151, %34 ], [ 0, %.preheader124 ]
  %.085132 = phi ptr [ %.287, %34 ], [ null, %.preheader124 ]
  %.088131 = phi float [ %.290, %34 ], [ 0xC7EFFFFFE0000000, %.preheader124 ]
  %29 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %6, i64 0, i64 %indvars.iv150
  %30 = icmp eq ptr %29, %.1.4
  br i1 %30, label %34, label %31

31:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #8
  call void @_ZNK5Maths8TVector3IfEmiERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.Maths::TVector3") align 4 %2, ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %.1.4)
  %32 = call noundef float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #8
  %33 = fcmp ogt float %32, %.088131
  %.189 = select i1 %33, float %32, float %.088131
  %.186 = select i1 %33, ptr %29, ptr %.085132
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %.lr.ph, %31
  %35 = phi i32 [ %.pre, %31 ], [ %28, %.lr.ph ]
  %.290 = phi float [ %.189, %31 ], [ %.088131, %.lr.ph ]
  %.287 = phi ptr [ %.186, %31 ], [ %.085132, %.lr.ph ]
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next151, %36
  br i1 %37, label %.lr.ph, label %.preheader122, !llvm.loop !15

.preheader121:                                    ; preds = %46
  %38 = icmp sgt i32 %47, 0
  br i1 %38, label %.lr.ph141, label %._crit_edge

.lr.ph136:                                        ; preds = %.preheader122, %46
  %39 = phi i32 [ %47, %46 ], [ %35, %.preheader122 ]
  %indvars.iv153 = phi i64 [ %indvars.iv.next154, %46 ], [ 0, %.preheader122 ]
  %.092134 = phi float [ %.294, %46 ], [ 0xC7EFFFFFE0000000, %.preheader122 ]
  %.095133 = phi ptr [ %.297, %46 ], [ null, %.preheader122 ]
  %40 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %6, i64 0, i64 %indvars.iv153
  %41 = icmp eq ptr %40, %.1.4
  %42 = icmp eq ptr %40, %.287
  %or.cond = select i1 %41, i1 true, i1 %42
  br i1 %or.cond, label %46, label %43

43:                                               ; preds = %.lr.ph136
  %44 = call noundef float @_ZN7Riemann8Segment325SqrDistancePointToSegmentERKN5Maths8TVector3IfEES5_S5_(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %.1.4, ptr noundef nonnull align 4 dereferenceable(12) %.287)
  %45 = fcmp ogt float %44, %.092134
  %.196 = select i1 %45, ptr %40, ptr %.095133
  %.193 = select i1 %45, float %44, float %.092134
  %.pre164 = load i32, ptr %3, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %.lr.ph136, %43
  %47 = phi i32 [ %.pre164, %43 ], [ %39, %.lr.ph136 ]
  %.297 = phi ptr [ %.196, %43 ], [ %.095133, %.lr.ph136 ]
  %.294 = phi float [ %.193, %43 ], [ %.092134, %.lr.ph136 ]
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next154, %48
  br i1 %49, label %.lr.ph136, label %.preheader121, !llvm.loop !17

._crit_edge:                                      ; preds = %58, %.preheader122, %.preheader121
  %.095.lcssa167 = phi ptr [ %.297, %.preheader121 ], [ null, %.preheader122 ], [ %.297, %58 ]
  %.082.lcssa = phi ptr [ null, %.preheader121 ], [ null, %.preheader122 ], [ %.284, %58 ]
  %.lcssa126 = phi i32 [ %47, %.preheader121 ], [ %35, %.preheader122 ], [ %59, %58 ]
  %.not = icmp eq ptr %.1.4, %.287
  %.not109 = icmp eq ptr %.1.4, %.095.lcssa167
  %or.cond114 = select i1 %.not, i1 true, i1 %.not109
  %.not110 = icmp eq ptr %.1.4, %.082.lcssa
  %or.cond115 = select i1 %or.cond114, i1 true, i1 %.not110
  br i1 %or.cond115, label %.critedge, label %62

.lr.ph141:                                        ; preds = %.preheader121, %58
  %50 = phi i32 [ %59, %58 ], [ %47, %.preheader121 ]
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %58 ], [ 0, %.preheader121 ]
  %.080139 = phi float [ %.2, %58 ], [ 0xC7EFFFFFE0000000, %.preheader121 ]
  %.082138 = phi ptr [ %.284, %58 ], [ null, %.preheader121 ]
  %51 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %6, i64 0, i64 %indvars.iv156
  %52 = icmp eq ptr %51, %.1.4
  %53 = icmp eq ptr %51, %.287
  %or.cond112 = select i1 %52, i1 true, i1 %53
  %54 = icmp eq ptr %51, %.297
  %or.cond113 = select i1 %or.cond112, i1 true, i1 %54
  br i1 %or.cond113, label %58, label %55

55:                                               ; preds = %.lr.ph141
  %56 = call noundef float @_ZN7Riemann9Triangle326SqrDistancePointToTriangleERKN5Maths8TVector3IfEES5_S5_S5_(ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef nonnull align 4 dereferenceable(12) %.1.4, ptr noundef nonnull align 4 dereferenceable(12) %.287, ptr noundef nonnull align 4 dereferenceable(12) %.297)
  %57 = fcmp ogt float %56, %.080139
  %.183 = select i1 %57, ptr %51, ptr %.082138
  %.181 = select i1 %57, float %56, float %.080139
  %.pre165 = load i32, ptr %3, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %.lr.ph141, %55
  %59 = phi i32 [ %.pre165, %55 ], [ %50, %.lr.ph141 ]
  %.284 = phi ptr [ %.183, %55 ], [ %.082138, %.lr.ph141 ]
  %.2 = phi float [ %.181, %55 ], [ %.080139, %.lr.ph141 ]
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next157, %60
  br i1 %61, label %.lr.ph141, label %._crit_edge, !llvm.loop !18

.critedge:                                        ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 186, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold14MergeManifold2Ev) #7
  unreachable

62:                                               ; preds = %._crit_edge
  %63 = icmp ne ptr %.287, %.095.lcssa167
  %64 = icmp ne ptr %.287, %.082.lcssa
  %65 = select i1 %63, i1 %64, i1 false
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 187, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold14MergeManifold2Ev) #7
  unreachable

67:                                               ; preds = %62
  %.not111 = icmp eq ptr %.095.lcssa167, %.082.lcssa
  br i1 %.not111, label %69, label %.preheader

.preheader:                                       ; preds = %67
  %68 = icmp sgt i32 %.lcssa126, 0
  br i1 %68, label %.lr.ph145, label %.critedge120

.lr.ph145:                                        ; preds = %.preheader
  %wide.trip.count162 = zext nneg i32 %.lcssa126 to i64
  br label %70

69:                                               ; preds = %67
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 188, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Riemann15ContactManifold14MergeManifold2Ev) #7
  unreachable

70:                                               ; preds = %.lr.ph145, %81
  %indvars.iv159 = phi i64 [ 0, %.lr.ph145 ], [ %indvars.iv.next160, %81 ]
  %71 = getelementptr inbounds [5 x %"struct.Riemann::Contact"], ptr %6, i64 0, i64 %indvars.iv159
  %72 = icmp eq ptr %71, %.1.4
  %73 = icmp eq ptr %71, %.287
  %or.cond116 = select i1 %72, i1 true, i1 %73
  %74 = icmp eq ptr %71, %.095.lcssa167
  %or.cond117 = select i1 %or.cond116, i1 true, i1 %74
  %75 = icmp eq ptr %71, %.082.lcssa
  %or.cond118 = select i1 %or.cond117, i1 true, i1 %75
  br i1 %or.cond118, label %81, label %76

76:                                               ; preds = %70
  %77 = add nsw i32 %.lcssa126, -1
  store i32 %77, ptr %3, align 4, !tbaa !5
  %78 = icmp eq i64 %indvars.iv159, 4
  br i1 %78, label %.critedge120, label %79

79:                                               ; preds = %76
  %80 = getelementptr inbounds i8, ptr %0, i64 408
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(100) %71, ptr noundef nonnull align 8 dereferenceable(100) %80, i64 100, i1 false)
  br label %.critedge120

81:                                               ; preds = %70
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %exitcond163.not = icmp eq i64 %indvars.iv.next160, %wide.trip.count162
  br i1 %exitcond163.not, label %.critedge120, label %70, !llvm.loop !19

.critedge120:                                     ; preds = %81, %.preheader, %79, %76
  ret i1 true
}

; 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: 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 #3 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 float @_ZNK5Maths8TVector3IfE12SquareLengthEv(ptr noundef nonnull align 4 dereferenceable(12)) 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) #5

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

declare noundef float @_ZN7Riemann9Triangle326SqrDistancePointToTriangleERKN5Maths8TVector3IfEES5_S5_S5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #6

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 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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, !14, i64 84}
!12 = !{!"_ZTSN7Riemann7ContactE", !13, i64 0, !13, i64 12, !13, i64 24, !13, i64 36, !13, i64 48, !13, i64 60, !13, i64 72, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96}
!13 = !{!"_ZTSN5Maths8TVector3IfEE", !14, i64 0, !14, i64 4, !14, i64 8}
!14 = !{!"float", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


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