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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @otsuThreshold(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca [256 x double], align 16
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %29, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !11
  store i32 %31, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !13
  store i32 %34, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %35, i32 0, i32 3
  %37 = load i32, ptr %36, align 4, !tbaa !14
  store i32 %37, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = mul nsw i32 %38, %39
  store i32 %40, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %41, i32 0, i32 5
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  store ptr %43, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store double 0.000000e+00, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store double 0.000000e+00, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store double 0.000000e+00, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store double 0.000000e+00, ptr %14, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store double 0.000000e+00, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store double 0.000000e+00, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store double 0.000000e+00, ptr %17, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store double -1.000000e+00, ptr %18, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store double -1.000000e+00, ptr %19, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 2048, ptr %20) #4
  call void @llvm.memset.p0.i64(ptr align 16 %20, i8 0, i64 2048, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = load i32, ptr %4, align 4, !tbaa !9
  %46 = mul nsw i32 %44, %45
  %47 = sitofp i32 %46 to double
  store double %47, ptr %21, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %125, %1
  %49 = load i32, ptr %22, align 4, !tbaa !9
  %50 = load i32, ptr %4, align 4, !tbaa !9
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  store i32 2, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %128

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %121, %53
  %55 = load i32, ptr %24, align 4, !tbaa !9
  %56 = load i32, ptr %5, align 4, !tbaa !9
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %124

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = load i32, ptr %22, align 4, !tbaa !9
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = mul nsw i32 %61, %62
  %64 = load i32, ptr %24, align 4, !tbaa !9
  %65 = mul nsw i32 %64, 3
  %66 = add nsw i32 %63, %65
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i8, ptr %60, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !18
  %70 = zext i8 %69 to i32
  %71 = sitofp i32 %70 to double
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load i32, ptr %22, align 4, !tbaa !9
  %74 = load i32, ptr %7, align 4, !tbaa !9
  %75 = mul nsw i32 %73, %74
  %76 = load i32, ptr %24, align 4, !tbaa !9
  %77 = mul nsw i32 %76, 3
  %78 = add nsw i32 %75, %77
  %79 = add nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i8, ptr %72, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !18
  %83 = zext i8 %82 to i32
  %84 = sitofp i32 %83 to double
  %85 = fmul double %84, 5.870000e-01
  %86 = call double @llvm.fmuladd.f64(double %71, double 1.140000e-01, double %85)
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load i32, ptr %22, align 4, !tbaa !9
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = mul nsw i32 %88, %89
  %91 = load i32, ptr %24, align 4, !tbaa !9
  %92 = mul nsw i32 %91, 3
  %93 = add nsw i32 %90, %92
  %94 = add nsw i32 %93, 2
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %87, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !18
  %98 = zext i8 %97 to i32
  %99 = sitofp i32 %98 to double
  %100 = call double @llvm.fmuladd.f64(double %99, double 2.990000e-01, double %86)
  store double %100, ptr %25, align 8, !tbaa !16
  %101 = load double, ptr %25, align 8, !tbaa !16
  %102 = fcmp olt double %101, 0.000000e+00
  br i1 %102, label %103, label %104

103:                                              ; preds = %59
  br label %106

104:                                              ; preds = %59
  %105 = load double, ptr %25, align 8, !tbaa !16
  br label %106

106:                                              ; preds = %104, %103
  %107 = phi double [ 0.000000e+00, %103 ], [ %105, %104 ]
  store double %107, ptr %25, align 8, !tbaa !16
  %108 = load double, ptr %25, align 8, !tbaa !16
  %109 = fcmp ogt double %108, 2.550000e+02
  br i1 %109, label %110, label %111

110:                                              ; preds = %106
  br label %113

111:                                              ; preds = %106
  %112 = load double, ptr %25, align 8, !tbaa !16
  br label %113

113:                                              ; preds = %111, %110
  %114 = phi double [ 2.550000e+02, %110 ], [ %112, %111 ]
  store double %114, ptr %25, align 8, !tbaa !16
  %115 = load double, ptr %25, align 8, !tbaa !16
  %116 = fptosi double %115 to i32
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [256 x double], ptr %20, i64 0, i64 %117
  %119 = load double, ptr %118, align 8, !tbaa !16
  %120 = fadd double %119, 1.000000e+00
  store double %120, ptr %118, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %121

121:                                              ; preds = %113
  %122 = load i32, ptr %24, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %24, align 4, !tbaa !9
  br label %54, !llvm.loop !19

124:                                              ; preds = %58
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %22, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %22, align 4, !tbaa !9
  br label %48, !llvm.loop !21

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

129:                                              ; preds = %213, %128
  %130 = load i32, ptr %26, align 4, !tbaa !9
  %131 = icmp slt i32 %130, 256
  br i1 %131, label %133, label %132

132:                                              ; preds = %129
  store i32 8, ptr %23, align 4
  br label %216

133:                                              ; preds = %129
  store double 0.000000e+00, ptr %9, align 8, !tbaa !16
  store double 0.000000e+00, ptr %10, align 8, !tbaa !16
  %134 = load i32, ptr %26, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [256 x double], ptr %20, i64 0, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !16
  %138 = load double, ptr %11, align 8, !tbaa !16
  %139 = fadd double %138, %137
  store double %139, ptr %11, align 8, !tbaa !16
  %140 = load double, ptr %21, align 8, !tbaa !16
  %141 = load double, ptr %11, align 8, !tbaa !16
  %142 = fsub double %140, %141
  store double %142, ptr %12, align 8, !tbaa !16
  %143 = load double, ptr %12, align 8, !tbaa !16
  %144 = fcmp oeq double 0.000000e+00, %143
  br i1 %144, label %145, label %146

145:                                              ; preds = %133
  store i32 8, ptr %23, align 4
  br label %216

146:                                              ; preds = %133
  %147 = load double, ptr %11, align 8, !tbaa !16
  %148 = load double, ptr %21, align 8, !tbaa !16
  %149 = fdiv double %147, %148
  store double %149, ptr %15, align 8, !tbaa !16
  %150 = load double, ptr %15, align 8, !tbaa !16
  %151 = fsub double 1.000000e+00, %150
  store double %151, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %166, %146
  %153 = load i32, ptr %27, align 4, !tbaa !9
  %154 = load i32, ptr %26, align 4, !tbaa !9
  %155 = icmp sle i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 11, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %169

157:                                              ; preds = %152
  %158 = load i32, ptr %27, align 4, !tbaa !9
  %159 = sitofp i32 %158 to double
  %160 = load i32, ptr %27, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [256 x double], ptr %20, i64 0, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !16
  %164 = load double, ptr %9, align 8, !tbaa !16
  %165 = call double @llvm.fmuladd.f64(double %159, double %163, double %164)
  store double %165, ptr %9, align 8, !tbaa !16
  br label %166

166:                                              ; preds = %157
  %167 = load i32, ptr %27, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %27, align 4, !tbaa !9
  br label %152, !llvm.loop !22

169:                                              ; preds = %156
  %170 = load double, ptr %9, align 8, !tbaa !16
  %171 = load double, ptr %11, align 8, !tbaa !16
  %172 = fdiv double %170, %171
  store double %172, ptr %13, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %173 = load i32, ptr %26, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %28, align 4, !tbaa !9
  br label %175

175:                                              ; preds = %188, %169
  %176 = load i32, ptr %28, align 4, !tbaa !9
  %177 = icmp slt i32 %176, 256
  br i1 %177, label %179, label %178

178:                                              ; preds = %175
  store i32 14, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  br label %191

179:                                              ; preds = %175
  %180 = load i32, ptr %28, align 4, !tbaa !9
  %181 = sitofp i32 %180 to double
  %182 = load i32, ptr %28, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [256 x double], ptr %20, i64 0, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !16
  %186 = load double, ptr %10, align 8, !tbaa !16
  %187 = call double @llvm.fmuladd.f64(double %181, double %185, double %186)
  store double %187, ptr %10, align 8, !tbaa !16
  br label %188

188:                                              ; preds = %179
  %189 = load i32, ptr %28, align 4, !tbaa !9
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %28, align 4, !tbaa !9
  br label %175, !llvm.loop !23

191:                                              ; preds = %178
  %192 = load double, ptr %10, align 8, !tbaa !16
  %193 = load double, ptr %12, align 8, !tbaa !16
  %194 = fdiv double %192, %193
  store double %194, ptr %14, align 8, !tbaa !16
  %195 = load double, ptr %15, align 8, !tbaa !16
  %196 = load double, ptr %16, align 8, !tbaa !16
  %197 = fmul double %195, %196
  %198 = load double, ptr %13, align 8, !tbaa !16
  %199 = load double, ptr %14, align 8, !tbaa !16
  %200 = fsub double %198, %199
  %201 = fmul double %197, %200
  %202 = load double, ptr %13, align 8, !tbaa !16
  %203 = load double, ptr %14, align 8, !tbaa !16
  %204 = fsub double %202, %203
  %205 = fmul double %201, %204
  store double %205, ptr %19, align 8, !tbaa !16
  %206 = load double, ptr %18, align 8, !tbaa !16
  %207 = load double, ptr %19, align 8, !tbaa !16
  %208 = fcmp olt double %206, %207
  br i1 %208, label %209, label %212

209:                                              ; preds = %191
  %210 = load double, ptr %19, align 8, !tbaa !16
  store double %210, ptr %18, align 8, !tbaa !16
  %211 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %211, ptr %3, align 4, !tbaa !9
  br label %212

212:                                              ; preds = %209, %191
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %26, align 4, !tbaa !9
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %26, align 4, !tbaa !9
  br label %129, !llvm.loop !24

216:                                              ; preds = %145, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %3, align 4, !tbaa !9
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 2048, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret i32 %218
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 12}
!15 = !{!12, !6, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !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}
!24 = distinct !{!24, !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"

; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable
define dso_local i32 @otsuThreshold(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = alloca [256 x double], align 16
  %3 = load i32, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 4
  %5 = load i32, ptr %4, align 4, !tbaa !11
  %6 = getelementptr inbounds i8, ptr %0, i64 12
  %7 = load i32, ptr %6, align 4, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %2) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2048) %2, i8 0, i64 2048, i1 false)
  %10 = mul nsw i32 %5, %3
  %11 = sitofp i32 %10 to double
  %12 = icmp sgt i32 %3, 0
  %13 = icmp sgt i32 %5, 0
  %or.cond = select i1 %12, i1 %13, i1 false
  br i1 %or.cond, label %.preheader79.us.preheader, label %.preheader.preheader

.preheader79.us.preheader:                        ; preds = %1
  %14 = mul nsw i32 %7, %5
  %15 = sext i32 %14 to i64
  %wide.trip.count96 = zext nneg i32 %3 to i64
  %wide.trip.count = zext nneg i32 %5 to i64
  br label %.preheader79.us

.preheader79.us:                                  ; preds = %.preheader79.us.preheader, %._crit_edge.us
  %indvars.iv93 = phi i64 [ 0, %.preheader79.us.preheader ], [ %indvars.iv.next94, %._crit_edge.us ]
  %16 = mul nsw i64 %indvars.iv93, %15
  %invariant.gep = getelementptr i8, ptr %9, i64 %16
  br label %17

17:                                               ; preds = %.preheader79.us, %17
  %indvars.iv = phi i64 [ 0, %.preheader79.us ], [ %indvars.iv.next, %17 ]
  %18 = mul nuw nsw i64 %indvars.iv, 3
  %gep = getelementptr i8, ptr %invariant.gep, i64 %18
  %19 = load i8, ptr %gep, align 1, !tbaa !14
  %20 = uitofp i8 %19 to double
  %21 = getelementptr i8, ptr %gep, i64 1
  %22 = load i8, ptr %21, align 1, !tbaa !14
  %23 = uitofp i8 %22 to double
  %24 = fmul double %23, 5.870000e-01
  %25 = tail call double @llvm.fmuladd.f64(double %20, double 1.140000e-01, double %24)
  %26 = getelementptr i8, ptr %gep, i64 2
  %27 = load i8, ptr %26, align 1, !tbaa !14
  %28 = uitofp i8 %27 to double
  %29 = tail call double @llvm.fmuladd.f64(double %28, double 2.990000e-01, double %25)
  %30 = fcmp olt double %29, 0.000000e+00
  %31 = select i1 %30, double 0.000000e+00, double %29
  %32 = fcmp ogt double %31, 2.550000e+02
  %33 = select i1 %32, double 2.550000e+02, double %31
  %34 = fptosi double %33 to i32
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [256 x double], ptr %2, i64 0, i64 %35
  %37 = load double, ptr %36, align 8, !tbaa !15
  %38 = fadd double %37, 1.000000e+00
  store double %38, ptr %36, align 8, !tbaa !15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %17, !llvm.loop !17

._crit_edge.us:                                   ; preds = %17
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %.preheader.preheader, label %.preheader79.us, !llvm.loop !19

.preheader.preheader:                             ; preds = %._crit_edge.us, %1
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %._crit_edge ], [ 0, %.preheader.preheader ]
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %._crit_edge ], [ 1, %.preheader.preheader ]
  %.06988 = phi i32 [ %.1, %._crit_edge ], [ 0, %.preheader.preheader ]
  %.07387 = phi double [ %.174, %._crit_edge ], [ -1.000000e+00, %.preheader.preheader ]
  %.07686 = phi double [ %41, %._crit_edge ], [ 0.000000e+00, %.preheader.preheader ]
  %39 = getelementptr inbounds [256 x double], ptr %2, i64 0, i64 %indvars.iv111
  %40 = load double, ptr %39, align 8, !tbaa !15
  %41 = fadd double %.07686, %40
  %42 = fsub double %11, %41
  %43 = fcmp oeq double %42, 0.000000e+00
  br i1 %43, label %88, label %44

44:                                               ; preds = %.preheader
  %45 = fdiv double %41, %11
  %xtraiter = and i64 %indvars.iv105, 3
  %46 = icmp ult i64 %indvars.iv111, 3
  br i1 %46, label %.unr-lcssa, label %.new

.new:                                             ; preds = %44
  %unroll_iter = and i64 %indvars.iv105, 9223372036854775804
  br label %55

.unr-lcssa:                                       ; preds = %55, %44
  %.lcssa.ph = phi double [ poison, %44 ], [ %75, %55 ]
  %indvars.iv98.unr = phi i64 [ 0, %44 ], [ %indvars.iv.next99.3, %55 ]
  %.07282.unr = phi double [ 0.000000e+00, %44 ], [ %75, %55 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %indvars.iv98.epil = phi i64 [ %indvars.iv.next99.epil, %.epil.preheader ], [ %indvars.iv98.unr, %.unr-lcssa ]
  %.07282.epil = phi double [ %51, %.epil.preheader ], [ %.07282.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %47 = trunc nuw nsw i64 %indvars.iv98.epil to i32
  %48 = uitofp nneg i32 %47 to double
  %49 = getelementptr inbounds [256 x double], ptr %2, i64 0, i64 %indvars.iv98.epil
  %50 = load double, ptr %49, align 8, !tbaa !15
  %51 = tail call double @llvm.fmuladd.f64(double %48, double %50, double %.07282.epil)
  %indvars.iv.next99.epil = add nuw nsw i64 %indvars.iv98.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.epilog-lcssa, label %.epil.preheader, !llvm.loop !20

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %.unr-lcssa ], [ %51, %.epil.preheader ]
  %52 = fsub double 1.000000e+00, %45
  %53 = fdiv double %.lcssa, %41
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %54 = icmp ult i64 %indvars.iv111, 255
  br i1 %54, label %.lr.ph, label %._crit_edge

55:                                               ; preds = %55, %.new
  %indvars.iv98 = phi i64 [ 0, %.new ], [ %indvars.iv.next99.3, %55 ]
  %.07282 = phi double [ 0.000000e+00, %.new ], [ %75, %55 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.3, %55 ]
  %56 = trunc nuw nsw i64 %indvars.iv98 to i32
  %57 = uitofp nneg i32 %56 to double
  %58 = getelementptr inbounds [256 x double], ptr %2, i64 0, i64 %indvars.iv98
  %59 = load double, ptr %58, align 16, !tbaa !15
  %60 = tail call double @llvm.fmuladd.f64(double %57, double %59, double %.07282)
  %indvars.iv.next99 = or disjoint i64 %indvars.iv98, 1
  %61 = trunc nuw nsw i64 %indvars.iv.next99 to i32
  %62 = uitofp nneg i32 %61 to double
  %63 = getelementptr inbounds [256 x double], ptr %2, i64 0, i64 %indvars.iv.next99
  %64 = load double, ptr %63, align 8, !tbaa !15
  %65 = tail call double @llvm.fmuladd.f64(double %62, double %64, double %60)
  %indvars.iv.next99.1 = or disjoint i64 %indvars.iv98, 2
  %66 = trunc nuw nsw i64 %indvars.iv.next99.1 to i32
  %67 = uitofp nneg i32 %66 to double
  %68 = getelementptr inbounds [256 x double], ptr %2, i64 0, i64 %indvars.iv.next99.1
  %69 = load double, ptr %68, align 16, !tbaa !15
  %70 = tail call double @llvm.fmuladd.f64(double %67, double %69, double %65)
  %indvars.iv.next99.2 = or disjoint i64 %indvars.iv98, 3
  %71 = trunc nuw nsw i64 %indvars.iv.next99.2 to i32
  %72 = uitofp nneg i32 %71 to double
  %73 = getelementptr inbounds [256 x double], ptr %2, i64 0, i64 %indvars.iv.next99.2
  %74 = load double, ptr %73, align 8, !tbaa !15
  %75 = tail call double @llvm.fmuladd.f64(double %72, double %74, double %70)
  %indvars.iv.next99.3 = add nuw nsw i64 %indvars.iv98, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.unr-lcssa, label %55, !llvm.loop !22

._crit_edge:                                      ; preds = %.lr.ph, %.epilog-lcssa
  %.075.lcssa = phi double [ 0.000000e+00, %.epilog-lcssa ], [ %87, %.lr.ph ]
  %76 = fdiv double %.075.lcssa, %42
  %77 = fmul double %45, %52
  %78 = fsub double %53, %76
  %79 = fmul double %77, %78
  %80 = fmul double %78, %79
  %81 = fcmp olt double %.07387, %80
  %.174 = select i1 %81, double %80, double %.07387
  %82 = trunc nuw nsw i64 %indvars.iv111 to i32
  %.1 = select i1 %81, i32 %82, i32 %.06988
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond116.not = icmp eq i64 %indvars.iv.next112, 256
  br i1 %exitcond116.not, label %88, label %.preheader, !llvm.loop !23

.lr.ph:                                           ; preds = %.epilog-lcssa, %.lr.ph
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %.lr.ph ], [ %indvars.iv105, %.epilog-lcssa ]
  %.07584 = phi double [ %87, %.lr.ph ], [ 0.000000e+00, %.epilog-lcssa ]
  %83 = trunc nuw nsw i64 %indvars.iv107 to i32
  %84 = uitofp nneg i32 %83 to double
  %85 = getelementptr inbounds [256 x double], ptr %2, i64 0, i64 %indvars.iv107
  %86 = load double, ptr %85, align 8, !tbaa !15
  %87 = tail call double @llvm.fmuladd.f64(double %84, double %86, double %.07584)
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %exitcond110.not = icmp eq i64 %indvars.iv.next108, 256
  br i1 %exitcond110.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24

88:                                               ; preds = %.preheader, %._crit_edge
  %.069.lcssa = phi i32 [ %.06988, %.preheader ], [ %.1, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %2) #4
  ret i32 %.069.lcssa
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

attributes #0 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 0}
!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 4}
!12 = !{!6, !7, i64 12}
!13 = !{!6, !10, i64 24}
!14 = !{!8, !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !18}
!23 = distinct !{!23, !18}
!24 = distinct !{!24, !18}


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