; LLVM IR from ptiwari0664/RoboticsSoftwareEngineer :: Chapter3_Localization/MCL_C++ (ImportanceWeight)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.Robot = type { double, double, double, double, double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %class.Robot, align 8
  %3 = alloca %class.Robot, align 8
  %4 = alloca %class.Robot, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.Robot, align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %class.Robot, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca %class.Robot, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::vector", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 48, ptr %2) #7
  call void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2)
  call void @_ZN5Robot9set_noiseEddd(ptr noundef nonnull align 8 dereferenceable(48) %2, double noundef 5.000000e+00, double noundef 1.000000e-01, double noundef 5.000000e+00)
  call void @_ZN5Robot3setEddd(ptr noundef nonnull align 8 dereferenceable(48) %2, double noundef 3.000000e+01, double noundef 5.000000e+01, double noundef 0x3FF921FB54442D18)
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #7
  call void @_ZN5Robot4moveEdd(ptr dead_on_unwind writable sret(%class.Robot) align 8 %3, ptr noundef nonnull align 8 dereferenceable(48) %2, double noundef 0xBFF921FB54442D18, double noundef 1.500000e+01)
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #7
  call void @_ZN5Robot4moveEdd(ptr dead_on_unwind writable sret(%class.Robot) align 8 %4, ptr noundef nonnull align 8 dereferenceable(48) %2, double noundef 0xBFF921FB54442D18, double noundef 1.000000e+01)
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1000, ptr %5, align 4, !tbaa !5
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = zext i32 %21 to i64
  %23 = call ptr @llvm.stacksave.p0()
  store ptr %23, ptr %6, align 8
  %24 = alloca %class.Robot, i64 %22, align 16
  store i64 %22, ptr %7, align 8
  %25 = icmp eq i64 %22, 0
  br i1 %25, label %32, label %26

26:                                               ; preds = %0
  %27 = getelementptr inbounds %class.Robot, ptr %24, i64 %22
  br label %28

28:                                               ; preds = %28, %26
  %29 = phi ptr [ %24, %26 ], [ %30, %28 ]
  call void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %29)
  %30 = getelementptr inbounds %class.Robot, ptr %29, i64 1
  %31 = icmp eq ptr %30, %27
  br i1 %31, label %32, label %28

32:                                               ; preds = %28, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %42, %32
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %45

38:                                               ; preds = %33
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %class.Robot, ptr %24, i64 %40
  call void @_ZN5Robot9set_noiseEddd(ptr noundef nonnull align 8 dereferenceable(48) %41, double noundef 5.000000e-02, double noundef 5.000000e-02, double noundef 5.000000e+00)
  br label %42

42:                                               ; preds = %38
  %43 = load i32, ptr %8, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %8, align 4, !tbaa !5
  br label %33, !llvm.loop !9

45:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #7
  call void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %9, i64 48, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #7
  invoke void @_ZN5Robot4moveEdd(ptr dead_on_unwind writable sret(%class.Robot) align 8 %11, ptr noundef nonnull align 8 dereferenceable(48) %2, double noundef 1.000000e-01, double noundef 5.000000e+00)
          to label %46 unwind label %66

46:                                               ; preds = %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %2, ptr align 8 %11, i64 48, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  invoke void @_ZN5Robot5senseEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %47 unwind label %70

47:                                               ; preds = %46
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIdSaIdEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = zext i32 %49 to i64
  %51 = alloca %class.Robot, i64 %50, align 16
  store i64 %50, ptr %15, align 8
  %52 = icmp eq i64 %50, 0
  br i1 %52, label %60, label %53

53:                                               ; preds = %47
  %54 = getelementptr inbounds %class.Robot, ptr %51, i64 %50
  br label %55

55:                                               ; preds = %57, %53
  %56 = phi ptr [ %51, %53 ], [ %58, %57 ]
  invoke void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %56)
          to label %57 unwind label %74

57:                                               ; preds = %55
  %58 = getelementptr inbounds %class.Robot, ptr %56, i64 1
  %59 = icmp eq ptr %58, %54
  br i1 %59, label %60, label %55

60:                                               ; preds = %57, %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %92, %60
  %62 = load i32, ptr %16, align 4, !tbaa !5
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = icmp slt i32 %62, %63
  br i1 %64, label %78, label %65

65:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %99

66:                                               ; preds = %45
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %12, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  br label %141

70:                                               ; preds = %46
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %12, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  br label %141

74:                                               ; preds = %55
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %12, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %13, align 4
  br label %141

78:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 48, ptr %17) #7
  %79 = load i32, ptr %16, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds %class.Robot, ptr %24, i64 %80
  invoke void @_ZN5Robot4moveEdd(ptr dead_on_unwind writable sret(%class.Robot) align 8 %17, ptr noundef nonnull align 8 dereferenceable(48) %81, double noundef 1.000000e-01, double noundef 5.000000e+00)
          to label %82 unwind label %95

82:                                               ; preds = %78
  %83 = load i32, ptr %16, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds %class.Robot, ptr %51, i64 %84
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %85, ptr align 8 %17, i64 48, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #7
  %86 = load i32, ptr %16, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %class.Robot, ptr %51, i64 %87
  %89 = load i32, ptr %16, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds %class.Robot, ptr %24, i64 %90
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %91, ptr align 16 %88, i64 48, i1 false), !tbaa.struct !11
  br label %92

92:                                               ; preds = %82
  %93 = load i32, ptr %16, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %16, align 4, !tbaa !5
  br label %61, !llvm.loop !14

95:                                               ; preds = %78
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %12, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 48, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %141

99:                                               ; preds = %65
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = zext i32 %100 to i64
  %102 = alloca double, i64 %101, align 16
  store i64 %101, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %126, %99
  %104 = load i32, ptr %19, align 4, !tbaa !5
  %105 = load i32, ptr %5, align 4, !tbaa !5
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %138

108:                                              ; preds = %103
  %109 = load i32, ptr %19, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds %class.Robot, ptr %24, i64 %110
  invoke void @_ZNSt6vectorIdSaIdEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %112 unwind label %129

112:                                              ; preds = %108
  %113 = invoke noundef double @_ZN5Robot16measurement_probESt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(48) %111, ptr noundef %20)
          to label %114 unwind label %133

114:                                              ; preds = %112
  %115 = load i32, ptr %19, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %102, i64 %116
  store double %113, ptr %117, align 8, !tbaa !12
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  %118 = load i32, ptr %19, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds double, ptr %102, i64 %119
  %121 = load double, ptr %120, align 8, !tbaa !12
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %121)
          to label %123 unwind label %129

123:                                              ; preds = %114
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %125 unwind label %129

125:                                              ; preds = %123
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %19, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %19, align 4, !tbaa !5
  br label %103, !llvm.loop !15

129:                                              ; preds = %123, %114, %108
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %12, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %13, align 4
  br label %137

133:                                              ; preds = %112
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %12, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %13, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %141

138:                                              ; preds = %107
  store i32 0, ptr %1, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  %139 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %139)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #7
  %140 = load i32, ptr %1, align 4
  ret i32 %140

141:                                              ; preds = %137, %95, %74, %70, %66
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #7
  br label %142

142:                                              ; preds = %141
  %143 = load ptr, ptr %12, align 8
  %144 = load i32, ptr %13, align 4
  %145 = insertvalue { ptr, i32 } poison, ptr %143, 0
  %146 = insertvalue { ptr, i32 } %145, i32 %144, 1
  resume { ptr, i32 } %146
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Robot9set_noiseEddd(ptr noundef nonnull align 8 dereferenceable(48), double noundef, double noundef, double noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Robot3setEddd(ptr noundef nonnull align 8 dereferenceable(48), double noundef, double noundef, double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Robot4moveEdd(ptr dead_on_unwind noalias writable sret(%class.Robot) align 8, ptr noundef nonnull align 8 dereferenceable(48), double noundef, double noundef) #2 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Robot5senseEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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

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

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


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.Robot = type { double, double, double, double, double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.Robot, align 8
  %2 = alloca %class.Robot, align 8
  %3 = alloca %class.Robot, align 8
  %4 = alloca %class.Robot, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %class.Robot, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %class.Robot, align 8
  %9 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %1) #7
  call void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %1)
  call void @_ZN5Robot9set_noiseEddd(ptr noundef nonnull align 8 dereferenceable(48) %1, double noundef 5.000000e+00, double noundef 1.000000e-01, double noundef 5.000000e+00)
  call void @_ZN5Robot3setEddd(ptr noundef nonnull align 8 dereferenceable(48) %1, double noundef 3.000000e+01, double noundef 5.000000e+01, double noundef 0x3FF921FB54442D18)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #7
  call void @_ZN5Robot4moveEdd(ptr dead_on_unwind nonnull writable sret(%class.Robot) align 8 %2, ptr noundef nonnull align 8 dereferenceable(48) %1, double noundef 0xBFF921FB54442D18, double noundef 1.500000e+01)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #7
  call void @_ZN5Robot4moveEdd(ptr dead_on_unwind nonnull writable sret(%class.Robot) align 8 %3, ptr noundef nonnull align 8 dereferenceable(48) %1, double noundef 0xBFF921FB54442D18, double noundef 1.000000e+01)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #7
  %10 = call ptr @llvm.stacksave.p0()
  %11 = alloca [1000 x %class.Robot], align 16
  br label %12

12:                                               ; preds = %12, %0
  %.idx = phi i64 [ 0, %0 ], [ %.add, %12 ]
  %.ptr = getelementptr inbounds i8, ptr %11, i64 %.idx
  call void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr)
  %.add = add nuw nsw i64 %.idx, 48
  %13 = icmp eq i64 %.add, 48000
  br i1 %13, label %.preheader38, label %12

14:                                               ; preds = %.preheader38
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) %4, i64 48, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #7
  invoke void @_ZN5Robot4moveEdd(ptr dead_on_unwind nonnull writable sret(%class.Robot) align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) %1, double noundef 1.000000e-01, double noundef 5.000000e+00)
          to label %16 unwind label %23

.preheader38:                                     ; preds = %12, %.preheader38
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader38 ], [ 0, %12 ]
  %15 = getelementptr inbounds %class.Robot, ptr %11, i64 %indvars.iv
  call void @_ZN5Robot9set_noiseEddd(ptr noundef nonnull align 8 dereferenceable(48) %15, double noundef 5.000000e-02, double noundef 5.000000e-02, double noundef 5.000000e+00)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1000
  br i1 %exitcond.not, label %14, label %.preheader38, !llvm.loop !10

16:                                               ; preds = %14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) %6, i64 48, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  invoke void @_ZN5Robot5senseEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %17 unwind label %25

17:                                               ; preds = %16
  %18 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIdSaIdEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  %19 = alloca [1000 x %class.Robot], align 16
  br label %20

20:                                               ; preds = %21, %17
  %.idx30 = phi i64 [ 0, %17 ], [ %.add31, %21 ]
  %.ptr32 = getelementptr inbounds i8, ptr %19, i64 %.idx30
  invoke void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %.ptr32)
          to label %21 unwind label %27

21:                                               ; preds = %20
  %.add31 = add nuw nsw i64 %.idx30, 48
  %22 = icmp eq i64 %.add31, 48000
  br i1 %22, label %.preheader37, label %20

23:                                               ; preds = %14
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  br label %47

25:                                               ; preds = %16
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %47

27:                                               ; preds = %20
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %47

.preheader37:                                     ; preds = %21, %30
  %indvars.iv43 = phi i64 [ %indvars.iv.next44, %30 ], [ 0, %21 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #7
  %29 = getelementptr inbounds %class.Robot, ptr %11, i64 %indvars.iv43
  invoke void @_ZN5Robot4moveEdd(ptr dead_on_unwind nonnull writable sret(%class.Robot) align 8 %8, ptr noundef nonnull align 8 dereferenceable(48) %29, double noundef 1.000000e-01, double noundef 5.000000e+00)
          to label %30 unwind label %32

30:                                               ; preds = %.preheader37
  %31 = getelementptr inbounds %class.Robot, ptr %19, i64 %indvars.iv43
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %31, ptr noundef nonnull align 8 dereferenceable(48) %8, i64 48, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %29, ptr noundef nonnull align 16 dereferenceable(48) %31, i64 48, i1 false), !tbaa.struct !5
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond46.not = icmp eq i64 %indvars.iv.next44, 1000
  br i1 %exitcond46.not, label %.preheader, label %.preheader37, !llvm.loop !12

32:                                               ; preds = %.preheader37
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  br label %47

34:                                               ; preds = %42
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.stackrestore.p0(ptr %10)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  ret i32 0

.preheader:                                       ; preds = %30, %42
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %42 ], [ 0, %30 ]
  invoke void @_ZNSt6vectorIdSaIdEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %35 unwind label %43

35:                                               ; preds = %.preheader
  %36 = getelementptr inbounds %class.Robot, ptr %11, i64 %indvars.iv47
  %37 = invoke noundef double @_ZN5Robot16measurement_probESt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull %9)
          to label %38 unwind label %45

38:                                               ; preds = %35
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %37)
          to label %40 unwind label %43

40:                                               ; preds = %38
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %42 unwind label %43

42:                                               ; preds = %40
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %exitcond50.not = icmp eq i64 %indvars.iv.next48, 1000
  br i1 %exitcond50.not, label %34, label %.preheader, !llvm.loop !13

43:                                               ; preds = %40, %38, %.preheader
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %47

45:                                               ; preds = %35
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %47

47:                                               ; preds = %43, %45, %32, %27, %25, %23
  %.pn35 = phi { ptr, i32 } [ %33, %32 ], [ %28, %27 ], [ %26, %25 ], [ %24, %23 ], [ %44, %43 ], [ %46, %45 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn35
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Robot9set_noiseEddd(ptr noundef nonnull align 8 dereferenceable(48), double noundef, double noundef, double noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Robot3setEddd(ptr noundef nonnull align 8 dereferenceable(48), double noundef, double noundef, double noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Robot4moveEdd(ptr dead_on_unwind noalias writable sret(%class.Robot) align 8, ptr noundef nonnull align 8 dereferenceable(48), double noundef, double noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Robot5senseEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass