; LLVM IR from libxsmm/libxsmm :: samples/external_aux (perf_counter_markers)

; 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.perf_core_fd = type { [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], i32 }
%struct.ctrs_core = type { [28 x i64], [28 x i64], [28 x i64], [28 x i64], [28 x i64], [28 x i64], [28 x i64], [28 x i64], [28 x i64], [28 x i64], [28 x i64], i32 }

@gbl_core_perf_fd = external hidden global %struct.perf_core_fd, align 4

; 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
declare hidden i64 @readctr(i32 noundef) #1

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

4:                                                ; preds = %173, %1
  %5 = load i32, ptr %3, align 4, !tbaa !9
  %6 = icmp slt i32 %5, 28
  br i1 %6, label %7, label %176

7:                                                ; preds = %4
  %8 = load i32, ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 11), align 4, !tbaa !11
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %31

10:                                               ; preds = %7
  %11 = load i32, ptr %3, align 4, !tbaa !9
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [28 x i32], ptr @gbl_core_perf_fd, i64 0, i64 %12
  %14 = load i32, ptr %13, align 4, !tbaa !9
  %15 = call i64 @readctr(i32 noundef %14)
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.ctrs_core, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [28 x i64], ptr %17, i64 0, i64 %19
  store i64 %15, ptr %20, align 8, !tbaa !13
  %21 = load i32, ptr %3, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 1), i64 0, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = call i64 @readctr(i32 noundef %24)
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ctrs_core, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [28 x i64], ptr %27, i64 0, i64 %29
  store i64 %25, ptr %30, align 8, !tbaa !13
  br label %172

31:                                               ; preds = %7
  %32 = load i32, ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 11), align 4, !tbaa !11
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %34, label %105

34:                                               ; preds = %31
  %35 = load i32, ptr %3, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [28 x i32], ptr @gbl_core_perf_fd, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = call i64 @readctr(i32 noundef %38)
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ctrs_core, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [28 x i64], ptr %41, i64 0, i64 %43
  store i64 %39, ptr %44, align 8, !tbaa !13
  %45 = load i32, ptr %3, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 1), i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = call i64 @readctr(i32 noundef %48)
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ctrs_core, ptr %50, i32 0, i32 1
  %52 = load i32, ptr %3, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [28 x i64], ptr %51, i64 0, i64 %53
  store i64 %49, ptr %54, align 8, !tbaa !13
  %55 = load i32, ptr %3, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 2), i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = call i64 @readctr(i32 noundef %58)
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ctrs_core, ptr %60, i32 0, i32 2
  %62 = load i32, ptr %3, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [28 x i64], ptr %61, i64 0, i64 %63
  store i64 %59, ptr %64, align 8, !tbaa !13
  %65 = load i32, ptr %3, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 3), i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = call i64 @readctr(i32 noundef %68)
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ctrs_core, ptr %70, i32 0, i32 3
  %72 = load i32, ptr %3, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [28 x i64], ptr %71, i64 0, i64 %73
  store i64 %69, ptr %74, align 8, !tbaa !13
  %75 = load i32, ptr %3, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 4), i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = call i64 @readctr(i32 noundef %78)
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ctrs_core, ptr %80, i32 0, i32 4
  %82 = load i32, ptr %3, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [28 x i64], ptr %81, i64 0, i64 %83
  store i64 %79, ptr %84, align 8, !tbaa !13
  %85 = load i32, ptr %3, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 5), i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = call i64 @readctr(i32 noundef %88)
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ctrs_core, ptr %90, i32 0, i32 5
  %92 = load i32, ptr %3, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [28 x i64], ptr %91, i64 0, i64 %93
  store i64 %89, ptr %94, align 8, !tbaa !13
  %95 = load i32, ptr %3, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 6), i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = call i64 @readctr(i32 noundef %98)
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ctrs_core, ptr %100, i32 0, i32 6
  %102 = load i32, ptr %3, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [28 x i64], ptr %101, i64 0, i64 %103
  store i64 %99, ptr %104, align 8, !tbaa !13
  br label %171

105:                                              ; preds = %31
  %106 = load i32, ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 11), align 4, !tbaa !11
  %107 = icmp eq i32 %106, 2
  br i1 %107, label %108, label %169

108:                                              ; preds = %105
  %109 = load i32, ptr %3, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [28 x i32], ptr @gbl_core_perf_fd, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = call i64 @readctr(i32 noundef %112)
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ctrs_core, ptr %114, i32 0, i32 0
  %116 = load i32, ptr %3, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [28 x i64], ptr %115, i64 0, i64 %117
  store i64 %113, ptr %118, align 8, !tbaa !13
  %119 = load i32, ptr %3, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 1), i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = call i64 @readctr(i32 noundef %122)
  %124 = load ptr, ptr %2, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.ctrs_core, ptr %124, i32 0, i32 1
  %126 = load i32, ptr %3, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [28 x i64], ptr %125, i64 0, i64 %127
  store i64 %123, ptr %128, align 8, !tbaa !13
  %129 = load i32, ptr %3, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 7), i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = call i64 @readctr(i32 noundef %132)
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ctrs_core, ptr %134, i32 0, i32 7
  %136 = load i32, ptr %3, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [28 x i64], ptr %135, i64 0, i64 %137
  store i64 %133, ptr %138, align 8, !tbaa !13
  %139 = load i32, ptr %3, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 8), i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !9
  %143 = call i64 @readctr(i32 noundef %142)
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.ctrs_core, ptr %144, i32 0, i32 8
  %146 = load i32, ptr %3, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [28 x i64], ptr %145, i64 0, i64 %147
  store i64 %143, ptr %148, align 8, !tbaa !13
  %149 = load i32, ptr %3, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 9), i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = call i64 @readctr(i32 noundef %152)
  %154 = load ptr, ptr %2, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.ctrs_core, ptr %154, i32 0, i32 9
  %156 = load i32, ptr %3, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [28 x i64], ptr %155, i64 0, i64 %157
  store i64 %153, ptr %158, align 8, !tbaa !13
  %159 = load i32, ptr %3, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 10), i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = call i64 @readctr(i32 noundef %162)
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.ctrs_core, ptr %164, i32 0, i32 10
  %166 = load i32, ptr %3, align 4, !tbaa !9
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [28 x i64], ptr %165, i64 0, i64 %167
  store i64 %163, ptr %168, align 8, !tbaa !13
  br label %170

169:                                              ; preds = %105
  br label %170

170:                                              ; preds = %169, %108
  br label %171

171:                                              ; preds = %170, %34
  br label %172

172:                                              ; preds = %171, %10
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %3, align 4, !tbaa !9
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %3, align 4, !tbaa !9
  br label %4, !llvm.loop !15

176:                                              ; preds = %4
  %177 = load i32, ptr getelementptr inbounds (%struct.perf_core_fd, ptr @gbl_core_perf_fd, i32 0, i32 11), align 4, !tbaa !11
  %178 = load ptr, ptr %2, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.ctrs_core, ptr %178, i32 0, i32 11
  store i32 %177, ptr %179, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  ret void
}

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 = { 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 = !{!"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, !10, i64 1232}
!12 = !{!"perf_core_fd", !7, i64 0, !7, i64 112, !7, i64 224, !7, i64 336, !7, i64 448, !7, i64 560, !7, i64 672, !7, i64 784, !7, i64 896, !7, i64 1008, !7, i64 1120, !10, i64 1232}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !10, i64 2464}
!18 = !{!"ctrs_core", !7, i64 0, !7, i64 224, !7, i64 448, !7, i64 672, !7, i64 896, !7, i64 1120, !7, i64 1344, !7, i64 1568, !7, i64 1792, !7, i64 2016, !7, i64 2240, !10, i64 2464}


; 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.perf_core_fd = type { [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], [28 x i32], i32 }

@gbl_core_perf_fd = external hidden local_unnamed_addr global %struct.perf_core_fd, align 4

; Function Attrs: nounwind uwtable
declare hidden i64 @readctr(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @read_core_ctrs(ptr nocapture noundef writeonly %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 224
  %3 = getelementptr inbounds i8, ptr %0, i64 2016
  %4 = getelementptr inbounds i8, ptr %0, i64 2240
  %5 = getelementptr inbounds i8, ptr %0, i64 1120
  %6 = getelementptr inbounds i8, ptr %0, i64 1344
  br label %7

7:                                                ; preds = %1, %44
  %indvars.iv = phi i64 [ 0, %1 ], [ %indvars.iv.next, %44 ]
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 1232), align 4, !tbaa !5
  switch i32 %8, label %44 [
    i32 0, label %.sink.split
    i32 1, label %9
    i32 2, label %.sink.split.sink.split
  ]

9:                                                ; preds = %7
  %10 = getelementptr inbounds [28 x i32], ptr @gbl_core_perf_fd, i64 0, i64 %indvars.iv
  %11 = load i32, ptr %10, align 4, !tbaa !10
  %12 = tail call i64 @readctr(i32 noundef %11)
  %13 = getelementptr inbounds [28 x i64], ptr %0, i64 0, i64 %indvars.iv
  store i64 %12, ptr %13, align 8, !tbaa !11
  br label %.sink.split.sink.split

.sink.split.sink.split:                           ; preds = %7, %9
  %.sink72 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 112), %9 ], [ @gbl_core_perf_fd, %7 ]
  %.sink70 = phi ptr [ %2, %9 ], [ %0, %7 ]
  %.sink68 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 224), %9 ], [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 112), %7 ]
  %14 = phi i64 [ 448, %9 ], [ 224, %7 ]
  %.sink64 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 336), %9 ], [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 784), %7 ]
  %15 = phi i64 [ 672, %9 ], [ 1568, %7 ]
  %.sink60 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 448), %9 ], [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 896), %7 ]
  %16 = phi i64 [ 896, %9 ], [ 1792, %7 ]
  %gbl_core_perf_fd.sink.ph = phi ptr [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 560), %9 ], [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 1008), %7 ]
  %.sink55.ph = phi ptr [ %5, %9 ], [ %3, %7 ]
  %.sink53.ph = phi ptr [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 672), %9 ], [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 1120), %7 ]
  %.sink51.ph = phi ptr [ %6, %9 ], [ %4, %7 ]
  %17 = getelementptr inbounds i8, ptr %0, i64 %16
  %18 = getelementptr inbounds i8, ptr %0, i64 %15
  %19 = getelementptr inbounds i8, ptr %0, i64 %14
  %20 = getelementptr inbounds [28 x i32], ptr %.sink72, i64 0, i64 %indvars.iv
  %21 = load i32, ptr %20, align 4, !tbaa !10
  %22 = tail call i64 @readctr(i32 noundef %21)
  %23 = getelementptr inbounds [28 x i64], ptr %.sink70, i64 0, i64 %indvars.iv
  store i64 %22, ptr %23, align 8, !tbaa !11
  %24 = getelementptr inbounds [28 x i32], ptr %.sink68, i64 0, i64 %indvars.iv
  %25 = load i32, ptr %24, align 4, !tbaa !10
  %26 = tail call i64 @readctr(i32 noundef %25)
  %27 = getelementptr inbounds [28 x i64], ptr %19, i64 0, i64 %indvars.iv
  store i64 %26, ptr %27, align 8, !tbaa !11
  %28 = getelementptr inbounds [28 x i32], ptr %.sink64, i64 0, i64 %indvars.iv
  %29 = load i32, ptr %28, align 4, !tbaa !10
  %30 = tail call i64 @readctr(i32 noundef %29)
  %31 = getelementptr inbounds [28 x i64], ptr %18, i64 0, i64 %indvars.iv
  store i64 %30, ptr %31, align 8, !tbaa !11
  %32 = getelementptr inbounds [28 x i32], ptr %.sink60, i64 0, i64 %indvars.iv
  %33 = load i32, ptr %32, align 4, !tbaa !10
  %34 = tail call i64 @readctr(i32 noundef %33)
  %35 = getelementptr inbounds [28 x i64], ptr %17, i64 0, i64 %indvars.iv
  store i64 %34, ptr %35, align 8, !tbaa !11
  br label %.sink.split

.sink.split:                                      ; preds = %.sink.split.sink.split, %7
  %gbl_core_perf_fd.sink = phi ptr [ @gbl_core_perf_fd, %7 ], [ %gbl_core_perf_fd.sink.ph, %.sink.split.sink.split ]
  %.sink55 = phi ptr [ %0, %7 ], [ %.sink55.ph, %.sink.split.sink.split ]
  %.sink53 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 112), %7 ], [ %.sink53.ph, %.sink.split.sink.split ]
  %.sink51 = phi ptr [ %2, %7 ], [ %.sink51.ph, %.sink.split.sink.split ]
  %36 = getelementptr inbounds [28 x i32], ptr %gbl_core_perf_fd.sink, i64 0, i64 %indvars.iv
  %37 = load i32, ptr %36, align 4, !tbaa !10
  %38 = tail call i64 @readctr(i32 noundef %37)
  %39 = getelementptr inbounds [28 x i64], ptr %.sink55, i64 0, i64 %indvars.iv
  store i64 %38, ptr %39, align 8, !tbaa !11
  %40 = getelementptr inbounds [28 x i32], ptr %.sink53, i64 0, i64 %indvars.iv
  %41 = load i32, ptr %40, align 4, !tbaa !10
  %42 = tail call i64 @readctr(i32 noundef %41)
  %43 = getelementptr inbounds [28 x i64], ptr %.sink51, i64 0, i64 %indvars.iv
  store i64 %42, ptr %43, align 8, !tbaa !11
  br label %44

44:                                               ; preds = %.sink.split, %7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 28
  br i1 %exitcond.not, label %45, label %7, !llvm.loop !13

45:                                               ; preds = %44
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_core_perf_fd, i64 1232), align 4, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %0, i64 2464
  store i32 %46, ptr %47, align 8, !tbaa !15
  ret void
}

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

!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, !9, i64 1232}
!6 = !{!"perf_core_fd", !7, i64 0, !7, i64 112, !7, i64 224, !7, i64 336, !7, i64 448, !7, i64 560, !7, i64 672, !7, i64 784, !7, i64 896, !7, i64 1008, !7, i64 1120, !9, i64 1232}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!9, !9, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !9, i64 2464}
!16 = !{!"ctrs_core", !7, i64 0, !7, i64 224, !7, i64 448, !7, i64 672, !7, i64 896, !7, i64 1120, !7, i64 1344, !7, i64 1568, !7, i64 1792, !7, i64 2016, !7, i64 2240, !9, i64 2464}


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