; LLVM IR from laurimi/ase_exploration :: src/ExplorationPlanner/grid (PlanarGridOccupancyMap)

; 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.boost::unordered::iterator_detail::c_iterator" = type { ptr }
%"struct.boost::unordered::iterator_detail::c_iterator.3" = type { ptr }
%"struct.std::pair" = type { %class.PlanarGridIndex, %class.PlanarCellObservation }
%class.PlanarGridIndex = type { i32, i32 }
%class.PlanarCellObservation = type { i8, double }
%"struct.std::pair.4" = type <{ %class.PlanarGridIndex, i8, [3 x i8] }>

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN22PlanarGridOccupancyMap21copyCellsFromOtherMapERKS_RK17PlanarObservation(ptr noundef nonnull align 8 dereferenceable(10) %0, ptr noundef nonnull align 8 dereferenceable(10) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.boost::unordered::iterator_detail::c_iterator", align 8
  %8 = alloca %"struct.boost::unordered::iterator_detail::c_iterator", align 8
  %9 = alloca %"struct.boost::unordered::iterator_detail::c_iterator.3", align 8
  %10 = alloca %"struct.boost::unordered::iterator_detail::c_iterator.3", align 8
  %11 = alloca %"struct.boost::unordered::iterator_detail::c_iterator.3", align 8
  %12 = alloca %"struct.boost::unordered::iterator_detail::c_iterator.3", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr %14, i64 %17
  %19 = call ptr @_ZNK19PlanarGridContainerI21PlanarCellObservationE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %18)
  %20 = getelementptr inbounds %"struct.boost::unordered::iterator_detail::c_iterator", ptr %7, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %21, i64 %24
  %26 = call ptr @_ZNK19PlanarGridContainerI21PlanarCellObservationE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %25)
  %27 = getelementptr inbounds %"struct.boost::unordered::iterator_detail::c_iterator", ptr %8, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  br label %28

28:                                               ; preds = %76, %3
  %29 = call noundef zeroext i1 @_ZN5boost9unordered15iterator_detailneERKNS1_10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  br i1 %29, label %31, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %78

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %32 = load ptr, ptr %13, align 8, !tbaa !9
  %33 = getelementptr i8, ptr %32, i64 -32
  %34 = load i64, ptr %33, align 8
  %35 = getelementptr inbounds i8, ptr %13, i64 %34
  %36 = call noundef ptr @_ZNK5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %37 = getelementptr inbounds %"struct.std::pair", ptr %36, i32 0, i32 0
  %38 = call ptr @_ZNK19PlanarGridContainerIaE4findERK15PlanarGridIndex(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 4 dereferenceable(8) %37)
  %39 = getelementptr inbounds %"struct.boost::unordered::iterator_detail::c_iterator.3", ptr %9, i32 0, i32 0
  store ptr %38, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %40 = load ptr, ptr %13, align 8, !tbaa !9
  %41 = getelementptr i8, ptr %40, i64 -32
  %42 = load i64, ptr %41, align 8
  %43 = getelementptr inbounds i8, ptr %13, i64 %42
  %44 = call ptr @_ZNK19PlanarGridContainerIaE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %43)
  %45 = getelementptr inbounds %"struct.boost::unordered::iterator_detail::c_iterator.3", ptr %10, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  %46 = call noundef zeroext i1 @_ZN5boost9unordered15iterator_detaileqERKNS1_10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndexaEEEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br i1 %46, label %47, label %75

47:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = getelementptr i8, ptr %49, i64 -32
  %51 = load i64, ptr %50, align 8
  %52 = getelementptr inbounds i8, ptr %48, i64 %51
  %53 = call noundef ptr @_ZNK5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %54 = getelementptr inbounds %"struct.std::pair", ptr %53, i32 0, i32 0
  %55 = call ptr @_ZNK19PlanarGridContainerIaE4findERK15PlanarGridIndex(ptr noundef nonnull align 8 dereferenceable(48) %52, ptr noundef nonnull align 4 dereferenceable(8) %54)
  %56 = getelementptr inbounds %"struct.boost::unordered::iterator_detail::c_iterator.3", ptr %11, i32 0, i32 0
  store ptr %55, ptr %56, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = getelementptr i8, ptr %58, i64 -32
  %60 = load i64, ptr %59, align 8
  %61 = getelementptr inbounds i8, ptr %57, i64 %60
  %62 = call ptr @_ZNK19PlanarGridContainerIaE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %61)
  %63 = getelementptr inbounds %"struct.boost::unordered::iterator_detail::c_iterator.3", ptr %12, i32 0, i32 0
  store ptr %62, ptr %63, align 8
  %64 = call noundef zeroext i1 @_ZN5boost9unordered15iterator_detailneERKNS1_10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndexaEEEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br i1 %64, label %65, label %74

65:                                               ; preds = %47
  %66 = load ptr, ptr %13, align 8, !tbaa !9
  %67 = getelementptr i8, ptr %66, i64 -32
  %68 = load i64, ptr %67, align 8
  %69 = getelementptr inbounds i8, ptr %13, i64 %68
  %70 = call noundef ptr @_ZNK5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %71 = getelementptr inbounds %"struct.std::pair", ptr %70, i32 0, i32 0
  %72 = call noundef ptr @_ZNK5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndexaEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  %73 = getelementptr inbounds %"struct.std::pair.4", ptr %72, i32 0, i32 1
  call void @_ZN19PlanarGridContainerIaE12setGridValueERK15PlanarGridIndexRKa(ptr noundef nonnull align 8 dereferenceable(48) %69, ptr noundef nonnull align 4 dereferenceable(8) %71, ptr noundef nonnull align 1 dereferenceable(1) %73)
  br label %74

74:                                               ; preds = %65, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %75

75:                                               ; preds = %74, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %76

76:                                               ; preds = %75
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  br label %28, !llvm.loop !11

78:                                               ; preds = %30
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNK19PlanarGridContainerIaE4findERK15PlanarGridIndex(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN19PlanarGridContainerIaE12setGridValueERK15PlanarGridIndexRKa(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; 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.boost::unordered::iterator_detail::c_iterator" = type { ptr }
%"struct.boost::unordered::iterator_detail::c_iterator.3" = type { ptr }

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN22PlanarGridOccupancyMap21copyCellsFromOtherMapERKS_RK17PlanarObservation(ptr noundef nonnull align 8 dereferenceable(10) %0, ptr noundef nonnull align 8 dereferenceable(10) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #2 align 2 {
  %4 = alloca %"struct.boost::unordered::iterator_detail::c_iterator", align 8
  %5 = alloca %"struct.boost::unordered::iterator_detail::c_iterator", align 8
  %6 = alloca %"struct.boost::unordered::iterator_detail::c_iterator.3", align 8
  %7 = alloca %"struct.boost::unordered::iterator_detail::c_iterator.3", align 8
  %8 = alloca %"struct.boost::unordered::iterator_detail::c_iterator.3", align 8
  %9 = alloca %"struct.boost::unordered::iterator_detail::c_iterator.3", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr %2, i64 %12
  %14 = tail call ptr @_ZNK19PlanarGridContainerI21PlanarCellObservationE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %13)
  store ptr %14, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr %2, i64 %17
  %19 = tail call ptr @_ZNK19PlanarGridContainerI21PlanarCellObservationE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %18)
  store ptr %19, ptr %5, align 8
  %20 = call noundef zeroext i1 @_ZN5boost9unordered15iterator_detailneERKNS1_10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  br i1 %20, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %55, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret void

.lr.ph:                                           ; preds = %3, %55
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %21 = load ptr, ptr %0, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -32
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr %0, i64 %23
  %25 = call noundef ptr @_ZNK5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %26 = call ptr @_ZNK19PlanarGridContainerIaE4findERK15PlanarGridIndex(ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef nonnull align 4 dereferenceable(8) %25)
  store ptr %26, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %27 = load ptr, ptr %0, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -32
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %0, i64 %29
  %31 = call ptr @_ZNK19PlanarGridContainerIaE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %30)
  store ptr %31, ptr %7, align 8
  %32 = call noundef zeroext i1 @_ZN5boost9unordered15iterator_detaileqERKNS1_10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndexaEEEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br i1 %32, label %33, label %55

33:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %34 = load ptr, ptr %1, align 8, !tbaa !5
  %35 = getelementptr i8, ptr %34, i64 -32
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds i8, ptr %1, i64 %36
  %38 = call noundef ptr @_ZNK5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %39 = call ptr @_ZNK19PlanarGridContainerIaE4findERK15PlanarGridIndex(ptr noundef nonnull align 8 dereferenceable(48) %37, ptr noundef nonnull align 4 dereferenceable(8) %38)
  store ptr %39, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %40 = load ptr, ptr %1, align 8, !tbaa !5
  %41 = getelementptr i8, ptr %40, i64 -32
  %42 = load i64, ptr %41, align 8
  %43 = getelementptr inbounds i8, ptr %1, i64 %42
  %44 = call ptr @_ZNK19PlanarGridContainerIaE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %43)
  store ptr %44, ptr %9, align 8
  %45 = call noundef zeroext i1 @_ZN5boost9unordered15iterator_detailneERKNS1_10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndexaEEEEESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  br i1 %45, label %46, label %54

46:                                               ; preds = %33
  %47 = load ptr, ptr %0, align 8, !tbaa !5
  %48 = getelementptr i8, ptr %47, i64 -32
  %49 = load i64, ptr %48, align 8
  %50 = getelementptr inbounds i8, ptr %0, i64 %49
  %51 = call noundef ptr @_ZNK5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %52 = call noundef ptr @_ZNK5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndexaEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  call void @_ZN19PlanarGridContainerIaE12setGridValueERK15PlanarGridIndexRKa(ptr noundef nonnull align 8 dereferenceable(48) %50, ptr noundef nonnull align 4 dereferenceable(8) %51, ptr noundef nonnull align 1 dereferenceable(1) %53)
  br label %54

54:                                               ; preds = %46, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  br label %55

55:                                               ; preds = %54, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5boost9unordered15iterator_detail10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %57 = call noundef zeroext i1 @_ZN5boost9unordered15iterator_detailneERKNS1_10c_iteratorINS0_6detail8ptr_nodeISt4pairIK15PlanarGridIndex21PlanarCellObservationEEEEESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #3
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !8
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNK19PlanarGridContainerIaE4findERK15PlanarGridIndex(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN19PlanarGridContainerIaE12setGridValueERK15PlanarGridIndexRKa(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


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