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

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }

@_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 i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca %class.Robot, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  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
  %15 = load i32, ptr %5, align 4, !tbaa !5
  %16 = zext i32 %15 to i64
  %17 = call ptr @llvm.stacksave.p0()
  store ptr %17, ptr %6, align 8
  %18 = alloca %class.Robot, i64 %16, align 16
  store i64 %16, ptr %7, align 8
  %19 = icmp eq i64 %16, 0
  br i1 %19, label %26, label %20

20:                                               ; preds = %0
  %21 = getelementptr inbounds %class.Robot, ptr %18, i64 %16
  br label %22

22:                                               ; preds = %22, %20
  %23 = phi ptr [ %18, %20 ], [ %24, %22 ]
  call void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %23)
  %24 = getelementptr inbounds %class.Robot, ptr %23, i64 1
  %25 = icmp eq ptr %24, %21
  br i1 %25, label %26, label %22

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

27:                                               ; preds = %36, %26
  %28 = load i32, ptr %8, align 4, !tbaa !5
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i32, ptr %8, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds %class.Robot, ptr %18, i64 %34
  call void @_ZN5Robot9set_noiseEddd(ptr noundef nonnull align 8 dereferenceable(48) %35, double noundef 5.000000e-02, double noundef 5.000000e-02, double noundef 5.000000e+00)
  br label %36

36:                                               ; preds = %32
  %37 = load i32, ptr %8, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %8, align 4, !tbaa !5
  br label %27, !llvm.loop !9

39:                                               ; preds = %31
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = zext i32 %40 to i64
  %42 = alloca %class.Robot, i64 %41, align 16
  store i64 %41, ptr %9, align 8
  %43 = icmp eq i64 %41, 0
  br i1 %43, label %50, label %44

44:                                               ; preds = %39
  %45 = getelementptr inbounds %class.Robot, ptr %42, i64 %41
  br label %46

46:                                               ; preds = %46, %44
  %47 = phi ptr [ %42, %44 ], [ %48, %46 ]
  call void @_ZN5RobotC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %47)
  %48 = getelementptr inbounds %class.Robot, ptr %47, i64 1
  %49 = icmp eq ptr %48, %45
  br i1 %49, label %50, label %46

50:                                               ; preds = %46, %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %76, %50
  %52 = load i32, ptr %10, align 4, !tbaa !5
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %83

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #7
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %class.Robot, ptr %18, i64 %58
  call void @_ZN5Robot4moveEdd(ptr dead_on_unwind writable sret(%class.Robot) align 8 %11, ptr noundef nonnull align 8 dereferenceable(48) %59, double noundef 1.000000e-01, double noundef 5.000000e+00)
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %class.Robot, ptr %42, i64 %61
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %62, ptr align 8 %11, i64 48, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %class.Robot, ptr %42, i64 %64
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %class.Robot, ptr %18, i64 %67
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %68, ptr align 16 %65, i64 48, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  %69 = load i32, ptr %10, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %class.Robot, ptr %18, i64 %70
  call void @_ZN5Robot9show_poseB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(48) %71)
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %73 unwind label %79

73:                                               ; preds = %56
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %75 unwind label %79

75:                                               ; preds = %73
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %10, align 4, !tbaa !5
  br label %51, !llvm.loop !14

79:                                               ; preds = %73, %56
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %13, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, 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 %86

83:                                               ; preds = %55
  store i32 0, ptr %1, align 4
  %84 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %84)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %2) #7
  %85 = load i32, ptr %1, align 4
  ret i32 %85

86:                                               ; preds = %79
  %87 = load ptr, ptr %13, align 8
  %88 = load i32, ptr %14, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #6

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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; 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}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }

@_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::__cxx11::basic_string", 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
  %6 = call ptr @llvm.stacksave.p0()
  %7 = alloca [1000 x %class.Robot], align 16
  br label %8

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

10:                                               ; preds = %.preheader23
  %11 = alloca [1000 x %class.Robot], align 16
  br label %13

.preheader23:                                     ; preds = %8, %.preheader23
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader23 ], [ 0, %8 ]
  %12 = getelementptr inbounds %class.Robot, ptr %7, i64 %indvars.iv
  call void @_ZN5Robot9set_noiseEddd(ptr noundef nonnull align 8 dereferenceable(48) %12, 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 %10, label %.preheader23, !llvm.loop !5

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

15:                                               ; preds = %21
  call void @llvm.stackrestore.p0(ptr %6)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  ret i32 0

.preheader:                                       ; preds = %13, %21
  %indvars.iv27 = phi i64 [ %indvars.iv.next28, %21 ], [ 0, %13 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  %16 = getelementptr inbounds %class.Robot, ptr %7, i64 %indvars.iv27
  call void @_ZN5Robot4moveEdd(ptr dead_on_unwind nonnull writable sret(%class.Robot) align 8 %4, ptr noundef nonnull align 8 dereferenceable(48) %16, double noundef 1.000000e-01, double noundef 5.000000e+00)
  %17 = getelementptr inbounds %class.Robot, ptr %11, i64 %indvars.iv27
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %17, ptr noundef nonnull align 8 dereferenceable(48) %4, i64 48, i1 false), !tbaa.struct !7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %16, ptr noundef nonnull align 16 dereferenceable(48) %17, i64 48, i1 false), !tbaa.struct !7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN5Robot9show_poseB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) %16)
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %19 unwind label %22

19:                                               ; preds = %.preheader
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %21 unwind label %22

21:                                               ; preds = %19
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1
  %exitcond30.not = icmp eq i64 %indvars.iv.next28, 1000
  br i1 %exitcond30.not, label %15, label %.preheader, !llvm.loop !12

22:                                               ; preds = %19, %.preheader
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %1) #7
  resume { ptr, i32 } %23
}

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{i64 0, i64 8, !8, i64 8, i64 8, !8, i64 16, i64 8, !8, i64 24, i64 8, !8, i64 32, i64 8, !8, i64 40, i64 8, !8}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = distinct !{!12, !6}


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