; LLVM IR from aap/librw :: src/anim.ll (ZN2rw16AnimInterpolator14setCurrentAnimEPNS_9AnimationE)

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

%"struct.rw::Error" = type { i32, i32 }
%"struct.rw::Animation" = type { ptr, i32, i32, float, ptr, ptr }
%"struct.rw::AnimInterpolator" = type { ptr, float, ptr, i32, i32, i32, i32, ptr, ptr, ptr, ptr }
%"struct.rw::AnimInterpolatorInfo" = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.rw::InterpFrameHeader" = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [56 x i8], align 1
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 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

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

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

declare noundef ptr @_ZN2rw9dbgsprintEjz(i32 noundef, ...) #2

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN2rw16AnimInterpolator14setCurrentAnimEPNS_9AnimationE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1) #3 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.rw::Error", align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.rw::Animation", ptr %15, i32 0, i32 0
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  store ptr %17, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 0
  store ptr %18, ptr %19, align 8, !tbaa !13
  %20 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 1
  store float 0.000000e+00, ptr %20, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %21 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 3
  %22 = load i32, ptr %21, align 8, !tbaa !16
  store i32 %22, ptr %8, align 4, !tbaa !17
  %23 = load i32, ptr %8, align 4, !tbaa !17
  %24 = add nsw i32 %23, 16
  store i32 %24, ptr %8, align 4, !tbaa !17
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.rw::AnimInterpolatorInfo", ptr %25, i32 0, i32 1
  %27 = load i32, ptr %26, align 4, !tbaa !18
  %28 = load i32, ptr %8, align 4, !tbaa !17
  %29 = icmp sgt i32 %27, %28
  br i1 %29, label %30, label %41

30:                                               ; preds = %2
  br label %31

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %32 = getelementptr inbounds %"struct.rw::Error", ptr %9, i32 0, i32 0
  store i32 27, ptr %32, align 4, !tbaa !20
  %33 = getelementptr inbounds %"struct.rw::Error", ptr %9, i32 0, i32 1
  store i32 -2147483647, ptr %33, align 4, !tbaa !22
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 230) #5
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483647, ptr noundef @.str.7)
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.4, ptr noundef %37) #5
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %39

39:                                               ; preds = %31
  br label %40

40:                                               ; preds = %39
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %109

41:                                               ; preds = %2
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.rw::AnimInterpolatorInfo", ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !18
  %45 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 4
  store i32 %44, ptr %45, align 4, !tbaa !23
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.rw::AnimInterpolatorInfo", ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 8, !tbaa !24
  %49 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 5
  store i32 %48, ptr %49, align 8, !tbaa !25
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.rw::AnimInterpolatorInfo", ptr %50, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !26
  %53 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 7
  store ptr %52, ptr %53, align 8, !tbaa !27
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.rw::AnimInterpolatorInfo", ptr %54, i32 0, i32 5
  %56 = load ptr, ptr %55, align 8, !tbaa !28
  %57 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 8
  store ptr %56, ptr %57, align 8, !tbaa !29
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.rw::AnimInterpolatorInfo", ptr %58, i32 0, i32 6
  %60 = load ptr, ptr %59, align 8, !tbaa !30
  %61 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 9
  store ptr %60, ptr %61, align 8, !tbaa !31
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.rw::AnimInterpolatorInfo", ptr %62, i32 0, i32 7
  %64 = load ptr, ptr %63, align 8, !tbaa !32
  %65 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 10
  store ptr %64, ptr %65, align 8, !tbaa !33
  store i32 0, ptr %6, align 4, !tbaa !17
  br label %66

66:                                               ; preds = %100, %41
  %67 = load i32, ptr %6, align 4, !tbaa !17
  %68 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 6
  %69 = load i32, ptr %68, align 4, !tbaa !34
  %70 = icmp slt i32 %67, %69
  br i1 %70, label %71, label %103

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %72 = load i32, ptr %6, align 4, !tbaa !17
  %73 = call noundef ptr @_ZN2rw16AnimInterpolator14getInterpFrameEi(ptr noundef nonnull align 8 dereferenceable(72) %14, i32 noundef %72)
  store ptr %73, ptr %11, align 8, !tbaa !5
  %74 = load i32, ptr %6, align 4, !tbaa !17
  %75 = call noundef ptr @_ZN2rw16AnimInterpolator12getAnimFrameEi(ptr noundef nonnull align 8 dereferenceable(72) %14, i32 noundef %74)
  store ptr %75, ptr %12, align 8, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !17
  %77 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 6
  %78 = load i32, ptr %77, align 4, !tbaa !34
  %79 = add nsw i32 %76, %78
  %80 = call noundef ptr @_ZN2rw16AnimInterpolator12getAnimFrameEi(ptr noundef nonnull align 8 dereferenceable(72) %14, i32 noundef %79)
  store ptr %80, ptr %13, align 8, !tbaa !5
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.rw::InterpFrameHeader", ptr %82, i32 0, i32 0
  store ptr %81, ptr %83, align 8, !tbaa !35
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.rw::InterpFrameHeader", ptr %85, i32 0, i32 1
  store ptr %84, ptr %86, align 8, !tbaa !37
  %87 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 9
  %88 = load ptr, ptr %87, align 8, !tbaa !31
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %99

90:                                               ; preds = %71
  %91 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 9
  %92 = load ptr, ptr %91, align 8, !tbaa !31
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.rw::Animation", ptr %96, i32 0, i32 5
  %98 = load ptr, ptr %97, align 8, !tbaa !38
  call void %92(ptr noundef %93, ptr noundef %94, ptr noundef %95, float noundef 0.000000e+00, ptr noundef %98)
  br label %99

99:                                               ; preds = %90, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %6, align 4, !tbaa !17
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %6, align 4, !tbaa !17
  br label %66, !llvm.loop !39

103:                                              ; preds = %66
  %104 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 6
  %105 = load i32, ptr %104, align 4, !tbaa !34
  %106 = mul nsw i32 %105, 2
  %107 = call noundef ptr @_ZN2rw16AnimInterpolator12getAnimFrameEi(ptr noundef nonnull align 8 dereferenceable(72) %14, i32 noundef %106)
  %108 = getelementptr inbounds %"struct.rw::AnimInterpolator", ptr %14, i32 0, i32 2
  store ptr %107, ptr %108, align 8, !tbaa !41
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %109

109:                                              ; preds = %103, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %110 = load i32, ptr %3, align 4
  ret i32 %110
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw16AnimInterpolator14getInterpFrameEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw16AnimInterpolator12getAnimFrameEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN2rw9AnimationE", !6, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !6, i64 24, !6, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN2rw16AnimInterpolatorE", !6, i64 0, !12, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!15 = !{!14, !12, i64 8}
!16 = !{!14, !11, i64 24}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !11, i64 4}
!19 = !{!"_ZTSN2rw20AnimInterpolatorInfoE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!20 = !{!21, !11, i64 0}
!21 = !{!"_ZTSN2rw5ErrorE", !11, i64 0, !11, i64 4}
!22 = !{!21, !11, i64 4}
!23 = !{!14, !11, i64 28}
!24 = !{!19, !11, i64 8}
!25 = !{!14, !11, i64 32}
!26 = !{!19, !6, i64 16}
!27 = !{!14, !6, i64 40}
!28 = !{!19, !6, i64 24}
!29 = !{!14, !6, i64 48}
!30 = !{!19, !6, i64 32}
!31 = !{!14, !6, i64 56}
!32 = !{!19, !6, i64 40}
!33 = !{!14, !6, i64 64}
!34 = !{!14, !11, i64 36}
!35 = !{!36, !6, i64 0}
!36 = !{!"_ZTSN2rw17InterpFrameHeaderE", !6, i64 0, !6, i64 8}
!37 = !{!36, !6, i64 8}
!38 = !{!10, !6, i64 32}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!14, !6, i64 16}


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

%"struct.rw::Error" = type { i32, i32 }

@.str.1 = external hidden unnamed_addr constant [56 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

declare noundef ptr @_ZN2rw9dbgsprintEjz(i32 noundef, ...) local_unnamed_addr #2

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN2rw16AnimInterpolator14setCurrentAnimEPNS_9AnimationE(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef %1) local_unnamed_addr #3 align 2 {
  %3 = alloca %"struct.rw::Error", align 4
  %4 = load ptr, ptr %1, align 8, !tbaa !5
  store ptr %1, ptr %0, align 8, !tbaa !12
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  store float 0.000000e+00, ptr %5, align 8, !tbaa !14
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = load i32, ptr %6, align 8, !tbaa !15
  %8 = add nsw i32 %7, 16
  %9 = getelementptr inbounds i8, ptr %4, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !16
  %11 = icmp sgt i32 %10, %8
  br i1 %11, label %12, label %19

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i32 27, ptr %3, align 4, !tbaa !18
  %13 = getelementptr inbounds i8, ptr %3, i64 4
  store i32 -2147483647, ptr %13, align 4, !tbaa !20
  %14 = load ptr, ptr @stderr, align 8, !tbaa !21
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 230) #6
  %16 = load ptr, ptr @stderr, align 8, !tbaa !21
  %17 = tail call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483647, ptr noundef nonnull @.str.7)
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.4, ptr noundef %17) #6
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %51

19:                                               ; preds = %2
  %20 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 %10, ptr %20, align 4, !tbaa !22
  %21 = getelementptr inbounds i8, ptr %4, i64 8
  %22 = load i32, ptr %21, align 8, !tbaa !23
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %22, ptr %23, align 8, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %4, i64 16
  %25 = getelementptr inbounds i8, ptr %0, i64 40
  %26 = load <2 x ptr>, ptr %24, align 8, !tbaa !21
  store <2 x ptr> %26, ptr %25, align 8, !tbaa !21
  %27 = getelementptr inbounds i8, ptr %4, i64 32
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  %29 = load <2 x ptr>, ptr %27, align 8, !tbaa !21
  store <2 x ptr> %29, ptr %28, align 8, !tbaa !21
  %30 = getelementptr inbounds i8, ptr %0, i64 36
  %31 = load i32, ptr %30, align 4, !tbaa !25
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %19
  %33 = getelementptr inbounds i8, ptr %1, i64 32
  br label %34

34:                                               ; preds = %.lr.ph, %44
  %.02529 = phi i32 [ 0, %.lr.ph ], [ %45, %44 ]
  %35 = tail call noundef ptr @_ZN2rw16AnimInterpolator14getInterpFrameEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %.02529)
  %36 = tail call noundef ptr @_ZN2rw16AnimInterpolator12getAnimFrameEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %.02529)
  %37 = load i32, ptr %30, align 4, !tbaa !25
  %38 = add nsw i32 %37, %.02529
  %39 = tail call noundef ptr @_ZN2rw16AnimInterpolator12getAnimFrameEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %38)
  store ptr %36, ptr %35, align 8, !tbaa !26
  %40 = getelementptr inbounds i8, ptr %35, i64 8
  store ptr %39, ptr %40, align 8, !tbaa !28
  %41 = load ptr, ptr %28, align 8, !tbaa !29
  %.not = icmp eq ptr %41, null
  br i1 %.not, label %44, label %42

42:                                               ; preds = %34
  %43 = load ptr, ptr %33, align 8, !tbaa !30
  tail call void %41(ptr noundef nonnull %35, ptr noundef %36, ptr noundef %39, float noundef 0.000000e+00, ptr noundef %43)
  br label %44

44:                                               ; preds = %42, %34
  %45 = add nuw nsw i32 %.02529, 1
  %46 = load i32, ptr %30, align 4, !tbaa !25
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %34, label %._crit_edge, !llvm.loop !31

._crit_edge:                                      ; preds = %44, %19
  %.lcssa = phi i32 [ %31, %19 ], [ %46, %44 ]
  %48 = shl nsw i32 %.lcssa, 1
  %49 = tail call noundef ptr @_ZN2rw16AnimInterpolator12getAnimFrameEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %48)
  %50 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %49, ptr %50, align 8, !tbaa !33
  br label %51

51:                                               ; preds = %._crit_edge, %12
  %.0 = phi i32 [ 0, %12 ], [ 1, %._crit_edge ]
  ret i32 %.0
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw16AnimInterpolator14getInterpFrameEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2rw16AnimInterpolator12getAnimFrameEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 }
attributes #6 = { cold 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, !7, i64 0}
!6 = !{!"_ZTSN2rw9AnimationE", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !7, i64 24, !7, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"_ZTSN2rw16AnimInterpolatorE", !7, i64 0, !11, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!14 = !{!13, !11, i64 8}
!15 = !{!13, !10, i64 24}
!16 = !{!17, !10, i64 4}
!17 = !{!"_ZTSN2rw20AnimInterpolatorInfoE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSN2rw5ErrorE", !10, i64 0, !10, i64 4}
!20 = !{!19, !10, i64 4}
!21 = !{!7, !7, i64 0}
!22 = !{!13, !10, i64 28}
!23 = !{!17, !10, i64 8}
!24 = !{!13, !10, i64 32}
!25 = !{!13, !10, i64 36}
!26 = !{!27, !7, i64 0}
!27 = !{!"_ZTSN2rw17InterpFrameHeaderE", !7, i64 0, !7, i64 8}
!28 = !{!27, !7, i64 8}
!29 = !{!13, !7, i64 56}
!30 = !{!6, !7, i64 32}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!13, !7, i64 16}


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