; LLVM IR from Simple-XX/SimplePhysicsEngine :: test/system_test/demo_old/RigidBodySimulation/cpair.ll (ZN4clib5cpair8pre_stepEd)

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

%"struct.clib::vec2" = type { double, double }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.clib::cpair" = type { %"class.std::weak_ptr", %"class.std::weak_ptr", %"struct.clib::vec2", %"class.std::vector.2" }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl" }
%"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl" = type { %"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl_data" }
%"struct.std::_Vector_base<clib::ccontact, std::allocator<clib::ccontact>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.clib::ccontact" = type { %"struct.clib::vec2", %"struct.clib::vec2", %"struct.clib::vec2", %"struct.std::array", %"struct.std::array.0", double, double, double, double, double, double }
%"struct.std::array" = type { [2 x i8] }
%"struct.std::array.0" = type { [2 x i64] }

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4clib5cpair8pre_stepEd(ptr noundef nonnull align 8 dereferenceable(72) %0, double noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca %"struct.clib::vec2", align 8
  %6 = alloca %"class.std::shared_ptr", align 8
  %7 = alloca %"class.std::shared_ptr", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.clib::vec2", align 8
  %16 = alloca %"struct.clib::vec2", align 8
  %17 = alloca %"struct.clib::vec2", align 8
  %18 = alloca %"struct.clib::vec2", align 8
  %19 = alloca %"struct.clib::vec2", align 8
  %20 = alloca double, align 8
  %21 = alloca %"struct.clib::vec2", align 8
  %22 = alloca %"struct.clib::vec2", align 8
  %23 = alloca %"struct.clib::vec2", align 8
  %24 = alloca %"struct.clib::vec2", align 8
  %25 = alloca %"struct.clib::vec2", align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %28 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #5
  %29 = getelementptr inbounds %"class.clib::cpair", ptr %28, i32 0, i32 2
  %30 = call { double, double } @_ZNK4clib4vec26normalEv(ptr noundef nonnull align 8 dereferenceable(16) %29)
  %31 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 0
  %32 = extractvalue { double, double } %30, 0
  store double %32, ptr %31, align 8
  %33 = getelementptr inbounds { double, double }, ptr %5, i32 0, i32 1
  %34 = extractvalue { double, double } %30, 1
  store double %34, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  %35 = getelementptr inbounds %"class.clib::cpair", ptr %28, i32 0, i32 0
  call void @_ZNKSt8weak_ptrIN4clib5cbodyEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %35) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  %36 = getelementptr inbounds %"class.clib::cpair", ptr %28, i32 0, i32 1
  call void @_ZNKSt8weak_ptrIN4clib5cbodyEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %36) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %37 = getelementptr inbounds %"class.clib::cpair", ptr %28, i32 0, i32 3
  store ptr %37, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = call ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %39, ptr %40, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = call ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #5
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  br label %44

44:                                               ; preds = %188, %2
  %45 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br i1 %45, label %47, label %46

46:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %242

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %48 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  store ptr %48, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %49 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %50 = invoke noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168) %49)
          to label %51 unwind label %190

51:                                               ; preds = %47
  %52 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  %53 = invoke noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168) %52)
          to label %54 unwind label %190

54:                                               ; preds = %51
  %55 = fadd double %50, %53
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %56 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %57 = invoke noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168) %56)
          to label %58 unwind label %194

58:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.clib::ccontact", ptr %59, i32 0, i32 1
  %61 = getelementptr inbounds %"class.clib::cpair", ptr %28, i32 0, i32 2
  %62 = invoke noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %60, ptr noundef nonnull align 8 dereferenceable(16) %61)
          to label %63 unwind label %198

63:                                               ; preds = %58
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.clib::ccontact", ptr %64, i32 0, i32 1
  %66 = invoke { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef %62, ptr noundef nonnull align 8 dereferenceable(16) %65)
          to label %67 unwind label %198

67:                                               ; preds = %63
  %68 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %69 = extractvalue { double, double } %66, 0
  store double %69, ptr %68, align 8
  %70 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %71 = extractvalue { double, double } %66, 1
  store double %71, ptr %70, align 8
  %72 = invoke { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef %57, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %73 unwind label %198

73:                                               ; preds = %67
  %74 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %75 = extractvalue { double, double } %72, 0
  store double %75, ptr %74, align 8
  %76 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %77 = extractvalue { double, double } %72, 1
  store double %77, ptr %76, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %78 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  %79 = invoke noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168) %78)
          to label %80 unwind label %202

80:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.clib::ccontact", ptr %81, i32 0, i32 2
  %83 = getelementptr inbounds %"class.clib::cpair", ptr %28, i32 0, i32 2
  %84 = invoke noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %82, ptr noundef nonnull align 8 dereferenceable(16) %83)
          to label %85 unwind label %206

85:                                               ; preds = %80
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.clib::ccontact", ptr %86, i32 0, i32 2
  %88 = invoke { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef %84, ptr noundef nonnull align 8 dereferenceable(16) %87)
          to label %89 unwind label %206

89:                                               ; preds = %85
  %90 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %91 = extractvalue { double, double } %88, 0
  store double %91, ptr %90, align 8
  %92 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %93 = extractvalue { double, double } %88, 1
  store double %93, ptr %92, align 8
  %94 = invoke { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef %79, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %95 unwind label %206

95:                                               ; preds = %89
  %96 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %97 = extractvalue { double, double } %94, 0
  store double %97, ptr %96, align 8
  %98 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %99 = extractvalue { double, double } %94, 1
  store double %99, ptr %98, align 8
  %100 = invoke { double, double } @_ZN4clibplERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %101 unwind label %206

101:                                              ; preds = %95
  %102 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %103 = extractvalue { double, double } %100, 0
  store double %103, ptr %102, align 8
  %104 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %105 = extractvalue { double, double } %100, 1
  store double %105, ptr %104, align 8
  %106 = getelementptr inbounds %"class.clib::cpair", ptr %28, i32 0, i32 2
  %107 = invoke noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %106)
          to label %108 unwind label %206

108:                                              ; preds = %101
  %109 = fadd double %55, %107
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  store double %109, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %110 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %111 = invoke noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168) %110)
          to label %112 unwind label %213

112:                                              ; preds = %108
  %113 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  %114 = invoke noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168) %113)
          to label %115 unwind label %213

115:                                              ; preds = %112
  %116 = fadd double %111, %114
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %117 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %118 = invoke noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168) %117)
          to label %119 unwind label %217

119:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.clib::ccontact", ptr %120, i32 0, i32 1
  %122 = invoke noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %121, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %123 unwind label %221

123:                                              ; preds = %119
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.clib::ccontact", ptr %124, i32 0, i32 1
  %126 = invoke { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef %122, ptr noundef nonnull align 8 dereferenceable(16) %125)
          to label %127 unwind label %221

127:                                              ; preds = %123
  %128 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %129 = extractvalue { double, double } %126, 0
  store double %129, ptr %128, align 8
  %130 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %131 = extractvalue { double, double } %126, 1
  store double %131, ptr %130, align 8
  %132 = invoke { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef %118, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %133 unwind label %221

133:                                              ; preds = %127
  %134 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %135 = extractvalue { double, double } %132, 0
  store double %135, ptr %134, align 8
  %136 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %137 = extractvalue { double, double } %132, 1
  store double %137, ptr %136, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  %138 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  %139 = invoke noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168) %138)
          to label %140 unwind label %225

140:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.clib::ccontact", ptr %141, i32 0, i32 2
  %143 = invoke noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %142, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %144 unwind label %229

144:                                              ; preds = %140
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.clib::ccontact", ptr %145, i32 0, i32 2
  %147 = invoke { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef %143, ptr noundef nonnull align 8 dereferenceable(16) %146)
          to label %148 unwind label %229

148:                                              ; preds = %144
  %149 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %150 = extractvalue { double, double } %147, 0
  store double %150, ptr %149, align 8
  %151 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %152 = extractvalue { double, double } %147, 1
  store double %152, ptr %151, align 8
  %153 = invoke { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef %139, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %154 unwind label %229

154:                                              ; preds = %148
  %155 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %156 = extractvalue { double, double } %153, 0
  store double %156, ptr %155, align 8
  %157 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %158 = extractvalue { double, double } %153, 1
  store double %158, ptr %157, align 8
  %159 = invoke { double, double } @_ZN4clibplERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %160 unwind label %229

160:                                              ; preds = %154
  %161 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %162 = extractvalue { double, double } %159, 0
  store double %162, ptr %161, align 8
  %163 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %164 = extractvalue { double, double } %159, 1
  store double %164, ptr %163, align 8
  %165 = invoke noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %166 unwind label %229

166:                                              ; preds = %160
  %167 = fadd double %116, %165
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  store double %167, ptr %20, align 8, !tbaa !9
  %168 = load double, ptr %12, align 8, !tbaa !9
  %169 = fdiv double 1.000000e+00, %168
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = getelementptr inbounds %"struct.clib::ccontact", ptr %170, i32 0, i32 9
  store double %169, ptr %171, align 8, !tbaa !11
  %172 = load double, ptr %20, align 8, !tbaa !9
  %173 = fdiv double 1.000000e+00, %172
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.clib::ccontact", ptr %174, i32 0, i32 10
  store double %173, ptr %175, align 8, !tbaa !16
  %176 = load double, ptr %4, align 8, !tbaa !9
  %177 = fdiv double -2.000000e-01, %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  store double 0.000000e+00, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.clib::ccontact", ptr %178, i32 0, i32 5
  %180 = load double, ptr %179, align 8, !tbaa !17
  %181 = fadd double %180, 1.000000e-02
  store double %181, ptr %27, align 8, !tbaa !9
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %183 unwind label %236

183:                                              ; preds = %166
  %184 = load double, ptr %182, align 8, !tbaa !9
  %185 = fmul double %177, %184
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  %187 = getelementptr inbounds %"struct.clib::ccontact", ptr %186, i32 0, i32 8
  store double %185, ptr %187, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %188

188:                                              ; preds = %183
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %44

190:                                              ; preds = %51, %47
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %13, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %14, align 4
  br label %241

194:                                              ; preds = %54
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %13, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %14, align 4
  br label %212

198:                                              ; preds = %67, %63, %58
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %13, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %14, align 4
  br label %211

202:                                              ; preds = %73
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %13, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %14, align 4
  br label %210

206:                                              ; preds = %101, %95, %89, %85, %80
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %13, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %210

210:                                              ; preds = %206, %202
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %211

211:                                              ; preds = %210, %198
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %212

212:                                              ; preds = %211, %194
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %241

213:                                              ; preds = %112, %108
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %13, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %14, align 4
  br label %240

217:                                              ; preds = %115
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %13, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %14, align 4
  br label %235

221:                                              ; preds = %127, %123, %119
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %13, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %14, align 4
  br label %234

225:                                              ; preds = %133
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %13, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %14, align 4
  br label %233

229:                                              ; preds = %160, %154, %148, %144, %140
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %13, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br label %233

233:                                              ; preds = %229, %225
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  br label %234

234:                                              ; preds = %233, %221
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %235

235:                                              ; preds = %234, %217
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %240

236:                                              ; preds = %166
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %13, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %240

240:                                              ; preds = %236, %235, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %241

241:                                              ; preds = %240, %212, %190
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #5
  br label %243

242:                                              ; preds = %46
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #5
  ret void

243:                                              ; preds = %241
  %244 = load ptr, ptr %13, align 8
  %245 = load i32, ptr %14, align 4
  %246 = insertvalue { ptr, i32 } poison, ptr %244, 0
  %247 = insertvalue { ptr, i32 } %246, i32 %245, 1
  resume { ptr, i32 } %247
}

declare { double, double } @_ZNK4clib4vec26normalEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrIN4clib5cbodyEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

declare noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168)) #2

declare noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2

declare { double, double } @_ZN4clibplERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2

declare { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef, ptr noundef nonnull align 8 dereferenceable(16)) #2

declare noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168)) #2

declare { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef, ptr noundef nonnull align 8 dereferenceable(16)) #2

declare noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 104}
!12 = !{!"_ZTSN4clib8ccontactE", !13, i64 0, !13, i64 16, !13, i64 32, !14, i64 48, !15, i64 56, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112}
!13 = !{!"_ZTSN4clib4vec2E", !10, i64 0, !10, i64 8}
!14 = !{!"_ZTSSt5arrayIbLm2EE", !7, i64 0}
!15 = !{!"_ZTSSt5arrayImLm2EE", !7, i64 0}
!16 = !{!12, !10, i64 112}
!17 = !{!12, !10, i64 72}
!18 = !{!12, !10, i64 96}


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

%"struct.clib::vec2" = type { double, double }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4clib5cpair8pre_stepEd(ptr noundef nonnull align 8 dereferenceable(72) %0, double noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.clib::vec2", align 8
  %4 = alloca %"class.std::shared_ptr", align 8
  %5 = alloca %"class.std::shared_ptr", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"struct.clib::vec2", align 8
  %9 = alloca %"struct.clib::vec2", align 8
  %10 = alloca %"struct.clib::vec2", align 8
  %11 = alloca %"struct.clib::vec2", align 8
  %12 = alloca %"struct.clib::vec2", align 8
  %13 = alloca %"struct.clib::vec2", align 8
  %14 = alloca %"struct.clib::vec2", align 8
  %15 = alloca %"struct.clib::vec2", align 8
  %16 = alloca %"struct.clib::vec2", align 8
  %17 = alloca %"struct.clib::vec2", align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  %21 = tail call { double, double } @_ZNK4clib4vec26normalEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
  %22 = extractvalue { double, double } %21, 0
  store double %22, ptr %3, align 8
  %23 = getelementptr inbounds i8, ptr %3, i64 8
  %24 = extractvalue { double, double } %21, 1
  store double %24, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  call void @_ZNKSt8weak_ptrIN4clib5cbodyEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %0) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  call void @_ZNKSt8weak_ptrIN4clib5cbodyEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %25) #5
  %26 = getelementptr inbounds i8, ptr %0, i64 48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %27 = call ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  store ptr %27, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %28 = call ptr @_ZNSt6vectorIN4clib8ccontactESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  store ptr %28, ptr %7, align 8
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %29, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %30 = getelementptr inbounds i8, ptr %10, i64 8
  %31 = getelementptr inbounds i8, ptr %9, i64 8
  %32 = getelementptr inbounds i8, ptr %12, i64 8
  %33 = getelementptr inbounds i8, ptr %11, i64 8
  %34 = getelementptr inbounds i8, ptr %8, i64 8
  %35 = getelementptr inbounds i8, ptr %15, i64 8
  %36 = getelementptr inbounds i8, ptr %14, i64 8
  %37 = getelementptr inbounds i8, ptr %17, i64 8
  %38 = getelementptr inbounds i8, ptr %16, i64 8
  %39 = getelementptr inbounds i8, ptr %13, i64 8
  %40 = fdiv double -2.000000e-01, %1
  br label %41

._crit_edge:                                      ; preds = %123, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  ret void

41:                                               ; preds = %.lr.ph, %123
  %42 = call noundef nonnull align 8 dereferenceable(120) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %43 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  %44 = invoke noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168) %43)
          to label %45 unwind label %138

45:                                               ; preds = %41
  %46 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  %47 = invoke noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168) %46)
          to label %48 unwind label %138

48:                                               ; preds = %45
  %49 = fadd double %44, %47
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %50 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  %51 = invoke noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168) %50)
          to label %52 unwind label %140

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %53 = getelementptr inbounds i8, ptr %42, i64 16
  %54 = invoke noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %55 unwind label %142

55:                                               ; preds = %52
  %56 = invoke { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef %54, ptr noundef nonnull align 8 dereferenceable(16) %53)
          to label %57 unwind label %142

57:                                               ; preds = %55
  %58 = extractvalue { double, double } %56, 0
  store double %58, ptr %10, align 8
  %59 = extractvalue { double, double } %56, 1
  store double %59, ptr %30, align 8
  %60 = invoke { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef %51, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %61 unwind label %142

61:                                               ; preds = %57
  %62 = extractvalue { double, double } %60, 0
  store double %62, ptr %9, align 8
  %63 = extractvalue { double, double } %60, 1
  store double %63, ptr %31, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %64 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  %65 = invoke noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168) %64)
          to label %66 unwind label %144

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  %67 = getelementptr inbounds i8, ptr %42, i64 32
  %68 = invoke noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %69 unwind label %146

69:                                               ; preds = %66
  %70 = invoke { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef %68, ptr noundef nonnull align 8 dereferenceable(16) %67)
          to label %71 unwind label %146

71:                                               ; preds = %69
  %72 = extractvalue { double, double } %70, 0
  store double %72, ptr %12, align 8
  %73 = extractvalue { double, double } %70, 1
  store double %73, ptr %32, align 8
  %74 = invoke { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef %65, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %75 unwind label %146

75:                                               ; preds = %71
  %76 = extractvalue { double, double } %74, 0
  store double %76, ptr %11, align 8
  %77 = extractvalue { double, double } %74, 1
  store double %77, ptr %33, align 8
  %78 = invoke { double, double } @_ZN4clibplERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %79 unwind label %146

79:                                               ; preds = %75
  %80 = extractvalue { double, double } %78, 0
  store double %80, ptr %8, align 8
  %81 = extractvalue { double, double } %78, 1
  store double %81, ptr %34, align 8
  %82 = invoke noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %83 unwind label %146

83:                                               ; preds = %79
  %84 = fadd double %49, %82
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  %85 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  %86 = invoke noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168) %85)
          to label %87 unwind label %151

87:                                               ; preds = %83
  %88 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  %89 = invoke noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168) %88)
          to label %90 unwind label %151

90:                                               ; preds = %87
  %91 = fadd double %86, %89
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  %92 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  %93 = invoke noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168) %92)
          to label %94 unwind label %153

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  %95 = invoke noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %96 unwind label %155

96:                                               ; preds = %94
  %97 = invoke { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef %95, ptr noundef nonnull align 8 dereferenceable(16) %53)
          to label %98 unwind label %155

98:                                               ; preds = %96
  %99 = extractvalue { double, double } %97, 0
  store double %99, ptr %15, align 8
  %100 = extractvalue { double, double } %97, 1
  store double %100, ptr %35, align 8
  %101 = invoke { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef %93, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %102 unwind label %155

102:                                              ; preds = %98
  %103 = extractvalue { double, double } %101, 0
  store double %103, ptr %14, align 8
  %104 = extractvalue { double, double } %101, 1
  store double %104, ptr %36, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #5
  %105 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  %106 = invoke noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168) %105)
          to label %107 unwind label %157

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #5
  %108 = invoke noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %109 unwind label %159

109:                                              ; preds = %107
  %110 = invoke { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef %108, ptr noundef nonnull align 8 dereferenceable(16) %67)
          to label %111 unwind label %159

111:                                              ; preds = %109
  %112 = extractvalue { double, double } %110, 0
  store double %112, ptr %17, align 8
  %113 = extractvalue { double, double } %110, 1
  store double %113, ptr %37, align 8
  %114 = invoke { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef %106, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %115 unwind label %159

115:                                              ; preds = %111
  %116 = extractvalue { double, double } %114, 0
  store double %116, ptr %16, align 8
  %117 = extractvalue { double, double } %114, 1
  store double %117, ptr %38, align 8
  %118 = invoke { double, double } @_ZN4clibplERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %119 unwind label %159

119:                                              ; preds = %115
  %120 = extractvalue { double, double } %118, 0
  store double %120, ptr %13, align 8
  %121 = extractvalue { double, double } %118, 1
  store double %121, ptr %39, align 8
  %122 = invoke noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %123 unwind label %159

123:                                              ; preds = %119
  %124 = fadd double %91, %122
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  %125 = getelementptr inbounds i8, ptr %42, i64 104
  %126 = insertelement <2 x double> poison, double %84, i64 0
  %127 = insertelement <2 x double> %126, double %124, i64 1
  %128 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %127
  store <2 x double> %128, ptr %125, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #5
  store double 0.000000e+00, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #5
  %129 = getelementptr inbounds i8, ptr %42, i64 72
  %130 = load double, ptr %129, align 8, !tbaa !9
  %131 = fadd double %130, 1.000000e-02
  store double %131, ptr %19, align 8, !tbaa !5
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %133 = load double, ptr %132, align 8, !tbaa !5
  %134 = fmul double %40, %133
  %135 = getelementptr inbounds i8, ptr %42, i64 96
  store double %134, ptr %135, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #5
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %137 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %137, label %41, label %._crit_edge

138:                                              ; preds = %45, %41
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %164

140:                                              ; preds = %48
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %150

142:                                              ; preds = %57, %55, %52
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %149

144:                                              ; preds = %61
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %148

146:                                              ; preds = %79, %75, %71, %69, %66
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %148

148:                                              ; preds = %146, %144
  %.pn = phi { ptr, i32 } [ %147, %146 ], [ %145, %144 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %149

149:                                              ; preds = %148, %142
  %.pn.pn = phi { ptr, i32 } [ %.pn, %148 ], [ %143, %142 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %150

150:                                              ; preds = %149, %140
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %149 ], [ %141, %140 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %164

151:                                              ; preds = %87, %83
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %164

153:                                              ; preds = %90
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %163

155:                                              ; preds = %98, %96, %94
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %162

157:                                              ; preds = %102
  %158 = landingpad { ptr, i32 }
          cleanup
  br label %161

159:                                              ; preds = %119, %115, %111, %109, %107
  %160 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #5
  br label %161

161:                                              ; preds = %159, %157
  %.pn30 = phi { ptr, i32 } [ %160, %159 ], [ %158, %157 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #5
  br label %162

162:                                              ; preds = %161, %155
  %.pn30.pn = phi { ptr, i32 } [ %.pn30, %161 ], [ %156, %155 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  br label %163

163:                                              ; preds = %162, %153
  %.pn30.pn.pn = phi { ptr, i32 } [ %.pn30.pn, %162 ], [ %154, %153 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %164

164:                                              ; preds = %151, %163, %150, %138
  %.pn30.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %150 ], [ %139, %138 ], [ %.pn30.pn.pn, %163 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @_ZNSt12__shared_ptrIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn30.pn.pn.pn.pn
}

declare { double, double } @_ZNK4clib4vec26normalEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrIN4clib5cbodyEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(120) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN4clib8ccontactESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN4clib5cbodyELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

declare noundef double @_ZNK4clib5cbody12get_inv_massEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2

declare noundef double @_ZN4clib3dotERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare { double, double } @_ZN4clibplERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare { double, double } @_ZN4clibmlEdRKNS_4vec2E(double noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare noundef double @_ZNK4clib5cbody15get_inv_inertiaEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2

declare { double, double } @_ZN4clib5crossEdRKNS_4vec2E(double noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

declare noundef double @_ZN4clib5crossERKNS_4vec2ES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 72}
!10 = !{!"_ZTSN4clib8ccontactE", !11, i64 0, !11, i64 16, !11, i64 32, !12, i64 48, !13, i64 56, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112}
!11 = !{!"_ZTSN4clib4vec2E", !6, i64 0, !6, i64 8}
!12 = !{!"_ZTSSt5arrayIbLm2EE", !7, i64 0}
!13 = !{!"_ZTSSt5arrayImLm2EE", !7, i64 0}
!14 = !{!10, !6, i64 96}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass