; LLVM IR from simbody/simbody :: SimTKmath/Integrators/src/CPodes/sundials/src/cpodes (cpodes_root)

; 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.CPodeMemRec = type { double, i32, ptr, ptr, ptr, i32, i32, i32, double, double, ptr, ptr, ptr, [13 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, [14 x double], [6 x double], [13 x double], [13 x double], double, double, double, double, double, double, double, i32, i32, i32, i32, i64, i64, i32, i32, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, i64, i64, double, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i64, i64, i64, i64, i32, i32, ptr, ptr, i32, i32, double, double, ptr, [13 x ptr], ptr, ptr, ptr, ptr, double, i64, i64, i32, i32, i32, i64, i64, i32, i32, double, i32, i64, i32, i32, i32, i32, double, double, double, i64, i64, i64, i64, i64, i64, i32, double, double, double, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, double, double, double, i32, double, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i32, [6 x [4 x double]], i32, i64, i32, ptr, i32, ptr, ptr, ptr, ptr, double, double, double, ptr, ptr, ptr, double, i32, i32, i64, double, double, i32, i32, ptr, ptr }

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

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

declare double @RAbs(double noundef) #1

declare i32 @cpGetSolution(ptr noundef, double noundef, ptr noundef, ptr noundef) #1

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

14:                                               ; preds = %34, %1
  %15 = load i32, ptr %4, align 4, !tbaa !15
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.CPodeMemRec, ptr %16, i32 0, i32 160
  %18 = load i32, ptr %17, align 8, !tbaa !16
  %19 = icmp slt i32 %15, %18
  br i1 %19, label %20, label %37

20:                                               ; preds = %14
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.CPodeMemRec, ptr %21, i32 0, i32 169
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %24 = load i32, ptr %4, align 4, !tbaa !15
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds double, ptr %23, i64 %25
  %27 = load double, ptr %26, align 8, !tbaa !18
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.CPodeMemRec, ptr %28, i32 0, i32 168
  %30 = load ptr, ptr %29, align 8, !tbaa !19
  %31 = load i32, ptr %4, align 4, !tbaa !15
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds double, ptr %30, i64 %32
  store double %27, ptr %33, align 8, !tbaa !18
  br label %34

34:                                               ; preds = %20
  %35 = load i32, ptr %4, align 4, !tbaa !15
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %4, align 4, !tbaa !15
  br label %14, !llvm.loop !20

37:                                               ; preds = %14
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.CPodeMemRec, ptr %38, i32 0, i32 172
  %40 = load i32, ptr %39, align 8, !tbaa !22
  switch i32 %40, label %72 [
    i32 2, label %41
    i32 1, label %47
  ]

41:                                               ; preds = %37
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.CPodeMemRec, ptr %42, i32 0, i32 31
  %44 = load double, ptr %43, align 8, !tbaa !23
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.CPodeMemRec, ptr %45, i32 0, i32 166
  store double %44, ptr %46, align 8, !tbaa !9
  br label %72

47:                                               ; preds = %37
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.CPodeMemRec, ptr %48, i32 0, i32 171
  %50 = load double, ptr %49, align 8, !tbaa !24
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.CPodeMemRec, ptr %51, i32 0, i32 31
  %53 = load double, ptr %52, align 8, !tbaa !23
  %54 = fsub double %50, %53
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.CPodeMemRec, ptr %55, i32 0, i32 26
  %57 = load double, ptr %56, align 8, !tbaa !25
  %58 = fmul double %54, %57
  %59 = fcmp oge double %58, 0.000000e+00
  br i1 %59, label %60, label %64

60:                                               ; preds = %47
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.CPodeMemRec, ptr %61, i32 0, i32 31
  %63 = load double, ptr %62, align 8, !tbaa !23
  br label %68

64:                                               ; preds = %47
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.CPodeMemRec, ptr %65, i32 0, i32 171
  %67 = load double, ptr %66, align 8, !tbaa !24
  br label %68

68:                                               ; preds = %64, %60
  %69 = phi double [ %63, %60 ], [ %67, %64 ]
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.CPodeMemRec, ptr %70, i32 0, i32 166
  store double %69, ptr %71, align 8, !tbaa !9
  br label %72

72:                                               ; preds = %68, %41, %37
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.CPodeMemRec, ptr %74, i32 0, i32 166
  %76 = load double, ptr %75, align 8, !tbaa !9
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.CPodeMemRec, ptr %77, i32 0, i32 15
  %79 = load ptr, ptr %78, align 8, !tbaa !26
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.CPodeMemRec, ptr %80, i32 0, i32 16
  %82 = load ptr, ptr %81, align 8, !tbaa !27
  %83 = call i32 @cpGetSolution(ptr noundef %73, double noundef %76, ptr noundef %79, ptr noundef %82)
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.CPodeMemRec, ptr %84, i32 0, i32 159
  %86 = load ptr, ptr %85, align 8, !tbaa !28
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.CPodeMemRec, ptr %87, i32 0, i32 166
  %89 = load double, ptr %88, align 8, !tbaa !9
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.CPodeMemRec, ptr %90, i32 0, i32 15
  %92 = load ptr, ptr %91, align 8, !tbaa !26
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.CPodeMemRec, ptr %93, i32 0, i32 16
  %95 = load ptr, ptr %94, align 8, !tbaa !27
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.CPodeMemRec, ptr %96, i32 0, i32 169
  %98 = load ptr, ptr %97, align 8, !tbaa !17
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.CPodeMemRec, ptr %99, i32 0, i32 161
  %101 = load ptr, ptr %100, align 8, !tbaa !29
  %102 = call i32 %86(double noundef %89, ptr noundef %92, ptr noundef %95, ptr noundef %98, ptr noundef %101)
  store i32 %102, ptr %5, align 4, !tbaa !15
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.CPodeMemRec, ptr %103, i32 0, i32 174
  %105 = load i64, ptr %104, align 8, !tbaa !30
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %104, align 8, !tbaa !30
  %107 = load i32, ptr %5, align 4, !tbaa !15
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %72
  store i32 -12, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %183

110:                                              ; preds = %72
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.CPodeMemRec, ptr %111, i32 0, i32 31
  %113 = load double, ptr %112, align 8, !tbaa !23
  %114 = call double @RAbs(double noundef %113)
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.CPodeMemRec, ptr %115, i32 0, i32 26
  %117 = load double, ptr %116, align 8, !tbaa !25
  %118 = call double @RAbs(double noundef %117)
  %119 = fadd double %114, %118
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.CPodeMemRec, ptr %120, i32 0, i32 0
  %122 = load double, ptr %121, align 8, !tbaa !31
  %123 = fmul double %119, %122
  %124 = fmul double %123, 1.000000e+02
  store double %124, ptr %7, align 8, !tbaa !18
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = load double, ptr %7, align 8, !tbaa !18
  %127 = call i32 @cpRootfind(ptr noundef %125, double noundef %126)
  store i32 %127, ptr %6, align 4, !tbaa !15
  %128 = load i32, ptr %6, align 4, !tbaa !15
  %129 = icmp eq i32 %128, -12
  br i1 %129, label %130, label %131

130:                                              ; preds = %110
  store i32 -12, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %183

131:                                              ; preds = %110
  store i32 0, ptr %4, align 4, !tbaa !15
  br label %132

132:                                              ; preds = %164, %131
  %133 = load i32, ptr %4, align 4, !tbaa !15
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.CPodeMemRec, ptr %134, i32 0, i32 160
  %136 = load i32, ptr %135, align 8, !tbaa !16
  %137 = icmp slt i32 %133, %136
  br i1 %137, label %138, label %167

138:                                              ; preds = %132
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.CPodeMemRec, ptr %139, i32 0, i32 162
  %141 = load ptr, ptr %140, align 8, !tbaa !32
  %142 = load i32, ptr %4, align 4, !tbaa !15
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds i32, ptr %141, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !15
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %163, label %147

147:                                              ; preds = %138
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.CPodeMemRec, ptr %148, i32 0, i32 170
  %150 = load ptr, ptr %149, align 8, !tbaa !33
  %151 = load i32, ptr %4, align 4, !tbaa !15
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds double, ptr %150, i64 %152
  %154 = load double, ptr %153, align 8, !tbaa !18
  %155 = fcmp une double %154, 0.000000e+00
  br i1 %155, label %156, label %163

156:                                              ; preds = %147
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.CPodeMemRec, ptr %157, i32 0, i32 162
  %159 = load ptr, ptr %158, align 8, !tbaa !32
  %160 = load i32, ptr %4, align 4, !tbaa !15
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i32, ptr %159, i64 %161
  store i32 1, ptr %162, align 4, !tbaa !15
  br label %163

163:                                              ; preds = %156, %147, %138
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %4, align 4, !tbaa !15
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %4, align 4, !tbaa !15
  br label %132, !llvm.loop !34

167:                                              ; preds = %132
  %168 = load i32, ptr %6, align 4, !tbaa !15
  %169 = icmp eq i32 %168, 0
  br i1 %169, label %170, label %171

170:                                              ; preds = %167
  store i32 0, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %183

171:                                              ; preds = %167
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.CPodeMemRec, ptr %173, i32 0, i32 167
  %175 = load double, ptr %174, align 8, !tbaa !35
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.CPodeMemRec, ptr %176, i32 0, i32 15
  %178 = load ptr, ptr %177, align 8, !tbaa !26
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.CPodeMemRec, ptr %179, i32 0, i32 16
  %181 = load ptr, ptr %180, align 8, !tbaa !27
  %182 = call i32 @cpGetSolution(ptr noundef %172, double noundef %175, ptr noundef %178, ptr noundef %181)
  store i32 1, ptr %2, align 4
  store i32 1, ptr %8, align 4
  br label %183

183:                                              ; preds = %171, %170, %130, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  %184 = load i32, ptr %2, align 4
  ret i32 %184
}

; Function Attrs: nounwind uwtable
declare hidden i32 @cpRootfind(ptr noundef, 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 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, !11, i64 1904}
!10 = !{!"CPodeMemRec", !11, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !12, i64 48, !11, i64 56, !11, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !7, i64 96, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !12, i64 248, !12, i64 252, !12, i64 256, !12, i64 260, !12, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !7, i64 336, !7, i64 448, !7, i64 496, !7, i64 600, !11, i64 704, !11, i64 712, !11, i64 720, !11, i64 728, !11, i64 736, !11, i64 744, !11, i64 752, !12, i64 760, !12, i64 764, !12, i64 768, !12, i64 772, !13, i64 776, !13, i64 784, !12, i64 792, !12, i64 796, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !11, i64 832, !6, i64 840, !6, i64 848, !6, i64 856, !13, i64 864, !13, i64 872, !11, i64 880, !12, i64 888, !12, i64 892, !12, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !12, i64 936, !13, i64 944, !13, i64 952, !13, i64 960, !13, i64 968, !12, i64 976, !12, i64 980, !6, i64 984, !6, i64 992, !12, i64 1000, !12, i64 1004, !11, i64 1008, !11, i64 1016, !6, i64 1024, !7, i64 1032, !6, i64 1136, !6, i64 1144, !6, i64 1152, !6, i64 1160, !11, i64 1168, !13, i64 1176, !13, i64 1184, !12, i64 1192, !12, i64 1196, !12, i64 1200, !13, i64 1208, !13, i64 1216, !12, i64 1224, !12, i64 1228, !11, i64 1232, !12, i64 1240, !13, i64 1248, !12, i64 1256, !12, i64 1260, !12, i64 1264, !12, i64 1268, !11, i64 1272, !11, i64 1280, !11, i64 1288, !13, i64 1296, !13, i64 1304, !13, i64 1312, !13, i64 1320, !13, i64 1328, !13, i64 1336, !12, i64 1344, !11, i64 1352, !11, i64 1360, !11, i64 1368, !13, i64 1376, !13, i64 1384, !13, i64 1392, !13, i64 1400, !13, i64 1408, !13, i64 1416, !6, i64 1424, !6, i64 1432, !6, i64 1440, !6, i64 1448, !6, i64 1456, !12, i64 1464, !6, i64 1472, !6, i64 1480, !6, i64 1488, !6, i64 1496, !6, i64 1504, !6, i64 1512, !12, i64 1520, !12, i64 1524, !13, i64 1528, !11, i64 1536, !11, i64 1544, !11, i64 1552, !12, i64 1560, !11, i64 1568, !12, i64 1576, !12, i64 1580, !12, i64 1584, !12, i64 1588, !12, i64 1592, !12, i64 1596, !6, i64 1600, !6, i64 1608, !6, i64 1616, !12, i64 1624, !7, i64 1632, !12, i64 1824, !13, i64 1832, !12, i64 1840, !6, i64 1848, !12, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888, !11, i64 1896, !11, i64 1904, !11, i64 1912, !6, i64 1920, !6, i64 1928, !6, i64 1936, !11, i64 1944, !12, i64 1952, !12, i64 1956, !13, i64 1960, !11, i64 1968, !11, i64 1976, !12, i64 1984, !12, i64 1988, !6, i64 1992, !6, i64 2000}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!10, !11, i64 1896}
!15 = !{!12, !12, i64 0}
!16 = !{!10, !12, i64 1856}
!17 = !{!10, !6, i64 1928}
!18 = !{!11, !11, i64 0}
!19 = !{!10, !6, i64 1920}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !12, i64 1952}
!23 = !{!10, !11, i64 320}
!24 = !{!10, !11, i64 1944}
!25 = !{!10, !11, i64 280}
!26 = !{!10, !6, i64 208}
!27 = !{!10, !6, i64 216}
!28 = !{!10, !6, i64 1848}
!29 = !{!10, !6, i64 1864}
!30 = !{!10, !13, i64 1960}
!31 = !{!10, !11, i64 0}
!32 = !{!10, !6, i64 1872}
!33 = !{!10, !6, i64 1936}
!34 = distinct !{!34, !21}
!35 = !{!10, !11, i64 1912}


; 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 double @RAbs(double noundef) local_unnamed_addr #0

declare i32 @cpGetSolution(ptr noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 -12, 2) i32 @cpRcheck3(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 1904
  %3 = load double, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 1896
  store double %3, ptr %4, align 8, !tbaa !13
  %5 = getelementptr inbounds i8, ptr %0, i64 1856
  %6 = load i32, ptr %5, align 8, !tbaa !14
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 1928
  %9 = load ptr, ptr %8, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %0, i64 1920
  %11 = load ptr, ptr %10, align 8, !tbaa !16
  %wide.trip.count = zext nneg i32 %6 to i64
  %min.iters.check = icmp ult i32 %6, 6
  %12 = ptrtoint ptr %11 to i64
  %13 = ptrtoint ptr %9 to i64
  %14 = sub i64 %12, %13
  %diff.check = icmp ult i64 %14, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %15 = getelementptr inbounds double, ptr %9, i64 %index
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %wide.load = load <2 x double>, ptr %15, align 8, !tbaa !17
  %wide.load62 = load <2 x double>, ptr %16, align 8, !tbaa !17
  %17 = getelementptr inbounds double, ptr %11, i64 %index
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  store <2 x double> %wide.load, ptr %17, align 8, !tbaa !17
  store <2 x double> %wide.load62, ptr %18, align 8, !tbaa !17
  %index.next = add nuw i64 %index, 4
  %19 = icmp eq i64 %index.next, %n.vec
  br i1 %19, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %20 = getelementptr inbounds double, ptr %9, i64 %indvars.iv.prol
  %21 = load double, ptr %20, align 8, !tbaa !17
  %22 = getelementptr inbounds double, ptr %11, i64 %indvars.iv.prol
  store double %21, ptr %22, align 8, !tbaa !17
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !22

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %23 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %24 = icmp ugt i64 %23, -4
  br i1 %24, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %25 = getelementptr inbounds double, ptr %9, i64 %indvars.iv
  %26 = load double, ptr %25, align 8, !tbaa !17
  %27 = getelementptr inbounds double, ptr %11, i64 %indvars.iv
  store double %26, ptr %27, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = getelementptr inbounds double, ptr %9, i64 %indvars.iv.next
  %29 = load double, ptr %28, align 8, !tbaa !17
  %30 = getelementptr inbounds double, ptr %11, i64 %indvars.iv.next
  store double %29, ptr %30, align 8, !tbaa !17
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %31 = getelementptr inbounds double, ptr %9, i64 %indvars.iv.next.1
  %32 = load double, ptr %31, align 8, !tbaa !17
  %33 = getelementptr inbounds double, ptr %11, i64 %indvars.iv.next.1
  store double %32, ptr %33, align 8, !tbaa !17
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %34 = getelementptr inbounds double, ptr %9, i64 %indvars.iv.next.2
  %35 = load double, ptr %34, align 8, !tbaa !17
  %36 = getelementptr inbounds double, ptr %11, i64 %indvars.iv.next.2
  store double %35, ptr %36, align 8, !tbaa !17
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge, label %scalar.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %1
  %37 = getelementptr inbounds i8, ptr %0, i64 1952
  %38 = load i32, ptr %37, align 8, !tbaa !25
  switch i32 %38, label %._crit_edge._crit_edge [
    i32 2, label %39
    i32 1, label %42
  ]

._crit_edge._crit_edge:                           ; preds = %._crit_edge
  %.pre = load double, ptr %2, align 8, !tbaa !5
  br label %52

39:                                               ; preds = %._crit_edge
  %40 = getelementptr inbounds i8, ptr %0, i64 320
  %41 = load double, ptr %40, align 8, !tbaa !26
  store double %41, ptr %2, align 8, !tbaa !5
  br label %52

42:                                               ; preds = %._crit_edge
  %43 = getelementptr inbounds i8, ptr %0, i64 1944
  %44 = load double, ptr %43, align 8, !tbaa !27
  %45 = getelementptr inbounds i8, ptr %0, i64 320
  %46 = load double, ptr %45, align 8, !tbaa !26
  %47 = fsub double %44, %46
  %48 = getelementptr inbounds i8, ptr %0, i64 280
  %49 = load double, ptr %48, align 8, !tbaa !28
  %50 = fmul double %47, %49
  %51 = fcmp ult double %50, 0.000000e+00
  %. = select i1 %51, double %44, double %46
  store double %., ptr %2, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %._crit_edge._crit_edge, %42, %39
  %53 = phi double [ %.pre, %._crit_edge._crit_edge ], [ %., %42 ], [ %41, %39 ]
  %54 = getelementptr inbounds i8, ptr %0, i64 208
  %55 = load ptr, ptr %54, align 8, !tbaa !29
  %56 = getelementptr inbounds i8, ptr %0, i64 216
  %57 = load ptr, ptr %56, align 8, !tbaa !30
  %58 = tail call i32 @cpGetSolution(ptr noundef nonnull %0, double noundef %53, ptr noundef %55, ptr noundef %57) #2
  %59 = getelementptr inbounds i8, ptr %0, i64 1848
  %60 = load ptr, ptr %59, align 8, !tbaa !31
  %61 = load double, ptr %2, align 8, !tbaa !5
  %62 = load ptr, ptr %54, align 8, !tbaa !29
  %63 = load ptr, ptr %56, align 8, !tbaa !30
  %64 = getelementptr inbounds i8, ptr %0, i64 1928
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = getelementptr inbounds i8, ptr %0, i64 1864
  %67 = load ptr, ptr %66, align 8, !tbaa !32
  %68 = tail call i32 %60(double noundef %61, ptr noundef %62, ptr noundef %63, ptr noundef %65, ptr noundef %67) #2
  %69 = getelementptr inbounds i8, ptr %0, i64 1960
  %70 = load i64, ptr %69, align 8, !tbaa !33
  %71 = add nsw i64 %70, 1
  store i64 %71, ptr %69, align 8, !tbaa !33
  %.not = icmp eq i32 %68, 0
  br i1 %.not, label %72, label %111

72:                                               ; preds = %52
  %73 = getelementptr inbounds i8, ptr %0, i64 320
  %74 = load double, ptr %73, align 8, !tbaa !26
  %75 = tail call double @RAbs(double noundef %74) #2
  %76 = getelementptr inbounds i8, ptr %0, i64 280
  %77 = load double, ptr %76, align 8, !tbaa !28
  %78 = tail call double @RAbs(double noundef %77) #2
  %79 = fadd double %75, %78
  %80 = load double, ptr %0, align 8, !tbaa !34
  %81 = fmul double %79, %80
  %82 = fmul double %81, 1.000000e+02
  %83 = tail call i32 @cpRootfind(ptr noundef nonnull %0, double noundef %82)
  %84 = icmp eq i32 %83, -12
  br i1 %84, label %111, label %.preheader

.preheader:                                       ; preds = %72
  %85 = load i32, ptr %5, align 8, !tbaa !14
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %.lr.ph55, label %._crit_edge56

.lr.ph55:                                         ; preds = %.preheader
  %87 = getelementptr inbounds i8, ptr %0, i64 1872
  %88 = load ptr, ptr %87, align 8, !tbaa !35
  %89 = getelementptr inbounds i8, ptr %0, i64 1936
  br label %90

90:                                               ; preds = %.lr.ph55, %100
  %91 = phi i32 [ %85, %.lr.ph55 ], [ %101, %100 ]
  %indvars.iv58 = phi i64 [ 0, %.lr.ph55 ], [ %indvars.iv.next59, %100 ]
  %92 = getelementptr inbounds i32, ptr %88, i64 %indvars.iv58
  %93 = load i32, ptr %92, align 4, !tbaa !36
  %.not52 = icmp eq i32 %93, 0
  br i1 %.not52, label %94, label %100

94:                                               ; preds = %90
  %95 = load ptr, ptr %89, align 8, !tbaa !37
  %96 = getelementptr inbounds double, ptr %95, i64 %indvars.iv58
  %97 = load double, ptr %96, align 8, !tbaa !17
  %98 = fcmp une double %97, 0.000000e+00
  br i1 %98, label %99, label %100

99:                                               ; preds = %94
  store i32 1, ptr %92, align 4, !tbaa !36
  %.pre61 = load i32, ptr %5, align 8, !tbaa !14
  br label %100

100:                                              ; preds = %90, %94, %99
  %101 = phi i32 [ %91, %90 ], [ %91, %94 ], [ %.pre61, %99 ]
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %102 = sext i32 %101 to i64
  %103 = icmp slt i64 %indvars.iv.next59, %102
  br i1 %103, label %90, label %._crit_edge56, !llvm.loop !38

._crit_edge56:                                    ; preds = %100, %.preheader
  %104 = icmp eq i32 %83, 0
  br i1 %104, label %111, label %105

105:                                              ; preds = %._crit_edge56
  %106 = getelementptr inbounds i8, ptr %0, i64 1912
  %107 = load double, ptr %106, align 8, !tbaa !39
  %108 = load ptr, ptr %54, align 8, !tbaa !29
  %109 = load ptr, ptr %56, align 8, !tbaa !30
  %110 = tail call i32 @cpGetSolution(ptr noundef nonnull %0, double noundef %107, ptr noundef %108, ptr noundef %109) #2
  br label %111

111:                                              ; preds = %._crit_edge56, %72, %52, %105
  %.0 = phi i32 [ 1, %105 ], [ -12, %52 ], [ -12, %72 ], [ 0, %._crit_edge56 ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @cpRootfind(ptr noundef, double noundef) local_unnamed_addr #1

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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, !7, i64 1904}
!6 = !{!"CPodeMemRec", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !7, i64 56, !7, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !8, i64 96, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !8, i64 336, !8, i64 448, !8, i64 496, !8, i64 600, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !10, i64 760, !10, i64 764, !10, i64 768, !10, i64 772, !12, i64 776, !12, i64 784, !10, i64 792, !10, i64 796, !11, i64 800, !11, i64 808, !11, i64 816, !11, i64 824, !7, i64 832, !11, i64 840, !11, i64 848, !11, i64 856, !12, i64 864, !12, i64 872, !7, i64 880, !10, i64 888, !10, i64 892, !10, i64 896, !11, i64 904, !11, i64 912, !11, i64 920, !11, i64 928, !10, i64 936, !12, i64 944, !12, i64 952, !12, i64 960, !12, i64 968, !10, i64 976, !10, i64 980, !11, i64 984, !11, i64 992, !10, i64 1000, !10, i64 1004, !7, i64 1008, !7, i64 1016, !11, i64 1024, !8, i64 1032, !11, i64 1136, !11, i64 1144, !11, i64 1152, !11, i64 1160, !7, i64 1168, !12, i64 1176, !12, i64 1184, !10, i64 1192, !10, i64 1196, !10, i64 1200, !12, i64 1208, !12, i64 1216, !10, i64 1224, !10, i64 1228, !7, i64 1232, !10, i64 1240, !12, i64 1248, !10, i64 1256, !10, i64 1260, !10, i64 1264, !10, i64 1268, !7, i64 1272, !7, i64 1280, !7, i64 1288, !12, i64 1296, !12, i64 1304, !12, i64 1312, !12, i64 1320, !12, i64 1328, !12, i64 1336, !10, i64 1344, !7, i64 1352, !7, i64 1360, !7, i64 1368, !12, i64 1376, !12, i64 1384, !12, i64 1392, !12, i64 1400, !12, i64 1408, !12, i64 1416, !11, i64 1424, !11, i64 1432, !11, i64 1440, !11, i64 1448, !11, i64 1456, !10, i64 1464, !11, i64 1472, !11, i64 1480, !11, i64 1488, !11, i64 1496, !11, i64 1504, !11, i64 1512, !10, i64 1520, !10, i64 1524, !12, i64 1528, !7, i64 1536, !7, i64 1544, !7, i64 1552, !10, i64 1560, !7, i64 1568, !10, i64 1576, !10, i64 1580, !10, i64 1584, !10, i64 1588, !10, i64 1592, !10, i64 1596, !11, i64 1600, !11, i64 1608, !11, i64 1616, !10, i64 1624, !8, i64 1632, !10, i64 1824, !12, i64 1832, !10, i64 1840, !11, i64 1848, !10, i64 1856, !11, i64 1864, !11, i64 1872, !11, i64 1880, !11, i64 1888, !7, i64 1896, !7, i64 1904, !7, i64 1912, !11, i64 1920, !11, i64 1928, !11, i64 1936, !7, i64 1944, !10, i64 1952, !10, i64 1956, !12, i64 1960, !7, i64 1968, !7, i64 1976, !10, i64 1984, !10, i64 1988, !11, i64 1992, !11, i64 2000}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !7, i64 1896}
!14 = !{!6, !10, i64 1856}
!15 = !{!6, !11, i64 1928}
!16 = !{!6, !11, i64 1920}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !19, !20}
!25 = !{!6, !10, i64 1952}
!26 = !{!6, !7, i64 320}
!27 = !{!6, !7, i64 1944}
!28 = !{!6, !7, i64 280}
!29 = !{!6, !11, i64 208}
!30 = !{!6, !11, i64 216}
!31 = !{!6, !11, i64 1848}
!32 = !{!6, !11, i64 1864}
!33 = !{!6, !12, i64 1960}
!34 = !{!6, !7, i64 0}
!35 = !{!6, !11, i64 1872}
!36 = !{!10, !10, i64 0}
!37 = !{!6, !11, i64 1936}
!38 = distinct !{!38, !19}
!39 = !{!6, !7, i64 1912}


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