; 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_logspline = external hidden unnamed_addr constant [28 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 uwtable
define dso_local i32 @array_interpolate_logspline(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, double noundef %5, ptr noundef %6, ptr 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_logspline, i32 noundef 1936, double noundef %53, double noundef %58) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %270

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_logspline, i32 noundef 1941, double noundef %70, double noundef %75) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %270

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_logspline, i32 noundef 1958, double noundef %113, double noundef %118) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %270

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_logspline, i32 noundef 1963, double noundef %130, double noundef %135) #4
  store i32 1, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %270

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 = call double @log(double noundef %170) #4
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = load i32, ptr %22, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds double, ptr %172, i64 %174
  %176 = load double, ptr %175, align 8, !tbaa !11
  %177 = call double @log(double noundef %176) #4
  %178 = fsub double %171, %177
  store double %178, ptr %26, align 8, !tbaa !11
  %179 = load double, ptr %17, align 8, !tbaa !11
  %180 = call double @log(double noundef %179) #4
  %181 = load ptr, ptr %12, align 8, !tbaa !5
  %182 = load i32, ptr %22, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds double, ptr %181, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !11
  %186 = call double @log(double noundef %185) #4
  %187 = fsub double %180, %186
  %188 = load double, ptr %26, align 8, !tbaa !11
  %189 = fdiv double %187, %188
  store double %189, ptr %28, align 8, !tbaa !11
  %190 = load double, ptr %28, align 8, !tbaa !11
  %191 = fsub double 1.000000e+00, %190
  store double %191, ptr %27, align 8, !tbaa !11
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %192

192:                                              ; preds = %266, %163
  %193 = load i32, ptr %25, align 4, !tbaa !9
  %194 = load i32, ptr %20, align 4, !tbaa !9
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %196, label %269

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

266:                                              ; preds = %196
  %267 = load i32, ptr %25, align 4, !tbaa !9
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %25, align 4, !tbaa !9
  br label %192, !llvm.loop !16

269:                                              ; preds = %192
  store i32 0, ptr %11, align 4
  store i32 1, ptr %29, align 4
  br label %270

270:                                              ; preds = %269, %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
  %271 = load i32, ptr %11, align 4
  ret i32 %271
}

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

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_logspline = external hidden unnamed_addr constant [28 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: nofree nounwind uwtable
define dso_local range(i32 0, 2) i32 @array_interpolate_logspline(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3, i32 noundef %4, double noundef %5, ptr nocapture noundef writeonly %6, ptr nocapture noundef writeonly %7, i32 noundef %8, ptr nocapture noundef writeonly %9) local_unnamed_addr #3 {
  %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_logspline, i32 noundef 1936, 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_logspline, i32 noundef 1941, 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_logspline, i32 noundef 1958, 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_logspline, i32 noundef 1963, 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 = tail call double @log(double noundef %57) #4
  %59 = sext i32 %.4 to i64
  %60 = getelementptr inbounds double, ptr %0, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !5
  %62 = tail call double @log(double noundef %61) #4
  %63 = fsub double %58, %62
  %64 = tail call double @log(double noundef %5) #4
  %65 = load double, ptr %60, align 8, !tbaa !5
  %66 = tail call double @log(double noundef %65) #4
  %67 = fsub double %64, %66
  %68 = fdiv double %67, %63
  %69 = fsub double 1.000000e+00, %68
  %70 = icmp sgt i32 %8, 0
  br i1 %70, label %.lr.ph122, label %.loopexit

.lr.ph122:                                        ; preds = %.loopexit110
  %71 = mul nsw i32 %.4, %4
  %72 = mul nsw i32 %.4100, %4
  %73 = fmul double %69, %69
  %74 = fneg double %69
  %75 = tail call double @llvm.fmuladd.f64(double %73, double %69, double %74)
  %76 = fmul double %68, %68
  %77 = fneg double %68
  %78 = tail call double @llvm.fmuladd.f64(double %76, double %68, double %77)
  %79 = sext i32 %71 to i64
  %80 = sext i32 %72 to i64
  %wide.trip.count = zext nneg i32 %8 to i64
  br label %81

81:                                               ; preds = %.lr.ph122, %81
  %indvars.iv = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next, %81 ]
  %82 = add nsw i64 %indvars.iv, %79
  %83 = getelementptr inbounds double, ptr %2, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !5
  %85 = tail call double @log(double noundef %84) #4
  %86 = add nsw i64 %indvars.iv, %80
  %87 = getelementptr inbounds double, ptr %2, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !5
  %89 = tail call double @log(double noundef %88) #4
  %90 = fmul double %68, %89
  %91 = tail call double @llvm.fmuladd.f64(double %69, double %85, double %90)
  %92 = getelementptr inbounds double, ptr %3, i64 %82
  %93 = load double, ptr %92, align 8, !tbaa !5
  %94 = getelementptr inbounds double, ptr %3, i64 %86
  %95 = load double, ptr %94, align 8, !tbaa !5
  %96 = fmul double %78, %95
  %97 = tail call double @llvm.fmuladd.f64(double %75, double %93, double %96)
  %98 = fmul double %63, %97
  %99 = fmul double %63, %98
  %100 = fdiv double %99, 6.000000e+00
  %101 = fadd double %91, %100
  %102 = tail call double @exp(double noundef %101) #4
  %103 = getelementptr inbounds double, ptr %7, i64 %indvars.iv
  store double %102, ptr %103, 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 %81, !llvm.loop !14

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

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

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


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