; LLVM IR from mackorone/mms :: old/v2/src/sim/Tile.ll (ZN3sim4TileC2Ev)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.83" = type <{ i32, i8, [3 x i8] }>
%"struct.std::pair.80" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.sim::Tile" = type { i32, i32, %"class.std::map.55", i32, %"class.sim::Polygon", %"class.sim::Polygon", %"class.std::map.70", %"class.std::vector.75" }
%"class.std::map.55" = type { %"class.std::_Rb_tree.56" }
%"class.std::_Rb_tree.56" = 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" }
%"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.sim::Polygon" = type { %"class.std::vector.60", %"class.std::vector.65" }
%"class.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = type { %"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = type { %"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.70" = type { %"class.std::_Rb_tree.71" }
%"class.std::_Rb_tree.71" = type { %"struct.std::_Rb_tree<sim::Direction, std::pair<const sim::Direction, sim::Polygon>, std::_Select1st<std::pair<const sim::Direction, sim::Polygon>>, std::less<sim::Direction>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<sim::Direction, std::pair<const sim::Direction, sim::Polygon>, std::_Select1st<std::pair<const sim::Direction, sim::Polygon>>, std::less<sim::Direction>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.75" = type { %"struct.std::_Vector_base.76" }
%"struct.std::_Vector_base.76" = type { %"struct.std::_Vector_base<sim::Polygon, std::allocator<sim::Polygon>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Polygon, std::allocator<sim::Polygon>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Polygon, std::allocator<sim::Polygon>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Polygon, std::allocator<sim::Polygon>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN3simL10DIRECTIONSE = external hidden global %"class.std::vector", 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
define dso_local void @_ZN3sim4TileC2Ev(ptr noundef nonnull align 8 dereferenceable(232) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair.83", align 4
  %10 = alloca i8, align 1
  %11 = alloca %"struct.std::pair.80", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %12 = load ptr, ptr %2, align 8
  %13 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 0
  store i32 -1, ptr %13, align 8, !tbaa !9
  %14 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 1
  store i32 -1, ptr %14, align 4, !tbaa !37
  %15 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 2
  call void @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  %16 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 3
  store i32 -1, ptr %16, align 8, !tbaa !38
  %17 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 4
  invoke void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %17)
          to label %18 unwind label %30

18:                                               ; preds = %1
  %19 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 5
  invoke void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %19)
          to label %20 unwind label %34

20:                                               ; preds = %18
  %21 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 6
  call void @_ZNSt3mapIN3sim9DirectionENS0_7PolygonESt4lessIS1_ESaISt4pairIKS1_S2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #5
  %22 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 7
  call void @_ZNSt6vectorIN3sim7PolygonESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store ptr @_ZN3simL10DIRECTIONSE, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %23 = call ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3simL10DIRECTIONSE) #5
  %24 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %25 = call ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3simL10DIRECTIONSE) #5
  %26 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %25, ptr %26, align 8
  br label %27

27:                                               ; preds = %51, %20
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %28, label %38, label %29

29:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %57

30:                                               ; preds = %1
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %3, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %4, align 4
  br label %59

34:                                               ; preds = %18
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %3, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %4, align 4
  br label %58

38:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %40 = load i32, ptr %39, align 4, !tbaa !39
  store i32 %40, ptr %8, align 4, !tbaa !39
  %41 = getelementptr inbounds %"class.sim::Tile", ptr %12, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  store i8 0, ptr %10, align 1, !tbaa !41
  %42 = invoke i64 @_ZSt9make_pairIRN3sim9DirectionEbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %43 unwind label %53

43:                                               ; preds = %38
  %44 = trunc i64 %42 to i40
  store i40 %44, ptr %9, align 4
  %45 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %41, ptr noundef nonnull align 4 dereferenceable(5) %9)
          to label %46 unwind label %53

46:                                               ; preds = %43
  %47 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %48 = extractvalue { ptr, i8 } %45, 0
  store ptr %48, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %50 = extractvalue { ptr, i8 } %45, 1
  store i8 %50, ptr %49, align 8
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %51

51:                                               ; preds = %46
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %27

53:                                               ; preds = %43, %38
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %3, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @_ZNSt6vectorIN3sim7PolygonESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  call void @_ZNSt3mapIN3sim9DirectionENS0_7PolygonESt4lessIS1_ESaISt4pairIKS1_S2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #5
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #5
  br label %58

57:                                               ; preds = %29
  ret void

58:                                               ; preds = %53, %34
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #5
  br label %59

59:                                               ; preds = %58, %30
  call void @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #5
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %3, align 8
  %62 = load i32, ptr %4, align 4
  %63 = insertvalue { ptr, i32 } poison, ptr %61, 0
  %64 = insertvalue { ptr, i32 } %63, i32 %62, 1
  resume { ptr, i32 } %64
}

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

declare void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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, !11, i64 0}
!10 = !{!"_ZTSN3sim4TileE", !11, i64 0, !11, i64 4, !12, i64 8, !11, i64 56, !21, i64 64, !21, i64 112, !30, i64 160, !33, i64 208}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE", !13, i64 0}
!13 = !{!"_ZTSSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !14, i64 0}
!14 = !{!"_ZTSNSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !15, i64 0, !17, i64 8}
!15 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN3sim9DirectionEEE", !16, i64 0}
!16 = !{!"_ZTSSt4lessIN3sim9DirectionEE"}
!17 = !{!"_ZTSSt15_Rb_tree_header", !18, i64 0, !20, i64 32}
!18 = !{!"_ZTSSt18_Rb_tree_node_base", !19, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSN3sim7PolygonE", !22, i64 0, !26, i64 24}
!22 = !{!"_ZTSSt6vectorIN3sim9CartesianESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN3sim9CartesianESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN3sim9CartesianESaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN3sim9CartesianESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSSt6vectorIN3sim8TriangleESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIN3sim8TriangleESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN3sim8TriangleESaIS1_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN3sim8TriangleESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTSSt3mapIN3sim9DirectionENS0_7PolygonESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !31, i64 0}
!31 = !{!"_ZTSSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_NS0_7PolygonEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !32, i64 0}
!32 = !{!"_ZTSNSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_NS0_7PolygonEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !15, i64 0, !17, i64 8}
!33 = !{!"_ZTSSt6vectorIN3sim7PolygonESaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIN3sim7PolygonESaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN3sim7PolygonESaIS1_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN3sim7PolygonESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!10, !11, i64 4}
!38 = !{!10, !11, i64 56}
!39 = !{!40, !40, i64 0}
!40 = !{!"_ZTSN3sim9DirectionE", !7, i64 0}
!41 = !{!42, !42, i64 0}
!42 = !{!"bool", !7, i64 0}


; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Direction, std::allocator<sim::Direction>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.std::pair.83" = type <{ i32, i8, [3 x i8] }>

@_ZN3simL10DIRECTIONSE = external hidden global %"class.std::vector", 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
define dso_local void @_ZN3sim4TileC2Ev(ptr noundef nonnull align 8 dereferenceable(232) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair.83", align 8
  %6 = alloca i8, align 1
  store i32 -1, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 -1, ptr %7, align 4, !tbaa !36
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 -1, ptr %9, align 8, !tbaa !37
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  invoke void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %10)
          to label %11 unwind label %19

11:                                               ; preds = %1
  %12 = getelementptr inbounds i8, ptr %0, i64 112
  invoke void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %12)
          to label %13 unwind label %21

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 160
  tail call void @_ZNSt3mapIN3sim9DirectionENS0_7PolygonESt4lessIS1_ESaISt4pairIKS1_S2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  %15 = getelementptr inbounds i8, ptr %0, i64 208
  tail call void @_ZNSt6vectorIN3sim7PolygonESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %16 = tail call ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3simL10DIRECTIONSE) #5
  store ptr %16, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %17 = tail call ptr @_ZNKSt6vectorIN3sim9DirectionESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZN3simL10DIRECTIONSE) #5
  store ptr %17, ptr %3, align 8
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %18, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %29, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret void

19:                                               ; preds = %1
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %35

21:                                               ; preds = %11
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %34

.lr.ph:                                           ; preds = %13, %29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %24 = load i32, ptr %23, align 4, !tbaa !38
  store i32 %24, ptr %4, align 4, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  store i8 0, ptr %6, align 1, !tbaa !40
  %25 = invoke i64 @_ZSt9make_pairIRN3sim9DirectionEbESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %26 unwind label %32

26:                                               ; preds = %.lr.ph
  %27 = trunc i64 %25 to i40
  store i40 %27, ptr %5, align 8
  %28 = invoke { ptr, i8 } @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE6insertIS4_IS1_bEEENSt9enable_ifIXsr16is_constructibleIS6_T_EE5valueES4_ISt17_Rb_tree_iteratorIS6_EbEE4typeEOSC_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 4 dereferenceable(5) %5)
          to label %29 unwind label %32

29:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3sim9DirectionESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br i1 %31, label %.lr.ph, label %._crit_edge

32:                                               ; preds = %26, %.lr.ph
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @_ZNSt6vectorIN3sim7PolygonESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @_ZNSt3mapIN3sim9DirectionENS0_7PolygonESt4lessIS1_ESaISt4pairIKS1_S2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #5
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #5
  br label %34

34:                                               ; preds = %32, %21
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %22, %21 ]
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #5
  br label %35

35:                                               ; preds = %34, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %34 ], [ %20, %19 ]
  call void @_ZNSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  resume { ptr, i32 } %.pn.pn
}

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

declare void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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, !7, i64 0}
!6 = !{!"_ZTSN3sim4TileE", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 56, !20, i64 64, !20, i64 112, !29, i64 160, !32, i64 208}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt3mapIN3sim9DirectionEbSt4lessIS1_ESaISt4pairIKS1_bEEE", !11, i64 0}
!11 = !{!"_ZTSSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !12, i64 0}
!12 = !{!"_ZTSNSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_bESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !13, i64 0, !15, i64 8}
!13 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN3sim9DirectionEEE", !14, i64 0}
!14 = !{!"_ZTSSt4lessIN3sim9DirectionEE"}
!15 = !{!"_ZTSSt15_Rb_tree_header", !16, i64 0, !19, i64 32}
!16 = !{!"_ZTSSt18_Rb_tree_node_base", !17, i64 0, !18, i64 8, !18, i64 16, !18, i64 24}
!17 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!"_ZTSN3sim7PolygonE", !21, i64 0, !25, i64 24}
!21 = !{!"_ZTSSt6vectorIN3sim9CartesianESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN3sim9CartesianESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN3sim9CartesianESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN3sim9CartesianESaIS1_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!25 = !{!"_ZTSSt6vectorIN3sim8TriangleESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIN3sim8TriangleESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN3sim8TriangleESaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN3sim8TriangleESaIS1_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!29 = !{!"_ZTSSt3mapIN3sim9DirectionENS0_7PolygonESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !30, i64 0}
!30 = !{!"_ZTSSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_NS0_7PolygonEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !31, i64 0}
!31 = !{!"_ZTSNSt8_Rb_treeIN3sim9DirectionESt4pairIKS1_NS0_7PolygonEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !13, i64 0, !15, i64 8}
!32 = !{!"_ZTSSt6vectorIN3sim7PolygonESaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIN3sim7PolygonESaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIN3sim7PolygonESaIS1_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN3sim7PolygonESaIS1_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!36 = !{!6, !7, i64 4}
!37 = !{!6, !7, i64 56}
!38 = !{!39, !39, i64 0}
!39 = !{!"_ZTSN3sim9DirectionE", !8, i64 0}
!40 = !{!41, !41, i64 0}
!41 = !{!"bool", !8, i64 0}


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