; 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_spline = external hidden unnamed_addr constant [25 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 uwtable
define dso_local i32 @array_interpolate_spline(ptr noalias noundef %0, i32 noundef %1, ptr noalias noundef %2, ptr noalias noundef %3, i32 noundef %4, double noundef %5, ptr noalias noundef %6, ptr noalias noundef %7, i32 noundef %8, ptr noundef %9) #3 {
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store i32 %1, ptr %13, align 4, !tbaa !9
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store i32 %4, ptr %16, align 4, !tbaa !9
  store double %5, ptr %17, align 8, !tbaa !11
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store i32 %8, ptr %20, align 4, !tbaa !9
  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 4, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  store i32 0, ptr %22, align 4, !tbaa !9
  %30 = load i32, ptr %13, align 4, !tbaa !9
  %31 = sub nsw i32 %30, 1
  store i32 %31, ptr %23, align 4, !tbaa !9
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = load i32, ptr %22, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds double, ptr %32, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !11
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = load i32, ptr %23, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %37, i64 %39
  %41 = load double, ptr %40, align 8, !tbaa !11
  %42 = fcmp olt double %36, %41
  br i1 %42, label %43, label %103

43:                                               ; preds = %10
  %44 = load double, ptr %17, align 8, !tbaa !11
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  %46 = load i32, ptr %22, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %45, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !11
  %50 = fcmp olt double %44, %49
  br i1 %50, label %51, label %60

51:                                               ; preds = %43
  %52 = load ptr, ptr %21, align 8, !tbaa !5
  %53 = load double, ptr %17, align 8, !tbaa !11
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = load i32, ptr %22, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds double, ptr %54, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %52, ptr noundef @.str.30, ptr noundef @__func__.array_interpolate_spline, i32 noundef 1706, double noundef %53, double noundef %58) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %267

60:                                               ; preds = %43
  %61 = load double, ptr %17, align 8, !tbaa !11
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = load i32, ptr %23, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds double, ptr %62, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !11
  %67 = fcmp ogt double %61, %66
  br i1 %67, label %68, label %77

68:                                               ; preds = %60
  %69 = load ptr, ptr %21, align 8, !tbaa !5
  %70 = load double, ptr %17, align 8, !tbaa !11
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = load i32, ptr %23, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %71, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !11
  %76 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %69, ptr noundef @.str.31, ptr noundef @__func__.array_interpolate_spline, i32 noundef 1711, double noundef %70, double noundef %75) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %267

77:                                               ; preds = %60
  br label %78

78:                                               ; preds = %101, %77
  %79 = load i32, ptr %23, align 4, !tbaa !9
  %80 = load i32, ptr %22, align 4, !tbaa !9
  %81 = sub nsw i32 %79, %80
  %82 = icmp sgt i32 %81, 1
  br i1 %82, label %83, label %102

83:                                               ; preds = %78
  %84 = load i32, ptr %22, align 4, !tbaa !9
  %85 = load i32, ptr %23, align 4, !tbaa !9
  %86 = add nsw i32 %84, %85
  %87 = sitofp i32 %86 to double
  %88 = fmul double 5.000000e-01, %87
  %89 = fptosi double %88 to i32
  store i32 %89, ptr %24, align 4, !tbaa !9
  %90 = load double, ptr %17, align 8, !tbaa !11
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = load i32, ptr %24, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %91, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !11
  %96 = fcmp olt double %90, %95
  br i1 %96, label %97, label %99

97:                                               ; preds = %83
  %98 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %98, ptr %23, align 4, !tbaa !9
  br label %101

99:                                               ; preds = %83
  %100 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %100, ptr %22, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %99, %97
  br label %78, !llvm.loop !13

102:                                              ; preds = %78
  br label %163

103:                                              ; preds = %10
  %104 = load double, ptr %17, align 8, !tbaa !11
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = load i32, ptr %23, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = fcmp olt double %104, %109
  br i1 %110, label %111, label %120

111:                                              ; preds = %103
  %112 = load ptr, ptr %21, align 8, !tbaa !5
  %113 = load double, ptr %17, align 8, !tbaa !11
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = load i32, ptr %23, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %114, i64 %116
  %118 = load double, ptr %117, align 8, !tbaa !11
  %119 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %112, ptr noundef @.str.30, ptr noundef @__func__.array_interpolate_spline, i32 noundef 1728, double noundef %113, double noundef %118) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %267

120:                                              ; preds = %103
  %121 = load double, ptr %17, align 8, !tbaa !11
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = load i32, ptr %22, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds double, ptr %122, i64 %124
  %126 = load double, ptr %125, align 8, !tbaa !11
  %127 = fcmp ogt double %121, %126
  br i1 %127, label %128, label %137

128:                                              ; preds = %120
  %129 = load ptr, ptr %21, align 8, !tbaa !5
  %130 = load double, ptr %17, align 8, !tbaa !11
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = load i32, ptr %22, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds double, ptr %131, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !11
  %136 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %129, ptr noundef @.str.31, ptr noundef @__func__.array_interpolate_spline, i32 noundef 1733, double noundef %130, double noundef %135) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %267

137:                                              ; preds = %120
  br label %138

138:                                              ; preds = %161, %137
  %139 = load i32, ptr %23, align 4, !tbaa !9
  %140 = load i32, ptr %22, align 4, !tbaa !9
  %141 = sub nsw i32 %139, %140
  %142 = icmp sgt i32 %141, 1
  br i1 %142, label %143, label %162

143:                                              ; preds = %138
  %144 = load i32, ptr %22, align 4, !tbaa !9
  %145 = load i32, ptr %23, align 4, !tbaa !9
  %146 = add nsw i32 %144, %145
  %147 = sitofp i32 %146 to double
  %148 = fmul double 5.000000e-01, %147
  %149 = fptosi double %148 to i32
  store i32 %149, ptr %24, align 4, !tbaa !9
  %150 = load double, ptr %17, align 8, !tbaa !11
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  %152 = load i32, ptr %24, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds double, ptr %151, i64 %153
  %155 = load double, ptr %154, align 8, !tbaa !11
  %156 = fcmp ogt double %150, %155
  br i1 %156, label %157, label %159

157:                                              ; preds = %143
  %158 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %158, ptr %23, align 4, !tbaa !9
  br label %161

159:                                              ; preds = %143
  %160 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %160, ptr %22, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %159, %157
  br label %138, !llvm.loop !15

162:                                              ; preds = %138
  br label %163

163:                                              ; preds = %162, %102
  %164 = load i32, ptr %22, align 4, !tbaa !9
  %165 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 %164, ptr %165, align 4, !tbaa !9
  %166 = load ptr, ptr %12, align 8, !tbaa !5
  %167 = load i32, ptr %23, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds double, ptr %166, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !11
  %171 = load ptr, ptr %12, align 8, !tbaa !5
  %172 = load i32, ptr %22, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %171, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !11
  %176 = fsub double %170, %175
  store double %176, ptr %26, align 8, !tbaa !11
  %177 = load double, ptr %17, align 8, !tbaa !11
  %178 = load ptr, ptr %12, align 8, !tbaa !5
  %179 = load i32, ptr %22, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds double, ptr %178, i64 %180
  %182 = load double, ptr %181, align 8, !tbaa !11
  %183 = fsub double %177, %182
  %184 = load double, ptr %26, align 8, !tbaa !11
  %185 = fdiv double %183, %184
  store double %185, ptr %28, align 8, !tbaa !11
  %186 = load double, ptr %28, align 8, !tbaa !11
  %187 = fsub double 1.000000e+00, %186
  store double %187, ptr %27, align 8, !tbaa !11
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %188

188:                                              ; preds = %263, %163
  %189 = load i32, ptr %25, align 4, !tbaa !9
  %190 = load i32, ptr %20, align 4, !tbaa !9
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %192, label %266

192:                                              ; preds = %188
  %193 = load double, ptr %27, align 8, !tbaa !11
  %194 = load ptr, ptr %14, align 8, !tbaa !5
  %195 = load i32, ptr %22, align 4, !tbaa !9
  %196 = load i32, ptr %16, align 4, !tbaa !9
  %197 = mul nsw i32 %195, %196
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds double, ptr %194, i64 %198
  %200 = load i32, ptr %25, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds double, ptr %199, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !11
  %204 = load double, ptr %28, align 8, !tbaa !11
  %205 = load ptr, ptr %14, align 8, !tbaa !5
  %206 = load i32, ptr %23, align 4, !tbaa !9
  %207 = load i32, ptr %16, align 4, !tbaa !9
  %208 = mul nsw i32 %206, %207
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds double, ptr %205, i64 %209
  %211 = load i32, ptr %25, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds double, ptr %210, i64 %212
  %214 = load double, ptr %213, align 8, !tbaa !11
  %215 = fmul double %204, %214
  %216 = call double @llvm.fmuladd.f64(double %193, double %203, double %215)
  %217 = load double, ptr %27, align 8, !tbaa !11
  %218 = load double, ptr %27, align 8, !tbaa !11
  %219 = fmul double %217, %218
  %220 = load double, ptr %27, align 8, !tbaa !11
  %221 = load double, ptr %27, align 8, !tbaa !11
  %222 = fneg double %221
  %223 = call double @llvm.fmuladd.f64(double %219, double %220, double %222)
  %224 = load ptr, ptr %15, align 8, !tbaa !5
  %225 = load i32, ptr %22, align 4, !tbaa !9
  %226 = load i32, ptr %16, align 4, !tbaa !9
  %227 = mul nsw i32 %225, %226
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds double, ptr %224, i64 %228
  %230 = load i32, ptr %25, align 4, !tbaa !9
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds double, ptr %229, i64 %231
  %233 = load double, ptr %232, align 8, !tbaa !11
  %234 = load double, ptr %28, align 8, !tbaa !11
  %235 = load double, ptr %28, align 8, !tbaa !11
  %236 = fmul double %234, %235
  %237 = load double, ptr %28, align 8, !tbaa !11
  %238 = load double, ptr %28, align 8, !tbaa !11
  %239 = fneg double %238
  %240 = call double @llvm.fmuladd.f64(double %236, double %237, double %239)
  %241 = load ptr, ptr %15, align 8, !tbaa !5
  %242 = load i32, ptr %23, align 4, !tbaa !9
  %243 = load i32, ptr %16, align 4, !tbaa !9
  %244 = mul nsw i32 %242, %243
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds double, ptr %241, i64 %245
  %247 = load i32, ptr %25, align 4, !tbaa !9
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds double, ptr %246, i64 %248
  %250 = load double, ptr %249, align 8, !tbaa !11
  %251 = fmul double %240, %250
  %252 = call double @llvm.fmuladd.f64(double %223, double %233, double %251)
  %253 = load double, ptr %26, align 8, !tbaa !11
  %254 = fmul double %252, %253
  %255 = load double, ptr %26, align 8, !tbaa !11
  %256 = fmul double %254, %255
  %257 = fdiv double %256, 6.000000e+00
  %258 = fadd double %216, %257
  %259 = load ptr, ptr %19, align 8, !tbaa !5
  %260 = load i32, ptr %25, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds double, ptr %259, i64 %261
  store double %258, ptr %262, align 8, !tbaa !11
  br label %263

263:                                              ; preds = %192
  %264 = load i32, ptr %25, align 4, !tbaa !9
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %25, align 4, !tbaa !9
  br label %188, !llvm.loop !16

266:                                              ; preds = %188
  store i32 0, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %267

267:                                              ; preds = %266, %128, %111, %68, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  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 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  %268 = load i32, ptr %11, align 4
  ret i32 %268
}

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}
!16 = distinct !{!16, !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_spline = external hidden unnamed_addr constant [25 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: nofree nounwind uwtable
define dso_local range(i32 0, 2) i32 @array_interpolate_spline(ptr noalias nocapture noundef readonly %0, i32 noundef %1, ptr noalias nocapture noundef readonly %2, ptr noalias nocapture noundef readonly %3, i32 noundef %4, double noundef %5, ptr noalias nocapture noundef writeonly %6, ptr noalias nocapture noundef writeonly %7, i32 noundef %8, ptr nocapture noundef writeonly %9) local_unnamed_addr #2 {
  %11 = add nsw i32 %1, -1
  %12 = load double, ptr %0, align 8, !tbaa !5
  %13 = sext i32 %11 to i64
  %14 = getelementptr inbounds double, ptr %0, i64 %13
  %15 = load double, ptr %14, align 8, !tbaa !5
  %16 = fcmp olt double %12, %15
  br i1 %16, label %17, label %36

17:                                               ; preds = %10
  %18 = fcmp ogt double %12, %5
  br i1 %18, label %19, label %21

19:                                               ; preds = %17
  %20 = 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_spline, i32 noundef 1706, double noundef %5, double noundef %12) #4
  br label %.loopexit

21:                                               ; preds = %17
  %22 = fcmp olt double %15, %5
  br i1 %22, label %24, label %.preheader

.preheader:                                       ; preds = %21
  %23 = icmp sgt i32 %1, 2
  br i1 %23, label %.lr.ph118, label %.loopexit110

24:                                               ; preds = %21
  %25 = 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_spline, i32 noundef 1711, double noundef %5, double noundef %15) #4
  br label %.loopexit

.lr.ph118:                                        ; preds = %.preheader, %.lr.ph118
  %.095117 = phi i32 [ %.095., %.lr.ph118 ], [ 0, %.preheader ]
  %.096116 = phi i32 [ %..096, %.lr.ph118 ], [ %11, %.preheader ]
  %26 = add nsw i32 %.095117, %.096116
  %27 = sitofp i32 %26 to double
  %28 = fmul double %27, 5.000000e-01
  %29 = fptosi double %28 to i32
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds double, ptr %0, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = fcmp ogt double %32, %5
  %..096 = select i1 %33, i32 %29, i32 %.096116
  %.095. = select i1 %33, i32 %.095117, i32 %29
  %34 = sub nsw i32 %..096, %.095.
  %35 = icmp sgt i32 %34, 1
  br i1 %35, label %.lr.ph118, label %.loopexit110, !llvm.loop !9

36:                                               ; preds = %10
  %37 = fcmp ogt double %15, %5
  br i1 %37, label %38, label %40

38:                                               ; preds = %36
  %39 = 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_spline, i32 noundef 1728, double noundef %5, double noundef %15) #4
  br label %.loopexit

40:                                               ; preds = %36
  %41 = fcmp olt double %12, %5
  br i1 %41, label %43, label %.preheader111

.preheader111:                                    ; preds = %40
  %42 = icmp sgt i32 %1, 2
  br i1 %42, label %.lr.ph, label %.loopexit110

43:                                               ; preds = %40
  %44 = 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_spline, i32 noundef 1733, double noundef %5, double noundef %12) #4
  br label %.loopexit

.lr.ph:                                           ; preds = %.preheader111, %.lr.ph
  %.2114 = phi i32 [ %.2., %.lr.ph ], [ 0, %.preheader111 ]
  %.298113 = phi i32 [ %..298, %.lr.ph ], [ %11, %.preheader111 ]
  %45 = add nsw i32 %.2114, %.298113
  %46 = sitofp i32 %45 to double
  %47 = fmul double %46, 5.000000e-01
  %48 = fptosi double %47 to i32
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds double, ptr %0, i64 %49
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = fcmp olt double %51, %5
  %..298 = select i1 %52, i32 %48, i32 %.298113
  %.2. = select i1 %52, i32 %.2114, i32 %48
  %53 = sub nsw i32 %..298, %.2.
  %54 = icmp sgt i32 %53, 1
  br i1 %54, label %.lr.ph, label %.loopexit110, !llvm.loop !11

.loopexit110:                                     ; preds = %.lr.ph, %.lr.ph118, %.preheader111, %.preheader
  %.4100 = phi i32 [ %11, %.preheader ], [ %11, %.preheader111 ], [ %..096, %.lr.ph118 ], [ %..298, %.lr.ph ]
  %.4 = phi i32 [ 0, %.preheader ], [ 0, %.preheader111 ], [ %.095., %.lr.ph118 ], [ %.2., %.lr.ph ]
  store i32 %.4, ptr %6, align 4, !tbaa !12
  %55 = sext i32 %.4100 to i64
  %56 = getelementptr inbounds double, ptr %0, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = sext i32 %.4 to i64
  %59 = getelementptr inbounds double, ptr %0, i64 %58
  %60 = load double, ptr %59, align 8, !tbaa !5
  %61 = fsub double %57, %60
  %62 = fsub double %5, %60
  %63 = fdiv double %62, %61
  %64 = fsub double 1.000000e+00, %63
  %65 = icmp sgt i32 %8, 0
  br i1 %65, label %.lr.ph122, label %.loopexit

.lr.ph122:                                        ; preds = %.loopexit110
  %66 = mul nsw i32 %.4, %4
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %2, i64 %67
  %69 = mul nsw i32 %.4100, %4
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %2, i64 %70
  %72 = fmul double %64, %64
  %73 = fneg double %64
  %74 = tail call double @llvm.fmuladd.f64(double %72, double %64, double %73)
  %75 = getelementptr inbounds double, ptr %3, i64 %67
  %76 = fmul double %63, %63
  %77 = fneg double %63
  %78 = tail call double @llvm.fmuladd.f64(double %76, double %63, double %77)
  %79 = getelementptr inbounds double, ptr %3, i64 %70
  %wide.trip.count = zext nneg i32 %8 to i64
  %min.iters.check = icmp eq i32 %8, 1
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph122
  %n.vec = and i64 %wide.trip.count, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %63, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert128 = insertelement <2 x double> poison, double %64, i64 0
  %broadcast.splat129 = shufflevector <2 x double> %broadcast.splatinsert128, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert132 = insertelement <2 x double> poison, double %78, i64 0
  %broadcast.splat133 = shufflevector <2 x double> %broadcast.splatinsert132, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert134 = insertelement <2 x double> poison, double %74, i64 0
  %broadcast.splat135 = shufflevector <2 x double> %broadcast.splatinsert134, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert136 = insertelement <2 x double> poison, double %61, i64 0
  %broadcast.splat137 = shufflevector <2 x double> %broadcast.splatinsert136, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %80 = getelementptr inbounds double, ptr %68, i64 %index
  %wide.load = load <2 x double>, ptr %80, align 8, !tbaa !5
  %81 = getelementptr inbounds double, ptr %71, i64 %index
  %wide.load127 = load <2 x double>, ptr %81, align 8, !tbaa !5
  %82 = fmul <2 x double> %broadcast.splat, %wide.load127
  %83 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat129, <2 x double> %wide.load, <2 x double> %82)
  %84 = getelementptr inbounds double, ptr %75, i64 %index
  %wide.load130 = load <2 x double>, ptr %84, align 8, !tbaa !5
  %85 = getelementptr inbounds double, ptr %79, i64 %index
  %wide.load131 = load <2 x double>, ptr %85, align 8, !tbaa !5
  %86 = fmul <2 x double> %broadcast.splat133, %wide.load131
  %87 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat135, <2 x double> %wide.load130, <2 x double> %86)
  %88 = fmul <2 x double> %broadcast.splat137, %87
  %89 = fmul <2 x double> %broadcast.splat137, %88
  %90 = fdiv <2 x double> %89, <double 6.000000e+00, double 6.000000e+00>
  %91 = fadd <2 x double> %83, %90
  %92 = getelementptr inbounds double, ptr %7, i64 %index
  store <2 x double> %91, ptr %92, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %93 = icmp eq i64 %index.next, %n.vec
  br i1 %93, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph122
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph122 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %94 = getelementptr inbounds double, ptr %68, i64 %indvars.iv
  %95 = load double, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds double, ptr %71, i64 %indvars.iv
  %97 = load double, ptr %96, align 8, !tbaa !5
  %98 = fmul double %63, %97
  %99 = tail call double @llvm.fmuladd.f64(double %64, double %95, double %98)
  %100 = getelementptr inbounds double, ptr %75, i64 %indvars.iv
  %101 = load double, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds double, ptr %79, i64 %indvars.iv
  %103 = load double, ptr %102, align 8, !tbaa !5
  %104 = fmul double %78, %103
  %105 = tail call double @llvm.fmuladd.f64(double %74, double %101, double %104)
  %106 = fmul double %61, %105
  %107 = fmul double %61, %106
  %108 = fdiv double %107, 6.000000e+00
  %109 = fadd double %99, %108
  %110 = getelementptr inbounds double, ptr %7, i64 %indvars.iv
  store double %109, ptr %110, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %scalar.ph, !llvm.loop !17

.loopexit:                                        ; preds = %scalar.ph, %middle.block, %.loopexit110, %43, %38, %24, %19
  %.0 = phi i32 [ 1, %19 ], [ 1, %24 ], [ 1, %38 ], [ 1, %43 ], [ 0, %.loopexit110 ], [ 0, %middle.block ], [ 0, %scalar.ph ]
  ret i32 %.0
}

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

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 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

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

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


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