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

; 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.sim::Meters" = type { %"class.sim::Distance" }
%"class.sim::Distance" = type { ptr, double }
%"class.sim::Cartesian" = type { %"class.sim::Coordinate" }
%"class.sim::Coordinate" = type { ptr, %"class.sim::Meters", %"class.sim::Meters" }
%"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::initializer_list.86" = type { ptr, i64 }
%"class.std::allocator.62" = type { i8 }
%"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.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 }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim4Tile15initFullPolygonEii(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef %1, i32 noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.sim::Meters", align 8
  %8 = alloca %"class.sim::Meters", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.sim::Meters", align 8
  %12 = alloca %"class.sim::Cartesian", align 8
  %13 = alloca %"class.sim::Meters", align 8
  %14 = alloca %"class.sim::Meters", align 8
  %15 = alloca %"class.sim::Meters", align 8
  %16 = alloca %"class.sim::Meters", align 8
  %17 = alloca %"class.sim::Meters", align 8
  %18 = alloca %"class.sim::Meters", align 8
  %19 = alloca %"class.sim::Cartesian", align 8
  %20 = alloca %"class.sim::Meters", align 8
  %21 = alloca %"class.sim::Meters", align 8
  %22 = alloca %"class.sim::Meters", align 8
  %23 = alloca %"class.sim::Meters", align 8
  %24 = alloca %"class.sim::Meters", align 8
  %25 = alloca %"class.sim::Meters", align 8
  %26 = alloca %"class.sim::Cartesian", align 8
  %27 = alloca %"class.sim::Meters", align 8
  %28 = alloca %"class.sim::Meters", align 8
  %29 = alloca %"class.sim::Cartesian", align 8
  %30 = alloca %"class.sim::Meters", align 8
  %31 = alloca %"class.sim::Meters", align 8
  %32 = alloca %"class.sim::Polygon", align 8
  %33 = alloca %"class.std::vector.60", align 8
  %34 = alloca %"class.std::initializer_list.86", align 8
  %35 = alloca [4 x %"class.sim::Cartesian"], align 8
  %36 = alloca %"class.std::allocator.62", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %37 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %38 = call noundef ptr @_ZN3sim1PEv()
  %39 = call noundef double @_ZN3sim5Param9wallWidthEv(ptr noundef nonnull align 8 dereferenceable(1056) %38)
  call void @_ZN3sim6MetersC1Ed(ptr noundef nonnull align 8 dereferenceable(16) %8, double noundef %39)
  invoke void @_ZNK3sim6MetersdvEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %8, double noundef 2.000000e+00)
          to label %40 unwind label %126

40:                                               ; preds = %3
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %41 = invoke noundef ptr @_ZN3sim1PEv()
          to label %42 unwind label %130

42:                                               ; preds = %40
  %43 = invoke noundef double @_ZN3sim5Param10wallLengthEv(ptr noundef nonnull align 8 dereferenceable(1056) %41)
          to label %44 unwind label %130

44:                                               ; preds = %42
  %45 = invoke noundef ptr @_ZN3sim1PEv()
          to label %46 unwind label %130

46:                                               ; preds = %44
  %47 = invoke noundef double @_ZN3sim5Param9wallWidthEv(ptr noundef nonnull align 8 dereferenceable(1056) %45)
          to label %48 unwind label %130

48:                                               ; preds = %46
  %49 = fadd double %43, %47
  invoke void @_ZN3sim6MetersC1Ed(ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef %49)
          to label %50 unwind label %130

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %51 = call noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %37)
  %52 = sitofp i32 %51 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %14, ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef %52)
          to label %53 unwind label %134

53:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  %54 = call noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %37)
  %55 = icmp eq i32 %54, 0
  %56 = zext i1 %55 to i64
  %57 = select i1 %55, i32 1, i32 0
  %58 = sitofp i32 %57 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %15, ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef %58)
          to label %59 unwind label %138

59:                                               ; preds = %53
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %13, ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %60 unwind label %142

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %61 = call noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %37)
  %62 = sitofp i32 %61 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %17, ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef %62)
          to label %63 unwind label %146

63:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %64 = call noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %37)
  %65 = icmp eq i32 %64, 0
  %66 = zext i1 %65 to i64
  %67 = select i1 %65, i32 1, i32 0
  %68 = sitofp i32 %67 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %18, ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef %68)
          to label %69 unwind label %150

69:                                               ; preds = %63
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %70 unwind label %154

70:                                               ; preds = %69
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %12, ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %71 unwind label %158

71:                                               ; preds = %70
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  %72 = call noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %37)
  %73 = add nsw i32 %72, 1
  %74 = sitofp i32 %73 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %21, ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef %74)
          to label %75 unwind label %168

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %76 = call noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %37)
  %77 = load i32, ptr %5, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 1
  %79 = icmp eq i32 %76, %78
  %80 = zext i1 %79 to i64
  %81 = select i1 %79, i32 1, i32 0
  %82 = sitofp i32 %81 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %22, ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef %82)
          to label %83 unwind label %172

83:                                               ; preds = %75
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %20, ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %84 unwind label %176

84:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #7
  %85 = call noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %37)
  %86 = add nsw i32 %85, 1
  %87 = sitofp i32 %86 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %24, ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef %87)
          to label %88 unwind label %180

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #7
  %89 = call noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %37)
  %90 = load i32, ptr %6, align 4, !tbaa !9
  %91 = sub nsw i32 %90, 1
  %92 = icmp eq i32 %89, %91
  %93 = zext i1 %92 to i64
  %94 = select i1 %92, i32 1, i32 0
  %95 = sitofp i32 %94 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %25, ptr noundef nonnull align 8 dereferenceable(16) %7, double noundef %95)
          to label %96 unwind label %184

96:                                               ; preds = %88
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %23, ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %97 unwind label %188

97:                                               ; preds = %96
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %19, ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %98 unwind label %192

98:                                               ; preds = %97
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %27, ptr noundef nonnull align 8 dereferenceable(40) %19)
          to label %99 unwind label %202

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #7
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %28, ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %100 unwind label %206

100:                                              ; preds = %99
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %101 unwind label %210

101:                                              ; preds = %100
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #7
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %30, ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %102 unwind label %216

102:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #7
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %31, ptr noundef nonnull align 8 dereferenceable(40) %19)
          to label %103 unwind label %220

103:                                              ; preds = %102
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %29, ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %31)
          to label %104 unwind label %224

104:                                              ; preds = %103
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 160, ptr %35) #7
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %35, ptr noundef nonnull align 8 dereferenceable(40) %12) #7
  %105 = getelementptr inbounds %"class.sim::Cartesian", ptr %35, i64 1
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %105, ptr noundef nonnull align 8 dereferenceable(40) %29) #7
  %106 = getelementptr inbounds %"class.sim::Cartesian", ptr %35, i64 2
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %106, ptr noundef nonnull align 8 dereferenceable(40) %19) #7
  %107 = getelementptr inbounds %"class.sim::Cartesian", ptr %35, i64 3
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %107, ptr noundef nonnull align 8 dereferenceable(40) %26) #7
  %108 = getelementptr inbounds %"class.std::initializer_list.86", ptr %34, i32 0, i32 0
  store ptr %35, ptr %108, align 8, !tbaa !11
  %109 = getelementptr inbounds %"class.std::initializer_list.86", ptr %34, i32 0, i32 1
  store i64 4, ptr %109, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #7
  call void @_ZNSaIN3sim9CartesianEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #7
  %110 = getelementptr inbounds { ptr, i64 }, ptr %34, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8
  %112 = getelementptr inbounds { ptr, i64 }, ptr %34, i32 0, i32 1
  %113 = load i64, ptr %112, align 8
  invoke void @_ZNSt6vectorIN3sim9CartesianESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr %111, i64 %113, ptr noundef nonnull align 1 dereferenceable(1) %36)
          to label %114 unwind label %230

114:                                              ; preds = %104
  invoke void @_ZN3sim7PolygonC1ERKSt6vectorINS_9CartesianESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 8 dereferenceable(24) %33)
          to label %115 unwind label %234

115:                                              ; preds = %114
  %116 = getelementptr inbounds %"class.sim::Tile", ptr %37, i32 0, i32 4
  %117 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3sim7PolygonaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %116, ptr noundef nonnull align 8 dereferenceable(48) %32)
          to label %118 unwind label %238

118:                                              ; preds = %115
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #7
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  call void @_ZNSt15__new_allocatorIN3sim9CartesianEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #7
  %119 = getelementptr inbounds [4 x %"class.sim::Cartesian"], ptr %35, i32 0, i32 0
  %120 = getelementptr inbounds %"class.sim::Cartesian", ptr %119, i64 4
  br label %121

121:                                              ; preds = %121, %118
  %122 = phi ptr [ %120, %118 ], [ %123, %121 ]
  %123 = getelementptr inbounds %"class.sim::Cartesian", ptr %122, i64 -1
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %123) #7
  %124 = icmp eq ptr %123, %119
  br i1 %124, label %125, label %121

125:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 160, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %32) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %29) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %29) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %26) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  ret void

126:                                              ; preds = %3
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %9, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %10, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %256

130:                                              ; preds = %48, %46, %44, %42, %40
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %9, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %10, align 4
  br label %255

134:                                              ; preds = %50
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %9, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %10, align 4
  br label %167

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

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

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

150:                                              ; preds = %63
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %9, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %10, align 4
  br label %163

154:                                              ; preds = %69
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %9, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %10, align 4
  br label %162

158:                                              ; preds = %70
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %9, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %10, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  br label %162

162:                                              ; preds = %158, %154
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  br label %163

163:                                              ; preds = %162, %150
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br label %164

164:                                              ; preds = %163, %146
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  br label %165

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

166:                                              ; preds = %165, %138
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  br label %167

167:                                              ; preds = %166, %134
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  br label %254

168:                                              ; preds = %71
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %9, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %10, align 4
  br label %201

172:                                              ; preds = %75
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %9, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %10, align 4
  br label %200

176:                                              ; preds = %83
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %9, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %10, align 4
  br label %199

180:                                              ; preds = %84
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %9, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %10, align 4
  br label %198

184:                                              ; preds = %88
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %9, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %10, align 4
  br label %197

188:                                              ; preds = %96
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %9, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %10, align 4
  br label %196

192:                                              ; preds = %97
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %9, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %10, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  br label %196

196:                                              ; preds = %192, %188
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  br label %197

197:                                              ; preds = %196, %184
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  br label %198

198:                                              ; preds = %197, %180
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  br label %199

199:                                              ; preds = %198, %176
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  br label %200

200:                                              ; preds = %199, %172
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #7
  br label %201

201:                                              ; preds = %200, %168
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  br label %253

202:                                              ; preds = %98
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %9, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %10, align 4
  br label %215

206:                                              ; preds = %99
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %9, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %10, align 4
  br label %214

210:                                              ; preds = %100
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %9, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %10, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #7
  br label %214

214:                                              ; preds = %210, %206
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #7
  br label %215

215:                                              ; preds = %214, %202
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  br label %252

216:                                              ; preds = %101
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %9, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %10, align 4
  br label %229

220:                                              ; preds = %102
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %9, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %10, align 4
  br label %228

224:                                              ; preds = %103
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %9, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %10, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #7
  br label %228

228:                                              ; preds = %224, %220
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #7
  br label %229

229:                                              ; preds = %228, %216
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  br label %251

230:                                              ; preds = %104
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %9, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %10, align 4
  br label %243

234:                                              ; preds = %114
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %9, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %10, align 4
  br label %242

238:                                              ; preds = %115
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %9, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %10, align 4
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %32) #7
  br label %242

242:                                              ; preds = %238, %234
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  br label %243

243:                                              ; preds = %242, %230
  call void @_ZNSt15__new_allocatorIN3sim9CartesianEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #7
  %244 = getelementptr inbounds [4 x %"class.sim::Cartesian"], ptr %35, i32 0, i32 0
  %245 = getelementptr inbounds %"class.sim::Cartesian", ptr %244, i64 4
  br label %246

246:                                              ; preds = %246, %243
  %247 = phi ptr [ %245, %243 ], [ %248, %246 ]
  %248 = getelementptr inbounds %"class.sim::Cartesian", ptr %247, i64 -1
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %248) #7
  %249 = icmp eq ptr %248, %244
  br i1 %249, label %250, label %246

250:                                              ; preds = %246
  call void @llvm.lifetime.end.p0(i64 160, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %32) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %29) #7
  br label %251

251:                                              ; preds = %250, %229
  call void @llvm.lifetime.end.p0(i64 40, ptr %29) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %26) #7
  br label %252

252:                                              ; preds = %251, %215
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #7
  br label %253

253:                                              ; preds = %252, %201
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #7
  br label %254

254:                                              ; preds = %253, %167
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  br label %255

255:                                              ; preds = %254, %130
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  br label %256

256:                                              ; preds = %255, %126
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  br label %257

257:                                              ; preds = %256
  %258 = load ptr, ptr %9, align 8
  %259 = load i32, ptr %10, align 4
  %260 = insertvalue { ptr, i32 } poison, ptr %258, 0
  %261 = insertvalue { ptr, i32 } %260, i32 %259, 1
  resume { ptr, i32 } %261
}

declare noundef ptr @_ZN3sim1PEv() #4

declare noundef double @_ZN3sim5Param9wallWidthEv(ptr noundef nonnull align 8 dereferenceable(1056)) #4

declare void @_ZN3sim6MetersC1Ed(ptr noundef nonnull align 8 dereferenceable(16), double noundef) unnamed_addr #4

declare void @_ZNK3sim6MetersdvEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(16), double noundef) #4

; Function Attrs: nounwind
declare void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare noundef double @_ZN3sim5Param10wallLengthEv(ptr noundef nonnull align 8 dereferenceable(1056)) #4

declare void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(16), double noundef) #4

declare void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

declare void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

declare void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #4

declare void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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

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

declare void @_ZN3sim7PolygonC1ERKSt6vectorINS_9CartesianESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN3sim7PolygonaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #6 align 2

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

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

; Function Attrs: nounwind
declare void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5

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

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

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


; 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.sim::Meters" = type { %"class.sim::Distance" }
%"class.sim::Distance" = type { ptr, double }
%"class.sim::Cartesian" = type { %"class.sim::Coordinate" }
%"class.sim::Coordinate" = type { ptr, %"class.sim::Meters", %"class.sim::Meters" }
%"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::allocator.62" = type { i8 }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim4Tile15initFullPolygonEii(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.sim::Meters", align 8
  %5 = alloca %"class.sim::Meters", align 8
  %6 = alloca %"class.sim::Meters", align 8
  %7 = alloca %"class.sim::Cartesian", align 8
  %8 = alloca %"class.sim::Meters", align 8
  %9 = alloca %"class.sim::Meters", align 8
  %10 = alloca %"class.sim::Meters", align 8
  %11 = alloca %"class.sim::Meters", align 8
  %12 = alloca %"class.sim::Meters", align 8
  %13 = alloca %"class.sim::Meters", align 8
  %14 = alloca %"class.sim::Cartesian", align 8
  %15 = alloca %"class.sim::Meters", align 8
  %16 = alloca %"class.sim::Meters", align 8
  %17 = alloca %"class.sim::Meters", align 8
  %18 = alloca %"class.sim::Meters", align 8
  %19 = alloca %"class.sim::Meters", align 8
  %20 = alloca %"class.sim::Meters", align 8
  %21 = alloca %"class.sim::Cartesian", align 8
  %22 = alloca %"class.sim::Meters", align 8
  %23 = alloca %"class.sim::Meters", align 8
  %24 = alloca %"class.sim::Cartesian", align 8
  %25 = alloca %"class.sim::Meters", align 8
  %26 = alloca %"class.sim::Meters", align 8
  %27 = alloca %"class.sim::Polygon", align 8
  %28 = alloca %"class.std::vector.60", align 8
  %29 = alloca [4 x %"class.sim::Cartesian"], align 8
  %30 = alloca %"class.std::allocator.62", align 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %31 = tail call noundef ptr @_ZN3sim1PEv()
  %32 = tail call noundef double @_ZN3sim5Param9wallWidthEv(ptr noundef nonnull align 8 dereferenceable(1056) %31)
  call void @_ZN3sim6MetersC1Ed(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %32)
  invoke void @_ZNK3sim6MetersdvEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef 2.000000e+00)
          to label %33 unwind label %99

33:                                               ; preds = %3
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %34 = invoke noundef ptr @_ZN3sim1PEv()
          to label %35 unwind label %101

35:                                               ; preds = %33
  %36 = invoke noundef double @_ZN3sim5Param10wallLengthEv(ptr noundef nonnull align 8 dereferenceable(1056) %34)
          to label %37 unwind label %101

37:                                               ; preds = %35
  %38 = invoke noundef ptr @_ZN3sim1PEv()
          to label %39 unwind label %101

39:                                               ; preds = %37
  %40 = invoke noundef double @_ZN3sim5Param9wallWidthEv(ptr noundef nonnull align 8 dereferenceable(1056) %38)
          to label %41 unwind label %101

41:                                               ; preds = %39
  %42 = fadd double %36, %40
  invoke void @_ZN3sim6MetersC1Ed(ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef %42)
          to label %43 unwind label %101

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %44 = call noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %45 = sitofp i32 %44 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef %45)
          to label %46 unwind label %103

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  %47 = call noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %48 = icmp eq i32 %47, 0
  %49 = uitofp i1 %48 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef %49)
          to label %50 unwind label %105

50:                                               ; preds = %46
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %51 unwind label %107

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %52 = call noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %53 = sitofp i32 %52 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef %53)
          to label %54 unwind label %109

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %55 = call noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %56 = icmp eq i32 %55, 0
  %57 = uitofp i1 %56 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %13, ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef %57)
          to label %58 unwind label %111

58:                                               ; preds = %54
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %59 unwind label %113

59:                                               ; preds = %58
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %60 unwind label %115

60:                                               ; preds = %59
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  %61 = call noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %62 = add nsw i32 %61, 1
  %63 = sitofp i32 %62 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef %63)
          to label %64 unwind label %123

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  %65 = call noundef i32 @_ZNK3sim4Tile4getXEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %66 = add nsw i32 %1, -1
  %67 = icmp eq i32 %65, %66
  %68 = uitofp i1 %67 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %17, ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef %68)
          to label %69 unwind label %125

69:                                               ; preds = %64
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %15, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %70 unwind label %127

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #7
  %71 = call noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %72 = add nsw i32 %71, 1
  %73 = sitofp i32 %72 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %19, ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef %73)
          to label %74 unwind label %129

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #7
  %75 = call noundef i32 @_ZNK3sim4Tile4getYEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %76 = add nsw i32 %2, -1
  %77 = icmp eq i32 %75, %76
  %78 = uitofp i1 %77 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %20, ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef %78)
          to label %79 unwind label %131

79:                                               ; preds = %74
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %18, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %80 unwind label %133

80:                                               ; preds = %79
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %81 unwind label %135

81:                                               ; preds = %80
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #7
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %22, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %82 unwind label %143

82:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #7
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %23, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %83 unwind label %145

83:                                               ; preds = %82
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %21, ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %84 unwind label %147

84:                                               ; preds = %83
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #7
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %25, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %85 unwind label %151

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #7
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %26, ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %86 unwind label %153

86:                                               ; preds = %85
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %87 unwind label %155

87:                                               ; preds = %86
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %28) #7
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %29) #7
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %29, ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  %88 = getelementptr inbounds i8, ptr %29, i64 40
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %88, ptr noundef nonnull align 8 dereferenceable(40) %24) #7
  %89 = getelementptr inbounds i8, ptr %29, i64 80
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %89, ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  %90 = getelementptr inbounds i8, ptr %29, i64 120
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %90, ptr noundef nonnull align 8 dereferenceable(40) %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %30) #7
  call void @_ZNSaIN3sim9CartesianEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  invoke void @_ZNSt6vectorIN3sim9CartesianESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr nonnull %29, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %91 unwind label %159

91:                                               ; preds = %87
  invoke void @_ZN3sim7PolygonC1ERKSt6vectorINS_9CartesianESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %92 unwind label %161

92:                                               ; preds = %91
  %93 = getelementptr inbounds i8, ptr %0, i64 64
  %94 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3sim7PolygonaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %93, ptr noundef nonnull align 8 dereferenceable(48) %27)
          to label %95 unwind label %163

95:                                               ; preds = %92
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #7
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  call void @_ZNSt15__new_allocatorIN3sim9CartesianEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %30) #7
  %96 = getelementptr inbounds i8, ptr %29, i64 120
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %96) #7
  %97 = getelementptr inbounds i8, ptr %29, i64 80
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %97) #7
  %98 = getelementptr inbounds i8, ptr %29, i64 40
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %98) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %29) #7
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %27) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %24) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %21) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  ret void

99:                                               ; preds = %3
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %175

101:                                              ; preds = %41, %39, %37, %35, %33
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %174

103:                                              ; preds = %43
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %122

105:                                              ; preds = %46
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %121

107:                                              ; preds = %50
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %120

109:                                              ; preds = %51
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %119

111:                                              ; preds = %54
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %118

113:                                              ; preds = %58
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %117

115:                                              ; preds = %59
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  br label %117

117:                                              ; preds = %115, %113
  %.pn = phi { ptr, i32 } [ %116, %115 ], [ %114, %113 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  br label %118

118:                                              ; preds = %117, %111
  %.pn.pn = phi { ptr, i32 } [ %.pn, %117 ], [ %112, %111 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  br label %119

119:                                              ; preds = %118, %109
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %118 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  br label %120

120:                                              ; preds = %119, %107
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %119 ], [ %108, %107 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  br label %121

121:                                              ; preds = %120, %105
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %120 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  br label %122

122:                                              ; preds = %121, %103
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %121 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %173

123:                                              ; preds = %60
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %142

125:                                              ; preds = %64
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %141

127:                                              ; preds = %69
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %140

129:                                              ; preds = %70
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %139

131:                                              ; preds = %74
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %138

133:                                              ; preds = %79
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %137

135:                                              ; preds = %80
  %136 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  br label %137

137:                                              ; preds = %135, %133
  %.pn41 = phi { ptr, i32 } [ %136, %135 ], [ %134, %133 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  br label %138

138:                                              ; preds = %137, %131
  %.pn41.pn = phi { ptr, i32 } [ %.pn41, %137 ], [ %132, %131 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #7
  br label %139

139:                                              ; preds = %138, %129
  %.pn41.pn.pn = phi { ptr, i32 } [ %.pn41.pn, %138 ], [ %130, %129 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  br label %140

140:                                              ; preds = %139, %127
  %.pn41.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn, %139 ], [ %128, %127 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br label %141

141:                                              ; preds = %140, %125
  %.pn41.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn.pn, %140 ], [ %126, %125 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  br label %142

142:                                              ; preds = %141, %123
  %.pn41.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn.pn.pn, %141 ], [ %124, %123 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  br label %172

143:                                              ; preds = %81
  %144 = landingpad { ptr, i32 }
          cleanup
  br label %150

145:                                              ; preds = %82
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %149

147:                                              ; preds = %83
  %148 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  br label %149

149:                                              ; preds = %147, %145
  %.pn48 = phi { ptr, i32 } [ %148, %147 ], [ %146, %145 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  br label %150

150:                                              ; preds = %149, %143
  %.pn48.pn = phi { ptr, i32 } [ %.pn48, %149 ], [ %144, %143 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #7
  br label %171

151:                                              ; preds = %84
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %158

153:                                              ; preds = %85
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %157

155:                                              ; preds = %86
  %156 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #7
  br label %157

157:                                              ; preds = %155, %153
  %.pn51 = phi { ptr, i32 } [ %156, %155 ], [ %154, %153 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  br label %158

158:                                              ; preds = %157, %151
  %.pn51.pn = phi { ptr, i32 } [ %.pn51, %157 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #7
  br label %170

159:                                              ; preds = %87
  %160 = landingpad { ptr, i32 }
          cleanup
  br label %166

161:                                              ; preds = %91
  %162 = landingpad { ptr, i32 }
          cleanup
  br label %165

163:                                              ; preds = %92
  %164 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #7
  br label %165

165:                                              ; preds = %163, %161
  %.pn54 = phi { ptr, i32 } [ %164, %163 ], [ %162, %161 ]
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  br label %166

166:                                              ; preds = %165, %159
  %.pn54.pn = phi { ptr, i32 } [ %.pn54, %165 ], [ %160, %159 ]
  call void @_ZNSt15__new_allocatorIN3sim9CartesianEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %30) #7
  %167 = getelementptr inbounds i8, ptr %29, i64 120
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %167) #7
  %168 = getelementptr inbounds i8, ptr %29, i64 80
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %168) #7
  %169 = getelementptr inbounds i8, ptr %29, i64 40
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %169) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %29) #7
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %27) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #7
  br label %170

170:                                              ; preds = %166, %158
  %.pn54.pn.pn = phi { ptr, i32 } [ %.pn54.pn, %166 ], [ %.pn51.pn, %158 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %24) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #7
  br label %171

171:                                              ; preds = %170, %150
  %.pn54.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn, %170 ], [ %.pn48.pn, %150 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %21) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  br label %172

172:                                              ; preds = %171, %142
  %.pn54.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn, %171 ], [ %.pn41.pn.pn.pn.pn.pn, %142 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #7
  br label %173

173:                                              ; preds = %172, %122
  %.pn54.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn.pn, %172 ], [ %.pn.pn.pn.pn.pn.pn, %122 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  br label %174

174:                                              ; preds = %173, %101
  %.pn54.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn.pn.pn, %173 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  br label %175

175:                                              ; preds = %174, %99
  %.pn54.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn.pn.pn.pn, %174 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn54.pn.pn.pn.pn.pn.pn.pn
}

declare noundef ptr @_ZN3sim1PEv() local_unnamed_addr #4

declare noundef double @_ZN3sim5Param9wallWidthEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #4

declare void @_ZN3sim6MetersC1Ed(ptr noundef nonnull align 8 dereferenceable(16), double noundef) unnamed_addr #4

declare void @_ZNK3sim6MetersdvEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(16), double noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare noundef double @_ZN3sim5Param10wallLengthEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #4

declare void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(16), double noundef) local_unnamed_addr #4

declare void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

declare void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

declare void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

declare void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1 align 2

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

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

declare void @_ZN3sim7PolygonC1ERKSt6vectorINS_9CartesianESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN3sim7PolygonaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #6 align 2

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

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

; Function Attrs: nounwind
declare void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}


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