; LLVM IR from sagar0710/particle-simul :: physics.ll (Z9collisionRSt6vectorI8Sim_BodySaIS0_EERK6config)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%class.Sim_Body = type { ptr, i32, %"class.std::vector.0", float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, i8, i8, i32, i32 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<float, float>, std::allocator<std::pair<float, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<float, float>, std::allocator<std::pair<float, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<float, float>, std::allocator<std::pair<float, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<float, float>, std::allocator<std::pair<float, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9collisionRSt6vectorI8Sim_BodySaIS0_EERK6config(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(20) %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca ptr, align 8
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %27, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  %30 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %29, ptr %30, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  br label %34

34:                                               ; preds = %409, %2
  %35 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8Sim_BodySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %35, label %37, label %36

36:                                               ; preds = %34
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %411

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %38 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  store ptr %38, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %class.Sim_Body, ptr %39, i32 0, i32 29
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = icmp eq i32 %41, 2
  br i1 %42, label %43, label %44

43:                                               ; preds = %37
  store i32 3, ptr %8, align 4
  br label %406

44:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %45, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = call ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = call ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #8
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  br label %52

52:                                               ; preds = %403, %44
  %53 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8Sim_BodySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %53, label %55, label %54

54:                                               ; preds = %52
  store i32 4, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %405

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %56 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  store ptr %56, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = getelementptr inbounds %class.Sim_Body, ptr %57, i32 0, i32 3
  %59 = load float, ptr %58, align 8, !tbaa !19
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %class.Sim_Body, ptr %60, i32 0, i32 3
  %62 = load float, ptr %61, align 8, !tbaa !19
  %63 = fsub float %59, %62
  store float %63, ptr %14, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = getelementptr inbounds %class.Sim_Body, ptr %64, i32 0, i32 4
  %66 = load float, ptr %65, align 4, !tbaa !21
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %class.Sim_Body, ptr %67, i32 0, i32 4
  %69 = load float, ptr %68, align 4, !tbaa !21
  %70 = fsub float %66, %69
  store float %70, ptr %15, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %71 = load float, ptr %14, align 4, !tbaa !20
  %72 = load float, ptr %14, align 4, !tbaa !20
  %73 = load float, ptr %15, align 4, !tbaa !20
  %74 = load float, ptr %15, align 4, !tbaa !20
  %75 = fmul float %73, %74
  %76 = call float @llvm.fmuladd.f32(float %71, float %72, float %75)
  %77 = call noundef float @_ZSt4sqrtf(float noundef %76)
  store float %77, ptr %16, align 4, !tbaa !20
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %class.Sim_Body, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 8, !tbaa !22
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds %class.Sim_Body, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !22
  %84 = icmp eq i32 %80, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %55
  store i32 5, ptr %8, align 4
  br label %397

86:                                               ; preds = %55
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.Sim_Body, ptr %87, i32 0, i32 29
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = icmp eq i32 %89, 2
  br i1 %90, label %91, label %113

91:                                               ; preds = %86
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = call noundef zeroext i1 @_Z25check_stat_rect_collisionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %92, ptr noundef nonnull align 8 dereferenceable(144) %93)
  br i1 %94, label %95, label %104

95:                                               ; preds = %91
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = call noundef zeroext i1 @_Z11is_exemptedRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %96, ptr noundef nonnull align 8 dereferenceable(144) %97)
  br i1 %98, label %99, label %100

99:                                               ; preds = %95
  store i32 5, ptr %8, align 4
  br label %397

100:                                              ; preds = %95
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_Z23handle_static_collisionR8Sim_BodyS0_RK6config(ptr noundef nonnull align 8 dereferenceable(144) %101, ptr noundef nonnull align 8 dereferenceable(144) %102, ptr noundef nonnull align 4 dereferenceable(20) %103)
  store i32 5, ptr %8, align 4
  br label %397

104:                                              ; preds = %91
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = call noundef zeroext i1 @_Z11is_exemptedRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %105, ptr noundef nonnull align 8 dereferenceable(144) %106)
  br i1 %107, label %108, label %111

108:                                              ; preds = %104
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_Z16remove_exemptionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %109, ptr noundef nonnull align 8 dereferenceable(144) %110)
  store i32 5, ptr %8, align 4
  br label %397

111:                                              ; preds = %104
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112, %86
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = call noundef zeroext i1 @_Z11is_exemptedRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %114, ptr noundef nonnull align 8 dereferenceable(144) %115)
  br i1 %116, label %117, label %129

117:                                              ; preds = %113
  %118 = load float, ptr %16, align 4, !tbaa !20
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = getelementptr inbounds %class.Sim_Body, ptr %119, i32 0, i32 12
  %121 = load float, ptr %120, align 4, !tbaa !23
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  %123 = getelementptr inbounds %class.Sim_Body, ptr %122, i32 0, i32 12
  %124 = load float, ptr %123, align 4, !tbaa !23
  %125 = fadd float %121, %124
  %126 = fcmp ole float %118, %125
  br i1 %126, label %127, label %128

