; LLVM IR from Rhoban/IKWalk :: LegIK.ll (ZN5LegIK6IKTest10test_suiteEv)

; 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.LegIK::Position" = type { [6 x double] }
%"class.LegIK::Vector3D" = type { %"class.std::vector" }
%"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 }

@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef, double noundef, double noundef, ptr noundef, double noundef, double noundef, double noundef, ptr noundef byval(%"class.LegIK::Position") align 8, double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5LegIK6IKTest10test_suiteEv() #2 align 2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i8, align 1
  %2 = alloca %"class.LegIK::Vector3D", align 8
  %3 = alloca %"class.LegIK::Position", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.LegIK::Vector3D", align 8
  %7 = alloca %"class.LegIK::Position", align 8
  %8 = alloca %"class.LegIK::Vector3D", align 8
  %9 = alloca %"class.LegIK::Position", align 8
  %10 = alloca %"class.LegIK::Vector3D", align 8
  %11 = alloca %"class.LegIK::Position", align 8
  %12 = alloca %"class.LegIK::Vector3D", align 8
  %13 = alloca %"class.LegIK::Position", align 8
  %14 = alloca %"class.LegIK::Vector3D", align 8
  %15 = alloca %"class.LegIK::Position", align 8
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 1, ptr %1) #5
  store i8 1, ptr %1, align 1, !tbaa !5
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %18 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %19 = fneg double %18
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %2, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %19)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %3, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0x3FE921FB54442D18, double noundef 0x3FF921FB54442D18, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00)
          to label %20 unwind label %25

20:                                               ; preds = %0
  %21 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 0.000000e+00, ptr noundef %2, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef byval(%"class.LegIK::Position") align 8 %3, double noundef 1.000000e-02)
          to label %22 unwind label %25

22:                                               ; preds = %20
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br i1 %21, label %23, label %29

23:                                               ; preds = %22
  %24 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i8 0, ptr %1, align 1, !tbaa !5
  br label %31

25:                                               ; preds = %20, %0
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %4, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %5, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br label %108

29:                                               ; preds = %22
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %31

31:                                               ; preds = %29, %23
  %32 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %6, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef -2.200000e+00)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %7, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %33 unwind label %38

33:                                               ; preds = %31
  %34 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef %6, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef byval(%"class.LegIK::Position") align 8 %7, double noundef 1.000000e-02)
          to label %35 unwind label %38

35:                                               ; preds = %33
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br i1 %34, label %36, label %42

36:                                               ; preds = %35
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i8 0, ptr %1, align 1, !tbaa !5
  br label %44

38:                                               ; preds = %33, %31
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %4, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %5, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %108

42:                                               ; preds = %35
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %44

44:                                               ; preds = %42, %36
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %8, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef -2.200000e+00)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %9, double noundef 0x3FD0C152382D7365, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %46 unwind label %51

46:                                               ; preds = %44
  %47 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef %8, double noundef 0x3FD0C152382D7365, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef byval(%"class.LegIK::Position") align 8 %9, double noundef 1.000000e-02)
          to label %48 unwind label %51

48:                                               ; preds = %46
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br i1 %47, label %49, label %55

49:                                               ; preds = %48
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i8 0, ptr %1, align 1, !tbaa !5
  br label %57

51:                                               ; preds = %46, %44
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %4, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %5, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %108

55:                                               ; preds = %48
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %57

57:                                               ; preds = %55, %49
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %59 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %60 = fneg double %59
  %61 = fsub double %60, 2.000000e-01
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %61)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %11, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00, double noundef 0x3FE921FB54442D18, double noundef 0x3FF921FB54442D18, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00)
          to label %62 unwind label %67

62:                                               ; preds = %57
  %63 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef %10, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef byval(%"class.LegIK::Position") align 8 %11, double noundef 1.000000e-02)
          to label %64 unwind label %67

64:                                               ; preds = %62
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br i1 %63, label %65, label %71

65:                                               ; preds = %64
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i8 0, ptr %1, align 1, !tbaa !5
  br label %73

67:                                               ; preds = %62, %57
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %4, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %5, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %108

71:                                               ; preds = %64
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %73

73:                                               ; preds = %71, %65
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %75 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %76 = fneg double %75
  %77 = fsub double %76, 2.000000e-01
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %12, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %77)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %13, double noundef 0xBFE921FB54442D18, double noundef 0.000000e+00, double noundef 0x3FE921FB54442D18, double noundef 0x3FF921FB54442D18, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00)
          to label %78 unwind label %83

78:                                               ; preds = %73
  %79 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef %12, double noundef 0xBFE921FB54442D18, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef byval(%"class.LegIK::Position") align 8 %13, double noundef 1.000000e-02)
          to label %80 unwind label %83

80:                                               ; preds = %78
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br i1 %79, label %81, label %87

81:                                               ; preds = %80
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i8 0, ptr %1, align 1, !tbaa !5
  br label %89

83:                                               ; preds = %78, %73
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %4, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %5, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br label %108

87:                                               ; preds = %80
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %89

89:                                               ; preds = %87, %81
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %91 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %92 = fneg double %91
  %93 = fsub double %92, 2.000000e-01
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %14, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %93)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %15, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0x3FE921FB54442D18, double noundef 0x3FF921FB54442D18, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00)
          to label %94 unwind label %99

94:                                               ; preds = %89
  %95 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef %14, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef byval(%"class.LegIK::Position") align 8 %15, double noundef 1.000000e-02)
          to label %96 unwind label %99

96:                                               ; preds = %94
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  br i1 %95, label %97, label %103

97:                                               ; preds = %96
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  store i8 0, ptr %1, align 1, !tbaa !5
  br label %105

99:                                               ; preds = %94, %89
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %4, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %5, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  br label %108

103:                                              ; preds = %96
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %105

105:                                              ; preds = %103, %97
  %106 = load i8, ptr %1, align 1, !tbaa !5, !range !9, !noundef !10
  %107 = trunc i8 %106 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %1) #5
  ret i1 %107

108:                                              ; preds = %99, %83, %67, %51, %38, %25
  call void @llvm.lifetime.end.p0(i64 1, ptr %1) #5
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr %4, align 8
  %111 = load i32, ptr %5, align 4
  %112 = insertvalue { ptr, i32 } poison, ptr %110, 0
  %113 = insertvalue { ptr, i32 } %112, i32 %111, 1
  resume { ptr, i32 } %113
}

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

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

declare void @_ZN5LegIK8Vector3DC1Eddd(ptr, double, double, double)

declare void @_ZN5LegIK8PositionC1Edddddd(ptr, double, double, double, double, double, double)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!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.LegIK::Position" = type { [6 x double] }
%"class.LegIK::Vector3D" = type { %"class.std::vector" }
%"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 }

@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef, double noundef, double noundef, ptr noundef, double noundef, double noundef, double noundef, ptr noundef byval(%"class.LegIK::Position") align 8, double noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5LegIK6IKTest10test_suiteEv() local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.LegIK::Vector3D", align 8
  %2 = alloca %"class.LegIK::Position", align 8
  %3 = alloca %"class.LegIK::Vector3D", align 8
  %4 = alloca %"class.LegIK::Position", align 8
  %5 = alloca %"class.LegIK::Vector3D", align 8
  %6 = alloca %"class.LegIK::Position", align 8
  %7 = alloca %"class.LegIK::Vector3D", align 8
  %8 = alloca %"class.LegIK::Position", align 8
  %9 = alloca %"class.LegIK::Vector3D", align 8
  %10 = alloca %"class.LegIK::Position", align 8
  %11 = alloca %"class.LegIK::Vector3D", align 8
  %12 = alloca %"class.LegIK::Position", align 8
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %15 = tail call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %16 = fneg double %15
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %1, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %16)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %2, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0x3FE921FB54442D18, double noundef 0x3FF921FB54442D18, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00)
          to label %17 unwind label %22

17:                                               ; preds = %0
  %18 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 0.000000e+00, ptr noundef nonnull %1, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef nonnull byval(%"class.LegIK::Position") align 8 %2, double noundef 1.000000e-02)
          to label %19 unwind label %22

19:                                               ; preds = %17
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %.str.3..str.4 = select i1 %18, ptr @.str.3, ptr @.str.4
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3..str.4)
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %3, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef -2.200000e+00)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %4, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %24 unwind label %29

22:                                               ; preds = %17, %0
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %64

24:                                               ; preds = %19
  %25 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef nonnull %3, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef nonnull byval(%"class.LegIK::Position") align 8 %4, double noundef 1.000000e-02)
          to label %26 unwind label %29

26:                                               ; preds = %24
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %.str.3..str.410 = select i1 %25, ptr @.str.3, ptr @.str.4
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3..str.410)
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef -2.200000e+00)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %6, double noundef 0x3FD0C152382D7365, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %31 unwind label %38

29:                                               ; preds = %24, %19
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %64

31:                                               ; preds = %26
  %32 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef nonnull %5, double noundef 0x3FD0C152382D7365, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef nonnull byval(%"class.LegIK::Position") align 8 %6, double noundef 1.000000e-02)
          to label %33 unwind label %38

33:                                               ; preds = %31
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %.str.3..str.411 = select i1 %32, ptr @.str.3, ptr @.str.4
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3..str.411)
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %36 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %37 = fsub double -2.000000e-01, %36
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %7, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %37)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %8, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00, double noundef 0x3FE921FB54442D18, double noundef 0x3FF921FB54442D18, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00)
          to label %40 unwind label %47

38:                                               ; preds = %31, %26
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %64

40:                                               ; preds = %33
  %41 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef nonnull %7, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef nonnull byval(%"class.LegIK::Position") align 8 %8, double noundef 1.000000e-02)
          to label %42 unwind label %47

42:                                               ; preds = %40
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %.str.3..str.412 = select i1 %41, ptr @.str.3, ptr @.str.4
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3..str.412)
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %45 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %46 = fsub double -2.000000e-01, %45
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %46)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %10, double noundef 0xBFE921FB54442D18, double noundef 0.000000e+00, double noundef 0x3FE921FB54442D18, double noundef 0x3FF921FB54442D18, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00)
          to label %49 unwind label %56

47:                                               ; preds = %40, %33
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %64

49:                                               ; preds = %42
  %50 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef nonnull %9, double noundef 0xBFE921FB54442D18, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef nonnull byval(%"class.LegIK::Position") align 8 %10, double noundef 1.000000e-02)
          to label %51 unwind label %56

51:                                               ; preds = %49
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %.str.3..str.413 = select i1 %50, ptr @.str.3, ptr @.str.4
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3..str.413)
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %54 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef 2)
  %55 = fsub double -2.000000e-01, %54
  call void @_ZN5LegIK8Vector3DC1Eddd(ptr noundef nonnull align 8 dereferenceable(24) %11, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef %55)
  invoke void @_ZN5LegIK8PositionC1Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %12, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0x3FE921FB54442D18, double noundef 0x3FF921FB54442D18, double noundef 0x3FE921FB54442D18, double noundef 0.000000e+00)
          to label %58 unwind label %62

56:                                               ; preds = %49, %42
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %64

58:                                               ; preds = %51
  %59 = invoke noundef zeroext i1 @_ZN5LegIK6IKTest4testEdddNS_8Vector3DEdddNS_8PositionEd(double noundef 1.000000e+00, double noundef 1.000000e+00, double noundef 2.000000e-01, ptr noundef nonnull %11, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00, ptr noundef nonnull byval(%"class.LegIK::Position") align 8 %12, double noundef 1.000000e-02)
          to label %60 unwind label %62

60:                                               ; preds = %58
  %..03.demorgan = or i1 %25, %18
  %...03.demorgan = or i1 %32, %..03.demorgan
  %....03.demorgan = or i1 %41, %...03.demorgan
  %.....03.demorgan = or i1 %50, %....03.demorgan
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %.str.3..str.414 = select i1 %59, ptr @.str.3, ptr @.str.4
  %......03.demorgan = or i1 %59, %.....03.demorgan
  %......03 = xor i1 %......03.demorgan, true
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3..str.414)
  ret i1 %......03

62:                                               ; preds = %58, %51
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %64

64:                                               ; preds = %62, %56, %47, %38, %29, %22
  %.sink = phi ptr [ %11, %62 ], [ %9, %56 ], [ %7, %47 ], [ %5, %38 ], [ %3, %29 ], [ %1, %22 ]
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %57, %56 ], [ %48, %47 ], [ %39, %38 ], [ %30, %29 ], [ %23, %22 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.sink) #4
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #3

declare void @_ZN5LegIK8Vector3DC1Eddd(ptr, double, double, double) local_unnamed_addr

declare void @_ZN5LegIK8PositionC1Edddddd(ptr, double, double, double, double, double, double) local_unnamed_addr

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


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