; LLVM IR from libxsmm/libxsmm :: samples/encoder (jit_bigsur_test)

; 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.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @dynamic_reset_zero_create() #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @static_reset_zero(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [4 x float], align 16
  %3 = alloca [4 x float], align 16
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %22, %0
  %7 = load i32, ptr %4, align 4, !tbaa !5
  %8 = icmp ult i32 %7, 4
  br i1 %8, label %9, label %25

9:                                                ; preds = %6
  %10 = load i32, ptr %4, align 4, !tbaa !5
  %11 = mul i32 %10, 1
  %12 = uitofp i32 %11 to float
  %13 = load i32, ptr %4, align 4, !tbaa !5
  %14 = zext i32 %13 to i64
  %15 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 %14
  store float %12, ptr %15, align 4, !tbaa !9
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = mul i32 %16, 2
  %18 = uitofp i32 %17 to float
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = zext i32 %19 to i64
  %21 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 %20
  store float %18, ptr %21, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %9
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = add i32 %23, 1
  store i32 %24, ptr %4, align 4, !tbaa !5
  br label %6, !llvm.loop !11

25:                                               ; preds = %6
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %37, %25
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = icmp ult i32 %28, 4
  br i1 %29, label %30, label %40

30:                                               ; preds = %27
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 %32
  %34 = load float, ptr %33, align 4, !tbaa !9
  %35 = fpext float %34 to double
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %35)
  br label %37

37:                                               ; preds = %30
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = add i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !5
  br label %27, !llvm.loop !13

40:                                               ; preds = %27
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %53, %40
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = icmp ult i32 %44, 4
  br i1 %45, label %46, label %56

46:                                               ; preds = %43
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 %48
  %50 = load float, ptr %49, align 4, !tbaa !9
  %51 = fpext float %50 to double
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %51)
  br label %53

53:                                               ; preds = %46
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = add i32 %54, 1
  store i32 %55, ptr %4, align 4, !tbaa !5
  br label %43, !llvm.loop !14

56:                                               ; preds = %43
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %58 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  call void @static_reset_zero(ptr noundef %58)
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %70, %56
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = icmp ult i32 %61, 4
  br i1 %62, label %63, label %73

63:                                               ; preds = %60
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 %65
  %67 = load float, ptr %66, align 4, !tbaa !9
  %68 = fpext float %67 to double
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %68)
  br label %70

70:                                               ; preds = %63
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = add i32 %71, 1
  store i32 %72, ptr %4, align 4, !tbaa !5
  br label %60, !llvm.loop !15

73:                                               ; preds = %60
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %76 = call ptr @dynamic_reset_zero_create()
  store ptr %76, ptr %5, align 8, !tbaa !16
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %79 = load ptr, ptr %5, align 8, !tbaa !16
  %80 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  call void %79(ptr noundef %80)
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %93, %73
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = icmp ult i32 %84, 4
  br i1 %85, label %86, label %96

86:                                               ; preds = %83
  %87 = load i32, ptr %4, align 4, !tbaa !5
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 %88
  %90 = load float, ptr %89, align 4, !tbaa !9
  %91 = fpext float %90 to double
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %91)
  br label %93

93:                                               ; preds = %86
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = add i32 %94, 1
  store i32 %95, ptr %4, align 4, !tbaa !5
  br label %83, !llvm.loop !18

96:                                               ; preds = %83
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #3
  ret i32 0
}

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 = { "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 }

!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 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = distinct !{!18, !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"

@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @dynamic_reset_zero_create() local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @static_reset_zero(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [4 x float], align 16
  %2 = alloca [4 x float], align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #3
  %3 = getelementptr inbounds i8, ptr %1, i64 4
  %4 = getelementptr inbounds i8, ptr %2, i64 4
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = getelementptr inbounds i8, ptr %2, i64 8
  %7 = getelementptr inbounds i8, ptr %1, i64 12
  store <4 x float> <float 0.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00>, ptr %1, align 16, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %2, i64 12
  store <4 x float> <float 0.000000e+00, float 2.000000e+00, float 4.000000e+00, float 6.000000e+00>, ptr %2, align 16, !tbaa !5
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef 0.000000e+00)
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef 1.000000e+00)
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef 2.000000e+00)
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef 3.000000e+00)
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef 0.000000e+00)
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef 2.000000e+00)
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef 4.000000e+00)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef 6.000000e+00)
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  call void @static_reset_zero(ptr noundef nonnull %1)
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %22 = load float, ptr %1, align 16, !tbaa !5
  %23 = fpext float %22 to double
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %23)
  %25 = load float, ptr %3, align 4, !tbaa !5
  %26 = fpext float %25 to double
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %26)
  %28 = load float, ptr %5, align 8, !tbaa !5
  %29 = fpext float %28 to double
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %29)
  %31 = load float, ptr %7, align 4, !tbaa !5
  %32 = fpext float %31 to double
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %32)
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %36 = call ptr @dynamic_reset_zero_create()
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  call void %36(ptr noundef nonnull %2) #3
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %41 = load float, ptr %2, align 16, !tbaa !5
  %42 = fpext float %41 to double
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %42)
  %44 = load float, ptr %4, align 4, !tbaa !5
  %45 = fpext float %44 to double
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %45)
  %47 = load float, ptr %6, align 8, !tbaa !5
  %48 = fpext float %47 to double
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %48)
  %50 = load float, ptr %8, align 4, !tbaa !5
  %51 = fpext float %50 to double
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %51)
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #3
  ret i32 0
}

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 = { nounwind }

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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