127:                                              ; preds = %117
  store i32 5, ptr %8, align 4
  br label %397

128:                                              ; preds = %117
  br label %129

129:                                              ; preds = %128, %113
  %130 = load float, ptr %16, align 4, !tbaa !20
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %class.Sim_Body, ptr %131, i32 0, i32 12
  %133 = load float, ptr %132, align 4, !tbaa !23
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = getelementptr inbounds %class.Sim_Body, ptr %134, i32 0, i32 12
  %136 = load float, ptr %135, align 4, !tbaa !23
  %137 = fadd float %133, %136
  %138 = fcmp ole float %130, %137
  br i1 %138, label %139, label %396

139:                                              ; preds = %129
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_Z13add_exemptionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %140, ptr noundef nonnull align 8 dereferenceable(144) %141)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds %class.Sim_Body, ptr %142, i32 0, i32 6
  %144 = load float, ptr %143, align 4, !tbaa !24
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %class.Sim_Body, ptr %145, i32 0, i32 6
  %147 = load float, ptr %146, align 4, !tbaa !24
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %class.Sim_Body, ptr %148, i32 0, i32 7
  %150 = load float, ptr %149, align 8, !tbaa !25
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = getelementptr inbounds %class.Sim_Body, ptr %151, i32 0, i32 7
  %153 = load float, ptr %152, align 8, !tbaa !25
  %154 = fmul float %150, %153
  %155 = call float @llvm.fmuladd.f32(float %144, float %147, float %154)
  %156 = call noundef float @_ZSt4sqrtf(float noundef %155)
  store float %156, ptr %24, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %157 = load ptr, ptr %13, align 8, !tbaa !5
  %158 = getelementptr inbounds %class.Sim_Body, ptr %157, i32 0, i32 6
  %159 = load float, ptr %158, align 4, !tbaa !24
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  %161 = getelementptr inbounds %class.Sim_Body, ptr %160, i32 0, i32 6
  %162 = load float, ptr %161, align 4, !tbaa !24
  %163 = load ptr, ptr %13, align 8, !tbaa !5
  %164 = getelementptr inbounds %class.Sim_Body, ptr %163, i32 0, i32 7
  %165 = load float, ptr %164, align 8, !tbaa !25
  %166 = load ptr, ptr %13, align 8, !tbaa !5
  %167 = getelementptr inbounds %class.Sim_Body, ptr %166, i32 0, i32 7
  %168 = load float, ptr %167, align 8, !tbaa !25
  %169 = fmul float %165, %168
  %170 = call float @llvm.fmuladd.f32(float %159, float %162, float %169)
  %171 = call noundef float @_ZSt4sqrtf(float noundef %170)
  store float %171, ptr %25, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %172 = load float, ptr %14, align 4, !tbaa !20
  %173 = fcmp oeq float %172, 0.000000e+00
  br i1 %173, label %174, label %175

174:                                              ; preds = %139
  store float 0x3FF921FB60000000, ptr %17, align 4, !tbaa !20
  br label %187

175:                                              ; preds = %139
  %176 = load float, ptr %15, align 4, !tbaa !20
  %177 = call noundef float @_ZSt3absf(float noundef %176)
  %178 = fpext float %177 to double
  %179 = fcmp ole double %178, 1.000000e-03
  br i1 %179, label %180, label %181

180:                                              ; preds = %175
  store float 0.000000e+00, ptr %17, align 4, !tbaa !20
  br label %186

181:                                              ; preds = %175
  %182 = load float, ptr %15, align 4, !tbaa !20
  %183 = load float, ptr %14, align 4, !tbaa !20
  %184 = fdiv float %182, %183
  %185 = call noundef float @_ZSt4atanf(float noundef %184)
  store float %185, ptr %17, align 4, !tbaa !20
  br label %186

186:                                              ; preds = %181, %180
  br label %187

187:                                              ; preds = %186, %174
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  %189 = getelementptr inbounds %class.Sim_Body, ptr %188, i32 0, i32 6
  %190 = load float, ptr %189, align 4, !tbaa !24
  %191 = fpext float %190 to double
  %192 = load float, ptr %24, align 4, !tbaa !20
  %193 = fpext float %192 to double
  %194 = fadd double %193, 1.000000e-03
  %195 = fdiv double %191, %194
  %196 = call double @acos(double noundef %195) #8
  %197 = fptrunc double %196 to float
  store float %197, ptr %18, align 4, !tbaa !20
  %198 = load ptr, ptr %13, align 8, !tbaa !5
  %199 = getelementptr inbounds %class.Sim_Body, ptr %198, i32 0, i32 6
  %200 = load float, ptr %199, align 4, !tbaa !24
  %201 = fpext float %200 to double
  %202 = load float, ptr %25, align 4, !tbaa !20
  %203 = fpext float %202 to double
  %204 = fadd double %203, 1.000000e-03
  %205 = fdiv double %201, %204
  %206 = call double @acos(double noundef %205) #8
  %207 = fptrunc double %206 to float
  store float %207, ptr %19, align 4, !tbaa !20
  %208 = load float, ptr %24, align 4, !tbaa !20
  %209 = call noundef float @_ZSt3absf(float noundef %208)
  %210 = fpext float %209 to double
  %211 = fcmp olt double %210, 1.000000e-03
  br i1 %211, label %212, label %213

212:                                              ; preds = %187
  store float 0.000000e+00, ptr %18, align 4, !tbaa !20
  br label %213

213:                                              ; preds = %212, %187
  %214 = load float, ptr %25, align 4, !tbaa !20
  %215 = call noundef float @_ZSt3absf(float noundef %214)
  %216 = fpext float %215 to double
  %217 = fcmp olt double %216, 1.000000e-03
  br i1 %217, label %218, label %219

218:                                              ; preds = %213
  store float 0.000000e+00, ptr %19, align 4, !tbaa !20
  br label %219

219:                                              ; preds = %218, %213
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  %221 = getelementptr inbounds %class.Sim_Body, ptr %220, i32 0, i32 6
  %222 = load float, ptr %221, align 4, !tbaa !24
  %223 = load float, ptr %18, align 4, !tbaa !20
  %224 = load float, ptr %17, align 4, !tbaa !20
  %225 = fsub float %223, %224
  %226 = call noundef float @_ZSt3cosf(float noundef %225)
  %227 = fmul float %222, %226
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  %229 = getelementptr inbounds %class.Sim_Body, ptr %228, i32 0, i32 13
  %230 = load float, ptr %229, align 8, !tbaa !26
  %231 = load ptr, ptr %13, align 8, !tbaa !5
  %232 = getelementptr inbounds %class.Sim_Body, ptr %231, i32 0, i32 13
  %233 = load float, ptr %232, align 8, !tbaa !26
  %234 = fsub float %230, %233
  %235 = load ptr, ptr %13, align 8, !tbaa !5
  %236 = getelementptr inbounds %class.Sim_Body, ptr %235, i32 0, i32 13
  %237 = load float, ptr %236, align 8, !tbaa !26
  %238 = fmul float 2.000000e+00, %237
  %239 = load float, ptr %25, align 4, !tbaa !20
  %240 = fmul float %238, %239
  %241 = load float, ptr %19, align 4, !tbaa !20
  %242 = load float, ptr %17, align 4, !tbaa !20
  %243 = fsub float %241, %242
  %244 = call noundef float @_ZSt3cosf(float noundef %243)
  %245 = fmul float %240, %244
  %246 = call float @llvm.fmuladd.f32(float %227, float %234, float %245)
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  %248 = getelementptr inbounds %class.Sim_Body, ptr %247, i32 0, i32 13
  %249 = load float, ptr %248, align 8, !tbaa !26
  %250 = load ptr, ptr %13, align 8, !tbaa !5
  %251 = getelementptr inbounds %class.Sim_Body, ptr %250, i32 0, i32 13
  %252 = load float, ptr %251, align 8, !tbaa !26
  %253 = fadd float %249, %252
  %254 = fdiv float %246, %253
  store float %254, ptr %26, align 4, !tbaa !20
  %255 = load float, ptr %26, align 4, !tbaa !20
  %256 = load float, ptr %17, align 4, !tbaa !20
  %257 = call noundef float @_ZSt3cosf(float noundef %256)
  %258 = fmul float %255, %257
  %259 = fpext float %258 to double
  %260 = load float, ptr %24, align 4, !tbaa !20
  %261 = load float, ptr %18, align 4, !tbaa !20
  %262 = load float, ptr %17, align 4, !tbaa !20
  %263 = fsub float %261, %262
  %264 = call noundef float @_ZSt3sinf(float noundef %263)
  %265 = fmul float %260, %264
  %266 = fpext float %265 to double
  %267 = load float, ptr %17, align 4, !tbaa !20
  %268 = fpext float %267 to double
  %269 = fadd double %268, 0x3FF921FB54442D18
  %270 = call double @cos(double noundef %269) #8
  %271 = call double @llvm.fmuladd.f64(double %266, double %270, double %259)
  %272 = fptrunc double %271 to float
  store float %272, ptr %20, align 4, !tbaa !20
  %273 = load float, ptr %26, align 4, !tbaa !20
  %274 = load float, ptr %17, align 4, !tbaa !20
  %275 = call noundef float @_ZSt3sinf(float noundef %274)
  %276 = fmul float %273, %275
  %277 = fpext float %276 to double
  %278 = load float, ptr %24, align 4, !tbaa !20
  %279 = load float, ptr %18, align 4, !tbaa !20
  %280 = load float, ptr %17, align 4, !tbaa !20
  %281 = fsub float %279, %280
  %282 = call noundef float @_ZSt3sinf(float noundef %281)
  %283 = fmul float %278, %282
  %284 = fpext float %283 to double
  %285 = load float, ptr %17, align 4, !tbaa !20
  %286 = fpext float %285 to double
  %287 = fadd double %286, 0x3FF921FB54442D18
  %288 = call double @sin(double noundef %287) #8
  %289 = call double @llvm.fmuladd.f64(double %284, double %288, double %277)
  %290 = fptrunc double %289 to float
  store float %290, ptr %21, align 4, !tbaa !20
  %291 = load ptr, ptr %13, align 8, !tbaa !5
  %292 = getelementptr inbounds %class.Sim_Body, ptr %291, i32 0, i32 6
  %293 = load float, ptr %292, align 4, !tbaa !24
  %294 = load float, ptr %19, align 4, !tbaa !20
  %295 = load float, ptr %17, align 4, !tbaa !20
  %296 = fsub float %294, %295
  %297 = call noundef float @_ZSt3cosf(float noundef %296)
  %298 = fmul float %293, %297
  %299 = load ptr, ptr %13, align 8, !tbaa !5
  %300 = getelementptr inbounds %class.Sim_Body, ptr %299, i32 0, i32 13
  %301 = load float, ptr %300, align 8, !tbaa !26
  %302 = load ptr, ptr %9, align 8, !tbaa !5
  %303 = getelementptr inbounds %class.Sim_Body, ptr %302, i32 0, i32 13
  %304 = load float, ptr %303, align 8, !tbaa !26
  %305 = fsub float %301, %304
  %306 = load ptr, ptr %9, align 8, !tbaa !5
  %307 = getelementptr inbounds %class.Sim_Body, ptr %306, i32 0, i32 13
  %308 = load float, ptr %307, align 8, !tbaa !26
  %309 = fmul float 2.000000e+00, %308
  %310 = load float, ptr %24, align 4, !tbaa !20
  %311 = fmul float %309, %310
  %312 = load float, ptr %18, align 4, !tbaa !20
  %313 = load float, ptr %17, align 4, !tbaa !20
  %314 = fsub float %312, %313
  %315 = call noundef float @_ZSt3cosf(float noundef %314)
  %316 = fmul float %311, %315
  %317 = call float @llvm.fmuladd.f32(float %298, float %305, float %316)
  %318 = load ptr, ptr %9, align 8, !tbaa !5
  %319 = getelementptr inbounds %class.Sim_Body, ptr %318, i32 0, i32 13
  %320 = load float, ptr %319, align 8, !tbaa !26
  %321 = load ptr, ptr %13, align 8, !tbaa !5
  %322 = getelementptr inbounds %class.Sim_Body, ptr %321, i32 0, i32 13
  %323 = load float, ptr %322, align 8, !tbaa !26
  %324 = fadd float %320, %323
  %325 = fdiv float %317, %324
  store float %325, ptr %26, align 4, !tbaa !20
  %326 = load float, ptr %26, align 4, !tbaa !20
  %327 = load float, ptr %17, align 4, !tbaa !20
  %328 = call noundef float @_ZSt3cosf(float noundef %327)
  %329 = fmul float %326, %328
  %330 = fpext float %329 to double
  %331 = load float, ptr %25, align 4, !tbaa !20
  %332 = load float, ptr %19, align 4, !tbaa !20
  %333 = load float, ptr %17, align 4, !tbaa !20
  %334 = fsub float %332, %333
  %335 = call noundef float @_ZSt3sinf(float noundef %334)
  %336 = fmul float %331, %335
  %337 = fpext float %336 to double
  %338 = load float, ptr %17, align 4, !tbaa !20
  %339 = fpext float %338 to double
  %340 = fadd double %339, 0x3FF921FB54442D18
  %341 = call double @cos(double noundef %340) #8
  %342 = call double @llvm.fmuladd.f64(double %337, double %341, double %330)
  %343 = fptrunc double %342 to float
  store float %343, ptr %22, align 4, !tbaa !20
  %344 = load float, ptr %26, align 4, !tbaa !20
  %345 = load float, ptr %17, align 4, !tbaa !20
  %346 = call noundef float @_ZSt3sinf(float noundef %345)
  %347 = fmul float %344, %346
  %348 = fpext float %347 to double
  %349 = load float, ptr %25, align 4, !tbaa !20
  %350 = load float, ptr %19, align 4, !tbaa !20
  %351 = load float, ptr %17, align 4, !tbaa !20
  %352 = fsub float %350, %351
  %353 = call noundef float @_ZSt3sinf(float noundef %352)
  %354 = fmul float %349, %353
  %355 = fpext float %354 to double
  %356 = load float, ptr %17, align 4, !tbaa !20
  %357 = fpext float %356 to double
  %358 = fadd double %357, 0x3FF921FB54442D18
  %359 = call double @sin(double noundef %358) #8
  %360 = call double @llvm.fmuladd.f64(double %355, double %359, double %348)
  %361 = fptrunc double %360 to float
  store float %361, ptr %23, align 4, !tbaa !20
  %362 = load float, ptr %20, align 4, !tbaa !20
  %363 = fptosi float %362 to i32
  %364 = mul nsw i32 %363, 1000
  %365 = sitofp i32 %364 to float
  %366 = fdiv float %365, 1.000000e+03
  %367 = load ptr, ptr %9, align 8, !tbaa !5
  %368 = getelementptr inbounds %class.Sim_Body, ptr %367, i32 0, i32 6
  store float %366, ptr %368, align 4, !tbaa !24
  %369 = load float, ptr %21, align 4, !tbaa !20
  %370 = fptosi float %369 to i32
  %371 = mul nsw i32 %370, 1000
  %372 = sitofp i32 %371 to float
  %373 = fdiv float %372, 1.000000e+03
  %374 = load ptr, ptr %9, align 8, !tbaa !5
  %375 = getelementptr inbounds %class.Sim_Body, ptr %374, i32 0, i32 7
  store float %373, ptr %375, align 8, !tbaa !25
  %376 = load ptr, ptr %13, align 8, !tbaa !5
  %377 = getelementptr inbounds %class.Sim_Body, ptr %376, i32 0, i32 29
  %378 = load i32, ptr %377, align 4, !tbaa !9
  %379 = icmp ne i32 %378, 2
  br i1 %379, label %380, label %395

380:                                              ; preds = %219
  %381 = load float, ptr %22, align 4, !tbaa !20
  %382 = fptosi float %381 to i32
  %383 = mul nsw i32 %382, 1000
  %384 = sitofp i32 %383 to float
  %385 = fdiv float %384, 1.000000e+03
  %386 = load ptr, ptr %13, align 8, !tbaa !5
  %387 = getelementptr inbounds %class.Sim_Body, ptr %386, i32 0, i32 6
  store float %385, ptr %387, align 4, !tbaa !24
  %388 = load float, ptr %23, align 4, !tbaa !20
  %389 = fptosi float %388 to i32
  %390 = mul nsw i32 %389, 1000
  %391 = sitofp i32 %390 to float
  %392 = fdiv float %391, 1.000000e+03
  %393 = load ptr, ptr %13, align 8, !tbaa !5
  %394 = getelementptr inbounds %class.Sim_Body, ptr %393, i32 0, i32 7
  store float %392, ptr %394, align 8, !tbaa !25
  br label %395

395:                                              ; preds = %380, %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %396

396:                                              ; preds = %395, %129
  store i32 0, ptr %8, align 4
  br label %397

397:                                              ; preds = %396, %127, %108, %100, %99, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  %398 = load i32, ptr %8, align 4
  switch i32 %398, label %400 [
    i32 0, label %399
  ]

399:                                              ; preds = %397
  store i32 0, ptr %8, align 4
  br label %400

400:                                              ; preds = %399, %397
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %401 = load i32, ptr %8, align 4
  switch i32 %401, label %412 [
    i32 0, label %402
    i32 5, label %403
  ]

402:                                              ; preds = %400
  br label %403

403:                                              ; preds = %402, %400
  %404 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br label %52

405:                                              ; preds = %54
  store i32 0, ptr %8, align 4
  br label %406

406:                                              ; preds = %405, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  %407 = load i32, ptr %8, align 4
  switch i32 %407, label %412 [
    i32 0, label %408
    i32 3, label %409
  ]

408:                                              ; preds = %406
  br label %409

409:                                              ; preds = %408, %406
  %410 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br label %34

411:                                              ; preds = %36
  ret void

412:                                              ; preds = %406, %400
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

declare noundef zeroext i1 @_Z25check_stat_rect_collisionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) #5

declare noundef zeroext i1 @_Z11is_exemptedRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23handle_static_collisionR8Sim_BodyS0_RK6config(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(20)) #6

declare void @_Z16remove_exemptionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) #5

declare void @_Z13add_exemptionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3absf(float noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4atanf(float noundef) #3

; Function Attrs: nounwind
declare double @acos(double noundef) #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) #3

; Function Attrs: nounwind
declare double @cos(double noundef) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: nounwind
declare double @sin(double noundef) #7

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !18, i64 140}
!10 = !{!"_ZTS8Sim_Body", !11, i64 8, !12, i64 16, !16, i64 40, !16, i64 44, !16, i64 48, !16, i64 52, !16, i64 56, !16, i64 60, !16, i64 64, !16, i64 68, !16, i64 72, !16, i64 76, !16, i64 80, !16, i64 84, !16, i64 88, !16, i64 92, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108, !16, i64 112, !16, i64 116, !16, i64 120, !16, i64 124, !16, i64 128, !17, i64 132, !17, i64 133, !11, i64 136, !18, i64 140}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorISt4pairIffESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseISt4pairIffESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt4pairIffESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt4pairIffESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"float", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS9body_type", !7, i64 0}
!19 = !{!10, !16, i64 40}
!20 = !{!16, !16, i64 0}
!21 = !{!10, !16, i64 44}
!22 = !{!10, !11, i64 8}
!23 = !{!10, !16, i64 76}
!24 = !{!10, !16, i64 52}
!25 = !{!10, !16, i64 56}
!26 = !{!10, !16, i64 80}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9collisionRSt6vectorI8Sim_BodySaIS0_EERK6config(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(20) %1) local_unnamed_addr #0 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %7 = tail call ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %7, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %8 = tail call ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %8, ptr %4, align 8
  %9 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8Sim_BodySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  br i1 %9, label %.lr.ph117, label %._crit_edge118

._crit_edge118:                                   ; preds = %194, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  ret void

.lr.ph117:                                        ; preds = %2, %194
  %10 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  %11 = getelementptr inbounds i8, ptr %10, i64 140
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = icmp eq i32 %12, 2
  br i1 %13, label %194, label %14

14:                                               ; preds = %.lr.ph117
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %15 = call ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %15, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %16 = call ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  store ptr %16, ptr %6, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8Sim_BodySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %18 = getelementptr inbounds i8, ptr %10, i64 40
  %19 = getelementptr inbounds i8, ptr %10, i64 44
  %20 = getelementptr inbounds i8, ptr %10, i64 8
  %21 = getelementptr inbounds i8, ptr %10, i64 76
  %22 = getelementptr inbounds i8, ptr %10, i64 52
  %23 = getelementptr inbounds i8, ptr %10, i64 56
  %24 = getelementptr inbounds i8, ptr %10, i64 80
  br label %25

._crit_edge:                                      ; preds = %191, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %194

25:                                               ; preds = %.lr.ph, %191
  %26 = call noundef nonnull align 8 dereferenceable(144) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  %27 = getelementptr inbounds i8, ptr %26, i64 40
  %28 = load float, ptr %27, align 8, !tbaa !18
  %29 = load float, ptr %18, align 8, !tbaa !18
  %30 = fsub float %28, %29
  %31 = getelementptr inbounds i8, ptr %26, i64 44
  %32 = load float, ptr %31, align 4, !tbaa !19
  %33 = load float, ptr %19, align 4, !tbaa !19
  %34 = fsub float %32, %33
  %35 = fmul float %34, %34
  %36 = call float @llvm.fmuladd.f32(float %30, float %30, float %35)
  %37 = call noundef float @_ZSt4sqrtf(float noundef %36)
  %38 = load i32, ptr %20, align 8, !tbaa !20
  %39 = getelementptr inbounds i8, ptr %26, i64 8
  %40 = load i32, ptr %39, align 8, !tbaa !20
  %41 = icmp eq i32 %38, %40
  br i1 %41, label %191, label %42

42:                                               ; preds = %25
  %43 = getelementptr inbounds i8, ptr %26, i64 140
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = icmp eq i32 %44, 2
  br i1 %45, label %46, label %53

46:                                               ; preds = %42
  %47 = call noundef zeroext i1 @_Z25check_stat_rect_collisionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 8 dereferenceable(144) %26)
  %48 = call noundef zeroext i1 @_Z11is_exemptedRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 8 dereferenceable(144) %26)
  br i1 %47, label %49, label %51

49:                                               ; preds = %46
  br i1 %48, label %191, label %50

50:                                               ; preds = %49
  call void @_Z23handle_static_collisionR8Sim_BodyS0_RK6config(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 8 dereferenceable(144) %26, ptr noundef nonnull align 4 dereferenceable(20) %1)
  br label %191

51:                                               ; preds = %46
  br i1 %48, label %52, label %53

52:                                               ; preds = %51
  call void @_Z16remove_exemptionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 8 dereferenceable(144) %26)
  br label %191

53:                                               ; preds = %51, %42
  %54 = call noundef zeroext i1 @_Z11is_exemptedRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 8 dereferenceable(144) %26)
  %.pre = load float, ptr %21, align 4, !tbaa !21
  %55 = getelementptr inbounds i8, ptr %26, i64 76
  %56 = load float, ptr %55, align 4, !tbaa !21
  %57 = fadd float %.pre, %56
  %58 = fcmp ole float %37, %57
  %or.cond.not125 = select i1 %54, i1 %58, i1 false
  %59 = fcmp ugt float %37, %57
  %or.cond123 = select i1 %or.cond.not125, i1 true, i1 %59
  br i1 %or.cond123, label %191, label %60

60:                                               ; preds = %53
  call void @_Z13add_exemptionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144) %10, ptr noundef nonnull align 8 dereferenceable(144) %26)
  %61 = load float, ptr %22, align 4, !tbaa !22
  %62 = load float, ptr %23, align 8, !tbaa !23
  %63 = fmul float %62, %62
  %64 = call float @llvm.fmuladd.f32(float %61, float %61, float %63)
  %65 = call noundef float @_ZSt4sqrtf(float noundef %64)
  %66 = getelementptr inbounds i8, ptr %26, i64 52
  %67 = load float, ptr %66, align 4, !tbaa !22
  %68 = getelementptr inbounds i8, ptr %26, i64 56
  %69 = load float, ptr %68, align 8, !tbaa !23
  %70 = fmul float %69, %69
  %71 = call float @llvm.fmuladd.f32(float %67, float %67, float %70)
  %72 = call noundef float @_ZSt4sqrtf(float noundef %71)
  %73 = fcmp oeq float %30, 0.000000e+00
  br i1 %73, label %81, label %74

74:                                               ; preds = %60
  %75 = call noundef float @_ZSt3absf(float noundef %34)
  %76 = fpext float %75 to double
  %77 = fcmp ugt double %76, 1.000000e-03
  br i1 %77, label %78, label %81

78:                                               ; preds = %74
  %79 = fdiv float %34, %30
  %80 = call noundef float @_ZSt4atanf(float noundef %79)
  br label %81

81:                                               ; preds = %74, %60, %78
  %.0112 = phi float [ %80, %78 ], [ 0x3FF921FB60000000, %60 ], [ 0.000000e+00, %74 ]
  %82 = load float, ptr %22, align 4, !tbaa !22
  %83 = fpext float %82 to double
  %84 = fpext float %65 to double
  %85 = fadd double %84, 1.000000e-03
  %86 = fdiv double %83, %85
  %87 = call double @acos(double noundef %86) #9
  %88 = fptrunc double %87 to float
  %89 = load float, ptr %66, align 4, !tbaa !22
  %90 = fpext float %89 to double
  %91 = fpext float %72 to double
  %92 = fadd double %91, 1.000000e-03
  %93 = fdiv double %90, %92
  %94 = call double @acos(double noundef %93) #9
  %95 = fptrunc double %94 to float
  %96 = call noundef float @_ZSt3absf(float noundef %65)
  %97 = fpext float %96 to double
  %98 = fcmp olt double %97, 1.000000e-03
  %.0113 = select i1 %98, float 0.000000e+00, float %88
  %99 = call noundef float @_ZSt3absf(float noundef %72)
  %100 = fpext float %99 to double
  %101 = fcmp olt double %100, 1.000000e-03
  %.0114 = select i1 %101, float 0.000000e+00, float %95
  %102 = load float, ptr %22, align 4, !tbaa !22
  %103 = fsub float %.0113, %.0112
  %104 = call noundef float @_ZSt3cosf(float noundef %103)
  %105 = fmul float %102, %104
  %106 = load float, ptr %24, align 8, !tbaa !24
  %107 = getelementptr inbounds i8, ptr %26, i64 80
  %108 = load float, ptr %107, align 8, !tbaa !24
  %109 = fsub float %106, %108
  %110 = fmul float %108, 2.000000e+00
  %111 = fmul float %72, %110
  %112 = fsub float %.0114, %.0112
  %113 = call noundef float @_ZSt3cosf(float noundef %112)
  %114 = fmul float %113, %111
  %115 = call float @llvm.fmuladd.f32(float %105, float %109, float %114)
  %116 = load float, ptr %24, align 8, !tbaa !24
  %117 = load float, ptr %107, align 8, !tbaa !24
  %118 = fadd float %116, %117
  %119 = fdiv float %115, %118
  %120 = call noundef float @_ZSt3cosf(float noundef %.0112)
  %121 = call noundef float @_ZSt3sinf(float noundef %103)
  %122 = fpext float %.0112 to double
  %123 = fadd double %122, 0x3FF921FB54442D18
  %124 = call double @cos(double noundef %123) #9
  %125 = call noundef float @_ZSt3sinf(float noundef %.0112)
  %126 = call noundef float @_ZSt3sinf(float noundef %103)
  %127 = call double @sin(double noundef %123) #9
  %128 = load float, ptr %66, align 4, !tbaa !22
  %129 = call noundef float @_ZSt3cosf(float noundef %112)
  %130 = load float, ptr %107, align 8, !tbaa !24
  %131 = load float, ptr %24, align 8, !tbaa !24
  %132 = call noundef float @_ZSt3cosf(float noundef %103)
  %133 = load float, ptr %24, align 8, !tbaa !24
  %134 = load float, ptr %107, align 8, !tbaa !24
  %135 = call noundef float @_ZSt3cosf(float noundef %.0112)
  %136 = call noundef float @_ZSt3sinf(float noundef %112)
  %137 = call double @cos(double noundef %123) #9
  %138 = call noundef float @_ZSt3sinf(float noundef %.0112)
  %139 = call noundef float @_ZSt3sinf(float noundef %112)
  %140 = call double @sin(double noundef %123) #9
  %141 = insertelement <2 x float> poison, float %120, i64 0
  %142 = insertelement <2 x float> %141, float %125, i64 1
  %143 = insertelement <2 x float> poison, float %119, i64 0
  %144 = shufflevector <2 x float> %143, <2 x float> poison, <2 x i32> zeroinitializer
  %145 = fmul <2 x float> %142, %144
  %146 = fpext <2 x float> %145 to <2 x double>
  %147 = insertelement <2 x float> poison, float %65, i64 0
  %148 = shufflevector <2 x float> %147, <2 x float> poison, <2 x i32> zeroinitializer
  %149 = insertelement <2 x float> poison, float %121, i64 0
  %150 = insertelement <2 x float> %149, float %126, i64 1
  %151 = fmul <2 x float> %148, %150
  %152 = fpext <2 x float> %151 to <2 x double>
  %153 = insertelement <2 x double> poison, double %124, i64 0
  %154 = insertelement <2 x double> %153, double %127, i64 1
  %155 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %152, <2 x double> %154, <2 x double> %146)
  %156 = fptrunc <2 x double> %155 to <2 x float>
  %157 = fptosi <2 x float> %156 to <2 x i32>
  %158 = mul nsw <2 x i32> %157, <i32 1000, i32 1000>
  %159 = sitofp <2 x i32> %158 to <2 x float>
  %160 = fdiv <2 x float> %159, <float 1.000000e+03, float 1.000000e+03>
  store <2 x float> %160, ptr %22, align 4, !tbaa !25
  %161 = load i32, ptr %43, align 4, !tbaa !5
  %.not = icmp eq i32 %161, 2
  br i1 %.not, label %191, label %162

162:                                              ; preds = %81
  %163 = insertelement <2 x float> poison, float %72, i64 0
  %164 = shufflevector <2 x float> %163, <2 x float> poison, <2 x i32> zeroinitializer
  %165 = insertelement <2 x float> poison, float %136, i64 0
  %166 = insertelement <2 x float> %165, float %139, i64 1
  %167 = fmul <2 x float> %164, %166
  %168 = fmul float %128, %129
  %169 = fsub float %130, %131
  %170 = fmul float %131, 2.000000e+00
  %171 = fmul float %65, %170
  %172 = fmul float %132, %171
  %173 = call float @llvm.fmuladd.f32(float %168, float %169, float %172)
  %174 = fadd float %133, %134
  %175 = fdiv float %173, %174
  %176 = fpext <2 x float> %167 to <2 x double>
  %177 = insertelement <2 x float> poison, float %135, i64 0
  %178 = insertelement <2 x float> %177, float %138, i64 1
  %179 = insertelement <2 x float> poison, float %175, i64 0
  %180 = shufflevector <2 x float> %179, <2 x float> poison, <2 x i32> zeroinitializer
  %181 = fmul <2 x float> %178, %180
  %182 = fpext <2 x float> %181 to <2 x double>
  %183 = insertelement <2 x double> poison, double %137, i64 0
  %184 = insertelement <2 x double> %183, double %140, i64 1
  %185 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %176, <2 x double> %184, <2 x double> %182)
  %186 = fptrunc <2 x double> %185 to <2 x float>
  %187 = fptosi <2 x float> %186 to <2 x i32>
  %188 = mul nsw <2 x i32> %187, <i32 1000, i32 1000>
  %189 = sitofp <2 x i32> %188 to <2 x float>
  %190 = fdiv <2 x float> %189, <float 1.000000e+03, float 1.000000e+03>
  store <2 x float> %190, ptr %66, align 4, !tbaa !25
  br label %191

191:                                              ; preds = %53, %162, %81, %49, %25, %52, %50
  %192 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  %193 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8Sim_BodySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  br i1 %193, label %25, label %._crit_edge

194:                                              ; preds = %.lr.ph117, %._crit_edge
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #9
  %196 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP8Sim_BodySt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #9
  br i1 %196, label %.lr.ph117, label %._crit_edge118
}

; 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 nounwind uwtable
declare dso_local ptr @_ZNSt6vectorI8Sim_BodySaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

declare noundef zeroext i1 @_Z25check_stat_rect_collisionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #5

declare noundef zeroext i1 @_Z11is_exemptedRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23handle_static_collisionR8Sim_BodyS0_RK6config(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #6

declare void @_Z16remove_exemptionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #5

declare void @_Z13add_exemptionRK8Sim_BodyS1_(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3absf(float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4atanf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @acos(double noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #7

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP8Sim_BodySt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #8

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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree nounwind willreturn memory(write) "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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { 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, !17, i64 140}
!6 = !{!"_ZTS8Sim_Body", !7, i64 8, !10, i64 16, !15, i64 40, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56, !15, i64 60, !15, i64 64, !15, i64 68, !15, i64 72, !15, i64 76, !15, i64 80, !15, i64 84, !15, i64 88, !15, i64 92, !15, i64 96, !15, i64 100, !15, i64 104, !15, i64 108, !15, i64 112, !15, i64 116, !15, i64 120, !15, i64 124, !15, i64 128, !16, i64 132, !16, i64 133, !7, i64 136, !17, i64 140}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorISt4pairIffESaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseISt4pairIffESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseISt4pairIffESaIS1_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseISt4pairIffESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTS9body_type", !8, i64 0}
!18 = !{!6, !15, i64 40}
!19 = !{!6, !15, i64 44}
!20 = !{!6, !7, i64 8}
!21 = !{!6, !15, i64 76}
!22 = !{!6, !15, i64 52}
!23 = !{!6, !15, i64 56}
!24 = !{!6, !15, i64 80}
!25 = !{!15, !15, i64 0}


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