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

@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@gbl_uncore_perf_fd = external hidden global %struct.perf_uncore_fd, align 4
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

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

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

6:                                                ; preds = %47, %1
  %7 = load i32, ptr %4, align 4, !tbaa !5
  %8 = icmp slt i32 %7, 6
  br i1 %8, label %9, label %50

9:                                                ; preds = %6
  %10 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %11 = load i32, ptr %4, align 4, !tbaa !5
  %12 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %10, ptr noundef @.str.5, i32 noundef %11) #3
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %28

15:                                               ; preds = %9
  %16 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [6 x i32], ptr @gbl_uncore_perf_fd, i64 0, i64 %18
  call void @evsetup(ptr noundef %16, ptr noundef %19, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %20 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 1), i64 0, i64 %22
  call void @evsetup(ptr noundef %20, ptr noundef %23, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %24 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 4), i64 0, i64 %26
  call void @evsetup(ptr noundef %24, ptr noundef %27, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %46

28:                                               ; preds = %9
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %44

31:                                               ; preds = %28
  %32 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 2), i64 0, i64 %34
  call void @evsetup(ptr noundef %32, ptr noundef %35, i32 noundef 4, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %36 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %37 = load i32, ptr %4, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 3), i64 0, i64 %38
  call void @evsetup(ptr noundef %36, ptr noundef %39, i32 noundef 4, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %40 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 4), i64 0, i64 %42
  call void @evsetup(ptr noundef %40, ptr noundef %43, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %45

44:                                               ; preds = %28
  br label %45

45:                                               ; preds = %44, %31
  br label %46

46:                                               ; preds = %45, %15
  br label %47

47:                                               ; preds = %46
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %4, align 4, !tbaa !5
  br label %6, !llvm.loop !9

50:                                               ; preds = %6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %283, %50
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = icmp slt i32 %52, 28
  br i1 %53, label %54, label %286

54:                                               ; preds = %51
  %55 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %55, ptr noundef @.str.6, i32 noundef %56) #3
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = icmp eq i32 %58, 2
  br i1 %59, label %60, label %73

60:                                               ; preds = %54
  %61 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 5), i64 0, i64 %63
  call void @evsetup(ptr noundef %61, ptr noundef %64, i32 noundef 80, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %65 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 6), i64 0, i64 %67
  call void @evsetup(ptr noundef %65, ptr noundef %68, i32 noundef 80, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %69 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %71
  call void @evsetup(ptr noundef %69, ptr noundef %72, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %282

73:                                               ; preds = %54
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = icmp eq i32 %74, 11
  br i1 %75, label %76, label %89

76:                                               ; preds = %73
  %77 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 7), i64 0, i64 %79
  call void @evsetup(ptr noundef %77, ptr noundef %80, i32 noundef 170, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %81 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 8), i64 0, i64 %83
  call void @evsetup(ptr noundef %81, ptr noundef %84, i32 noundef 171, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %85 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 29), i64 0, i64 %87
  call void @evsetup(ptr noundef %85, ptr noundef %88, i32 noundef 192, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %281

89:                                               ; preds = %73
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = icmp eq i32 %90, 12
  br i1 %91, label %92, label %105

92:                                               ; preds = %89
  %93 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %94 = load i32, ptr %5, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 9), i64 0, i64 %95
  call void @evsetup(ptr noundef %93, ptr noundef %96, i32 noundef 168, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %97 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 10), i64 0, i64 %99
  call void @evsetup(ptr noundef %97, ptr noundef %100, i32 noundef 169, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %101 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 29), i64 0, i64 %103
  call void @evsetup(ptr noundef %101, ptr noundef %104, i32 noundef 192, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %280

105:                                              ; preds = %89
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = icmp eq i32 %106, 13
  br i1 %107, label %108, label %121

108:                                              ; preds = %105
  %109 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 11), i64 0, i64 %111
  call void @evsetup(ptr noundef %109, ptr noundef %112, i32 noundef 172, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %113 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %114 = load i32, ptr %5, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 12), i64 0, i64 %115
  call void @evsetup(ptr noundef %113, ptr noundef %116, i32 noundef 173, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %117 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %118 = load i32, ptr %5, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 29), i64 0, i64 %119
  call void @evsetup(ptr noundef %117, ptr noundef %120, i32 noundef 192, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %279

121:                                              ; preds = %105
  %122 = load i32, ptr %2, align 4, !tbaa !5
  %123 = icmp eq i32 %122, 14
  br i1 %123, label %124, label %145

124:                                              ; preds = %121
  %125 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %126 = load i32, ptr %5, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 9), i64 0, i64 %127
  call void @evsetup(ptr noundef %125, ptr noundef %128, i32 noundef 168, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %129 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %130 = load i32, ptr %5, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 10), i64 0, i64 %131
  call void @evsetup(ptr noundef %129, ptr noundef %132, i32 noundef 169, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %133 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %134 = load i32, ptr %5, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 11), i64 0, i64 %135
  call void @evsetup(ptr noundef %133, ptr noundef %136, i32 noundef 172, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %137 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %138 = load i32, ptr %5, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 12), i64 0, i64 %139
  call void @evsetup(ptr noundef %137, ptr noundef %140, i32 noundef 173, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %141 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %142 = load i32, ptr %5, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 29), i64 0, i64 %143
  call void @evsetup(ptr noundef %141, ptr noundef %144, i32 noundef 192, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %278

145:                                              ; preds = %121
  %146 = load i32, ptr %2, align 4, !tbaa !5
  %147 = icmp eq i32 %146, 3
  br i1 %147, label %148, label %177

148:                                              ; preds = %145
  %149 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %150 = load i32, ptr %5, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 13), i64 0, i64 %151
  call void @evsetup(ptr noundef %149, ptr noundef %152, i32 noundef 52, i32 noundef 3, i32 noundef 31588352, i32 noundef 16, i32 noundef -1)
  %153 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %154 = load i32, ptr %5, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 14), i64 0, i64 %155
  call void @evsetup(ptr noundef %153, ptr noundef %156, i32 noundef 52, i32 noundef 5, i32 noundef 31588352, i32 noundef 59, i32 noundef -1)
  %157 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %158 = load i32, ptr %5, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 15), i64 0, i64 %159
  call void @evsetup(ptr noundef %157, ptr noundef %160, i32 noundef 55, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %161 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 16), i64 0, i64 %163
  call void @evsetup(ptr noundef %161, ptr noundef %164, i32 noundef 55, i32 noundef 8, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %165 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 17), i64 0, i64 %167
  call void @evsetup(ptr noundef %165, ptr noundef %168, i32 noundef 55, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %169 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %170 = load i32, ptr %5, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 18), i64 0, i64 %171
  call void @evsetup(ptr noundef %169, ptr noundef %172, i32 noundef 55, i32 noundef 4, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %173 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %174 = load i32, ptr %5, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %175
  call void @evsetup(ptr noundef %173, ptr noundef %176, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %277

177:                                              ; preds = %145
  %178 = load i32, ptr %2, align 4, !tbaa !5
  %179 = icmp eq i32 %178, 5
  br i1 %179, label %180, label %189

180:                                              ; preds = %177
  %181 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %182 = load i32, ptr %5, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 19), i64 0, i64 %183
  call void @evsetup(ptr noundef %181, ptr noundef %184, i32 noundef 50, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %185 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %186 = load i32, ptr %5, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %187
  call void @evsetup(ptr noundef %185, ptr noundef %188, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %276

189:                                              ; preds = %177
  %190 = load i32, ptr %2, align 4, !tbaa !5
  %191 = icmp eq i32 %190, 6
  br i1 %191, label %192, label %201

192:                                              ; preds = %189
  %193 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %194 = load i32, ptr %5, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 20), i64 0, i64 %195
  call void @evsetup(ptr noundef %193, ptr noundef %196, i32 noundef 51, i32 noundef 231, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %197 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %198 = load i32, ptr %5, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %199
  call void @evsetup(ptr noundef %197, ptr noundef %200, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %275

201:                                              ; preds = %189
  %202 = load i32, ptr %2, align 4, !tbaa !5
  %203 = icmp eq i32 %202, 7
  br i1 %203, label %204, label %213

204:                                              ; preds = %201
  %205 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %206 = load i32, ptr %5, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 21), i64 0, i64 %207
  call void @evsetup(ptr noundef %205, ptr noundef %208, i32 noundef 81, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %209 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %210 = load i32, ptr %5, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %211
  call void @evsetup(ptr noundef %209, ptr noundef %212, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %274

213:                                              ; preds = %201
  %214 = load i32, ptr %2, align 4, !tbaa !5
  %215 = icmp eq i32 %214, 8
  br i1 %215, label %216, label %229

216:                                              ; preds = %213
  %217 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %218 = load i32, ptr %5, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 22), i64 0, i64 %219
  call void @evsetup(ptr noundef %217, ptr noundef %220, i32 noundef 92, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %221 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %222 = load i32, ptr %5, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 23), i64 0, i64 %223
  call void @evsetup(ptr noundef %221, ptr noundef %224, i32 noundef 93, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %225 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %226 = load i32, ptr %5, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %227
  call void @evsetup(ptr noundef %225, ptr noundef %228, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %273

229:                                              ; preds = %213
  %230 = load i32, ptr %2, align 4, !tbaa !5
  %231 = icmp eq i32 %230, 9
  br i1 %231, label %232, label %241

232:                                              ; preds = %229
  %233 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %234 = load i32, ptr %5, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 24), i64 0, i64 %235
  call void @evsetup(ptr noundef %233, ptr noundef %236, i32 noundef 85, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %237 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %238 = load i32, ptr %5, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %239
  call void @evsetup(ptr noundef %237, ptr noundef %240, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %272

241:                                              ; preds = %229
  %242 = load i32, ptr %2, align 4, !tbaa !5
  %243 = icmp eq i32 %242, 10
  br i1 %243, label %244, label %257

244:                                              ; preds = %241
  %245 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %246 = load i32, ptr %5, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 25), i64 0, i64 %247
  call void @evsetup(ptr noundef %245, ptr noundef %248, i32 noundef 53, i32 noundef 37, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %249 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %250 = load i32, ptr %5, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 26), i64 0, i64 %251
  call void @evsetup(ptr noundef %249, ptr noundef %252, i32 noundef 54, i32 noundef 36, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %253 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %254 = load i32, ptr %5, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %255
  call void @evsetup(ptr noundef %253, ptr noundef %256, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %271

257:                                              ; preds = %241
  %258 = load i32, ptr %2, align 4, !tbaa !5
  %259 = icmp eq i32 %258, 4
  br i1 %259, label %260, label %269

260:                                              ; preds = %257
  %261 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %262 = load i32, ptr %5, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 27), i64 0, i64 %263
  call void @evsetup(ptr noundef %261, ptr noundef %264, i32 noundef 80, i32 noundef 63, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %265 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %266 = load i32, ptr %5, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 28), i64 0, i64 %267
  call void @evsetup(ptr noundef %265, ptr noundef %268, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %270

269:                                              ; preds = %257
  br label %270

270:                                              ; preds = %269, %260
  br label %271

271:                                              ; preds = %270, %244
  br label %272

272:                                              ; preds = %271, %232
  br label %273

273:                                              ; preds = %272, %216
  br label %274

274:                                              ; preds = %273, %204
  br label %275

275:                                              ; preds = %274, %192
  br label %276

276:                                              ; preds = %275, %180
  br label %277

277:                                              ; preds = %276, %148
  br label %278

278:                                              ; preds = %277, %124
  br label %279

279:                                              ; preds = %278, %108
  br label %280

280:                                              ; preds = %279, %92
  br label %281

281:                                              ; preds = %280, %76
  br label %282

282:                                              ; preds = %281, %60
  br label %283

283:                                              ; preds = %282
  %284 = load i32, ptr %5, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %5, align 4, !tbaa !5
  br label %51, !llvm.loop !11

286:                                              ; preds = %51
  %287 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %287, ptr getelementptr inbounds (%struct.perf_uncore_fd, ptr @gbl_uncore_perf_fd, i32 0, i32 30), align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr %3) #3
  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" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 2920}
!13 = !{!"perf_uncore_fd", !7, i64 0, !7, i64 24, !7, i64 48, !7, i64 72, !7, i64 96, !7, i64 120, !7, i64 232, !7, i64 344, !7, i64 456, !7, i64 568, !7, i64 680, !7, i64 792, !7, i64 904, !7, i64 1016, !7, i64 1128, !7, i64 1240, !7, i64 1352, !7, i64 1464, !7, i64 1576, !7, i64 1688, !7, i64 1800, !7, i64 1912, !7, i64 2024, !7, i64 2136, !7, i64 2248, !7, i64 2360, !7, i64 2472, !7, i64 2584, !7, i64 2696, !7, i64 2808, !6, i64 2920}


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

@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@gbl_uncore_perf_fd = external hidden global %struct.perf_uncore_fd, align 4
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @setup_uncore_ctrs(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #3
  %3 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 0) #3
  switch i32 %0, label %.split.preheader [
    i32 0, label %.split.us.preheader
    i32 1, label %.split.us71.preheader
  ]

.split.us71.preheader:                            ; preds = %1
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 48), i32 noundef 4, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 72), i32 noundef 4, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 96), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %4 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 52), i32 noundef 4, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 76), i32 noundef 4, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 100), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %5 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 56), i32 noundef 4, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 80), i32 noundef 4, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 104), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %6 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 60), i32 noundef 4, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 84), i32 noundef 4, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 108), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %7 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 64), i32 noundef 4, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 88), i32 noundef 4, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 112), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %8 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 68), i32 noundef 4, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 92), i32 noundef 4, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 116), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.preheader.preheader

.split.us.preheader:                              ; preds = %1
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull @gbl_uncore_perf_fd, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 24), i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 96), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %9 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 4), i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 28), i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 100), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %10 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 8), i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 32), i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 104), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %11 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 12), i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 36), i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 108), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %12 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 16), i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 40), i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 112), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %13 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) #3
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 20), i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 44), i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 116), i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.preheader.preheader

.split.preheader:                                 ; preds = %1
  %14 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) #3
  %15 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) #3
  %16 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) #3
  %17 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) #3
  %18 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) #3
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %.split.us71.preheader, %.split.us.preheader, %.split.preheader
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %62
  %indvars.iv = phi i64 [ %indvars.iv.next, %62 ], [ 0, %.preheader.preheader ]
  %19 = trunc nuw nsw i64 %indvars.iv to i32
  %20 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %19) #3
  switch i32 %0, label %62 [
    i32 2, label %21
    i32 11, label %24
    i32 12, label %27
    i32 13, label %30
    i32 14, label %33
    i32 3, label %38
    i32 5, label %45
    i32 6, label %47
    i32 7, label %49
    i32 8, label %51
    i32 9, label %54
    i32 10, label %56
    i32 4, label %59
  ]

21:                                               ; preds = %.preheader
  %22 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 120), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %22, i32 noundef 80, i32 noundef 3, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %23 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 232), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %23, i32 noundef 80, i32 noundef 12, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

24:                                               ; preds = %.preheader
  %25 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 344), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %25, i32 noundef 170, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %26 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 456), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %26, i32 noundef 171, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

27:                                               ; preds = %.preheader
  %28 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 568), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %28, i32 noundef 168, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %29 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 680), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %29, i32 noundef 169, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

30:                                               ; preds = %.preheader
  %31 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 792), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %31, i32 noundef 172, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %32 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 904), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %32, i32 noundef 173, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

33:                                               ; preds = %.preheader
  %34 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 568), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %34, i32 noundef 168, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %35 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 680), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %35, i32 noundef 169, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %36 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 792), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %36, i32 noundef 172, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %37 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 904), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %37, i32 noundef 173, i32 noundef 15, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

38:                                               ; preds = %.preheader
  %39 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1016), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %39, i32 noundef 52, i32 noundef 3, i32 noundef 31588352, i32 noundef 16, i32 noundef -1)
  %40 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1128), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %40, i32 noundef 52, i32 noundef 5, i32 noundef 31588352, i32 noundef 59, i32 noundef -1)
  %41 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1240), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %41, i32 noundef 55, i32 noundef 2, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %42 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1352), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %42, i32 noundef 55, i32 noundef 8, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %43 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1464), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %43, i32 noundef 55, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %44 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1576), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %44, i32 noundef 55, i32 noundef 4, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

45:                                               ; preds = %.preheader
  %46 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1688), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %46, i32 noundef 50, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

47:                                               ; preds = %.preheader
  %48 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1800), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %48, i32 noundef 51, i32 noundef 231, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

49:                                               ; preds = %.preheader
  %50 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 1912), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %50, i32 noundef 81, i32 noundef 1, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

51:                                               ; preds = %.preheader
  %52 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2024), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %52, i32 noundef 92, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %53 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2136), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %53, i32 noundef 93, i32 noundef 255, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

54:                                               ; preds = %.preheader
  %55 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2248), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %55, i32 noundef 85, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

56:                                               ; preds = %.preheader
  %57 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2360), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %57, i32 noundef 53, i32 noundef 37, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  %58 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2472), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %58, i32 noundef 54, i32 noundef 36, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

59:                                               ; preds = %.preheader
  %60 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2584), i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %60, i32 noundef 80, i32 noundef 63, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %.sink.split

.sink.split:                                      ; preds = %24, %30, %38, %47, %51, %56, %59, %54, %49, %45, %33, %27, %21
  %.sink80 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %21 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2808), %27 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2808), %33 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %45 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %49 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %54 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %59 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %56 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %51 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %47 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2696), %38 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2808), %30 ], [ getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2808), %24 ]
  %.sink79 = phi i32 [ 0, %21 ], [ 192, %27 ], [ 192, %33 ], [ 0, %45 ], [ 0, %49 ], [ 0, %54 ], [ 0, %59 ], [ 0, %56 ], [ 0, %51 ], [ 0, %47 ], [ 0, %38 ], [ 192, %30 ], [ 192, %24 ]
  %61 = getelementptr inbounds [28 x i32], ptr %.sink80, i64 0, i64 %indvars.iv
  call void @evsetup(ptr noundef nonnull %2, ptr noundef nonnull %61, i32 noundef %.sink79, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef -1)
  br label %62

62:                                               ; preds = %.sink.split, %.preheader
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 28
  br i1 %exitcond.not, label %63, label %.preheader, !llvm.loop !5

63:                                               ; preds = %62
  store i32 %0, ptr getelementptr inbounds (i8, ptr @gbl_uncore_perf_fd, i64 2920), align 4, !tbaa !7
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %2) #3
  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" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !11, i64 2920}
!8 = !{!"perf_uncore_fd", !9, i64 0, !9, i64 24, !9, i64 48, !9, i64 72, !9, i64 96, !9, i64 120, !9, i64 232, !9, i64 344, !9, i64 456, !9, i64 568, !9, i64 680, !9, i64 792, !9, i64 904, !9, i64 1016, !9, i64 1128, !9, i64 1240, !9, i64 1352, !9, i64 1464, !9, i64 1576, !9, i64 1688, !9, i64 1800, !9, i64 1912, !9, i64 2024, !9, i64 2136, !9, i64 2248, !9, i64 2360, !9, i64 2472, !9, i64 2584, !9, i64 2696, !9, i64 2808, !11, i64 2920}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass