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

; 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 [77 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [62 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 [27 x i8], align 1
@.str.12 = 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 [16 x float], align 16
  %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 64, ptr %8) #8
  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 %121

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 ], [ 1000, %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 35, 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
  call void @libxsmm_rng_set_seed(i32 noundef %50)
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = load i32, ptr %11, align 4, !tbaa !5
  call void @libxsmm_rng_f32_seq(ptr noundef %51, i32 noundef %52)
  %53 = load i32, ptr %11, align 4, !tbaa !5
  %54 = load ptr, ptr %7, align 8, !tbaa !9
  %55 = call i32 @libxsmm_matdiff(ptr noundef %10, i32 noundef 1, i32 noundef 1, i32 noundef %53, ptr noundef null, ptr noundef %54, ptr noundef null, ptr noundef null)
  %56 = icmp eq i32 0, %55
  br i1 %56, label %57, label %61

57:                                               ; preds = %48
  %58 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 19
  %59 = load double, ptr %58, align 8, !tbaa !13
  %60 = call double @libxsmm_dsqrt(double noundef %59)
  store double %60, ptr %6, align 8, !tbaa !11
  br label %61

61:                                               ; preds = %57, %48
  %62 = call i64 @libxsmm_timer_tick()
  store i64 %62, ptr %9, align 8, !tbaa !15
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %69, %61
  %64 = load i32, ptr %12, align 4, !tbaa !5
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %67, label %72

67:                                               ; preds = %63
  %68 = load ptr, ptr %7, align 8, !tbaa !9
  call void @libxsmm_rng_f32_seq(ptr noundef %68, i32 noundef 1)
  br label %69

69:                                               ; preds = %67
  %70 = load i32, ptr %12, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %12, align 4, !tbaa !5
  br label %63, !llvm.loop !17

72:                                               ; preds = %63
  %73 = load i64, ptr %9, align 8, !tbaa !15
  %74 = call i64 @libxsmm_timer_tick()
  %75 = call i64 @libxsmm_timer_ncycles(i64 noundef %73, i64 noundef %74)
  %76 = load i32, ptr %11, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = udiv i64 %75, %77
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i64 noundef %78)
  %80 = call i64 @libxsmm_timer_tick()
  store i64 %80, ptr %9, align 8, !tbaa !15
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %87, %72
  %82 = load i32, ptr %12, align 4, !tbaa !5
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %90

85:                                               ; preds = %81
  %86 = getelementptr inbounds [16 x float], ptr %8, i64 0, i64 0
  call void @libxsmm_rng_f32_seq(ptr noundef %86, i32 noundef 16)
  br label %87

87:                                               ; preds = %85
  %88 = load i32, ptr %12, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %12, align 4, !tbaa !5
  br label %81, !llvm.loop !19

90:                                               ; preds = %81
  %91 = load i64, ptr %9, align 8, !tbaa !15
  %92 = call i64 @libxsmm_timer_tick()
  %93 = call i64 @libxsmm_timer_ncycles(i64 noundef %91, i64 noundef %92)
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = mul i64 %95, 16
  %97 = udiv i64 %93, %96
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %97)
  %99 = load i32, ptr %11, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i64 noundef %100)
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %103 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 16
  %104 = load double, ptr %103, align 8, !tbaa !20
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, double noundef %104)
  %106 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 17
  %107 = load double, ptr %106, align 8, !tbaa !21
  %108 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %107)
  %109 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 15
  %110 = load double, ptr %109, align 8, !tbaa !22
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, double noundef %110)
  %112 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 18
  %113 = load double, ptr %112, align 8, !tbaa !23
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %113)
  %115 = getelementptr inbounds %struct.libxsmm_matdiff_info, ptr %10, i32 0, i32 19
  %116 = load double, ptr %115, align 8, !tbaa !13
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %116)
  %118 = load double, ptr %6, align 8, !tbaa !11
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, double noundef %118)
  %120 = load ptr, ptr %7, align 8, !tbaa !9
  call void @free(ptr noundef %120) #8
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %121

121:                                              ; preds = %90, %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 64, 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
  %122 = load i32, ptr %3, align 4
  ret i32 %122
}

; 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 void @libxsmm_rng_set_seed(i32 noundef) #6

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

declare void @libxsmm_rng_f32_seq(ptr noundef, i32 noundef) #6

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

; 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 = !{!14, !12, i64 152}
!14 = !{!"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}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!14, !12, i64 128}
!21 = !{!14, !12, i64 136}
!22 = !{!14, !12, i64 120}
!23 = !{!14, !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 [77 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [62 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 [27 x i8], align 1
@.str.12 = 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 [16 x float], align 16
  %4 = alloca %struct.libxsmm_matdiff_info, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #11
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %4) #11
  %5 = icmp sgt i32 %0, 2
  br i1 %5, label %6, label %10

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

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

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

19:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 35, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #14
  unreachable

.thread:                                          ; preds = %10, %12
  %20 = phi i32 [ %17, %12 ], [ 1008, %10 ]
  %21 = zext nneg i32 %20 to i64
  %22 = shl nuw nsw i64 %21, 2
  %23 = tail call noalias ptr @malloc(i64 noundef %22) #15
  %24 = icmp eq ptr %23, null
  %spec.select = select i1 %24, i32 0, i32 %20
  %25 = tail call i64 @time(ptr noundef null) #11
  %26 = trunc i64 %25 to i32
  tail call void @libxsmm_rng_set_seed(i32 noundef %26) #11
  tail call void @libxsmm_rng_f32_seq(ptr noundef %23, i32 noundef %spec.select) #11
  %27 = call i32 @libxsmm_matdiff(ptr noundef nonnull %4, i32 noundef 1, i32 noundef 1, i32 noundef %spec.select, ptr noundef null, ptr noundef %23, ptr noundef null, ptr noundef null) #11
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %33

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

33:                                               ; preds = %29, %.thread
  %.028 = phi double [ %32, %29 ], [ 0.000000e+00, %.thread ]
  %34 = call i64 @libxsmm_timer_tick() #11
  br i1 %24, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %33, %.lr.ph
  %.031 = phi i32 [ %35, %.lr.ph ], [ 0, %33 ]
  call void @libxsmm_rng_f32_seq(ptr noundef nonnull %23, i32 noundef 1) #11
  %35 = add nuw nsw i32 %.031, 1
  %exitcond.not = icmp eq i32 %35, %20
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph, %33
  %36 = call i64 @libxsmm_timer_tick() #11
  %37 = call i64 @libxsmm_timer_ncycles(i64 noundef %34, i64 noundef %36)
  %38 = zext nneg i32 %spec.select to i64
  %39 = udiv i64 %37, %38
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %39)
  %41 = call i64 @libxsmm_timer_tick() #11
  br i1 %24, label %._crit_edge35, label %.lr.ph34.preheader

.lr.ph34.preheader:                               ; preds = %._crit_edge
  %umax36 = call i32 @llvm.umax.i32(i32 %20, i32 1)
  br label %.lr.ph34

.lr.ph34:                                         ; preds = %.lr.ph34.preheader, %.lr.ph34
  %.132 = phi i32 [ %42, %.lr.ph34 ], [ 0, %.lr.ph34.preheader ]
  call void @libxsmm_rng_f32_seq(ptr noundef nonnull %3, i32 noundef 16) #11
  %42 = add nuw nsw i32 %.132, 1
  %exitcond37.not = icmp eq i32 %42, %umax36
  br i1 %exitcond37.not, label %._crit_edge35, label %.lr.ph34, !llvm.loop !15

._crit_edge35:                                    ; preds = %.lr.ph34, %._crit_edge
  %43 = call i64 @libxsmm_timer_tick() #11
  %44 = call i64 @libxsmm_timer_ncycles(i64 noundef %41, i64 noundef %43)
  %45 = shl nuw nsw i64 %38, 4
  %46 = udiv i64 %44, %45
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %46)
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef %38)
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %50 = getelementptr inbounds i8, ptr %4, i64 128
  %51 = load double, ptr %50, align 8, !tbaa !16
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %51)
  %53 = getelementptr inbounds i8, ptr %4, i64 136
  %54 = load double, ptr %53, align 8, !tbaa !17
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %54)
  %56 = getelementptr inbounds i8, ptr %4, i64 120
  %57 = load double, ptr %56, align 8, !tbaa !18
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, double noundef %57)
  %59 = getelementptr inbounds i8, ptr %4, i64 144
  %60 = load double, ptr %59, align 8, !tbaa !19
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %60)
  %62 = getelementptr inbounds i8, ptr %4, i64 152
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %63)
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, double noundef %.028)
  call void @free(ptr noundef %23) #11
  br label %66

66:                                               ; preds = %._crit_edge35, %6
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #11
  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 void @libxsmm_rng_set_seed(i32 noundef) local_unnamed_addr #6

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

declare void @libxsmm_rng_f32_seq(ptr noundef, i32 noundef) local_unnamed_addr #6

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

; 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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #10

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { nounwind }
attributes #12 = { cold nounwind }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { noreturn nounwind }
attributes #15 = { 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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!10, !11, i64 128}
!17 = !{!10, !11, i64 136}
!18 = !{!10, !11, i64 120}
!19 = !{!10, !11, i64 144}


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