; 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.42 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [19 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 ptr @N_VCloneVectorArray(i32 noundef, ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @Test_N_VScaleAddMulti(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
  %26 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %27 = load i32, ptr %8, align 4, !tbaa !11
  %28 = load i32, ptr @nextra, align 4, !tbaa !11
  %29 = add nsw i32 %27, %28
  %30 = sext i32 %29 to i64
  %31 = mul i64 %30, 8
  %32 = call noalias ptr @malloc(i64 noundef %31) #6
  store ptr %32, ptr %19, align 8, !tbaa !5
  %33 = load i32, ptr %8, align 4, !tbaa !11
  %34 = load i32, ptr @nextra, align 4, !tbaa !11
  %35 = add nsw i32 %33, %34
  %36 = sext i32 %35 to i64
  %37 = mul i64 %36, 8
  %38 = call noalias ptr @malloc(i64 noundef %37) #6
  store ptr %38, ptr %20, align 8, !tbaa !5
  %39 = load i32, ptr %7, align 4, !tbaa !11
  %40 = sext i32 %39 to i64
  %41 = mul i64 %40, 8
  %42 = call noalias ptr @malloc(i64 noundef %41) #6
  store ptr %42, ptr %24, align 8, !tbaa !5
  %43 = load i32, ptr %7, align 4, !tbaa !11
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = call ptr @N_VCloneVectorArray(i32 noundef %43, ptr noundef %44)
  store ptr %45, ptr %25, align 8, !tbaa !5
  %46 = load i32, ptr %7, align 4, !tbaa !11
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = call ptr @N_VCloneVectorArray(i32 noundef %46, ptr noundef %47)
  store ptr %48, ptr %26, align 8, !tbaa !5
  %49 = load ptr, ptr %5, 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 0, 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 = %116, %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 %119

80:                                               ; preds = %74
  call void (...) @ClearCache()
  %81 = call double @get_time()
  store double %81, ptr %9, align 8, !tbaa !13
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %82

82:                                               ; preds = %103, %80
  %83 = load i32, ptr %22, align 4, !tbaa !11
  %84 = load i32, ptr %7, align 4, !tbaa !11
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %86, label %106

86:                                               ; preds = %82
  %87 = load ptr, ptr %24, align 8, !tbaa !5
  %88 = load i32, ptr %22, align 4, !tbaa !11
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !13
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = load ptr, ptr %25, align 8, !tbaa !5
  %94 = load i32, ptr %22, align 4, !tbaa !11
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds ptr, ptr %93, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = load ptr, ptr %25, align 8, !tbaa !5
  %99 = load i32, ptr %22, align 4, !tbaa !11
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds ptr, ptr %98, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef %91, ptr noundef %92, double noundef 1.000000e+00, ptr noundef %97, ptr noundef %102)
  br label %103

103:                                              ; preds = %86
  %104 = load i32, ptr %22, align 4, !tbaa !11
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %22, align 4, !tbaa !11
  br label %82, !llvm.loop !17

106:                                              ; preds = %82
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %107)
  %108 = call double @get_time()
  store double %108, ptr %10, align 8, !tbaa !13
  %109 = load double, ptr %10, align 8, !tbaa !13
  %110 = load double, ptr %9, align 8, !tbaa !13
  %111 = fsub double %109, %110
  %112 = load ptr, ptr %20, align 8, !tbaa !5
  %113 = load i32, ptr %21, align 4, !tbaa !11
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  store double %111, ptr %115, align 8, !tbaa !13
  br label %116

116:                                              ; preds = %106
  %117 = load i32, ptr %21, align 4, !tbaa !11
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %21, align 4, !tbaa !11
  br label %74, !llvm.loop !18

119:                                              ; preds = %74
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %120, i64 noundef %121, double noundef -1.000000e+00, double noundef 1.000000e+00)
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %122

122:                                              ; preds = %141, %119
  %123 = load i32, ptr %22, align 4, !tbaa !11
  %124 = load i32, ptr %7, align 4, !tbaa !11
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %126, label %144

126:                                              ; preds = %122
  %127 = load ptr, ptr %25, align 8, !tbaa !5
  %128 = load i32, ptr %22, align 4, !tbaa !11
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds ptr, ptr %127, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %131, i64 noundef %132, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %133 = call i32 @rand() #5
  %134 = sitofp i32 %133 to double
  %135 = fdiv double %134, 0x41DFFFFFFFC00000
  %136 = fadd double %135, 1.000000e+00
  %137 = load ptr, ptr %24, align 8, !tbaa !5
  %138 = load i32, ptr %22, align 4, !tbaa !11
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds double, ptr %137, i64 %139
  store double %136, ptr %140, align 8, !tbaa !13
  br label %141

141:                                              ; preds = %126
  %142 = load i32, ptr %22, align 4, !tbaa !11
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %22, align 4, !tbaa !11
  br label %122, !llvm.loop !19

144:                                              ; preds = %122
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %145

145:                                              ; preds = %168, %144
  %146 = load i32, ptr %21, align 4, !tbaa !11
  %147 = load i32, ptr %8, align 4, !tbaa !11
  %148 = load i32, ptr @nextra, align 4, !tbaa !11
  %149 = add nsw i32 %147, %148
  %150 = icmp slt i32 %146, %149
  br i1 %150, label %151, label %171

151:                                              ; preds = %145
  call void (...) @ClearCache()
  %152 = call double @get_time()
  store double %152, ptr %9, align 8, !tbaa !13
  %153 = load i32, ptr %7, align 4, !tbaa !11
  %154 = load ptr, ptr %24, align 8, !tbaa !5
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = load ptr, ptr %25, align 8, !tbaa !5
  %157 = load ptr, ptr %25, align 8, !tbaa !5
  %158 = call i32 @N_VScaleAddMulti(i32 noundef %153, ptr noundef %154, ptr noundef %155, ptr noundef %156, ptr noundef %157)
  store i32 %158, ptr %23, align 4, !tbaa !11
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %159)
  %160 = call double @get_time()
  store double %160, ptr %10, align 8, !tbaa !13
  %161 = load double, ptr %10, align 8, !tbaa !13
  %162 = load double, ptr %9, align 8, !tbaa !13
  %163 = fsub double %161, %162
  %164 = load ptr, ptr %19, align 8, !tbaa !5
  %165 = load i32, ptr %21, align 4, !tbaa !11
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds double, ptr %164, i64 %166
  store double %163, ptr %167, align 8, !tbaa !13
  br label %168

168:                                              ; preds = %151
  %169 = load i32, ptr %21, align 4, !tbaa !11
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %21, align 4, !tbaa !11
  br label %145, !llvm.loop !20

171:                                              ; preds = %145
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = load ptr, ptr %19, align 8, !tbaa !5
  %174 = load i32, ptr @nextra, align 4, !tbaa !11
  %175 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %172, ptr noundef %173, i32 noundef %174, i32 noundef %175, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14)
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = load ptr, ptr %20, align 8, !tbaa !5
  %178 = load i32, ptr @nextra, align 4, !tbaa !11
  %179 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %176, ptr noundef %177, i32 noundef %178, i32 noundef %179, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %180 = load i32, ptr @print_time, align 4, !tbaa !11
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %192

182:                                              ; preds = %171
  %183 = load double, ptr %11, align 8, !tbaa !13
  %184 = load double, ptr %12, align 8, !tbaa !13
  %185 = load double, ptr %13, align 8, !tbaa !13
  %186 = load double, ptr %14, align 8, !tbaa !13
  %187 = load double, ptr %15, align 8, !tbaa !13
  %188 = load double, ptr %16, align 8, !tbaa !13
  %189 = load double, ptr %17, align 8, !tbaa !13
  %190 = load double, ptr %18, align 8, !tbaa !13
  %191 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef @.str.42, double noundef %183, double noundef %184, double noundef %185, double noundef %186, double noundef %187, double noundef %188, double noundef %189, double noundef %190)
  br label %192

192:                                              ; preds = %182, %171
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %193, i64 noundef %194, double noundef -1.000000e+00, double noundef 1.000000e+00)
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %195

195:                                              ; preds = %214, %192
  %196 = load i32, ptr %22, align 4, !tbaa !11
  %197 = load i32, ptr %7, align 4, !tbaa !11
  %198 = icmp slt i32 %196, %197
  br i1 %198, label %199, label %217

199:                                              ; preds = %195
  %200 = load ptr, ptr %25, align 8, !tbaa !5
  %201 = load i32, ptr %22, align 4, !tbaa !11
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds ptr, ptr %200, i64 %202
  %204 = load ptr, ptr %203, align 8, !tbaa !5
  %205 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %204, i64 noundef %205, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %206 = call i32 @rand() #5
  %207 = sitofp i32 %206 to double
  %208 = fdiv double %207, 0x41DFFFFFFFC00000
  %209 = fadd double %208, 1.000000e+00
  %210 = load ptr, ptr %24, align 8, !tbaa !5
  %211 = load i32, ptr %22, align 4, !tbaa !11
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds double, ptr %210, i64 %212
  store double %209, ptr %213, align 8, !tbaa !13
  br label %214

214:                                              ; preds = %199
  %215 = load i32, ptr %22, align 4, !tbaa !11
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %22, align 4, !tbaa !11
  br label %195, !llvm.loop !21

217:                                              ; preds = %195
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %218

218:                                              ; preds = %260, %217
  %219 = load i32, ptr %21, align 4, !tbaa !11
  %220 = load i32, ptr %8, align 4, !tbaa !11
  %221 = load i32, ptr @nextra, align 4, !tbaa !11
  %222 = add nsw i32 %220, %221
  %223 = icmp slt i32 %219, %222
  br i1 %223, label %224, label %263

224:                                              ; preds = %218
  call void (...) @ClearCache()
  %225 = call double @get_time()
  store double %225, ptr %9, align 8, !tbaa !13
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %226

226:                                              ; preds = %247, %224
  %227 = load i32, ptr %22, align 4, !tbaa !11
  %228 = load i32, ptr %7, align 4, !tbaa !11
  %229 = icmp slt i32 %227, %228
  br i1 %229, label %230, label %250

230:                                              ; preds = %226
  %231 = load ptr, ptr %24, align 8, !tbaa !5
  %232 = load i32, ptr %22, align 4, !tbaa !11
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds double, ptr %231, i64 %233
  %235 = load double, ptr %234, align 8, !tbaa !13
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = load ptr, ptr %25, align 8, !tbaa !5
  %238 = load i32, ptr %22, align 4, !tbaa !11
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds ptr, ptr %237, i64 %239
  %241 = load ptr, ptr %240, align 8, !tbaa !5
  %242 = load ptr, ptr %26, align 8, !tbaa !5
  %243 = load i32, ptr %22, align 4, !tbaa !11
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds ptr, ptr %242, i64 %244
  %246 = load ptr, ptr %245, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef %235, ptr noundef %236, double noundef 1.000000e+00, ptr noundef %241, ptr noundef %246)
  br label %247

247:                                              ; preds = %230
  %248 = load i32, ptr %22, align 4, !tbaa !11
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %22, align 4, !tbaa !11
  br label %226, !llvm.loop !22

250:                                              ; preds = %226
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  call void @sync_device(ptr noundef %251)
  %252 = call double @get_time()
  store double %252, ptr %10, align 8, !tbaa !13
  %253 = load double, ptr %10, align 8, !tbaa !13
  %254 = load double, ptr %9, align 8, !tbaa !13
  %255 = fsub double %253, %254
  %256 = load ptr, ptr %20, align 8, !tbaa !5
  %257 = load i32, ptr %21, align 4, !tbaa !11
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds double, ptr %256, i64 %258
  store double %255, ptr %259, align 8, !tbaa !13
  br label %260

260:                                              ; preds = %250
  %261 = load i32, ptr %21, align 4, !tbaa !11
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %21, align 4, !tbaa !11
  br label %218, !llvm.loop !23

263:                                              ; preds = %218
  %264 = load ptr, ptr %5, align 8, !tbaa !5
  %265 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %264, i64 noundef %265, double noundef -1.000000e+00, double noundef 1.000000e+00)
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %266

266:                                              ; preds = %285, %263
  %267 = load i32, ptr %22, align 4, !tbaa !11
  %268 = load i32, ptr %7, align 4, !tbaa !11
  %269 = icmp slt i32 %267, %268
  br i1 %269, label %270, label %288

270:                                              ; preds = %266
  %271 = load ptr, ptr %25, align 8, !tbaa !5
  %272 = load i32, ptr %22, align 4, !tbaa !11
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds ptr, ptr %271, i64 %273
  %275 = load ptr, ptr %274, align 8, !tbaa !5
  %276 = load i64, ptr %6, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %275, i64 noundef %276, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %277 = call i32 @rand() #5
  %278 = sitofp i32 %277 to double
  %279 = fdiv double %278, 0x41DFFFFFFFC00000
  %280 = fadd double %279, 1.000000e+00
  %281 = load ptr, ptr %24, align 8, !tbaa !5
  %282 = load i32, ptr %22, align 4, !tbaa !11
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds double, ptr %281, i64 %283
  store double %280, ptr %284, align 8, !tbaa !13
  br label %285

285:                                              ; preds = %270
  %286 = load i32, ptr %22, align 4, !tbaa !11
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %22, align 4, !tbaa !11
  br label %266, !llvm.loop !24

288:                                              ; preds = %266
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %289

289:                                              ; preds = %312, %288
  %290 = load i32, ptr %21, align 4, !tbaa !11
  %291 = load i32, ptr %8, align 4, !tbaa !11
  %292 = load i32, ptr @nextra, align 4, !tbaa !11
  %293 = add nsw i32 %291, %292
  %294 = icmp slt i32 %290, %293
  br i1 %294, label %295, label %315

295:                                              ; preds = %289
  call void (...) @ClearCache()
  %296 = call double @get_time()
  store double %296, ptr %9, align 8, !tbaa !13
  %297 = load i32, ptr %7, align 4, !tbaa !11
  %298 = load ptr, ptr %24, align 8, !tbaa !5
  %299 = load ptr, ptr %5, align 8, !tbaa !5
  %300 = load ptr, ptr %25, align 8, !tbaa !5
  %301 = load ptr, ptr %26, align 8, !tbaa !5
  %302 = call i32 @N_VScaleAddMulti(i32 noundef %297, ptr noundef %298, ptr noundef %299, ptr noundef %300, ptr noundef %301)
  store i32 %302, ptr %23, align 4, !tbaa !11
  %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
  %305 = load double, ptr %10, align 8, !tbaa !13
  %306 = load double, ptr %9, align 8, !tbaa !13
  %307 = fsub double %305, %306
  %308 = load ptr, ptr %19, align 8, !tbaa !5
  %309 = load i32, ptr %21, align 4, !tbaa !11
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds double, ptr %308, i64 %310
  store double %307, ptr %311, align 8, !tbaa !13
  br label %312

312:                                              ; preds = %295
  %313 = load i32, ptr %21, align 4, !tbaa !11
  %314 = add nsw i32 %313, 1
  store i32 %314, ptr %21, align 4, !tbaa !11
  br label %289, !llvm.loop !25

315:                                              ; preds = %289
  %316 = load ptr, ptr %5, align 8, !tbaa !5
  %317 = load ptr, ptr %19, align 8, !tbaa !5
  %318 = load i32, ptr @nextra, align 4, !tbaa !11
  %319 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %316, ptr noundef %317, i32 noundef %318, i32 noundef %319, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14)
  %320 = load ptr, ptr %5, align 8, !tbaa !5
  %321 = load ptr, ptr %20, align 8, !tbaa !5
  %322 = load i32, ptr @nextra, align 4, !tbaa !11
  %323 = load i32, ptr %8, align 4, !tbaa !11
  call void @time_stats(ptr noundef %320, ptr noundef %321, i32 noundef %322, i32 noundef %323, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18)
  %324 = load i32, ptr @print_time, align 4, !tbaa !11
  %325 = icmp ne i32 %324, 0
  br i1 %325, label %326, label %336

326:                                              ; preds = %315
  %327 = load double, ptr %11, align 8, !tbaa !13
  %328 = load double, ptr %12, align 8, !tbaa !13
  %329 = load double, ptr %13, align 8, !tbaa !13
  %330 = load double, ptr %14, align 8, !tbaa !13
  %331 = load double, ptr %15, align 8, !tbaa !13
  %332 = load double, ptr %16, align 8, !tbaa !13
  %333 = load double, ptr %17, align 8, !tbaa !13
  %334 = load double, ptr %18, align 8, !tbaa !13
  %335 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef @.str.43, double noundef %327, double noundef %328, double noundef %329, double noundef %330, double noundef %331, double noundef %332, double noundef %333, double noundef %334)
  br label %336

336:                                              ; preds = %326, %315
  %337 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %337) #5
  %338 = load ptr, ptr %20, align 8, !tbaa !5
  call void @free(ptr noundef %338) #5
  %339 = load ptr, ptr %24, align 8, !tbaa !5
  call void @free(ptr noundef %339) #5
  %340 = load ptr, ptr %25, align 8, !tbaa !5
  %341 = load i32, ptr %7, align 4, !tbaa !11
  call void @N_VDestroyVectorArray(ptr noundef %340, i32 noundef %341)
  %342 = load ptr, ptr %26, align 8, !tbaa !5
  %343 = load i32, ptr %7, align 4, !tbaa !11
  call void @N_VDestroyVectorArray(ptr noundef %342, i32 noundef %343)
  %344 = load i32, ptr %23, align 4, !tbaa !11
  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 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 %344
}

declare i32 @N_VScaleAddMulti(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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}


; 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.42 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [19 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 ptr @N_VCloneVectorArray(i32 noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @Test_N_VScaleAddMulti(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
  %23 = tail call ptr @N_VCloneVectorArray(i32 noundef %2, ptr noundef %0) #7
  tail call void @N_VRand(ptr noundef %0, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %24 = icmp sgt i32 %2, 0
  br i1 %24, label %.lr.ph.preheader, label %.preheader138

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

.preheader138:                                    ; 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.ph144, label %._crit_edge145

.lr.ph144:                                        ; preds = %.preheader138
  %wide.trip.count179 = zext nneg i32 %2 to i64
  br label %35

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %28 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  tail call void @N_VRand(ptr noundef %29, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %30 = tail call i32 @rand() #7
  %31 = sitofp i32 %30 to double
  %32 = fdiv double %31, 0x41DFFFFFFFC00000
  %33 = fadd double %32, 1.000000e+00
  %34 = getelementptr inbounds double, ptr %21, i64 %indvars.iv
  store double %33, ptr %34, align 8, !tbaa !11
  %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 %.preheader138, label %.lr.ph, !llvm.loop !13

35:                                               ; preds = %.lr.ph144, %._crit_edge
  %indvars.iv181 = phi i64 [ 0, %.lr.ph144 ], [ %indvars.iv.next182, %._crit_edge ]
  tail call void (...) @ClearCache() #7
  %36 = tail call double @get_time()
  br i1 %24, label %.lr.ph142, label %._crit_edge

.lr.ph142:                                        ; preds = %35, %.lr.ph142
  %indvars.iv176 = phi i64 [ %indvars.iv.next177, %.lr.ph142 ], [ 0, %35 ]
  %37 = getelementptr inbounds double, ptr %21, i64 %indvars.iv176
  %38 = load double, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv176
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  tail call void @N_VLinearSum(double noundef %38, ptr noundef %0, double noundef 1.000000e+00, ptr noundef %40, ptr noundef %40) #7
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %exitcond180.not = icmp eq i64 %indvars.iv.next177, %wide.trip.count179
  br i1 %exitcond180.not, label %._crit_edge, label %.lr.ph142, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph142, %35
  tail call void @sync_device(ptr noundef %0) #7
  %41 = tail call double @get_time()
  %42 = fsub double %41, %36
  %43 = getelementptr inbounds double, ptr %18, i64 %indvars.iv181
  store double %42, ptr %43, align 8, !tbaa !11
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  %44 = load i32, ptr @nextra, align 4, !tbaa !5
  %45 = add nsw i32 %44, %3
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next182, %46
  br i1 %47, label %35, label %._crit_edge145, !llvm.loop !16

._crit_edge145:                                   ; preds = %._crit_edge, %.preheader138
  tail call void @N_VRand(ptr noundef %0, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  br i1 %24, label %.lr.ph148.preheader, label %.preheader137

.lr.ph148.preheader:                              ; preds = %._crit_edge145
  %wide.trip.count187 = zext nneg i32 %2 to i64
  br label %.lr.ph148

.preheader137:                                    ; preds = %.lr.ph148, %._crit_edge145
  %48 = load i32, ptr @nextra, align 4, !tbaa !5
  %49 = add nsw i32 %48, %3
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph150, label %._crit_edge151

.lr.ph148:                                        ; preds = %.lr.ph148.preheader, %.lr.ph148
  %indvars.iv184 = phi i64 [ 0, %.lr.ph148.preheader ], [ %indvars.iv.next185, %.lr.ph148 ]
  %51 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv184
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  tail call void @N_VRand(ptr noundef %52, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %53 = tail call i32 @rand() #7
  %54 = sitofp i32 %53 to double
  %55 = fdiv double %54, 0x41DFFFFFFFC00000
  %56 = fadd double %55, 1.000000e+00
  %57 = getelementptr inbounds double, ptr %21, i64 %indvars.iv184
  store double %56, ptr %57, align 8, !tbaa !11
  %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1
  %exitcond188.not = icmp eq i64 %indvars.iv.next185, %wide.trip.count187
  br i1 %exitcond188.not, label %.preheader137, label %.lr.ph148, !llvm.loop !17

.lr.ph150:                                        ; preds = %.preheader137, %.lr.ph150
  %indvars.iv189 = phi i64 [ %indvars.iv.next190, %.lr.ph150 ], [ 0, %.preheader137 ]
  tail call void (...) @ClearCache() #7
  %58 = tail call double @get_time()
  %59 = tail call i32 @N_VScaleAddMulti(i32 noundef %2, ptr noundef %21, ptr noundef %0, ptr noundef %22, ptr noundef %22) #7
  tail call void @sync_device(ptr noundef %0) #7
  %60 = tail call double @get_time()
  %61 = fsub double %60, %58
  %62 = getelementptr inbounds double, ptr %17, i64 %indvars.iv189
  store double %61, ptr %62, align 8, !tbaa !11
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %63 = load i32, ptr @nextra, align 4, !tbaa !5
  %64 = add nsw i32 %63, %3
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %indvars.iv.next190, %65
  br i1 %66, label %.lr.ph150, label %._crit_edge151, !llvm.loop !18

._crit_edge151:                                   ; preds = %.lr.ph150, %.preheader137
  %.0128.lcssa = phi i32 [ undef, %.preheader137 ], [ %59, %.lr.ph150 ]
  %.lcssa139 = phi i32 [ %48, %.preheader137 ], [ %63, %.lr.ph150 ]
  call void @time_stats(ptr noundef %0, ptr noundef %17, i32 noundef %.lcssa139, i32 noundef %3, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %67 = load i32, ptr @nextra, align 4, !tbaa !5
  call void @time_stats(ptr noundef %0, ptr noundef %18, i32 noundef %67, i32 noundef %3, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %68 = load i32, ptr @print_time, align 4, !tbaa !5
  %.not = icmp eq i32 %68, 0
  br i1 %.not, label %79, label %69

69:                                               ; preds = %._crit_edge151
  %70 = load double, ptr %5, align 8, !tbaa !11
  %71 = load double, ptr %6, align 8, !tbaa !11
  %72 = load double, ptr %7, align 8, !tbaa !11
  %73 = load double, ptr %8, align 8, !tbaa !11
  %74 = load double, ptr %9, align 8, !tbaa !11
  %75 = load double, ptr %10, align 8, !tbaa !11
  %76 = load double, ptr %11, align 8, !tbaa !11
  %77 = load double, ptr %12, align 8, !tbaa !11
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef nonnull @.str.42, double noundef %70, double noundef %71, double noundef %72, double noundef %73, double noundef %74, double noundef %75, double noundef %76, double noundef %77)
  br label %79

79:                                               ; preds = %69, %._crit_edge151
  call void @N_VRand(ptr noundef %0, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  br i1 %24, label %.lr.ph155.preheader, label %.preheader136

.lr.ph155.preheader:                              ; preds = %79
  %wide.trip.count195 = zext nneg i32 %2 to i64
  br label %.lr.ph155

.preheader136:                                    ; preds = %.lr.ph155, %79
  %80 = load i32, ptr @nextra, align 4, !tbaa !5
  %81 = add nsw i32 %80, %3
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %.lr.ph161, label %._crit_edge162

.lr.ph161:                                        ; preds = %.preheader136
  %wide.trip.count200 = zext nneg i32 %2 to i64
  br label %90

.lr.ph155:                                        ; preds = %.lr.ph155.preheader, %.lr.ph155
  %indvars.iv192 = phi i64 [ 0, %.lr.ph155.preheader ], [ %indvars.iv.next193, %.lr.ph155 ]
  %83 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv192
  %84 = load ptr, ptr %83, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %84, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %85 = call i32 @rand() #7
  %86 = sitofp i32 %85 to double
  %87 = fdiv double %86, 0x41DFFFFFFFC00000
  %88 = fadd double %87, 1.000000e+00
  %89 = getelementptr inbounds double, ptr %21, i64 %indvars.iv192
  store double %88, ptr %89, align 8, !tbaa !11
  %indvars.iv.next193 = add nuw nsw i64 %indvars.iv192, 1
  %exitcond196.not = icmp eq i64 %indvars.iv.next193, %wide.trip.count195
  br i1 %exitcond196.not, label %.preheader136, label %.lr.ph155, !llvm.loop !19

90:                                               ; preds = %.lr.ph161, %._crit_edge159
  %indvars.iv202 = phi i64 [ 0, %.lr.ph161 ], [ %indvars.iv.next203, %._crit_edge159 ]
  call void (...) @ClearCache() #7
  %91 = call double @get_time()
  br i1 %24, label %.lr.ph158, label %._crit_edge159

.lr.ph158:                                        ; preds = %90, %.lr.ph158
  %indvars.iv197 = phi i64 [ %indvars.iv.next198, %.lr.ph158 ], [ 0, %90 ]
  %92 = getelementptr inbounds double, ptr %21, i64 %indvars.iv197
  %93 = load double, ptr %92, align 8, !tbaa !11
  %94 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv197
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv197
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  call void @N_VLinearSum(double noundef %93, ptr noundef %0, double noundef 1.000000e+00, ptr noundef %95, ptr noundef %97) #7
  %indvars.iv.next198 = add nuw nsw i64 %indvars.iv197, 1
  %exitcond201.not = icmp eq i64 %indvars.iv.next198, %wide.trip.count200
  br i1 %exitcond201.not, label %._crit_edge159, label %.lr.ph158, !llvm.loop !20

._crit_edge159:                                   ; preds = %.lr.ph158, %90
  call void @sync_device(ptr noundef %0) #7
  %98 = call double @get_time()
  %99 = fsub double %98, %91
  %100 = getelementptr inbounds double, ptr %18, i64 %indvars.iv202
  store double %99, ptr %100, align 8, !tbaa !11
  %indvars.iv.next203 = add nuw nsw i64 %indvars.iv202, 1
  %101 = load i32, ptr @nextra, align 4, !tbaa !5
  %102 = add nsw i32 %101, %3
  %103 = sext i32 %102 to i64
  %104 = icmp slt i64 %indvars.iv.next203, %103
  br i1 %104, label %90, label %._crit_edge162, !llvm.loop !21

._crit_edge162:                                   ; preds = %._crit_edge159, %.preheader136
  call void @N_VRand(ptr noundef %0, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  br i1 %24, label %.lr.ph165.preheader, label %.preheader

.lr.ph165.preheader:                              ; preds = %._crit_edge162
  %wide.trip.count208 = zext nneg i32 %2 to i64
  br label %.lr.ph165

.preheader:                                       ; preds = %.lr.ph165, %._crit_edge162
  %105 = load i32, ptr @nextra, align 4, !tbaa !5
  %106 = add nsw i32 %105, %3
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %.lr.ph167, label %._crit_edge168

.lr.ph165:                                        ; preds = %.lr.ph165.preheader, %.lr.ph165
  %indvars.iv205 = phi i64 [ 0, %.lr.ph165.preheader ], [ %indvars.iv.next206, %.lr.ph165 ]
  %108 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv205
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %109, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %110 = call i32 @rand() #7
  %111 = sitofp i32 %110 to double
  %112 = fdiv double %111, 0x41DFFFFFFFC00000
  %113 = fadd double %112, 1.000000e+00
  %114 = getelementptr inbounds double, ptr %21, i64 %indvars.iv205
  store double %113, ptr %114, align 8, !tbaa !11
  %indvars.iv.next206 = add nuw nsw i64 %indvars.iv205, 1
  %exitcond209.not = icmp eq i64 %indvars.iv.next206, %wide.trip.count208
  br i1 %exitcond209.not, label %.preheader, label %.lr.ph165, !llvm.loop !22

.lr.ph167:                                        ; preds = %.preheader, %.lr.ph167
  %indvars.iv210 = phi i64 [ %indvars.iv.next211, %.lr.ph167 ], [ 0, %.preheader ]
  call void (...) @ClearCache() #7
  %115 = call double @get_time()
  %116 = call i32 @N_VScaleAddMulti(i32 noundef %2, ptr noundef %21, ptr noundef %0, ptr noundef %22, ptr noundef %23) #7
  call void @sync_device(ptr noundef %0) #7
  %117 = call double @get_time()
  %118 = fsub double %117, %115
  %119 = getelementptr inbounds double, ptr %17, i64 %indvars.iv210
  store double %118, ptr %119, align 8, !tbaa !11
  %indvars.iv.next211 = add nuw nsw i64 %indvars.iv210, 1
  %120 = load i32, ptr @nextra, align 4, !tbaa !5
  %121 = add nsw i32 %120, %3
  %122 = sext i32 %121 to i64
  %123 = icmp slt i64 %indvars.iv.next211, %122
  br i1 %123, label %.lr.ph167, label %._crit_edge168, !llvm.loop !23

._crit_edge168:                                   ; preds = %.lr.ph167, %.preheader
  %.1129.lcssa = phi i32 [ %.0128.lcssa, %.preheader ], [ %116, %.lr.ph167 ]
  %.lcssa = phi i32 [ %105, %.preheader ], [ %120, %.lr.ph167 ]
  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)
  %124 = load i32, ptr @nextra, align 4, !tbaa !5
  call void @time_stats(ptr noundef %0, ptr noundef %18, i32 noundef %124, i32 noundef %3, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %125 = load i32, ptr @print_time, align 4, !tbaa !5
  %.not135 = icmp eq i32 %125, 0
  br i1 %.not135, label %136, label %126

126:                                              ; preds = %._crit_edge168
  %127 = load double, ptr %5, align 8, !tbaa !11
  %128 = load double, ptr %6, align 8, !tbaa !11
  %129 = load double, ptr %7, align 8, !tbaa !11
  %130 = load double, ptr %8, align 8, !tbaa !11
  %131 = load double, ptr %9, align 8, !tbaa !11
  %132 = load double, ptr %10, align 8, !tbaa !11
  %133 = load double, ptr %11, align 8, !tbaa !11
  %134 = load double, ptr %12, align 8, !tbaa !11
  %135 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef nonnull @.str.43, double noundef %127, double noundef %128, double noundef %129, double noundef %130, double noundef %131, double noundef %132, double noundef %133, double noundef %134)
  br label %136

136:                                              ; preds = %126, %._crit_edge168
  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 %22, i32 noundef %2) #7
  call void @N_VDestroyVectorArray(ptr noundef %23, 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 %.1129.lcssa
}

declare i32 @N_VScaleAddMulti(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr 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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !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}


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