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

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

%struct.CVodeMemRec = type { ptr, double, ptr, ptr, i32, i32, double, double, ptr, i32, i32, ptr, ptr, i32, i32, ptr, i32, i32, double, double, ptr, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, i32, double, i32, i32, double, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, i32, double, ptr, ptr, ptr, [13 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [13 x ptr], ptr, ptr, ptr, ptr, [13 x ptr], ptr, ptr, ptr, ptr, ptr, i32, [13 x ptr], ptr, ptr, ptr, ptr, ptr, i32, double, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, [14 x double], [6 x double], [13 x double], double, double, double, double, double, double, double, double, i32, double, double, i32, double, double, ptr, i32, i64, i32, i32, i32, double, double, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, ptr, i64, i64, ptr, i64, i64, i64, i64, i64, i64, i32, double, double, double, i64, i64, i64, i64, i64, i64, ptr, i32, ptr, i32, ptr, i32, ptr, i32, i32, i64, i32, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, i64, i32, i32, i64, double, double, double, i32, i32, double, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i64, i32, [6 x [4 x double]], i32, i64, ptr, i32, ptr, ptr, double, double, double, ptr, ptr, ptr, double, double, i32, i32, i64, ptr, i32, ptr, ptr, ptr, i32, ptr, i32 }
%struct.CVLsMemRec = type { i32, i32, i32, ptr, ptr, i32, i32, double, double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32 }

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @cvLsBandDQJac(double noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  %40 = alloca ptr, align 8
  %41 = alloca i32, align 4
  store double %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #5
  store i32 0, ptr %41, align 4, !tbaa !11
  store ptr null, ptr %29, align 8, !tbaa !9
  %42 = load ptr, ptr %12, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.CVodeMemRec, ptr %42, i32 0, i32 174
  %44 = load ptr, ptr %43, align 8, !tbaa !13
  store ptr %44, ptr %40, align 8, !tbaa !9
  %45 = load ptr, ptr %11, align 8, !tbaa !9
  %46 = call i64 @SUNBandMatrix_Columns(ptr noundef %45)
  store i64 %46, ptr %37, align 8, !tbaa !16
  %47 = load ptr, ptr %11, align 8, !tbaa !9
  %48 = call i64 @SUNBandMatrix_UpperBandwidth(ptr noundef %47)
  store i64 %48, ptr %38, align 8, !tbaa !16
  %49 = load ptr, ptr %11, align 8, !tbaa !9
  %50 = call i64 @SUNBandMatrix_LowerBandwidth(ptr noundef %49)
  store i64 %50, ptr %39, align 8, !tbaa !16
  %51 = load ptr, ptr %13, align 8, !tbaa !9
  store ptr %51, ptr %15, align 8, !tbaa !9
  %52 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %52, ptr %16, align 8, !tbaa !9
  %53 = load ptr, ptr %12, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.CVodeMemRec, ptr %53, i32 0, i32 52
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  %56 = call ptr @N_VGetArrayPointer(ptr noundef %55)
  store ptr %56, ptr %24, align 8, !tbaa !9
  %57 = load ptr, ptr %10, align 8, !tbaa !9
  %58 = call ptr @N_VGetArrayPointer(ptr noundef %57)
  store ptr %58, ptr %25, align 8, !tbaa !9
  %59 = load ptr, ptr %15, align 8, !tbaa !9
  %60 = call ptr @N_VGetArrayPointer(ptr noundef %59)
  store ptr %60, ptr %26, align 8, !tbaa !9
  %61 = load ptr, ptr %9, align 8, !tbaa !9
  %62 = call ptr @N_VGetArrayPointer(ptr noundef %61)
  store ptr %62, ptr %27, align 8, !tbaa !9
  %63 = load ptr, ptr %16, align 8, !tbaa !9
  %64 = call ptr @N_VGetArrayPointer(ptr noundef %63)
  store ptr %64, ptr %28, align 8, !tbaa !9
  %65 = load ptr, ptr %12, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.CVodeMemRec, ptr %65, i32 0, i32 13
  %67 = load i32, ptr %66, align 8, !tbaa !18
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %74

69:                                               ; preds = %7
  %70 = load ptr, ptr %12, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.CVodeMemRec, ptr %70, i32 0, i32 60
  %72 = load ptr, ptr %71, align 8, !tbaa !19
  %73 = call ptr @N_VGetArrayPointer(ptr noundef %72)
  store ptr %73, ptr %29, align 8, !tbaa !9
  br label %74

74:                                               ; preds = %69, %7
  %75 = load ptr, ptr %9, align 8, !tbaa !9
  %76 = load ptr, ptr %16, align 8, !tbaa !9
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %75, ptr noundef %76)
  %77 = load ptr, ptr %12, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.CVodeMemRec, ptr %77, i32 0, i32 1
  %79 = load double, ptr %78, align 8, !tbaa !20
  %80 = fcmp ole double %79, 0.000000e+00
  br i1 %80, label %81, label %82

81:                                               ; preds = %74
  br label %87

82:                                               ; preds = %74
  %83 = load ptr, ptr %12, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.CVodeMemRec, ptr %83, i32 0, i32 1
  %85 = load double, ptr %84, align 8, !tbaa !20
  %86 = call double @sqrt(double noundef %85) #5
  br label %87

87:                                               ; preds = %82, %81
  %88 = phi double [ 0.000000e+00, %81 ], [ %86, %82 ]
  store double %88, ptr %21, align 8, !tbaa !5
  %89 = load ptr, ptr %10, align 8, !tbaa !9
  %90 = load ptr, ptr %12, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.CVodeMemRec, ptr %90, i32 0, i32 52
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = call double @N_VWrmsNorm(ptr noundef %89, ptr noundef %92)
  store double %93, ptr %17, align 8, !tbaa !5
  %94 = load double, ptr %17, align 8, !tbaa !5
  %95 = fcmp une double %94, 0.000000e+00
  br i1 %95, label %96, label %111

96:                                               ; preds = %87
  %97 = load ptr, ptr %12, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.CVodeMemRec, ptr %97, i32 0, i32 87
  %99 = load double, ptr %98, align 8, !tbaa !21
  %100 = call double @llvm.fabs.f64(double %99)
  %101 = fmul double 1.000000e+03, %100
  %102 = load ptr, ptr %12, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.CVodeMemRec, ptr %102, i32 0, i32 1
  %104 = load double, ptr %103, align 8, !tbaa !20
  %105 = fmul double %101, %104
  %106 = load i64, ptr %37, align 8, !tbaa !16
  %107 = sitofp i64 %106 to double
  %108 = fmul double %105, %107
  %109 = load double, ptr %17, align 8, !tbaa !5
  %110 = fmul double %108, %109
  br label %112

111:                                              ; preds = %87
  br label %112

112:                                              ; preds = %111, %96
  %113 = phi double [ %110, %96 ], [ 1.000000e+00, %111 ]
  store double %113, ptr %18, align 8, !tbaa !5
  %114 = load i64, ptr %39, align 8, !tbaa !16
  %115 = load i64, ptr %38, align 8, !tbaa !16
  %116 = add nsw i64 %114, %115
  %117 = add nsw i64 %116, 1
  store i64 %117, ptr %33, align 8, !tbaa !16
  %118 = load i64, ptr %33, align 8, !tbaa !16
  %119 = load i64, ptr %37, align 8, !tbaa !16
  %120 = icmp slt i64 %118, %119
  br i1 %120, label %121, label %123

121:                                              ; preds = %112
  %122 = load i64, ptr %33, align 8, !tbaa !16
  br label %125

123:                                              ; preds = %112
  %124 = load i64, ptr %37, align 8, !tbaa !16
  br label %125

125:                                              ; preds = %123, %121
  %126 = phi i64 [ %122, %121 ], [ %124, %123 ]
  store i64 %126, ptr %34, align 8, !tbaa !16
  store i64 1, ptr %30, align 8, !tbaa !16
  br label %127

127:                                              ; preds = %402, %125
  %128 = load i64, ptr %30, align 8, !tbaa !16
  %129 = load i64, ptr %34, align 8, !tbaa !16
  %130 = icmp sle i64 %128, %129
  br i1 %130, label %131, label %405

131:                                              ; preds = %127
  %132 = load i64, ptr %30, align 8, !tbaa !16
  %133 = sub nsw i64 %132, 1
  store i64 %133, ptr %32, align 8, !tbaa !16
  br label %134

134:                                              ; preds = %223, %131
  %135 = load i64, ptr %32, align 8, !tbaa !16
  %136 = load i64, ptr %37, align 8, !tbaa !16
  %137 = icmp slt i64 %135, %136
  br i1 %137, label %138, label %227

138:                                              ; preds = %134
  %139 = load double, ptr %21, align 8, !tbaa !5
  %140 = load ptr, ptr %27, align 8, !tbaa !9
  %141 = load i64, ptr %32, align 8, !tbaa !16
  %142 = getelementptr inbounds double, ptr %140, i64 %141
  %143 = load double, ptr %142, align 8, !tbaa !5
  %144 = call double @llvm.fabs.f64(double %143)
  %145 = fmul double %139, %144
  %146 = load double, ptr %18, align 8, !tbaa !5
  %147 = load ptr, ptr %24, align 8, !tbaa !9
  %148 = load i64, ptr %32, align 8, !tbaa !16
  %149 = getelementptr inbounds double, ptr %147, i64 %148
  %150 = load double, ptr %149, align 8, !tbaa !5
  %151 = fdiv double %146, %150
  %152 = fcmp ogt double %145, %151
  br i1 %152, label %153, label %161

153:                                              ; preds = %138
  %154 = load double, ptr %21, align 8, !tbaa !5
  %155 = load ptr, ptr %27, align 8, !tbaa !9
  %156 = load i64, ptr %32, align 8, !tbaa !16
  %157 = getelementptr inbounds double, ptr %155, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !5
  %159 = call double @llvm.fabs.f64(double %158)
  %160 = fmul double %154, %159
  br label %168

161:                                              ; preds = %138
  %162 = load double, ptr %18, align 8, !tbaa !5
  %163 = load ptr, ptr %24, align 8, !tbaa !9
  %164 = load i64, ptr %32, align 8, !tbaa !16
  %165 = getelementptr inbounds double, ptr %163, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !5
  %167 = fdiv double %162, %166
  br label %168

168:                                              ; preds = %161, %153
  %169 = phi double [ %160, %153 ], [ %167, %161 ]
  store double %169, ptr %19, align 8, !tbaa !5
  %170 = load ptr, ptr %12, align 8, !tbaa !9
  %171 = getelementptr inbounds %struct.CVodeMemRec, ptr %170, i32 0, i32 13
  %172 = load i32, ptr %171, align 8, !tbaa !18
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %216

174:                                              ; preds = %168
  %175 = load ptr, ptr %29, align 8, !tbaa !9
  %176 = load i64, ptr %32, align 8, !tbaa !16
  %177 = getelementptr inbounds double, ptr %175, i64 %176
  %178 = load double, ptr %177, align 8, !tbaa !5
  store double %178, ptr %22, align 8, !tbaa !5
  %179 = load double, ptr %22, align 8, !tbaa !5
  %180 = call double @llvm.fabs.f64(double %179)
  %181 = fcmp oeq double %180, 1.000000e+00
  br i1 %181, label %182, label %196

182:                                              ; preds = %174
  %183 = load ptr, ptr %28, align 8, !tbaa !9
  %184 = load i64, ptr %32, align 8, !tbaa !16
  %185 = getelementptr inbounds double, ptr %183, i64 %184
  %186 = load double, ptr %185, align 8, !tbaa !5
  %187 = load double, ptr %19, align 8, !tbaa !5
  %188 = fadd double %186, %187
  %189 = load double, ptr %22, align 8, !tbaa !5
  %190 = fmul double %188, %189
  %191 = fcmp olt double %190, 0.000000e+00
  br i1 %191, label %192, label %195

192:                                              ; preds = %182
  %193 = load double, ptr %19, align 8, !tbaa !5
  %194 = fneg double %193
  store double %194, ptr %19, align 8, !tbaa !5
  br label %195

195:                                              ; preds = %192, %182
  br label %215

196:                                              ; preds = %174
  %197 = load double, ptr %22, align 8, !tbaa !5
  %198 = call double @llvm.fabs.f64(double %197)
  %199 = fcmp oeq double %198, 2.000000e+00
  br i1 %199, label %200, label %214

200:                                              ; preds = %196
  %201 = load ptr, ptr %28, align 8, !tbaa !9
  %202 = load i64, ptr %32, align 8, !tbaa !16
  %203 = getelementptr inbounds double, ptr %201, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !5
  %205 = load double, ptr %19, align 8, !tbaa !5
  %206 = fadd double %204, %205
  %207 = load double, ptr %22, align 8, !tbaa !5
  %208 = fmul double %206, %207
  %209 = fcmp ole double %208, 0.000000e+00
  br i1 %209, label %210, label %213

210:                                              ; preds = %200
  %211 = load double, ptr %19, align 8, !tbaa !5
  %212 = fneg double %211
  store double %212, ptr %19, align 8, !tbaa !5
  br label %213

213:                                              ; preds = %210, %200
  br label %214

214:                                              ; preds = %213, %196
  br label %215

215:                                              ; preds = %214, %195
  br label %216

216:                                              ; preds = %215, %168
  %217 = load double, ptr %19, align 8, !tbaa !5
  %218 = load ptr, ptr %28, align 8, !tbaa !9
  %219 = load i64, ptr %32, align 8, !tbaa !16
  %220 = getelementptr inbounds double, ptr %218, i64 %219
  %221 = load double, ptr %220, align 8, !tbaa !5
  %222 = fadd double %221, %217
  store double %222, ptr %220, align 8, !tbaa !5
  br label %223

223:                                              ; preds = %216
  %224 = load i64, ptr %33, align 8, !tbaa !16
  %225 = load i64, ptr %32, align 8, !tbaa !16
  %226 = add nsw i64 %225, %224
  store i64 %226, ptr %32, align 8, !tbaa !16
  br label %134, !llvm.loop !22

227:                                              ; preds = %134
  %228 = load ptr, ptr %12, align 8, !tbaa !9
  %229 = getelementptr inbounds %struct.CVodeMemRec, ptr %228, i32 0, i32 2
  %230 = load ptr, ptr %229, align 8, !tbaa !24
  %231 = load ptr, ptr %12, align 8, !tbaa !9
  %232 = getelementptr inbounds %struct.CVodeMemRec, ptr %231, i32 0, i32 92
  %233 = load double, ptr %232, align 8, !tbaa !25
  %234 = load ptr, ptr %16, align 8, !tbaa !9
  %235 = load ptr, ptr %15, align 8, !tbaa !9
  %236 = load ptr, ptr %12, align 8, !tbaa !9
  %237 = getelementptr inbounds %struct.CVodeMemRec, ptr %236, i32 0, i32 3
  %238 = load ptr, ptr %237, align 8, !tbaa !26
  %239 = call i32 %230(double noundef %233, ptr noundef %234, ptr noundef %235, ptr noundef %238)
  store i32 %239, ptr %41, align 4, !tbaa !11
  %240 = load ptr, ptr %40, align 8, !tbaa !9
  %241 = getelementptr inbounds %struct.CVLsMemRec, ptr %240, i32 0, i32 18
  %242 = load i64, ptr %241, align 8, !tbaa !27
  %243 = add nsw i64 %242, 1
  store i64 %243, ptr %241, align 8, !tbaa !27
  %244 = load i32, ptr %41, align 4, !tbaa !11
  %245 = icmp ne i32 %244, 0
  br i1 %245, label %246, label %247

246:                                              ; preds = %227
  br label %405

247:                                              ; preds = %227
  %248 = load i64, ptr %30, align 8, !tbaa !16
  %249 = sub nsw i64 %248, 1
  store i64 %249, ptr %32, align 8, !tbaa !16
  br label %250

250:                                              ; preds = %397, %247
  %251 = load i64, ptr %32, align 8, !tbaa !16
  %252 = load i64, ptr %37, align 8, !tbaa !16
  %253 = icmp slt i64 %251, %252
  br i1 %253, label %254, label %401

254:                                              ; preds = %250
  %255 = load ptr, ptr %27, align 8, !tbaa !9
  %256 = load i64, ptr %32, align 8, !tbaa !16
  %257 = getelementptr inbounds double, ptr %255, i64 %256
  %258 = load double, ptr %257, align 8, !tbaa !5
  %259 = load ptr, ptr %28, align 8, !tbaa !9
  %260 = load i64, ptr %32, align 8, !tbaa !16
  %261 = getelementptr inbounds double, ptr %259, i64 %260
  store double %258, ptr %261, align 8, !tbaa !5
  %262 = load ptr, ptr %11, align 8, !tbaa !9
  %263 = load i64, ptr %32, align 8, !tbaa !16
  %264 = call ptr @SUNBandMatrix_Column(ptr noundef %262, i64 noundef %263)
  store ptr %264, ptr %23, align 8, !tbaa !9
  %265 = load double, ptr %21, align 8, !tbaa !5
  %266 = load ptr, ptr %27, align 8, !tbaa !9
  %267 = load i64, ptr %32, align 8, !tbaa !16
  %268 = getelementptr inbounds double, ptr %266, i64 %267
  %269 = load double, ptr %268, align 8, !tbaa !5
  %270 = call double @llvm.fabs.f64(double %269)
  %271 = fmul double %265, %270
  %272 = load double, ptr %18, align 8, !tbaa !5
  %273 = load ptr, ptr %24, align 8, !tbaa !9
  %274 = load i64, ptr %32, align 8, !tbaa !16
  %275 = getelementptr inbounds double, ptr %273, i64 %274
  %276 = load double, ptr %275, align 8, !tbaa !5
  %277 = fdiv double %272, %276
  %278 = fcmp ogt double %271, %277
  br i1 %278, label %279, label %287

279:                                              ; preds = %254
  %280 = load double, ptr %21, align 8, !tbaa !5
  %281 = load ptr, ptr %27, align 8, !tbaa !9
  %282 = load i64, ptr %32, align 8, !tbaa !16
  %283 = getelementptr inbounds double, ptr %281, i64 %282
  %284 = load double, ptr %283, align 8, !tbaa !5
  %285 = call double @llvm.fabs.f64(double %284)
  %286 = fmul double %280, %285
  br label %294

287:                                              ; preds = %254
  %288 = load double, ptr %18, align 8, !tbaa !5
  %289 = load ptr, ptr %24, align 8, !tbaa !9
  %290 = load i64, ptr %32, align 8, !tbaa !16
  %291 = getelementptr inbounds double, ptr %289, i64 %290
  %292 = load double, ptr %291, align 8, !tbaa !5
  %293 = fdiv double %288, %292
  br label %294

294:                                              ; preds = %287, %279
  %295 = phi double [ %286, %279 ], [ %293, %287 ]
  store double %295, ptr %19, align 8, !tbaa !5
  %296 = load ptr, ptr %12, align 8, !tbaa !9
  %297 = getelementptr inbounds %struct.CVodeMemRec, ptr %296, i32 0, i32 13
  %298 = load i32, ptr %297, align 8, !tbaa !18
  %299 = icmp ne i32 %298, 0
  br i1 %299, label %300, label %342

300:                                              ; preds = %294
  %301 = load ptr, ptr %29, align 8, !tbaa !9
  %302 = load i64, ptr %32, align 8, !tbaa !16
  %303 = getelementptr inbounds double, ptr %301, i64 %302
  %304 = load double, ptr %303, align 8, !tbaa !5
  store double %304, ptr %22, align 8, !tbaa !5
  %305 = load double, ptr %22, align 8, !tbaa !5
  %306 = call double @llvm.fabs.f64(double %305)
  %307 = fcmp oeq double %306, 1.000000e+00
  br i1 %307, label %308, label %322

308:                                              ; preds = %300
  %309 = load ptr, ptr %28, align 8, !tbaa !9
  %310 = load i64, ptr %32, align 8, !tbaa !16
  %311 = getelementptr inbounds double, ptr %309, i64 %310
  %312 = load double, ptr %311, align 8, !tbaa !5
  %313 = load double, ptr %19, align 8, !tbaa !5
  %314 = fadd double %312, %313
  %315 = load double, ptr %22, align 8, !tbaa !5
  %316 = fmul double %314, %315
  %317 = fcmp olt double %316, 0.000000e+00
  br i1 %317, label %318, label %321

318:                                              ; preds = %308
  %319 = load double, ptr %19, align 8, !tbaa !5
  %320 = fneg double %319
  store double %320, ptr %19, align 8, !tbaa !5
  br label %321

321:                                              ; preds = %318, %308
  br label %341

322:                                              ; preds = %300
  %323 = load double, ptr %22, align 8, !tbaa !5
  %324 = call double @llvm.fabs.f64(double %323)
  %325 = fcmp oeq double %324, 2.000000e+00
  br i1 %325, label %326, label %340

326:                                              ; preds = %322
  %327 = load ptr, ptr %28, align 8, !tbaa !9
  %328 = load i64, ptr %32, align 8, !tbaa !16
  %329 = getelementptr inbounds double, ptr %327, i64 %328
  %330 = load double, ptr %329, align 8, !tbaa !5
  %331 = load double, ptr %19, align 8, !tbaa !5
  %332 = fadd double %330, %331
  %333 = load double, ptr %22, align 8, !tbaa !5
  %334 = fmul double %332, %333
  %335 = fcmp ole double %334, 0.000000e+00
  br i1 %335, label %336, label %339

336:                                              ; preds = %326
  %337 = load double, ptr %19, align 8, !tbaa !5
  %338 = fneg double %337
  store double %338, ptr %19, align 8, !tbaa !5
  br label %339

339:                                              ; preds = %336, %326
  br label %340

340:                                              ; preds = %339, %322
  br label %341

341:                                              ; preds = %340, %321
  br label %342

342:                                              ; preds = %341, %294
  %343 = load double, ptr %19, align 8, !tbaa !5
  %344 = fdiv double 1.000000e+00, %343
  store double %344, ptr %20, align 8, !tbaa !5
  %345 = load i64, ptr %32, align 8, !tbaa !16
  %346 = load i64, ptr %38, align 8, !tbaa !16
  %347 = sub nsw i64 %345, %346
  %348 = icmp sgt i64 0, %347
  br i1 %348, label %349, label %350

349:                                              ; preds = %342
  br label %354

350:                                              ; preds = %342
  %351 = load i64, ptr %32, align 8, !tbaa !16
  %352 = load i64, ptr %38, align 8, !tbaa !16
  %353 = sub nsw i64 %351, %352
  br label %354

354:                                              ; preds = %350, %349
  %355 = phi i64 [ 0, %349 ], [ %353, %350 ]
  store i64 %355, ptr %35, align 8, !tbaa !16
  %356 = load i64, ptr %32, align 8, !tbaa !16
  %357 = load i64, ptr %39, align 8, !tbaa !16
  %358 = add nsw i64 %356, %357
  %359 = load i64, ptr %37, align 8, !tbaa !16
  %360 = sub nsw i64 %359, 1
  %361 = icmp slt i64 %358, %360
  br i1 %361, label %362, label %366

362:                                              ; preds = %354
  %363 = load i64, ptr %32, align 8, !tbaa !16
  %364 = load i64, ptr %39, align 8, !tbaa !16
  %365 = add nsw i64 %363, %364
  br label %369

366:                                              ; preds = %354
  %367 = load i64, ptr %37, align 8, !tbaa !16
  %368 = sub nsw i64 %367, 1
  br label %369

369:                                              ; preds = %366, %362
  %370 = phi i64 [ %365, %362 ], [ %368, %366 ]
  store i64 %370, ptr %36, align 8, !tbaa !16
  %371 = load i64, ptr %35, align 8, !tbaa !16
  store i64 %371, ptr %31, align 8, !tbaa !16
  br label %372

372:                                              ; preds = %393, %369
  %373 = load i64, ptr %31, align 8, !tbaa !16
  %374 = load i64, ptr %36, align 8, !tbaa !16
  %375 = icmp sle i64 %373, %374
  br i1 %375, label %376, label %396

376:                                              ; preds = %372
  %377 = load double, ptr %20, align 8, !tbaa !5
  %378 = load ptr, ptr %26, align 8, !tbaa !9
  %379 = load i64, ptr %31, align 8, !tbaa !16
  %380 = getelementptr inbounds double, ptr %378, i64 %379
  %381 = load double, ptr %380, align 8, !tbaa !5
  %382 = load ptr, ptr %25, align 8, !tbaa !9
  %383 = load i64, ptr %31, align 8, !tbaa !16
  %384 = getelementptr inbounds double, ptr %382, i64 %383
  %385 = load double, ptr %384, align 8, !tbaa !5
  %386 = fsub double %381, %385
  %387 = fmul double %377, %386
  %388 = load ptr, ptr %23, align 8, !tbaa !9
  %389 = load i64, ptr %31, align 8, !tbaa !16
  %390 = load i64, ptr %32, align 8, !tbaa !16
  %391 = sub nsw i64 %389, %390
  %392 = getelementptr inbounds double, ptr %388, i64 %391
  store double %387, ptr %392, align 8, !tbaa !5
  br label %393

393:                                              ; preds = %376
  %394 = load i64, ptr %31, align 8, !tbaa !16
  %395 = add nsw i64 %394, 1
  store i64 %395, ptr %31, align 8, !tbaa !16
  br label %372, !llvm.loop !29

396:                                              ; preds = %372
  br label %397

397:                                              ; preds = %396
  %398 = load i64, ptr %33, align 8, !tbaa !16
  %399 = load i64, ptr %32, align 8, !tbaa !16
  %400 = add nsw i64 %399, %398
  store i64 %400, ptr %32, align 8, !tbaa !16
  br label %250, !llvm.loop !30

401:                                              ; preds = %250
  br label %402

402:                                              ; preds = %401
  %403 = load i64, ptr %30, align 8, !tbaa !16
  %404 = add nsw i64 %403, 1
  store i64 %404, ptr %30, align 8, !tbaa !16
  br label %127, !llvm.loop !31

405:                                              ; preds = %246, %127
  %406 = load i32, ptr %41, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  ret i32 %406
}

declare ptr @N_VGetArrayPointer(ptr noundef) #3

declare double @N_VWrmsNorm(ptr noundef, ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #4

declare i64 @SUNBandMatrix_Columns(ptr noundef) #3

declare i64 @SUNBandMatrix_UpperBandwidth(ptr noundef) #3

declare i64 @SUNBandMatrix_LowerBandwidth(ptr noundef) #3

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

declare ptr @SUNBandMatrix_Column(ptr noundef, i64 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

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


; 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: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @cvLsBandDQJac(double noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr nocapture noundef readonly %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  %8 = getelementptr inbounds i8, ptr %4, i64 1904
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = tail call i64 @SUNBandMatrix_Columns(ptr noundef %3) #5
  %11 = tail call i64 @SUNBandMatrix_UpperBandwidth(ptr noundef %3) #5
  %12 = tail call i64 @SUNBandMatrix_LowerBandwidth(ptr noundef %3) #5
  %13 = getelementptr inbounds i8, ptr %4, i64 440
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = tail call ptr @N_VGetArrayPointer(ptr noundef %14) #5
  %16 = tail call ptr @N_VGetArrayPointer(ptr noundef %2) #5
  %17 = ptrtoint ptr %16 to i64
  %18 = tail call ptr @N_VGetArrayPointer(ptr noundef %5) #5
  %19 = ptrtoint ptr %18 to i64
  %20 = tail call ptr @N_VGetArrayPointer(ptr noundef %1) #5
  %21 = tail call ptr @N_VGetArrayPointer(ptr noundef %6) #5
  %22 = getelementptr inbounds i8, ptr %4, i64 88
  %23 = load i32, ptr %22, align 8, !tbaa !14
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %28, label %24

24:                                               ; preds = %7
  %25 = getelementptr inbounds i8, ptr %4, i64 504
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = tail call ptr @N_VGetArrayPointer(ptr noundef %26) #5
  br label %28

28:                                               ; preds = %24, %7
  %.0138 = phi ptr [ %27, %24 ], [ null, %7 ]
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %1, ptr noundef %6) #5
  %29 = getelementptr inbounds i8, ptr %4, i64 8
  %30 = load double, ptr %29, align 8, !tbaa !16
  %31 = fcmp ugt double %30, 0.000000e+00
  br i1 %31, label %32, label %34

32:                                               ; preds = %28
  %33 = tail call double @sqrt(double noundef %30) #5
  br label %34

34:                                               ; preds = %28, %32
  %35 = phi double [ %33, %32 ], [ 0.000000e+00, %28 ]
  %36 = load ptr, ptr %13, align 8, !tbaa !13
  %37 = tail call double @N_VWrmsNorm(ptr noundef %2, ptr noundef %36) #5
  %38 = fcmp une double %37, 0.000000e+00
  br i1 %38, label %39, label %49

39:                                               ; preds = %34
  %40 = getelementptr inbounds i8, ptr %4, i64 992
  %41 = load double, ptr %40, align 8, !tbaa !17
  %42 = tail call double @llvm.fabs.f64(double %41)
  %43 = fmul double %42, 1.000000e+03
  %44 = load double, ptr %29, align 8, !tbaa !16
  %45 = fmul double %44, %43
  %46 = sitofp i64 %10 to double
  %47 = fmul double %45, %46
  %48 = fmul double %37, %47
  br label %49

49:                                               ; preds = %34, %39
  %50 = phi double [ %48, %39 ], [ 1.000000e+00, %34 ]
  %51 = add i64 %11, 1
  %52 = add i64 %51, %12
  %53 = tail call i64 @llvm.smin.i64(i64 %52, i64 %10)
  %54 = getelementptr inbounds i8, ptr %4, i64 16
  %.not156172 = icmp slt i64 %53, 1
  br i1 %.not156172, label %._crit_edge176, label %.lr.ph175

.lr.ph175:                                        ; preds = %49
  %55 = getelementptr inbounds i8, ptr %4, i64 1032
  %56 = getelementptr inbounds i8, ptr %4, i64 24
  %57 = getelementptr inbounds i8, ptr %9, i64 128
  %58 = add nsw i64 %10, -1
  %59 = xor i64 %11, -1
  %60 = sub i64 %59, %12
  %61 = shl i64 %60, 3
  br label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge171, %.lr.ph175
  %indvar = phi i64 [ %indvar.next, %._crit_edge171 ], [ 0, %.lr.ph175 ]
  %.0139173 = phi i64 [ %195, %._crit_edge171 ], [ 1, %.lr.ph175 ]
  %62 = add i64 %12, %indvar
  %63 = sub i64 %indvar, %11
  %64 = mul i64 %indvar, -8
  %65 = sub i64 %64, %19
  %66 = sub i64 %64, %17
  %67 = add nsw i64 %.0139173, -1
  %68 = load i32, ptr %22, align 8, !tbaa !14
  %.not160 = icmp eq i32 %68, 0
  br i1 %.not160, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %.0141163.us = phi i64 [ %80, %.lr.ph.split.us ], [ %67, %.lr.ph ]
  %69 = getelementptr inbounds double, ptr %20, i64 %.0141163.us
  %70 = load double, ptr %69, align 8, !tbaa !18
  %71 = tail call double @llvm.fabs.f64(double %70)
  %72 = fmul double %35, %71
  %73 = getelementptr inbounds double, ptr %15, i64 %.0141163.us
  %74 = load double, ptr %73, align 8, !tbaa !18
  %75 = fdiv double %50, %74
  %76 = fcmp ogt double %72, %75
  %..us = select i1 %76, double %72, double %75
  %77 = getelementptr inbounds double, ptr %21, i64 %.0141163.us
  %78 = load double, ptr %77, align 8, !tbaa !18
  %79 = fadd double %..us, %78
  store double %79, ptr %77, align 8, !tbaa !18
  %80 = add nsw i64 %.0141163.us, %52
  %81 = icmp slt i64 %80, %10
  br i1 %81, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !19

.lr.ph.split:                                     ; preds = %.lr.ph, %._crit_edge182
  %.0141163 = phi i64 [ %115, %._crit_edge182 ], [ %67, %.lr.ph ]
  %82 = getelementptr inbounds double, ptr %20, i64 %.0141163
  %83 = load double, ptr %82, align 8, !tbaa !18
  %84 = tail call double @llvm.fabs.f64(double %83)
  %85 = fmul double %35, %84
  %86 = getelementptr inbounds double, ptr %15, i64 %.0141163
  %87 = load double, ptr %86, align 8, !tbaa !18
  %88 = fdiv double %50, %87
  %89 = fcmp ogt double %85, %88
  %. = select i1 %89, double %85, double %88
  %90 = getelementptr inbounds double, ptr %.0138, i64 %.0141163
  %91 = load double, ptr %90, align 8, !tbaa !18
  %92 = tail call double @llvm.fabs.f64(double %91)
  %93 = fcmp oeq double %92, 1.000000e+00
  br i1 %93, label %94, label %102

94:                                               ; preds = %.lr.ph.split
  %95 = getelementptr inbounds double, ptr %21, i64 %.0141163
  %96 = load double, ptr %95, align 8, !tbaa !18
  %97 = fadd double %., %96
  %98 = fmul double %91, %97
  %99 = fcmp olt double %98, 0.000000e+00
  br i1 %99, label %100, label %._crit_edge182

100:                                              ; preds = %94
  %101 = fneg double %.
  br label %._crit_edge182

102:                                              ; preds = %.lr.ph.split
  %103 = fcmp oeq double %92, 2.000000e+00
  %104 = getelementptr inbounds double, ptr %21, i64 %.0141163
  %105 = load double, ptr %104, align 8, !tbaa !18
  br i1 %103, label %106, label %._crit_edge182

106:                                              ; preds = %102
  %107 = fadd double %., %105
  %108 = fmul double %91, %107
  %109 = fcmp ugt double %108, 0.000000e+00
  br i1 %109, label %._crit_edge182, label %110

110:                                              ; preds = %106
  %111 = fneg double %.
  br label %._crit_edge182

._crit_edge182:                                   ; preds = %102, %100, %94, %106, %110
  %112 = phi double [ %96, %100 ], [ %96, %94 ], [ %105, %110 ], [ %105, %106 ], [ %105, %102 ]
  %.0136 = phi double [ %101, %100 ], [ %., %94 ], [ %111, %110 ], [ %., %106 ], [ %., %102 ]
  %113 = getelementptr inbounds double, ptr %21, i64 %.0141163
  %114 = fadd double %.0136, %112
  store double %114, ptr %113, align 8, !tbaa !18
  %115 = add nsw i64 %.0141163, %52
  %116 = icmp slt i64 %115, %10
  br i1 %116, label %.lr.ph.split, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %._crit_edge182, %.lr.ph.split.us
  %117 = load ptr, ptr %54, align 8, !tbaa !21
  %118 = load double, ptr %55, align 8, !tbaa !22
  %119 = load ptr, ptr %56, align 8, !tbaa !23
  %120 = tail call i32 %117(double noundef %118, ptr noundef %6, ptr noundef %5, ptr noundef %119) #5
  %121 = load i64, ptr %57, align 8, !tbaa !24
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %57, align 8, !tbaa !24
  %.not157 = icmp eq i32 %120, 0
  br i1 %.not157, label %.lr.ph170, label %._crit_edge176

.lr.ph170:                                        ; preds = %._crit_edge, %._crit_edge168
  %indvar185 = phi i64 [ %indvar.next186, %._crit_edge168 ], [ 0, %._crit_edge ]
  %.1142169 = phi i64 [ %193, %._crit_edge168 ], [ %67, %._crit_edge ]
  %123 = mul i64 %52, %indvar185
  %124 = add i64 %62, %123
  %smin = tail call i64 @llvm.smin.i64(i64 %124, i64 %58)
  %125 = add i64 %smin, 1
  %126 = add i64 %63, %123
  %smax = tail call i64 @llvm.smax.i64(i64 %126, i64 0)
  %127 = sub i64 %125, %smax
  %128 = mul i64 %61, %indvar185
  %129 = add i64 %65, %128
  %130 = add i64 %66, %128
  %131 = getelementptr inbounds double, ptr %20, i64 %.1142169
  %132 = load double, ptr %131, align 8, !tbaa !18
  %133 = getelementptr inbounds double, ptr %21, i64 %.1142169
  store double %132, ptr %133, align 8, !tbaa !18
  %134 = tail call ptr @SUNBandMatrix_Column(ptr noundef %3, i64 noundef %.1142169) #5
  %135 = ptrtoint ptr %134 to i64
  %136 = load double, ptr %131, align 8, !tbaa !18
  %137 = tail call double @llvm.fabs.f64(double %136)
  %138 = fmul double %35, %137
  %139 = getelementptr inbounds double, ptr %15, i64 %.1142169
  %140 = load double, ptr %139, align 8, !tbaa !18
  %141 = fdiv double %50, %140
  %142 = fcmp ogt double %138, %141
  %.161 = select i1 %142, double %138, double %141
  %143 = load i32, ptr %22, align 8, !tbaa !14
  %.not158 = icmp eq i32 %143, 0
  br i1 %.not158, label %165, label %144

144:                                              ; preds = %.lr.ph170
  %145 = getelementptr inbounds double, ptr %.0138, i64 %.1142169
  %146 = load double, ptr %145, align 8, !tbaa !18
  %147 = tail call double @llvm.fabs.f64(double %146)
  %148 = fcmp oeq double %147, 1.000000e+00
  br i1 %148, label %149, label %156

149:                                              ; preds = %144
  %150 = load double, ptr %133, align 8, !tbaa !18
  %151 = fadd double %.161, %150
  %152 = fmul double %146, %151
  %153 = fcmp olt double %152, 0.000000e+00
  br i1 %153, label %154, label %165

154:                                              ; preds = %149
  %155 = fneg double %.161
  br label %165

156:                                              ; preds = %144
  %157 = fcmp oeq double %147, 2.000000e+00
  br i1 %157, label %158, label %165

158:                                              ; preds = %156
  %159 = load double, ptr %133, align 8, !tbaa !18
  %160 = fadd double %.161, %159
  %161 = fmul double %146, %160
  %162 = fcmp ugt double %161, 0.000000e+00
  br i1 %162, label %165, label %163

163:                                              ; preds = %158
  %164 = fneg double %.161
  br label %165

165:                                              ; preds = %154, %149, %158, %163, %156, %.lr.ph170
  %.1137 = phi double [ %155, %154 ], [ %.161, %149 ], [ %164, %163 ], [ %.161, %158 ], [ %.161, %156 ], [ %.161, %.lr.ph170 ]
  %166 = fdiv double 1.000000e+00, %.1137
  %167 = sub nsw i64 %.1142169, %11
  %168 = tail call i64 @llvm.smax.i64(i64 %167, i64 0)
  %169 = add nsw i64 %.1142169, %12
  %.162 = tail call i64 @llvm.smin.i64(i64 %169, i64 %58)
  %.not159164 = icmp sgt i64 %168, %.162
  br i1 %.not159164, label %._crit_edge168, label %.lr.ph167.preheader

.lr.ph167.preheader:                              ; preds = %165
  %min.iters.check = icmp ult i64 %127, 4
  br i1 %min.iters.check, label %.lr.ph167.preheader191, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph167.preheader
  %170 = add i64 %129, %135
  %diff.check = icmp ult i64 %170, 32
  %171 = add i64 %130, %135
  %diff.check187 = icmp ult i64 %171, 32
  %conflict.rdx = or i1 %diff.check, %diff.check187
  br i1 %conflict.rdx, label %.lr.ph167.preheader191, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %127, -4
  %ind.end = add i64 %168, %n.vec
  %broadcast.splatinsert = insertelement <2 x double> poison, double %166, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %168, %index
  %172 = getelementptr inbounds double, ptr %18, i64 %offset.idx
  %173 = getelementptr inbounds i8, ptr %172, i64 16
  %wide.load = load <2 x double>, ptr %172, align 8, !tbaa !18
  %wide.load188 = load <2 x double>, ptr %173, align 8, !tbaa !18
  %174 = getelementptr inbounds double, ptr %16, i64 %offset.idx
  %175 = getelementptr inbounds i8, ptr %174, i64 16
  %wide.load189 = load <2 x double>, ptr %174, align 8, !tbaa !18
  %wide.load190 = load <2 x double>, ptr %175, align 8, !tbaa !18
  %176 = fsub <2 x double> %wide.load, %wide.load189
  %177 = fsub <2 x double> %wide.load188, %wide.load190
  %178 = fmul <2 x double> %broadcast.splat, %176
  %179 = fmul <2 x double> %broadcast.splat, %177
  %180 = sub nsw i64 %offset.idx, %.1142169
  %181 = getelementptr inbounds double, ptr %134, i64 %180
  %182 = getelementptr inbounds i8, ptr %181, i64 16
  store <2 x double> %178, ptr %181, align 8, !tbaa !18
  store <2 x double> %179, ptr %182, align 8, !tbaa !18
  %index.next = add nuw i64 %index, 4
  %183 = icmp eq i64 %index.next, %n.vec
  br i1 %183, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %127, %n.vec
  br i1 %cmp.n, label %._crit_edge168, label %.lr.ph167.preheader191

.lr.ph167.preheader191:                           ; preds = %middle.block, %vector.memcheck, %.lr.ph167.preheader
  %.0140165.ph = phi i64 [ %168, %vector.memcheck ], [ %168, %.lr.ph167.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph167

.lr.ph167:                                        ; preds = %.lr.ph167.preheader191, %.lr.ph167
  %.0140165 = phi i64 [ %192, %.lr.ph167 ], [ %.0140165.ph, %.lr.ph167.preheader191 ]
  %184 = getelementptr inbounds double, ptr %18, i64 %.0140165
  %185 = load double, ptr %184, align 8, !tbaa !18
  %186 = getelementptr inbounds double, ptr %16, i64 %.0140165
  %187 = load double, ptr %186, align 8, !tbaa !18
  %188 = fsub double %185, %187
  %189 = fmul double %166, %188
  %190 = sub nsw i64 %.0140165, %.1142169
  %191 = getelementptr inbounds double, ptr %134, i64 %190
  store double %189, ptr %191, align 8, !tbaa !18
  %192 = add nuw nsw i64 %.0140165, 1
  %.not159.not = icmp slt i64 %.0140165, %.162
  br i1 %.not159.not, label %.lr.ph167, label %._crit_edge168, !llvm.loop !29

._crit_edge168:                                   ; preds = %.lr.ph167, %middle.block, %165
  %193 = add nsw i64 %.1142169, %52
  %194 = icmp slt i64 %193, %10
  %indvar.next186 = add i64 %indvar185, 1
  br i1 %194, label %.lr.ph170, label %._crit_edge171, !llvm.loop !30

._crit_edge171:                                   ; preds = %._crit_edge168
  %195 = add nuw i64 %.0139173, 1
  %exitcond.not = icmp eq i64 %.0139173, %53
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond.not, label %._crit_edge176, label %.lr.ph, !llvm.loop !31

._crit_edge176:                                   ; preds = %._crit_edge171, %._crit_edge, %49
  %.1 = phi i32 [ 0, %49 ], [ %120, %._crit_edge ], [ 0, %._crit_edge171 ]
  ret i32 %.1
}

declare ptr @N_VGetArrayPointer(ptr noundef) local_unnamed_addr #2

declare double @N_VWrmsNorm(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #3

declare i64 @SUNBandMatrix_Columns(ptr noundef) local_unnamed_addr #2

declare i64 @SUNBandMatrix_UpperBandwidth(ptr noundef) local_unnamed_addr #2

declare i64 @SUNBandMatrix_LowerBandwidth(ptr noundef) local_unnamed_addr #2

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

declare ptr @SUNBandMatrix_Column(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #4

attributes #0 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass