; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/src/sunlinsol/spbcgs (sunlinsol_spbcgs)

; 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_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._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._SUNLinearSolverContent_SPBCGS = type { i32, i32, i32, i32, double, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr }

@stdout = external global ptr, align 8

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

15:                                               ; preds = %4
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = icmp ne i32 %16, 1
  br i1 %17, label %18, label %25

18:                                               ; preds = %15
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = icmp ne i32 %19, 2
  br i1 %20, label %21, label %25

21:                                               ; preds = %18
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 3
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %24, %21, %18, %15, %4
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = icmp sle i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  store i32 5, ptr %8, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %28, %25
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._generic_N_Vector, ptr %30, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = icmp eq ptr %34, null
  br i1 %35, label %78, label %36

36:                                               ; preds = %29
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._generic_N_Vector, ptr %37, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %39, i32 0, i32 3
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  %42 = icmp eq ptr %41, null
  br i1 %42, label %78, label %43

43:                                               ; preds = %36
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._generic_N_Vector, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %46, i32 0, i32 10
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = icmp eq ptr %48, null
  br i1 %49, label %78, label %50

50:                                               ; preds = %43
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct._generic_N_Vector, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %53, i32 0, i32 12
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  %56 = icmp eq ptr %55, null
  br i1 %56, label %78, label %57

57:                                               ; preds = %50
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._generic_N_Vector, ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %60, i32 0, i32 13
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = icmp eq ptr %62, null
  br i1 %63, label %78, label %64

64:                                               ; preds = %57
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._generic_N_Vector, ptr %65, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %67, i32 0, i32 14
  %69 = load ptr, ptr %68, align 8, !tbaa !19
  %70 = icmp eq ptr %69, null
  br i1 %70, label %78, label %71

71:                                               ; preds = %64
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._generic_N_Vector, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !11
  %75 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %74, i32 0, i32 18
  %76 = load ptr, ptr %75, align 8, !tbaa !20
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %79

78:                                               ; preds = %71, %64, %57, %50, %43, %36, %29
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

79:                                               ; preds = %71
  store ptr null, ptr %10, align 8, !tbaa !5
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = call ptr @SUNLinSolNewEmpty(ptr noundef %80)
  store ptr %81, ptr %10, align 8, !tbaa !5
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %85

84:                                               ; preds = %79
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

85:                                               ; preds = %79
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !21
  %89 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %88, i32 0, i32 0
  store ptr @SUNLinSolGetType_SPBCGS, ptr %89, align 8, !tbaa !23
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  %93 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %92, i32 0, i32 1
  store ptr @SUNLinSolGetID_SPBCGS, ptr %93, align 8, !tbaa !25
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !21
  %97 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %96, i32 0, i32 2
  store ptr @SUNLinSolSetATimes_SPBCGS, ptr %97, align 8, !tbaa !26
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !21
  %101 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %100, i32 0, i32 3
  store ptr @SUNLinSolSetPreconditioner_SPBCGS, ptr %101, align 8, !tbaa !27
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !21
  %105 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %104, i32 0, i32 4
  store ptr @SUNLinSolSetScalingVectors_SPBCGS, ptr %105, align 8, !tbaa !28
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !21
  %109 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %108, i32 0, i32 5
  store ptr @SUNLinSolSetZeroGuess_SPBCGS, ptr %109, align 8, !tbaa !29
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %110, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !21
  %113 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %112, i32 0, i32 6
  store ptr @SUNLinSolInitialize_SPBCGS, ptr %113, align 8, !tbaa !30
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !21
  %117 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %116, i32 0, i32 7
  store ptr @SUNLinSolSetup_SPBCGS, ptr %117, align 8, !tbaa !31
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %118, i32 0, i32 1
  %120 = load ptr, ptr %119, align 8, !tbaa !21
  %121 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %120, i32 0, i32 8
  store ptr @SUNLinSolSolve_SPBCGS, ptr %121, align 8, !tbaa !32
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !21
  %125 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %124, i32 0, i32 9
  store ptr @SUNLinSolNumIters_SPBCGS, ptr %125, align 8, !tbaa !33
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %126, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8, !tbaa !21
  %129 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %128, i32 0, i32 10
  store ptr @SUNLinSolResNorm_SPBCGS, ptr %129, align 8, !tbaa !34
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %130, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !21
  %133 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %132, i32 0, i32 13
  store ptr @SUNLinSolResid_SPBCGS, ptr %133, align 8, !tbaa !35
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %134, i32 0, i32 1
  %136 = load ptr, ptr %135, align 8, !tbaa !21
  %137 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %136, i32 0, i32 11
  store ptr @SUNLinSolLastFlag_SPBCGS, ptr %137, align 8, !tbaa !36
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %138, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !21
  %141 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %140, i32 0, i32 12
  store ptr @SUNLinSolSpace_SPBCGS, ptr %141, align 8, !tbaa !37
  %142 = load ptr, ptr %10, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %142, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %144, i32 0, i32 14
  store ptr @SUNLinSolFree_SPBCGS, ptr %145, align 8, !tbaa !38
  store ptr null, ptr %11, align 8, !tbaa !5
  %146 = call noalias ptr @malloc(i64 noundef 160) #5
  store ptr %146, ptr %11, align 8, !tbaa !5
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = icmp eq ptr %147, null
  br i1 %148, label %149, label %152

149:                                              ; preds = %85
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  %151 = call i32 @SUNLinSolFree(ptr noundef %150)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

152:                                              ; preds = %85
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %154, i32 0, i32 0
  store ptr %153, ptr %155, align 8, !tbaa !39
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %156, i32 0, i32 5
  store i32 0, ptr %157, align 8, !tbaa !40
  %158 = load i32, ptr %8, align 4, !tbaa !9
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %159, i32 0, i32 0
  store i32 %158, ptr %160, align 8, !tbaa !43
  %161 = load i32, ptr %7, align 4, !tbaa !9
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %162, i32 0, i32 1
  store i32 %161, ptr %163, align 4, !tbaa !44
  %164 = load ptr, ptr %11, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %164, i32 0, i32 2
  store i32 0, ptr %165, align 8, !tbaa !45
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %166, i32 0, i32 3
  store i32 0, ptr %167, align 4, !tbaa !46
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %168, i32 0, i32 4
  store double 0.000000e+00, ptr %169, align 8, !tbaa !47
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %170, i32 0, i32 14
  store ptr null, ptr %171, align 8, !tbaa !48
  %172 = load ptr, ptr %11, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %172, i32 0, i32 13
  store ptr null, ptr %173, align 8, !tbaa !49
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %174, i32 0, i32 15
  store ptr null, ptr %175, align 8, !tbaa !50
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %176, i32 0, i32 16
  store ptr null, ptr %177, align 8, !tbaa !51
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %178, i32 0, i32 17
  store ptr null, ptr %179, align 8, !tbaa !52
  %180 = load ptr, ptr %11, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %180, i32 0, i32 18
  store ptr null, ptr %181, align 8, !tbaa !53
  %182 = load ptr, ptr %11, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %182, i32 0, i32 19
  store ptr null, ptr %183, align 8, !tbaa !54
  %184 = load ptr, ptr %11, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %184, i32 0, i32 11
  store ptr null, ptr %185, align 8, !tbaa !55
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %186, i32 0, i32 12
  store ptr null, ptr %187, align 8, !tbaa !56
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %188, i32 0, i32 6
  store ptr null, ptr %189, align 8, !tbaa !57
  %190 = load ptr, ptr %11, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %190, i32 0, i32 7
  store ptr null, ptr %191, align 8, !tbaa !58
  %192 = load ptr, ptr %11, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %192, i32 0, i32 8
  store ptr null, ptr %193, align 8, !tbaa !59
  %194 = load ptr, ptr %11, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %194, i32 0, i32 9
  store ptr null, ptr %195, align 8, !tbaa !60
  %196 = load ptr, ptr %11, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %196, i32 0, i32 10
  store ptr null, ptr %197, align 8, !tbaa !61
  %198 = load ptr, ptr %11, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %198, i32 0, i32 20
  store i32 0, ptr %199, align 8, !tbaa !62
  %200 = load ptr, ptr @stdout, align 8, !tbaa !5
  %201 = load ptr, ptr %11, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %201, i32 0, i32 21
  store ptr %200, ptr %202, align 8, !tbaa !63
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = call ptr @N_VClone(ptr noundef %203)
  %205 = load ptr, ptr %11, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %205, i32 0, i32 14
  store ptr %204, ptr %206, align 8, !tbaa !48
  %207 = load ptr, ptr %11, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %207, i32 0, i32 14
  %209 = load ptr, ptr %208, align 8, !tbaa !48
  %210 = icmp eq ptr %209, null
  br i1 %210, label %211, label %214

211:                                              ; preds = %152
  %212 = load ptr, ptr %10, align 8, !tbaa !5
  %213 = call i32 @SUNLinSolFree(ptr noundef %212)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

214:                                              ; preds = %152
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = call ptr @N_VClone(ptr noundef %215)
  %217 = load ptr, ptr %11, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %217, i32 0, i32 13
  store ptr %216, ptr %218, align 8, !tbaa !49
  %219 = load ptr, ptr %11, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %219, i32 0, i32 13
  %221 = load ptr, ptr %220, align 8, !tbaa !49
  %222 = icmp eq ptr %221, null
  br i1 %222, label %223, label %226

223:                                              ; preds = %214
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  %225 = call i32 @SUNLinSolFree(ptr noundef %224)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

226:                                              ; preds = %214
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = call ptr @N_VClone(ptr noundef %227)
  %229 = load ptr, ptr %11, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %229, i32 0, i32 15
  store ptr %228, ptr %230, align 8, !tbaa !50
  %231 = load ptr, ptr %11, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %231, i32 0, i32 15
  %233 = load ptr, ptr %232, align 8, !tbaa !50
  %234 = icmp eq ptr %233, null
  br i1 %234, label %235, label %238

235:                                              ; preds = %226
  %236 = load ptr, ptr %10, align 8, !tbaa !5
  %237 = call i32 @SUNLinSolFree(ptr noundef %236)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

238:                                              ; preds = %226
  %239 = load ptr, ptr %6, align 8, !tbaa !5
  %240 = call ptr @N_VClone(ptr noundef %239)
  %241 = load ptr, ptr %11, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %241, i32 0, i32 16
  store ptr %240, ptr %242, align 8, !tbaa !51
  %243 = load ptr, ptr %11, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %243, i32 0, i32 16
  %245 = load ptr, ptr %244, align 8, !tbaa !51
  %246 = icmp eq ptr %245, null
  br i1 %246, label %247, label %250

247:                                              ; preds = %238
  %248 = load ptr, ptr %10, align 8, !tbaa !5
  %249 = call i32 @SUNLinSolFree(ptr noundef %248)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

250:                                              ; preds = %238
  %251 = load ptr, ptr %6, align 8, !tbaa !5
  %252 = call ptr @N_VClone(ptr noundef %251)
  %253 = load ptr, ptr %11, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %253, i32 0, i32 17
  store ptr %252, ptr %254, align 8, !tbaa !52
  %255 = load ptr, ptr %11, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %255, i32 0, i32 17
  %257 = load ptr, ptr %256, align 8, !tbaa !52
  %258 = icmp eq ptr %257, null
  br i1 %258, label %259, label %262

259:                                              ; preds = %250
  %260 = load ptr, ptr %10, align 8, !tbaa !5
  %261 = call i32 @SUNLinSolFree(ptr noundef %260)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

262:                                              ; preds = %250
  %263 = load ptr, ptr %6, align 8, !tbaa !5
  %264 = call ptr @N_VClone(ptr noundef %263)
  %265 = load ptr, ptr %11, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %265, i32 0, i32 18
  store ptr %264, ptr %266, align 8, !tbaa !53
  %267 = load ptr, ptr %11, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %267, i32 0, i32 18
  %269 = load ptr, ptr %268, align 8, !tbaa !53
  %270 = icmp eq ptr %269, null
  br i1 %270, label %271, label %274

271:                                              ; preds = %262
  %272 = load ptr, ptr %10, align 8, !tbaa !5
  %273 = call i32 @SUNLinSolFree(ptr noundef %272)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

274:                                              ; preds = %262
  %275 = load ptr, ptr %6, align 8, !tbaa !5
  %276 = call ptr @N_VClone(ptr noundef %275)
  %277 = load ptr, ptr %11, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %277, i32 0, i32 19
  store ptr %276, ptr %278, align 8, !tbaa !54
  %279 = load ptr, ptr %11, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct._SUNLinearSolverContent_SPBCGS, ptr %279, i32 0, i32 19
  %281 = load ptr, ptr %280, align 8, !tbaa !54
  %282 = icmp eq ptr %281, null
  br i1 %282, label %283, label %286

283:                                              ; preds = %274
  %284 = load ptr, ptr %10, align 8, !tbaa !5
  %285 = call i32 @SUNLinSolFree(ptr noundef %284)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

286:                                              ; preds = %274
  %287 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %287, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %288

288:                                              ; preds = %286, %283, %271, %259, %247, %235, %223, %211, %149, %84, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %289 = load ptr, ptr %5, align 8
  ret ptr %289
}

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

declare ptr @SUNLinSolNewEmpty(ptr noundef) #2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local double @SUNLinSolResNorm_SPBCGS(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @SUNLinSolLastFlag_SPBCGS(ptr noundef) #0

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

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

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

declare i32 @SUNLinSolFree(ptr noundef) #2

declare ptr @N_VClone(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 = { 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, !6, i64 8}
!12 = !{!"_generic_N_Vector", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!14, !6, i64 8}
!14 = !{!"_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}
!15 = !{!14, !6, i64 24}
!16 = !{!14, !6, i64 80}
!17 = !{!14, !6, i64 96}
!18 = !{!14, !6, i64 104}
!19 = !{!14, !6, i64 112}
!20 = !{!14, !6, i64 144}
!21 = !{!22, !6, i64 8}
!22 = !{!"_generic_SUNLinearSolver", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!24, !6, i64 0}
!24 = !{!"_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}
!25 = !{!24, !6, i64 8}
!26 = !{!24, !6, i64 16}
!27 = !{!24, !6, i64 24}
!28 = !{!24, !6, i64 32}
!29 = !{!24, !6, i64 40}
!30 = !{!24, !6, i64 48}
!31 = !{!24, !6, i64 56}
!32 = !{!24, !6, i64 64}
!33 = !{!24, !6, i64 72}
!34 = !{!24, !6, i64 80}
!35 = !{!24, !6, i64 104}
!36 = !{!24, !6, i64 88}
!37 = !{!24, !6, i64 96}
!38 = !{!24, !6, i64 112}
!39 = !{!22, !6, i64 0}
!40 = !{!41, !10, i64 24}
!41 = !{!"_SUNLinearSolverContent_SPBCGS", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !42, i64 16, !10, 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, !10, i64 144, !6, i64 152}
!42 = !{!"double", !7, i64 0}
!43 = !{!41, !10, i64 0}
!44 = !{!41, !10, i64 4}
!45 = !{!41, !10, i64 8}
!46 = !{!41, !10, i64 12}
!47 = !{!41, !42, i64 16}
!48 = !{!41, !6, i64 96}
!49 = !{!41, !6, i64 88}
!50 = !{!41, !6, i64 104}
!51 = !{!41, !6, i64 112}
!52 = !{!41, !6, i64 120}
!53 = !{!41, !6, i64 128}
!54 = !{!41, !6, i64 136}
!55 = !{!41, !6, i64 72}
!56 = !{!41, !6, i64 80}
!57 = !{!41, !6, i64 32}
!58 = !{!41, !6, i64 40}
!59 = !{!41, !6, i64 48}
!60 = !{!41, !6, i64 56}
!61 = !{!41, !6, i64 64}
!62 = !{!41, !10, i64 144}
!63 = !{!41, !6, i64 152}


; 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"

@stdout = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @SUNLinSol_SPBCGS(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %or.cond5 = icmp ugt i32 %1, 3
  %spec.store.select6 = select i1 %or.cond5, i32 0, i32 %1
  %5 = icmp slt i32 %2, 1
  %spec.store.select = select i1 %5, i32 5, i32 %2
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !10
  %10 = icmp eq ptr %9, null
  br i1 %10, label %92, label %11

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %7, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %14 = icmp eq ptr %13, null
  br i1 %14, label %92, label %15

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %7, i64 80
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = icmp eq ptr %17, null
  br i1 %18, label %92, label %19

19:                                               ; preds = %15
  %20 = getelementptr inbounds i8, ptr %7, i64 96
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %22 = icmp eq ptr %21, null
  br i1 %22, label %92, label %23

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %7, i64 104
  %25 = load ptr, ptr %24, align 8, !tbaa !15
  %26 = icmp eq ptr %25, null
  br i1 %26, label %92, label %27

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %7, i64 112
  %29 = load ptr, ptr %28, align 8, !tbaa !16
  %30 = icmp eq ptr %29, null
  br i1 %30, label %92, label %31

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %7, i64 144
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  %34 = icmp eq ptr %33, null
  br i1 %34, label %92, label %35

35:                                               ; preds = %31
  %36 = tail call ptr @SUNLinSolNewEmpty(ptr noundef %3) #4
  %37 = icmp eq ptr %36, null
  br i1 %37, label %92, label %38

38:                                               ; preds = %35
  %39 = getelementptr inbounds i8, ptr %36, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  store ptr @SUNLinSolGetType_SPBCGS, ptr %40, align 8, !tbaa !20
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  store ptr @SUNLinSolGetID_SPBCGS, ptr %41, align 8, !tbaa !22
  %42 = getelementptr inbounds i8, ptr %40, i64 16
  store ptr @SUNLinSolSetATimes_SPBCGS, ptr %42, align 8, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %40, i64 24
  store ptr @SUNLinSolSetPreconditioner_SPBCGS, ptr %43, align 8, !tbaa !24
  %44 = getelementptr inbounds i8, ptr %40, i64 32
  store ptr @SUNLinSolSetScalingVectors_SPBCGS, ptr %44, align 8, !tbaa !25
  %45 = getelementptr inbounds i8, ptr %40, i64 40
  store ptr @SUNLinSolSetZeroGuess_SPBCGS, ptr %45, align 8, !tbaa !26
  %46 = getelementptr inbounds i8, ptr %40, i64 48
  store ptr @SUNLinSolInitialize_SPBCGS, ptr %46, align 8, !tbaa !27
  %47 = getelementptr inbounds i8, ptr %40, i64 56
  store ptr @SUNLinSolSetup_SPBCGS, ptr %47, align 8, !tbaa !28
  %48 = getelementptr inbounds i8, ptr %40, i64 64
  store ptr @SUNLinSolSolve_SPBCGS, ptr %48, align 8, !tbaa !29
  %49 = getelementptr inbounds i8, ptr %40, i64 72
  store ptr @SUNLinSolNumIters_SPBCGS, ptr %49, align 8, !tbaa !30
  %50 = getelementptr inbounds i8, ptr %40, i64 80
  store ptr @SUNLinSolResNorm_SPBCGS, ptr %50, align 8, !tbaa !31
  %51 = getelementptr inbounds i8, ptr %40, i64 104
  store ptr @SUNLinSolResid_SPBCGS, ptr %51, align 8, !tbaa !32
  %52 = getelementptr inbounds i8, ptr %40, i64 88
  store ptr @SUNLinSolLastFlag_SPBCGS, ptr %52, align 8, !tbaa !33
  %53 = getelementptr inbounds i8, ptr %40, i64 96
  store ptr @SUNLinSolSpace_SPBCGS, ptr %53, align 8, !tbaa !34
  %54 = getelementptr inbounds i8, ptr %40, i64 112
  store ptr @SUNLinSolFree_SPBCGS, ptr %54, align 8, !tbaa !35
  %55 = tail call noalias dereferenceable_or_null(160) ptr @malloc(i64 noundef 160) #5
  %56 = icmp eq ptr %55, null
  br i1 %56, label %.sink.split, label %57

57:                                               ; preds = %38
  store ptr %55, ptr %36, align 8, !tbaa !36
  %58 = getelementptr inbounds i8, ptr %55, i64 24
  store i32 0, ptr %58, align 8, !tbaa !37
  store i32 %spec.store.select, ptr %55, align 8, !tbaa !41
  %59 = getelementptr inbounds i8, ptr %55, i64 4
  store i32 %spec.store.select6, ptr %59, align 4, !tbaa !42
  %60 = getelementptr inbounds i8, ptr %55, i64 8
  %61 = getelementptr inbounds i8, ptr %55, i64 96
  %62 = getelementptr inbounds i8, ptr %55, i64 104
  %63 = getelementptr inbounds i8, ptr %55, i64 112
  %64 = getelementptr inbounds i8, ptr %55, i64 120
  %65 = getelementptr inbounds i8, ptr %55, i64 128
  %66 = getelementptr inbounds i8, ptr %55, i64 136
  %67 = getelementptr inbounds i8, ptr %55, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %60, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(116) %67, i8 0, i64 116, i1 false)
  %68 = load ptr, ptr @stdout, align 8, !tbaa !43
  %69 = getelementptr inbounds i8, ptr %55, i64 152
  store ptr %68, ptr %69, align 8, !tbaa !44
  %70 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %70, ptr %61, align 8, !tbaa !45
  %71 = icmp eq ptr %70, null
  br i1 %71, label %.sink.split, label %72

72:                                               ; preds = %57
  %73 = getelementptr inbounds i8, ptr %55, i64 88
  %74 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %74, ptr %73, align 8, !tbaa !46
  %75 = icmp eq ptr %74, null
  br i1 %75, label %.sink.split, label %76

76:                                               ; preds = %72
  %77 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %77, ptr %62, align 8, !tbaa !47
  %78 = icmp eq ptr %77, null
  br i1 %78, label %.sink.split, label %79

79:                                               ; preds = %76
  %80 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %80, ptr %63, align 8, !tbaa !48
  %81 = icmp eq ptr %80, null
  br i1 %81, label %.sink.split, label %82

82:                                               ; preds = %79
  %83 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %83, ptr %64, align 8, !tbaa !49
  %84 = icmp eq ptr %83, null
  br i1 %84, label %.sink.split, label %85

85:                                               ; preds = %82
  %86 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %86, ptr %65, align 8, !tbaa !50
  %87 = icmp eq ptr %86, null
  br i1 %87, label %.sink.split, label %88

88:                                               ; preds = %85
  %89 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %89, ptr %66, align 8, !tbaa !51
  %90 = icmp eq ptr %89, null
  br i1 %90, label %.sink.split, label %92

.sink.split:                                      ; preds = %88, %85, %82, %79, %76, %72, %57, %38
  %91 = tail call i32 @SUNLinSolFree(ptr noundef nonnull %36) #4
  br label %92

92:                                               ; preds = %.sink.split, %88, %35, %4, %11, %15, %19, %23, %27, %31
  %.0 = phi ptr [ null, %31 ], [ null, %27 ], [ null, %23 ], [ null, %19 ], [ null, %15 ], [ null, %11 ], [ null, %4 ], [ null, %35 ], [ %36, %88 ], [ null, %.sink.split ]
  ret ptr %.0
}

declare ptr @SUNLinSolNewEmpty(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local double @SUNLinSolResNorm_SPBCGS(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @SUNLinSolLastFlag_SPBCGS(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNLinSolFree_SPBCGS(ptr noundef) #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 #2

declare i32 @SUNLinSolFree(ptr noundef) local_unnamed_addr #1

declare ptr @N_VClone(ptr noundef) local_unnamed_addr #1

; 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 = { 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 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 #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, !7, i64 8}
!6 = !{!"_generic_N_Vector", !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 8}
!11 = !{!"_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}
!12 = !{!11, !7, i64 24}
!13 = !{!11, !7, i64 80}
!14 = !{!11, !7, i64 96}
!15 = !{!11, !7, i64 104}
!16 = !{!11, !7, i64 112}
!17 = !{!11, !7, i64 144}
!18 = !{!19, !7, i64 8}
!19 = !{!"_generic_SUNLinearSolver", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!21, !7, i64 0}
!21 = !{!"_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}
!22 = !{!21, !7, i64 8}
!23 = !{!21, !7, i64 16}
!24 = !{!21, !7, i64 24}
!25 = !{!21, !7, i64 32}
!26 = !{!21, !7, i64 40}
!27 = !{!21, !7, i64 48}
!28 = !{!21, !7, i64 56}
!29 = !{!21, !7, i64 64}
!30 = !{!21, !7, i64 72}
!31 = !{!21, !7, i64 80}
!32 = !{!21, !7, i64 104}
!33 = !{!21, !7, i64 88}
!34 = !{!21, !7, i64 96}
!35 = !{!21, !7, i64 112}
!36 = !{!19, !7, i64 0}
!37 = !{!38, !39, i64 24}
!38 = !{!"_SUNLinearSolverContent_SPBCGS", !39, i64 0, !39, i64 4, !39, i64 8, !39, i64 12, !40, i64 16, !39, 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, !39, i64 144, !7, i64 152}
!39 = !{!"int", !8, i64 0}
!40 = !{!"double", !8, i64 0}
!41 = !{!38, !39, i64 0}
!42 = !{!38, !39, i64 4}
!43 = !{!7, !7, i64 0}
!44 = !{!38, !7, i64 152}
!45 = !{!38, !7, i64 96}
!46 = !{!38, !7, i64 88}
!47 = !{!38, !7, i64 104}
!48 = !{!38, !7, i64 112}
!49 = !{!38, !7, i64 120}
!50 = !{!38, !7, i64 128}
!51 = !{!38, !7, i64 136}


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