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

; 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 }
%struct.CVLsMemRec = type { i32, i32, i32, ptr, ptr, i32, i32, double, double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32 }

@.str.61 = external hidden unnamed_addr constant [13 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

; Function Attrs: nounwind uwtable
define dso_local i32 @cvLsDQJtimes(ptr noundef %0, ptr noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #1 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store double %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %23 = load ptr, ptr %14, align 8, !tbaa !5
  %24 = call i32 @cvLs_AccessLMem(ptr noundef %23, ptr noundef @.str.61, ptr noundef %16, ptr noundef %17)
  store i32 %24, ptr %21, align 4, !tbaa !11
  %25 = load i32, ptr %21, align 4, !tbaa !11
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %29

27:                                               ; preds = %7
  %28 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %28, ptr %8, align 4
  store i32 1, ptr %22, align 4
  br label %84

29:                                               ; preds = %7
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %16, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.CVodeMemRec, ptr %31, i32 0, i32 52
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %34 = call double @N_VWrmsNorm(ptr noundef %30, ptr noundef %33)
  %35 = fdiv double 1.000000e+00, %34
  store double %35, ptr %18, align 8, !tbaa !9
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %36

36:                                               ; preds = %68, %29
  %37 = load i32, ptr %20, align 4, !tbaa !11
  %38 = icmp slt i32 %37, 3
  br i1 %38, label %39, label %71

39:                                               ; preds = %36
  %40 = load double, ptr %18, align 8, !tbaa !9
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef %40, ptr noundef %41, double noundef 1.000000e+00, ptr noundef %42, ptr noundef %43)
  %44 = load ptr, ptr %17, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.CVLsMemRec, ptr %44, i32 0, i32 33
  %46 = load ptr, ptr %45, align 8, !tbaa !16
  %47 = load double, ptr %11, align 8, !tbaa !9
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.CVodeMemRec, ptr %50, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !18
  %53 = call i32 %46(double noundef %47, ptr noundef %48, ptr noundef %49, ptr noundef %52)
  store i32 %53, ptr %21, align 4, !tbaa !11
  %54 = load ptr, ptr %17, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.CVLsMemRec, ptr %54, i32 0, i32 18
  %56 = load i64, ptr %55, align 8, !tbaa !19
  %57 = add nsw i64 %56, 1
  store i64 %57, ptr %55, align 8, !tbaa !19
  %58 = load i32, ptr %21, align 4, !tbaa !11
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %39
  br label %71

61:                                               ; preds = %39
  %62 = load i32, ptr %21, align 4, !tbaa !11
  %63 = icmp slt i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %22, align 4
  br label %84

65:                                               ; preds = %61
  %66 = load double, ptr %18, align 8, !tbaa !9
  %67 = fmul double %66, 2.500000e-01
  store double %67, ptr %18, align 8, !tbaa !9
  br label %68

68:                                               ; preds = %65
  %69 = load i32, ptr %20, align 4, !tbaa !11
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %20, align 4, !tbaa !11
  br label %36, !llvm.loop !20

71:                                               ; preds = %60, %36
  %72 = load i32, ptr %21, align 4, !tbaa !11
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %71
  store i32 1, ptr %8, align 4
  store i32 1, ptr %22, align 4
  br label %84

75:                                               ; preds = %71
  %76 = load double, ptr %18, align 8, !tbaa !9
  %77 = fdiv double 1.000000e+00, %76
  store double %77, ptr %19, align 8, !tbaa !9
  %78 = load double, ptr %19, align 8, !tbaa !9
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = load double, ptr %19, align 8, !tbaa !9
  %81 = fneg double %80
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef %78, ptr noundef %79, double noundef %81, ptr noundef %82, ptr noundef %83)
  store i32 0, ptr %8, align 4
  store i32 1, ptr %22, align 4
  br label %84

84:                                               ; preds = %75, %74, %64, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %85 = load i32, ptr %8, align 4
  ret i32 %85
}

; 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
declare dso_local i32 @cvLs_AccessLMem(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @N_VLinearSum(double noundef, ptr noundef, double noundef, ptr noundef, ptr noundef) #2

declare double @N_VWrmsNorm(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 440}
!14 = !{!"CVodeMemRec", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !10, i64 40, !10, 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, !10, i64 112, !10, 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, !10, i64 216, !12, i64 224, !12, i64 228, !10, 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, !10, 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, !10, i64 952, !12, i64 960, !12, i64 964, !12, i64 968, !12, i64 972, !12, 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, !7, i64 1048, !7, i64 1160, !7, 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, !12, i64 1376, !10, i64 1384, !10, i64 1392, !12, i64 1400, !10, i64 1408, !10, i64 1416, !6, i64 1424, !12, i64 1432, !15, i64 1440, !12, i64 1448, !12, i64 1452, !12, i64 1456, !10, i64 1464, !10, i64 1472, !10, i64 1480, !15, i64 1488, !15, i64 1496, !15, i64 1504, !15, i64 1512, !15, i64 1520, !15, i64 1528, !15, i64 1536, !15, i64 1544, !15, i64 1552, !6, i64 1560, !15, i64 1568, !15, i64 1576, !6, i64 1584, !15, i64 1592, !15, i64 1600, !15, i64 1608, !15, i64 1616, !15, i64 1624, !15, i64 1632, !12, i64 1640, !10, i64 1648, !10, i64 1656, !10, i64 1664, !15, i64 1672, !15, i64 1680, !15, i64 1688, !15, i64 1696, !15, i64 1704, !15, 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, !15, 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, !15, i64 1912, !12, i64 1920, !12, i64 1924, !15, i64 1928, !10, i64 1936, !10, i64 1944, !10, i64 1952, !12, i64 1960, !12, i64 1964, !10, 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, !15, i64 2072, !12, i64 2080, !7, i64 2088, !12, i64 2280, !15, i64 2288, !6, i64 2296, !12, i64 2304, !6, i64 2312, !6, i64 2320, !10, i64 2328, !10, i64 2336, !10, i64 2344, !6, i64 2352, !6, i64 2360, !6, i64 2368, !10, i64 2376, !10, i64 2384, !12, i64 2392, !12, i64 2396, !15, 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}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 248}
!17 = !{!"CVLsMemRec", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !10, i64 40, !10, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !12, i64 264, !6, i64 272, !6, i64 280, !12, i64 288}
!18 = !{!14, !6, i64 24}
!19 = !{!17, !15, i64 128}
!20 = distinct !{!20, !21}
!21 = !{!"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.61 = external hidden unnamed_addr constant [13 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @cvLsDQJtimes(ptr noundef %0, ptr noundef %1, double noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %10 = call i32 @cvLs_AccessLMem(ptr noundef %5, ptr noundef nonnull @.str.61, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %.loopexit

11:                                               ; preds = %7
  %12 = load ptr, ptr %8, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 440
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = call double @N_VWrmsNorm(ptr noundef %0, ptr noundef %14) #3
  %16 = fdiv double 1.000000e+00, %15
  call void @N_VLinearSum(double noundef %16, ptr noundef %0, double noundef 1.000000e+00, ptr noundef %3, ptr noundef %6) #3
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 248
  %19 = load ptr, ptr %18, align 8, !tbaa !14
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 24
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  %23 = call i32 %19(double noundef %2, ptr noundef %6, ptr noundef %1, ptr noundef %22) #3
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 128
  %26 = load i64, ptr %25, align 8, !tbaa !17
  %27 = add nsw i64 %26, 1
  store i64 %27, ptr %25, align 8, !tbaa !17
  %28 = icmp eq i32 %23, 0
  br i1 %28, label %.thread, label %29

29:                                               ; preds = %11
  %30 = icmp slt i32 %23, 0
  br i1 %30, label %.loopexit, label %31

31:                                               ; preds = %29
  %32 = fmul double %16, 2.500000e-01
  call void @N_VLinearSum(double noundef %32, ptr noundef %0, double noundef 1.000000e+00, ptr noundef %3, ptr noundef %6) #3
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 248
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 24
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = call i32 %35(double noundef %2, ptr noundef %6, ptr noundef %1, ptr noundef %38) #3
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 128
  %42 = load i64, ptr %41, align 8, !tbaa !17
  %43 = add nsw i64 %42, 1
  store i64 %43, ptr %41, align 8, !tbaa !17
  %44 = icmp eq i32 %39, 0
  br i1 %44, label %.thread, label %45

45:                                               ; preds = %31
  %46 = icmp slt i32 %39, 0
  br i1 %46, label %.loopexit, label %47

47:                                               ; preds = %45
  %48 = fmul double %32, 2.500000e-01
  call void @N_VLinearSum(double noundef %48, ptr noundef %0, double noundef 1.000000e+00, ptr noundef %3, ptr noundef %6) #3
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 248
  %51 = load ptr, ptr %50, align 8, !tbaa !14
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 24
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  %55 = call i32 %51(double noundef %2, ptr noundef %6, ptr noundef %1, ptr noundef %54) #3
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 128
  %58 = load i64, ptr %57, align 8, !tbaa !17
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %57, align 8, !tbaa !17
  %60 = icmp eq i32 %55, 0
  br i1 %60, label %.thread, label %61

61:                                               ; preds = %47
  %.inv = icmp sgt i32 %55, -1
  %spec.select = select i1 %.inv, i32 1, i32 -1
  br label %.loopexit

.thread:                                          ; preds = %47, %31, %11
  %.02537.lcssa = phi double [ %16, %11 ], [ %32, %31 ], [ %48, %47 ]
  %62 = fdiv double 1.000000e+00, %.02537.lcssa
  %63 = fneg double %62
  call void @N_VLinearSum(double noundef %62, ptr noundef %1, double noundef %63, ptr noundef %4, ptr noundef %1) #3
  br label %.loopexit

.loopexit:                                        ; preds = %61, %29, %45, %7, %.thread
  %.024 = phi i32 [ 0, %.thread ], [ %10, %7 ], [ -1, %29 ], [ -1, %45 ], [ %spec.select, %61 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  ret i32 %.024
}

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

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

declare void @N_VLinearSum(double noundef, ptr noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare double @N_VWrmsNorm(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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, !6, i64 440}
!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 = !{!15, !6, i64 248}
!15 = !{!"CVLsMemRec", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !11, i64 40, !11, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !12, i64 264, !6, i64 272, !6, i64 280, !12, i64 288}
!16 = !{!10, !6, i64 24}
!17 = !{!15, !13, i64 128}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass