; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (arrays)

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

@.str.30 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [27 x i8], align 1
@__func__.array_interpolate_extrapolate_logspline_loglinear_one_column = external hidden unnamed_addr constant [61 x i8], align 1

; 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 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
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @array_interpolate_extrapolate_logspline_loglinear_one_column(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, double noundef %7, ptr noundef %8, ptr noundef %9) #3 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca double, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store i32 %1, ptr %13, align 4, !tbaa !9
  store i32 %2, ptr %14, align 4, !tbaa !9
  store ptr %3, ptr %15, align 8, !tbaa !5
  store i32 %4, ptr %16, align 4, !tbaa !9
  store i32 %5, ptr %17, align 4, !tbaa !9
  store ptr %6, ptr %18, align 8, !tbaa !5
  store double %7, ptr %19, align 8, !tbaa !11
  store ptr %8, ptr %20, align 8, !tbaa !5
  store ptr %9, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %29 = load double, ptr %19, align 8, !tbaa !11
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  %31 = load i32, ptr %14, align 4, !tbaa !9
  %32 = sub nsw i32 %31, 1
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds double, ptr %30, i64 %33
  %35 = load double, ptr %34, align 8, !tbaa !11
  %36 = fcmp ogt double %29, %35
  br i1 %36, label %37, label %140

37:                                               ; preds = %10
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = load i32, ptr %14, align 4, !tbaa !9
  %40 = sub nsw i32 %39, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds double, ptr %38, i64 %41
  %43 = load double, ptr %42, align 8, !tbaa !11
  %44 = call double @log(double noundef %43) #4
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = load i32, ptr %14, align 4, !tbaa !9
  %47 = sub nsw i32 %46, 2
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds double, ptr %45, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !11
  %51 = call double @log(double noundef %50) #4
  %52 = fsub double %44, %51
  store double %52, ptr %25, align 8, !tbaa !11
  %53 = load double, ptr %19, align 8, !tbaa !11
  %54 = call double @log(double noundef %53) #4
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = sub nsw i32 %56, 2
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds double, ptr %55, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = call double @log(double noundef %60) #4
  %62 = fsub double %54, %61
  %63 = load double, ptr %25, align 8, !tbaa !11
  %64 = fdiv double %62, %63
  store double %64, ptr %27, align 8, !tbaa !11
  %65 = load double, ptr %27, align 8, !tbaa !11
  %66 = fsub double 1.000000e+00, %65
  store double %66, ptr %26, align 8, !tbaa !11
  %67 = load ptr, ptr %15, align 8, !tbaa !5
  %68 = load i32, ptr %17, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = mul nsw i32 %68, %69
  %71 = load i32, ptr %14, align 4, !tbaa !9
  %72 = sub nsw i32 %71, 1
  %73 = add nsw i32 %70, %72
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %67, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !11
  %77 = call double @log(double noundef %76) #4
  %78 = load double, ptr %19, align 8, !tbaa !11
  %79 = call double @log(double noundef %78) #4
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = load i32, ptr %14, align 4, !tbaa !9
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds double, ptr %80, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !11
  %86 = call double @log(double noundef %85) #4
  %87 = fsub double %79, %86
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = load i32, ptr %17, align 4, !tbaa !9
  %90 = load i32, ptr %13, align 4, !tbaa !9
  %91 = mul nsw i32 %89, %90
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = sub nsw i32 %92, 1
  %94 = add nsw i32 %91, %93
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %88, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !11
  %98 = call double @log(double noundef %97) #4
  %99 = load ptr, ptr %15, align 8, !tbaa !5
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = load i32, ptr %13, align 4, !tbaa !9
  %102 = mul nsw i32 %100, %101
  %103 = load i32, ptr %14, align 4, !tbaa !9
  %104 = sub nsw i32 %103, 2
  %105 = add nsw i32 %102, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds double, ptr %99, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !11
  %109 = call double @log(double noundef %108) #4
  %110 = fsub double %98, %109
  %111 = load double, ptr %25, align 8, !tbaa !11
  %112 = fdiv double %110, %111
  %113 = load double, ptr %25, align 8, !tbaa !11
  %114 = fdiv double %113, 6.000000e+00
  %115 = load ptr, ptr %18, align 8, !tbaa !5
  %116 = load i32, ptr %17, align 4, !tbaa !9
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = mul nsw i32 %116, %117
  %119 = load i32, ptr %14, align 4, !tbaa !9
  %120 = sub nsw i32 %119, 2
  %121 = add nsw i32 %118, %120
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds double, ptr %115, i64 %122
  %124 = load double, ptr %123, align 8, !tbaa !11
  %125 = load ptr, ptr %18, align 8, !tbaa !5
  %126 = load i32, ptr %17, align 4, !tbaa !9
  %127 = load i32, ptr %13, align 4, !tbaa !9
  %128 = mul nsw i32 %126, %127
  %129 = load i32, ptr %14, align 4, !tbaa !9
  %130 = sub nsw i32 %129, 1
  %131 = add nsw i32 %128, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds double, ptr %125, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !11
  %135 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %134, double %124)
  %136 = call double @llvm.fmuladd.f64(double %114, double %135, double %112)
  %137 = call double @llvm.fmuladd.f64(double %87, double %136, double %77)
  %138 = call double @exp(double noundef %137) #4
  %139 = load ptr, ptr %20, align 8, !tbaa !5
  store double %138, ptr %139, align 8, !tbaa !11
  br label %367

140:                                              ; preds = %10
  store i32 0, ptr %22, align 4, !tbaa !9
  %141 = load i32, ptr %14, align 4, !tbaa !9
  %142 = sub nsw i32 %141, 1
  store i32 %142, ptr %23, align 4, !tbaa !9
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  %144 = load i32, ptr %22, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds double, ptr %143, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !11
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = load i32, ptr %23, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !11
  %153 = fcmp olt double %147, %152
  br i1 %153, label %154, label %214

154:                                              ; preds = %140
  %155 = load double, ptr %19, align 8, !tbaa !11
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  %157 = load i32, ptr %22, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds double, ptr %156, i64 %158
  %160 = load double, ptr %159, align 8, !tbaa !11
  %161 = fcmp olt double %155, %160
  br i1 %161, label %162, label %171

162:                                              ; preds = %154
  %163 = load ptr, ptr %21, align 8, !tbaa !5
  %164 = load double, ptr %19, align 8, !tbaa !11
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  %166 = load i32, ptr %22, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds double, ptr %165, i64 %167
  %169 = load double, ptr %168, align 8, !tbaa !11
  %170 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %163, ptr noundef @.str.30, ptr noundef @__func__.array_interpolate_extrapolate_logspline_loglinear_one_column, i32 noundef 2229, double noundef %164, double noundef %169) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %368

171:                                              ; preds = %154
  %172 = load double, ptr %19, align 8, !tbaa !11
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = load i32, ptr %23, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds double, ptr %173, i64 %175
  %177 = load double, ptr %176, align 8, !tbaa !11
  %178 = fcmp ogt double %172, %177
  br i1 %178, label %179, label %188

179:                                              ; preds = %171
  %180 = load ptr, ptr %21, align 8, !tbaa !5
  %181 = load double, ptr %19, align 8, !tbaa !11
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = load i32, ptr %23, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds double, ptr %182, i64 %184
  %186 = load double, ptr %185, align 8, !tbaa !11
  %187 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %180, ptr noundef @.str.31, ptr noundef @__func__.array_interpolate_extrapolate_logspline_loglinear_one_column, i32 noundef 2234, double noundef %181, double noundef %186) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %368

188:                                              ; preds = %171
  br label %189

189:                                              ; preds = %212, %188
  %190 = load i32, ptr %23, align 4, !tbaa !9
  %191 = load i32, ptr %22, align 4, !tbaa !9
  %192 = sub nsw i32 %190, %191
  %193 = icmp sgt i32 %192, 1
  br i1 %193, label %194, label %213

194:                                              ; preds = %189
  %195 = load i32, ptr %22, align 4, !tbaa !9
  %196 = load i32, ptr %23, align 4, !tbaa !9
  %197 = add nsw i32 %195, %196
  %198 = sitofp i32 %197 to double
  %199 = fmul double 5.000000e-01, %198
  %200 = fptosi double %199 to i32
  store i32 %200, ptr %24, align 4, !tbaa !9
  %201 = load double, ptr %19, align 8, !tbaa !11
  %202 = load ptr, ptr %12, align 8, !tbaa !5
  %203 = load i32, ptr %24, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds double, ptr %202, i64 %204
  %206 = load double, ptr %205, align 8, !tbaa !11
  %207 = fcmp olt double %201, %206
  br i1 %207, label %208, label %210

208:                                              ; preds = %194
  %209 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %209, ptr %23, align 4, !tbaa !9
  br label %212

210:                                              ; preds = %194
  %211 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %211, ptr %22, align 4, !tbaa !9
  br label %212

212:                                              ; preds = %210, %208
  br label %189, !llvm.loop !13

213:                                              ; preds = %189
  br label %274

214:                                              ; preds = %140
  %215 = load double, ptr %19, align 8, !tbaa !11
  %216 = load ptr, ptr %12, align 8, !tbaa !5
  %217 = load i32, ptr %23, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds double, ptr %216, i64 %218
  %220 = load double, ptr %219, align 8, !tbaa !11
  %221 = fcmp olt double %215, %220
  br i1 %221, label %222, label %231

222:                                              ; preds = %214
  %223 = load ptr, ptr %21, align 8, !tbaa !5
  %224 = load double, ptr %19, align 8, !tbaa !11
  %225 = load ptr, ptr %12, align 8, !tbaa !5
  %226 = load i32, ptr %23, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds double, ptr %225, i64 %227
  %229 = load double, ptr %228, align 8, !tbaa !11
  %230 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %223, ptr noundef @.str.30, ptr noundef @__func__.array_interpolate_extrapolate_logspline_loglinear_one_column, i32 noundef 2251, double noundef %224, double noundef %229) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %368

231:                                              ; preds = %214
  %232 = load double, ptr %19, align 8, !tbaa !11
  %233 = load ptr, ptr %12, align 8, !tbaa !5
  %234 = load i32, ptr %22, align 4, !tbaa !9
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds double, ptr %233, i64 %235
  %237 = load double, ptr %236, align 8, !tbaa !11
  %238 = fcmp ogt double %232, %237
  br i1 %238, label %239, label %248

239:                                              ; preds = %231
  %240 = load ptr, ptr %21, align 8, !tbaa !5
  %241 = load double, ptr %19, align 8, !tbaa !11
  %242 = load ptr, ptr %12, align 8, !tbaa !5
  %243 = load i32, ptr %22, align 4, !tbaa !9
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds double, ptr %242, i64 %244
  %246 = load double, ptr %245, align 8, !tbaa !11
  %247 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %240, ptr noundef @.str.31, ptr noundef @__func__.array_interpolate_extrapolate_logspline_loglinear_one_column, i32 noundef 2256, double noundef %241, double noundef %246) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %368

248:                                              ; preds = %231
  br label %249

249:                                              ; preds = %272, %248
  %250 = load i32, ptr %23, align 4, !tbaa !9
  %251 = load i32, ptr %22, align 4, !tbaa !9
  %252 = sub nsw i32 %250, %251
  %253 = icmp sgt i32 %252, 1
  br i1 %253, label %254, label %273

254:                                              ; preds = %249
  %255 = load i32, ptr %22, align 4, !tbaa !9
  %256 = load i32, ptr %23, align 4, !tbaa !9
  %257 = add nsw i32 %255, %256
  %258 = sitofp i32 %257 to double
  %259 = fmul double 5.000000e-01, %258
  %260 = fptosi double %259 to i32
  store i32 %260, ptr %24, align 4, !tbaa !9
  %261 = load double, ptr %19, align 8, !tbaa !11
  %262 = load ptr, ptr %12, align 8, !tbaa !5
  %263 = load i32, ptr %24, align 4, !tbaa !9
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds double, ptr %262, i64 %264
  %266 = load double, ptr %265, align 8, !tbaa !11
  %267 = fcmp ogt double %261, %266
  br i1 %267, label %268, label %270

268:                                              ; preds = %254
  %269 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %269, ptr %23, align 4, !tbaa !9
  br label %272

270:                                              ; preds = %254
  %271 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %271, ptr %22, align 4, !tbaa !9
  br label %272

272:                                              ; preds = %270, %268
  br label %249, !llvm.loop !15

273:                                              ; preds = %249
  br label %274

274:                                              ; preds = %273, %213
  %275 = load ptr, ptr %12, align 8, !tbaa !5
  %276 = load i32, ptr %23, align 4, !tbaa !9
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds double, ptr %275, i64 %277
  %279 = load double, ptr %278, align 8, !tbaa !11
  %280 = call double @log(double noundef %279) #4
  %281 = load ptr, ptr %12, align 8, !tbaa !5
  %282 = load i32, ptr %22, align 4, !tbaa !9
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds double, ptr %281, i64 %283
  %285 = load double, ptr %284, align 8, !tbaa !11
  %286 = call double @log(double noundef %285) #4
  %287 = fsub double %280, %286
  store double %287, ptr %25, align 8, !tbaa !11
  %288 = load double, ptr %19, align 8, !tbaa !11
  %289 = call double @log(double noundef %288) #4
  %290 = load ptr, ptr %12, align 8, !tbaa !5
  %291 = load i32, ptr %22, align 4, !tbaa !9
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds double, ptr %290, i64 %292
  %294 = load double, ptr %293, align 8, !tbaa !11
  %295 = call double @log(double noundef %294) #4
  %296 = fsub double %289, %295
  %297 = load double, ptr %25, align 8, !tbaa !11
  %298 = fdiv double %296, %297
  store double %298, ptr %27, align 8, !tbaa !11
  %299 = load double, ptr %27, align 8, !tbaa !11
  %300 = fsub double 1.000000e+00, %299
  store double %300, ptr %26, align 8, !tbaa !11
  %301 = load double, ptr %26, align 8, !tbaa !11
  %302 = load ptr, ptr %15, align 8, !tbaa !5
  %303 = load i32, ptr %17, align 4, !tbaa !9
  %304 = load i32, ptr %13, align 4, !tbaa !9
  %305 = mul nsw i32 %303, %304
  %306 = load i32, ptr %22, align 4, !tbaa !9
  %307 = add nsw i32 %305, %306
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds double, ptr %302, i64 %308
  %310 = load double, ptr %309, align 8, !tbaa !11
  %311 = call double @log(double noundef %310) #4
  %312 = load double, ptr %27, align 8, !tbaa !11
  %313 = load ptr, ptr %15, align 8, !tbaa !5
  %314 = load i32, ptr %17, align 4, !tbaa !9
  %315 = load i32, ptr %13, align 4, !tbaa !9
  %316 = mul nsw i32 %314, %315
  %317 = load i32, ptr %23, align 4, !tbaa !9
  %318 = add nsw i32 %316, %317
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds double, ptr %313, i64 %319
  %321 = load double, ptr %320, align 8, !tbaa !11
  %322 = call double @log(double noundef %321) #4
  %323 = fmul double %312, %322
  %324 = call double @llvm.fmuladd.f64(double %301, double %311, double %323)
  %325 = load double, ptr %26, align 8, !tbaa !11
  %326 = load double, ptr %26, align 8, !tbaa !11
  %327 = fmul double %325, %326
  %328 = load double, ptr %26, align 8, !tbaa !11
  %329 = load double, ptr %26, align 8, !tbaa !11
  %330 = fneg double %329
  %331 = call double @llvm.fmuladd.f64(double %327, double %328, double %330)
  %332 = load ptr, ptr %18, align 8, !tbaa !5
  %333 = load i32, ptr %17, align 4, !tbaa !9
  %334 = load i32, ptr %13, align 4, !tbaa !9
  %335 = mul nsw i32 %333, %334
  %336 = load i32, ptr %22, align 4, !tbaa !9
  %337 = add nsw i32 %335, %336
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds double, ptr %332, i64 %338
  %340 = load double, ptr %339, align 8, !tbaa !11
  %341 = load double, ptr %27, align 8, !tbaa !11
  %342 = load double, ptr %27, align 8, !tbaa !11
  %343 = fmul double %341, %342
  %344 = load double, ptr %27, align 8, !tbaa !11
  %345 = load double, ptr %27, align 8, !tbaa !11
  %346 = fneg double %345
  %347 = call double @llvm.fmuladd.f64(double %343, double %344, double %346)
  %348 = load ptr, ptr %18, align 8, !tbaa !5
  %349 = load i32, ptr %17, align 4, !tbaa !9
  %350 = load i32, ptr %13, align 4, !tbaa !9
  %351 = mul nsw i32 %349, %350
  %352 = load i32, ptr %23, align 4, !tbaa !9
  %353 = add nsw i32 %351, %352
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds double, ptr %348, i64 %354
  %356 = load double, ptr %355, align 8, !tbaa !11
  %357 = fmul double %347, %356
  %358 = call double @llvm.fmuladd.f64(double %331, double %340, double %357)
  %359 = load double, ptr %25, align 8, !tbaa !11
  %360 = fmul double %358, %359
  %361 = load double, ptr %25, align 8, !tbaa !11
  %362 = fmul double %360, %361
  %363 = fdiv double %362, 6.000000e+00
  %364 = fadd double %324, %363
  %365 = call double @exp(double noundef %364) #4
  %366 = load ptr, ptr %20, align 8, !tbaa !5
  store double %365, ptr %366, align 8, !tbaa !11
  br label %367

367:                                              ; preds = %274, %37
  store i32 0, ptr %11, align 4
  store i32 1, ptr %28, align 4
  br label %368

368:                                              ; preds = %367, %239, %222, %179, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  %369 = load i32, ptr %11, align 4
  ret i32 %369
}

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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

@.str.30 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [27 x i8], align 1
@__func__.array_interpolate_extrapolate_logspline_loglinear_one_column = external hidden unnamed_addr constant [61 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind uwtable
define dso_local range(i32 0, 2) i32 @array_interpolate_extrapolate_logspline_loglinear_one_column(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4, i32 noundef %5, ptr nocapture noundef readonly %6, double noundef %7, ptr nocapture noundef writeonly %8, ptr nocapture noundef writeonly %9) local_unnamed_addr #3 {
  %11 = add nsw i32 %2, -1
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds double, ptr %0, i64 %12
  %14 = load double, ptr %13, align 8, !tbaa !5
  %15 = fcmp olt double %14, %7
  br i1 %15, label %16, label %56

16:                                               ; preds = %10
  %17 = tail call double @log(double noundef %14) #4
  %18 = add nsw i32 %2, -2
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds double, ptr %0, i64 %19
  %21 = load double, ptr %20, align 8, !tbaa !5
  %22 = tail call double @log(double noundef %21) #4
  %23 = fsub double %17, %22
  %24 = fcmp ugt double %7, 0.000000e+00
  br i1 %24, label %cdce.end, label %cdce.call, !prof !9

cdce.call:                                        ; preds = %16
  %25 = tail call double @log(double noundef %7) #4
  br label %cdce.end

cdce.end:                                         ; preds = %16, %cdce.call
  %26 = load double, ptr %20, align 8, !tbaa !5
  %27 = fcmp ugt double %26, 0.000000e+00
  br i1 %27, label %cdce.end140, label %cdce.call139, !prof !9

cdce.call139:                                     ; preds = %cdce.end
  %28 = tail call double @log(double noundef %26) #4
  br label %cdce.end140

cdce.end140:                                      ; preds = %cdce.end, %cdce.call139
  %29 = mul nsw i32 %5, %1
  %30 = add nsw i32 %29, %11
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds double, ptr %3, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !5
  %34 = tail call double @log(double noundef %33) #4
  %35 = tail call double @log(double noundef %7) #4
  %36 = load double, ptr %13, align 8, !tbaa !5
  %37 = tail call double @log(double noundef %36) #4
  %38 = fsub double %35, %37
  %39 = load double, ptr %32, align 8, !tbaa !5
  %40 = tail call double @log(double noundef %39) #4
  %41 = add nsw i32 %29, %18
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds double, ptr %3, i64 %42
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = tail call double @log(double noundef %44) #4
  %46 = fsub double %40, %45
  %47 = fdiv double %46, %23
  %48 = fdiv double %23, 6.000000e+00
  %49 = getelementptr inbounds double, ptr %6, i64 %42
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds double, ptr %6, i64 %31
  %52 = load double, ptr %51, align 8, !tbaa !5
  %53 = tail call double @llvm.fmuladd.f64(double %52, double 2.000000e+00, double %50)
  %54 = tail call double @llvm.fmuladd.f64(double %48, double %53, double %47)
  %55 = tail call double @llvm.fmuladd.f64(double %38, double %54, double %34)
  br label %137

56:                                               ; preds = %10
  %57 = load double, ptr %0, align 8, !tbaa !5
  %58 = fcmp olt double %57, %14
  br i1 %58, label %59, label %74

59:                                               ; preds = %56
  %60 = fcmp ogt double %57, %7
  br i1 %60, label %62, label %.preheader

.preheader:                                       ; preds = %59
  %61 = icmp sgt i32 %2, 2
  br i1 %61, label %.lr.ph148, label %.loopexit

62:                                               ; preds = %59
  %63 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.30, ptr noundef nonnull @__func__.array_interpolate_extrapolate_logspline_loglinear_one_column, i32 noundef 2229, double noundef %7, double noundef %57) #4
  br label %139

.lr.ph148:                                        ; preds = %.preheader, %.lr.ph148
  %.0147 = phi i32 [ %..0, %.lr.ph148 ], [ %11, %.preheader ]
  %.0127146 = phi i32 [ %.0127., %.lr.ph148 ], [ 0, %.preheader ]
  %64 = add nsw i32 %.0147, %.0127146
  %65 = sitofp i32 %64 to double
  %66 = fmul double %65, 5.000000e-01
  %67 = fptosi double %66 to i32
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds double, ptr %0, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !5
  %71 = fcmp ogt double %70, %7
  %.0127. = select i1 %71, i32 %.0127146, i32 %67
  %..0 = select i1 %71, i32 %67, i32 %.0147
  %72 = sub nsw i32 %..0, %.0127.
  %73 = icmp sgt i32 %72, 1
  br i1 %73, label %.lr.ph148, label %.loopexit, !llvm.loop !10

74:                                               ; preds = %56
  %75 = fcmp ogt double %14, %7
  br i1 %75, label %76, label %78

76:                                               ; preds = %74
  %77 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.30, ptr noundef nonnull @__func__.array_interpolate_extrapolate_logspline_loglinear_one_column, i32 noundef 2251, double noundef %7, double noundef %14) #4
  br label %139

78:                                               ; preds = %74
  %79 = fcmp olt double %57, %7
  br i1 %79, label %81, label %.preheader141

.preheader141:                                    ; preds = %78
  %80 = icmp sgt i32 %2, 2
  br i1 %80, label %.lr.ph, label %.loopexit

81:                                               ; preds = %78
  %82 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.31, ptr noundef nonnull @__func__.array_interpolate_extrapolate_logspline_loglinear_one_column, i32 noundef 2256, double noundef %7, double noundef %57) #4
  br label %139

.lr.ph:                                           ; preds = %.preheader141, %.lr.ph
  %.2144 = phi i32 [ %..2, %.lr.ph ], [ %11, %.preheader141 ]
  %.2129143 = phi i32 [ %.2129., %.lr.ph ], [ 0, %.preheader141 ]
  %83 = add nsw i32 %.2144, %.2129143
  %84 = sitofp i32 %83 to double
  %85 = fmul double %84, 5.000000e-01
  %86 = fptosi double %85 to i32
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds double, ptr %0, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !5
  %90 = fcmp olt double %89, %7
  %.2129. = select i1 %90, i32 %.2129143, i32 %86
  %..2 = select i1 %90, i32 %86, i32 %.2144
  %91 = sub nsw i32 %..2, %.2129.
  %92 = icmp sgt i32 %91, 1
  br i1 %92, label %.lr.ph, label %.loopexit, !llvm.loop !12

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph148, %.preheader141, %.preheader
  %.4131 = phi i32 [ 0, %.preheader ], [ 0, %.preheader141 ], [ %.0127., %.lr.ph148 ], [ %.2129., %.lr.ph ]
  %.4 = phi i32 [ %11, %.preheader ], [ %11, %.preheader141 ], [ %..0, %.lr.ph148 ], [ %..2, %.lr.ph ]
  %93 = sext i32 %.4 to i64
  %94 = getelementptr inbounds double, ptr %0, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !5
  %96 = tail call double @log(double noundef %95) #4
  %97 = sext i32 %.4131 to i64
  %98 = getelementptr inbounds double, ptr %0, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !5
  %100 = tail call double @log(double noundef %99) #4
  %101 = fsub double %96, %100
  %102 = tail call double @log(double noundef %7) #4
  %103 = load double, ptr %98, align 8, !tbaa !5
  %104 = tail call double @log(double noundef %103) #4
  %105 = fsub double %102, %104
  %106 = fdiv double %105, %101
  %107 = fsub double 1.000000e+00, %106
  %108 = mul nsw i32 %5, %1
  %109 = add nsw i32 %.4131, %108
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds double, ptr %3, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !5
  %113 = tail call double @log(double noundef %112) #4
  %114 = add nsw i32 %.4, %108
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds double, ptr %3, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !5
  %118 = tail call double @log(double noundef %117) #4
  %119 = fmul double %106, %118
  %120 = tail call double @llvm.fmuladd.f64(double %107, double %113, double %119)
  %121 = fmul double %107, %107
  %122 = fneg double %107
  %123 = tail call double @llvm.fmuladd.f64(double %121, double %107, double %122)
  %124 = getelementptr inbounds double, ptr %6, i64 %110
  %125 = load double, ptr %124, align 8, !tbaa !5
  %126 = fmul double %106, %106
  %127 = fneg double %106
  %128 = tail call double @llvm.fmuladd.f64(double %126, double %106, double %127)
  %129 = getelementptr inbounds double, ptr %6, i64 %115
  %130 = load double, ptr %129, align 8, !tbaa !5
  %131 = fmul double %128, %130
  %132 = tail call double @llvm.fmuladd.f64(double %123, double %125, double %131)
  %133 = fmul double %101, %132
  %134 = fmul double %101, %133
  %135 = fdiv double %134, 6.000000e+00
  %136 = fadd double %120, %135
  br label %137

137:                                              ; preds = %.loopexit, %cdce.end140
  %.sink = phi double [ %136, %.loopexit ], [ %55, %cdce.end140 ]
  %138 = tail call double @exp(double noundef %.sink) #4
  store double %138, ptr %8, align 8, !tbaa !5
  br label %139

139:                                              ; preds = %137, %81, %76, %62
  %.0132 = phi i32 [ 0, %137 ], [ 1, %62 ], [ 1, %76 ], [ 1, %81 ]
  ret i32 %.0132
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"branch_weights", i32 1048575, i32 1}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


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