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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @CPodeRootInit(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %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 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %4
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef null, i32 noundef -21, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2)
  store i32 -21, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %93

17:                                               ; preds = %4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %18, ptr %10, align 8, !tbaa !5
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = icmp sle i32 %19, 0
  br i1 %20, label %21, label %24

21:                                               ; preds = %17
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.CPodeMemRec, ptr %22, i32 0, i32 158
  store i32 0, ptr %23, align 8, !tbaa !11
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %93

24:                                               ; preds = %17
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %29

27:                                               ; preds = %24
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %28, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.3)
  store i32 -22, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %93

29:                                               ; preds = %24
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.CPodeMemRec, ptr %30, i32 0, i32 150
  %32 = load i32, ptr %31, align 4, !tbaa !15
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %44

34:                                               ; preds = %29
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.CPodeMemRec, ptr %36, i32 0, i32 160
  %38 = load i32, ptr %37, align 8, !tbaa !16
  %39 = icmp ne i32 %35, %38
  br i1 %39, label %40, label %44

40:                                               ; preds = %34
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  call void @cpRootFree(ptr noundef %41)
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.CPodeMemRec, ptr %42, i32 0, i32 150
  store i32 0, ptr %43, align 4, !tbaa !15
  br label %44

44:                                               ; preds = %40, %34, %29
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.CPodeMemRec, ptr %45, i32 0, i32 150
  %47 = load i32, ptr %46, align 4, !tbaa !15
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %60, label %49

49:                                               ; preds = %44
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = load i32, ptr %7, align 4, !tbaa !9
  %52 = call i32 @cpRootAlloc(ptr noundef %50, i32 noundef %51)
  store i32 %52, ptr %11, align 4, !tbaa !9
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %57, label %55

55:                                               ; preds = %49
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef %56, i32 noundef -20, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store i32 -20, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %93

57:                                               ; preds = %49
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.CPodeMemRec, ptr %58, i32 0, i32 150
  store i32 1, ptr %59, align 4, !tbaa !15
  br label %60

60:                                               ; preds = %57, %44
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.CPodeMemRec, ptr %62, i32 0, i32 160
  store i32 %61, ptr %63, align 8, !tbaa !16
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.CPodeMemRec, ptr %65, i32 0, i32 159
  store ptr %64, ptr %66, align 8, !tbaa !17
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.CPodeMemRec, ptr %68, i32 0, i32 161
  store ptr %67, ptr %69, align 8, !tbaa !18
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %87, %60
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %90

74:                                               ; preds = %70
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.CPodeMemRec, ptr %75, i32 0, i32 164
  %77 = load ptr, ptr %76, align 8, !tbaa !19
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %77, i64 %79
  store i32 0, ptr %80, align 4, !tbaa !9
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.CPodeMemRec, ptr %81, i32 0, i32 162
  %83 = load ptr, ptr %82, align 8, !tbaa !20
  %84 = load i32, ptr %12, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  store i32 1, ptr %86, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %74
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %12, align 4, !tbaa !9
  br label %70, !llvm.loop !21

90:                                               ; preds = %70
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.CPodeMemRec, ptr %91, i32 0, i32 158
  store i32 1, ptr %92, align 8, !tbaa !11
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %93

93:                                               ; preds = %90, %55, %27, %21, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %94 = load i32, ptr %5, align 4
  ret i32 %94
}

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

