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

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

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

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

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

36:                                               ; preds = %33, %26
  store i1 false, ptr %3, align 1
  store i32 1, ptr %8, align 4
  br label %114

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.Animation4Music_StereoBlue, ptr %22, i32 0, i32 2
  %40 = load i32, ptr %39, align 8, !tbaa !13
  %41 = call noundef i32 @_ZN18SoundCaptureResult8getValueEi(ptr noundef nonnull align 4 dereferenceable(296) %38, i32 noundef %40)
  store i32 %41, ptr %9, align 4, !tbaa !22
  %42 = load i32, ptr %9, align 4, !tbaa !22
  %43 = icmp slt i32 %42, 0
  br i1 %43, label %44, label %45

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

45:                                               ; preds = %37
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN5ImageI8ColorRgbE5clearEv(ptr noundef nonnull align 8 dereferenceable(20) %46)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = call noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20) %47)
  %49 = udiv i32 %48, 2
  store i32 %49, ptr %10, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %50 = load i32, ptr %10, align 4, !tbaa !22
  %51 = load i32, ptr %9, align 4, !tbaa !22
  %52 = mul nsw i32 %50, %51
  %53 = sdiv i32 %52, 255
  store i32 %53, ptr %12, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 255, ptr %13, align 4, !tbaa !22
  %54 = 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)
  %55 = load i32, ptr %54, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  store i32 %55, ptr %11, 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
  %56 = load i32, ptr %10, align 4, !tbaa !22
  %57 = load i32, ptr %11, align 4, !tbaa !22
  %58 = sub nsw i32 %56, %57
  store i32 %58, ptr %15, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !22
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %60 = load i32, ptr %59, 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 %60, 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
  %61 = load i32, ptr %10, align 4, !tbaa !22
  %62 = load i32, ptr %11, align 4, !tbaa !22
  %63 = add nsw i32 %61, %62
  store i32 %63, ptr %18, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = call noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20) %64)
  %66 = sub nsw i32 %65, 1
  store i32 %66, ptr %19, align 4, !tbaa !22
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %68 = load i32, ptr %67, 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 %68, ptr %17, align 4, !tbaa !22
  %69 = load i32, ptr %17, align 4, !tbaa !22
  %70 = load i32, ptr %14, align 4, !tbaa !22
  %71 = icmp sgt i32 %69, %70
  br i1 %71, label %72, label %112

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

112:                                              ; preds = %72, %45
  store i1 true, ptr %3, align 1
  store i32 1, ptr %8, align 4
  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 %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %113

113:                                              ; preds = %112, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %114

114:                                              ; preds = %113, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %115

115:                                              ; preds = %114, %25
  %116 = load i1, ptr %3, align 1
  ret i1 %116
}

; 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

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

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

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

; 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)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8ColorRgbC2Ehhh(ptr noundef nonnull align 1 dereferenceable(3), i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) unnamed_addr #4 align 2

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) #3

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !17, i64 112}
!14 = !{!"_ZTS26Animation4Music_StereoBlue", !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 @_ZN26Animation4Music_StereoBlue8getImageER5ImageI8ColorRgbE(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 i32, align 4
  %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 %struct.ColorRgb, align 1
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = tail call noundef zeroext i1 @_ZSteqIP18SoundCaptureResultJP18AnimationBaseMusicRjPbS5_S5_PiEEbRKSt8functionIFT_DpT0_EEDn(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr null) #5
  br i1 %12, label %69, label %13

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

18:                                               ; preds = %13
  %19 = load i8, ptr %3, align 1, !tbaa !5, !range !9, !noundef !10
  %20 = trunc nuw i8 %19 to i1
  br i1 %20, label %21, label %68

21:                                               ; preds = %18
  %22 = load i32, ptr %15, align 8, !tbaa !11
  %23 = call noundef i32 @_ZN18SoundCaptureResult8getValueEi(ptr noundef nonnull align 4 dereferenceable(296) %16, i32 noundef %22)
  %24 = icmp sgt i32 %23, -1
  br i1 %24, label %25, label %68

25:                                               ; preds = %21
  call void @_ZN5ImageI8ColorRgbE5clearEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %26 = call noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %27 = lshr i32 %26, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %28 = mul nuw nsw i32 %27, %23
  %29 = udiv i32 %28, 255
  store i32 %29, ptr %4, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 255, ptr %5, align 4, !tbaa !21
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %31 = load i32, ptr %30, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %32 = sub nsw i32 %27, %31
  store i32 %32, ptr %6, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !21
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %34 = load i32, ptr %33, align 4, !tbaa !21
  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.start.p0(i64 4, ptr nonnull %8) #5
  %35 = add nsw i32 %31, %27
  store i32 %35, ptr %8, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %36 = call noundef i32 @_ZNK5ImageI8ColorRgbE6heightEv(ptr noundef nonnull align 8 dereferenceable(20) %1)
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr %9, align 4, !tbaa !21
  %38 = 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)
  %39 = load i32, ptr %38, 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
  %40 = icmp sgt i32 %39, %34
  br i1 %40, label %41, label %68

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

68:                                               ; preds = %21, %41, %25, %13, %18
  %.1 = phi i1 [ false, %18 ], [ false, %13 ], [ true, %25 ], [ true, %41 ], [ false, %21 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %69

69:                                               ; preds = %2, %68
  %.2 = phi i1 [ %.1, %68 ], [ 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

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

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

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

; 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 #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8ColorRgbC2Ehhh(ptr noundef nonnull align 1 dereferenceable(3), i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) unnamed_addr #4 align 2

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 #3

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"_ZTS26Animation4Music_StereoBlue", !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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass