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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.sim::Polygon" = type { %"class.std::vector.55", %"class.std::vector.60" }
%"class.std::vector.55" = type { %"struct.std::_Vector_base.56" }
%"struct.std::_Vector_base.56" = type { %"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = type { %"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sim::Cartesian" = type { %"class.sim::Coordinate" }
%"class.sim::Coordinate" = type { ptr, %"class.sim::Meters", %"class.sim::Meters" }
%"class.sim::Meters" = type { %"class.sim::Distance" }
%"class.sim::Distance" = type { ptr, double }
%"class.sim::Polar" = type { %"class.sim::Coordinate" }
%"class.sim::Radians" = type { %"class.sim::Angle" }
%"class.sim::Angle" = type { ptr, double }
%"class.sim::Sensor" = type { %"class.sim::Meters", %"class.sim::Degrees", %"class.sim::Cartesian", %"class.sim::Radians", %"class.sim::Polygon", %"class.sim::Polygon", double }
%"class.sim::Degrees" = type { %"class.sim::Angle" }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim6SensorC2ERKNS_8DistanceES3_RKNS_5AngleERKNS_10CoordinateES6_RKNS_4MazeE(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(26) %6) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %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 ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.sim::Polygon", align 8
  %18 = alloca %"class.sim::Cartesian", align 8
  %19 = alloca %"class.std::vector.55", align 8
  %20 = alloca %"class.sim::Cartesian", align 8
  %21 = alloca double, align 8
  %22 = alloca %"class.sim::Cartesian", align 8
  %23 = alloca %"class.sim::Polar", align 8
  %24 = alloca %"class.sim::Polar", align 8
  %25 = alloca %"class.sim::Radians", align 8
  %26 = alloca %"class.sim::Radians", align 8
  %27 = alloca %"class.sim::Radians", align 8
  %28 = alloca %"class.sim::Polygon", align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  %29 = load ptr, ptr %8, align 8
  %30 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN3sim6MetersC1ERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %31)
  %32 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 1
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN3sim7DegreesC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %33)
          to label %34 unwind label %63

34:                                               ; preds = %7
  %35 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 2
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40) %35, ptr noundef nonnull align 8 dereferenceable(40) %36)
          to label %37 unwind label %67

37:                                               ; preds = %34
  %38 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 3
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN3sim7RadiansC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %39)
          to label %40 unwind label %71

40:                                               ; preds = %37
  %41 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 4
  invoke void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %41)
          to label %42 unwind label %75

42:                                               ; preds = %40
  %43 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 5
  invoke void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %43)
          to label %44 unwind label %79

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 48, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #7
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull align 8 dereferenceable(40) %45)
          to label %46 unwind label %83

46:                                               ; preds = %44
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = invoke noundef ptr @_ZN3sim1PEv()
          to label %49 unwind label %87

49:                                               ; preds = %46
  %50 = invoke noundef i32 @_ZN3sim5Param33numberOfCircleApproximationPointsEv(ptr noundef nonnull align 8 dereferenceable(1056) %48)
          to label %51 unwind label %87

51:                                               ; preds = %49
  invoke void @_ZN3sim17GeometryUtilities19createCirclePolygonERKNS_9CartesianERKNS_8DistanceEi(ptr dead_on_unwind writable sret(%"class.sim::Polygon") align 8 %17, ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull align 8 dereferenceable(16) %47, i32 noundef %50)
          to label %52 unwind label %87

52:                                               ; preds = %51
  %53 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 4
  %54 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3sim7PolygonaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %53, ptr noundef nonnull align 8 dereferenceable(48) %17)
          to label %55 unwind label %91

55:                                               ; preds = %52
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #7
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #7
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef nonnull align 8 dereferenceable(40) %56)
          to label %57 unwind label %97

57:                                               ; preds = %55
  invoke void @_ZNSt6vectorIN3sim9CartesianESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(40) %20)
          to label %58 unwind label %101

58:                                               ; preds = %57
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store double -1.000000e+00, ptr %21, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %123, %58
  %60 = load double, ptr %21, align 8, !tbaa !9
  %61 = fcmp ole double %60, 1.000000e+00
  br i1 %61, label %106, label %62

62:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %168

63:                                               ; preds = %7
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %15, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %16, align 4
  br label %196

67:                                               ; preds = %34
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %15, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %16, align 4
  br label %195

71:                                               ; preds = %37
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %15, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %16, align 4
  br label %194

75:                                               ; preds = %40
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %15, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %16, align 4
  br label %193

79:                                               ; preds = %42
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %15, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %16, align 4
  br label %192

83:                                               ; preds = %44
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %15, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %16, align 4
  br label %96

87:                                               ; preds = %51, %49, %46
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %15, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %16, align 4
  br label %95

91:                                               ; preds = %52
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %15, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %16, align 4
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %17) #7
  br label %95

95:                                               ; preds = %91, %87
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #7
  br label %96

96:                                               ; preds = %95, %83
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #7
  br label %191

97:                                               ; preds = %55
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %15, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %16, align 4
  br label %105

101:                                              ; preds = %57
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %15, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %16, align 4
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #7
  br label %105

105:                                              ; preds = %101, %97
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #7
  br label %190

106:                                              ; preds = %59
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #7
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN3sim7RadiansC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %108)
          to label %109 unwind label %129

109:                                              ; preds = %106
  %110 = load double, ptr %21, align 8, !tbaa !9
  invoke void @_ZNK3sim7RadiansmlEd(ptr dead_on_unwind writable sret(%"class.sim::Radians") align 8 %26, ptr noundef nonnull align 8 dereferenceable(16) %27, double noundef %110)
          to label %111 unwind label %133

111:                                              ; preds = %109
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZNK3sim7RadiansplERKNS_5AngleE(ptr dead_on_unwind writable sret(%"class.sim::Radians") align 8 %25, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %112)
          to label %113 unwind label %137

113:                                              ; preds = %111
  invoke void @_ZN3sim5PolarC1ERKNS_8DistanceERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef nonnull align 8 dereferenceable(16) %107, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %114 unwind label %141

114:                                              ; preds = %113
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZNK3sim5PolarplERKNS_10CoordinateE(ptr dead_on_unwind writable sret(%"class.sim::Polar") align 8 %23, ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef nonnull align 8 dereferenceable(40) %115)
          to label %116 unwind label %145

116:                                              ; preds = %114
  invoke void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40) %22, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %117 unwind label %149

117:                                              ; preds = %116
  invoke void @_ZNSt6vectorIN3sim9CartesianESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(40) %22)
          to label %118 unwind label %153

118:                                              ; preds = %117
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #7
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #7
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #7
  br label %119

119:                                              ; preds = %118
  %120 = invoke noundef ptr @_ZN3sim1PEv()
          to label %121 unwind label %163

121:                                              ; preds = %119
  %122 = invoke noundef i32 @_ZN3sim5Param24numberOfSensorEdgePointsEv(ptr noundef nonnull align 8 dereferenceable(1056) %120)
          to label %123 unwind label %163

123:                                              ; preds = %121
  %124 = sub nsw i32 %122, 1
  %125 = sitofp i32 %124 to double
  %126 = fdiv double 2.000000e+00, %125
  %127 = load double, ptr %21, align 8, !tbaa !9
  %128 = fadd double %127, %126
  store double %128, ptr %21, align 8, !tbaa !9
  br label %59, !llvm.loop !11

129:                                              ; preds = %106
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %15, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %16, align 4
  br label %162

133:                                              ; preds = %109
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %15, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %16, align 4
  br label %161

137:                                              ; preds = %111
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %15, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %16, align 4
  br label %160

141:                                              ; preds = %113
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %15, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %16, align 4
  br label %159

145:                                              ; preds = %114
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %15, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %16, align 4
  br label %158

149:                                              ; preds = %116
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %15, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %16, align 4
  br label %157

153:                                              ; preds = %117
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %15, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %16, align 4
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #7
  br label %157

157:                                              ; preds = %153, %149
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %23) #7
  br label %158

158:                                              ; preds = %157, %145
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %24) #7
  br label %159

159:                                              ; preds = %158, %141
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  br label %160

160:                                              ; preds = %159, %137
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #7
  br label %161

161:                                              ; preds = %160, %133
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #7
  br label %162

162:                                              ; preds = %161, %129
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #7
  br label %167

163:                                              ; preds = %121, %119
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %15, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %16, align 4
  br label %167

167:                                              ; preds = %163, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %190

168:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 48, ptr %28) #7
  invoke void @_ZN3sim7PolygonC1ERKSt6vectorINS_9CartesianESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %169 unwind label %177

169:                                              ; preds = %168
  %170 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 5
  %171 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3sim7PolygonaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %170, ptr noundef nonnull align 8 dereferenceable(48) %28)
          to label %172 unwind label %181

172:                                              ; preds = %169
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %28) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %28) #7
  %173 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 2
  %174 = getelementptr inbounds %"class.sim::Sensor", ptr %29, i32 0, i32 3
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN3sim6Sensor13updateReadingERKNS_9CartesianERKNS_7RadiansERKNS_4MazeE(ptr noundef nonnull align 8 dereferenceable(192) %29, ptr noundef nonnull align 8 dereferenceable(40) %173, ptr noundef nonnull align 8 dereferenceable(16) %174, ptr noundef nonnull align 8 dereferenceable(26) %175)
          to label %176 unwind label %186

176:                                              ; preds = %172
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  ret void

177:                                              ; preds = %168
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %15, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %16, align 4
  br label %185

181:                                              ; preds = %169
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %15, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %16, align 4
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %28) #7
  br label %185

185:                                              ; preds = %181, %177
  call void @llvm.lifetime.end.p0(i64 48, ptr %28) #7
  br label %190

186:                                              ; preds = %172
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %15, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %16, align 4
  br label %190

190:                                              ; preds = %186, %185, %167, %105
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #7
  br label %191

191:                                              ; preds = %190, %96
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %43) #7
  br label %192

192:                                              ; preds = %191, %79
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %41) #7
  br label %193

193:                                              ; preds = %192, %75
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #7
  br label %194

194:                                              ; preds = %193, %71
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %35) #7
  br label %195

195:                                              ; preds = %194, %67
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #7
  br label %196

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

197:                                              ; preds = %196
  %198 = load ptr, ptr %15, align 8
  %199 = load i32, ptr %16, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

declare void @_ZN3sim6MetersC1ERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @_ZN3sim7DegreesC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare void @_ZN3sim7RadiansC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

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

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

declare noundef ptr @_ZN3sim1PEv() #2

declare noundef i32 @_ZN3sim5Param33numberOfCircleApproximationPointsEv(ptr noundef nonnull align 8 dereferenceable(1056)) #2

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

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

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

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

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

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

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

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

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

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

declare noundef i32 @_ZN3sim5Param24numberOfSensorEdgePointsEv(ptr noundef nonnull align 8 dereferenceable(1056)) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3sim6Sensor13updateReadingERKNS_9CartesianERKNS_7RadiansERKNS_4MazeE(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(26)) #1 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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.sim::Polygon" = type { %"class.std::vector.55", %"class.std::vector.60" }
%"class.std::vector.55" = type { %"struct.std::_Vector_base.56" }
%"struct.std::_Vector_base.56" = type { %"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Cartesian, std::allocator<sim::Cartesian>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.60" = type { %"struct.std::_Vector_base.61" }
%"struct.std::_Vector_base.61" = type { %"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sim::Triangle, std::allocator<sim::Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sim::Cartesian" = type { %"class.sim::Coordinate" }
%"class.sim::Coordinate" = type { ptr, %"class.sim::Meters", %"class.sim::Meters" }
%"class.sim::Meters" = type { %"class.sim::Distance" }
%"class.sim::Distance" = type { ptr, double }
%"class.sim::Polar" = type { %"class.sim::Coordinate" }
%"class.sim::Radians" = type { %"class.sim::Angle" }
%"class.sim::Angle" = type { ptr, double }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sim6SensorC2ERKNS_8DistanceES3_RKNS_5AngleERKNS_10CoordinateES6_RKNS_4MazeE(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(26) %6) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.sim::Polygon", align 8
  %9 = alloca %"class.sim::Cartesian", align 8
  %10 = alloca %"class.std::vector.55", align 8
  %11 = alloca %"class.sim::Cartesian", align 8
  %12 = alloca %"class.sim::Cartesian", align 8
  %13 = alloca %"class.sim::Polar", align 8
  %14 = alloca %"class.sim::Polar", align 8
  %15 = alloca %"class.sim::Radians", align 8
  %16 = alloca %"class.sim::Radians", align 8
  %17 = alloca %"class.sim::Radians", align 8
  %18 = alloca %"class.sim::Polygon", align 8
  tail call void @_ZN3sim6MetersC1ERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  invoke void @_ZN3sim7DegreesC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %20 unwind label %40

20:                                               ; preds = %7
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  invoke void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40) %21, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %22 unwind label %42

22:                                               ; preds = %20
  %23 = getelementptr inbounds i8, ptr %0, i64 72
  invoke void @_ZN3sim7RadiansC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %24 unwind label %44

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %0, i64 88
  invoke void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %25)
          to label %26 unwind label %46

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %0, i64 136
  invoke void @_ZN3sim7PolygonC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %27)
          to label %28 unwind label %48

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #7
  invoke void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %29 unwind label %50

29:                                               ; preds = %28
  %30 = invoke noundef ptr @_ZN3sim1PEv()
          to label %31 unwind label %52

31:                                               ; preds = %29
  %32 = invoke noundef i32 @_ZN3sim5Param33numberOfCircleApproximationPointsEv(ptr noundef nonnull align 8 dereferenceable(1056) %30)
          to label %33 unwind label %52

33:                                               ; preds = %31
  invoke void @_ZN3sim17GeometryUtilities19createCirclePolygonERKNS_9CartesianERKNS_8DistanceEi(ptr dead_on_unwind nonnull writable sret(%"class.sim::Polygon") align 8 %8, ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(16) %1, i32 noundef %32)
          to label %34 unwind label %52

34:                                               ; preds = %33
  %35 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3sim7PolygonaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %25, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %36 unwind label %54

36:                                               ; preds = %34
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #7
  invoke void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %37 unwind label %58

37:                                               ; preds = %36
  invoke void @_ZNSt6vectorIN3sim9CartesianESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %38 unwind label %60

38:                                               ; preds = %37
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #7
  br label %63

39:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %18) #7
  invoke void @_ZN3sim7PolygonC1ERKSt6vectorINS_9CartesianESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(48) %18, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %102 unwind label %106

40:                                               ; preds = %7
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %119

42:                                               ; preds = %20
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %118

44:                                               ; preds = %22
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %117

46:                                               ; preds = %24
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %116

48:                                               ; preds = %26
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %115

50:                                               ; preds = %28
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %57

52:                                               ; preds = %33, %31, %29
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %34
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  br label %57

57:                                               ; preds = %56, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %56 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  br label %114

58:                                               ; preds = %36
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %37
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #7
  br label %62

62:                                               ; preds = %60, %58
  %.pn38 = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #7
  br label %113

63:                                               ; preds = %38, %74
  %.058 = phi double [ -1.000000e+00, %38 ], [ %78, %74 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #7
  invoke void @_ZN3sim7RadiansC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %3)
          to label %64 unwind label %80

64:                                               ; preds = %63
  invoke void @_ZNK3sim7RadiansmlEd(ptr dead_on_unwind nonnull writable sret(%"class.sim::Radians") align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %17, double noundef %.058)
          to label %65 unwind label %82

65:                                               ; preds = %64
  invoke void @_ZNK3sim7RadiansplERKNS_5AngleE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Radians") align 8 %15, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %66 unwind label %84

66:                                               ; preds = %65
  invoke void @_ZN3sim5PolarC1ERKNS_8DistanceERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %67 unwind label %86

67:                                               ; preds = %66
  invoke void @_ZNK3sim5PolarplERKNS_10CoordinateE(ptr dead_on_unwind nonnull writable sret(%"class.sim::Polar") align 8 %13, ptr noundef nonnull align 8 dereferenceable(40) %14, ptr noundef nonnull align 8 dereferenceable(40) %4)
          to label %68 unwind label %88

68:                                               ; preds = %67
  invoke void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40) %12, ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %69 unwind label %90

69:                                               ; preds = %68
  invoke void @_ZNSt6vectorIN3sim9CartesianESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(40) %12)
          to label %70 unwind label %92

70:                                               ; preds = %69
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #7
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #7
  %71 = invoke noundef ptr @_ZN3sim1PEv()
          to label %72 unwind label %100

72:                                               ; preds = %70
  %73 = invoke noundef i32 @_ZN3sim5Param24numberOfSensorEdgePointsEv(ptr noundef nonnull align 8 dereferenceable(1056) %71)
          to label %74 unwind label %100

74:                                               ; preds = %72
  %75 = add nsw i32 %73, -1
  %76 = sitofp i32 %75 to double
  %77 = fdiv double 2.000000e+00, %76
  %78 = fadd double %.058, %77
  %79 = fcmp ugt double %78, 1.000000e+00
  br i1 %79, label %39, label %63, !llvm.loop !5

80:                                               ; preds = %63
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %99

82:                                               ; preds = %64
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %98

84:                                               ; preds = %65
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %97

86:                                               ; preds = %66
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %96

88:                                               ; preds = %67
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %95

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

92:                                               ; preds = %69
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %12) #7
  br label %94

94:                                               ; preds = %92, %90
  %.pn42 = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #7
  br label %95

95:                                               ; preds = %94, %88
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %94 ], [ %89, %88 ]
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #7
  br label %96

96:                                               ; preds = %95, %86
  %.pn42.pn.pn = phi { ptr, i32 } [ %.pn42.pn, %95 ], [ %87, %86 ]
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  br label %97

97:                                               ; preds = %96, %84
  %.pn42.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn, %96 ], [ %85, %84 ]
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  br label %98

98:                                               ; preds = %97, %82
  %.pn42.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn.pn, %97 ], [ %83, %82 ]
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br label %99

99:                                               ; preds = %98, %80
  %.pn42.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn.pn.pn, %98 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #7
  br label %113

100:                                              ; preds = %72, %70
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %113

102:                                              ; preds = %39
  %103 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN3sim7PolygonaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %27, ptr noundef nonnull align 8 dereferenceable(48) %18)
          to label %104 unwind label %108

104:                                              ; preds = %102
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %18) #7
  invoke void @_ZN3sim6Sensor13updateReadingERKNS_9CartesianERKNS_7RadiansERKNS_4MazeE(ptr noundef nonnull align 8 dereferenceable(192) %0, ptr noundef nonnull align 8 dereferenceable(40) %21, ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(26) %6)
          to label %105 unwind label %111

105:                                              ; preds = %104
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  ret void

106:                                              ; preds = %39
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %110

108:                                              ; preds = %102
  %109 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #7
  br label %110

110:                                              ; preds = %108, %106
  %.pn40 = phi { ptr, i32 } [ %109, %108 ], [ %107, %106 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %18) #7
  br label %113

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

113:                                              ; preds = %99, %100, %111, %110, %62
  %.pn49.pn = phi { ptr, i32 } [ %112, %111 ], [ %.pn40, %110 ], [ %.pn38, %62 ], [ %101, %100 ], [ %.pn42.pn.pn.pn.pn.pn, %99 ]
  call void @_ZNSt6vectorIN3sim9CartesianESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  br label %114

114:                                              ; preds = %113, %57
  %.pn49.pn.pn = phi { ptr, i32 } [ %.pn49.pn, %113 ], [ %.pn.pn, %57 ]
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #7
  br label %115

115:                                              ; preds = %114, %48
  %.pn49.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn, %114 ], [ %49, %48 ]
  call void @_ZN3sim7PolygonD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %25) #7
  br label %116

116:                                              ; preds = %115, %46
  %.pn49.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn.pn, %115 ], [ %47, %46 ]
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  br label %117

117:                                              ; preds = %116, %44
  %.pn49.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn.pn.pn, %116 ], [ %45, %44 ]
  call void @_ZN3sim10CoordinateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #7
  br label %118

118:                                              ; preds = %117, %42
  %.pn49.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn.pn.pn.pn, %117 ], [ %43, %42 ]
  call void @_ZN3sim5AngleD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #7
  br label %119

119:                                              ; preds = %118, %40
  %.pn49.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn.pn.pn.pn.pn.pn, %118 ], [ %41, %40 ]
  call void @_ZN3sim8DistanceD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  resume { ptr, i32 } %.pn49.pn.pn.pn.pn.pn.pn.pn
}

declare void @_ZN3sim6MetersC1ERKNS_8DistanceE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @_ZN3sim7DegreesC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @_ZN3sim9CartesianC1ERKNS_10CoordinateE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare void @_ZN3sim7RadiansC1ERKNS_5AngleE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

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

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

declare noundef ptr @_ZN3sim1PEv() local_unnamed_addr #2

declare noundef i32 @_ZN3sim5Param33numberOfCircleApproximationPointsEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

declare noundef i32 @_ZN3sim5Param24numberOfSensorEdgePointsEv(ptr noundef nonnull align 8 dereferenceable(1056)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3sim6Sensor13updateReadingERKNS_9CartesianERKNS_7RadiansERKNS_4MazeE(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(26)) local_unnamed_addr #1 align 2

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

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

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

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

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


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