; 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.51 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [30 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_VScaleAddMultiVectorArray(ptr noundef %0, i64 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %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 double, align 8
  %20 = alloca double, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !11
  store i32 %3, ptr %9, align 4, !tbaa !11
  store i32 %4, ptr %10, align 4, !tbaa !11
  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 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %31 = load i32, ptr %10, align 4, !tbaa !11
  %32 = load i32, ptr @nextra, align 4, !tbaa !11
  %33 = add nsw i32 %31, %32
  %34 = sext i32 %33 to i64
  %35 = mul i64 %34, 8
  %36 = call noalias ptr @malloc(i64 noundef %35) #6
  store ptr %36, ptr %21, align 8, !tbaa !5
  %37 = load i32, ptr %10, align 4, !tbaa !11
  %38 = load i32, ptr @nextra, align 4, !tbaa !11
  %39 = add nsw i32 %37, %38
  %40 = sext i32 %39 to i64
  %41 = mul i64 %40, 8
  %42 = call noalias ptr @malloc(i64 noundef %41) #6
  store ptr %42, ptr %22, align 8, !tbaa !5
  %43 = load i32, ptr %9, align 4, !tbaa !11
  %44 = sext i32 %43 to i64
  %45 = mul i64 %44, 8
  %46 = call noalias ptr @malloc(i64 noundef %45) #6
  store ptr %46, ptr %27, align 8, !tbaa !5
  %47 = load i32, ptr %8, align 4, !tbaa !11
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = call ptr @N_VCloneVectorArray(i32 noundef %47, ptr noundef %48)
  store ptr %49, ptr %28, align 8, !tbaa !5
  %50 = load i32, ptr %9, align 4, !tbaa !11
  %51 = sext i32 %50 to i64
  %52 = mul i64 %51, 8
  %53 = call noalias ptr @malloc(i64 noundef %52) #6
  store ptr %53, ptr %29, align 8, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = mul i64 %55, 8
  %57 = call noalias ptr @malloc(i64 noundef %56) #6
  store ptr %57, ptr %30, align 8, !tbaa !5
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %58

58:                                               ; preds = %77, %5
  %59 = load i32, ptr %24, align 4, !tbaa !11
  %60 = load i32, ptr %9, align 4, !tbaa !11
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %80

62:                                               ; preds = %58
  %63 = load i32, ptr %8, align 4, !tbaa !11
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call ptr @N_VCloneVectorArray(i32 noundef %63, ptr noundef %64)
  %66 = load ptr, ptr %29, align 8, !tbaa !5
  %67 = load i32, ptr %24, align 4, !tbaa !11
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  store ptr %65, ptr %69, align 8, !tbaa !5
  %70 = load i32, ptr %8, align 4, !tbaa !11
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call ptr @N_VCloneVectorArray(i32 noundef %70, ptr noundef %71)
  %73 = load ptr, ptr %30, align 8, !tbaa !5
  %74 = load i32, ptr %24, align 4, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds ptr, ptr %73, i64 %75
  store ptr %72, ptr %76, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %62
  %78 = load i32, ptr %24, align 4, !tbaa !11
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %24, align 4, !tbaa !11
  br label %58, !llvm.loop !13

80:                                               ; preds = %58
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %81

81:                                               ; preds = %94, %80
  %82 = load i32, ptr %24, align 4, !tbaa !11
  %83 = load i32, ptr %9, align 4, !tbaa !11
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %97

85:                                               ; preds = %81
  %86 = call i32 @rand() #5
  %87 = sitofp i32 %86 to double
  %88 = fdiv double %87, 0x41DFFFFFFFC00000
  %89 = fadd double %88, 1.000000e+00
  %90 = load ptr, ptr %27, align 8, !tbaa !5
  %91 = load i32, ptr %24, align 4, !tbaa !11
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds double, ptr %90, i64 %92
  store double %89, ptr %93, align 8, !tbaa !15
  br label %94

94:                                               ; preds = %85
  %95 = load i32, ptr %24, align 4, !tbaa !11
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %24, align 4, !tbaa !11
  br label %81, !llvm.loop !17

97:                                               ; preds = %81
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %98

98:                                               ; preds = %109, %97
  %99 = load i32, ptr %25, align 4, !tbaa !11
  %100 = load i32, ptr %8, align 4, !tbaa !11
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %102, label %112

102:                                              ; preds = %98
  %103 = load ptr, ptr %28, align 8, !tbaa !5
  %104 = load i32, ptr %25, align 4, !tbaa !11
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds ptr, ptr %103, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = load i64, ptr %7, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %107, i64 noundef %108, double noundef -1.000000e+00, double noundef 1.000000e+00)
  br label %109

109:                                              ; preds = %102
  %110 = load i32, ptr %25, align 4, !tbaa !11
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %25, align 4, !tbaa !11
  br label %98, !llvm.loop !18

112:                                              ; preds = %98
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %113

113:                                              ; preds = %137, %112
  %114 = load i32, ptr %24, align 4, !tbaa !11
  %115 = load i32, ptr %9, align 4, !tbaa !11
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %117, label %140

117:                                              ; preds = %113
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %118

118:                                              ; preds = %133, %117
  %119 = load i32, ptr %25, align 4, !tbaa !11
  %120 = load i32, ptr %8, align 4, !tbaa !11
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %122, label %136

122:                                              ; preds = %118
  %123 = load ptr, ptr %29, align 8, !tbaa !5
  %124 = load i32, ptr %24, align 4, !tbaa !11
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds ptr, ptr %123, i64 %125
  %127 = load ptr, ptr %126, align 8, !tbaa !5
  %128 = load i32, ptr %25, 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 %7, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %131, i64 noundef %132, double noundef -1.000000e+00, double noundef 1.000000e+00)
  br label %133

133:                                              ; preds = %122
  %134 = load i32, ptr %25, align 4, !tbaa !11
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %25, align 4, !tbaa !11
  br label %118, !llvm.loop !19

136:                                              ; preds = %118
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %24, align 4, !tbaa !11
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %24, align 4, !tbaa !11
  br label %113, !llvm.loop !20

140:                                              ; preds = %113
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %141

141:                                              ; preds = %204, %140
  %142 = load i32, ptr %23, align 4, !tbaa !11
  %143 = load i32, ptr %10, align 4, !tbaa !11
  %144 = load i32, ptr @nextra, align 4, !tbaa !11
  %145 = add nsw i32 %143, %144
  %146 = icmp slt i32 %142, %145
  br i1 %146, label %147, label %207

147:                                              ; preds = %141
  call void (...) @ClearCache()
  %148 = call double @get_time()
  store double %148, ptr %11, align 8, !tbaa !15
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %149

149:                                              ; preds = %191, %147
  %150 = load i32, ptr %25, align 4, !tbaa !11
  %151 = load i32, ptr %8, align 4, !tbaa !11
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %153, label %194

153:                                              ; preds = %149
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %154

154:                                              ; preds = %187, %153
  %155 = load i32, ptr %24, align 4, !tbaa !11
  %156 = load i32, ptr %9, align 4, !tbaa !11
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %158, label %190

158:                                              ; preds = %154
  %159 = load ptr, ptr %27, align 8, !tbaa !5
  %160 = load i32, ptr %24, align 4, !tbaa !11
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds double, ptr %159, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !15
  %164 = load ptr, ptr %28, align 8, !tbaa !5
  %165 = load i32, ptr %25, align 4, !tbaa !11
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds ptr, ptr %164, i64 %166
  %168 = load ptr, ptr %167, align 8, !tbaa !5
  %169 = load ptr, ptr %29, align 8, !tbaa !5
  %170 = load i32, ptr %24, align 4, !tbaa !11
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds ptr, ptr %169, i64 %171
  %173 = load ptr, ptr %172, align 8, !tbaa !5
  %174 = load i32, ptr %25, align 4, !tbaa !11
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds ptr, ptr %173, i64 %175
  %177 = load ptr, ptr %176, align 8, !tbaa !5
  %178 = load ptr, ptr %29, align 8, !tbaa !5
  %179 = load i32, ptr %24, align 4, !tbaa !11
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds ptr, ptr %178, i64 %180
  %182 = load ptr, ptr %181, align 8, !tbaa !5
  %183 = load i32, ptr %25, align 4, !tbaa !11
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds ptr, ptr %182, i64 %184
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef %163, ptr noundef %168, double noundef 1.000000e+00, ptr noundef %177, ptr noundef %186)
  br label %187

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

190:                                              ; preds = %154
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %25, align 4, !tbaa !11
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %25, align 4, !tbaa !11
  br label %149, !llvm.loop !22

194:                                              ; preds = %149
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sync_device(ptr noundef %195)
  %196 = call double @get_time()
  store double %196, ptr %12, align 8, !tbaa !15
  %197 = load double, ptr %12, align 8, !tbaa !15
  %198 = load double, ptr %11, align 8, !tbaa !15
  %199 = fsub double %197, %198
  %200 = load ptr, ptr %22, align 8, !tbaa !5
  %201 = load i32, ptr %23, align 4, !tbaa !11
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds double, ptr %200, i64 %202
  store double %199, ptr %203, align 8, !tbaa !15
  br label %204

204:                                              ; preds = %194
  %205 = load i32, ptr %23, align 4, !tbaa !11
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %23, align 4, !tbaa !11
  br label %141, !llvm.loop !23

207:                                              ; preds = %141
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %208

208:                                              ; preds = %221, %207
  %209 = load i32, ptr %24, align 4, !tbaa !11
  %210 = load i32, ptr %9, align 4, !tbaa !11
  %211 = icmp slt i32 %209, %210
  br i1 %211, label %212, label %224

212:                                              ; preds = %208
  %213 = call i32 @rand() #5
  %214 = sitofp i32 %213 to double
  %215 = fdiv double %214, 0x41DFFFFFFFC00000
  %216 = fadd double %215, 1.000000e+00
  %217 = load ptr, ptr %27, align 8, !tbaa !5
  %218 = load i32, ptr %24, align 4, !tbaa !11
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds double, ptr %217, i64 %219
  store double %216, ptr %220, align 8, !tbaa !15
  br label %221

221:                                              ; preds = %212
  %222 = load i32, ptr %24, align 4, !tbaa !11
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %24, align 4, !tbaa !11
  br label %208, !llvm.loop !24

224:                                              ; preds = %208
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %225

225:                                              ; preds = %236, %224
  %226 = load i32, ptr %25, align 4, !tbaa !11
  %227 = load i32, ptr %8, align 4, !tbaa !11
  %228 = icmp slt i32 %226, %227
  br i1 %228, label %229, label %239

229:                                              ; preds = %225
  %230 = load ptr, ptr %28, align 8, !tbaa !5
  %231 = load i32, ptr %25, align 4, !tbaa !11
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds ptr, ptr %230, i64 %232
  %234 = load ptr, ptr %233, align 8, !tbaa !5
  %235 = load i64, ptr %7, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %234, i64 noundef %235, double noundef -1.000000e+00, double noundef 1.000000e+00)
  br label %236

236:                                              ; preds = %229
  %237 = load i32, ptr %25, align 4, !tbaa !11
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %25, align 4, !tbaa !11
  br label %225, !llvm.loop !25

239:                                              ; preds = %225
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %240

240:                                              ; preds = %264, %239
  %241 = load i32, ptr %24, align 4, !tbaa !11
  %242 = load i32, ptr %9, align 4, !tbaa !11
  %243 = icmp slt i32 %241, %242
  br i1 %243, label %244, label %267

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

245:                                              ; preds = %260, %244
  %246 = load i32, ptr %25, align 4, !tbaa !11
  %247 = load i32, ptr %8, align 4, !tbaa !11
  %248 = icmp slt i32 %246, %247
  br i1 %248, label %249, label %263

249:                                              ; preds = %245
  %250 = load ptr, ptr %29, align 8, !tbaa !5
  %251 = load i32, ptr %24, align 4, !tbaa !11
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds ptr, ptr %250, i64 %252
  %254 = load ptr, ptr %253, align 8, !tbaa !5
  %255 = load i32, ptr %25, align 4, !tbaa !11
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds ptr, ptr %254, i64 %256
  %258 = load ptr, ptr %257, align 8, !tbaa !5
  %259 = load i64, ptr %7, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %258, i64 noundef %259, double noundef -1.000000e+00, double noundef 1.000000e+00)
  br label %260

260:                                              ; preds = %249
  %261 = load i32, ptr %25, align 4, !tbaa !11
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %25, align 4, !tbaa !11
  br label %245, !llvm.loop !26

263:                                              ; preds = %245
  br label %264

264:                                              ; preds = %263
  %265 = load i32, ptr %24, align 4, !tbaa !11
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %24, align 4, !tbaa !11
  br label %240, !llvm.loop !27

267:                                              ; preds = %240
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %268

268:                                              ; preds = %292, %267
  %269 = load i32, ptr %23, align 4, !tbaa !11
  %270 = load i32, ptr %10, align 4, !tbaa !11
  %271 = load i32, ptr @nextra, align 4, !tbaa !11
  %272 = add nsw i32 %270, %271
  %273 = icmp slt i32 %269, %272
  br i1 %273, label %274, label %295

274:                                              ; preds = %268
  call void (...) @ClearCache()
  %275 = call double @get_time()
  store double %275, ptr %11, align 8, !tbaa !15
  %276 = load i32, ptr %8, align 4, !tbaa !11
  %277 = load i32, ptr %9, align 4, !tbaa !11
  %278 = load ptr, ptr %27, align 8, !tbaa !5
  %279 = load ptr, ptr %28, align 8, !tbaa !5
  %280 = load ptr, ptr %29, align 8, !tbaa !5
  %281 = load ptr, ptr %29, align 8, !tbaa !5
  %282 = call i32 @N_VScaleAddMultiVectorArray(i32 noundef %276, i32 noundef %277, ptr noundef %278, ptr noundef %279, ptr noundef %280, ptr noundef %281)
  store i32 %282, ptr %26, align 4, !tbaa !11
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sync_device(ptr noundef %283)
  %284 = call double @get_time()
  store double %284, ptr %12, align 8, !tbaa !15
  %285 = load double, ptr %12, align 8, !tbaa !15
  %286 = load double, ptr %11, align 8, !tbaa !15
  %287 = fsub double %285, %286
  %288 = load ptr, ptr %21, align 8, !tbaa !5
  %289 = load i32, ptr %23, align 4, !tbaa !11
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds double, ptr %288, i64 %290
  store double %287, ptr %291, align 8, !tbaa !15
  br label %292

292:                                              ; preds = %274
  %293 = load i32, ptr %23, align 4, !tbaa !11
  %294 = add nsw i32 %293, 1
  store i32 %294, ptr %23, align 4, !tbaa !11
  br label %268, !llvm.loop !28

295:                                              ; preds = %268
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = load ptr, ptr %21, align 8, !tbaa !5
  %298 = load i32, ptr @nextra, align 4, !tbaa !11
  %299 = load i32, ptr %10, align 4, !tbaa !11
  call void @time_stats(ptr noundef %296, ptr noundef %297, i32 noundef %298, i32 noundef %299, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16)
  %300 = load ptr, ptr %6, align 8, !tbaa !5
  %301 = load ptr, ptr %22, align 8, !tbaa !5
  %302 = load i32, ptr @nextra, align 4, !tbaa !11
  %303 = load i32, ptr %10, align 4, !tbaa !11
  call void @time_stats(ptr noundef %300, ptr noundef %301, i32 noundef %302, i32 noundef %303, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20)
  %304 = load i32, ptr @print_time, align 4, !tbaa !11
  %305 = icmp ne i32 %304, 0
  br i1 %305, label %306, label %316

306:                                              ; preds = %295
  %307 = load double, ptr %13, align 8, !tbaa !15
  %308 = load double, ptr %14, align 8, !tbaa !15
  %309 = load double, ptr %15, align 8, !tbaa !15
  %310 = load double, ptr %16, align 8, !tbaa !15
  %311 = load double, ptr %17, align 8, !tbaa !15
  %312 = load double, ptr %18, align 8, !tbaa !15
  %313 = load double, ptr %19, align 8, !tbaa !15
  %314 = load double, ptr %20, align 8, !tbaa !15
  %315 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef @.str.51, double noundef %307, double noundef %308, double noundef %309, double noundef %310, double noundef %311, double noundef %312, double noundef %313, double noundef %314)
  br label %316

316:                                              ; preds = %306, %295
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %317

317:                                              ; preds = %330, %316
  %318 = load i32, ptr %24, align 4, !tbaa !11
  %319 = load i32, ptr %9, align 4, !tbaa !11
  %320 = icmp slt i32 %318, %319
  br i1 %320, label %321, label %333

321:                                              ; preds = %317
  %322 = call i32 @rand() #5
  %323 = sitofp i32 %322 to double
  %324 = fdiv double %323, 0x41DFFFFFFFC00000
  %325 = fadd double %324, 1.000000e+00
  %326 = load ptr, ptr %27, align 8, !tbaa !5
  %327 = load i32, ptr %24, align 4, !tbaa !11
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds double, ptr %326, i64 %328
  store double %325, ptr %329, align 8, !tbaa !15
  br label %330

330:                                              ; preds = %321
  %331 = load i32, ptr %24, align 4, !tbaa !11
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %24, align 4, !tbaa !11
  br label %317, !llvm.loop !29

333:                                              ; preds = %317
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %334

334:                                              ; preds = %345, %333
  %335 = load i32, ptr %25, align 4, !tbaa !11
  %336 = load i32, ptr %8, align 4, !tbaa !11
  %337 = icmp slt i32 %335, %336
  br i1 %337, label %338, label %348

338:                                              ; preds = %334
  %339 = load ptr, ptr %28, align 8, !tbaa !5
  %340 = load i32, ptr %25, align 4, !tbaa !11
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds ptr, ptr %339, i64 %341
  %343 = load ptr, ptr %342, align 8, !tbaa !5
  %344 = load i64, ptr %7, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %343, i64 noundef %344, double noundef -1.000000e+00, double noundef 1.000000e+00)
  br label %345

345:                                              ; preds = %338
  %346 = load i32, ptr %25, align 4, !tbaa !11
  %347 = add nsw i32 %346, 1
  store i32 %347, ptr %25, align 4, !tbaa !11
  br label %334, !llvm.loop !30

348:                                              ; preds = %334
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %349

349:                                              ; preds = %373, %348
  %350 = load i32, ptr %24, align 4, !tbaa !11
  %351 = load i32, ptr %9, align 4, !tbaa !11
  %352 = icmp slt i32 %350, %351
  br i1 %352, label %353, label %376

353:                                              ; preds = %349
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %354

354:                                              ; preds = %369, %353
  %355 = load i32, ptr %25, align 4, !tbaa !11
  %356 = load i32, ptr %8, align 4, !tbaa !11
  %357 = icmp slt i32 %355, %356
  br i1 %357, label %358, label %372

358:                                              ; preds = %354
  %359 = load ptr, ptr %29, align 8, !tbaa !5
  %360 = load i32, ptr %24, align 4, !tbaa !11
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds ptr, ptr %359, i64 %361
  %363 = load ptr, ptr %362, align 8, !tbaa !5
  %364 = load i32, ptr %25, align 4, !tbaa !11
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds ptr, ptr %363, i64 %365
  %367 = load ptr, ptr %366, align 8, !tbaa !5
  %368 = load i64, ptr %7, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %367, i64 noundef %368, double noundef -1.000000e+00, double noundef 1.000000e+00)
  br label %369

369:                                              ; preds = %358
  %370 = load i32, ptr %25, align 4, !tbaa !11
  %371 = add nsw i32 %370, 1
  store i32 %371, ptr %25, align 4, !tbaa !11
  br label %354, !llvm.loop !31

372:                                              ; preds = %354
  br label %373

373:                                              ; preds = %372
  %374 = load i32, ptr %24, align 4, !tbaa !11
  %375 = add nsw i32 %374, 1
  store i32 %375, ptr %24, align 4, !tbaa !11
  br label %349, !llvm.loop !32

376:                                              ; preds = %349
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %377

377:                                              ; preds = %440, %376
  %378 = load i32, ptr %23, align 4, !tbaa !11
  %379 = load i32, ptr %10, align 4, !tbaa !11
  %380 = load i32, ptr @nextra, align 4, !tbaa !11
  %381 = add nsw i32 %379, %380
  %382 = icmp slt i32 %378, %381
  br i1 %382, label %383, label %443

383:                                              ; preds = %377
  call void (...) @ClearCache()
  %384 = call double @get_time()
  store double %384, ptr %11, align 8, !tbaa !15
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %385

385:                                              ; preds = %427, %383
  %386 = load i32, ptr %25, align 4, !tbaa !11
  %387 = load i32, ptr %8, align 4, !tbaa !11
  %388 = icmp slt i32 %386, %387
  br i1 %388, label %389, label %430

389:                                              ; preds = %385
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %390

390:                                              ; preds = %423, %389
  %391 = load i32, ptr %24, align 4, !tbaa !11
  %392 = load i32, ptr %9, align 4, !tbaa !11
  %393 = icmp slt i32 %391, %392
  br i1 %393, label %394, label %426

394:                                              ; preds = %390
  %395 = load ptr, ptr %27, align 8, !tbaa !5
  %396 = load i32, ptr %24, align 4, !tbaa !11
  %397 = sext i32 %396 to i64
  %398 = getelementptr inbounds double, ptr %395, i64 %397
  %399 = load double, ptr %398, align 8, !tbaa !15
  %400 = load ptr, ptr %28, align 8, !tbaa !5
  %401 = load i32, ptr %25, align 4, !tbaa !11
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds ptr, ptr %400, i64 %402
  %404 = load ptr, ptr %403, align 8, !tbaa !5
  %405 = load ptr, ptr %29, align 8, !tbaa !5
  %406 = load i32, ptr %24, align 4, !tbaa !11
  %407 = sext i32 %406 to i64
  %408 = getelementptr inbounds ptr, ptr %405, i64 %407
  %409 = load ptr, ptr %408, align 8, !tbaa !5
  %410 = load i32, ptr %25, align 4, !tbaa !11
  %411 = sext i32 %410 to i64
  %412 = getelementptr inbounds ptr, ptr %409, i64 %411
  %413 = load ptr, ptr %412, align 8, !tbaa !5
  %414 = load ptr, ptr %30, align 8, !tbaa !5
  %415 = load i32, ptr %24, align 4, !tbaa !11
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds ptr, ptr %414, i64 %416
  %418 = load ptr, ptr %417, align 8, !tbaa !5
  %419 = load i32, ptr %25, align 4, !tbaa !11
  %420 = sext i32 %419 to i64
  %421 = getelementptr inbounds ptr, ptr %418, i64 %420
  %422 = load ptr, ptr %421, align 8, !tbaa !5
  call void @N_VLinearSum(double noundef %399, ptr noundef %404, double noundef 1.000000e+00, ptr noundef %413, ptr noundef %422)
  br label %423

423:                                              ; preds = %394
  %424 = load i32, ptr %24, align 4, !tbaa !11
  %425 = add nsw i32 %424, 1
  store i32 %425, ptr %24, align 4, !tbaa !11
  br label %390, !llvm.loop !33

426:                                              ; preds = %390
  br label %427

427:                                              ; preds = %426
  %428 = load i32, ptr %25, align 4, !tbaa !11
  %429 = add nsw i32 %428, 1
  store i32 %429, ptr %25, align 4, !tbaa !11
  br label %385, !llvm.loop !34

430:                                              ; preds = %385
  %431 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sync_device(ptr noundef %431)
  %432 = call double @get_time()
  store double %432, ptr %12, align 8, !tbaa !15
  %433 = load double, ptr %12, align 8, !tbaa !15
  %434 = load double, ptr %11, align 8, !tbaa !15
  %435 = fsub double %433, %434
  %436 = load ptr, ptr %22, align 8, !tbaa !5
  %437 = load i32, ptr %23, align 4, !tbaa !11
  %438 = sext i32 %437 to i64
  %439 = getelementptr inbounds double, ptr %436, i64 %438
  store double %435, ptr %439, align 8, !tbaa !15
  br label %440

440:                                              ; preds = %430
  %441 = load i32, ptr %23, align 4, !tbaa !11
  %442 = add nsw i32 %441, 1
  store i32 %442, ptr %23, align 4, !tbaa !11
  br label %377, !llvm.loop !35

443:                                              ; preds = %377
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %444

444:                                              ; preds = %457, %443
  %445 = load i32, ptr %24, align 4, !tbaa !11
  %446 = load i32, ptr %9, align 4, !tbaa !11
  %447 = icmp slt i32 %445, %446
  br i1 %447, label %448, label %460

448:                                              ; preds = %444
  %449 = call i32 @rand() #5
  %450 = sitofp i32 %449 to double
  %451 = fdiv double %450, 0x41DFFFFFFFC00000
  %452 = fadd double %451, 1.000000e+00
  %453 = load ptr, ptr %27, align 8, !tbaa !5
  %454 = load i32, ptr %24, align 4, !tbaa !11
  %455 = sext i32 %454 to i64
  %456 = getelementptr inbounds double, ptr %453, i64 %455
  store double %452, ptr %456, align 8, !tbaa !15
  br label %457

457:                                              ; preds = %448
  %458 = load i32, ptr %24, align 4, !tbaa !11
  %459 = add nsw i32 %458, 1
  store i32 %459, ptr %24, align 4, !tbaa !11
  br label %444, !llvm.loop !36

460:                                              ; preds = %444
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %461

461:                                              ; preds = %472, %460
  %462 = load i32, ptr %25, align 4, !tbaa !11
  %463 = load i32, ptr %8, align 4, !tbaa !11
  %464 = icmp slt i32 %462, %463
  br i1 %464, label %465, label %475

465:                                              ; preds = %461
  %466 = load ptr, ptr %28, align 8, !tbaa !5
  %467 = load i32, ptr %25, 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 i64, ptr %7, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %470, i64 noundef %471, double noundef -1.000000e+00, double noundef 1.000000e+00)
  br label %472

472:                                              ; preds = %465
  %473 = load i32, ptr %25, align 4, !tbaa !11
  %474 = add nsw i32 %473, 1
  store i32 %474, ptr %25, align 4, !tbaa !11
  br label %461, !llvm.loop !37

475:                                              ; preds = %461
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %476

476:                                              ; preds = %500, %475
  %477 = load i32, ptr %24, align 4, !tbaa !11
  %478 = load i32, ptr %9, align 4, !tbaa !11
  %479 = icmp slt i32 %477, %478
  br i1 %479, label %480, label %503

480:                                              ; preds = %476
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %481

481:                                              ; preds = %496, %480
  %482 = load i32, ptr %25, align 4, !tbaa !11
  %483 = load i32, ptr %8, align 4, !tbaa !11
  %484 = icmp slt i32 %482, %483
  br i1 %484, label %485, label %499

485:                                              ; preds = %481
  %486 = load ptr, ptr %29, align 8, !tbaa !5
  %487 = load i32, ptr %24, align 4, !tbaa !11
  %488 = sext i32 %487 to i64
  %489 = getelementptr inbounds ptr, ptr %486, i64 %488
  %490 = load ptr, ptr %489, align 8, !tbaa !5
  %491 = load i32, ptr %25, align 4, !tbaa !11
  %492 = sext i32 %491 to i64
  %493 = getelementptr inbounds ptr, ptr %490, i64 %492
  %494 = load ptr, ptr %493, align 8, !tbaa !5
  %495 = load i64, ptr %7, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %494, i64 noundef %495, double noundef -1.000000e+00, double noundef 1.000000e+00)
  br label %496

496:                                              ; preds = %485
  %497 = load i32, ptr %25, align 4, !tbaa !11
  %498 = add nsw i32 %497, 1
  store i32 %498, ptr %25, align 4, !tbaa !11
  br label %481, !llvm.loop !38

499:                                              ; preds = %481
  br label %500

500:                                              ; preds = %499
  %501 = load i32, ptr %24, align 4, !tbaa !11
  %502 = add nsw i32 %501, 1
  store i32 %502, ptr %24, align 4, !tbaa !11
  br label %476, !llvm.loop !39

503:                                              ; preds = %476
  store i32 0, ptr %23, align 4, !tbaa !11
  br label %504

504:                                              ; preds = %528, %503
  %505 = load i32, ptr %23, align 4, !tbaa !11
  %506 = load i32, ptr %10, align 4, !tbaa !11
  %507 = load i32, ptr @nextra, align 4, !tbaa !11
  %508 = add nsw i32 %506, %507
  %509 = icmp slt i32 %505, %508
  br i1 %509, label %510, label %531

510:                                              ; preds = %504
  call void (...) @ClearCache()
  %511 = call double @get_time()
  store double %511, ptr %11, align 8, !tbaa !15
  %512 = load i32, ptr %8, align 4, !tbaa !11
  %513 = load i32, ptr %9, align 4, !tbaa !11
  %514 = load ptr, ptr %27, align 8, !tbaa !5
  %515 = load ptr, ptr %28, align 8, !tbaa !5
  %516 = load ptr, ptr %29, align 8, !tbaa !5
  %517 = load ptr, ptr %30, align 8, !tbaa !5
  %518 = call i32 @N_VScaleAddMultiVectorArray(i32 noundef %512, i32 noundef %513, ptr noundef %514, ptr noundef %515, ptr noundef %516, ptr noundef %517)
  store i32 %518, ptr %26, align 4, !tbaa !11
  %519 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sync_device(ptr noundef %519)
  %520 = call double @get_time()
  store double %520, ptr %12, align 8, !tbaa !15
  %521 = load double, ptr %12, align 8, !tbaa !15
  %522 = load double, ptr %11, align 8, !tbaa !15
  %523 = fsub double %521, %522
  %524 = load ptr, ptr %21, align 8, !tbaa !5
  %525 = load i32, ptr %23, align 4, !tbaa !11
  %526 = sext i32 %525 to i64
  %527 = getelementptr inbounds double, ptr %524, i64 %526
  store double %523, ptr %527, align 8, !tbaa !15
  br label %528

528:                                              ; preds = %510
  %529 = load i32, ptr %23, align 4, !tbaa !11
  %530 = add nsw i32 %529, 1
  store i32 %530, ptr %23, align 4, !tbaa !11
  br label %504, !llvm.loop !40

531:                                              ; preds = %504
  %532 = load ptr, ptr %6, align 8, !tbaa !5
  %533 = load ptr, ptr %21, align 8, !tbaa !5
  %534 = load i32, ptr @nextra, align 4, !tbaa !11
  %535 = load i32, ptr %10, align 4, !tbaa !11
  call void @time_stats(ptr noundef %532, ptr noundef %533, i32 noundef %534, i32 noundef %535, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16)
  %536 = load ptr, ptr %6, align 8, !tbaa !5
  %537 = load ptr, ptr %22, align 8, !tbaa !5
  %538 = load i32, ptr @nextra, align 4, !tbaa !11
  %539 = load i32, ptr %10, align 4, !tbaa !11
  call void @time_stats(ptr noundef %536, ptr noundef %537, i32 noundef %538, i32 noundef %539, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20)
  %540 = load i32, ptr @print_time, align 4, !tbaa !11
  %541 = icmp ne i32 %540, 0
  br i1 %541, label %542, label %552

542:                                              ; preds = %531
  %543 = load double, ptr %13, align 8, !tbaa !15
  %544 = load double, ptr %14, align 8, !tbaa !15
  %545 = load double, ptr %15, align 8, !tbaa !15
  %546 = load double, ptr %16, align 8, !tbaa !15
  %547 = load double, ptr %17, align 8, !tbaa !15
  %548 = load double, ptr %18, align 8, !tbaa !15
  %549 = load double, ptr %19, align 8, !tbaa !15
  %550 = load double, ptr %20, align 8, !tbaa !15
  %551 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef @.str.52, double noundef %543, double noundef %544, double noundef %545, double noundef %546, double noundef %547, double noundef %548, double noundef %549, double noundef %550)
  br label %552

552:                                              ; preds = %542, %531
  %553 = load ptr, ptr %21, align 8, !tbaa !5
  call void @free(ptr noundef %553) #5
  %554 = load ptr, ptr %22, align 8, !tbaa !5
  call void @free(ptr noundef %554) #5
  %555 = load ptr, ptr %27, align 8, !tbaa !5
  call void @free(ptr noundef %555) #5
  %556 = load ptr, ptr %28, align 8, !tbaa !5
  %557 = load i32, ptr %8, align 4, !tbaa !11
  call void @N_VDestroyVectorArray(ptr noundef %556, i32 noundef %557)
  store i32 0, ptr %24, align 4, !tbaa !11
  br label %558

558:                                              ; preds = %575, %552
  %559 = load i32, ptr %24, align 4, !tbaa !11
  %560 = load i32, ptr %9, align 4, !tbaa !11
  %561 = icmp slt i32 %559, %560
  br i1 %561, label %562, label %578

562:                                              ; preds = %558
  %563 = load ptr, ptr %29, align 8, !tbaa !5
  %564 = load i32, ptr %24, align 4, !tbaa !11
  %565 = sext i32 %564 to i64
  %566 = getelementptr inbounds ptr, ptr %563, i64 %565
  %567 = load ptr, ptr %566, align 8, !tbaa !5
  %568 = load i32, ptr %8, align 4, !tbaa !11
  call void @N_VDestroyVectorArray(ptr noundef %567, i32 noundef %568)
  %569 = load ptr, ptr %30, align 8, !tbaa !5
  %570 = load i32, ptr %24, align 4, !tbaa !11
  %571 = sext i32 %570 to i64
  %572 = getelementptr inbounds ptr, ptr %569, i64 %571
  %573 = load ptr, ptr %572, align 8, !tbaa !5
  %574 = load i32, ptr %8, align 4, !tbaa !11
  call void @N_VDestroyVectorArray(ptr noundef %573, i32 noundef %574)
  br label %575

575:                                              ; preds = %562
  %576 = load i32, ptr %24, align 4, !tbaa !11
  %577 = add nsw i32 %576, 1
  store i32 %577, ptr %24, align 4, !tbaa !11
  br label %558, !llvm.loop !41

578:                                              ; preds = %558
  %579 = load ptr, ptr %29, align 8, !tbaa !5
  call void @free(ptr noundef %579) #5
  %580 = load ptr, ptr %30, align 8, !tbaa !5
  call void @free(ptr noundef %580) #5
  %581 = load i32, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  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
  ret i32 %581
}

declare i32 @N_VScaleAddMultiVectorArray(i32 noundef, 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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!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}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}
!32 = distinct !{!32, !14}
!33 = distinct !{!33, !14}
!34 = distinct !{!34, !14}
!35 = distinct !{!35, !14}
!36 = distinct !{!36, !14}
!37 = distinct !{!37, !14}
!38 = distinct !{!38, !14}
!39 = distinct !{!39, !14}
!40 = distinct !{!40, !14}
!41 = distinct !{!41, !14}


; 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.51 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [30 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_VScaleAddMultiVectorArray(ptr noundef %0, i64 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #3 {
  %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
  %13 = alloca double, align 8
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %14 = load i32, ptr @nextra, align 4, !tbaa !5
  %15 = add nsw i32 %14, %4
  %16 = sext i32 %15 to i64
  %17 = shl nsw i64 %16, 3
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #8
  %19 = tail call noalias ptr @malloc(i64 noundef %17) #8
  %20 = sext i32 %3 to i64
  %21 = shl nsw i64 %20, 3
  %22 = tail call noalias ptr @malloc(i64 noundef %21) #8
  %23 = tail call ptr @N_VCloneVectorArray(i32 noundef %2, ptr noundef %0) #7
  %24 = tail call noalias ptr @malloc(i64 noundef %21) #8
  %25 = tail call noalias ptr @malloc(i64 noundef %21) #8
  %26 = icmp slt i32 %3, 1
  br i1 %26, label %.preheader243, label %.lr.ph.preheader

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

.preheader244:                                    ; preds = %.lr.ph
  br i1 %26, label %.preheader243, label %.lr.ph248.preheader

.lr.ph248.preheader:                              ; preds = %.preheader244
  %wide.trip.count319 = zext nneg i32 %3 to i64
  br label %.lr.ph248

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %27 = tail call ptr @N_VCloneVectorArray(i32 noundef %2, ptr noundef %0) #7
  %28 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv
  store ptr %27, ptr %28, align 8, !tbaa !9
  %29 = tail call ptr @N_VCloneVectorArray(i32 noundef %2, ptr noundef %0) #7
  %30 = getelementptr inbounds ptr, ptr %25, i64 %indvars.iv
  store ptr %29, ptr %30, 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 %.preheader244, label %.lr.ph, !llvm.loop !11

.preheader243:                                    ; preds = %.lr.ph248, %5, %.preheader244
  %31 = icmp slt i32 %2, 1
  br i1 %31, label %.preheader240, label %.lr.ph250.preheader

.lr.ph250.preheader:                              ; preds = %.preheader243
  %wide.trip.count324 = zext nneg i32 %2 to i64
  br label %.lr.ph250

.lr.ph248:                                        ; preds = %.lr.ph248.preheader, %.lr.ph248
  %indvars.iv316 = phi i64 [ 0, %.lr.ph248.preheader ], [ %indvars.iv.next317, %.lr.ph248 ]
  %32 = tail call i32 @rand() #7
  %33 = sitofp i32 %32 to double
  %34 = fdiv double %33, 0x41DFFFFFFFC00000
  %35 = fadd double %34, 1.000000e+00
  %36 = getelementptr inbounds double, ptr %22, i64 %indvars.iv316
  store double %35, ptr %36, align 8, !tbaa !13
  %indvars.iv.next317 = add nuw nsw i64 %indvars.iv316, 1
  %exitcond320.not = icmp eq i64 %indvars.iv.next317, %wide.trip.count319
  br i1 %exitcond320.not, label %.preheader243, label %.lr.ph248, !llvm.loop !15

.preheader242:                                    ; preds = %.lr.ph250
  %brmerge = or i1 %26, %31
  br i1 %brmerge, label %.preheader240, label %.preheader241.us.preheader

.preheader241.us.preheader:                       ; preds = %.preheader242
  %wide.trip.count334 = zext nneg i32 %3 to i64
  %wide.trip.count329 = zext nneg i32 %2 to i64
  br label %.preheader241.us

.preheader241.us:                                 ; preds = %.preheader241.us.preheader, %._crit_edge.us
  %indvars.iv331 = phi i64 [ 0, %.preheader241.us.preheader ], [ %indvars.iv.next332, %._crit_edge.us ]
  %37 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv331
  br label %38

38:                                               ; preds = %.preheader241.us, %38
  %indvars.iv326 = phi i64 [ 0, %.preheader241.us ], [ %indvars.iv.next327, %38 ]
  %39 = load ptr, ptr %37, align 8, !tbaa !9
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv326
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  tail call void @N_VRand(ptr noundef %41, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %indvars.iv.next327 = add nuw nsw i64 %indvars.iv326, 1
  %exitcond330.not = icmp eq i64 %indvars.iv.next327, %wide.trip.count329
  br i1 %exitcond330.not, label %._crit_edge.us, label %38, !llvm.loop !16

._crit_edge.us:                                   ; preds = %38
  %indvars.iv.next332 = add nuw nsw i64 %indvars.iv331, 1
  %exitcond335.not = icmp eq i64 %indvars.iv.next332, %wide.trip.count334
  br i1 %exitcond335.not, label %.preheader240, label %.preheader241.us, !llvm.loop !17

.lr.ph250:                                        ; preds = %.lr.ph250.preheader, %.lr.ph250
  %indvars.iv321 = phi i64 [ 0, %.lr.ph250.preheader ], [ %indvars.iv.next322, %.lr.ph250 ]
  %42 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv321
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  tail call void @N_VRand(ptr noundef %43, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %indvars.iv.next322 = add nuw nsw i64 %indvars.iv321, 1
  %exitcond325.not = icmp eq i64 %indvars.iv.next322, %wide.trip.count324
  br i1 %exitcond325.not, label %.preheader242, label %.lr.ph250, !llvm.loop !18

.preheader240:                                    ; preds = %._crit_edge.us, %.preheader242, %.preheader243
  %44 = load i32, ptr @nextra, align 4, !tbaa !5
  %45 = add nsw i32 %44, %4
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %.lr.ph260, label %.preheader238

.lr.ph260:                                        ; preds = %.preheader240
  %wide.trip.count344 = zext nneg i32 %2 to i64
  %wide.trip.count339 = zext nneg i32 %3 to i64
  %brmerge441 = or i1 %31, %26
  br label %47

.preheader238:                                    ; preds = %._crit_edge257, %.preheader240
  br i1 %26, label %.preheader237.thread, label %.lr.ph262.preheader

.lr.ph262.preheader:                              ; preds = %.preheader238
  %wide.trip.count352 = zext nneg i32 %3 to i64
  br label %.lr.ph262

47:                                               ; preds = %.lr.ph260, %._crit_edge257
  %indvars.iv346 = phi i64 [ 0, %.lr.ph260 ], [ %indvars.iv.next347, %._crit_edge257 ]
  tail call void (...) @ClearCache() #7
  %48 = tail call double @get_time()
  br i1 %brmerge441, label %._crit_edge257, label %.preheader239.us

.preheader239.us:                                 ; preds = %47, %._crit_edge.us258
  %indvars.iv341 = phi i64 [ %indvars.iv.next342, %._crit_edge.us258 ], [ 0, %47 ]
  %49 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv341
  br label %50

50:                                               ; preds = %.preheader239.us, %50
  %indvars.iv336 = phi i64 [ 0, %.preheader239.us ], [ %indvars.iv.next337, %50 ]
  %51 = getelementptr inbounds double, ptr %22, i64 %indvars.iv336
  %52 = load double, ptr %51, align 8, !tbaa !13
  %53 = load ptr, ptr %49, align 8, !tbaa !9
  %54 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv336
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = getelementptr inbounds ptr, ptr %55, i64 %indvars.iv341
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  tail call void @N_VLinearSum(double noundef %52, ptr noundef %53, double noundef 1.000000e+00, ptr noundef %57, ptr noundef %57) #7
  %indvars.iv.next337 = add nuw nsw i64 %indvars.iv336, 1
  %exitcond340.not = icmp eq i64 %indvars.iv.next337, %wide.trip.count339
  br i1 %exitcond340.not, label %._crit_edge.us258, label %50, !llvm.loop !19

._crit_edge.us258:                                ; preds = %50
  %indvars.iv.next342 = add nuw nsw i64 %indvars.iv341, 1
  %exitcond345.not = icmp eq i64 %indvars.iv.next342, %wide.trip.count344
  br i1 %exitcond345.not, label %._crit_edge257, label %.preheader239.us, !llvm.loop !20

._crit_edge257:                                   ; preds = %._crit_edge.us258, %47
  tail call void @sync_device(ptr noundef %0) #7
  %58 = tail call double @get_time()
  %59 = fsub double %58, %48
  %60 = getelementptr inbounds double, ptr %19, i64 %indvars.iv346
  store double %59, ptr %60, align 8, !tbaa !13
  %indvars.iv.next347 = add nuw nsw i64 %indvars.iv346, 1
  %61 = load i32, ptr @nextra, align 4, !tbaa !5
  %62 = add nsw i32 %61, %4
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv.next347, %63
  br i1 %64, label %47, label %.preheader238, !llvm.loop !21

.preheader237:                                    ; preds = %.lr.ph262
  br i1 %31, label %.preheader234, label %.lr.ph264.preheader

.preheader237.thread:                             ; preds = %.preheader238
  br i1 %31, label %.preheader234, label %.lr.ph264.preheader

.lr.ph264.preheader:                              ; preds = %.preheader237.thread, %.preheader237
  %wide.trip.count357 = zext nneg i32 %2 to i64
  br label %.lr.ph264

.lr.ph262:                                        ; preds = %.lr.ph262.preheader, %.lr.ph262
  %indvars.iv349 = phi i64 [ 0, %.lr.ph262.preheader ], [ %indvars.iv.next350, %.lr.ph262 ]
  %65 = tail call i32 @rand() #7
  %66 = sitofp i32 %65 to double
  %67 = fdiv double %66, 0x41DFFFFFFFC00000
  %68 = fadd double %67, 1.000000e+00
  %69 = getelementptr inbounds double, ptr %22, i64 %indvars.iv349
  store double %68, ptr %69, align 8, !tbaa !13
  %indvars.iv.next350 = add nuw nsw i64 %indvars.iv349, 1
  %exitcond353.not = icmp eq i64 %indvars.iv.next350, %wide.trip.count352
  br i1 %exitcond353.not, label %.preheader237, label %.lr.ph262, !llvm.loop !22

.preheader236:                                    ; preds = %.lr.ph264
  %brmerge444 = or i1 %26, %31
  br i1 %brmerge444, label %.preheader234, label %.preheader235.us.preheader

.preheader235.us.preheader:                       ; preds = %.preheader236
  %wide.trip.count367 = zext nneg i32 %3 to i64
  %wide.trip.count362 = zext nneg i32 %2 to i64
  br label %.preheader235.us

.preheader235.us:                                 ; preds = %.preheader235.us.preheader, %._crit_edge.us268
  %indvars.iv364 = phi i64 [ 0, %.preheader235.us.preheader ], [ %indvars.iv.next365, %._crit_edge.us268 ]
  %70 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv364
  br label %71

71:                                               ; preds = %.preheader235.us, %71
  %indvars.iv359 = phi i64 [ 0, %.preheader235.us ], [ %indvars.iv.next360, %71 ]
  %72 = load ptr, ptr %70, align 8, !tbaa !9
  %73 = getelementptr inbounds ptr, ptr %72, i64 %indvars.iv359
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  tail call void @N_VRand(ptr noundef %74, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %indvars.iv.next360 = add nuw nsw i64 %indvars.iv359, 1
  %exitcond363.not = icmp eq i64 %indvars.iv.next360, %wide.trip.count362
  br i1 %exitcond363.not, label %._crit_edge.us268, label %71, !llvm.loop !23

._crit_edge.us268:                                ; preds = %71
  %indvars.iv.next365 = add nuw nsw i64 %indvars.iv364, 1
  %exitcond368.not = icmp eq i64 %indvars.iv.next365, %wide.trip.count367
  br i1 %exitcond368.not, label %.preheader234, label %.preheader235.us, !llvm.loop !24

.lr.ph264:                                        ; preds = %.lr.ph264.preheader, %.lr.ph264
  %indvars.iv354 = phi i64 [ 0, %.lr.ph264.preheader ], [ %indvars.iv.next355, %.lr.ph264 ]
  %75 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv354
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  tail call void @N_VRand(ptr noundef %76, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %indvars.iv.next355 = add nuw nsw i64 %indvars.iv354, 1
  %exitcond358.not = icmp eq i64 %indvars.iv.next355, %wide.trip.count357
  br i1 %exitcond358.not, label %.preheader236, label %.lr.ph264, !llvm.loop !25

.preheader234:                                    ; preds = %._crit_edge.us268, %.preheader236, %.preheader237, %.preheader237.thread
  %77 = load i32, ptr @nextra, align 4, !tbaa !5
  %78 = add nsw i32 %77, %4
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %.lr.ph270, label %._crit_edge

.lr.ph270:                                        ; preds = %.preheader234, %.lr.ph270
  %indvars.iv369 = phi i64 [ %indvars.iv.next370, %.lr.ph270 ], [ 0, %.preheader234 ]
  tail call void (...) @ClearCache() #7
  %80 = tail call double @get_time()
  %81 = tail call i32 @N_VScaleAddMultiVectorArray(i32 noundef %2, i32 noundef %3, ptr noundef %22, ptr noundef %23, ptr noundef %24, ptr noundef %24) #7
  tail call void @sync_device(ptr noundef %0) #7
  %82 = tail call double @get_time()
  %83 = fsub double %82, %80
  %84 = getelementptr inbounds double, ptr %18, i64 %indvars.iv369
  store double %83, ptr %84, align 8, !tbaa !13
  %indvars.iv.next370 = add nuw nsw i64 %indvars.iv369, 1
  %85 = load i32, ptr @nextra, align 4, !tbaa !5
  %86 = add nsw i32 %85, %4
  %87 = sext i32 %86 to i64
  %88 = icmp slt i64 %indvars.iv.next370, %87
  br i1 %88, label %.lr.ph270, label %._crit_edge, !llvm.loop !26

._crit_edge:                                      ; preds = %.lr.ph270, %.preheader234
  %.0210.lcssa = phi i32 [ undef, %.preheader234 ], [ %81, %.lr.ph270 ]
  %.lcssa245 = phi i32 [ %77, %.preheader234 ], [ %85, %.lr.ph270 ]
  call void @time_stats(ptr noundef %0, ptr noundef %18, i32 noundef %.lcssa245, i32 noundef %4, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %89 = load i32, ptr @nextra, align 4, !tbaa !5
  call void @time_stats(ptr noundef %0, ptr noundef %19, i32 noundef %89, i32 noundef %4, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %90 = load i32, ptr @print_time, align 4, !tbaa !5
  %.not = icmp eq i32 %90, 0
  br i1 %.not, label %101, label %91

91:                                               ; preds = %._crit_edge
  %92 = load double, ptr %6, align 8, !tbaa !13
  %93 = load double, ptr %7, align 8, !tbaa !13
  %94 = load double, ptr %8, align 8, !tbaa !13
  %95 = load double, ptr %9, align 8, !tbaa !13
  %96 = load double, ptr %10, align 8, !tbaa !13
  %97 = load double, ptr %11, align 8, !tbaa !13
  %98 = load double, ptr %12, align 8, !tbaa !13
  %99 = load double, ptr %13, align 8, !tbaa !13
  %100 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef nonnull @.str.51, double noundef %92, double noundef %93, double noundef %94, double noundef %95, double noundef %96, double noundef %97, double noundef %98, double noundef %99)
  br label %101

101:                                              ; preds = %91, %._crit_edge
  br i1 %26, label %.preheader233.thread, label %.lr.ph274.preheader

.lr.ph274.preheader:                              ; preds = %101
  %wide.trip.count375 = zext nneg i32 %3 to i64
  br label %.lr.ph274

.preheader233:                                    ; preds = %.lr.ph274
  br i1 %31, label %.preheader230, label %.lr.ph276.preheader

.preheader233.thread:                             ; preds = %101
  br i1 %31, label %.preheader230, label %.lr.ph276.preheader

.lr.ph276.preheader:                              ; preds = %.preheader233.thread, %.preheader233
  %wide.trip.count380 = zext nneg i32 %2 to i64
  br label %.lr.ph276

.lr.ph274:                                        ; preds = %.lr.ph274.preheader, %.lr.ph274
  %indvars.iv372 = phi i64 [ 0, %.lr.ph274.preheader ], [ %indvars.iv.next373, %.lr.ph274 ]
  %102 = call i32 @rand() #7
  %103 = sitofp i32 %102 to double
  %104 = fdiv double %103, 0x41DFFFFFFFC00000
  %105 = fadd double %104, 1.000000e+00
  %106 = getelementptr inbounds double, ptr %22, i64 %indvars.iv372
  store double %105, ptr %106, align 8, !tbaa !13
  %indvars.iv.next373 = add nuw nsw i64 %indvars.iv372, 1
  %exitcond376.not = icmp eq i64 %indvars.iv.next373, %wide.trip.count375
  br i1 %exitcond376.not, label %.preheader233, label %.lr.ph274, !llvm.loop !27

.preheader232:                                    ; preds = %.lr.ph276
  %brmerge447 = or i1 %26, %31
  br i1 %brmerge447, label %.preheader230, label %.preheader231.us.preheader

.preheader231.us.preheader:                       ; preds = %.preheader232
  %wide.trip.count390 = zext nneg i32 %3 to i64
  %wide.trip.count385 = zext nneg i32 %2 to i64
  br label %.preheader231.us

.preheader231.us:                                 ; preds = %.preheader231.us.preheader, %._crit_edge279.us
  %indvars.iv387 = phi i64 [ 0, %.preheader231.us.preheader ], [ %indvars.iv.next388, %._crit_edge279.us ]
  %107 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv387
  br label %108

108:                                              ; preds = %.preheader231.us, %108
  %indvars.iv382 = phi i64 [ 0, %.preheader231.us ], [ %indvars.iv.next383, %108 ]
  %109 = load ptr, ptr %107, align 8, !tbaa !9
  %110 = getelementptr inbounds ptr, ptr %109, i64 %indvars.iv382
  %111 = load ptr, ptr %110, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %111, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %indvars.iv.next383 = add nuw nsw i64 %indvars.iv382, 1
  %exitcond386.not = icmp eq i64 %indvars.iv.next383, %wide.trip.count385
  br i1 %exitcond386.not, label %._crit_edge279.us, label %108, !llvm.loop !28

._crit_edge279.us:                                ; preds = %108
  %indvars.iv.next388 = add nuw nsw i64 %indvars.iv387, 1
  %exitcond391.not = icmp eq i64 %indvars.iv.next388, %wide.trip.count390
  br i1 %exitcond391.not, label %.preheader230, label %.preheader231.us, !llvm.loop !29

.lr.ph276:                                        ; preds = %.lr.ph276.preheader, %.lr.ph276
  %indvars.iv377 = phi i64 [ 0, %.lr.ph276.preheader ], [ %indvars.iv.next378, %.lr.ph276 ]
  %112 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv377
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %113, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %indvars.iv.next378 = add nuw nsw i64 %indvars.iv377, 1
  %exitcond381.not = icmp eq i64 %indvars.iv.next378, %wide.trip.count380
  br i1 %exitcond381.not, label %.preheader232, label %.lr.ph276, !llvm.loop !30

.preheader230:                                    ; preds = %._crit_edge279.us, %.preheader232, %.preheader233, %.preheader233.thread
  %114 = load i32, ptr @nextra, align 4, !tbaa !5
  %115 = add nsw i32 %114, %4
  %116 = icmp sgt i32 %115, 0
  br i1 %116, label %.lr.ph287, label %.preheader228

.lr.ph287:                                        ; preds = %.preheader230
  %wide.trip.count400 = zext nneg i32 %2 to i64
  %wide.trip.count395 = zext nneg i32 %3 to i64
  %brmerge450 = or i1 %31, %26
  br label %117

.preheader228:                                    ; preds = %._crit_edge285, %.preheader230
  br i1 %26, label %.preheader227.thread, label %.lr.ph289.preheader

.lr.ph289.preheader:                              ; preds = %.preheader228
  %wide.trip.count408 = zext nneg i32 %3 to i64
  br label %.lr.ph289

117:                                              ; preds = %.lr.ph287, %._crit_edge285
  %indvars.iv402 = phi i64 [ 0, %.lr.ph287 ], [ %indvars.iv.next403, %._crit_edge285 ]
  call void (...) @ClearCache() #7
  %118 = call double @get_time()
  br i1 %brmerge450, label %._crit_edge285, label %.preheader229.us

.preheader229.us:                                 ; preds = %117, %._crit_edge283.us
  %indvars.iv397 = phi i64 [ %indvars.iv.next398, %._crit_edge283.us ], [ 0, %117 ]
  %119 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv397
  br label %120

120:                                              ; preds = %.preheader229.us, %120
  %indvars.iv392 = phi i64 [ 0, %.preheader229.us ], [ %indvars.iv.next393, %120 ]
  %121 = getelementptr inbounds double, ptr %22, i64 %indvars.iv392
  %122 = load double, ptr %121, align 8, !tbaa !13
  %123 = load ptr, ptr %119, align 8, !tbaa !9
  %124 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv392
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = getelementptr inbounds ptr, ptr %125, i64 %indvars.iv397
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  %128 = getelementptr inbounds ptr, ptr %25, i64 %indvars.iv392
  %129 = load ptr, ptr %128, align 8, !tbaa !9
  %130 = getelementptr inbounds ptr, ptr %129, i64 %indvars.iv397
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  call void @N_VLinearSum(double noundef %122, ptr noundef %123, double noundef 1.000000e+00, ptr noundef %127, ptr noundef %131) #7
  %indvars.iv.next393 = add nuw nsw i64 %indvars.iv392, 1
  %exitcond396.not = icmp eq i64 %indvars.iv.next393, %wide.trip.count395
  br i1 %exitcond396.not, label %._crit_edge283.us, label %120, !llvm.loop !31

._crit_edge283.us:                                ; preds = %120
  %indvars.iv.next398 = add nuw nsw i64 %indvars.iv397, 1
  %exitcond401.not = icmp eq i64 %indvars.iv.next398, %wide.trip.count400
  br i1 %exitcond401.not, label %._crit_edge285, label %.preheader229.us, !llvm.loop !32

._crit_edge285:                                   ; preds = %._crit_edge283.us, %117
  call void @sync_device(ptr noundef %0) #7
  %132 = call double @get_time()
  %133 = fsub double %132, %118
  %134 = getelementptr inbounds double, ptr %19, i64 %indvars.iv402
  store double %133, ptr %134, align 8, !tbaa !13
  %indvars.iv.next403 = add nuw nsw i64 %indvars.iv402, 1
  %135 = load i32, ptr @nextra, align 4, !tbaa !5
  %136 = add nsw i32 %135, %4
  %137 = sext i32 %136 to i64
  %138 = icmp slt i64 %indvars.iv.next403, %137
  br i1 %138, label %117, label %.preheader228, !llvm.loop !33

.preheader227:                                    ; preds = %.lr.ph289
  br i1 %31, label %.preheader, label %.lr.ph291.preheader

.preheader227.thread:                             ; preds = %.preheader228
  br i1 %31, label %.preheader, label %.lr.ph291.preheader

.lr.ph291.preheader:                              ; preds = %.preheader227.thread, %.preheader227
  %wide.trip.count413 = zext nneg i32 %2 to i64
  br label %.lr.ph291

.lr.ph289:                                        ; preds = %.lr.ph289.preheader, %.lr.ph289
  %indvars.iv405 = phi i64 [ 0, %.lr.ph289.preheader ], [ %indvars.iv.next406, %.lr.ph289 ]
  %139 = call i32 @rand() #7
  %140 = sitofp i32 %139 to double
  %141 = fdiv double %140, 0x41DFFFFFFFC00000
  %142 = fadd double %141, 1.000000e+00
  %143 = getelementptr inbounds double, ptr %22, i64 %indvars.iv405
  store double %142, ptr %143, align 8, !tbaa !13
  %indvars.iv.next406 = add nuw nsw i64 %indvars.iv405, 1
  %exitcond409.not = icmp eq i64 %indvars.iv.next406, %wide.trip.count408
  br i1 %exitcond409.not, label %.preheader227, label %.lr.ph289, !llvm.loop !34

.preheader226:                                    ; preds = %.lr.ph291
  %brmerge453 = or i1 %26, %31
  br i1 %brmerge453, label %.preheader, label %.preheader225.us.preheader

.preheader225.us.preheader:                       ; preds = %.preheader226
  %wide.trip.count423 = zext nneg i32 %3 to i64
  %wide.trip.count418 = zext nneg i32 %2 to i64
  br label %.preheader225.us

.preheader225.us:                                 ; preds = %.preheader225.us.preheader, %._crit_edge294.us
  %indvars.iv420 = phi i64 [ 0, %.preheader225.us.preheader ], [ %indvars.iv.next421, %._crit_edge294.us ]
  %144 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv420
  br label %145

145:                                              ; preds = %.preheader225.us, %145
  %indvars.iv415 = phi i64 [ 0, %.preheader225.us ], [ %indvars.iv.next416, %145 ]
  %146 = load ptr, ptr %144, align 8, !tbaa !9
  %147 = getelementptr inbounds ptr, ptr %146, i64 %indvars.iv415
  %148 = load ptr, ptr %147, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %148, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %indvars.iv.next416 = add nuw nsw i64 %indvars.iv415, 1
  %exitcond419.not = icmp eq i64 %indvars.iv.next416, %wide.trip.count418
  br i1 %exitcond419.not, label %._crit_edge294.us, label %145, !llvm.loop !35

._crit_edge294.us:                                ; preds = %145
  %indvars.iv.next421 = add nuw nsw i64 %indvars.iv420, 1
  %exitcond424.not = icmp eq i64 %indvars.iv.next421, %wide.trip.count423
  br i1 %exitcond424.not, label %.preheader, label %.preheader225.us, !llvm.loop !36

.lr.ph291:                                        ; preds = %.lr.ph291.preheader, %.lr.ph291
  %indvars.iv410 = phi i64 [ 0, %.lr.ph291.preheader ], [ %indvars.iv.next411, %.lr.ph291 ]
  %149 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv410
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  call void @N_VRand(ptr noundef %150, i64 noundef %1, double noundef -1.000000e+00, double noundef 1.000000e+00) #7
  %indvars.iv.next411 = add nuw nsw i64 %indvars.iv410, 1
  %exitcond414.not = icmp eq i64 %indvars.iv.next411, %wide.trip.count413
  br i1 %exitcond414.not, label %.preheader226, label %.lr.ph291, !llvm.loop !37

.preheader:                                       ; preds = %._crit_edge294.us, %.preheader226, %.preheader227, %.preheader227.thread
  %151 = load i32, ptr @nextra, align 4, !tbaa !5
  %152 = add nsw i32 %151, %4
  %153 = icmp sgt i32 %152, 0
  br i1 %153, label %.lr.ph297, label %._crit_edge298

.lr.ph297:                                        ; preds = %.preheader, %.lr.ph297
  %indvars.iv425 = phi i64 [ %indvars.iv.next426, %.lr.ph297 ], [ 0, %.preheader ]
  call void (...) @ClearCache() #7
  %154 = call double @get_time()
  %155 = call i32 @N_VScaleAddMultiVectorArray(i32 noundef %2, i32 noundef %3, ptr noundef %22, ptr noundef %23, ptr noundef %24, ptr noundef %25) #7
  call void @sync_device(ptr noundef %0) #7
  %156 = call double @get_time()
  %157 = fsub double %156, %154
  %158 = getelementptr inbounds double, ptr %18, i64 %indvars.iv425
  store double %157, ptr %158, align 8, !tbaa !13
  %indvars.iv.next426 = add nuw nsw i64 %indvars.iv425, 1
  %159 = load i32, ptr @nextra, align 4, !tbaa !5
  %160 = add nsw i32 %159, %4
  %161 = sext i32 %160 to i64
  %162 = icmp slt i64 %indvars.iv.next426, %161
  br i1 %162, label %.lr.ph297, label %._crit_edge298, !llvm.loop !38

._crit_edge298:                                   ; preds = %.lr.ph297, %.preheader
  %.1211.lcssa = phi i32 [ %.0210.lcssa, %.preheader ], [ %155, %.lr.ph297 ]
  %.lcssa = phi i32 [ %151, %.preheader ], [ %159, %.lr.ph297 ]
  call void @time_stats(ptr noundef %0, ptr noundef %18, i32 noundef %.lcssa, i32 noundef %4, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %163 = load i32, ptr @nextra, align 4, !tbaa !5
  call void @time_stats(ptr noundef %0, ptr noundef %19, i32 noundef %163, i32 noundef %4, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %164 = load i32, ptr @print_time, align 4, !tbaa !5
  %.not224 = icmp eq i32 %164, 0
  br i1 %.not224, label %175, label %165

165:                                              ; preds = %._crit_edge298
  %166 = load double, ptr %6, align 8, !tbaa !13
  %167 = load double, ptr %7, align 8, !tbaa !13
  %168 = load double, ptr %8, align 8, !tbaa !13
  %169 = load double, ptr %9, align 8, !tbaa !13
  %170 = load double, ptr %10, align 8, !tbaa !13
  %171 = load double, ptr %11, align 8, !tbaa !13
  %172 = load double, ptr %12, align 8, !tbaa !13
  %173 = load double, ptr %13, align 8, !tbaa !13
  %174 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef nonnull @.str.52, double noundef %166, double noundef %167, double noundef %168, double noundef %169, double noundef %170, double noundef %171, double noundef %172, double noundef %173)
  br label %175

175:                                              ; preds = %165, %._crit_edge298
  call void @free(ptr noundef %18) #7
  call void @free(ptr noundef %19) #7
  call void @free(ptr noundef %22) #7
  call void @N_VDestroyVectorArray(ptr noundef %23, i32 noundef %2) #7
  br i1 %26, label %._crit_edge304, label %.lr.ph303.preheader

.lr.ph303.preheader:                              ; preds = %175
  %wide.trip.count431 = zext nneg i32 %3 to i64
  br label %.lr.ph303

.lr.ph303:                                        ; preds = %.lr.ph303.preheader, %.lr.ph303
  %indvars.iv428 = phi i64 [ 0, %.lr.ph303.preheader ], [ %indvars.iv.next429, %.lr.ph303 ]
  %176 = getelementptr inbounds ptr, ptr %24, i64 %indvars.iv428
  %177 = load ptr, ptr %176, align 8, !tbaa !9
  call void @N_VDestroyVectorArray(ptr noundef %177, i32 noundef %2) #7
  %178 = getelementptr inbounds ptr, ptr %25, i64 %indvars.iv428
  %179 = load ptr, ptr %178, align 8, !tbaa !9
  call void @N_VDestroyVectorArray(ptr noundef %179, i32 noundef %2) #7
  %indvars.iv.next429 = add nuw nsw i64 %indvars.iv428, 1
  %exitcond432.not = icmp eq i64 %indvars.iv.next429, %wide.trip.count431
  br i1 %exitcond432.not, label %._crit_edge304, label %.lr.ph303, !llvm.loop !39

._crit_edge304:                                   ; preds = %.lr.ph303, %175
  call void @free(ptr noundef %24) #7
  call void @free(ptr noundef %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #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
  ret i32 %.1211.lcssa
}

declare i32 @N_VScaleAddMultiVectorArray(i32 noundef, 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = distinct !{!31, !12}
!32 = distinct !{!32, !12}
!33 = distinct !{!33, !12}
!34 = distinct !{!34, !12}
!35 = distinct !{!35, !12}
!36 = distinct !{!36, !12}
!37 = distinct !{!37, !12}
!38 = distinct !{!38, !12}
!39 = distinct !{!39, !12}


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