; LLVM IR from cpuimage/cpuimagelib :: cpuimage (CPUImageMonochromeFilter)

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: nounwind uwtable
define dso_local void @CPUImageMonochromeFilter(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i8 noundef zeroext %5, i8 noundef zeroext %6, i8 noundef zeroext %7, i32 noundef %8) #3 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i16, align 2
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca [256 x i8], align 16
  %28 = alloca [256 x i8], align 16
  %29 = alloca [256 x i8], align 16
  %30 = alloca i32, align 4
  %31 = alloca float, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca i32, align 4
  %36 = alloca i8, align 1
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i32 %2, ptr %12, align 4, !tbaa !9
  store i32 %3, ptr %13, align 4, !tbaa !9
  store i32 %4, ptr %14, align 4, !tbaa !9
  store i8 %5, ptr %15, align 1, !tbaa !11
  store i8 %6, ptr %16, align 1, !tbaa !11
  store i8 %7, ptr %17, align 1, !tbaa !11
  store i32 %8, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %37 = load i32, ptr %14, align 4, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = sdiv i32 %37, %38
  store i32 %39, ptr %19, align 4, !tbaa !9
  %40 = load i32, ptr %19, align 4, !tbaa !9
  %41 = icmp eq i32 %40, 1
  br i1 %41, label %42, label %43

42:                                               ; preds = %9
  store i32 1, ptr %20, align 4
  br label %275

43:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 2, ptr %21) #4
  %44 = load i32, ptr %18, align 4, !tbaa !9
  %45 = icmp slt i32 %44, 100
  br i1 %45, label %46, label %48

46:                                               ; preds = %43
  %47 = load i32, ptr %18, align 4, !tbaa !9
  br label %49

48:                                               ; preds = %43
  br label %49

49:                                               ; preds = %48, %46
  %50 = phi i32 [ %47, %46 ], [ 100, %48 ]
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %52, label %60

52:                                               ; preds = %49
  %53 = load i32, ptr %18, align 4, !tbaa !9
  %54 = icmp slt i32 %53, 100
  br i1 %54, label %55, label %57

55:                                               ; preds = %52
  %56 = load i32, ptr %18, align 4, !tbaa !9
  br label %58

57:                                               ; preds = %52
  br label %58

58:                                               ; preds = %57, %55
  %59 = phi i32 [ %56, %55 ], [ 100, %57 ]
  br label %61

60:                                               ; preds = %49
  br label %61

61:                                               ; preds = %60, %58
  %62 = phi i32 [ %59, %58 ], [ 0, %60 ]
  %63 = trunc i32 %62 to i16
  store i16 %63, ptr %21, align 2, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %64 = load i16, ptr %21, align 2, !tbaa !12
  %65 = zext i16 %64 to i32
  %66 = sub nsw i32 100, %65
  %67 = mul nsw i32 256, %66
  %68 = sdiv i32 %67, 100
  store i32 %68, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %69 = load i16, ptr %21, align 2, !tbaa !12
  %70 = zext i16 %69 to i32
  %71 = sub nsw i32 100, %70
  %72 = sub nsw i32 100, %71
  %73 = mul nsw i32 256, %72
  %74 = sdiv i32 %73, 100
  store i32 %74, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %75 = load i8, ptr %15, align 1, !tbaa !11
  %76 = uitofp i8 %75 to float
  %77 = fmul float %76, 0x3F70101020000000
  store float %77, ptr %24, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %78 = load i8, ptr %16, align 1, !tbaa !11
  %79 = uitofp i8 %78 to float
  %80 = fmul float %79, 0x3F70101020000000
  store float %80, ptr %25, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %81 = load i8, ptr %17, align 1, !tbaa !11
  %82 = uitofp i8 %81 to float
  %83 = fmul float %82, 0x3F70101020000000
  store float %83, ptr %26, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 256, ptr %27) #4
  call void @llvm.memset.p0.i64(ptr align 16 %27, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 256, ptr %28) #4
  call void @llvm.memset.p0.i64(ptr align 16 %28, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 256, ptr %29) #4
  call void @llvm.memset.p0.i64(ptr align 16 %29, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %158, %61
  %85 = load i32, ptr %30, align 4, !tbaa !9
  %86 = icmp slt i32 %85, 256
  br i1 %86, label %88, label %87

87:                                               ; preds = %84
  store i32 2, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  br label %161

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %89 = load i32, ptr %30, align 4, !tbaa !9
  %90 = sitofp i32 %89 to float
  %91 = fmul float 0x3F70101020000000, %90
  store float %91, ptr %31, align 4, !tbaa !14
  %92 = load float, ptr %31, align 4, !tbaa !14
  %93 = fcmp olt float %92, 5.000000e-01
  br i1 %93, label %94, label %99

94:                                               ; preds = %88
  %95 = load float, ptr %31, align 4, !tbaa !14
  %96 = fmul float 2.000000e+00, %95
  %97 = load float, ptr %24, align 4, !tbaa !14
  %98 = fmul float %96, %97
  br label %107

99:                                               ; preds = %88
  %100 = load float, ptr %31, align 4, !tbaa !14
  %101 = fsub float 1.000000e+00, %100
  %102 = fmul float 2.000000e+00, %101
  %103 = load float, ptr %24, align 4, !tbaa !14
  %104 = fsub float 1.000000e+00, %103
  %105 = fneg float %102
  %106 = call float @llvm.fmuladd.f32(float %105, float %104, float 1.000000e+00)
  br label %107

107:                                              ; preds = %99, %94
  %108 = phi float [ %98, %94 ], [ %106, %99 ]
  %109 = fmul float 2.550000e+02, %108
  %110 = fptoui float %109 to i8
  %111 = load i32, ptr %30, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [256 x i8], ptr %27, i64 0, i64 %112
  store i8 %110, ptr %113, align 1, !tbaa !11
  %114 = load float, ptr %31, align 4, !tbaa !14
  %115 = fcmp olt float %114, 5.000000e-01
  br i1 %115, label %116, label %121

116:                                              ; preds = %107
  %117 = load float, ptr %31, align 4, !tbaa !14
  %118 = fmul float 2.000000e+00, %117
  %119 = load float, ptr %25, align 4, !tbaa !14
  %120 = fmul float %118, %119
  br label %129

121:                                              ; preds = %107
  %122 = load float, ptr %31, align 4, !tbaa !14
  %123 = fsub float 1.000000e+00, %122
  %124 = fmul float 2.000000e+00, %123
  %125 = load float, ptr %25, align 4, !tbaa !14
  %126 = fsub float 1.000000e+00, %125
  %127 = fneg float %124
  %128 = call float @llvm.fmuladd.f32(float %127, float %126, float 1.000000e+00)
  br label %129

129:                                              ; preds = %121, %116
  %130 = phi float [ %120, %116 ], [ %128, %121 ]
  %131 = fmul float 2.550000e+02, %130
  %132 = fptoui float %131 to i8
  %133 = load i32, ptr %30, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [256 x i8], ptr %28, i64 0, i64 %134
  store i8 %132, ptr %135, align 1, !tbaa !11
  %136 = load float, ptr %31, align 4, !tbaa !14
  %137 = fcmp olt float %136, 5.000000e-01
  br i1 %137, label %138, label %143

138:                                              ; preds = %129
  %139 = load float, ptr %31, align 4, !tbaa !14
  %140 = fmul float 2.000000e+00, %139
  %141 = load float, ptr %26, align 4, !tbaa !14
  %142 = fmul float %140, %141
  br label %151

143:                                              ; preds = %129
  %144 = load float, ptr %31, align 4, !tbaa !14
  %145 = fsub float 1.000000e+00, %144
  %146 = fmul float 2.000000e+00, %145
  %147 = load float, ptr %26, align 4, !tbaa !14
  %148 = fsub float 1.000000e+00, %147
  %149 = fneg float %146
  %150 = call float @llvm.fmuladd.f32(float %149, float %148, float 1.000000e+00)
  br label %151

151:                                              ; preds = %143, %138
  %152 = phi float [ %142, %138 ], [ %150, %143 ]
  %153 = fmul float 2.550000e+02, %152
  %154 = fptoui float %153 to i8
  %155 = load i32, ptr %30, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [256 x i8], ptr %29, i64 0, i64 %156
  store i8 %154, ptr %157, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  br label %158

158:                                              ; preds = %151
  %159 = load i32, ptr %30, align 4, !tbaa !9
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %30, align 4, !tbaa !9
  br label %84, !llvm.loop !16

161:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %271, %161
  %163 = load i32, ptr %32, align 4, !tbaa !9
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = icmp slt i32 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %162
  store i32 5, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  br label %274

167:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  %169 = load i32, ptr %32, align 4, !tbaa !9
  %170 = load i32, ptr %14, align 4, !tbaa !9
  %171 = mul nsw i32 %169, %170
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i8, ptr %168, i64 %172
  store ptr %173, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = load i32, ptr %32, align 4, !tbaa !9
  %176 = load i32, ptr %14, align 4, !tbaa !9
  %177 = mul nsw i32 %175, %176
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds i8, ptr %174, i64 %178
  store ptr %179, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %180

180:                                              ; preds = %267, %167
  %181 = load i32, ptr %35, align 4, !tbaa !9
  %182 = load i32, ptr %12, align 4, !tbaa !9
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  store i32 8, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  br label %270

185:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #4
  %186 = load ptr, ptr %34, align 8, !tbaa !5
  %187 = getelementptr inbounds i8, ptr %186, i64 0
  %188 = load i8, ptr %187, align 1, !tbaa !11
  %189 = zext i8 %188 to i32
  %190 = mul nsw i32 13926, %189
  %191 = load ptr, ptr %34, align 8, !tbaa !5
  %192 = getelementptr inbounds i8, ptr %191, i64 1
  %193 = load i8, ptr %192, align 1, !tbaa !11
  %194 = zext i8 %193 to i32
  %195 = mul nsw i32 46884, %194
  %196 = add nsw i32 %190, %195
  %197 = load ptr, ptr %34, align 8, !tbaa !5
  %198 = getelementptr inbounds i8, ptr %197, i64 2
  %199 = load i8, ptr %198, align 1, !tbaa !11
  %200 = zext i8 %199 to i32
  %201 = mul nsw i32 4725, %200
  %202 = add nsw i32 %196, %201
  %203 = ashr i32 %202, 16
  %204 = trunc i32 %203 to i8
  store i8 %204, ptr %36, align 1, !tbaa !11
  %205 = load ptr, ptr %34, align 8, !tbaa !5
  %206 = getelementptr inbounds i8, ptr %205, i64 0
  %207 = load i8, ptr %206, align 1, !tbaa !11
  %208 = zext i8 %207 to i32
  %209 = load i32, ptr %22, align 4, !tbaa !9
  %210 = mul nsw i32 %208, %209
  %211 = load i8, ptr %36, align 1, !tbaa !11
  %212 = zext i8 %211 to i64
  %213 = getelementptr inbounds [256 x i8], ptr %27, i64 0, i64 %212
  %214 = load i8, ptr %213, align 1, !tbaa !11
  %215 = zext i8 %214 to i32
  %216 = load i32, ptr %23, align 4, !tbaa !9
  %217 = mul nsw i32 %215, %216
  %218 = add nsw i32 %210, %217
  %219 = ashr i32 %218, 8
  %220 = trunc i32 %219 to i8
  %221 = load ptr, ptr %33, align 8, !tbaa !5
  %222 = getelementptr inbounds i8, ptr %221, i64 0
  store i8 %220, ptr %222, align 1, !tbaa !11
  %223 = load ptr, ptr %34, align 8, !tbaa !5
  %224 = getelementptr inbounds i8, ptr %223, i64 1
  %225 = load i8, ptr %224, align 1, !tbaa !11
  %226 = zext i8 %225 to i32
  %227 = load i32, ptr %22, align 4, !tbaa !9
  %228 = mul nsw i32 %226, %227
  %229 = load i8, ptr %36, align 1, !tbaa !11
  %230 = zext i8 %229 to i64
  %231 = getelementptr inbounds [256 x i8], ptr %28, i64 0, i64 %230
  %232 = load i8, ptr %231, align 1, !tbaa !11
  %233 = zext i8 %232 to i32
  %234 = load i32, ptr %23, align 4, !tbaa !9
  %235 = mul nsw i32 %233, %234
  %236 = add nsw i32 %228, %235
  %237 = ashr i32 %236, 8
  %238 = trunc i32 %237 to i8
  %239 = load ptr, ptr %33, align 8, !tbaa !5
  %240 = getelementptr inbounds i8, ptr %239, i64 1
  store i8 %238, ptr %240, align 1, !tbaa !11
  %241 = load ptr, ptr %34, align 8, !tbaa !5
  %242 = getelementptr inbounds i8, ptr %241, i64 2
  %243 = load i8, ptr %242, align 1, !tbaa !11
  %244 = zext i8 %243 to i32
  %245 = load i32, ptr %22, align 4, !tbaa !9
  %246 = mul nsw i32 %244, %245
  %247 = load i8, ptr %36, align 1, !tbaa !11
  %248 = zext i8 %247 to i64
  %249 = getelementptr inbounds [256 x i8], ptr %29, i64 0, i64 %248
  %250 = load i8, ptr %249, align 1, !tbaa !11
  %251 = zext i8 %250 to i32
  %252 = load i32, ptr %23, align 4, !tbaa !9
  %253 = mul nsw i32 %251, %252
  %254 = add nsw i32 %246, %253
  %255 = ashr i32 %254, 8
  %256 = trunc i32 %255 to i8
  %257 = load ptr, ptr %33, align 8, !tbaa !5
  %258 = getelementptr inbounds i8, ptr %257, i64 2
  store i8 %256, ptr %258, align 1, !tbaa !11
  %259 = load i32, ptr %19, align 4, !tbaa !9
  %260 = load ptr, ptr %34, align 8, !tbaa !5
  %261 = sext i32 %259 to i64
  %262 = getelementptr inbounds i8, ptr %260, i64 %261
  store ptr %262, ptr %34, align 8, !tbaa !5
  %263 = load i32, ptr %19, align 4, !tbaa !9
  %264 = load ptr, ptr %33, align 8, !tbaa !5
  %265 = sext i32 %263 to i64
  %266 = getelementptr inbounds i8, ptr %264, i64 %265
  store ptr %266, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #4
  br label %267

267:                                              ; preds = %185
  %268 = load i32, ptr %35, align 4, !tbaa !9
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %35, align 4, !tbaa !9
  br label %180, !llvm.loop !18

270:                                              ; preds = %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %32, align 4, !tbaa !9
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %32, align 4, !tbaa !9
  br label %162, !llvm.loop !19

274:                                              ; preds = %166
  call void @llvm.lifetime.end.p0(i64 256, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %21) #4
  store i32 0, ptr %20, align 4
  br label %275

275:                                              ; preds = %274, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  %276 = load i32, ptr %20, align 4
  switch i32 %276, label %278 [
    i32 0, label %277
    i32 1, label %277
  ]

277:                                              ; preds = %275, %275
  ret void

278:                                              ; preds = %275
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @CPUImageMonochromeFilter(ptr nocapture noundef readonly %0, ptr nocapture noundef writeonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i8 noundef zeroext %5, i8 noundef zeroext %6, i8 noundef zeroext %7, i32 noundef %8) local_unnamed_addr #2 {
  %10 = alloca [256 x i8], align 16
  %11 = alloca [256 x i8], align 16
  %12 = alloca [256 x i8], align 16
  %13 = sdiv i32 %4, %2
  %14 = icmp eq i32 %13, 1
  br i1 %14, label %107, label %vector.ph

vector.ph:                                        ; preds = %9
  %15 = tail call i32 @llvm.smin.i32(i32 %8, i32 100)
  %16 = tail call i32 @llvm.smax.i32(i32 %15, i32 0)
  %.tr = trunc nsw i32 %16 to i16
  %17 = shl nuw nsw i16 %.tr, 8
  %.lhs.trunc = sub nuw nsw i16 25600, %17
  %18 = udiv i16 %.lhs.trunc, 100
  %19 = udiv i16 %17, 100
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %10) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %10, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %11) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %11, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %12) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %12, i8 0, i64 256, i1 false)
  %20 = uitofp i8 %7 to float
  %21 = fmul float %20, 0x3F70101020000000
  %22 = fsub float 1.000000e+00, %21
  %23 = uitofp i8 %6 to float
  %24 = fmul float %23, 0x3F70101020000000
  %25 = fsub float 1.000000e+00, %24
  %26 = uitofp i8 %5 to float
  %27 = fmul float %26, 0x3F70101020000000
  %28 = fsub float 1.000000e+00, %27
  %broadcast.splatinsert = insertelement <16 x float> poison, float %28, i64 0
  %broadcast.splat = shufflevector <16 x float> %broadcast.splatinsert, <16 x float> poison, <16 x i32> zeroinitializer
  %broadcast.splatinsert90 = insertelement <16 x float> poison, float %25, i64 0
  %broadcast.splat91 = shufflevector <16 x float> %broadcast.splatinsert90, <16 x float> poison, <16 x i32> zeroinitializer
  %broadcast.splatinsert92 = insertelement <16 x float> poison, float %22, i64 0
  %broadcast.splat93 = shufflevector <16 x float> %broadcast.splatinsert92, <16 x float> poison, <16 x i32> zeroinitializer
  %broadcast.splatinsert94 = insertelement <16 x float> poison, float %27, i64 0
  %broadcast.splat95 = shufflevector <16 x float> %broadcast.splatinsert94, <16 x float> poison, <16 x i32> zeroinitializer
  %broadcast.splatinsert96 = insertelement <16 x float> poison, float %24, i64 0
  %broadcast.splat97 = shufflevector <16 x float> %broadcast.splatinsert96, <16 x float> poison, <16 x i32> zeroinitializer
  %broadcast.splatinsert98 = insertelement <16 x float> poison, float %21, i64 0
  %broadcast.splat99 = shufflevector <16 x float> %broadcast.splatinsert98, <16 x float> poison, <16 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <16 x i32> [ <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %29 = uitofp <16 x i32> %vec.ind to <16 x float>
  %30 = fmul <16 x float> %29, <float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000, float 0x3F70101020000000>
  %31 = fcmp uge <16 x float> %30, <float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01>
  %32 = fsub <16 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, %30
  %33 = fmul <16 x float> %32, <float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00, float -2.000000e+00>
  %34 = tail call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %33, <16 x float> %broadcast.splat, <16 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>)
  %35 = tail call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %33, <16 x float> %broadcast.splat91, <16 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>)
  %36 = tail call <16 x float> @llvm.fmuladd.v16f32(<16 x float> %33, <16 x float> %broadcast.splat93, <16 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>)
  %37 = fmul <16 x float> %30, <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>
  %38 = fmul <16 x float> %broadcast.splat95, %37
  %39 = fmul <16 x float> %broadcast.splat97, %37
  %40 = fmul <16 x float> %broadcast.splat99, %37
  %predphi = select <16 x i1> %31, <16 x float> %34, <16 x float> %38
  %predphi100 = select <16 x i1> %31, <16 x float> %35, <16 x float> %39
  %predphi101 = select <16 x i1> %31, <16 x float> %36, <16 x float> %40
  %41 = fmul <16 x float> %predphi100, <float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02>
  %42 = fptoui <16 x float> %41 to <16 x i8>
  %43 = fmul <16 x float> %predphi, <float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02>
  %44 = fptoui <16 x float> %43 to <16 x i8>
  %45 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 %index
  store <16 x i8> %44, ptr %45, align 16
  %46 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 %index
  store <16 x i8> %42, ptr %46, align 16
  %47 = fmul <16 x float> %predphi101, <float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02, float 2.550000e+02>
  %48 = fptoui <16 x float> %47 to <16 x i8>
  %49 = getelementptr inbounds [256 x i8], ptr %12, i64 0, i64 %index
  store <16 x i8> %48, ptr %49, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 16
  %vec.ind.next = add <16 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %50 = icmp eq i64 %index.next, 256
  br i1 %50, label %.preheader, label %vector.body, !llvm.loop !8

.preheader:                                       ; preds = %vector.body
  %.zext = zext nneg i16 %18 to i32
  %.zext74 = zext nneg i16 %19 to i32
  %51 = icmp sgt i32 %3, 0
  br i1 %51, label %.lr.ph80, label %._crit_edge81

.lr.ph80:                                         ; preds = %.preheader
  %52 = icmp sgt i32 %2, 0
  %53 = sext i32 %13 to i64
  br i1 %52, label %.lr.ph.us.preheader, label %._crit_edge81

.lr.ph.us.preheader:                              ; preds = %.lr.ph80
  %54 = sext i32 %4 to i64
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %._crit_edge.us
  %indvars.iv85 = phi i64 [ 0, %.lr.ph.us.preheader ], [ %indvars.iv.next86, %._crit_edge.us ]
  %55 = mul nsw i64 %indvars.iv85, %54
  %56 = getelementptr inbounds i8, ptr %1, i64 %55
  %57 = getelementptr inbounds i8, ptr %0, i64 %55
  br label %58

58:                                               ; preds = %.lr.ph.us, %58
  %.078.us = phi i32 [ 0, %.lr.ph.us ], [ %106, %58 ]
  %.06677.us = phi ptr [ %57, %.lr.ph.us ], [ %104, %58 ]
  %.06776.us = phi ptr [ %56, %.lr.ph.us ], [ %105, %58 ]
  %59 = load i8, ptr %.06677.us, align 1, !tbaa !5
  %60 = zext i8 %59 to i32
  %61 = mul nuw nsw i32 %60, 13926
  %62 = getelementptr inbounds i8, ptr %.06677.us, i64 1
  %63 = load i8, ptr %62, align 1, !tbaa !5
  %64 = zext i8 %63 to i32
  %65 = mul nuw nsw i32 %64, 46884
  %66 = add nuw nsw i32 %65, %61
  %67 = getelementptr inbounds i8, ptr %.06677.us, i64 2
  %68 = load i8, ptr %67, align 1, !tbaa !5
  %69 = zext i8 %68 to i32
  %70 = mul nuw nsw i32 %69, 4725
  %71 = add nuw nsw i32 %66, %70
  %72 = lshr i32 %71, 16
  %73 = mul nuw nsw i32 %60, %.zext
  %74 = zext nneg i32 %72 to i64
  %75 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !5
  %77 = zext i8 %76 to i32
  %78 = mul nuw nsw i32 %77, %.zext74
  %79 = add nuw nsw i32 %78, %73
  %80 = lshr i32 %79, 8
  %81 = trunc i32 %80 to i8
  store i8 %81, ptr %.06776.us, align 1, !tbaa !5
  %82 = load i8, ptr %62, align 1, !tbaa !5
  %83 = zext i8 %82 to i32
  %84 = mul nuw nsw i32 %83, %.zext
  %85 = getelementptr inbounds [256 x i8], ptr %11, i64 0, i64 %74
  %86 = load i8, ptr %85, align 1, !tbaa !5
  %87 = zext i8 %86 to i32
  %88 = mul nuw nsw i32 %87, %.zext74
  %89 = add nuw nsw i32 %88, %84
  %90 = lshr i32 %89, 8
  %91 = trunc i32 %90 to i8
  %92 = getelementptr inbounds i8, ptr %.06776.us, i64 1
  store i8 %91, ptr %92, align 1, !tbaa !5
  %93 = load i8, ptr %67, align 1, !tbaa !5
  %94 = zext i8 %93 to i32
  %95 = mul nuw nsw i32 %94, %.zext
  %96 = getelementptr inbounds [256 x i8], ptr %12, i64 0, i64 %74
  %97 = load i8, ptr %96, align 1, !tbaa !5
  %98 = zext i8 %97 to i32
  %99 = mul nuw nsw i32 %98, %.zext74
  %100 = add nuw nsw i32 %99, %95
  %101 = lshr i32 %100, 8
  %102 = trunc i32 %101 to i8
  %103 = getelementptr inbounds i8, ptr %.06776.us, i64 2
  store i8 %102, ptr %103, align 1, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %.06677.us, i64 %53
  %105 = getelementptr inbounds i8, ptr %.06776.us, i64 %53
  %106 = add nuw nsw i32 %.078.us, 1
  %exitcond84.not = icmp eq i32 %106, %2
  br i1 %exitcond84.not, label %._crit_edge.us, label %58, !llvm.loop !12

._crit_edge.us:                                   ; preds = %58
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count
  br i1 %exitcond88.not, label %._crit_edge81, label %.lr.ph.us, !llvm.loop !13

._crit_edge81:                                    ; preds = %._crit_edge.us, %.lr.ph80, %.preheader
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %10) #4
  br label %107

107:                                              ; preds = %9, %._crit_edge81
  ret void
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <16 x float> @llvm.fmuladd.v16f32(<16 x float>, <16 x float>, <16 x float>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nofree norecurse nosync nounwind memory(readwrite, 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9, !10, !11}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !9}
!13 = distinct !{!13, !9}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass