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

; 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 }
%struct._generic_N_Vector = type { ptr, ptr, ptr }
%struct._generic_N_Vector_Ops = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.CVBandPrecDataRec = type { i64, i64, i64, ptr, ptr, ptr, ptr, ptr, i64, ptr }
%struct._generic_SUNMatrix = type { ptr, ptr, ptr }
%struct._generic_SUNMatrix_Ops = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._generic_SUNLinearSolver = type { ptr, ptr, ptr }
%struct._generic_SUNLinearSolver_Ops = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 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 @CVBandPrecGetWorkSpace(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 ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = 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 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %3
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef null, i32 noundef -1, ptr noundef @.str, ptr noundef @.str.7, ptr noundef @.str.2)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %145

20:                                               ; preds = %3
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %21, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.CVodeMemRec, ptr %22, i32 0, i32 174
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %20
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %27, i32 noundef -2, ptr noundef @.str, ptr noundef @.str.7, ptr noundef @.str.3)
  store i32 -2, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %145

28:                                               ; preds = %20
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.CVodeMemRec, ptr %29, i32 0, i32 174
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  store ptr %31, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.CVLsMemRec, ptr %32, i32 0, i32 29
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %38

36:                                               ; preds = %28
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %37, i32 noundef -5, ptr noundef @.str, ptr noundef @.str.7, ptr noundef @.str.8)
  store i32 -5, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %145

38:                                               ; preds = %28
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.CVLsMemRec, ptr %39, i32 0, i32 29
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  store ptr %41, ptr %10, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 4, ptr %42, align 8, !tbaa !16
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  store i64 0, ptr %43, align 8, !tbaa !16
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.CVodeMemRec, ptr %44, i32 0, i32 55
  %46 = load ptr, ptr %45, align 8, !tbaa !17
  %47 = getelementptr inbounds %struct._generic_N_Vector, ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %48, i32 0, i32 4
  %50 = load ptr, ptr %49, align 8, !tbaa !20
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %66

52:                                               ; preds = %38
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.CVodeMemRec, ptr %53, i32 0, i32 55
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  call void @N_VSpace(ptr noundef %55, ptr noundef %11, ptr noundef %12)
  %56 = load i64, ptr %12, align 8, !tbaa !16
  %57 = mul nsw i64 2, %56
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load i64, ptr %58, align 8, !tbaa !16
  %60 = add nsw i64 %59, %57
  store i64 %60, ptr %58, align 8, !tbaa !16
  %61 = load i64, ptr %11, align 8, !tbaa !16
  %62 = mul nsw i64 2, %61
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = load i64, ptr %63, align 8, !tbaa !16
  %65 = add nsw i64 %64, %62
  store i64 %65, ptr %63, align 8, !tbaa !16
  br label %66

66:                                               ; preds = %52, %38
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.CVBandPrecDataRec, ptr %67, i32 0, i32 3
  %69 = load ptr, ptr %68, align 8, !tbaa !22
  %70 = getelementptr inbounds %struct._generic_SUNMatrix, ptr %69, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !24
  %72 = getelementptr inbounds %struct._generic_SUNMatrix_Ops, ptr %71, i32 0, i32 9
  %73 = load ptr, ptr %72, align 8, !tbaa !26
  %74 = icmp ne ptr %73, null
  br i1 %74, label %75, label %92

75:                                               ; preds = %66
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.CVBandPrecDataRec, ptr %76, i32 0, i32 3
  %78 = load ptr, ptr %77, align 8, !tbaa !22
  %79 = call i32 @SUNMatSpace(ptr noundef %78, ptr noundef %13, ptr noundef %14)
  store i32 %79, ptr %15, align 4, !tbaa !28
  %80 = load i32, ptr %15, align 4, !tbaa !28
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %83

82:                                               ; preds = %75
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %145

