; 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.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.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 }

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

declare i32 @list_iterator_start(ptr noundef) #1

declare i32 @list_iterator_hasnext(ptr noundef) #1

declare ptr @list_iterator_next(ptr noundef) #1

declare i32 @list_iterator_stop(ptr noundef) #1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @set_line_initial_guess(ptr noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 0.000000e+00, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store double 0.000000e+00, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store double 0.000000e+00, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store double 0.000000e+00, ptr %12, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.Domain_t, ptr %13, i32 0, i32 7
  %15 = call i32 @list_iterator_start(ptr noundef %14)
  br label %16

16:                                               ; preds = %158, %3
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.Domain_t, ptr %17, i32 0, i32 7
  %19 = call i32 @list_iterator_hasnext(ptr noundef %18)
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %159

21:                                               ; preds = %16
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.Domain_t, ptr %22, i32 0, i32 7
  %24 = call ptr @list_iterator_next(ptr noundef %23)
  store ptr %24, ptr %7, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.Line_t, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = getelementptr inbounds %struct.CableLibrary_t, ptr %27, i32 0, i32 3
  %29 = load double, ptr %28, align 8, !tbaa !20
  store double %29, ptr %11, align 8, !tbaa !9
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.Line_t, ptr %30, i32 0, i32 10
  %32 = load double, ptr %31, align 8, !tbaa !22
  store double %32, ptr %9, align 8, !tbaa !9
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.Line_t, ptr %33, i32 0, i32 12
  %35 = load double, ptr %34, align 8, !tbaa !23
  store double %35, ptr %10, align 8, !tbaa !9
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.Line_t, ptr %36, i32 0, i32 4
  %38 = getelementptr inbounds %struct.VarType_t, ptr %37, i32 0, i32 2
  %39 = load double, ptr %38, align 8, !tbaa !24
  store double %39, ptr %12, align 8, !tbaa !9
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.Line_t, ptr %40, i32 0, i32 27
  %42 = load ptr, ptr %41, align 8, !tbaa !25
  %43 = getelementptr inbounds %struct.Node_t, ptr %42, i32 0, i32 7
  %44 = getelementptr inbounds %struct.Force_t, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds %struct.VarType_t, ptr %44, i32 0, i32 4
  %46 = load i8, ptr %45, align 1, !tbaa !26, !range !31, !noundef !32
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %80

48:                                               ; preds = %21
  %49 = load ptr, ptr %7, 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 7
  %53 = getelementptr inbounds %struct.Force_t, ptr %52, i32 0, i32 1
  %54 = getelementptr inbounds %struct.VarType_t, ptr %53, i32 0, i32 4
  %55 = load i8, ptr %54, align 1, !tbaa !33, !range !31, !noundef !32
  %56 = trunc i8 %55 to i1
  br i1 %56, label %57, label %80

57:                                               ; preds = %48
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Line_t, ptr %58, i32 0, i32 27
  %60 = load ptr, ptr %59, align 8, !tbaa !25
  %61 = getelementptr inbounds %struct.Node_t, ptr %60, i32 0, i32 7
  %62 = getelementptr inbounds %struct.Force_t, ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds %struct.VarType_t, ptr %62, i32 0, i32 2
  %64 = load double, ptr %63, align 8, !tbaa !34
  %65 = call double @pow(double noundef %64, double noundef 2.000000e+00) #5
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.Line_t, ptr %66, i32 0, i32 27
  %68 = load ptr, ptr %67, align 8, !tbaa !25
  %69 = getelementptr inbounds %struct.Node_t, ptr %68, i32 0, i32 7
  %70 = getelementptr inbounds %struct.Force_t, ptr %69, i32 0, i32 1
  %71 = getelementptr inbounds %struct.VarType_t, ptr %70, i32 0, i32 2
  %72 = load double, ptr %71, align 8, !tbaa !35
  %73 = call double @pow(double noundef %72, double noundef 2.000000e+00) #5
  %74 = fadd double %65, %73
  %75 = call double @sqrt(double noundef %74) #5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.Line_t, ptr %76, i32 0, i32 2
  %78 = getelementptr inbounds %struct.VarTypePtr_t, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !36
  store double %75, ptr %79, align 8, !tbaa !9
  br label %123

80:                                               ; preds = %48, %21
  %81 = load double, ptr %9, align 8, !tbaa !9
  %82 = fcmp ole double %81, 1.000000e-02
  br i1 %82, label %83, label %84

83:                                               ; preds = %80
  store double 1.000000e+06, ptr %8, align 8, !tbaa !9
  br label %111

84:                                               ; preds = %80
  %85 = load double, ptr %9, align 8, !tbaa !9
  %86 = load double, ptr %9, align 8, !tbaa !9
  %87 = load double, ptr %10, align 8, !tbaa !9
  %88 = load double, ptr %10, align 8, !tbaa !9
  %89 = fmul double %87, %88
  %90 = call double @llvm.fmuladd.f64(double %85, double %86, double %89)
  %91 = call double @sqrt(double noundef %90) #5
  %92 = load double, ptr %12, align 8, !tbaa !9
  %93 = fcmp oge double %91, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %84
  store double 2.000000e-01, ptr %8, align 8, !tbaa !9
  br label %110

95:                                               ; preds = %84
  %96 = load double, ptr %12, align 8, !tbaa !9
  %97 = load double, ptr %12, align 8, !tbaa !9
  %98 = load double, ptr %10, align 8, !tbaa !9
  %99 = load double, ptr %10, align 8, !tbaa !9
  %100 = fmul double %98, %99
  %101 = fneg double %100
  %102 = call double @llvm.fmuladd.f64(double %96, double %97, double %101)
  %103 = load double, ptr %9, align 8, !tbaa !9
  %104 = load double, ptr %9, align 8, !tbaa !9
  %105 = fmul double %103, %104
  %106 = fdiv double %102, %105
  %107 = fsub double %106, 1.000000e+00
  %108 = fmul double 3.000000e+00, %107
  %109 = call double @sqrt(double noundef %108) #5
  store double %109, ptr %8, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %95, %94
  br label %111

111:                                              ; preds = %110, %83
  %112 = load double, ptr %11, align 8, !tbaa !9
  %113 = load double, ptr %9, align 8, !tbaa !9
  %114 = fmul double %112, %113
  %115 = load double, ptr %8, align 8, !tbaa !9
  %116 = fmul double 2.000000e+00, %115
  %117 = fdiv double %114, %116
  %118 = call double @llvm.fabs.f64(double %117)
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.Line_t, ptr %119, i32 0, i32 2
  %121 = getelementptr inbounds %struct.VarTypePtr_t, ptr %120, i32 0, i32 2
  %122 = load ptr, ptr %121, align 8, !tbaa !36
  store double %118, ptr %122, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %111, %57
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.Line_t, ptr %124, i32 0, i32 27
  %126 = load ptr, ptr %125, align 8, !tbaa !25
  %127 = getelementptr inbounds %struct.Node_t, ptr %126, i32 0, i32 7
  %128 = getelementptr inbounds %struct.Force_t, ptr %127, i32 0, i32 2
  %129 = getelementptr inbounds %struct.VarType_t, ptr %128, i32 0, i32 4
  %130 = load i8, ptr %129, align 1, !tbaa !37, !range !31, !noundef !32
  %131 = trunc i8 %130 to i1
  br i1 %131, label %132, label %144

132:                                              ; preds = %123
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.Line_t, ptr %133, i32 0, i32 27
  %135 = load ptr, ptr %134, align 8, !tbaa !25
  %136 = getelementptr inbounds %struct.Node_t, ptr %135, i32 0, i32 7
  %137 = getelementptr inbounds %struct.Force_t, ptr %136, i32 0, i32 2
  %138 = getelementptr inbounds %struct.VarType_t, ptr %137, i32 0, i32 2
  %139 = load double, ptr %138, align 8, !tbaa !38
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.Line_t, ptr %140, i32 0, i32 3
  %142 = getelementptr inbounds %struct.VarTypePtr_t, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !39
  store double %139, ptr %143, align 8, !tbaa !9
  br label %158

144:                                              ; preds = %123
  %145 = load double, ptr %11, align 8, !tbaa !9
  %146 = fdiv double %145, 2.000000e+00
  %147 = load double, ptr %10, align 8, !tbaa !9
  %148 = load double, ptr %8, align 8, !tbaa !9
  %149 = call double @tanh(double noundef %148) #5
  %150 = fdiv double %147, %149
  %151 = load double, ptr %12, align 8, !tbaa !9
  %152 = fadd double %150, %151
  %153 = fmul double %146, %152
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.Line_t, ptr %154, i32 0, i32 3
  %156 = getelementptr inbounds %struct.VarTypePtr_t, ptr %155, i32 0, i32 2
  %157 = load ptr, ptr %156, align 8, !tbaa !39
  store double %153, ptr %157, align 8, !tbaa !9
  br label %158

158:                                              ; preds = %144, %132
  br label %16, !llvm.loop !40

159:                                              ; preds = %16
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.Domain_t, ptr %160, i32 0, i32 7
  %162 = call i32 @list_iterator_stop(ptr noundef %161)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret i32 0
}

; Function Attrs: nounwind
declare double @tanh(double noundef) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #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 }

!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 24}
!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 200}
!23 = !{!12, !10, i64 216}
!24 = !{!12, !10, i64 136}
!25 = !{!12, !6, i64 448}
!26 = !{!27, !14, i64 593}
!27 = !{!"Node_t", !28, i64 0, !28, i64 120, !28, i64 240, !16, i64 360, !29, i64 368, !17, i64 488, !17, i64 528, !30, i64 568}
!28 = !{!"PointPtr_t", !15, i64 0, !15, i64 40, !15, i64 80}
!29 = !{!"ForcePtr_t", !15, i64 0, !15, i64 40, !15, i64 80}
!30 = !{!"Force_t", !17, i64 0, !17, i64 40, !17, i64 80}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!27, !14, i64 633}
!34 = !{!27, !10, i64 584}
!35 = !{!27, !10, i64 624}
!36 = !{!12, !6, i64 56}
!37 = !{!27, !14, i64 673}
!38 = !{!27, !10, i64 664}
!39 = !{!12, !6, i64 96}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}


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

declare i32 @list_iterator_start(ptr noundef) local_unnamed_addr #0

declare i32 @list_iterator_hasnext(ptr noundef) local_unnamed_addr #0

declare ptr @list_iterator_next(ptr noundef) local_unnamed_addr #0

declare i32 @list_iterator_stop(ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @set_line_initial_guess(ptr noundef %0, ptr nocapture noundef readnone %1, ptr nocapture noundef readnone %2) local_unnamed_addr #3 {
  %4 = getelementptr inbounds i8, ptr %0, i64 1088
  %5 = tail call i32 @list_iterator_start(ptr noundef nonnull %4) #5
  %6 = tail call i32 @list_iterator_hasnext(ptr noundef nonnull %4) #5
  %.not41 = icmp eq i32 %6, 0
  br i1 %.not41, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3, %67
  %.042 = phi double [ %.2, %67 ], [ 0.000000e+00, %3 ]
  %7 = tail call ptr @list_iterator_next(ptr noundef nonnull %4) #5
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 24
  %10 = load double, ptr %9, align 8, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %7, i64 200
  %12 = load double, ptr %11, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %7, i64 216
  %14 = load double, ptr %13, align 8, !tbaa !21
  %15 = getelementptr inbounds i8, ptr %7, i64 136
  %16 = load double, ptr %15, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %7, i64 448
  %18 = load ptr, ptr %17, align 8, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %18, i64 593
  %20 = load i8, ptr %19, align 1, !tbaa !24, !range !29, !noundef !30
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %22, label %32

22:                                               ; preds = %.lr.ph
  %23 = getelementptr inbounds i8, ptr %18, i64 633
  %24 = load i8, ptr %23, align 1, !tbaa !31, !range !29, !noundef !30
  %25 = trunc nuw i8 %24 to i1
  br i1 %25, label %26, label %32

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %18, i64 584
  %28 = load double, ptr %27, align 8, !tbaa !32
  %square = fmul double %28, %28
  %29 = getelementptr inbounds i8, ptr %18, i64 624
  %30 = load double, ptr %29, align 8, !tbaa !33
  %square39 = fmul double %30, %30
  %31 = fadd double %square, %square39
  %sqrt = tail call double @llvm.sqrt.f64(double %31)
  br label %51

32:                                               ; preds = %22, %.lr.ph
  %33 = fcmp ugt double %12, 1.000000e-02
  br i1 %33, label %34, label %46

34:                                               ; preds = %32
  %35 = fmul double %14, %14
  %36 = tail call double @llvm.fmuladd.f64(double %12, double %12, double %35)
  %sqrt40 = tail call double @llvm.sqrt.f64(double %36)
  %37 = fcmp ult double %sqrt40, %16
  br i1 %37, label %38, label %46

38:                                               ; preds = %34
  %39 = fneg double %35
  %40 = tail call double @llvm.fmuladd.f64(double %16, double %16, double %39)
  %41 = fmul double %12, %12
  %42 = fdiv double %40, %41
  %43 = fadd double %42, -1.000000e+00
  %44 = fmul double %43, 3.000000e+00
  %45 = tail call double @sqrt(double noundef %44) #5
  %.pre.pre = load ptr, ptr %17, align 8, !tbaa !23
  br label %46

46:                                               ; preds = %34, %32, %38
  %.pre = phi ptr [ %.pre.pre, %38 ], [ %18, %32 ], [ %18, %34 ]
  %.1 = phi double [ %45, %38 ], [ 1.000000e+06, %32 ], [ 2.000000e-01, %34 ]
  %47 = fmul double %10, %12
  %48 = fmul double %.1, 2.000000e+00
  %49 = fdiv double %47, %48
  %50 = tail call double @llvm.fabs.f64(double %49)
  br label %51

51:                                               ; preds = %46, %26
  %.sink = phi double [ %50, %46 ], [ %sqrt, %26 ]
  %52 = phi ptr [ %.pre, %46 ], [ %18, %26 ]
  %.2 = phi double [ %.1, %46 ], [ %.042, %26 ]
  %53 = getelementptr inbounds i8, ptr %7, i64 56
  %54 = load ptr, ptr %53, align 8, !tbaa !34
  store double %.sink, ptr %54, align 8, !tbaa !35
  %55 = getelementptr inbounds i8, ptr %52, i64 673
  %56 = load i8, ptr %55, align 1, !tbaa !36, !range !29, !noundef !30
  %57 = trunc nuw i8 %56 to i1
  br i1 %57, label %58, label %61

58:                                               ; preds = %51
  %59 = getelementptr inbounds i8, ptr %52, i64 664
  %60 = load double, ptr %59, align 8, !tbaa !37
  br label %67

61:                                               ; preds = %51
  %62 = fmul double %10, 5.000000e-01
  %63 = tail call double @tanh(double noundef %.2) #5
  %64 = fdiv double %14, %63
  %65 = fadd double %16, %64
  %66 = fmul double %62, %65
  br label %67

67:                                               ; preds = %61, %58
  %.sink46 = phi double [ %66, %61 ], [ %60, %58 ]
  %68 = getelementptr inbounds i8, ptr %7, i64 96
  %69 = load ptr, ptr %68, align 8, !tbaa !38
  store double %.sink46, ptr %69, align 8, !tbaa !35
  %70 = tail call i32 @list_iterator_hasnext(ptr noundef nonnull %4) #5
  %.not = icmp eq i32 %70, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !39

._crit_edge:                                      ; preds = %67, %3
  %71 = tail call i32 @list_iterator_stop(ptr noundef nonnull %4) #5
  ret i32 0
}

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

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

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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !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 24}
!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 200}
!21 = !{!6, !15, i64 216}
!22 = !{!6, !15, i64 136}
!23 = !{!6, !7, i64 448}
!24 = !{!25, !11, i64 593}
!25 = !{!"Node_t", !26, i64 0, !26, i64 120, !26, i64 240, !13, i64 360, !27, i64 368, !14, i64 488, !14, i64 528, !28, i64 568}
!26 = !{!"PointPtr_t", !12, i64 0, !12, i64 40, !12, i64 80}
!27 = !{!"ForcePtr_t", !12, i64 0, !12, i64 40, !12, i64 80}
!28 = !{!"Force_t", !14, i64 0, !14, i64 40, !14, i64 80}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!25, !11, i64 633}
!32 = !{!25, !15, i64 584}
!33 = !{!25, !15, i64 624}
!34 = !{!6, !7, i64 56}
!35 = !{!15, !15, i64 0}
!36 = !{!25, !11, i64 673}
!37 = !{!25, !15, i64 664}
!38 = !{!6, !7, i64 96}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}


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