; LLVM IR from tokoro10g/libamaze :: samples (fourway_static)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.amaze::Maze" = type { %"class.std::bitset", %"class.std::bitset", %"struct.amaze::Position", %"class.std::vector" }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [63 x i64] }
%"struct.amaze::Position" = type { i8, i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<amaze::Position, std::allocator<amaze::Position>>::_Vector_impl" }
%"struct.std::_Vector_base<amaze::Position, std::allocator<amaze::Position>>::_Vector_impl" = type { %"struct.std::_Vector_base<amaze::Position, std::allocator<amaze::Position>>::_Vector_impl_data" }
%"struct.std::_Vector_base<amaze::Position, std::allocator<amaze::Position>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }
%"class.amaze::maze_graph::FourWayGraph" = type { %"class.amaze::maze_graph::MazeGraphBase" }
%"class.amaze::maze_graph::MazeGraphBase" = type { ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned short, unsigned short, std::_Identity<unsigned short>, std::less<unsigned short>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned short, unsigned short, std::_Identity<unsigned short>, std::less<unsigned short>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.amaze::AgentState" = type { %"struct.amaze::Position", %"union.amaze::Direction", i8 }
%"union.amaze::Direction" = type { i8 }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.amaze::solver::DStarLite" = type { %"class.amaze::solver::SolverBase", i16, %"class.std::set", i16, i16, i16, %"struct.std::array", %"struct.std::array", %"class.std::set.6", %"class.std::bitset.12" }
%"class.amaze::solver::SolverBase" = type { ptr, ptr }
%"struct.std::array" = type { [1024 x i16] }
%"class.std::set.6" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = type { %"struct.std::_Rb_tree<std::pair<std::pair<unsigned short, unsigned short>, unsigned short>, std::pair<std::pair<unsigned short, unsigned short>, unsigned short>, std::_Identity<std::pair<std::pair<unsigned short, unsigned short>, unsigned short>>, amaze::solver::DStarLite<unsigned short, unsigned short, ' ', 1024>::KeyCompare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<std::pair<unsigned short, unsigned short>, unsigned short>, std::pair<std::pair<unsigned short, unsigned short>, unsigned short>, std::_Identity<std::pair<std::pair<unsigned short, unsigned short>, unsigned short>>, amaze::solver::DStarLite<unsigned short, unsigned short, ' ', 1024>::KeyCompare>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::bitset.12" = type { %"struct.std::_Base_bitset.13" }
%"struct.std::_Base_bitset.13" = type { [16 x i64] }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<amaze::AgentState, std::allocator<amaze::AgentState>>::_Vector_impl" }
%"struct.std::_Vector_base<amaze::AgentState, std::allocator<amaze::AgentState>>::_Vector_impl" = type { %"struct.std::_Vector_base<amaze::AgentState, std::allocator<amaze::AgentState>>::_Vector_impl_data" }
%"struct.std::_Vector_base<amaze::AgentState, std::allocator<amaze::AgentState>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.amaze::Maze", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.amaze::maze_graph::FourWayGraph", align 8
  %13 = alloca i16, align 2
  %14 = alloca %"class.std::set", align 8
  %15 = alloca %"struct.amaze::AgentState", align 1
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca i16, align 2
  %20 = alloca %"struct.amaze::AgentState", align 1
  %21 = alloca %"class.amaze::solver::DStarLite", align 8
  %22 = alloca %"class.std::vector.14", align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"struct.amaze::AgentState", align 1
  %27 = alloca %"struct.amaze::AgentState", align 1
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = icmp slt i32 %28, 2
  br i1 %29, label %30, label %39

30:                                               ; preds = %2
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  %34 = getelementptr inbounds ptr, ptr %33, i64 0
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %35)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @.str.1)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 -1, ptr %3, align 4
  br label %173

39:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  store i8 32, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1040, ptr %7) #7
  call void @_ZN5amaze4MazeILh32EEC2Ev(ptr noundef nonnull align 8 dereferenceable(1040) %7)
  %40 = load ptr, ptr %5, align 8, !tbaa !9
  %41 = getelementptr inbounds ptr, ptr %40, i64 1
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %42, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %43 unwind label %72

43:                                               ; preds = %39
  %44 = invoke noundef zeroext i1 @_ZN5amaze5utils16loadMazeFromFileILh32EEEbRNS_4MazeIXT_EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(1040) %7, ptr noundef %8)
          to label %45 unwind label %76

45:                                               ; preds = %43
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  invoke void @_ZN5amaze10maze_graph12FourWayGraphILb1EttLh32ELt1024EEC2ERKNS_4MazeILh32EEE(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(1040) %7)
          to label %46 unwind label %81

46:                                               ; preds = %45
  invoke void @_ZN5amaze5utils9printMazeILh32EEEvRKNS_4MazeIXT_EEEi(ptr noundef nonnull align 8 dereferenceable(1040) %7, i32 noundef 1)
          to label %47 unwind label %85

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #7
  %48 = invoke noundef zeroext i16 @_ZNK5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EE11startNodeIdEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %49 unwind label %89

49:                                               ; preds = %47
  store i16 %48, ptr %13, align 2, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #7
  invoke void @_ZNK5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EE11goalNodeIdsEv(ptr dead_on_unwind writable sret(%"class.std::set") align 8 %14, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %50 unwind label %93

50:                                               ; preds = %49
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %52 unwind label %97

52:                                               ; preds = %50
  %53 = load i16, ptr %13, align 2, !tbaa !12
  %54 = invoke i32 @_ZNK5amaze10maze_graph12FourWayGraphILb1EttLh32ELt1024EE18agentStateByNodeIdEt(ptr noundef nonnull align 8 dereferenceable(16) %12, i16 noundef zeroext %53)
          to label %55 unwind label %97

55:                                               ; preds = %52
  store i32 %54, ptr %15, align 1
  %56 = load i32, ptr %15, align 1
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5amazelsERSoNS_10AgentStateE(ptr noundef nonnull align 8 dereferenceable(8) %51, i32 %56)
          to label %58 unwind label %97

58:                                               ; preds = %55
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %60 unwind label %97

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
          to label %62 unwind label %97

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr %14, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %63 = load ptr, ptr %16, align 8, !tbaa !9
  %64 = call ptr @_ZNKSt3setItSt4lessItESaItEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %63) #7
  %65 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %64, ptr %65, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %66 = load ptr, ptr %16, align 8, !tbaa !9
  %67 = call ptr @_ZNKSt3setItSt4lessItESaItEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %66) #7
  %68 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %18, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  br label %69

69:                                               ; preds = %112, %62
  %70 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorItES2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br i1 %70, label %101, label %71

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %118

72:                                               ; preds = %39
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %10, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %11, align 4
  br label %80

76:                                               ; preds = %43
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %10, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %80

80:                                               ; preds = %76, %72
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  br label %172

81:                                               ; preds = %45
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %10, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %11, align 4
  br label %171

85:                                               ; preds = %46
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %10, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %11, align 4
  br label %170

89:                                               ; preds = %47
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %10, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %11, align 4
  br label %169

93:                                               ; preds = %49
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %10, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %11, align 4
  br label %168

97:                                               ; preds = %118, %60, %58, %55, %52, %50
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %10, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %11, align 4
  br label %167

101:                                              ; preds = %69
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #7
  %102 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNKSt23_Rb_tree_const_iteratorItEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  %103 = load i16, ptr %102, align 2, !tbaa !12
  store i16 %103, ptr %19, align 2, !tbaa !12
  %104 = load i16, ptr %19, align 2, !tbaa !12
  %105 = invoke i32 @_ZNK5amaze10maze_graph12FourWayGraphILb1EttLh32ELt1024EE18agentStateByNodeIdEt(ptr noundef nonnull align 8 dereferenceable(16) %12, i16 noundef zeroext %104)
          to label %106 unwind label %114

106:                                              ; preds = %101
  store i32 %105, ptr %20, align 1
  %107 = load i32, ptr %20, align 1
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5amazelsERSoNS_10AgentStateE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %107)
          to label %109 unwind label %114

109:                                              ; preds = %106
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef @.str.4)
          to label %111 unwind label %114

111:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #7
  br label %112

112:                                              ; preds = %111
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorItEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %69

114:                                              ; preds = %109, %106, %101
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %10, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %167

118:                                              ; preds = %71
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %120 unwind label %97

120:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4352, ptr %21) #7
  invoke void @_ZN5amaze6solver9DStarLiteIttLh32ELt1024EEC2EPKNS_10maze_graph13MazeGraphBaseIttLh32ELt1024EEE(ptr noundef nonnull align 8 dereferenceable(4352) %21, ptr noundef %12)
          to label %121 unwind label %138

121:                                              ; preds = %120
  invoke void @_ZN5amaze6solver9DStarLiteIttLh32ELt1024EE10initializeEv(ptr noundef nonnull align 8 dereferenceable(4352) %21)
          to label %122 unwind label %142

122:                                              ; preds = %121
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
          to label %124 unwind label %142

124:                                              ; preds = %122
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %126 unwind label %142

126:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #7
  %127 = load i16, ptr %13, align 2, !tbaa !12
  invoke void @_ZNK5amaze6solver9DStarLiteIttLh32ELt1024EE15reconstructPathEtRKSt3setItSt4lessItESaItEE(ptr dead_on_unwind writable sret(%"class.std::vector.14") align 8 %22, ptr noundef nonnull align 8 dereferenceable(4352) %21, i16 noundef zeroext %127, ptr noundef nonnull align 8 dereferenceable(48) %14)
          to label %128 unwind label %146

128:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store ptr %22, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %129 = load ptr, ptr %23, align 8, !tbaa !9
  %130 = call ptr @_ZNSt6vectorIN5amaze10AgentStateESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %129) #7
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %132 = load ptr, ptr %23, align 8, !tbaa !9
  %133 = call ptr @_ZNSt6vectorIN5amaze10AgentStateESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %132) #7
  %134 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %133, ptr %134, align 8
  br label %135

135:                                              ; preds = %157, %128
  %136 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #7
  br i1 %136, label %150, label %137

137:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %163

138:                                              ; preds = %120
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %10, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %11, align 4
  br label %166

142:                                              ; preds = %124, %122, %121
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %10, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %11, align 4
  br label %165

146:                                              ; preds = %126
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %10, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %11, align 4
  br label %164

150:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %151 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %26, ptr align 1 %151, i64 4, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %27, ptr align 1 %26, i64 4, i1 false), !tbaa.struct !14
  %152 = load i32, ptr %27, align 1
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5amazelsERSoNS_10AgentStateE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %152)
          to label %154 unwind label %159

154:                                              ; preds = %150
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %156 unwind label %159

156:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %157

157:                                              ; preds = %156
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  br label %135

159:                                              ; preds = %154, %150
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %10, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @_ZNSt6vectorIN5amaze10AgentStateESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  br label %164

163:                                              ; preds = %137
  store i32 0, ptr %3, align 4
  call void @_ZNSt6vectorIN5amaze10AgentStateESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  call void @_ZN5amaze6solver9DStarLiteIttLh32ELt1024EED2Ev(ptr noundef nonnull align 8 dereferenceable(4352) %21) #7
  call void @llvm.lifetime.end.p0(i64 4352, ptr %21) #7
  call void @_ZNSt3setItSt4lessItESaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #7
  call void @_ZN5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @_ZN5amaze4MazeILh32EED2Ev(ptr noundef nonnull align 8 dereferenceable(1040) %7) #7
  call void @llvm.lifetime.end.p0(i64 1040, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %173

164:                                              ; preds = %159, %146
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #7
  br label %165

165:                                              ; preds = %164, %142
  call void @_ZN5amaze6solver9DStarLiteIttLh32ELt1024EED2Ev(ptr noundef nonnull align 8 dereferenceable(4352) %21) #7
  br label %166

166:                                              ; preds = %165, %138
  call void @llvm.lifetime.end.p0(i64 4352, ptr %21) #7
  br label %167

167:                                              ; preds = %166, %114, %97
  call void @_ZNSt3setItSt4lessItESaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #7
  br label %168

168:                                              ; preds = %167, %93
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #7
  br label %169

169:                                              ; preds = %168, %89
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #7
  br label %170

170:                                              ; preds = %169, %85
  call void @_ZN5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  br label %171

171:                                              ; preds = %170, %81
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  br label %172

172:                                              ; preds = %171, %80
  call void @_ZN5amaze4MazeILh32EED2Ev(ptr noundef nonnull align 8 dereferenceable(1040) %7) #7
  call void @llvm.lifetime.end.p0(i64 1040, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %175

173:                                              ; preds = %163, %30
  %174 = load i32, ptr %3, align 4
  ret i32 %174

175:                                              ; preds = %172
  %176 = load ptr, ptr %10, align 8
  %177 = load i32, ptr %11, align 4
  %178 = insertvalue { ptr, i32 } poison, ptr %176, 0
  %179 = insertvalue { ptr, i32 } %178, i32 %177, 1
  resume { ptr, i32 } %179
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZNK5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EE11startNodeIdEv(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EE11goalNodeIdsEv(ptr dead_on_unwind noalias writable sret(%"class.std::set") align 8, ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5amazelsERSoNS_10AgentStateE(ptr noundef nonnull align 8 dereferenceable(8), i32) #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK5amaze10maze_graph12FourWayGraphILb1EttLh32ELt1024EE18agentStateByNodeIdEt(ptr noundef nonnull align 8 dereferenceable(16), i16 noundef zeroext) unnamed_addr #2 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5amaze6solver9DStarLiteIttLh32ELt1024EE15reconstructPathEtRKSt3setItSt4lessItESaItEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.14") align 8, ptr noundef nonnull align 8 dereferenceable(4352), i16 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

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

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

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

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

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

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

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


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.amaze::Maze" = type { %"class.std::bitset", %"class.std::bitset", %"struct.amaze::Position", %"class.std::vector" }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [63 x i64] }
%"struct.amaze::Position" = type { i8, i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<amaze::Position, std::allocator<amaze::Position>>::_Vector_impl" }
%"struct.std::_Vector_base<amaze::Position, std::allocator<amaze::Position>>::_Vector_impl" = type { %"struct.std::_Vector_base<amaze::Position, std::allocator<amaze::Position>>::_Vector_impl_data" }
%"struct.std::_Vector_base<amaze::Position, std::allocator<amaze::Position>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }
%"class.amaze::maze_graph::FourWayGraph" = type { %"class.amaze::maze_graph::MazeGraphBase" }
%"class.amaze::maze_graph::MazeGraphBase" = type { ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned short, unsigned short, std::_Identity<unsigned short>, std::less<unsigned short>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned short, unsigned short, std::_Identity<unsigned short>, std::less<unsigned short>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.amaze::solver::DStarLite" = type { %"class.amaze::solver::SolverBase", i16, %"class.std::set", i16, i16, i16, %"struct.std::array", %"struct.std::array", %"class.std::set.6", %"class.std::bitset.12" }
%"class.amaze::solver::SolverBase" = type { ptr, ptr }
%"struct.std::array" = type { [1024 x i16] }
%"class.std::set.6" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = type { %"struct.std::_Rb_tree<std::pair<std::pair<unsigned short, unsigned short>, unsigned short>, std::pair<std::pair<unsigned short, unsigned short>, unsigned short>, std::_Identity<std::pair<std::pair<unsigned short, unsigned short>, unsigned short>>, amaze::solver::DStarLite<unsigned short, unsigned short, ' ', 1024>::KeyCompare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<std::pair<unsigned short, unsigned short>, unsigned short>, std::pair<std::pair<unsigned short, unsigned short>, unsigned short>, std::_Identity<std::pair<std::pair<unsigned short, unsigned short>, unsigned short>>, amaze::solver::DStarLite<unsigned short, unsigned short, ' ', 1024>::KeyCompare>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::bitset.12" = type { %"struct.std::_Base_bitset.13" }
%"struct.std::_Base_bitset.13" = type { [16 x i64] }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<amaze::AgentState, std::allocator<amaze::AgentState>>::_Vector_impl" }
%"struct.std::_Vector_base<amaze::AgentState, std::allocator<amaze::AgentState>>::_Vector_impl" = type { %"struct.std::_Vector_base<amaze::AgentState, std::allocator<amaze::AgentState>>::_Vector_impl_data" }
%"struct.std::_Vector_base<amaze::AgentState, std::allocator<amaze::AgentState>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 -1, 1) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.amaze::Maze", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca %"class.amaze::maze_graph::FourWayGraph", align 8
  %7 = alloca %"class.std::set", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %10 = alloca %"class.amaze::solver::DStarLite", align 8
  %11 = alloca %"class.std::vector.14", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = icmp slt i32 %0, 2
  br i1 %14, label %15, label %22

15:                                               ; preds = %2
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %18 = load ptr, ptr %1, align 8, !tbaa !5
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %18)
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @.str.1)
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %108

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1040, ptr nonnull %3) #6
  call void @_ZN5amaze4MazeILh32EEC2Ev(ptr noundef nonnull align 8 dereferenceable(1040) %3)
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %24, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %25 unwind label %47

25:                                               ; preds = %22
  %26 = invoke noundef zeroext i1 @_ZN5amaze5utils16loadMazeFromFileILh32EEEbRNS_4MazeIXT_EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(1040) %3, ptr noundef nonnull %4)
          to label %27 unwind label %49

27:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  invoke void @_ZN5amaze10maze_graph12FourWayGraphILb1EttLh32ELt1024EEC2ERKNS_4MazeILh32EEE(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(1040) %3)
          to label %28 unwind label %52

28:                                               ; preds = %27
  invoke void @_ZN5amaze5utils9printMazeILh32EEEvRKNS_4MazeIXT_EEEi(ptr noundef nonnull align 8 dereferenceable(1040) %3, i32 noundef 1)
          to label %29 unwind label %54

29:                                               ; preds = %28
  %30 = invoke noundef zeroext i16 @_ZNK5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EE11startNodeIdEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %31 unwind label %56

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #6
  invoke void @_ZNK5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EE11goalNodeIdsEv(ptr dead_on_unwind nonnull writable sret(%"class.std::set") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %32 unwind label %58

32:                                               ; preds = %31
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %34 unwind label %60

34:                                               ; preds = %32
  %35 = invoke i32 @_ZNK5amaze10maze_graph12FourWayGraphILb1EttLh32ELt1024EE18agentStateByNodeIdEt(ptr noundef nonnull align 8 dereferenceable(16) %6, i16 noundef zeroext %30)
          to label %36 unwind label %60

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5amazelsERSoNS_10AgentStateE(ptr noundef nonnull align 8 dereferenceable(8) %33, i32 %35)
          to label %38 unwind label %60

38:                                               ; preds = %36
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %40 unwind label %60

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
          to label %42 unwind label %60

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %43 = call ptr @_ZNKSt3setItSt4lessItESaItEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  store ptr %43, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %44 = call ptr @_ZNKSt3setItSt4lessItESaItEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  store ptr %44, ptr %9, align 8
  %45 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorItES2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %45, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %69, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %74 unwind label %60

47:                                               ; preds = %22
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %25
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %51

51:                                               ; preds = %49, %47
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  br label %107

52:                                               ; preds = %27
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %106

54:                                               ; preds = %28
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %105

56:                                               ; preds = %29
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %105

58:                                               ; preds = %31
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %104

60:                                               ; preds = %._crit_edge, %40, %38, %36, %34, %32
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %103

.lr.ph:                                           ; preds = %42, %69
  %62 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZNKSt23_Rb_tree_const_iteratorItEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %63 = load i16, ptr %62, align 2, !tbaa !9
  %64 = invoke i32 @_ZNK5amaze10maze_graph12FourWayGraphILb1EttLh32ELt1024EE18agentStateByNodeIdEt(ptr noundef nonnull align 8 dereferenceable(16) %6, i16 noundef zeroext %63)
          to label %65 unwind label %72

65:                                               ; preds = %.lr.ph
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5amazelsERSoNS_10AgentStateE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %64)
          to label %67 unwind label %72

67:                                               ; preds = %65
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull @.str.4)
          to label %69 unwind label %72

69:                                               ; preds = %67
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorItEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %71 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorItES2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br i1 %71, label %.lr.ph, label %._crit_edge

72:                                               ; preds = %67, %65, %.lr.ph
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %103

74:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4352, ptr nonnull %10) #6
  invoke void @_ZN5amaze6solver9DStarLiteIttLh32ELt1024EEC2EPKNS_10maze_graph13MazeGraphBaseIttLh32ELt1024EEE(ptr noundef nonnull align 8 dereferenceable(4352) %10, ptr noundef nonnull %6)
          to label %75 unwind label %85

75:                                               ; preds = %74
  invoke void @_ZN5amaze6solver9DStarLiteIttLh32ELt1024EE10initializeEv(ptr noundef nonnull align 8 dereferenceable(4352) %10)
          to label %76 unwind label %87

76:                                               ; preds = %75
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
          to label %78 unwind label %87

78:                                               ; preds = %76
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %80 unwind label %87

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  invoke void @_ZNK5amaze6solver9DStarLiteIttLh32ELt1024EE15reconstructPathEtRKSt3setItSt4lessItESaItEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.14") align 8 %11, ptr noundef nonnull align 8 dereferenceable(4352) %10, i16 noundef zeroext %30, ptr noundef nonnull align 8 dereferenceable(48) %7)
          to label %81 unwind label %89

81:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %82 = call ptr @_ZNSt6vectorIN5amaze10AgentStateESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  store ptr %82, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %83 = call ptr @_ZNSt6vectorIN5amaze10AgentStateESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  store ptr %83, ptr %13, align 8
  %84 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %84, label %.lr.ph39, label %._crit_edge40

._crit_edge40:                                    ; preds = %95, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @_ZNSt6vectorIN5amaze10AgentStateESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @_ZN5amaze6solver9DStarLiteIttLh32ELt1024EED2Ev(ptr noundef nonnull align 8 dereferenceable(4352) %10) #6
  call void @llvm.lifetime.end.p0(i64 4352, ptr nonnull %10) #6
  call void @_ZNSt3setItSt4lessItESaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #6
  call void @_ZN5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @_ZN5amaze4MazeILh32EED2Ev(ptr noundef nonnull align 8 dereferenceable(1040) %3) #6
  call void @llvm.lifetime.end.p0(i64 1040, ptr nonnull %3) #6
  br label %108

85:                                               ; preds = %74
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %102

87:                                               ; preds = %78, %76, %75
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %101

89:                                               ; preds = %80
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %100

.lr.ph39:                                         ; preds = %81, %95
  %91 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %.sroa.01.0.copyload = load i32, ptr %91, align 1
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5amazelsERSoNS_10AgentStateE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %.sroa.01.0.copyload)
          to label %93 unwind label %98

93:                                               ; preds = %.lr.ph39
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %95 unwind label %98

95:                                               ; preds = %93
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  %97 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %97, label %.lr.ph39, label %._crit_edge40

98:                                               ; preds = %93, %.lr.ph39
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @_ZNSt6vectorIN5amaze10AgentStateESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %100

100:                                              ; preds = %98, %89
  %.pn27 = phi { ptr, i32 } [ %99, %98 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  br label %101

101:                                              ; preds = %100, %87
  %.pn27.pn = phi { ptr, i32 } [ %.pn27, %100 ], [ %88, %87 ]
  call void @_ZN5amaze6solver9DStarLiteIttLh32ELt1024EED2Ev(ptr noundef nonnull align 8 dereferenceable(4352) %10) #6
  br label %102

102:                                              ; preds = %101, %85
  %.pn27.pn.pn = phi { ptr, i32 } [ %.pn27.pn, %101 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 4352, ptr nonnull %10) #6
  br label %103

103:                                              ; preds = %102, %72, %60
  %.pn31 = phi { ptr, i32 } [ %73, %72 ], [ %.pn27.pn.pn, %102 ], [ %61, %60 ]
  call void @_ZNSt3setItSt4lessItESaItEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  br label %104

104:                                              ; preds = %103, %58
  %.pn31.pn = phi { ptr, i32 } [ %.pn31, %103 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #6
  br label %105

105:                                              ; preds = %56, %104, %54
  %.pn31.pn.pn.pn = phi { ptr, i32 } [ %55, %54 ], [ %.pn31.pn, %104 ], [ %57, %56 ]
  call void @_ZN5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  br label %106

106:                                              ; preds = %105, %52
  %.pn31.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn.pn, %105 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %107

107:                                              ; preds = %106, %51
  %.pn31.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn31.pn.pn.pn.pn, %106 ], [ %.pn, %51 ]
  call void @_ZN5amaze4MazeILh32EED2Ev(ptr noundef nonnull align 8 dereferenceable(1040) %3) #6
  call void @llvm.lifetime.end.p0(i64 1040, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn31.pn.pn.pn.pn.pn

108:                                              ; preds = %._crit_edge40, %15
  %.0 = phi i32 [ -1, %15 ], [ 0, %._crit_edge40 ]
  ret i32 %.0
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i16 @_ZNK5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EE11startNodeIdEv(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5amaze10maze_graph13MazeGraphBaseIttLh32ELt1024EE11goalNodeIdsEv(ptr dead_on_unwind noalias writable sret(%"class.std::set") align 8, ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5amazelsERSoNS_10AgentStateE(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK5amaze10maze_graph12FourWayGraphILb1EttLh32ELt1024EE18agentStateByNodeIdEt(ptr noundef nonnull align 8 dereferenceable(16), i16 noundef zeroext) unnamed_addr #2 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5amaze6solver9DStarLiteIttLh32ELt1024EE15reconstructPathEtRKSt3setItSt4lessItESaItEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.14") align 8, ptr noundef nonnull align 8 dereferenceable(4352), i16 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(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 noundef nonnull align 1 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5amaze10AgentStateESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

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

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

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

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

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

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

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

attributes #0 = { mustprogress norecurse 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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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