; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/src/cvodes (cvodes_io)

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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [32 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 void @cvProcessError(ptr noundef, i32 noundef, ptr noundef, ptr noundef, 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 uwtable
define dso_local i32 @CVodeGetStgrSensNonlinSolvStats(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %3
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef null, i32 noundef -21, ptr noundef @.str, ptr noundef @.str.95, ptr noundef @.str.2)
  store i32 -21, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %73

15:                                               ; preds = %3
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %16, ptr %8, align 8, !tbaa !5
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.CVodeMemRec, ptr %17, i32 0, i32 23
  %19 = load i32, ptr %18, align 8, !tbaa !9
  store i32 %19, ptr %10, align 4, !tbaa !14
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.CVodeMemRec, ptr %20, i32 0, i32 22
  %22 = load i32, ptr %21, align 4, !tbaa !15
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %15
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %25, i32 noundef -40, ptr noundef @.str, ptr noundef @.str.95, ptr noundef @.str.44)
  store i32 -40, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %73

26:                                               ; preds = %15
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.CVodeMemRec, ptr %27, i32 0, i32 24
  %29 = load i32, ptr %28, align 4, !tbaa !16
  %30 = icmp eq i32 %29, 3
  br i1 %30, label %31, label %72

31:                                               ; preds = %26
  store i32 0, ptr %9, align 4, !tbaa !14
  br label %32

32:                                               ; preds = %48, %31
  %33 = load i32, ptr %9, align 4, !tbaa !14
  %34 = load i32, ptr %10, align 4, !tbaa !14
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %36, label %51

36:                                               ; preds = %32
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.CVodeMemRec, ptr %37, i32 0, i32 132
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  %40 = load i32, ptr %9, align 4, !tbaa !14
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i64, ptr %39, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !18
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = load i32, ptr %9, align 4, !tbaa !14
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i64, ptr %44, i64 %46
  store i64 %43, ptr %47, align 8, !tbaa !18
  br label %48

48:                                               ; preds = %36
  %49 = load i32, ptr %9, align 4, !tbaa !14
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %9, align 4, !tbaa !14
  br label %32, !llvm.loop !19

51:                                               ; preds = %32
  store i32 0, ptr %9, align 4, !tbaa !14
  br label %52

52:                                               ; preds = %68, %51
  %53 = load i32, ptr %9, align 4, !tbaa !14
  %54 = load i32, ptr %10, align 4, !tbaa !14
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %56, label %71

56:                                               ; preds = %52
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.CVodeMemRec, ptr %57, i32 0, i32 129
  %59 = load ptr, ptr %58, align 8, !tbaa !21
  %60 = load i32, ptr %9, align 4, !tbaa !14
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i64, ptr %59, i64 %61
  %63 = load i64, ptr %62, align 8, !tbaa !18
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !14
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i64, ptr %64, i64 %66
  store i64 %63, ptr %67, align 8, !tbaa !18
  br label %68

68:                                               ; preds = %56
  %69 = load i32, ptr %9, align 4, !tbaa !14
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %9, align 4, !tbaa !14
  br label %52, !llvm.loop !22

71:                                               ; preds = %52
  br label %72

72:                                               ; preds = %71, %26
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %73

73:                                               ; preds = %72, %24, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %74 = load i32, ptr %4, align 4
  ret i32 %74
}

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, !12, i64 144}
!10 = !{!"CVodeMemRec", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !11, i64 40, !11, i64 48, !6, i64 56, !12, i64 64, !12, i64 68, !6, i64 72, !6, i64 80, !12, i64 88, !12, i64 92, !6, i64 96, !12, i64 104, !12, i64 108, !11, i64 112, !11, i64 120, !6, i64 128, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148, !6, i64 152, !6, i64 160, !6, i64 168, !12, i64 176, !12, i64 180, !6, i64 184, !6, i64 192, !6, i64 200, !12, i64 208, !11, i64 216, !12, i64 224, !12, i64 228, !11, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !12, i64 264, !6, i64 272, !6, i64 280, !12, i64 288, !12, i64 292, !12, i64 296, !11, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !7, i64 336, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !7, i64 512, !6, i64 616, !6, i64 624, !6, i64 632, !6, i64 640, !7, i64 648, !6, i64 752, !6, i64 760, !6, i64 768, !6, i64 776, !6, i64 784, !12, i64 792, !7, i64 800, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !12, i64 944, !11, i64 952, !12, i64 960, !12, i64 964, !12, i64 968, !12, i64 972, !12, i64 976, !11, i64 984, !11, i64 992, !11, i64 1000, !11, i64 1008, !11, i64 1016, !11, i64 1024, !11, i64 1032, !11, i64 1040, !7, i64 1048, !7, i64 1160, !7, i64 1208, !11, i64 1312, !11, i64 1320, !11, i64 1328, !11, i64 1336, !11, i64 1344, !11, i64 1352, !11, i64 1360, !11, i64 1368, !12, i64 1376, !11, i64 1384, !11, i64 1392, !12, i64 1400, !11, i64 1408, !11, i64 1416, !6, i64 1424, !12, i64 1432, !13, i64 1440, !12, i64 1448, !12, i64 1452, !12, i64 1456, !11, i64 1464, !11, i64 1472, !11, i64 1480, !13, i64 1488, !13, i64 1496, !13, i64 1504, !13, i64 1512, !13, i64 1520, !13, i64 1528, !13, i64 1536, !13, i64 1544, !13, i64 1552, !6, i64 1560, !13, i64 1568, !13, i64 1576, !6, i64 1584, !13, i64 1592, !13, i64 1600, !13, i64 1608, !13, i64 1616, !13, i64 1624, !13, i64 1632, !12, i64 1640, !11, i64 1648, !11, i64 1656, !11, i64 1664, !13, i64 1672, !13, i64 1680, !13, i64 1688, !13, i64 1696, !13, i64 1704, !13, i64 1712, !6, i64 1720, !12, i64 1728, !6, i64 1736, !12, i64 1744, !6, i64 1752, !12, i64 1760, !6, i64 1768, !12, i64 1776, !12, i64 1780, !13, i64 1784, !12, i64 1792, !6, i64 1800, !12, i64 1808, !6, i64 1816, !6, i64 1824, !6, i64 1832, !6, i64 1840, !6, i64 1848, !6, i64 1856, !12, i64 1864, !12, i64 1868, !6, i64 1872, !6, i64 1880, !6, i64 1888, !6, i64 1896, !6, i64 1904, !13, i64 1912, !12, i64 1920, !12, i64 1924, !13, i64 1928, !11, i64 1936, !11, i64 1944, !11, i64 1952, !12, i64 1960, !12, i64 1964, !11, i64 1968, !12, i64 1976, !12, i64 1980, !12, i64 1984, !12, i64 1988, !12, i64 1992, !12, i64 1996, !12, i64 2000, !12, i64 2004, !12, i64 2008, !12, i64 2012, !12, i64 2016, !12, i64 2020, !12, i64 2024, !12, i64 2028, !12, i64 2032, !12, i64 2036, !6, i64 2040, !6, i64 2048, !6, i64 2056, !6, i64 2064, !13, i64 2072, !12, i64 2080, !7, i64 2088, !12, i64 2280, !13, i64 2288, !6, i64 2296, !12, i64 2304, !6, i64 2312, !6, i64 2320, !11, i64 2328, !11, i64 2336, !11, i64 2344, !6, i64 2352, !6, i64 2360, !6, i64 2368, !11, i64 2376, !11, i64 2384, !12, i64 2392, !12, i64 2396, !13, i64 2400, !6, i64 2408, !12, i64 2416, !6, i64 2424, !6, i64 2432, !6, i64 2440, !12, i64 2448, !6, i64 2456, !12, i64 2464}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!10, !12, i64 140}
!16 = !{!10, !12, i64 148}
!17 = !{!10, !6, i64 1584}
!18 = !{!13, !13, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !6, i64 1560}
!22 = distinct !{!22, !20}


; 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.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [32 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -40, 1) i32 @CVodeGetStgrSensNonlinSolvStats(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #1 {
  %4 = ptrtoint ptr %2 to i64
  %5 = ptrtoint ptr %1 to i64
  %6 = icmp eq ptr %0, null
  br i1 %6, label %7, label %8

7:                                                ; preds = %3
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef null, i32 noundef -21, ptr noundef nonnull @.str, ptr noundef nonnull @.str.95, ptr noundef nonnull @.str.2) #2
  br label %.loopexit

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %0, i64 144
  %10 = load i32, ptr %9, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 140
  %12 = load i32, ptr %11, align 4, !tbaa !13
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %15

14:                                               ; preds = %8
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -40, ptr noundef nonnull @.str, ptr noundef nonnull @.str.95, ptr noundef nonnull @.str.44) #2
  br label %.loopexit

15:                                               ; preds = %8
  %16 = getelementptr inbounds i8, ptr %0, i64 148
  %17 = load i32, ptr %16, align 4, !tbaa !14
  %18 = icmp eq i32 %17, 3
  br i1 %18, label %.preheader23, label %.loopexit

.preheader23:                                     ; preds = %15
  %19 = icmp sgt i32 %10, 0
  br i1 %19, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader23
  %20 = getelementptr inbounds i8, ptr %0, i64 1584
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %wide.trip.count = zext nneg i32 %10 to i64
  %min.iters.check = icmp ult i32 %10, 6
  %22 = ptrtoint ptr %21 to i64
  %23 = sub i64 %5, %22
  %diff.check = icmp ult i64 %23, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

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 ]
  %24 = getelementptr inbounds i64, ptr %21, i64 %indvars.iv.prol
  %25 = load i64, ptr %24, align 8, !tbaa !16
  %26 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv.prol
  store i64 %25, ptr %26, align 8, !tbaa !16
  %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 !17

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 ]
  %27 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %28 = icmp ugt i64 %27, -4
  br i1 %28, label %.preheader, label %scalar.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 ]
  %29 = getelementptr inbounds i64, ptr %21, i64 %index
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %wide.load = load <2 x i64>, ptr %29, align 8, !tbaa !16
  %wide.load33 = load <2 x i64>, ptr %30, align 8, !tbaa !16
  %31 = getelementptr inbounds i64, ptr %1, i64 %index
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  store <2 x i64> %wide.load, ptr %31, align 8, !tbaa !16
  store <2 x i64> %wide.load33, ptr %32, align 8, !tbaa !16
  %index.next = add nuw i64 %index, 4
  %33 = icmp eq i64 %index.next, %n.vec
  br i1 %33, label %middle.block, label %vector.body, !llvm.loop !19

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

.preheader:                                       ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  br i1 %19, label %.lr.ph26, label %.loopexit

.lr.ph26:                                         ; preds = %.preheader
  %34 = getelementptr inbounds i8, ptr %0, i64 1560
  %35 = load ptr, ptr %34, align 8, !tbaa !23
  %wide.trip.count31 = zext nneg i32 %10 to i64
  %min.iters.check38 = icmp ult i32 %10, 6
  %36 = ptrtoint ptr %35 to i64
  %37 = sub i64 %4, %36
  %diff.check35 = icmp ult i64 %37, 32
  %or.cond51 = select i1 %min.iters.check38, i1 true, i1 %diff.check35
  br i1 %or.cond51, label %scalar.ph37.preheader, label %vector.ph39

scalar.ph37.preheader:                            ; preds = %middle.block36, %.lr.ph26
  %indvars.iv28.ph = phi i64 [ 0, %.lr.ph26 ], [ %n.vec41, %middle.block36 ]
  %xtraiter52 = and i64 %wide.trip.count, 3
  %lcmp.mod53.not = icmp eq i64 %xtraiter52, 0
  br i1 %lcmp.mod53.not, label %scalar.ph37.prol.loopexit, label %scalar.ph37.prol

scalar.ph37.prol:                                 ; preds = %scalar.ph37.preheader, %scalar.ph37.prol
  %indvars.iv28.prol = phi i64 [ %indvars.iv.next29.prol, %scalar.ph37.prol ], [ %indvars.iv28.ph, %scalar.ph37.preheader ]
  %prol.iter54 = phi i64 [ %prol.iter54.next, %scalar.ph37.prol ], [ 0, %scalar.ph37.preheader ]
  %38 = getelementptr inbounds i64, ptr %35, i64 %indvars.iv28.prol
  %39 = load i64, ptr %38, align 8, !tbaa !16
  %40 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv28.prol
  store i64 %39, ptr %40, align 8, !tbaa !16
  %indvars.iv.next29.prol = add nuw nsw i64 %indvars.iv28.prol, 1
  %prol.iter54.next = add i64 %prol.iter54, 1
  %prol.iter54.cmp.not = icmp eq i64 %prol.iter54.next, %xtraiter52
  br i1 %prol.iter54.cmp.not, label %scalar.ph37.prol.loopexit, label %scalar.ph37.prol, !llvm.loop !24

scalar.ph37.prol.loopexit:                        ; preds = %scalar.ph37.prol, %scalar.ph37.preheader
  %indvars.iv28.unr = phi i64 [ %indvars.iv28.ph, %scalar.ph37.preheader ], [ %indvars.iv.next29.prol, %scalar.ph37.prol ]
  %41 = sub nsw i64 %indvars.iv28.ph, %wide.trip.count
  %42 = icmp ugt i64 %41, -4
  br i1 %42, label %.loopexit, label %scalar.ph37

vector.ph39:                                      ; preds = %.lr.ph26
  %n.vec41 = and i64 %wide.trip.count, 2147483644
  br label %vector.body43

vector.body43:                                    ; preds = %vector.body43, %vector.ph39
  %index44 = phi i64 [ 0, %vector.ph39 ], [ %index.next47, %vector.body43 ]
  %43 = getelementptr inbounds i64, ptr %35, i64 %index44
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %wide.load45 = load <2 x i64>, ptr %43, align 8, !tbaa !16
  %wide.load46 = load <2 x i64>, ptr %44, align 8, !tbaa !16
  %45 = getelementptr inbounds i64, ptr %2, i64 %index44
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  store <2 x i64> %wide.load45, ptr %45, align 8, !tbaa !16
  store <2 x i64> %wide.load46, ptr %46, align 8, !tbaa !16
  %index.next47 = add nuw i64 %index44, 4
  %47 = icmp eq i64 %index.next47, %n.vec41
  br i1 %47, label %middle.block36, label %vector.body43, !llvm.loop !25

middle.block36:                                   ; preds = %vector.body43
  %cmp.n48 = icmp eq i64 %n.vec41, %wide.trip.count
  br i1 %cmp.n48, label %.loopexit, label %scalar.ph37.preheader

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 ]
  %48 = getelementptr inbounds i64, ptr %21, i64 %indvars.iv
  %49 = load i64, ptr %48, align 8, !tbaa !16
  %50 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv
  store i64 %49, ptr %50, align 8, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %51 = getelementptr inbounds i64, ptr %21, i64 %indvars.iv.next
  %52 = load i64, ptr %51, align 8, !tbaa !16
  %53 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv.next
  store i64 %52, ptr %53, align 8, !tbaa !16
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %54 = getelementptr inbounds i64, ptr %21, i64 %indvars.iv.next.1
  %55 = load i64, ptr %54, align 8, !tbaa !16
  %56 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv.next.1
  store i64 %55, ptr %56, align 8, !tbaa !16
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %57 = getelementptr inbounds i64, ptr %21, i64 %indvars.iv.next.2
  %58 = load i64, ptr %57, align 8, !tbaa !16
  %59 = getelementptr inbounds i64, ptr %1, i64 %indvars.iv.next.2
  store i64 %58, ptr %59, align 8, !tbaa !16
  %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 %.preheader, label %scalar.ph, !llvm.loop !26

scalar.ph37:                                      ; preds = %scalar.ph37.prol.loopexit, %scalar.ph37
  %indvars.iv28 = phi i64 [ %indvars.iv.next29.3, %scalar.ph37 ], [ %indvars.iv28.unr, %scalar.ph37.prol.loopexit ]
  %60 = getelementptr inbounds i64, ptr %35, i64 %indvars.iv28
  %61 = load i64, ptr %60, align 8, !tbaa !16
  %62 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv28
  store i64 %61, ptr %62, align 8, !tbaa !16
  %indvars.iv.next29 = add nuw nsw i64 %indvars.iv28, 1
  %63 = getelementptr inbounds i64, ptr %35, i64 %indvars.iv.next29
  %64 = load i64, ptr %63, align 8, !tbaa !16
  %65 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv.next29
  store i64 %64, ptr %65, align 8, !tbaa !16
  %indvars.iv.next29.1 = add nuw nsw i64 %indvars.iv28, 2
  %66 = getelementptr inbounds i64, ptr %35, i64 %indvars.iv.next29.1
  %67 = load i64, ptr %66, align 8, !tbaa !16
  %68 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv.next29.1
  store i64 %67, ptr %68, align 8, !tbaa !16
  %indvars.iv.next29.2 = add nuw nsw i64 %indvars.iv28, 3
  %69 = getelementptr inbounds i64, ptr %35, i64 %indvars.iv.next29.2
  %70 = load i64, ptr %69, align 8, !tbaa !16
  %71 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv.next29.2
  store i64 %70, ptr %71, align 8, !tbaa !16
  %indvars.iv.next29.3 = add nuw nsw i64 %indvars.iv28, 4
  %exitcond32.not.3 = icmp eq i64 %indvars.iv.next29.3, %wide.trip.count31
  br i1 %exitcond32.not.3, label %.loopexit, label %scalar.ph37, !llvm.loop !27

.loopexit:                                        ; preds = %scalar.ph37.prol.loopexit, %scalar.ph37, %middle.block36, %.preheader23, %.preheader, %15, %14, %7
  %.0 = phi i32 [ -21, %7 ], [ -40, %14 ], [ 0, %15 ], [ 0, %.preheader ], [ 0, %.preheader23 ], [ 0, %middle.block36 ], [ 0, %scalar.ph37 ], [ 0, %scalar.ph37.prol.loopexit ]
  ret i32 %.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, !11, i64 144}
!6 = !{!"CVodeMemRec", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !11, i64 36, !10, i64 40, !10, i64 48, !7, i64 56, !11, i64 64, !11, i64 68, !7, i64 72, !7, i64 80, !11, i64 88, !11, i64 92, !7, i64 96, !11, i64 104, !11, i64 108, !10, i64 112, !10, i64 120, !7, i64 128, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !7, i64 152, !7, i64 160, !7, i64 168, !11, i64 176, !11, i64 180, !7, i64 184, !7, i64 192, !7, i64 200, !11, i64 208, !10, i64 216, !11, i64 224, !11, i64 228, !10, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !11, i64 264, !7, i64 272, !7, i64 280, !11, i64 288, !11, i64 292, !11, i64 296, !10, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !8, i64 336, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !8, i64 512, !7, i64 616, !7, i64 624, !7, i64 632, !7, i64 640, !8, i64 648, !7, i64 752, !7, i64 760, !7, i64 768, !7, i64 776, !7, i64 784, !11, i64 792, !8, i64 800, !7, i64 904, !7, i64 912, !7, i64 920, !7, i64 928, !7, i64 936, !11, i64 944, !10, i64 952, !11, i64 960, !11, i64 964, !11, i64 968, !11, i64 972, !11, i64 976, !10, i64 984, !10, i64 992, !10, i64 1000, !10, i64 1008, !10, i64 1016, !10, i64 1024, !10, i64 1032, !10, i64 1040, !8, i64 1048, !8, i64 1160, !8, i64 1208, !10, i64 1312, !10, i64 1320, !10, i64 1328, !10, i64 1336, !10, i64 1344, !10, i64 1352, !10, i64 1360, !10, i64 1368, !11, i64 1376, !10, i64 1384, !10, i64 1392, !11, i64 1400, !10, i64 1408, !10, i64 1416, !7, i64 1424, !11, i64 1432, !12, i64 1440, !11, i64 1448, !11, i64 1452, !11, i64 1456, !10, i64 1464, !10, i64 1472, !10, i64 1480, !12, i64 1488, !12, i64 1496, !12, i64 1504, !12, i64 1512, !12, i64 1520, !12, i64 1528, !12, i64 1536, !12, i64 1544, !12, i64 1552, !7, i64 1560, !12, i64 1568, !12, i64 1576, !7, i64 1584, !12, i64 1592, !12, i64 1600, !12, i64 1608, !12, i64 1616, !12, i64 1624, !12, i64 1632, !11, i64 1640, !10, i64 1648, !10, i64 1656, !10, i64 1664, !12, i64 1672, !12, i64 1680, !12, i64 1688, !12, i64 1696, !12, i64 1704, !12, i64 1712, !7, i64 1720, !11, i64 1728, !7, i64 1736, !11, i64 1744, !7, i64 1752, !11, i64 1760, !7, i64 1768, !11, i64 1776, !11, i64 1780, !12, i64 1784, !11, i64 1792, !7, i64 1800, !11, i64 1808, !7, i64 1816, !7, i64 1824, !7, i64 1832, !7, i64 1840, !7, i64 1848, !7, i64 1856, !11, i64 1864, !11, i64 1868, !7, i64 1872, !7, i64 1880, !7, i64 1888, !7, i64 1896, !7, i64 1904, !12, i64 1912, !11, i64 1920, !11, i64 1924, !12, i64 1928, !10, i64 1936, !10, i64 1944, !10, i64 1952, !11, i64 1960, !11, i64 1964, !10, i64 1968, !11, i64 1976, !11, i64 1980, !11, i64 1984, !11, i64 1988, !11, i64 1992, !11, i64 1996, !11, i64 2000, !11, i64 2004, !11, i64 2008, !11, i64 2012, !11, i64 2016, !11, i64 2020, !11, i64 2024, !11, i64 2028, !11, i64 2032, !11, i64 2036, !7, i64 2040, !7, i64 2048, !7, i64 2056, !7, i64 2064, !12, i64 2072, !11, i64 2080, !8, i64 2088, !11, i64 2280, !12, i64 2288, !7, i64 2296, !11, i64 2304, !7, i64 2312, !7, i64 2320, !10, i64 2328, !10, i64 2336, !10, i64 2344, !7, i64 2352, !7, i64 2360, !7, i64 2368, !10, i64 2376, !10, i64 2384, !11, i64 2392, !11, i64 2396, !12, i64 2400, !7, i64 2408, !11, i64 2416, !7, i64 2424, !7, i64 2432, !7, i64 2440, !11, i64 2448, !7, i64 2456, !11, i64 2464}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !11, i64 140}
!14 = !{!6, !11, i64 148}
!15 = !{!6, !7, i64 1584}
!16 = !{!12, !12, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = !{!6, !7, i64 1560}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !20, !21, !22}
!26 = distinct !{!26, !20, !21}
!27 = distinct !{!27, !20, !21}


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