; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/algorithm/src (cem)

; 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.HyperMat = type { i32, i32, i32, i32, [3 x i8], ptr, ptr }
%struct.SIMPLE_MAT = type { i32, i32, i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @hyper_mat_cem(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %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 i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.HyperMat, ptr %23, i32 0, i32 3
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = icmp eq i32 %25, 4
  br i1 %26, label %27, label %28

27:                                               ; preds = %2
  br label %32

28:                                               ; preds = %2
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

32:                                               ; preds = %27
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.HyperMat, ptr %33, i32 0, i32 4
  %35 = getelementptr inbounds [3 x i8], ptr %34, i64 0, i64 0
  %36 = call i32 @cmpstr(ptr noundef %35, ptr noundef @.str.3)
  %37 = icmp ne i32 %36, 1
  br i1 %37, label %38, label %40

38:                                               ; preds = %32
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  call void @convert2bsq(ptr noundef %39)
  br label %40

40:                                               ; preds = %38, %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.HyperMat, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !12
  store i32 %43, ptr %5, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.HyperMat, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !14
  store i32 %46, ptr %6, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.HyperMat, ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !15
  store i32 %49, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.HyperMat, ptr %50, i32 0, i32 3
  %52 = load i32, ptr %51, align 4, !tbaa !9
  store i32 %52, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = load i32, ptr %7, align 4, !tbaa !13
  %55 = load i32, ptr %5, align 4, !tbaa !13
  %56 = load i32, ptr %6, align 4, !tbaa !13
  %57 = mul nsw i32 %55, %56
  %58 = call ptr @reshape_hypermat_2_simplemat(ptr noundef %53, i32 noundef %54, i32 noundef %57)
  store ptr %58, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 4, !tbaa !16
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 8, !tbaa !18
  %65 = load i32, ptr %8, align 4, !tbaa !13
  %66 = call ptr @create_simple_mat(i32 noundef %61, i32 noundef %64, i32 noundef %65, i32 noundef 1)
  store ptr %66, ptr %10, align 8, !tbaa !5
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  call void @simple_mat_transport(ptr noundef %67, ptr noundef %68)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %69 = load i32, ptr %7, align 4, !tbaa !13
  %70 = load i32, ptr %7, align 4, !tbaa !13
  %71 = load i32, ptr %8, align 4, !tbaa !13
  %72 = call ptr @create_simple_mat(i32 noundef %69, i32 noundef %70, i32 noundef %71, i32 noundef 1)
  store ptr %72, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %73, i32 0, i32 5
  %75 = load ptr, ptr %74, align 8, !tbaa !19
  store ptr %75, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %76, i32 0, i32 5
  %78 = load ptr, ptr %77, align 8, !tbaa !19
  store ptr %78, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %79, i32 0, i32 5
  %81 = load ptr, ptr %80, align 8, !tbaa !19
  store ptr %81, ptr %14, align 8, !tbaa !5
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = load i32, ptr %7, align 4, !tbaa !13
  %86 = load i32, ptr %5, align 4, !tbaa !13
  %87 = load i32, ptr %6, align 4, !tbaa !13
  %88 = mul nsw i32 %86, %87
  %89 = load i32, ptr %7, align 4, !tbaa !13
  call void @correlation_matrix_float(ptr noundef %82, ptr noundef %83, ptr noundef %84, i32 noundef %85, i32 noundef %88, i32 noundef %89)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %90 = load i32, ptr %7, align 4, !tbaa !13
  %91 = load i32, ptr %7, align 4, !tbaa !13
  %92 = load i32, ptr %8, align 4, !tbaa !13
  %93 = call ptr @create_simple_mat(i32 noundef %90, i32 noundef %91, i32 noundef %92, i32 noundef 1)
  store ptr %93, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %94, i32 0, i32 5
  %96 = load ptr, ptr %95, align 8, !tbaa !19
  store ptr %96, ptr %16, align 8, !tbaa !5
  %97 = load ptr, ptr %16, align 8, !tbaa !5
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !13
  call void @invert_matrix_float(ptr noundef %97, ptr noundef %98, i32 noundef %99)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %100 = load i32, ptr %7, align 4, !tbaa !13
  %101 = sext i32 %100 to i64
  %102 = mul i64 %101, 4
  %103 = call noalias ptr @malloc(i64 noundef %102) #8
  store ptr %103, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %104 = load i32, ptr %7, align 4, !tbaa !13
  %105 = sext i32 %104 to i64
  %106 = mul i64 %105, 4
  %107 = call noalias ptr @malloc(i64 noundef %106) #8
  store ptr %107, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %108 = call noalias ptr @malloc(i64 noundef 4) #8
  store ptr %108, ptr %19, align 8, !tbaa !5
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = load i32, ptr %7, align 4, !tbaa !13
  %113 = load i32, ptr %7, align 4, !tbaa !13
  call void @MulMatrix_float(ptr noundef %109, ptr noundef %110, ptr noundef %111, i32 noundef %112, i32 noundef %113, i32 noundef 1)
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = load ptr, ptr %16, align 8, !tbaa !5
  %117 = load i32, ptr %7, align 4, !tbaa !13
  %118 = load i32, ptr %7, align 4, !tbaa !13
  call void @MulMatrix_float(ptr noundef %114, ptr noundef %115, ptr noundef %116, i32 noundef 1, i32 noundef %117, i32 noundef %118)
  %119 = load ptr, ptr %19, align 8, !tbaa !5
  %120 = load ptr, ptr %18, align 8, !tbaa !5
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = load i32, ptr %7, align 4, !tbaa !13
  call void @MulMatrix_float(ptr noundef %119, ptr noundef %120, ptr noundef %121, i32 noundef 1, i32 noundef %122, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !13
  br label %123

123:                                              ; preds = %142, %40
  %124 = load i32, ptr %20, align 4, !tbaa !13
  %125 = load i32, ptr %7, align 4, !tbaa !13
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %145

128:                                              ; preds = %123
  %129 = load ptr, ptr %17, align 8, !tbaa !5
  %130 = load i32, ptr %20, align 4, !tbaa !13
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds float, ptr %129, i64 %131
  %133 = load float, ptr %132, align 4, !tbaa !20
  %134 = load ptr, ptr %19, align 8, !tbaa !5
  %135 = getelementptr inbounds float, ptr %134, i64 0
  %136 = load float, ptr %135, align 4, !tbaa !20
  %137 = fdiv float %133, %136
  %138 = load ptr, ptr %17, align 8, !tbaa !5
  %139 = load i32, ptr %20, align 4, !tbaa !13
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds float, ptr %138, i64 %140
  store float %137, ptr %141, align 4, !tbaa !20
  br label %142

142:                                              ; preds = %128
  %143 = load i32, ptr %20, align 4, !tbaa !13
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %20, align 4, !tbaa !13
  br label %123, !llvm.loop !22

145:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %146 = load i32, ptr %6, align 4, !tbaa !13
  %147 = load i32, ptr %5, align 4, !tbaa !13
  %148 = load i32, ptr %8, align 4, !tbaa !13
  %149 = call ptr @create_simple_mat(i32 noundef %146, i32 noundef %147, i32 noundef %148, i32 noundef 1)
  store ptr %149, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %150 = load ptr, ptr %21, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %150, i32 0, i32 5
  %152 = load ptr, ptr %151, align 8, !tbaa !19
  store ptr %152, ptr %22, align 8, !tbaa !5
  %153 = load ptr, ptr %22, align 8, !tbaa !5
  %154 = load ptr, ptr %13, align 8, !tbaa !5
  %155 = load ptr, ptr %17, align 8, !tbaa !5
  %156 = load i32, ptr %5, align 4, !tbaa !13
  %157 = load i32, ptr %6, align 4, !tbaa !13
  %158 = mul nsw i32 %156, %157
  %159 = load i32, ptr %7, align 4, !tbaa !13
  call void @MulMatrix_float(ptr noundef %153, ptr noundef %154, ptr noundef %155, i32 noundef %158, i32 noundef %159, i32 noundef 1)
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  call void @delete_simple_mat(ptr noundef %160)
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  call void @delete_simple_mat(ptr noundef %161)
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  call void @delete_simple_mat(ptr noundef %162)
  %163 = load ptr, ptr %15, align 8, !tbaa !5
  call void @delete_simple_mat(ptr noundef %163)
  %164 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %164) #7
  store ptr null, ptr %17, align 8, !tbaa !5
  %165 = load ptr, ptr %18, align 8, !tbaa !5
  call void @free(ptr noundef %165) #7
  store ptr null, ptr %18, align 8, !tbaa !5
  %166 = load ptr, ptr %19, align 8, !tbaa !5
  call void @free(ptr noundef %166) #7
  store ptr null, ptr %19, align 8, !tbaa !5
  %167 = load ptr, ptr %21, align 8, !tbaa !5
  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 %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
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret ptr %167
}

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

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

declare i32 @cmpstr(ptr noundef, ptr noundef) #1

declare void @convert2bsq(ptr noundef) #1

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

declare ptr @reshape_hypermat_2_simplemat(ptr noundef, i32 noundef, i32 noundef) #1

declare ptr @create_simple_mat(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @simple_mat_transport(ptr noundef, ptr noundef) #1

declare void @correlation_matrix_float(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @invert_matrix_float(ptr noundef, ptr noundef, i32 noundef) #1

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

declare void @MulMatrix_float(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

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

declare void @delete_simple_mat(ptr noundef) #1

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

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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { 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 12}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !7, i64 16, !6, i64 24, !6, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !11, i64 8}
!16 = !{!17, !11, i64 4}
!17 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24}
!18 = !{!17, !11, i64 0}
!19 = !{!17, !6, i64 24}
!20 = !{!21, !21, i64 0}
!21 = !{!"float", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; 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 [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @hyper_mat_cem(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 12
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 4
  br i1 %5, label %10, label %6

6:                                                ; preds = %2
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #6
  unreachable

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = tail call i32 @cmpstr(ptr noundef nonnull %11, ptr noundef nonnull @.str.3) #7
  %.not = icmp eq i32 %12, 1
  br i1 %.not, label %14, label %13

13:                                               ; preds = %10
  tail call void @convert2bsq(ptr noundef nonnull %0) #7
  br label %14

14:                                               ; preds = %13, %10
  %15 = load i32, ptr %0, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %0, i64 4
  %17 = load i32, ptr %16, align 4, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !13
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = mul nsw i32 %17, %15
  %22 = tail call ptr @reshape_hypermat_2_simplemat(ptr noundef nonnull %0, i32 noundef %19, i32 noundef %21) #7
  %23 = getelementptr inbounds i8, ptr %22, i64 4
  %24 = load i32, ptr %23, align 4, !tbaa !14
  %25 = load i32, ptr %22, align 8, !tbaa !16
  %26 = tail call ptr @create_simple_mat(i32 noundef %24, i32 noundef %25, i32 noundef %20, i32 noundef 1) #7
  tail call void @simple_mat_transport(ptr noundef %26, ptr noundef nonnull %22) #7
  %27 = tail call ptr @create_simple_mat(i32 noundef %19, i32 noundef %19, i32 noundef %20, i32 noundef 1) #7
  %28 = getelementptr inbounds i8, ptr %22, i64 24
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %26, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = getelementptr inbounds i8, ptr %27, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !17
  tail call void @correlation_matrix_float(ptr noundef %33, ptr noundef %29, ptr noundef %31, i32 noundef %19, i32 noundef %21, i32 noundef %19) #7
  %34 = tail call ptr @create_simple_mat(i32 noundef %19, i32 noundef %19, i32 noundef %20, i32 noundef 1) #7
  %35 = getelementptr inbounds i8, ptr %34, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !17
  tail call void @invert_matrix_float(ptr noundef %36, ptr noundef %33, i32 noundef %19) #7
  %37 = sext i32 %19 to i64
  %38 = shl nsw i64 %37, 2
  %39 = tail call noalias ptr @malloc(i64 noundef %38) #8
  %40 = tail call noalias ptr @malloc(i64 noundef %38) #8
  %41 = tail call noalias dereferenceable_or_null(4) ptr @malloc(i64 noundef 4) #8
  tail call void @MulMatrix_float(ptr noundef %39, ptr noundef %36, ptr noundef %1, i32 noundef %19, i32 noundef %19, i32 noundef 1) #7
  tail call void @MulMatrix_float(ptr noundef %40, ptr noundef %1, ptr noundef %36, i32 noundef 1, i32 noundef %19, i32 noundef %19) #7
  tail call void @MulMatrix_float(ptr noundef %41, ptr noundef %40, ptr noundef %1, i32 noundef 1, i32 noundef %19, i32 noundef 1) #7
  %42 = icmp sgt i32 %19, 0
  br i1 %42, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14
  %43 = load float, ptr %41, align 4, !tbaa !18
  %wide.trip.count = zext nneg i32 %19 to i64
  %min.iters.check = icmp ult i32 %19, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483644
  %broadcast.splatinsert = insertelement <4 x float> poison, float %43, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %44 = getelementptr inbounds float, ptr %39, i64 %index
  %wide.load = load <4 x float>, ptr %44, align 4, !tbaa !18
  %45 = fdiv <4 x float> %wide.load, %broadcast.splat
  store <4 x float> %45, ptr %44, align 4, !tbaa !18
  %index.next = add nuw i64 %index, 4
  %46 = icmp eq i64 %index.next, %n.vec
  br i1 %46, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %14
  %47 = tail call ptr @create_simple_mat(i32 noundef %17, i32 noundef %15, i32 noundef %20, i32 noundef 1) #7
  %48 = getelementptr inbounds i8, ptr %47, i64 24
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  tail call void @MulMatrix_float(ptr noundef %49, ptr noundef %31, ptr noundef %39, i32 noundef %21, i32 noundef %19, i32 noundef 1) #7
  tail call void @delete_simple_mat(ptr noundef nonnull %22) #7
  tail call void @delete_simple_mat(ptr noundef %26) #7
  tail call void @delete_simple_mat(ptr noundef %27) #7
  tail call void @delete_simple_mat(ptr noundef %34) #7
  tail call void @free(ptr noundef %39) #7
  tail call void @free(ptr noundef %40) #7
  tail call void @free(ptr noundef %41) #7
  ret ptr %47

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %50 = getelementptr inbounds float, ptr %39, i64 %indvars.iv
  %51 = load float, ptr %50, align 4, !tbaa !18
  %52 = fdiv float %51, %43
  store float %52, ptr %50, align 4, !tbaa !18
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !24
}

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

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

declare i32 @cmpstr(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @convert2bsq(ptr noundef) local_unnamed_addr #3

declare ptr @reshape_hypermat_2_simplemat(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare ptr @create_simple_mat(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @simple_mat_transport(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @correlation_matrix_float(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @invert_matrix_float(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

declare void @MulMatrix_float(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @delete_simple_mat(ptr noundef) local_unnamed_addr #3

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

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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind 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 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { 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, !7, i64 12}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !8, i64 16, !10, i64 24, !10, i64 32}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!6, !7, i64 8}
!14 = !{!15, !7, i64 4}
!15 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24}
!16 = !{!15, !7, i64 0}
!17 = !{!15, !10, i64 24}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !8, i64 0}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !21, !23, !22}


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