; LLVM IR from OpenFAST/openfast :: modules/map/src (mapapi)

; 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.MAP_OtherStateType = type { ptr, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32 }
%struct.Domain_t = type { %struct.InnerSolveAttributes_t, %struct.OuterSolveAttributes_t, %struct.DomainOptions_t, ptr, i32, %struct.Vessel_t, %struct.list_t, %struct.list_t, %struct.list_t, %struct.list_t, ptr }
%struct.InnerSolveAttributes_t = type { ptr, double, double, double, [2 x double], [2 x double], [4 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], [2 x double], double, i32, i32, i32, i32, i32, [2 x i32], i32, i32 }
%struct.OuterSolveAttributes_t = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, double, double, i8, i8, i8, i32, i32, i32 }
%struct.DomainOptions_t = type { ptr, double, double, double, i8, i8, i32 }
%struct.Vessel_t = type { %struct.EulerAngle_t, ptr, ptr, ptr, %struct.Point_t, %struct.Point_t, %struct.Force_t }
%struct.EulerAngle_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.VarType_t = type { ptr, ptr, double, i8, i8, i32, i32 }
%struct.Point_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.Force_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }
%struct.list_t = type { ptr, ptr, ptr, i32, ptr, i32, i32, i32, ptr, %struct.list_attributes_s }
%struct.list_attributes_s = type { ptr, ptr, ptr, i32, ptr, ptr, ptr }
%struct.Line_t = type { ptr, %struct.LineOptions, %struct.VarTypePtr_t, %struct.VarTypePtr_t, %struct.VarType_t, ptr, ptr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, %struct.list_t, ptr, ptr, i32, i32, i32, i32, i32 }
%struct.LineOptions = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%struct.VarTypePtr_t = type { ptr, ptr, ptr, i8, i32, i32 }
%struct.Node_t = type { %struct.PointPtr_t, %struct.PointPtr_t, %struct.PointPtr_t, i32, %struct.ForcePtr_t, %struct.VarType_t, %struct.VarType_t, %struct.Force_t }
%struct.PointPtr_t = type { %struct.VarTypePtr_t, %struct.VarTypePtr_t, %struct.VarTypePtr_t }
%struct.ForcePtr_t = type { %struct.VarTypePtr_t, %struct.VarTypePtr_t, %struct.VarTypePtr_t }
%struct.CableLibrary_t = type { double, double, double, double, double, double, double, double, double, double, ptr }

@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

declare void @map_reset_universal_error(ptr noundef, ptr noundef) #1

declare void @set_universal_error_with_message(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) #1

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @map_plot_x_array(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #5 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %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 double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.MAP_OtherStateType, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  store ptr %29, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store double 0.000000e+00, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store double 0.000000e+00, ptr %14, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store double 0.000000e+00, ptr %15, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store double 0.000000e+00, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store double 0.000000e+00, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store double 0.000000e+00, ptr %18, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store double 0.000000e+00, ptr %19, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store double 0.000000e+00, ptr %20, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  store double 0.000000e+00, ptr %21, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store double 0.000000e+00, ptr %22, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  store double 0.000000e+00, ptr %23, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store double 0.000000e+00, ptr %24, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store ptr null, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 0, ptr %26, align 4, !tbaa !9
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  call void @map_reset_universal_error(ptr noundef %30, ptr noundef %31)
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.Domain_t, ptr %32, i32 0, i32 7
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = call ptr @list_get_at(ptr noundef %33, i32 noundef %34)
  store ptr %35, ptr %12, align 8, !tbaa !5
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %42

38:                                               ; preds = %5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load i32, ptr %7, align 4, !tbaa !9
  call void (ptr, ptr, i32, ptr, ...) @set_universal_error_with_message(ptr noundef %39, ptr noundef %40, i32 noundef 42, ptr noundef @.str.9, i32 noundef %41)
  br label %441

42:                                               ; preds = %5
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.Line_t, ptr %43, i32 0, i32 1
  %45 = getelementptr inbounds %struct.LineOptions, ptr %44, i32 0, i32 25
  %46 = load i8, ptr %45, align 1, !tbaa !15, !range !23, !noundef !24
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %95

48:                                               ; preds = %42
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.Line_t, ptr %49, i32 0, i32 27
  %51 = load ptr, ptr %50, align 8, !tbaa !25
  %52 = getelementptr inbounds %struct.Node_t, ptr %51, i32 0, i32 2
  %53 = getelementptr inbounds %struct.PointPtr_t, ptr %52, i32 0, i32 0
  %54 = getelementptr inbounds %struct.VarTypePtr_t, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %54, align 8, !tbaa !26
  %56 = load double, ptr %55, align 8, !tbaa !13
  store double %56, ptr %21, align 8, !tbaa !13
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.Line_t, ptr %57, i32 0, i32 26
  %59 = load ptr, ptr %58, align 8, !tbaa !31
  %60 = getelementptr inbounds %struct.Node_t, ptr %59, i32 0, i32 2
  %61 = getelementptr inbounds %struct.PointPtr_t, ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds %struct.VarTypePtr_t, ptr %61, i32 0, i32 2
  %63 = load ptr, ptr %62, align 8, !tbaa !26
  %64 = load double, ptr %63, align 8, !tbaa !13
  store double %64, ptr %22, align 8, !tbaa !13
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = mul i64 %66, 8
  %68 = call noalias ptr @malloc(i64 noundef %67) #7
  store ptr %68, ptr %25, align 8, !tbaa !5
  %69 = load double, ptr %21, align 8, !tbaa !13
  %70 = load double, ptr %22, align 8, !tbaa !13
  %71 = fsub double %69, %70
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = sub nsw i32 %72, 1
  %74 = sitofp i32 %73 to double
  %75 = fdiv double %71, %74
  store double %75, ptr %20, align 8, !tbaa !13
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %91, %48
  %77 = load i32, ptr %26, align 4, !tbaa !9
  %78 = load i32, ptr %8, align 4, !tbaa !9
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %80, label %94

80:                                               ; preds = %76
  %81 = load double, ptr %21, align 8, !tbaa !13
  %82 = load double, ptr %19, align 8, !tbaa !13
  %83 = fsub double %81, %82
  %84 = load ptr, ptr %25, align 8, !tbaa !5
  %85 = load i32, ptr %26, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %84, i64 %86
  store double %83, ptr %87, align 8, !tbaa !13
  %88 = load double, ptr %20, align 8, !tbaa !13
  %89 = load double, ptr %19, align 8, !tbaa !13
  %90 = fadd double %89, %88
  store double %90, ptr %19, align 8, !tbaa !13
  br label %91

91:                                               ; preds = %80
  %92 = load i32, ptr %26, align 4, !tbaa !9
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %26, align 4, !tbaa !9
  br label %76, !llvm.loop !32

94:                                               ; preds = %76
  br label %440

95:                                               ; preds = %42
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.Line_t, ptr %96, i32 0, i32 27
  %98 = load ptr, ptr %97, align 8, !tbaa !25
  %99 = getelementptr inbounds %struct.Node_t, ptr %98, i32 0, i32 2
  %100 = getelementptr inbounds %struct.PointPtr_t, ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds %struct.VarTypePtr_t, ptr %100, i32 0, i32 2
  %102 = load ptr, ptr %101, align 8, !tbaa !26
  %103 = load double, ptr %102, align 8, !tbaa !13
  store double %103, ptr %21, align 8, !tbaa !13
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.Line_t, ptr %104, i32 0, i32 26
  %106 = load ptr, ptr %105, align 8, !tbaa !31
  %107 = getelementptr inbounds %struct.Node_t, ptr %106, i32 0, i32 2
  %108 = getelementptr inbounds %struct.PointPtr_t, ptr %107, i32 0, i32 0
  %109 = getelementptr inbounds %struct.VarTypePtr_t, ptr %108, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !26
  %111 = load double, ptr %110, align 8, !tbaa !13
  store double %111, ptr %22, align 8, !tbaa !13
  %112 = load i32, ptr %8, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = mul i64 %113, 8
  %115 = call noalias ptr @malloc(i64 noundef %114) #7
  store ptr %115, ptr %25, align 8, !tbaa !5
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.Line_t, ptr %116, i32 0, i32 2
  %118 = getelementptr inbounds %struct.VarTypePtr_t, ptr %117, i32 0, i32 2
  %119 = load ptr, ptr %118, align 8, !tbaa !34
  %120 = load double, ptr %119, align 8, !tbaa !13
  store double %120, ptr %13, align 8, !tbaa !13
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.Line_t, ptr %121, i32 0, i32 3
  %123 = getelementptr inbounds %struct.VarTypePtr_t, ptr %122, i32 0, i32 2
  %124 = load ptr, ptr %123, align 8, !tbaa !35
  %125 = load double, ptr %124, align 8, !tbaa !13
  store double %125, ptr %14, align 8, !tbaa !13
  %126 = load ptr, ptr %12, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.Line_t, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !36
  %129 = getelementptr inbounds %struct.CableLibrary_t, ptr %128, i32 0, i32 2
  %130 = load double, ptr %129, align 8, !tbaa !37
  store double %130, ptr %15, align 8, !tbaa !13
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.Line_t, ptr %131, i32 0, i32 4
  %133 = getelementptr inbounds %struct.VarType_t, ptr %132, i32 0, i32 2
  %134 = load double, ptr %133, align 8, !tbaa !39
  store double %134, ptr %16, align 8, !tbaa !13
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.Line_t, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !36
  %138 = getelementptr inbounds %struct.CableLibrary_t, ptr %137, i32 0, i32 3
  %139 = load double, ptr %138, align 8, !tbaa !40
  store double %139, ptr %18, align 8, !tbaa !13
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.Line_t, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !36
  %143 = getelementptr inbounds %struct.CableLibrary_t, ptr %142, i32 0, i32 5
  %144 = load double, ptr %143, align 8, !tbaa !41
  store double %144, ptr %23, align 8, !tbaa !13
  %145 = load double, ptr %16, align 8, !tbaa !13
  %146 = load i32, ptr %8, align 4, !tbaa !9
  %147 = sub nsw i32 %146, 1
  %148 = sitofp i32 %147 to double
  %149 = fdiv double %145, %148
  store double %149, ptr %20, align 8, !tbaa !13
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.Line_t, ptr %150, i32 0, i32 1
  %152 = getelementptr inbounds %struct.LineOptions, ptr %151, i32 0, i32 21
  %153 = load i8, ptr %152, align 1, !tbaa !42, !range !23, !noundef !24
  %154 = trunc i8 %153 to i1
  %155 = zext i1 %154 to i32
  %156 = icmp eq i32 %155, 1
  br i1 %156, label %167, label %157

157:                                              ; preds = %95
  %158 = load double, ptr %18, align 8, !tbaa !13
  %159 = fcmp olt double %158, 0.000000e+00
  br i1 %159, label %167, label %160

160:                                              ; preds = %157
  %161 = load double, ptr %14, align 8, !tbaa !13
  %162 = load double, ptr %18, align 8, !tbaa !13
  %163 = load double, ptr %16, align 8, !tbaa !13
  %164 = fneg double %162
  %165 = call double @llvm.fmuladd.f64(double %164, double %163, double %161)
  %166 = fcmp ogt double %165, 0.000000e+00
  br i1 %166, label %167, label %246

167:                                              ; preds = %160, %157, %95
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %168

168:                                              ; preds = %242, %167
  %169 = load i32, ptr %26, align 4, !tbaa !9
  %170 = load i32, ptr %8, align 4, !tbaa !9
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %172, label %245

172:                                              ; preds = %168
  %173 = load double, ptr %21, align 8, !tbaa !13
  %174 = load double, ptr %13, align 8, !tbaa !13
  %175 = load double, ptr %18, align 8, !tbaa !13
  %176 = fdiv double %174, %175
  %177 = load double, ptr %14, align 8, !tbaa !13
  %178 = load double, ptr %13, align 8, !tbaa !13
  %179 = fdiv double %177, %178
  %180 = load double, ptr %14, align 8, !tbaa !13
  %181 = load double, ptr %13, align 8, !tbaa !13
  %182 = fdiv double %180, %181
  %183 = load double, ptr %14, align 8, !tbaa !13
  %184 = fmul double %182, %183
  %185 = load double, ptr %13, align 8, !tbaa !13
  %186 = fdiv double %184, %185
  %187 = fadd double 1.000000e+00, %186
  %188 = call double @sqrt(double noundef %187) #6
  %189 = fadd double %179, %188
  %190 = call double @log(double noundef %189) #6
  %191 = load double, ptr %13, align 8, !tbaa !13
  %192 = load double, ptr %18, align 8, !tbaa !13
  %193 = fdiv double %191, %192
  %194 = load double, ptr %14, align 8, !tbaa !13
  %195 = load double, ptr %19, align 8, !tbaa !13
  %196 = load double, ptr %18, align 8, !tbaa !13
  %197 = fneg double %195
  %198 = call double @llvm.fmuladd.f64(double %197, double %196, double %194)
  %199 = load double, ptr %13, align 8, !tbaa !13
  %200 = fdiv double %198, %199
  %201 = load double, ptr %14, align 8, !tbaa !13
  %202 = load double, ptr %19, align 8, !tbaa !13
  %203 = load double, ptr %18, align 8, !tbaa !13
  %204 = fneg double %202
  %205 = call double @llvm.fmuladd.f64(double %204, double %203, double %201)
  %206 = load double, ptr %13, align 8, !tbaa !13
  %207 = fdiv double %205, %206
  %208 = load double, ptr %14, align 8, !tbaa !13
  %209 = load double, ptr %19, align 8, !tbaa !13
  %210 = load double, ptr %18, align 8, !tbaa !13
  %211 = fneg double %209
  %212 = call double @llvm.fmuladd.f64(double %211, double %210, double %208)
  %213 = fmul double %207, %212
  %214 = load double, ptr %13, align 8, !tbaa !13
  %215 = fdiv double %213, %214
  %216 = fadd double 1.000000e+00, %215
  %217 = call double @sqrt(double noundef %216) #6
  %218 = fadd double %200, %217
  %219 = call double @log(double noundef %218) #6
  %220 = fmul double %193, %219
  %221 = fneg double %220
  %222 = call double @llvm.fmuladd.f64(double %176, double %190, double %221)
  %223 = load double, ptr %13, align 8, !tbaa !13
  %224 = load double, ptr %19, align 8, !tbaa !13
  %225 = fmul double %223, %224
  %226 = load double, ptr %15, align 8, !tbaa !13
  %227 = fdiv double %225, %226
  %228 = fadd double %222, %227
  %229 = load ptr, ptr %12, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.Line_t, ptr %229, i32 0, i32 7
  %231 = load double, ptr %230, align 8, !tbaa !43
  %232 = call double @cos(double noundef %231) #6
  %233 = fneg double %228
  %234 = call double @llvm.fmuladd.f64(double %233, double %232, double %173)
  %235 = load ptr, ptr %25, align 8, !tbaa !5
  %236 = load i32, ptr %26, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds double, ptr %235, i64 %237
  store double %234, ptr %238, align 8, !tbaa !13
  %239 = load double, ptr %20, align 8, !tbaa !13
  %240 = load double, ptr %19, align 8, !tbaa !13
  %241 = fadd double %240, %239
  store double %241, ptr %19, align 8, !tbaa !13
  br label %242

242:                                              ; preds = %172
  %243 = load i32, ptr %26, align 4, !tbaa !9
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %26, align 4, !tbaa !9
  br label %168, !llvm.loop !44

245:                                              ; preds = %168
  br label %439

246:                                              ; preds = %160
  %247 = load double, ptr %16, align 8, !tbaa !13
  %248 = load double, ptr %14, align 8, !tbaa !13
  %249 = load double, ptr %18, align 8, !tbaa !13
  %250 = fdiv double %248, %249
  %251 = fsub double %247, %250
  store double %251, ptr %17, align 8, !tbaa !13
  %252 = load double, ptr %17, align 8, !tbaa !13
  %253 = load double, ptr %13, align 8, !tbaa !13
  %254 = load double, ptr %23, align 8, !tbaa !13
  %255 = load double, ptr %18, align 8, !tbaa !13
  %256 = fmul double %254, %255
  %257 = fdiv double %253, %256
  %258 = fsub double %252, %257
  %259 = fcmp ogt double %258, 0.000000e+00
  br i1 %259, label %260, label %268

260:                                              ; preds = %246
  %261 = load double, ptr %17, align 8, !tbaa !13
  %262 = load double, ptr %13, align 8, !tbaa !13
  %263 = load double, ptr %23, align 8, !tbaa !13
  %264 = load double, ptr %18, align 8, !tbaa !13
  %265 = fmul double %263, %264
  %266 = fdiv double %262, %265
  %267 = fsub double %261, %266
  br label %269

268:                                              ; preds = %246
  br label %269

269:                                              ; preds = %268, %260
  %270 = phi double [ %267, %260 ], [ 0.000000e+00, %268 ]
  store double %270, ptr %24, align 8, !tbaa !13
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %271

271:                                              ; preds = %435, %269
  %272 = load i32, ptr %26, align 4, !tbaa !9
  %273 = load i32, ptr %8, align 4, !tbaa !9
  %274 = icmp slt i32 %272, %273
  br i1 %274, label %275, label %438

275:                                              ; preds = %271
  %276 = load double, ptr %19, align 8, !tbaa !13
  %277 = fcmp ole double 0.000000e+00, %276
  br i1 %277, label %278, label %300

278:                                              ; preds = %275
  %279 = load double, ptr %19, align 8, !tbaa !13
  %280 = load double, ptr %17, align 8, !tbaa !13
  %281 = load double, ptr %13, align 8, !tbaa !13
  %282 = load double, ptr %23, align 8, !tbaa !13
  %283 = load double, ptr %18, align 8, !tbaa !13
  %284 = fmul double %282, %283
  %285 = fdiv double %281, %284
  %286 = fsub double %280, %285
  %287 = fcmp ole double %279, %286
  br i1 %287, label %288, label %300

288:                                              ; preds = %278
  %289 = load double, ptr %19, align 8, !tbaa !13
  %290 = load ptr, ptr %12, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.Line_t, ptr %290, i32 0, i32 7
  %292 = load double, ptr %291, align 8, !tbaa !43
  %293 = call double @cos(double noundef %292) #6
  %294 = load double, ptr %22, align 8, !tbaa !13
  %295 = call double @llvm.fmuladd.f64(double %289, double %293, double %294)
  %296 = load ptr, ptr %25, align 8, !tbaa !5
  %297 = load i32, ptr %26, align 4, !tbaa !9
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds double, ptr %296, i64 %298
  store double %295, ptr %299, align 8, !tbaa !13
  br label %431

300:                                              ; preds = %278, %275
  %301 = load double, ptr %17, align 8, !tbaa !13
  %302 = load double, ptr %13, align 8, !tbaa !13
  %303 = load double, ptr %23, align 8, !tbaa !13
  %304 = load double, ptr %18, align 8, !tbaa !13
  %305 = fdiv double %303, %304
  %306 = fdiv double %302, %305
  %307 = fsub double %301, %306
  %308 = load double, ptr %19, align 8, !tbaa !13
  %309 = fcmp olt double %307, %308
  br i1 %309, label %310, label %356

310:                                              ; preds = %300
  %311 = load double, ptr %19, align 8, !tbaa !13
  %312 = load double, ptr %17, align 8, !tbaa !13
  %313 = fcmp ole double %311, %312
  br i1 %313, label %314, label %356

314:                                              ; preds = %310
  %315 = load double, ptr %19, align 8, !tbaa !13
  %316 = load double, ptr %23, align 8, !tbaa !13
  %317 = load double, ptr %18, align 8, !tbaa !13
  %318 = fmul double %316, %317
  %319 = load double, ptr %15, align 8, !tbaa !13
  %320 = fmul double 2.000000e+00, %319
  %321 = fdiv double %318, %320
  %322 = load double, ptr %19, align 8, !tbaa !13
  %323 = load double, ptr %19, align 8, !tbaa !13
  %324 = load double, ptr %17, align 8, !tbaa !13
  %325 = load double, ptr %13, align 8, !tbaa !13
  %326 = load double, ptr %23, align 8, !tbaa !13
  %327 = load double, ptr %18, align 8, !tbaa !13
  %328 = fmul double %326, %327
  %329 = fdiv double %325, %328
  %330 = fsub double %324, %329
  %331 = fmul double 2.000000e+00, %330
  %332 = load double, ptr %19, align 8, !tbaa !13
  %333 = fmul double %331, %332
  %334 = fneg double %333
  %335 = call double @llvm.fmuladd.f64(double %322, double %323, double %334)
  %336 = load double, ptr %17, align 8, !tbaa !13
  %337 = load double, ptr %13, align 8, !tbaa !13
  %338 = load double, ptr %23, align 8, !tbaa !13
  %339 = load double, ptr %18, align 8, !tbaa !13
  %340 = fmul double %338, %339
  %341 = fdiv double %337, %340
  %342 = fsub double %336, %341
  %343 = load double, ptr %24, align 8, !tbaa !13
  %344 = call double @llvm.fmuladd.f64(double %342, double %343, double %335)
  %345 = call double @llvm.fmuladd.f64(double %321, double %344, double %315)
  %346 = load ptr, ptr %12, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.Line_t, ptr %346, i32 0, i32 7
  %348 = load double, ptr %347, align 8, !tbaa !43
  %349 = call double @cos(double noundef %348) #6
  %350 = load double, ptr %22, align 8, !tbaa !13
  %351 = call double @llvm.fmuladd.f64(double %345, double %349, double %350)
  %352 = load ptr, ptr %25, align 8, !tbaa !5
  %353 = load i32, ptr %26, align 4, !tbaa !9
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds double, ptr %352, i64 %354
  store double %351, ptr %355, align 8, !tbaa !13
  br label %430

356:                                              ; preds = %310, %300
  %357 = load double, ptr %17, align 8, !tbaa !13
  %358 = load double, ptr %13, align 8, !tbaa !13
  %359 = load double, ptr %18, align 8, !tbaa !13
  %360 = fdiv double %358, %359
  %361 = load double, ptr %18, align 8, !tbaa !13
  %362 = load double, ptr %19, align 8, !tbaa !13
  %363 = load double, ptr %17, align 8, !tbaa !13
  %364 = fsub double %362, %363
  %365 = fmul double %361, %364
  %366 = load double, ptr %13, align 8, !tbaa !13
  %367 = fdiv double %365, %366
  %368 = load double, ptr %18, align 8, !tbaa !13
  %369 = load double, ptr %19, align 8, !tbaa !13
  %370 = load double, ptr %17, align 8, !tbaa !13
  %371 = fsub double %369, %370
  %372 = fmul double %368, %371
  %373 = load double, ptr %13, align 8, !tbaa !13
  %374 = fdiv double %372, %373
  %375 = load double, ptr %18, align 8, !tbaa !13
  %376 = load double, ptr %19, align 8, !tbaa !13
  %377 = load double, ptr %17, align 8, !tbaa !13
  %378 = fsub double %376, %377
  %379 = fmul double %375, %378
  %380 = fmul double %374, %379
  %381 = load double, ptr %13, align 8, !tbaa !13
  %382 = fdiv double %380, %381
  %383 = fadd double 1.000000e+00, %382
  %384 = call double @sqrt(double noundef %383) #6
  %385 = fadd double %367, %384
  %386 = call double @log(double noundef %385) #6
  %387 = call double @llvm.fmuladd.f64(double %360, double %386, double %357)
  %388 = load ptr, ptr %12, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct.Line_t, ptr %388, i32 0, i32 7
  %390 = load double, ptr %389, align 8, !tbaa !43
  %391 = call double @cos(double noundef %390) #6
  %392 = load double, ptr %13, align 8, !tbaa !13
  %393 = load double, ptr %19, align 8, !tbaa !13
  %394 = fmul double %392, %393
  %395 = load double, ptr %15, align 8, !tbaa !13
  %396 = fdiv double %394, %395
  %397 = load double, ptr %23, align 8, !tbaa !13
  %398 = load double, ptr %18, align 8, !tbaa !13
  %399 = fmul double %397, %398
  %400 = load double, ptr %15, align 8, !tbaa !13
  %401 = fmul double 2.000000e+00, %400
  %402 = fdiv double %399, %401
  %403 = load double, ptr %17, align 8, !tbaa !13
  %404 = fneg double %403
  %405 = load double, ptr %17, align 8, !tbaa !13
  %406 = load double, ptr %17, align 8, !tbaa !13
  %407 = load double, ptr %13, align 8, !tbaa !13
  %408 = load double, ptr %23, align 8, !tbaa !13
  %409 = load double, ptr %18, align 8, !tbaa !13
  %410 = fmul double %408, %409
  %411 = fdiv double %407, %410
  %412 = fsub double %406, %411
  %413 = load double, ptr %24, align 8, !tbaa !13
  %414 = fmul double %412, %413
  %415 = call double @llvm.fmuladd.f64(double %404, double %405, double %414)
  %416 = call double @llvm.fmuladd.f64(double %402, double %415, double %396)
  %417 = load ptr, ptr %12, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct.Line_t, ptr %417, i32 0, i32 7
  %419 = load double, ptr %418, align 8, !tbaa !43
  %420 = call double @cos(double noundef %419) #6
  %421 = fmul double %416, %420
  %422 = fneg double %421
  %423 = call double @llvm.fmuladd.f64(double %387, double %391, double %422)
  %424 = load double, ptr %22, align 8, !tbaa !13
  %425 = fadd double %423, %424
  %426 = load ptr, ptr %25, align 8, !tbaa !5
  %427 = load i32, ptr %26, align 4, !tbaa !9
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds double, ptr %426, i64 %428
  store double %425, ptr %429, align 8, !tbaa !13
  br label %430

430:                                              ; preds = %356, %314
  br label %431

431:                                              ; preds = %430, %288
  %432 = load double, ptr %20, align 8, !tbaa !13
  %433 = load double, ptr %19, align 8, !tbaa !13
  %434 = fadd double %433, %432
  store double %434, ptr %19, align 8, !tbaa !13
  br label %435

435:                                              ; preds = %431
  %436 = load i32, ptr %26, align 4, !tbaa !9
  %437 = add nsw i32 %436, 1
  store i32 %437, ptr %26, align 4, !tbaa !9
  br label %271, !llvm.loop !45

438:                                              ; preds = %271
  br label %439

439:                                              ; preds = %438, %245
  br label %440

440:                                              ; preds = %439, %94
  br label %441

441:                                              ; preds = %440, %38
  %442 = load ptr, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret ptr %442
}

declare ptr @list_get_at(ptr noundef, i32 noundef) #1

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind allocsize(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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 0}
!12 = !{!"MAP_OtherStateType", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48, !6, i64 56, !10, i64 64, !6, i64 72, !10, i64 80, !6, i64 88, !10, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !10, i64 128, !6, i64 136, !10, i64 144, !6, i64 152, !10, i64 160, !6, i64 168, !10, i64 176, !6, i64 184, !10, i64 192, !6, i64 200, !10, i64 208, !6, i64 216, !10, i64 224, !6, i64 232, !10, i64 240, !6, i64 248, !10, i64 256}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !18, i64 33}
!16 = !{!"Line_t", !6, i64 0, !17, i64 8, !19, i64 40, !19, i64 80, !20, i64 120, !6, i64 160, !6, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224, !14, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !14, i64 264, !14, i64 272, !14, i64 280, !14, i64 288, !14, i64 296, !14, i64 304, !14, i64 312, !21, i64 320, !6, i64 440, !6, i64 448, !10, i64 456, !10, i64 460, !10, i64 464, !10, i64 468, !10, i64 472}
!17 = !{!"", !18, i64 0, !18, i64 1, !18, i64 2, !18, i64 3, !18, i64 4, !18, i64 5, !18, i64 6, !18, i64 7, !18, i64 8, !18, i64 9, !18, i64 10, !18, i64 11, !18, i64 12, !18, i64 13, !18, i64 14, !18, i64 15, !18, i64 16, !18, i64 17, !18, i64 18, !18, i64 19, !18, i64 20, !18, i64 21, !18, i64 22, !18, i64 23, !18, i64 24, !18, i64 25}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!"VarTypePtr_t", !6, i64 0, !6, i64 8, !6, i64 16, !18, i64 24, !10, i64 28, !10, i64 32}
!20 = !{!"VarType_t", !6, i64 0, !6, i64 8, !14, i64 16, !18, i64 24, !18, i64 25, !10, i64 28, !10, i64 32}
!21 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !6, i64 56, !22, i64 64}
!22 = !{!"list_attributes_s", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!16, !6, i64 448}
!26 = !{!27, !6, i64 256}
!27 = !{!"Node_t", !28, i64 0, !28, i64 120, !28, i64 240, !10, i64 360, !29, i64 368, !20, i64 488, !20, i64 528, !30, i64 568}
!28 = !{!"PointPtr_t", !19, i64 0, !19, i64 40, !19, i64 80}
!29 = !{!"ForcePtr_t", !19, i64 0, !19, i64 40, !19, i64 80}
!30 = !{!"Force_t", !20, i64 0, !20, i64 40, !20, i64 80}
!31 = !{!16, !6, i64 440}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!16, !6, i64 56}
!35 = !{!16, !6, i64 96}
!36 = !{!16, !6, i64 0}
!37 = !{!38, !14, i64 16}
!38 = !{!"CableLibrary_t", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !6, i64 80}
!39 = !{!16, !14, i64 136}
!40 = !{!38, !14, i64 24}
!41 = !{!38, !14, i64 40}
!42 = !{!16, !18, i64 29}
!43 = !{!16, !14, i64 176}
!44 = distinct !{!44, !33}
!45 = distinct !{!45, !33}


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

