; LLVM IR from awawa-dev/HyperHDR :: sources/effects (Animation_Swirl)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.Animation_Swirl::SwirlGradient" = type { [5 x i8] }
%"struct.Animation_Swirl::SwirlColor" = type { [4 x i8] }

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15Animation_Swirl13buildGradientERSt6vectorINS_13SwirlGradientESaIS1_EEbS0_INS_10SwirlColorESaIS5_EEb(ptr noundef nonnull align 8 dereferenceable(224) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i1 noundef zeroext %2, ptr noundef %3, i1 noundef zeroext %4) #2 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca %"struct.Animation_Swirl::SwirlGradient", align 1
  %19 = alloca i8, align 1
  %20 = alloca %"struct.Animation_Swirl::SwirlColor", align 1
  %21 = alloca %"struct.Animation_Swirl::SwirlGradient", align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  %22 = zext i1 %2 to i8
  store i8 %22, ptr %8, align 1, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  %23 = zext i1 %4 to i8
  store i8 %23, ptr %10, align 1, !tbaa !9
  %24 = load ptr, ptr %6, align 8
  %25 = call noundef i64 @_ZNKSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %26 = icmp ugt i64 %25, 1
  br i1 %26, label %27, label %115

27:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %28 = call noundef i64 @_ZNKSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %29 = udiv i64 255, %28
  %30 = trunc i64 %29 to i32
  store i32 %30, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr %3, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = call ptr @_ZNSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  %35 = call ptr @_ZNSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  %36 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %35, ptr %36, align 8
  br label %37

37:                                               ; preds = %81, %27
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %38, label %40, label %39

39:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %83

40:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %41 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  store ptr %41, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  store i8 -1, ptr %17, align 1, !tbaa !13
  %42 = load i8, ptr %8, align 1, !tbaa !9, !range !14, !noundef !15
  %43 = trunc i8 %42 to i1
  br i1 %43, label %44, label %52

44:                                               ; preds = %40
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.Animation_Swirl::SwirlColor", ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds [4 x i8], ptr %46, i64 0, i64 3
  %48 = load i8, ptr %47, align 1, !tbaa !13
  %49 = zext i8 %48 to i32
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %44
  store i8 0, ptr %17, align 1, !tbaa !13
  br label %52

52:                                               ; preds = %51, %44, %40
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 5, ptr %18) #5
  %54 = getelementptr inbounds %"struct.Animation_Swirl::SwirlGradient", ptr %18, i32 0, i32 0
  %55 = load i32, ptr %12, align 4, !tbaa !11
  %56 = trunc i32 %55 to i8
  store i8 %56, ptr %54, align 1, !tbaa !13
  %57 = getelementptr inbounds i8, ptr %54, i64 1
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.Animation_Swirl::SwirlColor", ptr %58, i32 0, i32 0
  %60 = getelementptr inbounds [4 x i8], ptr %59, i64 0, i64 0
  %61 = load i8, ptr %60, align 1, !tbaa !13
  store i8 %61, ptr %57, align 1, !tbaa !13
  %62 = getelementptr inbounds i8, ptr %54, i64 2
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.Animation_Swirl::SwirlColor", ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds [4 x i8], ptr %64, i64 0, i64 1
  %66 = load i8, ptr %65, align 1, !tbaa !13
  store i8 %66, ptr %62, align 1, !tbaa !13
  %67 = getelementptr inbounds i8, ptr %54, i64 3
  %68 = load ptr, ptr %16, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.Animation_Swirl::SwirlColor", ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds [4 x i8], ptr %69, i64 0, i64 2
  %71 = load i8, ptr %70, align 1, !tbaa !13
  store i8 %71, ptr %67, align 1, !tbaa !13
  %72 = getelementptr inbounds i8, ptr %54, i64 4
  %73 = load i8, ptr %17, align 1, !tbaa !13
  store i8 %73, ptr %72, align 1, !tbaa !13
  call void @_ZNSt6vectorIN15Animation_Swirl13SwirlGradientESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 1 dereferenceable(5) %18)
  call void @llvm.lifetime.end.p0(i64 5, ptr %18) #5
  %74 = load i32, ptr %11, align 4, !tbaa !11
  %75 = load i32, ptr %12, align 4, !tbaa !11
  %76 = add nsw i32 %75, %74
  store i32 %76, ptr %12, align 4, !tbaa !11
  %77 = load i32, ptr %12, align 4, !tbaa !11
  %78 = icmp sgt i32 %77, 255
  br i1 %78, label %79, label %80

79:                                               ; preds = %52
  store i32 255, ptr %12, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %79, %52
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %81

81:                                               ; preds = %80
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %37

83:                                               ; preds = %39
  %84 = load i8, ptr %10, align 1, !tbaa !9, !range !14, !noundef !15
  %85 = trunc i8 %84 to i1
  br i1 %85, label %86, label %114

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  store i8 -1, ptr %19, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %87 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %20, ptr align 1 %87, i64 4, i1 false), !tbaa.struct !16
  %88 = load i8, ptr %8, align 1, !tbaa !9, !range !14, !noundef !15
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %97

90:                                               ; preds = %86
  %91 = getelementptr inbounds %"struct.Animation_Swirl::SwirlColor", ptr %20, i32 0, i32 0
  %92 = getelementptr inbounds [4 x i8], ptr %91, i64 0, i64 3
  %93 = load i8, ptr %92, align 1, !tbaa !13
  %94 = zext i8 %93 to i32
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %96, label %97

96:                                               ; preds = %90
  store i8 0, ptr %19, align 1, !tbaa !13
  br label %97

97:                                               ; preds = %96, %90, %86
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 5, ptr %21) #5
  %99 = getelementptr inbounds %"struct.Animation_Swirl::SwirlGradient", ptr %21, i32 0, i32 0
  store i8 -1, ptr %99, align 1, !tbaa !13
  %100 = getelementptr inbounds i8, ptr %99, i64 1
  %101 = getelementptr inbounds %"struct.Animation_Swirl::SwirlColor", ptr %20, i32 0, i32 0
  %102 = getelementptr inbounds [4 x i8], ptr %101, i64 0, i64 0
  %103 = load i8, ptr %102, align 1, !tbaa !13
  store i8 %103, ptr %100, align 1, !tbaa !13
  %104 = getelementptr inbounds i8, ptr %99, i64 2
  %105 = getelementptr inbounds %"struct.Animation_Swirl::SwirlColor", ptr %20, i32 0, i32 0
  %106 = getelementptr inbounds [4 x i8], ptr %105, i64 0, i64 1
  %107 = load i8, ptr %106, align 1, !tbaa !13
  store i8 %107, ptr %104, align 1, !tbaa !13
  %108 = getelementptr inbounds i8, ptr %99, i64 3
  %109 = getelementptr inbounds %"struct.Animation_Swirl::SwirlColor", ptr %20, i32 0, i32 0
  %110 = getelementptr inbounds [4 x i8], ptr %109, i64 0, i64 2
  %111 = load i8, ptr %110, align 1, !tbaa !13
  store i8 %111, ptr %108, align 1, !tbaa !13
  %112 = getelementptr inbounds i8, ptr %99, i64 4
  %113 = load i8, ptr %19, align 1, !tbaa !13
  store i8 %113, ptr %112, align 1, !tbaa !13
  call void @_ZNSt6vectorIN15Animation_Swirl13SwirlGradientESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 1 dereferenceable(5) %21)
  call void @llvm.lifetime.end.p0(i64 5, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  br label %114

114:                                              ; preds = %97, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %115

115:                                              ; preds = %114, %5
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN15Animation_Swirl13SwirlGradientESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(5)) #2 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{i64 0, i64 4, !13}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.Animation_Swirl::SwirlGradient" = type { [5 x i8] }

; 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: mustprogress uwtable
define dso_local void @_ZN15Animation_Swirl13buildGradientERSt6vectorINS_13SwirlGradientESaIS1_EEbS0_INS_10SwirlColorESaIS5_EEb(ptr nocapture noundef nonnull readnone align 8 dereferenceable(224) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i1 noundef zeroext %2, ptr noundef nonnull %3, i1 noundef zeroext %4) local_unnamed_addr #1 align 2 {
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"struct.Animation_Swirl::SwirlGradient", align 1
  %9 = alloca %"struct.Animation_Swirl::SwirlGradient", align 1
  %10 = tail call noundef i64 @_ZNKSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %11 = icmp ugt i64 %10, 1
  br i1 %11, label %12, label %44

12:                                               ; preds = %5
  %13 = tail call noundef i64 @_ZNKSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %14 = udiv i64 255, %13
  %15 = trunc nuw nsw i64 %14 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %16 = tail call ptr @_ZNSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %16, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %17 = tail call ptr @_ZNSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  store ptr %17, ptr %7, align 8
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %12
  %not.26 = xor i1 %2, true
  %19 = getelementptr inbounds i8, ptr %8, i64 1
  %20 = getelementptr inbounds i8, ptr %8, i64 2
  %21 = getelementptr inbounds i8, ptr %8, i64 3
  %22 = getelementptr inbounds i8, ptr %8, i64 4
  br label %23

._crit_edge:                                      ; preds = %23, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br i1 %4, label %37, label %44

23:                                               ; preds = %.lr.ph, %23
  %.027 = phi i32 [ 0, %.lr.ph ], [ %spec.store.select, %23 ]
  %24 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %25 = getelementptr inbounds i8, ptr %24, i64 3
  %26 = load i8, ptr %25, align 1
  %27 = icmp ne i8 %26, 0
  %or.cond25 = select i1 %not.26, i1 true, i1 %27
  %.021 = sext i1 %or.cond25 to i8
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %8) #5
  %28 = trunc nuw i32 %.027 to i8
  store i8 %28, ptr %8, align 1, !tbaa !5
  %29 = load i8, ptr %24, align 1, !tbaa !5
  store i8 %29, ptr %19, align 1, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %24, i64 1
  %31 = load i8, ptr %30, align 1, !tbaa !5
  store i8 %31, ptr %20, align 1, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %24, i64 2
  %33 = load i8, ptr %32, align 1, !tbaa !5
  store i8 %33, ptr %21, align 1, !tbaa !5
  store i8 %.021, ptr %22, align 1, !tbaa !5
  call void @_ZNSt6vectorIN15Animation_Swirl13SwirlGradientESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 1 dereferenceable(5) %8)
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %8) #5
  %34 = add nuw nsw i32 %.027, %15
  %spec.store.select = call i32 @llvm.smin.i32(i32 %34, i32 255)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br i1 %36, label %23, label %._crit_edge

37:                                               ; preds = %._crit_edge
  %38 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZNSt6vectorIN15Animation_Swirl10SwirlColorESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #5
  %.sroa.0.0.copyload = load i8, ptr %38, align 1
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %38, i64 1
  %.sroa.4.0.copyload = load i8, ptr %.sroa.4.0..sroa_idx, align 1
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %38, i64 2
  %.sroa.5.0.copyload = load i8, ptr %.sroa.5.0..sroa_idx, align 1
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %38, i64 3
  %.sroa.6.0.copyload = load i8, ptr %.sroa.6.0..sroa_idx, align 1, !tbaa !5
  %39 = icmp ne i8 %.sroa.6.0.copyload, 0
  %not. = xor i1 %2, true
  %or.cond = select i1 %not., i1 true, i1 %39
  %spec.select = sext i1 %or.cond to i8
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %9) #5
  store i8 -1, ptr %9, align 1, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %9, i64 1
  store i8 %.sroa.0.0.copyload, ptr %40, align 1, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %9, i64 2
  store i8 %.sroa.4.0.copyload, ptr %41, align 1, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %9, i64 3
  store i8 %.sroa.5.0.copyload, ptr %42, align 1, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %9, i64 4
  store i8 %spec.select, ptr %43, align 1, !tbaa !5
  call void @_ZNSt6vectorIN15Animation_Swirl13SwirlGradientESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 1 dereferenceable(5) %9)
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %9) #5
  br label %44

44:                                               ; preds = %._crit_edge, %37, %5
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN15Animation_Swirl10SwirlColorESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN15Animation_Swirl13SwirlGradientESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(5)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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