; LLVM IR from Overload-Technologies/Overload :: Dependencies/tracy/client/TracySysTrace.ll (ZN5tracy13SysTraceStartERl)

; 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.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%struct.perf_event_attr = type { i32, i32, i64, %union.anon, i64, i64, i64, %union.anon.0, i32, %union.anon.1, %union.anon.2, i64, i64, i32, i32, i64, i32, i16, i16, i32, i32, i64 }
%union.anon = type { i64 }
%union.anon.0 = type { i32 }
%union.anon.1 = type { i64 }
%union.anon.2 = type { i64 }
%"class.tracy::RingBuffer" = type <{ i32, [4 x i8], i64, ptr, i32, i32, ptr, i64, i32, [4 x i8] }>

@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@_ZN5tracyL9s_numCpusE = external hidden global i32, align 4
@_ZN5tracyL6s_ringE = external hidden global ptr, align 8
@_ZN5tracyL12s_numBuffersE = external hidden global i32, align 4
@_ZN5tracyL14s_ctxBufferIdxE = external hidden global i32, align 4
@_ZN5tracyL11traceActiveE = external hidden global %"struct.std::atomic", align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5tracy13SysTraceStartERl(ptr noundef nonnull align 8 dereferenceable(8) %0) #0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i8, align 1
  %18 = alloca ptr, align 8
  %19 = alloca i8, align 1
  %20 = alloca ptr, align 8
  %21 = alloca i8, align 1
  %22 = alloca ptr, align 8
  %23 = alloca i8, align 1
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %struct.perf_event_attr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.perf_event_attr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca %struct.perf_event_attr, align 8
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca %struct.perf_event_attr, align 8
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %50 = call noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef @.str)
  store ptr %50, ptr %4, align 8, !tbaa !5
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %1
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %792

54:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 -1, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 -1, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 -1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  %55 = call noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef @.str.1)
  store ptr %55, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %61

58:                                               ; preds = %54
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = call i32 @atoi(ptr noundef %59) #10
  store i32 %60, ptr %6, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %58, %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %62 = call noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef @.str.2)
  store ptr %62, ptr %10, align 8, !tbaa !5
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %68

65:                                               ; preds = %61
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = call i32 @atoi(ptr noundef %66) #10
  store i32 %67, ptr %7, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %65, %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %69 = call noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef @.str.3)
  store ptr %69, ptr %11, align 8, !tbaa !5
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %75

72:                                               ; preds = %68
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = call i32 @atoi(ptr noundef %73) #10
  store i32 %74, ptr %8, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %72, %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %76 = call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef @.str.4)
  store ptr %76, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #9
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %85

79:                                               ; preds = %75
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i64 0
  %82 = load i8, ptr %81, align 1, !tbaa !11
  %83 = sext i8 %82 to i32
  %84 = icmp eq i32 %83, 49
  br label %85

85:                                               ; preds = %79, %75
  %86 = phi i1 [ false, %75 ], [ %84, %79 ]
  %87 = zext i1 %86 to i8
  store i8 %87, ptr %13, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %88 = call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef @.str.5)
  store ptr %88, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #9
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %97

91:                                               ; preds = %85
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 0
  %94 = load i8, ptr %93, align 1, !tbaa !11
  %95 = sext i8 %94 to i32
  %96 = icmp eq i32 %95, 49
  br label %97

97:                                               ; preds = %91, %85
  %98 = phi i1 [ false, %85 ], [ %96, %91 ]
  %99 = zext i1 %98 to i8
  store i8 %99, ptr %15, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %100 = call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef @.str.6)
  store ptr %100, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #9
  %101 = load ptr, ptr %16, align 8, !tbaa !5
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %109

103:                                              ; preds = %97
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i64 0
  %106 = load i8, ptr %105, align 1, !tbaa !11
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 49
  br label %109

109:                                              ; preds = %103, %97
  %110 = phi i1 [ false, %97 ], [ %108, %103 ]
  %111 = zext i1 %110 to i8
  store i8 %111, ptr %17, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %112 = call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef @.str.7)
  store ptr %112, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #9
  %113 = load ptr, ptr %18, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %121

115:                                              ; preds = %109
  %116 = load ptr, ptr %18, align 8, !tbaa !5
  %117 = getelementptr inbounds i8, ptr %116, i64 0
  %118 = load i8, ptr %117, align 1, !tbaa !11
  %119 = sext i8 %118 to i32
  %120 = icmp eq i32 %119, 49
  br label %121

121:                                              ; preds = %115, %109
  %122 = phi i1 [ false, %109 ], [ %120, %115 ]
  %123 = zext i1 %122 to i8
  store i8 %123, ptr %19, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %124 = call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef @.str.8)
  store ptr %124, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #9
  %125 = load ptr, ptr %20, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %133

127:                                              ; preds = %121
  %128 = load ptr, ptr %20, align 8, !tbaa !5
  %129 = getelementptr inbounds i8, ptr %128, i64 0
  %130 = load i8, ptr %129, align 1, !tbaa !11
  %131 = sext i8 %130 to i32
  %132 = icmp eq i32 %131, 49
  br label %133

133:                                              ; preds = %127, %121
  %134 = phi i1 [ false, %121 ], [ %132, %127 ]
  %135 = zext i1 %134 to i8
  store i8 %135, ptr %21, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %136 = call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef @.str.9)
  store ptr %136, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #9
  %137 = load ptr, ptr %22, align 8, !tbaa !5
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %145

139:                                              ; preds = %133
  %140 = load ptr, ptr %22, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %140, i64 0
  %142 = load i8, ptr %141, align 1, !tbaa !11
  %143 = sext i8 %142 to i32
  %144 = icmp eq i32 %143, 49
  br label %145

145:                                              ; preds = %139, %133
  %146 = phi i1 [ false, %133 ], [ %144, %139 ]
  %147 = zext i1 %146 to i8
  store i8 %147, ptr %23, align 1, !tbaa !12
  %148 = call noundef i32 @_ZN5tracyL17GetSamplingPeriodEv()
  %149 = sext i32 %148 to i64
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  store i64 %149, ptr %150, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %151 = call i32 @getpid() #9
  store i32 %151, ptr %24, align 4, !tbaa !9
  %152 = call noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #9
  store i32 %152, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %153 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %154 = mul nsw i32 %153, 10
  store i32 %154, ptr %25, align 4, !tbaa !9
  %155 = load i32, ptr %25, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = mul i64 56, %156
  %158 = call noundef ptr @_ZN5tracyL12tracy_mallocEm(i64 noundef %157)
  store ptr %158, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  store i32 0, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 128, ptr %26) #9
  call void @llvm.memset.p0.i64(ptr align 8 %26, i8 0, i64 128, i1 false)
  %159 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 0
  store i32 1, ptr %159, align 8, !tbaa !16
  %160 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 1
  store i32 128, ptr %160, align 4, !tbaa !20
  %161 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 2
  store i64 0, ptr %161, align 8, !tbaa !21
  %162 = call noundef i32 @_ZN5tracyL20GetSamplingFrequencyEv()
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 3
  store i64 %163, ptr %164, align 8, !tbaa !11
  %165 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 4
  store i64 38, ptr %165, align 8, !tbaa !22
  %166 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 17
  store i16 127, ptr %166, align 4, !tbaa !23
  %167 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %168 = load i64, ptr %167, align 8
  %169 = and i64 %168, -2
  %170 = or i64 %169, 1
  store i64 %170, ptr %167, align 8
  %171 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %172 = load i64, ptr %171, align 8
  %173 = and i64 %172, -1025
  %174 = or i64 %173, 1024
  store i64 %174, ptr %171, align 8
  %175 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %176 = load i64, ptr %175, align 8
  %177 = and i64 %176, -3
  %178 = or i64 %177, 2
  store i64 %178, ptr %175, align 8
  %179 = load i8, ptr %13, align 1, !tbaa !12, !range !24, !noundef !25
  %180 = trunc i8 %179 to i1
  br i1 %180, label %230, label %181

181:                                              ; preds = %145
  %182 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attri(ptr noundef nonnull align 8 dereferenceable(128) %26, i32 noundef %182)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  store i32 0, ptr %27, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %225, %181
  %184 = load i32, ptr %27, align 4, !tbaa !9
  %185 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %186 = icmp slt i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 2, ptr %5, align 4
  br label %228

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  %189 = load i32, ptr %24, align 4, !tbaa !9
  %190 = load i32, ptr %27, align 4, !tbaa !9
  %191 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef %189, i32 noundef %190, i32 noundef -1, i64 noundef 8)
  store i32 %191, ptr %28, align 4, !tbaa !9
  %192 = load i32, ptr %28, align 4, !tbaa !9
  %193 = icmp eq i32 %192, -1
  br i1 %193, label %194, label %207

194:                                              ; preds = %188
  %195 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %196 = load i64, ptr %195, align 8
  %197 = and i64 %196, -33
  %198 = or i64 %197, 32
  store i64 %198, ptr %195, align 8
  %199 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attri(ptr noundef nonnull align 8 dereferenceable(128) %26, i32 noundef %199)
  %200 = load i32, ptr %24, align 4, !tbaa !9
  %201 = load i32, ptr %27, align 4, !tbaa !9
  %202 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef %200, i32 noundef %201, i32 noundef -1, i64 noundef 8)
  store i32 %202, ptr %28, align 4, !tbaa !9
  %203 = load i32, ptr %28, align 4, !tbaa !9
  %204 = icmp eq i32 %203, -1
  br i1 %204, label %205, label %206

205:                                              ; preds = %194
  store i32 2, ptr %5, align 4
  br label %222

206:                                              ; preds = %194
  br label %207

207:                                              ; preds = %206, %188
  %208 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %209 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %208, i64 %210
  %212 = load i32, ptr %28, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %211, i32 noundef 65536, i32 noundef %212, i32 noundef 0, i32 noundef -1)
  %213 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %214 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %213, i64 %215
  %217 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %216)
  br i1 %217, label %218, label %221

218:                                              ; preds = %207
  %219 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %221

221:                                              ; preds = %218, %207
  store i32 0, ptr %5, align 4
  br label %222

222:                                              ; preds = %221, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  %223 = load i32, ptr %5, align 4
  switch i32 %223, label %228 [
    i32 0, label %224
  ]

224:                                              ; preds = %222
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %27, align 4, !tbaa !9
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %27, align 4, !tbaa !9
  br label %183, !llvm.loop !26

228:                                              ; preds = %222, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %229

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229, %145
  call void @llvm.lifetime.start.p0(i64 128, ptr %29) #9
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 128, i1 false)
  %231 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 0
  %232 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 1
  %233 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 2
  %234 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 3
  %235 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 4
  %236 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 5
  %237 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %238 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %239 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %240 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %241 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %242 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %243 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %244 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %245 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %246 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %247 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %248 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %249 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %250 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %251 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %252 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %253 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %254 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %255 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %256 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %257 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %258 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %259 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %260 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %261 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %262 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %263 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %264 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %265 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %266 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %267 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %268 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %269 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %270 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %271 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %272 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %273 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %274 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 6
  %275 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 7
  %276 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 8
  %277 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 9
  %278 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 10
  %279 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 11
  %280 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 12
  %281 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 13
  %282 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 14
  %283 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 15
  %284 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 16
  %285 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 17
  %286 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 18
  %287 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 19
  %288 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 20
  %289 = getelementptr inbounds %struct.perf_event_attr, ptr %29, i32 0, i32 21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %29, i64 128, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 128, ptr %29) #9
  %290 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 0
  store i32 0, ptr %290, align 8, !tbaa !16
  %291 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 1
  store i32 128, ptr %291, align 4, !tbaa !20
  %292 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 3
  store i64 5000, ptr %292, align 8, !tbaa !11
  %293 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 4
  store i64 5, ptr %293, align 8, !tbaa !22
  %294 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %295 = load i64, ptr %294, align 8
  %296 = and i64 %295, -2
  %297 = or i64 %296, 1
  store i64 %297, ptr %294, align 8
  %298 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %299 = load i64, ptr %298, align 8
  %300 = and i64 %299, -33
  %301 = or i64 %300, 32
  store i64 %301, ptr %298, align 8
  %302 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %303 = load i64, ptr %302, align 8
  %304 = and i64 %303, -1048577
  %305 = or i64 %304, 1048576
  store i64 %305, ptr %302, align 8
  %306 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %307 = load i64, ptr %306, align 8
  %308 = and i64 %307, -65
  %309 = or i64 %308, 64
  store i64 %309, ptr %306, align 8
  %310 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %311 = load i64, ptr %310, align 8
  %312 = and i64 %311, -1025
  %313 = or i64 %312, 1024
  store i64 %313, ptr %310, align 8
  %314 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %315 = load i64, ptr %314, align 8
  %316 = and i64 %315, -3
  %317 = or i64 %316, 2
  store i64 %317, ptr %314, align 8
  %318 = load i8, ptr %15, align 1, !tbaa !12, !range !24, !noundef !25
  %319 = trunc i8 %318 to i1
  br i1 %319, label %385, label %320

320:                                              ; preds = %230
  %321 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attryyi(ptr noundef nonnull align 8 dereferenceable(128) %26, i64 noundef 0, i64 noundef 1, i32 noundef %321)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %322

322:                                              ; preds = %349, %320
  %323 = load i32, ptr %30, align 4, !tbaa !9
  %324 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %325 = icmp slt i32 %323, %324
  br i1 %325, label %327, label %326

326:                                              ; preds = %322
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  br label %352

327:                                              ; preds = %322
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  %328 = load i32, ptr %24, align 4, !tbaa !9
  %329 = load i32, ptr %30, align 4, !tbaa !9
  %330 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef %328, i32 noundef %329, i32 noundef -1, i64 noundef 8)
  store i32 %330, ptr %31, align 4, !tbaa !9
  %331 = load i32, ptr %31, align 4, !tbaa !9
  %332 = icmp ne i32 %331, -1
  br i1 %332, label %333, label %348

333:                                              ; preds = %327
  %334 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %335 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %334, i64 %336
  %338 = load i32, ptr %31, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %337, i32 noundef 65536, i32 noundef %338, i32 noundef 1, i32 noundef -1)
  %339 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %340 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %339, i64 %341
  %343 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %342)
  br i1 %343, label %344, label %347

344:                                              ; preds = %333
  %345 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %347

347:                                              ; preds = %344, %333
  br label %348

348:                                              ; preds = %347, %327
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  br label %349

349:                                              ; preds = %348
  %350 = load i32, ptr %30, align 4, !tbaa !9
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %30, align 4, !tbaa !9
  br label %322, !llvm.loop !31

352:                                              ; preds = %326
  %353 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 2
  store i64 1, ptr %353, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %354

354:                                              ; preds = %381, %352
  %355 = load i32, ptr %32, align 4, !tbaa !9
  %356 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %357 = icmp slt i32 %355, %356
  br i1 %357, label %359, label %358

358:                                              ; preds = %354
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %384

359:                                              ; preds = %354
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %360 = load i32, ptr %24, align 4, !tbaa !9
  %361 = load i32, ptr %32, align 4, !tbaa !9
  %362 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef %360, i32 noundef %361, i32 noundef -1, i64 noundef 8)
  store i32 %362, ptr %33, align 4, !tbaa !9
  %363 = load i32, ptr %33, align 4, !tbaa !9
  %364 = icmp ne i32 %363, -1
  br i1 %364, label %365, label %380

365:                                              ; preds = %359
  %366 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %367 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %368 = sext i32 %367 to i64
  %369 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %366, i64 %368
  %370 = load i32, ptr %33, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %369, i32 noundef 65536, i32 noundef %370, i32 noundef 2, i32 noundef -1)
  %371 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %372 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %371, i64 %373
  %375 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %374)
  br i1 %375, label %376, label %379

376:                                              ; preds = %365
  %377 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %378 = add nsw i32 %377, 1
  store i32 %378, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %379

379:                                              ; preds = %376, %365
  br label %380

380:                                              ; preds = %379, %359
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %381

381:                                              ; preds = %380
  %382 = load i32, ptr %32, align 4, !tbaa !9
  %383 = add nsw i32 %382, 1
  store i32 %383, ptr %32, align 4, !tbaa !9
  br label %354, !llvm.loop !32

384:                                              ; preds = %358
  br label %385

385:                                              ; preds = %384, %230
  %386 = load i8, ptr %17, align 1, !tbaa !12, !range !24, !noundef !25
  %387 = trunc i8 %386 to i1
  br i1 %387, label %460, label %388

388:                                              ; preds = %385
  %389 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attryyi(ptr noundef nonnull align 8 dereferenceable(128) %26, i64 noundef 2, i64 noundef 3, i32 noundef %389)
  %390 = call noundef zeroext i1 @_ZN5tracyL14IsGenuineIntelEv()
  br i1 %390, label %391, label %396

391:                                              ; preds = %388
  %392 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %393 = load i64, ptr %392, align 8
  %394 = and i64 %393, -98305
  %395 = or i64 %394, 0
  store i64 %395, ptr %392, align 8
  br label %396

396:                                              ; preds = %391, %388
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  store i32 0, ptr %34, align 4, !tbaa !9
  br label %397

397:                                              ; preds = %424, %396
  %398 = load i32, ptr %34, align 4, !tbaa !9
  %399 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %400 = icmp slt i32 %398, %399
  br i1 %400, label %402, label %401

401:                                              ; preds = %397
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  br label %427

402:                                              ; preds = %397
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  %403 = load i32, ptr %24, align 4, !tbaa !9
  %404 = load i32, ptr %34, align 4, !tbaa !9
  %405 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef %403, i32 noundef %404, i32 noundef -1, i64 noundef 8)
  store i32 %405, ptr %35, align 4, !tbaa !9
  %406 = load i32, ptr %35, align 4, !tbaa !9
  %407 = icmp ne i32 %406, -1
  br i1 %407, label %408, label %423

408:                                              ; preds = %402
  %409 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %410 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %411 = sext i32 %410 to i64
  %412 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %409, i64 %411
  %413 = load i32, ptr %35, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %412, i32 noundef 65536, i32 noundef %413, i32 noundef 3, i32 noundef -1)
  %414 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %415 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %414, i64 %416
  %418 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %417)
  br i1 %418, label %419, label %422

419:                                              ; preds = %408
  %420 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %421 = add nsw i32 %420, 1
  store i32 %421, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %422

422:                                              ; preds = %419, %408
  br label %423

423:                                              ; preds = %422, %402
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  br label %424

424:                                              ; preds = %423
  %425 = load i32, ptr %34, align 4, !tbaa !9
  %426 = add nsw i32 %425, 1
  store i32 %426, ptr %34, align 4, !tbaa !9
  br label %397, !llvm.loop !33

427:                                              ; preds = %401
  %428 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 2
  store i64 3, ptr %428, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  store i32 0, ptr %36, align 4, !tbaa !9
  br label %429

429:                                              ; preds = %456, %427
  %430 = load i32, ptr %36, align 4, !tbaa !9
  %431 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %432 = icmp slt i32 %430, %431
  br i1 %432, label %434, label %433

433:                                              ; preds = %429
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %459

434:                                              ; preds = %429
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  %435 = load i32, ptr %24, align 4, !tbaa !9
  %436 = load i32, ptr %36, align 4, !tbaa !9
  %437 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef %435, i32 noundef %436, i32 noundef -1, i64 noundef 8)
  store i32 %437, ptr %37, align 4, !tbaa !9
  %438 = load i32, ptr %37, align 4, !tbaa !9
  %439 = icmp ne i32 %438, -1
  br i1 %439, label %440, label %455

440:                                              ; preds = %434
  %441 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %442 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %443 = sext i32 %442 to i64
  %444 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %441, i64 %443
  %445 = load i32, ptr %37, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %444, i32 noundef 65536, i32 noundef %445, i32 noundef 4, i32 noundef -1)
  %446 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %447 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %448 = sext i32 %447 to i64
  %449 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %446, i64 %448
  %450 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %449)
  br i1 %450, label %451, label %454

451:                                              ; preds = %440
  %452 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %453 = add nsw i32 %452, 1
  store i32 %453, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %454

454:                                              ; preds = %451, %440
  br label %455

455:                                              ; preds = %454, %434
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  br label %456

456:                                              ; preds = %455
  %457 = load i32, ptr %36, align 4, !tbaa !9
  %458 = add nsw i32 %457, 1
  store i32 %458, ptr %36, align 4, !tbaa !9
  br label %429, !llvm.loop !34

459:                                              ; preds = %433
  br label %460

460:                                              ; preds = %459, %385
  %461 = load i8, ptr %19, align 1, !tbaa !12, !range !24, !noundef !25
  %462 = trunc i8 %461 to i1
  br i1 %462, label %528, label %463

463:                                              ; preds = %460
  %464 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attryyi(ptr noundef nonnull align 8 dereferenceable(128) %26, i64 noundef 4, i64 noundef 5, i32 noundef %464)
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #9
  store i32 0, ptr %38, align 4, !tbaa !9
  br label %465

465:                                              ; preds = %492, %463
  %466 = load i32, ptr %38, align 4, !tbaa !9
  %467 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %468 = icmp slt i32 %466, %467
  br i1 %468, label %470, label %469

469:                                              ; preds = %465
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #9
  br label %495

470:                                              ; preds = %465
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #9
  %471 = load i32, ptr %24, align 4, !tbaa !9
  %472 = load i32, ptr %38, align 4, !tbaa !9
  %473 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef %471, i32 noundef %472, i32 noundef -1, i64 noundef 8)
  store i32 %473, ptr %39, align 4, !tbaa !9
  %474 = load i32, ptr %39, align 4, !tbaa !9
  %475 = icmp ne i32 %474, -1
  br i1 %475, label %476, label %491

476:                                              ; preds = %470
  %477 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %478 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %479 = sext i32 %478 to i64
  %480 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %477, i64 %479
  %481 = load i32, ptr %39, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %480, i32 noundef 65536, i32 noundef %481, i32 noundef 5, i32 noundef -1)
  %482 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %483 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %484 = sext i32 %483 to i64
  %485 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %482, i64 %484
  %486 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %485)
  br i1 %486, label %487, label %490

487:                                              ; preds = %476
  %488 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %489 = add nsw i32 %488, 1
  store i32 %489, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %490

490:                                              ; preds = %487, %476
  br label %491

491:                                              ; preds = %490, %470
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #9
  br label %492

492:                                              ; preds = %491
  %493 = load i32, ptr %38, align 4, !tbaa !9
  %494 = add nsw i32 %493, 1
  store i32 %494, ptr %38, align 4, !tbaa !9
  br label %465, !llvm.loop !35

495:                                              ; preds = %469
  %496 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 2
  store i64 5, ptr %496, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  store i32 0, ptr %40, align 4, !tbaa !9
  br label %497

497:                                              ; preds = %524, %495
  %498 = load i32, ptr %40, align 4, !tbaa !9
  %499 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %500 = icmp slt i32 %498, %499
  br i1 %500, label %502, label %501

501:                                              ; preds = %497
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  br label %527

502:                                              ; preds = %497
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #9
  %503 = load i32, ptr %24, align 4, !tbaa !9
  %504 = load i32, ptr %40, align 4, !tbaa !9
  %505 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef %503, i32 noundef %504, i32 noundef -1, i64 noundef 8)
  store i32 %505, ptr %41, align 4, !tbaa !9
  %506 = load i32, ptr %41, align 4, !tbaa !9
  %507 = icmp ne i32 %506, -1
  br i1 %507, label %508, label %523

508:                                              ; preds = %502
  %509 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %510 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %511 = sext i32 %510 to i64
  %512 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %509, i64 %511
  %513 = load i32, ptr %41, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %512, i32 noundef 65536, i32 noundef %513, i32 noundef 6, i32 noundef -1)
  %514 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %515 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %516 = sext i32 %515 to i64
  %517 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %514, i64 %516
  %518 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %517)
  br i1 %518, label %519, label %522

519:                                              ; preds = %508
  %520 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %521 = add nsw i32 %520, 1
  store i32 %521, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %522

522:                                              ; preds = %519, %508
  br label %523

523:                                              ; preds = %522, %502
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  br label %524

524:                                              ; preds = %523
  %525 = load i32, ptr %40, align 4, !tbaa !9
  %526 = add nsw i32 %525, 1
  store i32 %526, ptr %40, align 4, !tbaa !9
  br label %497, !llvm.loop !36

527:                                              ; preds = %501
  br label %528

528:                                              ; preds = %527, %460
  %529 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  store i32 %529, ptr @_ZN5tracyL14s_ctxBufferIdxE, align 4, !tbaa !9
  %530 = load i8, ptr %23, align 1, !tbaa !12, !range !24, !noundef !25
  %531 = trunc i8 %530 to i1
  br i1 %531, label %637, label %532

532:                                              ; preds = %528
  %533 = load i32, ptr %8, align 4, !tbaa !9
  %534 = icmp ne i32 %533, -1
  br i1 %534, label %535, label %637

535:                                              ; preds = %532
  call void @llvm.lifetime.start.p0(i64 128, ptr %42) #9
  call void @llvm.memset.p0.i64(ptr align 8 %42, i8 0, i64 128, i1 false)
  %536 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 0
  %537 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 1
  %538 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 2
  %539 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 3
  %540 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 4
  %541 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 5
  %542 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %543 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %544 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %545 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %546 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %547 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %548 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %549 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %550 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %551 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %552 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %553 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %554 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %555 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %556 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %557 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %558 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %559 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %560 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %561 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %562 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %563 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %564 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %565 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %566 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %567 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %568 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %569 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %570 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %571 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %572 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %573 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %574 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %575 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %576 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %577 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %578 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %579 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 6
  %580 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 7
  %581 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 8
  %582 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 9
  %583 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 10
  %584 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 11
  %585 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 12
  %586 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 13
  %587 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 14
  %588 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 15
  %589 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 16
  %590 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 17
  %591 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 18
  %592 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 19
  %593 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 20
  %594 = getelementptr inbounds %struct.perf_event_attr, ptr %42, i32 0, i32 21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %42, i64 128, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 128, ptr %42) #9
  %595 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 0
  store i32 2, ptr %595, align 8, !tbaa !16
  %596 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 1
  store i32 128, ptr %596, align 4, !tbaa !20
  %597 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 3
  store i64 1, ptr %597, align 8, !tbaa !11
  %598 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 4
  store i64 1028, ptr %598, align 8, !tbaa !22
  %599 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %600 = load i64, ptr %599, align 8
  %601 = and i64 %600, -2
  %602 = or i64 %601, 1
  store i64 %602, ptr %599, align 8
  %603 = load i32, ptr %8, align 4, !tbaa !9
  %604 = sext i32 %603 to i64
  %605 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 2
  store i64 %604, ptr %605, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #9
  store i32 0, ptr %43, align 4, !tbaa !9
  br label %606

606:                                              ; preds = %633, %535
  %607 = load i32, ptr %43, align 4, !tbaa !9
  %608 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %609 = icmp slt i32 %607, %608
  br i1 %609, label %611, label %610

610:                                              ; preds = %606
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  br label %636

611:                                              ; preds = %606
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #9
  %612 = load i32, ptr %43, align 4, !tbaa !9
  %613 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef -1, i32 noundef %612, i32 noundef -1, i64 noundef 8)
  store i32 %613, ptr %44, align 4, !tbaa !9
  %614 = load i32, ptr %44, align 4, !tbaa !9
  %615 = icmp ne i32 %614, -1
  br i1 %615, label %616, label %632

616:                                              ; preds = %611
  %617 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %618 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %619 = sext i32 %618 to i64
  %620 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %617, i64 %619
  %621 = load i32, ptr %44, align 4, !tbaa !9
  %622 = load i32, ptr %43, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %620, i32 noundef 65536, i32 noundef %621, i32 noundef 7, i32 noundef %622)
  %623 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %624 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %625 = sext i32 %624 to i64
  %626 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %623, i64 %625
  %627 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %626)
  br i1 %627, label %628, label %631

628:                                              ; preds = %616
  %629 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %630 = add nsw i32 %629, 1
  store i32 %630, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %631

631:                                              ; preds = %628, %616
  br label %632

632:                                              ; preds = %631, %611
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #9
  br label %633

633:                                              ; preds = %632
  %634 = load i32, ptr %43, align 4, !tbaa !9
  %635 = add nsw i32 %634, 1
  store i32 %635, ptr %43, align 4, !tbaa !9
  br label %606, !llvm.loop !37

636:                                              ; preds = %610
  br label %637

637:                                              ; preds = %636, %532, %528
  %638 = load i8, ptr %21, align 1, !tbaa !12, !range !24, !noundef !25
  %639 = trunc i8 %638 to i1
  br i1 %639, label %791, label %640

640:                                              ; preds = %637
  %641 = load i32, ptr %6, align 4, !tbaa !9
  %642 = icmp ne i32 %641, -1
  br i1 %642, label %643, label %791

643:                                              ; preds = %640
  call void @llvm.lifetime.start.p0(i64 128, ptr %45) #9
  call void @llvm.memset.p0.i64(ptr align 8 %45, i8 0, i64 128, i1 false)
  %644 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 0
  %645 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 1
  %646 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 2
  %647 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 3
  %648 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 4
  %649 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 5
  %650 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %651 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %652 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %653 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %654 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %655 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %656 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %657 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %658 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %659 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %660 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %661 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %662 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %663 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %664 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %665 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %666 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %667 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %668 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %669 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %670 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %671 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %672 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %673 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %674 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %675 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %676 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %677 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %678 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %679 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %680 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %681 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %682 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %683 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %684 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %685 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %686 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %687 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 6
  %688 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 7
  %689 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 8
  %690 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 9
  %691 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 10
  %692 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 11
  %693 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 12
  %694 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 13
  %695 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 14
  %696 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 15
  %697 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 16
  %698 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 17
  %699 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 18
  %700 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 19
  %701 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 20
  %702 = getelementptr inbounds %struct.perf_event_attr, ptr %45, i32 0, i32 21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %45, i64 128, i1 false), !tbaa.struct !28
  call void @llvm.lifetime.end.p0(i64 128, ptr %45) #9
  %703 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 0
  store i32 2, ptr %703, align 8, !tbaa !16
  %704 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 1
  store i32 128, ptr %704, align 4, !tbaa !20
  %705 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 3
  store i64 1, ptr %705, align 8, !tbaa !11
  %706 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 4
  store i64 1060, ptr %706, align 8, !tbaa !22
  %707 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 17
  store i16 127, ptr %707, align 4, !tbaa !23
  %708 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %709 = load i64, ptr %708, align 8
  %710 = and i64 %709, -2
  %711 = or i64 %710, 1
  store i64 %711, ptr %708, align 8
  %712 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 6
  %713 = load i64, ptr %712, align 8
  %714 = and i64 %713, -3
  %715 = or i64 %714, 2
  store i64 %715, ptr %712, align 8
  %716 = load i32, ptr %6, align 4, !tbaa !9
  %717 = sext i32 %716 to i64
  %718 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 2
  store i64 %717, ptr %718, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #9
  store i32 0, ptr %46, align 4, !tbaa !9
  br label %719

719:                                              ; preds = %746, %643
  %720 = load i32, ptr %46, align 4, !tbaa !9
  %721 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %722 = icmp slt i32 %720, %721
  br i1 %722, label %724, label %723

723:                                              ; preds = %719
  store i32 26, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #9
  br label %749

724:                                              ; preds = %719
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #9
  %725 = load i32, ptr %46, align 4, !tbaa !9
  %726 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef -1, i32 noundef %725, i32 noundef -1, i64 noundef 8)
  store i32 %726, ptr %47, align 4, !tbaa !9
  %727 = load i32, ptr %47, align 4, !tbaa !9
  %728 = icmp ne i32 %727, -1
  br i1 %728, label %729, label %745

729:                                              ; preds = %724
  %730 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %731 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %732 = sext i32 %731 to i64
  %733 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %730, i64 %732
  %734 = load i32, ptr %47, align 4, !tbaa !9
  %735 = load i32, ptr %46, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %733, i32 noundef 262144, i32 noundef %734, i32 noundef 8, i32 noundef %735)
  %736 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %737 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %738 = sext i32 %737 to i64
  %739 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %736, i64 %738
  %740 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %739)
  br i1 %740, label %741, label %744

741:                                              ; preds = %729
  %742 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %743 = add nsw i32 %742, 1
  store i32 %743, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %744

744:                                              ; preds = %741, %729
  br label %745

745:                                              ; preds = %744, %724
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  br label %746

746:                                              ; preds = %745
  %747 = load i32, ptr %46, align 4, !tbaa !9
  %748 = add nsw i32 %747, 1
  store i32 %748, ptr %46, align 4, !tbaa !9
  br label %719, !llvm.loop !38

749:                                              ; preds = %723
  %750 = load i32, ptr %7, align 4, !tbaa !9
  %751 = icmp ne i32 %750, -1
  br i1 %751, label %752, label %790

752:                                              ; preds = %749
  %753 = load i32, ptr %7, align 4, !tbaa !9
  %754 = sext i32 %753 to i64
  %755 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 2
  store i64 %754, ptr %755, align 8, !tbaa !21
  %756 = getelementptr inbounds %struct.perf_event_attr, ptr %26, i32 0, i32 2
  %757 = load i64, ptr %756, align 8, !tbaa !21
  %758 = and i64 %757, -33
  store i64 %758, ptr %756, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  store i32 0, ptr %48, align 4, !tbaa !9
  br label %759

759:                                              ; preds = %786, %752
  %760 = load i32, ptr %48, align 4, !tbaa !9
  %761 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !9
  %762 = icmp slt i32 %760, %761
  br i1 %762, label %764, label %763

763:                                              ; preds = %759
  store i32 29, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  br label %789

764:                                              ; preds = %759
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #9
  %765 = load i32, ptr %48, align 4, !tbaa !9
  %766 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef %26, i32 noundef -1, i32 noundef %765, i32 noundef -1, i64 noundef 8)
  store i32 %766, ptr %49, align 4, !tbaa !9
  %767 = load i32, ptr %49, align 4, !tbaa !9
  %768 = icmp ne i32 %767, -1
  br i1 %768, label %769, label %785

769:                                              ; preds = %764
  %770 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %771 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %772 = sext i32 %771 to i64
  %773 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %770, i64 %772
  %774 = load i32, ptr %49, align 4, !tbaa !9
  %775 = load i32, ptr %48, align 4, !tbaa !9
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %773, i32 noundef 65536, i32 noundef %774, i32 noundef 9, i32 noundef %775)
  %776 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  %777 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %778 = sext i32 %777 to i64
  %779 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %776, i64 %778
  %780 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %779)
  br i1 %780, label %781, label %784

781:                                              ; preds = %769
  %782 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  %783 = add nsw i32 %782, 1
  store i32 %783, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  br label %784

784:                                              ; preds = %781, %769
  br label %785

785:                                              ; preds = %784, %764
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  br label %786

786:                                              ; preds = %785
  %787 = load i32, ptr %48, align 4, !tbaa !9
  %788 = add nsw i32 %787, 1
  store i32 %788, ptr %48, align 4, !tbaa !9
  br label %759, !llvm.loop !39

789:                                              ; preds = %763
  br label %790

790:                                              ; preds = %789, %749
  br label %791

791:                                              ; preds = %790, %640, %637
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) @_ZN5tracyL11traceActiveE, i1 noundef zeroext true, i32 noundef 0) #9
  store i1 true, ptr %2, align 1
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 128, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %792

792:                                              ; preds = %791, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  %793 = load i1, ptr %2, align 1
  ret i1 %793
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef) #0

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #2

declare noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN5tracyL17GetSamplingPeriodEv() #0

; Function Attrs: nounwind
declare i32 @getpid() #4

; Function Attrs: nounwind
declare noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN5tracyL12tracy_mallocEm(i64 noundef) #5

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN5tracyL20GetSamplingFrequencyEv() #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5tracyL14ProbePreciseIpER15perf_event_attri(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52)) #7 align 2

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5tracyL14ProbePreciseIpER15perf_event_attryyi(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN5tracyL14IsGenuineIntelEv() #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i1 noundef zeroext, i32 noundef) #7 align 2

attributes #0 = { mustprogress 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 = { inlinehint mustprogress nounwind willreturn memory(read) 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { mustprogress 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTS15perf_event_attr", !10, i64 0, !10, i64 4, !18, i64 8, !7, i64 16, !18, i64 24, !18, i64 32, !18, i64 40, !18, i64 40, !18, i64 40, !18, i64 40, !18, i64 40, !18, i64 40, !18, i64 40, !18, i64 40, !18, i64 41, !18, i64 41, !18, i64 41, !18, i64 41, !18, i64 41, !18, i64 41, !18, i64 41, !18, i64 41, !18, i64 42, !18, i64 42, !18, i64 42, !18, i64 42, !18, i64 42, !18, i64 42, !18, i64 42, !18, i64 43, !18, i64 43, !18, i64 43, !18, i64 43, !18, i64 43, !18, i64 43, !18, i64 43, !18, i64 43, !18, i64 44, !18, i64 44, !18, i64 44, !18, i64 44, !18, i64 44, !18, i64 44, !18, i64 44, !7, i64 48, !10, i64 52, !7, i64 56, !7, i64 64, !18, i64 72, !18, i64 80, !10, i64 88, !10, i64 92, !18, i64 96, !10, i64 104, !19, i64 108, !19, i64 110, !10, i64 112, !10, i64 116, !18, i64 120}
!18 = !{!"long long", !7, i64 0}
!19 = !{!"short", !7, i64 0}
!20 = !{!17, !10, i64 4}
!21 = !{!17, !18, i64 8}
!22 = !{!17, !18, i64 24}
!23 = !{!17, !19, i64 108}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 8, !29, i64 16, i64 8, !11, i64 24, i64 8, !29, i64 32, i64 8, !29, i64 40, i64 8, !11, i64 48, i64 4, !11, i64 52, i64 4, !9, i64 56, i64 8, !11, i64 64, i64 8, !11, i64 72, i64 8, !29, i64 80, i64 8, !29, i64 88, i64 4, !9, i64 92, i64 4, !9, i64 96, i64 8, !29, i64 104, i64 4, !9, i64 108, i64 2, !30, i64 110, i64 2, !30, i64 112, i64 4, !9, i64 116, i64 4, !9, i64 120, i64 8, !29}
!29 = !{!18, !18, i64 0}
!30 = !{!19, !19, i64 0}
!31 = distinct !{!31, !27}
!32 = distinct !{!32, !27}
!33 = distinct !{!33, !27}
!34 = distinct !{!34, !27}
!35 = distinct !{!35, !27}
!36 = distinct !{!36, !27}
!37 = distinct !{!37, !27}
!38 = distinct !{!38, !27}
!39 = distinct !{!39, !27}


; 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.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%struct.perf_event_attr = type { i32, i32, i64, %union.anon, i64, i64, i64, %union.anon.0, i32, %union.anon.1, %union.anon.2, i64, i64, i32, i32, i64, i32, i16, i16, i32, i32, i64 }
%union.anon = type { i64 }
%union.anon.0 = type { i32 }
%union.anon.1 = type { i64 }
%union.anon.2 = type { i64 }
%"class.tracy::RingBuffer" = type <{ i32, [4 x i8], i64, ptr, i32, i32, ptr, i64, i32, [4 x i8] }>

@.str = external hidden unnamed_addr constant [37 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@_ZN5tracyL9s_numCpusE = external hidden local_unnamed_addr global i32, align 4
@_ZN5tracyL6s_ringE = external hidden local_unnamed_addr global ptr, align 8
@_ZN5tracyL12s_numBuffersE = external hidden local_unnamed_addr global i32, align 4
@_ZN5tracyL14s_ctxBufferIdxE = external hidden local_unnamed_addr global i32, align 4
@_ZN5tracyL11traceActiveE = external hidden global %"struct.std::atomic", align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5tracy13SysTraceStartERl(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %0) local_unnamed_addr #0 {
  %2 = alloca %struct.perf_event_attr, align 8
  %3 = tail call noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef nonnull @.str)
  %.not141 = icmp ne ptr %3, null
  br i1 %.not141, label %4, label %302

4:                                                ; preds = %1
  %5 = tail call noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef nonnull @.str.1)
  %.not142 = icmp eq ptr %5, null
  br i1 %.not142, label %8, label %6

6:                                                ; preds = %4
  %7 = tail call i32 @atoi(ptr nocapture noundef %5) #8
  br label %8

8:                                                ; preds = %6, %4
  %.0109 = phi i32 [ %7, %6 ], [ -1, %4 ]
  %9 = tail call noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef nonnull @.str.2)
  %.not143 = icmp eq ptr %9, null
  br i1 %.not143, label %12, label %10

10:                                               ; preds = %8
  %11 = tail call i32 @atoi(ptr nocapture noundef %9) #8
  br label %12

12:                                               ; preds = %10, %8
  %.0111 = phi i32 [ %11, %10 ], [ -1, %8 ]
  %13 = tail call noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef nonnull @.str.3)
  %.not144 = icmp eq ptr %13, null
  br i1 %.not144, label %16, label %14

14:                                               ; preds = %12
  %15 = tail call i32 @atoi(ptr nocapture noundef %13) #8
  br label %16

16:                                               ; preds = %14, %12
  %.0113 = phi i32 [ %15, %14 ], [ -1, %12 ]
  %17 = tail call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef nonnull @.str.4)
  %.not145 = icmp eq ptr %17, null
  br i1 %.not145, label %21, label %18

18:                                               ; preds = %16
  %19 = load i8, ptr %17, align 1, !tbaa !5
  %20 = icmp eq i8 %19, 49
  br label %21

21:                                               ; preds = %18, %16
  %22 = phi i1 [ false, %16 ], [ %20, %18 ]
  %23 = tail call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef nonnull @.str.5)
  %.not146 = icmp eq ptr %23, null
  br i1 %.not146, label %27, label %24

24:                                               ; preds = %21
  %25 = load i8, ptr %23, align 1, !tbaa !5
  %26 = icmp eq i8 %25, 49
  br label %27

27:                                               ; preds = %24, %21
  %28 = phi i1 [ false, %21 ], [ %26, %24 ]
  %29 = tail call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef nonnull @.str.6)
  %.not147 = icmp eq ptr %29, null
  br i1 %.not147, label %33, label %30

30:                                               ; preds = %27
  %31 = load i8, ptr %29, align 1, !tbaa !5
  %32 = icmp eq i8 %31, 49
  br label %33

33:                                               ; preds = %30, %27
  %34 = phi i1 [ false, %27 ], [ %32, %30 ]
  %35 = tail call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef nonnull @.str.7)
  %.not148 = icmp eq ptr %35, null
  br i1 %.not148, label %39, label %36

36:                                               ; preds = %33
  %37 = load i8, ptr %35, align 1, !tbaa !5
  %38 = icmp eq i8 %37, 49
  br label %39

39:                                               ; preds = %36, %33
  %40 = phi i1 [ false, %33 ], [ %38, %36 ]
  %41 = tail call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef nonnull @.str.8)
  %.not149 = icmp eq ptr %41, null
  br i1 %.not149, label %45, label %42

42:                                               ; preds = %39
  %43 = load i8, ptr %41, align 1, !tbaa !5
  %44 = icmp eq i8 %43, 49
  br label %45

45:                                               ; preds = %42, %39
  %46 = phi i1 [ false, %39 ], [ %44, %42 ]
  %47 = tail call noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef nonnull @.str.9)
  %.not150 = icmp eq ptr %47, null
  br i1 %.not150, label %51, label %48

48:                                               ; preds = %45
  %49 = load i8, ptr %47, align 1, !tbaa !5
  %50 = icmp eq i8 %49, 49
  br label %51

51:                                               ; preds = %48, %45
  %52 = phi i1 [ false, %45 ], [ %50, %48 ]
  %53 = tail call noundef i32 @_ZN5tracyL17GetSamplingPeriodEv()
  %54 = sext i32 %53 to i64
  store i64 %54, ptr %0, align 8, !tbaa !8
  %55 = tail call i32 @getpid() #9
  %56 = tail call noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #9
  store i32 %56, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %57 = mul nsw i32 %56, 10
  %58 = sext i32 %57 to i64
  %59 = mul nsw i64 %58, 56
  %60 = tail call noundef ptr @_ZN5tracyL12tracy_mallocEm(i64 noundef %59)
  store ptr %60, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  store i32 0, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %2) #9
  %61 = getelementptr inbounds i8, ptr %2, i64 32
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %61, i8 0, i64 96, i1 false)
  store i32 1, ptr %2, align 8, !tbaa !14
  %62 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 128, ptr %62, align 4, !tbaa !18
  %63 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 0, ptr %63, align 8, !tbaa !19
  %64 = tail call noundef i32 @_ZN5tracyL20GetSamplingFrequencyEv()
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 %65, ptr %66, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %2, i64 24
  store i64 38, ptr %67, align 8, !tbaa !20
  %68 = getelementptr inbounds i8, ptr %2, i64 108
  store i16 127, ptr %68, align 4, !tbaa !21
  %69 = getelementptr inbounds i8, ptr %2, i64 40
  store i64 1027, ptr %69, align 8
  br i1 %22, label %.critedge, label %70

70:                                               ; preds = %51
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attri(ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %55)
  %71 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %70, %93
  %.0115165 = phi i32 [ %94, %93 ], [ 0, %70 ]
  %73 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef %55, i32 noundef %.0115165, i32 noundef -1, i64 noundef 8)
  %74 = icmp eq i32 %73, -1
  br i1 %74, label %75, label %80

75:                                               ; preds = %.lr.ph
  %76 = load i64, ptr %69, align 8
  %77 = or i64 %76, 32
  store i64 %77, ptr %69, align 8
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attri(ptr noundef nonnull align 8 dereferenceable(128) %2, i32 noundef %55)
  %78 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef %55, i32 noundef %.0115165, i32 noundef -1, i64 noundef 8)
  %79 = icmp eq i32 %78, -1
  br i1 %79, label %.critedge, label %80

80:                                               ; preds = %75, %.lr.ph
  %.0117 = phi i32 [ %78, %75 ], [ %73, %.lr.ph ]
  %81 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %82 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %81, i64 %83
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %84, i32 noundef 65536, i32 noundef %.0117, i32 noundef 0, i32 noundef -1)
  %85 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %86 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %85, i64 %87
  %89 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %88)
  br i1 %89, label %90, label %93

90:                                               ; preds = %80
  %91 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %93

93:                                               ; preds = %90, %80
  %94 = add nuw nsw i32 %.0115165, 1
  %95 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %.lr.ph, label %.critedge, !llvm.loop !22

.critedge:                                        ; preds = %75, %93, %70, %51
  %97 = getelementptr inbounds i8, ptr %2, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %97, i8 0, i64 120, i1 false)
  store i32 0, ptr %2, align 8, !tbaa !14
  store i32 128, ptr %62, align 4, !tbaa !18
  store i64 5000, ptr %66, align 8, !tbaa !5
  store i64 5, ptr %67, align 8, !tbaa !20
  %98 = load i64, ptr %69, align 8
  %99 = or i64 %98, 1049699
  store i64 %99, ptr %69, align 8
  br i1 %28, label %.loopexit164, label %100

100:                                              ; preds = %.critedge
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attryyi(ptr noundef nonnull align 8 dereferenceable(128) %2, i64 noundef 0, i64 noundef 1, i32 noundef %55)
  %101 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %.lr.ph168, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %100
  store i64 1, ptr %63, align 8, !tbaa !19
  br label %.loopexit164

._crit_edge:                                      ; preds = %118
  store i64 1, ptr %63, align 8, !tbaa !19
  %103 = icmp sgt i32 %120, 0
  br i1 %103, label %.lr.ph171, label %.loopexit164

.lr.ph168:                                        ; preds = %100, %118
  %.0119167 = phi i32 [ %119, %118 ], [ 0, %100 ]
  %104 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef %55, i32 noundef %.0119167, i32 noundef -1, i64 noundef 8)
  %.not152 = icmp eq i32 %104, -1
  br i1 %.not152, label %118, label %105

105:                                              ; preds = %.lr.ph168
  %106 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %107 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %106, i64 %108
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %109, i32 noundef 65536, i32 noundef %104, i32 noundef 1, i32 noundef -1)
  %110 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %111 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %110, i64 %112
  %114 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %113)
  br i1 %114, label %115, label %118

115:                                              ; preds = %105
  %116 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %118

118:                                              ; preds = %105, %115, %.lr.ph168
  %119 = add nuw nsw i32 %.0119167, 1
  %120 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %.lr.ph168, label %._crit_edge, !llvm.loop !24

.lr.ph171:                                        ; preds = %._crit_edge, %136
  %.0120169 = phi i32 [ %137, %136 ], [ 0, %._crit_edge ]
  %122 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef %55, i32 noundef %.0120169, i32 noundef -1, i64 noundef 8)
  %.not151 = icmp eq i32 %122, -1
  br i1 %.not151, label %136, label %123

123:                                              ; preds = %.lr.ph171
  %124 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %125 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %124, i64 %126
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %127, i32 noundef 65536, i32 noundef %122, i32 noundef 2, i32 noundef -1)
  %128 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %129 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %128, i64 %130
  %132 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %131)
  br i1 %132, label %133, label %136

133:                                              ; preds = %123
  %134 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %136

136:                                              ; preds = %123, %133, %.lr.ph171
  %137 = add nuw nsw i32 %.0120169, 1
  %138 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %139 = icmp slt i32 %137, %138
  br i1 %139, label %.lr.ph171, label %.loopexit164, !llvm.loop !25

.loopexit164:                                     ; preds = %136, %._crit_edge.thread, %._crit_edge, %.critedge
  br i1 %34, label %.loopexit163, label %140

140:                                              ; preds = %.loopexit164
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attryyi(ptr noundef nonnull align 8 dereferenceable(128) %2, i64 noundef 2, i64 noundef 3, i32 noundef %55)
  %141 = call noundef zeroext i1 @_ZN5tracyL14IsGenuineIntelEv()
  br i1 %141, label %142, label %145

142:                                              ; preds = %140
  %143 = load i64, ptr %69, align 8
  %144 = and i64 %143, -98305
  store i64 %144, ptr %69, align 8
  br label %145

145:                                              ; preds = %142, %140
  %146 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %147 = icmp sgt i32 %146, 0
  br i1 %147, label %.lr.ph174, label %._crit_edge175.thread

._crit_edge175.thread:                            ; preds = %145
  store i64 3, ptr %63, align 8, !tbaa !19
  br label %.loopexit163

._crit_edge175:                                   ; preds = %163
  %148 = icmp sgt i32 %165, 0
  store i64 3, ptr %63, align 8, !tbaa !19
  br i1 %148, label %.lr.ph178, label %.loopexit163

.lr.ph174:                                        ; preds = %145, %163
  %.0118172 = phi i32 [ %164, %163 ], [ 0, %145 ]
  %149 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef %55, i32 noundef %.0118172, i32 noundef -1, i64 noundef 8)
  %.not154 = icmp eq i32 %149, -1
  br i1 %.not154, label %163, label %150

150:                                              ; preds = %.lr.ph174
  %151 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %152 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %151, i64 %153
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %154, i32 noundef 65536, i32 noundef %149, i32 noundef 3, i32 noundef -1)
  %155 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %156 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %155, i64 %157
  %159 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %158)
  br i1 %159, label %160, label %163

160:                                              ; preds = %150
  %161 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %163

163:                                              ; preds = %150, %160, %.lr.ph174
  %164 = add nuw nsw i32 %.0118172, 1
  %165 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %166 = icmp slt i32 %164, %165
  br i1 %166, label %.lr.ph174, label %._crit_edge175, !llvm.loop !26

.lr.ph178:                                        ; preds = %._crit_edge175, %181
  %.0116176 = phi i32 [ %182, %181 ], [ 0, %._crit_edge175 ]
  %167 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef %55, i32 noundef %.0116176, i32 noundef -1, i64 noundef 8)
  %.not153 = icmp eq i32 %167, -1
  br i1 %.not153, label %181, label %168

168:                                              ; preds = %.lr.ph178
  %169 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %170 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %169, i64 %171
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %172, i32 noundef 65536, i32 noundef %167, i32 noundef 4, i32 noundef -1)
  %173 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %174 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %173, i64 %175
  %177 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %176)
  br i1 %177, label %178, label %181

178:                                              ; preds = %168
  %179 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %181

181:                                              ; preds = %168, %178, %.lr.ph178
  %182 = add nuw nsw i32 %.0116176, 1
  %183 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %184 = icmp slt i32 %182, %183
  br i1 %184, label %.lr.ph178, label %.loopexit163, !llvm.loop !27

.loopexit163:                                     ; preds = %181, %._crit_edge175.thread, %._crit_edge175, %.loopexit164
  br i1 %40, label %.loopexit162, label %185

185:                                              ; preds = %.loopexit163
  call void @_ZN5tracyL14ProbePreciseIpER15perf_event_attryyi(ptr noundef nonnull align 8 dereferenceable(128) %2, i64 noundef 4, i64 noundef 5, i32 noundef %55)
  %186 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %187 = icmp sgt i32 %186, 0
  br i1 %187, label %.lr.ph181, label %._crit_edge182.thread

._crit_edge182.thread:                            ; preds = %185
  store i64 5, ptr %63, align 8, !tbaa !19
  br label %.loopexit162

._crit_edge182:                                   ; preds = %203
  %188 = icmp sgt i32 %205, 0
  store i64 5, ptr %63, align 8, !tbaa !19
  br i1 %188, label %.lr.ph185, label %.loopexit162

.lr.ph181:                                        ; preds = %185, %203
  %.0114179 = phi i32 [ %204, %203 ], [ 0, %185 ]
  %189 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef %55, i32 noundef %.0114179, i32 noundef -1, i64 noundef 8)
  %.not156 = icmp eq i32 %189, -1
  br i1 %.not156, label %203, label %190

190:                                              ; preds = %.lr.ph181
  %191 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %192 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %191, i64 %193
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %194, i32 noundef 65536, i32 noundef %189, i32 noundef 5, i32 noundef -1)
  %195 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %196 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %195, i64 %197
  %199 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %198)
  br i1 %199, label %200, label %203

200:                                              ; preds = %190
  %201 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %203

203:                                              ; preds = %190, %200, %.lr.ph181
  %204 = add nuw nsw i32 %.0114179, 1
  %205 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %206 = icmp slt i32 %204, %205
  br i1 %206, label %.lr.ph181, label %._crit_edge182, !llvm.loop !28

.lr.ph185:                                        ; preds = %._crit_edge182, %221
  %.0112183 = phi i32 [ %222, %221 ], [ 0, %._crit_edge182 ]
  %207 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef %55, i32 noundef %.0112183, i32 noundef -1, i64 noundef 8)
  %.not155 = icmp eq i32 %207, -1
  br i1 %.not155, label %221, label %208

208:                                              ; preds = %.lr.ph185
  %209 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %210 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %209, i64 %211
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %212, i32 noundef 65536, i32 noundef %207, i32 noundef 6, i32 noundef -1)
  %213 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %214 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %213, i64 %215
  %217 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %216)
  br i1 %217, label %218, label %221

218:                                              ; preds = %208
  %219 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %221

221:                                              ; preds = %208, %218, %.lr.ph185
  %222 = add nuw nsw i32 %.0112183, 1
  %223 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %224 = icmp slt i32 %222, %223
  br i1 %224, label %.lr.ph185, label %.loopexit162, !llvm.loop !29

.loopexit162:                                     ; preds = %221, %._crit_edge182.thread, %._crit_edge182, %.loopexit163
  %225 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  store i32 %225, ptr @_ZN5tracyL14s_ctxBufferIdxE, align 4, !tbaa !10
  %226 = icmp eq i32 %.0113, -1
  %or.cond.not = select i1 %52, i1 true, i1 %226
  br i1 %or.cond.not, label %.loopexit161, label %227

227:                                              ; preds = %.loopexit162
  %228 = getelementptr inbounds i8, ptr %2, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %228, i8 0, i64 120, i1 false)
  store i32 2, ptr %2, align 8, !tbaa !14
  store i32 128, ptr %62, align 4, !tbaa !18
  store i64 1, ptr %66, align 8, !tbaa !5
  store i64 1028, ptr %67, align 8, !tbaa !20
  %229 = load i64, ptr %69, align 8
  %230 = or i64 %229, 1
  store i64 %230, ptr %69, align 8
  %231 = sext i32 %.0113 to i64
  store i64 %231, ptr %63, align 8, !tbaa !19
  %232 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %233 = icmp sgt i32 %232, 0
  br i1 %233, label %.lr.ph188, label %.loopexit161

.lr.ph188:                                        ; preds = %227, %248
  %.0110186 = phi i32 [ %249, %248 ], [ 0, %227 ]
  %234 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef -1, i32 noundef %.0110186, i32 noundef -1, i64 noundef 8)
  %.not160 = icmp eq i32 %234, -1
  br i1 %.not160, label %248, label %235

235:                                              ; preds = %.lr.ph188
  %236 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %237 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %236, i64 %238
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %239, i32 noundef 65536, i32 noundef %234, i32 noundef 7, i32 noundef %.0110186)
  %240 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %241 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %240, i64 %242
  %244 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %243)
  br i1 %244, label %245, label %248

245:                                              ; preds = %235
  %246 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %248

248:                                              ; preds = %235, %245, %.lr.ph188
  %249 = add nuw nsw i32 %.0110186, 1
  %250 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %251 = icmp slt i32 %249, %250
  br i1 %251, label %.lr.ph188, label %.loopexit161, !llvm.loop !30

.loopexit161:                                     ; preds = %248, %227, %.loopexit162
  %252 = icmp eq i32 %.0109, -1
  %or.cond4.not = select i1 %46, i1 true, i1 %252
  br i1 %or.cond4.not, label %.loopexit, label %253

253:                                              ; preds = %.loopexit161
  %254 = getelementptr inbounds i8, ptr %2, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %254, i8 0, i64 120, i1 false)
  store i32 2, ptr %2, align 8, !tbaa !14
  store i32 128, ptr %62, align 4, !tbaa !18
  store i64 1, ptr %66, align 8, !tbaa !5
  store i64 1060, ptr %67, align 8, !tbaa !20
  store i16 127, ptr %68, align 4, !tbaa !21
  %255 = load i64, ptr %69, align 8
  %256 = or i64 %255, 3
  store i64 %256, ptr %69, align 8
  %257 = sext i32 %.0109 to i64
  store i64 %257, ptr %63, align 8, !tbaa !19
  %258 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %259 = icmp sgt i32 %258, 0
  br i1 %259, label %.lr.ph191, label %._crit_edge192.thread

._crit_edge192:                                   ; preds = %276
  %.not = icmp eq i32 %.0111, -1
  br i1 %.not, label %.loopexit, label %280

._crit_edge192.thread:                            ; preds = %253
  %.not196 = icmp eq i32 %.0111, -1
  br i1 %.not196, label %.loopexit, label %.thread

.thread:                                          ; preds = %._crit_edge192.thread
  %260 = and i32 %.0111, -33
  %261 = sext i32 %260 to i64
  store i64 %261, ptr %63, align 8, !tbaa !19
  br label %.loopexit

.lr.ph191:                                        ; preds = %253, %276
  %.0108189 = phi i32 [ %277, %276 ], [ 0, %253 ]
  %262 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef -1, i32 noundef %.0108189, i32 noundef -1, i64 noundef 8)
  %.not159 = icmp eq i32 %262, -1
  br i1 %.not159, label %276, label %263

263:                                              ; preds = %.lr.ph191
  %264 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %265 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %264, i64 %266
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %267, i32 noundef 262144, i32 noundef %262, i32 noundef 8, i32 noundef %.0108189)
  %268 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %269 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %268, i64 %270
  %272 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %271)
  br i1 %272, label %273, label %276

273:                                              ; preds = %263
  %274 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %275 = add nsw i32 %274, 1
  store i32 %275, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %276

276:                                              ; preds = %263, %273, %.lr.ph191
  %277 = add nuw nsw i32 %.0108189, 1
  %278 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %279 = icmp slt i32 %277, %278
  br i1 %279, label %.lr.ph191, label %._crit_edge192, !llvm.loop !31

280:                                              ; preds = %._crit_edge192
  %281 = icmp sgt i32 %278, 0
  %282 = and i32 %.0111, -33
  %283 = sext i32 %282 to i64
  store i64 %283, ptr %63, align 8, !tbaa !19
  br i1 %281, label %.lr.ph195, label %.loopexit

.lr.ph195:                                        ; preds = %280, %298
  %.0106193 = phi i32 [ %299, %298 ], [ 0, %280 ]
  %284 = call noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef nonnull %2, i32 noundef -1, i32 noundef %.0106193, i32 noundef -1, i64 noundef 8)
  %.not158 = icmp eq i32 %284, -1
  br i1 %.not158, label %298, label %285

285:                                              ; preds = %.lr.ph195
  %286 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %287 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %286, i64 %288
  call void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52) %289, i32 noundef 65536, i32 noundef %284, i32 noundef 9, i32 noundef %.0106193)
  %290 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !12
  %291 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %290, i64 %292
  %294 = call noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52) %293)
  br i1 %294, label %295, label %298

295:                                              ; preds = %285
  %296 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !10
  br label %298

298:                                              ; preds = %285, %295, %.lr.ph195
  %299 = add nuw nsw i32 %.0106193, 1
  %300 = load i32, ptr @_ZN5tracyL9s_numCpusE, align 4, !tbaa !10
  %301 = icmp slt i32 %299, %300
  br i1 %301, label %.lr.ph195, label %.loopexit, !llvm.loop !32

.loopexit:                                        ; preds = %298, %.thread, %._crit_edge192.thread, %280, %._crit_edge192, %.loopexit161
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) @_ZN5tracyL11traceActiveE, i1 noundef zeroext true, i32 noundef 0) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %2) #9
  br label %302

302:                                              ; preds = %1, %.loopexit
  ret i1 %.not141
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN5tracyL8ReadFileEPKc(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #2

declare noundef ptr @_ZN5tracy9GetEnvVarEPKc(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN5tracyL17GetSamplingPeriodEv() local_unnamed_addr #0

; Function Attrs: nounwind
declare i32 @getpid() local_unnamed_addr #4

; Function Attrs: nounwind
declare noundef i32 @_ZNSt6thread20hardware_concurrencyEv() local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN5tracyL12tracy_mallocEm(i64 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN5tracyL20GetSamplingFrequencyEv() local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN5tracyL14ProbePreciseIpER15perf_event_attri(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN5tracyL15perf_event_openEP15perf_event_attriiim(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5tracy10RingBufferC2Ejiii(ptr noundef nonnull align 8 dereferenceable(52), i32 noundef, i32 noundef, i32 noundef, i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK5tracy10RingBuffer7IsValidEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #7 align 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: mustprogress uwtable
declare hidden void @_ZN5tracyL14ProbePreciseIpER15perf_event_attryyi(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN5tracyL14IsGenuineIntelEv() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i1 noundef zeroext, i32 noundef) local_unnamed_addr #7 align 2

attributes #0 = { mustprogress 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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { mustprogress 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 #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"_ZTS15perf_event_attr", !11, i64 0, !11, i64 4, !16, i64 8, !6, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 40, !16, i64 40, !16, i64 40, !16, i64 40, !16, i64 40, !16, i64 40, !16, i64 40, !16, i64 41, !16, i64 41, !16, i64 41, !16, i64 41, !16, i64 41, !16, i64 41, !16, i64 41, !16, i64 41, !16, i64 42, !16, i64 42, !16, i64 42, !16, i64 42, !16, i64 42, !16, i64 42, !16, i64 42, !16, i64 43, !16, i64 43, !16, i64 43, !16, i64 43, !16, i64 43, !16, i64 43, !16, i64 43, !16, i64 43, !16, i64 44, !16, i64 44, !16, i64 44, !16, i64 44, !16, i64 44, !16, i64 44, !16, i64 44, !6, i64 48, !11, i64 52, !6, i64 56, !6, i64 64, !16, i64 72, !16, i64 80, !11, i64 88, !11, i64 92, !16, i64 96, !11, i64 104, !17, i64 108, !17, i64 110, !11, i64 112, !11, i64 116, !16, i64 120}
!16 = !{!"long long", !6, i64 0}
!17 = !{!"short", !6, i64 0}
!18 = !{!15, !11, i64 4}
!19 = !{!15, !16, i64 8}
!20 = !{!15, !16, i64 24}
!21 = !{!15, !17, i64 108}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !23}
!29 = distinct !{!29, !23}
!30 = distinct !{!30, !23}
!31 = distinct !{!31, !23}
!32 = distinct !{!32, !23}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass