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

@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 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

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

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

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

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

22:                                               ; preds = %17
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.Domain_t, ptr %23, i32 0, i32 7
  %25 = call ptr @list_iterator_next(ptr noundef %24)
  store ptr %25, ptr %11, align 8, !tbaa !5
  %26 = load ptr, ptr %11, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.Line_t, ptr %26, i32 0, i32 10
  %28 = load double, ptr %27, align 8, !tbaa !13
  %29 = fcmp olt double %28, 0.000000e+00
  br i1 %29, label %30, label %37

30:                                               ; preds = %22
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = load i32, ptr %12, align 4, !tbaa !11
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.Line_t, ptr %34, i32 0, i32 10
  %36 = load double, ptr %35, align 8, !tbaa !13
  call void (ptr, ptr, i32, ptr, ...) @set_universal_error_with_message(ptr noundef %31, ptr noundef %32, i32 noundef 54, ptr noundef @.str.1, i32 noundef %33, double noundef %36)
  br label %110

37:                                               ; preds = %22
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.Line_t, ptr %38, i32 0, i32 12
  %40 = load double, ptr %39, align 8, !tbaa !22
  %41 = fcmp ole double %40, 0xBC9CD2B297D889BC
  br i1 %41, label %42, label %49

42:                                               ; preds = %37
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = load i32, ptr %12, align 4, !tbaa !11
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.Line_t, ptr %46, i32 0, i32 12
  %48 = load double, ptr %47, align 8, !tbaa !22
  call void (ptr, ptr, i32, ptr, ...) @set_universal_error_with_message(ptr noundef %43, ptr noundef %44, i32 noundef 55, ptr noundef @.str.2, i32 noundef %45, double noundef %48)
  br label %110

49:                                               ; preds = %37
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.Line_t, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  %53 = getelementptr inbounds %struct.CableLibrary_t, ptr %52, i32 0, i32 3
  %54 = load double, ptr %53, align 8, !tbaa !24
  %55 = fcmp ogt double %54, 0.000000e+00
  br i1 %55, label %56, label %73

56:                                               ; preds = %49
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Line_t, ptr %58, i32 0, i32 1
  %60 = getelementptr inbounds %struct.LineOptions, ptr %59, i32 0, i32 21
  %61 = load i8, ptr %60, align 1, !tbaa !26, !range !27, !noundef !28
  %62 = trunc i8 %61 to i1
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = call i32 @check_maximum_line_length(ptr noundef %57, i1 noundef zeroext %62, ptr noundef %63, ptr noundef %64)
  store i32 %65, ptr %10, align 4, !tbaa !11
  %66 = load i32, ptr %10, align 4, !tbaa !11
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %72

68:                                               ; preds = %56
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = load i32, ptr %12, align 4, !tbaa !11
  call void (ptr, ptr, i32, ptr, ...) @set_universal_error_with_message(ptr noundef %69, ptr noundef %70, i32 noundef 59, ptr noundef @.str.3, i32 noundef %71)
  br label %110

72:                                               ; preds = %56
  br label %73

73:                                               ; preds = %72, %49
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.Line_t, ptr %76, i32 0, i32 1
  %78 = getelementptr inbounds %struct.LineOptions, ptr %77, i32 0, i32 25
  %79 = load i8, ptr %78, align 1, !tbaa !29, !range !27, !noundef !28
  %80 = trunc i8 %79 to i1
  br i1 %80, label %81, label %92

81:                                               ; preds = %75
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = call i32 @solve_linear_spring_cable(ptr noundef %82, ptr noundef %83, ptr noundef %84)
  store i32 %85, ptr %10, align 4, !tbaa !11
  %86 = load i32, ptr %10, align 4, !tbaa !11
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %91

88:                                               ; preds = %81
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %89, ptr noundef %90, i32 noundef 87)
  br label %110

91:                                               ; preds = %81
  br label %107

92:                                               ; preds = %75
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.Domain_t, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %12, align 4, !tbaa !11
  %97 = load float, ptr %7, align 4, !tbaa !9
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = call i32 @call_minpack_lmder(ptr noundef %93, ptr noundef %95, i32 noundef %96, float noundef %97, ptr noundef %98, ptr noundef %99)
  store i32 %100, ptr %10, align 4, !tbaa !11
  %101 = load i32, ptr %10, align 4, !tbaa !11
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %106

103:                                              ; preds = %92
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  call void @set_universal_error(ptr noundef %104, ptr noundef %105, i32 noundef 79)
  br label %110

106:                                              ; preds = %92
  br label %107

107:                                              ; preds = %106, %91
  %108 = load i32, ptr %12, align 4, !tbaa !11
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %12, align 4, !tbaa !11
  br label %17, !llvm.loop !30

110:                                              ; preds = %103, %88, %68, %42, %30, %17
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.Domain_t, ptr %111, i32 0, i32 7
  %113 = call i32 @list_iterator_stop(ptr noundef %112)
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load i32, ptr %114, align 4, !tbaa !11
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %118

117:                                              ; preds = %110
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %129

118:                                              ; preds = %110
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load i32, ptr %119, align 4, !tbaa !11
  %121 = icmp eq i32 %120, 1
  br i1 %121, label %122, label %123

122:                                              ; preds = %118
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %129

123:                                              ; preds = %118
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = load i32, ptr %124, align 4, !tbaa !11
  %126 = icmp eq i32 %125, 2
  br i1 %126, label %127, label %128

127:                                              ; preds = %123
  store i32 2, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %129

128:                                              ; preds = %123
  store i32 3, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %129

129:                                              ; preds = %128, %127, %122, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %130 = load i32, ptr %5, align 4
  ret i32 %130
}

declare void @set_universal_error(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @check_maximum_line_length(ptr noundef, i1 noundef zeroext, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @solve_linear_spring_cable(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @call_minpack_lmder(ptr noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) #1

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 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 #3 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !19, i64 200}
!14 = !{!"Line_t", !6, i64 0, !15, i64 8, !17, i64 40, !17, i64 80, !18, i64 120, !6, i64 160, !6, i64 168, !19, i64 176, !19, i64 184, !19, i64 192, !19, i64 200, !19, i64 208, !19, i64 216, !19, i64 224, !19, i64 232, !19, i64 240, !19, i64 248, !19, i64 256, !19, i64 264, !19, i64 272, !19, i64 280, !19, i64 288, !19, i64 296, !19, i64 304, !19, i64 312, !20, i64 320, !6, i64 440, !6, i64 448, !12, i64 456, !12, i64 460, !12, i64 464, !12, i64 468, !12, i64 472}
!15 = !{!"", !16, i64 0, !16, i64 1, !16, i64 2, !16, i64 3, !16, i64 4, !16, i64 5, !16, i64 6, !16, i64 7, !16, i64 8, !16, i64 9, !16, i64 10, !16, i64 11, !16, i64 12, !16, i64 13, !16, i64 14, !16, i64 15, !16, i64 16, !16, i64 17, !16, i64 18, !16, i64 19, !16, i64 20, !16, i64 21, !16, i64 22, !16, i64 23, !16, i64 24, !16, i64 25}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"VarTypePtr_t", !6, i64 0, !6, i64 8, !6, i64 16, !16, i64 24, !12, i64 28, !12, i64 32}
!18 = !{!"VarType_t", !6, i64 0, !6, i64 8, !19, i64 16, !16, i64 24, !16, i64 25, !12, i64 28, !12, i64 32}
!19 = !{!"double", !7, i64 0}
!20 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !12, i64 48, !6, i64 56, !21, i64 64}
!21 = !{!"list_attributes_s", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!22 = !{!14, !19, i64 216}
!23 = !{!14, !6, i64 0}
!24 = !{!25, !19, i64 24}
!25 = !{!"CableLibrary_t", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !19, i64 72, !6, i64 80}
!26 = !{!14, !16, i64 29}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!14, !16, i64 33}
!30 = distinct !{!30, !31}
!31 = !{!"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"

@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@switch.table.solve_line = private unnamed_addr constant [3 x i32] [i32 0, i32 0, i32 2], align 4

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

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

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

.lr.ph:                                           ; preds = %4, %39
  %.064 = phi i32 [ %40, %39 ], [ 1, %4 ]
  %8 = tail call ptr @list_iterator_next(ptr noundef nonnull %5) #2
  %9 = getelementptr inbounds i8, ptr %8, i64 200
  %10 = load double, ptr %9, align 8, !tbaa !5
  %11 = fcmp olt double %10, 0.000000e+00
  br i1 %11, label %12, label %13

12:                                               ; preds = %.lr.ph
  tail call void (ptr, ptr, i32, ptr, ...) @set_universal_error_with_message(ptr noundef %2, ptr noundef %3, i32 noundef 54, ptr noundef nonnull @.str.1, i32 noundef %.064, double noundef %10) #2
  br label %.loopexit

13:                                               ; preds = %.lr.ph
  %14 = getelementptr inbounds i8, ptr %8, i64 216
  %15 = load double, ptr %14, align 8, !tbaa !18
  %16 = fcmp ugt double %15, 0xBC9CD2B297D889BC
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  tail call void (ptr, ptr, i32, ptr, ...) @set_universal_error_with_message(ptr noundef %2, ptr noundef %3, i32 noundef 55, ptr noundef nonnull @.str.2, i32 noundef %.064, double noundef %15) #2
  br label %.loopexit

18:                                               ; preds = %13
  %19 = load ptr, ptr %8, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  %21 = load double, ptr %20, align 8, !tbaa !20
  %22 = fcmp ogt double %21, 0.000000e+00
  br i1 %22, label %23, label %29

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %8, i64 29
  %25 = load i8, ptr %24, align 1, !tbaa !22, !range !23, !noundef !24
  %26 = trunc nuw i8 %25 to i1
  %27 = tail call i32 @check_maximum_line_length(ptr noundef nonnull %8, i1 noundef zeroext %26, ptr noundef %2, ptr noundef %3)
  %.not47 = icmp eq i32 %27, 0
  br i1 %.not47, label %29, label %28

28:                                               ; preds = %23
  tail call void (ptr, ptr, i32, ptr, ...) @set_universal_error_with_message(ptr noundef %2, ptr noundef %3, i32 noundef 59, ptr noundef nonnull @.str.3, i32 noundef %.064) #2
  br label %.loopexit

29:                                               ; preds = %23, %18
  %30 = getelementptr inbounds i8, ptr %8, i64 33
  %31 = load i8, ptr %30, align 1, !tbaa !25, !range !23, !noundef !24
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %33, label %36

33:                                               ; preds = %29
  %34 = tail call i32 @solve_linear_spring_cable(ptr noundef nonnull %8, ptr noundef %2, ptr noundef %3)
  %.not49 = icmp eq i32 %34, 0
  br i1 %.not49, label %39, label %35

35:                                               ; preds = %33
  tail call void @set_universal_error(ptr noundef %2, ptr noundef %3, i32 noundef 87) #2
  br label %.loopexit

36:                                               ; preds = %29
  %37 = tail call i32 @call_minpack_lmder(ptr noundef nonnull %8, ptr noundef %0, i32 noundef %.064, float noundef %1, ptr noundef %2, ptr noundef %3) #2
  %.not48 = icmp eq i32 %37, 0
  br i1 %.not48, label %39, label %38

38:                                               ; preds = %36
  tail call void @set_universal_error(ptr noundef %2, ptr noundef %3, i32 noundef 79) #2
  br label %.loopexit

39:                                               ; preds = %36, %33
  %40 = add nuw nsw i32 %.064, 1
  %41 = tail call i32 @list_iterator_hasnext(ptr noundef nonnull %5) #2
  %.not = icmp eq i32 %41, 0
  br i1 %.not, label %.loopexit, label %.lr.ph, !llvm.loop !26

.loopexit:                                        ; preds = %39, %4, %38, %35, %28, %17, %12
  %42 = tail call i32 @list_iterator_stop(ptr noundef nonnull %5) #2
  %43 = load i32, ptr %3, align 4, !tbaa !28
  %44 = icmp ult i32 %43, 3
  br i1 %44, label %switch.lookup, label %46

switch.lookup:                                    ; preds = %.loopexit
  %45 = zext nneg i32 %43 to i64
  %switch.gep = getelementptr inbounds [3 x i32], ptr @switch.table.solve_line, i64 0, i64 %45
  %switch.load = load i32, ptr %switch.gep, align 4
  br label %46

46:                                               ; preds = %.loopexit, %switch.lookup
  %.043 = phi i32 [ %switch.load, %switch.lookup ], [ 3, %.loopexit ]
  ret i32 %.043
}

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @check_maximum_line_length(ptr noundef, i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @solve_linear_spring_cable(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @call_minpack_lmder(ptr noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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 = { 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 #2 = { 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, !15, i64 200}
!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 = !{!6, !15, i64 216}
!19 = !{!6, !7, i64 0}
!20 = !{!21, !15, i64 24}
!21 = !{!"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}
!22 = !{!6, !11, i64 29}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!6, !11, i64 33}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!13, !13, i64 0}


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