declare void @cpProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
declare dso_local void @cpRootFree(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @cpRootAlloc(ptr noundef, i32 noundef) #0

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 1840}
!12 = !{!"CPodeMemRec", !13, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !13, i64 56, !13, 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, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !10, i64 264, !13, i64 272, !13, i64 280, !13, i64 288, !13, i64 296, !13, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !7, i64 336, !7, i64 448, !7, i64 496, !7, i64 600, !13, i64 704, !13, i64 712, !13, i64 720, !13, i64 728, !13, i64 736, !13, i64 744, !13, i64 752, !10, i64 760, !10, i64 764, !10, i64 768, !10, i64 772, !14, i64 776, !14, i64 784, !10, i64 792, !10, i64 796, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !13, i64 832, !6, i64 840, !6, i64 848, !6, i64 856, !14, i64 864, !14, i64 872, !13, i64 880, !10, i64 888, !10, i64 892, !10, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !10, i64 936, !14, i64 944, !14, i64 952, !14, i64 960, !14, i64 968, !10, i64 976, !10, i64 980, !6, i64 984, !6, i64 992, !10, i64 1000, !10, i64 1004, !13, i64 1008, !13, i64 1016, !6, i64 1024, !7, i64 1032, !6, i64 1136, !6, i64 1144, !6, i64 1152, !6, i64 1160, !13, i64 1168, !14, i64 1176, !14, i64 1184, !10, i64 1192, !10, i64 1196, !10, i64 1200, !14, i64 1208, !14, i64 1216, !10, i64 1224, !10, i64 1228, !13, i64 1232, !10, i64 1240, !14, i64 1248, !10, i64 1256, !10, i64 1260, !10, i64 1264, !10, i64 1268, !13, i64 1272, !13, i64 1280, !13, i64 1288, !14, i64 1296, !14, i64 1304, !14, i64 1312, !14, i64 1320, !14, i64 1328, !14, i64 1336, !10, i64 1344, !13, i64 1352, !13, i64 1360, !13, i64 1368, !14, i64 1376, !14, i64 1384, !14, i64 1392, !14, i64 1400, !14, i64 1408, !14, i64 1416, !6, i64 1424, !6, i64 1432, !6, i64 1440, !6, i64 1448, !6, i64 1456, !10, i64 1464, !6, i64 1472, !6, i64 1480, !6, i64 1488, !6, i64 1496, !6, i64 1504, !6, i64 1512, !10, i64 1520, !10, i64 1524, !14, i64 1528, !13, i64 1536, !13, i64 1544, !13, i64 1552, !10, i64 1560, !13, i64 1568, !10, i64 1576, !10, i64 1580, !10, i64 1584, !10, i64 1588, !10, i64 1592, !10, i64 1596, !6, i64 1600, !6, i64 1608, !6, i64 1616, !10, i64 1624, !7, i64 1632, !10, i64 1824, !14, i64 1832, !10, i64 1840, !6, i64 1848, !10, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888, !13, i64 1896, !13, i64 1904, !13, i64 1912, !6, i64 1920, !6, i64 1928, !6, i64 1936, !13, i64 1944, !10, i64 1952, !10, i64 1956, !14, i64 1960, !13, i64 1968, !13, i64 1976, !10, i64 1984, !10, i64 1988, !6, i64 1992, !6, i64 2000}
!13 = !{!"double", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!12, !10, i64 1596}
!16 = !{!12, !10, i64 1856}
!17 = !{!12, !6, i64 1848}
!18 = !{!12, !6, i64 1864}
!19 = !{!12, !6, i64 1888}
!20 = !{!12, !6, i64 1872}
!21 = distinct !{!21, !22}
!22 = !{!"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 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -22, 1) i32 @CPodeRootInit(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = icmp eq ptr %0, null
  br i1 %5, label %6, label %7

6:                                                ; preds = %4
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef null, i32 noundef -21, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2) #2
  br label %52

7:                                                ; preds = %4
  %8 = icmp slt i32 %1, 1
  br i1 %8, label %9, label %11

9:                                                ; preds = %7
  %10 = getelementptr inbounds i8, ptr %0, i64 1840
  store i32 0, ptr %10, align 8, !tbaa !5
  br label %52

11:                                               ; preds = %7
  %12 = icmp eq ptr %2, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %11
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3) #2
  br label %52

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 1596
  %16 = load i32, ptr %15, align 4, !tbaa !13
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %.thread, label %17

17:                                               ; preds = %14
  %18 = getelementptr inbounds i8, ptr %0, i64 1856
  %19 = load i32, ptr %18, align 8, !tbaa !14
  %.not35 = icmp eq i32 %19, %1
  br i1 %.not35, label %.lr.ph, label %20

20:                                               ; preds = %17
  tail call void @cpRootFree(ptr noundef nonnull %0)
  store i32 0, ptr %15, align 4, !tbaa !13
  br label %.thread

.thread:                                          ; preds = %14, %20
  %21 = tail call i32 @cpRootAlloc(ptr noundef nonnull %0, i32 noundef %1)
  %.not37 = icmp eq i32 %21, 0
  br i1 %.not37, label %22, label %23

22:                                               ; preds = %.thread
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cpProcessError(ptr noundef nonnull %0, i32 noundef -20, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #2
  br label %52

23:                                               ; preds = %.thread
  store i32 1, ptr %15, align 4, !tbaa !13
  br label %.lr.ph

.lr.ph:                                           ; preds = %23, %17
  %24 = getelementptr inbounds i8, ptr %0, i64 1856
  store i32 %1, ptr %24, align 8, !tbaa !14
  %25 = getelementptr inbounds i8, ptr %0, i64 1848
  store ptr %2, ptr %25, align 8, !tbaa !15
  %26 = getelementptr inbounds i8, ptr %0, i64 1864
  store ptr %3, ptr %26, align 8, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %0, i64 1888
  %28 = load ptr, ptr %27, align 8, !tbaa !17
  %29 = getelementptr inbounds i8, ptr %0, i64 1872
  %30 = load ptr, ptr %29, align 8, !tbaa !18
  %wide.trip.count = zext nneg i32 %1 to i64
  %min.iters.check = icmp ult i32 %1, 8
  %31 = ptrtoint ptr %30 to i64
  %32 = ptrtoint ptr %28 to i64
  %33 = sub i64 %31, %32
  %diff.check = icmp ult i64 %33, 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, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %34 = getelementptr inbounds i32, ptr %28, i64 %index
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  store <4 x i32> zeroinitializer, ptr %34, align 4, !tbaa !19
  store <4 x i32> zeroinitializer, ptr %35, align 4, !tbaa !19
  %36 = getelementptr inbounds i32, ptr %30, i64 %index
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %36, align 4, !tbaa !19
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %37, align 4, !tbaa !19
  %index.next = add nuw i64 %index, 8
  %38 = icmp eq i64 %index.next, %n.vec
  br i1 %38, label %middle.block, label %vector.body, !llvm.loop !20

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 ]
  %39 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv.prol
  store i32 0, ptr %39, align 4, !tbaa !19
  %40 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.prol
  store i32 1, ptr %40, align 4, !tbaa !19
  %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 !24

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 ]
  %41 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %42 = icmp ugt i64 %41, -4
  br i1 %42, 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 ]
  %43 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv
  store i32 0, ptr %43, align 4, !tbaa !19
  %44 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv
  store i32 1, ptr %44, align 4, !tbaa !19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %45 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv.next
  store i32 0, ptr %45, align 4, !tbaa !19
  %46 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.next
  store i32 1, ptr %46, align 4, !tbaa !19
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %47 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv.next.1
  store i32 0, ptr %47, align 4, !tbaa !19
  %48 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.next.1
  store i32 1, ptr %48, align 4, !tbaa !19
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %49 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv.next.2
  store i32 0, ptr %49, align 4, !tbaa !19
  %50 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv.next.2
  store i32 1, ptr %50, align 4, !tbaa !19
  %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 !26

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %51 = getelementptr inbounds i8, ptr %0, i64 1840
  store i32 1, ptr %51, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %._crit_edge, %22, %13, %9, %6
  %.031 = phi i32 [ -21, %6 ], [ 0, %9 ], [ -22, %13 ], [ 0, %._crit_edge ], [ -20, %22 ]
  ret i32 %.031
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @cpRootFree(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @cpRootAlloc(ptr noundef, i32 noundef) local_unnamed_addr #0

attributes #0 = { 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 #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 }

!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, !10, i64 1840}
!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, !10, i64 1596}
!14 = !{!6, !10, i64 1856}
!15 = !{!6, !11, i64 1848}
!16 = !{!6, !11, i64 1864}
!17 = !{!6, !11, i64 1888}
!18 = !{!6, !11, i64 1872}
!19 = !{!10, !10, i64 0}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = distinct !{!26, !21, !22}


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