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

; 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.CVadjMemRec = type { double, double, i32, i32, double, i32, double, ptr, i32, ptr, i32, ptr, i32, ptr, i64, i64, ptr, i64, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, [13 x ptr], [13 x ptr], [13 x double], ptr, ptr }
%struct.CVodeBMemRec = type { i32, double, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, ptr, ptr }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.13 = 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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

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

15:                                               ; preds = %3
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef null, i32 noundef -21, ptr noundef @.str, ptr noundef @.str.13, ptr noundef @.str.2)
  store i32 -21, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %110

16:                                               ; preds = %3
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %17, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.CVodeMemRec, ptr %18, i32 0, i32 232
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %24

22:                                               ; preds = %16
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %23, i32 noundef -101, ptr noundef @.str, ptr noundef @.str.13, ptr noundef @.str.7)
  store i32 -101, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %110

24:                                               ; preds = %16
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.CVodeMemRec, ptr %25, i32 0, i32 231
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  store ptr %27, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %10, align 8, !tbaa !5
  %28 = call noalias ptr @malloc(i64 noundef 128) #5
  store ptr %28, ptr %10, align 8, !tbaa !5
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %33

31:                                               ; preds = %24
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %32, i32 noundef -20, ptr noundef @.str, ptr noundef @.str.13, ptr noundef @.str.5)
  store i32 -20, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %110

33:                                               ; preds = %24
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.CVodeMemRec, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !16
  %38 = call ptr @CVodeCreate(i32 noundef %34, ptr noundef %37)
  store ptr %38, ptr %11, align 8, !tbaa !5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %33
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %42, i32 noundef -20, ptr noundef @.str, ptr noundef @.str.13, ptr noundef @.str.5)
  store i32 -20, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %110

43:                                               ; preds = %33
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call i32 @CVodeSetUserData(ptr noundef %44, ptr noundef %45)
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = call i32 @CVodeSetMaxHnilWarns(ptr noundef %47, i32 noundef -1)
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.CVodeMemRec, ptr %50, i32 0, i32 201
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.CVodeMemRec, ptr %53, i32 0, i32 202
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = call i32 @CVodeSetErrHandlerFn(ptr noundef %49, ptr noundef %52, ptr noundef %55)
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.CVodeMemRec, ptr %58, i32 0, i32 203
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = call i32 @CVodeSetErrFile(ptr noundef %57, ptr noundef %60)
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.CVadjMemRec, ptr %62, i32 0, i32 8
  %64 = load i32, ptr %63, align 8, !tbaa !20
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.CVodeBMemRec, ptr %65, i32 0, i32 0
  store i32 %64, ptr %66, align 8, !tbaa !22
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.CVodeBMemRec, ptr %68, i32 0, i32 2
  store ptr %67, ptr %69, align 8, !tbaa !24
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.CVodeBMemRec, ptr %70, i32 0, i32 5
  store ptr null, ptr %71, align 8, !tbaa !25
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.CVodeBMemRec, ptr %72, i32 0, i32 6
  store ptr null, ptr %73, align 8, !tbaa !26
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.CVodeBMemRec, ptr %74, i32 0, i32 7
  store ptr null, ptr %75, align 8, !tbaa !27
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.CVodeBMemRec, ptr %76, i32 0, i32 8
  store ptr null, ptr %77, align 8, !tbaa !28
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.CVodeBMemRec, ptr %78, i32 0, i32 9
  store ptr null, ptr %79, align 8, !tbaa !29
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.CVodeBMemRec, ptr %80, i32 0, i32 10
  store ptr null, ptr %81, align 8, !tbaa !30
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.CVodeBMemRec, ptr %82, i32 0, i32 11
  store ptr null, ptr %83, align 8, !tbaa !31
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.CVodeBMemRec, ptr %84, i32 0, i32 12
  store ptr null, ptr %85, align 8, !tbaa !32
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.CVodeBMemRec, ptr %86, i32 0, i32 13
  store ptr null, ptr %87, align 8, !tbaa !33
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.CVodeBMemRec, ptr %88, i32 0, i32 15
  store ptr null, ptr %89, align 8, !tbaa !34
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.CVodeBMemRec, ptr %90, i32 0, i32 3
  store i32 0, ptr %91, align 8, !tbaa !35
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.CVodeBMemRec, ptr %92, i32 0, i32 4
  store i32 0, ptr %93, align 4, !tbaa !36
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.CVadjMemRec, ptr %94, i32 0, i32 7
  %96 = load ptr, ptr %95, align 8, !tbaa !37
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.CVodeBMemRec, ptr %97, i32 0, i32 16
  store ptr %96, ptr %98, align 8, !tbaa !38
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.CVadjMemRec, ptr %100, i32 0, i32 7
  store ptr %99, ptr %101, align 8, !tbaa !37
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.CVadjMemRec, ptr %102, i32 0, i32 8
  %104 = load i32, ptr %103, align 8, !tbaa !20
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %104, ptr %105, align 4, !tbaa !9
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.CVadjMemRec, ptr %106, i32 0, i32 8
  %108 = load i32, ptr %107, align 8, !tbaa !20
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %107, align 8, !tbaa !20
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %110

110:                                              ; preds = %43, %41, %31, %22, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %111 = load i32, ptr %4, align 4
  ret i32 %111
}

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

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

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

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

declare i32 @CVodeSetErrFile(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 allocsize(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 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 #4 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

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


; 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.5 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [13 x i8], align 1

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

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

5:                                                ; 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.13, ptr noundef nonnull @.str.2) #4
  br label %42

6:                                                ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 2464
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %11

10:                                               ; preds = %6
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -101, ptr noundef nonnull @.str, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.7) #4
  br label %42

11:                                               ; preds = %6
  %12 = getelementptr inbounds i8, ptr %0, i64 2456
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = tail call noalias dereferenceable_or_null(128) ptr @malloc(i64 noundef 128) #5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %11
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -20, ptr noundef nonnull @.str, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.5) #4
  br label %42

17:                                               ; preds = %11
  %18 = load ptr, ptr %0, align 8, !tbaa !14
  %19 = tail call ptr @CVodeCreate(i32 noundef %1, ptr noundef %18) #4
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %17
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -20, ptr noundef nonnull @.str, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.5) #4
  br label %42

22:                                               ; preds = %17
  %23 = tail call i32 @CVodeSetUserData(ptr noundef nonnull %19, ptr noundef nonnull %0) #4
  %24 = tail call i32 @CVodeSetMaxHnilWarns(ptr noundef nonnull %19, i32 noundef -1) #4
  %25 = getelementptr inbounds i8, ptr %0, i64 2040
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %0, i64 2048
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = tail call i32 @CVodeSetErrHandlerFn(ptr noundef nonnull %19, ptr noundef %26, ptr noundef %28) #4
  %30 = getelementptr inbounds i8, ptr %0, i64 2056
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = tail call i32 @CVodeSetErrFile(ptr noundef nonnull %19, ptr noundef %31) #4
  %33 = getelementptr inbounds i8, ptr %13, i64 56
  %34 = load i32, ptr %33, align 8, !tbaa !18
  store i32 %34, ptr %14, align 8, !tbaa !20
  %35 = getelementptr inbounds i8, ptr %14, i64 16
  store ptr %19, ptr %35, align 8, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %14, i64 112
  store ptr null, ptr %36, align 8, !tbaa !23
  %37 = getelementptr inbounds i8, ptr %14, i64 24
  %38 = getelementptr inbounds i8, ptr %13, i64 48
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %37, i8 0, i64 80, i1 false)
  %39 = load ptr, ptr %38, align 8, !tbaa !24
  %40 = getelementptr inbounds i8, ptr %14, i64 120
  store ptr %39, ptr %40, align 8, !tbaa !25
  store ptr %14, ptr %38, align 8, !tbaa !24
  store i32 %34, ptr %2, align 4, !tbaa !26
  %41 = add nsw i32 %34, 1
  store i32 %41, ptr %33, align 8, !tbaa !18
  br label %42

42:                                               ; preds = %22, %21, %16, %10, %5
  %.0 = phi i32 [ -21, %5 ], [ -101, %10 ], [ -20, %16 ], [ -20, %21 ], [ 0, %22 ]
  ret i32 %.0
}

declare ptr @CVodeCreate(i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @CVodeSetUserData(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @CVodeSetMaxHnilWarns(ptr noundef, i32 noundef) local_unnamed_addr #0

declare i32 @CVodeSetErrHandlerFn(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @CVodeSetErrFile(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

!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 2464}
!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, !7, i64 2456}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !7, i64 2040}
!16 = !{!6, !7, i64 2048}
!17 = !{!6, !7, i64 2056}
!18 = !{!19, !11, i64 56}
!19 = !{!"CVadjMemRec", !10, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !10, i64 24, !11, i64 32, !10, i64 40, !7, i64 48, !11, i64 56, !7, i64 64, !11, i64 72, !7, i64 80, !11, i64 88, !7, i64 96, !12, i64 104, !12, i64 112, !7, i64 120, !12, i64 128, !11, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !8, i64 192, !8, i64 296, !8, i64 400, !7, i64 504, !7, i64 512}
!20 = !{!21, !11, i64 0}
!21 = !{!"CVodeBMemRec", !11, i64 0, !10, i64 8, !7, i64 16, !11, i64 24, !11, i64 28, !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, !10, i64 104, !7, i64 112, !7, i64 120}
!22 = !{!21, !7, i64 16}
!23 = !{!21, !7, i64 112}
!24 = !{!19, !7, i64 48}
!25 = !{!21, !7, i64 120}
!26 = !{!11, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass