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

; 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.Vector_t = type { double, double, double }
%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.VarType_t = type { ptr, ptr, double, i8, i8, i32, i32 }
%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.CableLibrary_t = type { double, double, double, double, double, double, double, double, double, double, ptr }
%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.Force_t = type { %struct.VarType_t, %struct.VarType_t, %struct.VarType_t }

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @solve_linear_spring_cable(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca %struct.Vector_t, align 8
  %10 = alloca %struct.Vector_t, align 8
  %11 = alloca %struct.Vector_t, align 8
  %12 = alloca %struct.Vector_t, align 8
  %13 = alloca %struct.Vector_t, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.Line_t, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.CableLibrary_t, ptr %19, i32 0, i32 2
  %21 = load double, ptr %20, align 8, !tbaa !20
  store double %21, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.Line_t, ptr %22, i32 0, i32 4
  %24 = getelementptr inbounds %struct.VarType_t, ptr %23, i32 0, i32 2
  %25 = load double, ptr %24, align 8, !tbaa !22
  store double %25, ptr %15, align 8, !tbaa !9
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.Line_t, ptr %26, i32 0, i32 26
  %28 = load ptr, ptr %27, align 8, !tbaa !23
  %29 = getelementptr inbounds %struct.Node_t, ptr %28, i32 0, i32 2
  %30 = getelementptr inbounds %struct.PointPtr_t, ptr %29, i32 0, i32 0
  %31 = getelementptr inbounds %struct.VarTypePtr_t, ptr %30, i32 0, i32 2
  %32 = load ptr, ptr %31, align 8, !tbaa !24
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.Vector_t, ptr %10, i32 0, i32 0
  store double %33, ptr %34, align 8, !tbaa !29
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.Line_t, ptr %35, i32 0, i32 26
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  %38 = getelementptr inbounds %struct.Node_t, ptr %37, i32 0, i32 2
  %39 = getelementptr inbounds %struct.PointPtr_t, ptr %38, i32 0, i32 1
  %40 = getelementptr inbounds %struct.VarTypePtr_t, ptr %39, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !31
  %42 = load double, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.Vector_t, ptr %10, i32 0, i32 1
  store double %42, ptr %43, align 8, !tbaa !32
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.Line_t, ptr %44, i32 0, i32 26
  %46 = load ptr, ptr %45, align 8, !tbaa !23
  %47 = getelementptr inbounds %struct.Node_t, ptr %46, i32 0, i32 2
  %48 = getelementptr inbounds %struct.PointPtr_t, ptr %47, i32 0, i32 2
  %49 = getelementptr inbounds %struct.VarTypePtr_t, ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !33
  %51 = load double, ptr %50, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.Vector_t, ptr %10, i32 0, i32 2
  store double %51, ptr %52, align 8, !tbaa !34
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.Line_t, ptr %53, i32 0, i32 27
  %55 = load ptr, ptr %54, align 8, !tbaa !35
  %56 = getelementptr inbounds %struct.Node_t, ptr %55, i32 0, i32 2
  %57 = getelementptr inbounds %struct.PointPtr_t, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %struct.VarTypePtr_t, ptr %57, i32 0, i32 2
  %59 = load ptr, ptr %58, align 8, !tbaa !24
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.Vector_t, ptr %11, i32 0, i32 0
  store double %60, ptr %61, align 8, !tbaa !29
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.Line_t, ptr %62, i32 0, i32 27
  %64 = load ptr, ptr %63, align 8, !tbaa !35
  %65 = getelementptr inbounds %struct.Node_t, ptr %64, i32 0, i32 2
  %66 = getelementptr inbounds %struct.PointPtr_t, ptr %65, i32 0, i32 1
  %67 = getelementptr inbounds %struct.VarTypePtr_t, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !31
  %69 = load double, ptr %68, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct.Vector_t, ptr %11, i32 0, i32 1
  store double %69, ptr %70, align 8, !tbaa !32
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.Line_t, ptr %71, i32 0, i32 27
  %73 = load ptr, ptr %72, align 8, !tbaa !35
  %74 = getelementptr inbounds %struct.Node_t, ptr %73, i32 0, i32 2
  %75 = getelementptr inbounds %struct.PointPtr_t, ptr %74, i32 0, i32 2
  %76 = getelementptr inbounds %struct.VarTypePtr_t, ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !33
  %78 = load double, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.Vector_t, ptr %11, i32 0, i32 2
  store double %78, ptr %79, align 8, !tbaa !34
  %80 = getelementptr inbounds %struct.Vector_t, ptr %10, i32 0, i32 0
  %81 = load double, ptr %80, align 8, !tbaa !29
  %82 = getelementptr inbounds %struct.Vector_t, ptr %11, i32 0, i32 0
  %83 = load double, ptr %82, align 8, !tbaa !29
  %84 = fsub double %81, %83
  %85 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 0
  store double %84, ptr %85, align 8, !tbaa !29
  %86 = getelementptr inbounds %struct.Vector_t, ptr %10, i32 0, i32 1
  %87 = load double, ptr %86, align 8, !tbaa !32
  %88 = getelementptr inbounds %struct.Vector_t, ptr %11, i32 0, i32 1
  %89 = load double, ptr %88, align 8, !tbaa !32
  %90 = fsub double %87, %89
  %91 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 1
  store double %90, ptr %91, align 8, !tbaa !32
  %92 = getelementptr inbounds %struct.Vector_t, ptr %10, i32 0, i32 2
  %93 = load double, ptr %92, align 8, !tbaa !34
  %94 = getelementptr inbounds %struct.Vector_t, ptr %11, i32 0, i32 2
  %95 = load double, ptr %94, align 8, !tbaa !34
  %96 = fsub double %93, %95
  %97 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 2
  store double %96, ptr %97, align 8, !tbaa !34
  %98 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 0
  %99 = load double, ptr %98, align 8, !tbaa !29
  %100 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 0
  %101 = load double, ptr %100, align 8, !tbaa !29
  %102 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 1
  %103 = load double, ptr %102, align 8, !tbaa !32
  %104 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 1
  %105 = load double, ptr %104, align 8, !tbaa !32
  %106 = fmul double %103, %105
  %107 = call double @llvm.fmuladd.f64(double %99, double %101, double %106)
  %108 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 2
  %109 = load double, ptr %108, align 8, !tbaa !34
  %110 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 2
  %111 = load double, ptr %110, align 8, !tbaa !34
  %112 = call double @llvm.fmuladd.f64(double %109, double %111, double %107)
  %113 = call double @sqrt(double noundef %112) #4
  store double %113, ptr %8, align 8, !tbaa !9
  %114 = load double, ptr %8, align 8, !tbaa !9
  %115 = fcmp olt double %114, 0x3C9CD2B297D889BC
  br i1 %115, label %116, label %117

116:                                              ; preds = %3
  store i32 3, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %197

117:                                              ; preds = %3
  %118 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 0
  %119 = load double, ptr %118, align 8, !tbaa !29
  %120 = load double, ptr %8, align 8, !tbaa !9
  %121 = fdiv double %119, %120
  %122 = getelementptr inbounds %struct.Vector_t, ptr %13, i32 0, i32 0
  store double %121, ptr %122, align 8, !tbaa !29
  %123 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 1
  %124 = load double, ptr %123, align 8, !tbaa !32
  %125 = load double, ptr %8, align 8, !tbaa !9
  %126 = fdiv double %124, %125
  %127 = getelementptr inbounds %struct.Vector_t, ptr %13, i32 0, i32 1
  store double %126, ptr %127, align 8, !tbaa !32
  %128 = getelementptr inbounds %struct.Vector_t, ptr %9, i32 0, i32 2
  %129 = load double, ptr %128, align 8, !tbaa !34
  %130 = load double, ptr %8, align 8, !tbaa !9
  %131 = fdiv double %129, %130
  %132 = getelementptr inbounds %struct.Vector_t, ptr %13, i32 0, i32 2
  store double %131, ptr %132, align 8, !tbaa !34
  %133 = load double, ptr %8, align 8, !tbaa !9
  %134 = load double, ptr %15, align 8, !tbaa !9
  %135 = fcmp ole double %133, %134
  br i1 %135, label %136, label %140

136:                                              ; preds = %117
  %137 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 0
  store double 0.000000e+00, ptr %137, align 8, !tbaa !29
  %138 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 1
  store double 0.000000e+00, ptr %138, align 8, !tbaa !32
  %139 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 2
  store double 0.000000e+00, ptr %139, align 8, !tbaa !34
  br label %174

140:                                              ; preds = %117
  %141 = load double, ptr %14, align 8, !tbaa !9
  %142 = load double, ptr %15, align 8, !tbaa !9
  %143 = fdiv double %141, %142
  %144 = load double, ptr %8, align 8, !tbaa !9
  %145 = load double, ptr %15, align 8, !tbaa !9
  %146 = fsub double %144, %145
  %147 = fmul double %143, %146
  %148 = getelementptr inbounds %struct.Vector_t, ptr %13, i32 0, i32 0
  %149 = load double, ptr %148, align 8, !tbaa !29
  %150 = fmul double %147, %149
  %151 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 0
  store double %150, ptr %151, align 8, !tbaa !29
  %152 = load double, ptr %14, align 8, !tbaa !9
  %153 = load double, ptr %15, align 8, !tbaa !9
  %154 = fdiv double %152, %153
  %155 = load double, ptr %8, align 8, !tbaa !9
  %156 = load double, ptr %15, align 8, !tbaa !9
  %157 = fsub double %155, %156
  %158 = fmul double %154, %157
  %159 = getelementptr inbounds %struct.Vector_t, ptr %13, i32 0, i32 1
  %160 = load double, ptr %159, align 8, !tbaa !32
  %161 = fmul double %158, %160
  %162 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 1
  store double %161, ptr %162, align 8, !tbaa !32
  %163 = load double, ptr %14, align 8, !tbaa !9
  %164 = load double, ptr %15, align 8, !tbaa !9
  %165 = fdiv double %163, %164
  %166 = load double, ptr %8, align 8, !tbaa !9
  %167 = load double, ptr %15, align 8, !tbaa !9
  %168 = fsub double %166, %167
  %169 = fmul double %165, %168
  %170 = getelementptr inbounds %struct.Vector_t, ptr %13, i32 0, i32 2
  %171 = load double, ptr %170, align 8, !tbaa !34
  %172 = fmul double %169, %171
  %173 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 2
  store double %172, ptr %173, align 8, !tbaa !34
  br label %174

174:                                              ; preds = %140, %136
  %175 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 0
  %176 = load double, ptr %175, align 8, !tbaa !29
  %177 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 0
  %178 = load double, ptr %177, align 8, !tbaa !29
  %179 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 1
  %180 = load double, ptr %179, align 8, !tbaa !32
  %181 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 1
  %182 = load double, ptr %181, align 8, !tbaa !32
  %183 = fmul double %180, %182
  %184 = call double @llvm.fmuladd.f64(double %176, double %178, double %183)
  %185 = call double @sqrt(double noundef %184) #4
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.Line_t, ptr %186, i32 0, i32 2
  %188 = getelementptr inbounds %struct.VarTypePtr_t, ptr %187, i32 0, i32 2
  %189 = load ptr, ptr %188, align 8, !tbaa !36
  store double %185, ptr %189, align 8, !tbaa !9
  %190 = getelementptr inbounds %struct.Vector_t, ptr %12, i32 0, i32 2
  %191 = load double, ptr %190, align 8, !tbaa !34
  %192 = fneg double %191
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.Line_t, ptr %193, i32 0, i32 3
  %195 = getelementptr inbounds %struct.VarTypePtr_t, ptr %194, i32 0, i32 2
  %196 = load ptr, ptr %195, align 8, !tbaa !37
  store double %192, ptr %196, align 8, !tbaa !9
  store i32 0, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %197

197:                                              ; preds = %174, %116
  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 24, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %198 = load i32, ptr %4, align 4
  ret i32 %198
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"Line_t", !6, i64 0, !13, i64 8, !15, i64 40, !15, i64 80, !17, i64 120, !6, i64 160, !6, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !18, i64 320, !6, i64 440, !6, i64 448, !16, i64 456, !16, i64 460, !16, i64 464, !16, i64 468, !16, 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", !7, i64 0}
!15 = !{!"VarTypePtr_t", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !16, i64 28, !16, i64 32}
!16 = !{!"int", !7, i64 0}
!17 = !{!"VarType_t", !6, i64 0, !6, i64 8, !10, i64 16, !14, i64 24, !14, i64 25, !16, i64 28, !16, i64 32}
!18 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !16, i64 24, !6, i64 32, !16, i64 40, !16, i64 44, !16, i64 48, !6, i64 56, !19, i64 64}
!19 = !{!"list_attributes_s", !6, i64 0, !6, i64 8, !6, i64 16, !16, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!20 = !{!21, !10, i64 16}
!21 = !{!"CableLibrary_t", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !6, i64 80}
!22 = !{!12, !10, i64 136}
!23 = !{!12, !6, i64 440}
!24 = !{!25, !6, i64 256}
!25 = !{!"Node_t", !26, i64 0, !26, i64 120, !26, i64 240, !16, i64 360, !27, i64 368, !17, i64 488, !17, i64 528, !28, i64 568}
!26 = !{!"PointPtr_t", !15, i64 0, !15, i64 40, !15, i64 80}
!27 = !{!"ForcePtr_t", !15, i64 0, !15, i64 40, !15, i64 80}
!28 = !{!"Force_t", !17, i64 0, !17, i64 40, !17, i64 80}
!29 = !{!30, !10, i64 0}
!30 = !{!"Vector_t", !10, i64 0, !10, i64 8, !10, i64 16}
!31 = !{!25, !6, i64 296}
!32 = !{!30, !10, i64 8}
!33 = !{!25, !6, i64 336}
!34 = !{!30, !10, i64 16}
!35 = !{!12, !6, i64 448}
!36 = !{!12, !6, i64 56}
!37 = !{!12, !6, i64 96}


; 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) uwtable
define dso_local range(i32 0, 4) i32 @solve_linear_spring_cable(ptr nocapture noundef readonly %0, ptr nocapture noundef readnone %1, ptr nocapture noundef readnone %2) local_unnamed_addr #1 {
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 16
  %6 = load double, ptr %5, align 8, !tbaa !18
  %7 = getelementptr inbounds i8, ptr %0, i64 136
  %8 = load double, ptr %7, align 8, !tbaa !20
  %9 = getelementptr inbounds i8, ptr %0, i64 440
  %10 = load ptr, ptr %9, align 8, !tbaa !21
  %11 = getelementptr inbounds i8, ptr %10, i64 256
  %12 = load ptr, ptr %11, align 8, !tbaa !22
  %13 = load double, ptr %12, align 8, !tbaa !27
  %14 = getelementptr inbounds i8, ptr %10, i64 296
  %15 = load ptr, ptr %14, align 8, !tbaa !28
  %16 = load double, ptr %15, align 8, !tbaa !27
  %17 = getelementptr inbounds i8, ptr %10, i64 336
  %18 = load ptr, ptr %17, align 8, !tbaa !29
  %19 = load double, ptr %18, align 8, !tbaa !27
  %20 = getelementptr inbounds i8, ptr %0, i64 448
  %21 = load ptr, ptr %20, align 8, !tbaa !30
  %22 = getelementptr inbounds i8, ptr %21, i64 256
  %23 = load ptr, ptr %22, align 8, !tbaa !22
  %24 = load double, ptr %23, align 8, !tbaa !27
  %25 = getelementptr inbounds i8, ptr %21, i64 296
  %26 = load ptr, ptr %25, align 8, !tbaa !28
  %27 = load double, ptr %26, align 8, !tbaa !27
  %28 = getelementptr inbounds i8, ptr %21, i64 336
  %29 = load ptr, ptr %28, align 8, !tbaa !29
  %30 = load double, ptr %29, align 8, !tbaa !27
  %31 = insertelement <2 x double> poison, double %13, i64 0
  %32 = insertelement <2 x double> %31, double %16, i64 1
  %33 = insertelement <2 x double> poison, double %24, i64 0
  %34 = insertelement <2 x double> %33, double %27, i64 1
  %35 = fsub <2 x double> %32, %34
  %36 = fsub double %19, %30
  %37 = fmul <2 x double> %35, %35
  %38 = extractelement <2 x double> %37, i64 1
  %39 = extractelement <2 x double> %35, i64 0
  %40 = tail call double @llvm.fmuladd.f64(double %39, double %39, double %38)
  %41 = tail call double @llvm.fmuladd.f64(double %36, double %36, double %40)
  %sqrt = tail call double @llvm.sqrt.f64(double %41)
  %42 = fcmp olt double %sqrt, 0x3C9CD2B297D889BC
  br i1 %42, label %68, label %43

43:                                               ; preds = %3
  %44 = fcmp ugt double %sqrt, %8
  br i1 %44, label %45, label %57

45:                                               ; preds = %43
  %46 = fdiv double %36, %sqrt
  %47 = insertelement <2 x double> poison, double %sqrt, i64 0
  %48 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> zeroinitializer
  %49 = fdiv <2 x double> %35, %48
  %50 = fdiv double %6, %8
  %51 = fsub double %sqrt, %8
  %52 = fmul double %50, %51
  %53 = insertelement <2 x double> poison, double %52, i64 0
  %54 = shufflevector <2 x double> %53, <2 x double> poison, <2 x i32> zeroinitializer
  %55 = fmul <2 x double> %49, %54
  %56 = fmul double %46, %52
  br label %57

57:                                               ; preds = %43, %45
  %.sroa.10.0 = phi double [ %56, %45 ], [ 0.000000e+00, %43 ]
  %58 = phi <2 x double> [ %55, %45 ], [ zeroinitializer, %43 ]
  %59 = fmul <2 x double> %58, %58
  %60 = extractelement <2 x double> %59, i64 1
  %61 = extractelement <2 x double> %58, i64 0
  %62 = tail call double @llvm.fmuladd.f64(double %61, double %61, double %60)
  %sqrt49 = tail call double @llvm.sqrt.f64(double %62)
  %63 = getelementptr inbounds i8, ptr %0, i64 56
  %64 = load ptr, ptr %63, align 8, !tbaa !31
  store double %sqrt49, ptr %64, align 8, !tbaa !27
  %65 = fneg double %.sroa.10.0
  %66 = getelementptr inbounds i8, ptr %0, i64 96
  %67 = load ptr, ptr %66, align 8, !tbaa !32
  store double %65, ptr %67, align 8, !tbaa !27
  br label %68

68:                                               ; preds = %3, %57
  %.0 = phi i32 [ 0, %57 ], [ 3, %3 ]
  ret i32 %.0
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

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


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass