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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1

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

17:                                               ; preds = %3
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef null, i32 noundef -1, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

18:                                               ; preds = %3
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef null, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.3)
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

22:                                               ; preds = %18
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %23, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %24, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  %29 = icmp eq ptr %28, null
  br i1 %29, label %37, label %30

30:                                               ; preds = %22
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %31, i32 0, i32 1
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %33, i32 0, i32 8
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %39

37:                                               ; preds = %30, %22
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %38, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.4)
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

39:                                               ; preds = %30
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = call i32 @SUNLinSolGetType(ptr noundef %40)
  store i32 %41, ptr %11, align 4, !tbaa !14
  %42 = load i32, ptr %11, align 4, !tbaa !14
  %43 = icmp eq i32 %42, 3
  br i1 %43, label %44, label %46

44:                                               ; preds = %39
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %45, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.5)
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

46:                                               ; preds = %39
  %47 = load i32, ptr %11, align 4, !tbaa !14
  %48 = icmp ne i32 %47, 0
  %49 = zext i1 %48 to i32
  store i32 %49, ptr %12, align 4, !tbaa !14
  %50 = load i32, ptr %11, align 4, !tbaa !14
  %51 = icmp ne i32 %50, 1
  %52 = zext i1 %51 to i32
  store i32 %52, ptr %13, align 4, !tbaa !14
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.KINMemRec, ptr %53, i32 0, i32 46
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = getelementptr inbounds %struct._generic_N_Vector, ptr %55, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  %58 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %57, i32 0, i32 11
  %59 = load ptr, ptr %58, align 8, !tbaa !22
  %60 = icmp eq ptr %59, null
  br i1 %60, label %70, label %61

61:                                               ; preds = %46
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.KINMemRec, ptr %62, i32 0, i32 46
  %64 = load ptr, ptr %63, align 8, !tbaa !16
  %65 = getelementptr inbounds %struct._generic_N_Vector, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  %67 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %66, i32 0, i32 18
  %68 = load ptr, ptr %67, align 8, !tbaa !24
  %69 = icmp eq ptr %68, null
  br i1 %69, label %70, label %72

70:                                               ; preds = %61, %46
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %71, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.6)
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

72:                                               ; preds = %61
  %73 = load i32, ptr %12, align 4, !tbaa !14
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %114

75:                                               ; preds = %72
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %78, i32 0, i32 4
  %80 = load ptr, ptr %79, align 8, !tbaa !25
  %81 = icmp eq ptr %80, null
  br i1 %81, label %82, label %93

82:                                               ; preds = %75
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.KINMemRec, ptr %83, i32 0, i32 46
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = getelementptr inbounds %struct._generic_N_Vector, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !20
  %88 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %87, i32 0, i32 9
  %89 = load ptr, ptr %88, align 8, !tbaa !26
  %90 = icmp eq ptr %89, null
  br i1 %90, label %91, label %93

91:                                               ; preds = %82
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %92, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.6)
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

93:                                               ; preds = %82, %75
  %94 = load i32, ptr %13, align 4, !tbaa !14
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %105, label %96

96:                                               ; preds = %93
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %99, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !27
  %102 = icmp eq ptr %101, null
  br i1 %102, label %103, label %105

103:                                              ; preds = %96
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %104, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.7)
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

105:                                              ; preds = %96, %93
  %106 = load i32, ptr %13, align 4, !tbaa !14
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %113

108:                                              ; preds = %105
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = icmp eq ptr %109, null
  br i1 %110, label %111, label %113

111:                                              ; preds = %108
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %112, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.8)
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

113:                                              ; preds = %108, %105
  br label %120

114:                                              ; preds = %72
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = icmp eq ptr %115, null
  br i1 %116, label %117, label %119

117:                                              ; preds = %114
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %118, i32 noundef -3, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.9)
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

119:                                              ; preds = %114
  br label %120

120:                                              ; preds = %119, %113
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.KINMemRec, ptr %121, i32 0, i32 77
  %123 = load ptr, ptr %122, align 8, !tbaa !28
  %124 = icmp ne ptr %123, null
  br i1 %124, label %125, label %131

125:                                              ; preds = %120
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.KINMemRec, ptr %126, i32 0, i32 77
  %128 = load ptr, ptr %127, align 8, !tbaa !28
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = call i32 %128(ptr noundef %129)
  br label %131

131:                                              ; preds = %125, %120
  %132 = load i32, ptr %12, align 4, !tbaa !14
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.KINMemRec, ptr %133, i32 0, i32 78
  store i32 %132, ptr %134, align 8, !tbaa !29
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.KINMemRec, ptr %135, i32 0, i32 74
  store ptr @kinLsInitialize, ptr %136, align 8, !tbaa !30
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.KINMemRec, ptr %137, i32 0, i32 75
  store ptr @kinLsSetup, ptr %138, align 8, !tbaa !31
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.KINMemRec, ptr %139, i32 0, i32 76
  store ptr @kinLsSolve, ptr %140, align 8, !tbaa !32
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.KINMemRec, ptr %141, i32 0, i32 77
  store ptr @kinLsFree, ptr %142, align 8, !tbaa !28
  store ptr null, ptr %9, align 8, !tbaa !5
  %143 = call noalias ptr @malloc(i64 noundef 184) #7
  store ptr %143, ptr %9, align 8, !tbaa !5
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = icmp eq ptr %144, null
  br i1 %145, label %146, label %148

146:                                              ; preds = %131
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %147, i32 noundef -4, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.10)
  store i32 -4, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

148:                                              ; preds = %131
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %149, i8 0, i64 184, i1 false)
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.KINLsMemRec, ptr %151, i32 0, i32 5
  store ptr %150, ptr %152, align 8, !tbaa !33
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = icmp ne ptr %153, null
  br i1 %154, label %155, label %163

155:                                              ; preds = %148
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.KINLsMemRec, ptr %156, i32 0, i32 2
  store i32 1, ptr %157, align 8, !tbaa !35
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.KINLsMemRec, ptr %158, i32 0, i32 3
  store ptr @kinLsDQJac, ptr %159, align 8, !tbaa !36
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.KINLsMemRec, ptr %161, i32 0, i32 4
  store ptr %160, ptr %162, align 8, !tbaa !37
  br label %170

163:                                              ; preds = %148
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.KINLsMemRec, ptr %164, i32 0, i32 2
  store i32 0, ptr %165, align 8, !tbaa !35
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.KINLsMemRec, ptr %166, i32 0, i32 3
  store ptr null, ptr %167, align 8, !tbaa !36
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.KINLsMemRec, ptr %168, i32 0, i32 4
  store ptr null, ptr %169, align 8, !tbaa !37
  br label %170

170:                                              ; preds = %163, %155
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.KINLsMemRec, ptr %171, i32 0, i32 21
  store i32 1, ptr %172, align 8, !tbaa !38
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.KINLsMemRec, ptr %173, i32 0, i32 22
  store ptr @kinLsDQJtimes, ptr %174, align 8, !tbaa !39
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.KINMemRec, ptr %175, i32 0, i32 2
  %177 = load ptr, ptr %176, align 8, !tbaa !40
  %178 = load ptr, ptr %9, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.KINLsMemRec, ptr %178, i32 0, i32 23
  store ptr %177, ptr %179, align 8, !tbaa !41
  %180 = load ptr, ptr %8, align 8, !tbaa !5
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.KINLsMemRec, ptr %181, i32 0, i32 24
  store ptr %180, ptr %182, align 8, !tbaa !42
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.KINLsMemRec, ptr %183, i32 0, i32 17
  store ptr null, ptr %184, align 8, !tbaa !43
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.KINLsMemRec, ptr %185, i32 0, i32 18
  store ptr null, ptr %186, align 8, !tbaa !44
  %187 = load ptr, ptr %9, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.KINLsMemRec, ptr %187, i32 0, i32 19
  store ptr null, ptr %188, align 8, !tbaa !45
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.KINMemRec, ptr %189, i32 0, i32 3
  %191 = load ptr, ptr %190, align 8, !tbaa !46
  %192 = load ptr, ptr %9, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.KINLsMemRec, ptr %192, i32 0, i32 20
  store ptr %191, ptr %193, align 8, !tbaa !47
  %194 = load ptr, ptr %9, align 8, !tbaa !5
  %195 = call i32 @kinLsInitializeCounters(ptr noundef %194)
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.KINLsMemRec, ptr %196, i32 0, i32 16
  store i32 0, ptr %197, align 4, !tbaa !48
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %198, i32 0, i32 1
  %200 = load ptr, ptr %199, align 8, !tbaa !9
  %201 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %200, i32 0, i32 2
  %202 = load ptr, ptr %201, align 8, !tbaa !27
  %203 = icmp ne ptr %202, null
  br i1 %203, label %204, label %214

204:                                              ; preds = %170
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = call i32 @SUNLinSolSetATimes(ptr noundef %205, ptr noundef %206, ptr noundef @kinLsATimes)
  store i32 %207, ptr %10, align 4, !tbaa !14
  %208 = load i32, ptr %10, align 4, !tbaa !14
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %213

210:                                              ; preds = %204
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %211, i32 noundef -8, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.11)
  %212 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %212) #6
  store ptr null, ptr %9, align 8, !tbaa !5
  store i32 -8, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

213:                                              ; preds = %204
  br label %214

214:                                              ; preds = %213, %170
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %215, i32 0, i32 1
  %217 = load ptr, ptr %216, align 8, !tbaa !9
  %218 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %217, i32 0, i32 3
  %219 = load ptr, ptr %218, align 8, !tbaa !49
  %220 = icmp ne ptr %219, null
  br i1 %220, label %221, label %231

221:                                              ; preds = %214
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = load ptr, ptr %8, align 8, !tbaa !5
  %224 = call i32 @SUNLinSolSetPreconditioner(ptr noundef %222, ptr noundef %223, ptr noundef null, ptr noundef null)
  store i32 %224, ptr %10, align 4, !tbaa !14
  %225 = load i32, ptr %10, align 4, !tbaa !14
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %227, label %230

227:                                              ; preds = %221
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef %228, i32 noundef -8, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.12)
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %229) #6
  store ptr null, ptr %9, align 8, !tbaa !5
  store i32 -8, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

230:                                              ; preds = %221
  br label %231

231:                                              ; preds = %230, %214
  %232 = load ptr, ptr %9, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.KINLsMemRec, ptr %232, i32 0, i32 7
  store double -1.000000e+00, ptr %233, align 8, !tbaa !50
  %234 = load ptr, ptr %7, align 8, !tbaa !5
  %235 = load ptr, ptr %9, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.KINLsMemRec, ptr %235, i32 0, i32 6
  store ptr %234, ptr %236, align 8, !tbaa !51
  %237 = load ptr, ptr %9, align 8, !tbaa !5
  %238 = load ptr, ptr %8, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.KINMemRec, ptr %238, i32 0, i32 79
  store ptr %237, ptr %239, align 8, !tbaa !52
  store i32 0, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %240

240:                                              ; preds = %231, %227, %210, %146, %117, %111, %103, %91, %70, %44, %37, %21, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %241 = load i32, ptr %4, align 4
  ret i32 %241
}

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

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

declare i32 @SUNLinSolGetType(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @kinLsInitialize(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @kinLsSetup(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @kinLsFree(ptr noundef) #0

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @kinLsInitializeCounters(ptr noundef) #0

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

declare i32 @SUNLinSolSetPreconditioner(ptr noundef, ptr noundef, ptr noundef, ptr 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 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind "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 #6 = { nounwind }
attributes #7 = { 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, !6, i64 8}
!10 = !{!"_generic_SUNLinearSolver", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!12, !6, i64 0}
!12 = !{!"_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}
!13 = !{!12, !6, i64 64}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !6, i64 328}
!17 = !{!"KINMemRec", !6, i64 0, !18, i64 8, !6, i64 16, !6, i64 24, !18, i64 32, !18, i64 40, !15, i64 48, !15, i64 52, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !15, i64 88, !15, i64 92, !15, i64 96, !15, i64 100, !15, i64 104, !15, i64 108, !15, i64 112, !15, i64 116, !18, i64 120, !18, i64 128, !18, i64 136, !18, i64 144, !18, i64 152, !18, i64 160, !18, i64 168, !18, i64 176, !18, i64 184, !15, i64 192, !18, i64 200, !19, i64 208, !19, i64 216, !19, i64 224, !19, i64 232, !19, i64 240, !19, i64 248, !19, 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, !15, i64 352, !15, i64 356, !18, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !18, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !19, i64 448, !19, i64 456, !15, i64 464, !6, i64 472, !6, i64 480, !15, i64 488, !6, i64 496, !6, i64 504, !19, i64 512, !19, i64 520, !19, i64 528, !19, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !15, i64 576, !6, i64 584, !18, i64 592, !18, i64 600, !18, i64 608, !18, i64 616, !18, i64 624, !15, i64 632, !18, i64 640, !18, i64 648, !18, i64 656, !15, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720}
!18 = !{!"double", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!21, !6, i64 8}
!21 = !{!"_generic_N_Vector", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!23, !6, i64 88}
!23 = !{!"_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}
!24 = !{!23, !6, i64 144}
!25 = !{!12, !6, i64 32}
!26 = !{!23, !6, i64 72}
!27 = !{!12, !6, i64 16}
!28 = !{!17, !6, i64 568}
!29 = !{!17, !15, i64 576}
!30 = !{!17, !6, i64 544}
!31 = !{!17, !6, i64 552}
!32 = !{!17, !6, i64 560}
!33 = !{!34, !6, i64 32}
!34 = !{!"KINLsMemRec", !15, i64 0, !15, i64 4, !15, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !18, i64 48, !19, i64 56, !19, i64 64, !19, i64 72, !19, i64 80, !19, i64 88, !19, i64 96, !19, i64 104, !15, i64 112, !15, i64 116, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !15, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!35 = !{!34, !15, i64 8}
!36 = !{!34, !6, i64 16}
!37 = !{!34, !6, i64 24}
!38 = !{!34, !15, i64 152}
!39 = !{!34, !6, i64 160}
!40 = !{!17, !6, i64 16}
!41 = !{!34, !6, i64 168}
!42 = !{!34, !6, i64 176}
!43 = !{!34, !6, i64 120}
!44 = !{!34, !6, i64 128}
!45 = !{!34, !6, i64 136}
!46 = !{!17, !6, i64 24}
!47 = !{!34, !6, i64 144}
!48 = !{!34, !15, i64 116}
!49 = !{!12, !6, i64 24}
!50 = !{!34, !18, i64 48}
!51 = !{!34, !6, i64 40}
!52 = !{!17, !6, i64 584}


; 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 [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1

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

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

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

8:                                                ; preds = %6
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef null, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.3) #5
  br label %106

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

14:                                               ; preds = %9
  %15 = getelementptr inbounds i8, ptr %11, i64 64
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %14, %9
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.4) #5
  br label %106

19:                                               ; preds = %14
  %20 = tail call i32 @SUNLinSolGetType(ptr noundef nonnull %1) #5
  %21 = icmp eq i32 %20, 3
  br i1 %21, label %22, label %23

22:                                               ; preds = %19
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.5) #5
  br label %106

23:                                               ; preds = %19
  %24 = icmp ne i32 %20, 0
  %25 = zext i1 %24 to i32
  %.not91 = icmp eq i32 %20, 1
  %26 = getelementptr inbounds i8, ptr %0, i64 328
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !18
  %30 = getelementptr inbounds i8, ptr %29, i64 88
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %32 = icmp eq ptr %31, null
  br i1 %32, label %37, label %33

33:                                               ; preds = %23
  %34 = getelementptr inbounds i8, ptr %29, i64 144
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %38

37:                                               ; preds = %33, %23
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.6) #5
  br label %106

38:                                               ; preds = %33
  br i1 %24, label %39, label %58

39:                                               ; preds = %38
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 32
  %42 = load ptr, ptr %41, align 8, !tbaa !23
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %49

44:                                               ; preds = %39
  %45 = getelementptr inbounds i8, ptr %29, i64 72
  %46 = load ptr, ptr %45, align 8, !tbaa !24
  %47 = icmp eq ptr %46, null
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.6) #5
  br label %106

49:                                               ; preds = %44, %39
  br i1 %.not91, label %50, label %55

50:                                               ; preds = %49
  %51 = getelementptr inbounds i8, ptr %40, i64 16
  %52 = load ptr, ptr %51, align 8, !tbaa !25
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %.thread

54:                                               ; preds = %50
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.7) #5
  br label %106

55:                                               ; preds = %49
  %56 = icmp eq ptr %2, null
  br i1 %56, label %57, label %.thread

57:                                               ; preds = %55
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.8) #5
  br label %106

58:                                               ; preds = %38
  %59 = icmp eq ptr %2, null
  br i1 %59, label %60, label %.thread

60:                                               ; preds = %58
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.9) #5
  br label %106

.thread:                                          ; preds = %50, %58, %55
  %61 = getelementptr inbounds i8, ptr %0, i64 568
  %62 = load ptr, ptr %61, align 8, !tbaa !26
  %.not = icmp eq ptr %62, null
  br i1 %.not, label %65, label %63

63:                                               ; preds = %.thread
  %64 = tail call i32 %62(ptr noundef nonnull %0) #5
  br label %65

65:                                               ; preds = %63, %.thread
  %66 = getelementptr inbounds i8, ptr %0, i64 576
  store i32 %25, ptr %66, align 8, !tbaa !27
  %67 = getelementptr inbounds i8, ptr %0, i64 544
  store ptr @kinLsInitialize, ptr %67, align 8, !tbaa !28
  %68 = getelementptr inbounds i8, ptr %0, i64 552
  store ptr @kinLsSetup, ptr %68, align 8, !tbaa !29
  %69 = getelementptr inbounds i8, ptr %0, i64 560
  store ptr @kinLsSolve, ptr %69, align 8, !tbaa !30
  store ptr @kinLsFree, ptr %61, align 8, !tbaa !26
  %calloc = tail call dereferenceable_or_null(184) ptr @calloc(i64 1, i64 184)
  %70 = icmp eq ptr %calloc, null
  br i1 %70, label %71, label %72

71:                                               ; preds = %65
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -4, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.10) #5
  br label %106

72:                                               ; preds = %65
  %73 = getelementptr inbounds i8, ptr %calloc, i64 32
  store ptr %1, ptr %73, align 8, !tbaa !31
  %.not84 = icmp ne ptr %2, null
  %.sink90 = zext i1 %.not84 to i32
  %kinLsDQJac.sink = select i1 %.not84, ptr @kinLsDQJac, ptr null
  %.sink = select i1 %.not84, ptr %0, ptr null
  %74 = getelementptr inbounds i8, ptr %calloc, i64 8
  store i32 %.sink90, ptr %74, align 8
  %75 = getelementptr inbounds i8, ptr %calloc, i64 16
  store ptr %kinLsDQJac.sink, ptr %75, align 8
  %76 = getelementptr inbounds i8, ptr %calloc, i64 24
  store ptr %.sink, ptr %76, align 8
  %77 = getelementptr inbounds i8, ptr %calloc, i64 152
  store i32 1, ptr %77, align 8, !tbaa !33
  %78 = getelementptr inbounds i8, ptr %calloc, i64 160
  store ptr @kinLsDQJtimes, ptr %78, align 8, !tbaa !34
  %79 = getelementptr inbounds i8, ptr %0, i64 16
  %80 = load ptr, ptr %79, align 8, !tbaa !35
  %81 = getelementptr inbounds i8, ptr %calloc, i64 168
  store ptr %80, ptr %81, align 8, !tbaa !36
  %82 = getelementptr inbounds i8, ptr %calloc, i64 176
  store ptr %0, ptr %82, align 8, !tbaa !37
  %83 = getelementptr inbounds i8, ptr %calloc, i64 120
  %84 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %83, i8 0, i64 24, i1 false)
  %85 = load ptr, ptr %84, align 8, !tbaa !38
  %86 = getelementptr inbounds i8, ptr %calloc, i64 144
  store ptr %85, ptr %86, align 8, !tbaa !39
  %87 = tail call i32 @kinLsInitializeCounters(ptr noundef nonnull %calloc)
  %88 = getelementptr inbounds i8, ptr %calloc, i64 116
  store i32 0, ptr %88, align 4, !tbaa !40
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 16
  %91 = load ptr, ptr %90, align 8, !tbaa !25
  %.not85 = icmp eq ptr %91, null
  br i1 %.not85, label %95, label %92

92:                                               ; preds = %72
  %93 = tail call i32 @SUNLinSolSetATimes(ptr noundef nonnull %1, ptr noundef nonnull %0, ptr noundef nonnull @kinLsATimes) #5
  %.not86 = icmp eq i32 %93, 0
  br i1 %.not86, label %._crit_edge, label %94

._crit_edge:                                      ; preds = %92
  %.pre = load ptr, ptr %10, align 8, !tbaa !5
  br label %95

94:                                               ; preds = %92
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -8, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.11) #5
  tail call void @free(ptr noundef nonnull %calloc) #5
  br label %106

95:                                               ; preds = %._crit_edge, %72
  %96 = phi ptr [ %.pre, %._crit_edge ], [ %89, %72 ]
  %97 = getelementptr inbounds i8, ptr %96, i64 24
  %98 = load ptr, ptr %97, align 8, !tbaa !41
  %.not87 = icmp eq ptr %98, null
  br i1 %.not87, label %102, label %99

99:                                               ; preds = %95
  %100 = tail call i32 @SUNLinSolSetPreconditioner(ptr noundef nonnull %1, ptr noundef nonnull %0, ptr noundef null, ptr noundef null) #5
  %.not88 = icmp eq i32 %100, 0
  br i1 %.not88, label %102, label %101

101:                                              ; preds = %99
  tail call void (ptr, i32, ptr, ptr, ptr, ...) @KINProcessError(ptr noundef nonnull %0, i32 noundef -8, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.12) #5
  tail call void @free(ptr noundef nonnull %calloc) #5
  br label %106

102:                                              ; preds = %99, %95
  %103 = getelementptr inbounds i8, ptr %calloc, i64 48
  store double -1.000000e+00, ptr %103, align 8, !tbaa !42
  %104 = getelementptr inbounds i8, ptr %calloc, i64 40
  store ptr %2, ptr %104, align 8, !tbaa !43
  %105 = getelementptr inbounds i8, ptr %0, i64 584
  store ptr %calloc, ptr %105, align 8, !tbaa !44
  br label %106

106:                                              ; preds = %102, %101, %94, %71, %60, %57, %54, %48, %37, %22, %18, %8, %5
  %.0 = phi i32 [ -1, %5 ], [ -3, %8 ], [ -3, %18 ], [ -3, %22 ], [ -3, %37 ], [ -3, %48 ], [ -3, %57 ], [ -4, %71 ], [ -8, %94 ], [ -8, %101 ], [ 0, %102 ], [ -3, %54 ], [ -3, %60 ]
  ret i32 %.0
}

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

declare i32 @SUNLinSolGetType(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @kinLsInitialize(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @kinLsSetup(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @kinLsFree(ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @kinLsInitializeCounters(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

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

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 #4 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #5 = { 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_SUNLinearSolver", !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_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}
!12 = !{!11, !7, i64 64}
!13 = !{!14, !7, i64 328}
!14 = !{!"KINMemRec", !7, i64 0, !15, i64 8, !7, i64 16, !7, i64 24, !15, i64 32, !15, i64 40, !16, i64 48, !16, i64 52, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !16, i64 88, !16, i64 92, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108, !16, i64 112, !16, i64 116, !15, i64 120, !15, i64 128, !15, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !15, i64 168, !15, i64 176, !15, i64 184, !16, i64 192, !15, i64 200, !17, i64 208, !17, i64 216, !17, i64 224, !17, i64 232, !17, i64 240, !17, i64 248, !17, 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, !16, i64 352, !16, i64 356, !15, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !15, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !17, i64 448, !17, i64 456, !16, i64 464, !7, i64 472, !7, i64 480, !16, i64 488, !7, i64 496, !7, i64 504, !17, i64 512, !17, i64 520, !17, i64 528, !17, i64 536, !7, i64 544, !7, i64 552, !7, i64 560, !7, i64 568, !16, i64 576, !7, i64 584, !15, i64 592, !15, i64 600, !15, i64 608, !15, i64 616, !15, i64 624, !16, i64 632, !15, i64 640, !15, i64 648, !15, i64 656, !16, i64 664, !7, i64 672, !7, i64 680, !7, i64 688, !7, i64 696, !7, i64 704, !7, i64 712, !7, i64 720}
!15 = !{!"double", !8, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!19, !7, i64 8}
!19 = !{!"_generic_N_Vector", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!21, !7, i64 88}
!21 = !{!"_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}
!22 = !{!21, !7, i64 144}
!23 = !{!11, !7, i64 32}
!24 = !{!21, !7, i64 72}
!25 = !{!11, !7, i64 16}
!26 = !{!14, !7, i64 568}
!27 = !{!14, !16, i64 576}
!28 = !{!14, !7, i64 544}
!29 = !{!14, !7, i64 552}
!30 = !{!14, !7, i64 560}
!31 = !{!32, !7, i64 32}
!32 = !{!"KINLsMemRec", !16, i64 0, !16, i64 4, !16, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !15, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !16, i64 112, !16, i64 116, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !16, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!33 = !{!32, !16, i64 152}
!34 = !{!32, !7, i64 160}
!35 = !{!14, !7, i64 16}
!36 = !{!32, !7, i64 168}
!37 = !{!32, !7, i64 176}
!38 = !{!14, !7, i64 24}
!39 = !{!32, !7, i64 144}
!40 = !{!32, !16, i64 116}
!41 = !{!11, !7, i64 24}
!42 = !{!32, !15, i64 48}
!43 = !{!32, !7, i64 40}
!44 = !{!14, !7, i64 584}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,MergedLoadStoreMotionPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass