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

; 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.ColorRgb = type { i8, i8, i8 }
%class.AnimationBaseMusic = type <{ %class.AnimationBase.base, [3 x i8], %"class.std::function", %struct.MovingTarget, [4 x i8] }>
%class.AnimationBase.base = type <{ ptr, i32, i8 }>
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%struct.MovingTarget = type { %struct.ColorRgb, %struct.ColorRgb, %struct.ColorRgb, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.Animation4Music_StereoMultiFast = type { %class.AnimationBaseMusic.base, i32, i32, [4 x i8] }
%class.AnimationBaseMusic.base = type <{ %class.AnimationBase.base, [3 x i8], %"class.std::function", %struct.MovingTarget }>

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN31Animation4Music_StereoMultiFast8getImageER5ImageI8ColorRgbE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(20) %1) unnamed_addr #0 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.ColorRgb, align 1
  %10 = alloca %struct.ColorRgb, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %25 = load ptr, ptr %4, align 8
  %26 = getelementptr inbounds %class.AnimationBaseMusic, ptr %25, i32 0, i32 2
  %27 = call noundef zeroext i1 @_ZSteqIP18SoundCaptureResultJP18AnimationBaseMusicRjPbS5_S5_PiEEbRKSt8functionIFT_DpT0_EEDn(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr null) #5
  br i1 %27, label %28, label %29

28:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  br label %119

29:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %30 = getelementptr inbounds %class.AnimationBaseMusic, ptr %25, i32 0, i32 2
  %31 = getelementptr inbounds %class.Animation4Music_StereoMultiFast, ptr %25, i32 0, i32 1
  %32 = getelementptr inbounds %class.Animation4Music_StereoMultiFast, ptr %25, i32 0, i32 2
  %33 = call noundef ptr @_ZNKSt8functionIFP18SoundCaptureResultP18AnimationBaseMusicRjPbS5_S5_PiEEclES3_S4_S5_S5_S5_S6_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef %25, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef null, ptr noundef null, ptr noundef %6, ptr noundef %32)
  store ptr %33, ptr %7, align 8, !tbaa !5
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %39, label %36

36:                                               ; preds = %29
  %37 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %38 = trunc i8 %37 to i1
  br i1 %38, label %40, label %39

39:                                               ; preds = %36, %29
  store i1 false, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %118

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 3, ptr %9) #5
  call void @_ZN8ColorRgbC2Ev(ptr noundef nonnull align 1 dereferenceable(3) %9) #5
  call void @llvm.lifetime.start.p0(i64 3, ptr %10) #5
  call void @_ZN8ColorRgbC2Ev(ptr noundef nonnull align 1 dereferenceable(3) %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN5ImageI8ColorRgbE5clearEv(ptr noundef nonnull align 8 dereferenceable(20) %41)
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN18SoundCaptureResult8GetStatsERjS0_R8ColorRgbPS1_S3_(ptr noundef nonnull align 4 dereferenceable(296) %42, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(3) %10, ptr noundef %9, ptr noundef null)
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i1 false, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %117

45:                                               ; preds = %40
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN18SoundCaptureResult14RestoreFullLumER8ColorRgbi(ptr noundef nonnull align 4 dereferenceable(296) %46, ptr noundef nonnull align 1 dereferenceable(3) %9, i32 noundef 32)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.Animation4Music_StereoMultiFast, ptr %25, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !13
  %50 = call noundef i32 @_ZN18SoundCaptureResult13getValue3StepEi(ptr noundef nonnull align 4 dereferenceable(296) %47, i32 noundef %49)
  store i32 %50, ptr %13, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20) %51)
  %53 = udiv i32 %52, 2
  store i32 %53, ptr %14, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %54 = load i32, ptr %14, align 4, !tbaa !22
  %55 = load i32, ptr %13, align 4, !tbaa !22
  %56 = mul nsw i32 %54, %55
  %57 = sdiv i32 %56, 255
  store i32 %57, ptr %16, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 255, ptr %17, align 4, !tbaa !22
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %59 = load i32, ptr %58, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  store i32 %59, ptr %15, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %60 = load i32, ptr %14, align 4, !tbaa !22
  %61 = load i32, ptr %15, align 4, !tbaa !22
  %62 = sub nsw i32 %60, %61
  store i32 %62, ptr %19, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !22
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %64 = load i32, ptr %63, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  store i32 %64, ptr %18, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %65 = load i32, ptr %14, align 4, !tbaa !22
  %66 = load i32, ptr %15, align 4, !tbaa !22
  %67 = add nsw i32 %65, %66
  store i32 %67, ptr %22, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = call noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20) %68)
  %70 = sub nsw i32 %69, 1
  store i32 %70, ptr %23, align 4, !tbaa !22
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %72 = load i32, ptr %71, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  store i32 %72, ptr %21, align 4, !tbaa !22
  %73 = load i32, ptr %21, align 4, !tbaa !22
  %74 = load i32, ptr %18, align 4, !tbaa !22
  %75 = icmp sgt i32 %73, %74
  br i1 %75, label %76, label %116

76:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = call noundef i32 @_ZNK5ImageI8ColorRgbE5widthEv(ptr noundef nonnull align 8 dereferenceable(20) %77)
  %79 = uitofp i32 %78 to double
  %80 = fmul double %79, 4.000000e-02
  %81 = fptosi double %80 to i32
  store i32 %81, ptr %24, align 4, !tbaa !22
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = load i32, ptr %18, align 4, !tbaa !22
  %84 = trunc i32 %83 to i16
  %85 = load i32, ptr %24, align 4, !tbaa !22
  %86 = trunc i32 %85 to i16
  %87 = load i32, ptr %21, align 4, !tbaa !22
  %88 = trunc i32 %87 to i16
  %89 = call noundef i32 @_ZN8ColorRgb3RedEv(ptr noundef nonnull align 1 dereferenceable(3) %9)
  %90 = trunc i32 %89 to i8
  %91 = call noundef i32 @_ZN8ColorRgb5GreenEv(ptr noundef nonnull align 1 dereferenceable(3) %9)
  %92 = trunc i32 %91 to i8
  %93 = call noundef i32 @_ZN8ColorRgb4BlueEv(ptr noundef nonnull align 1 dereferenceable(3) %9)
  %94 = trunc i32 %93 to i8
  call void @_ZN5ImageI8ColorRgbE12gradientVBoxEtttthhh(ptr noundef nonnull align 8 dereferenceable(20) %82, i16 noundef zeroext 0, i16 noundef zeroext %84, i16 noundef zeroext %86, i16 noundef zeroext %88, i8 noundef zeroext %90, i8 noundef zeroext %92, i8 noundef zeroext %94)
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = call noundef i32 @_ZNK5ImageI8ColorRgbE5widthEv(ptr noundef nonnull align 8 dereferenceable(20) %96)
  %98 = sub i32 %97, 1
  %99 = load i32, ptr %24, align 4, !tbaa !22
  %100 = sub i32 %98, %99
  %101 = trunc i32 %100 to i16
  %102 = load i32, ptr %18, align 4, !tbaa !22
  %103 = trunc i32 %102 to i16
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = call noundef i32 @_ZNK5ImageI8ColorRgbE5widthEv(ptr noundef nonnull align 8 dereferenceable(20) %104)
  %106 = sub i32 %105, 1
  %107 = trunc i32 %106 to i16
  %108 = load i32, ptr %21, align 4, !tbaa !22
  %109 = trunc i32 %108 to i16
  %110 = call noundef i32 @_ZN8ColorRgb3RedEv(ptr noundef nonnull align 1 dereferenceable(3) %9)
  %111 = trunc i32 %110 to i8
  %112 = call noundef i32 @_ZN8ColorRgb5GreenEv(ptr noundef nonnull align 1 dereferenceable(3) %9)
  %113 = trunc i32 %112 to i8
  %114 = call noundef i32 @_ZN8ColorRgb4BlueEv(ptr noundef nonnull align 1 dereferenceable(3) %9)
  %115 = trunc i32 %114 to i8
  call void @_ZN5ImageI8ColorRgbE12gradientVBoxEtttthhh(ptr noundef nonnull align 8 dereferenceable(20) %95, i16 noundef zeroext %101, i16 noundef zeroext %103, i16 noundef zeroext %107, i16 noundef zeroext %109, i8 noundef zeroext %111, i8 noundef zeroext %113, i8 noundef zeroext %115)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %116

116:                                              ; preds = %76, %45
  store i1 true, ptr %3, align 1
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %117

117:                                              ; preds = %116, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr %9) #5
  br label %118

118:                                              ; preds = %117, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %119

119:                                              ; preds = %118, %28
  %120 = load i1, ptr %3, align 1
  ret i1 %120
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNKSt8functionIFP18SoundCaptureResultP18AnimationBaseMusicRjPbS5_S5_PiEEclES3_S4_S5_S5_S5_S6_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0 align 2

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

declare void @_ZN5ImageI8ColorRgbE5clearEv(ptr noundef nonnull align 8 dereferenceable(20)) #4

declare noundef zeroext i1 @_ZN18SoundCaptureResult8GetStatsERjS0_R8ColorRgbPS1_S3_(ptr noundef nonnull align 4 dereferenceable(296), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(3), ptr noundef, ptr noundef) #4

declare void @_ZN18SoundCaptureResult14RestoreFullLumER8ColorRgbi(ptr noundef nonnull align 4 dereferenceable(296), ptr noundef nonnull align 1 dereferenceable(3), i32 noundef) #4

declare noundef i32 @_ZN18SoundCaptureResult13getValue3StepEi(ptr noundef nonnull align 4 dereferenceable(296), i32 noundef) #4

declare noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

declare noundef i32 @_ZNK5ImageI8ColorRgbE5widthEv(ptr noundef nonnull align 8 dereferenceable(20)) #4

declare void @_ZN5ImageI8ColorRgbE12gradientVBoxEtttthhh(ptr noundef nonnull align 8 dereferenceable(20), i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8ColorRgb4BlueEv(ptr noundef nonnull align 1 dereferenceable(3)) #3 align 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !17, i64 112}
!14 = !{!"_ZTS31Animation4Music_StereoMultiFast", !15, i64 0, !17, i64 108, !17, i64 112}
!15 = !{!"_ZTS18AnimationBaseMusic", !16, i64 0, !18, i64 16, !20, i64 48}
!16 = !{!"_ZTS13AnimationBase", !17, i64 8, !10, i64 12}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSSt8functionIFP18SoundCaptureResultP18AnimationBaseMusicRjPbS5_S5_PiEE", !19, i64 0, !6, i64 24}
!19 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!20 = !{!"_ZTS12MovingTarget", !21, i64 0, !21, i64 3, !21, i64 6, !17, i64 12, !17, i64 16, !17, i64 20, !17, i64 24, !17, i64 28, !17, i64 32, !17, i64 36, !17, i64 40, !17, i64 44, !17, i64 48, !17, i64 52, !17, i64 56}
!21 = !{!"_ZTS8ColorRgb", !7, i64 0, !7, i64 1, !7, i64 2}
!22 = !{!17, !17, 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"

%struct.ColorRgb = type { i8, i8, i8 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN31Animation4Music_StereoMultiFast8getImageER5ImageI8ColorRgbE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(20) %1) unnamed_addr #0 align 2 {
  %3 = alloca i8, align 1
  %4 = alloca %struct.ColorRgb, align 1
  %5 = alloca %struct.ColorRgb, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = tail call noundef zeroext i1 @_ZSteqIP18SoundCaptureResultJP18AnimationBaseMusicRjPbS5_S5_PiEEbRKSt8functionIFT_DpT0_EEDn(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr null) #5
  br i1 %15, label %73, label %16

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  store i8 0, ptr %3, align 1, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 108
  %18 = getelementptr inbounds i8, ptr %0, i64 112
  %19 = call noundef ptr @_ZNKSt8functionIFP18SoundCaptureResultP18AnimationBaseMusicRjPbS5_S5_PiEEclES3_S4_S5_S5_S5_S6_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull %0, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef null, ptr noundef null, ptr noundef nonnull %3, ptr noundef nonnull %18)
  %20 = icmp eq ptr %19, null
  br i1 %20, label %72, label %21

21:                                               ; preds = %16
  %22 = load i8, ptr %3, align 1, !tbaa !5, !range !9, !noundef !10
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %24, label %72

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %4) #5
  call void @_ZN8ColorRgbC2Ev(ptr noundef nonnull align 1 dereferenceable(3) %4) #5
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %5) #5
  call void @_ZN8ColorRgbC2Ev(ptr noundef nonnull align 1 dereferenceable(3) %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @_ZN5ImageI8ColorRgbE5clearEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %25 = call noundef zeroext i1 @_ZN18SoundCaptureResult8GetStatsERjS0_R8ColorRgbPS1_S3_(ptr noundef nonnull align 4 dereferenceable(296) %19, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(3) %5, ptr noundef nonnull %4, ptr noundef null)
  br i1 %25, label %26, label %71

26:                                               ; preds = %24
  call void @_ZN18SoundCaptureResult14RestoreFullLumER8ColorRgbi(ptr noundef nonnull align 4 dereferenceable(296) %19, ptr noundef nonnull align 1 dereferenceable(3) %4, i32 noundef 32)
  %27 = load i32, ptr %18, align 8, !tbaa !11
  %28 = call noundef i32 @_ZN18SoundCaptureResult13getValue3StepEi(ptr noundef nonnull align 4 dereferenceable(296) %19, i32 noundef %27)
  %29 = call noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %30 = lshr i32 %29, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %31 = mul nsw i32 %30, %28
  %32 = sdiv i32 %31, 255
  store i32 %32, ptr %8, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store i32 255, ptr %9, align 4, !tbaa !21
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %34 = load i32, ptr %33, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %35 = sub nsw i32 %30, %34
  store i32 %35, ptr %10, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  store i32 0, ptr %11, align 4, !tbaa !21
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %37 = load i32, ptr %36, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  %38 = add nsw i32 %34, %30
  store i32 %38, ptr %12, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  %39 = call noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %40 = add nsw i32 %39, -1
  store i32 %40, ptr %13, align 4, !tbaa !21
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %42 = load i32, ptr %41, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  %43 = icmp sgt i32 %42, %37
  br i1 %43, label %44, label %71

44:                                               ; preds = %26
  %45 = call noundef i32 @_ZNK5ImageI8ColorRgbE5widthEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %46 = uitofp i32 %45 to double
  %47 = fmul double %46, 4.000000e-02
  %48 = fptosi double %47 to i32
  %49 = trunc i32 %37 to i16
  %50 = trunc i32 %48 to i16
  %51 = trunc i32 %42 to i16
  %52 = call noundef i32 @_ZN8ColorRgb3RedEv(ptr noundef nonnull align 1 dereferenceable(3) %4)
  %53 = trunc i32 %52 to i8
  %54 = call noundef i32 @_ZN8ColorRgb5GreenEv(ptr noundef nonnull align 1 dereferenceable(3) %4)
  %55 = trunc i32 %54 to i8
  %56 = call noundef i32 @_ZN8ColorRgb4BlueEv(ptr noundef nonnull align 1 dereferenceable(3) %4)
  %57 = trunc i32 %56 to i8
  call void @_ZN5ImageI8ColorRgbE12gradientVBoxEtttthhh(ptr noundef nonnull align 8 dereferenceable(20) %1, i16 noundef zeroext 0, i16 noundef zeroext %49, i16 noundef zeroext %50, i16 noundef zeroext %51, i8 noundef zeroext %53, i8 noundef zeroext %55, i8 noundef zeroext %57)
  %58 = call noundef i32 @_ZNK5ImageI8ColorRgbE5widthEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %59 = xor i32 %48, -1
  %60 = add i32 %58, %59
  %61 = trunc i32 %60 to i16
  %62 = call noundef i32 @_ZNK5ImageI8ColorRgbE5widthEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %63 = trunc i32 %62 to i16
  %64 = add i16 %63, -1
  %65 = call noundef i32 @_ZN8ColorRgb3RedEv(ptr noundef nonnull align 1 dereferenceable(3) %4)
  %66 = trunc i32 %65 to i8
  %67 = call noundef i32 @_ZN8ColorRgb5GreenEv(ptr noundef nonnull align 1 dereferenceable(3) %4)
  %68 = trunc i32 %67 to i8
  %69 = call noundef i32 @_ZN8ColorRgb4BlueEv(ptr noundef nonnull align 1 dereferenceable(3) %4)
  %70 = trunc i32 %69 to i8
  call void @_ZN5ImageI8ColorRgbE12gradientVBoxEtttthhh(ptr noundef nonnull align 8 dereferenceable(20) %1, i16 noundef zeroext %61, i16 noundef zeroext %49, i16 noundef zeroext %64, i16 noundef zeroext %51, i8 noundef zeroext %66, i8 noundef zeroext %68, i8 noundef zeroext %70)
  br label %71

71:                                               ; preds = %26, %44, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %4) #5
  br label %72

72:                                               ; preds = %16, %21, %71
  %.1 = phi i1 [ %25, %71 ], [ false, %21 ], [ false, %16 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %73

73:                                               ; preds = %2, %72
  %.2 = phi i1 [ %.1, %72 ], [ false, %2 ]
  ret i1 %.2
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNKSt8functionIFP18SoundCaptureResultP18AnimationBaseMusicRjPbS5_S5_PiEEclES3_S4_S5_S5_S5_S6_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

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

declare void @_ZN5ImageI8ColorRgbE5clearEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN18SoundCaptureResult8GetStatsERjS0_R8ColorRgbPS1_S3_(ptr noundef nonnull align 4 dereferenceable(296), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(3), ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @_ZN18SoundCaptureResult14RestoreFullLumER8ColorRgbi(ptr noundef nonnull align 4 dereferenceable(296), ptr noundef nonnull align 1 dereferenceable(3), i32 noundef) local_unnamed_addr #4

declare noundef i32 @_ZN18SoundCaptureResult13getValue3StepEi(ptr noundef nonnull align 4 dereferenceable(296), i32 noundef) local_unnamed_addr #4

declare noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

declare noundef i32 @_ZNK5ImageI8ColorRgbE5widthEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #4

declare void @_ZN5ImageI8ColorRgbE12gradientVBoxEtttthhh(ptr noundef nonnull align 8 dereferenceable(20), i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8ColorRgb3RedEv(ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8ColorRgb5GreenEv(ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN8ColorRgb4BlueEv(ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #3 align 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !15, i64 112}
!12 = !{!"_ZTS31Animation4Music_StereoMultiFast", !13, i64 0, !15, i64 108, !15, i64 112}
!13 = !{!"_ZTS18AnimationBaseMusic", !14, i64 0, !16, i64 16, !19, i64 48}
!14 = !{!"_ZTS13AnimationBase", !15, i64 8, !6, i64 12}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt8functionIFP18SoundCaptureResultP18AnimationBaseMusicRjPbS5_S5_PiEE", !17, i64 0, !18, i64 24}
!17 = !{!"_ZTSSt14_Function_base", !7, i64 0, !18, i64 16}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"_ZTS12MovingTarget", !20, i64 0, !20, i64 3, !20, i64 6, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56}
!20 = !{!"_ZTS8ColorRgb", !7, i64 0, !7, i64 1, !7, i64 2}
!21 = !{!15, !15, i64 0}


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