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

; 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::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"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" }
%"struct.std::pair.71" = type { i32, i32 }
%class.anon = type { i8 }
%class.anon.74 = type { i8 }
%class.anon.76 = type { i8 }
%class.anon.78 = type { i8 }

@__dso_handle = external hidden global i8
@_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east = external hidden global %"class.std::function", align 8
@_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east = external hidden global i64, align 8
@_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west = external hidden global %"class.std::function", align 8
@_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west = external hidden global i64, align 8
@_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north = external hidden global %"class.std::function", align 8
@_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north = external hidden global i64, align 8
@_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south = external hidden global %"class.std::function", align 8
@_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south = external hidden global i64, align 8

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

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

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) #1

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

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)) #2

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

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 #2

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

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)) #2

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

; 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 #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_(ptr dead_on_unwind noalias writable sret(%"class.sim::Cartesian") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(26) %3, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5) #5 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, 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 ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.sim::Meters", align 8
  %19 = alloca %"class.sim::Meters", align 8
  %20 = alloca %"class.sim::Meters", align 8
  %21 = alloca %"struct.std::pair.71", align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %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::Meters", align 8
  %28 = alloca %"class.sim::Meters", align 8
  %29 = alloca %"class.sim::Meters", align 8
  %30 = alloca %"class.sim::Meters", align 8
  %31 = alloca i32, align 4
  %32 = alloca %"class.sim::Meters", align 8
  %33 = alloca %"class.sim::Cartesian", align 8
  %34 = alloca i32, align 4
  %35 = alloca %"class.sim::Meters", align 8
  %36 = alloca %"class.sim::Cartesian", align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca %"class.sim::Meters", align 8
  %44 = alloca %"class.sim::Meters", align 8
  %45 = alloca %"class.sim::Meters", align 8
  %46 = alloca %"class.sim::Meters", align 8
  %47 = alloca %"class.sim::Meters", align 8
  %48 = alloca %"class.sim::Meters", align 8
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca %class.anon, align 1
  %52 = alloca %class.anon.74, align 1
  %53 = alloca %class.anon.76, align 1
  %54 = alloca %class.anon.78, align 1
  %55 = alloca ptr, align 8
  %56 = alloca ptr, align 8
  %57 = alloca %"class.sim::Meters", align 8
  %58 = alloca %"class.sim::Meters", align 8
  %59 = alloca i1, align 1
  %60 = alloca i1, align 1
  %61 = alloca %"class.sim::Meters", align 8
  %62 = alloca %"class.sim::Meters", align 8
  %63 = alloca %"class.sim::Meters", align 8
  %64 = alloca %"class.sim::Meters", align 8
  %65 = alloca %"class.sim::Meters", align 8
  %66 = alloca i32, align 4
  %67 = alloca i32, align 4
  %68 = alloca i32, align 4
  %69 = alloca %"class.sim::Meters", align 8
  %70 = alloca %"class.sim::Meters", align 8
  %71 = alloca %"class.sim::Meters", align 8
  %72 = alloca %"class.sim::Meters", align 8
  %73 = alloca %"class.sim::Meters", align 8
  %74 = alloca %"class.sim::Meters", align 8
  %75 = alloca i32, align 4
  %76 = alloca i32, align 4
  %77 = alloca %"class.sim::Meters", align 8
  %78 = alloca %"class.sim::Meters", align 8
  %79 = alloca %"class.sim::Meters", align 8
  store ptr %0, ptr %7, align 8
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #0
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %14, ptr noundef nonnull align 8 dereferenceable(40) %80)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #0
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %15, ptr noundef nonnull align 8 dereferenceable(40) %81)
          to label %82 unwind label %289

82:                                               ; preds = %6
  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 %83 unwind label %293

83:                                               ; preds = %82
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #0
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %19, ptr noundef nonnull align 8 dereferenceable(40) %84)
          to label %85 unwind label %298

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #0
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %20, ptr noundef nonnull align 8 dereferenceable(40) %86)
          to label %87 unwind label %302

87:                                               ; preds = %85
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind 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 %88 unwind label %306

88:                                               ; preds = %87
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #0
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #0
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #0
  %89 = invoke noundef double @_ZNK3sim8Distance9getMetersEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %90 unwind label %312

90:                                               ; preds = %88
  %91 = fcmp olt double 0.000000e+00, %89
  %92 = zext i1 %91 to i64
  %93 = select i1 %91, i32 1, i32 -1
  store i32 %93, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #0
  %94 = invoke noundef double @_ZNK3sim8Distance9getMetersEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %95 unwind label %316

95:                                               ; preds = %90
  %96 = fcmp olt double 0.000000e+00, %94
  %97 = zext i1 %96 to i64
  %98 = select i1 %96, i32 1, i32 -1
  store i32 %98, ptr %23, align 4, !tbaa !9
  %99 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %100 unwind label %316

100:                                              ; preds = %95
  store i64 %99, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #0
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #0
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 0
  %103 = load i32, ptr %102, align 4, !tbaa !11
  %104 = sitofp i32 %103 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %26, ptr noundef nonnull align 8 dereferenceable(16) %101, double noundef %104)
          to label %105 unwind label %321

105:                                              ; preds = %100
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %25, ptr noundef nonnull align 8 dereferenceable(16) %26, double noundef -1.000000e+00)
          to label %106 unwind label %325

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #0
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !13
  %110 = sitofp i32 %109 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %28, ptr noundef nonnull align 8 dereferenceable(16) %107, double noundef %110)
          to label %111 unwind label %329

111:                                              ; preds = %106
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %27, ptr noundef nonnull align 8 dereferenceable(16) %28, double noundef -1.000000e+00)
          to label %112 unwind label %333

112:                                              ; preds = %111
  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) %27)
          to label %113 unwind label %337

113:                                              ; preds = %112
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #0
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %29, ptr noundef nonnull align 8 dereferenceable(40) %114)
          to label %115 unwind label %345

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #0
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %30, ptr noundef nonnull align 8 dereferenceable(40) %116)
          to label %117 unwind label %349

117:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #0
  call void @llvm.lifetime.start.p0(i64 40, ptr %33) #0
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK3sim9CartesianmiERKNS_10CoordinateE(ptr dead_on_unwind writable sret(%"class.sim::Cartesian") align 8 %33, ptr noundef nonnull align 8 dereferenceable(40) %118, ptr noundef nonnull align 8 dereferenceable(40) %24)
          to label %119 unwind label %353

119:                                              ; preds = %117
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %32, ptr noundef nonnull align 8 dereferenceable(40) %33)
          to label %120 unwind label %357

120:                                              ; preds = %119
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %121)
          to label %123 unwind label %361

123:                                              ; preds = %120
  %124 = call double @llvm.floor.f64(double %122)
  %125 = fptosi double %124 to i32
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #0
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %33) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %33) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #0
  store i32 %125, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %35) #0
  call void @llvm.lifetime.start.p0(i64 40, ptr %36) #0
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK3sim9CartesianmiERKNS_10CoordinateE(ptr dead_on_unwind writable sret(%"class.sim::Cartesian") align 8 %36, ptr noundef nonnull align 8 dereferenceable(40) %126, ptr noundef nonnull align 8 dereferenceable(40) %24)
          to label %127 unwind label %367

127:                                              ; preds = %123
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %35, ptr noundef nonnull align 8 dereferenceable(40) %36)
          to label %128 unwind label %371

128:                                              ; preds = %127
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(16) %129)
          to label %131 unwind label %375

131:                                              ; preds = %128
  %132 = call double @llvm.floor.f64(double %130)
  %133 = fptosi double %132 to i32
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %35) #0
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %36) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %36) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #0
  store i32 %133, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #0
  %134 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 0
  %135 = load i32, ptr %134, align 4, !tbaa !11
  %136 = icmp eq i32 %135, 1
  %137 = zext i1 %136 to i64
  %138 = select i1 %136, i32 1, i32 0
  store i32 %138, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #0
  %139 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 1
  %140 = load i32, ptr %139, align 4, !tbaa !13
  %141 = icmp eq i32 %140, 1
  %142 = zext i1 %141 to i64
  %143 = select i1 %141, i32 1, i32 0
  store i32 %143, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #0
  %144 = load i32, ptr %37, align 4, !tbaa !9
  store i32 %144, ptr %39, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #0
  %145 = load i32, ptr %38, align 4, !tbaa !9
  store i32 %145, ptr %40, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #0
  %146 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 0
  %147 = load i32, ptr %146, align 4, !tbaa !11
  store i32 %147, ptr %41, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #0
  %148 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !13
  store i32 %149, ptr %42, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #0
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = load i32, ptr %31, align 4, !tbaa !9
  %152 = load i32, ptr %39, align 4, !tbaa !9
  %153 = add nsw i32 %151, %152
  %154 = sitofp i32 %153 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %44, ptr noundef nonnull align 8 dereferenceable(16) %150, double noundef %154)
          to label %155 unwind label %381

155:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 16, ptr %45) #0
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %45, ptr noundef nonnull align 8 dereferenceable(40) %24)
          to label %156 unwind label %385

156:                                              ; preds = %155
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %43, ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(16) %45)
          to label %157 unwind label %389

157:                                              ; preds = %156
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %45) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %44) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %47) #0
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = load i32, ptr %34, align 4, !tbaa !9
  %160 = load i32, ptr %40, align 4, !tbaa !9
  %161 = add nsw i32 %159, %160
  %162 = sitofp i32 %161 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %47, ptr noundef nonnull align 8 dereferenceable(16) %158, double noundef %162)
          to label %163 unwind label %395

163:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #0
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %48, ptr noundef nonnull align 8 dereferenceable(40) %24)
          to label %164 unwind label %399

164:                                              ; preds = %163
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %46, ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(16) %48)
          to label %165 unwind label %403

165:                                              ; preds = %164
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %48) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #0
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #0
  %166 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 0
  %167 = load i32, ptr %166, align 4, !tbaa !11
  %168 = icmp eq i32 %167, 1
  %169 = zext i1 %168 to i64
  %170 = select i1 %168, i32 1, i32 3
  store i32 %170, ptr %49, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #0
  %171 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 1
  %172 = load i32, ptr %171, align 4, !tbaa !13
  %173 = icmp eq i32 %172, 1
  %174 = zext i1 %173 to i64
  %175 = select i1 %173, i32 0, i32 2
  store i32 %175, ptr %50, align 4, !tbaa !14
  %176 = load atomic i8, ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east acquire, align 8
  %177 = icmp eq i8 %176, 0
  br i1 %177, label %178, label %183, !prof !16

178:                                              ; preds = %165
  %179 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east) #0
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %183

181:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 1, ptr %51) #0
  call void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east, ptr noundef nonnull align 1 dereferenceable(1) %51) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %51) #0
  %182 = call i32 @__cxa_atexit(ptr @_ZNSt14_Function_baseD2Ev, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east) #0
  br label %183

183:                                              ; preds = %181, %178, %165
  %184 = load atomic i8, ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west acquire, align 8
  %185 = icmp eq i8 %184, 0
  br i1 %185, label %186, label %191, !prof !16

186:                                              ; preds = %183
  %187 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west) #0
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %191

189:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 1, ptr %52) #0
  call void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west, ptr noundef nonnull align 1 dereferenceable(1) %52) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %52) #0
  %190 = call i32 @__cxa_atexit(ptr @_ZNSt14_Function_baseD2Ev, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west) #0
  br label %191

191:                                              ; preds = %189, %186, %183
  %192 = load atomic i8, ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north acquire, align 8
  %193 = icmp eq i8 %192, 0
  br i1 %193, label %194, label %199, !prof !16

194:                                              ; preds = %191
  %195 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north) #0
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %199

197:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 1, ptr %53) #0
  call void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north, ptr noundef nonnull align 1 dereferenceable(1) %53) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %53) #0
  %198 = call i32 @__cxa_atexit(ptr @_ZNSt14_Function_baseD2Ev, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north) #0
  br label %199

199:                                              ; preds = %197, %194, %191
  %200 = load atomic i8, ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south acquire, align 8
  %201 = icmp eq i8 %200, 0
  br i1 %201, label %202, label %207, !prof !16

202:                                              ; preds = %199
  %203 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south) #0
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %205, label %207

205:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 1, ptr %54) #0
  call void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south, ptr noundef nonnull align 1 dereferenceable(1) %54) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %54) #0
  %206 = call i32 @__cxa_atexit(ptr @_ZNSt14_Function_baseD2Ev, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south) #0
  br label %207

207:                                              ; preds = %205, %202, %199
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #0
  %208 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 0
  %209 = load i32, ptr %208, align 4, !tbaa !11
  %210 = icmp eq i32 %209, 1
  %211 = zext i1 %210 to i64
  %212 = select i1 %210, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west
  store ptr %212, ptr %55, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #0
  %213 = getelementptr inbounds %"struct.std::pair.71", ptr %21, i32 0, i32 1
  %214 = load i32, ptr %213, align 4, !tbaa !13
  %215 = icmp eq i32 %214, 1
  %216 = zext i1 %215 to i64
  %217 = select i1 %215, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south
  store ptr %217, ptr %56, align 8, !tbaa !5
  br label %218

218:                                              ; preds = %590, %207
  %219 = load ptr, ptr %55, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #0
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  store i1 false, ptr %59, align 1
  store i1 false, ptr %60, align 1
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %57, ptr noundef nonnull align 8 dereferenceable(40) %220)
          to label %221 unwind label %409

221:                                              ; preds = %218
  %222 = invoke noundef zeroext i1 @_ZNKSt8functionIFbRKN3sim6MetersES3_EEclES3_S3_(ptr noundef nonnull align 8 dereferenceable(32) %219, ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %57)
          to label %223 unwind label %413

223:                                              ; preds = %221
  br i1 %222, label %230, label %224

224:                                              ; preds = %223
  %225 = load ptr, ptr %56, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %58) #0
  store i1 true, ptr %59, align 1
  %226 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %58, ptr noundef nonnull align 8 dereferenceable(40) %226)
          to label %227 unwind label %417

227:                                              ; preds = %224
  store i1 true, ptr %60, align 1
  %228 = invoke noundef zeroext i1 @_ZNKSt8functionIFbRKN3sim6MetersES3_EEclES3_S3_(ptr noundef nonnull align 8 dereferenceable(32) %225, ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %58)
          to label %229 unwind label %421

229:                                              ; preds = %227
  br label %230

230:                                              ; preds = %229, %223
  %231 = phi i1 [ true, %223 ], [ %228, %229 ]
  %232 = load i1, ptr %60, align 1
  br i1 %232, label %233, label %234

233:                                              ; preds = %230
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %58) #0
  br label %234

234:                                              ; preds = %233, %230
  %235 = load i1, ptr %59, align 1
  br i1 %235, label %236, label %237

236:                                              ; preds = %234
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #0
  br label %237

237:                                              ; preds = %236, %234
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %57) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #0
  br i1 %231, label %238, label %591

238:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 16, ptr %61) #0
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %61, ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %239 unwind label %434

239:                                              ; preds = %238
  %240 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %241 unwind label %438

241:                                              ; preds = %239
  %242 = invoke noundef double @_ZSt3absd(double noundef %240)
          to label %243 unwind label %438

243:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 16, ptr %62) #0
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %62, ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %244 unwind label %442

244:                                              ; preds = %243
  %245 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %246 unwind label %446

246:                                              ; preds = %244
  %247 = invoke noundef double @_ZSt3absd(double noundef %245)
          to label %248 unwind label %446

248:                                              ; preds = %246
  %249 = fcmp olt double %242, %247
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %62) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %62) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %61) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %61) #0
  br i1 %249, label %250, label %502

250:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 16, ptr %63) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %64) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %65) #0
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %65, ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %251 unwind label %453

251:                                              ; preds = %250
  %252 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %253 unwind label %457

253:                                              ; preds = %251
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %64, ptr noundef nonnull align 8 dereferenceable(16) %65, double noundef %252)
          to label %254 unwind label %457

254:                                              ; preds = %253
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %63, ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %64)
          to label %255 unwind label %461

255:                                              ; preds = %254
  %256 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %63) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %63) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %64) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %65) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %63) #0
  %257 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %43) #0
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #0
  %258 = load i32, ptr %31, align 4, !tbaa !9
  %259 = load i32, ptr %39, align 4, !tbaa !9
  %260 = add nsw i32 %258, %259
  %261 = load i32, ptr %37, align 4, !tbaa !9
  %262 = sub nsw i32 %260, %261
  store i32 %262, ptr %66, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #0
  %263 = load i32, ptr %34, align 4, !tbaa !9
  %264 = load i32, ptr %40, align 4, !tbaa !9
  %265 = add nsw i32 %263, %264
  %266 = load i32, ptr %38, align 4, !tbaa !9
  %267 = sub nsw i32 %265, %266
  store i32 %267, ptr %67, align 4, !tbaa !9
  %268 = load ptr, ptr %11, align 8, !tbaa !5
  %269 = load ptr, ptr %12, align 8, !tbaa !5
  %270 = invoke noundef zeroext i1 @_ZN3sim17GeometryUtilities12isOnTileEdgeERKNS_6MetersES3_S3_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %268, ptr noundef nonnull align 8 dereferenceable(16) %269)
          to label %271 unwind label %467

271:                                              ; preds = %255
  br i1 %270, label %287, label %272

272:                                              ; preds = %271
  %273 = load ptr, ptr %10, align 8, !tbaa !5
  %274 = load i32, ptr %66, align 4, !tbaa !9
  %275 = load i32, ptr %67, align 4, !tbaa !9
  %276 = invoke noundef zeroext i1 @_ZNK3sim4Maze10withinMazeEii(ptr noundef nonnull align 8 dereferenceable(26) %273, i32 noundef %274, i32 noundef %275)
          to label %277 unwind label %467

277:                                              ; preds = %272
  br i1 %276, label %278, label %471

278:                                              ; preds = %277
  %279 = load ptr, ptr %10, align 8, !tbaa !5
  %280 = load i32, ptr %66, align 4, !tbaa !9
  %281 = load i32, ptr %67, align 4, !tbaa !9
  %282 = invoke noundef ptr @_ZNK3sim4Maze7getTileEii(ptr noundef nonnull align 8 dereferenceable(26) %279, i32 noundef %280, i32 noundef %281)
          to label %283 unwind label %467

283:                                              ; preds = %278
  %284 = load i32, ptr %49, align 4, !tbaa !14
  %285 = invoke noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %282, i32 noundef %284)
          to label %286 unwind label %467

286:                                              ; preds = %283
  br i1 %285, label %287, label %471

287:                                              ; preds = %286, %271
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %288 unwind label %467

288:                                              ; preds = %287
  store i32 1, ptr %68, align 4
  br label %484

289:                                              ; preds = %6
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %16, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %17, align 4
  br label %297

293:                                              ; preds = %82
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %16, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #0
  br label %297

297:                                              ; preds = %293, %289
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #0
  br label %604

298:                                              ; preds = %83
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %16, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %17, align 4
  br label %311

302:                                              ; preds = %85
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %16, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %17, align 4
  br label %310

306:                                              ; preds = %87
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %16, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #0
  br label %310

310:                                              ; preds = %306, %302
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #0
  br label %311

311:                                              ; preds = %310, %298
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #0
  br label %603

312:                                              ; preds = %88
  %313 = landingpad { ptr, i32 }
          cleanup
  %314 = extractvalue { ptr, i32 } %313, 0
  store ptr %314, ptr %16, align 8
  %315 = extractvalue { ptr, i32 } %313, 1
  store i32 %315, ptr %17, align 4
  br label %320

316:                                              ; preds = %95, %90
  %317 = landingpad { ptr, i32 }
          cleanup
  %318 = extractvalue { ptr, i32 } %317, 0
  store ptr %318, ptr %16, align 8
  %319 = extractvalue { ptr, i32 } %317, 1
  store i32 %319, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #0
  br label %320

320:                                              ; preds = %316, %312
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #0
  br label %602

321:                                              ; preds = %100
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %16, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %17, align 4
  br label %344

325:                                              ; preds = %105
  %326 = landingpad { ptr, i32 }
          cleanup
  %327 = extractvalue { ptr, i32 } %326, 0
  store ptr %327, ptr %16, align 8
  %328 = extractvalue { ptr, i32 } %326, 1
  store i32 %328, ptr %17, align 4
  br label %343

329:                                              ; preds = %106
  %330 = landingpad { ptr, i32 }
          cleanup
  %331 = extractvalue { ptr, i32 } %330, 0
  store ptr %331, ptr %16, align 8
  %332 = extractvalue { ptr, i32 } %330, 1
  store i32 %332, ptr %17, align 4
  br label %342

333:                                              ; preds = %111
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %16, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %17, align 4
  br label %341

337:                                              ; preds = %112
  %338 = landingpad { ptr, i32 }
          cleanup
  %339 = extractvalue { ptr, i32 } %338, 0
  store ptr %339, ptr %16, align 8
  %340 = extractvalue { ptr, i32 } %338, 1
  store i32 %340, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #0
  br label %341

341:                                              ; preds = %337, %333
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #0
  br label %342

342:                                              ; preds = %341, %329
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #0
  br label %343

343:                                              ; preds = %342, %325
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #0
  br label %344

344:                                              ; preds = %343, %321
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #0
  br label %601

345:                                              ; preds = %113
  %346 = landingpad { ptr, i32 }
          cleanup
  %347 = extractvalue { ptr, i32 } %346, 0
  store ptr %347, ptr %16, align 8
  %348 = extractvalue { ptr, i32 } %346, 1
  store i32 %348, ptr %17, align 4
  br label %600

349:                                              ; preds = %115
  %350 = landingpad { ptr, i32 }
          cleanup
  %351 = extractvalue { ptr, i32 } %350, 0
  store ptr %351, ptr %16, align 8
  %352 = extractvalue { ptr, i32 } %350, 1
  store i32 %352, ptr %17, align 4
  br label %599

353:                                              ; preds = %117
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %16, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %17, align 4
  br label %366

357:                                              ; preds = %119
  %358 = landingpad { ptr, i32 }
          cleanup
  %359 = extractvalue { ptr, i32 } %358, 0
  store ptr %359, ptr %16, align 8
  %360 = extractvalue { ptr, i32 } %358, 1
  store i32 %360, ptr %17, align 4
  br label %365

361:                                              ; preds = %120
  %362 = landingpad { ptr, i32 }
          cleanup
  %363 = extractvalue { ptr, i32 } %362, 0
  store ptr %363, ptr %16, align 8
  %364 = extractvalue { ptr, i32 } %362, 1
  store i32 %364, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #0
  br label %365

365:                                              ; preds = %361, %357
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %33) #0
  br label %366

366:                                              ; preds = %365, %353
  call void @llvm.lifetime.end.p0(i64 40, ptr %33) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #0
  br label %598

367:                                              ; preds = %123
  %368 = landingpad { ptr, i32 }
          cleanup
  %369 = extractvalue { ptr, i32 } %368, 0
  store ptr %369, ptr %16, align 8
  %370 = extractvalue { ptr, i32 } %368, 1
  store i32 %370, ptr %17, align 4
  br label %380

371:                                              ; preds = %127
  %372 = landingpad { ptr, i32 }
          cleanup
  %373 = extractvalue { ptr, i32 } %372, 0
  store ptr %373, ptr %16, align 8
  %374 = extractvalue { ptr, i32 } %372, 1
  store i32 %374, ptr %17, align 4
  br label %379

375:                                              ; preds = %128
  %376 = landingpad { ptr, i32 }
          cleanup
  %377 = extractvalue { ptr, i32 } %376, 0
  store ptr %377, ptr %16, align 8
  %378 = extractvalue { ptr, i32 } %376, 1
  store i32 %378, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %35) #0
  br label %379

379:                                              ; preds = %375, %371
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %36) #0
  br label %380

380:                                              ; preds = %379, %367
  call void @llvm.lifetime.end.p0(i64 40, ptr %36) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %35) #0
  br label %597

381:                                              ; preds = %131
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %16, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %17, align 4
  br label %394

385:                                              ; preds = %155
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %16, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %17, align 4
  br label %393

389:                                              ; preds = %156
  %390 = landingpad { ptr, i32 }
          cleanup
  %391 = extractvalue { ptr, i32 } %390, 0
  store ptr %391, ptr %16, align 8
  %392 = extractvalue { ptr, i32 } %390, 1
  store i32 %392, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %45) #0
  br label %393

393:                                              ; preds = %389, %385
  call void @llvm.lifetime.end.p0(i64 16, ptr %45) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %44) #0
  br label %394

394:                                              ; preds = %393, %381
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #0
  br label %596

395:                                              ; preds = %157
  %396 = landingpad { ptr, i32 }
          cleanup
  %397 = extractvalue { ptr, i32 } %396, 0
  store ptr %397, ptr %16, align 8
  %398 = extractvalue { ptr, i32 } %396, 1
  store i32 %398, ptr %17, align 4
  br label %408

399:                                              ; preds = %163
  %400 = landingpad { ptr, i32 }
          cleanup
  %401 = extractvalue { ptr, i32 } %400, 0
  store ptr %401, ptr %16, align 8
  %402 = extractvalue { ptr, i32 } %400, 1
  store i32 %402, ptr %17, align 4
  br label %407

403:                                              ; preds = %164
  %404 = landingpad { ptr, i32 }
          cleanup
  %405 = extractvalue { ptr, i32 } %404, 0
  store ptr %405, ptr %16, align 8
  %406 = extractvalue { ptr, i32 } %404, 1
  store i32 %406, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %48) #0
  br label %407

407:                                              ; preds = %403, %399
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #0
  br label %408

408:                                              ; preds = %407, %395
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #0
  br label %595

409:                                              ; preds = %218
  %410 = landingpad { ptr, i32 }
          cleanup
  %411 = extractvalue { ptr, i32 } %410, 0
  store ptr %411, ptr %16, align 8
  %412 = extractvalue { ptr, i32 } %410, 1
  store i32 %412, ptr %17, align 4
  br label %433

413:                                              ; preds = %221
  %414 = landingpad { ptr, i32 }
          cleanup
  %415 = extractvalue { ptr, i32 } %414, 0
  store ptr %415, ptr %16, align 8
  %416 = extractvalue { ptr, i32 } %414, 1
  store i32 %416, ptr %17, align 4
  br label %432

417:                                              ; preds = %224
  %418 = landingpad { ptr, i32 }
          cleanup
  %419 = extractvalue { ptr, i32 } %418, 0
  store ptr %419, ptr %16, align 8
  %420 = extractvalue { ptr, i32 } %418, 1
  store i32 %420, ptr %17, align 4
  br label %428

421:                                              ; preds = %227
  %422 = landingpad { ptr, i32 }
          cleanup
  %423 = extractvalue { ptr, i32 } %422, 0
  store ptr %423, ptr %16, align 8
  %424 = extractvalue { ptr, i32 } %422, 1
  store i32 %424, ptr %17, align 4
  %425 = load i1, ptr %60, align 1
  br i1 %425, label %426, label %427

426:                                              ; preds = %421
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %58) #0
  br label %427

427:                                              ; preds = %426, %421
  br label %428

428:                                              ; preds = %427, %417
  %429 = load i1, ptr %59, align 1
  br i1 %429, label %430, label %431

430:                                              ; preds = %428
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #0
  br label %431

431:                                              ; preds = %430, %428
  br label %432

432:                                              ; preds = %431, %413
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %57) #0
  br label %433

433:                                              ; preds = %432, %409
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #0
  br label %594

434:                                              ; preds = %238
  %435 = landingpad { ptr, i32 }
          cleanup
  %436 = extractvalue { ptr, i32 } %435, 0
  store ptr %436, ptr %16, align 8
  %437 = extractvalue { ptr, i32 } %435, 1
  store i32 %437, ptr %17, align 4
  br label %452

438:                                              ; preds = %241, %239
  %439 = landingpad { ptr, i32 }
          cleanup
  %440 = extractvalue { ptr, i32 } %439, 0
  store ptr %440, ptr %16, align 8
  %441 = extractvalue { ptr, i32 } %439, 1
  store i32 %441, ptr %17, align 4
  br label %451

442:                                              ; preds = %243
  %443 = landingpad { ptr, i32 }
          cleanup
  %444 = extractvalue { ptr, i32 } %443, 0
  store ptr %444, ptr %16, align 8
  %445 = extractvalue { ptr, i32 } %443, 1
  store i32 %445, ptr %17, align 4
  br label %450

446:                                              ; preds = %246, %244
  %447 = landingpad { ptr, i32 }
          cleanup
  %448 = extractvalue { ptr, i32 } %447, 0
  store ptr %448, ptr %16, align 8
  %449 = extractvalue { ptr, i32 } %447, 1
  store i32 %449, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %62) #0
  br label %450

450:                                              ; preds = %446, %442
  call void @llvm.lifetime.end.p0(i64 16, ptr %62) #0
  br label %451

451:                                              ; preds = %450, %438
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %61) #0
  br label %452

452:                                              ; preds = %451, %434
  call void @llvm.lifetime.end.p0(i64 16, ptr %61) #0
  br label %594

453:                                              ; preds = %250
  %454 = landingpad { ptr, i32 }
          cleanup
  %455 = extractvalue { ptr, i32 } %454, 0
  store ptr %455, ptr %16, align 8
  %456 = extractvalue { ptr, i32 } %454, 1
  store i32 %456, ptr %17, align 4
  br label %466

457:                                              ; preds = %253, %251
  %458 = landingpad { ptr, i32 }
          cleanup
  %459 = extractvalue { ptr, i32 } %458, 0
  store ptr %459, ptr %16, align 8
  %460 = extractvalue { ptr, i32 } %458, 1
  store i32 %460, ptr %17, align 4
  br label %465

461:                                              ; preds = %254
  %462 = landingpad { ptr, i32 }
          cleanup
  %463 = extractvalue { ptr, i32 } %462, 0
  store ptr %463, ptr %16, align 8
  %464 = extractvalue { ptr, i32 } %462, 1
  store i32 %464, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %64) #0
  br label %465

465:                                              ; preds = %461, %457
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %65) #0
  br label %466

466:                                              ; preds = %465, %453
  call void @llvm.lifetime.end.p0(i64 16, ptr %65) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %64) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %63) #0
  br label %594

467:                                              ; preds = %287, %283, %278, %272, %255
  %468 = landingpad { ptr, i32 }
          cleanup
  %469 = extractvalue { ptr, i32 } %468, 0
  store ptr %469, ptr %16, align 8
  %470 = extractvalue { ptr, i32 } %468, 1
  store i32 %470, ptr %17, align 4
  br label %501

471:                                              ; preds = %286, %277
  %472 = load i32, ptr %41, align 4, !tbaa !9
  %473 = load i32, ptr %39, align 4, !tbaa !9
  %474 = add nsw i32 %473, %472
  store i32 %474, ptr %39, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %69) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %70) #0
  %475 = load ptr, ptr %12, align 8, !tbaa !5
  %476 = load i32, ptr %31, align 4, !tbaa !9
  %477 = load i32, ptr %39, align 4, !tbaa !9
  %478 = add nsw i32 %476, %477
  %479 = sitofp i32 %478 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %70, ptr noundef nonnull align 8 dereferenceable(16) %475, double noundef %479)
          to label %480 unwind label %487

480:                                              ; preds = %471
  call void @llvm.lifetime.start.p0(i64 16, ptr %71) #0
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %71, ptr noundef nonnull align 8 dereferenceable(40) %24)
          to label %481 unwind label %491

481:                                              ; preds = %480
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %69, ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef nonnull align 8 dereferenceable(16) %71)
          to label %482 unwind label %495

482:                                              ; preds = %481
  %483 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %69) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %69) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %71) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %71) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %70) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %70) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %69) #0
  store i32 0, ptr %68, align 4
  br label %484

484:                                              ; preds = %482, %288
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #0
  %485 = load i32, ptr %68, align 4
  switch i32 %485, label %593 [
    i32 0, label %486
  ]

486:                                              ; preds = %484
  br label %590

487:                                              ; preds = %471
  %488 = landingpad { ptr, i32 }
          cleanup
  %489 = extractvalue { ptr, i32 } %488, 0
  store ptr %489, ptr %16, align 8
  %490 = extractvalue { ptr, i32 } %488, 1
  store i32 %490, ptr %17, align 4
  br label %500

491:                                              ; preds = %480
  %492 = landingpad { ptr, i32 }
          cleanup
  %493 = extractvalue { ptr, i32 } %492, 0
  store ptr %493, ptr %16, align 8
  %494 = extractvalue { ptr, i32 } %492, 1
  store i32 %494, ptr %17, align 4
  br label %499

495:                                              ; preds = %481
  %496 = landingpad { ptr, i32 }
          cleanup
  %497 = extractvalue { ptr, i32 } %496, 0
  store ptr %497, ptr %16, align 8
  %498 = extractvalue { ptr, i32 } %496, 1
  store i32 %498, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %71) #0
  br label %499

499:                                              ; preds = %495, %491
  call void @llvm.lifetime.end.p0(i64 16, ptr %71) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %70) #0
  br label %500

500:                                              ; preds = %499, %487
  call void @llvm.lifetime.end.p0(i64 16, ptr %70) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %69) #0
  br label %501

501:                                              ; preds = %500, %467
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #0
  br label %594

502:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 16, ptr %72) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %73) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %74) #0
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %74, ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %503 unwind label %541

503:                                              ; preds = %502
  %504 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %505 unwind label %545

505:                                              ; preds = %503
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %73, ptr noundef nonnull align 8 dereferenceable(16) %74, double noundef %504)
          to label %506 unwind label %545

506:                                              ; preds = %505
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %72, ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %507 unwind label %549

507:                                              ; preds = %506
  %508 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %72) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %72) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %73) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %74) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %73) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %72) #0
  %509 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %46) #0
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #0
  %510 = load i32, ptr %31, align 4, !tbaa !9
  %511 = load i32, ptr %39, align 4, !tbaa !9
  %512 = add nsw i32 %510, %511
  %513 = load i32, ptr %37, align 4, !tbaa !9
  %514 = sub nsw i32 %512, %513
  store i32 %514, ptr %75, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %76) #0
  %515 = load i32, ptr %34, align 4, !tbaa !9
  %516 = load i32, ptr %40, align 4, !tbaa !9
  %517 = add nsw i32 %515, %516
  %518 = load i32, ptr %38, align 4, !tbaa !9
  %519 = sub nsw i32 %517, %518
  store i32 %519, ptr %76, align 4, !tbaa !9
  %520 = load ptr, ptr %11, align 8, !tbaa !5
  %521 = load ptr, ptr %12, align 8, !tbaa !5
  %522 = invoke noundef zeroext i1 @_ZN3sim17GeometryUtilities12isOnTileEdgeERKNS_6MetersES3_S3_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %520, ptr noundef nonnull align 8 dereferenceable(16) %521)
          to label %523 unwind label %555

523:                                              ; preds = %507
  br i1 %522, label %539, label %524

524:                                              ; preds = %523
  %525 = load ptr, ptr %10, align 8, !tbaa !5
  %526 = load i32, ptr %75, align 4, !tbaa !9
  %527 = load i32, ptr %76, align 4, !tbaa !9
  %528 = invoke noundef zeroext i1 @_ZNK3sim4Maze10withinMazeEii(ptr noundef nonnull align 8 dereferenceable(26) %525, i32 noundef %526, i32 noundef %527)
          to label %529 unwind label %555

529:                                              ; preds = %524
  br i1 %528, label %530, label %559

530:                                              ; preds = %529
  %531 = load ptr, ptr %10, align 8, !tbaa !5
  %532 = load i32, ptr %75, align 4, !tbaa !9
  %533 = load i32, ptr %76, align 4, !tbaa !9
  %534 = invoke noundef ptr @_ZNK3sim4Maze7getTileEii(ptr noundef nonnull align 8 dereferenceable(26) %531, i32 noundef %532, i32 noundef %533)
          to label %535 unwind label %555

535:                                              ; preds = %530
  %536 = load i32, ptr %50, align 4, !tbaa !14
  %537 = invoke noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %534, i32 noundef %536)
          to label %538 unwind label %555

538:                                              ; preds = %535
  br i1 %537, label %539, label %559

539:                                              ; preds = %538, %523
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %30)
          to label %540 unwind label %555

540:                                              ; preds = %539
  store i32 1, ptr %68, align 4
  br label %572

541:                                              ; preds = %502
  %542 = landingpad { ptr, i32 }
          cleanup
  %543 = extractvalue { ptr, i32 } %542, 0
  store ptr %543, ptr %16, align 8
  %544 = extractvalue { ptr, i32 } %542, 1
  store i32 %544, ptr %17, align 4
  br label %554

545:                                              ; preds = %505, %503
  %546 = landingpad { ptr, i32 }
          cleanup
  %547 = extractvalue { ptr, i32 } %546, 0
  store ptr %547, ptr %16, align 8
  %548 = extractvalue { ptr, i32 } %546, 1
  store i32 %548, ptr %17, align 4
  br label %553

549:                                              ; preds = %506
  %550 = landingpad { ptr, i32 }
          cleanup
  %551 = extractvalue { ptr, i32 } %550, 0
  store ptr %551, ptr %16, align 8
  %552 = extractvalue { ptr, i32 } %550, 1
  store i32 %552, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %73) #0
  br label %553

553:                                              ; preds = %549, %545
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %74) #0
  br label %554

554:                                              ; preds = %553, %541
  call void @llvm.lifetime.end.p0(i64 16, ptr %74) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %73) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %72) #0
  br label %594

555:                                              ; preds = %539, %535, %530, %524, %507
  %556 = landingpad { ptr, i32 }
          cleanup
  %557 = extractvalue { ptr, i32 } %556, 0
  store ptr %557, ptr %16, align 8
  %558 = extractvalue { ptr, i32 } %556, 1
  store i32 %558, ptr %17, align 4
  br label %589

559:                                              ; preds = %538, %529
  %560 = load i32, ptr %42, align 4, !tbaa !9
  %561 = load i32, ptr %40, align 4, !tbaa !9
  %562 = add nsw i32 %561, %560
  store i32 %562, ptr %40, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %77) #0
  call void @llvm.lifetime.start.p0(i64 16, ptr %78) #0
  %563 = load ptr, ptr %12, align 8, !tbaa !5
  %564 = load i32, ptr %34, align 4, !tbaa !9
  %565 = load i32, ptr %40, align 4, !tbaa !9
  %566 = add nsw i32 %564, %565
  %567 = sitofp i32 %566 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %78, ptr noundef nonnull align 8 dereferenceable(16) %563, double noundef %567)
          to label %568 unwind label %575

568:                                              ; preds = %559
  call void @llvm.lifetime.start.p0(i64 16, ptr %79) #0
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %79, ptr noundef nonnull align 8 dereferenceable(40) %24)
          to label %569 unwind label %579

569:                                              ; preds = %568
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind writable sret(%"class.sim::Meters") align 8 %77, ptr noundef nonnull align 8 dereferenceable(16) %78, ptr noundef nonnull align 8 dereferenceable(16) %79)
          to label %570 unwind label %583

570:                                              ; preds = %569
  %571 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %77) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %77) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %79) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %79) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %78) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %78) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %77) #0
  store i32 0, ptr %68, align 4
  br label %572

572:                                              ; preds = %570, %540
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #0
  %573 = load i32, ptr %68, align 4
  switch i32 %573, label %593 [
    i32 0, label %574
  ]

574:                                              ; preds = %572
  br label %590

575:                                              ; preds = %559
  %576 = landingpad { ptr, i32 }
          cleanup
  %577 = extractvalue { ptr, i32 } %576, 0
  store ptr %577, ptr %16, align 8
  %578 = extractvalue { ptr, i32 } %576, 1
  store i32 %578, ptr %17, align 4
  br label %588

579:                                              ; preds = %568
  %580 = landingpad { ptr, i32 }
          cleanup
  %581 = extractvalue { ptr, i32 } %580, 0
  store ptr %581, ptr %16, align 8
  %582 = extractvalue { ptr, i32 } %580, 1
  store i32 %582, ptr %17, align 4
  br label %587

583:                                              ; preds = %569
  %584 = landingpad { ptr, i32 }
          cleanup
  %585 = extractvalue { ptr, i32 } %584, 0
  store ptr %585, ptr %16, align 8
  %586 = extractvalue { ptr, i32 } %584, 1
  store i32 %586, ptr %17, align 4
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %79) #0
  br label %587

587:                                              ; preds = %583, %579
  call void @llvm.lifetime.end.p0(i64 16, ptr %79) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %78) #0
  br label %588

588:                                              ; preds = %587, %575
  call void @llvm.lifetime.end.p0(i64 16, ptr %78) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %77) #0
  br label %589

589:                                              ; preds = %588, %555
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #0
  br label %594

590:                                              ; preds = %574, %486
  br label %218, !llvm.loop !17

591:                                              ; preds = %237
  %592 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) %592) #0
  store i32 1, ptr %68, align 4
  br label %593

593:                                              ; preds = %591, %572, %484
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %46) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %43) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #0
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #0
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #0
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #0
  ret void

594:                                              ; preds = %589, %554, %501, %466, %452, %433
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #0
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %46) #0
  br label %595

595:                                              ; preds = %594, %408
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %43) #0
  br label %596

596:                                              ; preds = %595, %394
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #0
  br label %597

597:                                              ; preds = %596, %380
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #0
  br label %598

598:                                              ; preds = %597, %366
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #0
  br label %599

599:                                              ; preds = %598, %349
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #0
  br label %600

600:                                              ; preds = %599, %345
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #0
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #0
  br label %601

601:                                              ; preds = %600, %344
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #0
  br label %602

602:                                              ; preds = %601, %320
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #0
  br label %603

603:                                              ; preds = %602, %311
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #0
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #0
  br label %604

604:                                              ; preds = %603, %297
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #0
  br label %605

605:                                              ; preds = %604
  %606 = load ptr, ptr %16, align 8
  %607 = load i32, ptr %17, align 4
  %608 = insertvalue { ptr, i32 } poison, ptr %606, 0
  %609 = insertvalue { ptr, i32 } %608, i32 %607, 1
  resume { ptr, i32 } %609
}

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

declare noundef double @_ZNK3sim8Distance9getMetersEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

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

declare void @_ZNK3sim9CartesianmiERKNS_10CoordinateE(ptr dead_on_unwind writable sret(%"class.sim::Cartesian") align 8, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #2

declare noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #6

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

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

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFbRKN3sim6MetersES3_EEclES3_S3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #4

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

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

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

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

declare noundef ptr @_ZNK3sim4Maze7getTileEii(ptr noundef nonnull align 8 dereferenceable(26), i32 noundef, i32 noundef) #2

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

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

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

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


; 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::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"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.anon = type { i8 }
%class.anon.74 = type { i8 }
%class.anon.76 = type { i8 }
%class.anon.78 = type { i8 }

@__dso_handle = external hidden global i8
@_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east = external hidden global %"class.std::function", align 8
@_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east = external hidden global i64, align 8
@_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west = external hidden global %"class.std::function", align 8
@_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west = external hidden global i64, align 8
@_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north = external hidden global %"class.std::function", align 8
@_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north = external hidden global i64, align 8
@_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south = external hidden global %"class.std::function", align 8
@_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south = external hidden global i64, align 8

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

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

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) #1

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

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 #2

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

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 #2

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

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 #2

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

; 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 #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_(ptr dead_on_unwind noalias writable sret(%"class.sim::Cartesian") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(26) %3, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.sim::Meters", 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 i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.sim::Cartesian", 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::Meters", align 8
  %22 = alloca %"class.sim::Meters", align 8
  %23 = alloca %"class.sim::Cartesian", align 8
  %24 = alloca %"class.sim::Meters", align 8
  %25 = alloca %"class.sim::Cartesian", align 8
  %26 = alloca %"class.sim::Meters", align 8
  %27 = alloca %"class.sim::Meters", align 8
  %28 = alloca %"class.sim::Meters", align 8
  %29 = alloca %"class.sim::Meters", align 8
  %30 = alloca %"class.sim::Meters", align 8
  %31 = alloca %"class.sim::Meters", align 8
  %32 = alloca %class.anon, align 1
  %33 = alloca %class.anon.74, align 1
  %34 = alloca %class.anon.76, align 1
  %35 = alloca %class.anon.78, align 1
  %36 = alloca %"class.sim::Meters", align 8
  %37 = alloca %"class.sim::Meters", align 8
  %38 = alloca %"class.sim::Meters", align 8
  %39 = alloca %"class.sim::Meters", align 8
  %40 = alloca %"class.sim::Meters", align 8
  %41 = alloca %"class.sim::Meters", align 8
  %42 = alloca %"class.sim::Meters", align 8
  %43 = alloca %"class.sim::Meters", align 8
  %44 = alloca %"class.sim::Meters", align 8
  %45 = alloca %"class.sim::Meters", align 8
  %46 = alloca %"class.sim::Meters", align 8
  %47 = alloca %"class.sim::Meters", align 8
  %48 = alloca %"class.sim::Meters", align 8
  %49 = alloca %"class.sim::Meters", align 8
  %50 = alloca %"class.sim::Meters", align 8
  %51 = alloca %"class.sim::Meters", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %8, ptr noundef nonnull align 8 dereferenceable(40) %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %9, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %52 unwind label %174

52:                                               ; preds = %6
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %53 unwind label %176

53:                                               ; preds = %52
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %11, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %54 unwind label %179

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %12, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %55 unwind label %181

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

56:                                               ; preds = %55
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %57 = invoke noundef double @_ZNK3sim8Distance9getMetersEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %58 unwind label %187

58:                                               ; preds = %56
  %59 = fcmp ogt double %57, 0.000000e+00
  %60 = select i1 %59, i32 1, i32 -1
  store i32 %60, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  %61 = invoke noundef double @_ZNK3sim8Distance9getMetersEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %62 unwind label %189

62:                                               ; preds = %58
  %63 = fcmp ogt double %61, 0.000000e+00
  %64 = select i1 %63, i32 1, i32 -1
  store i32 %64, ptr %14, align 4, !tbaa !5
  %65 = invoke i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %66 unwind label %189

66:                                               ; preds = %62
  %.sroa.0.0.extract.trunc = trunc i64 %65 to i32
  %.sroa.9.0.extract.shift = lshr i64 %65, 32
  %.sroa.9.0.extract.trunc = trunc nuw i64 %.sroa.9.0.extract.shift to i32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #8
  %67 = sitofp i32 %.sroa.0.0.extract.trunc 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 %67)
          to label %68 unwind label %192

68:                                               ; preds = %66
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %17, double noundef -1.000000e+00)
          to label %69 unwind label %194

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  %70 = sitofp i32 %.sroa.9.0.extract.trunc 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) %4, double noundef %70)
          to label %71 unwind label %196

71:                                               ; preds = %69
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %18, ptr noundef nonnull align 8 dereferenceable(16) %19, double noundef -1.000000e+00)
          to label %72 unwind label %198

72:                                               ; preds = %71
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %15, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %73 unwind label %200

73:                                               ; preds = %72
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #8
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %20, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %74 unwind label %206

74:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #8
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %21, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %75 unwind label %208

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %23) #8
  invoke void @_ZNK3sim9CartesianmiERKNS_10CoordinateE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Cartesian") align 8 %23, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %76 unwind label %210

76:                                               ; preds = %75
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %22, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %77 unwind label %212

77:                                               ; preds = %76
  %78 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %79 unwind label %214

79:                                               ; preds = %77
  %80 = call double @llvm.floor.f64(double %78)
  %81 = fptosi double %80 to i32
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %25) #8
  invoke void @_ZNK3sim9CartesianmiERKNS_10CoordinateE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Cartesian") align 8 %25, ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %82 unwind label %218

82:                                               ; preds = %79
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %24, ptr noundef nonnull align 8 dereferenceable(40) %25)
          to label %83 unwind label %220

83:                                               ; preds = %82
  %84 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %85 unwind label %222

85:                                               ; preds = %83
  %86 = call double @llvm.floor.f64(double %84)
  %87 = fptosi double %86 to i32
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #8
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %25) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #8
  %88 = icmp eq i32 %.sroa.0.0.extract.trunc, 1
  %.neg207 = sext i1 %88 to i32
  %89 = zext i1 %88 to i32
  %90 = icmp eq i64 %.sroa.9.0.extract.shift, 1
  %.neg = sext i1 %90 to i32
  %91 = zext i1 %90 to i32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #8
  %92 = add nsw i32 %81, %89
  %93 = sitofp i32 %92 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %27, ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %93)
          to label %94 unwind label %226

94:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #8
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %28, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %95 unwind label %228

95:                                               ; preds = %94
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %26, ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %28)
          to label %96 unwind label %230

96:                                               ; preds = %95
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %29) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %30) #8
  %97 = add nsw i32 %87, %91
  %98 = sitofp i32 %97 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %30, ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %98)
          to label %99 unwind label %234

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

100:                                              ; preds = %99
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %29, ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %31)
          to label %101 unwind label %238

101:                                              ; preds = %100
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #8
  %102 = select i1 %88, i32 1, i32 3
  %103 = select i1 %90, i32 0, i32 2
  %104 = load atomic i8, ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east acquire, align 8
  %105 = icmp eq i8 %104, 0
  br i1 %105, label %106, label %110, !prof !9

106:                                              ; preds = %101
  %107 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east) #8
  %.not = icmp eq i32 %107, 0
  br i1 %.not, label %110, label %108

108:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %32) #8
  call void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east, ptr noundef nonnull align 1 dereferenceable(1) %32) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %32) #8
  %109 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt14_Function_baseD2Ev, ptr nonnull @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east, ptr nonnull @__dso_handle) #8
  call void @__cxa_guard_release(ptr nonnull @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east) #8
  br label %110

110:                                              ; preds = %108, %106, %101
  %111 = load atomic i8, ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west acquire, align 8
  %112 = icmp eq i8 %111, 0
  br i1 %112, label %113, label %117, !prof !9

113:                                              ; preds = %110
  %114 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west) #8
  %.not157 = icmp eq i32 %114, 0
  br i1 %.not157, label %117, label %115

115:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %33) #8
  call void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west, ptr noundef nonnull align 1 dereferenceable(1) %33) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #8
  %116 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt14_Function_baseD2Ev, ptr nonnull @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west, ptr nonnull @__dso_handle) #8
  call void @__cxa_guard_release(ptr nonnull @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west) #8
  br label %117

117:                                              ; preds = %115, %113, %110
  %118 = load atomic i8, ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north acquire, align 8
  %119 = icmp eq i8 %118, 0
  br i1 %119, label %120, label %124, !prof !9

120:                                              ; preds = %117
  %121 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north) #8
  %.not158 = icmp eq i32 %121, 0
  br i1 %.not158, label %124, label %122

122:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %34) #8
  call void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north, ptr noundef nonnull align 1 dereferenceable(1) %34) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %34) #8
  %123 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt14_Function_baseD2Ev, ptr nonnull @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north, ptr nonnull @__dso_handle) #8
  call void @__cxa_guard_release(ptr nonnull @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north) #8
  br label %124

124:                                              ; preds = %122, %120, %117
  %125 = load atomic i8, ptr @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south acquire, align 8
  %126 = icmp eq i8 %125, 0
  br i1 %126, label %127, label %131, !prof !9

127:                                              ; preds = %124
  %128 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south) #8
  %.not159 = icmp eq i32 %128, 0
  br i1 %.not159, label %131, label %129

129:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %35) #8
  call void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south, ptr noundef nonnull align 1 dereferenceable(1) %35) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %35) #8
  %130 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt14_Function_baseD2Ev, ptr nonnull @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south, ptr nonnull @__dso_handle) #8
  call void @__cxa_guard_release(ptr nonnull @_ZGVZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south) #8
  br label %131

131:                                              ; preds = %129, %127, %124
  %132 = select i1 %88, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4east, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E4west
  %133 = select i1 %90, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5north, ptr @_ZZN3sim17GeometryUtilities7castRayERKNS_9CartesianES3_RKNS_4MazeERKNS_6MetersES9_E5south
  %134 = add i32 %81, %.neg207
  %135 = add i32 %87, %.neg
  br label %.outer

.outer:                                           ; preds = %.thread198, %131
  %.0129.ph = phi i32 [ %317, %.thread198 ], [ %91, %131 ]
  %.0126.ph = phi i32 [ %.0126, %.thread198 ], [ %89, %131 ]
  %136 = add i32 %135, %.0129.ph
  br label %137

137:                                              ; preds = %.outer, %.thread195
  %.0126 = phi i32 [ %273, %.thread195 ], [ %.0126.ph, %.outer ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %36) #8
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %36, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %138 unwind label %242

138:                                              ; preds = %137
  %139 = invoke noundef zeroext i1 @_ZNKSt8functionIFbRKN3sim6MetersES3_EEclES3_S3_(ptr noundef nonnull align 8 dereferenceable(32) %132, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %140 unwind label %244

140:                                              ; preds = %138
  br i1 %139, label %.critedge.thread, label %141

.critedge.thread:                                 ; preds = %140
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %36) #8
  br label %144

141:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %37) #8
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %37, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %142 unwind label %246

142:                                              ; preds = %141
  %143 = invoke noundef zeroext i1 @_ZNKSt8functionIFbRKN3sim6MetersES3_EEclES3_S3_(ptr noundef nonnull align 8 dereferenceable(32) %133, ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %37)
          to label %.critedge unwind label %248

.critedge:                                        ; preds = %142
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %37) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %36) #8
  br i1 %143, label %144, label %331

144:                                              ; preds = %.critedge.thread, %.critedge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %38) #8
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %38, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %145 unwind label %253

145:                                              ; preds = %144
  %146 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %147 unwind label %255

147:                                              ; preds = %145
  %148 = call noundef double @_ZSt3absd(double noundef %146)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %39) #8
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %39, ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %149 unwind label %257

149:                                              ; preds = %147
  %150 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %151 unwind label %259

151:                                              ; preds = %149
  %152 = call noundef double @_ZSt3absd(double noundef %150)
  %153 = fcmp olt double %148, %152
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %39) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %39) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %38) #8
  br i1 %153, label %154, label %287

154:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %40) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %41) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %42) #8
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %42, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %155 unwind label %264

155:                                              ; preds = %154
  %156 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %157 unwind label %266

157:                                              ; preds = %155
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %41, ptr noundef nonnull align 8 dereferenceable(16) %42, double noundef %156)
          to label %158 unwind label %266

158:                                              ; preds = %157
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %40, ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %159 unwind label %268

159:                                              ; preds = %158
  %160 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %40) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %40) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %40) #8
  %161 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %26) #8
  %162 = add i32 %134, %.0126
  %163 = invoke noundef zeroext i1 @_ZN3sim17GeometryUtilities12isOnTileEdgeERKNS_6MetersES3_S3_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %164 unwind label %.loopexit202

164:                                              ; preds = %159
  br i1 %163, label %173, label %165

165:                                              ; preds = %164
  %166 = invoke noundef zeroext i1 @_ZNK3sim4Maze10withinMazeEii(ptr noundef nonnull align 8 dereferenceable(26) %3, i32 noundef %162, i32 noundef %136)
          to label %167 unwind label %.loopexit202

167:                                              ; preds = %165
  br i1 %166, label %168, label %272

168:                                              ; preds = %167
  %169 = invoke noundef ptr @_ZNK3sim4Maze7getTileEii(ptr noundef nonnull align 8 dereferenceable(26) %3, i32 noundef %162, i32 noundef %136)
          to label %170 unwind label %.loopexit202

170:                                              ; preds = %168
  %171 = invoke noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %169, i32 noundef %102)
          to label %172 unwind label %.loopexit202

172:                                              ; preds = %170
  br i1 %171, label %173, label %272

173:                                              ; preds = %172, %164
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %332 unwind label %.loopexit.split-lp203

174:                                              ; preds = %6
  %175 = landingpad { ptr, i32 }
          cleanup
  br label %178

176:                                              ; preds = %52
  %177 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #8
  br label %178

178:                                              ; preds = %176, %174
  %.pn = phi { ptr, i32 } [ %177, %176 ], [ %175, %174 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  br label %342

179:                                              ; preds = %53
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %186

181:                                              ; preds = %54
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %185

183:                                              ; preds = %55
  %184 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  br label %185

185:                                              ; preds = %183, %181
  %.pn135 = phi { ptr, i32 } [ %184, %183 ], [ %182, %181 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  br label %186

186:                                              ; preds = %185, %179
  %.pn135.pn = phi { ptr, i32 } [ %.pn135, %185 ], [ %180, %179 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  br label %341

187:                                              ; preds = %56
  %188 = landingpad { ptr, i32 }
          cleanup
  br label %191

189:                                              ; preds = %62, %58
  %190 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  br label %191

191:                                              ; preds = %189, %187
  %.pn138 = phi { ptr, i32 } [ %190, %189 ], [ %188, %187 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  br label %340

192:                                              ; preds = %66
  %193 = landingpad { ptr, i32 }
          cleanup
  br label %205

194:                                              ; preds = %68
  %195 = landingpad { ptr, i32 }
          cleanup
  br label %204

196:                                              ; preds = %69
  %197 = landingpad { ptr, i32 }
          cleanup
  br label %203

198:                                              ; preds = %71
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %202

200:                                              ; preds = %72
  %201 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #8
  br label %202

202:                                              ; preds = %200, %198
  %.pn140 = phi { ptr, i32 } [ %201, %200 ], [ %199, %198 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  br label %203

203:                                              ; preds = %202, %196
  %.pn140.pn = phi { ptr, i32 } [ %.pn140, %202 ], [ %197, %196 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #8
  br label %204

204:                                              ; preds = %203, %194
  %.pn140.pn.pn = phi { ptr, i32 } [ %.pn140.pn, %203 ], [ %195, %194 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  br label %205

205:                                              ; preds = %204, %192
  %.pn140.pn.pn.pn = phi { ptr, i32 } [ %.pn140.pn.pn, %204 ], [ %193, %192 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  br label %339

206:                                              ; preds = %73
  %207 = landingpad { ptr, i32 }
          cleanup
  br label %338

208:                                              ; preds = %74
  %209 = landingpad { ptr, i32 }
          cleanup
  br label %337

210:                                              ; preds = %75
  %211 = landingpad { ptr, i32 }
          cleanup
  br label %217

212:                                              ; preds = %76
  %213 = landingpad { ptr, i32 }
          cleanup
  br label %216

214:                                              ; preds = %77
  %215 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #8
  br label %216

216:                                              ; preds = %214, %212
  %.pn145 = phi { ptr, i32 } [ %215, %214 ], [ %213, %212 ]
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #8
  br label %217

217:                                              ; preds = %216, %210
  %.pn145.pn = phi { ptr, i32 } [ %.pn145, %216 ], [ %211, %210 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #8
  br label %336

218:                                              ; preds = %79
  %219 = landingpad { ptr, i32 }
          cleanup
  br label %225

220:                                              ; preds = %82
  %221 = landingpad { ptr, i32 }
          cleanup
  br label %224

222:                                              ; preds = %83
  %223 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #8
  br label %224

224:                                              ; preds = %222, %220
  %.pn148 = phi { ptr, i32 } [ %223, %222 ], [ %221, %220 ]
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %25) #8
  br label %225

225:                                              ; preds = %224, %218
  %.pn148.pn = phi { ptr, i32 } [ %.pn148, %224 ], [ %219, %218 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #8
  br label %336

226:                                              ; preds = %85
  %227 = landingpad { ptr, i32 }
          cleanup
  br label %233

228:                                              ; preds = %94
  %229 = landingpad { ptr, i32 }
          cleanup
  br label %232

230:                                              ; preds = %95
  %231 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #8
  br label %232

232:                                              ; preds = %230, %228
  %.pn151 = phi { ptr, i32 } [ %231, %230 ], [ %229, %228 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  br label %233

233:                                              ; preds = %232, %226
  %.pn151.pn = phi { ptr, i32 } [ %.pn151, %232 ], [ %227, %226 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #8
  br label %335

234:                                              ; preds = %96
  %235 = landingpad { ptr, i32 }
          cleanup
  br label %241

236:                                              ; preds = %99
  %237 = landingpad { ptr, i32 }
          cleanup
  br label %240

238:                                              ; preds = %100
  %239 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #8
  br label %240

240:                                              ; preds = %238, %236
  %.pn154 = phi { ptr, i32 } [ %239, %238 ], [ %237, %236 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %31) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #8
  br label %241

241:                                              ; preds = %240, %234
  %.pn154.pn = phi { ptr, i32 } [ %.pn154, %240 ], [ %235, %234 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %30) #8
  br label %334

242:                                              ; preds = %137
  %243 = landingpad { ptr, i32 }
          cleanup
  br label %252

244:                                              ; preds = %138
  %245 = landingpad { ptr, i32 }
          cleanup
  br label %251

246:                                              ; preds = %141
  %247 = landingpad { ptr, i32 }
          cleanup
  br label %250

248:                                              ; preds = %142
  %249 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #8
  br label %250

250:                                              ; preds = %246, %248
  %.pn160 = phi { ptr, i32 } [ %249, %248 ], [ %247, %246 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %37) #8
  br label %251

251:                                              ; preds = %250, %244
  %.pn160.pn = phi { ptr, i32 } [ %.pn160, %250 ], [ %245, %244 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #8
  br label %252

252:                                              ; preds = %251, %242
  %.pn160.pn.pn = phi { ptr, i32 } [ %.pn160.pn, %251 ], [ %243, %242 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %36) #8
  br label %333

253:                                              ; preds = %144
  %254 = landingpad { ptr, i32 }
          cleanup
  br label %263

255:                                              ; preds = %145
  %256 = landingpad { ptr, i32 }
          cleanup
  br label %262

257:                                              ; preds = %147
  %258 = landingpad { ptr, i32 }
          cleanup
  br label %261

259:                                              ; preds = %149
  %260 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %39) #8
  br label %261

261:                                              ; preds = %259, %257
  %.pn164 = phi { ptr, i32 } [ %260, %259 ], [ %258, %257 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %39) #8
  br label %262

262:                                              ; preds = %261, %255
  %.pn164.pn = phi { ptr, i32 } [ %.pn164, %261 ], [ %256, %255 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  br label %263

263:                                              ; preds = %262, %253
  %.pn164.pn.pn = phi { ptr, i32 } [ %.pn164.pn, %262 ], [ %254, %253 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %38) #8
  br label %333

264:                                              ; preds = %154
  %265 = landingpad { ptr, i32 }
          cleanup
  br label %271

266:                                              ; preds = %157, %155
  %267 = landingpad { ptr, i32 }
          cleanup
  br label %270

268:                                              ; preds = %158
  %269 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #8
  br label %270

270:                                              ; preds = %268, %266
  %.pn176 = phi { ptr, i32 } [ %269, %268 ], [ %267, %266 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #8
  br label %271

271:                                              ; preds = %270, %264
  %.pn176.pn = phi { ptr, i32 } [ %.pn176, %270 ], [ %265, %264 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %40) #8
  br label %333

.loopexit202:                                     ; preds = %159, %165, %168, %170
  %lpad.loopexit204 = landingpad { ptr, i32 }
          cleanup
  br label %333

.loopexit.split-lp203:                            ; preds = %173
  %lpad.loopexit.split-lp205 = landingpad { ptr, i32 }
          cleanup
  br label %333

272:                                              ; preds = %172, %167
  %273 = add nsw i32 %.0126, %.sroa.0.0.extract.trunc
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %43) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %44) #8
  %274 = add nsw i32 %273, %81
  %275 = sitofp i32 %274 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %44, ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %275)
          to label %276 unwind label %279

276:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %45) #8
  invoke void @_ZNK3sim10Coordinate4getXEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %45, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %277 unwind label %281

277:                                              ; preds = %276
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %43, ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(16) %45)
          to label %.thread195 unwind label %283

.thread195:                                       ; preds = %277
  %278 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %43) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %43) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %45) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %44) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %44) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %43) #8
  br label %137, !llvm.loop !10

279:                                              ; preds = %272
  %280 = landingpad { ptr, i32 }
          cleanup
  br label %286

281:                                              ; preds = %276
  %282 = landingpad { ptr, i32 }
          cleanup
  br label %285

283:                                              ; preds = %277
  %284 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %45) #8
  br label %285

285:                                              ; preds = %283, %281
  %.pn179 = phi { ptr, i32 } [ %284, %283 ], [ %282, %281 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %45) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %44) #8
  br label %286

286:                                              ; preds = %285, %279
  %.pn179.pn = phi { ptr, i32 } [ %.pn179, %285 ], [ %280, %279 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %44) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %43) #8
  br label %333

287:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %46) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %47) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %48) #8
  invoke void @_ZNK3sim6MetersmiERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %48, ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %288 unwind label %308

288:                                              ; preds = %287
  %289 = invoke noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %290 unwind label %310

290:                                              ; preds = %288
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %47, ptr noundef nonnull align 8 dereferenceable(16) %48, double noundef %289)
          to label %291 unwind label %310

291:                                              ; preds = %290
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %46, ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %47)
          to label %292 unwind label %312

292:                                              ; preds = %291
  %293 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %46) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %46) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %48) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %48) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %47) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %46) #8
  %294 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %29) #8
  %295 = add i32 %134, %.0126
  %296 = add i32 %135, %.0129.ph
  %297 = invoke noundef zeroext i1 @_ZN3sim17GeometryUtilities12isOnTileEdgeERKNS_6MetersES3_S3_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %298 unwind label %.loopexit

298:                                              ; preds = %292
  br i1 %297, label %307, label %299

299:                                              ; preds = %298
  %300 = invoke noundef zeroext i1 @_ZNK3sim4Maze10withinMazeEii(ptr noundef nonnull align 8 dereferenceable(26) %3, i32 noundef %295, i32 noundef %296)
          to label %301 unwind label %.loopexit

301:                                              ; preds = %299
  br i1 %300, label %302, label %316

302:                                              ; preds = %301
  %303 = invoke noundef ptr @_ZNK3sim4Maze7getTileEii(ptr noundef nonnull align 8 dereferenceable(26) %3, i32 noundef %295, i32 noundef %296)
          to label %304 unwind label %.loopexit

304:                                              ; preds = %302
  %305 = invoke noundef zeroext i1 @_ZNK3sim4Tile6isWallENS_9DirectionE(ptr noundef nonnull align 8 dereferenceable(232) %303, i32 noundef %103)
          to label %306 unwind label %.loopexit

306:                                              ; preds = %304
  br i1 %305, label %307, label %316

307:                                              ; preds = %306, %298
  invoke void @_ZN3sim9CartesianC1ERKNS_8DistanceES3_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %332 unwind label %.loopexit.split-lp

308:                                              ; preds = %287
  %309 = landingpad { ptr, i32 }
          cleanup
  br label %315

310:                                              ; preds = %290, %288
  %311 = landingpad { ptr, i32 }
          cleanup
  br label %314

312:                                              ; preds = %291
  %313 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #8
  br label %314

314:                                              ; preds = %312, %310
  %.pn168 = phi { ptr, i32 } [ %313, %312 ], [ %311, %310 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %48) #8
  br label %315

315:                                              ; preds = %314, %308
  %.pn168.pn = phi { ptr, i32 } [ %.pn168, %314 ], [ %309, %308 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %48) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %47) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %46) #8
  br label %333

.loopexit:                                        ; preds = %292, %299, %302, %304
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %333

.loopexit.split-lp:                               ; preds = %307
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %333

316:                                              ; preds = %306, %301
  %317 = add nsw i32 %.0129.ph, %.sroa.9.0.extract.trunc
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %49) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %50) #8
  %318 = add nsw i32 %317, %87
  %319 = sitofp i32 %318 to double
  invoke void @_ZNK3sim6MetersmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %50, ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %319)
          to label %320 unwind label %323

320:                                              ; preds = %316
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %51) #8
  invoke void @_ZNK3sim10Coordinate4getYEv(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %51, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %321 unwind label %325

321:                                              ; preds = %320
  invoke void @_ZNK3sim6MetersplERKNS_8DistanceE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Meters") align 8 %49, ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %51)
          to label %.thread198 unwind label %327

.thread198:                                       ; preds = %321
  %322 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3sim6MetersaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %49) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %49) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %51) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %50) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %50) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %49) #8
  br label %.outer, !llvm.loop !10

323:                                              ; preds = %316
  %324 = landingpad { ptr, i32 }
          cleanup
  br label %330

325:                                              ; preds = %320
  %326 = landingpad { ptr, i32 }
          cleanup
  br label %329

327:                                              ; preds = %321
  %328 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %51) #8
  br label %329

329:                                              ; preds = %327, %325
  %.pn171 = phi { ptr, i32 } [ %328, %327 ], [ %326, %325 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %51) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %50) #8
  br label %330

330:                                              ; preds = %329, %323
  %.pn171.pn = phi { ptr, i32 } [ %.pn171, %329 ], [ %324, %323 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %50) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %49) #8
  br label %333

331:                                              ; preds = %.critedge
  call void @_ZN3sim9CartesianC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(40) %2) #8
  br label %332

332:                                              ; preds = %307, %173, %331
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  ret void

333:                                              ; preds = %.loopexit, %.loopexit.split-lp, %.loopexit202, %.loopexit.split-lp203, %330, %286, %315, %271, %263, %252
  %.pn182.pn = phi { ptr, i32 } [ %.pn176.pn, %271 ], [ %.pn168.pn, %315 ], [ %.pn164.pn.pn, %263 ], [ %.pn160.pn.pn, %252 ], [ %.pn179.pn, %286 ], [ %.pn171.pn, %330 ], [ %lpad.loopexit204, %.loopexit202 ], [ %lpad.loopexit.split-lp205, %.loopexit.split-lp203 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %29) #8
  br label %334

334:                                              ; preds = %333, %241
  %.pn182.pn.pn = phi { ptr, i32 } [ %.pn182.pn, %333 ], [ %.pn154.pn, %241 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %29) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #8
  br label %335

335:                                              ; preds = %334, %233
  %.pn182.pn.pn.pn = phi { ptr, i32 } [ %.pn182.pn.pn, %334 ], [ %.pn151.pn, %233 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %26) #8
  br label %336

336:                                              ; preds = %225, %335, %217
  %.pn182.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn145.pn, %217 ], [ %.pn182.pn.pn.pn, %335 ], [ %.pn148.pn, %225 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #8
  br label %337

337:                                              ; preds = %336, %208
  %.pn182.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn182.pn.pn.pn.pn.pn, %336 ], [ %209, %208 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  br label %338

338:                                              ; preds = %337, %206
  %.pn182.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn182.pn.pn.pn.pn.pn.pn, %337 ], [ %207, %206 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #8
  br label %339

339:                                              ; preds = %338, %205
  %.pn182.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn182.pn.pn.pn.pn.pn.pn.pn, %338 ], [ %.pn140.pn.pn.pn, %205 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #8
  br label %340

340:                                              ; preds = %339, %191
  %.pn182.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn182.pn.pn.pn.pn.pn.pn.pn.pn, %339 ], [ %.pn138, %191 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  br label %341

341:                                              ; preds = %340, %186
  %.pn182.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn182.pn.pn.pn.pn.pn.pn.pn.pn.pn, %340 ], [ %.pn135.pn, %186 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #8
  br label %342

342:                                              ; preds = %341, %178
  %.pn182.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn182.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn, %341 ], [ %.pn, %178 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  resume { ptr, i32 } %.pn182.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn.pn
}

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

declare noundef double @_ZNK3sim8Distance9getMetersEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

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 #2

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

declare noundef double @_ZNK3sim6MetersdvERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #6

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

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

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN3sim6MetersES3_EEC2IZNS0_17GeometryUtilities7castRayERKNS0_9CartesianESA_RKNS0_4MazeES3_S3_E3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFbRKN3sim6MetersES3_EEclES3_S3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #4

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

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

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

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

declare noundef ptr @_ZNK3sim4Maze7getTileEii(ptr noundef nonnull align 8 dereferenceable(26), i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

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


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