@.str.9 = external hidden unnamed_addr constant [25 x i8], align 1

declare void @map_reset_universal_error(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @set_universal_error_with_message(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @map_plot_x_array(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #4 {
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  tail call void @map_reset_universal_error(ptr noundef %3, ptr noundef %4) #5
  %7 = getelementptr inbounds i8, ptr %6, i64 1088
  %8 = tail call ptr @list_get_at(ptr noundef nonnull %7, i32 noundef %1) #5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %5
  tail call void (ptr, ptr, i32, ptr, ...) @set_universal_error_with_message(ptr noundef %3, ptr noundef %4, i32 noundef 42, ptr noundef nonnull @.str.9, i32 noundef %1) #5
  br label %.loopexit

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %8, i64 33
  %13 = load i8, ptr %12, align 1, !tbaa !11, !range !20, !noundef !21
  %14 = trunc nuw i8 %13 to i1
  %15 = getelementptr inbounds i8, ptr %8, i64 448
  %16 = load ptr, ptr %15, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %16, i64 256
  %18 = load ptr, ptr %17, align 8, !tbaa !23
  %19 = load double, ptr %18, align 8, !tbaa !28
  %20 = getelementptr inbounds i8, ptr %8, i64 440
  %21 = load ptr, ptr %20, align 8, !tbaa !29
  %22 = getelementptr inbounds i8, ptr %21, i64 256
  %23 = load ptr, ptr %22, align 8, !tbaa !23
  %24 = load double, ptr %23, align 8, !tbaa !28
  %25 = sext i32 %2 to i64
  %26 = shl nsw i64 %25, 3
  %27 = tail call noalias ptr @malloc(i64 noundef %26) #6
  br i1 %14, label %28, label %47

28:                                               ; preds = %11
  %29 = fsub double %19, %24
  %30 = add nsw i32 %2, -1
  %31 = sitofp i32 %30 to double
  %32 = fdiv double %29, %31
  %33 = icmp sgt i32 %2, 0
  br i1 %33, label %.lr.ph181.preheader, label %.loopexit

.lr.ph181.preheader:                              ; preds = %28
  %wide.trip.count193 = zext nneg i32 %2 to i64
  %xtraiter = and i64 %wide.trip.count193, 3
  %34 = icmp ult i32 %2, 4
  br i1 %34, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph181.preheader.new

.lr.ph181.preheader.new:                          ; preds = %.lr.ph181.preheader
  %unroll_iter = and i64 %wide.trip.count193, 2147483644
  br label %.lr.ph181

.lr.ph181:                                        ; preds = %.lr.ph181, %.lr.ph181.preheader.new
  %indvars.iv190 = phi i64 [ 0, %.lr.ph181.preheader.new ], [ %indvars.iv.next191.3, %.lr.ph181 ]
  %.0164179 = phi double [ 0.000000e+00, %.lr.ph181.preheader.new ], [ %46, %.lr.ph181 ]
  %niter = phi i64 [ 0, %.lr.ph181.preheader.new ], [ %niter.next.3, %.lr.ph181 ]
  %35 = fsub double %19, %.0164179
  %36 = getelementptr inbounds double, ptr %27, i64 %indvars.iv190
  store double %35, ptr %36, align 8, !tbaa !28
  %37 = fadd double %32, %.0164179
  %indvars.iv.next191 = or disjoint i64 %indvars.iv190, 1
  %38 = fsub double %19, %37
  %39 = getelementptr inbounds double, ptr %27, i64 %indvars.iv.next191
  store double %38, ptr %39, align 8, !tbaa !28
  %40 = fadd double %32, %37
  %indvars.iv.next191.1 = or disjoint i64 %indvars.iv190, 2
  %41 = fsub double %19, %40
  %42 = getelementptr inbounds double, ptr %27, i64 %indvars.iv.next191.1
  store double %41, ptr %42, align 8, !tbaa !28
  %43 = fadd double %32, %40
  %indvars.iv.next191.2 = or disjoint i64 %indvars.iv190, 3
  %44 = fsub double %19, %43
  %45 = getelementptr inbounds double, ptr %27, i64 %indvars.iv.next191.2
  store double %44, ptr %45, align 8, !tbaa !28
  %46 = fadd double %32, %43
  %indvars.iv.next191.3 = add nuw nsw i64 %indvars.iv190, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph181, !llvm.loop !30

47:                                               ; preds = %11
  %48 = getelementptr inbounds i8, ptr %8, i64 56
  %49 = load ptr, ptr %48, align 8, !tbaa !32
  %50 = load double, ptr %49, align 8, !tbaa !28
  %51 = getelementptr inbounds i8, ptr %8, i64 96
  %52 = load ptr, ptr %51, align 8, !tbaa !33
  %53 = load double, ptr %52, align 8, !tbaa !28
  %54 = load ptr, ptr %8, align 8, !tbaa !34
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = load double, ptr %55, align 8, !tbaa !35
  %57 = getelementptr inbounds i8, ptr %8, i64 136
  %58 = load double, ptr %57, align 8, !tbaa !37
  %59 = getelementptr inbounds i8, ptr %54, i64 24
  %60 = load double, ptr %59, align 8, !tbaa !38
  %61 = getelementptr inbounds i8, ptr %54, i64 40
  %62 = load double, ptr %61, align 8, !tbaa !39
  %63 = add nsw i32 %2, -1
  %64 = sitofp i32 %63 to double
  %65 = fdiv double %58, %64
  %66 = getelementptr inbounds i8, ptr %8, i64 29
  %67 = load i8, ptr %66, align 1, !tbaa !40, !range !20, !noundef !21
  %68 = trunc nuw i8 %67 to i1
  %69 = fcmp olt double %60, 0.000000e+00
  %or.cond = select i1 %68, i1 true, i1 %69
  br i1 %or.cond, label %74, label %70

70:                                               ; preds = %47
  %71 = fneg double %60
  %72 = tail call double @llvm.fmuladd.f64(double %71, double %58, double %53)
  %73 = fcmp ogt double %72, 0.000000e+00
  br i1 %73, label %74, label %107

74:                                               ; preds = %70, %47
  %75 = icmp sgt i32 %2, 0
  br i1 %75, label %.lr.ph178, label %.loopexit

.lr.ph178:                                        ; preds = %74
  %76 = fdiv double %50, %60
  %77 = fdiv double %53, %50
  %78 = fmul double %53, %77
  %79 = fdiv double %78, %50
  %80 = fadd double %79, 1.000000e+00
  %81 = fneg double %76
  %82 = getelementptr inbounds i8, ptr %8, i64 176
  %wide.trip.count188 = zext nneg i32 %2 to i64
  br label %83

83:                                               ; preds = %.lr.ph178, %83
  %indvars.iv185 = phi i64 [ 0, %.lr.ph178 ], [ %indvars.iv.next186, %83 ]
  %.1165176 = phi double [ 0.000000e+00, %.lr.ph178 ], [ %106, %83 ]
  %84 = tail call double @sqrt(double noundef %80) #5
  %85 = fadd double %77, %84
  %86 = tail call double @log(double noundef %85) #5
  %87 = fneg double %.1165176
  %88 = tail call double @llvm.fmuladd.f64(double %87, double %60, double %53)
  %89 = fdiv double %88, %50
  %90 = fmul double %88, %89
  %91 = fdiv double %90, %50
  %92 = fadd double %91, 1.000000e+00
  %93 = tail call double @sqrt(double noundef %92) #5
  %94 = fadd double %89, %93
  %95 = tail call double @log(double noundef %94) #5
  %96 = fmul double %95, %81
  %97 = tail call double @llvm.fmuladd.f64(double %76, double %86, double %96)
  %98 = fmul double %50, %.1165176
  %99 = fdiv double %98, %56
  %100 = fadd double %99, %97
  %101 = load double, ptr %82, align 8, !tbaa !41
  %102 = tail call double @cos(double noundef %101) #5
  %103 = fneg double %100
  %104 = tail call double @llvm.fmuladd.f64(double %103, double %102, double %19)
  %105 = getelementptr inbounds double, ptr %27, i64 %indvars.iv185
  store double %104, ptr %105, align 8, !tbaa !28
  %106 = fadd double %65, %.1165176
  %indvars.iv.next186 = add nuw nsw i64 %indvars.iv185, 1
  %exitcond189.not = icmp eq i64 %indvars.iv.next186, %wide.trip.count188
  br i1 %exitcond189.not, label %.loopexit, label %83, !llvm.loop !42

107:                                              ; preds = %70
  %108 = fdiv double %53, %60
  %109 = fsub double %58, %108
  %110 = fmul double %60, %62
  %111 = fdiv double %50, %110
  %112 = fsub double %109, %111
  %113 = fcmp ogt double %112, 0.000000e+00
  %114 = select i1 %113, double %112, double 0.000000e+00
  %115 = icmp sgt i32 %2, 0
  br i1 %115, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %107
  %116 = getelementptr inbounds i8, ptr %8, i64 176
  %117 = fdiv double %62, %60
  %118 = fdiv double %50, %117
  %119 = fsub double %109, %118
  %120 = fmul double %56, 2.000000e+00
  %121 = fdiv double %110, %120
  %122 = fmul double %112, -2.000000e+00
  %123 = fdiv double %50, %60
  %124 = fneg double %109
  %125 = fmul double %112, %114
  %126 = tail call double @llvm.fmuladd.f64(double %124, double %109, double %125)
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %127

127:                                              ; preds = %.lr.ph, %167
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %167 ]
  %.2166174 = phi double [ 0.000000e+00, %.lr.ph ], [ %169, %167 ]
  %128 = fcmp ult double %.2166174, 0.000000e+00
  %129 = fcmp ugt double %.2166174, %112
  %or.cond170 = select i1 %128, i1 true, i1 %129
  br i1 %or.cond170, label %134, label %130

130:                                              ; preds = %127
  %131 = load double, ptr %116, align 8, !tbaa !41
  %132 = tail call double @cos(double noundef %131) #5
  %133 = tail call double @llvm.fmuladd.f64(double %.2166174, double %132, double %24)
  br label %167

134:                                              ; preds = %127
  %135 = fcmp uge double %119, %.2166174
  %136 = fcmp ugt double %.2166174, %109
  %or.cond171 = or i1 %135, %136
  br i1 %or.cond171, label %145, label %137

137:                                              ; preds = %134
  %138 = fmul double %122, %.2166174
  %139 = tail call double @llvm.fmuladd.f64(double %.2166174, double %.2166174, double %138)
  %140 = tail call double @llvm.fmuladd.f64(double %112, double %114, double %139)
  %141 = tail call double @llvm.fmuladd.f64(double %121, double %140, double %.2166174)
  %142 = load double, ptr %116, align 8, !tbaa !41
  %143 = tail call double @cos(double noundef %142) #5
  %144 = tail call double @llvm.fmuladd.f64(double %141, double %143, double %24)
  br label %167

145:                                              ; preds = %134
  %146 = fsub double %.2166174, %109
  %147 = fmul double %60, %146
  %148 = fdiv double %147, %50
  %149 = fmul double %147, %148
  %150 = fdiv double %149, %50
  %151 = fadd double %150, 1.000000e+00
  %152 = tail call double @sqrt(double noundef %151) #5
  %153 = fadd double %148, %152
  %154 = tail call double @log(double noundef %153) #5
  %155 = tail call double @llvm.fmuladd.f64(double %123, double %154, double %109)
  %156 = load double, ptr %116, align 8, !tbaa !41
  %157 = tail call double @cos(double noundef %156) #5
  %158 = fmul double %50, %.2166174
  %159 = fdiv double %158, %56
  %160 = tail call double @llvm.fmuladd.f64(double %121, double %126, double %159)
  %161 = load double, ptr %116, align 8, !tbaa !41
  %162 = tail call double @cos(double noundef %161) #5
  %163 = fneg double %160
  %164 = fmul double %162, %163
  %165 = tail call double @llvm.fmuladd.f64(double %155, double %157, double %164)
  %166 = fadd double %24, %165
  br label %167

167:                                              ; preds = %137, %145, %130
  %.sink = phi double [ %144, %137 ], [ %166, %145 ], [ %133, %130 ]
  %168 = getelementptr inbounds double, ptr %27, i64 %indvars.iv
  store double %.sink, ptr %168, align 8, !tbaa !28
  %169 = fadd double %65, %.2166174
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %127, !llvm.loop !43

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph181, %.lr.ph181.preheader
  %indvars.iv190.unr = phi i64 [ 0, %.lr.ph181.preheader ], [ %indvars.iv.next191.3, %.lr.ph181 ]
  %.0164179.unr = phi double [ 0.000000e+00, %.lr.ph181.preheader ], [ %46, %.lr.ph181 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph181.epil

.lr.ph181.epil:                                   ; preds = %.loopexit.loopexit.unr-lcssa, %.lr.ph181.epil
  %indvars.iv190.epil = phi i64 [ %indvars.iv.next191.epil, %.lr.ph181.epil ], [ %indvars.iv190.unr, %.loopexit.loopexit.unr-lcssa ]
  %.0164179.epil = phi double [ %172, %.lr.ph181.epil ], [ %.0164179.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph181.epil ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %170 = fsub double %19, %.0164179.epil
  %171 = getelementptr inbounds double, ptr %27, i64 %indvars.iv190.epil
  store double %170, ptr %171, align 8, !tbaa !28
  %172 = fadd double %32, %.0164179.epil
  %indvars.iv.next191.epil = add nuw nsw i64 %indvars.iv190.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit, label %.lr.ph181.epil, !llvm.loop !44

.loopexit:                                        ; preds = %167, %83, %.loopexit.loopexit.unr-lcssa, %.lr.ph181.epil, %107, %74, %28, %10
  %.0163 = phi ptr [ null, %10 ], [ %27, %28 ], [ %27, %74 ], [ %27, %107 ], [ %27, %.lr.ph181.epil ], [ %27, %.loopexit.loopexit.unr-lcssa ], [ %27, %83 ], [ %27, %167 ]
  ret ptr %.0163
}

declare ptr @list_get_at(ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

attributes #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 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind 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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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, !7, i64 0}
!6 = !{!"MAP_OtherStateType", !7, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !7, i64 88, !10, i64 96, !7, i64 104, !10, i64 112, !7, i64 120, !10, i64 128, !7, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !7, i64 168, !10, i64 176, !7, i64 184, !10, i64 192, !7, i64 200, !10, i64 208, !7, i64 216, !10, i64 224, !7, i64 232, !10, i64 240, !7, i64 248, !10, i64 256}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !14, i64 33}
!12 = !{!"Line_t", !7, i64 0, !13, i64 8, !15, i64 40, !15, i64 80, !16, i64 120, !7, i64 160, !7, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !17, i64 200, !17, i64 208, !17, i64 216, !17, i64 224, !17, i64 232, !17, i64 240, !17, i64 248, !17, i64 256, !17, i64 264, !17, i64 272, !17, i64 280, !17, i64 288, !17, i64 296, !17, i64 304, !17, i64 312, !18, i64 320, !7, i64 440, !7, i64 448, !10, i64 456, !10, i64 460, !10, i64 464, !10, i64 468, !10, i64 472}
!13 = !{!"", !14, i64 0, !14, i64 1, !14, i64 2, !14, i64 3, !14, i64 4, !14, i64 5, !14, i64 6, !14, i64 7, !14, i64 8, !14, i64 9, !14, i64 10, !14, i64 11, !14, i64 12, !14, i64 13, !14, i64 14, !14, i64 15, !14, i64 16, !14, i64 17, !14, i64 18, !14, i64 19, !14, i64 20, !14, i64 21, !14, i64 22, !14, i64 23, !14, i64 24, !14, i64 25}
!14 = !{!"_Bool", !8, i64 0}
!15 = !{!"VarTypePtr_t", !7, i64 0, !7, i64 8, !7, i64 16, !14, i64 24, !10, i64 28, !10, i64 32}
!16 = !{!"VarType_t", !7, i64 0, !7, i64 8, !17, i64 16, !14, i64 24, !14, i64 25, !10, i64 28, !10, i64 32}
!17 = !{!"double", !8, i64 0}
!18 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !7, i64 56, !19, i64 64}
!19 = !{!"list_attributes_s", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!12, !7, i64 448}
!23 = !{!24, !7, i64 256}
!24 = !{!"Node_t", !25, i64 0, !25, i64 120, !25, i64 240, !10, i64 360, !26, i64 368, !16, i64 488, !16, i64 528, !27, i64 568}
!25 = !{!"PointPtr_t", !15, i64 0, !15, i64 40, !15, i64 80}
!26 = !{!"ForcePtr_t", !15, i64 0, !15, i64 40, !15, i64 80}
!27 = !{!"Force_t", !16, i64 0, !16, i64 40, !16, i64 80}
!28 = !{!17, !17, i64 0}
!29 = !{!12, !7, i64 440}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!12, !7, i64 56}
!33 = !{!12, !7, i64 96}
!34 = !{!12, !7, i64 0}
!35 = !{!36, !17, i64 16}
!36 = !{!"CableLibrary_t", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !7, i64 80}
!37 = !{!12, !17, i64 136}
!38 = !{!36, !17, i64 24}
!39 = !{!36, !17, i64 40}
!40 = !{!12, !14, i64 29}
!41 = !{!12, !17, i64 176}
!42 = distinct !{!42, !31}
!43 = distinct !{!43, !31}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.unroll.disable"}


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