; LLVM IR from vectozavr/3dzavr :: engine/animation/Animation.ll (ZN9Animation11updateStateEv)

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

@_ZN6ConstsL6BEZIERE = external hidden global [2 x %class.Vec2D], align 16
@.str.17 = external hidden unnamed_addr constant [52 x i8], align 1
@_ZTISt11logic_error = external constant ptr

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9Animation11updateStateEv(ptr noundef nonnull align 8 dereferenceable(72) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  %10 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 3
  %11 = load i8, ptr %10, align 8, !tbaa !9, !range !15, !noundef !16
  %12 = trunc i8 %11 to i1
  br i1 %12, label %18, label %13

13:                                               ; preds = %1
  %14 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 7
  %15 = load double, ptr %14, align 8, !tbaa !17
  %16 = call noundef double @_ZSt3absd(double noundef %15)
  %17 = fcmp olt double %16, 0x3DA5FD7FE1796495
  br i1 %17, label %18, label %20

18:                                               ; preds = %13, %1
  %19 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 3
  store i8 1, ptr %19, align 8, !tbaa !9
  store i1 false, ptr %2, align 1
  br label %115

20:                                               ; preds = %13
  %21 = call noundef double @_ZN4Time9deltaTimeEv()
  %22 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 7
  %23 = load double, ptr %22, align 8, !tbaa !17
  %24 = fdiv double %21, %23
  %25 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 2
  store double %24, ptr %25, align 8, !tbaa !18
  %26 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 9
  %27 = load i32, ptr %26, align 4, !tbaa !19
  switch i32 %27, label %49 [
    i32 1, label %28
    i32 2, label %35
    i32 0, label %42
  ]

28:                                               ; preds = %20
  %29 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  %30 = load double, ptr %29, align 8, !tbaa !20
  %31 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 2
  %32 = load double, ptr %31, align 8, !tbaa !18
  %33 = call noundef double @_ZN13Interpolation7dBezierERK5Vec2DS2_dd(ptr noundef nonnull align 8 dereferenceable(16) @_ZN6ConstsL6BEZIERE, ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds ([2 x %class.Vec2D], ptr @_ZN6ConstsL6BEZIERE, i64 0, i64 1), double noundef %30, double noundef %32)
  %34 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 5
  store double %33, ptr %34, align 8, !tbaa !21
  br label %67

35:                                               ; preds = %20
  %36 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  %37 = load double, ptr %36, align 8, !tbaa !20
  %38 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 2
  %39 = load double, ptr %38, align 8, !tbaa !18
  %40 = call noundef double @_ZN13Interpolation9dBouncingEdd(double noundef %37, double noundef %39)
  %41 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 5
  store double %40, ptr %41, align 8, !tbaa !21
  br label %67

42:                                               ; preds = %20
  %43 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  %44 = load double, ptr %43, align 8, !tbaa !20
  %45 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 2
  %46 = load double, ptr %45, align 8, !tbaa !18
  %47 = call noundef double @_ZN13Interpolation7dLinearEdd(double noundef %44, double noundef %46)
  %48 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 5
  store double %47, ptr %48, align 8, !tbaa !21
  br label %67

49:                                               ; preds = %20
  store i1 true, ptr %8, align 1
  %50 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  %51 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 9
  %52 = load i32, ptr %51, align 4, !tbaa !19
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %5, i32 noundef %52) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %53 unwind label %55

53:                                               ; preds = %49
  invoke void @_ZNSt11logic_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %54 unwind label %59

54:                                               ; preds = %53
  store i1 false, ptr %8, align 1
  invoke void @__cxa_throw(ptr %50, ptr @_ZTISt11logic_error, ptr @_ZNSt11logic_errorD1Ev) #8
          to label %122 unwind label %59

55:                                               ; preds = %49
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %6, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %7, align 4
  br label %63

59:                                               ; preds = %54, %53
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %63

63:                                               ; preds = %59, %55
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  %64 = load i1, ptr %8, align 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  call void @__cxa_free_exception(ptr %50) #7
  br label %66

