; LLVM IR from aap/librw :: src/hanim.ll (ZN2rw14HAnimHierarchy6createEiPiS1_ii)

; 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::HAnimHierarchy" = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.rw::HAnimNodeInfo" = type { i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [72 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [72 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw14HAnimHierarchy6createEiPiS1_ii(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) #0 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.rw::Error", align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 %0, ptr %7, align 4, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %16 = call noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef 56, i32 noundef 196894, ptr noundef @.str)
  store ptr %16, ptr %12, align 8, !tbaa !9
  %17 = load ptr, ptr %12, align 8, !tbaa !9
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %30

19:                                               ; preds = %5
  br label %20

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %21 = getelementptr inbounds %"struct.rw::Error", ptr %13, i32 0, i32 0
  store i32 286, ptr %21, align 4, !tbaa !11
  %22 = getelementptr inbounds %"struct.rw::Error", ptr %13, i32 0, i32 1
  store i32 -2147483646, ptr %22, align 4, !tbaa !13
  %23 = load ptr, ptr @stderr, align 8, !tbaa !9
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 35) #5
  %25 = load ptr, ptr @stderr, align 8, !tbaa !9
  %26 = call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483646, i64 noundef 56)
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.3, ptr noundef %26) #5
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %28

28:                                               ; preds = %20
  br label %29

29:                                               ; preds = %28
  store ptr null, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %161

30:                                               ; preds = %5
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = load i32, ptr %11, align 4, !tbaa !5
  %33 = call noundef ptr @_ZN2rw16AnimInterpolator6createEii(i32 noundef %31, i32 noundef %32)
  %34 = load ptr, ptr %12, align 8, !tbaa !9
  %35 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %34, i32 0, i32 7
  store ptr %33, ptr %35, align 8, !tbaa !14
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !9
  %38 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %37, i32 0, i32 1
  store i32 %36, ptr %38, align 4, !tbaa !16
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = load ptr, ptr %12, align 8, !tbaa !9
  %41 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %40, i32 0, i32 0
  store i32 %39, ptr %41, align 8, !tbaa !17
  %42 = load ptr, ptr %12, align 8, !tbaa !9
  %43 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %42, i32 0, i32 5
  store ptr null, ptr %43, align 8, !tbaa !18
  %44 = load ptr, ptr %12, align 8, !tbaa !9
  %45 = load ptr, ptr %12, align 8, !tbaa !9
  %46 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %45, i32 0, i32 6
  store ptr %44, ptr %46, align 8, !tbaa !19
  %47 = load ptr, ptr %12, align 8, !tbaa !9
  %48 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !17
  %50 = and i32 %49, 2
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %57

52:                                               ; preds = %30
  %53 = load ptr, ptr %12, align 8, !tbaa !9
  %54 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %53, i32 0, i32 2
  store ptr null, ptr %54, align 8, !tbaa !20
  %55 = load ptr, ptr %12, align 8, !tbaa !9
  %56 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %55, i32 0, i32 3
  store ptr null, ptr %56, align 8, !tbaa !21
  br label %76

57:                                               ; preds = %30
  %58 = load ptr, ptr %12, align 8, !tbaa !9
  %59 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !16
  %61 = mul nsw i32 %60, 64
  %62 = add nsw i32 %61, 15
  %63 = sext i32 %62 to i64
  %64 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %63, i32 noundef 196894, ptr noundef @.str.4)
  %65 = load ptr, ptr %12, align 8, !tbaa !9
  %66 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %65, i32 0, i32 3
  store ptr %64, ptr %66, align 8, !tbaa !21
  %67 = load ptr, ptr %12, align 8, !tbaa !9
  %68 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %67, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !21
  %70 = ptrtoint ptr %69 to i64
  %71 = add i64 %70, 15
  %72 = and i64 %71, -16
  %73 = inttoptr i64 %72 to ptr
  %74 = load ptr, ptr %12, align 8, !tbaa !9
  %75 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %74, i32 0, i32 2
  store ptr %73, ptr %75, align 8, !tbaa !20
  br label %76

76:                                               ; preds = %57, %52
  %77 = load ptr, ptr %12, align 8, !tbaa !9
  %78 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !16
  %80 = sext i32 %79 to i64
  %81 = mul i64 %80, 24
  %82 = call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %81, i32 noundef 196894, ptr noundef @.str.5)
  %83 = load ptr, ptr %12, align 8, !tbaa !9
  %84 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %83, i32 0, i32 4
  store ptr %82, ptr %84, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %156, %76
  %86 = load i32, ptr %15, align 4, !tbaa !5
  %87 = load ptr, ptr %12, align 8, !tbaa !9
  %88 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !16
  %90 = icmp slt i32 %86, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %85
  store i32 4, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %159

92:                                               ; preds = %85
  %93 = load ptr, ptr %9, align 8, !tbaa !9
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %108

95:                                               ; preds = %92
  %96 = load ptr, ptr %9, align 8, !tbaa !9
  %97 = load i32, ptr %15, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = load ptr, ptr %12, align 8, !tbaa !9
  %102 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %101, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !22
  %104 = load i32, ptr %15, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %103, i64 %105
  %107 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %106, i32 0, i32 0
  store i32 %100, ptr %107, align 8, !tbaa !23
  br label %116

108:                                              ; preds = %92
  %109 = load ptr, ptr %12, align 8, !tbaa !9
  %110 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %109, i32 0, i32 4
  %111 = load ptr, ptr %110, align 8, !tbaa !22
  %112 = load i32, ptr %15, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %111, i64 %113
  %115 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %114, i32 0, i32 0
  store i32 0, ptr %115, align 8, !tbaa !23
  br label %116

116:                                              ; preds = %108, %95
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = load ptr, ptr %12, align 8, !tbaa !9
  %119 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !22
  %121 = load i32, ptr %15, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %120, i64 %122
  %124 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %123, i32 0, i32 1
  store i32 %117, ptr %124, align 4, !tbaa !25
  %125 = load ptr, ptr %8, align 8, !tbaa !9
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %140

127:                                              ; preds = %116
  %128 = load ptr, ptr %8, align 8, !tbaa !9
  %129 = load i32, ptr %15, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %128, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = load ptr, ptr %12, align 8, !tbaa !9
  %134 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %133, i32 0, i32 4
  %135 = load ptr, ptr %134, align 8, !tbaa !22
  %136 = load i32, ptr %15, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %135, i64 %137
  %139 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %138, i32 0, i32 2
  store i32 %132, ptr %139, align 8, !tbaa !26
  br label %148

140:                                              ; preds = %116
  %141 = load ptr, ptr %12, align 8, !tbaa !9
  %142 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %141, i32 0, i32 4
  %143 = load ptr, ptr %142, align 8, !tbaa !22
  %144 = load i32, ptr %15, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %143, i64 %145
  %147 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %146, i32 0, i32 2
  store i32 0, ptr %147, align 8, !tbaa !26
  br label %148

148:                                              ; preds = %140, %127
  %149 = load ptr, ptr %12, align 8, !tbaa !9
  %150 = getelementptr inbounds %"struct.rw::HAnimHierarchy", ptr %149, i32 0, i32 4
  %151 = load ptr, ptr %150, align 8, !tbaa !22
  %152 = load i32, ptr %15, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %151, i64 %153
  %155 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %154, i32 0, i32 3
  store ptr null, ptr %155, align 8, !tbaa !27
  br label %156

156:                                              ; preds = %148
  %157 = load i32, ptr %15, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %15, align 4, !tbaa !5
  br label %85, !llvm.loop !28

159:                                              ; preds = %91
  %160 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %160, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %161

161:                                              ; preds = %159, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %162 = load ptr, ptr %6, align 8
  ret ptr %162
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) #2

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

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

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) #4

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

declare noundef ptr @_ZN2rw16AnimInterpolator6createEii(i32 noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN2rw5ErrorE", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = !{!15, !10, i64 48}
!15 = !{!"_ZTSN2rw14HAnimHierarchyE", !6, i64 0, !6, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!16 = !{!15, !6, i64 4}
!17 = !{!15, !6, i64 0}
!18 = !{!15, !10, i64 32}
!19 = !{!15, !10, i64 40}
!20 = !{!15, !10, i64 8}
!21 = !{!15, !10, i64 16}
!22 = !{!15, !10, i64 24}
!23 = !{!24, !6, i64 0}
!24 = !{!"_ZTSN2rw13HAnimNodeInfoE", !6, i64 0, !6, i64 4, !6, i64 8, !10, i64 16}
!25 = !{!24, !6, i64 4}
!26 = !{!24, !6, i64 8}
!27 = !{!24, !10, i64 16}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


; 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 }
%"struct.rw::HAnimNodeInfo" = type { i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [72 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [72 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN2rw14HAnimHierarchy6createEiPiS1_ii(i32 noundef %0, ptr noundef readonly %1, ptr noundef readonly %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 align 2 {
  %6 = alloca %"struct.rw::Error", align 4
  %7 = tail call noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef 56, i32 noundef 196894, ptr noundef nonnull @.str)
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %16

9:                                                ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i32 286, ptr %6, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 -2147483646, ptr %10, align 4, !tbaa !10
  %11 = load ptr, ptr @stderr, align 8, !tbaa !11
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 35) #6
  %13 = load ptr, ptr @stderr, align 8, !tbaa !11
  %14 = tail call noundef ptr (i32, ...) @_ZN2rw9dbgsprintEjz(i32 noundef -2147483646, i64 noundef 56)
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.3, ptr noundef %14) #6
  call void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef nonnull %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %.loopexit

16:                                               ; preds = %5
  %17 = tail call noundef ptr @_ZN2rw16AnimInterpolator6createEii(i32 noundef %0, i32 noundef %4)
  %18 = getelementptr inbounds i8, ptr %7, i64 48
  store ptr %17, ptr %18, align 8, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %7, i64 4
  store i32 %0, ptr %19, align 4, !tbaa !15
  store i32 %3, ptr %7, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %7, i64 32
  store ptr null, ptr %20, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %7, i64 40
  store ptr %7, ptr %21, align 8, !tbaa !18
  %22 = and i32 %3, 2
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %23, label %32

23:                                               ; preds = %16
  %24 = shl nsw i32 %0, 6
  %25 = or disjoint i32 %24, 15
  %26 = sext i32 %25 to i64
  %27 = tail call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %26, i32 noundef 196894, ptr noundef nonnull @.str.4)
  %28 = ptrtoint ptr %27 to i64
  %29 = add i64 %28, 15
  %30 = and i64 %29, -16
  %31 = inttoptr i64 %30 to ptr
  %.pre = load i32, ptr %19, align 4, !tbaa !15
  br label %32

32:                                               ; preds = %16, %23
  %33 = phi i32 [ %.pre, %23 ], [ %0, %16 ]
  %.sink70 = phi ptr [ %27, %23 ], [ null, %16 ]
  %.sink = phi ptr [ %31, %23 ], [ null, %16 ]
  %34 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr %.sink70, ptr %34, align 8
  %35 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %.sink, ptr %35, align 8
  %36 = sext i32 %33 to i64
  %37 = mul nsw i64 %36, 24
  %38 = tail call noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef %37, i32 noundef 196894, ptr noundef nonnull @.str.5)
  %39 = getelementptr inbounds i8, ptr %7, i64 24
  store ptr %38, ptr %39, align 8, !tbaa !19
  %40 = load i32, ptr %19, align 4, !tbaa !15
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %32
  %.not47 = icmp eq ptr %2, null
  %.not48 = icmp eq ptr %1, null
  %wide.trip.count68 = zext nneg i32 %40 to i64
  br i1 %.not47, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  br i1 %.not48, label %.lr.ph.split.us.split.us.preheader, label %.lr.ph.split.us.split

.lr.ph.split.us.split.us.preheader:               ; preds = %.lr.ph.split.us
  %xtraiter = and i64 %wide.trip.count68, 1
  %42 = icmp eq i32 %40, 1
  br i1 %42, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.split.us.split.us.preheader.new

.lr.ph.split.us.split.us.preheader.new:           ; preds = %.lr.ph.split.us.split.us.preheader
  %unroll_iter = and i64 %wide.trip.count68, 2147483646
  br label %.lr.ph.split.us.split.us

.lr.ph.split.us.split.us:                         ; preds = %.lr.ph.split.us.split.us, %.lr.ph.split.us.split.us.preheader.new
  %indvars.iv65 = phi i64 [ 0, %.lr.ph.split.us.split.us.preheader.new ], [ %indvars.iv.next66.1, %.lr.ph.split.us.split.us ]
  %niter = phi i64 [ 0, %.lr.ph.split.us.split.us.preheader.new ], [ %niter.next.1, %.lr.ph.split.us.split.us ]
  %43 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv65
  store i32 0, ptr %43, align 8, !tbaa !20
  %44 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv65, i32 1
  %45 = trunc nuw nsw i64 %indvars.iv65 to i32
  store i32 %45, ptr %44, align 4, !tbaa !22
  %46 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv65, i32 2
  store i32 0, ptr %46, align 8, !tbaa !23
  %47 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv65, i32 3
  store ptr null, ptr %47, align 8, !tbaa !24
  %indvars.iv.next66 = or disjoint i64 %indvars.iv65, 1
  %48 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv.next66
  store i32 0, ptr %48, align 8, !tbaa !20
  %49 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv.next66, i32 1
  %50 = trunc nuw nsw i64 %indvars.iv.next66 to i32
  store i32 %50, ptr %49, align 4, !tbaa !22
  %51 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv.next66, i32 2
  store i32 0, ptr %51, align 8, !tbaa !23
  %52 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv.next66, i32 3
  store ptr null, ptr %52, align 8, !tbaa !24
  %indvars.iv.next66.1 = add nuw nsw i64 %indvars.iv65, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph.split.us.split.us, !llvm.loop !25

.lr.ph.split.us.split:                            ; preds = %.lr.ph.split.us, %.lr.ph.split.us.split
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %.lr.ph.split.us.split ], [ 0, %.lr.ph.split.us ]
  %53 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv60
  store i32 0, ptr %53, align 8, !tbaa !20
  %54 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv60, i32 1
  %55 = trunc nuw nsw i64 %indvars.iv60 to i32
  store i32 %55, ptr %54, align 4, !tbaa !22
  %56 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv60
  %57 = load i32, ptr %56, align 4, !tbaa !27
  %58 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv60, i32 2
  store i32 %57, ptr %58, align 8, !tbaa !23
  %59 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv60, i32 3
  store ptr null, ptr %59, align 8, !tbaa !24
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond64.not = icmp eq i64 %indvars.iv.next61, %wide.trip.count68
  br i1 %exitcond64.not, label %.loopexit, label %.lr.ph.split.us.split, !llvm.loop !25

.lr.ph.split:                                     ; preds = %.lr.ph
  br i1 %.not48, label %.lr.ph.split.split.us, label %.lr.ph.split.split

.lr.ph.split.split.us:                            ; preds = %.lr.ph.split, %.lr.ph.split.split.us
  %indvars.iv55 = phi i64 [ %indvars.iv.next56, %.lr.ph.split.split.us ], [ 0, %.lr.ph.split ]
  %60 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv55
  %61 = load i32, ptr %60, align 4, !tbaa !27
  %62 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv55
  store i32 %61, ptr %62, align 8, !tbaa !20
  %63 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv55, i32 1
  %64 = trunc nuw nsw i64 %indvars.iv55 to i32
  store i32 %64, ptr %63, align 4, !tbaa !22
  %65 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv55, i32 2
  store i32 0, ptr %65, align 8, !tbaa !23
  %66 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv55, i32 3
  store ptr null, ptr %66, align 8, !tbaa !24
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next56, %wide.trip.count68
  br i1 %exitcond59.not, label %.loopexit, label %.lr.ph.split.split.us, !llvm.loop !25

.lr.ph.split.split:                               ; preds = %.lr.ph.split, %.lr.ph.split.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split.split ], [ 0, %.lr.ph.split ]
  %67 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv
  %68 = load i32, ptr %67, align 4, !tbaa !27
  %69 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv
  store i32 %68, ptr %69, align 8, !tbaa !20
  %70 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv, i32 1
  %71 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %71, ptr %70, align 4, !tbaa !22
  %72 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  %73 = load i32, ptr %72, align 4, !tbaa !27
  %74 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv, i32 2
  store i32 %73, ptr %74, align 8, !tbaa !23
  %75 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv, i32 3
  store ptr null, ptr %75, align 8, !tbaa !24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count68
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph.split.split, !llvm.loop !25

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph.split.us.split.us, %.lr.ph.split.us.split.us.preheader
  %indvars.iv65.unr = phi i64 [ 0, %.lr.ph.split.us.split.us.preheader ], [ %indvars.iv.next66.1, %.lr.ph.split.us.split.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph.split.us.split.us.epil

.lr.ph.split.us.split.us.epil:                    ; preds = %.loopexit.loopexit.unr-lcssa
  %76 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv65.unr
  store i32 0, ptr %76, align 8, !tbaa !20
  %77 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv65.unr, i32 1
  %78 = trunc nuw nsw i64 %indvars.iv65.unr to i32
  store i32 %78, ptr %77, align 4, !tbaa !22
  %79 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv65.unr, i32 2
  store i32 0, ptr %79, align 8, !tbaa !23
  %80 = getelementptr inbounds %"struct.rw::HAnimNodeInfo", ptr %38, i64 %indvars.iv65.unr, i32 3
  store ptr null, ptr %80, align 8, !tbaa !24
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph.split.split, %.lr.ph.split.split.us, %.lr.ph.split.us.split, %.lr.ph.split.us.split.us.epil, %.loopexit.loopexit.unr-lcssa, %32, %9
  ret ptr %7
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw10malloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

declare void @_ZN2rw8setErrorEPNS_5ErrorE(ptr noundef) local_unnamed_addr #4

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

declare noundef ptr @_ZN2rw16AnimInterpolator6createEii(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN2rw14mustmalloc_LOCEmjPKc(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = { 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 = !{!"_ZTSN2rw5ErrorE", !7, i64 0, !7, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !12, i64 48}
!14 = !{!"_ZTSN2rw14HAnimHierarchyE", !7, i64 0, !7, i64 4, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48}
!15 = !{!14, !7, i64 4}
!16 = !{!14, !7, i64 0}
!17 = !{!14, !12, i64 32}
!18 = !{!14, !12, i64 40}
!19 = !{!14, !12, i64 24}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTSN2rw13HAnimNodeInfoE", !7, i64 0, !7, i64 4, !7, i64 8, !12, i64 16}
!22 = !{!21, !7, i64 4}
!23 = !{!21, !7, i64 8}
!24 = !{!21, !12, i64 16}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass