; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/descriptor (Corner)

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

%class.ImageContent = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@patch_mask = external dso_local global ptr, align 8

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9normalizeP12ImageContentiif(ptr noundef %0, i32 noundef %1, i32 noundef %2, float noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store float %3, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store float 0.000000e+00, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store float 0.000000e+00, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %69, %4
  %23 = load i32, ptr %11, align 4, !tbaa !9
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %24)
  %26 = icmp ult i32 %23, %25
  br i1 %26, label %28, label %27

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

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

29:                                               ; preds = %65, %28
  %30 = load i32, ptr %13, align 4, !tbaa !9
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %31)
  %33 = icmp ult i32 %30, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %29
  %36 = load ptr, ptr @patch_mask, align 8, !tbaa !5
  %37 = getelementptr inbounds %class.ImageContent, ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = load i32, ptr %11, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds ptr, ptr %38, i64 %40
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  %43 = load i32, ptr %13, align 4, !tbaa !9
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds float, ptr %42, i64 %44
  %46 = load float, ptr %45, align 4, !tbaa !11
  %47 = fcmp ogt float %46, 0.000000e+00
  br i1 %47, label %48, label %64

48:                                               ; preds = %35
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %class.ImageContent, ptr %49, i32 0, i32 4
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %51, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds float, ptr %55, i64 %57
  %59 = load float, ptr %58, align 4, !tbaa !11
  %60 = load float, ptr %9, align 4, !tbaa !11
  %61 = fadd float %60, %59
  store float %61, ptr %9, align 4, !tbaa !11
  %62 = load float, ptr %10, align 4, !tbaa !11
  %63 = fadd float %62, 1.000000e+00
  store float %63, ptr %10, align 4, !tbaa !11
  br label %64

64:                                               ; preds = %48, %35
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = add i32 %66, 1
  store i32 %67, ptr %13, align 4, !tbaa !9
  br label %29, !llvm.loop !15

68:                                               ; preds = %34
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = add i32 %70, 1
  store i32 %71, ptr %11, align 4, !tbaa !9
  br label %22, !llvm.loop !17

72:                                               ; preds = %27
  %73 = load float, ptr %9, align 4, !tbaa !11
  %74 = load float, ptr %10, align 4, !tbaa !11
  %75 = fdiv float %73, %74
  store float %75, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store float 0.000000e+00, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %136, %72
  %77 = load i32, ptr %15, align 4, !tbaa !9
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %78)
  %80 = icmp ult i32 %77, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %76
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %139

82:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %132, %82
  %84 = load i32, ptr %16, align 4, !tbaa !9
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %85)
  %87 = icmp ult i32 %84, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %83
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %135

89:                                               ; preds = %83
  %90 = load ptr, ptr @patch_mask, align 8, !tbaa !5
  %91 = getelementptr inbounds %class.ImageContent, ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !13
  %93 = load i32, ptr %15, align 4, !tbaa !9
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i32, ptr %16, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds float, ptr %96, i64 %98
  %100 = load float, ptr %99, align 4, !tbaa !11
  %101 = fcmp ogt float %100, 0.000000e+00
  br i1 %101, label %102, label %131

102:                                              ; preds = %89
  %103 = load float, ptr %9, align 4, !tbaa !11
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %class.ImageContent, ptr %104, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !13
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds ptr, ptr %106, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !5
  %111 = load i32, ptr %16, align 4, !tbaa !9
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds float, ptr %110, i64 %112
  %114 = load float, ptr %113, align 4, !tbaa !11
  %115 = fsub float %103, %114
  %116 = load float, ptr %9, align 4, !tbaa !11
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.ImageContent, ptr %117, i32 0, i32 4
  %119 = load ptr, ptr %118, align 8, !tbaa !13
  %120 = load i32, ptr %15, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = load i32, ptr %16, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds float, ptr %123, i64 %125
  %127 = load float, ptr %126, align 4, !tbaa !11
  %128 = fsub float %116, %127
  %129 = load float, ptr %14, align 4, !tbaa !11
  %130 = call float @llvm.fmuladd.f32(float %115, float %128, float %129)
  store float %130, ptr %14, align 4, !tbaa !11
  br label %131

131:                                              ; preds = %102, %89
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %16, align 4, !tbaa !9
  %134 = add i32 %133, 1
  store i32 %134, ptr %16, align 4, !tbaa !9
  br label %83, !llvm.loop !18

135:                                              ; preds = %88
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %15, align 4, !tbaa !9
  %138 = add i32 %137, 1
  store i32 %138, ptr %15, align 4, !tbaa !9
  br label %76, !llvm.loop !19

139:                                              ; preds = %81
  %140 = load float, ptr %14, align 4, !tbaa !11
  %141 = load float, ptr %10, align 4, !tbaa !11
  %142 = fdiv float %140, %141
  %143 = call noundef float @_ZSt4sqrtf(float noundef %142)
  store float %143, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %144 = load float, ptr %14, align 4, !tbaa !11
  %145 = fpext float %144 to double
  %146 = fdiv double 5.000000e+01, %145
  %147 = fptrunc double %146 to float
  store float %147, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store float 0.000000e+00, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store float 1.000000e+03, ptr %19, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %291, %139
  %149 = load i32, ptr %20, align 4, !tbaa !9
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %150)
  %152 = icmp ult i32 %149, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %148
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %294

154:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %287, %154
  %156 = load i32, ptr %21, align 4, !tbaa !9
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %157)
  %159 = icmp ult i32 %156, %158
  br i1 %159, label %161, label %160

160:                                              ; preds = %155
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %290

161:                                              ; preds = %155
  %162 = load float, ptr %17, align 4, !tbaa !11
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %class.ImageContent, ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !13
  %166 = load i32, ptr %20, align 4, !tbaa !9
  %167 = zext i32 %166 to i64
  %168 = getelementptr inbounds ptr, ptr %165, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  %170 = load i32, ptr %21, align 4, !tbaa !9
  %171 = zext i32 %170 to i64
  %172 = getelementptr inbounds float, ptr %169, i64 %171
  %173 = load float, ptr %172, align 4, !tbaa !11
  %174 = load float, ptr %9, align 4, !tbaa !11
  %175 = fsub float %173, %174
  %176 = call float @llvm.fmuladd.f32(float %162, float %175, float 1.280000e+02)
  %177 = load ptr, ptr %5, align 8, !tbaa !5
  %178 = getelementptr inbounds %class.ImageContent, ptr %177, i32 0, i32 4
  %179 = load ptr, ptr %178, align 8, !tbaa !13
  %180 = load i32, ptr %20, align 4, !tbaa !9
  %181 = zext i32 %180 to i64
  %182 = getelementptr inbounds ptr, ptr %179, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !5
  %184 = load i32, ptr %21, align 4, !tbaa !9
  %185 = zext i32 %184 to i64
  %186 = getelementptr inbounds float, ptr %183, i64 %185
  store float %176, ptr %186, align 4, !tbaa !11
  %187 = load float, ptr %18, align 4, !tbaa !11
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = getelementptr inbounds %class.ImageContent, ptr %188, i32 0, i32 4
  %190 = load ptr, ptr %189, align 8, !tbaa !13
  %191 = load i32, ptr %20, align 4, !tbaa !9
  %192 = zext i32 %191 to i64
  %193 = getelementptr inbounds ptr, ptr %190, i64 %192
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  %195 = load i32, ptr %21, align 4, !tbaa !9
  %196 = zext i32 %195 to i64
  %197 = getelementptr inbounds float, ptr %194, i64 %196
  %198 = load float, ptr %197, align 4, !tbaa !11
  %199 = fcmp olt float %187, %198
  br i1 %199, label %200, label %212

200:                                              ; preds = %161
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = getelementptr inbounds %class.ImageContent, ptr %201, i32 0, i32 4
  %203 = load ptr, ptr %202, align 8, !tbaa !13
  %204 = load i32, ptr %20, align 4, !tbaa !9
  %205 = zext i32 %204 to i64
  %206 = getelementptr inbounds ptr, ptr %203, i64 %205
  %207 = load ptr, ptr %206, align 8, !tbaa !5
  %208 = load i32, ptr %21, align 4, !tbaa !9
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds float, ptr %207, i64 %209
  %211 = load float, ptr %210, align 4, !tbaa !11
  store float %211, ptr %18, align 4, !tbaa !11
  br label %212

212:                                              ; preds = %200, %161
  %213 = load float, ptr %19, align 4, !tbaa !11
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = getelementptr inbounds %class.ImageContent, ptr %214, i32 0, i32 4
  %216 = load ptr, ptr %215, align 8, !tbaa !13
  %217 = load i32, ptr %20, align 4, !tbaa !9
  %218 = zext i32 %217 to i64
  %219 = getelementptr inbounds ptr, ptr %216, i64 %218
  %220 = load ptr, ptr %219, align 8, !tbaa !5
  %221 = load i32, ptr %21, align 4, !tbaa !9
  %222 = zext i32 %221 to i64
  %223 = getelementptr inbounds float, ptr %220, i64 %222
  %224 = load float, ptr %223, align 4, !tbaa !11
  %225 = fcmp ogt float %213, %224
  br i1 %225, label %226, label %238

226:                                              ; preds = %212
  %227 = load ptr, ptr %5, align 8, !tbaa !5
  %228 = getelementptr inbounds %class.ImageContent, ptr %227, i32 0, i32 4
  %229 = load ptr, ptr %228, align 8, !tbaa !13
  %230 = load i32, ptr %20, align 4, !tbaa !9
  %231 = zext i32 %230 to i64
  %232 = getelementptr inbounds ptr, ptr %229, i64 %231
  %233 = load ptr, ptr %232, align 8, !tbaa !5
  %234 = load i32, ptr %21, align 4, !tbaa !9
  %235 = zext i32 %234 to i64
  %236 = getelementptr inbounds float, ptr %233, i64 %235
  %237 = load float, ptr %236, align 4, !tbaa !11
  store float %237, ptr %19, align 4, !tbaa !11
  br label %238

238:                                              ; preds = %226, %212
  %239 = load ptr, ptr %5, align 8, !tbaa !5
  %240 = getelementptr inbounds %class.ImageContent, ptr %239, i32 0, i32 4
  %241 = load ptr, ptr %240, align 8, !tbaa !13
  %242 = load i32, ptr %20, align 4, !tbaa !9
  %243 = zext i32 %242 to i64
  %244 = getelementptr inbounds ptr, ptr %241, i64 %243
  %245 = load ptr, ptr %244, align 8, !tbaa !5
  %246 = load i32, ptr %21, align 4, !tbaa !9
  %247 = zext i32 %246 to i64
  %248 = getelementptr inbounds float, ptr %245, i64 %247
  %249 = load float, ptr %248, align 4, !tbaa !11
  %250 = fcmp ogt float %249, 2.550000e+02
  br i1 %250, label %251, label %262

251:                                              ; preds = %238
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = getelementptr inbounds %class.ImageContent, ptr %252, i32 0, i32 4
  %254 = load ptr, ptr %253, align 8, !tbaa !13
  %255 = load i32, ptr %20, align 4, !tbaa !9
  %256 = zext i32 %255 to i64
  %257 = getelementptr inbounds ptr, ptr %254, i64 %256
  %258 = load ptr, ptr %257, align 8, !tbaa !5
  %259 = load i32, ptr %21, align 4, !tbaa !9
  %260 = zext i32 %259 to i64
  %261 = getelementptr inbounds float, ptr %258, i64 %260
  store float 2.550000e+02, ptr %261, align 4, !tbaa !11
  br label %262

262:                                              ; preds = %251, %238
  %263 = load ptr, ptr %5, align 8, !tbaa !5
  %264 = getelementptr inbounds %class.ImageContent, ptr %263, i32 0, i32 4
  %265 = load ptr, ptr %264, align 8, !tbaa !13
  %266 = load i32, ptr %20, align 4, !tbaa !9
  %267 = zext i32 %266 to i64
  %268 = getelementptr inbounds ptr, ptr %265, i64 %267
  %269 = load ptr, ptr %268, align 8, !tbaa !5
  %270 = load i32, ptr %21, align 4, !tbaa !9
  %271 = zext i32 %270 to i64
  %272 = getelementptr inbounds float, ptr %269, i64 %271
  %273 = load float, ptr %272, align 4, !tbaa !11
  %274 = fcmp olt float %273, 0.000000e+00
  br i1 %274, label %275, label %286

275:                                              ; preds = %262
  %276 = load ptr, ptr %5, align 8, !tbaa !5
  %277 = getelementptr inbounds %class.ImageContent, ptr %276, i32 0, i32 4
  %278 = load ptr, ptr %277, align 8, !tbaa !13
  %279 = load i32, ptr %20, align 4, !tbaa !9
  %280 = zext i32 %279 to i64
  %281 = getelementptr inbounds ptr, ptr %278, i64 %280
  %282 = load ptr, ptr %281, align 8, !tbaa !5
  %283 = load i32, ptr %21, align 4, !tbaa !9
  %284 = zext i32 %283 to i64
  %285 = getelementptr inbounds float, ptr %282, i64 %284
  store float 0.000000e+00, ptr %285, align 4, !tbaa !11
  br label %286

286:                                              ; preds = %275, %262
  br label %287

287:                                              ; preds = %286
  %288 = load i32, ptr %21, align 4, !tbaa !9
  %289 = add i32 %288, 1
  store i32 %289, ptr %21, align 4, !tbaa !9
  br label %155, !llvm.loop !20

290:                                              ; preds = %160
  br label %291

291:                                              ; preds = %290
  %292 = load i32, ptr %20, align 4, !tbaa !9
  %293 = add i32 %292, 1
  store i32 %293, ptr %20, align 4, !tbaa !9
  br label %148, !llvm.loop !21

294:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTS12ImageContent", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}


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

@patch_mask = external dso_local local_unnamed_addr global ptr, align 8

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z9normalizeP12ImageContentiif(ptr noundef nonnull %0, i32 noundef %1, i32 noundef %2, float noundef %3) local_unnamed_addr #2 {
  %5 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %._crit_edge103, label %.preheader95.lr.ph

.preheader95.lr.ph:                               ; preds = %4
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.preheader95

.preheader95:                                     ; preds = %.preheader95.lr.ph, %._crit_edge
  %indvars.iv132 = phi i64 [ 0, %.preheader95.lr.ph ], [ %indvars.iv.next133, %._crit_edge ]
  %.079102 = phi float [ 0.000000e+00, %.preheader95.lr.ph ], [ %.180.lcssa, %._crit_edge ]
  %.089100 = phi float [ 0.000000e+00, %.preheader95.lr.ph ], [ %.190.lcssa, %._crit_edge ]
  %7 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %.not126 = icmp eq i32 %7, 0
  br i1 %.not126, label %._crit_edge, label %.lr.ph

._crit_edge103:                                   ; preds = %._crit_edge, %4
  %.089.lcssa = phi float [ 0.000000e+00, %4 ], [ %.190.lcssa, %._crit_edge ]
  %.079.lcssa = phi float [ 0.000000e+00, %4 ], [ %.180.lcssa, %._crit_edge ]
  %8 = fdiv float %.079.lcssa, %.089.lcssa
  %9 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %.not127 = icmp eq i32 %9, 0
  br i1 %.not127, label %._crit_edge113, label %.preheader94.lr.ph

.preheader94.lr.ph:                               ; preds = %._crit_edge103
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.preheader94

._crit_edge:                                      ; preds = %30, %.preheader95
  %.190.lcssa = phi float [ %.089100, %.preheader95 ], [ %.291, %30 ]
  %.180.lcssa = phi float [ %.079102, %.preheader95 ], [ %.281, %30 ]
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %11 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %12 = zext i32 %11 to i64
  %13 = icmp ult i64 %indvars.iv.next133, %12
  br i1 %13, label %.preheader95, label %._crit_edge103, !llvm.loop !5

.lr.ph:                                           ; preds = %.preheader95, %30
  %indvars.iv = phi i64 [ %indvars.iv.next, %30 ], [ 0, %.preheader95 ]
  %.18098 = phi float [ %.281, %30 ], [ %.079102, %.preheader95 ]
  %.19096 = phi float [ %.291, %30 ], [ %.089100, %.preheader95 ]
  %14 = load ptr, ptr @patch_mask, align 8, !tbaa !7
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = getelementptr inbounds ptr, ptr %16, i64 %indvars.iv132
  %18 = load ptr, ptr %17, align 8, !tbaa !7
  %19 = getelementptr inbounds float, ptr %18, i64 %indvars.iv
  %20 = load float, ptr %19, align 4, !tbaa !14
  %21 = fcmp ogt float %20, 0.000000e+00
  br i1 %21, label %22, label %30

22:                                               ; preds = %.lr.ph
  %23 = load ptr, ptr %6, align 8, !tbaa !11
  %24 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv132
  %25 = load ptr, ptr %24, align 8, !tbaa !7
  %26 = getelementptr inbounds float, ptr %25, i64 %indvars.iv
  %27 = load float, ptr %26, align 4, !tbaa !14
  %28 = fadd float %.18098, %27
  %29 = fadd float %.19096, 1.000000e+00
  br label %30

30:                                               ; preds = %.lr.ph, %22
  %.291 = phi float [ %29, %22 ], [ %.19096, %.lr.ph ]
  %.281 = phi float [ %28, %22 ], [ %.18098, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %32 = zext i32 %31 to i64
  %33 = icmp ult i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !16

.preheader94:                                     ; preds = %.preheader94.lr.ph, %._crit_edge109
  %indvars.iv138 = phi i64 [ 0, %.preheader94.lr.ph ], [ %indvars.iv.next139, %._crit_edge109 ]
  %.084111 = phi float [ 0.000000e+00, %.preheader94.lr.ph ], [ %.185.lcssa, %._crit_edge109 ]
  %34 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %.not128 = icmp eq i32 %34, 0
  br i1 %.not128, label %._crit_edge109, label %.lr.ph108

._crit_edge113:                                   ; preds = %._crit_edge109, %._crit_edge103
  %.084.lcssa = phi float [ 0.000000e+00, %._crit_edge103 ], [ %.185.lcssa, %._crit_edge109 ]
  %35 = fdiv float %.084.lcssa, %.089.lcssa
  %36 = tail call noundef float @_ZSt4sqrtf(float noundef %35)
  %37 = fdiv float 5.000000e+01, %36
  %38 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %.not129 = icmp eq i32 %38, 0
  br i1 %.not129, label %._crit_edge125, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge113
  %39 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.preheader

._crit_edge109:                                   ; preds = %59, %.preheader94
  %.185.lcssa = phi float [ %.084111, %.preheader94 ], [ %.286, %59 ]
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %40 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %41 = zext i32 %40 to i64
  %42 = icmp ult i64 %indvars.iv.next139, %41
  br i1 %42, label %.preheader94, label %._crit_edge113, !llvm.loop !17

.lr.ph108:                                        ; preds = %.preheader94, %59
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %59 ], [ 0, %.preheader94 ]
  %.185106 = phi float [ %.286, %59 ], [ %.084111, %.preheader94 ]
  %43 = load ptr, ptr @patch_mask, align 8, !tbaa !7
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = getelementptr inbounds ptr, ptr %45, i64 %indvars.iv138
  %47 = load ptr, ptr %46, align 8, !tbaa !7
  %48 = getelementptr inbounds float, ptr %47, i64 %indvars.iv135
  %49 = load float, ptr %48, align 4, !tbaa !14
  %50 = fcmp ogt float %49, 0.000000e+00
  br i1 %50, label %51, label %59

51:                                               ; preds = %.lr.ph108
  %52 = load ptr, ptr %10, align 8, !tbaa !11
  %53 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv138
  %54 = load ptr, ptr %53, align 8, !tbaa !7
  %55 = getelementptr inbounds float, ptr %54, i64 %indvars.iv135
  %56 = load float, ptr %55, align 4, !tbaa !14
  %57 = fsub float %8, %56
  %58 = tail call float @llvm.fmuladd.f32(float %57, float %57, float %.185106)
  br label %59

59:                                               ; preds = %.lr.ph108, %51
  %.286 = phi float [ %58, %51 ], [ %.185106, %.lr.ph108 ]
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %60 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %61 = zext i32 %60 to i64
  %62 = icmp ult i64 %indvars.iv.next136, %61
  br i1 %62, label %.lr.ph108, label %._crit_edge109, !llvm.loop !18

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge119
  %indvars.iv144 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next145, %._crit_edge119 ]
  %63 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %.not130 = icmp eq i32 %63, 0
  br i1 %.not130, label %._crit_edge119, label %.lr.ph118

._crit_edge125:                                   ; preds = %._crit_edge119, %._crit_edge113
  ret void

._crit_edge119:                                   ; preds = %77, %.preheader
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %64 = tail call noundef i32 @_ZNK12ImageContent1yEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %65 = zext i32 %64 to i64
  %66 = icmp ult i64 %indvars.iv.next145, %65
  br i1 %66, label %.preheader, label %._crit_edge125, !llvm.loop !19

.lr.ph118:                                        ; preds = %.preheader, %77
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %77 ], [ 0, %.preheader ]
  %67 = load ptr, ptr %39, align 8, !tbaa !11
  %68 = getelementptr inbounds ptr, ptr %67, i64 %indvars.iv144
  %69 = load ptr, ptr %68, align 8, !tbaa !7
  %70 = getelementptr inbounds float, ptr %69, i64 %indvars.iv141
  %71 = load float, ptr %70, align 4, !tbaa !14
  %72 = fsub float %71, %8
  %73 = tail call float @llvm.fmuladd.f32(float %37, float %72, float 1.280000e+02)
  store float %73, ptr %70, align 4, !tbaa !14
  %74 = fcmp ogt float %73, 2.550000e+02
  br i1 %74, label %.sink.split, label %75

75:                                               ; preds = %.lr.ph118
  %76 = fcmp olt float %73, 0.000000e+00
  br i1 %76, label %.sink.split, label %77

.sink.split:                                      ; preds = %75, %.lr.ph118
  %.sink = phi float [ 2.550000e+02, %.lr.ph118 ], [ 0.000000e+00, %75 ]
  store float %.sink, ptr %70, align 4, !tbaa !14
  br label %77

77:                                               ; preds = %.sink.split, %75
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %78 = tail call noundef i32 @_ZNK12ImageContent1xEv(ptr noundef nonnull align 8 dereferenceable(80) %0)
  %79 = zext i32 %78 to i64
  %80 = icmp ult i64 %indvars.iv.next142, %79
  br i1 %80, label %.lr.ph118, label %._crit_edge119, !llvm.loop !20
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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" }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!12, !8, i64 16}
!12 = !{!"_ZTS12ImageContent", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48, !8, i64 56, !8, i64 64, !8, i64 72}
!13 = !{!"int", !9, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !9, i64 0}
!16 = distinct !{!16, !6}
!17 = distinct !{!17, !6}
!18 = distinct !{!18, !6}
!19 = distinct !{!19, !6}
!20 = distinct !{!20, !6}


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