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

; 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_SPTFQMR = type { i32, i32, i32, i32, double, i32, ptr, ptr, ptr, 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_SPTFQMR(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 %85, 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 %85, 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 %85, 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 11
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  %56 = icmp eq ptr %55, null
  br i1 %56, label %85, 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 12
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = icmp eq ptr %62, null
  br i1 %63, label %85, 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 13
  %69 = load ptr, ptr %68, align 8, !tbaa !19
  %70 = icmp eq ptr %69, null
  br i1 %70, label %85, 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 14
  %76 = load ptr, ptr %75, align 8, !tbaa !20
  %77 = icmp eq ptr %76, null
  br i1 %77, label %85, label %78

78:                                               ; preds = %71
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._generic_N_Vector, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct._generic_N_Vector_Ops, ptr %81, i32 0, i32 18
  %83 = load ptr, ptr %82, align 8, !tbaa !21
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %86

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

86:                                               ; preds = %78
  store ptr null, ptr %10, align 8, !tbaa !5
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = call ptr @SUNLinSolNewEmpty(ptr noundef %87)
  store ptr %88, ptr %10, align 8, !tbaa !5
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = icmp eq ptr %89, null
  br i1 %90, label %91, label %92

91:                                               ; preds = %86
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %337

92:                                               ; preds = %86
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !22
  %96 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %95, i32 0, i32 0
  store ptr @SUNLinSolGetType_SPTFQMR, ptr %96, align 8, !tbaa !24
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !22
  %100 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %99, i32 0, i32 1
  store ptr @SUNLinSolGetID_SPTFQMR, ptr %100, align 8, !tbaa !26
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %101, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !22
  %104 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %103, i32 0, i32 2
  store ptr @SUNLinSolSetATimes_SPTFQMR, ptr %104, align 8, !tbaa !27
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !22
  %108 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %107, i32 0, i32 3
  store ptr @SUNLinSolSetPreconditioner_SPTFQMR, ptr %108, align 8, !tbaa !28
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %109, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !22
  %112 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %111, i32 0, i32 4
  store ptr @SUNLinSolSetScalingVectors_SPTFQMR, ptr %112, align 8, !tbaa !29
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %113, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8, !tbaa !22
  %116 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %115, i32 0, i32 5
  store ptr @SUNLinSolSetZeroGuess_SPTFQMR, ptr %116, align 8, !tbaa !30
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !22
  %120 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %119, i32 0, i32 6
  store ptr @SUNLinSolInitialize_SPTFQMR, ptr %120, align 8, !tbaa !31
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !22
  %124 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %123, i32 0, i32 7
  store ptr @SUNLinSolSetup_SPTFQMR, ptr %124, align 8, !tbaa !32
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !22
  %128 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %127, i32 0, i32 8
  store ptr @SUNLinSolSolve_SPTFQMR, ptr %128, align 8, !tbaa !33
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %129, i32 0, i32 1
  %131 = load ptr, ptr %130, align 8, !tbaa !22
  %132 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %131, i32 0, i32 9
  store ptr @SUNLinSolNumIters_SPTFQMR, ptr %132, align 8, !tbaa !34
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !22
  %136 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %135, i32 0, i32 10
  store ptr @SUNLinSolResNorm_SPTFQMR, ptr %136, align 8, !tbaa !35
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !22
  %140 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %139, i32 0, i32 13
  store ptr @SUNLinSolResid_SPTFQMR, ptr %140, align 8, !tbaa !36
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %141, i32 0, i32 1
  %143 = load ptr, ptr %142, align 8, !tbaa !22
  %144 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %143, i32 0, i32 11
  store ptr @SUNLinSolLastFlag_SPTFQMR, ptr %144, align 8, !tbaa !37
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %145, i32 0, i32 1
  %147 = load ptr, ptr %146, align 8, !tbaa !22
  %148 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %147, i32 0, i32 12
  store ptr @SUNLinSolSpace_SPTFQMR, ptr %148, align 8, !tbaa !38
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %149, i32 0, i32 1
  %151 = load ptr, ptr %150, align 8, !tbaa !22
  %152 = getelementptr inbounds %struct._generic_SUNLinearSolver_Ops, ptr %151, i32 0, i32 14
  store ptr @SUNLinSolFree_SPTFQMR, ptr %152, align 8, !tbaa !39
  store ptr null, ptr %11, align 8, !tbaa !5
  %153 = call noalias ptr @malloc(i64 noundef 184) #5
  store ptr %153, ptr %11, align 8, !tbaa !5
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = icmp eq ptr %154, null
  br i1 %155, label %156, label %159

156:                                              ; preds = %92
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = call i32 @SUNLinSolFree(ptr noundef %157)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %337

159:                                              ; preds = %92
  %160 = load ptr, ptr %11, align 8, !tbaa !5
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %161, i32 0, i32 0
  store ptr %160, ptr %162, align 8, !tbaa !40
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %163, i32 0, i32 5
  store i32 0, ptr %164, align 8, !tbaa !41
  %165 = load i32, ptr %8, align 4, !tbaa !9
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %166, i32 0, i32 0
  store i32 %165, ptr %167, align 8, !tbaa !44
  %168 = load i32, ptr %7, align 4, !tbaa !9
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %169, i32 0, i32 1
  store i32 %168, ptr %170, align 4, !tbaa !45
  %171 = load ptr, ptr %11, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %171, i32 0, i32 2
  store i32 0, ptr %172, align 8, !tbaa !46
  %173 = load ptr, ptr %11, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %173, i32 0, i32 3
  store i32 0, ptr %174, align 4, !tbaa !47
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %175, i32 0, i32 4
  store double 0.000000e+00, ptr %176, align 8, !tbaa !48
  %177 = load ptr, ptr %11, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %177, i32 0, i32 13
  store ptr null, ptr %178, align 8, !tbaa !49
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %179, i32 0, i32 14
  store ptr null, ptr %180, align 8, !tbaa !50
  %181 = load ptr, ptr %11, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %181, i32 0, i32 15
  store ptr null, ptr %182, align 8, !tbaa !51
  %183 = load ptr, ptr %11, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %183, i32 0, i32 16
  store ptr null, ptr %184, align 8, !tbaa !52
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %185, i32 0, i32 17
  store ptr null, ptr %186, align 8, !tbaa !53
  %187 = load ptr, ptr %11, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %187, i32 0, i32 18
  store ptr null, ptr %188, align 8, !tbaa !54
  %189 = load ptr, ptr %11, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %189, i32 0, i32 19
  store ptr null, ptr %190, align 8, !tbaa !55
  %191 = load ptr, ptr %11, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %191, i32 0, i32 20
  store ptr null, ptr %192, align 8, !tbaa !56
  %193 = load ptr, ptr %11, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %193, i32 0, i32 21
  store ptr null, ptr %194, align 8, !tbaa !57
  %195 = load ptr, ptr %11, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %195, i32 0, i32 22
  store ptr null, ptr %196, align 8, !tbaa !58
  %197 = load ptr, ptr %11, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %197, i32 0, i32 11
  store ptr null, ptr %198, align 8, !tbaa !59
  %199 = load ptr, ptr %11, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %199, i32 0, i32 12
  store ptr null, ptr %200, align 8, !tbaa !60
  %201 = load ptr, ptr %11, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %201, i32 0, i32 6
  store ptr null, ptr %202, align 8, !tbaa !61
  %203 = load ptr, ptr %11, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %203, i32 0, i32 7
  store ptr null, ptr %204, align 8, !tbaa !62
  %205 = load ptr, ptr %11, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %205, i32 0, i32 8
  store ptr null, ptr %206, align 8, !tbaa !63
  %207 = load ptr, ptr %11, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %207, i32 0, i32 9
  store ptr null, ptr %208, align 8, !tbaa !64
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %209, i32 0, i32 10
  store ptr null, ptr %210, align 8, !tbaa !65
  %211 = load ptr, ptr %11, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %211, i32 0, i32 23
  store i32 0, ptr %212, align 8, !tbaa !66
  %213 = load ptr, ptr @stdout, align 8, !tbaa !5
  %214 = load ptr, ptr %11, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %214, i32 0, i32 24
  store ptr %213, ptr %215, align 8, !tbaa !67
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = call ptr @N_VClone(ptr noundef %216)
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %218, i32 0, i32 13
  store ptr %217, ptr %219, align 8, !tbaa !49
  %220 = load ptr, ptr %11, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %220, i32 0, i32 13
  %222 = load ptr, ptr %221, align 8, !tbaa !49
  %223 = icmp eq ptr %222, null
  br i1 %223, label %224, label %227

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

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

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

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

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

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

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

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

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

275:                                              ; preds = %263
  %276 = load ptr, ptr %6, align 8, !tbaa !5
  %277 = call ptr @N_VCloneVectorArray(i32 noundef 2, ptr noundef %276)
  %278 = load ptr, ptr %11, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %278, i32 0, i32 18
  store ptr %277, ptr %279, align 8, !tbaa !54
  %280 = load ptr, ptr %11, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %280, i32 0, i32 18
  %282 = load ptr, ptr %281, align 8, !tbaa !54
  %283 = icmp eq ptr %282, null
  br i1 %283, label %284, label %287

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

287:                                              ; preds = %275
  %288 = load ptr, ptr %6, align 8, !tbaa !5
  %289 = call ptr @N_VClone(ptr noundef %288)
  %290 = load ptr, ptr %11, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %290, i32 0, i32 19
  store ptr %289, ptr %291, align 8, !tbaa !55
  %292 = load ptr, ptr %11, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %292, i32 0, i32 19
  %294 = load ptr, ptr %293, align 8, !tbaa !55
  %295 = icmp eq ptr %294, null
  br i1 %295, label %296, label %299

296:                                              ; preds = %287
  %297 = load ptr, ptr %10, align 8, !tbaa !5
  %298 = call i32 @SUNLinSolFree(ptr noundef %297)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %337

299:                                              ; preds = %287
  %300 = load ptr, ptr %6, align 8, !tbaa !5
  %301 = call ptr @N_VClone(ptr noundef %300)
  %302 = load ptr, ptr %11, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %302, i32 0, i32 20
  store ptr %301, ptr %303, align 8, !tbaa !56
  %304 = load ptr, ptr %11, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %304, i32 0, i32 20
  %306 = load ptr, ptr %305, align 8, !tbaa !56
  %307 = icmp eq ptr %306, null
  br i1 %307, label %308, label %311

308:                                              ; preds = %299
  %309 = load ptr, ptr %10, align 8, !tbaa !5
  %310 = call i32 @SUNLinSolFree(ptr noundef %309)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %337

311:                                              ; preds = %299
  %312 = load ptr, ptr %6, align 8, !tbaa !5
  %313 = call ptr @N_VClone(ptr noundef %312)
  %314 = load ptr, ptr %11, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %314, i32 0, i32 21
  store ptr %313, ptr %315, align 8, !tbaa !57
  %316 = load ptr, ptr %11, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %316, i32 0, i32 21
  %318 = load ptr, ptr %317, align 8, !tbaa !57
  %319 = icmp eq ptr %318, null
  br i1 %319, label %320, label %323

320:                                              ; preds = %311
  %321 = load ptr, ptr %10, align 8, !tbaa !5
  %322 = call i32 @SUNLinSolFree(ptr noundef %321)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %337

323:                                              ; preds = %311
  %324 = load ptr, ptr %6, align 8, !tbaa !5
  %325 = call ptr @N_VClone(ptr noundef %324)
  %326 = load ptr, ptr %11, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %326, i32 0, i32 22
  store ptr %325, ptr %327, align 8, !tbaa !58
  %328 = load ptr, ptr %11, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct._SUNLinearSolverContent_SPTFQMR, ptr %328, i32 0, i32 22
  %330 = load ptr, ptr %329, align 8, !tbaa !58
  %331 = icmp eq ptr %330, null
  br i1 %331, label %332, label %335

332:                                              ; preds = %323
  %333 = load ptr, ptr %10, align 8, !tbaa !5
  %334 = call i32 @SUNLinSolFree(ptr noundef %333)
  store ptr null, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %337

335:                                              ; preds = %323
  %336 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %336, ptr %5, align 8
  store i32 1, ptr %12, align 4
  br label %337

337:                                              ; preds = %335, %332, %320, %308, %296, %284, %272, %260, %248, %236, %224, %156, %91, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %338 = load ptr, ptr %5, align 8
  ret ptr %338
}

; 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_SPTFQMR(ptr noundef) #0

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNLinSolFree_SPTFQMR(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

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


; 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_SPTFQMR(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 %108, 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 %108, 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 %108, label %19

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

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

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

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

35:                                               ; preds = %31
  %36 = getelementptr inbounds i8, ptr %7, i64 144
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %38 = icmp eq ptr %37, null
  br i1 %38, label %108, label %39

39:                                               ; preds = %35
  %40 = tail call ptr @SUNLinSolNewEmpty(ptr noundef %3) #4
  %41 = icmp eq ptr %40, null
  br i1 %41, label %108, label %42

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %40, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !19
  store ptr @SUNLinSolGetType_SPTFQMR, ptr %44, align 8, !tbaa !21
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  store ptr @SUNLinSolGetID_SPTFQMR, ptr %45, align 8, !tbaa !23
  %46 = getelementptr inbounds i8, ptr %44, i64 16
  store ptr @SUNLinSolSetATimes_SPTFQMR, ptr %46, align 8, !tbaa !24
  %47 = getelementptr inbounds i8, ptr %44, i64 24
  store ptr @SUNLinSolSetPreconditioner_SPTFQMR, ptr %47, align 8, !tbaa !25
  %48 = getelementptr inbounds i8, ptr %44, i64 32
  store ptr @SUNLinSolSetScalingVectors_SPTFQMR, ptr %48, align 8, !tbaa !26
  %49 = getelementptr inbounds i8, ptr %44, i64 40
  store ptr @SUNLinSolSetZeroGuess_SPTFQMR, ptr %49, align 8, !tbaa !27
  %50 = getelementptr inbounds i8, ptr %44, i64 48
  store ptr @SUNLinSolInitialize_SPTFQMR, ptr %50, align 8, !tbaa !28
  %51 = getelementptr inbounds i8, ptr %44, i64 56
  store ptr @SUNLinSolSetup_SPTFQMR, ptr %51, align 8, !tbaa !29
  %52 = getelementptr inbounds i8, ptr %44, i64 64
  store ptr @SUNLinSolSolve_SPTFQMR, ptr %52, align 8, !tbaa !30
  %53 = getelementptr inbounds i8, ptr %44, i64 72
  store ptr @SUNLinSolNumIters_SPTFQMR, ptr %53, align 8, !tbaa !31
  %54 = getelementptr inbounds i8, ptr %44, i64 80
  store ptr @SUNLinSolResNorm_SPTFQMR, ptr %54, align 8, !tbaa !32
  %55 = getelementptr inbounds i8, ptr %44, i64 104
  store ptr @SUNLinSolResid_SPTFQMR, ptr %55, align 8, !tbaa !33
  %56 = getelementptr inbounds i8, ptr %44, i64 88
  store ptr @SUNLinSolLastFlag_SPTFQMR, ptr %56, align 8, !tbaa !34
  %57 = getelementptr inbounds i8, ptr %44, i64 96
  store ptr @SUNLinSolSpace_SPTFQMR, ptr %57, align 8, !tbaa !35
  %58 = getelementptr inbounds i8, ptr %44, i64 112
  store ptr @SUNLinSolFree_SPTFQMR, ptr %58, align 8, !tbaa !36
  %59 = tail call noalias dereferenceable_or_null(184) ptr @malloc(i64 noundef 184) #5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %.sink.split, label %61

61:                                               ; preds = %42
  store ptr %59, ptr %40, align 8, !tbaa !37
  %62 = getelementptr inbounds i8, ptr %59, i64 24
  store i32 0, ptr %62, align 8, !tbaa !38
  store i32 %spec.store.select, ptr %59, align 8, !tbaa !42
  %63 = getelementptr inbounds i8, ptr %59, i64 4
  store i32 %spec.store.select6, ptr %63, align 4, !tbaa !43
  %64 = getelementptr inbounds i8, ptr %59, i64 8
  %65 = getelementptr inbounds i8, ptr %59, i64 88
  %66 = getelementptr inbounds i8, ptr %59, i64 104
  %67 = getelementptr inbounds i8, ptr %59, i64 112
  %68 = getelementptr inbounds i8, ptr %59, i64 120
  %69 = getelementptr inbounds i8, ptr %59, i64 128
  %70 = getelementptr inbounds i8, ptr %59, i64 136
  %71 = getelementptr inbounds i8, ptr %59, i64 144
  %72 = getelementptr inbounds i8, ptr %59, i64 152
  %73 = getelementptr inbounds i8, ptr %59, i64 160
  %74 = getelementptr inbounds i8, ptr %59, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %64, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(140) %74, i8 0, i64 140, i1 false)
  %75 = load ptr, ptr @stdout, align 8, !tbaa !44
  %76 = getelementptr inbounds i8, ptr %59, i64 176
  store ptr %75, ptr %76, align 8, !tbaa !45
  %77 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %77, ptr %65, align 8, !tbaa !46
  %78 = icmp eq ptr %77, null
  br i1 %78, label %.sink.split, label %79

79:                                               ; preds = %61
  %80 = getelementptr inbounds i8, ptr %59, i64 96
  %81 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %81, ptr %80, align 8, !tbaa !47
  %82 = icmp eq ptr %81, null
  br i1 %82, label %.sink.split, label %83

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

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

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

92:                                               ; preds = %89
  %93 = tail call ptr @N_VCloneVectorArray(i32 noundef 2, ptr noundef nonnull %0) #4
  store ptr %93, ptr %69, align 8, !tbaa !51
  %94 = icmp eq ptr %93, null
  br i1 %94, label %.sink.split, label %95

95:                                               ; preds = %92
  %96 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %96, ptr %70, align 8, !tbaa !52
  %97 = icmp eq ptr %96, null
  br i1 %97, label %.sink.split, label %98

98:                                               ; preds = %95
  %99 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %99, ptr %71, align 8, !tbaa !53
  %100 = icmp eq ptr %99, null
  br i1 %100, label %.sink.split, label %101

101:                                              ; preds = %98
  %102 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %102, ptr %72, align 8, !tbaa !54
  %103 = icmp eq ptr %102, null
  br i1 %103, label %.sink.split, label %104

104:                                              ; preds = %101
  %105 = tail call ptr @N_VClone(ptr noundef nonnull %0) #4
  store ptr %105, ptr %73, align 8, !tbaa !55
  %106 = icmp eq ptr %105, null
  br i1 %106, label %.sink.split, label %108

.sink.split:                                      ; preds = %104, %101, %98, %95, %92, %89, %86, %83, %79, %61, %42
  %107 = tail call i32 @SUNLinSolFree(ptr noundef nonnull %40) #4
  br label %108

108:                                              ; preds = %.sink.split, %104, %39, %4, %11, %15, %19, %23, %27, %31, %35
  %.0 = phi ptr [ null, %35 ], [ null, %31 ], [ null, %27 ], [ null, %23 ], [ null, %19 ], [ null, %15 ], [ null, %11 ], [ null, %4 ], [ null, %39 ], [ %40, %104 ], [ null, %.sink.split ]
  ret ptr %.0
}

declare ptr @SUNLinSolNewEmpty(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @SUNLinSolFree_SPTFQMR(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

declare ptr @N_VCloneVectorArray(i32 noundef, 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 88}
!15 = !{!11, !7, i64 96}
!16 = !{!11, !7, i64 104}
!17 = !{!11, !7, i64 112}
!18 = !{!11, !7, i64 144}
!19 = !{!20, !7, i64 8}
!20 = !{!"_generic_SUNLinearSolver", !7, i64 0, !7, i64 8, !7, i64 16}
!21 = !{!22, !7, i64 0}
!22 = !{!"_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}
!23 = !{!22, !7, i64 8}
!24 = !{!22, !7, i64 16}
!25 = !{!22, !7, i64 24}
!26 = !{!22, !7, i64 32}
!27 = !{!22, !7, i64 40}
!28 = !{!22, !7, i64 48}
!29 = !{!22, !7, i64 56}
!30 = !{!22, !7, i64 64}
!31 = !{!22, !7, i64 72}
!32 = !{!22, !7, i64 80}
!33 = !{!22, !7, i64 104}
!34 = !{!22, !7, i64 88}
!35 = !{!22, !7, i64 96}
!36 = !{!22, !7, i64 112}
!37 = !{!20, !7, i64 0}
!38 = !{!39, !40, i64 24}
!39 = !{!"_SUNLinearSolverContent_SPTFQMR", !40, i64 0, !40, i64 4, !40, i64 8, !40, i64 12, !41, i64 16, !40, 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, !40, i64 168, !7, i64 176}
!40 = !{!"int", !8, i64 0}
!41 = !{!"double", !8, i64 0}
!42 = !{!39, !40, i64 0}
!43 = !{!39, !40, i64 4}
!44 = !{!7, !7, i64 0}
!45 = !{!39, !7, i64 176}
!46 = !{!39, !7, i64 88}
!47 = !{!39, !7, i64 96}
!48 = !{!39, !7, i64 104}
!49 = !{!39, !7, i64 112}
!50 = !{!39, !7, i64 120}
!51 = !{!39, !7, i64 128}
!52 = !{!39, !7, i64 136}
!53 = !{!39, !7, i64 144}
!54 = !{!39, !7, i64 152}
!55 = !{!39, !7, i64 160}


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