; LLVM IR from HRI-EU/Rcs :: src/RcsCore/MotionControlLayer.ll (ZN3Rcs18MotionControlLayerD2Ev)

; 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.Rcs::MotionControlLayer" = type { ptr, ptr, ptr, %"class.std::vector", ptr, i8, i8, i8, i8, i32, i32, double, double, double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Rcs::HardwareComponent *, std::allocator<Rcs::HardwareComponent *>>::_Vector_impl" }
%"struct.std::_Vector_base<Rcs::HardwareComponent *, std::allocator<Rcs::HardwareComponent *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Rcs::HardwareComponent *, std::allocator<Rcs::HardwareComponent *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Rcs::HardwareComponent *, std::allocator<Rcs::HardwareComponent *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN3Rcs18MotionControlLayerE = external dso_local unnamed_addr constant { [29 x ptr] }, align 8
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@RcsLogLevel = external global i32, align 4
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@__func__._ZN3Rcs18MotionControlLayerD2Ev = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [22 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #0

declare void @print_trace() #1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3Rcs18MotionControlLayerD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %6 = load ptr, ptr %2, align 8
  store ptr getelementptr inbounds inrange(-16, 216) ({ [29 x ptr] }, ptr @_ZTVN3Rcs18MotionControlLayerE, i32 0, i32 0, i32 2), ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %7 = load ptr, ptr %6, align 8, !tbaa !9
  %8 = getelementptr inbounds ptr, ptr %7, i64 4
  %9 = load ptr, ptr %8, align 8
  %10 = invoke noundef ptr %9(ptr noundef nonnull align 8 dereferenceable(104) %6)
          to label %11 unwind label %138

11:                                               ; preds = %1
  store ptr %10, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 4
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %34

15:                                               ; preds = %11
  br label %16

16:                                               ; preds = %15
  %17 = load i32, ptr @RcsLogLevel, align 4, !tbaa !20
  %18 = icmp sle i32 0, %17
  br i1 %18, label %19, label %27

19:                                               ; preds = %16
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @__func__._ZN3Rcs18MotionControlLayerD2Ev, i32 noundef 94) #5
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str.5) #5
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef @.str.6) #5
  invoke void @print_trace()
          to label %26 unwind label %138

26:                                               ; preds = %19
  br label %27

27:                                               ; preds = %26, %16
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %6, align 8, !tbaa !9
  %31 = getelementptr inbounds ptr, ptr %30, i64 7
  %32 = load ptr, ptr %31, align 8
  invoke void %32(ptr noundef nonnull align 8 dereferenceable(104) %6)
          to label %33 unwind label %138

33:                                               ; preds = %29
  br label %34

34:                                               ; preds = %33, %11
  %35 = load ptr, ptr %6, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %35, i64 20
  %37 = load ptr, ptr %36, align 8
  invoke void %37(ptr noundef nonnull align 8 dereferenceable(104) %6)
          to label %38 unwind label %138

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !21
  br label %39

39:                                               ; preds = %56, %38
  %40 = load i64, ptr %4, align 8, !tbaa !21
  %41 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 3
  %42 = call noundef i64 @_ZNKSt6vectorIPN3Rcs17HardwareComponentESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %41) #5
  %43 = icmp ult i64 %40, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %39
  %46 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 3
  %47 = load i64, ptr %4, align 8, !tbaa !21
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Rcs17HardwareComponentESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %47) #5
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = icmp eq ptr %49, null
  br i1 %50, label %55, label %51

51:                                               ; preds = %45
  %52 = load ptr, ptr %49, align 8, !tbaa !9
  %53 = getelementptr inbounds ptr, ptr %52, i64 1
  %54 = load ptr, ptr %53, align 8
  call void %54(ptr noundef nonnull align 8 dereferenceable(25) %49) #5
  br label %55

55:                                               ; preds = %51, %45
  br label %56

56:                                               ; preds = %55
  %57 = load i64, ptr %4, align 8, !tbaa !21
  %58 = add i64 %57, 1
  store i64 %58, ptr %4, align 8, !tbaa !21
  br label %39, !llvm.loop !23

59:                                               ; preds = %44
  %60 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 5
  %61 = load i8, ptr %60, align 8, !tbaa !25, !range !26, !noundef !27
  %62 = trunc i8 %61 to i1
  %63 = zext i1 %62 to i32
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %65, label %69

