; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/core/src/c_src (hypermat)

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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @create_hyper_mat_with_data(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #1 {
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  store i32 %0, ptr %8, align 4, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !9
  store ptr %6, ptr %14, align 8, !tbaa !9
  %21 = load i32, ptr %8, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %7
  br label %28

24:                                               ; preds = %7
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #8
  unreachable

28:                                               ; preds = %23
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  br label %36

32:                                               ; preds = %28
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #8
  unreachable

36:                                               ; preds = %31
  %37 = load i32, ptr %10, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  br label %44

40:                                               ; preds = %36
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #8
  unreachable

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  store i64 40, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %45 = load i32, ptr %11, align 4, !tbaa !5
  %46 = call i32 @get_elemsize(i32 noundef %45)
  store i32 %46, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = load i32, ptr %9, align 4, !tbaa !5
  %49 = mul nsw i32 %47, %48
  %50 = load i32, ptr %10, align 4, !tbaa !5
  %51 = mul nsw i32 %49, %50
  %52 = load i32, ptr %17, align 4, !tbaa !5
  %53 = mul nsw i32 %51, %52
  %54 = sext i32 %53 to i64
  store i64 %54, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = mul i64 %56, 4
  %58 = trunc i64 %57 to i32
  store i32 %58, ptr %19, align 4, !tbaa !5
  %59 = load i64, ptr %18, align 8, !tbaa !11
  %60 = add nsw i64 %59, 64
  %61 = load i64, ptr %16, align 8, !tbaa !11
  %62 = add nsw i64 %61, %60
  store i64 %62, ptr %16, align 8, !tbaa !11
  %63 = load i32, ptr %19, align 4, !tbaa !5
  %64 = add nsw i32 %63, 64
  %65 = sext i32 %64 to i64
  %66 = load i64, ptr %16, align 8, !tbaa !11
  %67 = add nsw i64 %66, %65
  store i64 %67, ptr %16, align 8, !tbaa !11
  %68 = load i64, ptr %16, align 8, !tbaa !11
  %69 = mul i64 1, %68
  %70 = call noalias ptr @malloc(i64 noundef %69) #10
  store ptr %70, ptr %15, align 8, !tbaa !9
  %71 = load ptr, ptr %15, align 8, !tbaa !9
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %74

73:                                               ; preds = %44
  br label %78

74:                                               ; preds = %44
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %76 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #8
  unreachable

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %79 = load ptr, ptr %15, align 8, !tbaa !9
  %80 = ptrtoint ptr %79 to i64
  %81 = add i64 %80, 40
  store i64 %81, ptr %20, align 8, !tbaa !11
  %82 = load i64, ptr %20, align 8, !tbaa !11
  %83 = add i64 %82, 63
  %84 = and i64 %83, -64
  store i64 %84, ptr %20, align 8, !tbaa !11
  %85 = load i64, ptr %20, align 8, !tbaa !11
  %86 = inttoptr i64 %85 to ptr
  %87 = load i64, ptr %18, align 8, !tbaa !11
  call void @llvm.memset.p0.i64(ptr align 1 %86, i8 0, i64 %87, i1 false)
  %88 = load i64, ptr %20, align 8, !tbaa !11
  %89 = inttoptr i64 %88 to ptr
  %90 = load ptr, ptr %15, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.HyperMat, ptr %90, i32 0, i32 5
  store ptr %89, ptr %91, align 8, !tbaa !13
  %92 = load i64, ptr %18, align 8, !tbaa !11
  %93 = load i64, ptr %20, align 8, !tbaa !11
  %94 = add i64 %93, %92
  store i64 %94, ptr %20, align 8, !tbaa !11
  %95 = load i64, ptr %20, align 8, !tbaa !11
  %96 = add i64 %95, 63
  %97 = and i64 %96, -64
  store i64 %97, ptr %20, align 8, !tbaa !11
  %98 = load i64, ptr %20, align 8, !tbaa !11
  %99 = inttoptr i64 %98 to ptr
  %100 = load i32, ptr %19, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %99, i8 0, i64 %101, i1 false)
  %102 = load i64, ptr %20, align 8, !tbaa !11
  %103 = inttoptr i64 %102 to ptr
  %104 = load ptr, ptr %15, align 8, !tbaa !9
  %105 = getelementptr inbounds %struct.HyperMat, ptr %104, i32 0, i32 6
  store ptr %103, ptr %105, align 8, !tbaa !15
  %106 = load ptr, ptr %13, align 8, !tbaa !9
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %114

108:                                              ; preds = %78
  %109 = load ptr, ptr %15, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.HyperMat, ptr %109, i32 0, i32 5
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  %112 = load ptr, ptr %13, align 8, !tbaa !9
  %113 = load i64, ptr %18, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %111, ptr align 1 %112, i64 %113, i1 false)
  br label %114

114:                                              ; preds = %108, %78
  %115 = load ptr, ptr %14, align 8, !tbaa !9
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %124

117:                                              ; preds = %114
  %118 = load ptr, ptr %15, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.HyperMat, ptr %118, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !15
  %121 = load ptr, ptr %14, align 8, !tbaa !9
  %122 = load i32, ptr %19, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %120, ptr align 4 %121, i64 %123, i1 false)
  br label %124

124:                                              ; preds = %117, %114
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = load ptr, ptr %15, align 8, !tbaa !9
  %127 = getelementptr inbounds %struct.HyperMat, ptr %126, i32 0, i32 0
  store i32 %125, ptr %127, align 8, !tbaa !16
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = load ptr, ptr %15, align 8, !tbaa !9
  %130 = getelementptr inbounds %struct.HyperMat, ptr %129, i32 0, i32 1
  store i32 %128, ptr %130, align 4, !tbaa !17
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = load ptr, ptr %15, align 8, !tbaa !9
  %133 = getelementptr inbounds %struct.HyperMat, ptr %132, i32 0, i32 2
  store i32 %131, ptr %133, align 8, !tbaa !18
  %134 = load i32, ptr %11, align 4, !tbaa !5
  %135 = load ptr, ptr %15, align 8, !tbaa !9
  %136 = getelementptr inbounds %struct.HyperMat, ptr %135, i32 0, i32 3
  store i32 %134, ptr %136, align 4, !tbaa !19
  %137 = load ptr, ptr %12, align 8, !tbaa !9
  %138 = getelementptr inbounds i8, ptr %137, i64 0
  %139 = load i8, ptr %138, align 1, !tbaa !20
  %140 = load ptr, ptr %15, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.HyperMat, ptr %140, i32 0, i32 4
  %142 = getelementptr inbounds [3 x i8], ptr %141, i64 0, i64 0
  store i8 %139, ptr %142, align 8, !tbaa !20
  %143 = load ptr, ptr %12, align 8, !tbaa !9
  %144 = getelementptr inbounds i8, ptr %143, i64 1
  %145 = load i8, ptr %144, align 1, !tbaa !20
  %146 = load ptr, ptr %15, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct.HyperMat, ptr %146, i32 0, i32 4
  %148 = getelementptr inbounds [3 x i8], ptr %147, i64 0, i64 1
  store i8 %145, ptr %148, align 1, !tbaa !20
  %149 = load ptr, ptr %12, align 8, !tbaa !9
  %150 = getelementptr inbounds i8, ptr %149, i64 2
  %151 = load i8, ptr %150, align 1, !tbaa !20
  %152 = load ptr, ptr %15, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.HyperMat, ptr %152, i32 0, i32 4
  %154 = getelementptr inbounds [3 x i8], ptr %153, i64 0, i64 2
  store i8 %151, ptr %154, align 2, !tbaa !20
  %155 = load ptr, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  ret ptr %155
}

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @get_elemsize(i32 noundef) #4

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !7, i64 16, !10, i64 24, !10, i64 32}
!15 = !{!14, !10, i64 32}
!16 = !{!14, !6, i64 0}
!17 = !{!14, !6, i64 4}
!18 = !{!14, !6, i64 8}
!19 = !{!14, !6, i64 12}
!20 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @create_hyper_mat_with_data(i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr nocapture noundef readonly %4, ptr noundef readonly %5, ptr noundef readonly %6) local_unnamed_addr #0 {
  %8 = icmp sgt i32 %0, 0
  br i1 %8, label %13, label %9

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

13:                                               ; preds = %7
  %14 = icmp sgt i32 %1, 0
  br i1 %14, label %19, label %15

15:                                               ; preds = %13
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #7
  unreachable

19:                                               ; preds = %13
  %20 = icmp sgt i32 %2, 0
  br i1 %20, label %25, label %21

21:                                               ; preds = %19
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #7
  unreachable

25:                                               ; preds = %19
  %26 = tail call i32 @get_elemsize(i32 noundef %3)
  %27 = mul nuw nsw i32 %1, %0
  %28 = mul nuw nsw i32 %27, %2
  %29 = mul nsw i32 %28, %26
  %30 = sext i32 %29 to i64
  %31 = shl i32 %2, 2
  %32 = sext i32 %31 to i64
  %33 = add nsw i64 %32, 168
  %34 = add nsw i64 %33, %30
  %35 = tail call noalias ptr @malloc(i64 noundef %34) #8
  %.not = icmp eq ptr %35, null
  br i1 %.not, label %36, label %40

36:                                               ; preds = %25
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #7
  unreachable

40:                                               ; preds = %25
  %41 = ptrtoint ptr %35 to i64
  %42 = add i64 %41, 103
  %43 = and i64 %42, -64
  %44 = inttoptr i64 %43 to ptr
  tail call void @llvm.memset.p0.i64(ptr align 64 %44, i8 0, i64 %30, i1 false)
  %45 = getelementptr inbounds i8, ptr %35, i64 24
  store ptr %44, ptr %45, align 8, !tbaa !5
  %46 = add nsw i64 %30, 63
  %47 = add i64 %46, %43
  %48 = and i64 %47, -64
  %49 = inttoptr i64 %48 to ptr
  tail call void @llvm.memset.p0.i64(ptr align 64 %49, i8 0, i64 %32, i1 false)
  %50 = getelementptr inbounds i8, ptr %35, i64 32
  store ptr %49, ptr %50, align 8, !tbaa !11
  %.not55 = icmp eq ptr %5, null
  br i1 %.not55, label %53, label %51

51:                                               ; preds = %40
  %52 = load ptr, ptr %45, align 8, !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %52, ptr nonnull align 1 %5, i64 %30, i1 false)
  br label %53

53:                                               ; preds = %51, %40
  %.not56 = icmp eq ptr %6, null
  br i1 %.not56, label %56, label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %50, align 8, !tbaa !11
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr nonnull align 4 %6, i64 %32, i1 false)
  br label %56

56:                                               ; preds = %54, %53
  store i32 %0, ptr %35, align 8, !tbaa !12
  %57 = getelementptr inbounds i8, ptr %35, i64 4
  store i32 %1, ptr %57, align 4, !tbaa !13
  %58 = getelementptr inbounds i8, ptr %35, i64 8
  store i32 %2, ptr %58, align 8, !tbaa !14
  %59 = getelementptr inbounds i8, ptr %35, i64 12
  store i32 %3, ptr %59, align 4, !tbaa !15
  %60 = load i8, ptr %4, align 1, !tbaa !16
  %61 = getelementptr inbounds i8, ptr %35, i64 16
  store i8 %60, ptr %61, align 8, !tbaa !16
  %62 = getelementptr inbounds i8, ptr %4, i64 1
  %63 = load i8, ptr %62, align 1, !tbaa !16
  %64 = getelementptr inbounds i8, ptr %35, i64 17
  store i8 %63, ptr %64, align 1, !tbaa !16
  %65 = getelementptr inbounds i8, ptr %4, i64 2
  %66 = load i8, ptr %65, align 1, !tbaa !16
  %67 = getelementptr inbounds i8, ptr %35, i64 18
  store i8 %66, ptr %67, align 2, !tbaa !16
  ret ptr %35
}

; 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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @get_elemsize(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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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 = { 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 #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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { noreturn 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, !10, i64 24}
!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, !10, i64 32}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !7, i64 4}
!14 = !{!6, !7, i64 8}
!15 = !{!6, !7, i64 12}
!16 = !{!8, !8, i64 0}


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