; LLVM IR from mackorone/mms :: old/v1/src/algo/FloodFill (FloodFill)

; 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.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::__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.19" = type { %"class.std::__cxx11::_List_base.20" }
%"class.std::__cxx11::_List_base.20" = type { %"struct.std::__cxx11::_List_base<Cell *, std::allocator<Cell *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<Cell *, std::allocator<Cell *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::_List_iterator" = type { ptr }
%"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.FloodFill = type <{ %class.IAlgorithm, ptr, [16 x [16 x %class.Cell]], i32, i32, i32, i32, i8, i8, [6 x i8], %class.History, i8, [7 x i8] }>
%class.IAlgorithm = type { ptr }
%class.Cell = type { i32, i32, i32, i8, i8, [4 x i8], [4 x i8], ptr }
%class.History = type { i32, i32, ptr, %"class.std::stack", %"class.std::queue", %"class.std::__cxx11::list", %"class.std::__cxx11::list.9" }
%"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" }
%"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" }

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9FloodFill5floodEii(ptr noundef nonnull align 8 dereferenceable(8457), i32 noundef, i32 noundef) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3 align 2

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

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

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

declare noundef zeroext i1 @_ZN3sim14MouseInterface9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(40)) #4

declare noundef zeroext i1 @_ZN3sim14MouseInterface9wallRightEv(ptr noundef nonnull align 8 dereferenceable(40)) #4

declare noundef zeroext i1 @_ZN3sim14MouseInterface8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(40)) #4

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

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

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

declare noundef i32 @_ZN4Cell4getXEv(ptr noundef nonnull align 8 dereferenceable(32)) #4

declare noundef i32 @_ZN4Cell4getYEv(ptr noundef nonnull align 8 dereferenceable(32)) #4

declare noundef ptr @_ZN4Cell7getPrevEv(ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9FloodFill23doUpdatesForCurrentCellEPSt5stackIP4CellSt5dequeIS2_SaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(8457) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::list.14", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::list.19", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::_List_iterator", align 8
  %16 = alloca %"struct.std::_List_iterator", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::stack", align 8
  %20 = alloca %"class.std::__cxx11::list.14", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %21 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #7
  call void @_ZNSt7__cxx114listI7CellmodSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %22 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 2
  %23 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %22, i64 0, i64 %25
  %27 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 4
  %28 = load i32, ptr %27, align 4, !tbaa !36
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [16 x %class.Cell], ptr %26, i64 0, i64 %29
  invoke void @_ZN9FloodFill18appendModifiedCellEPNSt7__cxx114listI7CellmodSaIS2_EEEP4Cell(ptr noundef nonnull align 8 dereferenceable(8457) %21, ptr noundef %5, ptr noundef %30)
          to label %31 unwind label %83

31:                                               ; preds = %2
  invoke void @_ZN9FloodFill5wallsEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
          to label %32 unwind label %83

32:                                               ; preds = %31
  %33 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 3
  %34 = load i32, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 4
  %36 = load i32, ptr %35, align 4, !tbaa !36
  invoke void @_ZN9FloodFill5floodEii(ptr noundef nonnull align 8 dereferenceable(8457) %21, i32 noundef %34, i32 noundef %36)
          to label %37 unwind label %83

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  call void @_ZNSt7__cxx114listIP4CellSaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %38 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 2
  %39 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 3
  %40 = load i32, ptr %39, align 8, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %38, i64 0, i64 %41
  %43 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 4
  %44 = load i32, ptr %43, align 4, !tbaa !36
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [16 x %class.Cell], ptr %42, i64 0, i64 %45
  invoke void @_ZN4Cell11setExploredEb(ptr noundef nonnull align 8 dereferenceable(32) %46, i1 noundef zeroext true)
          to label %47 unwind label %87

47:                                               ; preds = %37
  %48 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 2
  %49 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 3
  %50 = load i32, ptr %49, align 8, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %48, i64 0, i64 %51
  %53 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 4
  %54 = load i32, ptr %53, align 4, !tbaa !36
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [16 x %class.Cell], ptr %52, i64 0, i64 %55
  invoke void @_ZN4Cell12setTraversedEb(ptr noundef nonnull align 8 dereferenceable(32) %56, i1 noundef zeroext true)
          to label %57 unwind label %87

57:                                               ; preds = %47
  %58 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !37
  %60 = invoke noundef zeroext i1 @_ZN3sim14MouseInterface8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(40) %59)
          to label %61 unwind label %87

61:                                               ; preds = %57
  br i1 %60, label %95, label %62

62:                                               ; preds = %61
  %63 = call noundef ptr @_ZN9FloodFill11getLeftCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  %64 = invoke noundef ptr @_ZN4Cell7getPrevEv(ptr noundef nonnull align 8 dereferenceable(32) %63)
          to label %65 unwind label %87

65:                                               ; preds = %62
  %66 = icmp eq ptr %64, null
  br i1 %66, label %67, label %95

67:                                               ; preds = %65
  %68 = call noundef ptr @_ZN9FloodFill11getLeftCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  invoke void @_ZN9FloodFill18appendModifiedCellEPNSt7__cxx114listI7CellmodSaIS2_EEEP4Cell(ptr noundef nonnull align 8 dereferenceable(8457) %21, ptr noundef %5, ptr noundef %68)
          to label %69 unwind label %87

69:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %70 = call noundef ptr @_ZN9FloodFill11getLeftCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  store ptr %70, ptr %9, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listIP4CellSaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %71 unwind label %91

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %72 = call noundef ptr @_ZN9FloodFill11getLeftCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  %73 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 2
  %74 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 3
  %75 = load i32, ptr %74, align 8, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %73, i64 0, i64 %76
  %78 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 4
  %79 = load i32, ptr %78, align 4, !tbaa !36
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [16 x %class.Cell], ptr %77, i64 0, i64 %80
  invoke void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32) %72, ptr noundef %81)
          to label %82 unwind label %87

82:                                               ; preds = %71
  br label %95

83:                                               ; preds = %32, %31, %2
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %6, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %7, align 4
  br label %271

87:                                               ; preds = %258, %254, %163, %139, %135, %130, %125, %109, %105, %100, %95, %71, %67, %62, %57, %47, %37
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %6, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %7, align 4
  br label %270

91:                                               ; preds = %69
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %6, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %270

95:                                               ; preds = %82, %65, %61
  %96 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !37
  %98 = invoke noundef zeroext i1 @_ZN3sim14MouseInterface9wallRightEv(ptr noundef nonnull align 8 dereferenceable(40) %97)
          to label %99 unwind label %87

99:                                               ; preds = %95
  br i1 %98, label %125, label %100

100:                                              ; preds = %99
  %101 = call noundef ptr @_ZN9FloodFill12getRightCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  %102 = invoke noundef ptr @_ZN4Cell7getPrevEv(ptr noundef nonnull align 8 dereferenceable(32) %101)
          to label %103 unwind label %87

103:                                              ; preds = %100
  %104 = icmp eq ptr %102, null
  br i1 %104, label %105, label %125

105:                                              ; preds = %103
  %106 = call noundef ptr @_ZN9FloodFill12getRightCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  invoke void @_ZN9FloodFill18appendModifiedCellEPNSt7__cxx114listI7CellmodSaIS2_EEEP4Cell(ptr noundef nonnull align 8 dereferenceable(8457) %21, ptr noundef %5, ptr noundef %106)
          to label %107 unwind label %87

107:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %108 = call noundef ptr @_ZN9FloodFill12getRightCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  store ptr %108, ptr %10, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listIP4CellSaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %109 unwind label %121

109:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %110 = call noundef ptr @_ZN9FloodFill12getRightCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  %111 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 2
  %112 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 3
  %113 = load i32, ptr %112, align 8, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %111, i64 0, i64 %114
  %116 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 4
  %117 = load i32, ptr %116, align 4, !tbaa !36
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [16 x %class.Cell], ptr %115, i64 0, i64 %118
  invoke void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32) %110, ptr noundef %119)
          to label %120 unwind label %87

120:                                              ; preds = %109
  br label %125

121:                                              ; preds = %107
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %6, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %270

125:                                              ; preds = %120, %103, %99
  %126 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !37
  %128 = invoke noundef zeroext i1 @_ZN3sim14MouseInterface9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(40) %127)
          to label %129 unwind label %87

129:                                              ; preds = %125
  br i1 %128, label %155, label %130

130:                                              ; preds = %129
  %131 = call noundef ptr @_ZN9FloodFill12getFrontCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  %132 = invoke noundef ptr @_ZN4Cell7getPrevEv(ptr noundef nonnull align 8 dereferenceable(32) %131)
          to label %133 unwind label %87

133:                                              ; preds = %130
  %134 = icmp eq ptr %132, null
  br i1 %134, label %135, label %155

135:                                              ; preds = %133
  %136 = call noundef ptr @_ZN9FloodFill12getFrontCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  invoke void @_ZN9FloodFill18appendModifiedCellEPNSt7__cxx114listI7CellmodSaIS2_EEEP4Cell(ptr noundef nonnull align 8 dereferenceable(8457) %21, ptr noundef %5, ptr noundef %136)
          to label %137 unwind label %87

137:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %138 = call noundef ptr @_ZN9FloodFill12getFrontCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  store ptr %138, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listIP4CellSaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %139 unwind label %151

139:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %140 = call noundef ptr @_ZN9FloodFill12getFrontCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %21)
  %141 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 2
  %142 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 3
  %143 = load i32, ptr %142, align 8, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %141, i64 0, i64 %144
  %146 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 4
  %147 = load i32, ptr %146, align 4, !tbaa !36
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [16 x %class.Cell], ptr %145, i64 0, i64 %148
  invoke void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32) %140, ptr noundef %149)
          to label %150 unwind label %87

150:                                              ; preds = %139
  br label %155

151:                                              ; preds = %137
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %6, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %270

155:                                              ; preds = %150, %133, %129
  %156 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 7
  %157 = load i8, ptr %156, align 8, !tbaa !38, !range !39, !noundef !40
  %158 = trunc i8 %157 to i1
  br i1 %158, label %159, label %168

159:                                              ; preds = %155
  br label %160

160:                                              ; preds = %166, %159
  %161 = call noundef zeroext i1 @_ZNKSt7__cxx114listIP4CellSaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %162 = xor i1 %161, true
  br i1 %162, label %163, label %167

163:                                              ; preds = %160
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listIP4CellSaIS2_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  invoke void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %164, ptr noundef nonnull align 8 dereferenceable(8) %165)
          to label %166 unwind label %87

166:                                              ; preds = %163
  call void @_ZNSt7__cxx114listIP4CellSaIS2_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %160, !llvm.loop !41

167:                                              ; preds = %160
  br label %254

168:                                              ; preds = %155
  br label %169

169:                                              ; preds = %247, %168
  %170 = call noundef zeroext i1 @_ZNKSt7__cxx114listIP4CellSaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %171 = xor i1 %170, true
  br i1 %171, label %172, label %253

172:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 -1, ptr %13, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 -1, ptr %14, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %173 = call ptr @_ZNSt7__cxx114listIP4CellSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %174 = getelementptr inbounds %"struct.std::_List_iterator", ptr %15, i32 0, i32 0
  store ptr %173, ptr %174, align 8
  br label %175

175:                                              ; preds = %241, %172
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %176 = call ptr @_ZNSt7__cxx114listIP4CellSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %177 = getelementptr inbounds %"struct.std::_List_iterator", ptr %16, i32 0, i32 0
  store ptr %176, ptr %177, align 8
  %178 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIP4CellES4_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br i1 %178, label %180, label %179

179:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %244

180:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIP4CellEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %182 = load ptr, ptr %181, align 8, !tbaa !5
  %183 = invoke noundef i32 @_ZN4Cell4getXEv(ptr noundef nonnull align 8 dereferenceable(32) %182)
          to label %184 unwind label %208

184:                                              ; preds = %180
  %185 = sub nsw i32 8, %183
  %186 = call i32 @llvm.abs.i32(i32 %185, i1 true)
  store i32 %186, ptr %17, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIP4CellEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  %189 = invoke noundef i32 @_ZN4Cell4getYEv(ptr noundef nonnull align 8 dereferenceable(32) %188)
          to label %190 unwind label %212

190:                                              ; preds = %184
  %191 = sub nsw i32 8, %189
  %192 = call i32 @llvm.abs.i32(i32 %191, i1 true)
  store i32 %192, ptr %18, align 4, !tbaa !43
  %193 = load i32, ptr %17, align 4, !tbaa !43
  %194 = load i32, ptr %18, align 4, !tbaa !43
  %195 = add nsw i32 %193, %194
  %196 = load i32, ptr %13, align 4, !tbaa !43
  %197 = icmp sgt i32 %195, %196
  br i1 %197, label %198, label %216

198:                                              ; preds = %190
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIP4CellEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %200 = load ptr, ptr %199, align 8, !tbaa !5
  store ptr %200, ptr %12, align 8, !tbaa !5
  %201 = load i32, ptr %17, align 4, !tbaa !43
  %202 = load i32, ptr %18, align 4, !tbaa !43
  %203 = add nsw i32 %201, %202
  store i32 %203, ptr %13, align 4, !tbaa !43
  %204 = load i32, ptr %17, align 4, !tbaa !43
  %205 = load i32, ptr %18, align 4, !tbaa !43
  %206 = sub nsw i32 %204, %205
  %207 = call i32 @llvm.abs.i32(i32 %206, i1 true)
  store i32 %207, ptr %14, align 4, !tbaa !43
  br label %240

208:                                              ; preds = %180
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %6, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %7, align 4
  br label %243

212:                                              ; preds = %184
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %6, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %243

216:                                              ; preds = %190
  %217 = load i32, ptr %17, align 4, !tbaa !43
  %218 = load i32, ptr %18, align 4, !tbaa !43
  %219 = add nsw i32 %217, %218
  %220 = load i32, ptr %13, align 4, !tbaa !43
  %221 = icmp eq i32 %219, %220
  br i1 %221, label %222, label %239

222:                                              ; preds = %216
  %223 = load i32, ptr %17, align 4, !tbaa !43
  %224 = load i32, ptr %18, align 4, !tbaa !43
  %225 = sub nsw i32 %223, %224
  %226 = call i32 @llvm.abs.i32(i32 %225, i1 true)
  %227 = load i32, ptr %14, align 4, !tbaa !43
  %228 = icmp sgt i32 %226, %227
  br i1 %228, label %229, label %239

229:                                              ; preds = %222
  %230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIP4CellEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  %231 = load ptr, ptr %230, align 8, !tbaa !5
  store ptr %231, ptr %12, align 8, !tbaa !5
  %232 = load i32, ptr %17, align 4, !tbaa !43
  %233 = load i32, ptr %18, align 4, !tbaa !43
  %234 = add nsw i32 %232, %233
  store i32 %234, ptr %13, align 4, !tbaa !43
  %235 = load i32, ptr %17, align 4, !tbaa !43
  %236 = load i32, ptr %18, align 4, !tbaa !43
  %237 = sub nsw i32 %235, %236
  %238 = call i32 @llvm.abs.i32(i32 %237, i1 true)
  store i32 %238, ptr %14, align 4, !tbaa !43
  br label %239

239:                                              ; preds = %229, %222, %216
  br label %240

240:                                              ; preds = %239, %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %241

241:                                              ; preds = %240
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIP4CellEppEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br label %175, !llvm.loop !44

243:                                              ; preds = %212, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %252

244:                                              ; preds = %179
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %245, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %246 unwind label %248

246:                                              ; preds = %244
  invoke void @_ZNSt7__cxx114listIP4CellSaIS2_EE6removeERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %247 unwind label %248

247:                                              ; preds = %246
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %169, !llvm.loop !45

248:                                              ; preds = %246, %244
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %6, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %7, align 4
  br label %252

252:                                              ; preds = %248, %243
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %270

253:                                              ; preds = %169
  br label %254

254:                                              ; preds = %253, %167
  %255 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 10
  %256 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %19, ptr noundef nonnull align 8 dereferenceable(80) %256)
          to label %257 unwind label %87

257:                                              ; preds = %254
  invoke void @_ZN7History11stackUpdateESt5stackIP4CellSt5dequeIS2_SaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(224) %255, ptr noundef %19)
          to label %258 unwind label %262

258:                                              ; preds = %257
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19) #7
  %259 = getelementptr inbounds %class.FloodFill, ptr %21, i32 0, i32 10
  invoke void @_ZNSt7__cxx114listI7CellmodSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %260 unwind label %87

260:                                              ; preds = %258
  invoke void @_ZN7History19modifiedCellsUpdateENSt7__cxx114listI7CellmodSaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(224) %259, ptr noundef %20)
          to label %261 unwind label %266

261:                                              ; preds = %260
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @_ZNSt7__cxx1110_List_baseIP4CellSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  ret void

262:                                              ; preds = %257
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %6, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %7, align 4
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %19) #7
  br label %270

266:                                              ; preds = %260
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %6, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %7, align 4
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  br label %270

270:                                              ; preds = %266, %262, %252, %151, %121, %91, %87
  call void @_ZNSt7__cxx1110_List_baseIP4CellSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  br label %271

271:                                              ; preds = %270, %83
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  br label %272

272:                                              ; preds = %271
  %273 = load ptr, ptr %6, align 8
  %274 = load i32, ptr %7, align 4
  %275 = insertvalue { ptr, i32 } poison, ptr %273, 0
  %276 = insertvalue { ptr, i32 } %275, i32 %274, 1
  resume { ptr, i32 } %276
}

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

declare void @_ZN7History11stackUpdateESt5stackIP4CellSt5dequeIS2_SaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) #4

declare void @_ZN7History19modifiedCellsUpdateENSt7__cxx114listI7CellmodSaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) #4

; 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 #1 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !12, i64 8208}
!10 = !{!"_ZTS9FloodFill", !11, i64 0, !6, i64 8, !7, i64 16, !12, i64 8208, !12, i64 8212, !12, i64 8216, !12, i64 8220, !13, i64 8224, !13, i64 8225, !14, i64 8232, !13, i64 8456}
!11 = !{!"_ZTS10IAlgorithm"}
!12 = !{!"int", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTS7History", !12, i64 0, !12, i64 4, !6, i64 8, !15, i64 16, !22, i64 96, !28, i64 176, !33, i64 200}
!15 = !{!"_ZTSSt5stackIP4CellSt5dequeIS1_SaIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt5dequeIP4CellSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt11_Deque_baseIP4CellSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE11_Deque_implE", !19, i64 0}
!19 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE16_Deque_impl_dataE", !6, i64 0, !20, i64 8, !21, i64 16, !21, i64 48}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSSt15_Deque_iteratorIP4CellRS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"_ZTSSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE", !23, i64 0}
!23 = !{!"_ZTSSt5dequeISt5stackIP4CellS_IS2_SaIS2_EEESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE", !25, i64 0}
!25 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE11_Deque_implE", !26, i64 0}
!26 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE16_Deque_impl_dataE", !6, i64 0, !20, i64 8, !27, i64 16, !27, i64 48}
!27 = !{!"_ZTSSt15_Deque_iteratorISt5stackIP4CellSt5dequeIS2_SaIS2_EEERS6_PS6_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!28 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !30, i64 0}
!30 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !31, i64 0}
!31 = !{!"_ZTSNSt8__detail17_List_node_headerE", !32, i64 0, !20, i64 16}
!32 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!33 = !{!"_ZTSNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEE", !34, i64 0}
!34 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EEE", !35, i64 0}
!35 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EE10_List_implE", !31, i64 0}
!36 = !{!10, !12, i64 8212}
!37 = !{!10, !6, i64 8}
!38 = !{!10, !13, i64 8224}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!12, !12, i64 0}
!44 = distinct !{!44, !42}
!45 = distinct !{!45, !42}


; 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.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::__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.19" = type { %"class.std::__cxx11::_List_base.20" }
%"class.std::__cxx11::_List_base.20" = type { %"struct.std::__cxx11::_List_base<Cell *, std::allocator<Cell *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<Cell *, std::allocator<Cell *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::_List_iterator" = type { ptr }
%"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.Cell = type { i32, i32, i32, i8, i8, [4 x i8], [4 x i8], 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9FloodFill5floodEii(ptr noundef nonnull align 8 dereferenceable(8457), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #3 align 2

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

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

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

declare noundef zeroext i1 @_ZN3sim14MouseInterface9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN3sim14MouseInterface9wallRightEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN3sim14MouseInterface8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

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

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

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

declare noundef i32 @_ZN4Cell4getXEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare noundef i32 @_ZN4Cell4getYEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare noundef ptr @_ZN4Cell7getPrevEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9FloodFill23doUpdatesForCurrentCellEPSt5stackIP4CellSt5dequeIS2_SaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(8457) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::list.14", align 8
  %4 = alloca %"class.std::__cxx11::list.19", align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.std::_List_iterator", align 8
  %10 = alloca %"struct.std::_List_iterator", align 8
  %11 = alloca %"class.std::stack", align 8
  %12 = alloca %"class.std::__cxx11::list.14", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt7__cxx114listI7CellmodSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = getelementptr inbounds i8, ptr %0, i64 8208
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i8, ptr %0, i64 8212
  %18 = load i32, ptr %17, align 4, !tbaa !35
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %13, i64 0, i64 %16, i64 %19
  invoke void @_ZN9FloodFill18appendModifiedCellEPNSt7__cxx114listI7CellmodSaIS2_EEEP4Cell(ptr noundef nonnull align 8 dereferenceable(8457) %0, ptr noundef nonnull %3, ptr noundef nonnull %20)
          to label %21 unwind label %58

21:                                               ; preds = %2
  invoke void @_ZN9FloodFill5wallsEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
          to label %22 unwind label %58

22:                                               ; preds = %21
  %23 = load i32, ptr %14, align 8, !tbaa !5
  %24 = load i32, ptr %17, align 4, !tbaa !35
  invoke void @_ZN9FloodFill5floodEii(ptr noundef nonnull align 8 dereferenceable(8457) %0, i32 noundef %23, i32 noundef %24)
          to label %25 unwind label %58

25:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt7__cxx114listIP4CellSaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %26 = load i32, ptr %14, align 8, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = load i32, ptr %17, align 4, !tbaa !35
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %13, i64 0, i64 %27, i64 %29
  invoke void @_ZN4Cell11setExploredEb(ptr noundef nonnull align 8 dereferenceable(32) %30, i1 noundef zeroext true)
          to label %31 unwind label %.loopexit.split-lp

31:                                               ; preds = %25
  %32 = load i32, ptr %14, align 8, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = load i32, ptr %17, align 4, !tbaa !35
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %13, i64 0, i64 %33, i64 %35
  invoke void @_ZN4Cell12setTraversedEb(ptr noundef nonnull align 8 dereferenceable(32) %36, i1 noundef zeroext true)
          to label %37 unwind label %.loopexit.split-lp

37:                                               ; preds = %31
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !36
  %40 = invoke noundef zeroext i1 @_ZN3sim14MouseInterface8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(40) %39)
          to label %41 unwind label %.loopexit.split-lp

41:                                               ; preds = %37
  br i1 %40, label %62, label %42

42:                                               ; preds = %41
  %43 = call noundef ptr @_ZN9FloodFill11getLeftCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  %44 = invoke noundef ptr @_ZN4Cell7getPrevEv(ptr noundef nonnull align 8 dereferenceable(32) %43)
          to label %45 unwind label %.loopexit.split-lp

45:                                               ; preds = %42
  %46 = icmp eq ptr %44, null
  br i1 %46, label %47, label %62

47:                                               ; preds = %45
  %48 = call noundef ptr @_ZN9FloodFill11getLeftCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  invoke void @_ZN9FloodFill18appendModifiedCellEPNSt7__cxx114listI7CellmodSaIS2_EEEP4Cell(ptr noundef nonnull align 8 dereferenceable(8457) %0, ptr noundef nonnull %3, ptr noundef %48)
          to label %49 unwind label %.loopexit.split-lp

49:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %50 = call noundef ptr @_ZN9FloodFill11getLeftCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  store ptr %50, ptr %5, align 8, !tbaa !37
  invoke void @_ZNSt7__cxx114listIP4CellSaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %51 unwind label %60

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %52 = call noundef ptr @_ZN9FloodFill11getLeftCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  %53 = load i32, ptr %14, align 8, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = load i32, ptr %17, align 4, !tbaa !35
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %13, i64 0, i64 %54, i64 %56
  invoke void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32) %52, ptr noundef nonnull %57)
          to label %62 unwind label %.loopexit.split-lp

58:                                               ; preds = %22, %21, %2
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %169

.loopexit38:                                      ; preds = %.lr.ph44
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %168

.loopexit.split-lp:                               ; preds = %25, %31, %37, %42, %47, %51, %62, %66, %71, %75, %84, %88, %93, %97, %.loopexit, %161
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %168

60:                                               ; preds = %49
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %168

62:                                               ; preds = %51, %45, %41
  %63 = load ptr, ptr %38, align 8, !tbaa !36
  %64 = invoke noundef zeroext i1 @_ZN3sim14MouseInterface9wallRightEv(ptr noundef nonnull align 8 dereferenceable(40) %63)
          to label %65 unwind label %.loopexit.split-lp

65:                                               ; preds = %62
  br i1 %64, label %84, label %66

66:                                               ; preds = %65
  %67 = call noundef ptr @_ZN9FloodFill12getRightCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  %68 = invoke noundef ptr @_ZN4Cell7getPrevEv(ptr noundef nonnull align 8 dereferenceable(32) %67)
          to label %69 unwind label %.loopexit.split-lp

69:                                               ; preds = %66
  %70 = icmp eq ptr %68, null
  br i1 %70, label %71, label %84

71:                                               ; preds = %69
  %72 = call noundef ptr @_ZN9FloodFill12getRightCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  invoke void @_ZN9FloodFill18appendModifiedCellEPNSt7__cxx114listI7CellmodSaIS2_EEEP4Cell(ptr noundef nonnull align 8 dereferenceable(8457) %0, ptr noundef nonnull %3, ptr noundef %72)
          to label %73 unwind label %.loopexit.split-lp

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %74 = call noundef ptr @_ZN9FloodFill12getRightCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  store ptr %74, ptr %6, align 8, !tbaa !37
  invoke void @_ZNSt7__cxx114listIP4CellSaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %75 unwind label %82

75:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %76 = call noundef ptr @_ZN9FloodFill12getRightCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  %77 = load i32, ptr %14, align 8, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = load i32, ptr %17, align 4, !tbaa !35
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %13, i64 0, i64 %78, i64 %80
  invoke void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32) %76, ptr noundef nonnull %81)
          to label %84 unwind label %.loopexit.split-lp

82:                                               ; preds = %73
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %168

84:                                               ; preds = %75, %69, %65
  %85 = load ptr, ptr %38, align 8, !tbaa !36
  %86 = invoke noundef zeroext i1 @_ZN3sim14MouseInterface9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(40) %85)
          to label %87 unwind label %.loopexit.split-lp

87:                                               ; preds = %84
  br i1 %86, label %106, label %88

88:                                               ; preds = %87
  %89 = call noundef ptr @_ZN9FloodFill12getFrontCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  %90 = invoke noundef ptr @_ZN4Cell7getPrevEv(ptr noundef nonnull align 8 dereferenceable(32) %89)
          to label %91 unwind label %.loopexit.split-lp

91:                                               ; preds = %88
  %92 = icmp eq ptr %90, null
  br i1 %92, label %93, label %106

93:                                               ; preds = %91
  %94 = call noundef ptr @_ZN9FloodFill12getFrontCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  invoke void @_ZN9FloodFill18appendModifiedCellEPNSt7__cxx114listI7CellmodSaIS2_EEEP4Cell(ptr noundef nonnull align 8 dereferenceable(8457) %0, ptr noundef nonnull %3, ptr noundef %94)
          to label %95 unwind label %.loopexit.split-lp

95:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %96 = call noundef ptr @_ZN9FloodFill12getFrontCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  store ptr %96, ptr %7, align 8, !tbaa !37
  invoke void @_ZNSt7__cxx114listIP4CellSaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %97 unwind label %104

97:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %98 = call noundef ptr @_ZN9FloodFill12getFrontCellEv(ptr noundef nonnull align 8 dereferenceable(8457) %0)
  %99 = load i32, ptr %14, align 8, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = load i32, ptr %17, align 4, !tbaa !35
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [16 x [16 x %class.Cell]], ptr %13, i64 0, i64 %100, i64 %102
  invoke void @_ZN4Cell7setPrevEPS_(ptr noundef nonnull align 8 dereferenceable(32) %98, ptr noundef nonnull %103)
          to label %106 unwind label %.loopexit.split-lp

104:                                              ; preds = %95
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %168

106:                                              ; preds = %97, %91, %87
  %107 = getelementptr inbounds i8, ptr %0, i64 8224
  %108 = load i8, ptr %107, align 8, !tbaa !38, !range !39, !noundef !40
  %109 = trunc nuw i8 %108 to i1
  %110 = call noundef zeroext i1 @_ZNKSt7__cxx114listIP4CellSaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br i1 %109, label %.preheader, label %.preheader39

.preheader39:                                     ; preds = %106
  br i1 %110, label %.loopexit, label %.lr.ph43

.preheader:                                       ; preds = %106
  br i1 %110, label %.loopexit, label %.lr.ph44

.lr.ph44:                                         ; preds = %.preheader, %112
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listIP4CellSaIS2_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  invoke void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 8 dereferenceable(8) %111)
          to label %112 unwind label %.loopexit38

112:                                              ; preds = %.lr.ph44
  call void @_ZNSt7__cxx114listIP4CellSaIS2_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %113 = call noundef zeroext i1 @_ZNKSt7__cxx114listIP4CellSaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br i1 %113, label %.loopexit, label %.lr.ph44, !llvm.loop !41

.lr.ph43:                                         ; preds = %.preheader39, %154
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store ptr null, ptr %8, align 8, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %114 = call ptr @_ZNSt7__cxx114listIP4CellSaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %114, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %115 = call ptr @_ZNSt7__cxx114listIP4CellSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %115, ptr %10, align 8
  %116 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIP4CellES4_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %116, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %149, %.lr.ph43
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  invoke void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %1, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %154 unwind label %156

.lr.ph:                                           ; preds = %.lr.ph43, %149
  %.02642 = phi i32 [ %.127, %149 ], [ -1, %.lr.ph43 ]
  %.02841 = phi i32 [ %.129, %149 ], [ -1, %.lr.ph43 ]
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIP4CellEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %118 = load ptr, ptr %117, align 8, !tbaa !37
  %119 = invoke noundef i32 @_ZN4Cell4getXEv(ptr noundef nonnull align 8 dereferenceable(32) %118)
          to label %120 unwind label %136

120:                                              ; preds = %.lr.ph
  %121 = sub nsw i32 8, %119
  %122 = call i32 @llvm.abs.i32(i32 %121, i1 true)
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIP4CellEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %124 = load ptr, ptr %123, align 8, !tbaa !37
  %125 = invoke noundef i32 @_ZN4Cell4getYEv(ptr noundef nonnull align 8 dereferenceable(32) %124)
          to label %126 unwind label %138

126:                                              ; preds = %120
  %127 = sub nsw i32 8, %125
  %128 = call i32 @llvm.abs.i32(i32 %127, i1 true)
  %129 = add nuw nsw i32 %128, %122
  %130 = icmp sgt i32 %129, %.02841
  br i1 %130, label %131, label %140

131:                                              ; preds = %126
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIP4CellEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %133 = load ptr, ptr %132, align 8, !tbaa !37
  store ptr %133, ptr %8, align 8, !tbaa !37
  %134 = sub nsw i32 %122, %128
  %135 = call i32 @llvm.abs.i32(i32 %134, i1 true)
  br label %149

136:                                              ; preds = %.lr.ph
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %153

138:                                              ; preds = %120
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %153

140:                                              ; preds = %126
  %141 = icmp eq i32 %129, %.02841
  br i1 %141, label %142, label %149

142:                                              ; preds = %140
  %143 = sub nsw i32 %122, %128
  %144 = call i32 @llvm.abs.i32(i32 %143, i1 true)
  %145 = icmp sgt i32 %144, %.02642
  br i1 %145, label %146, label %149

146:                                              ; preds = %142
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt14_List_iteratorIP4CellEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %148 = load ptr, ptr %147, align 8, !tbaa !37
  store ptr %148, ptr %8, align 8, !tbaa !37
  br label %149

149:                                              ; preds = %140, %142, %146, %131
  %.129 = phi i32 [ %129, %131 ], [ %.02841, %146 ], [ %.02841, %142 ], [ %.02841, %140 ]
  %.127 = phi i32 [ %135, %131 ], [ %144, %146 ], [ %.02642, %142 ], [ %.02642, %140 ]
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIP4CellEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %151 = call ptr @_ZNSt7__cxx114listIP4CellSaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  store ptr %151, ptr %10, align 8
  %152 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIP4CellES4_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %152, label %.lr.ph, label %._crit_edge, !llvm.loop !43

153:                                              ; preds = %138, %136
  %.pn = phi { ptr, i32 } [ %139, %138 ], [ %137, %136 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %158

154:                                              ; preds = %._crit_edge
  call void @_ZNSt7__cxx114listIP4CellSaIS2_EE6removeERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %155 = call noundef zeroext i1 @_ZNKSt7__cxx114listIP4CellSaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br i1 %155, label %.loopexit, label %.lr.ph43, !llvm.loop !44

156:                                              ; preds = %._crit_edge
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %158

158:                                              ; preds = %156, %153
  %.pn.pn = phi { ptr, i32 } [ %.pn, %153 ], [ %157, %156 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %168

.loopexit:                                        ; preds = %154, %112, %.preheader39, %.preheader
  %159 = getelementptr inbounds i8, ptr %0, i64 8232
  invoke void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 8 dereferenceable(80) %1)
          to label %160 unwind label %.loopexit.split-lp

160:                                              ; preds = %.loopexit
  invoke void @_ZN7History11stackUpdateESt5stackIP4CellSt5dequeIS2_SaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(224) %159, ptr noundef nonnull %11)
          to label %161 unwind label %164

161:                                              ; preds = %160
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #7
  invoke void @_ZNSt7__cxx114listI7CellmodSaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %162 unwind label %.loopexit.split-lp

162:                                              ; preds = %161
  invoke void @_ZN7History19modifiedCellsUpdateENSt7__cxx114listI7CellmodSaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(224) %159, ptr noundef nonnull %12)
          to label %163 unwind label %166

163:                                              ; preds = %162
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @_ZNSt7__cxx1110_List_baseIP4CellSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret void

164:                                              ; preds = %160
  %165 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #7
  br label %168

166:                                              ; preds = %162
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  br label %168

168:                                              ; preds = %.loopexit38, %.loopexit.split-lp, %166, %164, %158, %104, %82, %60
  %.pn35 = phi { ptr, i32 } [ %167, %166 ], [ %165, %164 ], [ %.pn.pn, %158 ], [ %105, %104 ], [ %83, %82 ], [ %61, %60 ], [ %lpad.loopexit, %.loopexit38 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1110_List_baseIP4CellSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %169

169:                                              ; preds = %168, %58
  %.pn35.pn = phi { ptr, i32 } [ %.pn35, %168 ], [ %59, %58 ]
  call void @_ZNSt7__cxx1110_List_baseI7CellmodSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn35.pn
}

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

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

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

declare void @_ZN7History11stackUpdateESt5stackIP4CellSt5dequeIS2_SaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) local_unnamed_addr #4

declare void @_ZN7History19modifiedCellsUpdateENSt7__cxx114listI7CellmodSaIS2_EEE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) local_unnamed_addr #4

; 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 #1 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !11, i64 8208}
!6 = !{!"_ZTS9FloodFill", !7, i64 0, !8, i64 8, !9, i64 16, !11, i64 8208, !11, i64 8212, !11, i64 8216, !11, i64 8220, !12, i64 8224, !12, i64 8225, !13, i64 8232, !12, i64 8456}
!7 = !{!"_ZTS10IAlgorithm"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"_ZTS7History", !11, i64 0, !11, i64 4, !8, i64 8, !14, i64 16, !21, i64 96, !27, i64 176, !32, i64 200}
!14 = !{!"_ZTSSt5stackIP4CellSt5dequeIS1_SaIS1_EEE", !15, i64 0}
!15 = !{!"_ZTSSt5dequeIP4CellSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt11_Deque_baseIP4CellSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE11_Deque_implE", !18, i64 0}
!18 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE16_Deque_impl_dataE", !8, i64 0, !19, i64 8, !20, i64 16, !20, i64 48}
!19 = !{!"long", !9, i64 0}
!20 = !{!"_ZTSSt15_Deque_iteratorIP4CellRS1_PS1_E", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!21 = !{!"_ZTSSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE", !22, i64 0}
!22 = !{!"_ZTSSt5dequeISt5stackIP4CellS_IS2_SaIS2_EEESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE", !24, i64 0}
!24 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE11_Deque_implE", !25, i64 0}
!25 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE16_Deque_impl_dataE", !8, i64 0, !19, i64 8, !26, i64 16, !26, i64 48}
!26 = !{!"_ZTSSt15_Deque_iteratorISt5stackIP4CellSt5dequeIS2_SaIS2_EEERS6_PS6_E", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!27 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !30, i64 0}
!30 = !{!"_ZTSNSt8__detail17_List_node_headerE", !31, i64 0, !19, i64 16}
!31 = !{!"_ZTSNSt8__detail15_List_node_baseE", !8, i64 0, !8, i64 8}
!32 = !{!"_ZTSNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEE", !33, i64 0}
!33 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EEE", !34, i64 0}
!34 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EE10_List_implE", !30, i64 0}
!35 = !{!6, !11, i64 8212}
!36 = !{!6, !8, i64 8}
!37 = !{!8, !8, i64 0}
!38 = !{!6, !12, i64 8224}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = distinct !{!43, !42}
!44 = distinct !{!44, !42}


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