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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @SUNLinSolSolve_PCG(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, double noundef %4) #1 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store double %4, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %41

40:                                               ; preds = %5
  store i32 -801, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

41:                                               ; preds = %5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !13
  store i32 %46, ptr %28, align 4, !tbaa !16
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %49, i32 0, i32 12
  %51 = load ptr, ptr %50, align 8, !tbaa !17
  store ptr %51, ptr %18, align 8, !tbaa !5
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %54, i32 0, i32 13
  %56 = load ptr, ptr %55, align 8, !tbaa !18
  store ptr %56, ptr %19, align 8, !tbaa !5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !11
  %60 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %59, i32 0, i32 14
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  store ptr %61, ptr %20, align 8, !tbaa !5
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %64, i32 0, i32 15
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  store ptr %66, ptr %21, align 8, !tbaa !5
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %69, i32 0, i32 11
  %71 = load ptr, ptr %70, align 8, !tbaa !21
  store ptr %71, ptr %22, align 8, !tbaa !5
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !11
  %75 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %74, i32 0, i32 7
  %76 = load ptr, ptr %75, align 8, !tbaa !22
  store ptr %76, ptr %31, align 8, !tbaa !5
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !11
  %80 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %79, i32 0, i32 10
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  store ptr %81, ptr %32, align 8, !tbaa !5
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %84, i32 0, i32 6
  %86 = load ptr, ptr %85, align 8, !tbaa !24
  store ptr %86, ptr %33, align 8, !tbaa !5
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !11
  %90 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %89, i32 0, i32 9
  %91 = load ptr, ptr %90, align 8, !tbaa !25
  store ptr %91, ptr %34, align 8, !tbaa !5
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  %95 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !26
  store i32 %96, ptr %29, align 4, !tbaa !16
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %97, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %99, i32 0, i32 2
  store ptr %100, ptr %26, align 8, !tbaa !5
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  %104 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %103, i32 0, i32 3
  store ptr %104, ptr %36, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !11
  %108 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %107, i32 0, i32 4
  store ptr %108, ptr %35, align 8, !tbaa !5
  %109 = load ptr, ptr %36, align 8, !tbaa !5
  store i32 0, ptr %109, align 4, !tbaa !16
  store i32 0, ptr %25, align 4, !tbaa !16
  %110 = load i32, ptr %29, align 4, !tbaa !16
  %111 = icmp eq i32 %110, 3
  br i1 %111, label %118, label %112

112:                                              ; preds = %41
  %113 = load i32, ptr %29, align 4, !tbaa !16
  %114 = icmp eq i32 %113, 1
  br i1 %114, label %118, label %115

115:                                              ; preds = %112
  %116 = load i32, ptr %29, align 4, !tbaa !16
  %117 = icmp eq i32 %116, 2
  br label %118

118:                                              ; preds = %115, %112, %41
  %119 = phi i1 [ true, %112 ], [ true, %41 ], [ %117, %115 ]
  %120 = zext i1 %119 to i32
  store i32 %120, ptr %23, align 4, !tbaa !16
  %121 = load ptr, ptr %22, align 8, !tbaa !5
  %122 = icmp ne ptr %121, null
  %123 = zext i1 %122 to i32
  store i32 %123, ptr %24, align 4, !tbaa !16
  %124 = load ptr, ptr %33, align 8, !tbaa !5
  %125 = icmp eq ptr %124, null
  br i1 %125, label %126, label %137

126:                                              ; preds = %118
  %127 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %127, align 4, !tbaa !16
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %128, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8, !tbaa !11
  %131 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %130, i32 0, i32 5
  store i32 -804, ptr %131, align 8, !tbaa !27
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %134, i32 0, i32 5
  %136 = load i32, ptr %135, align 8, !tbaa !27
  store i32 %136, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

137:                                              ; preds = %118
  %138 = load i32, ptr %23, align 4, !tbaa !16
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %154

140:                                              ; preds = %137
  %141 = load ptr, ptr %34, align 8, !tbaa !5
  %142 = icmp eq ptr %141, null
  br i1 %142, label %143, label %154

143:                                              ; preds = %140
  %144 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %144, align 4, !tbaa !16
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !11
  %148 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %147, i32 0, i32 5
  store i32 -807, ptr %148, align 8, !tbaa !27
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !11
  %152 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %151, i32 0, i32 5
  %153 = load i32, ptr %152, align 8, !tbaa !27
  store i32 %153, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

154:                                              ; preds = %140, %137
  %155 = load ptr, ptr %26, align 8, !tbaa !5
  %156 = load i32, ptr %155, align 4, !tbaa !16
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %161

158:                                              ; preds = %154
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = load ptr, ptr %18, align 8, !tbaa !5
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %159, ptr noundef %160)
  br label %188

161:                                              ; preds = %154
  %162 = load ptr, ptr %33, align 8, !tbaa !5
  %163 = load ptr, ptr %31, align 8, !tbaa !5
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = load ptr, ptr %18, align 8, !tbaa !5
  %166 = call i32 %162(ptr noundef %163, ptr noundef %164, ptr noundef %165)
  store i32 %166, ptr %30, align 4, !tbaa !16
  %167 = load i32, ptr %30, align 4, !tbaa !16
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %184

169:                                              ; preds = %161
  %170 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %170, align 4, !tbaa !16
  %171 = load i32, ptr %30, align 4, !tbaa !16
  %172 = icmp slt i32 %171, 0
  %173 = zext i1 %172 to i64
  %174 = select i1 %172, i32 -805, i32 803
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !11
  %178 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %177, i32 0, i32 5
  store i32 %174, ptr %178, align 8, !tbaa !27
  %179 = load ptr, ptr %7, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !11
  %182 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %181, i32 0, i32 5
  %183 = load i32, ptr %182, align 8, !tbaa !27
  store i32 %183, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

184:                                              ; preds = %161
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = load ptr, ptr %18, align 8, !tbaa !5
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %185, double noundef -1.000000e+00, ptr noundef %186, ptr noundef %187)
  br label %188

188:                                              ; preds = %184, %158
  %189 = load i32, ptr %24, align 4, !tbaa !16
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %195

191:                                              ; preds = %188
  %192 = load ptr, ptr %18, align 8, !tbaa !5
  %193 = load ptr, ptr %22, align 8, !tbaa !5
  %194 = load ptr, ptr %21, align 8, !tbaa !5
  call void @N_VProd(ptr noundef %192, ptr noundef %193, ptr noundef %194)
  br label %198

195:                                              ; preds = %188
  %196 = load ptr, ptr %18, align 8, !tbaa !5
  %197 = load ptr, ptr %21, align 8, !tbaa !5
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %196, ptr noundef %197)
  br label %198

198:                                              ; preds = %195, %191
  %199 = load ptr, ptr %21, align 8, !tbaa !5
  %200 = load ptr, ptr %21, align 8, !tbaa !5
  %201 = call double @N_VDotProd(ptr noundef %199, ptr noundef %200)
  %202 = fcmp ole double %201, 0.000000e+00
  br i1 %202, label %203, label %204

203:                                              ; preds = %198
  br label %209

204:                                              ; preds = %198
  %205 = load ptr, ptr %21, align 8, !tbaa !5
  %206 = load ptr, ptr %21, align 8, !tbaa !5
  %207 = call double @N_VDotProd(ptr noundef %205, ptr noundef %206)
  %208 = call double @sqrt(double noundef %207) #4
  br label %209

209:                                              ; preds = %204, %203
  %210 = phi double [ 0.000000e+00, %203 ], [ %208, %204 ]
  store double %210, ptr %15, align 8, !tbaa !9
  store double %210, ptr %14, align 8, !tbaa !9
  %211 = load ptr, ptr %35, align 8, !tbaa !5
  store double %210, ptr %211, align 8, !tbaa !9
  %212 = load double, ptr %15, align 8, !tbaa !9
  %213 = load double, ptr %11, align 8, !tbaa !9
  %214 = fcmp ole double %212, %213
  br i1 %214, label %215, label %226

215:                                              ; preds = %209
  %216 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %216, align 4, !tbaa !16
  %217 = load ptr, ptr %7, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %217, i32 0, i32 0
  %219 = load ptr, ptr %218, align 8, !tbaa !11
  %220 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %219, i32 0, i32 5
  store i32 0, ptr %220, align 8, !tbaa !27
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %221, i32 0, i32 0
  %223 = load ptr, ptr %222, align 8, !tbaa !11
  %224 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %223, i32 0, i32 5
  %225 = load i32, ptr %224, align 8, !tbaa !27
  store i32 %225, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

226:                                              ; preds = %209
  %227 = load i32, ptr %23, align 4, !tbaa !16
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %254

229:                                              ; preds = %226
  %230 = load ptr, ptr %34, align 8, !tbaa !5
  %231 = load ptr, ptr %32, align 8, !tbaa !5
  %232 = load ptr, ptr %18, align 8, !tbaa !5
  %233 = load ptr, ptr %20, align 8, !tbaa !5
  %234 = load double, ptr %11, align 8, !tbaa !9
  %235 = call i32 %230(ptr noundef %231, ptr noundef %232, ptr noundef %233, double noundef %234, i32 noundef 1)
  store i32 %235, ptr %30, align 4, !tbaa !16
  %236 = load i32, ptr %30, align 4, !tbaa !16
  %237 = icmp ne i32 %236, 0
  br i1 %237, label %238, label %253

238:                                              ; preds = %229
  %239 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %239, align 4, !tbaa !16
  %240 = load i32, ptr %30, align 4, !tbaa !16
  %241 = icmp slt i32 %240, 0
  %242 = zext i1 %241 to i64
  %243 = select i1 %241, i32 -808, i32 805
  %244 = load ptr, ptr %7, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !11
  %247 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %246, i32 0, i32 5
  store i32 %243, ptr %247, align 8, !tbaa !27
  %248 = load ptr, ptr %7, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %248, i32 0, i32 0
  %250 = load ptr, ptr %249, align 8, !tbaa !11
  %251 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %250, i32 0, i32 5
  %252 = load i32, ptr %251, align 8, !tbaa !27
  store i32 %252, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

253:                                              ; preds = %229
  br label %257

254:                                              ; preds = %226
  %255 = load ptr, ptr %18, align 8, !tbaa !5
  %256 = load ptr, ptr %20, align 8, !tbaa !5
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %255, ptr noundef %256)
  br label %257

257:                                              ; preds = %254, %253
  %258 = load ptr, ptr %18, align 8, !tbaa !5
  %259 = load ptr, ptr %20, align 8, !tbaa !5
  %260 = call double @N_VDotProd(ptr noundef %258, ptr noundef %259)
  store double %260, ptr %16, align 8, !tbaa !9
  %261 = load ptr, ptr %20, align 8, !tbaa !5
  %262 = load ptr, ptr %19, align 8, !tbaa !5
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %261, ptr noundef %262)
  store i32 0, ptr %27, align 4, !tbaa !16
  br label %263

263:                                              ; preds = %396, %257
  %264 = load i32, ptr %27, align 4, !tbaa !16
  %265 = load i32, ptr %28, align 4, !tbaa !16
  %266 = icmp slt i32 %264, %265
  br i1 %266, label %267, label %399

267:                                              ; preds = %263
  %268 = load ptr, ptr %36, align 8, !tbaa !5
  %269 = load i32, ptr %268, align 4, !tbaa !16
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %268, align 4, !tbaa !16
  %271 = load ptr, ptr %33, align 8, !tbaa !5
  %272 = load ptr, ptr %31, align 8, !tbaa !5
  %273 = load ptr, ptr %19, align 8, !tbaa !5
  %274 = load ptr, ptr %21, align 8, !tbaa !5
  %275 = call i32 %271(ptr noundef %272, ptr noundef %273, ptr noundef %274)
  store i32 %275, ptr %30, align 4, !tbaa !16
  %276 = load i32, ptr %30, align 4, !tbaa !16
  %277 = icmp ne i32 %276, 0
  br i1 %277, label %278, label %293

278:                                              ; preds = %267
  %279 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %279, align 4, !tbaa !16
  %280 = load i32, ptr %30, align 4, !tbaa !16
  %281 = icmp slt i32 %280, 0
  %282 = zext i1 %281 to i64
  %283 = select i1 %281, i32 -805, i32 803
  %284 = load ptr, ptr %7, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %284, i32 0, i32 0
  %286 = load ptr, ptr %285, align 8, !tbaa !11
  %287 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %286, i32 0, i32 5
  store i32 %283, ptr %287, align 8, !tbaa !27
  %288 = load ptr, ptr %7, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %288, i32 0, i32 0
  %290 = load ptr, ptr %289, align 8, !tbaa !11
  %291 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %290, i32 0, i32 5
  %292 = load i32, ptr %291, align 8, !tbaa !27
  store i32 %292, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

293:                                              ; preds = %267
  %294 = load double, ptr %16, align 8, !tbaa !9
  %295 = load ptr, ptr %21, align 8, !tbaa !5
  %296 = load ptr, ptr %19, align 8, !tbaa !5
  %297 = call double @N_VDotProd(ptr noundef %295, ptr noundef %296)
  %298 = fdiv double %294, %297
  store double %298, ptr %12, align 8, !tbaa !9
  %299 = load i32, ptr %27, align 4, !tbaa !16
  %300 = icmp eq i32 %299, 0
  br i1 %300, label %301, label %309

301:                                              ; preds = %293
  %302 = load ptr, ptr %26, align 8, !tbaa !5
  %303 = load i32, ptr %302, align 4, !tbaa !16
  %304 = icmp ne i32 %303, 0
  br i1 %304, label %305, label %309

305:                                              ; preds = %301
  %306 = load double, ptr %12, align 8, !tbaa !9
  %307 = load ptr, ptr %19, align 8, !tbaa !5
  %308 = load ptr, ptr %9, align 8, !tbaa !5
  call void @N_VScale(double noundef %306, ptr noundef %307, ptr noundef %308)
  br label %314

309:                                              ; preds = %301, %293
  %310 = load ptr, ptr %9, align 8, !tbaa !5
  %311 = load double, ptr %12, align 8, !tbaa !9
  %312 = load ptr, ptr %19, align 8, !tbaa !5
  %313 = load ptr, ptr %9, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %310, double noundef %311, ptr noundef %312, ptr noundef %313)
  br label %314

314:                                              ; preds = %309, %305
  %315 = load ptr, ptr %18, align 8, !tbaa !5
  %316 = load double, ptr %12, align 8, !tbaa !9
  %317 = fneg double %316
  %318 = load ptr, ptr %21, align 8, !tbaa !5
  %319 = load ptr, ptr %18, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %315, double noundef %317, ptr noundef %318, ptr noundef %319)
  %320 = load i32, ptr %24, align 4, !tbaa !16
  %321 = icmp ne i32 %320, 0
  br i1 %321, label %322, label %326

322:                                              ; preds = %314
  %323 = load ptr, ptr %18, align 8, !tbaa !5
  %324 = load ptr, ptr %22, align 8, !tbaa !5
  %325 = load ptr, ptr %21, align 8, !tbaa !5
  call void @N_VProd(ptr noundef %323, ptr noundef %324, ptr noundef %325)
  br label %329

326:                                              ; preds = %314
  %327 = load ptr, ptr %18, align 8, !tbaa !5
  %328 = load ptr, ptr %21, align 8, !tbaa !5
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %327, ptr noundef %328)
  br label %329

329:                                              ; preds = %326, %322
  %330 = load ptr, ptr %21, align 8, !tbaa !5
  %331 = load ptr, ptr %21, align 8, !tbaa !5
  %332 = call double @N_VDotProd(ptr noundef %330, ptr noundef %331)
  %333 = fcmp ole double %332, 0.000000e+00
  br i1 %333, label %334, label %335

334:                                              ; preds = %329
  br label %340

335:                                              ; preds = %329
  %336 = load ptr, ptr %21, align 8, !tbaa !5
  %337 = load ptr, ptr %21, align 8, !tbaa !5
  %338 = call double @N_VDotProd(ptr noundef %336, ptr noundef %337)
  %339 = call double @sqrt(double noundef %338) #4
  br label %340

340:                                              ; preds = %335, %334
  %341 = phi double [ 0.000000e+00, %334 ], [ %339, %335 ]
  store double %341, ptr %15, align 8, !tbaa !9
  %342 = load ptr, ptr %35, align 8, !tbaa !5
  store double %341, ptr %342, align 8, !tbaa !9
  %343 = load double, ptr %15, align 8, !tbaa !9
  %344 = load double, ptr %11, align 8, !tbaa !9
  %345 = fcmp ole double %343, %344
  br i1 %345, label %346, label %347

346:                                              ; preds = %340
  store i32 1, ptr %25, align 4, !tbaa !16
  br label %399

347:                                              ; preds = %340
  %348 = load i32, ptr %27, align 4, !tbaa !16
  %349 = load i32, ptr %28, align 4, !tbaa !16
  %350 = sub nsw i32 %349, 1
  %351 = icmp eq i32 %348, %350
  br i1 %351, label %352, label %353

352:                                              ; preds = %347
  br label %399

353:                                              ; preds = %347
  %354 = load i32, ptr %23, align 4, !tbaa !16
  %355 = icmp ne i32 %354, 0
  br i1 %355, label %356, label %381

356:                                              ; preds = %353
  %357 = load ptr, ptr %34, align 8, !tbaa !5
  %358 = load ptr, ptr %32, align 8, !tbaa !5
  %359 = load ptr, ptr %18, align 8, !tbaa !5
  %360 = load ptr, ptr %20, align 8, !tbaa !5
  %361 = load double, ptr %11, align 8, !tbaa !9
  %362 = call i32 %357(ptr noundef %358, ptr noundef %359, ptr noundef %360, double noundef %361, i32 noundef 1)
  store i32 %362, ptr %30, align 4, !tbaa !16
  %363 = load i32, ptr %30, align 4, !tbaa !16
  %364 = icmp ne i32 %363, 0
  br i1 %364, label %365, label %380

365:                                              ; preds = %356
  %366 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %366, align 4, !tbaa !16
  %367 = load i32, ptr %30, align 4, !tbaa !16
  %368 = icmp slt i32 %367, 0
  %369 = zext i1 %368 to i64
  %370 = select i1 %368, i32 -808, i32 805
  %371 = load ptr, ptr %7, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %371, i32 0, i32 0
  %373 = load ptr, ptr %372, align 8, !tbaa !11
  %374 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %373, i32 0, i32 5
  store i32 %370, ptr %374, align 8, !tbaa !27
  %375 = load ptr, ptr %7, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %375, i32 0, i32 0
  %377 = load ptr, ptr %376, align 8, !tbaa !11
  %378 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %377, i32 0, i32 5
  %379 = load i32, ptr %378, align 8, !tbaa !27
  store i32 %379, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

380:                                              ; preds = %356
  br label %384

381:                                              ; preds = %353
  %382 = load ptr, ptr %18, align 8, !tbaa !5
  %383 = load ptr, ptr %20, align 8, !tbaa !5
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %382, ptr noundef %383)
  br label %384

384:                                              ; preds = %381, %380
  %385 = load double, ptr %16, align 8, !tbaa !9
  store double %385, ptr %17, align 8, !tbaa !9
  %386 = load ptr, ptr %18, align 8, !tbaa !5
  %387 = load ptr, ptr %20, align 8, !tbaa !5
  %388 = call double @N_VDotProd(ptr noundef %386, ptr noundef %387)
  store double %388, ptr %16, align 8, !tbaa !9
  %389 = load double, ptr %16, align 8, !tbaa !9
  %390 = load double, ptr %17, align 8, !tbaa !9
  %391 = fdiv double %389, %390
  store double %391, ptr %13, align 8, !tbaa !9
  %392 = load ptr, ptr %20, align 8, !tbaa !5
  %393 = load double, ptr %13, align 8, !tbaa !9
  %394 = load ptr, ptr %19, align 8, !tbaa !5
  %395 = load ptr, ptr %19, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %392, double noundef %393, ptr noundef %394, ptr noundef %395)
  br label %396

396:                                              ; preds = %384
  %397 = load i32, ptr %27, align 4, !tbaa !16
  %398 = add nsw i32 %397, 1
  store i32 %398, ptr %27, align 4, !tbaa !16
  br label %263, !llvm.loop !28

399:                                              ; preds = %352, %346, %263
  %400 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 0, ptr %400, align 4, !tbaa !16
  %401 = load i32, ptr %25, align 4, !tbaa !16
  %402 = icmp eq i32 %401, 1
  br i1 %402, label %403, label %408

403:                                              ; preds = %399
  %404 = load ptr, ptr %7, align 8, !tbaa !5
  %405 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %404, i32 0, i32 0
  %406 = load ptr, ptr %405, align 8, !tbaa !11
  %407 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %406, i32 0, i32 5
  store i32 0, ptr %407, align 8, !tbaa !27
  br label %423

408:                                              ; preds = %399
  %409 = load double, ptr %15, align 8, !tbaa !9
  %410 = load double, ptr %14, align 8, !tbaa !9
  %411 = fcmp olt double %409, %410
  br i1 %411, label %412, label %417

412:                                              ; preds = %408
  %413 = load ptr, ptr %7, align 8, !tbaa !5
  %414 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %413, i32 0, i32 0
  %415 = load ptr, ptr %414, align 8, !tbaa !11
  %416 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %415, i32 0, i32 5
  store i32 801, ptr %416, align 8, !tbaa !27
  br label %422

417:                                              ; preds = %408
  %418 = load ptr, ptr %7, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %418, i32 0, i32 0
  %420 = load ptr, ptr %419, align 8, !tbaa !11
  %421 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %420, i32 0, i32 5
  store i32 802, ptr %421, align 8, !tbaa !27
  br label %422

422:                                              ; preds = %417, %412
  br label %423

423:                                              ; preds = %422, %403
  %424 = load ptr, ptr %7, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct._generic_SUNLinearSolver, ptr %424, i32 0, i32 0
  %426 = load ptr, ptr %425, align 8, !tbaa !11
  %427 = getelementptr inbounds %struct._SUNLinearSolverContent_PCG, ptr %426, i32 0, i32 5
  %428 = load i32, ptr %427, align 8, !tbaa !27
  store i32 %428, ptr %6, align 4
  store i32 1, ptr %37, align 4
  br label %429

429:                                              ; preds = %423, %365, %278, %238, %215, %169, %143, %126, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %430 = load i32, ptr %6, align 4
  ret i32 %430
}

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

declare void @N_VScale(double noundef, ptr noundef, ptr noundef) #2

declare void @N_VLinearSum(double noundef, ptr noundef, double noundef, ptr noundef, ptr noundef) #2

declare void @N_VProd(ptr noundef, ptr noundef, ptr noundef) #2

declare double @N_VDotProd(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 "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 }

!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 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_generic_SUNLinearSolver", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!14, !15, i64 0}
!14 = !{!"_SUNLinearSolverContent_PCG", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !10, i64 16, !15, 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, !15, i64 112, !6, i64 120}
!15 = !{!"int", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!14, !6, i64 80}
!18 = !{!14, !6, i64 88}
!19 = !{!14, !6, i64 96}
!20 = !{!14, !6, i64 104}
!21 = !{!14, !6, i64 72}
!22 = !{!14, !6, i64 40}
!23 = !{!14, !6, i64 64}
!24 = !{!14, !6, i64 32}
!25 = !{!14, !6, i64 56}
!26 = !{!14, !15, i64 4}
!27 = !{!14, !15, i64 24}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: nounwind uwtable
define dso_local i32 @SUNLinSolSolve_PCG(ptr noundef readonly %0, ptr nocapture noundef readnone %1, ptr noundef %2, ptr noundef %3, double noundef %4) local_unnamed_addr #0 {
  %6 = icmp eq ptr %0, null
  br i1 %6, label %149, label %7

7:                                                ; preds = %5
  %8 = load ptr, ptr %0, align 8, !tbaa !5
  %9 = load i32, ptr %8, align 8, !tbaa !10
  %10 = getelementptr inbounds i8, ptr %8, i64 80
  %11 = load ptr, ptr %10, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %8, i64 88
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %8, i64 96
  %15 = load ptr, ptr %14, align 8, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %8, i64 104
  %17 = load ptr, ptr %16, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %8, i64 72
  %19 = load ptr, ptr %18, align 8, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %8, i64 40
  %21 = load ptr, ptr %20, align 8, !tbaa !19
  %22 = getelementptr inbounds i8, ptr %8, i64 64
  %23 = load ptr, ptr %22, align 8, !tbaa !20
  %24 = getelementptr inbounds i8, ptr %8, i64 32
  %25 = load ptr, ptr %24, align 8, !tbaa !21
  %26 = getelementptr inbounds i8, ptr %8, i64 56
  %27 = load ptr, ptr %26, align 8, !tbaa !22
  %28 = getelementptr inbounds i8, ptr %8, i64 4
  %29 = load i32, ptr %28, align 4, !tbaa !23
  %30 = getelementptr inbounds i8, ptr %8, i64 8
  %31 = getelementptr inbounds i8, ptr %8, i64 12
  %32 = getelementptr inbounds i8, ptr %8, i64 16
  store i32 0, ptr %31, align 4, !tbaa !24
  %.not = icmp eq ptr %19, null
  %33 = icmp eq ptr %25, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %7
  store i32 0, ptr %30, align 4, !tbaa !24
  br label %.sink.split

35:                                               ; preds = %7
  %36 = and i32 %29, -3
  %or.cond = icmp eq i32 %36, 1
  %37 = icmp eq i32 %29, 2
  %spec.select = or i1 %37, %or.cond
  %38 = icmp eq ptr %27, null
  %or.cond3 = select i1 %spec.select, i1 %38, i1 false
  br i1 %or.cond3, label %39, label %40

39:                                               ; preds = %35
  store i32 0, ptr %30, align 4, !tbaa !24
  br label %.sink.split

40:                                               ; preds = %35
  %41 = load i32, ptr %30, align 4, !tbaa !24
  %.not172 = icmp eq i32 %41, 0
  br i1 %.not172, label %43, label %42

42:                                               ; preds = %40
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %3, ptr noundef %11) #3
  br label %50

43:                                               ; preds = %40
  %44 = tail call i32 %25(ptr noundef %21, ptr noundef %2, ptr noundef %11) #3
  %.not173 = icmp eq i32 %44, 0
  br i1 %.not173, label %49, label %45

45:                                               ; preds = %43
  store i32 0, ptr %30, align 4, !tbaa !24
  %46 = icmp slt i32 %44, 0
  %47 = select i1 %46, i32 -805, i32 803
  %48 = load ptr, ptr %0, align 8, !tbaa !5
  br label %.sink.split

49:                                               ; preds = %43
  tail call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %3, double noundef -1.000000e+00, ptr noundef %11, ptr noundef %11) #3
  br label %50

50:                                               ; preds = %49, %42
  br i1 %.not, label %52, label %51

51:                                               ; preds = %50
  tail call void @N_VProd(ptr noundef %11, ptr noundef nonnull %19, ptr noundef %17) #3
  br label %53

52:                                               ; preds = %50
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %11, ptr noundef %17) #3
  br label %53

53:                                               ; preds = %52, %51
  %54 = tail call double @N_VDotProd(ptr noundef %17, ptr noundef %17) #3
  %55 = fcmp ugt double %54, 0.000000e+00
  br i1 %55, label %56, label %59

56:                                               ; preds = %53
  %57 = tail call double @N_VDotProd(ptr noundef %17, ptr noundef %17) #3
  %58 = tail call double @sqrt(double noundef %57) #3
  br label %59

59:                                               ; preds = %53, %56
  %60 = phi double [ %58, %56 ], [ 0.000000e+00, %53 ]
  store double %60, ptr %32, align 8, !tbaa !25
  %61 = fcmp ugt double %60, %4
  br i1 %61, label %64, label %62

62:                                               ; preds = %59
  store i32 0, ptr %30, align 4, !tbaa !24
  %63 = load ptr, ptr %0, align 8, !tbaa !5
  br label %.sink.split

64:                                               ; preds = %59
  %.off = add i32 %29, -1
  %switch = icmp ult i32 %.off, 3
  br i1 %switch, label %65, label %71

65:                                               ; preds = %64
  %66 = tail call i32 %27(ptr noundef %23, ptr noundef %11, ptr noundef %15, double noundef %4, i32 noundef 1) #3
  %.not174 = icmp eq i32 %66, 0
  br i1 %.not174, label %72, label %67

67:                                               ; preds = %65
  store i32 0, ptr %30, align 4, !tbaa !24
  %68 = icmp slt i32 %66, 0
  %69 = select i1 %68, i32 -808, i32 805
  %70 = load ptr, ptr %0, align 8, !tbaa !5
  br label %.sink.split

71:                                               ; preds = %64
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %11, ptr noundef %15) #3
  br label %72

72:                                               ; preds = %65, %71
  %73 = tail call double @N_VDotProd(ptr noundef %11, ptr noundef %15) #3
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %15, ptr noundef %13) #3
  %74 = icmp sgt i32 %9, 0
  br i1 %74, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %72
  store i32 0, ptr %30, align 4, !tbaa !24
  br label %146

.lr.ph:                                           ; preds = %72
  %75 = add nsw i32 %9, -1
  %76 = load i32, ptr %31, align 4, !tbaa !24
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %31, align 4, !tbaa !24
  %78 = tail call i32 %25(ptr noundef %21, ptr noundef %13, ptr noundef %17) #3
  %.not175.peel = icmp eq i32 %78, 0
  br i1 %.not175.peel, label %79, label %.loopexit

79:                                               ; preds = %.lr.ph
  %80 = tail call double @N_VDotProd(ptr noundef %17, ptr noundef %13) #3
  %81 = fdiv double %73, %80
  %82 = load i32, ptr %30, align 4, !tbaa !24
  %.not176.peel = icmp eq i32 %82, 0
  br i1 %.not176.peel, label %84, label %83

83:                                               ; preds = %79
  tail call void @N_VScale(double noundef %81, ptr noundef %13, ptr noundef %2) #3
  br label %85

84:                                               ; preds = %79
  tail call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %2, double noundef %81, ptr noundef %13, ptr noundef %2) #3
  br label %85

85:                                               ; preds = %84, %83
  %86 = fneg double %81
  tail call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %11, double noundef %86, ptr noundef %17, ptr noundef %11) #3
  br i1 %.not, label %88, label %87

87:                                               ; preds = %85
  tail call void @N_VProd(ptr noundef %11, ptr noundef nonnull %19, ptr noundef %17) #3
  br label %89

88:                                               ; preds = %85
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %11, ptr noundef %17) #3
  br label %89

89:                                               ; preds = %88, %87
  %90 = tail call double @N_VDotProd(ptr noundef %17, ptr noundef %17) #3
  %91 = fcmp ugt double %90, 0.000000e+00
  br i1 %91, label %92, label %95

92:                                               ; preds = %89
  %93 = tail call double @N_VDotProd(ptr noundef %17, ptr noundef %17) #3
  %94 = tail call double @sqrt(double noundef %93) #3
  br label %95

95:                                               ; preds = %92, %89
  %96 = phi double [ %94, %92 ], [ 0.000000e+00, %89 ]
  store double %96, ptr %32, align 8, !tbaa !25
  %97 = fcmp ugt double %96, %4
  br i1 %97, label %98, label %.loopexit197

98:                                               ; preds = %95
  %99 = icmp eq i32 %75, 0
  br i1 %99, label %._crit_edge, label %100

100:                                              ; preds = %98
  br i1 %switch, label %102, label %101

101:                                              ; preds = %100
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %11, ptr noundef %15) #3
  br label %.peel.next

102:                                              ; preds = %100
  %103 = tail call i32 %27(ptr noundef %23, ptr noundef %11, ptr noundef %15, double noundef %4, i32 noundef 1) #3
  %.not177.peel = icmp eq i32 %103, 0
  br i1 %.not177.peel, label %.peel.next, label %.loopexit198

.peel.next:                                       ; preds = %101, %102
  %104 = tail call double @N_VDotProd(ptr noundef %11, ptr noundef %15) #3
  %105 = fdiv double %104, %73
  tail call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %15, double noundef %105, ptr noundef %13, ptr noundef %13) #3
  %106 = load i32, ptr %31, align 4, !tbaa !24
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %31, align 4, !tbaa !24
  %108 = tail call i32 %25(ptr noundef %21, ptr noundef %13, ptr noundef %17) #3
  %.not175220 = icmp eq i32 %108, 0
  br i1 %.not175220, label %.lr.ph223, label %.loopexit

.loopexit:                                        ; preds = %135, %.peel.next, %.lr.ph
  %.lcssa189 = phi i32 [ %78, %.lr.ph ], [ %108, %.peel.next ], [ %141, %135 ]
  store i32 0, ptr %30, align 4, !tbaa !24
  %109 = icmp slt i32 %.lcssa189, 0
  %110 = select i1 %109, i32 -805, i32 803
  %111 = load ptr, ptr %0, align 8, !tbaa !5
  br label %.sink.split

.lr.ph223:                                        ; preds = %.peel.next, %135
  %.0157185222 = phi i32 [ %138, %135 ], [ 1, %.peel.next ]
  %.0155186221 = phi double [ %136, %135 ], [ %104, %.peel.next ]
  %112 = tail call double @N_VDotProd(ptr noundef %17, ptr noundef %13) #3
  %113 = fdiv double %.0155186221, %112
  tail call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %2, double noundef %113, ptr noundef %13, ptr noundef %2) #3
  %114 = fneg double %113
  tail call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %11, double noundef %114, ptr noundef %17, ptr noundef %11) #3
  br i1 %.not, label %116, label %115

115:                                              ; preds = %.lr.ph223
  tail call void @N_VProd(ptr noundef %11, ptr noundef nonnull %19, ptr noundef %17) #3
  br label %117

116:                                              ; preds = %.lr.ph223
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %11, ptr noundef %17) #3
  br label %117

117:                                              ; preds = %116, %115
  %118 = tail call double @N_VDotProd(ptr noundef %17, ptr noundef %17) #3
  %119 = fcmp ugt double %118, 0.000000e+00
  br i1 %119, label %120, label %123

120:                                              ; preds = %117
  %121 = tail call double @N_VDotProd(ptr noundef %17, ptr noundef %17) #3
  %122 = tail call double @sqrt(double noundef %121) #3
  br label %123

123:                                              ; preds = %117, %120
  %124 = phi double [ %122, %120 ], [ 0.000000e+00, %117 ]
  store double %124, ptr %32, align 8, !tbaa !25
  %125 = fcmp ugt double %124, %4
  br i1 %125, label %126, label %.loopexit197

126:                                              ; preds = %123
  %127 = icmp eq i32 %.0157185222, %75
  br i1 %127, label %._crit_edge, label %128

128:                                              ; preds = %126
  br i1 %switch, label %129, label %134

129:                                              ; preds = %128
  %130 = tail call i32 %27(ptr noundef %23, ptr noundef %11, ptr noundef %15, double noundef %4, i32 noundef 1) #3
  %.not177 = icmp eq i32 %130, 0
  br i1 %.not177, label %135, label %.loopexit198

.loopexit198:                                     ; preds = %129, %102
  %.lcssa = phi i32 [ %103, %102 ], [ %130, %129 ]
  store i32 0, ptr %30, align 4, !tbaa !24
  %131 = icmp slt i32 %.lcssa, 0
  %132 = select i1 %131, i32 -808, i32 805
  %133 = load ptr, ptr %0, align 8, !tbaa !5
  br label %.sink.split

134:                                              ; preds = %128
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %11, ptr noundef %15) #3
  br label %135

135:                                              ; preds = %129, %134
  %136 = tail call double @N_VDotProd(ptr noundef %11, ptr noundef %15) #3
  %137 = fdiv double %136, %.0155186221
  tail call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %15, double noundef %137, ptr noundef %13, ptr noundef %13) #3
  %138 = add nuw nsw i32 %.0157185222, 1
  %139 = load i32, ptr %31, align 4, !tbaa !24
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %31, align 4, !tbaa !24
  %141 = tail call i32 %25(ptr noundef %21, ptr noundef %13, ptr noundef %17) #3
  %.not175 = icmp eq i32 %141, 0
  br i1 %.not175, label %.lr.ph223, label %.loopexit

.loopexit197:                                     ; preds = %123, %95
  store i32 0, ptr %30, align 4, !tbaa !24
  %142 = load ptr, ptr %0, align 8, !tbaa !5
  br label %.sink.split

._crit_edge:                                      ; preds = %126, %98
  %.1.ph = phi double [ %96, %98 ], [ %124, %126 ]
  store i32 0, ptr %30, align 4, !tbaa !24
  %143 = fcmp olt double %.1.ph, %60
  br i1 %143, label %144, label %146

144:                                              ; preds = %._crit_edge
  %145 = load ptr, ptr %0, align 8, !tbaa !5
  br label %.sink.split

146:                                              ; preds = %._crit_edge.thread, %._crit_edge
  %147 = load ptr, ptr %0, align 8, !tbaa !5
  br label %.sink.split

.sink.split:                                      ; preds = %34, %39, %45, %62, %67, %.loopexit, %.loopexit198, %144, %146, %.loopexit197
  %.sink211 = phi ptr [ %142, %.loopexit197 ], [ %147, %146 ], [ %145, %144 ], [ %133, %.loopexit198 ], [ %111, %.loopexit ], [ %70, %67 ], [ %63, %62 ], [ %48, %45 ], [ %8, %39 ], [ %8, %34 ]
  %.sink = phi i32 [ 0, %.loopexit197 ], [ 802, %146 ], [ 801, %144 ], [ %132, %.loopexit198 ], [ %110, %.loopexit ], [ %69, %67 ], [ 0, %62 ], [ %47, %45 ], [ -807, %39 ], [ -804, %34 ]
  %148 = getelementptr inbounds i8, ptr %.sink211, i64 24
  store i32 %.sink, ptr %148, align 8, !tbaa !26
  br label %149

149:                                              ; preds = %.sink.split, %5
  %.0 = phi i32 [ -801, %5 ], [ %.sink, %.sink.split ]
  ret i32 %.0
}

declare void @N_VScale(double noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @N_VLinearSum(double noundef, ptr noundef, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @N_VProd(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare double @N_VDotProd(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #2

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 memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!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, !12, i64 0}
!11 = !{!"_SUNLinearSolverContent_PCG", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !13, i64 16, !12, 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, !12, i64 112, !7, i64 120}
!12 = !{!"int", !8, i64 0}
!13 = !{!"double", !8, i64 0}
!14 = !{!11, !7, i64 80}
!15 = !{!11, !7, i64 88}
!16 = !{!11, !7, i64 96}
!17 = !{!11, !7, i64 104}
!18 = !{!11, !7, i64 72}
!19 = !{!11, !7, i64 40}
!20 = !{!11, !7, i64 64}
!21 = !{!11, !7, i64 32}
!22 = !{!11, !7, i64 56}
!23 = !{!11, !12, i64 4}
!24 = !{!12, !12, i64 0}
!25 = !{!13, !13, i64 0}
!26 = !{!11, !12, i64 24}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass