; LLVM IR from RiteshKH/Particle-Swarm-Optimiztion-based-Global-Path-planning :: PSO.ll (Z18obstacle_avoidanceiR5CoordS_PdS1_ddidd)

; 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.Coord = type { double, double, double, double }
%"class.std::vector.19" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.23" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%class.anon = type { i8 }
%class.anon.26 = type { i8 }

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_Z11obsdistance5CoordS_ddd(ptr noundef byval(%struct.Coord) align 8, ptr noundef byval(%struct.Coord) align 8, double noundef, double noundef, double noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11newparticle5CoordS_dddi(ptr dead_on_unwind noalias writable sret(%struct.Coord) align 8, ptr noundef byval(%struct.Coord) align 8, ptr noundef byval(%struct.Coord) align 8, double noundef, double noundef, double noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z8inCircleddddd(double noundef, double noundef, double noundef, double noundef, double noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z18obstacle_avoidanceiR5CoordS_PdS1_ddidd(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef byval(%struct.Coord) align 8 %2, ptr noundef %3, ptr noundef %4, double noundef %5, double noundef %6, i32 noundef %7, double noundef %8, double noundef %9) #3 personality ptr @__gxx_personality_v0 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca %"class.std::vector.19", align 8
  %21 = alloca %"class.std::allocator.23", align 1
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::vector.19", align 8
  %25 = alloca %"class.std::allocator.23", align 1
  %26 = alloca ptr, align 8
  %27 = alloca i64, align 8
  %28 = alloca i8, align 1
  %29 = alloca i32, align 4
  %30 = alloca double, align 8
  %31 = alloca %struct.Coord, align 8
  %32 = alloca %struct.Coord, align 8
  %33 = alloca %struct.Coord, align 8
  %34 = alloca %struct.Coord, align 8
  %35 = alloca %struct.Coord, align 8
  %36 = alloca %"struct.std::_Bit_reference", align 8
  %37 = alloca %"struct.std::_Bit_reference", align 8
  %38 = alloca i32, align 4
  %39 = alloca double, align 8
  %40 = alloca %struct.Coord, align 8
  %41 = alloca %struct.Coord, align 8
  %42 = alloca %"struct.std::_Bit_reference", align 8
  %43 = alloca %"struct.std::_Bit_reference", align 8
  %44 = alloca %"struct.std::_Bit_iterator", align 8
  %45 = alloca { ptr, i32 }, align 8
  %46 = alloca %"struct.std::_Bit_iterator", align 8
  %47 = alloca { ptr, i32 }, align 8
  %48 = alloca %class.anon, align 1
  %49 = alloca %"struct.std::_Bit_iterator", align 8
  %50 = alloca { ptr, i32 }, align 8
  %51 = alloca %"struct.std::_Bit_iterator", align 8
  %52 = alloca { ptr, i32 }, align 8
  %53 = alloca %class.anon.26, align 1
  store i32 %0, ptr %11, align 4, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !9
  store ptr %3, ptr %13, align 8, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !9
  store double %5, ptr %15, align 8, !tbaa !11
  store double %6, ptr %16, align 8, !tbaa !11
  store i32 %7, ptr %17, align 4, !tbaa !5
  store double %8, ptr %18, align 8, !tbaa !11
  store double %9, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #6
  %54 = load i32, ptr %11, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %20, i64 noundef %55, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %56 unwind label %70

56:                                               ; preds = %10
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #6
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %24, i64 noundef %58, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %59 unwind label %74

59:                                               ; preds = %56
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  %60 = load i32, ptr %11, align 4, !tbaa !5
  %61 = zext i32 %60 to i64
  %62 = call ptr @llvm.stacksave.p0()
  store ptr %62, ptr %26, align 8
  %63 = alloca i8, i64 %61, align 16
  store i64 %61, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #6
  store i8 0, ptr %28, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %64 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %64, ptr %29, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %198, %59
  %66 = load i32, ptr %29, align 4, !tbaa !5
  %67 = add nsw i32 %66, -1
  store i32 %67, ptr %29, align 4, !tbaa !5
  %68 = icmp ne i32 %66, 0
  br i1 %68, label %78, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %200

70:                                               ; preds = %10
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %22, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %23, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  br label %292

74:                                               ; preds = %56
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %22, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %23, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  br label %291

78:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %79 = load ptr, ptr %12, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %79, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %2, i64 32, i1 false), !tbaa.struct !15
  %80 = load ptr, ptr %13, align 8, !tbaa !9
  %81 = load i32, ptr %29, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %80, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = load ptr, ptr %14, align 8, !tbaa !9
  %86 = load i32, ptr %29, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds double, ptr %85, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !11
  %90 = load double, ptr %15, align 8, !tbaa !11
  %91 = call noundef double @_Z11obsdistance5CoordS_ddd(ptr noundef byval(%struct.Coord) align 8 %31, ptr noundef byval(%struct.Coord) align 8 %32, double noundef %84, double noundef %89, double noundef %90)
  store double %91, ptr %30, align 8, !tbaa !11
  %92 = load double, ptr %30, align 8, !tbaa !11
  %93 = load double, ptr %16, align 8, !tbaa !11
  %94 = fcmp ole double %92, %93
  br i1 %94, label %95, label %140

95:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #6
  %96 = load ptr, ptr %12, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %96, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %2, i64 32, i1 false), !tbaa.struct !15
  %97 = load ptr, ptr %13, align 8, !tbaa !9
  %98 = load i32, ptr %29, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds double, ptr %97, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !11
  %102 = load ptr, ptr %14, align 8, !tbaa !9
  %103 = load i32, ptr %29, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = load double, ptr %15, align 8, !tbaa !11
  %108 = load i32, ptr %17, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %17, align 4, !tbaa !5
  invoke void @_Z11newparticle5CoordS_dddi(ptr dead_on_unwind writable sret(%struct.Coord) align 8 %33, ptr noundef byval(%struct.Coord) align 8 %34, ptr noundef byval(%struct.Coord) align 8 %35, double noundef %101, double noundef %106, double noundef %107, i32 noundef %108)
          to label %110 unwind label %126

110:                                              ; preds = %95
  %111 = getelementptr inbounds %struct.Coord, ptr %33, i32 0, i32 0
  %112 = load double, ptr %111, align 8, !tbaa !16
  %113 = invoke noundef zeroext i1 @_ZSt5isnand(double noundef %112)
          to label %114 unwind label %126

114:                                              ; preds = %110
  %115 = zext i1 %113 to i32
  %116 = icmp eq i32 %115, 1
  br i1 %116, label %124, label %117

117:                                              ; preds = %114
  %118 = getelementptr inbounds %struct.Coord, ptr %33, i32 0, i32 1
  %119 = load double, ptr %118, align 8, !tbaa !18
  %120 = invoke noundef zeroext i1 @_ZSt5isnand(double noundef %119)
          to label %121 unwind label %126

121:                                              ; preds = %117
  %122 = zext i1 %120 to i32
  %123 = icmp eq i32 %122, 1
  br i1 %123, label %124, label %130

124:                                              ; preds = %121, %114
  %125 = load ptr, ptr %12, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %125, ptr align 8 %2, i64 32, i1 false), !tbaa.struct !15
  br label %139

126:                                              ; preds = %117, %110, %95
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %22, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #6
  br label %199

130:                                              ; preds = %121
  %131 = getelementptr inbounds %struct.Coord, ptr %33, i32 0, i32 0
  %132 = load double, ptr %131, align 8, !tbaa !16
  %133 = load ptr, ptr %12, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.Coord, ptr %133, i32 0, i32 0
  store double %132, ptr %134, align 8, !tbaa !16
  %135 = getelementptr inbounds %struct.Coord, ptr %33, i32 0, i32 1
  %136 = load double, ptr %135, align 8, !tbaa !18
  %137 = load ptr, ptr %12, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.Coord, ptr %137, i32 0, i32 1
  store double %136, ptr %138, align 8, !tbaa !18
  br label %139

139:                                              ; preds = %130, %124
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #6
  br label %140

140:                                              ; preds = %139, %78
  %141 = load ptr, ptr %12, align 8, !tbaa !9
  %142 = getelementptr inbounds %struct.Coord, ptr %141, i32 0, i32 0
  %143 = load double, ptr %142, align 8, !tbaa !16
  %144 = load ptr, ptr %12, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.Coord, ptr %144, i32 0, i32 1
  %146 = load double, ptr %145, align 8, !tbaa !18
  %147 = load ptr, ptr %13, align 8, !tbaa !9
  %148 = load i32, ptr %29, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds double, ptr %147, i64 %149
  %151 = load double, ptr %150, align 8, !tbaa !11
  %152 = load ptr, ptr %14, align 8, !tbaa !9
  %153 = load i32, ptr %29, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds double, ptr %152, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !11
  %157 = load double, ptr %15, align 8, !tbaa !11
  %158 = call noundef zeroext i1 @_Z8inCircleddddd(double noundef %143, double noundef %146, double noundef %151, double noundef %156, double noundef %157)
  %159 = load i32, ptr %29, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds i8, ptr %63, i64 %160
  %162 = zext i1 %158 to i8
  store i8 %162, ptr %161, align 1, !tbaa !13
  %163 = load i32, ptr %29, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds i8, ptr %63, i64 %164
  %166 = load i8, ptr %165, align 1, !tbaa !13, !range !19, !noundef !20
  %167 = trunc i8 %166 to i1
  %168 = zext i1 %167 to i32
  %169 = icmp eq i32 %168, 1
  br i1 %169, label %170, label %184

170:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #6
  %171 = load i32, ptr %29, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %20, i64 noundef %172)
          to label %174 unwind label %180

174:                                              ; preds = %170
  %175 = getelementptr inbounds { ptr, i64 }, ptr %36, i32 0, i32 0
  %176 = extractvalue { ptr, i64 } %173, 0
  store ptr %176, ptr %175, align 8
  %177 = getelementptr inbounds { ptr, i64 }, ptr %36, i32 0, i32 1
  %178 = extractvalue { ptr, i64 } %173, 1
  store i64 %178, ptr %177, align 8
  %179 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %36, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #6
  br label %198

180:                                              ; preds = %170
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %22, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #6
  br label %199

184:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #6
  %185 = load i32, ptr %29, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %20, i64 noundef %186)
          to label %188 unwind label %194

188:                                              ; preds = %184
  %189 = getelementptr inbounds { ptr, i64 }, ptr %37, i32 0, i32 0
  %190 = extractvalue { ptr, i64 } %187, 0
  store ptr %190, ptr %189, align 8
  %191 = getelementptr inbounds { ptr, i64 }, ptr %37, i32 0, i32 1
  %192 = extractvalue { ptr, i64 } %187, 1
  store i64 %192, ptr %191, align 8
  %193 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %37, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #6
  br label %198

194:                                              ; preds = %184
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %22, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #6
  br label %199

198:                                              ; preds = %188, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %65, !llvm.loop !21

199:                                              ; preds = %194, %180, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %290

200:                                              ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  %201 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %201, ptr %38, align 4, !tbaa !5
  br label %202

202:                                              ; preds = %252, %200
  %203 = load i32, ptr %38, align 4, !tbaa !5
  %204 = add nsw i32 %203, -1
  store i32 %204, ptr %38, align 4, !tbaa !5
  %205 = icmp ne i32 %203, 0
  br i1 %205, label %207, label %206

206:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  br label %254

207:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %208 = load ptr, ptr %12, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %40, ptr align 8 %208, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %41, ptr align 8 %2, i64 32, i1 false), !tbaa.struct !15
  %209 = load ptr, ptr %13, align 8, !tbaa !9
  %210 = load i32, ptr %38, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds double, ptr %209, i64 %211
  %213 = load double, ptr %212, align 8, !tbaa !11
  %214 = load ptr, ptr %14, align 8, !tbaa !9
  %215 = load i32, ptr %38, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds double, ptr %214, i64 %216
  %218 = load double, ptr %217, align 8, !tbaa !11
  %219 = load double, ptr %15, align 8, !tbaa !11
  %220 = call noundef double @_Z11obsdistance5CoordS_ddd(ptr noundef byval(%struct.Coord) align 8 %40, ptr noundef byval(%struct.Coord) align 8 %41, double noundef %213, double noundef %218, double noundef %219)
  store double %220, ptr %39, align 8, !tbaa !11
  %221 = load double, ptr %39, align 8, !tbaa !11
  %222 = load double, ptr %16, align 8, !tbaa !11
  %223 = fcmp ole double %221, %222
  br i1 %223, label %224, label %238

224:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #6
  %225 = load i32, ptr %38, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %24, i64 noundef %226)
          to label %228 unwind label %234

228:                                              ; preds = %224
  %229 = getelementptr inbounds { ptr, i64 }, ptr %42, i32 0, i32 0
  %230 = extractvalue { ptr, i64 } %227, 0
  store ptr %230, ptr %229, align 8
  %231 = getelementptr inbounds { ptr, i64 }, ptr %42, i32 0, i32 1
  %232 = extractvalue { ptr, i64 } %227, 1
  store i64 %232, ptr %231, align 8
  %233 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %42, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #6
  br label %252

234:                                              ; preds = %224
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %22, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #6
  br label %253

238:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #6
  %239 = load i32, ptr %38, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %24, i64 noundef %240)
          to label %242 unwind label %248

242:                                              ; preds = %238
  %243 = getelementptr inbounds { ptr, i64 }, ptr %43, i32 0, i32 0
  %244 = extractvalue { ptr, i64 } %241, 0
  store ptr %244, ptr %243, align 8
  %245 = getelementptr inbounds { ptr, i64 }, ptr %43, i32 0, i32 1
  %246 = extractvalue { ptr, i64 } %241, 1
  store i64 %246, ptr %245, align 8
  %247 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %43, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #6
  br label %252

248:                                              ; preds = %238
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %22, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #6
  br label %253

252:                                              ; preds = %242, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  br label %202, !llvm.loop !23

253:                                              ; preds = %248, %234
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  br label %290

254:                                              ; preds = %206
  %255 = call { ptr, i32 } @_ZNSt6vectorIbSaIbEE5beginEv(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  store { ptr, i32 } %255, ptr %45, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 8 %45, i64 12, i1 false)
  %256 = call { ptr, i32 } @_ZNSt6vectorIbSaIbEE3endEv(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  store { ptr, i32 } %256, ptr %47, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %46, ptr align 8 %47, i64 12, i1 false)
  %257 = getelementptr inbounds { ptr, i32 }, ptr %44, i32 0, i32 0
  %258 = load ptr, ptr %257, align 8
  %259 = getelementptr inbounds { ptr, i32 }, ptr %44, i32 0, i32 1
  %260 = load i32, ptr %259, align 8
  %261 = getelementptr inbounds { ptr, i32 }, ptr %46, i32 0, i32 0
  %262 = load ptr, ptr %261, align 8
  %263 = getelementptr inbounds { ptr, i32 }, ptr %46, i32 0, i32 1
  %264 = load i32, ptr %263, align 8
  %265 = invoke noundef zeroext i1 @"_ZSt6all_ofISt13_Bit_iteratorZ18obstacle_avoidanceiR5CoordS1_PdS3_ddiddE3$_0EbT_S5_T0_"(ptr %258, i32 %260, ptr %262, i32 %264)
          to label %266 unwind label %281

266:                                              ; preds = %254
  br i1 %265, label %267, label %285

267:                                              ; preds = %266
  %268 = call { ptr, i32 } @_ZNSt6vectorIbSaIbEE5beginEv(ptr noundef nonnull align 8 dereferenceable(40) %24) #6
  store { ptr, i32 } %268, ptr %50, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %49, ptr align 8 %50, i64 12, i1 false)
  %269 = call { ptr, i32 } @_ZNSt6vectorIbSaIbEE3endEv(ptr noundef nonnull align 8 dereferenceable(40) %24) #6
  store { ptr, i32 } %269, ptr %52, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %51, ptr align 8 %52, i64 12, i1 false)
  %270 = getelementptr inbounds { ptr, i32 }, ptr %49, i32 0, i32 0
  %271 = load ptr, ptr %270, align 8
  %272 = getelementptr inbounds { ptr, i32 }, ptr %49, i32 0, i32 1
  %273 = load i32, ptr %272, align 8
  %274 = getelementptr inbounds { ptr, i32 }, ptr %51, i32 0, i32 0
  %275 = load ptr, ptr %274, align 8
  %276 = getelementptr inbounds { ptr, i32 }, ptr %51, i32 0, i32 1
  %277 = load i32, ptr %276, align 8
  %278 = invoke noundef zeroext i1 @"_ZSt6all_ofISt13_Bit_iteratorZ18obstacle_avoidanceiR5CoordS1_PdS3_ddiddE3$_1EbT_S5_T0_"(ptr %271, i32 %273, ptr %275, i32 %277)
          to label %279 unwind label %281

279:                                              ; preds = %267
  br i1 %278, label %280, label %285

280:                                              ; preds = %279
  store i8 0, ptr %28, align 1, !tbaa !13
  br label %286

281:                                              ; preds = %267, %254
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %22, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %23, align 4
  br label %290

285:                                              ; preds = %279, %266
  store i8 1, ptr %28, align 1, !tbaa !13
  br label %286

286:                                              ; preds = %285, %280
  %287 = load i8, ptr %28, align 1, !tbaa !13, !range !19, !noundef !20
  %288 = trunc i8 %287 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  %289 = load ptr, ptr %26, align 8
  call void @llvm.stackrestore.p0(ptr %289)
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #6
  ret i1 %288

290:                                              ; preds = %281, %253, %199
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #6
  br label %291

291:                                              ; preds = %290, %74
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #6
  br label %292

292:                                              ; preds = %291, %70
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #6
  br label %293

293:                                              ; preds = %292
  %294 = load ptr, ptr %22, align 8
  %295 = load i32, ptr %23, align 4
  %296 = insertvalue { ptr, i32 } poison, ptr %294, 0
  %297 = insertvalue { ptr, i32 } %296, i32 %295, 1
  resume { ptr, i32 } %297
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZSt6all_ofISt13_Bit_iteratorZ18obstacle_avoidanceiR5CoordS1_PdS3_ddiddE3$_0EbT_S5_T0_"(ptr, i32, ptr, i32) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNSt6vectorIbSaIbEE5beginEv(ptr noundef nonnull align 8 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNSt6vectorIbSaIbEE3endEv(ptr noundef nonnull align 8 dereferenceable(40)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZSt6all_ofISt13_Bit_iteratorZ18obstacle_avoidanceiR5CoordS1_PdS3_ddiddE3$_1EbT_S5_T0_"(ptr, i32, ptr, i32) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 willreturn }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i64 0, i64 8, !11, i64 8, i64 8, !11, i64 16, i64 8, !11, i64 24, i64 8, !11}
!16 = !{!17, !12, i64 0}
!17 = !{!"_ZTS5Coord", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!18 = !{!17, !12, i64 8}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}


; 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.Coord = type { double, double, double, double }
%"class.std::vector.19" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.23" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

; 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 nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_Z11obsdistance5CoordS_ddd(ptr noundef byval(%struct.Coord) align 8, ptr noundef byval(%struct.Coord) align 8, double noundef, double noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11newparticle5CoordS_dddi(ptr dead_on_unwind noalias writable sret(%struct.Coord) align 8, ptr noundef byval(%struct.Coord) align 8, ptr noundef byval(%struct.Coord) align 8, double noundef, double noundef, double noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z8inCircleddddd(double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z18obstacle_avoidanceiR5CoordS_PdS1_ddidd(i32 noundef %0, ptr nocapture noundef nonnull align 8 dereferenceable(32) %1, ptr nocapture noundef readonly byval(%struct.Coord) align 8 %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4, double noundef %5, double noundef %6, i32 noundef %7, double noundef %8, double noundef %9) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %11 = alloca %"class.std::vector.19", align 8
  %12 = alloca %"class.std::allocator.23", align 1
  %13 = alloca %"class.std::vector.19", align 8
  %14 = alloca %"class.std::allocator.23", align 1
  %15 = alloca %struct.Coord, align 16
  %16 = alloca %"struct.std::_Bit_reference", align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #6
  %20 = sext i32 %0 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %21 unwind label %30

21:                                               ; preds = %10
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef %20, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %22 unwind label %32

22:                                               ; preds = %21
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  %23 = call ptr @llvm.stacksave.p0()
  %.not86 = icmp eq i32 %0, 0
  br i1 %.not86, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %22
  %24 = getelementptr inbounds i8, ptr %15, i64 8
  %25 = getelementptr inbounds i8, ptr %1, i64 8
  %26 = getelementptr inbounds i8, ptr %17, i64 8
  %27 = getelementptr inbounds i8, ptr %16, i64 8
  br label %34

.preheader:                                       ; preds = %79
  br i1 %.not86, label %._crit_edge, label %.lr.ph89

.lr.ph89:                                         ; preds = %.preheader
  %28 = getelementptr inbounds i8, ptr %18, i64 8
  %29 = getelementptr inbounds i8, ptr %19, i64 8
  br label %83

30:                                               ; preds = %10
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %119

32:                                               ; preds = %21
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  br label %118

34:                                               ; preds = %.lr.ph, %79
  %indvars.iv = phi i64 [ %20, %.lr.ph ], [ %indvars.iv.next, %79 ]
  %.087 = phi i32 [ %7, %.lr.ph ], [ %.1, %79 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %35 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = call noundef double @_Z11obsdistance5CoordS_ddd(ptr noundef nonnull byval(%struct.Coord) align 8 %1, ptr noundef nonnull byval(%struct.Coord) align 8 %2, double noundef %36, double noundef %38, double noundef %5)
  %40 = fcmp ugt double %39, %6
  br i1 %40, label %57, label %41

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #6
  %42 = load double, ptr %35, align 8, !tbaa !5
  %43 = load double, ptr %37, align 8, !tbaa !5
  %44 = add nsw i32 %.087, 1
  invoke void @_Z11newparticle5CoordS_dddi(ptr dead_on_unwind nonnull writable sret(%struct.Coord) align 8 %15, ptr noundef nonnull byval(%struct.Coord) align 8 %1, ptr noundef nonnull byval(%struct.Coord) align 8 %2, double noundef %42, double noundef %43, double noundef %5, i32 noundef %.087)
          to label %45 unwind label %52

45:                                               ; preds = %41
  %46 = load double, ptr %15, align 16, !tbaa !9
  %47 = call noundef zeroext i1 @_ZSt5isnand(double noundef %46)
  br i1 %47, label %51, label %48

48:                                               ; preds = %45
  %49 = load double, ptr %24, align 8, !tbaa !11
  %50 = call noundef zeroext i1 @_ZSt5isnand(double noundef %49)
  br i1 %50, label %51, label %54

51:                                               ; preds = %48, %45
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, i64 32, i1 false), !tbaa.struct !12
  br label %56

52:                                               ; preds = %41
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  br label %117

54:                                               ; preds = %48
  %55 = load <2 x double>, ptr %15, align 16, !tbaa !5
  store <2 x double> %55, ptr %1, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %54, %51
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  br label %57

57:                                               ; preds = %56, %34
  %.1 = phi i32 [ %44, %56 ], [ %.087, %34 ]
  %58 = load double, ptr %1, align 8, !tbaa !9
  %59 = load double, ptr %25, align 8, !tbaa !11
  %60 = load double, ptr %35, align 8, !tbaa !5
  %61 = load double, ptr %37, align 8, !tbaa !5
  %62 = call noundef zeroext i1 @_Z8inCircleddddd(double noundef %58, double noundef %59, double noundef %60, double noundef %61, double noundef %5)
  br i1 %62, label %63, label %71

63:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #6
  %64 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %indvars.iv.next)
          to label %65 unwind label %69

65:                                               ; preds = %63
  %66 = extractvalue { ptr, i64 } %64, 0
  store ptr %66, ptr %16, align 8
  %67 = extractvalue { ptr, i64 } %64, 1
  store i64 %67, ptr %27, align 8
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %16, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  br label %79

69:                                               ; preds = %63
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  br label %117

71:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #6
  %72 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %11, i64 noundef %indvars.iv.next)
          to label %73 unwind label %77

73:                                               ; preds = %71
  %74 = extractvalue { ptr, i64 } %72, 0
  store ptr %74, ptr %17, align 8
  %75 = extractvalue { ptr, i64 } %72, 1
  store i64 %75, ptr %26, align 8
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %17, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  br label %79

77:                                               ; preds = %71
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  br label %117

79:                                               ; preds = %73, %65
  %.not = icmp eq i64 %indvars.iv.next, 0
  br i1 %.not, label %.preheader, label %34, !llvm.loop !13

._crit_edge:                                      ; preds = %106, %22, %.preheader
  %80 = call { ptr, i32 } @_ZNSt6vectorIbSaIbEE5beginEv(ptr noundef nonnull align 8 dereferenceable(40) %11) #6
  %.fca.0.extract15 = extractvalue { ptr, i32 } %80, 0
  %.fca.1.extract16 = extractvalue { ptr, i32 } %80, 1
  %81 = call { ptr, i32 } @_ZNSt6vectorIbSaIbEE3endEv(ptr noundef nonnull align 8 dereferenceable(40) %11) #6
  %.fca.0.extract9 = extractvalue { ptr, i32 } %81, 0
  %.fca.1.extract10 = extractvalue { ptr, i32 } %81, 1
  %82 = invoke noundef zeroext i1 @"_ZSt6all_ofISt13_Bit_iteratorZ18obstacle_avoidanceiR5CoordS1_PdS3_ddiddE3$_0EbT_S5_T0_"(ptr %.fca.0.extract15, i32 %.fca.1.extract16, ptr %.fca.0.extract9, i32 %.fca.1.extract10)
          to label %107 unwind label %113

83:                                               ; preds = %.lr.ph89, %106
  %indvars.iv92 = phi i64 [ %20, %.lr.ph89 ], [ %indvars.iv.next93, %106 ]
  %indvars.iv.next93 = add nsw i64 %indvars.iv92, -1
  %84 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next93
  %85 = load double, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next93
  %87 = load double, ptr %86, align 8, !tbaa !5
  %88 = call noundef double @_Z11obsdistance5CoordS_ddd(ptr noundef nonnull byval(%struct.Coord) align 8 %1, ptr noundef nonnull byval(%struct.Coord) align 8 %2, double noundef %85, double noundef %87, double noundef %5)
  %89 = fcmp ugt double %88, %6
  br i1 %89, label %98, label %90

90:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #6
  %91 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef %indvars.iv.next93)
          to label %92 unwind label %96

92:                                               ; preds = %90
  %93 = extractvalue { ptr, i64 } %91, 0
  store ptr %93, ptr %18, align 8
  %94 = extractvalue { ptr, i64 } %91, 1
  store i64 %94, ptr %28, align 8
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %18, i1 noundef zeroext true) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #6
  br label %106

96:                                               ; preds = %90
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #6
  br label %117

98:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #6
  %99 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef %indvars.iv.next93)
          to label %100 unwind label %104

100:                                              ; preds = %98
  %101 = extractvalue { ptr, i64 } %99, 0
  store ptr %101, ptr %19, align 8
  %102 = extractvalue { ptr, i64 } %99, 1
  store i64 %102, ptr %29, align 8
  %103 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext false) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  br label %106

104:                                              ; preds = %98
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  br label %117

106:                                              ; preds = %100, %92
  %.not79 = icmp eq i64 %indvars.iv.next93, 0
  br i1 %.not79, label %._crit_edge, label %83, !llvm.loop !15

107:                                              ; preds = %._crit_edge
  br i1 %82, label %108, label %115

108:                                              ; preds = %107
  %109 = call { ptr, i32 } @_ZNSt6vectorIbSaIbEE5beginEv(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  %.fca.0.extract3 = extractvalue { ptr, i32 } %109, 0
  %.fca.1.extract4 = extractvalue { ptr, i32 } %109, 1
  %110 = call { ptr, i32 } @_ZNSt6vectorIbSaIbEE3endEv(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  %.fca.0.extract = extractvalue { ptr, i32 } %110, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %110, 1
  %111 = invoke noundef zeroext i1 @"_ZSt6all_ofISt13_Bit_iteratorZ18obstacle_avoidanceiR5CoordS1_PdS3_ddiddE3$_1EbT_S5_T0_"(ptr %.fca.0.extract3, i32 %.fca.1.extract4, ptr %.fca.0.extract, i32 %.fca.1.extract)
          to label %112 unwind label %113

112:                                              ; preds = %108
  br i1 %111, label %116, label %115

113:                                              ; preds = %108, %._crit_edge
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %117

115:                                              ; preds = %112, %107
  br label %116

116:                                              ; preds = %112, %115
  %.076 = phi i1 [ true, %115 ], [ false, %112 ]
  call void @llvm.stackrestore.p0(ptr %23)
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #6
  ret i1 %.076

117:                                              ; preds = %96, %104, %52, %69, %77, %113
  %.pn81.pn = phi { ptr, i32 } [ %114, %113 ], [ %70, %69 ], [ %78, %77 ], [ %53, %52 ], [ %97, %96 ], [ %105, %104 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  br label %118

118:                                              ; preds = %117, %32
  %.pn81.pn.pn = phi { ptr, i32 } [ %.pn81.pn, %117 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #6
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #6
  br label %119

119:                                              ; preds = %118, %30
  %.pn81.pn.pn.pn = phi { ptr, i32 } [ %.pn81.pn.pn, %118 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #6
  resume { ptr, i32 } %.pn81.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZSt6all_ofISt13_Bit_iteratorZ18obstacle_avoidanceiR5CoordS1_PdS3_ddiddE3$_0EbT_S5_T0_"(ptr, i32, ptr, i32) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNSt6vectorIbSaIbEE5beginEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNSt6vectorIbSaIbEE3endEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @"_ZSt6all_ofISt13_Bit_iteratorZ18obstacle_avoidanceiR5CoordS1_PdS3_ddiddE3$_1EbT_S5_T0_"(ptr, i32, ptr, i32) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 willreturn }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 0}
!10 = !{!"_ZTS5Coord", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!11 = !{!10, !6, i64 8}
!12 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass