; LLVM IR from mackorone/mms :: old/v2/src/sim (MouseInterface)

; 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::vector.329" = type { %"struct.std::_Vector_base.330" }
%"struct.std::_Vector_base.330" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_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 }
%"struct.std::pair.248" = type { i32, i32 }
%"struct.std::pair.326" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.sim::MouseInterface" = type { ptr, ptr, ptr, ptr, %"class.std::set.221", %"struct.sim::StaticMouseAlgorithmOptions", i8, %"class.std::set.226", %"class.std::set.226" }
%"class.std::set.221" = type { %"class.std::_Rb_tree.222" }
%"class.std::_Rb_tree.222" = type { %"struct.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>>::_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.sim::StaticMouseAlgorithmOptions" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32, double }
%"class.std::set.226" = type { %"class.std::_Rb_tree.227" }
%"class.std::_Rb_tree.227" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

@.str.101 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef ptr @_ZN3sim1PEv() #1

declare noundef ptr @_ZN3sim1LEv() #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim14MouseInterface15setTileTextImplEiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3) #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::vector.329", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator.0", align 1
  %18 = alloca i1, align 1
  %19 = alloca i1, align 1
  %20 = alloca %"class.std::allocator.0", align 1
  %21 = alloca i1, align 1
  %22 = alloca i1, align 1
  %23 = alloca %"class.std::allocator.0", align 1
  %24 = alloca i1, align 1
  %25 = alloca i1, align 1
  %26 = alloca i8, align 1
  %27 = alloca %"struct.std::pair.248", align 4
  %28 = alloca %"struct.std::pair.326", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %175, %4
  %31 = load i32, ptr %10, align 4, !tbaa !9
  %32 = getelementptr inbounds %"class.sim::MouseInterface", ptr %29, i32 0, i32 5
  %33 = getelementptr inbounds %"struct.sim::StaticMouseAlgorithmOptions", ptr %32, i32 0, i32 3
  %34 = load i32, ptr %33, align 8, !tbaa !11
  %35 = icmp slt i32 %31, %34
  br i1 %35, label %36, label %42

36:                                               ; preds = %30
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %39) #6
  %41 = icmp ult i64 %38, %40
  br label %42

42:                                               ; preds = %36, %30
  %43 = phi i1 [ false, %30 ], [ %41, %36 ]
  br i1 %43, label %44, label %183

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %45

45:                                               ; preds = %170, %44
  %46 = load i32, ptr %11, align 4, !tbaa !9
  %47 = load i32, ptr %10, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  %49 = getelementptr inbounds %"class.sim::MouseInterface", ptr %29, i32 0, i32 5
  %50 = getelementptr inbounds %"struct.sim::StaticMouseAlgorithmOptions", ptr %49, i32 0, i32 4
  %51 = load i32, ptr %50, align 4, !tbaa !32
  %52 = mul nsw i32 %48, %51
  %53 = icmp slt i32 %46, %52
  br i1 %53, label %54, label %60

54:                                               ; preds = %45
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %57) #6
  %59 = icmp ult i64 %56, %58
  br label %60

60:                                               ; preds = %54, %45
  %61 = phi i1 [ false, %45 ], [ %59, %54 ]
  br i1 %61, label %62, label %174

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %63, i64 noundef %65)
          to label %67 unwind label %126

67:                                               ; preds = %62
  %68 = load i8, ptr %66, align 1, !tbaa !33
  store i8 %68, ptr %13, align 1, !tbaa !33
  %69 = getelementptr inbounds %"class.sim::MouseInterface", ptr %29, i32 0, i32 4
  %70 = load i8, ptr %13, align 1, !tbaa !33
  %71 = invoke noundef zeroext i1 @_ZN3sim18ContainerUtilities11setContainsIcEEbRKSt3setIT_St4lessIS3_ESaIS3_EES3_(ptr noundef nonnull align 8 dereferenceable(48) %69, i8 noundef signext %70)
          to label %72 unwind label %126

72:                                               ; preds = %67
  br i1 %71, label %167, label %73

73:                                               ; preds = %72
  %74 = invoke noundef ptr @_ZN3sim1LEv()
          to label %75 unwind label %126

75:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %76 = load i8, ptr %13, align 1, !tbaa !33
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %77, 10
  store i1 false, ptr %18, align 1
  store i1 false, ptr %19, align 1
  store i1 false, ptr %21, align 1
  store i1 false, ptr %22, align 1
  store i1 false, ptr %24, align 1
  store i1 false, ptr %25, align 1
  br i1 %78, label %79, label %81

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i1 true, ptr %18, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  store i1 true, ptr %19, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.102, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %80 unwind label %130

80:                                               ; preds = %79
  br label %98

81:                                               ; preds = %75
  %82 = load i8, ptr %13, align 1, !tbaa !33
  %83 = sext i8 %82 to i32
  %84 = icmp eq i32 %83, 9
  br i1 %84, label %85, label %87

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  store i1 true, ptr %21, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  store i1 true, ptr %22, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.103, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %86 unwind label %134

86:                                               ; preds = %85
  br label %97

87:                                               ; preds = %81
  %88 = load i8, ptr %13, align 1, !tbaa !33
  %89 = sext i8 %88 to i32
  %90 = icmp eq i32 %89, 13
  br i1 %90, label %91, label %93

91:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  store i1 true, ptr %24, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  store i1 true, ptr %25, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.104, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %92 unwind label %138

92:                                               ; preds = %91
  br label %96

93:                                               ; preds = %87
  %94 = load i8, ptr %13, align 1, !tbaa !33
  %95 = sext i8 %94 to i32
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, i32 noundef %95) #6
  br label %96

96:                                               ; preds = %93, %92
  br label %97

97:                                               ; preds = %96, %86
  br label %98

98:                                               ; preds = %97, %80
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #6
  %99 = invoke noundef ptr @_ZN3sim1PEv()
          to label %100 unwind label %142

100:                                              ; preds = %98
  %101 = invoke noundef signext i8 @_ZN3sim5Param24defaultTileTextCharacterEv(ptr noundef nonnull align 8 dereferenceable(1056) %99)
          to label %102 unwind label %142

102:                                              ; preds = %100
  store i8 %101, ptr %26, align 1, !tbaa !33
  invoke void @_ZN2el6Logger4warnINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJcEEEvPKcRKT_DpRKT0_(ptr noundef nonnull align 8 dereferenceable(728) %74, ptr noundef @.str.101, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %103 unwind label %142

103:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  %104 = load i1, ptr %25, align 1
  br i1 %104, label %105, label %106

105:                                              ; preds = %103
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  br label %106

106:                                              ; preds = %105, %103
  %107 = load i1, ptr %24, align 1
  br i1 %107, label %108, label %109

108:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  br label %109

109:                                              ; preds = %108, %106
  %110 = load i1, ptr %22, align 1
  br i1 %110, label %111, label %112

111:                                              ; preds = %109
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  br label %112

112:                                              ; preds = %111, %109
  %113 = load i1, ptr %21, align 1
  br i1 %113, label %114, label %115

114:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  br label %115

115:                                              ; preds = %114, %112
  %116 = load i1, ptr %19, align 1
  br i1 %116, label %117, label %118

117:                                              ; preds = %115
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  br label %118

118:                                              ; preds = %117, %115
  %119 = load i1, ptr %18, align 1
  br i1 %119, label %120, label %121

120:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  br label %121

121:                                              ; preds = %120, %118
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  %122 = invoke noundef ptr @_ZN3sim1PEv()
          to label %123 unwind label %126

123:                                              ; preds = %121
  %124 = invoke noundef signext i8 @_ZN3sim5Param24defaultTileTextCharacterEv(ptr noundef nonnull align 8 dereferenceable(1056) %122)
          to label %125 unwind label %126

125:                                              ; preds = %123
  store i8 %124, ptr %13, align 1, !tbaa !33
  br label %167

126:                                              ; preds = %167, %123, %121, %73, %67, %62
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %14, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %15, align 4
  br label %173

130:                                              ; preds = %79
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %14, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %15, align 4
  br label %160

134:                                              ; preds = %85
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %14, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %15, align 4
  br label %153

138:                                              ; preds = %91
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %14, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %15, align 4
  br label %146

142:                                              ; preds = %102, %100, %98
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %14, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %146

146:                                              ; preds = %142, %138
  %147 = load i1, ptr %25, align 1
  br i1 %147, label %148, label %149

148:                                              ; preds = %146
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #6
  br label %149

149:                                              ; preds = %148, %146
  %150 = load i1, ptr %24, align 1
  br i1 %150, label %151, label %152

151:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  br label %152

152:                                              ; preds = %151, %149
  br label %153

153:                                              ; preds = %152, %134
  %154 = load i1, ptr %22, align 1
  br i1 %154, label %155, label %156

155:                                              ; preds = %153
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  br label %156

156:                                              ; preds = %155, %153
  %157 = load i1, ptr %21, align 1
  br i1 %157, label %158, label %159

158:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  br label %159

159:                                              ; preds = %158, %156
  br label %160

160:                                              ; preds = %159, %130
  %161 = load i1, ptr %19, align 1
  br i1 %161, label %162, label %163

162:                                              ; preds = %160
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  br label %163

163:                                              ; preds = %162, %160
  %164 = load i1, ptr %18, align 1
  br i1 %164, label %165, label %166

165:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  br label %166

166:                                              ; preds = %165, %163
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  br label %173

167:                                              ; preds = %125, %72
  %168 = load i8, ptr %13, align 1, !tbaa !33
  %169 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %12, i8 noundef signext %168)
          to label %170 unwind label %126

170:                                              ; preds = %167
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  br label %45, !llvm.loop !34

173:                                              ; preds = %166, %126
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  br label %182

174:                                              ; preds = %60
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %175 unwind label %178

175:                                              ; preds = %174
  %176 = load i32, ptr %10, align 4, !tbaa !9
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %10, align 4, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %30, !llvm.loop !36

178:                                              ; preds = %174
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %14, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %15, align 4
  br label %182

182:                                              ; preds = %178, %173
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %206

183:                                              ; preds = %42
  %184 = getelementptr inbounds %"class.sim::MouseInterface", ptr %29, i32 0, i32 2
  %185 = load ptr, ptr %184, align 8, !tbaa !37
  %186 = load i32, ptr %6, align 4, !tbaa !9
  %187 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN3sim11MazeGraphic11setTileTextEiiRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(24) %185, i32 noundef %186, i32 noundef %187, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %188 unwind label %198

188:                                              ; preds = %183
  %189 = getelementptr inbounds %"class.sim::MouseInterface", ptr %29, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %190 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %191 unwind label %202

191:                                              ; preds = %188
  store i64 %190, ptr %27, align 4
  %192 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %189, ptr noundef nonnull align 4 dereferenceable(8) %27)
          to label %193 unwind label %202

193:                                              ; preds = %191
  %194 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 0
  %195 = extractvalue { ptr, i8 } %192, 0
  store ptr %195, ptr %194, align 8
  %196 = getelementptr inbounds { ptr, i8 }, ptr %28, i32 0, i32 1
  %197 = extractvalue { ptr, i8 } %192, 1
  store i8 %197, ptr %196, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  ret void

198:                                              ; preds = %183
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %14, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %15, align 4
  br label %206

202:                                              ; preds = %191, %188
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %14, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %206

206:                                              ; preds = %202, %198, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  br label %207

207:                                              ; preds = %206
  %208 = load ptr, ptr %14, align 8
  %209 = load i32, ptr %15, align 4
  %210 = insertvalue { ptr, i32 } poison, ptr %208, 0
  %211 = insertvalue { ptr, i32 } %210, i32 %209, 1
  resume { ptr, i32 } %211
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #3

; 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

; 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 nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3sim18ContainerUtilities11setContainsIcEEbRKSt3setIT_St4lessIS3_ESaIS3_EES3_(ptr noundef nonnull align 8 dereferenceable(48), i8 noundef signext) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2el6Logger4warnINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJcEEEvPKcRKT_DpRKT0_(ptr noundef nonnull align 8 dereferenceable(728), ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) #5 align 2

declare noundef signext i8 @_ZN3sim5Param24defaultTileTextCharacterEv(ptr noundef nonnull align 8 dereferenceable(1056)) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #2 align 2

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

declare void @_ZN3sim11MazeGraphic11setTileTextEiiRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 176}
!12 = !{!"_ZTSN3sim14MouseInterfaceE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !22, i64 80, !26, i64 192, !27, i64 200, !27, i64 248}
!13 = !{!"_ZTSSt3setIcSt4lessIcESaIcEE", !14, i64 0}
!14 = !{!"_ZTSSt8_Rb_treeIccSt9_IdentityIcESt4lessIcESaIcEE", !15, i64 0}
!15 = !{!"_ZTSNSt8_Rb_treeIccSt9_IdentityIcESt4lessIcESaIcEE13_Rb_tree_implIS3_Lb1EEE", !16, i64 0, !18, i64 8}
!16 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIcEE", !17, i64 0}
!17 = !{!"_ZTSSt4lessIcE"}
!18 = !{!"_ZTSSt15_Rb_tree_header", !19, i64 0, !21, i64 32}
!19 = !{!"_ZTSSt18_Rb_tree_node_base", !20, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN3sim27StaticMouseAlgorithmOptionsE", !23, i64 0, !23, i64 32, !23, i64 64, !10, i64 96, !10, i64 100, !25, i64 104}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !21, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTSSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSSt8_Rb_treeISt4pairIiiES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE", !29, i64 0}
!29 = !{!"_ZTSNSt8_Rb_treeISt4pairIiiES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE13_Rb_tree_implIS5_Lb1EEE", !30, i64 0, !18, i64 8}
!30 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt4pairIiiEEE", !31, i64 0}
!31 = !{!"_ZTSSt4lessISt4pairIiiEE"}
!32 = !{!12, !10, i64 180}
!33 = !{!7, !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = !{!12, !6, i64 16}


; 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::vector.329" = type { %"struct.std::_Vector_base.330" }
%"struct.std::_Vector_base.330" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_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 }
%"struct.std::pair.248" = type { i32, i32 }

@.str.101 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [3 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef ptr @_ZN3sim1PEv() local_unnamed_addr #1

declare noundef ptr @_ZN3sim1LEv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim14MouseInterface15setTileTextImplEiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %3) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector.329", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.0", align 1
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca %"class.std::allocator.0", align 1
  %13 = alloca i8, align 1
  %14 = alloca %"struct.std::pair.248", align 8
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %15 = getelementptr inbounds i8, ptr %0, i64 176
  %16 = load i32, ptr %15, align 8, !tbaa !9
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph129, label %.critedge

.lr.ph129:                                        ; preds = %4
  %18 = getelementptr inbounds i8, ptr %0, i64 180
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  br label %20

20:                                               ; preds = %.lr.ph129, %76
  %.0128 = phi i32 [ 0, %.lr.ph129 ], [ %25, %76 ]
  %.033127 = phi i32 [ 0, %.lr.ph129 ], [ %.1.lcssa, %76 ]
  %21 = sext i32 %.033127 to i64
  %22 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %23 = icmp ugt i64 %22, %21
  br i1 %23, label %24, label %.critedge

24:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  %25 = add nuw nsw i32 %.0128, 1
  %26 = load i32, ptr %18, align 4, !tbaa !31
  %27 = mul nsw i32 %26, %25
  %28 = icmp slt i32 %.033127, %27
  br i1 %28, label %.lr.ph, label %.critedge2

.lr.ph:                                           ; preds = %24, %71
  %indvars.iv = phi i64 [ %indvars.iv.next, %71 ], [ %21, %24 ]
  %29 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  %30 = icmp ugt i64 %29, %indvars.iv
  br i1 %30, label %31, label %.critedge2.loopexit

31:                                               ; preds = %.lr.ph
  %32 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %indvars.iv)
          to label %33 unwind label %59

33:                                               ; preds = %31
  %34 = load i8, ptr %32, align 1, !tbaa !32
  %35 = invoke noundef zeroext i1 @_ZN3sim18ContainerUtilities11setContainsIcEEbRKSt3setIT_St4lessIS3_ESaIS3_EES3_(ptr noundef nonnull align 8 dereferenceable(48) %19, i8 noundef signext %34)
          to label %36 unwind label %59

36:                                               ; preds = %33
  br i1 %35, label %69, label %37

37:                                               ; preds = %36
  %38 = invoke noundef ptr @_ZN3sim1LEv()
          to label %39 unwind label %59

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  %40 = sext i8 %34 to i32
  %41 = icmp eq i8 %34, 10
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.102, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %47 unwind label %.critedge79.thread

43:                                               ; preds = %39
  switch i8 %34, label %46 [
    i8 9, label %44
    i8 13, label %45
  ]

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.103, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %47 unwind label %.thread102

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.104, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %47 unwind label %.critedge79.thread105

46:                                               ; preds = %43
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, i32 noundef %40) #6
  br label %47

47:                                               ; preds = %44, %45, %46, %42
  %.038 = phi i1 [ false, %42 ], [ true, %44 ], [ false, %45 ], [ false, %46 ]
  %.034 = phi i1 [ false, %42 ], [ false, %44 ], [ true, %45 ], [ false, %46 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  %48 = invoke noundef ptr @_ZN3sim1PEv()
          to label %49 unwind label %64

49:                                               ; preds = %47
  %50 = invoke noundef signext i8 @_ZN3sim5Param24defaultTileTextCharacterEv(ptr noundef nonnull align 8 dereferenceable(1056) %48)
          to label %51 unwind label %64

51:                                               ; preds = %49
  store i8 %50, ptr %13, align 1, !tbaa !32
  invoke void @_ZN2el6Logger4warnINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJcEEEvPKcRKT_DpRKT0_(ptr noundef nonnull align 8 dereferenceable(728) %38, ptr noundef nonnull @.str.101, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %52 unwind label %64

52:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br i1 %.034, label %53, label %.critedge71

53:                                               ; preds = %52
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %.critedge71

.critedge71:                                      ; preds = %52, %53
  br i1 %.038, label %54, label %.critedge73

54:                                               ; preds = %.critedge71
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br label %.critedge73

.critedge73:                                      ; preds = %.critedge71, %54
  br i1 %41, label %55, label %.critedge75

55:                                               ; preds = %.critedge73
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  br label %.critedge75

.critedge75:                                      ; preds = %.critedge73, %55
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  %56 = invoke noundef ptr @_ZN3sim1PEv()
          to label %57 unwind label %59

57:                                               ; preds = %.critedge75
  %58 = invoke noundef signext i8 @_ZN3sim5Param24defaultTileTextCharacterEv(ptr noundef nonnull align 8 dereferenceable(1056) %56)
          to label %69 unwind label %59

59:                                               ; preds = %69, %57, %.critedge75, %37, %33, %31
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %81

.critedge79.thread:                               ; preds = %42
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %68

.thread102:                                       ; preds = %44
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br label %.critedge81

.critedge79.thread105:                            ; preds = %45
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %.critedge81

64:                                               ; preds = %47, %49, %51
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br i1 %.034, label %66, label %.critedge77

66:                                               ; preds = %64
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br i1 %.038, label %67, label %.critedge79

.critedge77:                                      ; preds = %64
  br i1 %.038, label %67, label %.critedge79

67:                                               ; preds = %66, %.critedge77
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br i1 %41, label %68, label %.critedge81

.critedge79:                                      ; preds = %66, %.critedge77
  br i1 %41, label %68, label %.critedge81

68:                                               ; preds = %67, %.critedge79.thread, %.critedge79
  %.pn.pn.pn97 = phi { ptr, i32 } [ %61, %.critedge79.thread ], [ %65, %.critedge79 ], [ %65, %67 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  br label %.critedge81

.critedge81:                                      ; preds = %.critedge79.thread105, %.thread102, %67, %.critedge79, %68
  %.pn.pn.pn96 = phi { ptr, i32 } [ %65, %.critedge79 ], [ %.pn.pn.pn97, %68 ], [ %65, %67 ], [ %62, %.thread102 ], [ %63, %.critedge79.thread105 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  br label %81

69:                                               ; preds = %57, %36
  %.060 = phi i8 [ %34, %36 ], [ %58, %57 ]
  %70 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %8, i8 noundef signext %.060)
          to label %71 unwind label %59

71:                                               ; preds = %69
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %72 = load i32, ptr %18, align 4, !tbaa !31
  %73 = mul nsw i32 %72, %25
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv.next, %74
  br i1 %75, label %.lr.ph, label %.critedge2.loopexit, !llvm.loop !33

.critedge2.loopexit:                              ; preds = %71, %.lr.ph
  %.1.lcssa.ph.in = phi i64 [ %indvars.iv, %.lr.ph ], [ %indvars.iv.next, %71 ]
  %.1.lcssa.ph = trunc i64 %.1.lcssa.ph.in to i32
  br label %.critedge2

.critedge2:                                       ; preds = %.critedge2.loopexit, %24
  %.1.lcssa = phi i32 [ %.033127, %24 ], [ %.1.lcssa.ph, %.critedge2.loopexit ]
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %76 unwind label %79

76:                                               ; preds = %.critedge2
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  %77 = load i32, ptr %15, align 8, !tbaa !9
  %78 = icmp slt i32 %25, %77
  br i1 %78, label %20, label %.critedge, !llvm.loop !35

79:                                               ; preds = %.critedge2
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %81

81:                                               ; preds = %59, %.critedge81, %79
  %.pn66.pn = phi { ptr, i32 } [ %80, %79 ], [ %60, %59 ], [ %.pn.pn.pn96, %.critedge81 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %94

.critedge:                                        ; preds = %20, %76, %4
  %82 = getelementptr inbounds i8, ptr %0, i64 16
  %83 = load ptr, ptr %82, align 8, !tbaa !36
  invoke void @_ZN3sim11MazeGraphic11setTileTextEiiRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(24) %83, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %84 unwind label %90

84:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %85 = invoke i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %86 unwind label %92

86:                                               ; preds = %84
  %87 = getelementptr inbounds i8, ptr %0, i64 248
  store i64 %85, ptr %14, align 8
  %88 = invoke { ptr, i8 } @_ZNSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(48) %87, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %89 unwind label %92

89:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  ret void

90:                                               ; preds = %.critedge
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %94

92:                                               ; preds = %86, %84
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %94

94:                                               ; preds = %92, %90, %81
  %.pn66.pn.pn = phi { ptr, i32 } [ %.pn66.pn, %81 ], [ %93, %92 ], [ %91, %90 ]
  call void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  resume { ptr, i32 } %.pn66.pn.pn
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #3

; 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

; 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 nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3sim18ContainerUtilities11setContainsIcEEbRKSt3setIT_St4lessIS3_ESaIS3_EES3_(ptr noundef nonnull align 8 dereferenceable(48), i8 noundef signext) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2el6Logger4warnINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJcEEEvPKcRKT_DpRKT0_(ptr noundef nonnull align 8 dereferenceable(728), ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5 align 2

declare noundef signext i8 @_ZN3sim5Param24defaultTileTextCharacterEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #1

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

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

declare void @_ZN3sim11MazeGraphic11setTileTextEiiRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 176}
!10 = !{!"_ZTSN3sim14MouseInterfaceE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !21, i64 80, !25, i64 192, !26, i64 200, !26, i64 248}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"_ZTSSt3setIcSt4lessIcESaIcEE", !13, i64 0}
!13 = !{!"_ZTSSt8_Rb_treeIccSt9_IdentityIcESt4lessIcESaIcEE", !14, i64 0}
!14 = !{!"_ZTSNSt8_Rb_treeIccSt9_IdentityIcESt4lessIcESaIcEE13_Rb_tree_implIS3_Lb1EEE", !15, i64 0, !17, i64 8}
!15 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIcEE", !16, i64 0}
!16 = !{!"_ZTSSt4lessIcE"}
!17 = !{!"_ZTSSt15_Rb_tree_header", !18, i64 0, !20, i64 32}
!18 = !{!"_ZTSSt18_Rb_tree_node_base", !19, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSN3sim27StaticMouseAlgorithmOptionsE", !22, i64 0, !22, i64 32, !22, i64 64, !6, i64 96, !6, i64 100, !24, i64 104}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !20, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!24 = !{!"double", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTSSt3setISt4pairIiiESt4lessIS1_ESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeISt4pairIiiES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeISt4pairIiiES1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE13_Rb_tree_implIS5_Lb1EEE", !29, i64 0, !17, i64 8}
!29 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt4pairIiiEEE", !30, i64 0}
!30 = !{!"_ZTSSt4lessISt4pairIiiEE"}
!31 = !{!10, !6, i64 180}
!32 = !{!7, !7, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = !{!10, !11, i64 16}


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