; LLVM IR from zchrissirhcz/pixel :: src (px_sobel)

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

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.px_sobel3x3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@__const.px_sobel3x3.kx = external hidden unnamed_addr constant [9 x i8], align 1
@__const.px_sobel3x3.ky = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @px_sobel3x3(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [9 x i8], align 1
  %6 = alloca [9 x i8], align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i16, align 2
  %25 = alloca i16, align 2
  %26 = alloca i16, align 2
  %27 = alloca i16, align 2
  %28 = alloca i16, align 2
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca float, align 4
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %43

39:                                               ; preds = %2
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  br label %44

43:                                               ; preds = %39, %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 9, ptr noundef @__PRETTY_FUNCTION__.px_sobel3x3) #7
  unreachable

44:                                               ; preds = %42
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.px_image_t, ptr %45, i32 0, i32 3
  %47 = load i32, ptr %46, align 8, !tbaa !9
  %48 = icmp eq i32 %47, 1
  br i1 %48, label %49, label %50

49:                                               ; preds = %44
  br label %51

50:                                               ; preds = %44
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 10, ptr noundef @__PRETTY_FUNCTION__.px_sobel3x3) #7
  unreachable

51:                                               ; preds = %49
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.px_image_t, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 8, !tbaa !9
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %57

56:                                               ; preds = %51
  br label %58

57:                                               ; preds = %51
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 11, ptr noundef @__PRETTY_FUNCTION__.px_sobel3x3) #7
  unreachable

58:                                               ; preds = %56
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.px_image_t, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !12
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.px_image_t, ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 8, !tbaa !12
  %65 = icmp eq i32 %61, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %58
  br label %68

67:                                               ; preds = %58
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 12, ptr noundef @__PRETTY_FUNCTION__.px_sobel3x3) #7
  unreachable

68:                                               ; preds = %66
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.px_image_t, ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 4, !tbaa !13
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.px_image_t, ptr %72, i32 0, i32 2
  %74 = load i32, ptr %73, align 4, !tbaa !13
  %75 = icmp eq i32 %71, %74
  br i1 %75, label %76, label %77

76:                                               ; preds = %68
  br label %78

77:                                               ; preds = %68
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 13, ptr noundef @__PRETTY_FUNCTION__.px_sobel3x3) #7
  unreachable

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 9, ptr %5) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %5, ptr align 1 @__const.px_sobel3x3.kx, i64 9, i1 false)
  call void @llvm.lifetime.start.p0(i64 9, ptr %6) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %6, ptr align 1 @__const.px_sobel3x3.ky, i64 9, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %79 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 0
  %80 = getelementptr inbounds i8, ptr %79, i64 0
  store ptr %80, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %81 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 0
  %82 = getelementptr inbounds i8, ptr %81, i64 3
  store ptr %82, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %83 = getelementptr inbounds [9 x i8], ptr %5, i64 0, i64 0
  %84 = getelementptr inbounds i8, ptr %83, i64 6
  store ptr %84, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %85 = getelementptr inbounds [9 x i8], ptr %6, i64 0, i64 0
  %86 = getelementptr inbounds i8, ptr %85, i64 0
  store ptr %86, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %87 = getelementptr inbounds [9 x i8], ptr %6, i64 0, i64 0
  %88 = getelementptr inbounds i8, ptr %87, i64 3
  store ptr %88, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %89 = getelementptr inbounds [9 x i8], ptr %6, i64 0, i64 0
  %90 = getelementptr inbounds i8, ptr %89, i64 6
  store ptr %90, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.px_image_t, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !13
  store i32 %93, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.px_image_t, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 8, !tbaa !12
  store i32 %96, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %97 = load i32, ptr %13, align 4, !tbaa !14
  %98 = load i32, ptr %14, align 4, !tbaa !14
  %99 = mul nsw i32 %97, %98
  %100 = sext i32 %99 to i64
  %101 = mul i64 %100, 2
  %102 = trunc i64 %101 to i32
  store i32 %102, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %103 = load i32, ptr %15, align 4, !tbaa !14
  %104 = sext i32 %103 to i64
  %105 = call noalias ptr @malloc(i64 noundef %104) #9
  store ptr %105, ptr %16, align 8, !tbaa !5
  %106 = load ptr, ptr %16, align 8, !tbaa !5
  %107 = load i32, ptr %15, align 4, !tbaa !14
  %108 = sext i32 %107 to i64
  call void @llvm.memset.p0.i64(ptr align 2 %106, i8 0, i64 %108, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 1, ptr %17, align 4, !tbaa !14
  br label %109

109:                                              ; preds = %373, %78
  %110 = load i32, ptr %17, align 4, !tbaa !14
  %111 = load i32, ptr %13, align 4, !tbaa !14
  %112 = sub nsw i32 %111, 1
  %113 = icmp slt i32 %110, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %109
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %376

115:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %116 = load ptr, ptr %16, align 8, !tbaa !5
  %117 = load i32, ptr %17, align 4, !tbaa !14
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.px_image_t, ptr %118, i32 0, i32 4
  %120 = load i32, ptr %119, align 4, !tbaa !15
  %121 = mul nsw i32 %117, %120
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i16, ptr %116, i64 %122
  store ptr %123, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %124 = load ptr, ptr %3, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.px_image_t, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !16
  %127 = load i32, ptr %17, align 4, !tbaa !14
  %128 = sub nsw i32 %127, 1
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.px_image_t, ptr %129, i32 0, i32 4
  %131 = load i32, ptr %130, align 4, !tbaa !15
  %132 = mul nsw i32 %128, %131
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i8, ptr %126, i64 %133
  store ptr %134, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.px_image_t, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !16
  %138 = load i32, ptr %17, align 4, !tbaa !14
  %139 = add nsw i32 %138, 0
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.px_image_t, ptr %140, i32 0, i32 4
  %142 = load i32, ptr %141, align 4, !tbaa !15
  %143 = mul nsw i32 %139, %142
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i8, ptr %137, i64 %144
  store ptr %145, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.px_image_t, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !16
  %149 = load i32, ptr %17, align 4, !tbaa !14
  %150 = add nsw i32 %149, 1
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.px_image_t, ptr %151, i32 0, i32 4
  %153 = load i32, ptr %152, align 4, !tbaa !15
  %154 = mul nsw i32 %150, %153
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds i8, ptr %148, i64 %155
  store ptr %156, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 1, ptr %23, align 4, !tbaa !14
  br label %157

157:                                              ; preds = %369, %115
  %158 = load i32, ptr %23, align 4, !tbaa !14
  %159 = load i32, ptr %14, align 4, !tbaa !14
  %160 = sub nsw i32 %159, 1
  %161 = icmp slt i32 %158, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %157
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %372

163:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #8
  %164 = load ptr, ptr %20, align 8, !tbaa !5
  %165 = getelementptr inbounds i8, ptr %164, i64 0
  %166 = load i8, ptr %165, align 1, !tbaa !17
  %167 = zext i8 %166 to i32
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = getelementptr inbounds i8, ptr %168, i64 0
  %170 = load i8, ptr %169, align 1, !tbaa !17
  %171 = sext i8 %170 to i32
  %172 = mul nsw i32 %167, %171
  %173 = load ptr, ptr %20, align 8, !tbaa !5
  %174 = getelementptr inbounds i8, ptr %173, i64 1
  %175 = load i8, ptr %174, align 1, !tbaa !17
  %176 = zext i8 %175 to i32
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = getelementptr inbounds i8, ptr %177, i64 1
  %179 = load i8, ptr %178, align 1, !tbaa !17
  %180 = sext i8 %179 to i32
  %181 = mul nsw i32 %176, %180
  %182 = add nsw i32 %172, %181
  %183 = load ptr, ptr %20, align 8, !tbaa !5
  %184 = getelementptr inbounds i8, ptr %183, i64 2
  %185 = load i8, ptr %184, align 1, !tbaa !17
  %186 = zext i8 %185 to i32
  %187 = load ptr, ptr %7, align 8, !tbaa !5
  %188 = getelementptr inbounds i8, ptr %187, i64 2
  %189 = load i8, ptr %188, align 1, !tbaa !17
  %190 = sext i8 %189 to i32
  %191 = mul nsw i32 %186, %190
  %192 = add nsw i32 %182, %191
  %193 = load ptr, ptr %21, align 8, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %193, i64 0
  %195 = load i8, ptr %194, align 1, !tbaa !17
  %196 = zext i8 %195 to i32
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = getelementptr inbounds i8, ptr %197, i64 0
  %199 = load i8, ptr %198, align 1, !tbaa !17
  %200 = sext i8 %199 to i32
  %201 = mul nsw i32 %196, %200
  %202 = add nsw i32 %192, %201
  %203 = load ptr, ptr %21, align 8, !tbaa !5
  %204 = getelementptr inbounds i8, ptr %203, i64 1
  %205 = load i8, ptr %204, align 1, !tbaa !17
  %206 = zext i8 %205 to i32
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = getelementptr inbounds i8, ptr %207, i64 1
  %209 = load i8, ptr %208, align 1, !tbaa !17
  %210 = sext i8 %209 to i32
  %211 = mul nsw i32 %206, %210
  %212 = add nsw i32 %202, %211
  %213 = load ptr, ptr %21, align 8, !tbaa !5
  %214 = getelementptr inbounds i8, ptr %213, i64 2
  %215 = load i8, ptr %214, align 1, !tbaa !17
  %216 = zext i8 %215 to i32
  %217 = load ptr, ptr %8, align 8, !tbaa !5
  %218 = getelementptr inbounds i8, ptr %217, i64 2
  %219 = load i8, ptr %218, align 1, !tbaa !17
  %220 = sext i8 %219 to i32
  %221 = mul nsw i32 %216, %220
  %222 = add nsw i32 %212, %221
  %223 = load ptr, ptr %22, align 8, !tbaa !5
  %224 = getelementptr inbounds i8, ptr %223, i64 0
  %225 = load i8, ptr %224, align 1, !tbaa !17
  %226 = zext i8 %225 to i32
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = getelementptr inbounds i8, ptr %227, i64 0
  %229 = load i8, ptr %228, align 1, !tbaa !17
  %230 = sext i8 %229 to i32
  %231 = mul nsw i32 %226, %230
  %232 = add nsw i32 %222, %231
  %233 = load ptr, ptr %22, align 8, !tbaa !5
  %234 = getelementptr inbounds i8, ptr %233, i64 1
  %235 = load i8, ptr %234, align 1, !tbaa !17
  %236 = zext i8 %235 to i32
  %237 = load ptr, ptr %9, align 8, !tbaa !5
  %238 = getelementptr inbounds i8, ptr %237, i64 1
  %239 = load i8, ptr %238, align 1, !tbaa !17
  %240 = sext i8 %239 to i32
  %241 = mul nsw i32 %236, %240
  %242 = add nsw i32 %232, %241
  %243 = load ptr, ptr %22, align 8, !tbaa !5
  %244 = getelementptr inbounds i8, ptr %243, i64 2
  %245 = load i8, ptr %244, align 1, !tbaa !17
  %246 = zext i8 %245 to i32
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  %248 = getelementptr inbounds i8, ptr %247, i64 2
  %249 = load i8, ptr %248, align 1, !tbaa !17
  %250 = sext i8 %249 to i32
  %251 = mul nsw i32 %246, %250
  %252 = add nsw i32 %242, %251
  %253 = trunc i32 %252 to i16
  store i16 %253, ptr %24, align 2, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 2, ptr %25) #8
  %254 = load ptr, ptr %20, align 8, !tbaa !5
  %255 = getelementptr inbounds i8, ptr %254, i64 0
  %256 = load i8, ptr %255, align 1, !tbaa !17
  %257 = zext i8 %256 to i32
  %258 = load ptr, ptr %10, align 8, !tbaa !5
  %259 = getelementptr inbounds i8, ptr %258, i64 0
  %260 = load i8, ptr %259, align 1, !tbaa !17
  %261 = sext i8 %260 to i32
  %262 = mul nsw i32 %257, %261
  %263 = load ptr, ptr %20, align 8, !tbaa !5
  %264 = getelementptr inbounds i8, ptr %263, i64 1
  %265 = load i8, ptr %264, align 1, !tbaa !17
  %266 = zext i8 %265 to i32
  %267 = load ptr, ptr %10, align 8, !tbaa !5
  %268 = getelementptr inbounds i8, ptr %267, i64 1
  %269 = load i8, ptr %268, align 1, !tbaa !17
  %270 = sext i8 %269 to i32
  %271 = mul nsw i32 %266, %270
  %272 = add nsw i32 %262, %271
  %273 = load ptr, ptr %20, align 8, !tbaa !5
  %274 = getelementptr inbounds i8, ptr %273, i64 2
  %275 = load i8, ptr %274, align 1, !tbaa !17
  %276 = zext i8 %275 to i32
  %277 = load ptr, ptr %10, align 8, !tbaa !5
  %278 = getelementptr inbounds i8, ptr %277, i64 2
  %279 = load i8, ptr %278, align 1, !tbaa !17
  %280 = sext i8 %279 to i32
  %281 = mul nsw i32 %276, %280
  %282 = add nsw i32 %272, %281
  %283 = load ptr, ptr %21, align 8, !tbaa !5
  %284 = getelementptr inbounds i8, ptr %283, i64 0
  %285 = load i8, ptr %284, align 1, !tbaa !17
  %286 = zext i8 %285 to i32
  %287 = load ptr, ptr %11, align 8, !tbaa !5
  %288 = getelementptr inbounds i8, ptr %287, i64 0
  %289 = load i8, ptr %288, align 1, !tbaa !17
  %290 = sext i8 %289 to i32
  %291 = mul nsw i32 %286, %290
  %292 = add nsw i32 %282, %291
  %293 = load ptr, ptr %21, align 8, !tbaa !5
  %294 = getelementptr inbounds i8, ptr %293, i64 1
  %295 = load i8, ptr %294, align 1, !tbaa !17
  %296 = zext i8 %295 to i32
  %297 = load ptr, ptr %11, align 8, !tbaa !5
  %298 = getelementptr inbounds i8, ptr %297, i64 1
  %299 = load i8, ptr %298, align 1, !tbaa !17
  %300 = sext i8 %299 to i32
  %301 = mul nsw i32 %296, %300
  %302 = add nsw i32 %292, %301
  %303 = load ptr, ptr %21, align 8, !tbaa !5
  %304 = getelementptr inbounds i8, ptr %303, i64 2
  %305 = load i8, ptr %304, align 1, !tbaa !17
  %306 = zext i8 %305 to i32
  %307 = load ptr, ptr %11, align 8, !tbaa !5
  %308 = getelementptr inbounds i8, ptr %307, i64 2
  %309 = load i8, ptr %308, align 1, !tbaa !17
  %310 = sext i8 %309 to i32
  %311 = mul nsw i32 %306, %310
  %312 = add nsw i32 %302, %311
  %313 = load ptr, ptr %22, align 8, !tbaa !5
  %314 = getelementptr inbounds i8, ptr %313, i64 0
  %315 = load i8, ptr %314, align 1, !tbaa !17
  %316 = zext i8 %315 to i32
  %317 = load ptr, ptr %12, align 8, !tbaa !5
  %318 = getelementptr inbounds i8, ptr %317, i64 0
  %319 = load i8, ptr %318, align 1, !tbaa !17
  %320 = sext i8 %319 to i32
  %321 = mul nsw i32 %316, %320
  %322 = add nsw i32 %312, %321
  %323 = load ptr, ptr %22, align 8, !tbaa !5
  %324 = getelementptr inbounds i8, ptr %323, i64 1
  %325 = load i8, ptr %324, align 1, !tbaa !17
  %326 = zext i8 %325 to i32
  %327 = load ptr, ptr %12, align 8, !tbaa !5
  %328 = getelementptr inbounds i8, ptr %327, i64 1
  %329 = load i8, ptr %328, align 1, !tbaa !17
  %330 = sext i8 %329 to i32
  %331 = mul nsw i32 %326, %330
  %332 = add nsw i32 %322, %331
  %333 = load ptr, ptr %22, align 8, !tbaa !5
  %334 = getelementptr inbounds i8, ptr %333, i64 2
  %335 = load i8, ptr %334, align 1, !tbaa !17
  %336 = zext i8 %335 to i32
  %337 = load ptr, ptr %12, align 8, !tbaa !5
  %338 = getelementptr inbounds i8, ptr %337, i64 2
  %339 = load i8, ptr %338, align 1, !tbaa !17
  %340 = sext i8 %339 to i32
  %341 = mul nsw i32 %336, %340
  %342 = add nsw i32 %332, %341
  %343 = trunc i32 %342 to i16
  store i16 %343, ptr %25, align 2, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 2, ptr %26) #8
  %344 = load i16, ptr %24, align 2, !tbaa !18
  %345 = sext i16 %344 to i32
  %346 = load i16, ptr %24, align 2, !tbaa !18
  %347 = sext i16 %346 to i32
  %348 = mul nsw i32 %345, %347
  %349 = load i16, ptr %25, align 2, !tbaa !18
  %350 = sext i16 %349 to i32
  %351 = load i16, ptr %25, align 2, !tbaa !18
  %352 = sext i16 %351 to i32
  %353 = mul nsw i32 %350, %352
  %354 = add nsw i32 %348, %353
  %355 = sitofp i32 %354 to double
  %356 = call double @sqrt(double noundef %355) #8
  %357 = fptosi double %356 to i16
  store i16 %357, ptr %26, align 2, !tbaa !18
  %358 = load ptr, ptr %20, align 8, !tbaa !5
  %359 = getelementptr inbounds i8, ptr %358, i32 1
  store ptr %359, ptr %20, align 8, !tbaa !5
  %360 = load ptr, ptr %21, align 8, !tbaa !5
  %361 = getelementptr inbounds i8, ptr %360, i32 1
  store ptr %361, ptr %21, align 8, !tbaa !5
  %362 = load ptr, ptr %22, align 8, !tbaa !5
  %363 = getelementptr inbounds i8, ptr %362, i32 1
  store ptr %363, ptr %22, align 8, !tbaa !5
  %364 = load i16, ptr %26, align 2, !tbaa !18
  %365 = load ptr, ptr %19, align 8, !tbaa !5
  %366 = load i32, ptr %23, align 4, !tbaa !14
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds i16, ptr %365, i64 %367
  store i16 %364, ptr %368, align 2, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 2, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #8
  br label %369

369:                                              ; preds = %163
  %370 = load i32, ptr %23, align 4, !tbaa !14
  %371 = add nsw i32 %370, 1
  store i32 %371, ptr %23, align 4, !tbaa !14
  br label %157, !llvm.loop !20

372:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %373

373:                                              ; preds = %372
  %374 = load i32, ptr %17, align 4, !tbaa !14
  %375 = add nsw i32 %374, 1
  store i32 %375, ptr %17, align 4, !tbaa !14
  br label %109, !llvm.loop !22

376:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 2, ptr %27) #8
  store i16 32767, ptr %27, align 2, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 2, ptr %28) #8
  store i16 -32768, ptr %28, align 2, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !14
  br label %377

377:                                              ; preds = %433, %376
  %378 = load i32, ptr %29, align 4, !tbaa !14
  %379 = load i32, ptr %13, align 4, !tbaa !14
  %380 = icmp slt i32 %378, %379
  br i1 %380, label %382, label %381

381:                                              ; preds = %377
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %436

382:                                              ; preds = %377
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %383 = load ptr, ptr %16, align 8, !tbaa !5
  %384 = load i32, ptr %29, align 4, !tbaa !14
  %385 = load ptr, ptr %4, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.px_image_t, ptr %385, i32 0, i32 4
  %387 = load i32, ptr %386, align 4, !tbaa !15
  %388 = mul nsw i32 %384, %387
  %389 = sext i32 %388 to i64
  %390 = getelementptr inbounds i16, ptr %383, i64 %389
  store ptr %390, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !14
  br label %391

391:                                              ; preds = %429, %382
  %392 = load i32, ptr %31, align 4, !tbaa !14
  %393 = load i32, ptr %14, align 4, !tbaa !14
  %394 = icmp slt i32 %392, %393
  br i1 %394, label %396, label %395

395:                                              ; preds = %391
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %432

396:                                              ; preds = %391
  %397 = load ptr, ptr %30, align 8, !tbaa !5
  %398 = load i32, ptr %31, align 4, !tbaa !14
  %399 = sext i32 %398 to i64
  %400 = getelementptr inbounds i16, ptr %397, i64 %399
  %401 = load i16, ptr %400, align 2, !tbaa !18
  %402 = sext i16 %401 to i32
  %403 = load i16, ptr %28, align 2, !tbaa !18
  %404 = sext i16 %403 to i32
  %405 = icmp sgt i32 %402, %404
  br i1 %405, label %406, label %412

406:                                              ; preds = %396
  %407 = load ptr, ptr %30, align 8, !tbaa !5
  %408 = load i32, ptr %31, align 4, !tbaa !14
  %409 = sext i32 %408 to i64
  %410 = getelementptr inbounds i16, ptr %407, i64 %409
  %411 = load i16, ptr %410, align 2, !tbaa !18
  store i16 %411, ptr %28, align 2, !tbaa !18
  br label %412

412:                                              ; preds = %406, %396
  %413 = load ptr, ptr %30, align 8, !tbaa !5
  %414 = load i32, ptr %31, align 4, !tbaa !14
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds i16, ptr %413, i64 %415
  %417 = load i16, ptr %416, align 2, !tbaa !18
  %418 = sext i16 %417 to i32
  %419 = load i16, ptr %27, align 2, !tbaa !18
  %420 = sext i16 %419 to i32
  %421 = icmp slt i32 %418, %420
  br i1 %421, label %422, label %428

422:                                              ; preds = %412
  %423 = load ptr, ptr %30, align 8, !tbaa !5
  %424 = load i32, ptr %31, align 4, !tbaa !14
  %425 = sext i32 %424 to i64
  %426 = getelementptr inbounds i16, ptr %423, i64 %425
  %427 = load i16, ptr %426, align 2, !tbaa !18
  store i16 %427, ptr %27, align 2, !tbaa !18
  br label %428

428:                                              ; preds = %422, %412
  br label %429

429:                                              ; preds = %428
  %430 = load i32, ptr %31, align 4, !tbaa !14
  %431 = add nsw i32 %430, 1
  store i32 %431, ptr %31, align 4, !tbaa !14
  br label %391, !llvm.loop !23

432:                                              ; preds = %395
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %433

433:                                              ; preds = %432
  %434 = load i32, ptr %29, align 4, !tbaa !14
  %435 = add nsw i32 %434, 1
  store i32 %435, ptr %29, align 4, !tbaa !14
  br label %377, !llvm.loop !24

436:                                              ; preds = %381
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %437 = load i16, ptr %28, align 2, !tbaa !18
  %438 = sext i16 %437 to i32
  %439 = load i16, ptr %27, align 2, !tbaa !18
  %440 = sext i16 %439 to i32
  %441 = icmp eq i32 %438, %440
  br i1 %441, label %442, label %453

442:                                              ; preds = %436
  %443 = load i16, ptr %28, align 2, !tbaa !18
  %444 = sext i16 %443 to i32
  %445 = icmp eq i32 %444, 0
  br i1 %445, label %446, label %447

446:                                              ; preds = %442
  store float 1.000000e+00, ptr %32, align 4, !tbaa !25
  br label %452

447:                                              ; preds = %442
  %448 = load i16, ptr %28, align 2, !tbaa !18
  %449 = sext i16 %448 to i32
  %450 = sitofp i32 %449 to float
  %451 = fdiv float 2.550000e+02, %450
  store float %451, ptr %32, align 4, !tbaa !25
  br label %452

452:                                              ; preds = %447, %446
  br label %461

453:                                              ; preds = %436
  %454 = load i16, ptr %28, align 2, !tbaa !18
  %455 = sext i16 %454 to i32
  %456 = load i16, ptr %27, align 2, !tbaa !18
  %457 = sext i16 %456 to i32
  %458 = sub nsw i32 %455, %457
  %459 = sitofp i32 %458 to float
  %460 = fdiv float 2.550000e+02, %459
  store float %460, ptr %32, align 4, !tbaa !25
  br label %461

461:                                              ; preds = %453, %452
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  store i32 0, ptr %33, align 4, !tbaa !14
  br label %462

462:                                              ; preds = %510, %461
  %463 = load i32, ptr %33, align 4, !tbaa !14
  %464 = load i32, ptr %13, align 4, !tbaa !14
  %465 = icmp slt i32 %463, %464
  br i1 %465, label %467, label %466

466:                                              ; preds = %462
  store i32 14, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %513

467:                                              ; preds = %462
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %468 = load ptr, ptr %16, align 8, !tbaa !5
  %469 = load i32, ptr %33, align 4, !tbaa !14
  %470 = load ptr, ptr %4, align 8, !tbaa !5
  %471 = getelementptr inbounds %struct.px_image_t, ptr %470, i32 0, i32 4
  %472 = load i32, ptr %471, align 4, !tbaa !15
  %473 = mul nsw i32 %469, %472
  %474 = sext i32 %473 to i64
  %475 = getelementptr inbounds i16, ptr %468, i64 %474
  store ptr %475, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %476 = load ptr, ptr %4, align 8, !tbaa !5
  %477 = getelementptr inbounds %struct.px_image_t, ptr %476, i32 0, i32 0
  %478 = load ptr, ptr %477, align 8, !tbaa !16
  %479 = load i32, ptr %33, align 4, !tbaa !14
  %480 = load ptr, ptr %4, align 8, !tbaa !5
  %481 = getelementptr inbounds %struct.px_image_t, ptr %480, i32 0, i32 4
  %482 = load i32, ptr %481, align 4, !tbaa !15
  %483 = mul nsw i32 %479, %482
  %484 = sext i32 %483 to i64
  %485 = getelementptr inbounds i8, ptr %478, i64 %484
  store ptr %485, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  store i32 0, ptr %36, align 4, !tbaa !14
  br label %486

486:                                              ; preds = %506, %467
  %487 = load i32, ptr %36, align 4, !tbaa !14
  %488 = load i32, ptr %14, align 4, !tbaa !14
  %489 = icmp slt i32 %487, %488
  br i1 %489, label %491, label %490

490:                                              ; preds = %486
  store i32 17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  br label %509

491:                                              ; preds = %486
  %492 = load ptr, ptr %34, align 8, !tbaa !5
  %493 = load i32, ptr %36, align 4, !tbaa !14
  %494 = sext i32 %493 to i64
  %495 = getelementptr inbounds i16, ptr %492, i64 %494
  %496 = load i16, ptr %495, align 2, !tbaa !18
  %497 = sext i16 %496 to i32
  %498 = sitofp i32 %497 to float
  %499 = load float, ptr %32, align 4, !tbaa !25
  %500 = fmul float %498, %499
  %501 = fptoui float %500 to i8
  %502 = load ptr, ptr %35, align 8, !tbaa !5
  %503 = load i32, ptr %36, align 4, !tbaa !14
  %504 = sext i32 %503 to i64
  %505 = getelementptr inbounds i8, ptr %502, i64 %504
  store i8 %501, ptr %505, align 1, !tbaa !17
  br label %506

506:                                              ; preds = %491
  %507 = load i32, ptr %36, align 4, !tbaa !14
  %508 = add nsw i32 %507, 1
  store i32 %508, ptr %36, align 4, !tbaa !14
  br label %486, !llvm.loop !27

509:                                              ; preds = %490
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  br label %510

510:                                              ; preds = %509
  %511 = load i32, ptr %33, align 4, !tbaa !14
  %512 = add nsw i32 %511, 1
  store i32 %512, ptr %33, align 4, !tbaa !14
  br label %462, !llvm.loop !28

513:                                              ; preds = %466
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 9, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 9, ptr %5) #8
  ret void
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #6

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

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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { noreturn nounwind }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }

!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, !11, i64 16}
!10 = !{!"px_image_t", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!10, !11, i64 12}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !11, i64 20}
!16 = !{!10, !6, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"short", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = distinct !{!27, !21}
!28 = distinct !{!28, !21}


; 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 [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [67 x i8], align 1
@__PRETTY_FUNCTION__.px_sobel3x3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@__const.px_sobel3x3.kx = external hidden unnamed_addr constant [9 x i8], align 1
@__const.px_sobel3x3.ky = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @px_sobel3x3(ptr noundef readonly %0, ptr noundef readonly %1) local_unnamed_addr #0 {
  %3 = icmp ne ptr %0, null
  %4 = icmp ne ptr %1, null
  %or.cond = and i1 %3, %4
  br i1 %or.cond, label %6, label %5

5:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 9, ptr noundef nonnull @__PRETTY_FUNCTION__.px_sobel3x3) #4
  unreachable

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = icmp eq i32 %8, 1
  br i1 %9, label %11, label %10

10:                                               ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 10, ptr noundef nonnull @__PRETTY_FUNCTION__.px_sobel3x3) #4
  unreachable

11:                                               ; preds = %6
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !5
  %14 = icmp eq i32 %13, 1
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 11, ptr noundef nonnull @__PRETTY_FUNCTION__.px_sobel3x3) #4
  unreachable

16:                                               ; preds = %11
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = icmp eq i32 %18, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %16
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 12, ptr noundef nonnull @__PRETTY_FUNCTION__.px_sobel3x3) #4
  unreachable

23:                                               ; preds = %16
  %24 = getelementptr inbounds i8, ptr %0, i64 12
  %25 = load i32, ptr %24, align 4, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %1, i64 12
  %27 = load i32, ptr %26, align 4, !tbaa !12
  %28 = icmp eq i32 %25, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %23
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 13, ptr noundef nonnull @__PRETTY_FUNCTION__.px_sobel3x3) #4
  unreachable

30:                                               ; preds = %23
  %31 = load <8 x i8>, ptr @__const.px_sobel3x3.kx, align 1
  %.sroa.11.0.copyload = load i8, ptr getelementptr inbounds (i8, ptr @__const.px_sobel3x3.kx, i64 8), align 1
  %32 = load <8 x i8>, ptr @__const.px_sobel3x3.ky, align 1
  %.sroa.11142.0.copyload = load i8, ptr getelementptr inbounds (i8, ptr @__const.px_sobel3x3.ky, i64 8), align 1
  %33 = shl i32 %18, 1
  %34 = mul i32 %33, %25
  %35 = sext i32 %34 to i64
  %calloc = tail call ptr @calloc(i64 1, i64 %35)
  %36 = add i32 %25, -1
  %37 = icmp sgt i32 %25, 2
  br i1 %37, label %.lr.ph156, label %.preheader

.lr.ph156:                                        ; preds = %30
  %38 = load ptr, ptr %0, align 8, !tbaa !13
  %39 = icmp sgt i32 %18, 2
  %40 = sext <8 x i8> %31 to <8 x i16>
  %41 = sext <8 x i8> %31 to <8 x i32>
  %42 = sext i8 %.sroa.11.0.copyload to i32
  %43 = sext <8 x i8> %32 to <8 x i16>
  %44 = sext <8 x i8> %32 to <8 x i32>
  %45 = sext i8 %.sroa.11142.0.copyload to i32
  br i1 %39, label %.lr.ph.us.preheader, label %.lr.ph164

.lr.ph.us.preheader:                              ; preds = %.lr.ph156
  %46 = add nsw i32 %18, -1
  %47 = getelementptr inbounds i8, ptr %0, i64 20
  %48 = load i32, ptr %47, align 4, !tbaa !14
  %49 = getelementptr inbounds i8, ptr %1, i64 20
  %50 = load i32, ptr %49, align 4, !tbaa !14
  %51 = sext i32 %50 to i64
  %52 = sext i32 %48 to i64
  %wide.trip.count184 = zext nneg i32 %36 to i64
  %wide.trip.count = zext i32 %46 to i64
  %53 = add nsw i64 %wide.trip.count, -1
  %min.iters.check = icmp ult i64 %53, 8
  %n.vec = and i64 %53, -8
  %ind.end = or disjoint i64 %n.vec, 1
  %broadcast.splat = shufflevector <8 x i32> %41, <8 x i32> poison, <8 x i32> zeroinitializer
  %broadcast.splat222 = shufflevector <8 x i32> %41, <8 x i32> poison, <8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
  %broadcast.splat225 = shufflevector <8 x i32> %41, <8 x i32> poison, <8 x i32> <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
  %broadcast.splat228 = shufflevector <8 x i32> %41, <8 x i32> poison, <8 x i32> <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
  %broadcast.splat230 = shufflevector <8 x i32> %41, <8 x i32> poison, <8 x i32> <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
  %broadcast.splat233 = shufflevector <8 x i32> %41, <8 x i32> poison, <8 x i32> <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
  %broadcast.splat236 = shufflevector <8 x i32> %41, <8 x i32> poison, <8 x i32> <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
  %broadcast.splat238 = shufflevector <8 x i32> %41, <8 x i32> poison, <8 x i32> <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>
  %broadcast.splatinsert240 = insertelement <8 x i32> poison, i32 %42, i64 0
  %broadcast.splat241 = shufflevector <8 x i32> %broadcast.splatinsert240, <8 x i32> poison, <8 x i32> zeroinitializer
  %broadcast.splat243 = shufflevector <8 x i32> %44, <8 x i32> poison, <8 x i32> zeroinitializer
  %broadcast.splat245 = shufflevector <8 x i32> %44, <8 x i32> poison, <8 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
  %broadcast.splat247 = shufflevector <8 x i32> %44, <8 x i32> poison, <8 x i32> <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
  %broadcast.splat249 = shufflevector <8 x i32> %44, <8 x i32> poison, <8 x i32> <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
  %broadcast.splat251 = shufflevector <8 x i32> %44, <8 x i32> poison, <8 x i32> <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
  %broadcast.splat253 = shufflevector <8 x i32> %44, <8 x i32> poison, <8 x i32> <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
  %broadcast.splat255 = shufflevector <8 x i32> %44, <8 x i32> poison, <8 x i32> <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
  %broadcast.splat257 = shufflevector <8 x i32> %44, <8 x i32> poison, <8 x i32> <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>
  %broadcast.splatinsert258 = insertelement <8 x i32> poison, i32 %45, i64 0
  %broadcast.splat259 = shufflevector <8 x i32> %broadcast.splatinsert258, <8 x i32> poison, <8 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %53, %n.vec
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %..loopexit_crit_edge.us
  %indvars.iv181 = phi i64 [ 1, %.lr.ph.us.preheader ], [ %indvars.iv.next182, %..loopexit_crit_edge.us ]
  %54 = mul nsw i64 %indvars.iv181, %51
  %55 = getelementptr inbounds i16, ptr %calloc, i64 %54
  %56 = add nsw i64 %indvars.iv181, -1
  %57 = mul nsw i64 %56, %52
  %58 = getelementptr inbounds i8, ptr %38, i64 %57
  %59 = mul nsw i64 %indvars.iv181, %52
  %60 = getelementptr inbounds i8, ptr %38, i64 %59
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  %61 = mul nsw i64 %indvars.iv.next182, %52
  %62 = getelementptr inbounds i8, ptr %38, i64 %61
  %.pre = load i8, ptr %58, align 1, !tbaa !15
  %.pre200 = load i8, ptr %60, align 1, !tbaa !15
  %.pre201 = load i8, ptr %62, align 1, !tbaa !15
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.us
  %ind.end209 = getelementptr i8, ptr %58, i64 %n.vec
  %ind.end211 = getelementptr i8, ptr %60, i64 %n.vec
  %ind.end213 = getelementptr i8, ptr %62, i64 %n.vec
  %vector.recur.init = insertelement <8 x i8> poison, i8 %.pre201, i64 7
  %vector.recur.init215 = insertelement <8 x i8> poison, i8 %.pre200, i64 7
  %vector.recur.init217 = insertelement <8 x i8> poison, i8 %.pre, i64 7
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vector.recur = phi <8 x i8> [ %vector.recur.init, %vector.ph ], [ %wide.load234, %vector.body ]
  %vector.recur216 = phi <8 x i8> [ %vector.recur.init215, %vector.ph ], [ %wide.load226, %vector.body ]
  %vector.recur218 = phi <8 x i8> [ %vector.recur.init217, %vector.ph ], [ %wide.load, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %next.gep = getelementptr i8, ptr %58, i64 %index
  %next.gep219 = getelementptr i8, ptr %60, i64 %index
  %next.gep220 = getelementptr i8, ptr %62, i64 %index
  %63 = getelementptr inbounds i8, ptr %next.gep, i64 1
  %wide.load = load <8 x i8>, ptr %63, align 1, !tbaa !15
  %64 = shufflevector <8 x i8> %vector.recur218, <8 x i8> %wide.load, <8 x i32> <i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14>
  %65 = zext <8 x i8> %64 to <8 x i32>
  %66 = mul nsw <8 x i32> %broadcast.splat, %65
  %67 = zext <8 x i8> %wide.load to <8 x i32>
  %68 = mul nsw <8 x i32> %broadcast.splat222, %67
  %69 = add nsw <8 x i32> %68, %66
  %70 = getelementptr inbounds i8, ptr %next.gep, i64 2
  %wide.load223 = load <8 x i8>, ptr %70, align 1, !tbaa !15
  %71 = zext <8 x i8> %wide.load223 to <8 x i32>
  %72 = mul nsw <8 x i32> %broadcast.splat225, %71
  %73 = add nsw <8 x i32> %69, %72
  %74 = getelementptr inbounds i8, ptr %next.gep219, i64 1
  %wide.load226 = load <8 x i8>, ptr %74, align 1, !tbaa !15
  %75 = shufflevector <8 x i8> %vector.recur216, <8 x i8> %wide.load226, <8 x i32> <i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14>
  %76 = zext <8 x i8> %75 to <8 x i32>
  %77 = mul nsw <8 x i32> %broadcast.splat228, %76
  %78 = add nsw <8 x i32> %73, %77
  %79 = zext <8 x i8> %wide.load226 to <8 x i32>
  %80 = mul nsw <8 x i32> %broadcast.splat230, %79
  %81 = add nsw <8 x i32> %78, %80
  %82 = getelementptr inbounds i8, ptr %next.gep219, i64 2
  %wide.load231 = load <8 x i8>, ptr %82, align 1, !tbaa !15
  %83 = zext <8 x i8> %wide.load231 to <8 x i32>
  %84 = mul nsw <8 x i32> %broadcast.splat233, %83
  %85 = add nsw <8 x i32> %81, %84
  %86 = getelementptr inbounds i8, ptr %next.gep220, i64 1
  %wide.load234 = load <8 x i8>, ptr %86, align 1, !tbaa !15
  %87 = shufflevector <8 x i8> %vector.recur, <8 x i8> %wide.load234, <8 x i32> <i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14>
  %88 = zext <8 x i8> %87 to <8 x i32>
  %89 = mul nsw <8 x i32> %broadcast.splat236, %88
  %90 = add nsw <8 x i32> %85, %89
  %91 = zext <8 x i8> %wide.load234 to <8 x i32>
  %92 = mul nsw <8 x i32> %broadcast.splat238, %91
  %93 = add nsw <8 x i32> %90, %92
  %94 = getelementptr inbounds i8, ptr %next.gep220, i64 2
  %wide.load239 = load <8 x i8>, ptr %94, align 1, !tbaa !15
  %95 = zext <8 x i8> %wide.load239 to <8 x i32>
  %96 = mul nsw <8 x i32> %broadcast.splat241, %95
  %97 = add nsw <8 x i32> %93, %96
  %98 = mul nsw <8 x i32> %broadcast.splat243, %65
  %99 = mul nsw <8 x i32> %broadcast.splat245, %67
  %100 = add nsw <8 x i32> %99, %98
  %101 = mul nsw <8 x i32> %broadcast.splat247, %71
  %102 = add nsw <8 x i32> %100, %101
  %103 = mul nsw <8 x i32> %broadcast.splat249, %76
  %104 = add nsw <8 x i32> %102, %103
  %105 = mul nsw <8 x i32> %broadcast.splat251, %79
  %106 = add nsw <8 x i32> %104, %105
  %107 = mul nsw <8 x i32> %broadcast.splat253, %83
  %108 = add nsw <8 x i32> %106, %107
  %109 = mul nsw <8 x i32> %broadcast.splat255, %88
  %110 = add nsw <8 x i32> %108, %109
  %111 = mul nsw <8 x i32> %broadcast.splat257, %91
  %112 = add nsw <8 x i32> %110, %111
  %113 = mul nsw <8 x i32> %broadcast.splat259, %95
  %114 = add nsw <8 x i32> %112, %113
  %115 = shl <8 x i32> %97, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %116 = ashr exact <8 x i32> %115, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %117 = mul nsw <8 x i32> %116, %116
  %118 = shl <8 x i32> %114, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %119 = ashr exact <8 x i32> %118, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
  %120 = mul nsw <8 x i32> %119, %119
  %121 = add nuw nsw <8 x i32> %117, %120
  %122 = uitofp nneg <8 x i32> %121 to <8 x double>
  %123 = tail call <8 x double> @llvm.sqrt.v8f64(<8 x double> %122)
  %124 = fptosi <8 x double> %123 to <8 x i16>
  %125 = getelementptr inbounds i16, ptr %55, i64 %offset.idx
  store <8 x i16> %124, ptr %125, align 2, !tbaa !16
  %index.next = add nuw i64 %index, 8
  %126 = icmp eq i64 %index.next, %n.vec
  br i1 %126, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %vector.recur.extract = extractelement <8 x i8> %wide.load234, i64 7
  %vector.recur.extract260 = extractelement <8 x i8> %wide.load226, i64 7
  %vector.recur.extract261 = extractelement <8 x i8> %wide.load, i64 7
  br i1 %cmp.n, label %..loopexit_crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph.us
  %.ph = phi i8 [ %.pre201, %.lr.ph.us ], [ %vector.recur.extract, %middle.block ]
  %.ph304 = phi i8 [ %.pre200, %.lr.ph.us ], [ %vector.recur.extract260, %middle.block ]
  %.ph305 = phi i8 [ %.pre, %.lr.ph.us ], [ %vector.recur.extract261, %middle.block ]
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.us ], [ %ind.end, %middle.block ]
  %.0125154.us.ph = phi ptr [ %58, %.lr.ph.us ], [ %ind.end209, %middle.block ]
  %.0131153.us.ph = phi ptr [ %60, %.lr.ph.us ], [ %ind.end211, %middle.block ]
  %.0132152.us.ph = phi ptr [ %62, %.lr.ph.us ], [ %ind.end213, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %127 = phi i8 [ %135, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %128 = phi i8 [ %164, %scalar.ph ], [ %.ph304, %scalar.ph.preheader ]
  %129 = phi i8 [ %165, %scalar.ph ], [ %.ph305, %scalar.ph.preheader ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.0125154.us = phi ptr [ %130, %scalar.ph ], [ %.0125154.us.ph, %scalar.ph.preheader ]
  %.0131153.us = phi ptr [ %132, %scalar.ph ], [ %.0131153.us.ph, %scalar.ph.preheader ]
  %.0132152.us = phi ptr [ %134, %scalar.ph ], [ %.0132152.us.ph, %scalar.ph.preheader ]
  %130 = getelementptr inbounds i8, ptr %.0125154.us, i64 1
  %131 = load <2 x i8>, ptr %130, align 1, !tbaa !15
  %132 = getelementptr inbounds i8, ptr %.0131153.us, i64 1
  %133 = load <2 x i8>, ptr %132, align 1, !tbaa !15
  %134 = getelementptr inbounds i8, ptr %.0132152.us, i64 1
  %135 = load i8, ptr %134, align 1, !tbaa !15
  %136 = insertelement <8 x i8> poison, i8 %129, i64 0
  %137 = shufflevector <2 x i8> %131, <2 x i8> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %138 = shufflevector <8 x i8> %136, <8 x i8> %137, <8 x i32> <i32 0, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %139 = insertelement <8 x i8> %138, i8 %128, i64 3
  %140 = shufflevector <2 x i8> %133, <2 x i8> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
  %141 = shufflevector <8 x i8> %139, <8 x i8> %140, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 poison, i32 poison>
  %142 = insertelement <8 x i8> %141, i8 %127, i64 6
  %143 = insertelement <8 x i8> %142, i8 %135, i64 7
  %144 = zext <8 x i8> %143 to <8 x i16>
  %145 = mul nsw <8 x i16> %144, %40
  %146 = getelementptr inbounds i8, ptr %.0132152.us, i64 2
  %147 = load i8, ptr %146, align 1, !tbaa !15
  %148 = zext i8 %147 to i32
  %149 = mul nsw i32 %148, %42
  %150 = tail call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> %145)
  %151 = zext i16 %150 to i32
  %op.rdx = add nsw i32 %149, %151
  %152 = mul nsw <8 x i16> %144, %43
  %153 = mul nsw i32 %148, %45
  %154 = tail call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> %152)
  %155 = zext i16 %154 to i32
  %op.rdx298 = add nsw i32 %153, %155
  %sext.us = shl i32 %op.rdx, 16
  %156 = ashr exact i32 %sext.us, 16
  %157 = mul nsw i32 %156, %156
  %sext150.us = shl i32 %op.rdx298, 16
  %158 = ashr exact i32 %sext150.us, 16
  %159 = mul nsw i32 %158, %158
  %160 = add nuw nsw i32 %157, %159
  %161 = uitofp nneg i32 %160 to double
  %sqrt.us = tail call double @llvm.sqrt.f64(double %161)
  %162 = fptosi double %sqrt.us to i16
  %163 = getelementptr inbounds i16, ptr %55, i64 %indvars.iv
  store i16 %162, ptr %163, align 2, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  %164 = extractelement <2 x i8> %133, i64 0
  %165 = extractelement <2 x i8> %131, i64 0
  br i1 %exitcond.not, label %..loopexit_crit_edge.us, label %scalar.ph, !llvm.loop !22

..loopexit_crit_edge.us:                          ; preds = %scalar.ph, %middle.block
  %exitcond185.not = icmp eq i64 %indvars.iv.next182, %wide.trip.count184
  br i1 %exitcond185.not, label %.preheader, label %.lr.ph.us, !llvm.loop !23

.preheader:                                       ; preds = %..loopexit_crit_edge.us, %30
  %166 = icmp sgt i32 %25, 0
  br i1 %166, label %.lr.ph164, label %._crit_edge174

.lr.ph164:                                        ; preds = %.lr.ph156, %.preheader
  %167 = icmp sgt i32 %18, 0
  br i1 %167, label %.lr.ph.us168.preheader, label %._crit_edge165.thread

.lr.ph.us168.preheader:                           ; preds = %.lr.ph164
  %168 = getelementptr inbounds i8, ptr %1, i64 20
  %169 = load i32, ptr %168, align 4, !tbaa !14
  %170 = sext i32 %169 to i64
  %wide.trip.count192 = zext nneg i32 %25 to i64
  %wide.trip.count188 = zext nneg i32 %18 to i64
  %min.iters.check266 = icmp ult i32 %18, 16
  %n.vec269 = and i64 %wide.trip.count188, 2147483632
  %cmp.n282 = icmp eq i64 %n.vec269, %wide.trip.count188
  br label %.lr.ph.us168

.lr.ph.us168:                                     ; preds = %.lr.ph.us168.preheader, %._crit_edge.us
  %indvars.iv190 = phi i64 [ 0, %.lr.ph.us168.preheader ], [ %indvars.iv.next191, %._crit_edge.us ]
  %.0127162.us = phi i16 [ -32768, %.lr.ph.us168.preheader ], [ %spec.select.us.lcssa, %._crit_edge.us ]
  %.0128161.us = phi i16 [ 32767, %.lr.ph.us168.preheader ], [ %.2130.us.lcssa, %._crit_edge.us ]
  %171 = mul nsw i64 %indvars.iv190, %170
  %172 = getelementptr inbounds i16, ptr %calloc, i64 %171
  br i1 %min.iters.check266, label %scalar.ph265.preheader, label %vector.ph267

vector.ph267:                                     ; preds = %.lr.ph.us168
  %minmax.ident.splatinsert = insertelement <8 x i16> poison, i16 %.0127162.us, i64 0
  %minmax.ident.splat = shufflevector <8 x i16> %minmax.ident.splatinsert, <8 x i16> poison, <8 x i32> zeroinitializer
  %minmax.ident.splatinsert276 = insertelement <8 x i16> poison, i16 %.0128161.us, i64 0
  %minmax.ident.splat277 = shufflevector <8 x i16> %minmax.ident.splatinsert276, <8 x i16> poison, <8 x i32> zeroinitializer
  br label %vector.body271

vector.body271:                                   ; preds = %vector.body271, %vector.ph267
  %index272 = phi i64 [ 0, %vector.ph267 ], [ %index.next280, %vector.body271 ]
  %vec.phi = phi <8 x i16> [ %minmax.ident.splat, %vector.ph267 ], [ %175, %vector.body271 ]
  %vec.phi273 = phi <8 x i16> [ %minmax.ident.splat, %vector.ph267 ], [ %176, %vector.body271 ]
  %vec.phi274 = phi <8 x i16> [ %minmax.ident.splat277, %vector.ph267 ], [ %177, %vector.body271 ]
  %vec.phi275 = phi <8 x i16> [ %minmax.ident.splat277, %vector.ph267 ], [ %178, %vector.body271 ]
  %173 = getelementptr inbounds i16, ptr %172, i64 %index272
  %174 = getelementptr inbounds i8, ptr %173, i64 16
  %wide.load278 = load <8 x i16>, ptr %173, align 2, !tbaa !16
  %wide.load279 = load <8 x i16>, ptr %174, align 2, !tbaa !16
  %175 = tail call <8 x i16> @llvm.smax.v8i16(<8 x i16> %wide.load278, <8 x i16> %vec.phi)
  %176 = tail call <8 x i16> @llvm.smax.v8i16(<8 x i16> %wide.load279, <8 x i16> %vec.phi273)
  %177 = tail call <8 x i16> @llvm.smin.v8i16(<8 x i16> %wide.load278, <8 x i16> %vec.phi274)
  %178 = tail call <8 x i16> @llvm.smin.v8i16(<8 x i16> %wide.load279, <8 x i16> %vec.phi275)
  %index.next280 = add nuw i64 %index272, 16
  %179 = icmp eq i64 %index.next280, %n.vec269
  br i1 %179, label %middle.block264, label %vector.body271, !llvm.loop !24

middle.block264:                                  ; preds = %vector.body271
  %rdx.minmax = tail call <8 x i16> @llvm.smax.v8i16(<8 x i16> %175, <8 x i16> %176)
  %180 = tail call i16 @llvm.vector.reduce.smax.v8i16(<8 x i16> %rdx.minmax)
  %rdx.minmax281 = tail call <8 x i16> @llvm.smin.v8i16(<8 x i16> %177, <8 x i16> %178)
  %181 = tail call i16 @llvm.vector.reduce.smin.v8i16(<8 x i16> %rdx.minmax281)
  br i1 %cmp.n282, label %._crit_edge.us, label %scalar.ph265.preheader

scalar.ph265.preheader:                           ; preds = %middle.block264, %.lr.ph.us168
  %indvars.iv186.ph = phi i64 [ 0, %.lr.ph.us168 ], [ %n.vec269, %middle.block264 ]
  %.1158.us.ph = phi i16 [ %.0127162.us, %.lr.ph.us168 ], [ %180, %middle.block264 ]
  %.1129157.us.ph = phi i16 [ %.0128161.us, %.lr.ph.us168 ], [ %181, %middle.block264 ]
  br label %scalar.ph265

scalar.ph265:                                     ; preds = %scalar.ph265.preheader, %scalar.ph265
  %indvars.iv186 = phi i64 [ %indvars.iv.next187, %scalar.ph265 ], [ %indvars.iv186.ph, %scalar.ph265.preheader ]
  %.1158.us = phi i16 [ %spec.select.us, %scalar.ph265 ], [ %.1158.us.ph, %scalar.ph265.preheader ]
  %.1129157.us = phi i16 [ %.2130.us, %scalar.ph265 ], [ %.1129157.us.ph, %scalar.ph265.preheader ]
  %182 = getelementptr inbounds i16, ptr %172, i64 %indvars.iv186
  %183 = load i16, ptr %182, align 2, !tbaa !16
  %spec.select.us = tail call i16 @llvm.smax.i16(i16 %183, i16 %.1158.us)
  %.2130.us = tail call i16 @llvm.smin.i16(i16 %183, i16 %.1129157.us)
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %exitcond189.not = icmp eq i64 %indvars.iv.next187, %wide.trip.count188
  br i1 %exitcond189.not, label %._crit_edge.us, label %scalar.ph265, !llvm.loop !25

._crit_edge.us:                                   ; preds = %scalar.ph265, %middle.block264
  %spec.select.us.lcssa = phi i16 [ %180, %middle.block264 ], [ %spec.select.us, %scalar.ph265 ]
  %.2130.us.lcssa = phi i16 [ %181, %middle.block264 ], [ %.2130.us, %scalar.ph265 ]
  %indvars.iv.next191 = add nuw nsw i64 %indvars.iv190, 1
  %exitcond193.not = icmp eq i64 %indvars.iv.next191, %wide.trip.count192
  br i1 %exitcond193.not, label %._crit_edge165, label %.lr.ph.us168, !llvm.loop !26

._crit_edge165:                                   ; preds = %._crit_edge.us
  %184 = icmp eq i16 %spec.select.us.lcssa, %.2130.us.lcssa
  br i1 %184, label %185, label %._crit_edge165.thread

185:                                              ; preds = %._crit_edge165
  %186 = icmp eq i16 %.2130.us.lcssa, 0
  br i1 %186, label %.lr.ph173, label %187

187:                                              ; preds = %185
  %188 = sitofp i16 %.2130.us.lcssa to float
  %189 = fdiv float 2.550000e+02, %188
  br label %.lr.ph173

._crit_edge165.thread:                            ; preds = %.lr.ph164, %._crit_edge165
  %.0127.lcssa205 = phi i16 [ %spec.select.us.lcssa, %._crit_edge165 ], [ -32768, %.lr.ph164 ]
  %.0128.lcssa204 = phi i16 [ %.2130.us.lcssa, %._crit_edge165 ], [ 32767, %.lr.ph164 ]
  %190 = sext i16 %.0127.lcssa205 to i32
  %191 = sext i16 %.0128.lcssa204 to i32
  %192 = sub nsw i32 %190, %191
  %193 = sitofp i32 %192 to float
  %194 = fdiv float 2.550000e+02, %193
  br label %.lr.ph173

.lr.ph173:                                        ; preds = %185, %187, %._crit_edge165.thread
  %.0123206 = phi float [ %189, %187 ], [ %194, %._crit_edge165.thread ], [ 1.000000e+00, %185 ]
  %195 = getelementptr inbounds i8, ptr %1, i64 20
  %196 = icmp sgt i32 %18, 0
  br i1 %196, label %.lr.ph.us175.preheader, label %._crit_edge174

.lr.ph.us175.preheader:                           ; preds = %.lr.ph173
  %wide.trip.count197 = zext nneg i32 %18 to i64
  %min.iters.check286 = icmp ult i32 %18, 8
  %n.vec289 = and i64 %wide.trip.count197, 2147483640
  %broadcast.splatinsert294 = insertelement <8 x float> poison, float %.0123206, i64 0
  %broadcast.splat295 = shufflevector <8 x float> %broadcast.splatinsert294, <8 x float> poison, <8 x i32> zeroinitializer
  %cmp.n297 = icmp eq i64 %n.vec289, %wide.trip.count197
  br label %.lr.ph.us175

.lr.ph.us175:                                     ; preds = %.lr.ph.us175.preheader, %._crit_edge.us176
  %.0122171.us = phi i32 [ %215, %._crit_edge.us176 ], [ 0, %.lr.ph.us175.preheader ]
  %197 = load i32, ptr %195, align 4, !tbaa !14
  %198 = mul nsw i32 %197, %.0122171.us
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds i16, ptr %calloc, i64 %199
  %201 = load ptr, ptr %1, align 8, !tbaa !13
  %202 = getelementptr inbounds i8, ptr %201, i64 %199
  br i1 %min.iters.check286, label %scalar.ph285.preheader, label %vector.body291

vector.body291:                                   ; preds = %.lr.ph.us175, %vector.body291
  %index292 = phi i64 [ %index.next296, %vector.body291 ], [ 0, %.lr.ph.us175 ]
  %203 = getelementptr inbounds i16, ptr %200, i64 %index292
  %wide.load293 = load <8 x i16>, ptr %203, align 2, !tbaa !16
  %204 = sitofp <8 x i16> %wide.load293 to <8 x float>
  %205 = fmul <8 x float> %broadcast.splat295, %204
  %206 = fptoui <8 x float> %205 to <8 x i8>
  %207 = getelementptr inbounds i8, ptr %202, i64 %index292
  store <8 x i8> %206, ptr %207, align 1, !tbaa !15
  %index.next296 = add nuw i64 %index292, 8
  %208 = icmp eq i64 %index.next296, %n.vec289
  br i1 %208, label %middle.block284, label %vector.body291, !llvm.loop !27

middle.block284:                                  ; preds = %vector.body291
  br i1 %cmp.n297, label %._crit_edge.us176, label %scalar.ph285.preheader

scalar.ph285.preheader:                           ; preds = %middle.block284, %.lr.ph.us175
  %indvars.iv194.ph = phi i64 [ 0, %.lr.ph.us175 ], [ %n.vec289, %middle.block284 ]
  br label %scalar.ph285

scalar.ph285:                                     ; preds = %scalar.ph285.preheader, %scalar.ph285
  %indvars.iv194 = phi i64 [ %indvars.iv.next195, %scalar.ph285 ], [ %indvars.iv194.ph, %scalar.ph285.preheader ]
  %209 = getelementptr inbounds i16, ptr %200, i64 %indvars.iv194
  %210 = load i16, ptr %209, align 2, !tbaa !16
  %211 = sitofp i16 %210 to float
  %212 = fmul float %.0123206, %211
  %213 = fptoui float %212 to i8
  %214 = getelementptr inbounds i8, ptr %202, i64 %indvars.iv194
  store i8 %213, ptr %214, align 1, !tbaa !15
  %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1
  %exitcond198.not = icmp eq i64 %indvars.iv.next195, %wide.trip.count197
  br i1 %exitcond198.not, label %._crit_edge.us176, label %scalar.ph285, !llvm.loop !28

._crit_edge.us176:                                ; preds = %scalar.ph285, %middle.block284
  %215 = add nuw nsw i32 %.0122171.us, 1
  %exitcond199.not = icmp eq i32 %215, %25
  br i1 %exitcond199.not, label %._crit_edge174, label %.lr.ph.us175, !llvm.loop !29

._crit_edge174:                                   ; preds = %._crit_edge.us176, %.preheader, %.lr.ph173
  ret void
}

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

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

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

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

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <8 x i16> @llvm.smax.v8i16(<8 x i16>, <8 x i16>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <8 x i16> @llvm.smin.v8i16(<8 x i16>, <8 x i16>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.smax.v8i16(<8 x i16>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.smin.v8i16(<8 x i16>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.add.v8i16(<8 x i16>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <8 x double> @llvm.sqrt.v8f64(<8 x double>) #2

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 = { 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 speculatable willreturn memory(none) }
attributes #3 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #4 = { noreturn 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, !10, i64 16}
!6 = !{!"px_image_t", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !10, i64 12}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !10, i64 20}
!15 = !{!8, !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !8, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !19, !21, !20}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19, !20, !21}
!25 = distinct !{!25, !19, !21, !20}
!26 = distinct !{!26, !19}
!27 = distinct !{!27, !19, !20, !21}
!28 = distinct !{!28, !19, !21, !20}
!29 = distinct !{!29, !19}


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