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

78:                                               ; preds = %259, %6
  %79 = load i32, ptr %27, align 4, !tbaa !9
  %80 = load i32, ptr %8, align 4, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %82, label %262

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

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

100:                                              ; preds = %92, %82
  %101 = load double, ptr %17, align 8, !tbaa !14
  %102 = load double, ptr %21, align 8, !tbaa !14
  %103 = fcmp olt double %101, %102
  br i1 %103, label %108, label %104

104:                                              ; preds = %100
  %105 = load double, ptr %17, align 8, !tbaa !14
  %106 = load double, ptr %22, align 8, !tbaa !14
  %107 = fcmp ogt double %105, %106
  br i1 %107, label %108, label %113

108:                                              ; preds = %104, %100
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = load i32, ptr %27, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  store double 0.000000e+00, ptr %112, align 8, !tbaa !14
  br label %259

113:                                              ; preds = %104
  %114 = load double, ptr %17, align 8, !tbaa !14
  %115 = load double, ptr %25, align 8, !tbaa !14
  %116 = fcmp ogt double %114, %115
  br i1 %116, label %121, label %117

117:                                              ; preds = %113
  %118 = load double, ptr %17, align 8, !tbaa !14
  %119 = load double, ptr %24, align 8, !tbaa !14
  %120 = fcmp olt double %118, %119
  br i1 %120, label %121, label %228

121:                                              ; preds = %117, %113
  %122 = load double, ptr %17, align 8, !tbaa !14
  %123 = load double, ptr %26, align 8, !tbaa !14
  %124 = fcmp ogt double %122, %123
  br i1 %124, label %129, label %125

125:                                              ; preds = %121
  %126 = load double, ptr %17, align 8, !tbaa !14
  %127 = load double, ptr %24, align 8, !tbaa !14
  %128 = fcmp olt double %126, %127
  br i1 %128, label %129, label %161

129:                                              ; preds = %125, %121
  %130 = load double, ptr %17, align 8, !tbaa !14
  %131 = load double, ptr %21, align 8, !tbaa !14
  %132 = fsub double %130, %131
  %133 = load double, ptr %23, align 8, !tbaa !14
  %134 = fdiv double %132, %133
  %135 = fptosi double %134 to i32
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %29, align 4, !tbaa !9
  %137 = load i32, ptr %29, align 4, !tbaa !9
  %138 = icmp slt i32 1, %137
  br i1 %138, label %139, label %141

139:                                              ; preds = %129
  %140 = load i32, ptr %29, align 4, !tbaa !9
  br label %142

141:                                              ; preds = %129
  br label %142

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

148:                                              ; preds = %142
  %149 = load i32, ptr %28, align 4, !tbaa !9
  %150 = sub nsw i32 %149, 1
  br label %153

151:                                              ; preds = %142
  %152 = load i32, ptr %29, align 4, !tbaa !9
  br label %153

153:                                              ; preds = %151, %148
  %154 = phi i32 [ %150, %148 ], [ %152, %151 ]
  store i32 %154, ptr %29, align 4, !tbaa !9
  %155 = load ptr, ptr %30, align 8, !tbaa !5
  %156 = load i32, ptr %29, align 4, !tbaa !9
  %157 = sub nsw i32 %156, 1
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds double, ptr %155, i64 %158
  %160 = load double, ptr %159, align 8, !tbaa !14
  store double %160, ptr %14, align 8, !tbaa !14
  br label %165

161:                                              ; preds = %125
  %162 = load i32, ptr %29, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %29, align 4, !tbaa !9
  %164 = load double, ptr %15, align 8, !tbaa !14
  store double %164, ptr %14, align 8, !tbaa !14
  br label %165

165:                                              ; preds = %161, %153
  %166 = load ptr, ptr %20, align 8, !tbaa !5
  %167 = load i32, ptr %29, align 4, !tbaa !9
  %168 = sub nsw i32 %167, 1
  %169 = icmp slt i32 0, %168
  br i1 %169, label %170, label %173

170:                                              ; preds = %165
  %171 = load i32, ptr %29, align 4, !tbaa !9
  %172 = sub nsw i32 %171, 1
  br label %174

173:                                              ; preds = %165
  br label %174

174:                                              ; preds = %173, %170
  %175 = phi i32 [ %172, %170 ], [ 0, %173 ]
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds double, ptr %166, i64 %176
  %178 = load double, ptr %177, align 8, !tbaa !14
  store double %178, ptr %24, align 8, !tbaa !14
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  %180 = load i32, ptr %29, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds double, ptr %179, i64 %181
  %183 = load double, ptr %182, align 8, !tbaa !14
  store double %183, ptr %25, align 8, !tbaa !14
  %184 = load ptr, ptr %20, align 8, !tbaa !5
  %185 = load i32, ptr %28, align 4, !tbaa !9
  %186 = sub nsw i32 %185, 1
  %187 = load i32, ptr %29, align 4, !tbaa !9
  %188 = add nsw i32 %187, 1
  %189 = icmp slt i32 %186, %188
  br i1 %189, label %190, label %193

190:                                              ; preds = %174
  %191 = load i32, ptr %28, align 4, !tbaa !9
  %192 = sub nsw i32 %191, 1
  br label %196

193:                                              ; preds = %174
  %194 = load i32, ptr %29, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  br label %196

196:                                              ; preds = %193, %190
  %197 = phi i32 [ %192, %190 ], [ %195, %193 ]
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds double, ptr %184, i64 %198
  %200 = load double, ptr %199, align 8, !tbaa !14
  store double %200, ptr %26, align 8, !tbaa !14
  %201 = load ptr, ptr %30, align 8, !tbaa !5
  %202 = load i32, ptr %29, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds double, ptr %201, i64 %203
  %205 = load double, ptr %204, align 8, !tbaa !14
  store double %205, ptr %15, align 8, !tbaa !14
  %206 = load ptr, ptr %31, align 8, !tbaa !5
  %207 = load i32, ptr %29, align 4, !tbaa !9
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds double, ptr %206, i64 %208
  %210 = load double, ptr %209, align 8, !tbaa !14
  store double %210, ptr %16, align 8, !tbaa !14
  %211 = load double, ptr %16, align 8, !tbaa !14
  %212 = fneg double %211
  %213 = load double, ptr %23, align 8, !tbaa !14
  %214 = load double, ptr %14, align 8, !tbaa !14
  %215 = fmul double 2.000000e+00, %214
  %216 = fneg double %215
  %217 = call double @llvm.fmuladd.f64(double %212, double %213, double %216)
  %218 = load double, ptr %15, align 8, !tbaa !14
  %219 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %218, double %217)
  %220 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  store double %219, ptr %220, align 16, !tbaa !14
  %221 = load double, ptr %16, align 8, !tbaa !14
  %222 = load double, ptr %23, align 8, !tbaa !14
  %223 = load double, ptr %14, align 8, !tbaa !14
  %224 = call double @llvm.fmuladd.f64(double %221, double %222, double %223)
  %225 = load double, ptr %15, align 8, !tbaa !14
  %226 = fsub double %224, %225
  %227 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  store double %226, ptr %227, align 8, !tbaa !14
  br label %228

228:                                              ; preds = %196, %117
  %229 = load double, ptr %17, align 8, !tbaa !14
  %230 = load double, ptr %24, align 8, !tbaa !14
  %231 = fsub double %229, %230
  %232 = load double, ptr %23, align 8, !tbaa !14
  %233 = fdiv double %231, %232
  %234 = getelementptr inbounds [2 x double], ptr %18, i64 0, i64 0
  store double %233, ptr %234, align 16, !tbaa !14
  %235 = getelementptr inbounds [2 x double], ptr %18, i64 0, i64 0
  %236 = load double, ptr %235, align 16, !tbaa !14
  %237 = getelementptr inbounds [2 x double], ptr %18, i64 0, i64 0
  %238 = load double, ptr %237, align 16, !tbaa !14
  %239 = fmul double %236, %238
  %240 = getelementptr inbounds [2 x double], ptr %18, i64 0, i64 1
  store double %239, ptr %240, align 8, !tbaa !14
  %241 = load double, ptr %14, align 8, !tbaa !14
  %242 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %243 = load double, ptr %242, align 16, !tbaa !14
  %244 = getelementptr inbounds [2 x double], ptr %18, i64 0, i64 0
  %245 = load double, ptr %244, align 16, !tbaa !14
  %246 = call double @llvm.fmuladd.f64(double %243, double %245, double %241)
  %247 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  %248 = load double, ptr %247, align 8, !tbaa !14
  %249 = getelementptr inbounds [2 x double], ptr %18, i64 0, i64 1
  %250 = load double, ptr %249, align 8, !tbaa !14
  %251 = call double @llvm.fmuladd.f64(double %248, double %250, double %246)
  %252 = load i32, ptr %32, align 4, !tbaa !9
  %253 = sitofp i32 %252 to double
  %254 = fmul double %251, %253
  %255 = load ptr, ptr %11, align 8, !tbaa !5
  %256 = load i32, ptr %27, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds double, ptr %255, i64 %257
  store double %254, ptr %258, align 8, !tbaa !14
  br label %259

259:                                              ; preds = %228, %108
  %260 = load i32, ptr %27, align 4, !tbaa !9
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %27, align 4, !tbaa !9
  br label %78, !llvm.loop !22

262:                                              ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 4, 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 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 16, 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_Hermite3_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 %25, i64 -8
  %invariant.gep97 = 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
  br label %36

36:                                               ; preds = %.lr.ph, %96
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %96 ]
  %.0107 = phi double [ 0.000000e+00, %.lr.ph ], [ %.3, %96 ]
  %.075106 = phi double [ 0.000000e+00, %.lr.ph ], [ %.277, %96 ]
  %.078105 = phi i32 [ 0, %.lr.ph ], [ %.381, %96 ]
  %.083103 = phi double [ %29, %.lr.ph ], [ %.285, %96 ]
  %.086102 = phi double [ %29, %.lr.ph ], [ %.288, %96 ]
  %.089101 = phi double [ %33, %.lr.ph ], [ %.291, %96 ]
  %.sroa.0.0100 = phi double [ 0.000000e+00, %.lr.ph ], [ %.sroa.0.2, %96 ]
  %.sroa.5.099 = phi double [ 0.000000e+00, %.lr.ph ], [ %.sroa.5.2, %96 ]
  %37 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  %38 = load double, ptr %37, align 8, !tbaa !18
  store double %38, ptr %7, align 8, !tbaa !18
  %39 = load i32, ptr %0, align 8, !tbaa !19
  %40 = icmp eq i32 %39, 1
  br i1 %40, label %41, label %46

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

46:                                               ; preds = %41, %36
  %47 = phi double [ %.pre, %41 ], [ %38, %36 ]
  %48 = fcmp olt double %47, %29
  %49 = fcmp ogt double %47, %33
  %or.cond = select i1 %48, i1 true, i1 %49
  br i1 %or.cond, label %96, label %50

50:                                               ; preds = %46
  %51 = fcmp ogt double %47, %.086102
  %52 = fcmp olt double %47, %.089101
  %or.cond95 = select i1 %51, i1 true, i1 %52
  br i1 %or.cond95, label %53, label %87

53:                                               ; preds = %50
  %54 = fcmp ogt double %47, %.083103
  %or.cond96 = select i1 %54, i1 true, i1 %52
  br i1 %or.cond96, label %55, label %64

55:                                               ; preds = %53
  %56 = fsub double %47, %29
  %57 = fdiv double %56, %18
  %58 = fptosi double %57 to i32
  %59 = call i32 @llvm.smax.i32(i32 %58, i32 0)
  %60 = add nuw nsw i32 %59, 1
  %61 = call i32 @llvm.smin.i32(i32 %30, i32 %60)
  %62 = sext i32 %61 to i64
  %gep = getelementptr double, ptr %invariant.gep, i64 %62
  %63 = load double, ptr %gep, align 8, !tbaa !18
  br label %66

64:                                               ; preds = %53
  %65 = add nsw i32 %.078105, 1
  %.pre109 = sext i32 %65 to i64
  br label %66

66:                                               ; preds = %64, %55
  %.pre-phi = phi i64 [ %.pre109, %64 ], [ %62, %55 ]
  %.179 = phi i32 [ %65, %64 ], [ %61, %55 ]
  %.1 = phi double [ %.075106, %64 ], [ %63, %55 ]
  %67 = call i32 @llvm.smax.i32(i32 %.179, i32 1)
  %68 = zext nneg i32 %67 to i64
  %gep98 = getelementptr double, ptr %invariant.gep97, i64 %68
  %69 = load double, ptr %gep98, align 8, !tbaa !18
  %70 = getelementptr inbounds double, ptr %16, i64 %.pre-phi
  %71 = load double, ptr %70, align 8, !tbaa !18
  %72 = add nsw i32 %.179, 1
  %73 = call i32 @llvm.smin.i32(i32 %30, i32 %72)
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %16, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !18
  %77 = getelementptr inbounds double, ptr %25, i64 %.pre-phi
  %78 = load double, ptr %77, align 8, !tbaa !18
  %79 = getelementptr inbounds double, ptr %28, i64 %.pre-phi
  %80 = load double, ptr %79, align 8, !tbaa !18
  %81 = fneg double %80
  %82 = fmul double %.1, -2.000000e+00
  %83 = call double @llvm.fmuladd.f64(double %81, double %18, double %82)
  %84 = call double @llvm.fmuladd.f64(double %78, double 2.000000e+00, double %83)
  %85 = call double @llvm.fmuladd.f64(double %80, double %18, double %.1)
  %86 = fsub double %85, %78
  br label %87

87:                                               ; preds = %50, %66
  %.sroa.5.1 = phi double [ %86, %66 ], [ %.sroa.5.099, %50 ]
  %.sroa.0.1 = phi double [ %84, %66 ], [ %.sroa.0.0100, %50 ]
  %.190 = phi double [ %69, %66 ], [ %.089101, %50 ]
  %.187 = phi double [ %71, %66 ], [ %.086102, %50 ]
  %.184 = phi double [ %76, %66 ], [ %.083103, %50 ]
  %.280 = phi i32 [ %.179, %66 ], [ %.078105, %50 ]
  %.176 = phi double [ %78, %66 ], [ %.075106, %50 ]
  %.2 = phi double [ %.1, %66 ], [ %.0107, %50 ]
  %88 = fsub double %47, %.190
  %89 = fdiv double %88, %18
  %90 = fmul double %89, %89
  %91 = call double @llvm.fmuladd.f64(double %.sroa.0.1, double %89, double %.2)
  %92 = call double @llvm.fmuladd.f64(double %.sroa.5.1, double %90, double %91)
  %93 = load i32, ptr %8, align 4, !tbaa !12
  %94 = sitofp i32 %93 to double
  %95 = fmul double %92, %94
  br label %96

96:                                               ; preds = %46, %87
  %.sink = phi double [ %95, %87 ], [ 0.000000e+00, %46 ]
  %.sroa.5.2 = phi double [ %.sroa.5.1, %87 ], [ %.sroa.5.099, %46 ]
  %.sroa.0.2 = phi double [ %.sroa.0.1, %87 ], [ %.sroa.0.0100, %46 ]
  %.291 = phi double [ %.190, %87 ], [ %.089101, %46 ]
  %.288 = phi double [ %.187, %87 ], [ %.086102, %46 ]
  %.285 = phi double [ %.184, %87 ], [ %.083103, %46 ]
  %.381 = phi i32 [ %.280, %87 ], [ %.078105, %46 ]
  %.277 = phi double [ %.176, %87 ], [ %.075106, %46 ]
  %.3 = phi double [ %.2, %87 ], [ %.0107, %46 ]
  %97 = getelementptr inbounds double, ptr %4, i64 %indvars.iv
  store double %.sink, ptr %97, 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 %36, !llvm.loop !21

._crit_edge:                                      ; preds = %96, %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

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,SROAPass,SimplifyCFGPass