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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.HypersphericalInterpolationStructure = type { i32, double, double, i32, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr }

; 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 uwtable
declare dso_local i32 @ClosedModY(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @hyperspherical_Hermite4_interpolation_vector_Phi(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca [3 x double], align 16
  %20 = alloca [3 x double], align 16
  %21 = alloca ptr, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %35, i32 0, i32 5
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %37, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !9
  store i32 %41, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store double 0.000000e+00, ptr %14, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store double 0.000000e+00, ptr %15, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store double 0.000000e+00, ptr %16, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store double 0.000000e+00, ptr %17, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #4
  call void @llvm.memset.p0.i64(ptr align 16 %19, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #4
  call void @llvm.memset.p0.i64(ptr align 16 %20, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  store i32 0, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  store i32 1, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  store i32 1, ptr %34, align 4, !tbaa !9
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %42, i32 0, i32 8
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  store ptr %44, ptr %21, align 8, !tbaa !5
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %45, i32 0, i32 2
  %47 = load double, ptr %46, align 8, !tbaa !16
  store double %47, ptr %24, align 8, !tbaa !14
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %48, i32 0, i32 7
  %50 = load i32, ptr %49, align 8, !tbaa !17
  store i32 %50, ptr %29, align 4, !tbaa !9
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %51, i32 0, i32 11
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = load i32, ptr %29, align 4, !tbaa !9
  %56 = mul nsw i32 %54, %55
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds double, ptr %53, i64 %57
  store ptr %58, ptr %31, align 8, !tbaa !5
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %59, i32 0, i32 12
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = load i32, ptr %29, align 4, !tbaa !9
  %64 = mul nsw i32 %62, %63
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %61, i64 %65
  store ptr %66, ptr %32, align 8, !tbaa !5
  %67 = load ptr, ptr %21, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %67, i64 0
  %69 = load double, ptr %68, align 8, !tbaa !14
  store double %69, ptr %22, align 8, !tbaa !14
  %70 = load ptr, ptr %21, align 8, !tbaa !5
  %71 = load i32, ptr %29, align 4, !tbaa !9
  %72 = sub nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %70, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !14
  store double %75, ptr %23, align 8, !tbaa !14
  %76 = load double, ptr %23, align 8, !tbaa !14
  store double %76, ptr %25, align 8, !tbaa !14
  %77 = load double, ptr %22, align 8, !tbaa !14
  store double %77, ptr %26, align 8, !tbaa !14
  %78 = load double, ptr %22, align 8, !tbaa !14
  store double %78, ptr %27, align 8, !tbaa !14
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %289, %6
  %80 = load i32, ptr %28, align 4, !tbaa !9
  %81 = load i32, ptr %8, align 4, !tbaa !9
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %83, label %292

83:                                               ; preds = %79
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = load i32, ptr %28, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %84, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !14
  store double %88, ptr %18, align 8, !tbaa !14
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %90, align 8, !tbaa !20
  %92 = icmp eq i32 %91, 1
  br i1 %92, label %93, label %101

93:                                               ; preds = %83
  %94 = load i32, ptr %13, align 4, !tbaa !9
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.HypersphericalInterpolationStructure, ptr %95, i32 0, i32 1
  %97 = load double, ptr %96, align 8, !tbaa !21
  %98 = fadd double %97, 2.000000e-01
  %99 = fptosi double %98 to i32
  %100 = call i32 @ClosedModY(i32 noundef %94, i32 noundef %99, ptr noundef %18, ptr noundef %33, ptr noundef %34)
  br label %101

101:                                              ; preds = %93, %83
  %102 = load double, ptr %18, align 8, !tbaa !14
  %103 = load double, ptr %22, align 8, !tbaa !14
  %104 = fcmp olt double %102, %103
  br i1 %104, label %109, label %105

105:                                              ; preds = %101
  %106 = load double, ptr %18, align 8, !tbaa !14
  %107 = load double, ptr %23, align 8, !tbaa !14
  %108 = fcmp ogt double %106, %107
  br i1 %108, label %109, label %114

109:                                              ; preds = %105, %101
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = load i32, ptr %28, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds double, ptr %110, i64 %112
  store double 0.000000e+00, ptr %113, align 8, !tbaa !14
  br label %289

114:                                              ; preds = %105
  %115 = load double, ptr %18, align 8, !tbaa !14
  %116 = load double, ptr %26, align 8, !tbaa !14
  %117 = fcmp ogt double %115, %116
  br i1 %117, label %122, label %118

118:                                              ; preds = %114
  %119 = load double, ptr %18, align 8, !tbaa !14
  %120 = load double, ptr %25, align 8, !tbaa !14
  %121 = fcmp olt double %119, %120
  br i1 %121, label %122, label %247

122:                                              ; preds = %118, %114
  %123 = load double, ptr %18, align 8, !tbaa !14
  %124 = load double, ptr %27, align 8, !tbaa !14
  %125 = fcmp ogt double %123, %124
  br i1 %125, label %130, label %126

126:                                              ; preds = %122
  %127 = load double, ptr %18, align 8, !tbaa !14
  %128 = load double, ptr %25, align 8, !tbaa !14
  %129 = fcmp olt double %127, %128
  br i1 %129, label %130, label %168

130:                                              ; preds = %126, %122
  %131 = load double, ptr %18, align 8, !tbaa !14
  %132 = load double, ptr %22, align 8, !tbaa !14
  %133 = fsub double %131, %132
  %134 = load double, ptr %24, align 8, !tbaa !14
  %135 = fdiv double %133, %134
  %136 = fptosi double %135 to i32
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %30, align 4, !tbaa !9
  %138 = load i32, ptr %30, align 4, !tbaa !9
  %139 = icmp slt i32 1, %138
  br i1 %139, label %140, label %142

140:                                              ; preds = %130
  %141 = load i32, ptr %30, align 4, !tbaa !9
  br label %143

142:                                              ; preds = %130
  br label %143

143:                                              ; preds = %142, %140
  %144 = phi i32 [ %141, %140 ], [ 1, %142 ]
  store i32 %144, ptr %30, align 4, !tbaa !9
  %145 = load i32, ptr %29, align 4, !tbaa !9
  %146 = sub nsw i32 %145, 1
  %147 = load i32, ptr %30, align 4, !tbaa !9
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %149, label %152

149:                                              ; preds = %143
  %150 = load i32, ptr %29, align 4, !tbaa !9
  %151 = sub nsw i32 %150, 1
  br label %154

152:                                              ; preds = %143
  %153 = load i32, ptr %30, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %152, %149
  %155 = phi i32 [ %151, %149 ], [ %153, %152 ]
  store i32 %155, ptr %30, align 4, !tbaa !9
  %156 = load ptr, ptr %31, align 8, !tbaa !5
  %157 = load i32, ptr %30, align 4, !tbaa !9
  %158 = sub nsw i32 %157, 1
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds double, ptr %156, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !14
  store double %161, ptr %14, align 8, !tbaa !14
  %162 = load ptr, ptr %32, align 8, !tbaa !5
  %163 = load i32, ptr %30, align 4, !tbaa !9
  %164 = sub nsw i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds double, ptr %162, i64 %165
  %167 = load double, ptr %166, align 8, !tbaa !14
  store double %167, ptr %16, align 8, !tbaa !14
  br label %173

168:                                              ; preds = %126
  %169 = load i32, ptr %30, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %30, align 4, !tbaa !9
  %171 = load double, ptr %15, align 8, !tbaa !14
  store double %171, ptr %14, align 8, !tbaa !14
  %172 = load double, ptr %17, align 8, !tbaa !14
  store double %172, ptr %16, align 8, !tbaa !14
  br label %173

173:                                              ; preds = %168, %154
  %174 = load ptr, ptr %21, align 8, !tbaa !5
  %175 = load i32, ptr %30, align 4, !tbaa !9
  %176 = sub nsw i32 %175, 1
  %177 = icmp slt i32 0, %176
  br i1 %177, label %178, label %181

178:                                              ; preds = %173
  %179 = load i32, ptr %30, align 4, !tbaa !9
  %180 = sub nsw i32 %179, 1
  br label %182

181:                                              ; preds = %173
  br label %182

182:                                              ; preds = %181, %178
  %183 = phi i32 [ %180, %178 ], [ 0, %181 ]
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds double, ptr %174, i64 %184
  %186 = load double, ptr %185, align 8, !tbaa !14
  store double %186, ptr %25, align 8, !tbaa !14
  %187 = load ptr, ptr %21, align 8, !tbaa !5
  %188 = load i32, ptr %30, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds double, ptr %187, i64 %189
  %191 = load double, ptr %190, align 8, !tbaa !14
  store double %191, ptr %26, align 8, !tbaa !14
  %192 = load ptr, ptr %21, align 8, !tbaa !5
  %193 = load i32, ptr %29, align 4, !tbaa !9
  %194 = sub nsw i32 %193, 1
  %195 = load i32, ptr %30, align 4, !tbaa !9
  %196 = add nsw i32 %195, 1
  %197 = icmp slt i32 %194, %196
  br i1 %197, label %198, label %201

198:                                              ; preds = %182
  %199 = load i32, ptr %29, align 4, !tbaa !9
  %200 = sub nsw i32 %199, 1
  br label %204

201:                                              ; preds = %182
  %202 = load i32, ptr %30, align 4, !tbaa !9
  %203 = add nsw i32 %202, 1
  br label %204

204:                                              ; preds = %201, %198
  %205 = phi i32 [ %200, %198 ], [ %203, %201 ]
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds double, ptr %192, i64 %206
  %208 = load double, ptr %207, align 8, !tbaa !14
  store double %208, ptr %27, align 8, !tbaa !14
  %209 = load ptr, ptr %31, align 8, !tbaa !5
  %210 = load i32, ptr %30, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds double, ptr %209, i64 %211
  %213 = load double, ptr %212, align 8, !tbaa !14
  store double %213, ptr %15, align 8, !tbaa !14
  %214 = load ptr, ptr %32, align 8, !tbaa !5
  %215 = load i32, ptr %30, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds double, ptr %214, i64 %216
  %218 = load double, ptr %217, align 8, !tbaa !14
  store double %218, ptr %17, align 8, !tbaa !14
  %219 = load double, ptr %16, align 8, !tbaa !14
  %220 = load double, ptr %24, align 8, !tbaa !14
  %221 = fmul double %219, %220
  %222 = getelementptr inbounds [3 x double], ptr %20, i64 0, i64 0
  store double %221, ptr %222, align 16, !tbaa !14
  %223 = load double, ptr %16, align 8, !tbaa !14
  %224 = fmul double -2.000000e+00, %223
  %225 = load double, ptr %24, align 8, !tbaa !14
  %226 = load double, ptr %17, align 8, !tbaa !14
  %227 = load double, ptr %24, align 8, !tbaa !14
  %228 = fmul double %226, %227
  %229 = fneg double %228
  %230 = call double @llvm.fmuladd.f64(double %224, double %225, double %229)
  %231 = load double, ptr %14, align 8, !tbaa !14
  %232 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %231, double %230)
  %233 = load double, ptr %15, align 8, !tbaa !14
  %234 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %233, double %232)
  %235 = getelementptr inbounds [3 x double], ptr %20, i64 0, i64 1
  store double %234, ptr %235, align 8, !tbaa !14
  %236 = load double, ptr %16, align 8, !tbaa !14
  %237 = load double, ptr %24, align 8, !tbaa !14
  %238 = load double, ptr %17, align 8, !tbaa !14
  %239 = load double, ptr %24, align 8, !tbaa !14
  %240 = fmul double %238, %239
  %241 = call double @llvm.fmuladd.f64(double %236, double %237, double %240)
  %242 = load double, ptr %14, align 8, !tbaa !14
  %243 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %242, double %241)
  %244 = load double, ptr %15, align 8, !tbaa !14
  %245 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %244, double %243)
  %246 = getelementptr inbounds [3 x double], ptr %20, i64 0, i64 2
  store double %245, ptr %246, align 16, !tbaa !14
  br label %247

247:                                              ; preds = %204, %118
  %248 = load double, ptr %18, align 8, !tbaa !14
  %249 = load double, ptr %25, align 8, !tbaa !14
  %250 = fsub double %248, %249
  %251 = load double, ptr %24, align 8, !tbaa !14
  %252 = fdiv double %250, %251
  %253 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  store double %252, ptr %253, align 16, !tbaa !14
  %254 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %255 = load double, ptr %254, align 16, !tbaa !14
  %256 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %257 = load double, ptr %256, align 16, !tbaa !14
  %258 = fmul double %255, %257
  %259 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  store double %258, ptr %259, align 8, !tbaa !14
  %260 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  %261 = load double, ptr %260, align 8, !tbaa !14
  %262 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %263 = load double, ptr %262, align 16, !tbaa !14
  %264 = fmul double %261, %263
  %265 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 2
  store double %264, ptr %265, align 16, !tbaa !14
  %266 = load double, ptr %14, align 8, !tbaa !14
  %267 = getelementptr inbounds [3 x double], ptr %20, i64 0, i64 0
  %268 = load double, ptr %267, align 16, !tbaa !14
  %269 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %270 = load double, ptr %269, align 16, !tbaa !14
  %271 = call double @llvm.fmuladd.f64(double %268, double %270, double %266)
  %272 = getelementptr inbounds [3 x double], ptr %20, i64 0, i64 1
  %273 = load double, ptr %272, align 8, !tbaa !14
  %274 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  %275 = load double, ptr %274, align 8, !tbaa !14
  %276 = call double @llvm.fmuladd.f64(double %273, double %275, double %271)
  %277 = getelementptr inbounds [3 x double], ptr %20, i64 0, i64 2
  %278 = load double, ptr %277, align 16, !tbaa !14
  %279 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 2
  %280 = load double, ptr %279, align 16, !tbaa !14
  %281 = call double @llvm.fmuladd.f64(double %278, double %280, double %276)
  %282 = load i32, ptr %33, align 4, !tbaa !9
  %283 = sitofp i32 %282 to double
  %284 = fmul double %281, %283
  %285 = load ptr, ptr %11, align 8, !tbaa !5
  %286 = load i32, ptr %28, align 4, !tbaa !9
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds double, ptr %285, i64 %287
  store double %284, ptr %288, align 8, !tbaa !14
  br label %289

289:                                              ; preds = %247, %109
  %290 = load i32, ptr %28, align 4, !tbaa !9
  %291 = add nsw i32 %290, 1
  store i32 %291, ptr %28, align 4, !tbaa !9
  br label %79, !llvm.loop !22

292:                                              ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  ret i32 0
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !6, i64 32}
!12 = !{!"HypersphericalInterpolationStructure", !10, i64 0, !13, i64 8, !13, i64 16, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!13 = !{!"double", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !6, i64 56}
!16 = !{!12, !13, i64 16}
!17 = !{!12, !10, i64 48}
!18 = !{!12, !6, i64 80}
!19 = !{!12, !6, i64 88}
!20 = !{!12, !10, i64 0}
!21 = !{!12, !13, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @ClosedModY(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @hyperspherical_Hermite4_interpolation_vector_Phi(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef readnone %5) local_unnamed_addr #2 {
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = sext i32 %2 to i64
  %13 = getelementptr inbounds i32, ptr %11, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  store i32 1, ptr %8, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 1, ptr %9, align 4, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = load double, ptr %17, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %0, i64 48
  %20 = load i32, ptr %19, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %0, i64 80
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  %23 = mul nsw i32 %20, %2
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds double, ptr %22, i64 %24
  %26 = getelementptr inbounds i8, ptr %0, i64 88
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = getelementptr inbounds double, ptr %27, i64 %24
  %29 = load double, ptr %16, align 8, !tbaa !18
  %30 = add nsw i32 %20, -1
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds double, ptr %16, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !18
  %invariant.gep = getelementptr i8, ptr %16, i64 -8
  %34 = icmp sgt i32 %1, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %wide.trip.count = zext nneg i32 %1 to i64
  %36 = insertelement <2 x double> poison, double %18, i64 0
  %37 = shufflevector <2 x double> %36, <2 x double> poison, <2 x i32> zeroinitializer
  br label %38

38:                                               ; preds = %.lr.ph, %118
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %118 ]
  %.0121 = phi double [ 0.000000e+00, %.lr.ph ], [ %.3, %118 ]
  %.085120 = phi double [ 0.000000e+00, %.lr.ph ], [ %.287, %118 ]
  %.088119 = phi i32 [ 0, %.lr.ph ], [ %.391, %118 ]
  %.094117 = phi double [ %29, %.lr.ph ], [ %.296, %118 ]
  %.097116 = phi double [ %29, %.lr.ph ], [ %.299, %118 ]
  %.0100115 = phi double [ %33, %.lr.ph ], [ %.2102, %118 ]
  %.0103114 = phi double [ 0.000000e+00, %.lr.ph ], [ %.2105, %118 ]
  %.sroa.0.0111 = phi double [ 0.000000e+00, %.lr.ph ], [ %.sroa.0.2, %118 ]
  %39 = phi <2 x double> [ zeroinitializer, %.lr.ph ], [ %119, %118 ]
  %40 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  %41 = load double, ptr %40, align 8, !tbaa !18
  store double %41, ptr %7, align 8, !tbaa !18
  %42 = load i32, ptr %0, align 8, !tbaa !19
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %44, label %49

44:                                               ; preds = %38
  %45 = load double, ptr %35, align 8, !tbaa !20
  %46 = fadd double %45, 2.000000e-01
  %47 = fptosi double %46 to i32
  %48 = call i32 @ClosedModY(i32 noundef %14, i32 noundef %47, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %.pre = load double, ptr %7, align 8, !tbaa !18
  br label %49

49:                                               ; preds = %44, %38
  %50 = phi double [ %.pre, %44 ], [ %41, %38 ]
  %51 = fcmp olt double %50, %29
  %52 = fcmp ogt double %50, %33
  %or.cond = select i1 %51, i1 true, i1 %52
  br i1 %or.cond, label %118, label %53

53:                                               ; preds = %49
  %54 = fcmp ogt double %50, %.097116
  %55 = fcmp olt double %50, %.0100115
  %or.cond109 = select i1 %54, i1 true, i1 %55
  br i1 %or.cond109, label %56, label %104

56:                                               ; preds = %53
  %57 = fcmp ogt double %50, %.094117
  %or.cond110 = select i1 %57, i1 true, i1 %55
  br i1 %or.cond110, label %58, label %71

58:                                               ; preds = %56
  %59 = fsub double %50, %29
  %60 = fdiv double %59, %18
  %61 = fptosi double %60 to i32
  %62 = call i32 @llvm.smax.i32(i32 %61, i32 0)
  %63 = add nuw nsw i32 %62, 1
  %64 = call i32 @llvm.smin.i32(i32 %30, i32 %63)
  %65 = add nsw i32 %64, -1
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %25, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !18
  %69 = getelementptr inbounds double, ptr %28, i64 %66
  %70 = load double, ptr %69, align 8, !tbaa !18
  br label %73

71:                                               ; preds = %56
  %72 = add nsw i32 %.088119, 1
  br label %73

73:                                               ; preds = %71, %58
  %.092 = phi double [ %70, %58 ], [ %.0103114, %71 ]
  %.189 = phi i32 [ %64, %58 ], [ %72, %71 ]
  %.1 = phi double [ %68, %58 ], [ %.085120, %71 ]
  %74 = call i32 @llvm.smax.i32(i32 %.189, i32 1)
  %75 = zext nneg i32 %74 to i64
  %gep = getelementptr double, ptr %invariant.gep, i64 %75
  %76 = load double, ptr %gep, align 8, !tbaa !18
  %77 = sext i32 %.189 to i64
  %78 = getelementptr inbounds double, ptr %16, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !18
  %80 = add nsw i32 %.189, 1
  %81 = call i32 @llvm.smin.i32(i32 %30, i32 %80)
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %16, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !18
  %85 = getelementptr inbounds double, ptr %25, i64 %77
  %86 = load double, ptr %85, align 8, !tbaa !18
  %87 = getelementptr inbounds double, ptr %28, i64 %77
  %88 = load double, ptr %87, align 8, !tbaa !18
  %89 = fmul double %18, %.092
  %90 = fmul double %.092, -2.000000e+00
  %91 = fmul double %18, %88
  %92 = fneg double %91
  %93 = insertelement <2 x double> poison, double %90, i64 0
  %94 = insertelement <2 x double> %93, double %.092, i64 1
  %95 = insertelement <2 x double> poison, double %92, i64 0
  %96 = insertelement <2 x double> %95, double %91, i64 1
  %97 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %94, <2 x double> %37, <2 x double> %96)
  %98 = insertelement <2 x double> poison, double %.1, i64 0
  %99 = shufflevector <2 x double> %98, <2 x double> poison, <2 x i32> zeroinitializer
  %100 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %99, <2 x double> <double -3.000000e+00, double 2.000000e+00>, <2 x double> %97)
  %101 = insertelement <2 x double> poison, double %86, i64 0
  %102 = shufflevector <2 x double> %101, <2 x double> poison, <2 x i32> zeroinitializer
  %103 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %102, <2 x double> <double 3.000000e+00, double -2.000000e+00>, <2 x double> %100)
  br label %104

104:                                              ; preds = %53, %73
  %.sroa.0.1 = phi double [ %89, %73 ], [ %.sroa.0.0111, %53 ]
  %.1104 = phi double [ %88, %73 ], [ %.0103114, %53 ]
  %.1101 = phi double [ %76, %73 ], [ %.0100115, %53 ]
  %.198 = phi double [ %79, %73 ], [ %.097116, %53 ]
  %.195 = phi double [ %84, %73 ], [ %.094117, %53 ]
  %.290 = phi i32 [ %.189, %73 ], [ %.088119, %53 ]
  %.186 = phi double [ %86, %73 ], [ %.085120, %53 ]
  %.2 = phi double [ %.1, %73 ], [ %.0121, %53 ]
  %105 = phi <2 x double> [ %103, %73 ], [ %39, %53 ]
  %106 = fsub double %50, %.1101
  %107 = fdiv double %106, %18
  %108 = fmul double %107, %107
  %109 = fmul double %107, %108
  %110 = call double @llvm.fmuladd.f64(double %.sroa.0.1, double %107, double %.2)
  %111 = extractelement <2 x double> %105, i64 0
  %112 = call double @llvm.fmuladd.f64(double %111, double %108, double %110)
  %113 = extractelement <2 x double> %105, i64 1
  %114 = call double @llvm.fmuladd.f64(double %113, double %109, double %112)
  %115 = load i32, ptr %8, align 4, !tbaa !12
  %116 = sitofp i32 %115 to double
  %117 = fmul double %114, %116
  br label %118

118:                                              ; preds = %49, %104
  %.sink = phi double [ %117, %104 ], [ 0.000000e+00, %49 ]
  %.sroa.0.2 = phi double [ %.sroa.0.1, %104 ], [ %.sroa.0.0111, %49 ]
  %.2105 = phi double [ %.1104, %104 ], [ %.0103114, %49 ]
  %.2102 = phi double [ %.1101, %104 ], [ %.0100115, %49 ]
  %.299 = phi double [ %.198, %104 ], [ %.097116, %49 ]
  %.296 = phi double [ %.195, %104 ], [ %.094117, %49 ]
  %.391 = phi i32 [ %.290, %104 ], [ %.088119, %49 ]
  %.287 = phi double [ %.186, %104 ], [ %.085120, %49 ]
  %.3 = phi double [ %.2, %104 ], [ %.0121, %49 ]
  %119 = phi <2 x double> [ %105, %104 ], [ %39, %49 ]
  %120 = getelementptr inbounds double, ptr %4, i64 %indvars.iv
  store double %.sink, ptr %120, align 8, !tbaa !18
  %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 %._crit_edge, label %38, !llvm.loop !21

._crit_edge:                                      ; preds = %118, %6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  ret i32 0
}

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

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

; 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 willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !11, i64 32}
!6 = !{!"HypersphericalInterpolationStructure", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 28, !11, i64 32, !11, i64 40, !7, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !11, i64 56}
!14 = !{!6, !10, i64 16}
!15 = !{!6, !7, i64 48}
!16 = !{!6, !11, i64 80}
!17 = !{!6, !11, i64 88}
!18 = !{!10, !10, i64 0}
!19 = !{!6, !7, i64 0}
!20 = !{!6, !10, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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