; LLVM IR from kazulagi/plantFEM :: src/ClangClass (ClangClass)

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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@__const.c_opencl_matmul_crs.fileName = external hidden unnamed_addr constant [38 x i8], align 16
@.str.4 = external hidden unnamed_addr constant [20 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

declare i32 @clGetDeviceIDs(ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) #2

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

declare ptr @clCreateCommandQueue(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

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

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

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

declare ptr @clCreateKernel(ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

declare i32 @clFlush(ptr noundef) #2

declare i32 @clFinish(ptr noundef) #2

declare i32 @clReleaseKernel(ptr noundef) #2

declare i32 @clReleaseProgram(ptr noundef) #2

declare i32 @clReleaseMemObject(ptr noundef) #2

declare i32 @clReleaseCommandQueue(ptr noundef) #2

declare i32 @clReleaseContext(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @c_opencl_matmul_crs(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #6 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca [128 x i8], align 16
  %32 = alloca ptr, align 8
  %33 = alloca [38 x i8], align 16
  %34 = alloca ptr, align 8
  %35 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store ptr null, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr null, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store ptr null, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store ptr null, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store ptr null, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  store ptr null, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store ptr null, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store ptr null, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr %31) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 38, ptr %33) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 @__const.c_opencl_matmul_crs.fileName, i64 38, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %36 = getelementptr inbounds [38 x i8], ptr %33, i64 0, i64 0
  %37 = call noalias ptr @fopen(ptr noundef %36, ptr noundef @.str)
  store ptr %37, ptr %32, align 8, !tbaa !5
  %38 = load ptr, ptr %32, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %43, label %40

40:                                               ; preds = %7
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef @.str.1) #7
  call void @exit(i32 noundef 1) #8
  unreachable

43:                                               ; preds = %7
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef @.str.2) #7
  br label %46

46:                                               ; preds = %43
  %47 = call noalias ptr @malloc(i64 noundef 1048576) #9
  store ptr %47, ptr %34, align 8, !tbaa !5
  %48 = load ptr, ptr %34, align 8, !tbaa !5
  %49 = load ptr, ptr %32, align 8, !tbaa !5
  %50 = call i64 @fread(ptr noundef %48, i64 noundef 1, i64 noundef 1048576, ptr noundef %49)
  store i64 %50, ptr %35, align 8, !tbaa !9
  %51 = load ptr, ptr %32, align 8, !tbaa !5
  %52 = call i32 @fclose(ptr noundef %51)
  %53 = load ptr, ptr %27, align 8, !tbaa !5
  %54 = call i32 @clGetDeviceIDs(ptr noundef %53, i64 noundef 1, i32 noundef 1, ptr noundef %15, ptr noundef %28)
  store i32 %54, ptr %30, align 4, !tbaa !11
  %55 = call ptr @clCreateContext(ptr noundef null, i32 noundef 1, ptr noundef %15, ptr noundef null, ptr noundef null, ptr noundef %30)
  store ptr %55, ptr %16, align 8, !tbaa !5
  %56 = load ptr, ptr %16, align 8, !tbaa !5
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = call ptr @clCreateCommandQueue(ptr noundef %56, ptr noundef %57, i64 noundef 0, ptr noundef %30)
  store ptr %58, ptr %17, align 8, !tbaa !5
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = call ptr @clCreateBuffer(ptr noundef %59, i64 noundef 32, i64 noundef 4, ptr noundef %60, ptr noundef %30)
  store ptr %61, ptr %18, align 8, !tbaa !5
  %62 = load ptr, ptr %16, align 8, !tbaa !5
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = call ptr @clCreateBuffer(ptr noundef %62, i64 noundef 32, i64 noundef 4, ptr noundef %63, ptr noundef %30)
  store ptr %64, ptr %19, align 8, !tbaa !5
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = sext i32 %67 to i64
  %69 = mul i64 %68, 4
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = call ptr @clCreateBuffer(ptr noundef %65, i64 noundef 32, i64 noundef %69, ptr noundef %70, ptr noundef %30)
  store ptr %71, ptr %20, align 8, !tbaa !5
  %72 = load ptr, ptr %16, align 8, !tbaa !5
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = load i32, ptr %73, align 4, !tbaa !11
  %75 = sext i32 %74 to i64
  %76 = mul i64 %75, 4
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = call ptr @clCreateBuffer(ptr noundef %72, i64 noundef 32, i64 noundef %76, ptr noundef %77, ptr noundef %30)
  store ptr %78, ptr %21, align 8, !tbaa !5
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load i32, ptr %80, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = mul i64 %82, 8
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = call ptr @clCreateBuffer(ptr noundef %79, i64 noundef 32, i64 noundef %83, ptr noundef %84, ptr noundef %30)
  store ptr %85, ptr %22, align 8, !tbaa !5
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load i32, ptr %87, align 4, !tbaa !11
  %89 = sext i32 %88 to i64
  %90 = mul i64 %89, 8
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = call ptr @clCreateBuffer(ptr noundef %86, i64 noundef 32, i64 noundef %90, ptr noundef %91, ptr noundef %30)
  store ptr %92, ptr %23, align 8, !tbaa !5
  %93 = load ptr, ptr %16, align 8, !tbaa !5
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = load i32, ptr %94, align 4, !tbaa !11
  %96 = sext i32 %95 to i64
  %97 = mul i64 %96, 8
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = call ptr @clCreateBuffer(ptr noundef %93, i64 noundef 32, i64 noundef %97, ptr noundef %98, ptr noundef %30)
  store ptr %99, ptr %24, align 8, !tbaa !5
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = call ptr @clCreateProgramWithSource(ptr noundef %100, i32 noundef 1, ptr noundef %34, ptr noundef %35, ptr noundef %30)
  store ptr %101, ptr %25, align 8, !tbaa !5
  %102 = load ptr, ptr %25, align 8, !tbaa !5
  %103 = call i32 @clBuildProgram(ptr noundef %102, i32 noundef 1, ptr noundef %15, ptr noundef null, ptr noundef null, ptr noundef null)
  store i32 %103, ptr %30, align 4, !tbaa !11
  %104 = load ptr, ptr %25, align 8, !tbaa !5
  %105 = call ptr @clCreateKernel(ptr noundef %104, ptr noundef @.str.4, ptr noundef %30)
  store ptr %105, ptr %26, align 8, !tbaa !5
  %106 = load ptr, ptr %26, align 8, !tbaa !5
  %107 = call i32 @clSetKernelArg(ptr noundef %106, i32 noundef 0, i64 noundef 8, ptr noundef %18)
  store i32 %107, ptr %30, align 4, !tbaa !11
  %108 = load ptr, ptr %26, align 8, !tbaa !5
  %109 = call i32 @clSetKernelArg(ptr noundef %108, i32 noundef 1, i64 noundef 8, ptr noundef %19)
  store i32 %109, ptr %30, align 4, !tbaa !11
  %110 = load ptr, ptr %26, align 8, !tbaa !5
  %111 = call i32 @clSetKernelArg(ptr noundef %110, i32 noundef 2, i64 noundef 8, ptr noundef %20)
  store i32 %111, ptr %30, align 4, !tbaa !11
  %112 = load ptr, ptr %26, align 8, !tbaa !5
  %113 = call i32 @clSetKernelArg(ptr noundef %112, i32 noundef 3, i64 noundef 8, ptr noundef %21)
  store i32 %113, ptr %30, align 4, !tbaa !11
  %114 = load ptr, ptr %26, align 8, !tbaa !5
  %115 = call i32 @clSetKernelArg(ptr noundef %114, i32 noundef 4, i64 noundef 8, ptr noundef %22)
  store i32 %115, ptr %30, align 4, !tbaa !11
  %116 = load ptr, ptr %26, align 8, !tbaa !5
  %117 = call i32 @clSetKernelArg(ptr noundef %116, i32 noundef 5, i64 noundef 8, ptr noundef %23)
  store i32 %117, ptr %30, align 4, !tbaa !11
  %118 = load ptr, ptr %26, align 8, !tbaa !5
  %119 = call i32 @clSetKernelArg(ptr noundef %118, i32 noundef 6, i64 noundef 8, ptr noundef %24)
  store i32 %119, ptr %30, align 4, !tbaa !11
  %120 = load ptr, ptr %17, align 8, !tbaa !5
  %121 = load ptr, ptr %26, align 8, !tbaa !5
  %122 = call i32 @clEnqueueTask(ptr noundef %120, ptr noundef %121, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i32 %122, ptr %30, align 4, !tbaa !11
  %123 = load ptr, ptr %17, align 8, !tbaa !5
  %124 = load ptr, ptr %24, align 8, !tbaa !5
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load i32, ptr %125, align 4, !tbaa !11
  %127 = sext i32 %126 to i64
  %128 = mul i64 %127, 8
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  %130 = call i32 @clEnqueueReadBuffer(ptr noundef %123, ptr noundef %124, i32 noundef 1, i64 noundef 0, i64 noundef %128, ptr noundef %129, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i32 %130, ptr %30, align 4, !tbaa !11
  %131 = load ptr, ptr %17, align 8, !tbaa !5
  %132 = call i32 @clFlush(ptr noundef %131)
  store i32 %132, ptr %30, align 4, !tbaa !11
  %133 = load ptr, ptr %17, align 8, !tbaa !5
  %134 = call i32 @clFinish(ptr noundef %133)
  store i32 %134, ptr %30, align 4, !tbaa !11
  %135 = load ptr, ptr %26, align 8, !tbaa !5
  %136 = call i32 @clReleaseKernel(ptr noundef %135)
  store i32 %136, ptr %30, align 4, !tbaa !11
  %137 = load ptr, ptr %25, align 8, !tbaa !5
  %138 = call i32 @clReleaseProgram(ptr noundef %137)
  store i32 %138, ptr %30, align 4, !tbaa !11
  %139 = load ptr, ptr %18, align 8, !tbaa !5
  %140 = call i32 @clReleaseMemObject(ptr noundef %139)
  store i32 %140, ptr %30, align 4, !tbaa !11
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  %142 = call i32 @clReleaseMemObject(ptr noundef %141)
  store i32 %142, ptr %30, align 4, !tbaa !11
  %143 = load ptr, ptr %20, align 8, !tbaa !5
  %144 = call i32 @clReleaseMemObject(ptr noundef %143)
  store i32 %144, ptr %30, align 4, !tbaa !11
  %145 = load ptr, ptr %21, align 8, !tbaa !5
  %146 = call i32 @clReleaseMemObject(ptr noundef %145)
  store i32 %146, ptr %30, align 4, !tbaa !11
  %147 = load ptr, ptr %22, align 8, !tbaa !5
  %148 = call i32 @clReleaseMemObject(ptr noundef %147)
  store i32 %148, ptr %30, align 4, !tbaa !11
  %149 = load ptr, ptr %23, align 8, !tbaa !5
  %150 = call i32 @clReleaseMemObject(ptr noundef %149)
  store i32 %150, ptr %30, align 4, !tbaa !11
  %151 = load ptr, ptr %24, align 8, !tbaa !5
  %152 = call i32 @clReleaseMemObject(ptr noundef %151)
  store i32 %152, ptr %30, align 4, !tbaa !11
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  %154 = call i32 @clReleaseCommandQueue(ptr noundef %153)
  store i32 %154, ptr %30, align 4, !tbaa !11
  %155 = load ptr, ptr %16, align 8, !tbaa !5
  %156 = call i32 @clReleaseContext(ptr noundef %155)
  store i32 %156, ptr %30, align 4, !tbaa !11
  %157 = load ptr, ptr %34, align 8, !tbaa !5
  call void @free(ptr noundef %157) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 38, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 "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 = { noreturn 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 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 #6 = { 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 }
attributes #8 = { noreturn 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 = !{!"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}


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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@__const.c_opencl_matmul_crs.fileName = external hidden unnamed_addr constant [38 x i8], align 16
@.str.4 = external hidden unnamed_addr constant [20 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 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 #3

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

declare i32 @clGetDeviceIDs(ptr noundef, i64 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare ptr @clCreateContext(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare ptr @clCreateCommandQueue(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #4

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

declare ptr @clCreateProgramWithSource(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @clBuildProgram(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare ptr @clCreateKernel(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare i32 @clEnqueueTask(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

declare i32 @clFlush(ptr noundef) local_unnamed_addr #4

declare i32 @clFinish(ptr noundef) local_unnamed_addr #4

declare i32 @clReleaseKernel(ptr noundef) local_unnamed_addr #4

declare i32 @clReleaseProgram(ptr noundef) local_unnamed_addr #4

declare i32 @clReleaseMemObject(ptr noundef) local_unnamed_addr #4

declare i32 @clReleaseCommandQueue(ptr noundef) local_unnamed_addr #4

declare i32 @clReleaseContext(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nounwind uwtable
define dso_local void @c_opencl_matmul_crs(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #6 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  store ptr null, ptr %10, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %20 = tail call noalias ptr @fopen(ptr noundef nonnull @__const.c_opencl_matmul_crs.fileName, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %20, null
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  br i1 %.not, label %22, label %24

22:                                               ; preds = %7
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.1) #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

24:                                               ; preds = %7
  %25 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.2) #8
  %26 = tail call noalias dereferenceable_or_null(1048576) ptr @malloc(i64 noundef 1048576) #10
  store ptr %26, ptr %18, align 8, !tbaa !5
  %27 = tail call i64 @fread(ptr noundef %26, i64 noundef 1, i64 noundef 1048576, ptr noundef nonnull %20)
  store i64 %27, ptr %19, align 8, !tbaa !9
  %28 = tail call i32 @fclose(ptr noundef nonnull %20)
  %29 = call i32 @clGetDeviceIDs(ptr noundef null, i64 noundef 1, i32 noundef 1, ptr noundef nonnull %8, ptr noundef nonnull %16) #7
  store i32 %29, ptr %17, align 4, !tbaa !11
  %30 = call ptr @clCreateContext(ptr noundef null, i32 noundef 1, ptr noundef nonnull %8, ptr noundef null, ptr noundef null, ptr noundef nonnull %17) #7
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = call ptr @clCreateCommandQueue(ptr noundef %30, ptr noundef %31, i64 noundef 0, ptr noundef nonnull %17) #7
  %33 = call ptr @clCreateBuffer(ptr noundef %30, i64 noundef 32, i64 noundef 4, ptr noundef %0, ptr noundef nonnull %17) #7
  store ptr %33, ptr %9, align 8, !tbaa !5
  %34 = call ptr @clCreateBuffer(ptr noundef %30, i64 noundef 32, i64 noundef 4, ptr noundef %1, ptr noundef nonnull %17) #7
  store ptr %34, ptr %10, align 8, !tbaa !5
  %35 = load i32, ptr %1, align 4, !tbaa !11
  %36 = sext i32 %35 to i64
  %37 = shl nsw i64 %36, 2
  %38 = call ptr @clCreateBuffer(ptr noundef %30, i64 noundef 32, i64 noundef %37, ptr noundef %2, ptr noundef nonnull %17) #7
  store ptr %38, ptr %11, align 8, !tbaa !5
  %39 = load i32, ptr %0, align 4, !tbaa !11
  %40 = sext i32 %39 to i64
  %41 = shl nsw i64 %40, 2
  %42 = call ptr @clCreateBuffer(ptr noundef %30, i64 noundef 32, i64 noundef %41, ptr noundef %3, ptr noundef nonnull %17) #7
  store ptr %42, ptr %12, align 8, !tbaa !5
  %43 = load i32, ptr %1, align 4, !tbaa !11
  %44 = sext i32 %43 to i64
  %45 = shl nsw i64 %44, 3
  %46 = call ptr @clCreateBuffer(ptr noundef %30, i64 noundef 32, i64 noundef %45, ptr noundef %4, ptr noundef nonnull %17) #7
  store ptr %46, ptr %13, align 8, !tbaa !5
  %47 = load i32, ptr %0, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = shl nsw i64 %48, 3
  %50 = call ptr @clCreateBuffer(ptr noundef %30, i64 noundef 32, i64 noundef %49, ptr noundef %5, ptr noundef nonnull %17) #7
  store ptr %50, ptr %14, align 8, !tbaa !5
  %51 = load i32, ptr %0, align 4, !tbaa !11
  %52 = sext i32 %51 to i64
  %53 = shl nsw i64 %52, 3
  %54 = call ptr @clCreateBuffer(ptr noundef %30, i64 noundef 32, i64 noundef %53, ptr noundef %6, ptr noundef nonnull %17) #7
  store ptr %54, ptr %15, align 8, !tbaa !5
  %55 = call ptr @clCreateProgramWithSource(ptr noundef %30, i32 noundef 1, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %17) #7
  %56 = call i32 @clBuildProgram(ptr noundef %55, i32 noundef 1, ptr noundef nonnull %8, ptr noundef null, ptr noundef null, ptr noundef null) #7
  store i32 %56, ptr %17, align 4, !tbaa !11
  %57 = call ptr @clCreateKernel(ptr noundef %55, ptr noundef nonnull @.str.4, ptr noundef nonnull %17) #7
  %58 = call i32 @clSetKernelArg(ptr noundef %57, i32 noundef 0, i64 noundef 8, ptr noundef nonnull %9) #7
  store i32 %58, ptr %17, align 4, !tbaa !11
  %59 = call i32 @clSetKernelArg(ptr noundef %57, i32 noundef 1, i64 noundef 8, ptr noundef nonnull %10) #7
  store i32 %59, ptr %17, align 4, !tbaa !11
  %60 = call i32 @clSetKernelArg(ptr noundef %57, i32 noundef 2, i64 noundef 8, ptr noundef nonnull %11) #7
  store i32 %60, ptr %17, align 4, !tbaa !11
  %61 = call i32 @clSetKernelArg(ptr noundef %57, i32 noundef 3, i64 noundef 8, ptr noundef nonnull %12) #7
  store i32 %61, ptr %17, align 4, !tbaa !11
  %62 = call i32 @clSetKernelArg(ptr noundef %57, i32 noundef 4, i64 noundef 8, ptr noundef nonnull %13) #7
  store i32 %62, ptr %17, align 4, !tbaa !11
  %63 = call i32 @clSetKernelArg(ptr noundef %57, i32 noundef 5, i64 noundef 8, ptr noundef nonnull %14) #7
  store i32 %63, ptr %17, align 4, !tbaa !11
  %64 = call i32 @clSetKernelArg(ptr noundef %57, i32 noundef 6, i64 noundef 8, ptr noundef nonnull %15) #7
  store i32 %64, ptr %17, align 4, !tbaa !11
  %65 = call i32 @clEnqueueTask(ptr noundef %32, ptr noundef %57, i32 noundef 0, ptr noundef null, ptr noundef null) #7
  store i32 %65, ptr %17, align 4, !tbaa !11
  %66 = load ptr, ptr %15, align 8, !tbaa !5
  %67 = load i32, ptr %0, align 4, !tbaa !11
  %68 = sext i32 %67 to i64
  %69 = shl nsw i64 %68, 3
  %70 = call i32 @clEnqueueReadBuffer(ptr noundef %32, ptr noundef %66, i32 noundef 1, i64 noundef 0, i64 noundef %69, ptr noundef %6, i32 noundef 0, ptr noundef null, ptr noundef null) #7
  store i32 %70, ptr %17, align 4, !tbaa !11
  %71 = call i32 @clFlush(ptr noundef %32) #7
  store i32 %71, ptr %17, align 4, !tbaa !11
  %72 = call i32 @clFinish(ptr noundef %32) #7
  store i32 %72, ptr %17, align 4, !tbaa !11
  %73 = call i32 @clReleaseKernel(ptr noundef %57) #7
  store i32 %73, ptr %17, align 4, !tbaa !11
  %74 = call i32 @clReleaseProgram(ptr noundef %55) #7
  store i32 %74, ptr %17, align 4, !tbaa !11
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = call i32 @clReleaseMemObject(ptr noundef %75) #7
  store i32 %76, ptr %17, align 4, !tbaa !11
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = call i32 @clReleaseMemObject(ptr noundef %77) #7
  store i32 %78, ptr %17, align 4, !tbaa !11
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = call i32 @clReleaseMemObject(ptr noundef %79) #7
  store i32 %80, ptr %17, align 4, !tbaa !11
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = call i32 @clReleaseMemObject(ptr noundef %81) #7
  store i32 %82, ptr %17, align 4, !tbaa !11
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = call i32 @clReleaseMemObject(ptr noundef %83) #7
  store i32 %84, ptr %17, align 4, !tbaa !11
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = call i32 @clReleaseMemObject(ptr noundef %85) #7
  store i32 %86, ptr %17, align 4, !tbaa !11
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = call i32 @clReleaseMemObject(ptr noundef %87) #7
  store i32 %88, ptr %17, align 4, !tbaa !11
  %89 = call i32 @clReleaseCommandQueue(ptr noundef %32) #7
  store i32 %89, ptr %17, align 4, !tbaa !11
  %90 = call i32 @clReleaseContext(ptr noundef %30) #7
  store i32 %90, ptr %17, align 4, !tbaa !11
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %91) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #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
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { noreturn 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 #3 = { 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 #4 = { "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 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 #6 = { 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 }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn 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 = !{!"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}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass