; LLVM IR from mackorone/mms :: old/v1/src/algo/FloodFill/History.ll (ZN7History18resetModifiedCellsEv)

; 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.std::__cxx11::list.9" = type { %"class.std::__cxx11::_List_base.10" }
%"class.std::__cxx11::_List_base.10" = type { %"struct.std::__cxx11::_List_base<std::__cxx11::list<Cellmod>, std::allocator<std::__cxx11::list<Cellmod>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::__cxx11::list<Cellmod>, std::allocator<std::__cxx11::list<Cellmod>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::__cxx11::list.14" = type { %"class.std::__cxx11::_List_base.15" }
%"class.std::__cxx11::_List_base.15" = type { %"struct.std::__cxx11::_List_base<Cellmod, std::allocator<Cellmod>>::_List_impl" }
%"struct.std::__cxx11::_List_base<Cellmod, std::allocator<Cellmod>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::_List_iterator" = type { ptr }
%class.History = type { i32, i32, ptr, %"class.std::stack", %"class.std::queue", %"class.std::__cxx11::list", %"class.std::__cxx11::list.9" }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl" }
%"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl" = type { %"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::queue" = type { %"class.std::deque.0" }
%"class.std::deque.0" = type { %"class.std::_Deque_base.1" }
%"class.std::_Deque_base.1" = type { %"struct.std::_Deque_base<std::stack<Cell *>, std::allocator<std::stack<Cell *>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::stack<Cell *>, std::allocator<std::stack<Cell *>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::stack<Cell *>, std::allocator<std::stack<Cell *>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::stack<Cell *>, std::allocator<std::stack<Cell *>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.5", %"struct.std::_Deque_iterator.5" }
%"struct.std::_Deque_iterator.5" = type { ptr, ptr, ptr, ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" }
%"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%struct.Cellmod = type { ptr, ptr, i32, i8, i8, [4 x i8], [4 x i8] }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #0 align 2

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE4pushERKS6_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7History18resetModifiedCellsEv(ptr noundef nonnull align 8 dereferenceable(224) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::__cxx11::list.9", align 8
  %4 = alloca %"class.std::__cxx11::list.14", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::_List_iterator", align 8
  %8 = alloca %"struct.std::_List_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  %13 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 6
  call void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %13)
  br label %14

14:                                               ; preds = %106, %1
  %15 = call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %16 = xor i1 %15, true
  br i1 %16, label %17, label %108

17:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #4
  %18 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  invoke void @_ZNSt7__cxx114listI7CellmodSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %19 unwind label %27

19:                                               ; preds = %17
  call void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %20 = call ptr @_ZNSt7__cxx114listI7CellmodSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %21 = getelementptr inbounds %"struct.std::_List_iterator", ptr %7, i32 0, i32 0
  store ptr %20, ptr %21, align 8
  br label %22

22:                                               ; preds = %103, %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %23 = call ptr @_ZNSt7__cxx114listI7CellmodSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %24 = getelementptr inbounds %"struct.std::_List_iterator", ptr %8, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  %25 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI7CellmodES3_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br i1 %25, label %31, label %26

26:                                               ; preds = %22
  store i32 4, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %106

27:                                               ; preds = %17
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  br label %107

31:                                               ; preds = %22
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %33 = getelementptr inbounds %struct.Cellmod, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %36 = getelementptr inbounds %struct.Cellmod, ptr %35, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  invoke void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef %37)
          to label %38 unwind label %66

38:                                               ; preds = %31
  %39 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %40 = getelementptr inbounds %struct.Cellmod, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %43 = getelementptr inbounds %struct.Cellmod, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 8, !tbaa !14
  invoke void @_ZN4Cell11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(32) %41, i32 noundef %44)
          to label %45 unwind label %66

45:                                               ; preds = %38
  %46 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %47 = getelementptr inbounds %struct.Cellmod, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %50 = getelementptr inbounds %struct.Cellmod, ptr %49, i32 0, i32 3
  %51 = load i8, ptr %50, align 4, !tbaa !15, !range !16, !noundef !17
  %52 = trunc i8 %51 to i1
  invoke void @_ZN4Cell11setExploredEb(ptr noundef nonnull align 8 dereferenceable(32) %48, i1 noundef zeroext %52)
          to label %53 unwind label %66

53:                                               ; preds = %45
  %54 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %55 = getelementptr inbounds %struct.Cellmod, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %58 = getelementptr inbounds %struct.Cellmod, ptr %57, i32 0, i32 4
  %59 = load i8, ptr %58, align 1, !tbaa !18, !range !16, !noundef !17
  %60 = trunc i8 %59 to i1
  invoke void @_ZN4Cell12setTraversedEb(ptr noundef nonnull align 8 dereferenceable(32) %56, i1 noundef zeroext %60)
          to label %61 unwind label %66

61:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !19
  br label %62

62:                                               ; preds = %95, %61
  %63 = load i32, ptr %10, align 4, !tbaa !19
  %64 = icmp slt i32 %63, 4
  br i1 %64, label %70, label %65

65:                                               ; preds = %62
  store i32 7, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %102

66:                                               ; preds = %53, %45, %38, %31
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %5, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %6, align 4
  br label %105

70:                                               ; preds = %62
  %71 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %72 = getelementptr inbounds %struct.Cellmod, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = load i32, ptr %10, align 4, !tbaa !19
  %75 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %76 = getelementptr inbounds %struct.Cellmod, ptr %75, i32 0, i32 5
  %77 = load i32, ptr %10, align 4, !tbaa !19
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [4 x i8], ptr %76, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !20, !range !16, !noundef !17
  %81 = trunc i8 %80 to i1
  invoke void @_ZN4Cell7setWallEib(ptr noundef nonnull align 8 dereferenceable(32) %73, i32 noundef %74, i1 noundef zeroext %81)
          to label %82 unwind label %98

82:                                               ; preds = %70
  %83 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %84 = getelementptr inbounds %struct.Cellmod, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = load i32, ptr %10, align 4, !tbaa !19
  %87 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %88 = getelementptr inbounds %struct.Cellmod, ptr %87, i32 0, i32 6
  %89 = load i32, ptr %10, align 4, !tbaa !19
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [4 x i8], ptr %88, i64 0, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !20, !range !16, !noundef !17
  %93 = trunc i8 %92 to i1
  invoke void @_ZN4Cell16setWallInspectedEib(ptr noundef nonnull align 8 dereferenceable(32) %85, i32 noundef %86, i1 noundef zeroext %93)
          to label %94 unwind label %98

94:                                               ; preds = %82
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %10, align 4, !tbaa !19
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %10, align 4, !tbaa !19
  br label %62, !llvm.loop !21

98:                                               ; preds = %82, %70
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %5, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %105

102:                                              ; preds = %65
  br label %103

103:                                              ; preds = %102
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorI7CellmodEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br label %22, !llvm.loop !23

105:                                              ; preds = %98, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %107

106:                                              ; preds = %26
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  br label %14, !llvm.loop !24

107:                                              ; preds = %105, %27
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  br label %146

108:                                              ; preds = %14
  %109 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 1
  store i32 0, ptr %109, align 4, !tbaa !25
  br label %110

110:                                              ; preds = %117, %108
  %111 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 4
  %112 = invoke noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %111)
          to label %113 unwind label %118

113:                                              ; preds = %110
  %114 = xor i1 %112, true
  br i1 %114, label %115, label %122

115:                                              ; preds = %113
  %116 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 4
  invoke void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %116)
          to label %117 unwind label %118

117:                                              ; preds = %115
  br label %110, !llvm.loop !48

118:                                              ; preds = %136, %115, %110
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %5, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %6, align 4
  br label %146

122:                                              ; preds = %113
  br label %123

123:                                              ; preds = %127, %122
  %124 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 5
  %125 = call noundef zeroext i1 @_ZNKSt7__cxx114listIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %124) #4
  %126 = xor i1 %125, true
  br i1 %126, label %127, label %129

127:                                              ; preds = %123
  %128 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 5
  call void @_ZNSt7__cxx114listIiSaIiEE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %128) #4
  br label %123, !llvm.loop !49

129:                                              ; preds = %123
  br label %130

130:                                              ; preds = %134, %129
  %131 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 6
  %132 = call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %131) #4
  %133 = xor i1 %132, true
  br i1 %133, label %134, label %136

134:                                              ; preds = %130
  %135 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 6
  call void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #4
  br label %130, !llvm.loop !50

136:                                              ; preds = %130
  %137 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 4
  %138 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 3
  invoke void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE4pushERKS6_(ptr noundef nonnull align 8 dereferenceable(80) %137, ptr noundef nonnull align 8 dereferenceable(80) %138)
          to label %139 unwind label %118

139:                                              ; preds = %136
  %140 = getelementptr inbounds %class.History, ptr %12, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 1, ptr %11, align 4, !tbaa !19
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %140, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %141 unwind label %142

141:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @_ZNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  ret void

142:                                              ; preds = %139
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %5, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %146

146:                                              ; preds = %142, %118, %107
  call void @_ZNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  br label %147

147:                                              ; preds = %146
  %148 = load ptr, ptr %5, align 8
  %149 = load i32, ptr %6, align 4
  %150 = insertvalue { ptr, i32 } poison, ptr %148, 0
  %151 = insertvalue { ptr, i32 } %150, i32 %149, 1
  resume { ptr, i32 } %151
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx114listI7CellmodSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

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

declare void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

declare void @_ZN4Cell11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3

declare void @_ZN4Cell11setExploredEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #3

declare void @_ZN4Cell12setTraversedEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #3

declare void @_ZN4Cell7setWallEib(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i1 noundef zeroext) #3

declare void @_ZN4Cell16setWallInspectedEib(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i1 noundef zeroext) #3

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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, !6, i64 0}
!10 = !{!"_ZTS7Cellmod", !6, i64 0, !6, i64 8, !11, i64 16, !12, i64 20, !12, i64 21, !7, i64 22, !7, i64 26}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!10, !11, i64 16}
!15 = !{!10, !12, i64 20}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!10, !12, i64 21}
!19 = !{!11, !11, i64 0}
!20 = !{!12, !12, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = !{!26, !11, i64 4}
!26 = !{!"_ZTS7History", !11, i64 0, !11, i64 4, !6, i64 8, !27, i64 16, !34, i64 96, !40, i64 176, !45, i64 200}
!27 = !{!"_ZTSSt5stackIP4CellSt5dequeIS1_SaIS1_EEE", !28, i64 0}
!28 = !{!"_ZTSSt5dequeIP4CellSaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSSt11_Deque_baseIP4CellSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE11_Deque_implE", !31, i64 0}
!31 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE16_Deque_impl_dataE", !6, i64 0, !32, i64 8, !33, i64 16, !33, i64 48}
!32 = !{!"long", !7, i64 0}
!33 = !{!"_ZTSSt15_Deque_iteratorIP4CellRS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!34 = !{!"_ZTSSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE", !35, i64 0}
!35 = !{!"_ZTSSt5dequeISt5stackIP4CellS_IS2_SaIS2_EEESaIS5_EE", !36, i64 0}
!36 = !{!"_ZTSSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE", !37, i64 0}
!37 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE11_Deque_implE", !38, i64 0}
!38 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE16_Deque_impl_dataE", !6, i64 0, !32, i64 8, !39, i64 16, !39, i64 48}
!39 = !{!"_ZTSSt15_Deque_iteratorISt5stackIP4CellSt5dequeIS2_SaIS2_EEERS6_PS6_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!40 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !41, i64 0}
!41 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !42, i64 0}
!42 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !43, i64 0}
!43 = !{!"_ZTSNSt8__detail17_List_node_headerE", !44, i64 0, !32, i64 16}
!44 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!45 = !{!"_ZTSNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEE", !46, i64 0}
!46 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EEE", !47, i64 0}
!47 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EE10_List_implE", !43, i64 0}
!48 = distinct !{!48, !22}
!49 = distinct !{!49, !22}
!50 = distinct !{!50, !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"

%"class.std::__cxx11::list.9" = type { %"class.std::__cxx11::_List_base.10" }
%"class.std::__cxx11::_List_base.10" = type { %"struct.std::__cxx11::_List_base<std::__cxx11::list<Cellmod>, std::allocator<std::__cxx11::list<Cellmod>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::__cxx11::list<Cellmod>, std::allocator<std::__cxx11::list<Cellmod>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::__cxx11::list.14" = type { %"class.std::__cxx11::_List_base.15" }
%"class.std::__cxx11::_List_base.15" = type { %"struct.std::__cxx11::_List_base<Cellmod, std::allocator<Cellmod>>::_List_impl" }
%"struct.std::__cxx11::_List_base<Cellmod, std::allocator<Cellmod>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::_List_iterator" = type { ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #0 align 2

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7History18resetModifiedCellsEv(ptr noundef nonnull align 8 dereferenceable(224) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::list.9", align 8
  %3 = alloca %"class.std::__cxx11::list.14", align 8
  %4 = alloca %"struct.std::_List_iterator", align 8
  %5 = alloca %"struct.std::_List_iterator", align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  %7 = getelementptr inbounds i8, ptr %0, i64 200
  call void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %7)
  %8 = call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br i1 %8, label %._crit_edge21, label %.lr.ph20

.lr.ph20:                                         ; preds = %1, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  %9 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  invoke void @_ZNSt7__cxx114listI7CellmodSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %10 unwind label %15

10:                                               ; preds = %.lr.ph20
  call void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %11 = call ptr @_ZNSt7__cxx114listI7CellmodSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  store ptr %11, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %12 = call ptr @_ZNSt7__cxx114listI7CellmodSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  store ptr %12, ptr %5, align 8
  %13 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI7CellmodES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %96, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  %14 = call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br i1 %14, label %._crit_edge21, label %.lr.ph20, !llvm.loop !5

15:                                               ; preds = %.lr.ph20
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %103

.lr.ph:                                           ; preds = %10, %96
  %17 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %18 = load ptr, ptr %17, align 8, !tbaa !7
  %19 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  invoke void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %21)
          to label %22 unwind label %48

22:                                               ; preds = %.lr.ph
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %24 = load ptr, ptr %23, align 8, !tbaa !7
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %27 = load i32, ptr %26, align 8, !tbaa !15
  invoke void @_ZN4Cell11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(32) %24, i32 noundef %27)
          to label %28 unwind label %48

28:                                               ; preds = %22
  %29 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %30 = load ptr, ptr %29, align 8, !tbaa !7
  %31 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %32 = getelementptr inbounds i8, ptr %31, i64 20
  %33 = load i8, ptr %32, align 4, !tbaa !16, !range !17, !noundef !18
  %34 = trunc nuw i8 %33 to i1
  invoke void @_ZN4Cell11setExploredEb(ptr noundef nonnull align 8 dereferenceable(32) %30, i1 noundef zeroext %34)
          to label %35 unwind label %48

35:                                               ; preds = %28
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %37 = load ptr, ptr %36, align 8, !tbaa !7
  %38 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %39 = getelementptr inbounds i8, ptr %38, i64 21
  %40 = load i8, ptr %39, align 1, !tbaa !19, !range !17, !noundef !18
  %41 = trunc nuw i8 %40 to i1
  invoke void @_ZN4Cell12setTraversedEb(ptr noundef nonnull align 8 dereferenceable(32) %37, i1 noundef zeroext %41)
          to label %.preheader16.preheader unwind label %48

.preheader16.preheader:                           ; preds = %35
  %42 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %43 = load ptr, ptr %42, align 8, !tbaa !7
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %45 = getelementptr inbounds i8, ptr %44, i64 22
  %46 = load i8, ptr %45, align 2, !tbaa !20, !range !17, !noundef !18
  %47 = trunc nuw i8 %46 to i1
  invoke void @_ZN4Cell7setWallEib(ptr noundef nonnull align 8 dereferenceable(32) %43, i32 noundef 0, i1 noundef zeroext %47)
          to label %50 unwind label %100

48:                                               ; preds = %35, %28, %22, %.lr.ph
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %102

50:                                               ; preds = %.preheader16.preheader
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %52 = load ptr, ptr %51, align 8, !tbaa !7
  %53 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %54 = getelementptr inbounds i8, ptr %53, i64 26
  %55 = load i8, ptr %54, align 2, !tbaa !20, !range !17, !noundef !18
  %56 = trunc nuw i8 %55 to i1
  invoke void @_ZN4Cell16setWallInspectedEib(ptr noundef nonnull align 8 dereferenceable(32) %52, i32 noundef 0, i1 noundef zeroext %56)
          to label %.preheader16.1 unwind label %100

.preheader16.1:                                   ; preds = %50
  %57 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %58 = load ptr, ptr %57, align 8, !tbaa !7
  %59 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %60 = getelementptr inbounds i8, ptr %59, i64 23
  %61 = load i8, ptr %60, align 1, !tbaa !20, !range !17, !noundef !18
  %62 = trunc nuw i8 %61 to i1
  invoke void @_ZN4Cell7setWallEib(ptr noundef nonnull align 8 dereferenceable(32) %58, i32 noundef 1, i1 noundef zeroext %62)
          to label %63 unwind label %100

63:                                               ; preds = %.preheader16.1
  %64 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %65 = load ptr, ptr %64, align 8, !tbaa !7
  %66 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %67 = getelementptr inbounds i8, ptr %66, i64 27
  %68 = load i8, ptr %67, align 1, !tbaa !20, !range !17, !noundef !18
  %69 = trunc nuw i8 %68 to i1
  invoke void @_ZN4Cell16setWallInspectedEib(ptr noundef nonnull align 8 dereferenceable(32) %65, i32 noundef 1, i1 noundef zeroext %69)
          to label %.preheader16.2 unwind label %100

.preheader16.2:                                   ; preds = %63
  %70 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %71 = load ptr, ptr %70, align 8, !tbaa !7
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %73 = getelementptr inbounds i8, ptr %72, i64 24
  %74 = load i8, ptr %73, align 8, !tbaa !20, !range !17, !noundef !18
  %75 = trunc nuw i8 %74 to i1
  invoke void @_ZN4Cell7setWallEib(ptr noundef nonnull align 8 dereferenceable(32) %71, i32 noundef 2, i1 noundef zeroext %75)
          to label %76 unwind label %100

76:                                               ; preds = %.preheader16.2
  %77 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %78 = load ptr, ptr %77, align 8, !tbaa !7
  %79 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %80 = getelementptr inbounds i8, ptr %79, i64 28
  %81 = load i8, ptr %80, align 4, !tbaa !20, !range !17, !noundef !18
  %82 = trunc nuw i8 %81 to i1
  invoke void @_ZN4Cell16setWallInspectedEib(ptr noundef nonnull align 8 dereferenceable(32) %78, i32 noundef 2, i1 noundef zeroext %82)
          to label %.preheader16.3 unwind label %100

.preheader16.3:                                   ; preds = %76
  %83 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %84 = load ptr, ptr %83, align 8, !tbaa !7
  %85 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %86 = getelementptr inbounds i8, ptr %85, i64 25
  %87 = load i8, ptr %86, align 1, !tbaa !20, !range !17, !noundef !18
  %88 = trunc nuw i8 %87 to i1
  invoke void @_ZN4Cell7setWallEib(ptr noundef nonnull align 8 dereferenceable(32) %84, i32 noundef 3, i1 noundef zeroext %88)
          to label %89 unwind label %100

89:                                               ; preds = %.preheader16.3
  %90 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %91 = load ptr, ptr %90, align 8, !tbaa !7
  %92 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorI7CellmodEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %93 = getelementptr inbounds i8, ptr %92, i64 29
  %94 = load i8, ptr %93, align 1, !tbaa !20, !range !17, !noundef !18
  %95 = trunc nuw i8 %94 to i1
  invoke void @_ZN4Cell16setWallInspectedEib(ptr noundef nonnull align 8 dereferenceable(32) %91, i32 noundef 3, i1 noundef zeroext %95)
          to label %96 unwind label %100

96:                                               ; preds = %89
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorI7CellmodEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %98 = call ptr @_ZNSt7__cxx114listI7CellmodSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  store ptr %98, ptr %5, align 8
  %99 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI7CellmodES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br i1 %99, label %.lr.ph, label %._crit_edge, !llvm.loop !21

100:                                              ; preds = %89, %.preheader16.3, %76, %.preheader16.2, %63, %.preheader16.1, %50, %.preheader16.preheader
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %102

102:                                              ; preds = %100, %48
  %.pn = phi { ptr, i32 } [ %101, %100 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %103

103:                                              ; preds = %102, %15
  %.pn.pn = phi { ptr, i32 } [ %.pn, %102 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %120

._crit_edge21:                                    ; preds = %._crit_edge, %1
  %104 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 0, ptr %104, align 4, !tbaa !22
  %105 = getelementptr inbounds i8, ptr %0, i64 96
  %106 = call noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %105)
  br i1 %106, label %.preheader15, label %.lr.ph23

.preheader15:                                     ; preds = %.lr.ph23, %._crit_edge21
  %107 = getelementptr inbounds i8, ptr %0, i64 176
  %108 = call noundef zeroext i1 @_ZNKSt7__cxx114listIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %107) #4
  br i1 %108, label %.preheader, label %.lr.ph24

.lr.ph23:                                         ; preds = %._crit_edge21, %.lr.ph23
  call void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %105)
  %109 = call noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %105)
  br i1 %109, label %.preheader15, label %.lr.ph23, !llvm.loop !45

110:                                              ; preds = %._crit_edge27
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %120

.preheader:                                       ; preds = %.lr.ph24, %.preheader15
  %112 = call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br i1 %112, label %._crit_edge27, label %.lr.ph26

.lr.ph24:                                         ; preds = %.preheader15, %.lr.ph24
  call void @_ZNSt7__cxx114listIiSaIiEE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %107) #4
  %113 = call noundef zeroext i1 @_ZNKSt7__cxx114listIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %107) #4
  br i1 %113, label %.preheader, label %.lr.ph24, !llvm.loop !46

.lr.ph26:                                         ; preds = %.preheader, %.lr.ph26
  call void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %114 = call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br i1 %114, label %._crit_edge27, label %.lr.ph26, !llvm.loop !47

._crit_edge27:                                    ; preds = %.lr.ph26, %.preheader
  %115 = getelementptr inbounds i8, ptr %0, i64 16
  invoke void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE4pushERKS6_(ptr noundef nonnull align 8 dereferenceable(80) %105, ptr noundef nonnull align 8 dereferenceable(80) %115)
          to label %116 unwind label %110

116:                                              ; preds = %._crit_edge27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 1, ptr %6, align 4, !tbaa !48
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %107, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %117 unwind label %118

117:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @_ZNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret void

118:                                              ; preds = %116
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %120

120:                                              ; preds = %118, %110, %103
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %103 ], [ %119, %118 ], [ %111, %110 ]
  call void @_ZNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx114listI7CellmodSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

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

declare void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

declare void @_ZN4Cell11setDistanceEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3

declare void @_ZN4Cell11setExploredEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN4Cell12setTraversedEb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN4Cell7setWallEib(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN4Cell16setWallInspectedEib(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i1 noundef zeroext) local_unnamed_addr #3

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !9, i64 0}
!8 = !{!"_ZTS7Cellmod", !9, i64 0, !9, i64 8, !12, i64 16, !13, i64 20, !13, i64 21, !10, i64 22, !10, i64 26}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"int", !10, i64 0}
!13 = !{!"bool", !10, i64 0}
!14 = !{!8, !9, i64 8}
!15 = !{!8, !12, i64 16}
!16 = !{!8, !13, i64 20}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!8, !13, i64 21}
!20 = !{!13, !13, i64 0}
!21 = distinct !{!21, !6}
!22 = !{!23, !12, i64 4}
!23 = !{!"_ZTS7History", !12, i64 0, !12, i64 4, !9, i64 8, !24, i64 16, !31, i64 96, !37, i64 176, !42, i64 200}
!24 = !{!"_ZTSSt5stackIP4CellSt5dequeIS1_SaIS1_EEE", !25, i64 0}
!25 = !{!"_ZTSSt5dequeIP4CellSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt11_Deque_baseIP4CellSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE11_Deque_implE", !28, i64 0}
!28 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE16_Deque_impl_dataE", !9, i64 0, !29, i64 8, !30, i64 16, !30, i64 48}
!29 = !{!"long", !10, i64 0}
!30 = !{!"_ZTSSt15_Deque_iteratorIP4CellRS1_PS1_E", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!31 = !{!"_ZTSSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE", !32, i64 0}
!32 = !{!"_ZTSSt5dequeISt5stackIP4CellS_IS2_SaIS2_EEESaIS5_EE", !33, i64 0}
!33 = !{!"_ZTSSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE", !34, i64 0}
!34 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE11_Deque_implE", !35, i64 0}
!35 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE16_Deque_impl_dataE", !9, i64 0, !29, i64 8, !36, i64 16, !36, i64 48}
!36 = !{!"_ZTSSt15_Deque_iteratorISt5stackIP4CellSt5dequeIS2_SaIS2_EEERS6_PS6_E", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!37 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !38, i64 0}
!38 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !39, i64 0}
!39 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !40, i64 0}
!40 = !{!"_ZTSNSt8__detail17_List_node_headerE", !41, i64 0, !29, i64 16}
!41 = !{!"_ZTSNSt8__detail15_List_node_baseE", !9, i64 0, !9, i64 8}
!42 = !{!"_ZTSNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEE", !43, i64 0}
!43 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EEE", !44, i64 0}
!44 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EE10_List_implE", !40, i64 0}
!45 = distinct !{!45, !6}
!46 = distinct !{!46, !6}
!47 = distinct !{!47, !6}
!48 = !{!12, !12, i64 0}


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