; LLVM IR from mobile-algorithm-optimization/guide :: OpenCLTranspose (main)

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

%struct.timeval = type { i64, i64 }

@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.timeval, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca [3 x i64], align 16
  %22 = alloca [3 x i64], align 16
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %25 = call noundef ptr @_Z13CreateContextPP13_cl_device_id(ptr noundef %2)
  store ptr %25, ptr %3, align 8, !tbaa !9
  %26 = load ptr, ptr %3, align 8, !tbaa !9
  %27 = icmp eq ptr null, %26
  br i1 %27, label %28, label %30

28:                                               ; preds = %0
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %205

30:                                               ; preds = %0
  %31 = load ptr, ptr %3, align 8, !tbaa !9
  %32 = load ptr, ptr %2, align 8, !tbaa !9
  %33 = call noundef ptr @_Z18CreateCommandQueueP11_cl_contextP13_cl_device_id(ptr noundef %31, ptr noundef %32)
  store ptr %33, ptr %4, align 8, !tbaa !9
  %34 = load ptr, ptr %4, align 8, !tbaa !9
  %35 = icmp eq ptr null, %34
  br i1 %35, label %36, label %38

36:                                               ; preds = %30
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %205

38:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %39 = call noundef ptr @_Z22ClUtilReadFileToStringPKc(ptr noundef @.str.2)
  store ptr %39, ptr %13, align 8, !tbaa !9
  %40 = load ptr, ptr %3, align 8, !tbaa !9
  %41 = load ptr, ptr %2, align 8, !tbaa !9
  %42 = load ptr, ptr %13, align 8, !tbaa !9
  %43 = call noundef ptr @_Z13CreateProgramP11_cl_contextP13_cl_device_idPc(ptr noundef %40, ptr noundef %41, ptr noundef %42)
  store ptr %43, ptr %5, align 8, !tbaa !9
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = icmp eq ptr null, %44
  br i1 %45, label %46, label %48

46:                                               ; preds = %38
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %204

48:                                               ; preds = %38
  %49 = load ptr, ptr %5, align 8, !tbaa !9
  %50 = load ptr, ptr %2, align 8, !tbaa !9
  %51 = call noundef ptr @_Z12CreateKernelP11_cl_programPKcP13_cl_device_id(ptr noundef %49, ptr noundef @.str.3, ptr noundef %50)
  store ptr %51, ptr %6, align 8, !tbaa !9
  %52 = load ptr, ptr %6, align 8, !tbaa !9
  %53 = icmp eq ptr null, %52
  br i1 %53, label %54, label %56

54:                                               ; preds = %48
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %204

56:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 30, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 4096, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 4096, ptr %16, align 4, !tbaa !5
  %57 = load i32, ptr %15, align 4, !tbaa !5
  %58 = load i32, ptr %16, align 4, !tbaa !5
  %59 = mul nsw i32 %57, %58
  %60 = sext i32 %59 to i64
  %61 = mul i64 %60, 1
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = call noalias ptr @malloc(i64 noundef %64) #9
  store ptr %65, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = zext i32 %66 to i64
  %68 = call noalias ptr @malloc(i64 noundef %67) #9
  store ptr %68, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %69 = load i32, ptr %10, align 4, !tbaa !5
  %70 = zext i32 %69 to i64
  %71 = call noalias ptr @malloc(i64 noundef %70) #9
  store ptr %71, ptr %19, align 8, !tbaa !9
  %72 = load ptr, ptr %19, align 8, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !5
  %74 = zext i32 %73 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %72, i8 0, i64 %74, i1 false)
  %75 = load ptr, ptr %17, align 8, !tbaa !9
  %76 = load i32, ptr %15, align 4, !tbaa !5
  %77 = load i32, ptr %16, align 4, !tbaa !5
  call void @_Z8DataInitPhii(ptr noundef %75, i32 noundef %76, i32 noundef %77)
  %78 = load i32, ptr %15, align 4, !tbaa !5
  %79 = load i32, ptr %16, align 4, !tbaa !5
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %78, i32 noundef %79)
  %81 = call i32 @gettimeofday(ptr noundef %11, ptr noundef null) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %91, %56
  %83 = load i32, ptr %20, align 4, !tbaa !5
  %84 = icmp slt i32 %83, 30
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %94

86:                                               ; preds = %82
  %87 = load ptr, ptr %17, align 8, !tbaa !9
  %88 = load ptr, ptr %18, align 8, !tbaa !9
  %89 = load i32, ptr %15, align 4, !tbaa !5
  %90 = load i32, ptr %16, align 4, !tbaa !5
  call void @_Z12CpuTransposePhS_ii(ptr noundef %87, ptr noundef %88, i32 noundef %89, i32 noundef %90)
  br label %91

91:                                               ; preds = %86
  %92 = load i32, ptr %20, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %20, align 4, !tbaa !5
  br label %82, !llvm.loop !11

94:                                               ; preds = %85
  call void @_Z13PrintDurationP7timevalPKci(ptr noundef %11, ptr noundef @.str.6, i32 noundef 30)
  %95 = load ptr, ptr %3, align 8, !tbaa !9
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = zext i32 %96 to i64
  %98 = load ptr, ptr %17, align 8, !tbaa !9
  %99 = call ptr @clCreateBuffer(ptr noundef %95, i64 noundef 36, i64 noundef %97, ptr noundef %98, ptr noundef %9)
  store ptr %99, ptr %7, align 8, !tbaa !9
  %100 = load i32, ptr %9, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %100, ptr noundef @.str.7)
  %101 = load ptr, ptr %3, align 8, !tbaa !9
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = zext i32 %102 to i64
  %104 = call ptr @clCreateBuffer(ptr noundef %101, i64 noundef 2, i64 noundef %103, ptr noundef null, ptr noundef %9)
  store ptr %104, ptr %8, align 8, !tbaa !9
  %105 = load i32, ptr %9, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %105, ptr noundef @.str.8)
  %106 = load ptr, ptr %6, align 8, !tbaa !9
  %107 = call i32 @clSetKernelArg(ptr noundef %106, i32 noundef 0, i64 noundef 8, ptr noundef %7)
  store i32 %107, ptr %9, align 4, !tbaa !5
  %108 = load ptr, ptr %6, align 8, !tbaa !9
  %109 = call i32 @clSetKernelArg(ptr noundef %108, i32 noundef 1, i64 noundef 8, ptr noundef %8)
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = or i32 %110, %109
  store i32 %111, ptr %9, align 4, !tbaa !5
  %112 = load ptr, ptr %6, align 8, !tbaa !9
  %113 = call i32 @clSetKernelArg(ptr noundef %112, i32 noundef 2, i64 noundef 4, ptr noundef %15)
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = or i32 %114, %113
  store i32 %115, ptr %9, align 4, !tbaa !5
  %116 = load ptr, ptr %6, align 8, !tbaa !9
  %117 = call i32 @clSetKernelArg(ptr noundef %116, i32 noundef 3, i64 noundef 4, ptr noundef %16)
  %118 = load i32, ptr %9, align 4, !tbaa !5
  %119 = or i32 %118, %117
  store i32 %119, ptr %9, align 4, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %120, ptr noundef @.str.9)
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #8
  %121 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 0
  store i64 16, ptr %121, align 16, !tbaa !13
  %122 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 1
  store i64 16, ptr %122, align 8, !tbaa !13
  %123 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 2
  store i64 0, ptr %123, align 16, !tbaa !13
  %124 = load i32, ptr %15, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 0
  %127 = load i64, ptr %126, align 16, !tbaa !13
  %128 = add i64 %125, %127
  %129 = sub i64 %128, 1
  %130 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 0
  %131 = load i64, ptr %130, align 16, !tbaa !13
  %132 = udiv i64 %129, %131
  %133 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 0
  %134 = load i64, ptr %133, align 16, !tbaa !13
  %135 = mul i64 %132, %134
  %136 = getelementptr inbounds [3 x i64], ptr %21, i64 0, i64 0
  store i64 %135, ptr %136, align 16, !tbaa !13
  %137 = load i32, ptr %16, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 1
  %140 = load i64, ptr %139, align 8, !tbaa !13
  %141 = add i64 %138, %140
  %142 = sub i64 %141, 1
  %143 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 1
  %144 = load i64, ptr %143, align 8, !tbaa !13
  %145 = udiv i64 %142, %144
  %146 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 1
  %147 = load i64, ptr %146, align 8, !tbaa !13
  %148 = mul i64 %145, %147
  %149 = getelementptr inbounds [3 x i64], ptr %21, i64 0, i64 1
  store i64 %148, ptr %149, align 8, !tbaa !13
  %150 = getelementptr inbounds [3 x i64], ptr %21, i64 0, i64 2
  store i64 0, ptr %150, align 16, !tbaa !13
  %151 = getelementptr inbounds [3 x i64], ptr %21, i64 0, i64 0
  %152 = load i64, ptr %151, align 16, !tbaa !13
  %153 = getelementptr inbounds [3 x i64], ptr %21, i64 0, i64 1
  %154 = load i64, ptr %153, align 8, !tbaa !13
  %155 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i64 noundef %152, i64 noundef %154)
  %156 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 0
  %157 = load i64, ptr %156, align 16, !tbaa !13
  %158 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 1
  %159 = load i64, ptr %158, align 8, !tbaa !13
  %160 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i64 noundef %157, i64 noundef %159)
  %161 = call i32 @gettimeofday(ptr noundef %11, ptr noundef null) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %178, %94
  %163 = load i32, ptr %23, align 4, !tbaa !5
  %164 = icmp slt i32 %163, 30
  br i1 %164, label %166, label %165

165:                                              ; preds = %162
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %181

166:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store ptr null, ptr %24, align 8, !tbaa !9
  %167 = load ptr, ptr %4, align 8, !tbaa !9
  %168 = load ptr, ptr %6, align 8, !tbaa !9
  %169 = getelementptr inbounds [3 x i64], ptr %21, i64 0, i64 0
  %170 = getelementptr inbounds [3 x i64], ptr %22, i64 0, i64 0
  %171 = call i32 @clEnqueueNDRangeKernel(ptr noundef %167, ptr noundef %168, i32 noundef 2, ptr noundef null, ptr noundef %169, ptr noundef %170, i32 noundef 0, ptr noundef null, ptr noundef %24)
  store i32 %171, ptr %9, align 4, !tbaa !5
  %172 = load i32, ptr %9, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %172, ptr noundef @.str.12)
  %173 = call i32 @clWaitForEvents(i32 noundef 1, ptr noundef %24)
  store i32 %173, ptr %9, align 4, !tbaa !5
  %174 = load i32, ptr %9, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %174, ptr noundef @.str.13)
  %175 = load ptr, ptr %24, align 8, !tbaa !9
  call void @_Z18PrintProfilingInfoP9_cl_event(ptr noundef %175)
  %176 = load ptr, ptr %24, align 8, !tbaa !9
  %177 = call i32 @clReleaseEvent(ptr noundef %176)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %178

178:                                              ; preds = %166
  %179 = load i32, ptr %23, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %23, align 4, !tbaa !5
  br label %162, !llvm.loop !15

181:                                              ; preds = %165
  call void @_Z13PrintDurationP7timevalPKci(ptr noundef %11, ptr noundef @.str.14, i32 noundef 30)
  %182 = load ptr, ptr %4, align 8, !tbaa !9
  %183 = load ptr, ptr %8, align 8, !tbaa !9
  %184 = load i32, ptr %10, align 4, !tbaa !5
  %185 = zext i32 %184 to i64
  %186 = load ptr, ptr %19, align 8, !tbaa !9
  %187 = call i32 @clEnqueueReadBuffer(ptr noundef %182, ptr noundef %183, i32 noundef 1, i64 noundef 0, i64 noundef %185, ptr noundef %186, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i32 %187, ptr %9, align 4, !tbaa !5
  %188 = load ptr, ptr %18, align 8, !tbaa !9
  %189 = load ptr, ptr %19, align 8, !tbaa !9
  %190 = load i32, ptr %15, align 4, !tbaa !5
  %191 = load i32, ptr %16, align 4, !tbaa !5
  call void @_Z11DataComparePhS_ii(ptr noundef %188, ptr noundef %189, i32 noundef %190, i32 noundef %191)
  %192 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %192) #8
  %193 = load ptr, ptr %17, align 8, !tbaa !9
  call void @free(ptr noundef %193) #8
  %194 = load ptr, ptr %18, align 8, !tbaa !9
  call void @free(ptr noundef %194) #8
  %195 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free(ptr noundef %195) #8
  %196 = load ptr, ptr %7, align 8, !tbaa !9
  %197 = call i32 @clReleaseMemObject(ptr noundef %196)
  %198 = load ptr, ptr %8, align 8, !tbaa !9
  %199 = call i32 @clReleaseMemObject(ptr noundef %198)
  %200 = load ptr, ptr %3, align 8, !tbaa !9
  %201 = load ptr, ptr %4, align 8, !tbaa !9
  %202 = load ptr, ptr %5, align 8, !tbaa !9
  %203 = load ptr, ptr %6, align 8, !tbaa !9
  call void @_Z7CleanUpP11_cl_contextP17_cl_command_queueP11_cl_programP10_cl_kernel(ptr noundef %200, ptr noundef %201, ptr noundef %202, ptr noundef %203)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %204

204:                                              ; preds = %181, %54, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %205

205:                                              ; preds = %204, %36, %28
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %206 = load i32, ptr %1, align 4
  ret i32 %206
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z13CreateContextPP13_cl_device_id(ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z18CreateCommandQueueP11_cl_contextP13_cl_device_id(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z22ClUtilReadFileToStringPKc(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z13CreateProgramP11_cl_contextP13_cl_device_idPc(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z12CreateKernelP11_cl_programPKcP13_cl_device_id(ptr noundef, ptr noundef, ptr noundef) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z8DataInitPhii(ptr noundef, i32 noundef, i32 noundef) #6

; Function Attrs: nounwind
declare i32 @gettimeofday(ptr noundef, ptr noundef) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z12CpuTransposePhS_ii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13PrintDurationP7timevalPKci(ptr noundef, ptr noundef, i32 noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z13CheckClStatusiPKc(i32 noundef, ptr noundef) #6

declare i32 @clSetKernelArg(ptr noundef, i32 noundef, i64 noundef, ptr noundef) #3

declare i32 @clEnqueueNDRangeKernel(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #3

declare i32 @clWaitForEvents(i32 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z18PrintProfilingInfoP9_cl_event(ptr noundef) #2

declare i32 @clReleaseEvent(ptr noundef) #3

declare i32 @clEnqueueReadBuffer(ptr noundef, ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11DataComparePhS_ii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

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

declare i32 @clReleaseMemObject(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7CleanUpP11_cl_contextP17_cl_command_queueP11_cl_programP10_cl_kernel(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { mustprogress 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { 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++ 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 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !12}


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

%struct.timeval = type { i64, i64 }

@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 -1, 1) i32 @main() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %struct.timeval, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [3 x i64], align 16
  %9 = alloca [3 x i64], align 16
  %10 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  %11 = call noundef ptr @_Z13CreateContextPP13_cl_device_id(ptr noundef nonnull %1)
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %15

13:                                               ; preds = %0
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  br label %84

15:                                               ; preds = %0
  %16 = load ptr, ptr %1, align 8, !tbaa !9
  %17 = call noundef ptr @_Z18CreateCommandQueueP11_cl_contextP13_cl_device_id(ptr noundef nonnull %11, ptr noundef %16)
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %21

19:                                               ; preds = %15
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %84

21:                                               ; preds = %15
  %22 = call noundef ptr @_Z22ClUtilReadFileToStringPKc(ptr noundef nonnull @.str.2)
  %23 = load ptr, ptr %1, align 8, !tbaa !9
  %24 = call noundef ptr @_Z13CreateProgramP11_cl_contextP13_cl_device_idPc(ptr noundef nonnull %11, ptr noundef %23, ptr noundef %22)
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %21
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %84

28:                                               ; preds = %21
  %29 = load ptr, ptr %1, align 8, !tbaa !9
  %30 = call noundef ptr @_Z12CreateKernelP11_cl_programPKcP13_cl_device_id(ptr noundef nonnull %24, ptr noundef nonnull @.str.3, ptr noundef %29)
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %34

32:                                               ; preds = %28
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %84

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 4096, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store i32 4096, ptr %7, align 4, !tbaa !5
  %35 = call noalias dereferenceable_or_null(16777216) ptr @malloc(i64 noundef 16777216) #10
  %36 = call noalias dereferenceable_or_null(16777216) ptr @malloc(i64 noundef 16777216) #10
  %calloc = call dereferenceable_or_null(16777216) ptr @calloc(i64 1, i64 16777216)
  call void @_Z8DataInitPhii(ptr noundef %35, i32 noundef 4096, i32 noundef 4096)
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4096, i32 noundef 4096)
  %38 = call i32 @gettimeofday(ptr noundef nonnull %5, ptr noundef null) #9
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z12CpuTransposePhS_ii(ptr noundef %35, ptr noundef %36, i32 noundef 4096, i32 noundef 4096)
  call void @_Z13PrintDurationP7timevalPKci(ptr noundef nonnull %5, ptr noundef nonnull @.str.6, i32 noundef 30)
  %39 = call ptr @clCreateBuffer(ptr noundef nonnull %11, i64 noundef 36, i64 noundef 16777216, ptr noundef %35, ptr noundef nonnull %4)
  store ptr %39, ptr %2, align 8, !tbaa !9
  %40 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %40, ptr noundef nonnull @.str.7)
  %41 = call ptr @clCreateBuffer(ptr noundef nonnull %11, i64 noundef 2, i64 noundef 16777216, ptr noundef null, ptr noundef nonnull %4)
  store ptr %41, ptr %3, align 8, !tbaa !9
  %42 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %42, ptr noundef nonnull @.str.8)
  %43 = call i32 @clSetKernelArg(ptr noundef nonnull %30, i32 noundef 0, i64 noundef 8, ptr noundef nonnull %2)
  store i32 %43, ptr %4, align 4, !tbaa !5
  %44 = call i32 @clSetKernelArg(ptr noundef nonnull %30, i32 noundef 1, i64 noundef 8, ptr noundef nonnull %3)
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = or i32 %45, %44
  store i32 %46, ptr %4, align 4, !tbaa !5
  %47 = call i32 @clSetKernelArg(ptr noundef nonnull %30, i32 noundef 2, i64 noundef 4, ptr noundef nonnull %6)
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = or i32 %48, %47
  store i32 %49, ptr %4, align 4, !tbaa !5
  %50 = call i32 @clSetKernelArg(ptr noundef nonnull %30, i32 noundef 3, i64 noundef 4, ptr noundef nonnull %7)
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = or i32 %51, %50
  store i32 %52, ptr %4, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %52, ptr noundef nonnull @.str.9)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #9
  store i64 16, ptr %9, align 16, !tbaa !11
  %53 = getelementptr inbounds i8, ptr %9, i64 8
  store i64 16, ptr %53, align 8, !tbaa !11
  %54 = getelementptr inbounds i8, ptr %9, i64 16
  store i64 0, ptr %54, align 16, !tbaa !11
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %.fr52 = freeze i32 %55
  %56 = sext i32 %.fr52 to i64
  %57 = add nsw i64 %56, 15
  %58 = and i64 %57, -16
  store i64 %58, ptr %8, align 16, !tbaa !11
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %.fr53 = freeze i32 %59
  %60 = sext i32 %.fr53 to i64
  %61 = add nsw i64 %60, 15
  %62 = and i64 %61, -16
  %63 = getelementptr inbounds i8, ptr %8, i64 8
  store i64 %62, ptr %63, align 8, !tbaa !11
  %64 = getelementptr inbounds i8, ptr %8, i64 16
  store i64 0, ptr %64, align 16, !tbaa !11
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i64 noundef %58, i64 noundef %62)
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i64 noundef 16, i64 noundef 16)
  %67 = call i32 @gettimeofday(ptr noundef nonnull %5, ptr noundef null) #9
  br label %77

68:                                               ; preds = %77
  call void @_Z13PrintDurationP7timevalPKci(ptr noundef nonnull %5, ptr noundef nonnull @.str.14, i32 noundef 30)
  %69 = load ptr, ptr %3, align 8, !tbaa !9
  %70 = call i32 @clEnqueueReadBuffer(ptr noundef nonnull %17, ptr noundef %69, i32 noundef 1, i64 noundef 0, i64 noundef 16777216, ptr noundef %calloc, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i32 %70, ptr %4, align 4, !tbaa !5
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z11DataComparePhS_ii(ptr noundef %36, ptr noundef %calloc, i32 noundef %71, i32 noundef %72)
  call void @free(ptr noundef %22) #9
  call void @free(ptr noundef %35) #9
  call void @free(ptr noundef %36) #9
  call void @free(ptr noundef %calloc) #9
  %73 = load ptr, ptr %2, align 8, !tbaa !9
  %74 = call i32 @clReleaseMemObject(ptr noundef %73)
  %75 = load ptr, ptr %3, align 8, !tbaa !9
  %76 = call i32 @clReleaseMemObject(ptr noundef %75)
  call void @_Z7CleanUpP11_cl_contextP17_cl_command_queueP11_cl_programP10_cl_kernel(ptr noundef nonnull %11, ptr noundef nonnull %17, ptr noundef nonnull %24, ptr noundef nonnull %30)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  br label %84

77:                                               ; preds = %34, %77
  %.055 = phi i32 [ 0, %34 ], [ %83, %77 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  store ptr null, ptr %10, align 8, !tbaa !9
  %78 = call i32 @clEnqueueNDRangeKernel(ptr noundef nonnull %17, ptr noundef nonnull %30, i32 noundef 2, ptr noundef null, ptr noundef nonnull %8, ptr noundef nonnull %9, i32 noundef 0, ptr noundef null, ptr noundef nonnull %10)
  store i32 %78, ptr %4, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %78, ptr noundef nonnull @.str.12)
  %79 = call i32 @clWaitForEvents(i32 noundef 1, ptr noundef nonnull %10)
  store i32 %79, ptr %4, align 4, !tbaa !5
  call void @_Z13CheckClStatusiPKc(i32 noundef %79, ptr noundef nonnull @.str.13)
  %80 = load ptr, ptr %10, align 8, !tbaa !9
  call void @_Z18PrintProfilingInfoP9_cl_event(ptr noundef %80)
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  %82 = call i32 @clReleaseEvent(ptr noundef %81)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  %83 = add nuw nsw i32 %.055, 1
  %exitcond.not = icmp eq i32 %83, 30
  br i1 %exitcond.not, label %68, label %77, !llvm.loop !13

84:                                               ; preds = %26, %32, %68, %19, %13
  %.1 = phi i32 [ -1, %13 ], [ -1, %19 ], [ -1, %26 ], [ -1, %32 ], [ 0, %68 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #9
  ret i32 %.1
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z13CreateContextPP13_cl_device_id(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z18CreateCommandQueueP11_cl_contextP13_cl_device_id(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z22ClUtilReadFileToStringPKc(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z13CreateProgramP11_cl_contextP13_cl_device_idPc(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z12CreateKernelP11_cl_programPKcP13_cl_device_id(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z8DataInitPhii(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @gettimeofday(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z12CpuTransposePhS_ii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13PrintDurationP7timevalPKci(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @clCreateBuffer(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z13CheckClStatusiPKc(i32 noundef, ptr noundef) local_unnamed_addr #5

declare i32 @clSetKernelArg(ptr noundef, i32 noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

declare i32 @clEnqueueNDRangeKernel(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare i32 @clWaitForEvents(i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z18PrintProfilingInfoP9_cl_event(ptr noundef) local_unnamed_addr #2

declare i32 @clReleaseEvent(ptr noundef) local_unnamed_addr #6

declare i32 @clEnqueueReadBuffer(ptr noundef, ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11DataComparePhS_ii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

declare i32 @clReleaseMemObject(ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7CleanUpP11_cl_contextP17_cl_command_queueP11_cl_programP10_cl_kernel(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { mustprogress 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 #6 = { "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 = { 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 #8 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #9 = { nounwind }
attributes #10 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass