; LLVM IR from idmillington/cyclone-physics :: src/contacts.ll (ZN7cyclone15ContactResolver16adjustVelocitiesEPNS_7ContactEjd)

; 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.cyclone::Vector3" = type { double, double, double, double }
%"class.cyclone::ContactResolver" = type <{ i32, i32, double, double, i32, i32, i8, [7 x i8] }>
%"class.cyclone::Contact" = type { [2 x ptr], double, double, %"class.cyclone::Vector3", %"class.cyclone::Vector3", double, %"class.cyclone::Matrix3", %"class.cyclone::Vector3", double, [2 x %"class.cyclone::Vector3"] }
%"class.cyclone::Matrix3" = type { [9 x double] }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone7Contact15matchAwakeStateEv(ptr noundef nonnull align 8 dereferenceable(280)) #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cyclone7Vector3pLERKS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Matrix318transformTransposeERKNS_7Vector3E(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(32), double noundef) #0 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) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone7Contact29calculateDesiredDeltaVelocityEd(ptr noundef nonnull align 8 dereferenceable(280), double noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone7Contact19applyVelocityChangeEPNS_7Vector3ES2_(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Vector313vectorProductERKS0_(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7cyclone15ContactResolver16adjustVelocitiesEPNS_7ContactEjd(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef %1, i32 noundef %2, double noundef %3) #0 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca [2 x %"class.cyclone::Vector3"], align 16
  %10 = alloca [2 x %"class.cyclone::Vector3"], align 16
  %11 = alloca %"class.cyclone::Vector3", align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.cyclone::Vector3", align 8
  %20 = alloca %"class.cyclone::Vector3", align 8
  %21 = alloca %"class.cyclone::Vector3", align 8
  %22 = alloca %"class.cyclone::Vector3", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store double %3, ptr %8, align 8, !tbaa !11
  %23 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #4
  %24 = getelementptr inbounds [2 x %"class.cyclone::Vector3"], ptr %9, i32 0, i32 0
  %25 = getelementptr inbounds %"class.cyclone::Vector3", ptr %24, i64 2
  br label %26

26:                                               ; preds = %26, %4
  %27 = phi ptr [ %24, %4 ], [ %28, %26 ]
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27)
  %28 = getelementptr inbounds %"class.cyclone::Vector3", ptr %27, i64 1
  %29 = icmp eq ptr %28, %25
  br i1 %29, label %30, label %26

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #4
  %31 = getelementptr inbounds [2 x %"class.cyclone::Vector3"], ptr %10, i32 0, i32 0
  %32 = getelementptr inbounds %"class.cyclone::Vector3", ptr %31, i64 2
  br label %33

33:                                               ; preds = %33, %30
  %34 = phi ptr [ %31, %30 ], [ %35, %33 ]
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34)
  %35 = getelementptr inbounds %"class.cyclone::Vector3", ptr %34, i64 1
  %36 = icmp eq ptr %35, %32
  br i1 %36, label %37, label %33

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %38 = getelementptr inbounds %"class.cyclone::ContactResolver", ptr %23, i32 0, i32 4
  store i32 0, ptr %38, align 8, !tbaa !13
  br label %39

39:                                               ; preds = %191, %37
  %40 = getelementptr inbounds %"class.cyclone::ContactResolver", ptr %23, i32 0, i32 4
  %41 = load i32, ptr %40, align 8, !tbaa !13
  %42 = getelementptr inbounds %"class.cyclone::ContactResolver", ptr %23, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !16
  %44 = icmp ult i32 %41, %43
  br i1 %44, label %45, label %192

45:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %46 = getelementptr inbounds %"class.cyclone::ContactResolver", ptr %23, i32 0, i32 2
  %47 = load double, ptr %46, align 8, !tbaa !17
  store double %47, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %48 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %48, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %72, %45
  %50 = load i32, ptr %14, align 4, !tbaa !9
  %51 = load i32, ptr %7, align 4, !tbaa !9
  %52 = icmp ult i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %75

54:                                               ; preds = %49
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds %"class.cyclone::Contact", ptr %55, i64 %57
  %59 = getelementptr inbounds %"class.cyclone::Contact", ptr %58, i32 0, i32 8
  %60 = load double, ptr %59, align 8, !tbaa !18
  %61 = load double, ptr %12, align 8, !tbaa !11
  %62 = fcmp ogt double %60, %61
  br i1 %62, label %63, label %71

63:                                               ; preds = %54
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = load i32, ptr %14, align 4, !tbaa !9
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds %"class.cyclone::Contact", ptr %64, i64 %66
  %68 = getelementptr inbounds %"class.cyclone::Contact", ptr %67, i32 0, i32 8
  %69 = load double, ptr %68, align 8, !tbaa !18
  store double %69, ptr %12, align 8, !tbaa !11
  %70 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %70, ptr %13, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %63, %54
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = add i32 %73, 1
  store i32 %74, ptr %14, align 4, !tbaa !9
  br label %49, !llvm.loop !22

75:                                               ; preds = %53
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = icmp eq i32 %76, %77
  br i1 %78, label %79, label %80

79:                                               ; preds = %75
  store i32 3, ptr %15, align 4
  br label %189

80:                                               ; preds = %75
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = load i32, ptr %13, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds %"class.cyclone::Contact", ptr %81, i64 %83
  call void @_ZN7cyclone7Contact15matchAwakeStateEv(ptr noundef nonnull align 8 dereferenceable(280) %84)
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds %"class.cyclone::Contact", ptr %85, i64 %87
  %89 = getelementptr inbounds [2 x %"class.cyclone::Vector3"], ptr %9, i64 0, i64 0
  %90 = getelementptr inbounds [2 x %"class.cyclone::Vector3"], ptr %10, i64 0, i64 0
  call void @_ZN7cyclone7Contact19applyVelocityChangeEPNS_7Vector3ES2_(ptr noundef nonnull align 8 dereferenceable(280) %88, ptr noundef %89, ptr noundef %90)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %182, %80
  %92 = load i32, ptr %16, align 4, !tbaa !9
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = icmp ult i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  store i32 7, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %185

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %178, %96
  %98 = load i32, ptr %17, align 4, !tbaa !9
  %99 = icmp ult i32 %98, 2
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 10, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %181

101:                                              ; preds = %97
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = load i32, ptr %16, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds %"class.cyclone::Contact", ptr %102, i64 %104
  %106 = getelementptr inbounds %"class.cyclone::Contact", ptr %105, i32 0, i32 0
  %107 = load i32, ptr %17, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds [2 x ptr], ptr %106, i64 0, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %177

112:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %173, %112
  %114 = load i32, ptr %18, align 4, !tbaa !9
  %115 = icmp ult i32 %114, 2
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 13, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %176

117:                                              ; preds = %113
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = load i32, ptr %16, align 4, !tbaa !9
  %120 = zext i32 %119 to i64
  %121 = getelementptr inbounds %"class.cyclone::Contact", ptr %118, i64 %120
  %122 = getelementptr inbounds %"class.cyclone::Contact", ptr %121, i32 0, i32 0
  %123 = load i32, ptr %17, align 4, !tbaa !9
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds [2 x ptr], ptr %122, i64 0, i64 %124
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = load i32, ptr %13, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds %"class.cyclone::Contact", ptr %127, i64 %129
  %131 = getelementptr inbounds %"class.cyclone::Contact", ptr %130, i32 0, i32 0
  %132 = load i32, ptr %18, align 4, !tbaa !9
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds [2 x ptr], ptr %131, i64 0, i64 %133
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  %136 = icmp eq ptr %126, %135
  br i1 %136, label %137, label %172

137:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #4
  %138 = load i32, ptr %18, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds [2 x %"class.cyclone::Vector3"], ptr %9, i64 0, i64 %139
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #4
  %141 = load i32, ptr %18, align 4, !tbaa !9
  %142 = zext i32 %141 to i64
  %143 = getelementptr inbounds [2 x %"class.cyclone::Vector3"], ptr %10, i64 0, i64 %142
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = load i32, ptr %16, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = getelementptr inbounds %"class.cyclone::Contact", ptr %144, i64 %146
  %148 = getelementptr inbounds %"class.cyclone::Contact", ptr %147, i32 0, i32 9
  %149 = load i32, ptr %17, align 4, !tbaa !9
  %150 = zext i32 %149 to i64
  %151 = getelementptr inbounds [2 x %"class.cyclone::Vector3"], ptr %148, i64 0, i64 %150
  call void @_ZNK7cyclone7Vector313vectorProductERKS0_(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %143, ptr noundef nonnull align 8 dereferenceable(32) %151)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %140, ptr noundef nonnull align 8 dereferenceable(32) %20)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %19, i64 32, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #4
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = load i32, ptr %16, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds %"class.cyclone::Contact", ptr %152, i64 %154
  %156 = getelementptr inbounds %"class.cyclone::Contact", ptr %155, i32 0, i32 6
  call void @_ZNK7cyclone7Matrix318transformTransposeERKNS_7Vector3E(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %22, ptr noundef nonnull align 8 dereferenceable(72) %156, ptr noundef nonnull align 8 dereferenceable(32) %11)
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  %159 = zext i1 %158 to i64
  %160 = select i1 %158, i32 -1, i32 1
  %161 = sitofp i32 %160 to double
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind writable sret(%"class.cyclone::Vector3") align 8 %21, ptr noundef nonnull align 8 dereferenceable(32) %22, double noundef %161)
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = load i32, ptr %16, align 4, !tbaa !9
  %164 = zext i32 %163 to i64
  %165 = getelementptr inbounds %"class.cyclone::Contact", ptr %162, i64 %164
  %166 = getelementptr inbounds %"class.cyclone::Contact", ptr %165, i32 0, i32 7
  call void @_ZN7cyclone7Vector3pLERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %166, ptr noundef nonnull align 8 dereferenceable(32) %21)
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #4
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = load i32, ptr %16, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds %"class.cyclone::Contact", ptr %167, i64 %169
  %171 = load double, ptr %8, align 8, !tbaa !11
  call void @_ZN7cyclone7Contact29calculateDesiredDeltaVelocityEd(ptr noundef nonnull align 8 dereferenceable(280) %170, double noundef %171)
  br label %172

172:                                              ; preds = %137, %117
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %18, align 4, !tbaa !9
  %175 = add i32 %174, 1
  store i32 %175, ptr %18, align 4, !tbaa !9
  br label %113, !llvm.loop !25

176:                                              ; preds = %116
  br label %177

177:                                              ; preds = %176, %101
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %17, align 4, !tbaa !9
  %180 = add i32 %179, 1
  store i32 %180, ptr %17, align 4, !tbaa !9
  br label %97, !llvm.loop !26

181:                                              ; preds = %100
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %16, align 4, !tbaa !9
  %184 = add i32 %183, 1
  store i32 %184, ptr %16, align 4, !tbaa !9
  br label %91, !llvm.loop !27

185:                                              ; preds = %95
  %186 = getelementptr inbounds %"class.cyclone::ContactResolver", ptr %23, i32 0, i32 4
  %187 = load i32, ptr %186, align 8, !tbaa !13
  %188 = add i32 %187, 1
  store i32 %188, ptr %186, align 8, !tbaa !13
  store i32 0, ptr %15, align 4
  br label %189

189:                                              ; preds = %185, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %190 = load i32, ptr %15, align 4
  switch i32 %190, label %193 [
    i32 0, label %191
    i32 3, label %192
  ]

191:                                              ; preds = %189
  br label %39, !llvm.loop !28

192:                                              ; preds = %189, %39
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #4
  ret void

193:                                              ; preds = %189
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #0 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"_ZTSN7cyclone15ContactResolverE", !10, i64 0, !10, i64 4, !12, i64 8, !12, i64 16, !10, i64 24, !10, i64 28, !15, i64 32}
!15 = !{!"bool", !7, i64 0}
!16 = !{!14, !10, i64 0}
!17 = !{!14, !12, i64 8}
!18 = !{!19, !12, i64 208}
!19 = !{!"_ZTSN7cyclone7ContactE", !7, i64 0, !12, i64 16, !12, i64 24, !20, i64 32, !20, i64 64, !12, i64 96, !21, i64 104, !20, i64 176, !12, i64 208, !7, i64 216}
!20 = !{!"_ZTSN7cyclone7Vector3E", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!21 = !{!"_ZTSN7cyclone7Matrix3E", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{i64 0, i64 8, !11, i64 8, i64 8, !11, i64 16, i64 8, !11, i64 24, i64 8, !11}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !23}


; 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.cyclone::Vector3" = type { double, double, double, double }
%"class.cyclone::Contact" = type { [2 x ptr], double, double, %"class.cyclone::Vector3", %"class.cyclone::Vector3", double, %"class.cyclone::Matrix3", %"class.cyclone::Vector3", double, [2 x %"class.cyclone::Vector3"] }
%"class.cyclone::Matrix3" = type { [9 x double] }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone7Contact15matchAwakeStateEv(ptr noundef nonnull align 8 dereferenceable(280)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7cyclone7Vector3pLERKS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Matrix318transformTransposeERKNS_7Vector3E(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(32), double noundef) local_unnamed_addr #0 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) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone7Contact29calculateDesiredDeltaVelocityEd(ptr noundef nonnull align 8 dereferenceable(280), double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7cyclone7Contact19applyVelocityChangeEPNS_7Vector3ES2_(ptr noundef nonnull align 8 dereferenceable(280), ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Vector313vectorProductERKS0_(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7cyclone15ContactResolver16adjustVelocitiesEPNS_7ContactEjd(ptr nocapture noundef nonnull align 8 dereferenceable(33) %0, ptr noundef %1, i32 noundef %2, double noundef %3) local_unnamed_addr #0 align 2 {
  %5 = alloca [2 x %"class.cyclone::Vector3"], align 16
  %6 = alloca [2 x %"class.cyclone::Vector3"], align 16
  %7 = alloca %"class.cyclone::Vector3", align 8
  %8 = alloca %"class.cyclone::Vector3", align 8
  %9 = alloca %"class.cyclone::Vector3", align 8
  %10 = alloca %"class.cyclone::Vector3", align 8
  %11 = alloca %"class.cyclone::Vector3", align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #4
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %.ptr.1 = getelementptr inbounds i8, ptr %5, i64 32
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr.1)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #4
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %.ptr58.1 = getelementptr inbounds i8, ptr %6, i64 32
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %.ptr58.1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @_ZN7cyclone7Vector3C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7)
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %12, align 8, !tbaa !5
  %13 = load i32, ptr %0, align 8, !tbaa !12
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %.thread, label %.lr.ph72

.lr.ph72:                                         ; preds = %4
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %.not83 = icmp eq i32 %2, 0
  br i1 %.not83, label %.thread, label %.lr.ph72.split.us.preheader

.lr.ph72.split.us.preheader:                      ; preds = %.lr.ph72
  %wide.trip.count = zext i32 %2 to i64
  %wide.trip.count95 = zext i32 %2 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %15 = icmp eq i32 %2, 1
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %._crit_edge70.us, %.lr.ph72.split.us.preheader
  %16 = load double, ptr %14, align 8, !tbaa !13
  br i1 %15, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us

._crit_edge.us.unr-lcssa:                         ; preds = %.lr.ph.us, %.lr.ph.us.preheader
  %.1.us.lcssa.ph = phi i32 [ poison, %.lr.ph.us.preheader ], [ %.1.us.1, %.lr.ph.us ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next.1, %.lr.ph.us ]
  %.05065.us.unr = phi i32 [ %2, %.lr.ph.us.preheader ], [ %.1.us.1, %.lr.ph.us ]
  %.05164.us.unr = phi double [ %16, %.lr.ph.us.preheader ], [ %.152.us.1, %.lr.ph.us ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.lr.ph.us.epil

.lr.ph.us.epil:                                   ; preds = %._crit_edge.us.unr-lcssa
  %17 = getelementptr inbounds %"class.cyclone::Contact", ptr %1, i64 %indvars.iv.unr, i32 8
  %18 = load double, ptr %17, align 8, !tbaa !14
  %19 = fcmp ogt double %18, %.05164.us.unr
  %20 = trunc nuw i64 %indvars.iv.unr to i32
  %.1.us.epil = select i1 %19, i32 %20, i32 %.05065.us.unr
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %.lr.ph.us.epil
  %.1.us.lcssa = phi i32 [ %.1.us.lcssa.ph, %._crit_edge.us.unr-lcssa ], [ %.1.us.epil, %.lr.ph.us.epil ]
  %21 = icmp eq i32 %.1.us.lcssa, %2
  br i1 %21, label %.thread, label %.preheader63.lr.ph.us

.preheader63.lr.ph.us:                            ; preds = %._crit_edge.us
  %22 = zext i32 %.1.us.lcssa to i64
  %23 = getelementptr inbounds %"class.cyclone::Contact", ptr %1, i64 %22
  call void @_ZN7cyclone7Contact15matchAwakeStateEv(ptr noundef nonnull align 8 dereferenceable(280) %23)
  call void @_ZN7cyclone7Contact19applyVelocityChangeEPNS_7Vector3ES2_(ptr noundef nonnull align 8 dereferenceable(280) %23, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  br label %.preheader63.us

26:                                               ; preds = %.preheader.us
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @_ZNK7cyclone7Vector313vectorProductERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %54)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @_ZNK7cyclone7Matrix318transformTransposeERKNS_7Vector3E(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %11, ptr noundef nonnull align 8 dereferenceable(72) %55, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, double noundef 1.000000e+00)
  call void @_ZN7cyclone7Vector3pLERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef nonnull align 8 dereferenceable(32) %10)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @_ZN7cyclone7Contact29calculateDesiredDeltaVelocityEd(ptr noundef nonnull align 8 dereferenceable(280) %53, double noundef %3)
  %.pre = load ptr, ptr %53, align 8, !tbaa !20
  br label %27

27:                                               ; preds = %26, %.preheader.us
  %28 = phi ptr [ %.pre, %26 ], [ %57, %.preheader.us ]
  %29 = load ptr, ptr %24, align 8, !tbaa !20
  %30 = icmp eq ptr %28, %29
  br i1 %30, label %31, label %.loopexit.us

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @_ZNK7cyclone7Vector313vectorProductERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %.ptr58.1, ptr noundef nonnull align 8 dereferenceable(32) %54)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @_ZNK7cyclone7Matrix318transformTransposeERKNS_7Vector3E(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %11, ptr noundef nonnull align 8 dereferenceable(72) %55, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, double noundef 1.000000e+00)
  call void @_ZN7cyclone7Vector3pLERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef nonnull align 8 dereferenceable(32) %10)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @_ZN7cyclone7Contact29calculateDesiredDeltaVelocityEd(ptr noundef nonnull align 8 dereferenceable(280) %53, double noundef %3)
  br label %.loopexit.us

.loopexit.us:                                     ; preds = %27, %31, %.preheader63.us
  %32 = getelementptr inbounds i8, ptr %53, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !20
  %.not.us.1 = icmp eq ptr %33, null
  br i1 %.not.us.1, label %.loopexit.us.1, label %.preheader.us.1

.preheader.us.1:                                  ; preds = %.loopexit.us
  %34 = getelementptr inbounds i8, ptr %53, i64 248
  %35 = load ptr, ptr %23, align 8, !tbaa !20
  %36 = icmp eq ptr %33, %35
  br i1 %36, label %37, label %38

37:                                               ; preds = %.preheader.us.1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @_ZNK7cyclone7Vector313vectorProductERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %34)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @_ZNK7cyclone7Matrix318transformTransposeERKNS_7Vector3E(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %11, ptr noundef nonnull align 8 dereferenceable(72) %55, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, double noundef -1.000000e+00)
  call void @_ZN7cyclone7Vector3pLERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef nonnull align 8 dereferenceable(32) %10)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @_ZN7cyclone7Contact29calculateDesiredDeltaVelocityEd(ptr noundef nonnull align 8 dereferenceable(280) %53, double noundef %3)
  %.pre97 = load ptr, ptr %32, align 8, !tbaa !20
  br label %38

38:                                               ; preds = %37, %.preheader.us.1
  %39 = phi ptr [ %.pre97, %37 ], [ %33, %.preheader.us.1 ]
  %40 = load ptr, ptr %25, align 8, !tbaa !20
  %41 = icmp eq ptr %39, %40
  br i1 %41, label %42, label %.loopexit.us.1

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @_ZNK7cyclone7Vector313vectorProductERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %.ptr58.1, ptr noundef nonnull align 8 dereferenceable(32) %34)
  call void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(32) %9)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  call void @_ZNK7cyclone7Matrix318transformTransposeERKNS_7Vector3E(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %11, ptr noundef nonnull align 8 dereferenceable(72) %55, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @_ZNK7cyclone7Vector3mlEd(ptr dead_on_unwind nonnull writable sret(%"class.cyclone::Vector3") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, double noundef -1.000000e+00)
  call void @_ZN7cyclone7Vector3pLERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef nonnull align 8 dereferenceable(32) %10)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  call void @_ZN7cyclone7Contact29calculateDesiredDeltaVelocityEd(ptr noundef nonnull align 8 dereferenceable(280) %53, double noundef %3)
  br label %.loopexit.us.1

.loopexit.us.1:                                   ; preds = %38, %42, %.loopexit.us
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count95
  br i1 %exitcond96.not, label %._crit_edge70.us, label %.preheader63.us, !llvm.loop !22

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %.lr.ph.us
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph.us ], [ 0, %.lr.ph.us.preheader ]
  %.05065.us = phi i32 [ %.1.us.1, %.lr.ph.us ], [ %2, %.lr.ph.us.preheader ]
  %.05164.us = phi double [ %.152.us.1, %.lr.ph.us ], [ %16, %.lr.ph.us.preheader ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph.us ], [ 0, %.lr.ph.us.preheader ]
  %43 = getelementptr inbounds %"class.cyclone::Contact", ptr %1, i64 %indvars.iv, i32 8
  %44 = load double, ptr %43, align 8, !tbaa !14
  %45 = fcmp ogt double %44, %.05164.us
  %.152.us = select i1 %45, double %44, double %.05164.us
  %46 = trunc nuw i64 %indvars.iv to i32
  %.1.us = select i1 %45, i32 %46, i32 %.05065.us
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %47 = getelementptr inbounds %"class.cyclone::Contact", ptr %1, i64 %indvars.iv.next, i32 8
  %48 = load double, ptr %47, align 8, !tbaa !14
  %49 = fcmp ogt double %48, %.152.us
  %.152.us.1 = select i1 %49, double %48, double %.152.us
  %50 = trunc nuw i64 %indvars.iv.next to i32
  %.1.us.1 = select i1 %49, i32 %50, i32 %.1.us
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us, !llvm.loop !24

.preheader.us:                                    ; preds = %.preheader63.us
  %51 = load ptr, ptr %23, align 8, !tbaa !20
  %52 = icmp eq ptr %57, %51
  br i1 %52, label %26, label %27

.preheader63.us:                                  ; preds = %.preheader63.lr.ph.us, %.loopexit.us.1
  %indvars.iv92 = phi i64 [ 0, %.preheader63.lr.ph.us ], [ %indvars.iv.next93, %.loopexit.us.1 ]
  %53 = getelementptr inbounds %"class.cyclone::Contact", ptr %1, i64 %indvars.iv92
  %54 = getelementptr inbounds i8, ptr %53, i64 216
  %55 = getelementptr inbounds i8, ptr %53, i64 104
  %56 = getelementptr inbounds i8, ptr %53, i64 176
  %57 = load ptr, ptr %53, align 8, !tbaa !20
  %.not.us = icmp eq ptr %57, null
  br i1 %.not.us, label %.loopexit.us, label %.preheader.us

._crit_edge70.us:                                 ; preds = %.loopexit.us.1
  %58 = load i32, ptr %12, align 8, !tbaa !5
  %59 = add i32 %58, 1
  store i32 %59, ptr %12, align 8, !tbaa !5
  %60 = load i32, ptr %0, align 8, !tbaa !12
  %61 = icmp ult i32 %59, %60
  br i1 %61, label %.lr.ph.us.preheader, label %.thread

.thread:                                          ; preds = %._crit_edge70.us, %._crit_edge.us, %.lr.ph72, %4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7cyclone7Vector3plERKS0_(ptr dead_on_unwind noalias writable sret(%"class.cyclone::Vector3") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 24}
!6 = !{!"_ZTSN7cyclone15ContactResolverE", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !11, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !10, i64 8}
!14 = !{!15, !10, i64 208}
!15 = !{!"_ZTSN7cyclone7ContactE", !8, i64 0, !10, i64 16, !10, i64 24, !16, i64 32, !16, i64 64, !10, i64 96, !17, i64 104, !16, i64 176, !10, i64 208, !8, i64 216}
!16 = !{!"_ZTSN7cyclone7Vector3E", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!17 = !{!"_ZTSN7cyclone7Matrix3E", !8, i64 0}
!18 = !{i64 0, i64 8, !19, i64 8, i64 8, !19, i64 16, i64 8, !19, i64 24, i64 8, !19}
!19 = !{!10, !10, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"any pointer", !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


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