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

; 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_StereoMulti = 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 @_ZN27Animation4Music_StereoMulti8getImageER5ImageI8ColorRgbE(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 i32, align 4
  %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
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8
  %25 = getelementptr inbounds %class.AnimationBaseMusic, ptr %24, i32 0, i32 2
  %26 = call noundef zeroext i1 @_ZSteqIP18SoundCaptureResultJP18AnimationBaseMusicRjPbS5_S5_PiEEbRKSt8functionIFT_DpT0_EEDn(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr null) #5
  br i1 %26, label %27, label %28

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

28:                                               ; 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
  %29 = getelementptr inbounds %class.AnimationBaseMusic, ptr %24, i32 0, i32 2
  %30 = getelementptr inbounds %class.Animation4Music_StereoMulti, ptr %24, i32 0, i32 1
  %31 = getelementptr inbounds %class.Animation4Music_StereoMulti, ptr %24, i32 0, i32 2
  %32 = call noundef ptr @_ZNKSt8functionIFP18SoundCaptureResultP18AnimationBaseMusicRjPbS5_S5_PiEEclES3_S4_S5_S5_S5_S6_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef %24, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef %6, ptr noundef null, ptr noundef null, ptr noundef %31)
  store ptr %32, ptr %7, align 8, !tbaa !5
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = icmp eq ptr %33, null
  br i1 %34, label %38, label %35

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

38:                                               ; preds = %35, %28
  store i1 false, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %117

39:                                               ; preds = %35
  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 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN5ImageI8ColorRgbE5clearEv(ptr noundef nonnull align 8 dereferenceable(20) %40)
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZN18SoundCaptureResult8GetStatsERjS0_R8ColorRgbPS1_S3_(ptr noundef nonnull align 4 dereferenceable(296) %41, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 1 dereferenceable(3) %9, ptr noundef null, ptr noundef null)
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i1 false, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %116

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

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

115:                                              ; preds = %75, %44
  store i1 true, ptr %3, align 1
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %116

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

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

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

; 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 = !{!"_ZTS27Animation4Music_StereoMulti", !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 @_ZN27Animation4Music_StereoMulti8getImageER5ImageI8ColorRgbE(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 i32, align 4
  %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 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = tail call noundef zeroext i1 @_ZSteqIP18SoundCaptureResultJP18AnimationBaseMusicRjPbS5_S5_PiEEbRKSt8functionIFT_DpT0_EEDn(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr null) #5
  br i1 %14, label %72, label %15

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

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

23:                                               ; preds = %20
  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 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @_ZN5ImageI8ColorRgbE5clearEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %24 = call noundef zeroext i1 @_ZN18SoundCaptureResult8GetStatsERjS0_R8ColorRgbPS1_S3_(ptr noundef nonnull align 4 dereferenceable(296) %18, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 1 dereferenceable(3) %4, ptr noundef null, ptr noundef null)
  br i1 %24, label %25, label %70

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

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

70:                                               ; preds = %25, %43, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %4) #5
  br label %71

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

72:                                               ; preds = %2, %71
  %.2 = phi i1 [ %.1, %71 ], [ 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 = !{!"_ZTS27Animation4Music_StereoMulti", !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