; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/benchmarks/nvector (test_nvector_performance)

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

@print_time = external dso_local global i32, align 4
@nextra = external dso_local global i32, align 4
@.str.38 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

declare void @N_VRand(ptr noundef, i64 noundef, double noundef, double noundef) #2

declare void @ClearCache(...) #2

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

declare void @sync_device(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @time_stats(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nounwind
declare i32 @rand() #4

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

; 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

; Function Attrs: nounwind uwtable
define dso_local i32 @Test_N_VLinearCombination(ptr noundef %0, i64 noundef %1, i32 noundef %2, i32 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca double, 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 double, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !11
  store i32 %3, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  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 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, 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
  %26 = load i32, ptr %8, align 4, !tbaa !11
  %27 = load i32, ptr @nextra, align 4, !tbaa !11
  %28 = add nsw i32 %26, %27
  %29 = sext i32 %28 to i64
  %30 = mul i64 %29, 8
  %31 = call noalias ptr @malloc(i64 noundef %30) #6
  store ptr %31, ptr %19, align 8, !tbaa !5
  %32 = load i32, ptr %8, align 4, !tbaa !11
  %33 = load i32, ptr @nextra, align 4, !tbaa !11
  %34 = add nsw i32 %32, %33
  %35 = sext i32 %34 to i64
  %36 = mul i64 %35, 8
  %37 = call noalias ptr @malloc(i64 noundef %36) #6
  store ptr %37, ptr %20, align 8, !tbaa !5
  %38 = load i32, ptr %7, align 4, !tbaa !11
  %39 = sext i32 %38 to i64
  %40 = mul i64 %39, 8
  %41 = call noalias ptr @malloc(i64 noundef %40) #6
  store ptr %41, ptr %24, align 8, !tbaa !5
  %42 = load i32, ptr %7, align 4, !tbaa !11
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = call ptr @N_VCloneVectorArray(i32 noundef %42, ptr noundef %43)
  store ptr %44, ptr %25, align 8, !tbaa !5
  %45 = load ptr, ptr %24, align 8, !tbaa !5
  %46 = getelementptr inbounds double, ptr %45, i64 0
  store double 1.000000e+00, ptr %46, align 8, !tbaa !13
  %47 = load ptr, ptr %25, align 8, !tbaa !5
  %48 = getelementptr inbounds ptr, ptr %47, i64 0
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %49, i64 noundef %50, double noundef -1.000000e+00, double noundef 1.000000e+00)
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %51

51:                                               ; preds = %70, %4
  %52 = load i32, ptr %22, align 4, !tbaa !11
  %53 = load i32, ptr %7, align 4, !tbaa !11
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %55, label %73

55:                                               ; preds = %51
  %56 = load ptr, ptr %25, align 8, !tbaa !5
  %57 = load i32, ptr %22, align 4, !tbaa !11
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds ptr, ptr %56, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %60, i64 noundef %61, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %62 = call i32 @rand() #5
  %63 = sitofp i32 %62 to double
  %64 = fdiv double %63, 0x41DFFFFFFFC00000
  %65 = fadd double %64, 1.000000e+00
  %66 = load ptr, ptr %24, align 8, !tbaa !5
  %67 = load i32, ptr %22, align 4, !tbaa !11
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds double, ptr %66, i64 %68
  store double %65, ptr %69, align 8, !tbaa !13
  br label %70

70:                                               ; preds = %55
  %71 = load i32, ptr %22, align 4, !tbaa !11
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %22, align 4, !tbaa !11
  br label %51, !llvm.loop !15

73:                                               ; preds = %51
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %74

74:                                               ; preds = %130, %73
  %75 = load i32, ptr %21, align 4, !tbaa !11
  %76 = load i32, ptr %8, align 4, !tbaa !11
  %77 = load i32, ptr @nextra, align 4, !tbaa !11
  %78 = add nsw i32 %76, %77
  %79 = icmp slt i32 %75, %78
  br i1 %79, label %80, label %133

80:                                               ; preds = %74
  %81 = load i32, ptr %7, align 4, !tbaa !11
  %82 = icmp eq i32 %81, 1
  br i1 %82, label %83, label %93

83:                                               ; preds = %80
  call void (...) @ClearCache()
  %84 = call double @get_time()
  store double %84, ptr %9, align 8, !tbaa !13
  %85 = load ptr, ptr %25, align 8, !tbaa !5
  %86 = getelementptr inbounds ptr, ptr %85, i64 0
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = load ptr, ptr %25, align 8, !tbaa !5
  %89 = getelementptr inbounds ptr, ptr %88, i64 0
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  call void @N_VScale(double noundef 1.000000e+00, ptr noundef %87, ptr noundef %90)
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %91)
  %92 = call double @get_time()
  store double %92, ptr %10, align 8, !tbaa !13
  br label %122

93:                                               ; preds = %80
  call void (...) @ClearCache()
  %94 = call double @get_time()
  store double %94, ptr %9, align 8, !tbaa !13
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %95

95:                                               ; preds = %116, %93
  %96 = load i32, ptr %22, align 4, !tbaa !11
  %97 = load i32, ptr %7, align 4, !tbaa !11
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %99, label %119

99:                                               ; preds = %95
  %100 = load ptr, ptr %25, align 8, !tbaa !5
  %101 = getelementptr inbounds ptr, ptr %100, i64 0
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = load ptr, ptr %24, align 8, !tbaa !5
  %104 = load i32, ptr %22, align 4, !tbaa !11
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %103, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !13
  %108 = load ptr, ptr %25, align 8, !tbaa !5
  %109 = load i32, ptr %22, align 4, !tbaa !11
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = load ptr, ptr %25, align 8, !tbaa !5
  %114 = getelementptr inbounds ptr, ptr %113, i64 0
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %102, double noundef %107, ptr noundef %112, ptr noundef %115)
  br label %116

116:                                              ; preds = %99
  %117 = load i32, ptr %22, align 4, !tbaa !11
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %22, align 4, !tbaa !11
  br label %95, !llvm.loop !17

119:                                              ; preds = %95
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %120)
  %121 = call double @get_time()
  store double %121, ptr %10, align 8, !tbaa !13
  br label %122

122:                                              ; preds = %119, %83
  %123 = load double, ptr %10, align 8, !tbaa !13
  %124 = load double, ptr %9, align 8, !tbaa !13
  %125 = fsub double %123, %124
  %126 = load ptr, ptr %20, align 8, !tbaa !5
  %127 = load i32, ptr %21, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds double, ptr %126, i64 %128
  store double %125, ptr %129, align 8, !tbaa !13
  br label %130

130:                                              ; preds = %122
  %131 = load i32, ptr %21, align 4, !tbaa !11
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %21, align 4, !tbaa !11
  br label %74, !llvm.loop !18

133:                                              ; preds = %74
  %134 = load ptr, ptr %24, align 8, !tbaa !5
  %135 = getelementptr inbounds double, ptr %134, i64 0
  store double 1.000000e+00, ptr %135, align 8, !tbaa !13
  %136 = load ptr, ptr %25, align 8, !tbaa !5
  %137 = getelementptr inbounds ptr, ptr %136, i64 0
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %138, i64 noundef %139, double noundef -1.000000e+00, double noundef 1.000000e+00)
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %140

140:                                              ; preds = %159, %133
  %141 = load i32, ptr %22, align 4, !tbaa !11
  %142 = load i32, ptr %7, align 4, !tbaa !11
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %144, label %162

144:                                              ; preds = %140
  %145 = load ptr, ptr %25, align 8, !tbaa !5
  %146 = load i32, ptr %22, align 4, !tbaa !11
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds ptr, ptr %145, i64 %147
  %149 = load ptr, ptr %148, align 8, !tbaa !5
  %150 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %149, i64 noundef %150, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %151 = call i32 @rand() #5
  %152 = sitofp i32 %151 to double
  %153 = fdiv double %152, 0x41DFFFFFFFC00000
  %154 = fadd double %153, 1.000000e+00
  %155 = load ptr, ptr %24, align 8, !tbaa !5
  %156 = load i32, ptr %22, align 4, !tbaa !11
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds double, ptr %155, i64 %157
  store double %154, ptr %158, align 8, !tbaa !13
  br label %159

159:                                              ; preds = %144
  %160 = load i32, ptr %22, align 4, !tbaa !11
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %22, align 4, !tbaa !11
  br label %140, !llvm.loop !19

162:                                              ; preds = %140
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %163

163:                                              ; preds = %187, %162
  %164 = load i32, ptr %21, align 4, !tbaa !11
  %165 = load i32, ptr %8, align 4, !tbaa !11
  %166 = load i32, ptr @nextra, align 4, !tbaa !11
  %167 = add nsw i32 %165, %166
  %168 = icmp slt i32 %164, %167
  br i1 %168, label %169, label %190

169:                                              ; preds = %163
  call void (...) @ClearCache()
  %170 = call double @get_time()
  store double %170, ptr %9, align 8, !tbaa !13
  %171 = load i32, ptr %7, align 4, !tbaa !11
  %172 = load ptr, ptr %24, align 8, !tbaa !5
  %173 = load ptr, ptr %25, align 8, !tbaa !5
  %174 = load ptr, ptr %25, align 8, !tbaa !5
  %175 = getelementptr inbounds ptr, ptr %174, i64 0
  %176 = load ptr, ptr %175, align 8, !tbaa !5
  %177 = call i32 @N_VLinearCombination(i32 noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef %176)
  store i32 %177, ptr %23, align 4, !tbaa !11
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %178)
  %179 = call double @get_time()
  store double %179, ptr %10, align 8, !tbaa !13
  %180 = load double, ptr %10, align 8, !tbaa !13
  %181 = load double, ptr %9, align 8, !tbaa !13
  %182 = fsub double %180, %181
  %183 = load ptr, ptr %19, align 8, !tbaa !5
  %184 = load i32, ptr %21, align 4, !tbaa !11
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds double, ptr %183, i64 %185
  store double %182, ptr %186, align 8, !tbaa !13
  br label %187

187:                                              ; preds = %169
  %188 = load i32, ptr %21, align 4, !tbaa !11
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %21, align 4, !tbaa !11
  br label %163, !llvm.loop !20

190:                                              ; preds = %163
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = load ptr, ptr %19, align 8, !tbaa !5
  %193 = load i32, ptr @nextra, align 4, !tbaa !11
  %194 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %191, ptr noundef %192, i32 noundef %193, i32 noundef %194, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14)
  %195 = load ptr, ptr %5, align 8, !tbaa !5
  %196 = load ptr, ptr %20, align 8, !tbaa !5
  %197 = load i32, ptr @nextra, align 4, !tbaa !11
  %198 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %195, ptr noundef %196, i32 noundef %197, i32 noundef %198, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %199 = load i32, ptr @print_time, align 4, !tbaa !11
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %211

201:                                              ; preds = %190
  %202 = load double, ptr %11, align 8, !tbaa !13
  %203 = load double, ptr %12, align 8, !tbaa !13
  %204 = load double, ptr %13, align 8, !tbaa !13
  %205 = load double, ptr %14, align 8, !tbaa !13
  %206 = load double, ptr %15, align 8, !tbaa !13
  %207 = load double, ptr %16, align 8, !tbaa !13
  %208 = load double, ptr %17, align 8, !tbaa !13
  %209 = load double, ptr %18, align 8, !tbaa !13
  %210 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef @.str.39, double noundef %202, double noundef %203, double noundef %204, double noundef %205, double noundef %206, double noundef %207, double noundef %208, double noundef %209)
  br label %211

211:                                              ; preds = %201, %190
  %212 = call i32 @rand() #5
  %213 = sitofp i32 %212 to double
  %214 = fdiv double %213, 0x41DFFFFFFFC00000
  %215 = fadd double %214, 1.000000e+00
  %216 = load ptr, ptr %24, align 8, !tbaa !5
  %217 = getelementptr inbounds double, ptr %216, i64 0
  store double %215, ptr %217, align 8, !tbaa !13
  %218 = load ptr, ptr %25, align 8, !tbaa !5
  %219 = getelementptr inbounds ptr, ptr %218, i64 0
  %220 = load ptr, ptr %219, align 8, !tbaa !5
  %221 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %220, i64 noundef %221, double noundef -1.000000e+00, double noundef 1.000000e+00)
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %222

222:                                              ; preds = %241, %211
  %223 = load i32, ptr %22, align 4, !tbaa !11
  %224 = load i32, ptr %7, align 4, !tbaa !11
  %225 = icmp slt i32 %223, %224
  br i1 %225, label %226, label %244

226:                                              ; preds = %222
  %227 = load ptr, ptr %25, align 8, !tbaa !5
  %228 = load i32, ptr %22, align 4, !tbaa !11
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds ptr, ptr %227, i64 %229
  %231 = load ptr, ptr %230, align 8, !tbaa !5
  %232 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %231, i64 noundef %232, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %233 = call i32 @rand() #5
  %234 = sitofp i32 %233 to double
  %235 = fdiv double %234, 0x41DFFFFFFFC00000
  %236 = fadd double %235, 1.000000e+00
  %237 = load ptr, ptr %24, align 8, !tbaa !5
  %238 = load i32, ptr %22, align 4, !tbaa !11
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds double, ptr %237, i64 %239
  store double %236, ptr %240, align 8, !tbaa !13
  br label %241

241:                                              ; preds = %226
  %242 = load i32, ptr %22, align 4, !tbaa !11
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %22, align 4, !tbaa !11
  br label %222, !llvm.loop !21

244:                                              ; preds = %222
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %245

245:                                              ; preds = %313, %244
  %246 = load i32, ptr %21, align 4, !tbaa !11
  %247 = load i32, ptr %8, align 4, !tbaa !11
  %248 = load i32, ptr @nextra, align 4, !tbaa !11
  %249 = add nsw i32 %247, %248
  %250 = icmp slt i32 %246, %249
  br i1 %250, label %251, label %316

251:                                              ; preds = %245
  %252 = load i32, ptr %7, align 4, !tbaa !11
  %253 = icmp eq i32 %252, 1
  br i1 %253, label %254, label %267

254:                                              ; preds = %251
  call void (...) @ClearCache()
  %255 = call double @get_time()
  store double %255, ptr %9, align 8, !tbaa !13
  %256 = load ptr, ptr %24, align 8, !tbaa !5
  %257 = getelementptr inbounds double, ptr %256, i64 0
  %258 = load double, ptr %257, align 8, !tbaa !13
  %259 = load ptr, ptr %25, align 8, !tbaa !5
  %260 = getelementptr inbounds ptr, ptr %259, i64 0
  %261 = load ptr, ptr %260, align 8, !tbaa !5
  %262 = load ptr, ptr %25, align 8, !tbaa !5
  %263 = getelementptr inbounds ptr, ptr %262, i64 0
  %264 = load ptr, ptr %263, align 8, !tbaa !5
  call void @N_VScale(double noundef %258, ptr noundef %261, ptr noundef %264)
  %265 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %265)
  %266 = call double @get_time()
  store double %266, ptr %10, align 8, !tbaa !13
  br label %305

267:                                              ; preds = %251
  call void (...) @ClearCache()
  %268 = call double @get_time()
  store double %268, ptr %9, align 8, !tbaa !13
  %269 = load ptr, ptr %24, align 8, !tbaa !5
  %270 = getelementptr inbounds double, ptr %269, i64 0
  %271 = load double, ptr %270, align 8, !tbaa !13
  %272 = load ptr, ptr %25, align 8, !tbaa !5
  %273 = getelementptr inbounds ptr, ptr %272, i64 0
  %274 = load ptr, ptr %273, align 8, !tbaa !5
  %275 = load ptr, ptr %25, align 8, !tbaa !5
  %276 = getelementptr inbounds ptr, ptr %275, i64 0
  %277 = load ptr, ptr %276, align 8, !tbaa !5
  call void @N_VScale(double noundef %271, ptr noundef %274, ptr noundef %277)
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %278

278:                                              ; preds = %299, %267
  %279 = load i32, ptr %22, align 4, !tbaa !11
  %280 = load i32, ptr %7, align 4, !tbaa !11
  %281 = icmp slt i32 %279, %280
  br i1 %281, label %282, label %302

282:                                              ; preds = %278
  %283 = load ptr, ptr %25, align 8, !tbaa !5
  %284 = getelementptr inbounds ptr, ptr %283, i64 0
  %285 = load ptr, ptr %284, align 8, !tbaa !5
  %286 = load ptr, ptr %24, align 8, !tbaa !5
  %287 = load i32, ptr %22, align 4, !tbaa !11
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds double, ptr %286, i64 %288
  %290 = load double, ptr %289, align 8, !tbaa !13
  %291 = load ptr, ptr %25, align 8, !tbaa !5
  %292 = load i32, ptr %22, align 4, !tbaa !11
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds ptr, ptr %291, i64 %293
  %295 = load ptr, ptr %294, align 8, !tbaa !5
  %296 = load ptr, ptr %25, align 8, !tbaa !5
  %297 = getelementptr inbounds ptr, ptr %296, i64 0
  %298 = load ptr, ptr %297, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %285, double noundef %290, ptr noundef %295, ptr noundef %298)
  br label %299

299:                                              ; preds = %282
  %300 = load i32, ptr %22, align 4, !tbaa !11
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %22, align 4, !tbaa !11
  br label %278, !llvm.loop !22

302:                                              ; preds = %278
  %303 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %303)
  %304 = call double @get_time()
  store double %304, ptr %10, align 8, !tbaa !13
  br label %305

305:                                              ; preds = %302, %254
  %306 = load double, ptr %10, align 8, !tbaa !13
  %307 = load double, ptr %9, align 8, !tbaa !13
  %308 = fsub double %306, %307
  %309 = load ptr, ptr %20, align 8, !tbaa !5
  %310 = load i32, ptr %21, align 4, !tbaa !11
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds double, ptr %309, i64 %311
  store double %308, ptr %312, align 8, !tbaa !13
  br label %313

313:                                              ; preds = %305
  %314 = load i32, ptr %21, align 4, !tbaa !11
  %315 = add nsw i32 %314, 1
  store i32 %315, ptr %21, align 4, !tbaa !11
  br label %245, !llvm.loop !23

316:                                              ; preds = %245
  %317 = call i32 @rand() #5
  %318 = sitofp i32 %317 to double
  %319 = fdiv double %318, 0x41DFFFFFFFC00000
  %320 = fadd double %319, 1.000000e+00
  %321 = load ptr, ptr %24, align 8, !tbaa !5
  %322 = getelementptr inbounds double, ptr %321, i64 0
  store double %320, ptr %322, align 8, !tbaa !13
  %323 = load ptr, ptr %25, align 8, !tbaa !5
  %324 = getelementptr inbounds ptr, ptr %323, i64 0
  %325 = load ptr, ptr %324, align 8, !tbaa !5
  %326 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %325, i64 noundef %326, double noundef -1.000000e+00, double noundef 1.000000e+00)
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %327

327:                                              ; preds = %346, %316
  %328 = load i32, ptr %22, align 4, !tbaa !11
  %329 = load i32, ptr %7, align 4, !tbaa !11
  %330 = icmp slt i32 %328, %329
  br i1 %330, label %331, label %349

331:                                              ; preds = %327
  %332 = load ptr, ptr %25, align 8, !tbaa !5
  %333 = load i32, ptr %22, align 4, !tbaa !11
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds ptr, ptr %332, i64 %334
  %336 = load ptr, ptr %335, align 8, !tbaa !5
  %337 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %336, i64 noundef %337, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %338 = call i32 @rand() #5
  %339 = sitofp i32 %338 to double
  %340 = fdiv double %339, 0x41DFFFFFFFC00000
  %341 = fadd double %340, 1.000000e+00
  %342 = load ptr, ptr %24, align 8, !tbaa !5
  %343 = load i32, ptr %22, align 4, !tbaa !11
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds double, ptr %342, i64 %344
  store double %341, ptr %345, align 8, !tbaa !13
  br label %346

346:                                              ; preds = %331
  %347 = load i32, ptr %22, align 4, !tbaa !11
  %348 = add nsw i32 %347, 1
  store i32 %348, ptr %22, align 4, !tbaa !11
  br label %327, !llvm.loop !24

349:                                              ; preds = %327
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %350

350:                                              ; preds = %374, %349
  %351 = load i32, ptr %21, align 4, !tbaa !11
  %352 = load i32, ptr %8, align 4, !tbaa !11
  %353 = load i32, ptr @nextra, align 4, !tbaa !11
  %354 = add nsw i32 %352, %353
  %355 = icmp slt i32 %351, %354
  br i1 %355, label %356, label %377

356:                                              ; preds = %350
  call void (...) @ClearCache()
  %357 = call double @get_time()
  store double %357, ptr %9, align 8, !tbaa !13
  %358 = load i32, ptr %7, align 4, !tbaa !11
  %359 = load ptr, ptr %24, align 8, !tbaa !5
  %360 = load ptr, ptr %25, align 8, !tbaa !5
  %361 = load ptr, ptr %25, align 8, !tbaa !5
  %362 = getelementptr inbounds ptr, ptr %361, i64 0
  %363 = load ptr, ptr %362, align 8, !tbaa !5
  %364 = call i32 @N_VLinearCombination(i32 noundef %358, ptr noundef %359, ptr noundef %360, ptr noundef %363)
  store i32 %364, ptr %23, align 4, !tbaa !11
  %365 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %365)
  %366 = call double @get_time()
  store double %366, ptr %10, align 8, !tbaa !13
  %367 = load double, ptr %10, align 8, !tbaa !13
  %368 = load double, ptr %9, align 8, !tbaa !13
  %369 = fsub double %367, %368
  %370 = load ptr, ptr %19, align 8, !tbaa !5
  %371 = load i32, ptr %21, align 4, !tbaa !11
  %372 = sext i32 %371 to i64
  %373 = getelementptr inbounds double, ptr %370, i64 %372
  store double %369, ptr %373, align 8, !tbaa !13
  br label %374

374:                                              ; preds = %356
  %375 = load i32, ptr %21, align 4, !tbaa !11
  %376 = add nsw i32 %375, 1
  store i32 %376, ptr %21, align 4, !tbaa !11
  br label %350, !llvm.loop !25

377:                                              ; preds = %350
  %378 = load ptr, ptr %5, align 8, !tbaa !5
  %379 = load ptr, ptr %19, align 8, !tbaa !5
  %380 = load i32, ptr @nextra, align 4, !tbaa !11
  %381 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %378, ptr noundef %379, i32 noundef %380, i32 noundef %381, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14)
  %382 = load ptr, ptr %5, align 8, !tbaa !5
  %383 = load ptr, ptr %20, align 8, !tbaa !5
  %384 = load i32, ptr @nextra, align 4, !tbaa !11
  %385 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %382, ptr noundef %383, i32 noundef %384, i32 noundef %385, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %386 = load i32, ptr @print_time, align 4, !tbaa !11
  %387 = icmp ne i32 %386, 0
  br i1 %387, label %388, label %398

388:                                              ; preds = %377
  %389 = load double, ptr %11, align 8, !tbaa !13
  %390 = load double, ptr %12, align 8, !tbaa !13
  %391 = load double, ptr %13, align 8, !tbaa !13
  %392 = load double, ptr %14, align 8, !tbaa !13
  %393 = load double, ptr %15, align 8, !tbaa !13
  %394 = load double, ptr %16, align 8, !tbaa !13
  %395 = load double, ptr %17, align 8, !tbaa !13
  %396 = load double, ptr %18, align 8, !tbaa !13
  %397 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef @.str.40, double noundef %389, double noundef %390, double noundef %391, double noundef %392, double noundef %393, double noundef %394, double noundef %395, double noundef %396)
  br label %398

398:                                              ; preds = %388, %377
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %399

399:                                              ; preds = %418, %398
  %400 = load i32, ptr %22, align 4, !tbaa !11
  %401 = load i32, ptr %7, align 4, !tbaa !11
  %402 = icmp slt i32 %400, %401
  br i1 %402, label %403, label %421

403:                                              ; preds = %399
  %404 = load ptr, ptr %25, align 8, !tbaa !5
  %405 = load i32, ptr %22, align 4, !tbaa !11
  %406 = sext i32 %405 to i64
  %407 = getelementptr inbounds ptr, ptr %404, i64 %406
  %408 = load ptr, ptr %407, align 8, !tbaa !5
  %409 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %408, i64 noundef %409, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %410 = call i32 @rand() #5
  %411 = sitofp i32 %410 to double
  %412 = fdiv double %411, 0x41DFFFFFFFC00000
  %413 = fadd double %412, 1.000000e+00
  %414 = load ptr, ptr %24, align 8, !tbaa !5
  %415 = load i32, ptr %22, align 4, !tbaa !11
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds double, ptr %414, i64 %416
  store double %413, ptr %417, align 8, !tbaa !13
  br label %418

418:                                              ; preds = %403
  %419 = load i32, ptr %22, align 4, !tbaa !11
  %420 = add nsw i32 %419, 1
  store i32 %420, ptr %22, align 4, !tbaa !11
  br label %399, !llvm.loop !26

421:                                              ; preds = %399
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %422

422:                                              ; preds = %486, %421
  %423 = load i32, ptr %21, align 4, !tbaa !11
  %424 = load i32, ptr %8, align 4, !tbaa !11
  %425 = load i32, ptr @nextra, align 4, !tbaa !11
  %426 = add nsw i32 %424, %425
  %427 = icmp slt i32 %423, %426
  br i1 %427, label %428, label %489

428:                                              ; preds = %422
  %429 = load i32, ptr %7, align 4, !tbaa !11
  %430 = icmp eq i32 %429, 1
  br i1 %430, label %431, label %444

431:                                              ; preds = %428
  call void (...) @ClearCache()
  %432 = call double @get_time()
  store double %432, ptr %9, align 8, !tbaa !13
  %433 = load ptr, ptr %24, align 8, !tbaa !5
  %434 = getelementptr inbounds double, ptr %433, i64 0
  %435 = load double, ptr %434, align 8, !tbaa !13
  %436 = load ptr, ptr %25, align 8, !tbaa !5
  %437 = getelementptr inbounds ptr, ptr %436, i64 0
  %438 = load ptr, ptr %437, align 8, !tbaa !5
  %439 = load ptr, ptr %25, align 8, !tbaa !5
  %440 = getelementptr inbounds ptr, ptr %439, i64 0
  %441 = load ptr, ptr %440, align 8, !tbaa !5
  call void @N_VScale(double noundef %435, ptr noundef %438, ptr noundef %441)
  %442 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %442)
  %443 = call double @get_time()
  store double %443, ptr %10, align 8, !tbaa !13
  br label %478

444:                                              ; preds = %428
  call void (...) @ClearCache()
  %445 = call double @get_time()
  store double %445, ptr %9, align 8, !tbaa !13
  %446 = load ptr, ptr %24, align 8, !tbaa !5
  %447 = getelementptr inbounds double, ptr %446, i64 0
  %448 = load double, ptr %447, align 8, !tbaa !13
  %449 = load ptr, ptr %25, align 8, !tbaa !5
  %450 = getelementptr inbounds ptr, ptr %449, i64 0
  %451 = load ptr, ptr %450, align 8, !tbaa !5
  %452 = load ptr, ptr %5, align 8, !tbaa !5
  call void @N_VScale(double noundef %448, ptr noundef %451, ptr noundef %452)
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %453

453:                                              ; preds = %472, %444
  %454 = load i32, ptr %22, align 4, !tbaa !11
  %455 = load i32, ptr %7, align 4, !tbaa !11
  %456 = icmp slt i32 %454, %455
  br i1 %456, label %457, label %475

457:                                              ; preds = %453
  %458 = load ptr, ptr %25, align 8, !tbaa !5
  %459 = getelementptr inbounds ptr, ptr %458, i64 0
  %460 = load ptr, ptr %459, align 8, !tbaa !5
  %461 = load ptr, ptr %24, align 8, !tbaa !5
  %462 = load i32, ptr %22, align 4, !tbaa !11
  %463 = sext i32 %462 to i64
  %464 = getelementptr inbounds double, ptr %461, i64 %463
  %465 = load double, ptr %464, align 8, !tbaa !13
  %466 = load ptr, ptr %25, align 8, !tbaa !5
  %467 = load i32, ptr %22, align 4, !tbaa !11
  %468 = sext i32 %467 to i64
  %469 = getelementptr inbounds ptr, ptr %466, i64 %468
  %470 = load ptr, ptr %469, align 8, !tbaa !5
  %471 = load ptr, ptr %5, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %460, double noundef %465, ptr noundef %470, ptr noundef %471)
  br label %472

472:                                              ; preds = %457
  %473 = load i32, ptr %22, align 4, !tbaa !11
  %474 = add nsw i32 %473, 1
  store i32 %474, ptr %22, align 4, !tbaa !11
  br label %453, !llvm.loop !27

475:                                              ; preds = %453
  %476 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %476)
  %477 = call double @get_time()
  store double %477, ptr %10, align 8, !tbaa !13
  br label %478

478:                                              ; preds = %475, %431
  %479 = load double, ptr %10, align 8, !tbaa !13
  %480 = load double, ptr %9, align 8, !tbaa !13
  %481 = fsub double %479, %480
  %482 = load ptr, ptr %20, align 8, !tbaa !5
  %483 = load i32, ptr %21, align 4, !tbaa !11
  %484 = sext i32 %483 to i64
  %485 = getelementptr inbounds double, ptr %482, i64 %484
  store double %481, ptr %485, align 8, !tbaa !13
  br label %486

486:                                              ; preds = %478
  %487 = load i32, ptr %21, align 4, !tbaa !11
  %488 = add nsw i32 %487, 1
  store i32 %488, ptr %21, align 4, !tbaa !11
  br label %422, !llvm.loop !28

489:                                              ; preds = %422
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %490

490:                                              ; preds = %509, %489
  %491 = load i32, ptr %22, align 4, !tbaa !11
  %492 = load i32, ptr %7, align 4, !tbaa !11
  %493 = icmp slt i32 %491, %492
  br i1 %493, label %494, label %512

494:                                              ; preds = %490
  %495 = load ptr, ptr %25, align 8, !tbaa !5
  %496 = load i32, ptr %22, align 4, !tbaa !11
  %497 = sext i32 %496 to i64
  %498 = getelementptr inbounds ptr, ptr %495, i64 %497
  %499 = load ptr, ptr %498, align 8, !tbaa !5
  %500 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %499, i64 noundef %500, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %501 = call i32 @rand() #5
  %502 = sitofp i32 %501 to double
  %503 = fdiv double %502, 0x41DFFFFFFFC00000
  %504 = fadd double %503, 1.000000e+00
  %505 = load ptr, ptr %24, align 8, !tbaa !5
  %506 = load i32, ptr %22, align 4, !tbaa !11
  %507 = sext i32 %506 to i64
  %508 = getelementptr inbounds double, ptr %505, i64 %507
  store double %504, ptr %508, align 8, !tbaa !13
  br label %509

509:                                              ; preds = %494
  %510 = load i32, ptr %22, align 4, !tbaa !11
  %511 = add nsw i32 %510, 1
  store i32 %511, ptr %22, align 4, !tbaa !11
  br label %490, !llvm.loop !29

512:                                              ; preds = %490
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %513

513:                                              ; preds = %535, %512
  %514 = load i32, ptr %21, align 4, !tbaa !11
  %515 = load i32, ptr %8, align 4, !tbaa !11
  %516 = load i32, ptr @nextra, align 4, !tbaa !11
  %517 = add nsw i32 %515, %516
  %518 = icmp slt i32 %514, %517
  br i1 %518, label %519, label %538

519:                                              ; preds = %513
  call void (...) @ClearCache()
  %520 = call double @get_time()
  store double %520, ptr %9, align 8, !tbaa !13
  %521 = load i32, ptr %7, align 4, !tbaa !11
  %522 = load ptr, ptr %24, align 8, !tbaa !5
  %523 = load ptr, ptr %25, align 8, !tbaa !5
  %524 = load ptr, ptr %5, align 8, !tbaa !5
  %525 = call i32 @N_VLinearCombination(i32 noundef %521, ptr noundef %522, ptr noundef %523, ptr noundef %524)
  store i32 %525, ptr %23, align 4, !tbaa !11
  %526 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %526)
  %527 = call double @get_time()
  store double %527, ptr %10, align 8, !tbaa !13
  %528 = load double, ptr %10, align 8, !tbaa !13
  %529 = load double, ptr %9, align 8, !tbaa !13
  %530 = fsub double %528, %529
  %531 = load ptr, ptr %19, align 8, !tbaa !5
  %532 = load i32, ptr %21, align 4, !tbaa !11
  %533 = sext i32 %532 to i64
  %534 = getelementptr inbounds double, ptr %531, i64 %533
  store double %530, ptr %534, align 8, !tbaa !13
  br label %535

535:                                              ; preds = %519
  %536 = load i32, ptr %21, align 4, !tbaa !11
  %537 = add nsw i32 %536, 1
  store i32 %537, ptr %21, align 4, !tbaa !11
  br label %513, !llvm.loop !30

538:                                              ; preds = %513
  %539 = load ptr, ptr %5, align 8, !tbaa !5
  %540 = load ptr, ptr %19, align 8, !tbaa !5
  %541 = load i32, ptr @nextra, align 4, !tbaa !11
  %542 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %539, ptr noundef %540, i32 noundef %541, i32 noundef %542, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14)
  %543 = load ptr, ptr %5, align 8, !tbaa !5
  %544 = load ptr, ptr %20, align 8, !tbaa !5
  %545 = load i32, ptr @nextra, align 4, !tbaa !11
  %546 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %543, ptr noundef %544, i32 noundef %545, i32 noundef %546, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %547 = load i32, ptr @print_time, align 4, !tbaa !11
  %548 = icmp ne i32 %547, 0
  br i1 %548, label %549, label %559

549:                                              ; preds = %538
  %550 = load double, ptr %11, align 8, !tbaa !13
  %551 = load double, ptr %12, align 8, !tbaa !13
  %552 = load double, ptr %13, align 8, !tbaa !13
  %553 = load double, ptr %14, align 8, !tbaa !13
  %554 = load double, ptr %15, align 8, !tbaa !13
  %555 = load double, ptr %16, align 8, !tbaa !13
  %556 = load double, ptr %17, align 8, !tbaa !13
  %557 = load double, ptr %18, align 8, !tbaa !13
  %558 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef @.str.41, double noundef %550, double noundef %551, double noundef %552, double noundef %553, double noundef %554, double noundef %555, double noundef %556, double noundef %557)
  br label %559

559:                                              ; preds = %549, %538
  %560 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %560) #5
  %561 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %561) #5
  %562 = load ptr, ptr %24, align 8, !tbaa !5
  call void @free(ptr noundef %562) #5
  %563 = load ptr, ptr %25, align 8, !tbaa !5
  %564 = load i32, ptr %7, align 4, !tbaa !11
  call void @N_VDestroyVectorArray(ptr noundef %563, i32 noundef %564)
  %565 = load i32, ptr %23, align 4, !tbaa !11
  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 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret i32 %565
}

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

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

declare void @N_VDestroyVectorArray(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden double @get_time() #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !16}
!27 = distinct !{!27, !16}
!28 = distinct !{!28, !16}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !16}


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

@print_time = external dso_local local_unnamed_addr global i32, align 4
@nextra = external dso_local local_unnamed_addr global i32, align 4
@.str.38 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

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

declare void @ClearCache(...) local_unnamed_addr #2

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

declare void @sync_device(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @time_stats(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #5

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

; Function Attrs: mustprogress 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) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @Test_N_VLinearCombination(ptr noundef %0, i64 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %13 = load i32, ptr @nextra, align 4, !tbaa !5
  %14 = add nsw i32 %13, %3
  %15 = sext i32 %14 to i64
  %16 = shl nsw i64 %15, 3
  %17 = tail call noalias ptr @malloc(i64 noundef %16) #8
  %18 = tail call noalias ptr @malloc(i64 noundef %16) #8
  %19 = sext i32 %2 to i64
  %20 = shl nsw i64 %19, 3
  %21 = tail call noalias ptr @malloc(i64 noundef %20) #8
  %22 = tail call ptr @N_VCloneVectorArray(i32 noundef %2, ptr noundef %0) #7
  store double 1.000000e+00, ptr %21, align 8, !tbaa !9
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  tail call void @N_VRand(ptr noundef %23, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %24 = icmp slt i32 %2, 2
  br i1 %24, label %.preheader218, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %.lr.ph

.preheader218:                                    ; preds = %.lr.ph, %4
  %25 = load i32, ptr @nextra, align 4, !tbaa !5
  %26 = add nsw i32 %25, %3
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph225, label %._crit_edge226

.lr.ph225:                                        ; preds = %.preheader218
  %28 = icmp eq i32 %2, 1
  %wide.trip.count278 = zext nneg i32 %2 to i64
  br label %36

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %29 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  tail call void @N_VRand(ptr noundef %30, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %31 = tail call i32 @rand() #7
  %32 = sitofp i32 %31 to double
  %33 = fdiv double %32, 0x41DFFFFFFFC00000
  %34 = fadd double %33, 1.000000e+00
  %35 = getelementptr inbounds double, ptr %21, i64 %indvars.iv
  store double %34, ptr %35, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader218, label %.lr.ph, !llvm.loop !13

36:                                               ; preds = %.lr.ph225, %._crit_edge
  %indvars.iv280 = phi i64 [ 0, %.lr.ph225 ], [ %indvars.iv.next281, %._crit_edge ]
  tail call void (...) @ClearCache() #7
  %37 = tail call double @get_time()
  br i1 %28, label %38, label %40

38:                                               ; preds = %36
  %39 = load ptr, ptr %22, align 8, !tbaa !11
  tail call void @N_VScale(double noundef 1.000000e+00, ptr noundef %39, ptr noundef %39) #7
  br label %._crit_edge

40:                                               ; preds = %36
  br i1 %24, label %._crit_edge, label %.lr.ph223

.lr.ph223:                                        ; preds = %40, %.lr.ph223
  %indvars.iv275 = phi i64 [ %indvars.iv.next276, %.lr.ph223 ], [ 1, %40 ]
  %41 = load ptr, ptr %22, align 8, !tbaa !11
  %42 = getelementptr inbounds double, ptr %21, i64 %indvars.iv275
  %43 = load double, ptr %42, align 8, !tbaa !9
  %44 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv275
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  tail call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %41, double noundef %43, ptr noundef %45, ptr noundef %41) #7
  %indvars.iv.next276 = add nuw nsw i64 %indvars.iv275, 1
  %exitcond279.not = icmp eq i64 %indvars.iv.next276, %wide.trip.count278
  br i1 %exitcond279.not, label %._crit_edge, label %.lr.ph223, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph223, %40, %38
  tail call void @sync_device(ptr noundef %0) #7
  %46 = tail call double @get_time()
  %47 = fsub double %46, %37
  %48 = getelementptr inbounds double, ptr %18, i64 %indvars.iv280
  store double %47, ptr %48, align 8, !tbaa !9
  %indvars.iv.next281 = add nuw nsw i64 %indvars.iv280, 1
  %49 = load i32, ptr @nextra, align 4, !tbaa !5
  %50 = add nsw i32 %49, %3
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next281, %51
  br i1 %52, label %36, label %._crit_edge226, !llvm.loop !16

._crit_edge226:                                   ; preds = %._crit_edge, %.preheader218
  store double 1.000000e+00, ptr %21, align 8, !tbaa !9
  %53 = load ptr, ptr %22, align 8, !tbaa !11
  tail call void @N_VRand(ptr noundef %53, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  br i1 %24, label %.preheader217, label %.lr.ph229.preheader

.lr.ph229.preheader:                              ; preds = %._crit_edge226
  %wide.trip.count286 = zext nneg i32 %2 to i64
  br label %.lr.ph229

.preheader217:                                    ; preds = %.lr.ph229, %._crit_edge226
  %54 = load i32, ptr @nextra, align 4, !tbaa !5
  %55 = add nsw i32 %54, %3
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph231, label %._crit_edge232

.lr.ph229:                                        ; preds = %.lr.ph229.preheader, %.lr.ph229
  %indvars.iv283 = phi i64 [ 1, %.lr.ph229.preheader ], [ %indvars.iv.next284, %.lr.ph229 ]
  %57 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv283
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  tail call void @N_VRand(ptr noundef %58, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %59 = tail call i32 @rand() #7
  %60 = sitofp i32 %59 to double
  %61 = fdiv double %60, 0x41DFFFFFFFC00000
  %62 = fadd double %61, 1.000000e+00
  %63 = getelementptr inbounds double, ptr %21, i64 %indvars.iv283
  store double %62, ptr %63, align 8, !tbaa !9
  %indvars.iv.next284 = add nuw nsw i64 %indvars.iv283, 1
  %exitcond287.not = icmp eq i64 %indvars.iv.next284, %wide.trip.count286
  br i1 %exitcond287.not, label %.preheader217, label %.lr.ph229, !llvm.loop !17

.lr.ph231:                                        ; preds = %.preheader217, %.lr.ph231
  %indvars.iv288 = phi i64 [ %indvars.iv.next289, %.lr.ph231 ], [ 0, %.preheader217 ]
  tail call void (...) @ClearCache() #7
  %64 = tail call double @get_time()
  %65 = load ptr, ptr %22, align 8, !tbaa !11
  %66 = tail call i32 @N_VLinearCombination(i32 noundef %2, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef %65) #7
  tail call void @sync_device(ptr noundef %0) #7
  %67 = tail call double @get_time()
  %68 = fsub double %67, %64
  %69 = getelementptr inbounds double, ptr %17, i64 %indvars.iv288
  store double %68, ptr %69, align 8, !tbaa !9
  %indvars.iv.next289 = add nuw nsw i64 %indvars.iv288, 1
  %70 = load i32, ptr @nextra, align 4, !tbaa !5
  %71 = add nsw i32 %70, %3
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next289, %72
  br i1 %73, label %.lr.ph231, label %._crit_edge232, !llvm.loop !18

._crit_edge232:                                   ; preds = %.lr.ph231, %.preheader217
  %.0198.lcssa = phi i32 [ undef, %.preheader217 ], [ %66, %.lr.ph231 ]
  %.lcssa220 = phi i32 [ %54, %.preheader217 ], [ %70, %.lr.ph231 ]
  call void @time_stats(ptr noundef %0, ptr noundef %17, i32 noundef %.lcssa220, i32 noundef %3, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %74 = load i32, ptr @nextra, align 4, !tbaa !5
  call void @time_stats(ptr noundef %0, ptr noundef %18, i32 noundef %74, i32 noundef %3, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %75 = load i32, ptr @print_time, align 4, !tbaa !5
  %.not = icmp eq i32 %75, 0
  br i1 %.not, label %86, label %76

76:                                               ; preds = %._crit_edge232
  %77 = load double, ptr %5, align 8, !tbaa !9
  %78 = load double, ptr %6, align 8, !tbaa !9
  %79 = load double, ptr %7, align 8, !tbaa !9
  %80 = load double, ptr %8, align 8, !tbaa !9
  %81 = load double, ptr %9, align 8, !tbaa !9
  %82 = load double, ptr %10, align 8, !tbaa !9
  %83 = load double, ptr %11, align 8, !tbaa !9
  %84 = load double, ptr %12, align 8, !tbaa !9
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef nonnull @.str.39, double noundef %77, double noundef %78, double noundef %79, double noundef %80, double noundef %81, double noundef %82, double noundef %83, double noundef %84)
  br label %86

86:                                               ; preds = %76, %._crit_edge232
  %87 = call i32 @rand() #7
  %88 = sitofp i32 %87 to double
  %89 = fdiv double %88, 0x41DFFFFFFFC00000
  %90 = fadd double %89, 1.000000e+00
  store double %90, ptr %21, align 8, !tbaa !9
  %91 = load ptr, ptr %22, align 8, !tbaa !11
  call void @N_VRand(ptr noundef %91, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  br i1 %24, label %.preheader216, label %.lr.ph236.preheader

.lr.ph236.preheader:                              ; preds = %86
  %wide.trip.count294 = zext nneg i32 %2 to i64
  br label %.lr.ph236

.preheader216:                                    ; preds = %.lr.ph236, %86
  %92 = load i32, ptr @nextra, align 4, !tbaa !5
  %93 = add nsw i32 %92, %3
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %.lr.ph242, label %._crit_edge243

.lr.ph242:                                        ; preds = %.preheader216
  %wide.trip.count299 = zext nneg i32 %2 to i64
  br label %102

.lr.ph236:                                        ; preds = %.lr.ph236.preheader, %.lr.ph236
  %indvars.iv291 = phi i64 [ 1, %.lr.ph236.preheader ], [ %indvars.iv.next292, %.lr.ph236 ]
  %95 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv291
  %96 = load ptr, ptr %95, align 8, !tbaa !11
  call void @N_VRand(ptr noundef %96, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %97 = call i32 @rand() #7
  %98 = sitofp i32 %97 to double
  %99 = fdiv double %98, 0x41DFFFFFFFC00000
  %100 = fadd double %99, 1.000000e+00
  %101 = getelementptr inbounds double, ptr %21, i64 %indvars.iv291
  store double %100, ptr %101, align 8, !tbaa !9
  %indvars.iv.next292 = add nuw nsw i64 %indvars.iv291, 1
  %exitcond295.not = icmp eq i64 %indvars.iv.next292, %wide.trip.count294
  br i1 %exitcond295.not, label %.preheader216, label %.lr.ph236, !llvm.loop !19

102:                                              ; preds = %.lr.ph242, %._crit_edge240
  %indvars.iv301 = phi i64 [ 0, %.lr.ph242 ], [ %indvars.iv.next302, %._crit_edge240 ]
  call void (...) @ClearCache() #7
  %103 = call double @get_time()
  %104 = load double, ptr %21, align 8, !tbaa !9
  %105 = load ptr, ptr %22, align 8, !tbaa !11
  call void @N_VScale(double noundef %104, ptr noundef %105, ptr noundef %105) #7
  br i1 %24, label %._crit_edge240, label %.lr.ph239

.lr.ph239:                                        ; preds = %102, %.lr.ph239
  %indvars.iv296 = phi i64 [ %indvars.iv.next297, %.lr.ph239 ], [ 1, %102 ]
  %106 = load ptr, ptr %22, align 8, !tbaa !11
  %107 = getelementptr inbounds double, ptr %21, i64 %indvars.iv296
  %108 = load double, ptr %107, align 8, !tbaa !9
  %109 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv296
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %106, double noundef %108, ptr noundef %110, ptr noundef %106) #7
  %indvars.iv.next297 = add nuw nsw i64 %indvars.iv296, 1
  %exitcond300.not = icmp eq i64 %indvars.iv.next297, %wide.trip.count299
  br i1 %exitcond300.not, label %._crit_edge240, label %.lr.ph239, !llvm.loop !20

._crit_edge240:                                   ; preds = %.lr.ph239, %102
  call void @sync_device(ptr noundef %0) #7
  %111 = call double @get_time()
  %112 = fsub double %111, %103
  %113 = getelementptr inbounds double, ptr %18, i64 %indvars.iv301
  store double %112, ptr %113, align 8, !tbaa !9
  %indvars.iv.next302 = add nuw nsw i64 %indvars.iv301, 1
  %114 = load i32, ptr @nextra, align 4, !tbaa !5
  %115 = add nsw i32 %114, %3
  %116 = sext i32 %115 to i64
  %117 = icmp slt i64 %indvars.iv.next302, %116
  br i1 %117, label %102, label %._crit_edge243, !llvm.loop !21

._crit_edge243:                                   ; preds = %._crit_edge240, %.preheader216
  %118 = call i32 @rand() #7
  %119 = sitofp i32 %118 to double
  %120 = fdiv double %119, 0x41DFFFFFFFC00000
  %121 = fadd double %120, 1.000000e+00
  store double %121, ptr %21, align 8, !tbaa !9
  %122 = load ptr, ptr %22, align 8, !tbaa !11
  call void @N_VRand(ptr noundef %122, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  br i1 %24, label %.preheader215, label %.lr.ph246.preheader

.lr.ph246.preheader:                              ; preds = %._crit_edge243
  %wide.trip.count307 = zext nneg i32 %2 to i64
  br label %.lr.ph246

.preheader215:                                    ; preds = %.lr.ph246, %._crit_edge243
  %123 = load i32, ptr @nextra, align 4, !tbaa !5
  %124 = add nsw i32 %123, %3
  %125 = icmp sgt i32 %124, 0
  br i1 %125, label %.lr.ph248, label %._crit_edge249

.lr.ph246:                                        ; preds = %.lr.ph246.preheader, %.lr.ph246
  %indvars.iv304 = phi i64 [ 1, %.lr.ph246.preheader ], [ %indvars.iv.next305, %.lr.ph246 ]
  %126 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv304
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  call void @N_VRand(ptr noundef %127, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %128 = call i32 @rand() #7
  %129 = sitofp i32 %128 to double
  %130 = fdiv double %129, 0x41DFFFFFFFC00000
  %131 = fadd double %130, 1.000000e+00
  %132 = getelementptr inbounds double, ptr %21, i64 %indvars.iv304
  store double %131, ptr %132, align 8, !tbaa !9
  %indvars.iv.next305 = add nuw nsw i64 %indvars.iv304, 1
  %exitcond308.not = icmp eq i64 %indvars.iv.next305, %wide.trip.count307
  br i1 %exitcond308.not, label %.preheader215, label %.lr.ph246, !llvm.loop !22

.lr.ph248:                                        ; preds = %.preheader215, %.lr.ph248
  %indvars.iv309 = phi i64 [ %indvars.iv.next310, %.lr.ph248 ], [ 0, %.preheader215 ]
  call void (...) @ClearCache() #7
  %133 = call double @get_time()
  %134 = load ptr, ptr %22, align 8, !tbaa !11
  %135 = call i32 @N_VLinearCombination(i32 noundef %2, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef %134) #7
  call void @sync_device(ptr noundef %0) #7
  %136 = call double @get_time()
  %137 = fsub double %136, %133
  %138 = getelementptr inbounds double, ptr %17, i64 %indvars.iv309
  store double %137, ptr %138, align 8, !tbaa !9
  %indvars.iv.next310 = add nuw nsw i64 %indvars.iv309, 1
  %139 = load i32, ptr @nextra, align 4, !tbaa !5
  %140 = add nsw i32 %139, %3
  %141 = sext i32 %140 to i64
  %142 = icmp slt i64 %indvars.iv.next310, %141
  br i1 %142, label %.lr.ph248, label %._crit_edge249, !llvm.loop !23

._crit_edge249:                                   ; preds = %.lr.ph248, %.preheader215
  %.1199.lcssa = phi i32 [ %.0198.lcssa, %.preheader215 ], [ %135, %.lr.ph248 ]
  %.lcssa219 = phi i32 [ %123, %.preheader215 ], [ %139, %.lr.ph248 ]
  call void @time_stats(ptr noundef %0, ptr noundef %17, i32 noundef %.lcssa219, i32 noundef %3, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %143 = load i32, ptr @nextra, align 4, !tbaa !5
  call void @time_stats(ptr noundef %0, ptr noundef %18, i32 noundef %143, i32 noundef %3, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %144 = load i32, ptr @print_time, align 4, !tbaa !5
  %.not211 = icmp eq i32 %144, 0
  br i1 %.not211, label %155, label %145

145:                                              ; preds = %._crit_edge249
  %146 = load double, ptr %5, align 8, !tbaa !9
  %147 = load double, ptr %6, align 8, !tbaa !9
  %148 = load double, ptr %7, align 8, !tbaa !9
  %149 = load double, ptr %8, align 8, !tbaa !9
  %150 = load double, ptr %9, align 8, !tbaa !9
  %151 = load double, ptr %10, align 8, !tbaa !9
  %152 = load double, ptr %11, align 8, !tbaa !9
  %153 = load double, ptr %12, align 8, !tbaa !9
  %154 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef nonnull @.str.40, double noundef %146, double noundef %147, double noundef %148, double noundef %149, double noundef %150, double noundef %151, double noundef %152, double noundef %153)
  br label %155

155:                                              ; preds = %145, %._crit_edge249
  %156 = icmp sgt i32 %2, 0
  br i1 %156, label %.lr.ph254.preheader, label %.preheader214

.lr.ph254.preheader:                              ; preds = %155
  %wide.trip.count315 = zext nneg i32 %2 to i64
  br label %.lr.ph254

.preheader214:                                    ; preds = %.lr.ph254, %155
  %157 = load i32, ptr @nextra, align 4, !tbaa !5
  %158 = add nsw i32 %157, %3
  %159 = icmp sgt i32 %158, 0
  br i1 %159, label %.lr.ph260, label %.preheader213

.lr.ph260:                                        ; preds = %.preheader214
  %160 = icmp eq i32 %2, 1
  %wide.trip.count320 = zext nneg i32 %2 to i64
  br label %169

.lr.ph254:                                        ; preds = %.lr.ph254.preheader, %.lr.ph254
  %indvars.iv312 = phi i64 [ 0, %.lr.ph254.preheader ], [ %indvars.iv.next313, %.lr.ph254 ]
  %161 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv312
  %162 = load ptr, ptr %161, align 8, !tbaa !11
  call void @N_VRand(ptr noundef %162, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %163 = call i32 @rand() #7
  %164 = sitofp i32 %163 to double
  %165 = fdiv double %164, 0x41DFFFFFFFC00000
  %166 = fadd double %165, 1.000000e+00
  %167 = getelementptr inbounds double, ptr %21, i64 %indvars.iv312
  store double %166, ptr %167, align 8, !tbaa !9
  %indvars.iv.next313 = add nuw nsw i64 %indvars.iv312, 1
  %exitcond316.not = icmp eq i64 %indvars.iv.next313, %wide.trip.count315
  br i1 %exitcond316.not, label %.preheader214, label %.lr.ph254, !llvm.loop !24

.preheader213:                                    ; preds = %._crit_edge258, %.preheader214
  %168 = phi i32 [ %157, %.preheader214 ], [ %183, %._crit_edge258 ]
  br i1 %156, label %.lr.ph262.preheader, label %.preheader

.lr.ph262.preheader:                              ; preds = %.preheader213
  %wide.trip.count328 = zext nneg i32 %2 to i64
  br label %.lr.ph262

169:                                              ; preds = %.lr.ph260, %._crit_edge258
  %indvars.iv322 = phi i64 [ 0, %.lr.ph260 ], [ %indvars.iv.next323, %._crit_edge258 ]
  call void (...) @ClearCache() #7
  %170 = call double @get_time()
  %171 = load double, ptr %21, align 8, !tbaa !9
  %172 = load ptr, ptr %22, align 8, !tbaa !11
  br i1 %160, label %173, label %174

173:                                              ; preds = %169
  call void @N_VScale(double noundef %171, ptr noundef %172, ptr noundef %172) #7
  br label %._crit_edge258

174:                                              ; preds = %169
  call void @N_VScale(double noundef %171, ptr noundef %172, ptr noundef %0) #7
  br i1 %24, label %._crit_edge258, label %.lr.ph257

.lr.ph257:                                        ; preds = %174, %.lr.ph257
  %indvars.iv317 = phi i64 [ %indvars.iv.next318, %.lr.ph257 ], [ 1, %174 ]
  %175 = load ptr, ptr %22, align 8, !tbaa !11
  %176 = getelementptr inbounds double, ptr %21, i64 %indvars.iv317
  %177 = load double, ptr %176, align 8, !tbaa !9
  %178 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv317
  %179 = load ptr, ptr %178, align 8, !tbaa !11
  call void @N_VLinearSum(double noundef 1.000000e+00, ptr noundef %175, double noundef %177, ptr noundef %179, ptr noundef %0) #7
  %indvars.iv.next318 = add nuw nsw i64 %indvars.iv317, 1
  %exitcond321.not = icmp eq i64 %indvars.iv.next318, %wide.trip.count320
  br i1 %exitcond321.not, label %._crit_edge258, label %.lr.ph257, !llvm.loop !25

._crit_edge258:                                   ; preds = %.lr.ph257, %174, %173
  call void @sync_device(ptr noundef %0) #7
  %180 = call double @get_time()
  %181 = fsub double %180, %170
  %182 = getelementptr inbounds double, ptr %18, i64 %indvars.iv322
  store double %181, ptr %182, align 8, !tbaa !9
  %indvars.iv.next323 = add nuw nsw i64 %indvars.iv322, 1
  %183 = load i32, ptr @nextra, align 4, !tbaa !5
  %184 = add nsw i32 %183, %3
  %185 = sext i32 %184 to i64
  %186 = icmp slt i64 %indvars.iv.next323, %185
  br i1 %186, label %169, label %.preheader213, !llvm.loop !26

.preheader.loopexit:                              ; preds = %.lr.ph262
  %.pre = load i32, ptr @nextra, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.preheader213
  %187 = phi i32 [ %.pre, %.preheader.loopexit ], [ %168, %.preheader213 ]
  %188 = add nsw i32 %187, %3
  %189 = icmp sgt i32 %188, 0
  br i1 %189, label %.lr.ph264, label %._crit_edge265

.lr.ph262:                                        ; preds = %.lr.ph262.preheader, %.lr.ph262
  %indvars.iv325 = phi i64 [ 0, %.lr.ph262.preheader ], [ %indvars.iv.next326, %.lr.ph262 ]
  %190 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv325
  %191 = load ptr, ptr %190, align 8, !tbaa !11
  call void @N_VRand(ptr noundef %191, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %192 = call i32 @rand() #7
  %193 = sitofp i32 %192 to double
  %194 = fdiv double %193, 0x41DFFFFFFFC00000
  %195 = fadd double %194, 1.000000e+00
  %196 = getelementptr inbounds double, ptr %21, i64 %indvars.iv325
  store double %195, ptr %196, align 8, !tbaa !9
  %indvars.iv.next326 = add nuw nsw i64 %indvars.iv325, 1
  %exitcond329.not = icmp eq i64 %indvars.iv.next326, %wide.trip.count328
  br i1 %exitcond329.not, label %.preheader.loopexit, label %.lr.ph262, !llvm.loop !27

.lr.ph264:                                        ; preds = %.preheader, %.lr.ph264
  %indvars.iv330 = phi i64 [ %indvars.iv.next331, %.lr.ph264 ], [ 0, %.preheader ]
  call void (...) @ClearCache() #7
  %197 = call double @get_time()
  %198 = call i32 @N_VLinearCombination(i32 noundef %2, ptr noundef nonnull %21, ptr noundef nonnull %22, ptr noundef %0) #7
  call void @sync_device(ptr noundef %0) #7
  %199 = call double @get_time()
  %200 = fsub double %199, %197
  %201 = getelementptr inbounds double, ptr %17, i64 %indvars.iv330
  store double %200, ptr %201, align 8, !tbaa !9
  %indvars.iv.next331 = add nuw nsw i64 %indvars.iv330, 1
  %202 = load i32, ptr @nextra, align 4, !tbaa !5
  %203 = add nsw i32 %202, %3
  %204 = sext i32 %203 to i64
  %205 = icmp slt i64 %indvars.iv.next331, %204
  br i1 %205, label %.lr.ph264, label %._crit_edge265, !llvm.loop !28

._crit_edge265:                                   ; preds = %.lr.ph264, %.preheader
  %.2200.lcssa = phi i32 [ %.1199.lcssa, %.preheader ], [ %198, %.lr.ph264 ]
  %.lcssa = phi i32 [ %187, %.preheader ], [ %202, %.lr.ph264 ]
  call void @time_stats(ptr noundef %0, ptr noundef %17, i32 noundef %.lcssa, i32 noundef %3, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %206 = load i32, ptr @nextra, align 4, !tbaa !5
  call void @time_stats(ptr noundef %0, ptr noundef %18, i32 noundef %206, i32 noundef %3, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %207 = load i32, ptr @print_time, align 4, !tbaa !5
  %.not212 = icmp eq i32 %207, 0
  br i1 %.not212, label %218, label %208

208:                                              ; preds = %._crit_edge265
  %209 = load double, ptr %5, align 8, !tbaa !9
  %210 = load double, ptr %6, align 8, !tbaa !9
  %211 = load double, ptr %7, align 8, !tbaa !9
  %212 = load double, ptr %8, align 8, !tbaa !9
  %213 = load double, ptr %9, align 8, !tbaa !9
  %214 = load double, ptr %10, align 8, !tbaa !9
  %215 = load double, ptr %11, align 8, !tbaa !9
  %216 = load double, ptr %12, align 8, !tbaa !9
  %217 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef nonnull @.str.41, double noundef %209, double noundef %210, double noundef %211, double noundef %212, double noundef %213, double noundef %214, double noundef %215, double noundef %216)
  br label %218

218:                                              ; preds = %208, %._crit_edge265
  call void @free(ptr noundef %17) #7
  call void @free(ptr noundef %18) #7
  call void @free(ptr noundef %21) #7
  call void @N_VDestroyVectorArray(ptr noundef nonnull %22, i32 noundef %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  ret i32 %.2200.lcssa
}

declare ptr @N_VCloneVectorArray(i32 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @N_VLinearCombination(i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @N_VDestroyVectorArray(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden double @get_time() local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 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 #4 = { nofree 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 #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !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, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass