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

; 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._generic_SUNNonlinearSolver = type { ptr, ptr, ptr }
%struct._generic_SUNNonlinearSolver_Ops = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%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.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [54 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @CVodeSetNonlinearSolverSensStg1(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

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

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %13, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %12
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef null, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.3)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

17:                                               ; preds = %12
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = icmp eq ptr %22, null
  br i1 %23, label %38, label %24

24:                                               ; preds = %17
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %27, i32 0, i32 3
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = icmp eq ptr %29, null
  br i1 %30, label %38, label %31

31:                                               ; preds = %24
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._generic_SUNNonlinearSolver, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct._generic_SUNNonlinearSolver_Ops, ptr %34, i32 0, i32 5
  %36 = load ptr, ptr %35, align 8, !tbaa !14
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %40

38:                                               ; preds = %31, %24, %17
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %39, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

40:                                               ; preds = %31
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.CVodeMemRec, ptr %41, i32 0, i32 22
  %43 = load i32, ptr %42, align 4, !tbaa !15
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %47, label %45

45:                                               ; preds = %40
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %46, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.5)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

47:                                               ; preds = %40
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.CVodeMemRec, ptr %48, i32 0, i32 24
  %50 = load i32, ptr %49, align 4, !tbaa !20
  %51 = icmp ne i32 %50, 3
  br i1 %51, label %52, label %54

52:                                               ; preds = %47
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %53, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.6)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

54:                                               ; preds = %47
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.CVodeMemRec, ptr %55, i32 0, i32 155
  %57 = load ptr, ptr %56, align 8, !tbaa !21
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %69

59:                                               ; preds = %54
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.CVodeMemRec, ptr %60, i32 0, i32 156
  %62 = load i32, ptr %61, align 8, !tbaa !22
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %69

64:                                               ; preds = %59
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.CVodeMemRec, ptr %65, i32 0, i32 155
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = call i32 @SUNNonlinSolFree(ptr noundef %67)
  store i32 %68, ptr %7, align 4, !tbaa !23
  br label %69

69:                                               ; preds = %64, %59, %54
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.CVodeMemRec, ptr %71, i32 0, i32 155
  store ptr %70, ptr %72, align 8, !tbaa !21
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.CVodeMemRec, ptr %73, i32 0, i32 156
  store i32 0, ptr %74, align 8, !tbaa !22
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = call i32 @SUNNonlinSolGetType(ptr noundef %75)
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %83

78:                                               ; preds = %69
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.CVodeMemRec, ptr %79, i32 0, i32 155
  %81 = load ptr, ptr %80, align 8, !tbaa !21
  %82 = call i32 @SUNNonlinSolSetSysFn(ptr noundef %81, ptr noundef @cvNlsResidualSensStg1)
  store i32 %82, ptr %7, align 4, !tbaa !23
  br label %95

83:                                               ; preds = %69
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = call i32 @SUNNonlinSolGetType(ptr noundef %84)
  %86 = icmp eq i32 %85, 1
  br i1 %86, label %87, label %92

87:                                               ; preds = %83
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.CVodeMemRec, ptr %88, i32 0, i32 155
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  %91 = call i32 @SUNNonlinSolSetSysFn(ptr noundef %90, ptr noundef @cvNlsFPFunctionSensStg1)
  store i32 %91, ptr %7, align 4, !tbaa !23
  br label %94

92:                                               ; preds = %83
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %93, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.7)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

94:                                               ; preds = %87
  br label %95

95:                                               ; preds = %94, %78
  %96 = load i32, ptr %7, align 4, !tbaa !23
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %95
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %99, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.8)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

100:                                              ; preds = %95
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.CVodeMemRec, ptr %101, i32 0, i32 155
  %103 = load ptr, ptr %102, align 8, !tbaa !21
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = call i32 @SUNNonlinSolSetConvTestFn(ptr noundef %103, ptr noundef @cvNlsConvTestSensStg1, ptr noundef %104)
  store i32 %105, ptr %7, align 4, !tbaa !23
  %106 = load i32, ptr %7, align 4, !tbaa !23
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %110

108:                                              ; preds = %100
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %109, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.9)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

110:                                              ; preds = %100
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.CVodeMemRec, ptr %111, i32 0, i32 155
  %113 = load ptr, ptr %112, align 8, !tbaa !21
  %114 = call i32 @SUNNonlinSolSetMaxIters(ptr noundef %113, i32 noundef 3)
  store i32 %114, ptr %7, align 4, !tbaa !23
  %115 = load i32, ptr %7, align 4, !tbaa !23
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %119

117:                                              ; preds = %110
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef %118, i32 noundef -22, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.10)
  store i32 -22, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

119:                                              ; preds = %110
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.CVodeMemRec, ptr %120, i32 0, i32 108
  store i32 0, ptr %121, align 8, !tbaa !24
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %122

122:                                              ; preds = %119, %117, %108, %98, %92, %52, %45, %38, %16, %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %123 = load i32, ptr %3, align 4
  ret i32 %123
}

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

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

declare i32 @SUNNonlinSolFree(ptr noundef) #2

declare i32 @SUNNonlinSolGetType(ptr noundef) #2

declare i32 @SUNNonlinSolSetSysFn(ptr noundef, ptr noundef) #2

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

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

declare i32 @SUNNonlinSolSetConvTestFn(ptr noundef, ptr noundef, ptr noundef) #2

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

declare i32 @SUNNonlinSolSetMaxIters(ptr noundef, i32 noundef) #2

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [54 x i8], align 1

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

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

5:                                                ; preds = %2
  %6 = icmp eq ptr %1, null
  br i1 %6, label %7, label %8

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

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = load ptr, ptr %10, align 8, !tbaa !10
  %12 = icmp eq ptr %11, null
  br i1 %12, label %21, label %13

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

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

21:                                               ; preds = %17, %13, %8
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #2
  br label %60

22:                                               ; preds = %17
  %23 = getelementptr inbounds i8, ptr %0, i64 140
  %24 = load i32, ptr %23, align 4, !tbaa !14
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %25, label %26

25:                                               ; preds = %22
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.5) #2
  br label %60

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %0, i64 148
  %28 = load i32, ptr %27, align 4, !tbaa !19
  %.not36 = icmp eq i32 %28, 3
  br i1 %.not36, label %30, label %29

29:                                               ; preds = %26
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.6) #2
  br label %60

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %0, i64 1768
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  %.not37 = icmp eq ptr %32, null
  br i1 %.not37, label %38, label %33

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %0, i64 1776
  %35 = load i32, ptr %34, align 8, !tbaa !21
  %.not38 = icmp eq i32 %35, 0
  br i1 %.not38, label %38, label %36

36:                                               ; preds = %33
  %37 = tail call i32 @SUNNonlinSolFree(ptr noundef nonnull %32) #2
  br label %38

38:                                               ; preds = %36, %33, %30
  store ptr %1, ptr %31, align 8, !tbaa !20
  %39 = getelementptr inbounds i8, ptr %0, i64 1776
  store i32 0, ptr %39, align 8, !tbaa !21
  %40 = tail call i32 @SUNNonlinSolGetType(ptr noundef nonnull %1) #2
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %46, label %42

42:                                               ; preds = %38
  %43 = tail call i32 @SUNNonlinSolGetType(ptr noundef nonnull %1) #2
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.7) #2
  br label %60

46:                                               ; preds = %42, %38
  %cvNlsFPFunctionSensStg1.sink = phi ptr [ @cvNlsResidualSensStg1, %38 ], [ @cvNlsFPFunctionSensStg1, %42 ]
  %47 = load ptr, ptr %31, align 8, !tbaa !20
  %48 = tail call i32 @SUNNonlinSolSetSysFn(ptr noundef %47, ptr noundef nonnull %cvNlsFPFunctionSensStg1.sink) #2
  %.not39 = icmp eq i32 %48, 0
  br i1 %.not39, label %50, label %49

49:                                               ; preds = %46
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.8) #2
  br label %60

50:                                               ; preds = %46
  %51 = load ptr, ptr %31, align 8, !tbaa !20
  %52 = tail call i32 @SUNNonlinSolSetConvTestFn(ptr noundef %51, ptr noundef nonnull @cvNlsConvTestSensStg1, ptr noundef nonnull %0) #2
  %.not40 = icmp eq i32 %52, 0
  br i1 %.not40, label %54, label %53

53:                                               ; preds = %50
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.9) #2
  br label %60

54:                                               ; preds = %50
  %55 = load ptr, ptr %31, align 8, !tbaa !20
  %56 = tail call i32 @SUNNonlinSolSetMaxIters(ptr noundef %55, i32 noundef 3) #2
  %.not41 = icmp eq i32 %56, 0
  br i1 %.not41, label %58, label %57

57:                                               ; preds = %54
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @cvProcessError(ptr noundef nonnull %0, i32 noundef -22, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.10) #2
  br label %60

58:                                               ; preds = %54
  %59 = getelementptr inbounds i8, ptr %0, i64 1400
  store i32 0, ptr %59, align 8, !tbaa !22
  br label %60

60:                                               ; preds = %58, %57, %53, %49, %45, %29, %25, %21, %7, %4
  %.032 = phi i32 [ -21, %4 ], [ -22, %7 ], [ -22, %21 ], [ -22, %29 ], [ -22, %49 ], [ -22, %53 ], [ -22, %57 ], [ 0, %58 ], [ -22, %45 ], [ -22, %25 ]
  ret i32 %.032
}

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

declare i32 @SUNNonlinSolFree(ptr noundef) local_unnamed_addr #1

declare i32 @SUNNonlinSolGetType(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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, !7, i64 8}
!6 = !{!"_generic_SUNNonlinearSolver", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"_generic_SUNNonlinearSolver_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}
!12 = !{!11, !7, i64 24}
!13 = !{!11, !7, i64 40}
!14 = !{!15, !17, i64 140}
!15 = !{!"CVodeMemRec", !7, i64 0, !16, i64 8, !7, i64 16, !7, i64 24, !17, i64 32, !17, i64 36, !16, i64 40, !16, i64 48, !7, i64 56, !17, i64 64, !17, i64 68, !7, i64 72, !7, i64 80, !17, i64 88, !17, i64 92, !7, i64 96, !17, i64 104, !17, i64 108, !16, i64 112, !16, i64 120, !7, i64 128, !17, i64 136, !17, i64 140, !17, i64 144, !17, i64 148, !7, i64 152, !7, i64 160, !7, i64 168, !17, i64 176, !17, i64 180, !7, i64 184, !7, i64 192, !7, i64 200, !17, i64 208, !16, i64 216, !17, i64 224, !17, i64 228, !16, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !17, i64 264, !7, i64 272, !7, i64 280, !17, i64 288, !17, i64 292, !17, i64 296, !16, 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, !17, i64 792, !8, i64 800, !7, i64 904, !7, i64 912, !7, i64 920, !7, i64 928, !7, i64 936, !17, i64 944, !16, i64 952, !17, i64 960, !17, i64 964, !17, i64 968, !17, i64 972, !17, i64 976, !16, i64 984, !16, i64 992, !16, i64 1000, !16, i64 1008, !16, i64 1016, !16, i64 1024, !16, i64 1032, !16, i64 1040, !8, i64 1048, !8, i64 1160, !8, i64 1208, !16, i64 1312, !16, i64 1320, !16, i64 1328, !16, i64 1336, !16, i64 1344, !16, i64 1352, !16, i64 1360, !16, i64 1368, !17, i64 1376, !16, i64 1384, !16, i64 1392, !17, i64 1400, !16, i64 1408, !16, i64 1416, !7, i64 1424, !17, i64 1432, !18, i64 1440, !17, i64 1448, !17, i64 1452, !17, i64 1456, !16, i64 1464, !16, i64 1472, !16, i64 1480, !18, i64 1488, !18, i64 1496, !18, i64 1504, !18, i64 1512, !18, i64 1520, !18, i64 1528, !18, i64 1536, !18, i64 1544, !18, i64 1552, !7, i64 1560, !18, i64 1568, !18, i64 1576, !7, i64 1584, !18, i64 1592, !18, i64 1600, !18, i64 1608, !18, i64 1616, !18, i64 1624, !18, i64 1632, !17, i64 1640, !16, i64 1648, !16, i64 1656, !16, i64 1664, !18, i64 1672, !18, i64 1680, !18, i64 1688, !18, i64 1696, !18, i64 1704, !18, i64 1712, !7, i64 1720, !17, i64 1728, !7, i64 1736, !17, i64 1744, !7, i64 1752, !17, i64 1760, !7, i64 1768, !17, i64 1776, !17, i64 1780, !18, i64 1784, !17, i64 1792, !7, i64 1800, !17, i64 1808, !7, i64 1816, !7, i64 1824, !7, i64 1832, !7, i64 1840, !7, i64 1848, !7, i64 1856, !17, i64 1864, !17, i64 1868, !7, i64 1872, !7, i64 1880, !7, i64 1888, !7, i64 1896, !7, i64 1904, !18, i64 1912, !17, i64 1920, !17, i64 1924, !18, i64 1928, !16, i64 1936, !16, i64 1944, !16, i64 1952, !17, i64 1960, !17, i64 1964, !16, i64 1968, !17, i64 1976, !17, i64 1980, !17, i64 1984, !17, i64 1988, !17, i64 1992, !17, i64 1996, !17, i64 2000, !17, i64 2004, !17, i64 2008, !17, i64 2012, !17, i64 2016, !17, i64 2020, !17, i64 2024, !17, i64 2028, !17, i64 2032, !17, i64 2036, !7, i64 2040, !7, i64 2048, !7, i64 2056, !7, i64 2064, !18, i64 2072, !17, i64 2080, !8, i64 2088, !17, i64 2280, !18, i64 2288, !7, i64 2296, !17, i64 2304, !7, i64 2312, !7, i64 2320, !16, i64 2328, !16, i64 2336, !16, i64 2344, !7, i64 2352, !7, i64 2360, !7, i64 2368, !16, i64 2376, !16, i64 2384, !17, i64 2392, !17, i64 2396, !18, i64 2400, !7, i64 2408, !17, i64 2416, !7, i64 2424, !7, i64 2432, !7, i64 2440, !17, i64 2448, !7, i64 2456, !17, i64 2464}
!16 = !{!"double", !8, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!"long", !8, i64 0}
!19 = !{!15, !17, i64 148}
!20 = !{!15, !7, i64 1768}
!21 = !{!15, !17, i64 1776}
!22 = !{!15, !17, i64 1400}


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