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

; 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::map.21" = type { %"class.std::_Rb_tree.22" }
%"class.std::_Rb_tree.22" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, sim::Color>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, sim::Color>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, sim::Color>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, sim::Color>>, std::less<std::__cxx11::basic_string<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 }
%"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] }
%"struct.std::pair.237" = type { i32, float }
%"class.sim::TileGraphic" = type { ptr, ptr, i32, %"class.std::map.183", i8, %"class.std::vector.188" }
%"class.std::map.183" = type { %"class.std::_Rb_tree.184" }
%"class.std::_Rb_tree.184" = type { %"struct.std::_Rb_tree<sim::Direction, std::pair<const sim::Direction, bool>, std::_Select1st<std::pair<const sim::Direction, bool>>, std::less<sim::Direction>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<sim::Direction, std::pair<const sim::Direction, bool>, std::_Select1st<std::pair<const sim::Direction, bool>>, std::less<sim::Direction>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.188" = type { %"struct.std::_Vector_base.189" }
%"struct.std::_Vector_base.189" = 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 }

@_ZN3simL15STRING_TO_COLORB5cxx11E = external hidden global %"class.std::map.21", align 8

; 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

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

declare noundef ptr @_ZN3sim1PEv() #2

declare void @_ZN3sim5Param13tileBaseColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3sim11TileGraphic12wallDeclaredENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) #1 align 2

declare noundef ptr @_ZN3sim1SEv() #2

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZNK3sim11TileGraphic23deduceWallColorAndAlphaENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.std::pair.237", align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #4
  %18 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param13tileWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(1056) %18)
  %19 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %20 unwind label %32

20:                                               ; preds = %2
  %21 = load i32, ptr %19, align 4, !tbaa !11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  store i32 %21, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store float 1.000000e+00, ptr %10, align 4, !tbaa !13
  %22 = call noundef ptr @_ZN3sim1SEv()
  %23 = call noundef zeroext i1 @_ZN3sim5State16wallTruthVisibleEv(ptr noundef nonnull align 8 dereferenceable(168) %22)
  br i1 %23, label %24, label %36

24:                                               ; preds = %20
  %25 = getelementptr inbounds %"class.sim::TileGraphic", ptr %17, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = call noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %26, i32 noundef %27)
  %29 = zext i1 %28 to i64
  %30 = select i1 %28, double 1.000000e+00, double 0.000000e+00
  %31 = fptrunc double %30 to float
  store float %31, ptr %10, align 4, !tbaa !13
  br label %110

32:                                               ; preds = %2
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %8, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  br label %126

36:                                               ; preds = %20
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = call noundef zeroext i1 @_ZNK3sim11TileGraphic12wallDeclaredENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(104) %17, i32 noundef %37)
  br i1 %38, label %39, label %85

39:                                               ; preds = %36
  %40 = getelementptr inbounds %"class.sim::TileGraphic", ptr %17, i32 0, i32 3
  %41 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %40, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %42 = load i8, ptr %41, align 1, !tbaa !31, !range !32, !noundef !33
  %43 = trunc i8 %42 to i1
  br i1 %43, label %44, label %68

44:                                               ; preds = %39
  %45 = getelementptr inbounds %"class.sim::TileGraphic", ptr %17, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = call noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %46, i32 noundef %47)
  br i1 %48, label %49, label %58

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  %50 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param13tileWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(1056) %50)
  %51 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %52 unwind label %54

52:                                               ; preds = %49
  %53 = load i32, ptr %51, align 4, !tbaa !11
  store i32 %53, ptr %6, align 4, !tbaa !11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  br label %67

54:                                               ; preds = %49
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %8, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  br label %125

58:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  %59 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param32tileIncorrectlyDeclaredWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(1056) %59)
  %60 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %61 unwind label %63

61:                                               ; preds = %58
  %62 = load i32, ptr %60, align 4, !tbaa !11
  store i32 %62, ptr %6, align 4, !tbaa !11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %67

63:                                               ; preds = %58
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %8, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %125

67:                                               ; preds = %61, %52
  br label %84

68:                                               ; preds = %39
  %69 = getelementptr inbounds %"class.sim::TileGraphic", ptr %17, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = call noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %70, i32 noundef %71)
  br i1 %72, label %73, label %82

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  %74 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param34tileIncorrectlyDeclaredNoWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(1056) %74)
  %75 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %76 unwind label %78

76:                                               ; preds = %73
  %77 = load i32, ptr %75, align 4, !tbaa !11
  store i32 %77, ptr %6, align 4, !tbaa !11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  br label %83

78:                                               ; preds = %73
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %8, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  br label %125

82:                                               ; preds = %68
  store float 0.000000e+00, ptr %10, align 4, !tbaa !13
  br label %83

83:                                               ; preds = %82, %76
  br label %84

84:                                               ; preds = %83, %67
  br label %109

85:                                               ; preds = %36
  %86 = getelementptr inbounds %"class.sim::TileGraphic", ptr %17, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !15
  %88 = load i32, ptr %5, align 4, !tbaa !9
  %89 = call noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %87, i32 noundef %88)
  br i1 %89, label %90, label %99

90:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #4
  %91 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param23tileUndeclaredWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(1056) %91)
  %92 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %93 unwind label %95

93:                                               ; preds = %90
  %94 = load i32, ptr %92, align 4, !tbaa !11
  store i32 %94, ptr %6, align 4, !tbaa !11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #4
  br label %108

95:                                               ; preds = %90
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %8, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #4
  br label %125

99:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  %100 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param25tileUndeclaredNoWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(1056) %100)
  %101 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %102 unwind label %104

102:                                              ; preds = %99
  %103 = load i32, ptr %101, align 4, !tbaa !11
  store i32 %103, ptr %6, align 4, !tbaa !11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  br label %108

104:                                              ; preds = %99
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %8, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  br label %125

108:                                              ; preds = %102, %93
  br label %109

109:                                              ; preds = %108, %84
  br label %110

110:                                              ; preds = %109, %24
  %111 = load i32, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #4
  %112 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param13tileBaseColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(1056) %112)
  %113 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %114 unwind label %118

114:                                              ; preds = %110
  %115 = load i32, ptr %113, align 4, !tbaa !11
  %116 = icmp eq i32 %111, %115
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br i1 %116, label %117, label %122

117:                                              ; preds = %114
  store float 0.000000e+00, ptr %10, align 4, !tbaa !13
  br label %122

118:                                              ; preds = %110
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %8, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  br label %125

122:                                              ; preds = %117, %114
  %123 = call i64 @_ZSt9make_pairIRN3sim5ColorERfESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i64 %123, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %124 = load i64, ptr %3, align 4
  ret i64 %124

125:                                              ; preds = %118, %104, %95, %78, %63, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %126

126:                                              ; preds = %125, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %127

127:                                              ; preds = %126
  %128 = load ptr, ptr %8, align 8
  %129 = load i32, ptr %9, align 4
  %130 = insertvalue { ptr, i32 } poison, ptr %128, 0
  %131 = insertvalue { ptr, i32 } %130, i32 %129, 1
  resume { ptr, i32 } %131
}

declare void @_ZN3sim5Param13tileWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) #2

declare noundef zeroext i1 @_ZN3sim5State16wallTruthVisibleEv(ptr noundef nonnull align 8 dereferenceable(168)) #2

declare noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) #2

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

declare void @_ZN3sim5Param32tileIncorrectlyDeclaredWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) #2

declare void @_ZN3sim5Param34tileIncorrectlyDeclaredNoWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) #2

declare void @_ZN3sim5Param23tileUndeclaredWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) #2

declare void @_ZN3sim5Param25tileUndeclaredNoWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 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 = { 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 = !{!"_ZTSN3sim9DirectionE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN3sim5ColorE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSN3sim11TileGraphicE", !6, i64 0, !6, i64 8, !12, i64 16, !17, i64 24, !26, i64 72, !27, i64 80}
!17 = !{!"_ZTSSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE", !18, i64 0}
!18 = !{!"_ZTSSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !19, i64 0}
!19 = !{!"_ZTSNSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN3sim9DirectionEEE", !21, i64 0}
!21 = !{!"_ZTSSt4lessIN3sim9DirectionEE"}
!22 = !{!"_ZTSSt15_Rb_tree_header", !23, i64 0, !25, i64 32}
!23 = !{!"_ZTSSt18_Rb_tree_node_base", !24, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!26, !26, i64 0}
!32 = !{i8 0, i8 2}
!33 = !{}


; 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::map.21" = type { %"class.std::_Rb_tree.22" }
%"class.std::_Rb_tree.22" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, sim::Color>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, sim::Color>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, sim::Color>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, sim::Color>>, std::less<std::__cxx11::basic_string<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 }
%"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] }

@_ZN3simL15STRING_TO_COLORB5cxx11E = external hidden global %"class.std::map.21", align 8

; 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

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

declare noundef ptr @_ZN3sim1PEv() local_unnamed_addr #2

declare void @_ZN3sim5Param13tileBaseColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3sim11TileGraphic12wallDeclaredENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) local_unnamed_addr #1 align 2

declare noundef ptr @_ZN3sim1SEv() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local i64 @_ZNK3sim11TileGraphic23deduceWallColorAndAlphaENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca float, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  store i32 %1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  %13 = tail call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param13tileWallColorB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(1056) %13)
  %14 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %15 unwind label %23

15:                                               ; preds = %2
  %16 = load i32, ptr %14, align 4, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  store i32 %16, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store float 1.000000e+00, ptr %6, align 4, !tbaa !11
  %17 = call noundef ptr @_ZN3sim1SEv()
  %18 = call noundef zeroext i1 @_ZN3sim5State16wallTruthVisibleEv(ptr noundef nonnull align 8 dereferenceable(168) %17)
  br i1 %18, label %19, label %25

19:                                               ; preds = %15
  %20 = load ptr, ptr %0, align 8, !tbaa !13
  %21 = call noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %20, i32 noundef %1)
  %22 = select i1 %21, float 1.000000e+00, float 0.000000e+00
  store float %22, ptr %6, align 4, !tbaa !11
  br label %76

23:                                               ; preds = %2
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %89

25:                                               ; preds = %15
  %26 = call noundef zeroext i1 @_ZNK3sim11TileGraphic12wallDeclaredENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1)
  br i1 %26, label %27, label %59

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %0, i64 24
  %29 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE2atERS5_(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %30 = load i8, ptr %29, align 1, !tbaa !30, !range !31, !noundef !32
  %31 = trunc nuw i8 %30 to i1
  %32 = load ptr, ptr %0, align 8, !tbaa !13
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = call noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %32, i32 noundef %33)
  br i1 %31, label %35, label %50

35:                                               ; preds = %27
  br i1 %34, label %36, label %43

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  %37 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param13tileWallColorB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(1056) %37)
  %38 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %39 unwind label %41

39:                                               ; preds = %36
  %40 = load i32, ptr %38, align 4, !tbaa !9
  store i32 %40, ptr %4, align 4, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %76

41:                                               ; preds = %36
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %88

43:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  %44 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param32tileIncorrectlyDeclaredWallColorB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(1056) %44)
  %45 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %46 unwind label %48

46:                                               ; preds = %43
  %47 = load i32, ptr %45, align 4, !tbaa !9
  store i32 %47, ptr %4, align 4, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br label %76

48:                                               ; preds = %43
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  br label %88

50:                                               ; preds = %27
  br i1 %34, label %51, label %58

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  %52 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param34tileIncorrectlyDeclaredNoWallColorB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(1056) %52)
  %53 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %54 unwind label %56

54:                                               ; preds = %51
  %55 = load i32, ptr %53, align 4, !tbaa !9
  store i32 %55, ptr %4, align 4, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  br label %76

56:                                               ; preds = %51
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #4
  br label %88

58:                                               ; preds = %50
  store float 0.000000e+00, ptr %6, align 4, !tbaa !11
  br label %76

59:                                               ; preds = %25
  %60 = load ptr, ptr %0, align 8, !tbaa !13
  %61 = call noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %60, i32 noundef %1)
  br i1 %61, label %62, label %69

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  %63 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param23tileUndeclaredWallColorB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(1056) %63)
  %64 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %65 unwind label %67

65:                                               ; preds = %62
  %66 = load i32, ptr %64, align 4, !tbaa !9
  store i32 %66, ptr %4, align 4, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  br label %76

67:                                               ; preds = %62
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  br label %88

69:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #4
  %70 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param25tileUndeclaredNoWallColorB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(1056) %70)
  %71 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %72 unwind label %74

72:                                               ; preds = %69
  %73 = load i32, ptr %71, align 4, !tbaa !9
  store i32 %73, ptr %4, align 4, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  br label %76

74:                                               ; preds = %69
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #4
  br label %88

76:                                               ; preds = %54, %58, %39, %46, %72, %65, %19
  %77 = phi i32 [ %55, %54 ], [ %16, %58 ], [ %40, %39 ], [ %47, %46 ], [ %73, %72 ], [ %66, %65 ], [ %16, %19 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #4
  %78 = call noundef ptr @_ZN3sim1PEv()
  call void @_ZN3sim5Param13tileBaseColorB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(1056) %78)
  %79 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3sim5ColorESt4lessIS5_ESaISt4pairIKS5_S7_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(48) @_ZN3simL15STRING_TO_COLORB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %80 unwind label %84

80:                                               ; preds = %76
  %81 = load i32, ptr %79, align 4, !tbaa !9
  %82 = icmp eq i32 %77, %81
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  br i1 %82, label %83, label %86

83:                                               ; preds = %80
  store float 0.000000e+00, ptr %6, align 4, !tbaa !11
  br label %86

84:                                               ; preds = %76
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #4
  br label %88

86:                                               ; preds = %83, %80
  %87 = call i64 @_ZSt9make_pairIRN3sim5ColorERfESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  ret i64 %87

88:                                               ; preds = %84, %74, %67, %56, %48, %41
  %.pn = phi { ptr, i32 } [ %85, %84 ], [ %42, %41 ], [ %49, %48 ], [ %57, %56 ], [ %68, %67 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %89

89:                                               ; preds = %88, %23
  %.pn.pn = phi { ptr, i32 } [ %.pn, %88 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN3sim5Param13tileWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN3sim5State16wallTruthVisibleEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) local_unnamed_addr #2

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

declare void @_ZN3sim5Param32tileIncorrectlyDeclaredWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2

declare void @_ZN3sim5Param34tileIncorrectlyDeclaredNoWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2

declare void @_ZN3sim5Param23tileUndeclaredWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2

declare void @_ZN3sim5Param25tileUndeclaredNoWallColorB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 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 = { 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 = !{!"_ZTSN3sim9DirectionE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN3sim5ColorE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN3sim11TileGraphicE", !15, i64 0, !15, i64 8, !10, i64 16, !16, i64 24, !25, i64 72, !26, i64 80}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!"_ZTSSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE", !17, i64 0}
!17 = !{!"_ZTSSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !18, i64 0}
!18 = !{!"_ZTSNSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !19, i64 0, !21, i64 8}
!19 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN3sim9DirectionEEE", !20, i64 0}
!20 = !{!"_ZTSSt4lessIN3sim9DirectionEE"}
!21 = !{!"_ZTSSt15_Rb_tree_header", !22, i64 0, !24, i64 32}
!22 = !{!"_ZTSSt18_Rb_tree_node_base", !23, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!23 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!30 = !{!25, !25, i64 0}
!31 = !{i8 0, i8 2}
!32 = !{}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass