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

; 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: nounwind
declare double @cos(double noundef) #2

; Function Attrs: nounwind
declare double @sin(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 uwtable
define dso_local i32 @set_line_variables_post_solve(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
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i8, align 1
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store double 0.000000e+00, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store double 0.000000e+00, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store double 0.000000e+00, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  store i8 0, ptr %16, align 1, !tbaa !11
  %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_start(ptr noundef %18)
  br label %20

20:                                               ; preds = %134, %3
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.Domain_t, ptr %21, i32 0, i32 7
  %23 = call i32 @list_iterator_hasnext(ptr noundef %22)
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %193

25:                                               ; preds = %20
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.Domain_t, ptr %26, i32 0, i32 7
  %28 = call ptr @list_iterator_next(ptr noundef %27)
  store ptr %28, ptr %7, align 8, !tbaa !5
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.Line_t, ptr %29, i32 0, i32 2
  %31 = getelementptr inbounds %struct.VarTypePtr_t, ptr %30, i32 0, i32 2
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  %33 = load double, ptr %32, align 8, !tbaa !9
  store double %33, ptr %8, align 8, !tbaa !9
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.Line_t, ptr %34, i32 0, i32 3
  %36 = getelementptr inbounds %struct.VarTypePtr_t, ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %36, align 8, !tbaa !21
  %38 = load double, ptr %37, align 8, !tbaa !9
  store double %38, ptr %9, align 8, !tbaa !9
  %39 = load double, ptr %9, align 8, !tbaa !9
  %40 = load double, ptr %8, align 8, !tbaa !9
  %41 = call double @atan2(double noundef %39, double noundef %40) #5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.Line_t, ptr %42, i32 0, i32 8
  store double %41, ptr %43, align 8, !tbaa !22
  %44 = load double, ptr %8, align 8, !tbaa !9
  %45 = load double, ptr %8, align 8, !tbaa !9
  %46 = load double, ptr %9, align 8, !tbaa !9
  %47 = load double, ptr %9, align 8, !tbaa !9
  %48 = fmul double %46, %47
  %49 = call double @llvm.fmuladd.f64(double %44, double %45, double %48)
  %50 = call double @sqrt(double noundef %49) #5
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.Line_t, ptr %51, i32 0, i32 15
  store double %50, ptr %52, align 8, !tbaa !23
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.Line_t, ptr %53, i32 0, i32 1
  %55 = getelementptr inbounds %struct.LineOptions, ptr %54, i32 0, i32 25
  %56 = load i8, ptr %55, align 1, !tbaa !24, !range !25, !noundef !26
  %57 = trunc i8 %56 to i1
  br i1 %57, label %58, label %61

58:                                               ; preds = %25
  %59 = load double, ptr %8, align 8, !tbaa !9
  store double %59, ptr %10, align 8, !tbaa !9
  %60 = load double, ptr %9, align 8, !tbaa !9
  store double %60, ptr %11, align 8, !tbaa !9
  br label %134

61:                                               ; preds = %25
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.Line_t, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !27
  %65 = getelementptr inbounds %struct.CableLibrary_t, ptr %64, i32 0, i32 3
  %66 = load double, ptr %65, align 8, !tbaa !28
  store double %66, ptr %12, align 8, !tbaa !9
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.Line_t, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !27
  %70 = getelementptr inbounds %struct.CableLibrary_t, ptr %69, i32 0, i32 5
  %71 = load double, ptr %70, align 8, !tbaa !30
  store double %71, ptr %15, align 8, !tbaa !9
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.Line_t, ptr %72, i32 0, i32 1
  %74 = getelementptr inbounds %struct.LineOptions, ptr %73, i32 0, i32 21
  %75 = load i8, ptr %74, align 1, !tbaa !31, !range !25, !noundef !26
  %76 = trunc i8 %75 to i1
  %77 = zext i1 %76 to i8
  store i8 %77, ptr %16, align 1, !tbaa !11
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.Line_t, ptr %78, i32 0, i32 4
  %80 = getelementptr inbounds %struct.VarType_t, ptr %79, i32 0, i32 2
  %81 = load double, ptr %80, align 8, !tbaa !32
  store double %81, ptr %13, align 8, !tbaa !9
  %82 = load i8, ptr %16, align 1, !tbaa !11, !range !25, !noundef !26
  %83 = trunc i8 %82 to i1
  %84 = zext i1 %83 to i32
  %85 = icmp eq i32 %84, 1
  br i1 %85, label %96, label %86

86:                                               ; preds = %61
  %87 = load double, ptr %12, align 8, !tbaa !9
  %88 = fcmp olt double %87, 0.000000e+00
  br i1 %88, label %96, label %89

89:                                               ; preds = %86
  %90 = load double, ptr %9, align 8, !tbaa !9
  %91 = load double, ptr %12, align 8, !tbaa !9
  %92 = load double, ptr %13, align 8, !tbaa !9
  %93 = fneg double %91
  %94 = call double @llvm.fmuladd.f64(double %93, double %92, double %90)
  %95 = fcmp ogt double %94, 0.000000e+00
  br i1 %95, label %96, label %105

96:                                               ; preds = %89, %86, %61
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.Line_t, ptr %97, i32 0, i32 11
  store double 0.000000e+00, ptr %98, align 8, !tbaa !33
  %99 = load double, ptr %8, align 8, !tbaa !9
  store double %99, ptr %10, align 8, !tbaa !9
  %100 = load double, ptr %9, align 8, !tbaa !9
  %101 = load double, ptr %12, align 8, !tbaa !9
  %102 = load double, ptr %13, align 8, !tbaa !9
  %103 = fneg double %101
  %104 = call double @llvm.fmuladd.f64(double %103, double %102, double %100)
  store double %104, ptr %11, align 8, !tbaa !9
  br label %133

105:                                              ; preds = %89
  %106 = load double, ptr %13, align 8, !tbaa !9
  %107 = load double, ptr %9, align 8, !tbaa !9
  %108 = load double, ptr %12, align 8, !tbaa !9
  %109 = fdiv double %107, %108
  %110 = fsub double %106, %109
  store double %110, ptr %14, align 8, !tbaa !9
  %111 = load double, ptr %14, align 8, !tbaa !9
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.Line_t, ptr %112, i32 0, i32 11
  store double %111, ptr %113, align 8, !tbaa !33
  %114 = load double, ptr %8, align 8, !tbaa !9
  %115 = load double, ptr %15, align 8, !tbaa !9
  %116 = load double, ptr %12, align 8, !tbaa !9
  %117 = fmul double %115, %116
  %118 = load double, ptr %14, align 8, !tbaa !9
  %119 = fneg double %117
  %120 = call double @llvm.fmuladd.f64(double %119, double %118, double %114)
  %121 = fcmp ogt double %120, 0.000000e+00
  br i1 %121, label %122, label %130

122:                                              ; preds = %105
  %123 = load double, ptr %8, align 8, !tbaa !9
  %124 = load double, ptr %15, align 8, !tbaa !9
  %125 = load double, ptr %12, align 8, !tbaa !9
  %126 = fmul double %124, %125
  %127 = load double, ptr %14, align 8, !tbaa !9
  %128 = fneg double %126
  %129 = call double @llvm.fmuladd.f64(double %128, double %127, double %123)
  store double %129, ptr %10, align 8, !tbaa !9
  br label %131

130:                                              ; preds = %105
  store double 0.000000e+00, ptr %10, align 8, !tbaa !9
  br label %131

131:                                              ; preds = %130, %122
  %132 = phi double [ %129, %122 ], [ 0.000000e+00, %130 ]
  store double 0.000000e+00, ptr %11, align 8, !tbaa !9
  br label %133

133:                                              ; preds = %131, %96
  br label %134

134:                                              ; preds = %133, %58
  %135 = load double, ptr %10, align 8, !tbaa !9
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.Line_t, ptr %136, i32 0, i32 13
  store double %135, ptr %137, align 8, !tbaa !34
  %138 = load double, ptr %11, align 8, !tbaa !9
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.Line_t, ptr %139, i32 0, i32 14
  store double %138, ptr %140, align 8, !tbaa !35
  %141 = load double, ptr %10, align 8, !tbaa !9
  %142 = load double, ptr %10, align 8, !tbaa !9
  %143 = load double, ptr %11, align 8, !tbaa !9
  %144 = load double, ptr %11, align 8, !tbaa !9
  %145 = fmul double %143, %144
  %146 = call double @llvm.fmuladd.f64(double %141, double %142, double %145)
  %147 = call double @sqrt(double noundef %146) #5
  %148 = load ptr, ptr %7, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.Line_t, ptr %148, i32 0, i32 16
  store double %147, ptr %149, align 8, !tbaa !36
  %150 = load double, ptr %11, align 8, !tbaa !9
  %151 = load double, ptr %10, align 8, !tbaa !9
  %152 = call double @atan2(double noundef %150, double noundef %151) #5
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.Line_t, ptr %153, i32 0, i32 9
  store double %152, ptr %154, align 8, !tbaa !37
  %155 = load double, ptr %8, align 8, !tbaa !9
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.Line_t, ptr %156, i32 0, i32 7
  %158 = load double, ptr %157, align 8, !tbaa !38
  %159 = call double @cos(double noundef %158) #5
  %160 = fmul double %155, %159
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.Line_t, ptr %161, i32 0, i32 19
  store double %160, ptr %162, align 8, !tbaa !39
  %163 = load double, ptr %8, align 8, !tbaa !9
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.Line_t, ptr %164, i32 0, i32 7
  %166 = load double, ptr %165, align 8, !tbaa !38
  %167 = call double @sin(double noundef %166) #5
  %168 = fmul double %163, %167
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.Line_t, ptr %169, i32 0, i32 20
  store double %168, ptr %170, align 8, !tbaa !40
  %171 = load double, ptr %9, align 8, !tbaa !9
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.Line_t, ptr %172, i32 0, i32 21
  store double %171, ptr %173, align 8, !tbaa !41
  %174 = load double, ptr %10, align 8, !tbaa !9
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.Line_t, ptr %175, i32 0, i32 7
  %177 = load double, ptr %176, align 8, !tbaa !38
  %178 = call double @cos(double noundef %177) #5
  %179 = fmul double %174, %178
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.Line_t, ptr %180, i32 0, i32 22
  store double %179, ptr %181, align 8, !tbaa !42
  %182 = load double, ptr %10, align 8, !tbaa !9
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.Line_t, ptr %183, i32 0, i32 7
  %185 = load double, ptr %184, align 8, !tbaa !38
  %186 = call double @sin(double noundef %185) #5
  %187 = fmul double %182, %186
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.Line_t, ptr %188, i32 0, i32 23
  store double %187, ptr %189, align 8, !tbaa !43
  %190 = load double, ptr %11, align 8, !tbaa !9
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.Line_t, ptr %191, i32 0, i32 24
  store double %190, ptr %192, align 8, !tbaa !44
  br label %20, !llvm.loop !45

193:                                              ; preds = %20
  %194 = load ptr, ptr %4, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.Domain_t, ptr %194, i32 0, i32 7
  %196 = call i32 @list_iterator_stop(ptr noundef %195)
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  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 @atan2(double noundef, 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 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, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!14, !6, i64 56}
!14 = !{!"Line_t", !6, i64 0, !15, i64 8, !16, i64 40, !16, i64 80, !18, 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, !19, i64 320, !6, i64 440, !6, i64 448, !17, i64 456, !17, i64 460, !17, i64 464, !17, i64 468, !17, i64 472}
!15 = !{!"", !12, i64 0, !12, i64 1, !12, i64 2, !12, i64 3, !12, i64 4, !12, i64 5, !12, i64 6, !12, i64 7, !12, i64 8, !12, i64 9, !12, i64 10, !12, i64 11, !12, i64 12, !12, i64 13, !12, i64 14, !12, i64 15, !12, i64 16, !12, i64 17, !12, i64 18, !12, i64 19, !12, i64 20, !12, i64 21, !12, i64 22, !12, i64 23, !12, i64 24, !12, i64 25}
!16 = !{!"VarTypePtr_t", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !17, i64 28, !17, i64 32}
!17 = !{!"int", !7, i64 0}
!18 = !{!"VarType_t", !6, i64 0, !6, i64 8, !10, i64 16, !12, i64 24, !12, i64 25, !17, i64 28, !17, i64 32}
!19 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !17, i64 24, !6, i64 32, !17, i64 40, !17, i64 44, !17, i64 48, !6, i64 56, !20, i64 64}
!20 = !{!"list_attributes_s", !6, i64 0, !6, i64 8, !6, i64 16, !17, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!21 = !{!14, !6, i64 96}
!22 = !{!14, !10, i64 184}
!23 = !{!14, !10, i64 240}
!24 = !{!14, !12, i64 33}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!14, !6, i64 0}
!28 = !{!29, !10, i64 24}
!29 = !{!"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}
!30 = !{!29, !10, i64 40}
!31 = !{!14, !12, i64 29}
!32 = !{!14, !10, i64 136}
!33 = !{!14, !10, i64 208}
!34 = !{!14, !10, i64 224}
!35 = !{!14, !10, i64 232}
!36 = !{!14, !10, i64 248}
!37 = !{!14, !10, i64 192}
!38 = !{!14, !10, i64 176}
!39 = !{!14, !10, i64 272}
!40 = !{!14, !10, i64 280}
!41 = !{!14, !10, i64 288}
!42 = !{!14, !10, i64 296}
!43 = !{!14, !10, i64 304}
!44 = !{!14, !10, i64 312}
!45 = distinct !{!45, !46}
!46 = !{!"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 nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(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: nounwind uwtable
define dso_local noundef i32 @set_line_variables_post_solve(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
  %.not76 = icmp eq i32 %6, 0
  br i1 %.not76, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3, %44
  %7 = tail call ptr @list_iterator_next(ptr noundef nonnull %4) #5
  %8 = getelementptr inbounds i8, ptr %7, i64 56
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = load double, ptr %9, align 8, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %7, i64 96
  %12 = load ptr, ptr %11, align 8, !tbaa !19
  %13 = load double, ptr %12, align 8, !tbaa !18
  %14 = tail call double @atan2(double noundef %13, double noundef %10) #5
  %15 = getelementptr inbounds i8, ptr %7, i64 184
  store double %14, ptr %15, align 8, !tbaa !20
  %16 = fmul double %13, %13
  %17 = tail call double @llvm.fmuladd.f64(double %10, double %10, double %16)
  %sqrt = tail call double @llvm.sqrt.f64(double %17)
  %18 = getelementptr inbounds i8, ptr %7, i64 240
  store double %sqrt, ptr %18, align 8, !tbaa !21
  %19 = getelementptr inbounds i8, ptr %7, i64 33
  %20 = load i8, ptr %19, align 1, !tbaa !22, !range !23, !noundef !24
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %44, label %22

22:                                               ; preds = %.lr.ph
  %23 = load ptr, ptr %7, align 8, !tbaa !25
  %24 = getelementptr inbounds i8, ptr %23, i64 24
  %25 = load double, ptr %24, align 8, !tbaa !26
  %26 = getelementptr inbounds i8, ptr %7, i64 29
  %27 = load i8, ptr %26, align 1, !tbaa !28, !range !23, !noundef !24
  %28 = trunc nuw i8 %27 to i1
  %29 = getelementptr inbounds i8, ptr %7, i64 136
  %30 = load double, ptr %29, align 8, !tbaa !29
  %31 = fcmp olt double %25, 0.000000e+00
  %or.cond = select i1 %28, i1 true, i1 %31
  %.pre = fneg double %25
  %.pre78 = tail call double @llvm.fmuladd.f64(double %.pre, double %30, double %13)
  %32 = fcmp ogt double %.pre78, 0.000000e+00
  %or.cond80 = select i1 %or.cond, i1 true, i1 %32
  br i1 %or.cond80, label %._crit_edge77, label %34

._crit_edge77:                                    ; preds = %22
  %33 = getelementptr inbounds i8, ptr %7, i64 208
  store double 0.000000e+00, ptr %33, align 8, !tbaa !30
  br label %44

34:                                               ; preds = %22
  %35 = getelementptr inbounds i8, ptr %23, i64 40
  %36 = load double, ptr %35, align 8, !tbaa !31
  %37 = fdiv double %13, %25
  %38 = fsub double %30, %37
  %39 = getelementptr inbounds i8, ptr %7, i64 208
  store double %38, ptr %39, align 8, !tbaa !30
  %40 = fneg double %36
  %41 = fmul double %25, %40
  %42 = tail call double @llvm.fmuladd.f64(double %41, double %38, double %10)
  %43 = fcmp ogt double %42, 0.000000e+00
  %. = select i1 %43, double %42, double 0.000000e+00
  br label %44

44:                                               ; preds = %.lr.ph, %._crit_edge77, %34
  %.1 = phi double [ %10, %._crit_edge77 ], [ %., %34 ], [ %10, %.lr.ph ]
  %.0 = phi double [ %.pre78, %._crit_edge77 ], [ 0.000000e+00, %34 ], [ %13, %.lr.ph ]
  %45 = getelementptr inbounds i8, ptr %7, i64 224
  store double %.1, ptr %45, align 8, !tbaa !32
  %46 = getelementptr inbounds i8, ptr %7, i64 232
  store double %.0, ptr %46, align 8, !tbaa !33
  %47 = fmul double %.0, %.0
  %48 = tail call double @llvm.fmuladd.f64(double %.1, double %.1, double %47)
  %sqrt75 = tail call double @llvm.sqrt.f64(double %48)
  %49 = getelementptr inbounds i8, ptr %7, i64 248
  store double %sqrt75, ptr %49, align 8, !tbaa !34
  %50 = tail call double @atan2(double noundef %.0, double noundef %.1) #5
  %51 = getelementptr inbounds i8, ptr %7, i64 192
  store double %50, ptr %51, align 8, !tbaa !35
  %52 = getelementptr inbounds i8, ptr %7, i64 176
  %53 = load double, ptr %52, align 8, !tbaa !36
  %54 = tail call double @cos(double noundef %53) #5
  %55 = fmul double %10, %54
  %56 = getelementptr inbounds i8, ptr %7, i64 272
  store double %55, ptr %56, align 8, !tbaa !37
  %57 = load double, ptr %52, align 8, !tbaa !36
  %58 = tail call double @sin(double noundef %57) #5
  %59 = fmul double %10, %58
  %60 = getelementptr inbounds i8, ptr %7, i64 280
  store double %59, ptr %60, align 8, !tbaa !38
  %61 = getelementptr inbounds i8, ptr %7, i64 288
  store double %13, ptr %61, align 8, !tbaa !39
  %62 = load double, ptr %52, align 8, !tbaa !36
  %63 = tail call double @cos(double noundef %62) #5
  %64 = fmul double %.1, %63
  %65 = getelementptr inbounds i8, ptr %7, i64 296
  store double %64, ptr %65, align 8, !tbaa !40
  %66 = load double, ptr %52, align 8, !tbaa !36
  %67 = tail call double @sin(double noundef %66) #5
  %68 = fmul double %.1, %67
  %69 = getelementptr inbounds i8, ptr %7, i64 304
  store double %68, ptr %69, align 8, !tbaa !41
  %70 = getelementptr inbounds i8, ptr %7, i64 312
  store double %.0, ptr %70, align 8, !tbaa !42
  %71 = tail call i32 @list_iterator_hasnext(ptr noundef nonnull %4) #5
  %.not = icmp eq i32 %71, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !43

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

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

; 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 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 = { 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 56}
!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 = !{!15, !15, i64 0}
!19 = !{!6, !7, i64 96}
!20 = !{!6, !15, i64 184}
!21 = !{!6, !15, i64 240}
!22 = !{!6, !11, i64 33}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!6, !7, i64 0}
!26 = !{!27, !15, i64 24}
!27 = !{!"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}
!28 = !{!6, !11, i64 29}
!29 = !{!6, !15, i64 136}
!30 = !{!6, !15, i64 208}
!31 = !{!27, !15, i64 40}
!32 = !{!6, !15, i64 224}
!33 = !{!6, !15, i64 232}
!34 = !{!6, !15, i64 248}
!35 = !{!6, !15, i64 192}
!36 = !{!6, !15, i64 176}
!37 = !{!6, !15, i64 272}
!38 = !{!6, !15, i64 280}
!39 = !{!6, !15, i64 288}
!40 = !{!6, !15, i64 296}
!41 = !{!6, !15, i64 304}
!42 = !{!6, !15, i64 312}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}


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