66:                                               ; preds = %65, %63
  br label %117

67:                                               ; preds = %42, %35, %28
  %68 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  %69 = load double, ptr %68, align 8, !tbaa !20
  %70 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 2
  %71 = load double, ptr %70, align 8, !tbaa !18
  %72 = fadd double %69, %71
  %73 = fcmp ogt double %72, 1.000000e+00
  br i1 %73, label %74, label %86

74:                                               ; preds = %67
  %75 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  %76 = load double, ptr %75, align 8, !tbaa !20
  %77 = fsub double 1.000000e+00, %76
  %78 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 2
  store double %77, ptr %78, align 8, !tbaa !18
  %79 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  store double 1.000000e+00, ptr %79, align 8, !tbaa !20
  %80 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 4
  %81 = load double, ptr %80, align 8, !tbaa !22
  %82 = fsub double 1.000000e+00, %81
  %83 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 5
  store double %82, ptr %83, align 8, !tbaa !21
  %84 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 4
  store double 1.000000e+00, ptr %84, align 8, !tbaa !22
  %85 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 3
  store i8 1, ptr %85, align 8, !tbaa !9
  br label %97

86:                                               ; preds = %67
  %87 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 2
  %88 = load double, ptr %87, align 8, !tbaa !18
  %89 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  %90 = load double, ptr %89, align 8, !tbaa !20
  %91 = fadd double %90, %88
  store double %91, ptr %89, align 8, !tbaa !20
  %92 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 5
  %93 = load double, ptr %92, align 8, !tbaa !21
  %94 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 4
  %95 = load double, ptr %94, align 8, !tbaa !22
  %96 = fadd double %95, %93
  store double %96, ptr %94, align 8, !tbaa !22
  br label %97

97:                                               ; preds = %86, %74
  %98 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 8
  %99 = load i32, ptr %98, align 8, !tbaa !23
  %100 = icmp eq i32 %99, 1
  br i1 %100, label %101, label %107

101:                                              ; preds = %97
  %102 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  %103 = load double, ptr %102, align 8, !tbaa !20
  %104 = fcmp ogt double %103, 5.000000e-01
  br i1 %104, label %105, label %107

105:                                              ; preds = %101
  %106 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 1
  store double 5.000000e-01, ptr %106, align 8, !tbaa !20
  br label %107

107:                                              ; preds = %105, %101, %97
  %108 = load ptr, ptr %9, align 8, !tbaa !24
  %109 = getelementptr inbounds ptr, ptr %108, i64 0
  %110 = load ptr, ptr %109, align 8
  call void %110(ptr noundef nonnull align 8 dereferenceable(72) %9)
  %111 = getelementptr inbounds %class.Animation, ptr %9, i32 0, i32 3
  %112 = load i8, ptr %111, align 8, !tbaa !9, !range !15, !noundef !16
  %113 = trunc i8 %112 to i1
  %114 = xor i1 %113, true
  store i1 %114, ptr %2, align 1
  br label %115

115:                                              ; preds = %107, %18
  %116 = load i1, ptr %2, align 1
  ret i1 %116

117:                                              ; preds = %66
  %118 = load ptr, ptr %6, align 8
  %119 = load i32, ptr %7, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121

122:                                              ; preds = %54
  unreachable
}

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

declare noundef double @_ZN4Time9deltaTimeEv() #4

declare noundef double @_ZN13Interpolation7dBezierERK5Vec2DS2_dd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) #4

declare noundef double @_ZN13Interpolation9dBouncingEdd(double noundef, double noundef) #4

declare noundef double @_ZN13Interpolation7dLinearEdd(double noundef, double noundef) #4

declare ptr @__cxa_allocate_exception(i64)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #3

declare void @_ZNSt11logic_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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 = { 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 = { "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 = { 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 #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

!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, !12, i64 24}
!10 = !{!"_ZTS9Animation", !11, i64 8, !11, i64 16, !12, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !11, i64 56, !13, i64 64, !14, i64 68}
!11 = !{!"double", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSN9Animation7LoopOutE", !7, i64 0}
!14 = !{!"_ZTSN9Animation17InterpolationTypeE", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!10, !11, i64 56}
!18 = !{!10, !11, i64 16}
!19 = !{!10, !14, i64 68}
!20 = !{!10, !11, i64 8}
!21 = !{!10, !11, i64 40}
!22 = !{!10, !11, i64 32}
!23 = !{!10, !13, i64 64}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !8, i64 0}


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

@_ZN6ConstsL6BEZIERE = external hidden global [2 x %class.Vec2D], align 16
@.str.17 = external hidden unnamed_addr constant [52 x i8], align 1
@_ZTISt11logic_error = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9Animation11updateStateEv(ptr noundef nonnull align 8 dereferenceable(72) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i8, ptr %4, align 8, !tbaa !5, !range !13, !noundef !14
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %12, label %7

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  %9 = load double, ptr %8, align 8, !tbaa !15
  %10 = tail call noundef double @_ZSt3absd(double noundef %9)
  %11 = fcmp olt double %10, 0x3DA5FD7FE1796495
  br i1 %11, label %12, label %13

12:                                               ; preds = %7, %1
  store i8 1, ptr %4, align 8, !tbaa !5
  br label %71

13:                                               ; preds = %7
  %14 = tail call noundef double @_ZN4Time9deltaTimeEv()
  %15 = load double, ptr %8, align 8, !tbaa !15
  %16 = fdiv double %14, %15
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  store double %16, ptr %17, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %0, i64 68
  %19 = load i32, ptr %18, align 4, !tbaa !17
  switch i32 %19, label %32 [
    i32 1, label %20
    i32 2, label %24
    i32 0, label %28
  ]

20:                                               ; preds = %13
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = load double, ptr %21, align 8, !tbaa !18
  %23 = tail call noundef double @_ZN13Interpolation7dBezierERK5Vec2DS2_dd(ptr noundef nonnull align 8 dereferenceable(16) @_ZN6ConstsL6BEZIERE, ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @_ZN6ConstsL6BEZIERE, i64 16), double noundef %22, double noundef %16)
  br label %41

24:                                               ; preds = %13
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = load double, ptr %25, align 8, !tbaa !18
  %27 = tail call noundef double @_ZN13Interpolation9dBouncingEdd(double noundef %26, double noundef %16)
  br label %41

28:                                               ; preds = %13
  %29 = getelementptr inbounds i8, ptr %0, i64 8
  %30 = load double, ptr %29, align 8, !tbaa !18
  %31 = tail call noundef double @_ZN13Interpolation7dLinearEdd(double noundef %30, double noundef %16)
  br label %41

32:                                               ; preds = %13
  %33 = tail call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  %34 = load i32, ptr %18, align 4, !tbaa !17
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, i32 noundef %34) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %2, ptr noundef nonnull @.str.17, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %35 unwind label %.thread

35:                                               ; preds = %32
  invoke void @_ZNSt11logic_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %36 unwind label %38

36:                                               ; preds = %35
  invoke void @__cxa_throw(ptr nonnull %33, ptr nonnull @_ZTISt11logic_error, ptr nonnull @_ZNSt11logic_errorD1Ev) #8
          to label %73 unwind label %38

.thread:                                          ; preds = %32
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br label %40

38:                                               ; preds = %35, %36
  %.0 = phi i1 [ false, %36 ], [ true, %35 ]
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br i1 %.0, label %40, label %72

40:                                               ; preds = %.thread, %38
  %.pn13 = phi { ptr, i32 } [ %37, %.thread ], [ %39, %38 ]
  call void @__cxa_free_exception(ptr %33) #7
  br label %72

41:                                               ; preds = %28, %24, %20
  %.sink = phi double [ %31, %28 ], [ %27, %24 ], [ %23, %20 ]
  %42 = getelementptr inbounds i8, ptr %0, i64 40
  store double %.sink, ptr %42, align 8, !tbaa !19
  %43 = getelementptr inbounds i8, ptr %0, i64 8
  %44 = load double, ptr %43, align 8, !tbaa !18
  %45 = load double, ptr %17, align 8, !tbaa !16
  %46 = fadd double %44, %45
  %47 = fcmp ogt double %46, 1.000000e+00
  br i1 %47, label %48, label %54

48:                                               ; preds = %41
  %49 = fsub double 1.000000e+00, %44
  store double %49, ptr %17, align 8, !tbaa !16
  store double 1.000000e+00, ptr %43, align 8, !tbaa !18
  %50 = getelementptr inbounds i8, ptr %0, i64 32
  %51 = load double, ptr %50, align 8, !tbaa !20
  %52 = fsub double 1.000000e+00, %51
  %53 = getelementptr inbounds i8, ptr %0, i64 40
  store double %52, ptr %53, align 8, !tbaa !19
  store double 1.000000e+00, ptr %50, align 8, !tbaa !20
  store i8 1, ptr %4, align 8, !tbaa !5
  br label %59

54:                                               ; preds = %41
  store double %46, ptr %43, align 8, !tbaa !18
  %55 = getelementptr inbounds i8, ptr %0, i64 32
  %56 = load double, ptr %55, align 8, !tbaa !20
  %57 = fadd double %.sink, %56
  store double %57, ptr %55, align 8, !tbaa !20
  %58 = fcmp ogt double %46, 5.000000e-01
  br label %59

59:                                               ; preds = %54, %48
  %60 = phi i1 [ %58, %54 ], [ true, %48 ]
  %61 = getelementptr inbounds i8, ptr %0, i64 64
  %62 = load i32, ptr %61, align 8, !tbaa !21
  %63 = icmp eq i32 %62, 1
  %or.cond = and i1 %63, %60
  br i1 %or.cond, label %64, label %65

64:                                               ; preds = %59
  store double 5.000000e-01, ptr %43, align 8, !tbaa !18
  br label %65

65:                                               ; preds = %64, %59
  %66 = load ptr, ptr %0, align 8, !tbaa !22
  %67 = load ptr, ptr %66, align 8
  tail call void %67(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %68 = load i8, ptr %4, align 8, !tbaa !5, !range !13, !noundef !14
  %69 = trunc nuw i8 %68 to i1
  %70 = xor i1 %69, true
  br label %71

71:                                               ; preds = %65, %12
  %.06 = phi i1 [ false, %12 ], [ %70, %65 ]
  ret i1 %.06

72:                                               ; preds = %38, %40
  %.pn12 = phi { ptr, i32 } [ %39, %38 ], [ %.pn13, %40 ]
  resume { ptr, i32 } %.pn12

73:                                               ; preds = %36
  unreachable
}

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

declare noundef double @_ZN4Time9deltaTimeEv() local_unnamed_addr #4

declare noundef double @_ZN13Interpolation7dBezierERK5Vec2DS2_dd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) local_unnamed_addr #4

declare noundef double @_ZN13Interpolation9dBouncingEdd(double noundef, double noundef) local_unnamed_addr #4

declare noundef double @_ZN13Interpolation7dLinearEdd(double noundef, double noundef) local_unnamed_addr #4

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #3

declare void @_ZNSt11logic_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

attributes #0 = { mustprogress 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 = { 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 = { "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 = { 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 #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

!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, !10, i64 24}
!6 = !{!"_ZTS9Animation", !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !11, i64 64, !12, i64 68}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN9Animation7LoopOutE", !8, i64 0}
!12 = !{!"_ZTSN9Animation17InterpolationTypeE", !8, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!6, !7, i64 56}
!16 = !{!6, !7, i64 16}
!17 = !{!6, !12, i64 68}
!18 = !{!6, !7, i64 8}
!19 = !{!6, !7, i64 40}
!20 = !{!6, !7, i64 32}
!21 = !{!6, !11, i64 64}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !9, i64 0}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass