; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl (sift)

; 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._VlSiftFilt = type { double, double, double, double, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, ptr, double, i64, ptr, i32, i32, double, double, double, double, double, ptr, i32 }
%struct._VlSiftKeypoint = type { i32, i32, i32, i32, float, float, float, float }

; 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 double @llvm.floor.f64(double) #1

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @vl_sift_calc_keypoint_orientations(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca [36 x double], align 16
  %25 = alloca double, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca double, align 8
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca i32, align 4
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  %42 = alloca double, align 8
  %43 = alloca i32, align 4
  %44 = alloca double, align 8
  %45 = alloca double, align 8
  %46 = alloca double, align 8
  %47 = alloca double, align 8
  %48 = alloca double, align 8
  %49 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double 1.500000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._VlSiftFilt, ptr %50, i32 0, i32 11
  %52 = load i32, ptr %51, align 4, !tbaa !11
  %53 = sitofp i32 %52 to double
  %54 = call double @pow(double noundef 2.000000e+00, double noundef %53) #6
  store double %54, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._VlSiftFilt, ptr %55, i32 0, i32 15
  %57 = load i32, ptr %56, align 8, !tbaa !15
  store i32 %57, ptr %10, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._VlSiftFilt, ptr %58, i32 0, i32 16
  %60 = load i32, ptr %59, align 4, !tbaa !17
  store i32 %60, ptr %11, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 2, ptr %12, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %61 = load i32, ptr %10, align 4, !tbaa !16
  %62 = mul nsw i32 2, %61
  store i32 %62, ptr %13, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %63 = load i32, ptr %10, align 4, !tbaa !16
  %64 = mul nsw i32 2, %63
  %65 = load i32, ptr %11, align 4, !tbaa !16
  %66 = mul nsw i32 %64, %65
  store i32 %66, ptr %14, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._VlSiftKeypoint, ptr %67, i32 0, i32 4
  %69 = load float, ptr %68, align 4, !tbaa !18
  %70 = fpext float %69 to double
  %71 = load double, ptr %9, align 8, !tbaa !9
  %72 = fdiv double %70, %71
  store double %72, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._VlSiftKeypoint, ptr %73, i32 0, i32 5
  %75 = load float, ptr %74, align 4, !tbaa !21
  %76 = fpext float %75 to double
  %77 = load double, ptr %9, align 8, !tbaa !9
  %78 = fdiv double %76, %77
  store double %78, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._VlSiftKeypoint, ptr %79, i32 0, i32 7
  %81 = load float, ptr %80, align 4, !tbaa !22
  %82 = fpext float %81 to double
  %83 = load double, ptr %9, align 8, !tbaa !9
  %84 = fdiv double %82, %83
  store double %84, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %85 = load double, ptr %15, align 8, !tbaa !9
  %86 = fadd double %85, 5.000000e-01
  %87 = fptosi double %86 to i32
  store i32 %87, ptr %18, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %88 = load double, ptr %16, align 8, !tbaa !9
  %89 = fadd double %88, 5.000000e-01
  %90 = fptosi double %89 to i32
  store i32 %90, ptr %19, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._VlSiftKeypoint, ptr %91, i32 0, i32 3
  %93 = load i32, ptr %92, align 4, !tbaa !23
  store i32 %93, ptr %20, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %94 = load double, ptr %17, align 8, !tbaa !9
  %95 = fmul double 1.500000e+00, %94
  store double %95, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %96 = load double, ptr %21, align 8, !tbaa !9
  %97 = fmul double 3.000000e+00, %96
  %98 = call double @llvm.floor.f64(double %97)
  %99 = fcmp ogt double %98, 1.000000e+00
  br i1 %99, label %100, label %104

100:                                              ; preds = %3
  %101 = load double, ptr %21, align 8, !tbaa !9
  %102 = fmul double 3.000000e+00, %101
  %103 = call double @llvm.floor.f64(double %102)
  br label %105

104:                                              ; preds = %3
  br label %105

105:                                              ; preds = %104, %100
  %106 = phi double [ %103, %100 ], [ 1.000000e+00, %104 ]
  %107 = fptosi double %106 to i32
  store i32 %107, ptr %22, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 288, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._VlSiftKeypoint, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 4, !tbaa !24
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._VlSiftFilt, ptr %111, i32 0, i32 11
  %113 = load i32, ptr %112, align 4, !tbaa !11
  %114 = icmp ne i32 %110, %113
  br i1 %114, label %115, label %116

115:                                              ; preds = %105
  store i32 0, ptr %4, align 4
  store i32 1, ptr %31, align 4
  br label %493

116:                                              ; preds = %105
  %117 = load i32, ptr %18, align 4, !tbaa !16
  %118 = icmp slt i32 %117, 0
  br i1 %118, label %146, label %119

119:                                              ; preds = %116
  %120 = load i32, ptr %18, align 4, !tbaa !16
  %121 = load i32, ptr %10, align 4, !tbaa !16
  %122 = sub nsw i32 %121, 1
  %123 = icmp sgt i32 %120, %122
  br i1 %123, label %146, label %124

124:                                              ; preds = %119
  %125 = load i32, ptr %19, align 4, !tbaa !16
  %126 = icmp slt i32 %125, 0
  br i1 %126, label %146, label %127

127:                                              ; preds = %124
  %128 = load i32, ptr %19, align 4, !tbaa !16
  %129 = load i32, ptr %11, align 4, !tbaa !16
  %130 = sub nsw i32 %129, 1
  %131 = icmp sgt i32 %128, %130
  br i1 %131, label %146, label %132

132:                                              ; preds = %127
  %133 = load i32, ptr %20, align 4, !tbaa !16
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._VlSiftFilt, ptr %134, i32 0, i32 9
  %136 = load i32, ptr %135, align 4, !tbaa !25
  %137 = add nsw i32 %136, 1
  %138 = icmp slt i32 %133, %137
  br i1 %138, label %146, label %139

139:                                              ; preds = %132
  %140 = load i32, ptr %20, align 4, !tbaa !16
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._VlSiftFilt, ptr %141, i32 0, i32 10
  %143 = load i32, ptr %142, align 8, !tbaa !26
  %144 = sub nsw i32 %143, 2
  %145 = icmp sgt i32 %140, %144
  br i1 %145, label %146, label %147

146:                                              ; preds = %139, %132, %127, %124, %119, %116
  store i32 0, ptr %4, align 4
  store i32 1, ptr %31, align 4
  br label %493

147:                                              ; preds = %139
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  call void @update_gradient(ptr noundef %148)
  %149 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %149, i8 0, i64 288, i1 false)
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct._VlSiftFilt, ptr %150, i32 0, i32 28
  %152 = load ptr, ptr %151, align 8, !tbaa !27
  %153 = load i32, ptr %18, align 4, !tbaa !16
  %154 = mul nsw i32 2, %153
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds float, ptr %152, i64 %155
  %157 = load i32, ptr %13, align 4, !tbaa !16
  %158 = load i32, ptr %19, align 4, !tbaa !16
  %159 = mul nsw i32 %157, %158
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds float, ptr %156, i64 %160
  %162 = load i32, ptr %14, align 4, !tbaa !16
  %163 = load i32, ptr %20, align 4, !tbaa !16
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._VlSiftFilt, ptr %164, i32 0, i32 9
  %166 = load i32, ptr %165, align 4, !tbaa !25
  %167 = sub nsw i32 %163, %166
  %168 = sub nsw i32 %167, 1
  %169 = mul nsw i32 %162, %168
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds float, ptr %161, i64 %170
  store ptr %171, ptr %26, align 8, !tbaa !5
  %172 = load i32, ptr %22, align 4, !tbaa !16
  %173 = sub nsw i32 0, %172
  %174 = load i32, ptr %19, align 4, !tbaa !16
  %175 = sub nsw i32 0, %174
  %176 = icmp sgt i32 %173, %175
  br i1 %176, label %177, label %180

177:                                              ; preds = %147
  %178 = load i32, ptr %22, align 4, !tbaa !16
  %179 = sub nsw i32 0, %178
  br label %183

180:                                              ; preds = %147
  %181 = load i32, ptr %19, align 4, !tbaa !16
  %182 = sub nsw i32 0, %181
  br label %183

183:                                              ; preds = %180, %177
  %184 = phi i32 [ %179, %177 ], [ %182, %180 ]
  store i32 %184, ptr %28, align 4, !tbaa !16
  br label %185

185:                                              ; preds = %337, %183
  %186 = load i32, ptr %28, align 4, !tbaa !16
  %187 = load i32, ptr %22, align 4, !tbaa !16
  %188 = load i32, ptr %11, align 4, !tbaa !16
  %189 = sub nsw i32 %188, 1
  %190 = load i32, ptr %19, align 4, !tbaa !16
  %191 = sub nsw i32 %189, %190
  %192 = icmp slt i32 %187, %191
  br i1 %192, label %193, label %195

193:                                              ; preds = %185
  %194 = load i32, ptr %22, align 4, !tbaa !16
  br label %200

195:                                              ; preds = %185
  %196 = load i32, ptr %11, align 4, !tbaa !16
  %197 = sub nsw i32 %196, 1
  %198 = load i32, ptr %19, align 4, !tbaa !16
  %199 = sub nsw i32 %197, %198
  br label %200

200:                                              ; preds = %195, %193
  %201 = phi i32 [ %194, %193 ], [ %199, %195 ]
  %202 = icmp sle i32 %186, %201
  br i1 %202, label %203, label %340

203:                                              ; preds = %200
  %204 = load i32, ptr %22, align 4, !tbaa !16
  %205 = sub nsw i32 0, %204
  %206 = load i32, ptr %18, align 4, !tbaa !16
  %207 = sub nsw i32 0, %206
  %208 = icmp sgt i32 %205, %207
  br i1 %208, label %209, label %212

209:                                              ; preds = %203
  %210 = load i32, ptr %22, align 4, !tbaa !16
  %211 = sub nsw i32 0, %210
  br label %215

212:                                              ; preds = %203
  %213 = load i32, ptr %18, align 4, !tbaa !16
  %214 = sub nsw i32 0, %213
  br label %215

215:                                              ; preds = %212, %209
  %216 = phi i32 [ %211, %209 ], [ %214, %212 ]
  store i32 %216, ptr %27, align 4, !tbaa !16
  br label %217

217:                                              ; preds = %333, %215
  %218 = load i32, ptr %27, align 4, !tbaa !16
  %219 = load i32, ptr %22, align 4, !tbaa !16
  %220 = load i32, ptr %10, align 4, !tbaa !16
  %221 = sub nsw i32 %220, 1
  %222 = load i32, ptr %18, align 4, !tbaa !16
  %223 = sub nsw i32 %221, %222
  %224 = icmp slt i32 %219, %223
  br i1 %224, label %225, label %227

225:                                              ; preds = %217
  %226 = load i32, ptr %22, align 4, !tbaa !16
  br label %232

227:                                              ; preds = %217
  %228 = load i32, ptr %10, align 4, !tbaa !16
  %229 = sub nsw i32 %228, 1
  %230 = load i32, ptr %18, align 4, !tbaa !16
  %231 = sub nsw i32 %229, %230
  br label %232

232:                                              ; preds = %227, %225
  %233 = phi i32 [ %226, %225 ], [ %231, %227 ]
  %234 = icmp sle i32 %218, %233
  br i1 %234, label %235, label %336

235:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %236 = load i32, ptr %18, align 4, !tbaa !16
  %237 = load i32, ptr %27, align 4, !tbaa !16
  %238 = add nsw i32 %236, %237
  %239 = sitofp i32 %238 to double
  %240 = load double, ptr %15, align 8, !tbaa !9
  %241 = fsub double %239, %240
  store double %241, ptr %32, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %242 = load i32, ptr %19, align 4, !tbaa !16
  %243 = load i32, ptr %28, align 4, !tbaa !16
  %244 = add nsw i32 %242, %243
  %245 = sitofp i32 %244 to double
  %246 = load double, ptr %16, align 8, !tbaa !9
  %247 = fsub double %245, %246
  store double %247, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %248 = load double, ptr %32, align 8, !tbaa !9
  %249 = load double, ptr %32, align 8, !tbaa !9
  %250 = load double, ptr %33, align 8, !tbaa !9
  %251 = load double, ptr %33, align 8, !tbaa !9
  %252 = fmul double %250, %251
  %253 = call double @llvm.fmuladd.f64(double %248, double %249, double %252)
  store double %253, ptr %34, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %254 = load double, ptr %34, align 8, !tbaa !9
  %255 = load i32, ptr %22, align 4, !tbaa !16
  %256 = load i32, ptr %22, align 4, !tbaa !16
  %257 = mul nsw i32 %255, %256
  %258 = sitofp i32 %257 to double
  %259 = fadd double %258, 6.000000e-01
  %260 = fcmp oge double %254, %259
  br i1 %260, label %261, label %262

261:                                              ; preds = %235
  store i32 7, ptr %31, align 4
  br label %330

262:                                              ; preds = %235
  %263 = load double, ptr %34, align 8, !tbaa !9
  %264 = load double, ptr %21, align 8, !tbaa !9
  %265 = fmul double 2.000000e+00, %264
  %266 = load double, ptr %21, align 8, !tbaa !9
  %267 = fmul double %265, %266
  %268 = fdiv double %263, %267
  %269 = call double @fast_expn(double noundef %268)
  store double %269, ptr %35, align 8, !tbaa !9
  %270 = load ptr, ptr %26, align 8, !tbaa !5
  %271 = load i32, ptr %27, align 4, !tbaa !16
  %272 = mul nsw i32 %271, 2
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds float, ptr %270, i64 %273
  %275 = load i32, ptr %28, align 4, !tbaa !16
  %276 = load i32, ptr %13, align 4, !tbaa !16
  %277 = mul nsw i32 %275, %276
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds float, ptr %274, i64 %278
  %280 = load float, ptr %279, align 4, !tbaa !28
  %281 = fpext float %280 to double
  store double %281, ptr %36, align 8, !tbaa !9
  %282 = load ptr, ptr %26, align 8, !tbaa !5
  %283 = load i32, ptr %27, align 4, !tbaa !16
  %284 = mul nsw i32 %283, 2
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds float, ptr %282, i64 %285
  %287 = load i32, ptr %28, align 4, !tbaa !16
  %288 = load i32, ptr %13, align 4, !tbaa !16
  %289 = mul nsw i32 %287, %288
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds float, ptr %286, i64 %290
  %292 = getelementptr inbounds float, ptr %291, i64 1
  %293 = load float, ptr %292, align 4, !tbaa !28
  %294 = fpext float %293 to double
  store double %294, ptr %37, align 8, !tbaa !9
  %295 = load double, ptr %37, align 8, !tbaa !9
  %296 = fmul double 3.600000e+01, %295
  %297 = fdiv double %296, 0x401921FB54442D18
  store double %297, ptr %38, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  %298 = load double, ptr %38, align 8, !tbaa !9
  %299 = fsub double %298, 5.000000e-01
  %300 = call i64 @vl_floor_d(double noundef %299)
  %301 = trunc i64 %300 to i32
  store i32 %301, ptr %39, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #6
  %302 = load double, ptr %38, align 8, !tbaa !9
  %303 = load i32, ptr %39, align 4, !tbaa !16
  %304 = sitofp i32 %303 to double
  %305 = fsub double %302, %304
  %306 = fsub double %305, 5.000000e-01
  store double %306, ptr %40, align 8, !tbaa !9
  %307 = load double, ptr %40, align 8, !tbaa !9
  %308 = fsub double 1.000000e+00, %307
  %309 = load double, ptr %36, align 8, !tbaa !9
  %310 = fmul double %308, %309
  %311 = load double, ptr %35, align 8, !tbaa !9
  %312 = load i32, ptr %39, align 4, !tbaa !16
  %313 = add nsw i32 %312, 36
  %314 = srem i32 %313, 36
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %315
  %317 = load double, ptr %316, align 8, !tbaa !9
  %318 = call double @llvm.fmuladd.f64(double %310, double %311, double %317)
  store double %318, ptr %316, align 8, !tbaa !9
  %319 = load double, ptr %40, align 8, !tbaa !9
  %320 = load double, ptr %36, align 8, !tbaa !9
  %321 = fmul double %319, %320
  %322 = load double, ptr %35, align 8, !tbaa !9
  %323 = load i32, ptr %39, align 4, !tbaa !16
  %324 = add nsw i32 %323, 1
  %325 = srem i32 %324, 36
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %326
  %328 = load double, ptr %327, align 8, !tbaa !9
  %329 = call double @llvm.fmuladd.f64(double %321, double %322, double %328)
  store double %329, ptr %327, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  store i32 0, ptr %31, align 4
  br label %330

330:                                              ; preds = %262, %261
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  %331 = load i32, ptr %31, align 4
  switch i32 %331, label %495 [
    i32 0, label %332
    i32 7, label %333
  ]

332:                                              ; preds = %330
  br label %333

333:                                              ; preds = %332, %330
  %334 = load i32, ptr %27, align 4, !tbaa !16
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %27, align 4, !tbaa !16
  br label %217, !llvm.loop !29

336:                                              ; preds = %232
  br label %337

337:                                              ; preds = %336
  %338 = load i32, ptr %28, align 4, !tbaa !16
  %339 = add nsw i32 %338, 1
  store i32 %339, ptr %28, align 4, !tbaa !16
  br label %185, !llvm.loop !31

340:                                              ; preds = %200
  store i32 0, ptr %29, align 4, !tbaa !16
  br label %341

341:                                              ; preds = %391, %340
  %342 = load i32, ptr %29, align 4, !tbaa !16
  %343 = icmp slt i32 %342, 6
  br i1 %343, label %344, label %394

344:                                              ; preds = %341
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  %345 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 35
  %346 = load double, ptr %345, align 8, !tbaa !9
  store double %346, ptr %41, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #6
  %347 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 0
  %348 = load double, ptr %347, align 16, !tbaa !9
  store double %348, ptr %42, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #6
  store i32 0, ptr %43, align 4, !tbaa !16
  br label %349

349:                                              ; preds = %375, %344
  %350 = load i32, ptr %43, align 4, !tbaa !16
  %351 = icmp slt i32 %350, 35
  br i1 %351, label %352, label %378

352:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  %353 = load double, ptr %41, align 8, !tbaa !9
  %354 = load i32, ptr %43, align 4, !tbaa !16
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %355
  %357 = load double, ptr %356, align 8, !tbaa !9
  %358 = fadd double %353, %357
  %359 = load i32, ptr %43, align 4, !tbaa !16
  %360 = add nsw i32 %359, 1
  %361 = srem i32 %360, 36
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %362
  %364 = load double, ptr %363, align 8, !tbaa !9
  %365 = fadd double %358, %364
  %366 = fdiv double %365, 3.000000e+00
  store double %366, ptr %44, align 8, !tbaa !9
  %367 = load i32, ptr %43, align 4, !tbaa !16
  %368 = sext i32 %367 to i64
  %369 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %368
  %370 = load double, ptr %369, align 8, !tbaa !9
  store double %370, ptr %41, align 8, !tbaa !9
  %371 = load double, ptr %44, align 8, !tbaa !9
  %372 = load i32, ptr %43, align 4, !tbaa !16
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %373
  store double %371, ptr %374, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  br label %375

375:                                              ; preds = %352
  %376 = load i32, ptr %43, align 4, !tbaa !16
  %377 = add nsw i32 %376, 1
  store i32 %377, ptr %43, align 4, !tbaa !16
  br label %349, !llvm.loop !32

378:                                              ; preds = %349
  %379 = load double, ptr %41, align 8, !tbaa !9
  %380 = load i32, ptr %43, align 4, !tbaa !16
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %381
  %383 = load double, ptr %382, align 8, !tbaa !9
  %384 = fadd double %379, %383
  %385 = load double, ptr %42, align 8, !tbaa !9
  %386 = fadd double %384, %385
  %387 = fdiv double %386, 3.000000e+00
  %388 = load i32, ptr %43, align 4, !tbaa !16
  %389 = sext i32 %388 to i64
  %390 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %389
  store double %387, ptr %390, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  br label %391

391:                                              ; preds = %378
  %392 = load i32, ptr %29, align 4, !tbaa !16
  %393 = add nsw i32 %392, 1
  store i32 %393, ptr %29, align 4, !tbaa !16
  br label %341, !llvm.loop !33

394:                                              ; preds = %341
  store double 0.000000e+00, ptr %25, align 8, !tbaa !9
  store i32 0, ptr %30, align 4, !tbaa !16
  br label %395

395:                                              ; preds = %414, %394
  %396 = load i32, ptr %30, align 4, !tbaa !16
  %397 = icmp slt i32 %396, 36
  br i1 %397, label %398, label %417

398:                                              ; preds = %395
  %399 = load double, ptr %25, align 8, !tbaa !9
  %400 = load i32, ptr %30, align 4, !tbaa !16
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %401
  %403 = load double, ptr %402, align 8, !tbaa !9
  %404 = fcmp ogt double %399, %403
  br i1 %404, label %405, label %407

405:                                              ; preds = %398
  %406 = load double, ptr %25, align 8, !tbaa !9
  br label %412

407:                                              ; preds = %398
  %408 = load i32, ptr %30, align 4, !tbaa !16
  %409 = sext i32 %408 to i64
  %410 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %409
  %411 = load double, ptr %410, align 8, !tbaa !9
  br label %412

412:                                              ; preds = %407, %405
  %413 = phi double [ %406, %405 ], [ %411, %407 ]
  store double %413, ptr %25, align 8, !tbaa !9
  br label %414

414:                                              ; preds = %412
  %415 = load i32, ptr %30, align 4, !tbaa !16
  %416 = add nsw i32 %415, 1
  store i32 %416, ptr %30, align 4, !tbaa !16
  br label %395, !llvm.loop !34

417:                                              ; preds = %395
  store i32 0, ptr %23, align 4, !tbaa !16
  store i32 0, ptr %30, align 4, !tbaa !16
  br label %418

418:                                              ; preds = %487, %417
  %419 = load i32, ptr %30, align 4, !tbaa !16
  %420 = icmp slt i32 %419, 36
  br i1 %420, label %421, label %490

421:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  %422 = load i32, ptr %30, align 4, !tbaa !16
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %423
  %425 = load double, ptr %424, align 8, !tbaa !9
  store double %425, ptr %45, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #6
  %426 = load i32, ptr %30, align 4, !tbaa !16
  %427 = sub nsw i32 %426, 1
  %428 = add nsw i32 %427, 36
  %429 = srem i32 %428, 36
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %430
  %432 = load double, ptr %431, align 8, !tbaa !9
  store double %432, ptr %46, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #6
  %433 = load i32, ptr %30, align 4, !tbaa !16
  %434 = add nsw i32 %433, 1
  %435 = add nsw i32 %434, 36
  %436 = srem i32 %435, 36
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds [36 x double], ptr %24, i64 0, i64 %437
  %439 = load double, ptr %438, align 8, !tbaa !9
  store double %439, ptr %47, align 8, !tbaa !9
  %440 = load double, ptr %45, align 8, !tbaa !9
  %441 = load double, ptr %25, align 8, !tbaa !9
  %442 = fmul double 8.000000e-01, %441
  %443 = fcmp ogt double %440, %442
  br i1 %443, label %444, label %483

444:                                              ; preds = %421
  %445 = load double, ptr %45, align 8, !tbaa !9
  %446 = load double, ptr %46, align 8, !tbaa !9
  %447 = fcmp ogt double %445, %446
  br i1 %447, label %448, label %483

448:                                              ; preds = %444
  %449 = load double, ptr %45, align 8, !tbaa !9
  %450 = load double, ptr %47, align 8, !tbaa !9
  %451 = fcmp ogt double %449, %450
  br i1 %451, label %452, label %483

452:                                              ; preds = %448
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #6
  %453 = load double, ptr %47, align 8, !tbaa !9
  %454 = load double, ptr %46, align 8, !tbaa !9
  %455 = fsub double %453, %454
  %456 = fmul double -5.000000e-01, %455
  %457 = load double, ptr %47, align 8, !tbaa !9
  %458 = load double, ptr %46, align 8, !tbaa !9
  %459 = fadd double %457, %458
  %460 = load double, ptr %45, align 8, !tbaa !9
  %461 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %460, double %459)
  %462 = fdiv double %456, %461
  store double %462, ptr %48, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #6
  %463 = load i32, ptr %30, align 4, !tbaa !16
  %464 = sitofp i32 %463 to double
  %465 = load double, ptr %48, align 8, !tbaa !9
  %466 = fadd double %464, %465
  %467 = fadd double %466, 5.000000e-01
  %468 = fmul double 0x401921FB54442D18, %467
  %469 = fdiv double %468, 3.600000e+01
  store double %469, ptr %49, align 8, !tbaa !9
  %470 = load double, ptr %49, align 8, !tbaa !9
  %471 = load ptr, ptr %6, align 8, !tbaa !5
  %472 = load i32, ptr %23, align 4, !tbaa !16
  %473 = add nsw i32 %472, 1
  store i32 %473, ptr %23, align 4, !tbaa !16
  %474 = sext i32 %472 to i64
  %475 = getelementptr inbounds double, ptr %471, i64 %474
  store double %470, ptr %475, align 8, !tbaa !9
  %476 = load i32, ptr %23, align 4, !tbaa !16
  %477 = icmp eq i32 %476, 4
  br i1 %477, label %478, label %479

478:                                              ; preds = %452
  store i32 20, ptr %31, align 4
  br label %480

479:                                              ; preds = %452
  store i32 0, ptr %31, align 4
  br label %480

480:                                              ; preds = %479, %478
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  %481 = load i32, ptr %31, align 4
  switch i32 %481, label %484 [
    i32 0, label %482
  ]

482:                                              ; preds = %480
  br label %483

483:                                              ; preds = %482, %448, %444, %421
  store i32 0, ptr %31, align 4
  br label %484

484:                                              ; preds = %483, %480
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  %485 = load i32, ptr %31, align 4
  switch i32 %485, label %493 [
    i32 0, label %486
    i32 20, label %491
  ]

486:                                              ; preds = %484
  br label %487

487:                                              ; preds = %486
  %488 = load i32, ptr %30, align 4, !tbaa !16
  %489 = add nsw i32 %488, 1
  store i32 %489, ptr %30, align 4, !tbaa !16
  br label %418, !llvm.loop !35

490:                                              ; preds = %418
  br label %491

491:                                              ; preds = %490, %484
  %492 = load i32, ptr %23, align 4, !tbaa !16
  store i32 %492, ptr %4, align 4
  store i32 1, ptr %31, align 4
  br label %493

493:                                              ; preds = %491, %484, %146, %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 288, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %494 = load i32, ptr %4, align 4
  ret i32 %494

495:                                              ; preds = %330
  unreachable
}

; Function Attrs: nounwind uwtable
declare hidden void @update_gradient(ptr noundef) #3

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @fast_expn(double noundef) #5

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @vl_floor_d(double noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 60}
!12 = !{!"_VlSiftFilt", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !13, i64 88, !13, i64 92, !6, i64 96, !10, i64 104, !14, i64 112, !6, i64 120, !13, i64 128, !13, i64 132, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !6, i64 176, !13, i64 184}
!13 = !{!"int", !7, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = !{!12, !13, i64 88}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !13, i64 92}
!18 = !{!19, !20, i64 16}
!19 = !{!"_VlSiftKeypoint", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !20, i64 16, !20, i64 20, !20, i64 24, !20, i64 28}
!20 = !{!"float", !7, i64 0}
!21 = !{!19, !20, i64 20}
!22 = !{!19, !20, i64 28}
!23 = !{!19, !13, i64 12}
!24 = !{!19, !13, i64 0}
!25 = !{!12, !13, i64 52}
!26 = !{!12, !13, i64 56}
!27 = !{!12, !6, i64 176}
!28 = !{!20, !20, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !30}
!34 = distinct !{!34, !30}
!35 = distinct !{!35, !30}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @vl_sift_calc_keypoint_orientations(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #2 {
  %4 = alloca [36 x double], align 16
  %5 = getelementptr inbounds i8, ptr %0, i64 60
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %ldexp = tail call double @ldexp(double 1.000000e+00, i32 %6) #7
  %7 = getelementptr inbounds i8, ptr %0, i64 88
  %8 = getelementptr inbounds i8, ptr %2, i64 16
  %9 = getelementptr inbounds i8, ptr %2, i64 28
  %10 = load float, ptr %9, align 4, !tbaa !13
  %11 = fpext float %10 to double
  %12 = fdiv double %11, %ldexp
  %13 = load <2 x i32>, ptr %7, align 8, !tbaa !16
  %14 = extractelement <2 x i32> %13, i64 0
  %15 = shl nsw i32 %14, 1
  %16 = extractelement <2 x i32> %13, i64 1
  %17 = mul nsw i32 %15, %16
  %18 = load <2 x float>, ptr %8, align 4, !tbaa !17
  %19 = fpext <2 x float> %18 to <2 x double>
  %20 = insertelement <2 x double> poison, double %ldexp, i64 0
  %21 = shufflevector <2 x double> %20, <2 x double> poison, <2 x i32> zeroinitializer
  %22 = fdiv <2 x double> %19, %21
  %23 = fadd <2 x double> %22, <double 5.000000e-01, double 5.000000e-01>
  %24 = fptosi <2 x double> %23 to <2 x i32>
  %25 = getelementptr inbounds i8, ptr %2, i64 12
  %26 = load i32, ptr %25, align 4, !tbaa !18
  %27 = fmul double %12, 1.500000e+00
  %28 = fmul double %27, 3.000000e+00
  %29 = tail call double @llvm.floor.f64(double %28)
  %30 = fcmp ogt double %29, 1.000000e+00
  %31 = select i1 %30, double %29, double 1.000000e+00
  %32 = fptosi double %31 to i32
  call void @llvm.lifetime.start.p0(i64 288, ptr nonnull %4) #7
  %33 = load i32, ptr %2, align 4, !tbaa !19
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %.not = icmp ne i32 %33, %34
  %35 = extractelement <2 x i32> %24, i64 0
  %36 = icmp slt i32 %35, 0
  %or.cond180 = select i1 %.not, i1 true, i1 %36
  br i1 %or.cond180, label %.loopexit, label %37

37:                                               ; preds = %3
  %38 = icmp sgt <2 x i32> %13, %24
  %39 = extractelement <2 x i32> %24, i64 1
  %40 = icmp sgt i32 %39, -1
  %41 = extractelement <2 x i1> %38, i64 0
  %or.cond.not184 = select i1 %41, i1 %40, i1 false
  %42 = extractelement <2 x i1> %38, i64 1
  %or.cond175 = select i1 %or.cond.not184, i1 %42, i1 false
  br i1 %or.cond175, label %43, label %.loopexit

43:                                               ; preds = %37
  %44 = getelementptr inbounds i8, ptr %0, i64 52
  %45 = load i32, ptr %44, align 4, !tbaa !20
  %.not171 = icmp sgt i32 %26, %45
  br i1 %.not171, label %46, label %.loopexit

46:                                               ; preds = %43
  %47 = getelementptr inbounds i8, ptr %0, i64 56
  %48 = load i32, ptr %47, align 8, !tbaa !21
  %49 = add nsw i32 %48, -2
  %50 = icmp sgt i32 %26, %49
  br i1 %50, label %.loopexit, label %51

51:                                               ; preds = %46
  tail call void @update_gradient(ptr noundef nonnull %0)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(288) %4, i8 0, i64 288, i1 false)
  %52 = getelementptr inbounds i8, ptr %0, i64 176
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  %54 = shl nuw nsw i32 %35, 1
  %55 = zext nneg i32 %54 to i64
  %56 = getelementptr inbounds float, ptr %53, i64 %55
  %57 = mul nsw i32 %15, %39
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds float, ptr %56, i64 %58
  %60 = load i32, ptr %44, align 4, !tbaa !20
  %61 = xor i32 %60, -1
  %62 = add i32 %26, %61
  %63 = mul nsw i32 %17, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds float, ptr %59, i64 %64
  %66 = tail call i32 @llvm.smin.i32(i32 %32, i32 %39)
  %67 = sub nsw i32 0, %66
  %68 = xor i32 %39, -1
  %69 = add i32 %16, %68
  %. = tail call i32 @llvm.smin.i32(i32 %69, i32 %32)
  %.not172189 = icmp slt i32 %., %67
  br i1 %.not172189, label %.preheader186, label %.lr.ph192

.lr.ph192:                                        ; preds = %51
  %70 = tail call i32 @llvm.smin.i32(i32 %32, i32 %35)
  %71 = sub nsw i32 0, %70
  %72 = xor i32 %35, -1
  %73 = add nsw i32 %14, %72
  %.176 = tail call i32 @llvm.smin.i32(i32 %73, i32 %32)
  %.not174187 = icmp slt i32 %.176, %71
  %74 = mul nsw i32 %32, %32
  %75 = uitofp nneg i32 %74 to double
  %76 = fadd double %75, 6.000000e-01
  %77 = fmul double %27, 2.000000e+00
  %78 = fmul double %27, %77
  br i1 %.not174187, label %.preheader186, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph192
  %79 = sext i32 %71 to i64
  %80 = zext nneg i32 %35 to i64
  %81 = add i32 %70, %.176
  %82 = add i32 %81, 1
  %83 = sext i32 %32 to i64
  %smin = tail call i64 @llvm.smin.i64(i64 %83, i64 %80)
  %84 = trunc nsw i64 %smin to i32
  %85 = sub i32 %82, %84
  %86 = sext i32 %67 to i64
  %87 = zext nneg i32 %39 to i64
  %88 = sext i32 %15 to i64
  %89 = add i32 %66, %.
  %90 = add i32 %89, 1
  %smin202 = tail call i64 @llvm.smin.i64(i64 %83, i64 %87)
  %91 = trunc nsw i64 %smin202 to i32
  %92 = sub i32 %90, %91
  %93 = extractelement <2 x double> %22, i64 1
  %94 = extractelement <2 x double> %22, i64 0
  br label %.lr.ph

.preheader186.loopexit198:                        ; preds = %._crit_edge
  %.phi.trans.insert = getelementptr inbounds i8, ptr %4, i64 280
  %.pre.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !23
  br label %.preheader186

.preheader186:                                    ; preds = %.lr.ph192, %.preheader186.loopexit198, %51
  %.pre = phi double [ %.pre.pre, %.preheader186.loopexit198 ], [ 0.000000e+00, %51 ], [ 0.000000e+00, %.lr.ph192 ]
  %95 = getelementptr inbounds i8, ptr %4, i64 280
  %96 = getelementptr inbounds i8, ptr %4, i64 8
  %97 = getelementptr inbounds i8, ptr %4, i64 16
  %98 = getelementptr inbounds i8, ptr %4, i64 24
  %99 = getelementptr inbounds i8, ptr %4, i64 32
  %100 = getelementptr inbounds i8, ptr %4, i64 40
  %101 = getelementptr inbounds i8, ptr %4, i64 48
  %102 = getelementptr inbounds i8, ptr %4, i64 56
  %103 = getelementptr inbounds i8, ptr %4, i64 64
  %104 = getelementptr inbounds i8, ptr %4, i64 72
  %105 = getelementptr inbounds i8, ptr %4, i64 80
  %106 = getelementptr inbounds i8, ptr %4, i64 88
  %107 = getelementptr inbounds i8, ptr %4, i64 96
  %108 = getelementptr inbounds i8, ptr %4, i64 104
  %109 = getelementptr inbounds i8, ptr %4, i64 112
  %110 = getelementptr inbounds i8, ptr %4, i64 120
  %111 = getelementptr inbounds i8, ptr %4, i64 128
  %112 = getelementptr inbounds i8, ptr %4, i64 136
  %113 = getelementptr inbounds i8, ptr %4, i64 144
  %114 = getelementptr inbounds i8, ptr %4, i64 152
  %115 = getelementptr inbounds i8, ptr %4, i64 160
  %116 = getelementptr inbounds i8, ptr %4, i64 168
  %117 = getelementptr inbounds i8, ptr %4, i64 176
  %118 = getelementptr inbounds i8, ptr %4, i64 184
  %119 = getelementptr inbounds i8, ptr %4, i64 192
  %120 = getelementptr inbounds i8, ptr %4, i64 200
  %121 = getelementptr inbounds i8, ptr %4, i64 208
  %122 = getelementptr inbounds i8, ptr %4, i64 216
  %123 = getelementptr inbounds i8, ptr %4, i64 224
  %124 = getelementptr inbounds i8, ptr %4, i64 232
  %125 = getelementptr inbounds i8, ptr %4, i64 240
  %126 = getelementptr inbounds i8, ptr %4, i64 248
  %127 = getelementptr inbounds i8, ptr %4, i64 256
  %128 = getelementptr inbounds i8, ptr %4, i64 264
  %129 = getelementptr inbounds i8, ptr %4, i64 272
  %.promoted = load double, ptr %4, align 16, !tbaa !23
  %.promoted260 = load double, ptr %96, align 8, !tbaa !23
  %.promoted262 = load double, ptr %97, align 16, !tbaa !23
  %130 = load <2 x double>, ptr %98, align 8, !tbaa !23
  %131 = load <2 x double>, ptr %100, align 8, !tbaa !23
  %132 = load <2 x double>, ptr %102, align 8, !tbaa !23
  %133 = load <2 x double>, ptr %104, align 8, !tbaa !23
  %134 = load <2 x double>, ptr %106, align 8, !tbaa !23
  %135 = load <2 x double>, ptr %108, align 8, !tbaa !23
  %136 = load <2 x double>, ptr %110, align 8, !tbaa !23
  %137 = load <2 x double>, ptr %112, align 8, !tbaa !23
  %138 = load <2 x double>, ptr %114, align 8, !tbaa !23
  %139 = load <2 x double>, ptr %116, align 8, !tbaa !23
  %140 = load <2 x double>, ptr %118, align 8, !tbaa !23
  %141 = load <2 x double>, ptr %120, align 8, !tbaa !23
  %142 = load <2 x double>, ptr %122, align 8, !tbaa !23
  %143 = load <2 x double>, ptr %124, align 8, !tbaa !23
  %144 = load <2 x double>, ptr %126, align 8, !tbaa !23
  %145 = load <2 x double>, ptr %128, align 8, !tbaa !23
  %.promoted328 = load double, ptr %95, align 8, !tbaa !23
  %146 = insertelement <2 x double> poison, double %.pre, i64 0
  %147 = insertelement <2 x double> %146, double %.promoted260, i64 1
  %148 = insertelement <2 x double> poison, double %.promoted328, i64 0
  %149 = insertelement <2 x double> %148, double %.promoted, i64 1
  br label %195

.lr.ph:                                           ; preds = %.lr.ph.preheader, %._crit_edge
  %indvars.iv200 = phi i64 [ %86, %.lr.ph.preheader ], [ %indvars.iv.next201, %._crit_edge ]
  %150 = trunc i64 %indvars.iv200 to i32
  %151 = add i32 %39, %150
  %152 = sitofp i32 %151 to double
  %153 = fsub double %152, %93
  %154 = fmul double %153, %153
  %155 = mul nsw i64 %indvars.iv200, %88
  %invariant.gep = getelementptr float, ptr %65, i64 %155
  br label %156

156:                                              ; preds = %.lr.ph, %194
  %indvars.iv = phi i64 [ %79, %.lr.ph ], [ %indvars.iv.next, %194 ]
  %157 = trunc i64 %indvars.iv to i32
  %158 = add i32 %35, %157
  %159 = sitofp i32 %158 to double
  %160 = fsub double %159, %94
  %161 = tail call double @llvm.fmuladd.f64(double %160, double %160, double %154)
  %162 = fcmp ult double %161, %76
  br i1 %162, label %163, label %194

163:                                              ; preds = %156
  %164 = fdiv double %161, %78
  %165 = tail call double @fast_expn(double noundef %164)
  %gep.idx = shl i64 %indvars.iv, 3
  %gep = getelementptr i8, ptr %invariant.gep, i64 %gep.idx
  %166 = load float, ptr %gep, align 4, !tbaa !17
  %167 = fpext float %166 to double
  %168 = getelementptr inbounds i8, ptr %gep, i64 4
  %169 = load float, ptr %168, align 4, !tbaa !17
  %170 = fpext float %169 to double
  %171 = fmul double %170, 3.600000e+01
  %172 = fdiv double %171, 0x401921FB54442D18
  %173 = fadd double %172, -5.000000e-01
  %174 = tail call i64 @vl_floor_d(double noundef %173)
  %175 = trunc i64 %174 to i32
  %176 = sitofp i32 %175 to double
  %177 = fsub double %172, %176
  %178 = fadd double %177, -5.000000e-01
  %179 = fsub double 1.000000e+00, %178
  %180 = fmul double %179, %167
  %181 = add nsw i32 %175, 36
  %182 = srem i32 %181, 36
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [36 x double], ptr %4, i64 0, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !23
  %186 = tail call double @llvm.fmuladd.f64(double %180, double %165, double %185)
  store double %186, ptr %184, align 8, !tbaa !23
  %187 = fmul double %178, %167
  %188 = add nsw i32 %175, 1
  %189 = srem i32 %188, 36
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [36 x double], ptr %4, i64 0, i64 %190
  %192 = load double, ptr %191, align 8, !tbaa !23
  %193 = tail call double @llvm.fmuladd.f64(double %187, double %165, double %192)
  store double %193, ptr %191, align 8, !tbaa !23
  br label %194

194:                                              ; preds = %156, %163
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %85, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %156, !llvm.loop !24

._crit_edge:                                      ; preds = %194
  %indvars.iv.next201 = add nsw i64 %indvars.iv200, 1
  %lftr.wideiv203 = trunc i64 %indvars.iv.next201 to i32
  %exitcond204.not = icmp eq i32 %92, %lftr.wideiv203
  br i1 %exitcond204.not, label %.preheader186.loopexit198, label %.lr.ph, !llvm.loop !26

195:                                              ; preds = %.preheader186, %195
  %196 = phi double [ %.promoted262, %.preheader186 ], [ %311, %195 ]
  %.0148195 = phi i32 [ 0, %.preheader186 ], [ %307, %195 ]
  %197 = phi <2 x double> [ %147, %.preheader186 ], [ %308, %195 ]
  %198 = phi <2 x double> [ %130, %.preheader186 ], [ %310, %195 ]
  %199 = phi <2 x double> [ %131, %.preheader186 ], [ %313, %195 ]
  %200 = phi <2 x double> [ %132, %.preheader186 ], [ %315, %195 ]
  %201 = phi <2 x double> [ %133, %.preheader186 ], [ %317, %195 ]
  %202 = phi <2 x double> [ %134, %.preheader186 ], [ %319, %195 ]
  %203 = phi <2 x double> [ %135, %.preheader186 ], [ %321, %195 ]
  %204 = phi <2 x double> [ %136, %.preheader186 ], [ %323, %195 ]
  %205 = phi <2 x double> [ %137, %.preheader186 ], [ %325, %195 ]
  %206 = phi <2 x double> [ %138, %.preheader186 ], [ %327, %195 ]
  %207 = phi <2 x double> [ %139, %.preheader186 ], [ %329, %195 ]
  %208 = phi <2 x double> [ %140, %.preheader186 ], [ %331, %195 ]
  %209 = phi <2 x double> [ %141, %.preheader186 ], [ %333, %195 ]
  %210 = phi <2 x double> [ %142, %.preheader186 ], [ %335, %195 ]
  %211 = phi <2 x double> [ %143, %.preheader186 ], [ %337, %195 ]
  %212 = phi <2 x double> [ %144, %.preheader186 ], [ %339, %195 ]
  %213 = phi <2 x double> [ %145, %.preheader186 ], [ %341, %195 ]
  %214 = phi <2 x double> [ %149, %.preheader186 ], [ %343, %195 ]
  %215 = shufflevector <2 x double> %214, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %216 = fadd <2 x double> %215, %197
  %217 = shufflevector <2 x double> %197, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %218 = insertelement <2 x double> %217, double %196, i64 1
  %219 = fadd <2 x double> %216, %218
  %220 = fdiv <2 x double> %219, <double 3.000000e+00, double 3.000000e+00>
  %221 = shufflevector <2 x double> %217, <2 x double> %198, <2 x i32> <i32 0, i32 2>
  %222 = insertelement <2 x double> poison, double %196, i64 0
  %223 = shufflevector <2 x double> %222, <2 x double> poison, <2 x i32> zeroinitializer
  %224 = fadd <2 x double> %221, %223
  %225 = fadd <2 x double> %224, %198
  %226 = fdiv <2 x double> %225, <double 3.000000e+00, double 3.000000e+00>
  %227 = shufflevector <2 x double> %198, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %228 = shufflevector <2 x double> %198, <2 x double> %199, <2 x i32> <i32 0, i32 2>
  %229 = fadd <2 x double> %227, %228
  %230 = fadd <2 x double> %229, %199
  %231 = fdiv <2 x double> %230, <double 3.000000e+00, double 3.000000e+00>
  %232 = shufflevector <2 x double> %199, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %233 = shufflevector <2 x double> %199, <2 x double> %200, <2 x i32> <i32 0, i32 2>
  %234 = fadd <2 x double> %232, %233
  %235 = fadd <2 x double> %234, %200
  %236 = fdiv <2 x double> %235, <double 3.000000e+00, double 3.000000e+00>
  %237 = shufflevector <2 x double> %200, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %238 = shufflevector <2 x double> %200, <2 x double> %201, <2 x i32> <i32 0, i32 2>
  %239 = fadd <2 x double> %237, %238
  %240 = fadd <2 x double> %239, %201
  %241 = fdiv <2 x double> %240, <double 3.000000e+00, double 3.000000e+00>
  %242 = shufflevector <2 x double> %201, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %243 = shufflevector <2 x double> %201, <2 x double> %202, <2 x i32> <i32 0, i32 2>
  %244 = fadd <2 x double> %242, %243
  %245 = fadd <2 x double> %244, %202
  %246 = fdiv <2 x double> %245, <double 3.000000e+00, double 3.000000e+00>
  %247 = shufflevector <2 x double> %202, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %248 = shufflevector <2 x double> %202, <2 x double> %203, <2 x i32> <i32 0, i32 2>
  %249 = fadd <2 x double> %247, %248
  %250 = fadd <2 x double> %249, %203
  %251 = fdiv <2 x double> %250, <double 3.000000e+00, double 3.000000e+00>
  %252 = shufflevector <2 x double> %203, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %253 = shufflevector <2 x double> %203, <2 x double> %204, <2 x i32> <i32 0, i32 2>
  %254 = fadd <2 x double> %252, %253
  %255 = fadd <2 x double> %254, %204
  %256 = fdiv <2 x double> %255, <double 3.000000e+00, double 3.000000e+00>
  %257 = shufflevector <2 x double> %204, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %258 = shufflevector <2 x double> %204, <2 x double> %205, <2 x i32> <i32 0, i32 2>
  %259 = fadd <2 x double> %257, %258
  %260 = fadd <2 x double> %259, %205
  %261 = fdiv <2 x double> %260, <double 3.000000e+00, double 3.000000e+00>
  %262 = shufflevector <2 x double> %205, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %263 = shufflevector <2 x double> %205, <2 x double> %206, <2 x i32> <i32 0, i32 2>
  %264 = fadd <2 x double> %262, %263
  %265 = fadd <2 x double> %264, %206
  %266 = fdiv <2 x double> %265, <double 3.000000e+00, double 3.000000e+00>
  %267 = shufflevector <2 x double> %206, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %268 = shufflevector <2 x double> %206, <2 x double> %207, <2 x i32> <i32 0, i32 2>
  %269 = fadd <2 x double> %267, %268
  %270 = fadd <2 x double> %269, %207
  %271 = fdiv <2 x double> %270, <double 3.000000e+00, double 3.000000e+00>
  %272 = shufflevector <2 x double> %207, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %273 = shufflevector <2 x double> %207, <2 x double> %208, <2 x i32> <i32 0, i32 2>
  %274 = fadd <2 x double> %272, %273
  %275 = fadd <2 x double> %274, %208
  %276 = fdiv <2 x double> %275, <double 3.000000e+00, double 3.000000e+00>
  %277 = shufflevector <2 x double> %208, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %278 = shufflevector <2 x double> %208, <2 x double> %209, <2 x i32> <i32 0, i32 2>
  %279 = fadd <2 x double> %277, %278
  %280 = fadd <2 x double> %279, %209
  %281 = fdiv <2 x double> %280, <double 3.000000e+00, double 3.000000e+00>
  %282 = shufflevector <2 x double> %209, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %283 = shufflevector <2 x double> %209, <2 x double> %210, <2 x i32> <i32 0, i32 2>
  %284 = fadd <2 x double> %282, %283
  %285 = fadd <2 x double> %284, %210
  %286 = fdiv <2 x double> %285, <double 3.000000e+00, double 3.000000e+00>
  %287 = shufflevector <2 x double> %210, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %288 = shufflevector <2 x double> %210, <2 x double> %211, <2 x i32> <i32 0, i32 2>
  %289 = fadd <2 x double> %287, %288
  %290 = fadd <2 x double> %289, %211
  %291 = fdiv <2 x double> %290, <double 3.000000e+00, double 3.000000e+00>
  %292 = shufflevector <2 x double> %211, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %293 = shufflevector <2 x double> %211, <2 x double> %212, <2 x i32> <i32 0, i32 2>
  %294 = fadd <2 x double> %292, %293
  %295 = fadd <2 x double> %294, %212
  %296 = fdiv <2 x double> %295, <double 3.000000e+00, double 3.000000e+00>
  %297 = shufflevector <2 x double> %212, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %298 = shufflevector <2 x double> %212, <2 x double> %213, <2 x i32> <i32 0, i32 2>
  %299 = fadd <2 x double> %297, %298
  %300 = fadd <2 x double> %299, %213
  %301 = fdiv <2 x double> %300, <double 3.000000e+00, double 3.000000e+00>
  %302 = shufflevector <2 x double> %213, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %303 = shufflevector <2 x double> %213, <2 x double> %214, <2 x i32> <i32 0, i32 2>
  %304 = fadd <2 x double> %302, %303
  %305 = fadd <2 x double> %304, %214
  %306 = fdiv <2 x double> %305, <double 3.000000e+00, double 3.000000e+00>
  %307 = add nuw nsw i32 %.0148195, 1
  %exitcond209.not = icmp eq i32 %307, 6
  %308 = shufflevector <2 x double> %220, <2 x double> %306, <2 x i32> <i32 3, i32 1>
  %309 = shufflevector <2 x double> %226, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %310 = shufflevector <2 x double> %309, <2 x double> %231, <2 x i32> <i32 0, i32 2>
  %311 = extractelement <2 x double> %226, i64 0
  %312 = shufflevector <2 x double> %231, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %313 = shufflevector <2 x double> %312, <2 x double> %236, <2 x i32> <i32 0, i32 2>
  %314 = shufflevector <2 x double> %236, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %315 = shufflevector <2 x double> %314, <2 x double> %241, <2 x i32> <i32 0, i32 2>
  %316 = shufflevector <2 x double> %241, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %317 = shufflevector <2 x double> %316, <2 x double> %246, <2 x i32> <i32 0, i32 2>
  %318 = shufflevector <2 x double> %246, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %319 = shufflevector <2 x double> %318, <2 x double> %251, <2 x i32> <i32 0, i32 2>
  %320 = shufflevector <2 x double> %251, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %321 = shufflevector <2 x double> %320, <2 x double> %256, <2 x i32> <i32 0, i32 2>
  %322 = shufflevector <2 x double> %256, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %323 = shufflevector <2 x double> %322, <2 x double> %261, <2 x i32> <i32 0, i32 2>
  %324 = shufflevector <2 x double> %261, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %325 = shufflevector <2 x double> %324, <2 x double> %266, <2 x i32> <i32 0, i32 2>
  %326 = shufflevector <2 x double> %266, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %327 = shufflevector <2 x double> %326, <2 x double> %271, <2 x i32> <i32 0, i32 2>
  %328 = shufflevector <2 x double> %271, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %329 = shufflevector <2 x double> %328, <2 x double> %276, <2 x i32> <i32 0, i32 2>
  %330 = shufflevector <2 x double> %276, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %331 = shufflevector <2 x double> %330, <2 x double> %281, <2 x i32> <i32 0, i32 2>
  %332 = shufflevector <2 x double> %281, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %333 = shufflevector <2 x double> %332, <2 x double> %286, <2 x i32> <i32 0, i32 2>
  %334 = shufflevector <2 x double> %286, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %335 = shufflevector <2 x double> %334, <2 x double> %291, <2 x i32> <i32 0, i32 2>
  %336 = shufflevector <2 x double> %291, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %337 = shufflevector <2 x double> %336, <2 x double> %296, <2 x i32> <i32 0, i32 2>
  %338 = shufflevector <2 x double> %296, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %339 = shufflevector <2 x double> %338, <2 x double> %301, <2 x i32> <i32 0, i32 2>
  %340 = shufflevector <2 x double> %301, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %341 = shufflevector <2 x double> %340, <2 x double> %306, <2 x i32> <i32 0, i32 2>
  %342 = shufflevector <2 x double> %220, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %343 = shufflevector <2 x double> %342, <2 x double> %306, <2 x i32> <i32 3, i32 1>
  br i1 %exitcond209.not, label %344, label %195, !llvm.loop !27

344:                                              ; preds = %195
  store <2 x double> %220, ptr %4, align 16, !tbaa !23
  store <2 x double> %226, ptr %97, align 16, !tbaa !23
  store <2 x double> %231, ptr %99, align 16, !tbaa !23
  store <2 x double> %236, ptr %101, align 16, !tbaa !23
  store <2 x double> %241, ptr %103, align 16, !tbaa !23
  store <2 x double> %246, ptr %105, align 16, !tbaa !23
  store <2 x double> %251, ptr %107, align 16, !tbaa !23
  store <2 x double> %256, ptr %109, align 16, !tbaa !23
  store <2 x double> %261, ptr %111, align 16, !tbaa !23
  store <2 x double> %266, ptr %113, align 16, !tbaa !23
  store <2 x double> %271, ptr %115, align 16, !tbaa !23
  store <2 x double> %276, ptr %117, align 16, !tbaa !23
  store <2 x double> %281, ptr %119, align 16, !tbaa !23
  store <2 x double> %286, ptr %121, align 16, !tbaa !23
  store <2 x double> %291, ptr %123, align 16, !tbaa !23
  store <2 x double> %296, ptr %125, align 16, !tbaa !23
  store <2 x double> %301, ptr %127, align 16, !tbaa !23
  store <2 x double> %306, ptr %129, align 16, !tbaa !23
  %345 = getelementptr inbounds i8, ptr %4, i64 8
  %346 = getelementptr inbounds i8, ptr %4, i64 16
  %347 = getelementptr inbounds i8, ptr %4, i64 24
  %348 = getelementptr inbounds i8, ptr %4, i64 32
  %349 = getelementptr inbounds i8, ptr %4, i64 40
  %350 = getelementptr inbounds i8, ptr %4, i64 48
  %351 = getelementptr inbounds i8, ptr %4, i64 56
  %352 = getelementptr inbounds i8, ptr %4, i64 64
  %353 = getelementptr inbounds i8, ptr %4, i64 72
  %354 = getelementptr inbounds i8, ptr %4, i64 80
  %355 = getelementptr inbounds i8, ptr %4, i64 88
  %356 = getelementptr inbounds i8, ptr %4, i64 96
  %357 = getelementptr inbounds i8, ptr %4, i64 104
  %358 = getelementptr inbounds i8, ptr %4, i64 112
  %359 = getelementptr inbounds i8, ptr %4, i64 120
  %360 = getelementptr inbounds i8, ptr %4, i64 128
  %361 = getelementptr inbounds i8, ptr %4, i64 136
  %362 = getelementptr inbounds i8, ptr %4, i64 144
  %363 = load double, ptr %4, align 16, !tbaa !23
  %364 = fcmp olt double %363, 0.000000e+00
  %.0145. = select i1 %364, double 0.000000e+00, double %363
  %365 = load double, ptr %345, align 8, !tbaa !23
  %366 = fcmp ogt double %.0145., %365
  %.0145..1 = select i1 %366, double %.0145., double %365
  %367 = load double, ptr %346, align 16, !tbaa !23
  %368 = fcmp ogt double %.0145..1, %367
  %.0145..2 = select i1 %368, double %.0145..1, double %367
  %369 = load double, ptr %347, align 8, !tbaa !23
  %370 = fcmp ogt double %.0145..2, %369
  %.0145..3 = select i1 %370, double %.0145..2, double %369
  %371 = load double, ptr %348, align 16, !tbaa !23
  %372 = fcmp ogt double %.0145..3, %371
  %.0145..4 = select i1 %372, double %.0145..3, double %371
  %373 = load double, ptr %349, align 8, !tbaa !23
  %374 = fcmp ogt double %.0145..4, %373
  %.0145..5 = select i1 %374, double %.0145..4, double %373
  %375 = load double, ptr %350, align 16, !tbaa !23
  %376 = fcmp ogt double %.0145..5, %375
  %.0145..6 = select i1 %376, double %.0145..5, double %375
  %377 = load double, ptr %351, align 8, !tbaa !23
  %378 = fcmp ogt double %.0145..6, %377
  %.0145..7 = select i1 %378, double %.0145..6, double %377
  %379 = load double, ptr %352, align 16, !tbaa !23
  %380 = fcmp ogt double %.0145..7, %379
  %.0145..8 = select i1 %380, double %.0145..7, double %379
  %381 = load double, ptr %353, align 8, !tbaa !23
  %382 = fcmp ogt double %.0145..8, %381
  %.0145..9 = select i1 %382, double %.0145..8, double %381
  %383 = load double, ptr %354, align 16, !tbaa !23
  %384 = fcmp ogt double %.0145..9, %383
  %.0145..10 = select i1 %384, double %.0145..9, double %383
  %385 = load double, ptr %355, align 8, !tbaa !23
  %386 = fcmp ogt double %.0145..10, %385
  %.0145..11 = select i1 %386, double %.0145..10, double %385
  %387 = load double, ptr %356, align 16, !tbaa !23
  %388 = fcmp ogt double %.0145..11, %387
  %.0145..12 = select i1 %388, double %.0145..11, double %387
  %389 = load double, ptr %357, align 8, !tbaa !23
  %390 = fcmp ogt double %.0145..12, %389
  %.0145..13 = select i1 %390, double %.0145..12, double %389
  %391 = load double, ptr %358, align 16, !tbaa !23
  %392 = fcmp ogt double %.0145..13, %391
  %.0145..14 = select i1 %392, double %.0145..13, double %391
  %393 = load double, ptr %359, align 8, !tbaa !23
  %394 = fcmp ogt double %.0145..14, %393
  %.0145..15 = select i1 %394, double %.0145..14, double %393
  %395 = load double, ptr %360, align 16, !tbaa !23
  %396 = fcmp ogt double %.0145..15, %395
  %.0145..16 = select i1 %396, double %.0145..15, double %395
  %397 = load double, ptr %361, align 8, !tbaa !23
  %398 = fcmp ogt double %.0145..16, %397
  %.0145..17 = select i1 %398, double %.0145..16, double %397
  %399 = load double, ptr %362, align 16, !tbaa !23
  %400 = fcmp ogt double %.0145..17, %399
  %.0145..18 = select i1 %400, double %.0145..17, double %399
  %401 = extractelement <2 x double> %266, i64 1
  %402 = fcmp ogt double %.0145..18, %401
  %.0145..19 = select i1 %402, double %.0145..18, double %401
  %403 = extractelement <2 x double> %271, i64 0
  %404 = fcmp ogt double %.0145..19, %403
  %.0145..20 = select i1 %404, double %.0145..19, double %403
  %405 = extractelement <2 x double> %271, i64 1
  %406 = fcmp ogt double %.0145..20, %405
  %.0145..21 = select i1 %406, double %.0145..20, double %405
  %407 = extractelement <2 x double> %276, i64 0
  %408 = fcmp ogt double %.0145..21, %407
  %.0145..22 = select i1 %408, double %.0145..21, double %407
  %409 = extractelement <2 x double> %276, i64 1
  %410 = fcmp ogt double %.0145..22, %409
  %.0145..23 = select i1 %410, double %.0145..22, double %409
  %411 = extractelement <2 x double> %281, i64 0
  %412 = fcmp ogt double %.0145..23, %411
  %.0145..24 = select i1 %412, double %.0145..23, double %411
  %413 = extractelement <2 x double> %281, i64 1
  %414 = fcmp ogt double %.0145..24, %413
  %.0145..25 = select i1 %414, double %.0145..24, double %413
  %415 = extractelement <2 x double> %286, i64 0
  %416 = fcmp ogt double %.0145..25, %415
  %.0145..26 = select i1 %416, double %.0145..25, double %415
  %417 = extractelement <2 x double> %286, i64 1
  %418 = fcmp ogt double %.0145..26, %417
  %.0145..27 = select i1 %418, double %.0145..26, double %417
  %419 = extractelement <2 x double> %291, i64 0
  %420 = fcmp ogt double %.0145..27, %419
  %.0145..28 = select i1 %420, double %.0145..27, double %419
  %421 = extractelement <2 x double> %291, i64 1
  %422 = fcmp ogt double %.0145..28, %421
  %.0145..29 = select i1 %422, double %.0145..28, double %421
  %423 = extractelement <2 x double> %296, i64 0
  %424 = fcmp ogt double %.0145..29, %423
  %.0145..30 = select i1 %424, double %.0145..29, double %423
  %425 = extractelement <2 x double> %296, i64 1
  %426 = fcmp ogt double %.0145..30, %425
  %.0145..31 = select i1 %426, double %.0145..30, double %425
  %427 = extractelement <2 x double> %301, i64 0
  %428 = fcmp ogt double %.0145..31, %427
  %.0145..32 = select i1 %428, double %.0145..31, double %427
  %429 = extractelement <2 x double> %301, i64 1
  %430 = fcmp ogt double %.0145..32, %429
  %.0145..33 = select i1 %430, double %.0145..32, double %429
  %431 = extractelement <2 x double> %306, i64 0
  %432 = fcmp ogt double %.0145..33, %431
  %.0145..34 = select i1 %432, double %.0145..33, double %431
  %433 = extractelement <2 x double> %306, i64 1
  %434 = fcmp ogt double %.0145..34, %433
  %.0145..35 = select i1 %434, double %.0145..34, double %433
  %435 = fmul double %.0145..35, 8.000000e-01
  %436 = fcmp ogt double %363, %435
  %437 = fcmp ogt double %363, %433
  %or.cond177.peel = and i1 %436, %437
  %438 = fcmp ogt double %363, %365
  %or.cond178.peel = select i1 %or.cond177.peel, i1 %438, i1 false
  br i1 %or.cond178.peel, label %439, label %.peel.next.preheader

439:                                              ; preds = %344
  %440 = fsub double %365, %433
  %441 = fmul double %440, 5.000000e-01
  %442 = fadd double %433, %365
  %443 = tail call double @llvm.fmuladd.f64(double %363, double -2.000000e+00, double %442)
  %444 = fdiv double %441, %443
  %445 = fsub double 0.000000e+00, %444
  %446 = fadd double %445, 5.000000e-01
  %447 = fmul double %446, 0x401921FB54442D18
  %448 = fdiv double %447, 3.600000e+01
  store double %448, ptr %1, align 8, !tbaa !23
  br label %.peel.next.preheader

.peel.next.preheader:                             ; preds = %344, %439
  %.0144366.ph = phi i32 [ 1, %439 ], [ 0, %344 ]
  br label %.peel.next

.peel.next:                                       ; preds = %.peel.next.preheader, %select.unfold
  %.0144366 = phi i32 [ %.2, %select.unfold ], [ %.0144366.ph, %.peel.next.preheader ]
  %indvars.iv214365 = phi i64 [ %indvars.iv.next215, %select.unfold ], [ 1, %.peel.next.preheader ]
  %449 = getelementptr inbounds [36 x double], ptr %4, i64 0, i64 %indvars.iv214365
  %450 = load double, ptr %449, align 8, !tbaa !23
  %451 = add nuw i64 %indvars.iv214365, 4294967295
  %452 = and i64 %451, 4294967295
  %453 = getelementptr inbounds [36 x double], ptr %4, i64 0, i64 %452
  %454 = load double, ptr %453, align 8, !tbaa !23
  %indvars.iv.next215 = add nuw nsw i64 %indvars.iv214365, 1
  %455 = trunc i64 %indvars.iv214365 to i8
  %.lhs.trunc = add nuw nsw i8 %455, 37
  %456 = urem i8 %.lhs.trunc, 36
  %457 = zext nneg i8 %456 to i64
  %458 = getelementptr inbounds [36 x double], ptr %4, i64 0, i64 %457
  %459 = load double, ptr %458, align 8, !tbaa !23
  %460 = fcmp ogt double %450, %435
  %461 = fcmp ogt double %450, %454
  %or.cond177 = select i1 %460, i1 %461, i1 false
  %462 = fcmp ogt double %450, %459
  %or.cond178 = select i1 %or.cond177, i1 %462, i1 false
  br i1 %or.cond178, label %463, label %select.unfold

463:                                              ; preds = %.peel.next
  %464 = trunc nuw nsw i64 %indvars.iv214365 to i32
  %465 = fsub double %459, %454
  %466 = fmul double %465, 5.000000e-01
  %467 = fadd double %454, %459
  %468 = tail call double @llvm.fmuladd.f64(double %450, double -2.000000e+00, double %467)
  %469 = fdiv double %466, %468
  %470 = uitofp nneg i32 %464 to double
  %471 = fsub double %470, %469
  %472 = fadd double %471, 5.000000e-01
  %473 = fmul double %472, 0x401921FB54442D18
  %474 = fdiv double %473, 3.600000e+01
  %475 = add nsw i32 %.0144366, 1
  %476 = sext i32 %.0144366 to i64
  %477 = getelementptr inbounds double, ptr %1, i64 %476
  store double %474, ptr %477, align 8, !tbaa !23
  %.not173 = icmp eq i32 %475, 4
  br i1 %.not173, label %.loopexit, label %select.unfold

select.unfold:                                    ; preds = %463, %.peel.next
  %.2 = phi i32 [ %.0144366, %.peel.next ], [ %475, %463 ]
  %exitcond218.not = icmp eq i64 %indvars.iv.next215, 36
  br i1 %exitcond218.not, label %.loopexit, label %.peel.next, !llvm.loop !28

.loopexit:                                        ; preds = %463, %select.unfold, %37, %43, %46, %3
  %.0 = phi i32 [ 0, %3 ], [ 0, %46 ], [ 0, %43 ], [ 0, %37 ], [ 4, %463 ], [ %.2, %select.unfold ]
  call void @llvm.lifetime.end.p0(i64 288, ptr nonnull %4) #7
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden void @update_gradient(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden double @fast_expn(double noundef) local_unnamed_addr #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @vl_floor_d(double noundef) local_unnamed_addr #4

; Function Attrs: nofree willreturn
declare double @ldexp(double, i32) local_unnamed_addr #5

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { inlinehint 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 #5 = { nofree willreturn }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 60}
!6 = !{!"_VlSiftFilt", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !11, i64 64, !11, i64 72, !11, i64 80, !10, i64 88, !10, i64 92, !11, i64 96, !7, i64 104, !12, i64 112, !11, i64 120, !10, i64 128, !10, i64 132, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !11, i64 176, !10, i64 184}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!14, !15, i64 28}
!14 = !{!"_VlSiftKeypoint", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28}
!15 = !{!"float", !8, i64 0}
!16 = !{!10, !10, i64 0}
!17 = !{!15, !15, i64 0}
!18 = !{!14, !10, i64 12}
!19 = !{!14, !10, i64 0}
!20 = !{!6, !10, i64 52}
!21 = !{!6, !10, i64 56}
!22 = !{!6, !11, i64 176}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.peeled.count", i32 1}


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