65:                                               ; preds = %59
  %66 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !28
  invoke void @RcsGraph_destroy(ptr noundef %67)
          to label %68 unwind label %138

68:                                               ; preds = %65
  br label %69

69:                                               ; preds = %68, %59
  %70 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !29
  invoke void @RcsGraph_destroy(ptr noundef %71)
          to label %72 unwind label %138

72:                                               ; preds = %69
  %73 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef @__func__._ZN3Rcs18MotionControlLayerD2Ev, i32 noundef 116)
          to label %74 unwind label %138

74:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !30
  %75 = load ptr, ptr %6, align 8, !tbaa !9
  %76 = getelementptr inbounds ptr, ptr %75, i64 18
  %77 = load ptr, ptr %76, align 8
  %78 = invoke noundef i32 %77(ptr noundef nonnull align 8 dereferenceable(104) %6)
          to label %79 unwind label %138

79:                                               ; preds = %74
  %80 = icmp ugt i32 %78, 0
  br i1 %80, label %81, label %91

81:                                               ; preds = %79
  %82 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 14
  %83 = load double, ptr %82, align 8, !tbaa !31
  %84 = load ptr, ptr %6, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %84, i64 18
  %86 = load ptr, ptr %85, align 8
  %87 = invoke noundef i32 %86(ptr noundef nonnull align 8 dereferenceable(104) %6)
          to label %88 unwind label %138

88:                                               ; preds = %81
  %89 = uitofp i32 %87 to double
  %90 = fdiv double %83, %89
  store double %90, ptr %5, align 8, !tbaa !30
  br label %91

91:                                               ; preds = %88, %79
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %103

94:                                               ; preds = %91
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = getelementptr inbounds ptr, ptr %96, i64 5
  %98 = load ptr, ptr %97, align 8
  %99 = invoke noundef ptr %98(ptr noundef nonnull align 8 dereferenceable(25) %95)
          to label %100 unwind label %138

100:                                              ; preds = %94
  %101 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %99)
          to label %102 unwind label %138

102:                                              ; preds = %100
  br label %106

103:                                              ; preds = %91
  %104 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.9)
          to label %105 unwind label %138

105:                                              ; preds = %103
  br label %106

106:                                              ; preds = %105, %102
  %107 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 13
  %108 = load double, ptr %107, align 8, !tbaa !32
  %109 = fmul double 1.000000e+03, %108
  %110 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %109)
          to label %111 unwind label %138

111:                                              ; preds = %106
  %112 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 11
  %113 = load double, ptr %112, align 8, !tbaa !33
  %114 = fmul double 1.000000e+03, %113
  %115 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %114)
          to label %116 unwind label %138

116:                                              ; preds = %111
  %117 = load double, ptr %5, align 8, !tbaa !30
  %118 = fmul double 1.000000e+03, %117
  %119 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.12, double noundef %118)
          to label %120 unwind label %138

120:                                              ; preds = %116
  %121 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 12
  %122 = load double, ptr %121, align 8, !tbaa !34
  %123 = fmul double 1.000000e+03, %122
  %124 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.13, double noundef %123)
          to label %125 unwind label %138

125:                                              ; preds = %120
  %126 = load ptr, ptr %6, align 8, !tbaa !9
  %127 = getelementptr inbounds ptr, ptr %126, i64 18
  %128 = load ptr, ptr %127, align 8
  %129 = invoke noundef i32 %128(ptr noundef nonnull align 8 dereferenceable(104) %6)
          to label %130 unwind label %138

130:                                              ; preds = %125
  %131 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %129)
          to label %132 unwind label %138

132:                                              ; preds = %130
  %133 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 10
  %134 = load i32, ptr %133, align 8, !tbaa !35
  %135 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %134)
          to label %136 unwind label %138

136:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %137 = getelementptr inbounds %"class.Rcs::MotionControlLayer", ptr %6, i32 0, i32 3
  call void @_ZNSt6vectorIPN3Rcs17HardwareComponentESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %137) #5
  ret void

138:                                              ; preds = %132, %130, %125, %120, %116, %111, %106, %103, %100, %94, %81, %74, %72, %69, %65, %34, %29, %19, %1
  %139 = landingpad { ptr, i32 }
          catch ptr null
  %140 = extractvalue { ptr, i32 } %139, 0
  call void @__clang_call_terminate(ptr %140) #6
  unreachable
}

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

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #4

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

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

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

declare void @RcsGraph_destroy(ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"_ZTSN3Rcs18MotionControlLayerE", !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 48, !17, i64 56, !17, i64 57, !17, i64 58, !17, i64 59, !18, i64 60, !18, i64 64, !19, i64 72, !19, i64 80, !19, i64 88, !19, i64 96}
!13 = !{!"_ZTSSt6vectorIPN3Rcs17HardwareComponentESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN3Rcs17HardwareComponentESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN3Rcs17HardwareComponentESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN3Rcs17HardwareComponentESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!18, !18, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!12, !17, i64 56}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!12, !6, i64 8}
!29 = !{!12, !6, i64 16}
!30 = !{!19, !19, i64 0}
!31 = !{!12, !19, i64 96}
!32 = !{!12, !19, i64 88}
!33 = !{!12, !19, i64 72}
!34 = !{!12, !19, i64 80}
!35 = !{!12, !18, i64 64}


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

@_ZTVN3Rcs18MotionControlLayerE = external dso_local unnamed_addr constant { [29 x ptr] }, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@__func__._ZN3Rcs18MotionControlLayerD2Ev = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [22 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

declare void @print_trace() local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3Rcs18MotionControlLayerD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  store ptr getelementptr inbounds inrange(-16, 216) (i8, ptr @_ZTVN3Rcs18MotionControlLayerE, i64 16), ptr %0, align 8, !tbaa !5
  %2 = load ptr, ptr getelementptr inbounds inrange(-48, 184) (i8, ptr @_ZTVN3Rcs18MotionControlLayerE, i64 48), align 8
  %3 = invoke noundef ptr %2(ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %4 unwind label %98

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  %6 = load ptr, ptr %5, align 8, !tbaa !8
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %21, label %7

7:                                                ; preds = %4
  %8 = load i32, ptr @RcsLogLevel, align 4, !tbaa !19
  %9 = icmp sgt i32 %8, -1
  br i1 %9, label %10, label %17

10:                                               ; preds = %7
  %11 = load ptr, ptr @stderr, align 8, !tbaa !20
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__._ZN3Rcs18MotionControlLayerD2Ev, i32 noundef 94) #4
  %13 = load ptr, ptr @stderr, align 8, !tbaa !20
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.5) #4
  %15 = load ptr, ptr @stderr, align 8, !tbaa !20
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.6) #4
  invoke void @print_trace()
          to label %17 unwind label %98

17:                                               ; preds = %10, %7
  %18 = load ptr, ptr %0, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 56
  %20 = load ptr, ptr %19, align 8
  invoke void %20(ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %21 unwind label %98

21:                                               ; preds = %17, %4
  %22 = load ptr, ptr %0, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 160
  %24 = load ptr, ptr %23, align 8
  invoke void %24(ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %.preheader unwind label %98

.preheader:                                       ; preds = %21
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  %26 = tail call noundef i64 @_ZNKSt6vectorIPN3Rcs17HardwareComponentESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %.not12 = icmp eq i64 %26, 0
  br i1 %.not12, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %37, %.preheader
  %27 = getelementptr inbounds i8, ptr %0, i64 56
  %28 = load i8, ptr %27, align 8, !tbaa !21, !range !22, !noundef !23
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %41, label %44

.lr.ph:                                           ; preds = %.preheader, %37
  %.0611 = phi i64 [ %38, %37 ], [ 0, %.preheader ]
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3Rcs17HardwareComponentESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %.0611) #5
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %32 = icmp eq ptr %31, null
  br i1 %32, label %37, label %33

33:                                               ; preds = %.lr.ph
  %34 = load ptr, ptr %31, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load ptr, ptr %35, align 8
  tail call void %36(ptr noundef nonnull align 8 dereferenceable(25) %31) #5
  br label %37

37:                                               ; preds = %.lr.ph, %33
  %38 = add nuw i64 %.0611, 1
  %39 = tail call noundef i64 @_ZNKSt6vectorIPN3Rcs17HardwareComponentESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  %40 = icmp ult i64 %38, %39
  br i1 %40, label %.lr.ph, label %._crit_edge, !llvm.loop !24

41:                                               ; preds = %._crit_edge
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !26
  invoke void @RcsGraph_destroy(ptr noundef %43)
          to label %44 unwind label %98

44:                                               ; preds = %41, %._crit_edge
  %45 = getelementptr inbounds i8, ptr %0, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !27
  invoke void @RcsGraph_destroy(ptr noundef %46)
          to label %47 unwind label %98

47:                                               ; preds = %44
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef nonnull @__func__._ZN3Rcs18MotionControlLayerD2Ev, i32 noundef 116)
  %49 = load ptr, ptr %0, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 144
  %51 = load ptr, ptr %50, align 8
  %52 = invoke noundef i32 %51(ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %53 unwind label %98

53:                                               ; preds = %47
  %.not9 = icmp eq i32 %52, 0
  br i1 %.not9, label %65, label %54

54:                                               ; preds = %53
  %55 = getelementptr inbounds i8, ptr %0, i64 96
  %56 = load double, ptr %55, align 8, !tbaa !28
  %57 = load ptr, ptr %0, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %57, i64 144
  %59 = load ptr, ptr %58, align 8
  %60 = invoke noundef i32 %59(ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %61 unwind label %98

61:                                               ; preds = %54
  %62 = uitofp i32 %60 to double
  %63 = fdiv double %56, %62
  %64 = fmul double %63, 1.000000e+03
  br label %65

65:                                               ; preds = %61, %53
  %.0 = phi double [ %64, %61 ], [ 0.000000e+00, %53 ]
  %.not10 = icmp eq ptr %3, null
  br i1 %.not10, label %73, label %66

66:                                               ; preds = %65
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 40
  %69 = load ptr, ptr %68, align 8
  %70 = invoke noundef ptr %69(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %71 unwind label %98

71:                                               ; preds = %66
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef %70)
  br label %75

73:                                               ; preds = %65
  %74 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %75

75:                                               ; preds = %73, %71
  %76 = getelementptr inbounds i8, ptr %0, i64 88
  %77 = load double, ptr %76, align 8, !tbaa !29
  %78 = fmul double %77, 1.000000e+03
  %79 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %78)
  %80 = getelementptr inbounds i8, ptr %0, i64 72
  %81 = load double, ptr %80, align 8, !tbaa !30
  %82 = fmul double %81, 1.000000e+03
  %83 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %82)
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %.0)
  %85 = getelementptr inbounds i8, ptr %0, i64 80
  %86 = load double, ptr %85, align 8, !tbaa !31
  %87 = fmul double %86, 1.000000e+03
  %88 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, double noundef %87)
  %89 = load ptr, ptr %0, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 144
  %91 = load ptr, ptr %90, align 8
  %92 = invoke noundef i32 %91(ptr noundef nonnull align 8 dereferenceable(104) %0)
          to label %93 unwind label %98

93:                                               ; preds = %75
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %92)
  %95 = getelementptr inbounds i8, ptr %0, i64 64
  %96 = load i32, ptr %95, align 8, !tbaa !32
  %97 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %96)
  tail call void @_ZNSt6vectorIPN3Rcs17HardwareComponentESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  ret void

98:                                               ; preds = %75, %66, %54, %47, %44, %41, %21, %17, %10, %1
  %99 = landingpad { ptr, i32 }
          catch ptr null
  %100 = extractvalue { ptr, i32 } %99, 0
  tail call void @__clang_call_terminate(ptr %100) #6
  unreachable
}

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #3

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

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

declare void @RcsGraph_destroy(ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

attributes #0 = { nofree 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noinline noreturn nounwind uwtable "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 = { cold nounwind }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 48}
!9 = !{!"_ZTSN3Rcs18MotionControlLayerE", !10, i64 8, !10, i64 16, !12, i64 24, !10, i64 48, !16, i64 56, !16, i64 57, !16, i64 58, !16, i64 59, !17, i64 60, !17, i64 64, !18, i64 72, !18, i64 80, !18, i64 88, !18, i64 96}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIPN3Rcs17HardwareComponentESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIPN3Rcs17HardwareComponentESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN3Rcs17HardwareComponentESaIS2_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN3Rcs17HardwareComponentESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!16 = !{!"bool", !11, i64 0}
!17 = !{!"int", !11, i64 0}
!18 = !{!"double", !11, i64 0}
!19 = !{!17, !17, i64 0}
!20 = !{!10, !10, i64 0}
!21 = !{!9, !16, i64 56}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!9, !10, i64 8}
!27 = !{!9, !10, i64 16}
!28 = !{!9, !18, i64 96}
!29 = !{!9, !18, i64 88}
!30 = !{!9, !18, i64 72}
!31 = !{!9, !18, i64 80}
!32 = !{!9, !17, i64 64}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass