; LLVM IR from giacomo-ascari/dichotomic-compression :: src/dc/dc-utils (dc-pixel-matrix)

; 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._dc_corners = type { i64, i64, i64, i64 }
%class.dc_pixel_matrix = type { ptr, i64, i64 }
%class.dc_pixel = type { i8, i8, i8 }
%struct._dc_heavy_sector = type <{ %struct._dc_corners, %class.dc_pixel, i8, i8, [3 x i8] }>

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

declare noundef i64 @_Z2ixmmm(i64 noundef, i64 noundef, i64 noundef) #1

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

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

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

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

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

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

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

declare noundef zeroext i8 @_ZN8dc_pixel11get_channelE11dc_channels(ptr noundef nonnull align 1 dereferenceable(3), i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15dc_pixel_matrix11get_averageER11_dc_cornersR16_dc_heavy_sector11dc_channels(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(37) %2, i32 noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %17 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._dc_corners, ptr %18, i32 0, i32 2
  %20 = load i64, ptr %19, align 8, !tbaa !11
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._dc_corners, ptr %21, i32 0, i32 0
  %23 = load i64, ptr %22, align 8, !tbaa !14
  %24 = sub i64 %20, %23
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._dc_corners, ptr %25, i32 0, i32 3
  %27 = load i64, ptr %26, align 8, !tbaa !15
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._dc_corners, ptr %28, i32 0, i32 1
  %30 = load i64, ptr %29, align 8, !tbaa !16
  %31 = sub i64 %27, %30
  %32 = mul i64 %24, %31
  store i64 %32, ptr %9, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store double 0.000000e+00, ptr %10, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store double 0.000000e+00, ptr %11, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store double 0.000000e+00, ptr %12, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store double 0.000000e+00, ptr %13, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._dc_corners, ptr %33, i32 0, i32 1
  %35 = load i64, ptr %34, align 8, !tbaa !16
  store i64 %35, ptr %14, align 8, !tbaa !17
  br label %36

36:                                               ; preds = %125, %4
  %37 = load i64, ptr %14, align 8, !tbaa !17
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct._dc_corners, ptr %38, i32 0, i32 3
  %40 = load i64, ptr %39, align 8, !tbaa !15
  %41 = icmp ult i64 %37, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %36
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %128

43:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._dc_corners, ptr %44, i32 0, i32 0
  %46 = load i64, ptr %45, align 8, !tbaa !14
  store i64 %46, ptr %16, align 8, !tbaa !17
  br label %47

47:                                               ; preds = %121, %43
  %48 = load i64, ptr %16, align 8, !tbaa !17
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._dc_corners, ptr %49, i32 0, i32 2
  %51 = load i64, ptr %50, align 8, !tbaa !11
  %52 = icmp ult i64 %48, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %47
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %124

54:                                               ; preds = %47
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = icmp eq i32 %55, 3
  br i1 %56, label %57, label %103

57:                                               ; preds = %54
  %58 = getelementptr inbounds %class.dc_pixel_matrix, ptr %17, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !20
  %60 = load i64, ptr %16, align 8, !tbaa !17
  %61 = load i64, ptr %14, align 8, !tbaa !17
  %62 = getelementptr inbounds %class.dc_pixel_matrix, ptr %17, i32 0, i32 1
  %63 = load i64, ptr %62, align 8, !tbaa !22
  %64 = call noundef i64 @_Z2ixmmm(i64 noundef %60, i64 noundef %61, i64 noundef %63)
  %65 = getelementptr inbounds %class.dc_pixel, ptr %59, i64 %64
  %66 = call noundef zeroext i8 @_ZN8dc_pixel5get_rEv(ptr noundef nonnull align 1 dereferenceable(3) %65)
  %67 = uitofp i8 %66 to double
  %68 = load i64, ptr %9, align 8, !tbaa !17
  %69 = uitofp i64 %68 to double
  %70 = fdiv double %67, %69
  %71 = load double, ptr %10, align 8, !tbaa !18
  %72 = fadd double %71, %70
  store double %72, ptr %10, align 8, !tbaa !18
  %73 = getelementptr inbounds %class.dc_pixel_matrix, ptr %17, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !20
  %75 = load i64, ptr %16, align 8, !tbaa !17
  %76 = load i64, ptr %14, align 8, !tbaa !17
  %77 = getelementptr inbounds %class.dc_pixel_matrix, ptr %17, i32 0, i32 1
  %78 = load i64, ptr %77, align 8, !tbaa !22
  %79 = call noundef i64 @_Z2ixmmm(i64 noundef %75, i64 noundef %76, i64 noundef %78)
  %80 = getelementptr inbounds %class.dc_pixel, ptr %74, i64 %79
  %81 = call noundef zeroext i8 @_ZN8dc_pixel5get_gEv(ptr noundef nonnull align 1 dereferenceable(3) %80)
  %82 = uitofp i8 %81 to double
  %83 = load i64, ptr %9, align 8, !tbaa !17
  %84 = uitofp i64 %83 to double
  %85 = fdiv double %82, %84
  %86 = load double, ptr %11, align 8, !tbaa !18
  %87 = fadd double %86, %85
  store double %87, ptr %11, align 8, !tbaa !18
  %88 = getelementptr inbounds %class.dc_pixel_matrix, ptr %17, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !20
  %90 = load i64, ptr %16, align 8, !tbaa !17
  %91 = load i64, ptr %14, align 8, !tbaa !17
  %92 = getelementptr inbounds %class.dc_pixel_matrix, ptr %17, i32 0, i32 1
  %93 = load i64, ptr %92, align 8, !tbaa !22
  %94 = call noundef i64 @_Z2ixmmm(i64 noundef %90, i64 noundef %91, i64 noundef %93)
  %95 = getelementptr inbounds %class.dc_pixel, ptr %89, i64 %94
  %96 = call noundef zeroext i8 @_ZN8dc_pixel5get_bEv(ptr noundef nonnull align 1 dereferenceable(3) %95)
  %97 = uitofp i8 %96 to double
  %98 = load i64, ptr %9, align 8, !tbaa !17
  %99 = uitofp i64 %98 to double
  %100 = fdiv double %97, %99
  %101 = load double, ptr %12, align 8, !tbaa !18
  %102 = fadd double %101, %100
  store double %102, ptr %12, align 8, !tbaa !18
  br label %120

103:                                              ; preds = %54
  %104 = getelementptr inbounds %class.dc_pixel_matrix, ptr %17, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !20
  %106 = load i64, ptr %16, align 8, !tbaa !17
  %107 = load i64, ptr %14, align 8, !tbaa !17
  %108 = getelementptr inbounds %class.dc_pixel_matrix, ptr %17, i32 0, i32 1
  %109 = load i64, ptr %108, align 8, !tbaa !22
  %110 = call noundef i64 @_Z2ixmmm(i64 noundef %106, i64 noundef %107, i64 noundef %109)
  %111 = getelementptr inbounds %class.dc_pixel, ptr %105, i64 %110
  %112 = load i32, ptr %8, align 4, !tbaa !9
  %113 = call noundef zeroext i8 @_ZN8dc_pixel11get_channelE11dc_channels(ptr noundef nonnull align 1 dereferenceable(3) %111, i32 noundef %112)
  %114 = uitofp i8 %113 to double
  %115 = load i64, ptr %9, align 8, !tbaa !17
  %116 = uitofp i64 %115 to double
  %117 = fdiv double %114, %116
  %118 = load double, ptr %13, align 8, !tbaa !18
  %119 = fadd double %118, %117
  store double %119, ptr %13, align 8, !tbaa !18
  br label %120

120:                                              ; preds = %103, %57
  br label %121

121:                                              ; preds = %120
  %122 = load i64, ptr %16, align 8, !tbaa !17
  %123 = add i64 %122, 1
  store i64 %123, ptr %16, align 8, !tbaa !17
  br label %47, !llvm.loop !23

124:                                              ; preds = %53
  br label %125

125:                                              ; preds = %124
  %126 = load i64, ptr %14, align 8, !tbaa !17
  %127 = add i64 %126, 1
  store i64 %127, ptr %14, align 8, !tbaa !17
  br label %36, !llvm.loop !25

128:                                              ; preds = %42
  %129 = load i32, ptr %8, align 4, !tbaa !9
  %130 = icmp eq i32 %129, 3
  br i1 %130, label %131, label %144

131:                                              ; preds = %128
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._dc_heavy_sector, ptr %132, i32 0, i32 1
  %134 = load double, ptr %10, align 8, !tbaa !18
  %135 = fptoui double %134 to i8
  call void @_ZN8dc_pixel5set_rEh(ptr noundef nonnull align 1 dereferenceable(3) %133, i8 noundef zeroext %135)
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct._dc_heavy_sector, ptr %136, i32 0, i32 1
  %138 = load double, ptr %11, align 8, !tbaa !18
  %139 = fptoui double %138 to i8
  call void @_ZN8dc_pixel5set_gEh(ptr noundef nonnull align 1 dereferenceable(3) %137, i8 noundef zeroext %139)
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._dc_heavy_sector, ptr %140, i32 0, i32 1
  %142 = load double, ptr %12, align 8, !tbaa !18
  %143 = fptoui double %142 to i8
  call void @_ZN8dc_pixel5set_bEh(ptr noundef nonnull align 1 dereferenceable(3) %141, i8 noundef zeroext %143)
  br label %149

144:                                              ; preds = %128
  %145 = load double, ptr %13, align 8, !tbaa !18
  %146 = fptoui double %145 to i8
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._dc_heavy_sector, ptr %147, i32 0, i32 2
  store i8 %146, ptr %148, align 1, !tbaa !26
  br label %149

149:                                              ; preds = %144, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 = !{!"_ZTS11dc_channels", !7, i64 0}
!11 = !{!12, !13, i64 16}
!12 = !{!"_ZTS11_dc_corners", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 0}
!15 = !{!12, !13, i64 24}
!16 = !{!12, !13, i64 8}
!17 = !{!13, !13, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTS15dc_pixel_matrix", !6, i64 0, !13, i64 8, !13, i64 16}
!22 = !{!21, !13, i64 8}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = !{!27, !7, i64 35}
!27 = !{!"_ZTS16_dc_heavy_sector", !12, i64 0, !28, i64 32, !7, i64 35, !7, i64 36}
!28 = !{!"_ZTS8dc_pixel", !7, i64 0, !7, i64 1, !7, i64 2}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.dc_pixel = type { i8, i8, i8 }

declare noundef i64 @_Z2ixmmm(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

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

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

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

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

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

declare noundef zeroext i8 @_ZN8dc_pixel11get_channelE11dc_channels(ptr noundef nonnull align 1 dereferenceable(3), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15dc_pixel_matrix11get_averageER11_dc_cornersR16_dc_heavy_sector11dc_channels(ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(37) %2, i32 noundef %3) local_unnamed_addr #2 align 2 {
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  %6 = getelementptr inbounds i8, ptr %1, i64 24
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %9 = load i64, ptr %6, align 8, !tbaa !10
  %10 = icmp ult i64 %8, %9
  br i1 %10, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %4
  %11 = sub i64 %9, %8
  %12 = load i64, ptr %5, align 8, !tbaa !11
  %13 = load i64, ptr %1, align 8, !tbaa !12
  %14 = sub i64 %12, %13
  %15 = mul i64 %11, %14
  %16 = icmp eq i32 %3, 3
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = uitofp i64 %15 to double
  %19 = icmp ult i64 %13, %12
  br i1 %19, label %.lr.ph69.split.preheader, label %._crit_edge70

.lr.ph69.split.preheader:                         ; preds = %.lr.ph69
  %20 = insertelement <2 x double> poison, double %18, i64 0
  %21 = shufflevector <2 x double> %20, <2 x double> poison, <2 x i32> zeroinitializer
  br label %.lr.ph69.split

._crit_edge70.loopexit:                           ; preds = %._crit_edge
  %22 = fptoui double %.1.lcssa to i8
  %23 = extractelement <2 x double> %61, i64 0
  %24 = fptoui double %23 to i8
  %25 = extractelement <2 x double> %61, i64 1
  %26 = fptoui double %25 to i8
  %27 = fptoui double %.142.lcssa to i8
  br label %._crit_edge70

._crit_edge70:                                    ; preds = %.lr.ph69, %._crit_edge70.loopexit, %4
  %.047.lcssa = phi i8 [ 0, %4 ], [ %24, %._crit_edge70.loopexit ], [ 0, %.lr.ph69 ]
  %.044.lcssa = phi i8 [ 0, %4 ], [ %26, %._crit_edge70.loopexit ], [ 0, %.lr.ph69 ]
  %.041.lcssa = phi i8 [ 0, %4 ], [ %27, %._crit_edge70.loopexit ], [ 0, %.lr.ph69 ]
  %.040.lcssa = phi i8 [ 0, %4 ], [ %22, %._crit_edge70.loopexit ], [ 0, %.lr.ph69 ]
  %28 = icmp eq i32 %3, 3
  br i1 %28, label %76, label %78

.lr.ph69.split:                                   ; preds = %.lr.ph69.split.preheader, %._crit_edge
  %29 = phi i64 [ %60, %._crit_edge ], [ %12, %.lr.ph69.split.preheader ]
  %.03966 = phi i64 [ %62, %._crit_edge ], [ %8, %.lr.ph69.split.preheader ]
  %.04065 = phi double [ %.1.lcssa, %._crit_edge ], [ 0.000000e+00, %.lr.ph69.split.preheader ]
  %.04164 = phi double [ %.142.lcssa, %._crit_edge ], [ 0.000000e+00, %.lr.ph69.split.preheader ]
  %30 = phi <2 x double> [ %61, %._crit_edge ], [ zeroinitializer, %.lr.ph69.split.preheader ]
  %31 = load i64, ptr %1, align 8, !tbaa !12
  %32 = icmp ult i64 %31, %29
  br i1 %32, label %.lr.ph, label %._crit_edge

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

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %.055.us = phi i64 [ %57, %.lr.ph.split.us ], [ %31, %.lr.ph ]
  %.14253.us = phi double [ %56, %.lr.ph.split.us ], [ %.04164, %.lr.ph ]
  %33 = phi <2 x double> [ %48, %.lr.ph.split.us ], [ %30, %.lr.ph ]
  %34 = load ptr, ptr %0, align 8, !tbaa !13
  %35 = load i64, ptr %17, align 8, !tbaa !16
  %36 = tail call noundef i64 @_Z2ixmmm(i64 noundef %.055.us, i64 noundef %.03966, i64 noundef %35)
  %37 = getelementptr inbounds %class.dc_pixel, ptr %34, i64 %36
  %38 = tail call noundef zeroext i8 @_ZN8dc_pixel5get_rEv(ptr noundef nonnull align 1 dereferenceable(3) %37)
  %39 = load ptr, ptr %0, align 8, !tbaa !13
  %40 = load i64, ptr %17, align 8, !tbaa !16
  %41 = tail call noundef i64 @_Z2ixmmm(i64 noundef %.055.us, i64 noundef %.03966, i64 noundef %40)
  %42 = getelementptr inbounds %class.dc_pixel, ptr %39, i64 %41
  %43 = tail call noundef zeroext i8 @_ZN8dc_pixel5get_gEv(ptr noundef nonnull align 1 dereferenceable(3) %42)
  %44 = insertelement <2 x i8> poison, i8 %38, i64 0
  %45 = insertelement <2 x i8> %44, i8 %43, i64 1
  %46 = uitofp <2 x i8> %45 to <2 x double>
  %47 = fdiv <2 x double> %46, %21
  %48 = fadd <2 x double> %33, %47
  %49 = load ptr, ptr %0, align 8, !tbaa !13
  %50 = load i64, ptr %17, align 8, !tbaa !16
  %51 = tail call noundef i64 @_Z2ixmmm(i64 noundef %.055.us, i64 noundef %.03966, i64 noundef %50)
  %52 = getelementptr inbounds %class.dc_pixel, ptr %49, i64 %51
  %53 = tail call noundef zeroext i8 @_ZN8dc_pixel5get_bEv(ptr noundef nonnull align 1 dereferenceable(3) %52)
  %54 = uitofp i8 %53 to double
  %55 = fdiv double %54, %18
  %56 = fadd double %.14253.us, %55
  %57 = add nuw i64 %.055.us, 1
  %58 = load i64, ptr %5, align 8, !tbaa !11
  %59 = icmp ult i64 %57, %58
  br i1 %59, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph.split, %.lr.ph.split.us, %.lr.ph69.split
  %60 = phi i64 [ %29, %.lr.ph69.split ], [ %58, %.lr.ph.split.us ], [ %74, %.lr.ph.split ]
  %.142.lcssa = phi double [ %.04164, %.lr.ph69.split ], [ %56, %.lr.ph.split.us ], [ %.04164, %.lr.ph.split ]
  %.1.lcssa = phi double [ %.04065, %.lr.ph69.split ], [ %.04065, %.lr.ph.split.us ], [ %72, %.lr.ph.split ]
  %61 = phi <2 x double> [ %30, %.lr.ph69.split ], [ %48, %.lr.ph.split.us ], [ %30, %.lr.ph.split ]
  %62 = add nuw i64 %.03966, 1
  %63 = load i64, ptr %6, align 8, !tbaa !10
  %64 = icmp ult i64 %62, %63
  br i1 %64, label %.lr.ph69.split, label %._crit_edge70.loopexit, !llvm.loop !19

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %.055 = phi i64 [ %73, %.lr.ph.split ], [ %31, %.lr.ph ]
  %.154 = phi double [ %72, %.lr.ph.split ], [ %.04065, %.lr.ph ]
  %65 = load ptr, ptr %0, align 8, !tbaa !13
  %66 = load i64, ptr %17, align 8, !tbaa !16
  %67 = tail call noundef i64 @_Z2ixmmm(i64 noundef %.055, i64 noundef %.03966, i64 noundef %66)
  %68 = getelementptr inbounds %class.dc_pixel, ptr %65, i64 %67
  %69 = tail call noundef zeroext i8 @_ZN8dc_pixel11get_channelE11dc_channels(ptr noundef nonnull align 1 dereferenceable(3) %68, i32 noundef %3)
  %70 = uitofp i8 %69 to double
  %71 = fdiv double %70, %18
  %72 = fadd double %.154, %71
  %73 = add nuw i64 %.055, 1
  %74 = load i64, ptr %5, align 8, !tbaa !11
  %75 = icmp ult i64 %73, %74
  br i1 %75, label %.lr.ph.split, label %._crit_edge, !llvm.loop !17

76:                                               ; preds = %._crit_edge70
  %77 = getelementptr inbounds i8, ptr %2, i64 32
  tail call void @_ZN8dc_pixel5set_rEh(ptr noundef nonnull align 1 dereferenceable(3) %77, i8 noundef zeroext %.047.lcssa)
  tail call void @_ZN8dc_pixel5set_gEh(ptr noundef nonnull align 1 dereferenceable(3) %77, i8 noundef zeroext %.044.lcssa)
  tail call void @_ZN8dc_pixel5set_bEh(ptr noundef nonnull align 1 dereferenceable(3) %77, i8 noundef zeroext %.041.lcssa)
  br label %80

78:                                               ; preds = %._crit_edge70
  %79 = getelementptr inbounds i8, ptr %2, i64 35
  store i8 %.040.lcssa, ptr %79, align 1, !tbaa !21
  br label %80

80:                                               ; preds = %78, %76
  ret void
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 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" }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTS11_dc_corners", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 24}
!11 = !{!6, !7, i64 16}
!12 = !{!6, !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS15dc_pixel_matrix", !15, i64 0, !7, i64 8, !7, i64 16}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!14, !7, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18, !20}
!20 = !{!"llvm.loop.unswitch.partial.disable"}
!21 = !{!22, !8, i64 35}
!22 = !{!"_ZTS16_dc_heavy_sector", !6, i64 0, !23, i64 32, !8, i64 35, !8, i64 36}
!23 = !{!"_ZTS8dc_pixel", !8, i64 0, !8, i64 1, !8, i64 2}


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