; LLVM IR from libxsmm/libxsmm :: samples/deeplearning/sparse_adagrad_fused (counters)

; 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_skx_uc_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], i32 }
%struct.ctrs_skx_uc = type { [6 x i64], [6 x i64], [6 x i64], [6 x i64], [6 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_perf_fd = external hidden global %struct.perf_skx_uc_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
define dso_local void @read_skx_uc_ctrs(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #2
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %5

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

8:                                                ; preds = %5
  %9 = load i32, ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 14), align 4, !tbaa !11
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %42

11:                                               ; preds = %8
  %12 = load i32, ptr %3, align 4, !tbaa !9
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [6 x i32], ptr @gbl_perf_fd, i64 0, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = call i64 @readctr(i32 noundef %15)
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %3, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [6 x i64], ptr %18, i64 0, i64 %20
  store i64 %16, ptr %21, align 8, !tbaa !13
  %22 = load i32, ptr %3, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 1), i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = call i64 @readctr(i32 noundef %25)
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [6 x i64], ptr %28, i64 0, i64 %30
  store i64 %26, ptr %31, align 8, !tbaa !13
  %32 = load i32, ptr %3, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 4), i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = call i64 @readctr(i32 noundef %35)
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %37, i32 0, i32 4
  %39 = load i32, ptr %3, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [6 x i64], ptr %38, i64 0, i64 %40
  store i64 %36, ptr %41, align 8, !tbaa !13
  br label %78

42:                                               ; preds = %8
  %43 = load i32, ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 14), align 4, !tbaa !11
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %76

45:                                               ; preds = %42
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 2), i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = call i64 @readctr(i32 noundef %49)
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %51, i32 0, i32 2
  %53 = load i32, ptr %3, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [6 x i64], ptr %52, i64 0, i64 %54
  store i64 %50, ptr %55, align 8, !tbaa !13
  %56 = load i32, ptr %3, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 3), i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = call i64 @readctr(i32 noundef %59)
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %61, i32 0, i32 3
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [6 x i64], ptr %62, i64 0, i64 %64
  store i64 %60, ptr %65, align 8, !tbaa !13
  %66 = load i32, ptr %3, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [6 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 4), i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = call i64 @readctr(i32 noundef %69)
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %71, i32 0, i32 4
  %73 = load i32, ptr %3, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [6 x i64], ptr %72, i64 0, i64 %74
  store i64 %70, ptr %75, align 8, !tbaa !13
  br label %77

76:                                               ; preds = %42
  br label %77

77:                                               ; preds = %76, %45
  br label %78

78:                                               ; preds = %77, %11
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %3, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %3, align 4, !tbaa !9
  br label %5, !llvm.loop !15

82:                                               ; preds = %5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %227, %82
  %84 = load i32, ptr %4, align 4, !tbaa !9
  %85 = icmp slt i32 %84, 28
  br i1 %85, label %86, label %230

86:                                               ; preds = %83
  %87 = load i32, ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 14), align 4, !tbaa !11
  %88 = icmp eq i32 %87, 2
  br i1 %88, label %89, label %120

89:                                               ; preds = %86
  %90 = load i32, ptr %4, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 5), i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = call i64 @readctr(i32 noundef %93)
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %95, i32 0, i32 5
  %97 = load i32, ptr %4, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [28 x i64], ptr %96, i64 0, i64 %98
  store i64 %94, ptr %99, align 8, !tbaa !13
  %100 = load i32, ptr %4, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 6), i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = call i64 @readctr(i32 noundef %103)
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %105, i32 0, i32 6
  %107 = load i32, ptr %4, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [28 x i64], ptr %106, i64 0, i64 %108
  store i64 %104, ptr %109, align 8, !tbaa !13
  %110 = load i32, ptr %4, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 13), i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !9
  %114 = call i64 @readctr(i32 noundef %113)
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %115, i32 0, i32 13
  %117 = load i32, ptr %4, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [28 x i64], ptr %116, i64 0, i64 %118
  store i64 %114, ptr %119, align 8, !tbaa !13
  br label %226

120:                                              ; preds = %86
  %121 = load i32, ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 14), align 4, !tbaa !11
  %122 = icmp eq i32 %121, 3
  br i1 %122, label %123, label %154

123:                                              ; preds = %120
  %124 = load i32, ptr %4, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 7), i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = call i64 @readctr(i32 noundef %127)
  %129 = load ptr, ptr %2, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %129, i32 0, i32 7
  %131 = load i32, ptr %4, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [28 x i64], ptr %130, i64 0, i64 %132
  store i64 %128, ptr %133, align 8, !tbaa !13
  %134 = load i32, ptr %4, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 8), i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = call i64 @readctr(i32 noundef %137)
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %139, i32 0, i32 8
  %141 = load i32, ptr %4, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [28 x i64], ptr %140, i64 0, i64 %142
  store i64 %138, ptr %143, align 8, !tbaa !13
  %144 = load i32, ptr %4, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 13), i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = call i64 @readctr(i32 noundef %147)
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %149, i32 0, i32 13
  %151 = load i32, ptr %4, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [28 x i64], ptr %150, i64 0, i64 %152
  store i64 %148, ptr %153, align 8, !tbaa !13
  br label %225

154:                                              ; preds = %120
  %155 = load i32, ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 14), align 4, !tbaa !11
  %156 = icmp eq i32 %155, 4
  br i1 %156, label %157, label %188

157:                                              ; preds = %154
  %158 = load i32, ptr %4, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 9), i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = call i64 @readctr(i32 noundef %161)
  %163 = load ptr, ptr %2, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %163, i32 0, i32 9
  %165 = load i32, ptr %4, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [28 x i64], ptr %164, i64 0, i64 %166
  store i64 %162, ptr %167, align 8, !tbaa !13
  %168 = load i32, ptr %4, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 10), i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !9
  %172 = call i64 @readctr(i32 noundef %171)
  %173 = load ptr, ptr %2, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %173, i32 0, i32 10
  %175 = load i32, ptr %4, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [28 x i64], ptr %174, i64 0, i64 %176
  store i64 %172, ptr %177, align 8, !tbaa !13
  %178 = load i32, ptr %4, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 13), i64 0, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !9
  %182 = call i64 @readctr(i32 noundef %181)
  %183 = load ptr, ptr %2, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %183, i32 0, i32 13
  %185 = load i32, ptr %4, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [28 x i64], ptr %184, i64 0, i64 %186
  store i64 %182, ptr %187, align 8, !tbaa !13
  br label %224

188:                                              ; preds = %154
  %189 = load i32, ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 14), align 4, !tbaa !11
  %190 = icmp eq i32 %189, 5
  br i1 %190, label %191, label %222

191:                                              ; preds = %188
  %192 = load i32, ptr %4, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 11), i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !9
  %196 = call i64 @readctr(i32 noundef %195)
  %197 = load ptr, ptr %2, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %197, i32 0, i32 11
  %199 = load i32, ptr %4, align 4, !tbaa !9
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [28 x i64], ptr %198, i64 0, i64 %200
  store i64 %196, ptr %201, align 8, !tbaa !13
  %202 = load i32, ptr %4, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 12), i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !9
  %206 = call i64 @readctr(i32 noundef %205)
  %207 = load ptr, ptr %2, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %207, i32 0, i32 12
  %209 = load i32, ptr %4, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [28 x i64], ptr %208, i64 0, i64 %210
  store i64 %206, ptr %211, align 8, !tbaa !13
  %212 = load i32, ptr %4, align 4, !tbaa !9
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 13), i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !9
  %216 = call i64 @readctr(i32 noundef %215)
  %217 = load ptr, ptr %2, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %217, i32 0, i32 13
  %219 = load i32, ptr %4, align 4, !tbaa !9
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [28 x i64], ptr %218, i64 0, i64 %220
  store i64 %216, ptr %221, align 8, !tbaa !13
  br label %223

222:                                              ; preds = %188
  br label %223

223:                                              ; preds = %222, %191
  br label %224

224:                                              ; preds = %223, %157
  br label %225

225:                                              ; preds = %224, %123
  br label %226

226:                                              ; preds = %225, %89
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %4, align 4, !tbaa !9
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %4, align 4, !tbaa !9
  br label %83, !llvm.loop !17

230:                                              ; preds = %83
  %231 = load i32, ptr getelementptr inbounds (%struct.perf_skx_uc_fd, ptr @gbl_perf_fd, i32 0, i32 14), align 4, !tbaa !11
  %232 = load ptr, ptr %2, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.ctrs_skx_uc, ptr %232, i32 0, i32 14
  store i32 %231, ptr %233, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  ret void
}

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

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 1128}
!12 = !{!"perf_skx_uc_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, !10, i64 1128}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!19, !10, i64 2256}
!19 = !{!"ctrs_skx_uc", !7, i64 0, !7, i64 48, !7, i64 96, !7, i64 144, !7, i64 192, !7, i64 240, !7, i64 464, !7, i64 688, !7, i64 912, !7, i64 1136, !7, i64 1360, !7, i64 1584, !7, i64 1808, !7, i64 2032, !10, i64 2256}


; 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_skx_uc_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], i32 }

@gbl_perf_fd = external hidden local_unnamed_addr global %struct.perf_skx_uc_fd, align 4

; Function Attrs: nounwind uwtable
define dso_local void @read_skx_uc_ctrs(ptr nocapture noundef writeonly %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 192
  %3 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1128), align 4, !tbaa !5
  switch i32 %3, label %15 [
    i32 0, label %4
    i32 1, label %6
  ]

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  br label %thread-pre-split

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 144
  %8 = getelementptr inbounds i8, ptr %0, i64 96
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %6, %4
  %.sink75 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 48), %6 ], [ @gbl_perf_fd, %4 ]
  %.sink73 = phi ptr [ %8, %6 ], [ %0, %4 ]
  %.sink = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 72), %6 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 24), %4 ]
  %.sink70 = phi ptr [ %7, %6 ], [ %5, %4 ]
  %9 = load i32, ptr %.sink75, align 4, !tbaa !10
  %10 = tail call i64 @readctr(i32 noundef %9)
  store i64 %10, ptr %.sink73, align 8, !tbaa !11
  %11 = load i32, ptr %.sink, align 4, !tbaa !10
  %12 = tail call i64 @readctr(i32 noundef %11)
  store i64 %12, ptr %.sink70, align 8, !tbaa !11
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 96), align 4, !tbaa !10
  %14 = tail call i64 @readctr(i32 noundef %13)
  store i64 %14, ptr %2, align 8, !tbaa !11
  %.pr = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1128), align 4, !tbaa !5
  br label %15

15:                                               ; preds = %thread-pre-split, %1
  %16 = phi i32 [ %.pr, %thread-pre-split ], [ %3, %1 ]
  switch i32 %16, label %27 [
    i32 0, label %17
    i32 1, label %.sink.split
  ]

17:                                               ; preds = %15
  br label %.sink.split

.sink.split:                                      ; preds = %15, %17
  %.sink88 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 4), %17 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 52), %15 ]
  %.sink86 = phi i64 [ 8, %17 ], [ 104, %15 ]
  %.sink83 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 28), %17 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 76), %15 ]
  %.sink81 = phi i64 [ 56, %17 ], [ 152, %15 ]
  %18 = load i32, ptr %.sink88, align 4, !tbaa !10
  %19 = tail call i64 @readctr(i32 noundef %18)
  %20 = getelementptr inbounds i8, ptr %0, i64 %.sink86
  store i64 %19, ptr %20, align 8, !tbaa !11
  %21 = load i32, ptr %.sink83, align 4, !tbaa !10
  %22 = tail call i64 @readctr(i32 noundef %21)
  %23 = getelementptr inbounds i8, ptr %0, i64 %.sink81
  store i64 %22, ptr %23, align 8, !tbaa !11
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 100), align 4, !tbaa !10
  %25 = tail call i64 @readctr(i32 noundef %24)
  %26 = getelementptr inbounds i8, ptr %0, i64 200
  store i64 %25, ptr %26, align 8, !tbaa !11
  br label %27

27:                                               ; preds = %.sink.split, %15
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1128), align 4, !tbaa !5
  switch i32 %28, label %39 [
    i32 0, label %29
    i32 1, label %thread-pre-split65
  ]

29:                                               ; preds = %27
  br label %thread-pre-split65

thread-pre-split65:                               ; preds = %27, %29
  %.sink101 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 8), %29 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 56), %27 ]
  %.sink99 = phi i64 [ 16, %29 ], [ 112, %27 ]
  %.sink96 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 32), %29 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 80), %27 ]
  %.sink94 = phi i64 [ 64, %29 ], [ 160, %27 ]
  %30 = load i32, ptr %.sink101, align 4, !tbaa !10
  %31 = tail call i64 @readctr(i32 noundef %30)
  %32 = getelementptr inbounds i8, ptr %0, i64 %.sink99
  store i64 %31, ptr %32, align 8, !tbaa !11
  %33 = load i32, ptr %.sink96, align 4, !tbaa !10
  %34 = tail call i64 @readctr(i32 noundef %33)
  %35 = getelementptr inbounds i8, ptr %0, i64 %.sink94
  store i64 %34, ptr %35, align 8, !tbaa !11
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 104), align 4, !tbaa !10
  %37 = tail call i64 @readctr(i32 noundef %36)
  %38 = getelementptr inbounds i8, ptr %0, i64 208
  store i64 %37, ptr %38, align 8, !tbaa !11
  %.pr66 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1128), align 4, !tbaa !5
  br label %39

39:                                               ; preds = %thread-pre-split65, %27
  %40 = phi i32 [ %.pr66, %thread-pre-split65 ], [ %28, %27 ]
  switch i32 %40, label %51 [
    i32 0, label %41
    i32 1, label %.sink.split102
  ]

41:                                               ; preds = %39
  br label %.sink.split102

.sink.split102:                                   ; preds = %39, %41
  %.sink115 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 12), %41 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 60), %39 ]
  %.sink113 = phi i64 [ 24, %41 ], [ 120, %39 ]
  %.sink110 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 36), %41 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 84), %39 ]
  %.sink108 = phi i64 [ 72, %41 ], [ 168, %39 ]
  %42 = load i32, ptr %.sink115, align 4, !tbaa !10
  %43 = tail call i64 @readctr(i32 noundef %42)
  %44 = getelementptr inbounds i8, ptr %0, i64 %.sink113
  store i64 %43, ptr %44, align 8, !tbaa !11
  %45 = load i32, ptr %.sink110, align 4, !tbaa !10
  %46 = tail call i64 @readctr(i32 noundef %45)
  %47 = getelementptr inbounds i8, ptr %0, i64 %.sink108
  store i64 %46, ptr %47, align 8, !tbaa !11
  %48 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 108), align 4, !tbaa !10
  %49 = tail call i64 @readctr(i32 noundef %48)
  %50 = getelementptr inbounds i8, ptr %0, i64 216
  store i64 %49, ptr %50, align 8, !tbaa !11
  br label %51

51:                                               ; preds = %.sink.split102, %39
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1128), align 4, !tbaa !5
  switch i32 %52, label %63 [
    i32 0, label %53
    i32 1, label %thread-pre-split67
  ]

53:                                               ; preds = %51
  br label %thread-pre-split67

thread-pre-split67:                               ; preds = %51, %53
  %.sink128 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 16), %53 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 64), %51 ]
  %.sink126 = phi i64 [ 32, %53 ], [ 128, %51 ]
  %.sink123 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 40), %53 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 88), %51 ]
  %.sink121 = phi i64 [ 80, %53 ], [ 176, %51 ]
  %54 = load i32, ptr %.sink128, align 4, !tbaa !10
  %55 = tail call i64 @readctr(i32 noundef %54)
  %56 = getelementptr inbounds i8, ptr %0, i64 %.sink126
  store i64 %55, ptr %56, align 8, !tbaa !11
  %57 = load i32, ptr %.sink123, align 4, !tbaa !10
  %58 = tail call i64 @readctr(i32 noundef %57)
  %59 = getelementptr inbounds i8, ptr %0, i64 %.sink121
  store i64 %58, ptr %59, align 8, !tbaa !11
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 112), align 4, !tbaa !10
  %61 = tail call i64 @readctr(i32 noundef %60)
  %62 = getelementptr inbounds i8, ptr %0, i64 224
  store i64 %61, ptr %62, align 8, !tbaa !11
  %.pr68 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1128), align 4, !tbaa !5
  br label %63

63:                                               ; preds = %thread-pre-split67, %51
  %64 = phi i32 [ %.pr68, %thread-pre-split67 ], [ %52, %51 ]
  switch i32 %64, label %.preheader [
    i32 0, label %65
    i32 1, label %.preheader.sink.split
  ]

65:                                               ; preds = %63
  br label %.preheader.sink.split

.preheader.sink.split:                            ; preds = %63, %65
  %.sink141 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 20), %65 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 68), %63 ]
  %.sink139 = phi i64 [ 40, %65 ], [ 136, %63 ]
  %.sink136 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 44), %65 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 92), %63 ]
  %.sink134 = phi i64 [ 88, %65 ], [ 184, %63 ]
  %66 = load i32, ptr %.sink141, align 4, !tbaa !10
  %67 = tail call i64 @readctr(i32 noundef %66)
  %68 = getelementptr inbounds i8, ptr %0, i64 %.sink139
  store i64 %67, ptr %68, align 8, !tbaa !11
  %69 = load i32, ptr %.sink136, align 4, !tbaa !10
  %70 = tail call i64 @readctr(i32 noundef %69)
  %71 = getelementptr inbounds i8, ptr %0, i64 %.sink134
  store i64 %70, ptr %71, align 8, !tbaa !11
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 116), align 4, !tbaa !10
  %73 = tail call i64 @readctr(i32 noundef %72)
  %74 = getelementptr inbounds i8, ptr %0, i64 232
  store i64 %73, ptr %74, align 8, !tbaa !11
  br label %.preheader

.preheader:                                       ; preds = %.preheader.sink.split, %63
  %75 = getelementptr inbounds i8, ptr %0, i64 1584
  %76 = getelementptr inbounds i8, ptr %0, i64 1808
  %77 = getelementptr inbounds i8, ptr %0, i64 2032
  %78 = getelementptr inbounds i8, ptr %0, i64 1136
  %79 = getelementptr inbounds i8, ptr %0, i64 1360
  %80 = getelementptr inbounds i8, ptr %0, i64 688
  %81 = getelementptr inbounds i8, ptr %0, i64 912
  %82 = getelementptr inbounds i8, ptr %0, i64 240
  %83 = getelementptr inbounds i8, ptr %0, i64 464
  br label %84

84:                                               ; preds = %.preheader, %101
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %101 ]
  %85 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1128), align 4, !tbaa !5
  switch i32 %85, label %101 [
    i32 2, label %.sink.split142
    i32 3, label %86
    i32 4, label %87
    i32 5, label %88
  ]

86:                                               ; preds = %84
  br label %.sink.split142

87:                                               ; preds = %84
  br label %.sink.split142

88:                                               ; preds = %84
  br label %.sink.split142

.sink.split142:                                   ; preds = %84, %86, %88, %87
  %.sink158 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 568), %87 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 792), %88 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 344), %86 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 120), %84 ]
  %.sink155 = phi ptr [ %78, %87 ], [ %75, %88 ], [ %80, %86 ], [ %82, %84 ]
  %.sink152 = phi ptr [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 680), %87 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 904), %88 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 456), %86 ], [ getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 232), %84 ]
  %.sink149 = phi ptr [ %79, %87 ], [ %76, %88 ], [ %81, %86 ], [ %83, %84 ]
  %89 = getelementptr inbounds [28 x i32], ptr %.sink158, i64 0, i64 %indvars.iv
  %90 = load i32, ptr %89, align 4, !tbaa !10
  %91 = tail call i64 @readctr(i32 noundef %90)
  %92 = getelementptr inbounds [28 x i64], ptr %.sink155, i64 0, i64 %indvars.iv
  store i64 %91, ptr %92, align 8, !tbaa !11
  %93 = getelementptr inbounds [28 x i32], ptr %.sink152, i64 0, i64 %indvars.iv
  %94 = load i32, ptr %93, align 4, !tbaa !10
  %95 = tail call i64 @readctr(i32 noundef %94)
  %96 = getelementptr inbounds [28 x i64], ptr %.sink149, i64 0, i64 %indvars.iv
  store i64 %95, ptr %96, align 8, !tbaa !11
  %97 = getelementptr inbounds [28 x i32], ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1016), i64 0, i64 %indvars.iv
  %98 = load i32, ptr %97, align 4, !tbaa !10
  %99 = tail call i64 @readctr(i32 noundef %98)
  %100 = getelementptr inbounds [28 x i64], ptr %77, i64 0, i64 %indvars.iv
  store i64 %99, ptr %100, align 8, !tbaa !11
  br label %101

101:                                              ; preds = %.sink.split142, %84
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 28
  br i1 %exitcond.not, label %102, label %84, !llvm.loop !13

102:                                              ; preds = %101
  %103 = load i32, ptr getelementptr inbounds (i8, ptr @gbl_perf_fd, i64 1128), align 4, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %0, i64 2256
  store i32 %103, ptr %104, align 8, !tbaa !15
  ret void
}

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

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 1128}
!6 = !{!"perf_skx_uc_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, !9, i64 1128}
!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 2256}
!16 = !{!"ctrs_skx_uc", !7, i64 0, !7, i64 48, !7, i64 96, !7, i64 144, !7, i64 192, !7, i64 240, !7, i64 464, !7, i64 688, !7, i64 912, !7, i64 1136, !7, i64 1360, !7, i64 1584, !7, i64 1808, !7, i64 2032, !9, i64 2256}


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