; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/process/src/c_src (colortransform)

; 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.SIMPLE_MAT = type { i32, i32, i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #1

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

declare ptr @create_simple_mat(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local ptr @sm_rgb2gray(ptr noundef %0, i32 noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca float, 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
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %16, i32 0, i32 3
  %18 = load i32, ptr %17, align 4, !tbaa !11
  %19 = icmp eq i32 %18, 3
  br i1 %19, label %20, label %21

20:                                               ; preds = %2
  br label %25

21:                                               ; preds = %2
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %24 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #5
  unreachable

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %26, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !13
  store i32 %28, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !14
  store i32 %31, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = call ptr @create_simple_mat(i32 noundef %32, i32 noundef %33, i32 noundef 1, i32 noundef 1)
  store ptr %34, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %35, i32 0, i32 5
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  store ptr %37, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %38, i32 0, i32 5
  %40 = load ptr, ptr %39, align 8, !tbaa !15
  store ptr %40, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store float 0.000000e+00, ptr %10, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %220, %25
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %223

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %216, %46
  %48 = load i32, ptr %13, align 4, !tbaa !9
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %219

52:                                               ; preds = %47
  store float 0.000000e+00, ptr %10, align 4, !tbaa !16
  %53 = load i32, ptr %4, align 4, !tbaa !9
  %54 = icmp eq i32 %53, 1
  br i1 %54, label %55, label %113

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %98, %55
  %57 = load i32, ptr %14, align 4, !tbaa !9
  %58 = icmp slt i32 %57, 3
  br i1 %58, label %60, label %59

59:                                               ; preds = %56
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %101

60:                                               ; preds = %56
  %61 = load float, ptr %10, align 4, !tbaa !16
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = mul nsw i32 %63, %64
  %66 = mul nsw i32 %65, 3
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = mul nsw i32 %67, 3
  %69 = add nsw i32 %66, %68
  %70 = load i32, ptr %14, align 4, !tbaa !9
  %71 = add nsw i32 %69, %70
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i8, ptr %62, i64 %72
  %74 = load i8, ptr %73, align 1, !tbaa !18
  %75 = zext i8 %74 to i32
  %76 = sitofp i32 %75 to float
  %77 = fcmp ogt float %61, %76
  br i1 %77, label %78, label %80

78:                                               ; preds = %60
  %79 = load float, ptr %10, align 4, !tbaa !16
  br label %96

80:                                               ; preds = %60
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = load i32, ptr %6, align 4, !tbaa !9
  %84 = mul nsw i32 %82, %83
  %85 = mul nsw i32 %84, 3
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = mul nsw i32 %86, 3
  %88 = add nsw i32 %85, %87
  %89 = load i32, ptr %14, align 4, !tbaa !9
  %90 = add nsw i32 %88, %89
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i8, ptr %81, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !18
  %94 = zext i8 %93 to i32
  %95 = sitofp i32 %94 to float
  br label %96

96:                                               ; preds = %80, %78
  %97 = phi float [ %79, %78 ], [ %95, %80 ]
  store float %97, ptr %10, align 4, !tbaa !16
  br label %98

98:                                               ; preds = %96
  %99 = load i32, ptr %14, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %14, align 4, !tbaa !9
  br label %56, !llvm.loop !19

101:                                              ; preds = %59
  %102 = load float, ptr %10, align 4, !tbaa !16
  %103 = fptosi float %102 to i32
  %104 = trunc i32 %103 to i8
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = mul nsw i32 %106, %107
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = add nsw i32 %108, %109
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i8, ptr %105, i64 %111
  store i8 %104, ptr %112, align 1, !tbaa !18
  br label %215

113:                                              ; preds = %52
  %114 = load i32, ptr %4, align 4, !tbaa !9
  %115 = icmp eq i32 %114, 2
  br i1 %115, label %116, label %173

116:                                              ; preds = %113
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = load i32, ptr %11, align 4, !tbaa !9
  %119 = load i32, ptr %6, align 4, !tbaa !9
  %120 = mul nsw i32 %118, %119
  %121 = mul nsw i32 %120, 3
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = mul nsw i32 %122, 3
  %124 = add nsw i32 %121, %123
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds i8, ptr %117, i64 %125
  %127 = load i8, ptr %126, align 1, !tbaa !18
  %128 = zext i8 %127 to i32
  %129 = sitofp i32 %128 to double
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = load i32, ptr %6, align 4, !tbaa !9
  %133 = mul nsw i32 %131, %132
  %134 = mul nsw i32 %133, 3
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = mul nsw i32 %135, 3
  %137 = add nsw i32 %134, %136
  %138 = add nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds i8, ptr %130, i64 %139
  %141 = load i8, ptr %140, align 1, !tbaa !18
  %142 = zext i8 %141 to i32
  %143 = sitofp i32 %142 to double
  %144 = fmul double %143, 5.780000e-01
  %145 = call double @llvm.fmuladd.f64(double %129, double 2.990000e-01, double %144)
  %146 = load ptr, ptr %9, align 8, !tbaa !5
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = load i32, ptr %6, align 4, !tbaa !9
  %149 = mul nsw i32 %147, %148
  %150 = mul nsw i32 %149, 3
  %151 = load i32, ptr %13, align 4, !tbaa !9
  %152 = mul nsw i32 %151, 3
  %153 = add nsw i32 %150, %152
  %154 = add nsw i32 %153, 2
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i8, ptr %146, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !18
  %158 = zext i8 %157 to i32
  %159 = sitofp i32 %158 to double
  %160 = call double @llvm.fmuladd.f64(double %159, double 1.140000e-01, double %145)
  %161 = fptrunc double %160 to float
  store float %161, ptr %10, align 4, !tbaa !16
  %162 = load float, ptr %10, align 4, !tbaa !16
  %163 = fptosi float %162 to i32
  %164 = trunc i32 %163 to i8
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = load i32, ptr %11, align 4, !tbaa !9
  %167 = load i32, ptr %6, align 4, !tbaa !9
  %168 = mul nsw i32 %166, %167
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = add nsw i32 %168, %169
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds i8, ptr %165, i64 %171
  store i8 %164, ptr %172, align 1, !tbaa !18
  br label %214

173:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %196, %173
  %175 = load i32, ptr %15, align 4, !tbaa !9
  %176 = icmp slt i32 %175, 3
  br i1 %176, label %178, label %177

177:                                              ; preds = %174
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %199

178:                                              ; preds = %174
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = load i32, ptr %11, align 4, !tbaa !9
  %181 = load i32, ptr %6, align 4, !tbaa !9
  %182 = mul nsw i32 %180, %181
  %183 = mul nsw i32 %182, 3
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = mul nsw i32 %184, 3
  %186 = add nsw i32 %183, %185
  %187 = load i32, ptr %15, align 4, !tbaa !9
  %188 = add nsw i32 %186, %187
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds i8, ptr %179, i64 %189
  %191 = load i8, ptr %190, align 1, !tbaa !18
  %192 = zext i8 %191 to i32
  %193 = sitofp i32 %192 to float
  %194 = load float, ptr %10, align 4, !tbaa !16
  %195 = fadd float %194, %193
  store float %195, ptr %10, align 4, !tbaa !16
  br label %196

196:                                              ; preds = %178
  %197 = load i32, ptr %15, align 4, !tbaa !9
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %15, align 4, !tbaa !9
  br label %174, !llvm.loop !21

199:                                              ; preds = %177
  %200 = load float, ptr %10, align 4, !tbaa !16
  %201 = fdiv float %200, 3.000000e+00
  %202 = fpext float %201 to double
  %203 = fadd double %202, 5.000000e-01
  %204 = fptosi double %203 to i32
  %205 = trunc i32 %204 to i8
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = load i32, ptr %11, align 4, !tbaa !9
  %208 = load i32, ptr %6, align 4, !tbaa !9
  %209 = mul nsw i32 %207, %208
  %210 = load i32, ptr %13, align 4, !tbaa !9
  %211 = add nsw i32 %209, %210
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds i8, ptr %206, i64 %212
  store i8 %205, ptr %213, align 1, !tbaa !18
  br label %214

214:                                              ; preds = %199, %116
  br label %215

215:                                              ; preds = %214, %101
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %13, align 4, !tbaa !9
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %13, align 4, !tbaa !9
  br label %47, !llvm.loop !22

219:                                              ; preds = %51
  br label %220

220:                                              ; preds = %219
  %221 = load i32, ptr %11, align 4, !tbaa !9
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !23

223:                                              ; preds = %45
  %224 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret ptr %224
}

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

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 = { noreturn nounwind "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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 12}
!12 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24}
!13 = !{!12, !10, i64 0}
!14 = !{!12, !10, i64 4}
!15 = !{!12, !6, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}


; 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"

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #1

declare ptr @create_simple_mat(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local ptr @sm_rgb2gray(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %0, i64 12
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 3
  br i1 %5, label %10, label %6

6:                                                ; preds = %2
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

10:                                               ; preds = %2
  %11 = load i32, ptr %0, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %0, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !12
  %14 = tail call ptr @create_simple_mat(i32 noundef %11, i32 noundef %13, i32 noundef 1, i32 noundef 1) #6
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = icmp sgt i32 %11, 0
  %20 = icmp sgt i32 %13, 0
  %or.cond = and i1 %19, %20
  br i1 %or.cond, label %.preheader72.lr.ph.split.us, label %._crit_edge81

.preheader72.lr.ph.split.us:                      ; preds = %10
  %21 = zext nneg i32 %13 to i64
  %wide.trip.count126 = zext nneg i32 %11 to i64
  switch i32 %1, label %.preheader72.us.preheader [
    i32 1, label %.preheader72.us.us.preheader
    i32 2, label %.preheader72.us.us87
  ]

.preheader72.us.us.preheader:                     ; preds = %.preheader72.lr.ph.split.us
  %wide.trip.count107 = zext nneg i32 %13 to i64
  %invariant.gep133 = getelementptr i8, ptr %18, i64 2
  br label %.preheader72.us.us

.preheader72.us.preheader:                        ; preds = %.preheader72.lr.ph.split.us
  %wide.trip.count121 = zext nneg i32 %13 to i64
  %invariant.gep139 = getelementptr i8, ptr %18, i64 2
  br label %.preheader72.us

.preheader72.us.us:                               ; preds = %.preheader72.us.us.preheader, %._crit_edge.split.us.us.us
  %indvars.iv109 = phi i64 [ 0, %.preheader72.us.us.preheader ], [ %indvars.iv.next110, %._crit_edge.split.us.us.us ]
  %22 = mul nuw nsw i64 %indvars.iv109, %21
  %invariant.gep135 = getelementptr inbounds i8, ptr %16, i64 %22
  br label %.preheader71.us.us.us

.preheader71.us.us.us:                            ; preds = %.preheader71.us.us.us, %.preheader72.us.us
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %.preheader71.us.us.us ], [ 0, %.preheader72.us.us ]
  %23 = add nuw i64 %indvars.iv104, %22
  %sext129 = mul i64 %23, 12884901888
  %24 = ashr exact i64 %sext129, 32
  %25 = getelementptr inbounds i8, ptr %18, i64 %24
  %26 = load <2 x i8>, ptr %25, align 1, !tbaa !14
  %27 = uitofp <2 x i8> %26 to <2 x float>
  %28 = extractelement <2 x float> %27, i64 0
  %29 = extractelement <2 x float> %27, i64 1
  %30 = fcmp ogt float %28, %29
  %.067..us.us.us.1 = select i1 %30, float %28, float %29
  %gep134 = getelementptr i8, ptr %invariant.gep133, i64 %24
  %31 = load i8, ptr %gep134, align 1, !tbaa !14
  %32 = uitofp i8 %31 to float
  %33 = fcmp ogt float %.067..us.us.us.1, %32
  %.067..us.us.us.2 = select i1 %33, float %.067..us.us.us.1, float %32
  %34 = fptosi float %.067..us.us.us.2 to i32
  %35 = trunc i32 %34 to i8
  %gep136 = getelementptr inbounds i8, ptr %invariant.gep135, i64 %indvars.iv104
  store i8 %35, ptr %gep136, align 1, !tbaa !14
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %exitcond108.not = icmp eq i64 %indvars.iv.next105, %wide.trip.count107
  br i1 %exitcond108.not, label %._crit_edge.split.us.us.us, label %.preheader71.us.us.us, !llvm.loop !15

._crit_edge.split.us.us.us:                       ; preds = %.preheader71.us.us.us
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next110, %wide.trip.count126
  br i1 %exitcond113.not, label %._crit_edge81, label %.preheader72.us.us, !llvm.loop !17

.preheader72.us.us87:                             ; preds = %.preheader72.lr.ph.split.us, %._crit_edge.split.split.us.us.us
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %._crit_edge.split.split.us.us.us ], [ 0, %.preheader72.lr.ph.split.us ]
  %36 = mul nuw nsw i64 %indvars.iv95, %21
  br label %37

37:                                               ; preds = %37, %.preheader72.us.us87
  %indvars.iv = phi i64 [ %indvars.iv.next, %37 ], [ 0, %.preheader72.us.us87 ]
  %38 = add nuw nsw i64 %indvars.iv, %36
  %sext = mul i64 %38, 12884901888
  %39 = ashr exact i64 %sext, 32
  %40 = getelementptr inbounds i8, ptr %18, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !14
  %42 = uitofp i8 %41 to double
  %43 = getelementptr i8, ptr %40, i64 1
  %44 = load i8, ptr %43, align 1, !tbaa !14
  %45 = uitofp i8 %44 to double
  %46 = fmul double %45, 5.780000e-01
  %47 = tail call double @llvm.fmuladd.f64(double %42, double 2.990000e-01, double %46)
  %48 = getelementptr i8, ptr %40, i64 2
  %49 = load i8, ptr %48, align 1, !tbaa !14
  %50 = uitofp i8 %49 to double
  %51 = tail call double @llvm.fmuladd.f64(double %50, double 1.140000e-01, double %47)
  %52 = fptrunc double %51 to float
  %53 = fptosi float %52 to i32
  %54 = trunc i32 %53 to i8
  %sext128 = shl i64 %38, 32
  %55 = ashr exact i64 %sext128, 32
  %56 = getelementptr inbounds i8, ptr %16, i64 %55
  store i8 %54, ptr %56, align 1, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %21
  br i1 %exitcond.not, label %._crit_edge.split.split.us.us.us, label %37, !llvm.loop !15

._crit_edge.split.split.us.us.us:                 ; preds = %37
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count126
  br i1 %exitcond99.not, label %._crit_edge81, label %.preheader72.us.us87, !llvm.loop !17

.preheader72.us:                                  ; preds = %.preheader72.us.preheader, %._crit_edge.split.split.us83
  %indvars.iv123 = phi i64 [ 0, %.preheader72.us.preheader ], [ %indvars.iv.next124, %._crit_edge.split.split.us83 ]
  %57 = mul nuw nsw i64 %indvars.iv123, %21
  %invariant.gep141 = getelementptr inbounds i8, ptr %16, i64 %57
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader72.us, %.preheader.us
  %indvars.iv118 = phi i64 [ 0, %.preheader72.us ], [ %indvars.iv.next119, %.preheader.us ]
  %58 = add nuw i64 %indvars.iv118, %57
  %sext130 = mul i64 %58, 12884901888
  %59 = ashr exact i64 %sext130, 32
  %60 = getelementptr inbounds i8, ptr %18, i64 %59
  %61 = load <2 x i8>, ptr %60, align 1, !tbaa !14
  %62 = uitofp <2 x i8> %61 to <2 x float>
  %shift = shufflevector <2 x float> %62, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
  %63 = fadd <2 x float> %shift, %62
  %64 = extractelement <2 x float> %63, i64 0
  %gep140 = getelementptr i8, ptr %invariant.gep139, i64 %59
  %65 = load i8, ptr %gep140, align 1, !tbaa !14
  %66 = uitofp i8 %65 to float
  %67 = fadd float %64, %66
  %68 = fdiv float %67, 3.000000e+00
  %69 = fpext float %68 to double
  %70 = fadd double %69, 5.000000e-01
  %71 = fptosi double %70 to i32
  %72 = trunc i32 %71 to i8
  %gep142 = getelementptr inbounds i8, ptr %invariant.gep141, i64 %indvars.iv118
  store i8 %72, ptr %gep142, align 1, !tbaa !14
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond122.not = icmp eq i64 %indvars.iv.next119, %wide.trip.count121
  br i1 %exitcond122.not, label %._crit_edge.split.split.us83, label %.preheader.us, !llvm.loop !15

._crit_edge.split.split.us83:                     ; preds = %.preheader.us
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %exitcond127.not = icmp eq i64 %indvars.iv.next124, %wide.trip.count126
  br i1 %exitcond127.not, label %._crit_edge81, label %.preheader72.us, !llvm.loop !17

._crit_edge81:                                    ; preds = %._crit_edge.split.split.us.us.us, %._crit_edge.split.us.us.us, %._crit_edge.split.split.us83, %10
  ret ptr %14
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

attributes #0 = { nofree nounwind "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 = { noreturn nounwind "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 = { "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 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !7, i64 12}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !10, i64 24}
!14 = !{!8, !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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