; LLVM IR from robotics-upo/Heuristic_path_planners :: src/utils (LineOfSight)

; 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.Planners::utils::Vec3i" = type { i32, i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8Planners5utils11LineOfSight11bresenham3DENS0_5Vec3iES2_RKNS0_13DiscreteWorldESt10shared_ptrISt6vectorIS2_SaIS2_EEE(i64 %0, i32 %1, i64 %2, i32 %3, ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef %5) #0 {
  %7 = alloca i1, align 1
  %8 = alloca %"class.Planners::utils::Vec3i", align 4
  %9 = alloca { i64, i32 }, align 4
  %10 = alloca %"class.Planners::utils::Vec3i", align 4
  %11 = alloca { i64, i32 }, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.Planners::utils::Vec3i", align 4
  %17 = alloca %"class.Planners::utils::Vec3i", align 4
  %18 = alloca %"class.Planners::utils::Vec3i", align 4
  %19 = alloca %"class.Planners::utils::Vec3i", align 4
  %20 = alloca %"class.Planners::utils::Vec3i", align 4
  %21 = alloca %"class.Planners::utils::Vec3i", align 4
  %22 = alloca { i64, i32 }, align 8
  %23 = alloca { i64, i32 }, align 8
  %24 = alloca i32, align 4
  %25 = getelementptr inbounds { i64, i32 }, ptr %9, i32 0, i32 0
  store i64 %0, ptr %25, align 4
  %26 = getelementptr inbounds { i64, i32 }, ptr %9, i32 0, i32 1
  store i32 %1, ptr %26, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %9, i64 12, i1 false)
  %27 = getelementptr inbounds { i64, i32 }, ptr %11, i32 0, i32 0
  store i64 %2, ptr %27, align 4
  %28 = getelementptr inbounds { i64, i32 }, ptr %11, i32 0, i32 1
  store i32 %3, ptr %28, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %11, i64 12, i1 false)
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  %29 = call noundef i32 @_ZN8Planners5utils8geometry21distanceBetween2NodesERKNS0_5Vec3iES4_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %10)
  %30 = icmp ule i32 %29, 173
  br i1 %30, label %31, label %32

31:                                               ; preds = %6
  store i1 true, ptr %7, align 1
  br label %310

32:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %8, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %10, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #6
  %33 = call { i64, i32 } @_ZNK8Planners5utils5Vec3imiERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %18)
  store { i64, i32 } %33, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 8 %22, i64 12, i1 false)
  %34 = call { i64, i32 } @_ZN8Planners5utils8geometry3absERKNS0_5Vec3iE(ptr noundef nonnull align 4 dereferenceable(12) %21)
  store { i64, i32 } %34, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %23, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %20, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  %35 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %19, i32 0, i32 0
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 0
  %38 = load i32, ptr %37, align 4, !tbaa !12
  %39 = icmp sgt i32 %36, %38
  br i1 %39, label %40, label %42

40:                                               ; preds = %32
  %41 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 0
  store i32 1, ptr %41, align 4, !tbaa !12
  br label %44

42:                                               ; preds = %32
  %43 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 0
  store i32 -1, ptr %43, align 4, !tbaa !12
  br label %44

44:                                               ; preds = %42, %40
  %45 = phi ptr [ %41, %40 ], [ %43, %42 ]
  %46 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %19, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !14
  %48 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !14
  %50 = icmp sgt i32 %47, %49
  br i1 %50, label %51, label %53

51:                                               ; preds = %44
  %52 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 1
  store i32 1, ptr %52, align 4, !tbaa !14
  br label %55

53:                                               ; preds = %44
  %54 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 1
  store i32 -1, ptr %54, align 4, !tbaa !14
  br label %55

55:                                               ; preds = %53, %51
  %56 = phi ptr [ %52, %51 ], [ %54, %53 ]
  %57 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %19, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !15
  %59 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 2
  %60 = load i32, ptr %59, align 4, !tbaa !15
  %61 = icmp sgt i32 %58, %60
  br i1 %61, label %62, label %64

62:                                               ; preds = %55
  %63 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 2
  store i32 1, ptr %63, align 4, !tbaa !15
  br label %66

64:                                               ; preds = %55
  %65 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 2
  store i32 -1, ptr %65, align 4, !tbaa !15
  br label %66

66:                                               ; preds = %64, %62
  %67 = phi ptr [ %63, %62 ], [ %65, %64 ]
  %68 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %69 = load i32, ptr %68, align 4, !tbaa !12
  %70 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !14
  %72 = icmp sge i32 %69, %71
  br i1 %72, label %73, label %151

73:                                               ; preds = %66
  %74 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %75 = load i32, ptr %74, align 4, !tbaa !12
  %76 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %77 = load i32, ptr %76, align 4, !tbaa !15
  %78 = icmp sge i32 %75, %77
  br i1 %78, label %79, label %151

79:                                               ; preds = %73
  %80 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %81 = load i32, ptr %80, align 4, !tbaa !14
  %82 = mul nsw i32 2, %81
  %83 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %84 = load i32, ptr %83, align 4, !tbaa !12
  %85 = sub nsw i32 %82, %84
  store i32 %85, ptr %14, align 4, !tbaa !10
  %86 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %87 = load i32, ptr %86, align 4, !tbaa !15
  %88 = mul nsw i32 2, %87
  %89 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %90 = load i32, ptr %89, align 4, !tbaa !12
  %91 = sub nsw i32 %88, %90
  store i32 %91, ptr %15, align 4, !tbaa !10
  br label %92

92:                                               ; preds = %149, %79
  %93 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 0
  %94 = load i32, ptr %93, align 4, !tbaa !12
  %95 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %19, i32 0, i32 0
  %96 = load i32, ptr %95, align 4, !tbaa !12
  %97 = icmp ne i32 %94, %96
  br i1 %97, label %98, label %150

98:                                               ; preds = %92
  %99 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 0
  %100 = load i32, ptr %99, align 4, !tbaa !12
  %101 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !12
  %103 = add nsw i32 %102, %100
  store i32 %103, ptr %101, align 4, !tbaa !12
  %104 = load i32, ptr %14, align 4, !tbaa !10
  %105 = icmp sge i32 %104, 0
  br i1 %105, label %106, label %117

106:                                              ; preds = %98
  %107 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !14
  %109 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 1
  %110 = load i32, ptr %109, align 4, !tbaa !14
  %111 = add nsw i32 %110, %108
  store i32 %111, ptr %109, align 4, !tbaa !14
  %112 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %113 = load i32, ptr %112, align 4, !tbaa !12
  %114 = mul nsw i32 2, %113
  %115 = load i32, ptr %14, align 4, !tbaa !10
  %116 = sub nsw i32 %115, %114
  store i32 %116, ptr %14, align 4, !tbaa !10
  br label %117

117:                                              ; preds = %106, %98
  %118 = load i32, ptr %15, align 4, !tbaa !10
  %119 = icmp sge i32 %118, 0
  br i1 %119, label %120, label %131

120:                                              ; preds = %117
  %121 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 2
  %122 = load i32, ptr %121, align 4, !tbaa !15
  %123 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 2
  %124 = load i32, ptr %123, align 4, !tbaa !15
  %125 = add nsw i32 %124, %122
  store i32 %125, ptr %123, align 4, !tbaa !15
  %126 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %127 = load i32, ptr %126, align 4, !tbaa !12
  %128 = mul nsw i32 2, %127
  %129 = load i32, ptr %15, align 4, !tbaa !10
  %130 = sub nsw i32 %129, %128
  store i32 %130, ptr %15, align 4, !tbaa !10
  br label %131

131:                                              ; preds = %120, %117
  %132 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !14
  %134 = mul nsw i32 2, %133
  %135 = load i32, ptr %14, align 4, !tbaa !10
  %136 = add nsw i32 %135, %134
  store i32 %136, ptr %14, align 4, !tbaa !10
  %137 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %138 = load i32, ptr %137, align 4, !tbaa !15
  %139 = mul nsw i32 2, %138
  %140 = load i32, ptr %15, align 4, !tbaa !10
  %141 = add nsw i32 %140, %139
  store i32 %141, ptr %15, align 4, !tbaa !10
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = call noundef zeroext i1 @_ZNK8Planners5utils13DiscreteWorld10isOccupiedERKNS0_5Vec3iE(ptr noundef nonnull align 8 dereferenceable(56) %142, ptr noundef nonnull align 4 dereferenceable(12) %18)
  br i1 %143, label %144, label %145

144:                                              ; preds = %131
  store i1 false, ptr %7, align 1
  store i32 1, ptr %24, align 4
  br label %309

145:                                              ; preds = %131
  %146 = call noundef zeroext i1 @_ZStneISt6vectorIN8Planners5utils5Vec3iESaIS3_EEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr null) #6
  br i1 %146, label %147, label %149

147:                                              ; preds = %145
  %148 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorIN8Planners5utils5Vec3iESaIS3_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @_ZNSt6vectorIN8Planners5utils5Vec3iESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %148, ptr noundef nonnull align 4 dereferenceable(12) %18)
  br label %149

149:                                              ; preds = %147, %145
  br label %92, !llvm.loop !16

150:                                              ; preds = %92
  br label %308

151:                                              ; preds = %73, %66
  %152 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %153 = load i32, ptr %152, align 4, !tbaa !14
  %154 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %155 = load i32, ptr %154, align 4, !tbaa !12
  %156 = icmp sge i32 %153, %155
  br i1 %156, label %157, label %235

157:                                              ; preds = %151
  %158 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %159 = load i32, ptr %158, align 4, !tbaa !14
  %160 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %161 = load i32, ptr %160, align 4, !tbaa !15
  %162 = icmp sge i32 %159, %161
  br i1 %162, label %163, label %235

163:                                              ; preds = %157
  %164 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %165 = load i32, ptr %164, align 4, !tbaa !12
  %166 = mul nsw i32 2, %165
  %167 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %168 = load i32, ptr %167, align 4, !tbaa !14
  %169 = sub nsw i32 %166, %168
  store i32 %169, ptr %14, align 4, !tbaa !10
  %170 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %171 = load i32, ptr %170, align 4, !tbaa !15
  %172 = mul nsw i32 2, %171
  %173 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %174 = load i32, ptr %173, align 4, !tbaa !14
  %175 = sub nsw i32 %172, %174
  store i32 %175, ptr %15, align 4, !tbaa !10
  br label %176

176:                                              ; preds = %233, %163
  %177 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !14
  %179 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %19, i32 0, i32 1
  %180 = load i32, ptr %179, align 4, !tbaa !14
  %181 = icmp ne i32 %178, %180
  br i1 %181, label %182, label %234

182:                                              ; preds = %176
  %183 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 1
  %184 = load i32, ptr %183, align 4, !tbaa !14
  %185 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 1
  %186 = load i32, ptr %185, align 4, !tbaa !14
  %187 = add nsw i32 %186, %184
  store i32 %187, ptr %185, align 4, !tbaa !14
  %188 = load i32, ptr %14, align 4, !tbaa !10
  %189 = icmp sge i32 %188, 0
  br i1 %189, label %190, label %201

190:                                              ; preds = %182
  %191 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 0
  %192 = load i32, ptr %191, align 4, !tbaa !12
  %193 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 0
  %194 = load i32, ptr %193, align 4, !tbaa !12
  %195 = add nsw i32 %194, %192
  store i32 %195, ptr %193, align 4, !tbaa !12
  %196 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %197 = load i32, ptr %196, align 4, !tbaa !14
  %198 = mul nsw i32 2, %197
  %199 = load i32, ptr %14, align 4, !tbaa !10
  %200 = sub nsw i32 %199, %198
  store i32 %200, ptr %14, align 4, !tbaa !10
  br label %201

201:                                              ; preds = %190, %182
  %202 = load i32, ptr %15, align 4, !tbaa !10
  %203 = icmp sge i32 %202, 0
  br i1 %203, label %204, label %215

204:                                              ; preds = %201
  %205 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 2
  %206 = load i32, ptr %205, align 4, !tbaa !15
  %207 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 2
  %208 = load i32, ptr %207, align 4, !tbaa !15
  %209 = add nsw i32 %208, %206
  store i32 %209, ptr %207, align 4, !tbaa !15
  %210 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %211 = load i32, ptr %210, align 4, !tbaa !14
  %212 = mul nsw i32 2, %211
  %213 = load i32, ptr %15, align 4, !tbaa !10
  %214 = sub nsw i32 %213, %212
  store i32 %214, ptr %15, align 4, !tbaa !10
  br label %215

215:                                              ; preds = %204, %201
  %216 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %217 = load i32, ptr %216, align 4, !tbaa !12
  %218 = mul nsw i32 2, %217
  %219 = load i32, ptr %14, align 4, !tbaa !10
  %220 = add nsw i32 %219, %218
  store i32 %220, ptr %14, align 4, !tbaa !10
  %221 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %222 = load i32, ptr %221, align 4, !tbaa !15
  %223 = mul nsw i32 2, %222
  %224 = load i32, ptr %15, align 4, !tbaa !10
  %225 = add nsw i32 %224, %223
  store i32 %225, ptr %15, align 4, !tbaa !10
  %226 = load ptr, ptr %12, align 8, !tbaa !5
  %227 = call noundef zeroext i1 @_ZNK8Planners5utils13DiscreteWorld10isOccupiedERKNS0_5Vec3iE(ptr noundef nonnull align 8 dereferenceable(56) %226, ptr noundef nonnull align 4 dereferenceable(12) %18)
  br i1 %227, label %228, label %229

228:                                              ; preds = %215
  store i1 false, ptr %7, align 1
  store i32 1, ptr %24, align 4
  br label %309

229:                                              ; preds = %215
  %230 = call noundef zeroext i1 @_ZStneISt6vectorIN8Planners5utils5Vec3iESaIS3_EEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr null) #6
  br i1 %230, label %231, label %233

231:                                              ; preds = %229
  %232 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorIN8Planners5utils5Vec3iESaIS3_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @_ZNSt6vectorIN8Planners5utils5Vec3iESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %232, ptr noundef nonnull align 4 dereferenceable(12) %18)
  br label %233

233:                                              ; preds = %231, %229
  br label %176, !llvm.loop !18

234:                                              ; preds = %176
  br label %307

235:                                              ; preds = %157, %151
  %236 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %237 = load i32, ptr %236, align 4, !tbaa !14
  %238 = mul nsw i32 2, %237
  %239 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %240 = load i32, ptr %239, align 4, !tbaa !15
  %241 = sub nsw i32 %238, %240
  store i32 %241, ptr %14, align 4, !tbaa !10
  %242 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %243 = load i32, ptr %242, align 4, !tbaa !12
  %244 = mul nsw i32 2, %243
  %245 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %246 = load i32, ptr %245, align 4, !tbaa !15
  %247 = sub nsw i32 %244, %246
  store i32 %247, ptr %15, align 4, !tbaa !10
  br label %248

248:                                              ; preds = %305, %235
  %249 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 2
  %250 = load i32, ptr %249, align 4, !tbaa !15
  %251 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %19, i32 0, i32 2
  %252 = load i32, ptr %251, align 4, !tbaa !15
  %253 = icmp ne i32 %250, %252
  br i1 %253, label %254, label %306

254:                                              ; preds = %248
  %255 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 2
  %256 = load i32, ptr %255, align 4, !tbaa !15
  %257 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 2
  %258 = load i32, ptr %257, align 4, !tbaa !15
  %259 = add nsw i32 %258, %256
  store i32 %259, ptr %257, align 4, !tbaa !15
  %260 = load i32, ptr %14, align 4, !tbaa !10
  %261 = icmp sge i32 %260, 0
  br i1 %261, label %262, label %273

262:                                              ; preds = %254
  %263 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 1
  %264 = load i32, ptr %263, align 4, !tbaa !14
  %265 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 1
  %266 = load i32, ptr %265, align 4, !tbaa !14
  %267 = add nsw i32 %266, %264
  store i32 %267, ptr %265, align 4, !tbaa !14
  %268 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %269 = load i32, ptr %268, align 4, !tbaa !15
  %270 = mul nsw i32 2, %269
  %271 = load i32, ptr %14, align 4, !tbaa !10
  %272 = sub nsw i32 %271, %270
  store i32 %272, ptr %14, align 4, !tbaa !10
  br label %273

273:                                              ; preds = %262, %254
  %274 = load i32, ptr %15, align 4, !tbaa !10
  %275 = icmp sge i32 %274, 0
  br i1 %275, label %276, label %287

276:                                              ; preds = %273
  %277 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %16, i32 0, i32 0
  %278 = load i32, ptr %277, align 4, !tbaa !12
  %279 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %18, i32 0, i32 0
  %280 = load i32, ptr %279, align 4, !tbaa !12
  %281 = add nsw i32 %280, %278
  store i32 %281, ptr %279, align 4, !tbaa !12
  %282 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 2
  %283 = load i32, ptr %282, align 4, !tbaa !15
  %284 = mul nsw i32 2, %283
  %285 = load i32, ptr %15, align 4, !tbaa !10
  %286 = sub nsw i32 %285, %284
  store i32 %286, ptr %15, align 4, !tbaa !10
  br label %287

287:                                              ; preds = %276, %273
  %288 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 1
  %289 = load i32, ptr %288, align 4, !tbaa !14
  %290 = mul nsw i32 2, %289
  %291 = load i32, ptr %14, align 4, !tbaa !10
  %292 = add nsw i32 %291, %290
  store i32 %292, ptr %14, align 4, !tbaa !10
  %293 = getelementptr inbounds %"class.Planners::utils::Vec3i", ptr %17, i32 0, i32 0
  %294 = load i32, ptr %293, align 4, !tbaa !12
  %295 = mul nsw i32 2, %294
  %296 = load i32, ptr %15, align 4, !tbaa !10
  %297 = add nsw i32 %296, %295
  store i32 %297, ptr %15, align 4, !tbaa !10
  %298 = load ptr, ptr %12, align 8, !tbaa !5
  %299 = call noundef zeroext i1 @_ZNK8Planners5utils13DiscreteWorld10isOccupiedERKNS0_5Vec3iE(ptr noundef nonnull align 8 dereferenceable(56) %298, ptr noundef nonnull align 4 dereferenceable(12) %18)
  br i1 %299, label %300, label %301

300:                                              ; preds = %287
  store i1 false, ptr %7, align 1
  store i32 1, ptr %24, align 4
  br label %309

301:                                              ; preds = %287
  %302 = call noundef zeroext i1 @_ZStneISt6vectorIN8Planners5utils5Vec3iESaIS3_EEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr null) #6
  br i1 %302, label %303, label %305

303:                                              ; preds = %301
  %304 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorIN8Planners5utils5Vec3iESaIS3_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @_ZNSt6vectorIN8Planners5utils5Vec3iESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %304, ptr noundef nonnull align 4 dereferenceable(12) %18)
  br label %305

305:                                              ; preds = %303, %301
  br label %248, !llvm.loop !19

306:                                              ; preds = %248
  br label %307

307:                                              ; preds = %306, %234
  br label %308

308:                                              ; preds = %307, %150
  store i1 true, ptr %7, align 1
  store i32 1, ptr %24, align 4
  br label %309

309:                                              ; preds = %308, %300, %228, %144
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %310

310:                                              ; preds = %309, %31
  %311 = load i1, ptr %7, align 1
  ret i1 %311
}

; 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

declare noundef i32 @_ZN8Planners5utils8geometry21distanceBetween2NodesERKNS0_5Vec3iES4_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2

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

declare { i64, i32 } @_ZN8Planners5utils8geometry3absERKNS0_5Vec3iE(ptr noundef nonnull align 4 dereferenceable(12)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i32 } @_ZNK8Planners5utils5Vec3imiERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK8Planners5utils13DiscreteWorld10isOccupiedERKNS0_5Vec3iE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN8Planners5utils5Vec3iESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

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


; 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.Planners::utils::Vec3i" = type { i32, i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8Planners5utils11LineOfSight11bresenham3DENS0_5Vec3iES2_RKNS0_13DiscreteWorldESt10shared_ptrISt6vectorIS2_SaIS2_EEE(i64 %0, i32 %1, i64 %2, i32 %3, ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = alloca %"class.Planners::utils::Vec3i", align 8
  %8 = alloca %"class.Planners::utils::Vec3i", align 8
  %9 = alloca %"class.Planners::utils::Vec3i", align 4
  %10 = alloca %"class.Planners::utils::Vec3i", align 4
  %11 = alloca %"class.Planners::utils::Vec3i", align 8
  store i64 %0, ptr %7, align 8
  %.sroa.295.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store i32 %1, ptr %.sroa.295.0..sroa_idx, align 8
  store i64 %2, ptr %8, align 8
  %.sroa.293.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  store i32 %3, ptr %.sroa.293.0..sroa_idx, align 8
  %12 = call noundef i32 @_ZN8Planners5utils8geometry21distanceBetween2NodesERKNS0_5Vec3iES4_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %13 = icmp ult i32 %12, 174
  br i1 %13, label %124, label %14

14:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(12) %7, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 8 dereferenceable(12) %8, i64 12, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #6
  %15 = call { i64, i32 } @_ZNK8Planners5utils5Vec3imiERKS1_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %.fca.0.extract1 = extractvalue { i64, i32 } %15, 0
  %.fca.1.extract2 = extractvalue { i64, i32 } %15, 1
  store i64 %.fca.0.extract1, ptr %11, align 8
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store i32 %.fca.1.extract2, ptr %.sroa.24.0..sroa_idx, align 8
  %16 = call { i64, i32 } @_ZN8Planners5utils8geometry3absERKNS0_5Vec3iE(ptr noundef nonnull align 4 dereferenceable(12) %11)
  %.fca.0.extract = extractvalue { i64, i32 } %16, 0
  %.fca.1.extract = extractvalue { i64, i32 } %16, 1
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #6
  %17 = load i32, ptr %10, align 4, !tbaa !10
  %18 = load i32, ptr %9, align 4, !tbaa !10
  %19 = icmp sgt i32 %17, %18
  %. = select i1 %19, i32 1, i32 -1
  %20 = getelementptr inbounds i8, ptr %10, i64 4
  %21 = load i32, ptr %20, align 4, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %9, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !12
  %24 = icmp sgt i32 %21, %23
  %.sroa.7.0 = select i1 %24, i32 1, i32 -1
  %25 = getelementptr inbounds i8, ptr %10, i64 8
  %26 = load i32, ptr %25, align 4, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %9, i64 8
  %28 = load i32, ptr %27, align 4, !tbaa !13
  %29 = icmp sgt i32 %26, %28
  %.sroa.12.0 = select i1 %29, i32 1, i32 -1
  %.sroa.06.0.extract.trunc = trunc i64 %.fca.0.extract to i32
  %.sroa.06.4.extract.shift = lshr i64 %.fca.0.extract, 32
  %.sroa.06.4.extract.trunc = trunc nuw i64 %.sroa.06.4.extract.shift to i32
  %.not = icmp slt i32 %.sroa.06.0.extract.trunc, %.sroa.06.4.extract.trunc
  %.not108 = icmp sgt i32 %.fca.1.extract, %.sroa.06.0.extract.trunc
  %or.cond = select i1 %.not, i1 true, i1 %.not108
  br i1 %or.cond, label %61, label %30

30:                                               ; preds = %14
  %31 = shl nsw i32 %.sroa.06.4.extract.trunc, 1
  %32 = shl nsw i32 %.fca.1.extract, 1
  %.not113119 = icmp eq i32 %18, %17
  br i1 %.not113119, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %30
  %33 = sub nsw i32 %32, %.sroa.06.0.extract.trunc
  %34 = sub nsw i32 %31, %.sroa.06.0.extract.trunc
  %35 = shl nsw i32 %.sroa.06.0.extract.trunc, 1
  br label %36

36:                                               ; preds = %.lr.ph, %58
  %37 = phi i32 [ %18, %.lr.ph ], [ %59, %58 ]
  %.097121 = phi i32 [ %34, %.lr.ph ], [ %51, %58 ]
  %.099120 = phi i32 [ %33, %.lr.ph ], [ %52, %58 ]
  %38 = add nsw i32 %37, %.
  store i32 %38, ptr %9, align 4, !tbaa !10
  %39 = icmp sgt i32 %.097121, -1
  br i1 %39, label %40, label %44

40:                                               ; preds = %36
  %41 = load i32, ptr %22, align 4, !tbaa !12
  %42 = add nsw i32 %41, %.sroa.7.0
  store i32 %42, ptr %22, align 4, !tbaa !12
  %43 = sub nsw i32 %.097121, %35
  br label %44

44:                                               ; preds = %40, %36
  %.198 = phi i32 [ %43, %40 ], [ %.097121, %36 ]
  %45 = icmp sgt i32 %.099120, -1
  br i1 %45, label %46, label %50

46:                                               ; preds = %44
  %47 = load i32, ptr %27, align 4, !tbaa !13
  %48 = add nsw i32 %47, %.sroa.12.0
  store i32 %48, ptr %27, align 4, !tbaa !13
  %49 = sub nsw i32 %.099120, %35
  br label %50

50:                                               ; preds = %46, %44
  %.1100 = phi i32 [ %49, %46 ], [ %.099120, %44 ]
  %51 = add nsw i32 %.198, %31
  %52 = add nsw i32 %.1100, %32
  %53 = call noundef zeroext i1 @_ZNK8Planners5utils13DiscreteWorld10isOccupiedERKNS0_5Vec3iE(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 4 dereferenceable(12) %9)
  br i1 %53, label %.loopexit.loopexit140, label %54

54:                                               ; preds = %50
  %55 = call noundef zeroext i1 @_ZStneISt6vectorIN8Planners5utils5Vec3iESaIS3_EEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr null) #6
  br i1 %55, label %56, label %58

56:                                               ; preds = %54
  %57 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorIN8Planners5utils5Vec3iESaIS3_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @_ZNSt6vectorIN8Planners5utils5Vec3iESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 4 dereferenceable(12) %9)
  br label %58

58:                                               ; preds = %56, %54
  %59 = load i32, ptr %9, align 4, !tbaa !10
  %60 = load i32, ptr %10, align 4, !tbaa !10
  %.not113 = icmp eq i32 %59, %60
  br i1 %.not113, label %.loopexit.loopexit140, label %36, !llvm.loop !14

61:                                               ; preds = %14
  %.not109 = icmp slt i32 %.sroa.06.4.extract.trunc, %.sroa.06.0.extract.trunc
  %.not110 = icmp sgt i32 %.fca.1.extract, %.sroa.06.4.extract.trunc
  %or.cond114 = select i1 %.not109, i1 true, i1 %.not110
  br i1 %or.cond114, label %93, label %62

62:                                               ; preds = %61
  %63 = shl nsw i32 %.sroa.06.0.extract.trunc, 1
  %64 = shl nsw i32 %.fca.1.extract, 1
  %.not112124 = icmp eq i32 %23, %21
  br i1 %.not112124, label %.loopexit, label %.lr.ph127

.lr.ph127:                                        ; preds = %62
  %65 = sub nsw i32 %64, %.sroa.06.4.extract.trunc
  %66 = sub nsw i32 %63, %.sroa.06.4.extract.trunc
  %67 = shl nsw i32 %.sroa.06.4.extract.trunc, 1
  br label %68

68:                                               ; preds = %.lr.ph127, %90
  %69 = phi i32 [ %23, %.lr.ph127 ], [ %91, %90 ]
  %.2126 = phi i32 [ %66, %.lr.ph127 ], [ %83, %90 ]
  %.2101125 = phi i32 [ %65, %.lr.ph127 ], [ %84, %90 ]
  %70 = add nsw i32 %69, %.sroa.7.0
  store i32 %70, ptr %22, align 4, !tbaa !12
  %71 = icmp sgt i32 %.2126, -1
  br i1 %71, label %72, label %76

72:                                               ; preds = %68
  %73 = load i32, ptr %9, align 4, !tbaa !10
  %74 = add nsw i32 %73, %.
  store i32 %74, ptr %9, align 4, !tbaa !10
  %75 = sub nsw i32 %.2126, %67
  br label %76

76:                                               ; preds = %72, %68
  %.3 = phi i32 [ %75, %72 ], [ %.2126, %68 ]
  %77 = icmp sgt i32 %.2101125, -1
  br i1 %77, label %78, label %82

78:                                               ; preds = %76
  %79 = load i32, ptr %27, align 4, !tbaa !13
  %80 = add nsw i32 %79, %.sroa.12.0
  store i32 %80, ptr %27, align 4, !tbaa !13
  %81 = sub nsw i32 %.2101125, %67
  br label %82

82:                                               ; preds = %78, %76
  %.3102 = phi i32 [ %81, %78 ], [ %.2101125, %76 ]
  %83 = add nsw i32 %.3, %63
  %84 = add nsw i32 %.3102, %64
  %85 = call noundef zeroext i1 @_ZNK8Planners5utils13DiscreteWorld10isOccupiedERKNS0_5Vec3iE(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 4 dereferenceable(12) %9)
  br i1 %85, label %.loopexit.loopexit138, label %86

86:                                               ; preds = %82
  %87 = call noundef zeroext i1 @_ZStneISt6vectorIN8Planners5utils5Vec3iESaIS3_EEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr null) #6
  br i1 %87, label %88, label %90

88:                                               ; preds = %86
  %89 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorIN8Planners5utils5Vec3iESaIS3_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @_ZNSt6vectorIN8Planners5utils5Vec3iESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %89, ptr noundef nonnull align 4 dereferenceable(12) %9)
  br label %90

90:                                               ; preds = %88, %86
  %91 = load i32, ptr %22, align 4, !tbaa !12
  %92 = load i32, ptr %20, align 4, !tbaa !12
  %.not112 = icmp eq i32 %91, %92
  br i1 %.not112, label %.loopexit.loopexit138, label %68, !llvm.loop !16

93:                                               ; preds = %61
  %94 = shl nsw i32 %.sroa.06.4.extract.trunc, 1
  %95 = shl nsw i32 %.sroa.06.0.extract.trunc, 1
  %.not111131 = icmp eq i32 %28, %26
  br i1 %.not111131, label %.loopexit, label %.lr.ph134

.lr.ph134:                                        ; preds = %93
  %96 = sub nsw i32 %95, %.fca.1.extract
  %97 = sub nsw i32 %94, %.fca.1.extract
  %98 = shl nsw i32 %.fca.1.extract, 1
  br label %99

99:                                               ; preds = %.lr.ph134, %121
  %100 = phi i32 [ %28, %.lr.ph134 ], [ %122, %121 ]
  %.4133 = phi i32 [ %97, %.lr.ph134 ], [ %114, %121 ]
  %.4103132 = phi i32 [ %96, %.lr.ph134 ], [ %115, %121 ]
  %101 = add nsw i32 %100, %.sroa.12.0
  store i32 %101, ptr %27, align 4, !tbaa !13
  %102 = icmp sgt i32 %.4133, -1
  br i1 %102, label %103, label %107

103:                                              ; preds = %99
  %104 = load i32, ptr %22, align 4, !tbaa !12
  %105 = add nsw i32 %104, %.sroa.7.0
  store i32 %105, ptr %22, align 4, !tbaa !12
  %106 = sub nsw i32 %.4133, %98
  br label %107

107:                                              ; preds = %103, %99
  %.5 = phi i32 [ %106, %103 ], [ %.4133, %99 ]
  %108 = icmp sgt i32 %.4103132, -1
  br i1 %108, label %109, label %113

109:                                              ; preds = %107
  %110 = load i32, ptr %9, align 4, !tbaa !10
  %111 = add nsw i32 %110, %.
  store i32 %111, ptr %9, align 4, !tbaa !10
  %112 = sub nsw i32 %.4103132, %98
  br label %113

113:                                              ; preds = %109, %107
  %.5104 = phi i32 [ %112, %109 ], [ %.4103132, %107 ]
  %114 = add nsw i32 %.5, %94
  %115 = add nsw i32 %.5104, %95
  %116 = call noundef zeroext i1 @_ZNK8Planners5utils13DiscreteWorld10isOccupiedERKNS0_5Vec3iE(ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 4 dereferenceable(12) %9)
  br i1 %116, label %.loopexit.loopexit, label %117

117:                                              ; preds = %113
  %118 = call noundef zeroext i1 @_ZStneISt6vectorIN8Planners5utils5Vec3iESaIS3_EEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr null) #6
  br i1 %118, label %119, label %121

119:                                              ; preds = %117
  %120 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorIN8Planners5utils5Vec3iESaIS3_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @_ZNSt6vectorIN8Planners5utils5Vec3iESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %120, ptr noundef nonnull align 4 dereferenceable(12) %9)
  br label %121

121:                                              ; preds = %119, %117
  %122 = load i32, ptr %27, align 4, !tbaa !13
  %123 = load i32, ptr %25, align 4, !tbaa !13
  %.not111 = icmp eq i32 %122, %123
  br i1 %.not111, label %.loopexit.loopexit, label %99, !llvm.loop !17

.loopexit.loopexit:                               ; preds = %121, %113
  %.0.ph = xor i1 %116, true
  br label %.loopexit

.loopexit.loopexit138:                            ; preds = %90, %82
  %.0.ph139 = xor i1 %85, true
  br label %.loopexit

.loopexit.loopexit140:                            ; preds = %58, %50
  %.0.ph141 = xor i1 %53, true
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit140, %.loopexit.loopexit138, %.loopexit.loopexit, %30, %62, %93
  %.0 = phi i1 [ true, %93 ], [ true, %62 ], [ true, %30 ], [ %.0.ph, %.loopexit.loopexit ], [ %.0.ph139, %.loopexit.loopexit138 ], [ %.0.ph141, %.loopexit.loopexit140 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  br label %124

124:                                              ; preds = %6, %.loopexit
  %.1 = phi i1 [ %.0, %.loopexit ], [ true, %6 ]
  ret i1 %.1
}

; 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

declare noundef i32 @_ZN8Planners5utils8geometry21distanceBetween2NodesERKNS0_5Vec3iES4_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

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

declare { i64, i32 } @_ZN8Planners5utils8geometry3absERKNS0_5Vec3iE(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i32 } @_ZNK8Planners5utils5Vec3imiERKS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK8Planners5utils13DiscreteWorld10isOccupiedERKNS0_5Vec3iE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN8Planners5utils5Vec3iESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass