; LLVM IR from kala13x/libxutils :: src/sys (mon)

; 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.XCPUStats = type { [3 x i32], i16, %struct.XProcInfo, %struct.XCPUInfo, %struct.XArray_ }
%struct.XProcInfo = type { i32, i32, i64, i64, i64, i64, i64 }
%struct.XCPUInfo = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
%struct.XArray_ = type { ptr, ptr, i32, ptr, i8, i8, i8, i64, i64 }
%struct.XTopStats = type { i32, %struct.XSyncMutex, %struct.XCPUStats, %struct.XMemInfo, i32, %struct.XArray_, %struct.XTask, i32 }
%struct.XSyncMutex = type { %union.pthread_mutex_t, i8 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.XMemInfo = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.XTask = type { ptr, ptr, %struct.XThread, i32, i32, i32 }
%struct.XThread = type { ptr, ptr, i64, i32, i8, i8 }

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @XMon_GetCPUStats(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %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 i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.XCPUStats, ptr %12, i32 0, i32 0
  %14 = getelementptr inbounds [3 x i32], ptr %13, i64 0, i64 1
  store i32 0, ptr %14, align 4, !tbaa !9
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.XCPUStats, ptr %15, i32 0, i32 0
  %17 = getelementptr inbounds [3 x i32], ptr %16, i64 0, i64 0
  store i32 0, ptr %17, align 8, !tbaa !9
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.XCPUStats, ptr %18, i32 0, i32 4
  %20 = getelementptr inbounds %struct.XArray_, ptr %19, i32 0, i32 8
  store i64 0, ptr %20, align 8, !tbaa !11
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.XCPUStats, ptr %21, i32 0, i32 0
  %23 = getelementptr inbounds [3 x i32], ptr %22, i64 0, i64 2
  store i32 0, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.XTopStats, ptr %24, i32 0, i32 2
  %26 = getelementptr inbounds %struct.XCPUStats, ptr %25, i32 0, i32 1
  %27 = atomicrmw add ptr %26, i16 0 seq_cst, align 4
  %28 = add i16 %27, 0
  %29 = zext i16 %28 to i32
  store i32 %29, ptr %7, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = icmp sle i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %138

33:                                               ; preds = %2
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.XCPUStats, ptr %34, i32 0, i32 4
  %36 = call ptr @XArray_InitPool(ptr noundef %35, i64 noundef 0, i64 noundef 1, i8 noundef zeroext 0)
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %33
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %138

39:                                               ; preds = %33
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.XCPUStats, ptr %40, i32 0, i32 4
  %42 = getelementptr inbounds %struct.XArray_, ptr %41, i32 0, i32 1
  store ptr @XMon_ClearCb, ptr %42, align 8, !tbaa !18
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.XCPUStats, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.XTopStats, ptr %45, i32 0, i32 2
  %47 = getelementptr inbounds %struct.XCPUStats, ptr %46, i32 0, i32 2
  call void @XMon_CopyCPUUsage(ptr noundef %44, ptr noundef %47)
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.XCPUStats, ptr %48, i32 0, i32 3
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.XTopStats, ptr %50, i32 0, i32 2
  %52 = getelementptr inbounds %struct.XCPUStats, ptr %51, i32 0, i32 3
  call void @XMon_CopyCPUInfo(ptr noundef %49, ptr noundef %52)
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %88, %39
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %91

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.XTopStats, ptr %58, i32 0, i32 2
  %60 = getelementptr inbounds %struct.XCPUStats, ptr %59, i32 0, i32 4
  %61 = load i32, ptr %6, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = call ptr @XArray_GetData(ptr noundef %60, i64 noundef %62)
  store ptr %63, ptr %9, align 8, !tbaa !5
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %67

66:                                               ; preds = %57
  store i32 4, ptr %8, align 4
  br label %85

67:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %68 = call noalias ptr @malloc(i64 noundef 96) #6
  store ptr %68, ptr %10, align 8, !tbaa !5
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = icmp eq ptr %69, null
  br i1 %70, label %71, label %72

71:                                               ; preds = %67
  store i32 4, ptr %8, align 4
  br label %84

72:                                               ; preds = %67
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  call void @XMon_CopyCPUInfo(ptr noundef %73, ptr noundef %74)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.XCPUStats, ptr %75, i32 0, i32 4
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = call i32 @XArray_AddData(ptr noundef %76, ptr noundef %77, i64 noundef 0)
  store i32 %78, ptr %11, align 4, !tbaa !9
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = icmp slt i32 %79, 0
  br i1 %80, label %81, label %83

81:                                               ; preds = %72
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %82) #5
  br label %83

83:                                               ; preds = %81, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  store i32 0, ptr %8, align 4
  br label %84

84:                                               ; preds = %83, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %85

85:                                               ; preds = %84, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %86 = load i32, ptr %8, align 4
  switch i32 %86, label %140 [
    i32 0, label %87
    i32 4, label %88
  ]

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %87, %85
  %89 = load i32, ptr %6, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %6, align 4, !tbaa !9
  br label %53, !llvm.loop !19

91:                                               ; preds = %53
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.XCPUStats, ptr %92, i32 0, i32 4
  %94 = getelementptr inbounds %struct.XArray_, ptr %93, i32 0, i32 8
  %95 = load i64, ptr %94, align 8, !tbaa !11
  %96 = trunc i64 %95 to i16
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.XCPUStats, ptr %97, i32 0, i32 1
  store i16 %96, ptr %98, align 4, !tbaa !21
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.XTopStats, ptr %99, i32 0, i32 2
  %101 = getelementptr inbounds %struct.XCPUStats, ptr %100, i32 0, i32 0
  %102 = getelementptr inbounds [3 x i32], ptr %101, i64 0, i64 0
  %103 = atomicrmw add ptr %102, i32 0 seq_cst, align 8
  %104 = add i32 %103, 0
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.XCPUStats, ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds [3 x i32], ptr %106, i64 0, i64 0
  store i32 %104, ptr %107, align 8, !tbaa !9
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.XTopStats, ptr %108, i32 0, i32 2
  %110 = getelementptr inbounds %struct.XCPUStats, ptr %109, i32 0, i32 0
  %111 = getelementptr inbounds [3 x i32], ptr %110, i64 0, i64 1
  %112 = atomicrmw add ptr %111, i32 0 seq_cst, align 4
  %113 = add i32 %112, 0
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.XCPUStats, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds [3 x i32], ptr %115, i64 0, i64 1
  store i32 %113, ptr %116, align 4, !tbaa !9
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.XTopStats, ptr %117, i32 0, i32 2
  %119 = getelementptr inbounds %struct.XCPUStats, ptr %118, i32 0, i32 0
  %120 = getelementptr inbounds [3 x i32], ptr %119, i64 0, i64 2
  %121 = atomicrmw add ptr %120, i32 0 seq_cst, align 8
  %122 = add i32 %121, 0
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.XCPUStats, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds [3 x i32], ptr %124, i64 0, i64 2
  store i32 %122, ptr %125, align 8, !tbaa !9
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.XCPUStats, ptr %126, i32 0, i32 1
  %128 = load i16, ptr %127, align 4, !tbaa !21
  %129 = icmp ne i16 %128, 0
  br i1 %129, label %130, label %135

130:                                              ; preds = %91
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.XCPUStats, ptr %131, i32 0, i32 1
  %133 = load i16, ptr %132, align 4, !tbaa !21
  %134 = zext i16 %133 to i32
  store i32 %134, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %138

135:                                              ; preds = %91
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.XCPUStats, ptr %136, i32 0, i32 4
  call void @XArray_Destroy(ptr noundef %137)
  store i32 -2, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %138

138:                                              ; preds = %135, %130, %38, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %139 = load i32, ptr %3, align 4
  ret i32 %139

140:                                              ; preds = %85
  unreachable
}

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

declare ptr @XArray_InitPool(ptr noundef, i64 noundef, i64 noundef, i8 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @XMon_CopyCPUUsage(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @XMon_CopyCPUInfo(ptr noundef, ptr noundef) #0

declare ptr @XArray_GetData(ptr noundef, i64 noundef) #3

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

declare i32 @XArray_AddData(ptr noundef, ptr noundef, i64 noundef) #3

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

declare void @XArray_Destroy(ptr noundef) #3

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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 }
attributes #6 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !15, i64 208}
!12 = !{!"XCPUStats", !7, i64 0, !13, i64 12, !14, i64 16, !16, i64 64, !17, i64 160}
!13 = !{!"short", !7, i64 0}
!14 = !{!"XProcInfo", !10, i64 0, !10, i64 4, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40}
!15 = !{!"long", !7, i64 0}
!16 = !{!"XCPUInfo", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !15, i64 88}
!17 = !{!"XArray_", !6, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !7, i64 32, !7, i64 33, !7, i64 34, !15, i64 40, !15, i64 48}
!18 = !{!12, !6, i64 168}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !13, i64 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"

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -2, 65536) i32 @XMon_GetCPUStats(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %1, i64 4
  store i32 0, ptr %3, align 4, !tbaa !5
  store i32 0, ptr %1, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %1, i64 160
  %5 = getelementptr inbounds i8, ptr %1, i64 208
  store i64 0, ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  store i32 0, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  %8 = getelementptr inbounds i8, ptr %0, i64 68
  %9 = atomicrmw or ptr %8, i16 0 seq_cst, align 4
  %10 = icmp eq i16 %9, 0
  br i1 %10, label %45, label %11

11:                                               ; preds = %2
  %12 = tail call ptr @XArray_InitPool(ptr noundef nonnull %4, i64 noundef 0, i64 noundef 1, i8 noundef zeroext 0) #4
  %13 = icmp eq ptr %12, null
  br i1 %13, label %45, label %14

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %1, i64 168
  store ptr @XMon_ClearCb, ptr %15, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %1, i64 16
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @XMon_CopyCPUUsage(ptr noundef nonnull %16, ptr noundef nonnull %17)
  %18 = getelementptr inbounds i8, ptr %1, i64 64
  %19 = getelementptr inbounds i8, ptr %0, i64 120
  tail call void @XMon_CopyCPUInfo(ptr noundef nonnull %18, ptr noundef nonnull %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 216
  %wide.trip.count = zext i16 %9 to i64
  br label %21

21:                                               ; preds = %14, %31
  %indvars.iv = phi i64 [ 0, %14 ], [ %indvars.iv.next, %31 ]
  %22 = tail call ptr @XArray_GetData(ptr noundef nonnull %20, i64 noundef %indvars.iv) #4
  %23 = icmp eq ptr %22, null
  br i1 %23, label %31, label %24

24:                                               ; preds = %21
  %25 = tail call noalias dereferenceable_or_null(96) ptr @malloc(i64 noundef 96) #5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %31, label %27

27:                                               ; preds = %24
  tail call void @XMon_CopyCPUInfo(ptr noundef nonnull %25, ptr noundef nonnull %22)
  %28 = tail call i32 @XArray_AddData(ptr noundef nonnull %4, ptr noundef nonnull %25, i64 noundef 0) #4
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %27
  tail call void @free(ptr noundef nonnull %25) #4
  br label %31

31:                                               ; preds = %24, %30, %27, %21
  %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 %32, label %21, !llvm.loop !18

32:                                               ; preds = %31
  %33 = load i64, ptr %5, align 8, !tbaa !9
  %34 = trunc i64 %33 to i16
  %35 = getelementptr inbounds i8, ptr %1, i64 12
  store i16 %34, ptr %35, align 4, !tbaa !20
  %36 = atomicrmw or ptr %7, i32 0 seq_cst, align 8
  store i32 %36, ptr %1, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %0, i64 60
  %38 = atomicrmw or ptr %37, i32 0 seq_cst, align 4
  store i32 %38, ptr %3, align 4, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %0, i64 64
  %40 = atomicrmw or ptr %39, i32 0 seq_cst, align 8
  store i32 %40, ptr %6, align 8, !tbaa !5
  %41 = load i16, ptr %35, align 4, !tbaa !20
  %.not = icmp eq i16 %41, 0
  br i1 %.not, label %44, label %42

42:                                               ; preds = %32
  %43 = zext i16 %41 to i32
  br label %45

44:                                               ; preds = %32
  tail call void @XArray_Destroy(ptr noundef nonnull %4) #4
  br label %45

45:                                               ; preds = %11, %2, %44, %42
  %.0 = phi i32 [ %43, %42 ], [ -2, %44 ], [ 0, %2 ], [ -1, %11 ]
  ret i32 %.0
}

declare ptr @XArray_InitPool(ptr noundef, i64 noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @XMon_CopyCPUUsage(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @XMon_CopyCPUInfo(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @XArray_GetData(ptr noundef, i64 noundef) local_unnamed_addr #2

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

declare i32 @XArray_AddData(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @XArray_Destroy(ptr noundef) local_unnamed_addr #2

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 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 #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 = { 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 #4 = { nounwind }
attributes #5 = { 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, !13, i64 208}
!10 = !{!"XCPUStats", !7, i64 0, !11, i64 12, !12, i64 16, !14, i64 64, !15, i64 160}
!11 = !{!"short", !7, i64 0}
!12 = !{!"XProcInfo", !6, i64 0, !6, i64 4, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40}
!13 = !{!"long", !7, i64 0}
!14 = !{!"XCPUInfo", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !13, i64 88}
!15 = !{!"XArray_", !16, i64 0, !16, i64 8, !6, i64 16, !16, i64 24, !7, i64 32, !7, i64 33, !7, i64 34, !13, i64 40, !13, i64 48}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!10, !16, i64 168}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!10, !11, i64 12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass