; LLVM IR from libxsmm/libxsmm :: samples/utilities/rng (rng_avx512)

; 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.libxsmm_matdiff_info = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca %struct.libxsmm_matdiff_info, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  store double 0.000000e+00, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 192, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = icmp slt i32 2, %14
  br i1 %15, label %16, label %22

16:                                               ; preds = %2
  %17 = load ptr, ptr @stderr, align 8, !tbaa !9
  %18 = load ptr, ptr %5, align 8, !tbaa !9
  %19 = getelementptr inbounds ptr, ptr %18, i64 0
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str, ptr noundef %20) #8
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %111

22:                                               ; preds = %2
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = icmp slt i32 1, %23
  br i1 %24, label %25, label %30

25:                                               ; preds = %22
  %26 = load ptr, ptr %5, align 8, !tbaa !9
  %27 = getelementptr inbounds ptr, ptr %26, i64 1
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call i32 @atoi(ptr noundef %28) #9
  br label %31

30:                                               ; preds = %22
  br label %31

31:                                               ; preds = %30, %25
  %32 = phi i32 [ %29, %25 ], [ 1024, %30 ]
  store i32 %32, ptr %11, align 4, !tbaa !5
  %33 = load i32, ptr %11, align 4, !tbaa !5
  %34 = add nsw i32 %33, 15
  %35 = and i32 %34, -16
  store i32 %35, ptr %11, align 4, !tbaa !5
  %36 = load i32, ptr %11, align 4, !tbaa !5
  %37 = icmp sge i32 %36, 1
  br i1 %37, label %38, label %39

38:                                               ; preds = %31
  br label %40

39:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 39, ptr noundef @__PRETTY_FUNCTION__.main) #10
  unreachable

40:                                               ; preds = %38
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = mul i64 4, %42
  %44 = call noalias ptr @malloc(i64 noundef %43) #11
  store ptr %44, ptr %7, align 8, !tbaa !9
  %45 = load ptr, ptr %7, align 8, !tbaa !9
  %46 = icmp eq ptr null, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %40
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %47, %40
  %49 = call i64 @time(ptr noundef null) #8
  %50 = trunc i64 %49 to i32
  %51 = call ptr @libxsmm_rng_create_extstate(i32 noundef %50)
  store ptr %51, ptr %8, align 8, !tbaa !9
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %57, %48
  %53 = load i32, ptr %12, align 4, !tbaa !5
  %54 = load i32, ptr %11, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %56, label %60

56:                                               ; preds = %52
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %12, align 4, !tbaa !5
  %59 = add nsw i32 %58, 16
  store i32 %59, ptr %12, align 4, !tbaa !5
  br label %52, !llvm.loop !13

60:                                               ; preds = %52
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = load ptr, ptr %7, align 8, !tbaa !9
  %63 = call i32 @libxsmm_matdiff(ptr noundef %10, i32 noundef 1, i32 noundef 1, i32 noundef %61, ptr noundef null, ptr noundef %62, ptr noundef null, ptr noundef null)
  %64 = icmp eq i32 0, %63
  br i1 %64, label %65, label %69

65:                                               ; preds = %60
  %66 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 19
  %67 = load double, ptr %66, align 8, !tbaa !15
  %68 = call double @libxsmm_dsqrt(double noundef %67)
  store double %68, ptr %6, align 8, !tbaa !11
  br label %69

69:                                               ; preds = %65, %60
  %70 = call i64 @libxsmm_timer_tick()
  store i64 %70, ptr %9, align 8, !tbaa !17
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %76, %69
  %72 = load i32, ptr %12, align 4, !tbaa !5
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %75, label %79

75:                                               ; preds = %71
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %12, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %12, align 4, !tbaa !5
  br label %71, !llvm.loop !19

79:                                               ; preds = %71
  %80 = load i64, ptr %9, align 8, !tbaa !17
  %81 = call i64 @libxsmm_timer_tick()
  %82 = call i64 @libxsmm_timer_ncycles(i64 noundef %80, i64 noundef %81)
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = mul i64 %84, 16
  %86 = udiv i64 %82, %85
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %86)
  %88 = load ptr, ptr %8, align 8, !tbaa !9
  call void @libxsmm_rng_destroy_extstate(ptr noundef %88)
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %90)
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %93 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 16
  %94 = load double, ptr %93, align 8, !tbaa !20
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, double noundef %94)
  %96 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 17
  %97 = load double, ptr %96, align 8, !tbaa !21
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, double noundef %97)
  %99 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 15
  %100 = load double, ptr %99, align 8, !tbaa !22
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %100)
  %102 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 18
  %103 = load double, ptr %102, align 8, !tbaa !23
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, double noundef %103)
  %105 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 19
  %106 = load double, ptr %105, align 8, !tbaa !15
  %107 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %106)
  %108 = load double, ptr %6, align 8, !tbaa !11
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %108)
  %110 = load ptr, ptr %7, align 8, !tbaa !9
  call void @free(ptr noundef %110) #8
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %111

111:                                              ; preds = %79, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 192, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, 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
  %112 = load i32, ptr %3, align 4
  ret i32 %112
}

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

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

declare ptr @libxsmm_rng_create_extstate(i32 noundef) #6

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #2

declare i32 @libxsmm_matdiff(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #6

declare double @libxsmm_dsqrt(double noundef) #6

declare i64 @libxsmm_timer_tick() #6

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @libxsmm_timer_ncycles(i64 noundef, i64 noundef) #7

declare void @libxsmm_rng_destroy_extstate(ptr noundef) #6

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { inlinehint nounwind willreturn memory(read) 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 = { 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 = { "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 = { inlinehint 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 152}
!16 = !{!"libxsmm_matdiff_info", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !6, i64 176, !6, i64 180, !6, i64 184, !6, i64 188}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !7, i64 0}
!19 = distinct !{!19, !14}
!20 = !{!16, !12, i64 128}
!21 = !{!16, !12, i64 136}
!22 = !{!16, !12, i64 120}
!23 = !{!16, !12, i64 144}


; 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.libxsmm_matdiff_info = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [84 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.libxsmm_matdiff_info, align 8
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %3) #10
  %4 = icmp sgt i32 %0, 2
  br i1 %4, label %5, label %9

5:                                                ; preds = %2
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = load ptr, ptr %1, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str, ptr noundef %7) #11
  br label %59

9:                                                ; preds = %2
  %10 = icmp eq i32 %0, 2
  br i1 %10, label %11, label %.thread

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = tail call i32 @atoi(ptr nocapture noundef %13) #12
  %15 = add nsw i32 %14, 15
  %16 = and i32 %15, -16
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.thread, label %18

18:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 39, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #13
  unreachable

.thread:                                          ; preds = %9, %11
  %19 = phi i32 [ %16, %11 ], [ 1024, %9 ]
  %20 = zext nneg i32 %19 to i64
  %21 = shl nuw nsw i64 %20, 2
  %22 = tail call noalias ptr @malloc(i64 noundef %21) #14
  %23 = icmp eq ptr %22, null
  %24 = tail call i64 @time(ptr noundef null) #10
  %25 = trunc i64 %24 to i32
  %26 = tail call ptr @libxsmm_rng_create_extstate(i32 noundef %25) #10
  %spec.select = select i1 %23, i32 0, i32 %19
  %27 = call i32 @libxsmm_matdiff(ptr noundef nonnull %3, i32 noundef 1, i32 noundef 1, i32 noundef %spec.select, ptr noundef null, ptr noundef %22, ptr noundef null, ptr noundef null) #10
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %33

29:                                               ; preds = %.thread
  %30 = getelementptr inbounds i8, ptr %3, i64 152
  %31 = load double, ptr %30, align 8, !tbaa !9
  %32 = call double @libxsmm_dsqrt(double noundef %31) #10
  br label %33

33:                                               ; preds = %29, %.thread
  %.024 = phi double [ %32, %29 ], [ 0.000000e+00, %.thread ]
  %34 = call i64 @libxsmm_timer_tick() #10
  %35 = call i64 @libxsmm_timer_tick() #10
  %36 = call i64 @libxsmm_timer_ncycles(i64 noundef %34, i64 noundef %35)
  %37 = zext nneg i32 %spec.select to i64
  %38 = shl nuw nsw i64 %37, 4
  %39 = udiv i64 %36, %38
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %39)
  call void @libxsmm_rng_destroy_extstate(ptr noundef %26) #10
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %37)
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %43 = getelementptr inbounds i8, ptr %3, i64 128
  %44 = load double, ptr %43, align 8, !tbaa !13
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, double noundef %44)
  %46 = getelementptr inbounds i8, ptr %3, i64 136
  %47 = load double, ptr %46, align 8, !tbaa !14
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %47)
  %49 = getelementptr inbounds i8, ptr %3, i64 120
  %50 = load double, ptr %49, align 8, !tbaa !15
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %50)
  %52 = getelementptr inbounds i8, ptr %3, i64 144
  %53 = load double, ptr %52, align 8, !tbaa !16
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, double noundef %53)
  %55 = getelementptr inbounds i8, ptr %3, i64 152
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %56)
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %.024)
  call void @free(ptr noundef %22) #10
  br label %59

59:                                               ; preds = %33, %5
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %3) #10
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

declare ptr @libxsmm_rng_create_extstate(i32 noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #7

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

declare double @libxsmm_dsqrt(double noundef) local_unnamed_addr #6

declare i64 @libxsmm_timer_tick() local_unnamed_addr #6

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @libxsmm_timer_ncycles(i64 noundef, i64 noundef) local_unnamed_addr #8

declare void @libxsmm_rng_destroy_extstate(ptr noundef) local_unnamed_addr #6

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { 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 = { 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 #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 = { 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 = { inlinehint 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { cold nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { noreturn nounwind }
attributes #14 = { 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, !11, i64 152}
!10 = !{!"libxsmm_matdiff_info", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !11, i64 128}
!14 = !{!10, !11, i64 136}
!15 = !{!10, !11, i64 120}
!16 = !{!10, !11, i64 144}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass