; LLVM IR from PymZoR/S-curve-Planner :: examples/s-curve (motionPlanning)

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

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

81:                                               ; preds = %2
  store i32 2, ptr %5, align 4, !tbaa !9
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds double, ptr %82, i64 3
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  store double %84, ptr %85, align 16, !tbaa !11
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds double, ptr %86, i64 2
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds double, ptr %89, i64 3
  %91 = load double, ptr %90, align 8, !tbaa !11
  %92 = fmul double %88, %91
  %93 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  store double %92, ptr %93, align 8, !tbaa !11
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds double, ptr %94, i64 1
  %96 = load double, ptr %95, align 8, !tbaa !11
  %97 = fneg double %96
  %98 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  store double %97, ptr %98, align 16, !tbaa !11
  %99 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %100 = load i32, ptr %5, align 4, !tbaa !9
  %101 = call double @findRoot(ptr noundef %99, i32 noundef %100)
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds double, ptr %102, i64 3
  store double %101, ptr %103, align 8, !tbaa !11
  br label %108

104:                                              ; preds = %2
  %105 = load double, ptr %7, align 8, !tbaa !11
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds double, ptr %106, i64 1
  store double %105, ptr %107, align 8, !tbaa !11
  br label %108

108:                                              ; preds = %104, %81
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds double, ptr %109, i64 3
  %111 = load double, ptr %110, align 8, !tbaa !11
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds double, ptr %112, i64 3
  %114 = load double, ptr %113, align 8, !tbaa !11
  %115 = fmul double %111, %114
  store double %115, ptr %7, align 8, !tbaa !11
  %116 = load double, ptr %7, align 8, !tbaa !11
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds double, ptr %117, i64 2
  %119 = load double, ptr %118, align 8, !tbaa !11
  %120 = fcmp ogt double %116, %119
  br i1 %120, label %121, label %136

121:                                              ; preds = %108
  store i32 1, ptr %5, align 4, !tbaa !9
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds double, ptr %122, i64 3
  %124 = load double, ptr %123, align 8, !tbaa !11
  %125 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  store double %124, ptr %125, align 16, !tbaa !11
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds double, ptr %126, i64 2
  %128 = load double, ptr %127, align 8, !tbaa !11
  %129 = fneg double %128
  %130 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  store double %129, ptr %130, align 8, !tbaa !11
  %131 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %132 = load i32, ptr %5, align 4, !tbaa !9
  %133 = call double @findRoot(ptr noundef %131, i32 noundef %132)
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds double, ptr %134, i64 3
  store double %133, ptr %135, align 8, !tbaa !11
  br label %140

136:                                              ; preds = %108
  %137 = load double, ptr %7, align 8, !tbaa !11
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds double, ptr %138, i64 2
  store double %137, ptr %139, align 8, !tbaa !11
  br label %140

140:                                              ; preds = %136, %121
  store i32 2, ptr %5, align 4, !tbaa !9
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds double, ptr %141, i64 3
  %143 = load double, ptr %142, align 8, !tbaa !11
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 3
  %146 = load double, ptr %145, align 8, !tbaa !11
  %147 = fmul double %143, %146
  %148 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  store double %147, ptr %148, align 16, !tbaa !11
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds double, ptr %149, i64 1
  %151 = load double, ptr %150, align 8, !tbaa !11
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds double, ptr %152, i64 3
  %154 = load double, ptr %153, align 8, !tbaa !11
  %155 = fmul double %151, %154
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds double, ptr %156, i64 3
  %158 = load double, ptr %157, align 8, !tbaa !11
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds double, ptr %159, i64 3
  %161 = load double, ptr %160, align 8, !tbaa !11
  %162 = call double @pow(double noundef %161, double noundef 2.000000e+00) #6
  %163 = fmul double 3.000000e+00, %162
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds double, ptr %164, i64 3
  %166 = load double, ptr %165, align 8, !tbaa !11
  %167 = fmul double %163, %166
  %168 = call double @llvm.fmuladd.f64(double %155, double %158, double %167)
  %169 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  store double %168, ptr %169, align 8, !tbaa !11
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds double, ptr %170, i64 1
  %172 = load double, ptr %171, align 8, !tbaa !11
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds double, ptr %173, i64 3
  %175 = load double, ptr %174, align 8, !tbaa !11
  %176 = call double @pow(double noundef %175, double noundef 2.000000e+00) #6
  %177 = fmul double %172, %176
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds double, ptr %178, i64 3
  %180 = load double, ptr %179, align 8, !tbaa !11
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = getelementptr inbounds double, ptr %181, i64 3
  %183 = load double, ptr %182, align 8, !tbaa !11
  %184 = call double @pow(double noundef %183, double noundef 3.000000e+00) #6
  %185 = fmul double 2.000000e+00, %184
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = getelementptr inbounds double, ptr %186, i64 3
  %188 = load double, ptr %187, align 8, !tbaa !11
  %189 = fmul double %185, %188
  %190 = call double @llvm.fmuladd.f64(double %177, double %180, double %189)
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds double, ptr %191, i64 0
  %193 = load double, ptr %192, align 8, !tbaa !11
  %194 = fsub double %190, %193
  %195 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  store double %194, ptr %195, align 16, !tbaa !11
  %196 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %197 = load i32, ptr %5, align 4, !tbaa !9
  %198 = call double @findRoot(ptr noundef %196, i32 noundef %197)
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds double, ptr %199, i64 2
  store double %198, ptr %200, align 8, !tbaa !11
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = getelementptr inbounds double, ptr %201, i64 2
  %203 = load double, ptr %202, align 8, !tbaa !11
  %204 = load ptr, ptr %4, align 8, !tbaa !5
  %205 = getelementptr inbounds double, ptr %204, i64 3
  %206 = load double, ptr %205, align 8, !tbaa !11
  %207 = fmul double 2.000000e+00, %206
  %208 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %203, double %207)
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = getelementptr inbounds double, ptr %209, i64 3
  %211 = load double, ptr %210, align 8, !tbaa !11
  %212 = fmul double %208, %211
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds double, ptr %213, i64 3
  %215 = load double, ptr %214, align 8, !tbaa !11
  %216 = fmul double %212, %215
  %217 = fdiv double %216, 2.000000e+00
  store double %217, ptr %7, align 8, !tbaa !11
  %218 = load double, ptr %7, align 8, !tbaa !11
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds double, ptr %219, i64 1
  %221 = load double, ptr %220, align 8, !tbaa !11
  %222 = fcmp ogt double %218, %221
  br i1 %222, label %223, label %250

223:                                              ; preds = %140
  store i32 1, ptr %5, align 4, !tbaa !9
  %224 = load ptr, ptr %4, align 8, !tbaa !5
  %225 = getelementptr inbounds double, ptr %224, i64 3
  %226 = load double, ptr %225, align 8, !tbaa !11
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = getelementptr inbounds double, ptr %227, i64 3
  %229 = load double, ptr %228, align 8, !tbaa !11
  %230 = fmul double %226, %229
  %231 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  store double %230, ptr %231, align 16, !tbaa !11
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = getelementptr inbounds double, ptr %232, i64 3
  %234 = load double, ptr %233, align 8, !tbaa !11
  %235 = call double @pow(double noundef %234, double noundef 2.000000e+00) #6
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = getelementptr inbounds double, ptr %236, i64 3
  %238 = load double, ptr %237, align 8, !tbaa !11
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = getelementptr inbounds double, ptr %239, i64 1
  %241 = load double, ptr %240, align 8, !tbaa !11
  %242 = fneg double %241
  %243 = call double @llvm.fmuladd.f64(double %235, double %238, double %242)
  %244 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  store double %243, ptr %244, align 8, !tbaa !11
  %245 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %246 = load i32, ptr %5, align 4, !tbaa !9
  %247 = call double @findRoot(ptr noundef %245, i32 noundef %246)
  %248 = load ptr, ptr %4, align 8, !tbaa !5
  %249 = getelementptr inbounds double, ptr %248, i64 2
  store double %247, ptr %249, align 8, !tbaa !11
  br label %254

250:                                              ; preds = %140
  %251 = load double, ptr %7, align 8, !tbaa !11
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = getelementptr inbounds double, ptr %252, i64 1
  store double %251, ptr %253, align 8, !tbaa !11
  br label %254

254:                                              ; preds = %250, %223
  store i32 1, ptr %5, align 4, !tbaa !9
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = getelementptr inbounds double, ptr %255, i64 2
  %257 = load double, ptr %256, align 8, !tbaa !11
  %258 = load ptr, ptr %4, align 8, !tbaa !5
  %259 = getelementptr inbounds double, ptr %258, i64 3
  %260 = load double, ptr %259, align 8, !tbaa !11
  %261 = fmul double %257, %260
  %262 = load ptr, ptr %3, align 8, !tbaa !5
  %263 = getelementptr inbounds double, ptr %262, i64 3
  %264 = load double, ptr %263, align 8, !tbaa !11
  %265 = load ptr, ptr %4, align 8, !tbaa !5
  %266 = getelementptr inbounds double, ptr %265, i64 3
  %267 = load double, ptr %266, align 8, !tbaa !11
  %268 = call double @pow(double noundef %267, double noundef 2.000000e+00) #6
  %269 = load ptr, ptr %3, align 8, !tbaa !5
  %270 = getelementptr inbounds double, ptr %269, i64 3
  %271 = load double, ptr %270, align 8, !tbaa !11
  %272 = fmul double %268, %271
  %273 = call double @llvm.fmuladd.f64(double %261, double %264, double %272)
  %274 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  store double %273, ptr %274, align 16, !tbaa !11
  %275 = load ptr, ptr %4, align 8, !tbaa !5
  %276 = getelementptr inbounds double, ptr %275, i64 2
  %277 = load double, ptr %276, align 8, !tbaa !11
  %278 = call double @pow(double noundef %277, double noundef 2.000000e+00) #6
  %279 = load ptr, ptr %4, align 8, !tbaa !5
  %280 = getelementptr inbounds double, ptr %279, i64 3
  %281 = load double, ptr %280, align 8, !tbaa !11
  %282 = fmul double %278, %281
  %283 = load ptr, ptr %3, align 8, !tbaa !5
  %284 = getelementptr inbounds double, ptr %283, i64 3
  %285 = load double, ptr %284, align 8, !tbaa !11
  %286 = load ptr, ptr %4, align 8, !tbaa !5
  %287 = getelementptr inbounds double, ptr %286, i64 2
  %288 = load double, ptr %287, align 8, !tbaa !11
  %289 = fmul double 3.000000e+00, %288
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = getelementptr inbounds double, ptr %290, i64 3
  %292 = load double, ptr %291, align 8, !tbaa !11
  %293 = call double @pow(double noundef %292, double noundef 2.000000e+00) #6
  %294 = fmul double %289, %293
  %295 = load ptr, ptr %3, align 8, !tbaa !5
  %296 = getelementptr inbounds double, ptr %295, i64 3
  %297 = load double, ptr %296, align 8, !tbaa !11
  %298 = fmul double %294, %297
  %299 = call double @llvm.fmuladd.f64(double %282, double %285, double %298)
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  %301 = getelementptr inbounds double, ptr %300, i64 3
  %302 = load double, ptr %301, align 8, !tbaa !11
  %303 = call double @pow(double noundef %302, double noundef 3.000000e+00) #6
  %304 = fmul double 2.000000e+00, %303
  %305 = load ptr, ptr %3, align 8, !tbaa !5
  %306 = getelementptr inbounds double, ptr %305, i64 3
  %307 = load double, ptr %306, align 8, !tbaa !11
  %308 = call double @llvm.fmuladd.f64(double %304, double %307, double %299)
  %309 = load ptr, ptr %3, align 8, !tbaa !5
  %310 = getelementptr inbounds double, ptr %309, i64 0
  %311 = load double, ptr %310, align 8, !tbaa !11
  %312 = fsub double %308, %311
  %313 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  store double %312, ptr %313, align 8, !tbaa !11
  %314 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %315 = load i32, ptr %5, align 4, !tbaa !9
  %316 = call double @findRoot(ptr noundef %314, i32 noundef %315)
  %317 = load ptr, ptr %4, align 8, !tbaa !5
  %318 = getelementptr inbounds double, ptr %317, i64 1
  store double %316, ptr %318, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

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

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

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

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #4

declare double @findRoot(ptr noundef, i32 noundef) #5

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { "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 #6 = { 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}


; 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: nounwind uwtable
define dso_local void @computePeriods(ptr nocapture noundef %0, ptr nocapture noundef %1) local_unnamed_addr #0 {
  %3 = alloca [4 x double], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load double, ptr %4, align 8, !tbaa !5
  %6 = fmul double %5, 2.000000e+00
  store double %6, ptr %3, align 16, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  %8 = getelementptr inbounds i8, ptr %1, i64 16
  %9 = load <2 x double>, ptr %7, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 8
  %shift = shufflevector <2 x double> %9, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %11 = fmul <2 x double> %9, %shift
  %12 = getelementptr inbounds i8, ptr %3, i64 16
  %13 = shufflevector <2 x double> %9, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %14 = shufflevector <2 x double> %13, <2 x double> <double 3.000000e+00, double poison>, <2 x i32> <i32 2, i32 0>
  %15 = fmul <2 x double> %13, %14
  %16 = insertelement <2 x double> poison, double %5, i64 0
  %17 = shufflevector <2 x double> %16, <2 x double> poison, <2 x i32> zeroinitializer
  %18 = fmul <2 x double> %17, %15
  %19 = shufflevector <2 x double> %9, <2 x double> %11, <2 x i32> <i32 0, i32 2>
  %20 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %19, <2 x double> %17, <2 x double> %18)
  store <2 x double> %20, ptr %10, align 8, !tbaa !5
  %21 = load double, ptr %0, align 8, !tbaa !5
  %22 = fneg double %21
  %23 = getelementptr inbounds i8, ptr %3, i64 24
  store double %22, ptr %23, align 8, !tbaa !5
  %24 = call double @findRoot(ptr noundef nonnull %3, i32 noundef 3) #6
  %25 = getelementptr inbounds i8, ptr %1, i64 24
  store double %24, ptr %25, align 8, !tbaa !5
  %26 = load double, ptr %8, align 8, !tbaa !5
  %27 = fmul double %24, 2.000000e+00
  %28 = call double @llvm.fmuladd.f64(double %26, double 2.000000e+00, double %27)
  %29 = fmul double %24, %28
  %30 = load double, ptr %4, align 8, !tbaa !5
  %31 = fmul double %30, %29
  %32 = fmul double %31, 5.000000e-01
  %33 = getelementptr inbounds i8, ptr %0, i64 8
  %34 = load double, ptr %33, align 8, !tbaa !5
  %35 = fcmp ogt double %32, %34
  br i1 %35, label %36, label %40

36:                                               ; preds = %2
  store double %30, ptr %3, align 16, !tbaa !5
  %37 = fmul double %26, %30
  store double %37, ptr %10, align 8, !tbaa !5
  %38 = fneg double %34
  store double %38, ptr %12, align 16, !tbaa !5
  %39 = call double @findRoot(ptr noundef nonnull %3, i32 noundef 2) #6
  store double %39, ptr %25, align 8, !tbaa !5
  %.pre90 = load double, ptr %4, align 8, !tbaa !5
  br label %41

40:                                               ; preds = %2
  store double %32, ptr %33, align 8, !tbaa !5
  %.pre = load double, ptr %25, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %40, %36
  %42 = phi double [ %30, %40 ], [ %.pre90, %36 ]
  %43 = phi double [ %.pre, %40 ], [ %39, %36 ]
  %44 = fmul double %43, %42
  %45 = getelementptr inbounds i8, ptr %0, i64 16
  %46 = load double, ptr %45, align 8, !tbaa !5
  %47 = fcmp ogt double %44, %46
  br i1 %47, label %48, label %51

48:                                               ; preds = %41
  store double %42, ptr %3, align 16, !tbaa !5
  %49 = fneg double %46
  store double %49, ptr %10, align 8, !tbaa !5
  %50 = call double @findRoot(ptr noundef nonnull %3, i32 noundef 1) #6
  store double %50, ptr %25, align 8, !tbaa !5
  %.pre92 = load double, ptr %4, align 8, !tbaa !5
  br label %52

51:                                               ; preds = %41
  store double %44, ptr %45, align 8, !tbaa !5
  %.pre91 = load double, ptr %25, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %51, %48
  %53 = phi double [ %42, %51 ], [ %.pre92, %48 ]
  %54 = phi double [ %.pre91, %51 ], [ %50, %48 ]
  %55 = fmul double %54, %53
  store double %55, ptr %3, align 16, !tbaa !5
  %56 = load double, ptr %7, align 8, !tbaa !5
  %57 = fmul double %54, %56
  %square84 = fmul double %54, %54
  %58 = fmul double %square84, 3.000000e+00
  %59 = fmul double %53, %58
  %60 = call double @llvm.fmuladd.f64(double %57, double %53, double %59)
  store double %60, ptr %10, align 8, !tbaa !5
  %61 = fmul double %square84, %56
  %62 = call double @pow(double noundef %54, double noundef 3.000000e+00) #6
  %63 = fmul double %62, 2.000000e+00
  %64 = load double, ptr %4, align 8, !tbaa !5
  %65 = fmul double %63, %64
  %66 = call double @llvm.fmuladd.f64(double %61, double %53, double %65)
  %67 = load double, ptr %0, align 8, !tbaa !5
  %68 = fsub double %66, %67
  store double %68, ptr %12, align 16, !tbaa !5
  %69 = call double @findRoot(ptr noundef nonnull %3, i32 noundef 2) #6
  store double %69, ptr %8, align 8, !tbaa !5
  %70 = load double, ptr %25, align 8, !tbaa !5
  %71 = fmul double %70, 2.000000e+00
  %72 = call double @llvm.fmuladd.f64(double %69, double 2.000000e+00, double %71)
  %73 = fmul double %70, %72
  %74 = load double, ptr %4, align 8, !tbaa !5
  %75 = fmul double %74, %73
  %76 = fmul double %75, 5.000000e-01
  %77 = load double, ptr %33, align 8, !tbaa !5
  %78 = fcmp ogt double %76, %77
  br i1 %78, label %79, label %84

79:                                               ; preds = %52
  %80 = fmul double %70, %74
  store double %80, ptr %3, align 16, !tbaa !5
  %square86 = fmul double %70, %70
  %81 = fneg double %77
  %82 = call double @llvm.fmuladd.f64(double %square86, double %74, double %81)
  store double %82, ptr %10, align 8, !tbaa !5
  %83 = call double @findRoot(ptr noundef nonnull %3, i32 noundef 1) #6
  store double %83, ptr %8, align 8, !tbaa !5
  %.pre94 = load double, ptr %4, align 8, !tbaa !5
  br label %85

84:                                               ; preds = %52
  store double %76, ptr %33, align 8, !tbaa !5
  %.pre93 = load double, ptr %8, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %84, %79
  %86 = phi double [ %74, %84 ], [ %.pre94, %79 ]
  %87 = phi double [ %.pre93, %84 ], [ %83, %79 ]
  %88 = load double, ptr %25, align 8, !tbaa !5
  %89 = fmul double %87, %88
  %square87 = fmul double %88, %88
  %90 = fmul double %square87, %86
  %91 = call double @llvm.fmuladd.f64(double %89, double %86, double %90)
  store double %91, ptr %3, align 16, !tbaa !5
  %square88 = fmul double %87, %87
  %92 = fmul double %square88, %88
  %93 = fmul double %87, 3.000000e+00
  %94 = fmul double %93, %square87
  %95 = fmul double %86, %94
  %96 = call double @llvm.fmuladd.f64(double %92, double %86, double %95)
  %97 = call double @pow(double noundef %88, double noundef 3.000000e+00) #6
  %98 = fmul double %97, 2.000000e+00
  %99 = load double, ptr %4, align 8, !tbaa !5
  %100 = call double @llvm.fmuladd.f64(double %98, double %99, double %96)
  %101 = load double, ptr %0, align 8, !tbaa !5
  %102 = fsub double %100, %101
  store double %102, ptr %10, align 8, !tbaa !5
  %103 = call double @findRoot(ptr noundef nonnull %3, i32 noundef 1) #6
  store double %103, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  ret void
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #3

declare double @findRoot(ptr noundef, i32 noundef) local_unnamed_addr #4

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

; 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>) #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { "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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,TailCallElimPass,VectorCombinePass