83:                                               ; preds = %75
  %84 = load i64, ptr %14, align 8, !tbaa !16
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = load i64, ptr %85, align 8, !tbaa !16
  %87 = add nsw i64 %86, %84
  store i64 %87, ptr %85, align 8, !tbaa !16
  %88 = load i64, ptr %13, align 8, !tbaa !16
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = load i64, ptr %89, align 8, !tbaa !16
  %91 = add nsw i64 %90, %88
  store i64 %91, ptr %89, align 8, !tbaa !16
  br label %92

92:                                               ; preds = %83, %66
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.CVBandPrecDataRec, ptr %93, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !29
  %96 = getelementptr inbounds %struct._generic_SUNMatrix, ptr %95, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !24
  %98 = getelementptr inbounds %struct._generic_SUNMatrix_Ops, ptr %97, i32 0, i32 9
  %99 = load ptr, ptr %98, align 8, !tbaa !26
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %118

101:                                              ; preds = %92
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.CVBandPrecDataRec, ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !29
  %105 = call i32 @SUNMatSpace(ptr noundef %104, ptr noundef %13, ptr noundef %14)
  store i32 %105, ptr %15, align 4, !tbaa !28
  %106 = load i32, ptr %15, align 4, !tbaa !28
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %109

108:                                              ; preds = %101
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %145

109:                                              ; preds = %101
  %110 = load i64, ptr %14, align 8, !tbaa !16
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load i64, ptr %111, align 8, !tbaa !16
  %113 = add nsw i64 %112, %110
  store i64 %113, ptr %111, align 8, !tbaa !16
  %114 = load i64, ptr %13, align 8, !tbaa !16
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = load i64, ptr %115, align 8, !tbaa !16
  %117 = add nsw i64 %116, %114
  store i64 %117, ptr %115, align 8, !tbaa !16
  br label %118

118:                                              ; preds = %109, %92
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.CVBandPrecDataRec, ptr %119, i32 0, i32 5
  %121 = load ptr, ptr %120, align 8, !tbaa !30
  %122 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !31
  %124 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %123, i32 0, i32 12
  %125 = load ptr, ptr %124, align 8, !tbaa !33
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %144

127:                                              ; preds = %118
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.CVBandPrecDataRec, ptr %128, i32 0, i32 5
  %130 = load ptr, ptr %129, align 8, !tbaa !30
  %131 = call i32 @SUNLinSolSpace(ptr noundef %130, ptr noundef %13, ptr noundef %14)
  store i32 %131, ptr %15, align 4, !tbaa !28
  %132 = load i32, ptr %15, align 4, !tbaa !28
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %135

134:                                              ; preds = %127
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %145

135:                                              ; preds = %127
  %136 = load i64, ptr %14, align 8, !tbaa !16
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = load i64, ptr %137, align 8, !tbaa !16
  %139 = add nsw i64 %138, %136
  store i64 %139, ptr %137, align 8, !tbaa !16
  %140 = load i64, ptr %13, align 8, !tbaa !16
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = load i64, ptr %141, align 8, !tbaa !16
  %143 = add nsw i64 %142, %140
  store i64 %143, ptr %141, align 8, !tbaa !16
  br label %144

144:                                              ; preds = %135, %118
  store i32 0, ptr %4, align 4
  store i32 1, ptr %16, align 4
  br label %145

145:                                              ; preds = %144, %134, %108, %82, %36, %26, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %146 = load i32, ptr %4, align 4
  ret i32 %146
}

declare void @N_VSpace(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @SUNMatSpace(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @SUNLinSolSpace(ptr noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 1904}
!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 216}
!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 = !{!13, !13, i64 0}
!17 = !{!10, !6, i64 464}
!18 = !{!19, !6, i64 8}
!19 = !{!"_generic_N_Vector", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!21, !6, i64 32}
!21 = !{!"_generic_N_Vector_Ops", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432}
!22 = !{!23, !6, i64 24}
!23 = !{!"CVBandPrecDataRec", !13, i64 0, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !13, i64 64, !6, i64 72}
!24 = !{!25, !6, i64 8}
!25 = !{!"_generic_SUNMatrix", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!27, !6, i64 72}
!27 = !{!"_generic_SUNMatrix_Ops", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!28 = !{!12, !12, i64 0}
!29 = !{!23, !6, i64 32}
!30 = !{!23, !6, i64 40}
!31 = !{!32, !6, i64 8}
!32 = !{!"_generic_SUNLinearSolver", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!34, !6, i64 96}
!34 = !{!"_generic_SUNLinearSolver_Ops", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112}


; 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 [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 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

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

; 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
define dso_local range(i32 -5, 1) i32 @CVBandPrecGetWorkSpace(ptr noundef %0, ptr nocapture noundef %1, ptr nocapture noundef %2) local_unnamed_addr #2 {
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %8 = icmp eq ptr %0, null
  br i1 %8, label %9, label %10

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

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

14:                                               ; preds = %10
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -2, ptr noundef nonnull @.str, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3) #3
  br label %84

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %12, i64 216
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %15
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -5, ptr noundef nonnull @.str, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8) #3
  br label %84

20:                                               ; preds = %15
  store i64 4, ptr %2, align 8, !tbaa !15
  store i64 0, ptr %1, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %0, i64 464
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %24, i64 32
  %26 = load ptr, ptr %25, align 8, !tbaa !19
  %.not = icmp eq ptr %26, null
  br i1 %.not, label %36, label %27

27:                                               ; preds = %20
  call void @N_VSpace(ptr noundef nonnull %22, ptr noundef nonnull %4, ptr noundef nonnull %5) #3
  %28 = load i64, ptr %5, align 8, !tbaa !15
  %29 = shl nsw i64 %28, 1
  %30 = load i64, ptr %2, align 8, !tbaa !15
  %31 = add nsw i64 %30, %29
  store i64 %31, ptr %2, align 8, !tbaa !15
  %32 = load i64, ptr %4, align 8, !tbaa !15
  %33 = shl nsw i64 %32, 1
  %34 = load i64, ptr %1, align 8, !tbaa !15
  %35 = add nsw i64 %34, %33
  store i64 %35, ptr %1, align 8, !tbaa !15
  br label %36

36:                                               ; preds = %27, %20
  %37 = getelementptr inbounds i8, ptr %17, i64 24
  %38 = load ptr, ptr %37, align 8, !tbaa !21
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %40, i64 72
  %42 = load ptr, ptr %41, align 8, !tbaa !25
  %.not32 = icmp eq ptr %42, null
  br i1 %.not32, label %52, label %43

43:                                               ; preds = %36
  %44 = call i32 @SUNMatSpace(ptr noundef nonnull %38, ptr noundef nonnull %6, ptr noundef nonnull %7) #3
  %.not33 = icmp eq i32 %44, 0
  br i1 %.not33, label %45, label %84

45:                                               ; preds = %43
  %46 = load i64, ptr %7, align 8, !tbaa !15
  %47 = load i64, ptr %2, align 8, !tbaa !15
  %48 = add nsw i64 %47, %46
  store i64 %48, ptr %2, align 8, !tbaa !15
  %49 = load i64, ptr %6, align 8, !tbaa !15
  %50 = load i64, ptr %1, align 8, !tbaa !15
  %51 = add nsw i64 %50, %49
  store i64 %51, ptr %1, align 8, !tbaa !15
  br label %52

52:                                               ; preds = %45, %36
  %53 = getelementptr inbounds i8, ptr %17, i64 32
  %54 = load ptr, ptr %53, align 8, !tbaa !27
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !23
  %57 = getelementptr inbounds i8, ptr %56, i64 72
  %58 = load ptr, ptr %57, align 8, !tbaa !25
  %.not34 = icmp eq ptr %58, null
  br i1 %.not34, label %68, label %59

59:                                               ; preds = %52
  %60 = call i32 @SUNMatSpace(ptr noundef nonnull %54, ptr noundef nonnull %6, ptr noundef nonnull %7) #3
  %.not35 = icmp eq i32 %60, 0
  br i1 %.not35, label %61, label %84

61:                                               ; preds = %59
  %62 = load i64, ptr %7, align 8, !tbaa !15
  %63 = load i64, ptr %2, align 8, !tbaa !15
  %64 = add nsw i64 %63, %62
  store i64 %64, ptr %2, align 8, !tbaa !15
  %65 = load i64, ptr %6, align 8, !tbaa !15
  %66 = load i64, ptr %1, align 8, !tbaa !15
  %67 = add nsw i64 %66, %65
  store i64 %67, ptr %1, align 8, !tbaa !15
  br label %68

68:                                               ; preds = %61, %52
  %69 = getelementptr inbounds i8, ptr %17, i64 40
  %70 = load ptr, ptr %69, align 8, !tbaa !28
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  %72 = load ptr, ptr %71, align 8, !tbaa !29
  %73 = getelementptr inbounds i8, ptr %72, i64 96
  %74 = load ptr, ptr %73, align 8, !tbaa !31
  %.not36 = icmp eq ptr %74, null
  br i1 %.not36, label %84, label %75

75:                                               ; preds = %68
  %76 = call i32 @SUNLinSolSpace(ptr noundef nonnull %70, ptr noundef nonnull %6, ptr noundef nonnull %7) #3
  %.not37 = icmp eq i32 %76, 0
  br i1 %.not37, label %77, label %84

77:                                               ; preds = %75
  %78 = load i64, ptr %7, align 8, !tbaa !15
  %79 = load i64, ptr %2, align 8, !tbaa !15
  %80 = add nsw i64 %79, %78
  store i64 %80, ptr %2, align 8, !tbaa !15
  %81 = load i64, ptr %6, align 8, !tbaa !15
  %82 = load i64, ptr %1, align 8, !tbaa !15
  %83 = add nsw i64 %82, %81
  store i64 %83, ptr %1, align 8, !tbaa !15
  br label %84

84:                                               ; preds = %68, %77, %75, %59, %43, %19, %14, %9
  %.0 = phi i32 [ -1, %9 ], [ -2, %14 ], [ -5, %19 ], [ -1, %43 ], [ -1, %59 ], [ -1, %75 ], [ 0, %77 ], [ 0, %68 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret i32 %.0
}

declare void @N_VSpace(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @SUNMatSpace(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @SUNLinSolSpace(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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, !7, i64 1904}
!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 = !{!14, !7, i64 216}
!14 = !{!"CVLsMemRec", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !11, i64 36, !10, i64 40, !10, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !11, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !11, i64 264, !7, i64 272, !7, i64 280, !11, i64 288}
!15 = !{!12, !12, i64 0}
!16 = !{!6, !7, i64 464}
!17 = !{!18, !7, i64 8}
!18 = !{!"_generic_N_Vector", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!20, !7, i64 32}
!20 = !{!"_generic_N_Vector_Ops", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !7, 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, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432}
!21 = !{!22, !7, i64 24}
!22 = !{!"CVBandPrecDataRec", !12, i64 0, !12, i64 8, !12, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !12, i64 64, !7, i64 72}
!23 = !{!24, !7, i64 8}
!24 = !{!"_generic_SUNMatrix", !7, i64 0, !7, i64 8, !7, i64 16}
!25 = !{!26, !7, i64 72}
!26 = !{!"_generic_SUNMatrix_Ops", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72}
!27 = !{!22, !7, i64 32}
!28 = !{!22, !7, i64 40}
!29 = !{!30, !7, i64 8}
!30 = !{!"_generic_SUNLinearSolver", !7, i64 0, !7, i64 8, !7, i64 16}
!31 = !{!32, !7, i64 96}
!32 = !{!"_generic_SUNLinearSolver_Ops", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass