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

; 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.sched_param = type { i32 }
%"class.tracy::ThreadExitHandler" = type { i8 }
%struct.perf_event_header = type { i32, i16, i16 }
%"class.std::chrono::duration" = type { i64 }
%"class.tracy::RingBuffer" = type <{ i32, [4 x i8], i64, ptr, i32, i32, ptr, i64, i32, [4 x i8] }>
%"struct.tracy::QueueItem" = type { %"struct.tracy::QueueHeader", %union.anon.8 }
%"struct.tracy::QueueHeader" = type { %union.anon.7 }
%union.anon.7 = type { i8 }
%union.anon.8 = type <{ %"struct.tracy::QueuePlotDataInt", [7 x i8] }>
%"struct.tracy::QueuePlotDataInt" = type { %"struct.tracy::QueuePlotDataBase", i64 }
%"struct.tracy::QueuePlotDataBase" = type { i64, i64 }
%"struct.tracy::QueueCallstackSample" = type <{ i64, i32 }>
%"struct.tracy::QueueCallstackSampleFat" = type <{ %"struct.tracy::QueueCallstackSample", i64 }>
%"struct.tracy::QueueHwSample" = type { i64, i64 }
%"struct.tracy::QueueContextSwitch" = type <{ i64, i32, i32, i8, i8, i8 }>
%"struct.tracy::QueueThreadWakeup" = type <{ i64, i32 }>
%"struct.tracy::QueueFrameVsync" = type <{ i64, i32 }>

@_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
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@__const._ZN5tracy14SysTraceWorkerEPv.sp = external hidden unnamed_addr constant %struct.sched_param, align 4
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [108 x i8], align 1
@__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv = external hidden unnamed_addr constant [35 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [18 x i8], align 1

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

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

; Function Attrs: 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) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5tracy14SysTraceWorkerEPv(ptr noundef %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.tracy::ThreadExitHandler", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.sched_param, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %struct.perf_event_header, align 4
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca %struct.perf_event_header, align 4
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i8, align 1
  %35 = alloca i64, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca [512 x i16], align 16
  %42 = alloca [512 x i32], align 16
  %43 = alloca [512 x i32], align 16
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i64, align 8
  %47 = alloca i64, align 8
  %48 = alloca i8, align 1
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i64, align 8
  %52 = alloca i32, align 4
  %53 = alloca i16, align 2
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca %struct.perf_event_header, align 4
  %57 = alloca i64, align 8
  %58 = alloca ptr, align 8
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca %struct.perf_event_header, align 4
  %62 = alloca i32, align 4
  %63 = alloca i64, align 8
  %64 = alloca i32, align 4
  %65 = alloca i32, align 4
  %66 = alloca i32, align 4
  %67 = alloca i64, align 8
  %68 = alloca i8, align 1
  %69 = alloca i8, align 1
  %70 = alloca i64, align 8
  %71 = alloca ptr, align 8
  %72 = alloca ptr, align 8
  %73 = alloca ptr, align 8
  %74 = alloca ptr, align 8
  %75 = alloca i64, align 8
  %76 = alloca ptr, align 8
  %77 = alloca ptr, align 8
  %78 = alloca ptr, align 8
  %79 = alloca i32, align 4
  %80 = alloca i64, align 8
  %81 = alloca ptr, align 8
  %82 = alloca ptr, align 8
  %83 = alloca ptr, align 8
  %84 = alloca i32, align 4
  %85 = alloca i64, align 8
  %86 = alloca ptr, align 8
  %87 = alloca ptr, align 8
  %88 = alloca ptr, align 8
  %89 = alloca i32, align 4
  %90 = alloca %"class.std::chrono::duration", align 8
  %91 = alloca i32, align 4
  %92 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #12
  invoke void @_ZN5tracy13SetThreadNameEPKc(ptr noundef @.str.10)
          to label %93 unwind label %99

93:                                               ; preds = %1
  invoke void @_ZN5tracyL12InitRpmallocEv()
          to label %94 unwind label %99

94:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 @__const._ZN5tracy14SysTraceWorkerEPv.sp, i64 4, i1 false)
  %95 = call i64 @pthread_self() #13
  %96 = call i32 @pthread_setschedparam(i64 noundef %95, i32 noundef 1, ptr noundef %6) #12
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %103

98:                                               ; preds = %94
  br label %103

99:                                               ; preds = %93, %1
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %4, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %5, align 4
  br label %1103

103:                                              ; preds = %98, %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #12
  %104 = load i32, ptr @_ZN5tracyL14s_ctxBufferIdxE, align 4, !tbaa !9
  store i32 %104, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #12
  %105 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !5
  store ptr %105, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #12
  %106 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !9
  store i32 %106, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #12
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %118, %103
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #12
  br label %125

112:                                              ; preds = %107
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = load i32, ptr %10, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %113, i64 %115
  invoke void @_ZN5tracy10RingBuffer6EnableEv(ptr noundef nonnull align 8 dereferenceable(52) %116)
          to label %117 unwind label %121

117:                                              ; preds = %112
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %10, align 4, !tbaa !9
  br label %107, !llvm.loop !11

121:                                              ; preds = %112
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %4, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #12
  br label %1102

125:                                              ; preds = %111
  br label %126

126:                                              ; preds = %1079, %125
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #12
  store i8 0, ptr %11, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #12
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %403, %126
  %128 = load i32, ptr %12, align 4, !tbaa !9
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 7, ptr %13, align 4
  br label %414

132:                                              ; preds = %127
  %133 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) @_ZN5tracyL11traceActiveE, i32 noundef 0) #12
  br i1 %133, label %135, label %134

134:                                              ; preds = %132
  store i32 7, ptr %13, align 4
  br label %414

135:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #12
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %136, i64 %138
  store ptr %139, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #12
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = invoke noundef i64 @_ZNK5tracy10RingBuffer8LoadHeadEv(ptr noundef nonnull align 8 dereferenceable(52) %140)
          to label %142 unwind label %150

142:                                              ; preds = %135
  store i64 %141, ptr %15, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #12
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  %144 = invoke noundef i64 @_ZNK5tracy10RingBuffer7GetTailEv(ptr noundef nonnull align 8 dereferenceable(52) %143)
          to label %145 unwind label %154

145:                                              ; preds = %142
  store i64 %144, ptr %16, align 8, !tbaa !15
  %146 = load i64, ptr %15, align 8, !tbaa !15
  %147 = load i64, ptr %16, align 8, !tbaa !15
  %148 = icmp eq i64 %146, %147
  br i1 %148, label %149, label %158

149:                                              ; preds = %145
  store i32 9, ptr %13, align 4
  br label %400

150:                                              ; preds = %135
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %4, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %5, align 4
  br label %413

154:                                              ; preds = %142
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %4, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %5, align 4
  br label %412

158:                                              ; preds = %145
  %159 = load i64, ptr %15, align 8, !tbaa !15
  %160 = load i64, ptr %16, align 8, !tbaa !15
  %161 = icmp ugt i64 %159, %160
  br i1 %161, label %162, label %163

162:                                              ; preds = %158
  br label %165

163:                                              ; preds = %158
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.12, i32 noundef 1191, ptr noundef @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #14
  unreachable

164:                                              ; No predecessors!
  br label %165

165:                                              ; preds = %164, %162
  store i8 1, ptr %11, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #12
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = invoke noundef i32 @_ZNK5tracy10RingBuffer5GetIdEv(ptr noundef nonnull align 8 dereferenceable(52) %166)
          to label %168 unwind label %173

168:                                              ; preds = %165
  store i32 %167, ptr %17, align 4, !tbaa !9
  %169 = load i32, ptr %17, align 4, !tbaa !9
  %170 = icmp ne i32 %169, 8
  br i1 %170, label %171, label %172

171:                                              ; preds = %168
  br label %178

172:                                              ; preds = %168
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.12, i32 noundef 1195, ptr noundef @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #14
  unreachable

173:                                              ; preds = %165
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %4, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %5, align 4
  br label %411

177:                                              ; No predecessors!
  br label %178

178:                                              ; preds = %177, %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #12
  %179 = load i64, ptr %15, align 8, !tbaa !15
  %180 = load i64, ptr %16, align 8, !tbaa !15
  %181 = sub i64 %179, %180
  store i64 %181, ptr %18, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #12
  store i64 0, ptr %19, align 8, !tbaa !15
  %182 = load i32, ptr %17, align 4, !tbaa !9
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %296

184:                                              ; preds = %178
  br label %185

185:                                              ; preds = %288, %184
  %186 = load i64, ptr %19, align 8, !tbaa !15
  %187 = load i64, ptr %18, align 8, !tbaa !15
  %188 = icmp ult i64 %186, %187
  br i1 %188, label %189, label %295

189:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #12
  %190 = load ptr, ptr %14, align 8, !tbaa !5
  %191 = load i64, ptr %19, align 8, !tbaa !15
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %190, ptr noundef %20, i64 noundef %191, i64 noundef 8)
          to label %192 unwind label %259

192:                                              ; preds = %189
  %193 = getelementptr inbounds %struct.perf_event_header, ptr %20, i32 0, i32 0
  %194 = load i32, ptr %193, align 4, !tbaa !17
  %195 = icmp eq i32 %194, 9
  br i1 %195, label %196, label %288

196:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #12
  %197 = load i64, ptr %19, align 8, !tbaa !15
  %198 = add i64 %197, 8
  store i64 %198, ptr %21, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #12
  %199 = load i64, ptr %21, align 8, !tbaa !15
  %200 = add i64 %199, 4
  store i64 %200, ptr %21, align 8, !tbaa !15
  %201 = load ptr, ptr %14, align 8, !tbaa !5
  %202 = load i64, ptr %21, align 8, !tbaa !15
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %201, ptr noundef %22, i64 noundef %202, i64 noundef 4)
          to label %203 unwind label %263

203:                                              ; preds = %196
  %204 = load i64, ptr %21, align 8, !tbaa !15
  %205 = add i64 %204, 4
  store i64 %205, ptr %21, align 8, !tbaa !15
  %206 = load ptr, ptr %14, align 8, !tbaa !5
  %207 = load i64, ptr %21, align 8, !tbaa !15
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %206, ptr noundef %23, i64 noundef %207, i64 noundef 8)
          to label %208 unwind label %263

208:                                              ; preds = %203
  %209 = load i64, ptr %21, align 8, !tbaa !15
  %210 = add i64 %209, 8
  store i64 %210, ptr %21, align 8, !tbaa !15
  %211 = load ptr, ptr %14, align 8, !tbaa !5
  %212 = load i64, ptr %21, align 8, !tbaa !15
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %211, ptr noundef %24, i64 noundef %212, i64 noundef 8)
          to label %213 unwind label %263

213:                                              ; preds = %208
  %214 = load i64, ptr %21, align 8, !tbaa !15
  %215 = add i64 %214, 8
  store i64 %215, ptr %21, align 8, !tbaa !15
  %216 = load i64, ptr %24, align 8, !tbaa !15
  %217 = icmp ugt i64 %216, 0
  br i1 %217, label %218, label %286

218:                                              ; preds = %213
  %219 = load ptr, ptr %14, align 8, !tbaa !5
  %220 = load i64, ptr %23, align 8, !tbaa !15
  %221 = invoke noundef i64 @_ZNK5tracy10RingBuffer16ConvertTimeToTscEl(ptr noundef nonnull align 8 dereferenceable(52) %219, i64 noundef %220)
          to label %222 unwind label %263

222:                                              ; preds = %218
  store i64 %221, ptr %23, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #12
  %223 = load i64, ptr %24, align 8, !tbaa !15
  %224 = load ptr, ptr %14, align 8, !tbaa !5
  %225 = load i64, ptr %21, align 8, !tbaa !15
  %226 = invoke noundef ptr @_ZN5tracyL17GetCallstackBlockEmRNS_10RingBufferEm(i64 noundef %223, ptr noundef nonnull align 8 dereferenceable(52) %224, i64 noundef %225)
          to label %227 unwind label %267

227:                                              ; preds = %222
  store ptr %226, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #12
  %228 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %229 unwind label %271

229:                                              ; preds = %227
  store ptr %228, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #12
  %230 = load ptr, ptr %27, align 8, !tbaa !5
  %231 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %230)
          to label %232 unwind label %275

232:                                              ; preds = %229
  store ptr %231, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #12
  %233 = load ptr, ptr %27, align 8, !tbaa !5
  %234 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %233, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %235 unwind label %279

235:                                              ; preds = %232
  store ptr %234, ptr %29, align 8, !tbaa !5
  %236 = load ptr, ptr %29, align 8, !tbaa !5
  %237 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %236, i32 0, i32 0
  %238 = getelementptr inbounds %"struct.tracy::QueueHeader", ptr %237, i32 0, i32 0
  invoke void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %238, i8 noundef zeroext 12)
          to label %239 unwind label %279

239:                                              ; preds = %235
  %240 = load ptr, ptr %29, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %240, i32 0, i32 1
  %242 = getelementptr inbounds %"struct.tracy::QueueCallstackSample", ptr %241, i32 0, i32 0
  %243 = load i64, ptr %23, align 8, !tbaa !15
  invoke void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef %242, i64 noundef %243)
          to label %244 unwind label %279

244:                                              ; preds = %239
  %245 = load ptr, ptr %29, align 8, !tbaa !5
  %246 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %245, i32 0, i32 1
  %247 = getelementptr inbounds %"struct.tracy::QueueCallstackSample", ptr %246, i32 0, i32 1
  %248 = load i32, ptr %22, align 4, !tbaa !9
  invoke void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef %247, i32 noundef %248)
          to label %249 unwind label %279

249:                                              ; preds = %244
  %250 = load ptr, ptr %29, align 8, !tbaa !5
  %251 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %250, i32 0, i32 1
  %252 = getelementptr inbounds %"struct.tracy::QueueCallstackSampleFat", ptr %251, i32 0, i32 1
  %253 = load ptr, ptr %25, align 8, !tbaa !5
  %254 = ptrtoint ptr %253 to i64
  invoke void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef %252, i64 noundef %254)
          to label %255 unwind label %279

255:                                              ; preds = %249
  %256 = load ptr, ptr %28, align 8, !tbaa !5
  %257 = load i64, ptr %26, align 8, !tbaa !15
  %258 = add i64 %257, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %256, i64 noundef %258, i32 noundef 3) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #12
  br label %286

259:                                              ; preds = %189
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %4, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %5, align 4
  br label %294

263:                                              ; preds = %218, %208, %203, %196
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %4, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %5, align 4
  br label %287

267:                                              ; preds = %222
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %4, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %5, align 4
  br label %285

271:                                              ; preds = %227
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %4, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %5, align 4
  br label %284

275:                                              ; preds = %229
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %4, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %5, align 4
  br label %283

279:                                              ; preds = %249, %244, %239, %235, %232
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %4, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #12
  br label %283

283:                                              ; preds = %279, %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #12
  br label %284

284:                                              ; preds = %283, %271
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #12
  br label %285

285:                                              ; preds = %284, %267
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #12
  br label %287

286:                                              ; preds = %255, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #12
  br label %288

287:                                              ; preds = %285, %263
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #12
  br label %294

288:                                              ; preds = %286, %192
  %289 = getelementptr inbounds %struct.perf_event_header, ptr %20, i32 0, i32 2
  %290 = load i16, ptr %289, align 2, !tbaa !20
  %291 = zext i16 %290 to i64
  %292 = load i64, ptr %19, align 8, !tbaa !15
  %293 = add i64 %292, %291
  store i64 %293, ptr %19, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #12
  br label %185, !llvm.loop !21

294:                                              ; preds = %287, %259
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #12
  br label %410

295:                                              ; preds = %185
  br label %389

296:                                              ; preds = %178
  br label %297

297:                                              ; preds = %381, %296
  %298 = load i64, ptr %19, align 8, !tbaa !15
  %299 = load i64, ptr %18, align 8, !tbaa !15
  %300 = icmp ult i64 %298, %299
  br i1 %300, label %301, label %388

301:                                              ; preds = %297
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #12
  %302 = load ptr, ptr %14, align 8, !tbaa !5
  %303 = load i64, ptr %19, align 8, !tbaa !15
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %302, ptr noundef %30, i64 noundef %303, i64 noundef 8)
          to label %304 unwind label %324

304:                                              ; preds = %301
  %305 = getelementptr inbounds %struct.perf_event_header, ptr %30, i32 0, i32 0
  %306 = load i32, ptr %305, align 4, !tbaa !17
  %307 = icmp eq i32 %306, 9
  br i1 %307, label %308, label %381

308:                                              ; preds = %304
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #12
  %309 = load i64, ptr %19, align 8, !tbaa !15
  %310 = add i64 %309, 8
  store i64 %310, ptr %31, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #12
  %311 = load ptr, ptr %14, align 8, !tbaa !5
  %312 = load i64, ptr %31, align 8, !tbaa !15
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %311, ptr noundef %32, i64 noundef %312, i64 noundef 8)
          to label %313 unwind label %328

313:                                              ; preds = %308
  %314 = load i64, ptr %31, align 8, !tbaa !15
  %315 = add i64 %314, 8
  store i64 %315, ptr %31, align 8, !tbaa !15
  %316 = load ptr, ptr %14, align 8, !tbaa !5
  %317 = load i64, ptr %31, align 8, !tbaa !15
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %316, ptr noundef %33, i64 noundef %317, i64 noundef 8)
          to label %318 unwind label %328

318:                                              ; preds = %313
  %319 = load ptr, ptr %14, align 8, !tbaa !5
  %320 = load i64, ptr %33, align 8, !tbaa !15
  %321 = invoke noundef i64 @_ZNK5tracy10RingBuffer16ConvertTimeToTscEl(ptr noundef nonnull align 8 dereferenceable(52) %319, i64 noundef %320)
          to label %322 unwind label %328

322:                                              ; preds = %318
  store i64 %321, ptr %33, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #12
  %323 = load i32, ptr %17, align 4, !tbaa !9
  switch i32 %323, label %338 [
    i32 1, label %332
    i32 2, label %333
    i32 3, label %334
    i32 4, label %335
    i32 5, label %336
    i32 6, label %337
  ]

324:                                              ; preds = %301
  %325 = landingpad { ptr, i32 }
          cleanup
  %326 = extractvalue { ptr, i32 } %325, 0
  store ptr %326, ptr %4, align 8
  %327 = extractvalue { ptr, i32 } %325, 1
  store i32 %327, ptr %5, align 4
  br label %387

328:                                              ; preds = %318, %313, %308
  %329 = landingpad { ptr, i32 }
          cleanup
  %330 = extractvalue { ptr, i32 } %329, 0
  store ptr %330, ptr %4, align 8
  %331 = extractvalue { ptr, i32 } %329, 1
  store i32 %331, ptr %5, align 4
  br label %380

332:                                              ; preds = %322
  store i8 84, ptr %34, align 1, !tbaa !22
  br label %339

333:                                              ; preds = %322
  store i8 85, ptr %34, align 1, !tbaa !22
  br label %339

334:                                              ; preds = %322
  store i8 86, ptr %34, align 1, !tbaa !22
  br label %339

335:                                              ; preds = %322
  store i8 87, ptr %34, align 1, !tbaa !22
  br label %339

336:                                              ; preds = %322
  store i8 88, ptr %34, align 1, !tbaa !22
  br label %339

337:                                              ; preds = %322
  store i8 89, ptr %34, align 1, !tbaa !22
  br label %339

338:                                              ; preds = %322
  call void @abort() #14
  unreachable

339:                                              ; preds = %337, %336, %335, %334, %333, %332
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #12
  %340 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %341 unwind label %366

341:                                              ; preds = %339
  store ptr %340, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #12
  %342 = load ptr, ptr %36, align 8, !tbaa !5
  %343 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %342)
          to label %344 unwind label %370

344:                                              ; preds = %341
  store ptr %343, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #12
  %345 = load ptr, ptr %36, align 8, !tbaa !5
  %346 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %345, ptr noundef nonnull align 8 dereferenceable(8) %35)
          to label %347 unwind label %374

347:                                              ; preds = %344
  store ptr %346, ptr %38, align 8, !tbaa !5
  %348 = load ptr, ptr %38, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %348, i32 0, i32 0
  %350 = getelementptr inbounds %"struct.tracy::QueueHeader", ptr %349, i32 0, i32 0
  %351 = load i8, ptr %34, align 1, !tbaa !22
  invoke void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %350, i8 noundef zeroext %351)
          to label %352 unwind label %374

352:                                              ; preds = %347
  %353 = load ptr, ptr %38, align 8, !tbaa !5
  %354 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %353, i32 0, i32 1
  %355 = getelementptr inbounds %"struct.tracy::QueueHwSample", ptr %354, i32 0, i32 0
  %356 = load i64, ptr %32, align 8, !tbaa !15
  invoke void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef %355, i64 noundef %356)
          to label %357 unwind label %374

357:                                              ; preds = %352
  %358 = load ptr, ptr %38, align 8, !tbaa !5
  %359 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %358, i32 0, i32 1
  %360 = getelementptr inbounds %"struct.tracy::QueueHwSample", ptr %359, i32 0, i32 1
  %361 = load i64, ptr %33, align 8, !tbaa !15
  invoke void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef %360, i64 noundef %361)
          to label %362 unwind label %374

362:                                              ; preds = %357
  %363 = load ptr, ptr %37, align 8, !tbaa !5
  %364 = load i64, ptr %35, align 8, !tbaa !15
  %365 = add i64 %364, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %363, i64 noundef %365, i32 noundef 3) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #12
  br label %381

366:                                              ; preds = %339
  %367 = landingpad { ptr, i32 }
          cleanup
  %368 = extractvalue { ptr, i32 } %367, 0
  store ptr %368, ptr %4, align 8
  %369 = extractvalue { ptr, i32 } %367, 1
  store i32 %369, ptr %5, align 4
  br label %379

370:                                              ; preds = %341
  %371 = landingpad { ptr, i32 }
          cleanup
  %372 = extractvalue { ptr, i32 } %371, 0
  store ptr %372, ptr %4, align 8
  %373 = extractvalue { ptr, i32 } %371, 1
  store i32 %373, ptr %5, align 4
  br label %378

374:                                              ; preds = %357, %352, %347, %344
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %4, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #12
  br label %378

378:                                              ; preds = %374, %370
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #12
  br label %379

379:                                              ; preds = %378, %366
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #12
  br label %380

380:                                              ; preds = %379, %328
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #12
  br label %387

381:                                              ; preds = %362, %304
  %382 = getelementptr inbounds %struct.perf_event_header, ptr %30, i32 0, i32 2
  %383 = load i16, ptr %382, align 2, !tbaa !20
  %384 = zext i16 %383 to i64
  %385 = load i64, ptr %19, align 8, !tbaa !15
  %386 = add i64 %385, %384
  store i64 %386, ptr %19, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #12
  br label %297, !llvm.loop !24

387:                                              ; preds = %380, %324
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #12
  br label %410

388:                                              ; preds = %297
  br label %389

389:                                              ; preds = %388, %295
  %390 = load i64, ptr %19, align 8, !tbaa !15
  %391 = load i64, ptr %18, align 8, !tbaa !15
  %392 = icmp eq i64 %390, %391
  br i1 %392, label %393, label %394

393:                                              ; preds = %389
  br label %396

394:                                              ; preds = %389
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.12, i32 noundef 1298, ptr noundef @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #14
  unreachable

395:                                              ; No predecessors!
  br label %396

396:                                              ; preds = %395, %393
  %397 = load ptr, ptr %14, align 8, !tbaa !5
  %398 = load i64, ptr %18, align 8, !tbaa !15
  invoke void @_ZN5tracy10RingBuffer7AdvanceEm(ptr noundef nonnull align 8 dereferenceable(52) %397, i64 noundef %398)
          to label %399 unwind label %406

399:                                              ; preds = %396
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #12
  store i32 0, ptr %13, align 4
  br label %400

400:                                              ; preds = %399, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #12
  %401 = load i32, ptr %13, align 4
  switch i32 %401, label %1109 [
    i32 0, label %402
    i32 9, label %403
  ]

402:                                              ; preds = %400
  br label %403

403:                                              ; preds = %402, %400
  %404 = load i32, ptr %12, align 4, !tbaa !9
  %405 = add nsw i32 %404, 1
  store i32 %405, ptr %12, align 4, !tbaa !9
  br label %127, !llvm.loop !25

406:                                              ; preds = %396
  %407 = landingpad { ptr, i32 }
          cleanup
  %408 = extractvalue { ptr, i32 } %407, 0
  store ptr %408, ptr %4, align 8
  %409 = extractvalue { ptr, i32 } %407, 1
  store i32 %409, ptr %5, align 4
  br label %410

410:                                              ; preds = %406, %387, %294
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #12
  br label %411

411:                                              ; preds = %410, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #12
  br label %412

412:                                              ; preds = %411, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #12
  br label %413

413:                                              ; preds = %412, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #12
  br label %1080

414:                                              ; preds = %134, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #12
  br label %415

415:                                              ; preds = %414
  %416 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) @_ZN5tracyL11traceActiveE, i32 noundef 0) #12
  br i1 %416, label %418, label %417

417:                                              ; preds = %415
  store i32 5, ptr %13, align 4
  br label %1077

418:                                              ; preds = %415
  %419 = load i32, ptr %7, align 4, !tbaa !9
  %420 = load i32, ptr %9, align 4, !tbaa !9
  %421 = icmp ne i32 %419, %420
  br i1 %421, label %422, label %1063

422:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #12
  %423 = load i32, ptr %9, align 4, !tbaa !9
  %424 = load i32, ptr %7, align 4, !tbaa !9
  %425 = sub nsw i32 %423, %424
  store i32 %425, ptr %39, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #12
  store i32 0, ptr %40, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1024, ptr %41) #12
  call void @llvm.lifetime.start.p0(i64 2048, ptr %42) #12
  call void @llvm.lifetime.start.p0(i64 2048, ptr %43) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #12
  store i32 0, ptr %44, align 4, !tbaa !9
  br label %426

426:                                              ; preds = %484, %422
  %427 = load i32, ptr %44, align 4, !tbaa !9
  %428 = load i32, ptr %39, align 4, !tbaa !9
  %429 = icmp slt i32 %427, %428
  br i1 %429, label %431, label %430

430:                                              ; preds = %426
  store i32 15, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #12
  br label %488

431:                                              ; preds = %426
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #12
  %432 = load i32, ptr %7, align 4, !tbaa !9
  %433 = load i32, ptr %44, align 4, !tbaa !9
  %434 = add nsw i32 %432, %433
  store i32 %434, ptr %45, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #12
  %435 = load ptr, ptr %8, align 8, !tbaa !5
  %436 = load i32, ptr %45, align 4, !tbaa !9
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %435, i64 %437
  %439 = invoke noundef i64 @_ZNK5tracy10RingBuffer8LoadHeadEv(ptr noundef nonnull align 8 dereferenceable(52) %438)
          to label %440 unwind label %471

440:                                              ; preds = %431
  store i64 %439, ptr %46, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #12
  %441 = load ptr, ptr %8, align 8, !tbaa !5
  %442 = load i32, ptr %45, align 4, !tbaa !9
  %443 = sext i32 %442 to i64
  %444 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %441, i64 %443
  %445 = invoke noundef i64 @_ZNK5tracy10RingBuffer7GetTailEv(ptr noundef nonnull align 8 dereferenceable(52) %444)
          to label %446 unwind label %475

446:                                              ; preds = %440
  store i64 %445, ptr %47, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %48) #12
  %447 = load i64, ptr %46, align 8, !tbaa !15
  %448 = load i64, ptr %47, align 8, !tbaa !15
  %449 = icmp ne i64 %447, %448
  %450 = zext i1 %449 to i8
  store i8 %450, ptr %48, align 1, !tbaa !13
  %451 = load i8, ptr %48, align 1, !tbaa !13, !range !26, !noundef !27
  %452 = trunc i8 %451 to i1
  br i1 %452, label %453, label %479

453:                                              ; preds = %446
  %454 = load i32, ptr %44, align 4, !tbaa !9
  %455 = trunc i32 %454 to i16
  %456 = load i32, ptr %40, align 4, !tbaa !9
  %457 = sext i32 %456 to i64
  %458 = getelementptr inbounds [512 x i16], ptr %41, i64 0, i64 %457
  store i16 %455, ptr %458, align 2, !tbaa !28
  %459 = load i32, ptr %40, align 4, !tbaa !9
  %460 = add nsw i32 %459, 1
  store i32 %460, ptr %40, align 4, !tbaa !9
  %461 = load i64, ptr %46, align 8, !tbaa !15
  %462 = load i64, ptr %47, align 8, !tbaa !15
  %463 = sub i64 %461, %462
  %464 = trunc i64 %463 to i32
  %465 = load i32, ptr %44, align 4, !tbaa !9
  %466 = sext i32 %465 to i64
  %467 = getelementptr inbounds [512 x i32], ptr %42, i64 0, i64 %466
  store i32 %464, ptr %467, align 4, !tbaa !9
  %468 = load i32, ptr %44, align 4, !tbaa !9
  %469 = sext i32 %468 to i64
  %470 = getelementptr inbounds [512 x i32], ptr %43, i64 0, i64 %469
  store i32 0, ptr %470, align 4, !tbaa !9
  br label %483

471:                                              ; preds = %431
  %472 = landingpad { ptr, i32 }
          cleanup
  %473 = extractvalue { ptr, i32 } %472, 0
  store ptr %473, ptr %4, align 8
  %474 = extractvalue { ptr, i32 } %472, 1
  store i32 %474, ptr %5, align 4
  br label %487

475:                                              ; preds = %440
  %476 = landingpad { ptr, i32 }
          cleanup
  %477 = extractvalue { ptr, i32 } %476, 0
  store ptr %477, ptr %4, align 8
  %478 = extractvalue { ptr, i32 } %476, 1
  store i32 %478, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #12
  br label %487

479:                                              ; preds = %446
  %480 = load i32, ptr %44, align 4, !tbaa !9
  %481 = sext i32 %480 to i64
  %482 = getelementptr inbounds [512 x i32], ptr %42, i64 0, i64 %481
  store i32 0, ptr %482, align 4, !tbaa !9
  br label %483

483:                                              ; preds = %479, %453
  call void @llvm.lifetime.end.p0(i64 1, ptr %48) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #12
  br label %484

484:                                              ; preds = %483
  %485 = load i32, ptr %44, align 4, !tbaa !9
  %486 = add nsw i32 %485, 1
  store i32 %486, ptr %44, align 4, !tbaa !9
  br label %426, !llvm.loop !29

487:                                              ; preds = %475, %471
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #12
  br label %1062

488:                                              ; preds = %430
  %489 = load i32, ptr %40, align 4, !tbaa !9
  %490 = icmp sgt i32 %489, 0
  br i1 %490, label %491, label %1061

491:                                              ; preds = %488
  store i8 1, ptr %11, align 1, !tbaa !13
  br label %492

492:                                              ; preds = %1025, %491
  %493 = load i32, ptr %40, align 4, !tbaa !9
  %494 = icmp sgt i32 %493, 0
  br i1 %494, label %495, label %1027

495:                                              ; preds = %492
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #12
  store i32 -1, ptr %49, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #12
  %496 = call noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #12
  store i64 %496, ptr %51, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #12
  store i32 0, ptr %52, align 4, !tbaa !9
  br label %497

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

501:                                              ; preds = %497
  store i32 20, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #12
  br label %604

502:                                              ; preds = %497
  call void @llvm.lifetime.start.p0(i64 2, ptr %53) #12
  %503 = load i32, ptr %52, align 4, !tbaa !9
  %504 = sext i32 %503 to i64
  %505 = getelementptr inbounds [512 x i16], ptr %41, i64 0, i64 %504
  %506 = load i16, ptr %505, align 2, !tbaa !28
  store i16 %506, ptr %53, align 2, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #12
  %507 = load i16, ptr %53, align 2, !tbaa !28
  %508 = zext i16 %507 to i64
  %509 = getelementptr inbounds [512 x i32], ptr %43, i64 0, i64 %508
  %510 = load i32, ptr %509, align 4, !tbaa !9
  store i32 %510, ptr %54, align 4, !tbaa !9
  %511 = load i32, ptr %54, align 4, !tbaa !9
  %512 = load i16, ptr %53, align 2, !tbaa !28
  %513 = zext i16 %512 to i64
  %514 = getelementptr inbounds [512 x i32], ptr %42, i64 0, i64 %513
  %515 = load i32, ptr %514, align 4, !tbaa !9
  %516 = icmp ult i32 %511, %515
  br i1 %516, label %517, label %518

517:                                              ; preds = %502
  br label %520

518:                                              ; preds = %502
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.12, i32 noundef 1342, ptr noundef @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #14
  unreachable

519:                                              ; No predecessors!
  br label %520

520:                                              ; preds = %519, %517
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #12
  %521 = load i32, ptr %7, align 4, !tbaa !9
  %522 = load i16, ptr %53, align 2, !tbaa !28
  %523 = zext i16 %522 to i32
  %524 = add nsw i32 %521, %523
  store i32 %524, ptr %55, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #12
  %525 = load ptr, ptr %8, align 8, !tbaa !5
  %526 = load i32, ptr %55, align 4, !tbaa !9
  %527 = sext i32 %526 to i64
  %528 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %525, i64 %527
  %529 = load i32, ptr %54, align 4, !tbaa !9
  %530 = zext i32 %529 to i64
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %528, ptr noundef %56, i64 noundef %530, i64 noundef 8)
          to label %531 unwind label %552

531:                                              ; preds = %520
  %532 = getelementptr inbounds %struct.perf_event_header, ptr %56, i32 0, i32 0
  %533 = load i32, ptr %532, align 4, !tbaa !17
  %534 = icmp eq i32 %533, 9
  br i1 %534, label %535, label %561

535:                                              ; preds = %531
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #12
  %536 = load ptr, ptr %8, align 8, !tbaa !5
  %537 = load i32, ptr %55, align 4, !tbaa !9
  %538 = sext i32 %537 to i64
  %539 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %536, i64 %538
  %540 = load i32, ptr %54, align 4, !tbaa !9
  %541 = zext i32 %540 to i64
  %542 = add i64 %541, 8
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %539, ptr noundef %57, i64 noundef %542, i64 noundef 8)
          to label %543 unwind label %556

543:                                              ; preds = %535
  %544 = load i64, ptr %57, align 8, !tbaa !15
  %545 = load i64, ptr %51, align 8, !tbaa !15
  %546 = icmp slt i64 %544, %545
  br i1 %546, label %547, label %560

547:                                              ; preds = %543
  %548 = load i64, ptr %57, align 8, !tbaa !15
  store i64 %548, ptr %51, align 8, !tbaa !15
  %549 = load i16, ptr %53, align 2, !tbaa !28
  %550 = zext i16 %549 to i32
  store i32 %550, ptr %49, align 4, !tbaa !9
  %551 = load i32, ptr %52, align 4, !tbaa !9
  store i32 %551, ptr %50, align 4, !tbaa !9
  br label %560

552:                                              ; preds = %520
  %553 = landingpad { ptr, i32 }
          cleanup
  %554 = extractvalue { ptr, i32 } %553, 0
  store ptr %554, ptr %4, align 8
  %555 = extractvalue { ptr, i32 } %553, 1
  store i32 %555, ptr %5, align 4
  br label %603

556:                                              ; preds = %535
  %557 = landingpad { ptr, i32 }
          cleanup
  %558 = extractvalue { ptr, i32 } %557, 0
  store ptr %558, ptr %4, align 8
  %559 = extractvalue { ptr, i32 } %557, 1
  store i32 %559, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #12
  br label %603

560:                                              ; preds = %547, %543
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #12
  br label %599

561:                                              ; preds = %531
  %562 = getelementptr inbounds %struct.perf_event_header, ptr %56, i32 0, i32 2
  %563 = load i16, ptr %562, align 2, !tbaa !20
  %564 = zext i16 %563 to i32
  %565 = load i32, ptr %54, align 4, !tbaa !9
  %566 = add i32 %565, %564
  store i32 %566, ptr %54, align 4, !tbaa !9
  %567 = load i32, ptr %54, align 4, !tbaa !9
  %568 = load i16, ptr %53, align 2, !tbaa !28
  %569 = zext i16 %568 to i64
  %570 = getelementptr inbounds [512 x i32], ptr %42, i64 0, i64 %569
  %571 = load i32, ptr %570, align 4, !tbaa !9
  %572 = icmp eq i32 %567, %571
  br i1 %572, label %573, label %593

573:                                              ; preds = %561
  %574 = getelementptr inbounds [512 x i16], ptr %41, i64 0, i64 0
  %575 = load i32, ptr %52, align 4, !tbaa !9
  %576 = sext i32 %575 to i64
  %577 = getelementptr inbounds i16, ptr %574, i64 %576
  %578 = getelementptr inbounds [512 x i16], ptr %41, i64 0, i64 0
  %579 = load i32, ptr %52, align 4, !tbaa !9
  %580 = sext i32 %579 to i64
  %581 = getelementptr inbounds i16, ptr %578, i64 %580
  %582 = getelementptr inbounds i16, ptr %581, i64 1
  %583 = load i32, ptr %40, align 4, !tbaa !9
  %584 = load i32, ptr %52, align 4, !tbaa !9
  %585 = sub nsw i32 %583, %584
  %586 = sub nsw i32 %585, 1
  %587 = sext i32 %586 to i64
  %588 = mul i64 2, %587
  call void @llvm.memmove.p0.p0.i64(ptr align 2 %577, ptr align 2 %582, i64 %588, i1 false)
  %589 = load i32, ptr %40, align 4, !tbaa !9
  %590 = add nsw i32 %589, -1
  store i32 %590, ptr %40, align 4, !tbaa !9
  %591 = load i32, ptr %52, align 4, !tbaa !9
  %592 = add nsw i32 %591, -1
  store i32 %592, ptr %52, align 4, !tbaa !9
  br label %598

593:                                              ; preds = %561
  %594 = load i32, ptr %54, align 4, !tbaa !9
  %595 = load i16, ptr %53, align 2, !tbaa !28
  %596 = zext i16 %595 to i64
  %597 = getelementptr inbounds [512 x i32], ptr %43, i64 0, i64 %596
  store i32 %594, ptr %597, align 4, !tbaa !9
  br label %598

598:                                              ; preds = %593, %573
  br label %599

599:                                              ; preds = %598, %560
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #12
  call void @llvm.lifetime.end.p0(i64 2, ptr %53) #12
  br label %600

600:                                              ; preds = %599
  %601 = load i32, ptr %52, align 4, !tbaa !9
  %602 = add nsw i32 %601, 1
  store i32 %602, ptr %52, align 4, !tbaa !9
  br label %497, !llvm.loop !30

603:                                              ; preds = %556, %552
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #12
  call void @llvm.lifetime.end.p0(i64 2, ptr %53) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #12
  br label %1026

604:                                              ; preds = %501
  %605 = load i32, ptr %49, align 4, !tbaa !9
  %606 = icmp sge i32 %605, 0
  br i1 %606, label %607, label %1025

607:                                              ; preds = %604
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #12
  %608 = load ptr, ptr %8, align 8, !tbaa !5
  %609 = load i32, ptr %7, align 4, !tbaa !9
  %610 = load i32, ptr %49, align 4, !tbaa !9
  %611 = add nsw i32 %609, %610
  %612 = sext i32 %611 to i64
  %613 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %608, i64 %612
  store ptr %613, ptr %58, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #12
  %614 = load i32, ptr %49, align 4, !tbaa !9
  %615 = sext i32 %614 to i64
  %616 = getelementptr inbounds [512 x i32], ptr %43, i64 0, i64 %615
  %617 = load i32, ptr %616, align 4, !tbaa !9
  store i32 %617, ptr %59, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #12
  %618 = load i32, ptr %59, align 4, !tbaa !9
  store i32 %618, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #12
  %619 = load ptr, ptr %58, align 8, !tbaa !5
  %620 = load i32, ptr %60, align 4, !tbaa !9
  %621 = zext i32 %620 to i64
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %619, ptr noundef %61, i64 noundef %621, i64 noundef 8)
          to label %622 unwind label %679

622:                                              ; preds = %607
  %623 = load ptr, ptr %58, align 8, !tbaa !5
  %624 = load i64, ptr %51, align 8, !tbaa !15
  %625 = invoke noundef i64 @_ZNK5tracy10RingBuffer16ConvertTimeToTscEl(ptr noundef nonnull align 8 dereferenceable(52) %623, i64 noundef %624)
          to label %626 unwind label %679

626:                                              ; preds = %622
  store i64 %625, ptr %51, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #12
  %627 = load ptr, ptr %58, align 8, !tbaa !5
  %628 = invoke noundef i32 @_ZNK5tracy10RingBuffer5GetIdEv(ptr noundef nonnull align 8 dereferenceable(52) %627)
          to label %629 unwind label %683

629:                                              ; preds = %626
  store i32 %628, ptr %62, align 4, !tbaa !9
  %630 = load i32, ptr %62, align 4, !tbaa !9
  %631 = icmp eq i32 %630, 8
  br i1 %631, label %632, label %871

632:                                              ; preds = %629
  %633 = load i32, ptr %60, align 4, !tbaa !9
  %634 = zext i32 %633 to i64
  %635 = add i64 %634, 16
  %636 = trunc i64 %635 to i32
  store i32 %636, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #12
  %637 = load ptr, ptr %58, align 8, !tbaa !5
  %638 = load i32, ptr %60, align 4, !tbaa !9
  %639 = zext i32 %638 to i64
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %637, ptr noundef %63, i64 noundef %639, i64 noundef 8)
          to label %640 unwind label %687

640:                                              ; preds = %632
  %641 = load i32, ptr %60, align 4, !tbaa !9
  %642 = zext i32 %641 to i64
  %643 = add i64 %642, 8
  %644 = trunc i64 %643 to i32
  store i32 %644, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #12
  %645 = load i32, ptr %60, align 4, !tbaa !9
  store i32 %645, ptr %64, align 4, !tbaa !9
  %646 = load i64, ptr %63, align 8, !tbaa !15
  %647 = mul i64 8, %646
  %648 = add i64 %647, 4
  %649 = add i64 %648, 8
  %650 = add i64 %649, 16
  %651 = load i32, ptr %60, align 4, !tbaa !9
  %652 = zext i32 %651 to i64
  %653 = add i64 %652, %650
  %654 = trunc i64 %653 to i32
  store i32 %654, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #12
  %655 = load ptr, ptr %58, align 8, !tbaa !5
  %656 = load i32, ptr %60, align 4, !tbaa !9
  %657 = zext i32 %656 to i64
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %655, ptr noundef %65, i64 noundef %657, i64 noundef 4)
          to label %658 unwind label %691

658:                                              ; preds = %640
  %659 = load i32, ptr %60, align 4, !tbaa !9
  %660 = zext i32 %659 to i64
  %661 = add i64 %660, 8
  %662 = trunc i64 %661 to i32
  store i32 %662, ptr %60, align 4, !tbaa !9
  %663 = load ptr, ptr %58, align 8, !tbaa !5
  %664 = load i32, ptr %60, align 4, !tbaa !9
  %665 = zext i32 %664 to i64
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %663, ptr noundef %67, i64 noundef %665, i64 noundef 8)
          to label %666 unwind label %691

666:                                              ; preds = %658
  %667 = load i32, ptr %60, align 4, !tbaa !9
  %668 = zext i32 %667 to i64
  %669 = add i64 %668, 24
  %670 = trunc i64 %669 to i32
  store i32 %670, ptr %60, align 4, !tbaa !9
  %671 = load ptr, ptr %58, align 8, !tbaa !5
  %672 = load i32, ptr %60, align 4, !tbaa !9
  %673 = zext i32 %672 to i64
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %671, ptr noundef %66, i64 noundef %673, i64 noundef 4)
          to label %674 unwind label %691

674:                                              ; preds = %666
  call void @llvm.lifetime.start.p0(i64 1, ptr %68) #12
  store i8 100, ptr %68, align 1, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 1, ptr %69) #12
  %675 = load i64, ptr %67, align 8, !tbaa !15
  %676 = and i64 %675, 1
  %677 = icmp ne i64 %676, 0
  br i1 %677, label %678, label %695

678:                                              ; preds = %674
  store i8 104, ptr %69, align 1, !tbaa !31
  br label %738

679:                                              ; preds = %622, %607
  %680 = landingpad { ptr, i32 }
          cleanup
  %681 = extractvalue { ptr, i32 } %680, 0
  store ptr %681, ptr %4, align 8
  %682 = extractvalue { ptr, i32 } %680, 1
  store i32 %682, ptr %5, align 4
  br label %1024

683:                                              ; preds = %626
  %684 = landingpad { ptr, i32 }
          cleanup
  %685 = extractvalue { ptr, i32 } %684, 0
  store ptr %685, ptr %4, align 8
  %686 = extractvalue { ptr, i32 } %684, 1
  store i32 %686, ptr %5, align 4
  br label %1023

687:                                              ; preds = %632
  %688 = landingpad { ptr, i32 }
          cleanup
  %689 = extractvalue { ptr, i32 } %688, 0
  store ptr %689, ptr %4, align 8
  %690 = extractvalue { ptr, i32 } %688, 1
  store i32 %690, ptr %5, align 4
  br label %870

691:                                              ; preds = %666, %658, %640
  %692 = landingpad { ptr, i32 }
          cleanup
  %693 = extractvalue { ptr, i32 } %692, 0
  store ptr %693, ptr %4, align 8
  %694 = extractvalue { ptr, i32 } %692, 1
  store i32 %694, ptr %5, align 4
  br label %869

695:                                              ; preds = %674
  %696 = load i64, ptr %67, align 8, !tbaa !15
  %697 = and i64 %696, 2
  %698 = icmp ne i64 %697, 0
  br i1 %698, label %699, label %700

699:                                              ; preds = %695
  store i8 101, ptr %69, align 1, !tbaa !31
  br label %737

700:                                              ; preds = %695
  %701 = load i64, ptr %67, align 8, !tbaa !15
  %702 = and i64 %701, 4
  %703 = icmp ne i64 %702, 0
  br i1 %703, label %704, label %705

704:                                              ; preds = %700
  store i8 105, ptr %69, align 1, !tbaa !31
  br label %736

705:                                              ; preds = %700
  %706 = load i64, ptr %67, align 8, !tbaa !15
  %707 = and i64 %706, 8
  %708 = icmp ne i64 %707, 0
  br i1 %708, label %709, label %710

709:                                              ; preds = %705
  store i8 106, ptr %69, align 1, !tbaa !31
  br label %735

710:                                              ; preds = %705
  %711 = load i64, ptr %67, align 8, !tbaa !15
  %712 = and i64 %711, 16
  %713 = icmp ne i64 %712, 0
  br i1 %713, label %714, label %715

714:                                              ; preds = %710
  store i8 108, ptr %69, align 1, !tbaa !31
  br label %734

715:                                              ; preds = %710
  %716 = load i64, ptr %67, align 8, !tbaa !15
  %717 = and i64 %716, 32
  %718 = icmp ne i64 %717, 0
  br i1 %718, label %719, label %720

719:                                              ; preds = %715
  store i8 109, ptr %69, align 1, !tbaa !31
  br label %733

720:                                              ; preds = %715
  %721 = load i64, ptr %67, align 8, !tbaa !15
  %722 = and i64 %721, 64
  %723 = icmp ne i64 %722, 0
  br i1 %723, label %724, label %725

724:                                              ; preds = %720
  store i8 110, ptr %69, align 1, !tbaa !31
  br label %732

725:                                              ; preds = %720
  %726 = load i64, ptr %67, align 8, !tbaa !15
  %727 = and i64 %726, 128
  %728 = icmp ne i64 %727, 0
  br i1 %728, label %729, label %730

729:                                              ; preds = %725
  store i8 102, ptr %69, align 1, !tbaa !31
  br label %731

730:                                              ; preds = %725
  store i8 103, ptr %69, align 1, !tbaa !31
  br label %731

731:                                              ; preds = %730, %729
  br label %732

732:                                              ; preds = %731, %724
  br label %733

733:                                              ; preds = %732, %719
  br label %734

734:                                              ; preds = %733, %714
  br label %735

735:                                              ; preds = %734, %709
  br label %736

736:                                              ; preds = %735, %704
  br label %737

737:                                              ; preds = %736, %699
  br label %738

738:                                              ; preds = %737, %678
  call void @llvm.lifetime.start.p0(i64 8, ptr %70) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %71) #12
  %739 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %740 unwind label %834

740:                                              ; preds = %738
  store ptr %739, ptr %71, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %72) #12
  %741 = load ptr, ptr %71, align 8, !tbaa !5
  %742 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %741)
          to label %743 unwind label %838

743:                                              ; preds = %740
  store ptr %742, ptr %72, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %73) #12
  %744 = load ptr, ptr %71, align 8, !tbaa !5
  %745 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %744, ptr noundef nonnull align 8 dereferenceable(8) %70)
          to label %746 unwind label %842

746:                                              ; preds = %743
  store ptr %745, ptr %73, align 8, !tbaa !5
  %747 = load ptr, ptr %73, align 8, !tbaa !5
  %748 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %747, i32 0, i32 0
  %749 = getelementptr inbounds %"struct.tracy::QueueHeader", ptr %748, i32 0, i32 0
  invoke void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %749, i8 noundef zeroext 46)
          to label %750 unwind label %842

750:                                              ; preds = %746
  %751 = load ptr, ptr %73, align 8, !tbaa !5
  %752 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %751, i32 0, i32 1
  %753 = getelementptr inbounds %"struct.tracy::QueueContextSwitch", ptr %752, i32 0, i32 0
  %754 = load i64, ptr %51, align 8, !tbaa !15
  invoke void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef %753, i64 noundef %754)
          to label %755 unwind label %842

755:                                              ; preds = %750
  %756 = load ptr, ptr %73, align 8, !tbaa !5
  %757 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %756, i32 0, i32 1
  %758 = getelementptr inbounds %"struct.tracy::QueueContextSwitch", ptr %757, i32 0, i32 1
  %759 = load i32, ptr %65, align 4, !tbaa !9
  invoke void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef %758, i32 noundef %759)
          to label %760 unwind label %842

760:                                              ; preds = %755
  %761 = load ptr, ptr %73, align 8, !tbaa !5
  %762 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %761, i32 0, i32 1
  %763 = getelementptr inbounds %"struct.tracy::QueueContextSwitch", ptr %762, i32 0, i32 2
  %764 = load i32, ptr %66, align 4, !tbaa !9
  invoke void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef %763, i32 noundef %764)
          to label %765 unwind label %842

765:                                              ; preds = %760
  %766 = load ptr, ptr %73, align 8, !tbaa !5
  %767 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %766, i32 0, i32 1
  %768 = getelementptr inbounds %"struct.tracy::QueueContextSwitch", ptr %767, i32 0, i32 3
  %769 = load ptr, ptr %58, align 8, !tbaa !5
  %770 = invoke noundef i32 @_ZNK5tracy10RingBuffer6GetCpuEv(ptr noundef nonnull align 8 dereferenceable(52) %769)
          to label %771 unwind label %842

771:                                              ; preds = %765
  %772 = trunc i32 %770 to i8
  invoke void @_ZN5tracy8MemWriteIhEEvPvT_(ptr noundef %768, i8 noundef zeroext %772)
          to label %773 unwind label %842

773:                                              ; preds = %771
  %774 = load ptr, ptr %73, align 8, !tbaa !5
  %775 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %774, i32 0, i32 1
  %776 = getelementptr inbounds %"struct.tracy::QueueContextSwitch", ptr %775, i32 0, i32 4
  %777 = load i8, ptr %68, align 1, !tbaa !31
  invoke void @_ZN5tracy8MemWriteIhEEvPvT_(ptr noundef %776, i8 noundef zeroext %777)
          to label %778 unwind label %842

778:                                              ; preds = %773
  %779 = load ptr, ptr %73, align 8, !tbaa !5
  %780 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %779, i32 0, i32 1
  %781 = getelementptr inbounds %"struct.tracy::QueueContextSwitch", ptr %780, i32 0, i32 5
  %782 = load i8, ptr %69, align 1, !tbaa !31
  invoke void @_ZN5tracy8MemWriteIhEEvPvT_(ptr noundef %781, i8 noundef zeroext %782)
          to label %783 unwind label %842

783:                                              ; preds = %778
  %784 = load ptr, ptr %72, align 8, !tbaa !5
  %785 = load i64, ptr %70, align 8, !tbaa !15
  %786 = add i64 %785, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %784, i64 noundef %786, i32 noundef 3) #12
  %787 = load i64, ptr %63, align 8, !tbaa !15
  %788 = icmp ugt i64 %787, 0
  br i1 %788, label %789, label %865

789:                                              ; preds = %783
  %790 = load i32, ptr %65, align 4, !tbaa !9
  %791 = icmp ne i32 %790, 0
  br i1 %791, label %792, label %865

792:                                              ; preds = %789
  %793 = load i32, ptr %65, align 4, !tbaa !9
  %794 = invoke noundef zeroext i1 @_ZN5tracyL21CurrentProcOwnsThreadEj(i32 noundef %793)
          to label %795 unwind label %842

795:                                              ; preds = %792
  br i1 %794, label %796, label %865

796:                                              ; preds = %795
  call void @llvm.lifetime.start.p0(i64 8, ptr %74) #12
  %797 = load i64, ptr %63, align 8, !tbaa !15
  %798 = load ptr, ptr %58, align 8, !tbaa !5
  %799 = load i32, ptr %64, align 4, !tbaa !9
  %800 = zext i32 %799 to i64
  %801 = invoke noundef ptr @_ZN5tracyL17GetCallstackBlockEmRNS_10RingBufferEm(i64 noundef %797, ptr noundef nonnull align 8 dereferenceable(52) %798, i64 noundef %800)
          to label %802 unwind label %846

802:                                              ; preds = %796
  store ptr %801, ptr %74, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %75) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %76) #12
  %803 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %804 unwind label %850

804:                                              ; preds = %802
  store ptr %803, ptr %76, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %77) #12
  %805 = load ptr, ptr %76, align 8, !tbaa !5
  %806 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %805)
          to label %807 unwind label %854

807:                                              ; preds = %804
  store ptr %806, ptr %77, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %78) #12
  %808 = load ptr, ptr %76, align 8, !tbaa !5
  %809 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %808, ptr noundef nonnull align 8 dereferenceable(8) %75)
          to label %810 unwind label %858

810:                                              ; preds = %807
  store ptr %809, ptr %78, align 8, !tbaa !5
  %811 = load ptr, ptr %78, align 8, !tbaa !5
  %812 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %811, i32 0, i32 0
  %813 = getelementptr inbounds %"struct.tracy::QueueHeader", ptr %812, i32 0, i32 0
  invoke void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %813, i8 noundef zeroext 13)
          to label %814 unwind label %858

814:                                              ; preds = %810
  %815 = load ptr, ptr %78, align 8, !tbaa !5
  %816 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %815, i32 0, i32 1
  %817 = getelementptr inbounds %"struct.tracy::QueueCallstackSample", ptr %816, i32 0, i32 0
  %818 = load i64, ptr %51, align 8, !tbaa !15
  invoke void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef %817, i64 noundef %818)
          to label %819 unwind label %858

819:                                              ; preds = %814
  %820 = load ptr, ptr %78, align 8, !tbaa !5
  %821 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %820, i32 0, i32 1
  %822 = getelementptr inbounds %"struct.tracy::QueueCallstackSample", ptr %821, i32 0, i32 1
  %823 = load i32, ptr %65, align 4, !tbaa !9
  invoke void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef %822, i32 noundef %823)
          to label %824 unwind label %858

824:                                              ; preds = %819
  %825 = load ptr, ptr %78, align 8, !tbaa !5
  %826 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %825, i32 0, i32 1
  %827 = getelementptr inbounds %"struct.tracy::QueueCallstackSampleFat", ptr %826, i32 0, i32 1
  %828 = load ptr, ptr %74, align 8, !tbaa !5
  %829 = ptrtoint ptr %828 to i64
  invoke void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef %827, i64 noundef %829)
          to label %830 unwind label %858

830:                                              ; preds = %824
  %831 = load ptr, ptr %77, align 8, !tbaa !5
  %832 = load i64, ptr %75, align 8, !tbaa !15
  %833 = add i64 %832, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %831, i64 noundef %833, i32 noundef 3) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %78) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %74) #12
  br label %865

834:                                              ; preds = %738
  %835 = landingpad { ptr, i32 }
          cleanup
  %836 = extractvalue { ptr, i32 } %835, 0
  store ptr %836, ptr %4, align 8
  %837 = extractvalue { ptr, i32 } %835, 1
  store i32 %837, ptr %5, align 4
  br label %868

838:                                              ; preds = %740
  %839 = landingpad { ptr, i32 }
          cleanup
  %840 = extractvalue { ptr, i32 } %839, 0
  store ptr %840, ptr %4, align 8
  %841 = extractvalue { ptr, i32 } %839, 1
  store i32 %841, ptr %5, align 4
  br label %867

842:                                              ; preds = %792, %778, %773, %771, %765, %760, %755, %750, %746, %743
  %843 = landingpad { ptr, i32 }
          cleanup
  %844 = extractvalue { ptr, i32 } %843, 0
  store ptr %844, ptr %4, align 8
  %845 = extractvalue { ptr, i32 } %843, 1
  store i32 %845, ptr %5, align 4
  br label %866

846:                                              ; preds = %796
  %847 = landingpad { ptr, i32 }
          cleanup
  %848 = extractvalue { ptr, i32 } %847, 0
  store ptr %848, ptr %4, align 8
  %849 = extractvalue { ptr, i32 } %847, 1
  store i32 %849, ptr %5, align 4
  br label %864

850:                                              ; preds = %802
  %851 = landingpad { ptr, i32 }
          cleanup
  %852 = extractvalue { ptr, i32 } %851, 0
  store ptr %852, ptr %4, align 8
  %853 = extractvalue { ptr, i32 } %851, 1
  store i32 %853, ptr %5, align 4
  br label %863

854:                                              ; preds = %804
  %855 = landingpad { ptr, i32 }
          cleanup
  %856 = extractvalue { ptr, i32 } %855, 0
  store ptr %856, ptr %4, align 8
  %857 = extractvalue { ptr, i32 } %855, 1
  store i32 %857, ptr %5, align 4
  br label %862

858:                                              ; preds = %824, %819, %814, %810, %807
  %859 = landingpad { ptr, i32 }
          cleanup
  %860 = extractvalue { ptr, i32 } %859, 0
  store ptr %860, ptr %4, align 8
  %861 = extractvalue { ptr, i32 } %859, 1
  store i32 %861, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %78) #12
  br label %862

862:                                              ; preds = %858, %854
  call void @llvm.lifetime.end.p0(i64 8, ptr %77) #12
  br label %863

863:                                              ; preds = %862, %850
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %75) #12
  br label %864

864:                                              ; preds = %863, %846
  call void @llvm.lifetime.end.p0(i64 8, ptr %74) #12
  br label %866

865:                                              ; preds = %830, %795, %789, %783
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %69) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %68) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #12
  br label %987

866:                                              ; preds = %864, %842
  call void @llvm.lifetime.end.p0(i64 8, ptr %73) #12
  br label %867

867:                                              ; preds = %866, %838
  call void @llvm.lifetime.end.p0(i64 8, ptr %72) #12
  br label %868

868:                                              ; preds = %867, %834
  call void @llvm.lifetime.end.p0(i64 8, ptr %71) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %70) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %69) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %68) #12
  br label %869

869:                                              ; preds = %868, %691
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #12
  br label %870

870:                                              ; preds = %869, %687
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #12
  br label %1023

871:                                              ; preds = %629
  %872 = load i32, ptr %62, align 4, !tbaa !9
  %873 = icmp eq i32 %872, 9
  br i1 %873, label %874, label %927

874:                                              ; preds = %871
  %875 = load i32, ptr %60, align 4, !tbaa !9
  %876 = zext i32 %875 to i64
  %877 = add i64 %876, 44
  %878 = trunc i64 %877 to i32
  store i32 %878, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #12
  %879 = load ptr, ptr %58, align 8, !tbaa !5
  %880 = load i32, ptr %60, align 4, !tbaa !9
  %881 = zext i32 %880 to i64
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %879, ptr noundef %79, i64 noundef %881, i64 noundef 4)
          to label %882 unwind label %908

882:                                              ; preds = %874
  call void @llvm.lifetime.start.p0(i64 8, ptr %80) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %81) #12
  %883 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %884 unwind label %912

884:                                              ; preds = %882
  store ptr %883, ptr %81, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %82) #12
  %885 = load ptr, ptr %81, align 8, !tbaa !5
  %886 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %885)
          to label %887 unwind label %916

887:                                              ; preds = %884
  store ptr %886, ptr %82, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %83) #12
  %888 = load ptr, ptr %81, align 8, !tbaa !5
  %889 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %888, ptr noundef nonnull align 8 dereferenceable(8) %80)
          to label %890 unwind label %920

890:                                              ; preds = %887
  store ptr %889, ptr %83, align 8, !tbaa !5
  %891 = load ptr, ptr %83, align 8, !tbaa !5
  %892 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %891, i32 0, i32 0
  %893 = getelementptr inbounds %"struct.tracy::QueueHeader", ptr %892, i32 0, i32 0
  invoke void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %893, i8 noundef zeroext 47)
          to label %894 unwind label %920

894:                                              ; preds = %890
  %895 = load ptr, ptr %83, align 8, !tbaa !5
  %896 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %895, i32 0, i32 1
  %897 = getelementptr inbounds %"struct.tracy::QueueThreadWakeup", ptr %896, i32 0, i32 0
  %898 = load i64, ptr %51, align 8, !tbaa !15
  invoke void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef %897, i64 noundef %898)
          to label %899 unwind label %920

899:                                              ; preds = %894
  %900 = load ptr, ptr %83, align 8, !tbaa !5
  %901 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %900, i32 0, i32 1
  %902 = getelementptr inbounds %"struct.tracy::QueueThreadWakeup", ptr %901, i32 0, i32 1
  %903 = load i32, ptr %79, align 4, !tbaa !9
  invoke void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef %902, i32 noundef %903)
          to label %904 unwind label %920

904:                                              ; preds = %899
  %905 = load ptr, ptr %82, align 8, !tbaa !5
  %906 = load i64, ptr %80, align 8, !tbaa !15
  %907 = add i64 %906, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %905, i64 noundef %907, i32 noundef 3) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %83) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %82) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #12
  br label %986

908:                                              ; preds = %874
  %909 = landingpad { ptr, i32 }
          cleanup
  %910 = extractvalue { ptr, i32 } %909, 0
  store ptr %910, ptr %4, align 8
  %911 = extractvalue { ptr, i32 } %909, 1
  store i32 %911, ptr %5, align 4
  br label %926

912:                                              ; preds = %882
  %913 = landingpad { ptr, i32 }
          cleanup
  %914 = extractvalue { ptr, i32 } %913, 0
  store ptr %914, ptr %4, align 8
  %915 = extractvalue { ptr, i32 } %913, 1
  store i32 %915, ptr %5, align 4
  br label %925

916:                                              ; preds = %884
  %917 = landingpad { ptr, i32 }
          cleanup
  %918 = extractvalue { ptr, i32 } %917, 0
  store ptr %918, ptr %4, align 8
  %919 = extractvalue { ptr, i32 } %917, 1
  store i32 %919, ptr %5, align 4
  br label %924

920:                                              ; preds = %899, %894, %890, %887
  %921 = landingpad { ptr, i32 }
          cleanup
  %922 = extractvalue { ptr, i32 } %921, 0
  store ptr %922, ptr %4, align 8
  %923 = extractvalue { ptr, i32 } %921, 1
  store i32 %923, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %83) #12
  br label %924

924:                                              ; preds = %920, %916
  call void @llvm.lifetime.end.p0(i64 8, ptr %82) #12
  br label %925

925:                                              ; preds = %924, %912
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %80) #12
  br label %926

926:                                              ; preds = %925, %908
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #12
  br label %1023

927:                                              ; preds = %871
  %928 = load i32, ptr %62, align 4, !tbaa !9
  %929 = icmp eq i32 %928, 7
  br i1 %929, label %930, label %931

930:                                              ; preds = %927
  br label %933

931:                                              ; preds = %927
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.12, i32 noundef 1478, ptr noundef @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #14
  unreachable

932:                                              ; No predecessors!
  br label %933

933:                                              ; preds = %932, %930
  %934 = load i32, ptr %60, align 4, !tbaa !9
  %935 = zext i32 %934 to i64
  %936 = add i64 %935, 28
  %937 = trunc i64 %936 to i32
  store i32 %937, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %84) #12
  %938 = load ptr, ptr %58, align 8, !tbaa !5
  %939 = load i32, ptr %60, align 4, !tbaa !9
  %940 = zext i32 %939 to i64
  invoke void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %938, ptr noundef %84, i64 noundef %940, i64 noundef 4)
          to label %941 unwind label %967

941:                                              ; preds = %933
  call void @llvm.lifetime.start.p0(i64 8, ptr %85) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %86) #12
  %942 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %943 unwind label %971

943:                                              ; preds = %941
  store ptr %942, ptr %86, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %87) #12
  %944 = load ptr, ptr %86, align 8, !tbaa !5
  %945 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %944)
          to label %946 unwind label %975

946:                                              ; preds = %943
  store ptr %945, ptr %87, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %88) #12
  %947 = load ptr, ptr %86, align 8, !tbaa !5
  %948 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %947, ptr noundef nonnull align 8 dereferenceable(8) %85)
          to label %949 unwind label %979

949:                                              ; preds = %946
  store ptr %948, ptr %88, align 8, !tbaa !5
  %950 = load ptr, ptr %88, align 8, !tbaa !5
  %951 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %950, i32 0, i32 0
  %952 = getelementptr inbounds %"struct.tracy::QueueHeader", ptr %951, i32 0, i32 0
  invoke void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %952, i8 noundef zeroext 70)
          to label %953 unwind label %979

953:                                              ; preds = %949
  %954 = load ptr, ptr %88, align 8, !tbaa !5
  %955 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %954, i32 0, i32 1
  %956 = getelementptr inbounds %"struct.tracy::QueueFrameVsync", ptr %955, i32 0, i32 1
  %957 = load i32, ptr %84, align 4, !tbaa !9
  invoke void @_ZN5tracy8MemWriteIiEEvPvT_(ptr noundef %956, i32 noundef %957)
          to label %958 unwind label %979

958:                                              ; preds = %953
  %959 = load ptr, ptr %88, align 8, !tbaa !5
  %960 = getelementptr inbounds %"struct.tracy::QueueItem", ptr %959, i32 0, i32 1
  %961 = getelementptr inbounds %"struct.tracy::QueueFrameVsync", ptr %960, i32 0, i32 0
  %962 = load i64, ptr %51, align 8, !tbaa !15
  invoke void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef %961, i64 noundef %962)
          to label %963 unwind label %979

963:                                              ; preds = %958
  %964 = load ptr, ptr %87, align 8, !tbaa !5
  %965 = load i64, ptr %85, align 8, !tbaa !15
  %966 = add i64 %965, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %964, i64 noundef %966, i32 noundef 3) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %88) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %87) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %85) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #12
  br label %986

967:                                              ; preds = %933
  %968 = landingpad { ptr, i32 }
          cleanup
  %969 = extractvalue { ptr, i32 } %968, 0
  store ptr %969, ptr %4, align 8
  %970 = extractvalue { ptr, i32 } %968, 1
  store i32 %970, ptr %5, align 4
  br label %985

971:                                              ; preds = %941
  %972 = landingpad { ptr, i32 }
          cleanup
  %973 = extractvalue { ptr, i32 } %972, 0
  store ptr %973, ptr %4, align 8
  %974 = extractvalue { ptr, i32 } %972, 1
  store i32 %974, ptr %5, align 4
  br label %984

975:                                              ; preds = %943
  %976 = landingpad { ptr, i32 }
          cleanup
  %977 = extractvalue { ptr, i32 } %976, 0
  store ptr %977, ptr %4, align 8
  %978 = extractvalue { ptr, i32 } %976, 1
  store i32 %978, ptr %5, align 4
  br label %983

979:                                              ; preds = %958, %953, %949, %946
  %980 = landingpad { ptr, i32 }
          cleanup
  %981 = extractvalue { ptr, i32 } %980, 0
  store ptr %981, ptr %4, align 8
  %982 = extractvalue { ptr, i32 } %980, 1
  store i32 %982, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %88) #12
  br label %983

983:                                              ; preds = %979, %975
  call void @llvm.lifetime.end.p0(i64 8, ptr %87) #12
  br label %984

984:                                              ; preds = %983, %971
  call void @llvm.lifetime.end.p0(i64 8, ptr %86) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %85) #12
  br label %985

985:                                              ; preds = %984, %967
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #12
  br label %1023

986:                                              ; preds = %963, %904
  br label %987

987:                                              ; preds = %986, %865
  %988 = getelementptr inbounds %struct.perf_event_header, ptr %61, i32 0, i32 2
  %989 = load i16, ptr %988, align 2, !tbaa !20
  %990 = zext i16 %989 to i32
  %991 = load i32, ptr %59, align 4, !tbaa !9
  %992 = add i32 %991, %990
  store i32 %992, ptr %59, align 4, !tbaa !9
  %993 = load i32, ptr %59, align 4, !tbaa !9
  %994 = load i32, ptr %49, align 4, !tbaa !9
  %995 = sext i32 %994 to i64
  %996 = getelementptr inbounds [512 x i32], ptr %42, i64 0, i64 %995
  %997 = load i32, ptr %996, align 4, !tbaa !9
  %998 = icmp eq i32 %993, %997
  br i1 %998, label %999, label %1017

999:                                              ; preds = %987
  %1000 = getelementptr inbounds [512 x i16], ptr %41, i64 0, i64 0
  %1001 = load i32, ptr %50, align 4, !tbaa !9
  %1002 = sext i32 %1001 to i64
  %1003 = getelementptr inbounds i16, ptr %1000, i64 %1002
  %1004 = getelementptr inbounds [512 x i16], ptr %41, i64 0, i64 0
  %1005 = load i32, ptr %50, align 4, !tbaa !9
  %1006 = sext i32 %1005 to i64
  %1007 = getelementptr inbounds i16, ptr %1004, i64 %1006
  %1008 = getelementptr inbounds i16, ptr %1007, i64 1
  %1009 = load i32, ptr %40, align 4, !tbaa !9
  %1010 = load i32, ptr %50, align 4, !tbaa !9
  %1011 = sub nsw i32 %1009, %1010
  %1012 = sub nsw i32 %1011, 1
  %1013 = sext i32 %1012 to i64
  %1014 = mul i64 2, %1013
  call void @llvm.memmove.p0.p0.i64(ptr align 2 %1003, ptr align 2 %1008, i64 %1014, i1 false)
  %1015 = load i32, ptr %40, align 4, !tbaa !9
  %1016 = add nsw i32 %1015, -1
  store i32 %1016, ptr %40, align 4, !tbaa !9
  br label %1022

1017:                                             ; preds = %987
  %1018 = load i32, ptr %59, align 4, !tbaa !9
  %1019 = load i32, ptr %49, align 4, !tbaa !9
  %1020 = sext i32 %1019 to i64
  %1021 = getelementptr inbounds [512 x i32], ptr %43, i64 0, i64 %1020
  store i32 %1018, ptr %1021, align 4, !tbaa !9
  br label %1022

1022:                                             ; preds = %1017, %999
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #12
  br label %1025

1023:                                             ; preds = %985, %926, %870, %683
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #12
  br label %1024

1024:                                             ; preds = %1023, %679
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #12
  br label %1026

1025:                                             ; preds = %1022, %604
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #12
  br label %492, !llvm.loop !32

1026:                                             ; preds = %1024, %603
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #12
  br label %1062

1027:                                             ; preds = %492
  call void @llvm.lifetime.start.p0(i64 4, ptr %89) #12
  store i32 0, ptr %89, align 4, !tbaa !9
  br label %1028

1028:                                             ; preds = %1057, %1027
  %1029 = load i32, ptr %89, align 4, !tbaa !9
  %1030 = load i32, ptr %39, align 4, !tbaa !9
  %1031 = icmp slt i32 %1029, %1030
  br i1 %1031, label %1033, label %1032

1032:                                             ; preds = %1028
  store i32 23, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #12
  br label %1060

1033:                                             ; preds = %1028
  %1034 = load i32, ptr %89, align 4, !tbaa !9
  %1035 = sext i32 %1034 to i64
  %1036 = getelementptr inbounds [512 x i32], ptr %42, i64 0, i64 %1035
  %1037 = load i32, ptr %1036, align 4, !tbaa !9
  %1038 = icmp ne i32 %1037, 0
  br i1 %1038, label %1039, label %1056

1039:                                             ; preds = %1033
  %1040 = load ptr, ptr %8, align 8, !tbaa !5
  %1041 = load i32, ptr %7, align 4, !tbaa !9
  %1042 = load i32, ptr %89, align 4, !tbaa !9
  %1043 = add nsw i32 %1041, %1042
  %1044 = sext i32 %1043 to i64
  %1045 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %1040, i64 %1044
  %1046 = load i32, ptr %89, align 4, !tbaa !9
  %1047 = sext i32 %1046 to i64
  %1048 = getelementptr inbounds [512 x i32], ptr %42, i64 0, i64 %1047
  %1049 = load i32, ptr %1048, align 4, !tbaa !9
  %1050 = zext i32 %1049 to i64
  invoke void @_ZN5tracy10RingBuffer7AdvanceEm(ptr noundef nonnull align 8 dereferenceable(52) %1045, i64 noundef %1050)
          to label %1051 unwind label %1052

1051:                                             ; preds = %1039
  br label %1056

1052:                                             ; preds = %1039
  %1053 = landingpad { ptr, i32 }
          cleanup
  %1054 = extractvalue { ptr, i32 } %1053, 0
  store ptr %1054, ptr %4, align 8
  %1055 = extractvalue { ptr, i32 } %1053, 1
  store i32 %1055, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #12
  br label %1062

1056:                                             ; preds = %1051, %1033
  br label %1057

1057:                                             ; preds = %1056
  %1058 = load i32, ptr %89, align 4, !tbaa !9
  %1059 = add nsw i32 %1058, 1
  store i32 %1059, ptr %89, align 4, !tbaa !9
  br label %1028, !llvm.loop !33

1060:                                             ; preds = %1032
  br label %1061

1061:                                             ; preds = %1060, %488
  call void @llvm.lifetime.end.p0(i64 2048, ptr %43) #12
  call void @llvm.lifetime.end.p0(i64 2048, ptr %42) #12
  call void @llvm.lifetime.end.p0(i64 1024, ptr %41) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #12
  br label %1063

1062:                                             ; preds = %1052, %1026, %487
  call void @llvm.lifetime.end.p0(i64 2048, ptr %43) #12
  call void @llvm.lifetime.end.p0(i64 2048, ptr %42) #12
  call void @llvm.lifetime.end.p0(i64 1024, ptr %41) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #12
  br label %1080

1063:                                             ; preds = %1061, %418
  %1064 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) @_ZN5tracyL11traceActiveE, i32 noundef 0) #12
  br i1 %1064, label %1066, label %1065

1065:                                             ; preds = %1063
  store i32 5, ptr %13, align 4
  br label %1077

1066:                                             ; preds = %1063
  %1067 = load i8, ptr %11, align 1, !tbaa !13, !range !26, !noundef !27
  %1068 = trunc i8 %1067 to i1
  br i1 %1068, label %1076, label %1069

1069:                                             ; preds = %1066
  call void @llvm.lifetime.start.p0(i64 8, ptr %90) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %91) #12
  store i32 1, ptr %91, align 4, !tbaa !9
  invoke void @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000EEEC2IivEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 4 dereferenceable(4) %91)
          to label %1070 unwind label %1072

1070:                                             ; preds = %1069
  invoke void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %90)
          to label %1071 unwind label %1072

1071:                                             ; preds = %1070
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %90) #12
  br label %1076

1072:                                             ; preds = %1070, %1069
  %1073 = landingpad { ptr, i32 }
          cleanup
  %1074 = extractvalue { ptr, i32 } %1073, 0
  store ptr %1074, ptr %4, align 8
  %1075 = extractvalue { ptr, i32 } %1073, 1
  store i32 %1075, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %90) #12
  br label %1080

1076:                                             ; preds = %1071, %1066
  store i32 0, ptr %13, align 4
  br label %1077

1077:                                             ; preds = %1076, %1065, %417
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #12
  %1078 = load i32, ptr %13, align 4
  switch i32 %1078, label %1109 [
    i32 0, label %1079
    i32 5, label %1081
  ]

1079:                                             ; preds = %1077
  br label %126, !llvm.loop !34

1080:                                             ; preds = %1072, %1062, %413
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #12
  br label %1102

1081:                                             ; preds = %1077
  call void @llvm.lifetime.start.p0(i64 4, ptr %92) #12
  store i32 0, ptr %92, align 4, !tbaa !9
  br label %1082

1082:                                             ; preds = %1092, %1081
  %1083 = load i32, ptr %92, align 4, !tbaa !9
  %1084 = load i32, ptr %9, align 4, !tbaa !9
  %1085 = icmp slt i32 %1083, %1084
  br i1 %1085, label %1087, label %1086

1086:                                             ; preds = %1082
  store i32 26, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #12
  br label %1095

1087:                                             ; preds = %1082
  %1088 = load ptr, ptr %8, align 8, !tbaa !5
  %1089 = load i32, ptr %92, align 4, !tbaa !9
  %1090 = sext i32 %1089 to i64
  %1091 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %1088, i64 %1090
  call void @_ZN5tracy10RingBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %1091) #12
  br label %1092

1092:                                             ; preds = %1087
  %1093 = load i32, ptr %92, align 4, !tbaa !9
  %1094 = add nsw i32 %1093, 1
  store i32 %1094, ptr %92, align 4, !tbaa !9
  br label %1082, !llvm.loop !35

1095:                                             ; preds = %1086
  %1096 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN5tracyL15tracy_free_fastEPv(ptr noundef %1096)
          to label %1097 unwind label %1098

1097:                                             ; preds = %1095
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #12
  call void @_ZN5tracy17ThreadExitHandlerD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #12
  ret void

1098:                                             ; preds = %1095
  %1099 = landingpad { ptr, i32 }
          cleanup
  %1100 = extractvalue { ptr, i32 } %1099, 0
  store ptr %1100, ptr %4, align 8
  %1101 = extractvalue { ptr, i32 } %1099, 1
  store i32 %1101, ptr %5, align 4
  br label %1102

1102:                                             ; preds = %1098, %1080, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #12
  br label %1103

1103:                                             ; preds = %1102, %99
  call void @_ZN5tracy17ThreadExitHandlerD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #12
  br label %1104

1104:                                             ; preds = %1103
  %1105 = load ptr, ptr %4, align 8
  %1106 = load i32, ptr %5, align 4
  %1107 = insertvalue { ptr, i32 } poison, ptr %1105, 0
  %1108 = insertvalue { ptr, i32 } %1107, i32 %1106, 1
  resume { ptr, i32 } %1108

1109:                                             ; preds = %1077, %400
  unreachable
}

declare void @_ZN5tracy13SetThreadNameEPKc(ptr noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN5tracyL12InitRpmallocEv() #4

; Function Attrs: nounwind
declare i32 @pthread_setschedparam(i64 noundef, i32 noundef, ptr noundef) #5

; Function Attrs: nounwind willreturn memory(none)
declare i64 @pthread_self() #6

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef, i64 noundef, i64 noundef) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK5tracy10RingBuffer16ConvertTimeToTscEl(ptr noundef nonnull align 8 dereferenceable(52), i64 noundef) #7 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN5tracyL17GetCallstackBlockEmRNS_10RingBufferEm(i64 noundef, ptr noundef nonnull align 8 dereferenceable(52), i64 noundef) #2

declare noundef ptr @_ZN5tracy8GetTokenEv() #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136)) #9 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(8)) #10 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef, i8 noundef zeroext) #9

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef, i64 noundef) #9

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef, i32 noundef) #9

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) #9 align 2

; Function Attrs: noreturn nounwind
declare void @abort() #8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5tracy10RingBuffer7AdvanceEm(ptr noundef nonnull align 8 dereferenceable(52), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #7 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef, i64 noundef) #9

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteIhEEvPvT_(ptr noundef, i8 noundef zeroext) #9

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5tracyL21CurrentProcOwnsThreadEj(i32 noundef) #7

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteIiEEvPvT_(ptr noundef, i32 noundef) #9

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8)) #11

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000EEEC2IivEERKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy10RingBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN5tracyL15tracy_free_fastEPv(ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy17ThreadExitHandlerD2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #5 = { 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 #6 = { nounwind willreturn memory(none) "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 #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 = { noreturn 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 #9 = { alwaysinline 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 #10 = { alwaysinline 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 #11 = { inlinehint 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 #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(none) }
attributes #14 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !10, i64 0}
!18 = !{!"_ZTS17perf_event_header", !10, i64 0, !19, i64 4, !19, i64 6}
!19 = !{!"short", !7, i64 0}
!20 = !{!18, !19, i64 6}
!21 = distinct !{!21, !12}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTSN5tracy9QueueTypeE", !7, i64 0}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!19, !19, i64 0}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !12}
!33 = distinct !{!33, !12}
!34 = distinct !{!34, !12}
!35 = distinct !{!35, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%struct.sched_param = type { i32 }
%"class.tracy::ThreadExitHandler" = type { i8 }
%struct.perf_event_header = type { i32, i16, i16 }
%"class.std::chrono::duration" = type { i64 }
%"class.tracy::RingBuffer" = type <{ i32, [4 x i8], i64, ptr, i32, i32, ptr, i64, i32, [4 x i8] }>

@_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
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@__const._ZN5tracy14SysTraceWorkerEPv.sp = external hidden unnamed_addr constant %struct.sched_param, align 4
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [108 x i8], align 1
@__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv = external hidden unnamed_addr constant [35 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [18 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5tracy14SysTraceWorkerEPv(ptr nocapture noundef readnone %0) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.tracy::ThreadExitHandler", align 1
  %3 = alloca %struct.sched_param, align 4
  %4 = alloca %struct.perf_event_header, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %struct.perf_event_header, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca [512 x i16], align 16
  %14 = alloca [512 x i32], align 16
  %15 = alloca [512 x i32], align 16
  %16 = alloca %struct.perf_event_header, align 4
  %17 = alloca i64, align 8
  %18 = alloca %struct.perf_event_header, align 4
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i32, align 4
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  %29 = alloca %"class.std::chrono::duration", align 8
  %30 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #13
  invoke void @_ZN5tracy13SetThreadNameEPKc(ptr noundef nonnull @.str.10)
          to label %31 unwind label %39

31:                                               ; preds = %1
  tail call void @_ZN5tracyL12InitRpmallocEv()
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #13
  %32 = load i32, ptr @__const._ZN5tracy14SysTraceWorkerEPv.sp, align 4
  store i32 %32, ptr %3, align 4
  %33 = tail call i64 @pthread_self() #14
  %34 = call i32 @pthread_setschedparam(i64 noundef %33, i32 noundef 1, ptr noundef nonnull %3) #13
  %35 = load i32, ptr @_ZN5tracyL14s_ctxBufferIdxE, align 4, !tbaa !5
  %36 = load ptr, ptr @_ZN5tracyL6s_ringE, align 8, !tbaa !9
  %37 = load i32, ptr @_ZN5tracyL12s_numBuffersE, align 4, !tbaa !5
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph.preheader, label %.preheader333

.lr.ph.preheader:                                 ; preds = %31
  %wide.trip.count = zext nneg i32 %37 to i64
  br label %.lr.ph

39:                                               ; preds = %1
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %370

.preheader333:                                    ; preds = %.lr.ph, %31
  %41 = icmp sgt i32 %35, 0
  %42 = getelementptr inbounds i8, ptr %9, i64 6
  %43 = getelementptr inbounds i8, ptr %4, i64 6
  %.not = icmp eq i32 %35, %37
  %44 = sub i32 %37, %35
  %45 = icmp sgt i32 %44, 0
  %46 = getelementptr inbounds i8, ptr %16, i64 6
  %47 = getelementptr inbounds i8, ptr %18, i64 6
  %48 = sext i32 %35 to i64
  %wide.trip.count413 = zext nneg i32 %35 to i64
  %wide.trip.count418 = zext nneg i32 %44 to i64
  %invariant.gep = getelementptr %"class.tracy::RingBuffer", ptr %36, i64 %48
  %wide.trip.count423 = zext nneg i32 %44 to i64
  %invariant.gep445 = getelementptr %"class.tracy::RingBuffer", ptr %36, i64 %48
  br label %.backedge

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %49 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %36, i64 %indvars.iv
  call void @_ZN5tracy10RingBuffer6EnableEv(ptr noundef nonnull align 8 dereferenceable(52) %49)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader333, label %.lr.ph, !llvm.loop !11

.backedge:                                        ; preds = %.backedge.backedge, %.preheader333
  %.0266 = phi i32 [ undef, %.preheader333 ], [ %.6272, %.backedge.backedge ]
  br i1 %41, label %.lr.ph374, label %._crit_edge

.lr.ph374:                                        ; preds = %.backedge, %140
  %indvars.iv411 = phi i64 [ %indvars.iv.next412, %140 ], [ 0, %.backedge ]
  %.0245373 = phi i1 [ %.1246, %140 ], [ false, %.backedge ]
  %50 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) @_ZN5tracyL11traceActiveE, i32 noundef 0) #13
  br i1 %50, label %51, label %._crit_edge

51:                                               ; preds = %.lr.ph374
  %52 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %36, i64 %indvars.iv411
  %53 = call noundef i64 @_ZNK5tracy10RingBuffer8LoadHeadEv(ptr noundef nonnull align 8 dereferenceable(52) %52)
  %54 = call noundef i64 @_ZNK5tracy10RingBuffer7GetTailEv(ptr noundef nonnull align 8 dereferenceable(52) %52)
  %55 = icmp eq i64 %53, %54
  br i1 %55, label %140, label %56

56:                                               ; preds = %51
  %57 = icmp ugt i64 %53, %54
  br i1 %57, label %59, label %58

58:                                               ; preds = %56
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12, i32 noundef 1191, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #15
  unreachable

59:                                               ; preds = %56
  %60 = call noundef i32 @_ZNK5tracy10RingBuffer5GetIdEv(ptr noundef nonnull align 8 dereferenceable(52) %52)
  %.not316 = icmp eq i32 %60, 8
  br i1 %.not316, label %61, label %62

61:                                               ; preds = %59
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.12, i32 noundef 1195, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #15
  unreachable

62:                                               ; preds = %59
  %63 = sub i64 %53, %54
  %64 = icmp eq i32 %60, 0
  br i1 %64, label %.lr.ph370, label %.lr.ph367.preheader

.lr.ph367.preheader:                              ; preds = %62
  %65 = icmp ult i32 %60, 7
  %66 = trunc nuw i32 %60 to i8
  %switch.offset = add nuw nsw i8 %66, 83
  br label %.lr.ph367

.lr.ph370:                                        ; preds = %62, %103
  %.0251368 = phi i64 [ %106, %103 ], [ 0, %62 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #13
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %52, ptr noundef nonnull %4, i64 noundef %.0251368, i64 noundef 8)
  %67 = load i32, ptr %4, align 4, !tbaa !13
  %68 = icmp eq i32 %67, 9
  br i1 %68, label %69, label %103

69:                                               ; preds = %.lr.ph370
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #13
  %70 = add i64 %.0251368, 12
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %52, ptr noundef nonnull %5, i64 noundef %70, i64 noundef 4)
  %71 = add i64 %.0251368, 16
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %52, ptr noundef nonnull %6, i64 noundef %71, i64 noundef 8)
  %72 = add i64 %.0251368, 24
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %52, ptr noundef nonnull %7, i64 noundef %72, i64 noundef 8)
  %73 = load i64, ptr %7, align 8, !tbaa !16
  %.not319 = icmp eq i64 %73, 0
  br i1 %.not319, label %102, label %74

74:                                               ; preds = %69
  %75 = add i64 %.0251368, 32
  %76 = load i64, ptr %6, align 8, !tbaa !16
  %77 = call noundef i64 @_ZNK5tracy10RingBuffer16ConvertTimeToTscEl(ptr noundef nonnull align 8 dereferenceable(52) %52, i64 noundef %76)
  store i64 %77, ptr %6, align 8, !tbaa !16
  %78 = load i64, ptr %7, align 8, !tbaa !16
  %79 = invoke noundef ptr @_ZN5tracyL17GetCallstackBlockEmRNS_10RingBufferEm(i64 noundef %78, ptr noundef nonnull align 8 dereferenceable(52) %52, i64 noundef %75)
          to label %80 unwind label %94

80:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #13
  %81 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %82 unwind label %96

82:                                               ; preds = %80
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %81)
  %84 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %81, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %85 unwind label %98

85:                                               ; preds = %82
  call void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %84, i8 noundef zeroext 12)
  %86 = getelementptr inbounds i8, ptr %84, i64 1
  %87 = load i64, ptr %6, align 8, !tbaa !16
  call void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef nonnull %86, i64 noundef %87)
  %88 = getelementptr inbounds i8, ptr %84, i64 9
  %89 = load i32, ptr %5, align 4, !tbaa !5
  call void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef nonnull %88, i32 noundef %89)
  %90 = getelementptr inbounds i8, ptr %84, i64 13
  %91 = ptrtoint ptr %79 to i64
  call void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef nonnull %90, i64 noundef %91)
  %92 = load i64, ptr %8, align 8, !tbaa !16
  %93 = add i64 %92, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %83, i64 noundef %93, i32 noundef 3) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #13
  br label %102

94:                                               ; preds = %74
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %101

96:                                               ; preds = %80
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %100

98:                                               ; preds = %82
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %100

100:                                              ; preds = %98, %96
  %.pn320 = phi { ptr, i32 } [ %99, %98 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #13
  br label %101

101:                                              ; preds = %100, %94
  %.pn320.pn = phi { ptr, i32 } [ %.pn320, %100 ], [ %95, %94 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #13
  br label %368

102:                                              ; preds = %85, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #13
  br label %103

103:                                              ; preds = %102, %.lr.ph370
  %104 = load i16, ptr %43, align 2, !tbaa !18
  %105 = zext i16 %104 to i64
  %106 = add i64 %.0251368, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #13
  %107 = icmp ult i64 %106, %63
  br i1 %107, label %.lr.ph370, label %.loopexit, !llvm.loop !19

.lr.ph367:                                        ; preds = %.lr.ph367.preheader, %132
  %.1252366 = phi i64 [ %135, %132 ], [ 0, %.lr.ph367.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #13
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %52, ptr noundef nonnull %9, i64 noundef %.1252366, i64 noundef 8)
  %108 = load i32, ptr %9, align 4, !tbaa !13
  %109 = icmp eq i32 %108, 9
  br i1 %109, label %110, label %132

110:                                              ; preds = %.lr.ph367
  %111 = add i64 %.1252366, 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #13
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %52, ptr noundef nonnull %10, i64 noundef %111, i64 noundef 8)
  %112 = add i64 %.1252366, 16
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %52, ptr noundef nonnull %11, i64 noundef %112, i64 noundef 8)
  %113 = load i64, ptr %11, align 8, !tbaa !16
  %114 = call noundef i64 @_ZNK5tracy10RingBuffer16ConvertTimeToTscEl(ptr noundef nonnull align 8 dereferenceable(52) %52, i64 noundef %113)
  store i64 %114, ptr %11, align 8, !tbaa !16
  br i1 %65, label %switch.lookup, label %115

115:                                              ; preds = %110
  call void @abort() #15
  unreachable

switch.lookup:                                    ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #13
  %116 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %117 unwind label %127

117:                                              ; preds = %switch.lookup
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %116)
  %119 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %116, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %120 unwind label %129

120:                                              ; preds = %117
  call void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %119, i8 noundef zeroext %switch.offset)
  %121 = getelementptr inbounds i8, ptr %119, i64 1
  %122 = load i64, ptr %10, align 8, !tbaa !16
  call void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef nonnull %121, i64 noundef %122)
  %123 = getelementptr inbounds i8, ptr %119, i64 9
  %124 = load i64, ptr %11, align 8, !tbaa !16
  call void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef nonnull %123, i64 noundef %124)
  %125 = load i64, ptr %12, align 8, !tbaa !16
  %126 = add i64 %125, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %118, i64 noundef %126, i32 noundef 3) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #13
  br label %132

127:                                              ; preds = %switch.lookup
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %131

129:                                              ; preds = %117
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %131

131:                                              ; preds = %129, %127
  %.pn317 = phi { ptr, i32 } [ %130, %129 ], [ %128, %127 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #13
  br label %368

132:                                              ; preds = %120, %.lr.ph367
  %133 = load i16, ptr %42, align 2, !tbaa !18
  %134 = zext i16 %133 to i64
  %135 = add i64 %.1252366, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #13
  %136 = icmp ult i64 %135, %63
  br i1 %136, label %.lr.ph367, label %.loopexit, !llvm.loop !20

.loopexit:                                        ; preds = %132, %103
  %.2253 = phi i64 [ %106, %103 ], [ %135, %132 ]
  %137 = icmp eq i64 %.2253, %63
  br i1 %137, label %139, label %138

138:                                              ; preds = %.loopexit
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.12, i32 noundef 1298, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #15
  unreachable

139:                                              ; preds = %.loopexit
  invoke void @_ZN5tracy10RingBuffer7AdvanceEm(ptr noundef nonnull align 8 dereferenceable(52) %52, i64 noundef %63)
          to label %140 unwind label %141

140:                                              ; preds = %139, %51
  %.1246 = phi i1 [ %.0245373, %51 ], [ true, %139 ]
  %indvars.iv.next412 = add nuw nsw i64 %indvars.iv411, 1
  %exitcond414.not = icmp eq i64 %indvars.iv.next412, %wide.trip.count413
  br i1 %exitcond414.not, label %._crit_edge, label %.lr.ph374, !llvm.loop !21

141:                                              ; preds = %139
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %368

._crit_edge:                                      ; preds = %140, %.lr.ph374, %.backedge
  %.0245.lcssa = phi i1 [ false, %.backedge ], [ %.0245373, %.lr.ph374 ], [ %.1246, %140 ]
  %143 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) @_ZN5tracyL11traceActiveE, i32 noundef 0) #13
  br i1 %143, label %144, label %.preheader

144:                                              ; preds = %._crit_edge
  br i1 %.not, label %361, label %145

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %13) #13
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %14) #13
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %15) #13
  br i1 %45, label %.lr.ph381, label %.loopexit331

._crit_edge382:                                   ; preds = %157
  %146 = icmp sgt i32 %.1256, 0
  br i1 %146, label %.preheader332, label %.loopexit331

.lr.ph381:                                        ; preds = %145, %157
  %indvars.iv415 = phi i64 [ %indvars.iv.next416, %157 ], [ 0, %145 ]
  %.0255379 = phi i32 [ %.1256, %157 ], [ 0, %145 ]
  %gep = getelementptr %"class.tracy::RingBuffer", ptr %invariant.gep, i64 %indvars.iv415
  %147 = call noundef i64 @_ZNK5tracy10RingBuffer8LoadHeadEv(ptr noundef nonnull align 8 dereferenceable(52) %gep)
  %148 = call noundef i64 @_ZNK5tracy10RingBuffer7GetTailEv(ptr noundef nonnull align 8 dereferenceable(52) %gep)
  %.not315 = icmp eq i64 %147, %148
  br i1 %.not315, label %157, label %149

149:                                              ; preds = %.lr.ph381
  %150 = trunc i64 %indvars.iv415 to i16
  %151 = sext i32 %.0255379 to i64
  %152 = getelementptr inbounds [512 x i16], ptr %13, i64 0, i64 %151
  store i16 %150, ptr %152, align 2, !tbaa !22
  %153 = add nsw i32 %.0255379, 1
  %154 = sub i64 %147, %148
  %155 = trunc i64 %154 to i32
  %156 = getelementptr inbounds [512 x i32], ptr %15, i64 0, i64 %indvars.iv415
  store i32 0, ptr %156, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %.lr.ph381, %149
  %.sink = phi i32 [ %155, %149 ], [ 0, %.lr.ph381 ]
  %.1256 = phi i32 [ %153, %149 ], [ %.0255379, %.lr.ph381 ]
  %158 = getelementptr inbounds [512 x i32], ptr %14, i64 0, i64 %indvars.iv415
  store i32 %.sink, ptr %158, align 4
  %indvars.iv.next416 = add nuw nsw i64 %indvars.iv415, 1
  %exitcond419.not = icmp eq i64 %indvars.iv.next416, %wide.trip.count418
  br i1 %exitcond419.not, label %._crit_edge382, label %.lr.ph381, !llvm.loop !23

.preheader330:                                    ; preds = %351
  br i1 %45, label %.lr.ph392, label %.loopexit331

.preheader332:                                    ; preds = %._crit_edge382, %351
  %.2257390 = phi i32 [ %.6261, %351 ], [ %.1256, %._crit_edge382 ]
  %.1267389 = phi i32 [ %.4270, %351 ], [ %.0266, %._crit_edge382 ]
  %159 = call noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() #13
  br label %162

160:                                              ; preds = %199
  %161 = icmp sgt i32 %.2265, -1
  br i1 %161, label %202, label %351

162:                                              ; preds = %.preheader332, %199
  %.3258388 = phi i32 [ %.2257390, %.preheader332 ], [ %.4259, %199 ]
  %.0263387 = phi i32 [ -1, %.preheader332 ], [ %.2265, %199 ]
  %.2268386 = phi i32 [ %.1267389, %.preheader332 ], [ %.4270, %199 ]
  %.0275385 = phi i64 [ %159, %.preheader332 ], [ %.2277, %199 ]
  %.0278384 = phi i32 [ 0, %.preheader332 ], [ %200, %199 ]
  %163 = sext i32 %.0278384 to i64
  %164 = getelementptr inbounds [512 x i16], ptr %13, i64 0, i64 %163
  %165 = load i16, ptr %164, align 2, !tbaa !22
  %166 = zext i16 %165 to i64
  %167 = getelementptr inbounds [512 x i32], ptr %15, i64 0, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = getelementptr inbounds [512 x i32], ptr %14, i64 0, i64 %166
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = icmp ult i32 %168, %170
  br i1 %171, label %173, label %172

172:                                              ; preds = %162
  call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.12, i32 noundef 1342, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #15
  unreachable

173:                                              ; preds = %162
  %174 = zext i16 %165 to i32
  %175 = add nsw i32 %35, %174
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #13
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %36, i64 %176
  %178 = zext i32 %168 to i64
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %177, ptr noundef nonnull %16, i64 noundef %178, i64 noundef 8)
  %179 = load i32, ptr %16, align 4, !tbaa !13
  %180 = icmp eq i32 %179, 9
  br i1 %180, label %181, label %185

181:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #13
  %182 = add nuw nsw i64 %178, 8
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %177, ptr noundef nonnull %17, i64 noundef %182, i64 noundef 8)
  %183 = load i64, ptr %17, align 8, !tbaa !16
  %184 = icmp slt i64 %183, %.0275385
  %.1276 = call i64 @llvm.smin.i64(i64 %183, i64 %.0275385)
  %.3269 = select i1 %184, i32 %.0278384, i32 %.2268386
  %.1264 = select i1 %184, i32 %174, i32 %.0263387
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #13
  br label %199

185:                                              ; preds = %173
  %186 = load i16, ptr %46, align 2, !tbaa !18
  %187 = zext i16 %186 to i32
  %188 = add i32 %168, %187
  %189 = icmp eq i32 %188, %170
  br i1 %189, label %190, label %198

190:                                              ; preds = %185
  %191 = getelementptr inbounds i8, ptr %164, i64 2
  %192 = xor i32 %.0278384, -1
  %193 = add i32 %.3258388, %192
  %194 = sext i32 %193 to i64
  %195 = shl nsw i64 %194, 1
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 2 %164, ptr nonnull align 2 %191, i64 %195, i1 false)
  %196 = add nsw i32 %.3258388, -1
  %197 = add nsw i32 %.0278384, -1
  br label %199

198:                                              ; preds = %185
  store i32 %188, ptr %167, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %190, %198, %181
  %.1279 = phi i32 [ %.0278384, %181 ], [ %197, %190 ], [ %.0278384, %198 ]
  %.2277 = phi i64 [ %.1276, %181 ], [ %.0275385, %190 ], [ %.0275385, %198 ]
  %.4270 = phi i32 [ %.3269, %181 ], [ %.2268386, %190 ], [ %.2268386, %198 ]
  %.2265 = phi i32 [ %.1264, %181 ], [ %.0263387, %190 ], [ %.0263387, %198 ]
  %.4259 = phi i32 [ %.3258388, %181 ], [ %196, %190 ], [ %.3258388, %198 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #13
  %200 = add nsw i32 %.1279, 1
  %201 = icmp slt i32 %200, %.4259
  br i1 %201, label %162, label %160, !llvm.loop !24

202:                                              ; preds = %160
  %203 = add nsw i32 %.2265, %35
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %36, i64 %204
  %206 = zext nneg i32 %.2265 to i64
  %207 = getelementptr inbounds [512 x i32], ptr %15, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #13
  %209 = zext i32 %208 to i64
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %205, ptr noundef nonnull %18, i64 noundef %209, i64 noundef 8)
  %210 = call noundef i64 @_ZNK5tracy10RingBuffer16ConvertTimeToTscEl(ptr noundef nonnull align 8 dereferenceable(52) %205, i64 noundef %.2277)
  %211 = call noundef i32 @_ZNK5tracy10RingBuffer5GetIdEv(ptr noundef nonnull align 8 dereferenceable(52) %205)
  switch i32 %211, label %313 [
    i32 8, label %212
    i32 9, label %295
    i32 7, label %314
  ]

212:                                              ; preds = %202
  %213 = add i32 %208, 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #13
  %214 = zext i32 %213 to i64
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %205, ptr noundef nonnull %19, i64 noundef %214, i64 noundef 8)
  %215 = add i32 %208, 24
  %216 = load i64, ptr %19, align 8, !tbaa !16
  %217 = zext i32 %215 to i64
  %.tr = trunc i64 %216 to i32
  %218 = shl i32 %.tr, 3
  %219 = add i32 %208, 52
  %220 = add i32 %219, %218
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #13
  %221 = zext i32 %220 to i64
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %205, ptr noundef nonnull %20, i64 noundef %221, i64 noundef 4)
  %222 = add i32 %220, 8
  %223 = zext i32 %222 to i64
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %205, ptr noundef nonnull %22, i64 noundef %223, i64 noundef 8)
  %224 = add i32 %220, 32
  %225 = zext i32 %224 to i64
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %205, ptr noundef nonnull %21, i64 noundef %225, i64 noundef 4)
  %226 = load i64, ptr %22, align 8, !tbaa !16
  %227 = and i64 %226, 1
  %.not300 = icmp eq i64 %227, 0
  br i1 %.not300, label %228, label %242

228:                                              ; preds = %212
  %229 = and i64 %226, 2
  %.not301 = icmp eq i64 %229, 0
  br i1 %.not301, label %230, label %242

230:                                              ; preds = %228
  %231 = and i64 %226, 4
  %.not302 = icmp eq i64 %231, 0
  br i1 %.not302, label %232, label %242

232:                                              ; preds = %230
  %233 = and i64 %226, 8
  %.not303 = icmp eq i64 %233, 0
  br i1 %.not303, label %234, label %242

234:                                              ; preds = %232
  %235 = and i64 %226, 16
  %.not304 = icmp eq i64 %235, 0
  br i1 %.not304, label %236, label %242

236:                                              ; preds = %234
  %237 = and i64 %226, 32
  %.not305 = icmp eq i64 %237, 0
  br i1 %.not305, label %238, label %242

238:                                              ; preds = %236
  %239 = and i64 %226, 64
  %.not306 = icmp eq i64 %239, 0
  br i1 %.not306, label %240, label %242

240:                                              ; preds = %238
  %241 = and i64 %226, 128
  %.not307 = icmp eq i64 %241, 0
  %. = select i1 %.not307, i8 103, i8 102
  br label %242

242:                                              ; preds = %240, %238, %236, %234, %232, %230, %228, %212
  %.0274 = phi i8 [ 104, %212 ], [ 101, %228 ], [ 105, %230 ], [ 106, %232 ], [ 108, %234 ], [ 109, %236 ], [ 110, %238 ], [ %., %240 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #13
  %243 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %244 unwind label %282

244:                                              ; preds = %242
  %245 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %243)
  %246 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %243, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %247 unwind label %284

247:                                              ; preds = %244
  call void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %246, i8 noundef zeroext 46)
  %248 = getelementptr inbounds i8, ptr %246, i64 1
  call void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef nonnull %248, i64 noundef %210)
  %249 = getelementptr inbounds i8, ptr %246, i64 9
  %250 = load i32, ptr %20, align 4, !tbaa !5
  call void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef nonnull %249, i32 noundef %250)
  %251 = getelementptr inbounds i8, ptr %246, i64 13
  %252 = load i32, ptr %21, align 4, !tbaa !5
  call void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef nonnull %251, i32 noundef %252)
  %253 = getelementptr inbounds i8, ptr %246, i64 17
  %254 = call noundef i32 @_ZNK5tracy10RingBuffer6GetCpuEv(ptr noundef nonnull align 8 dereferenceable(52) %205)
  %255 = trunc i32 %254 to i8
  call void @_ZN5tracy8MemWriteIhEEvPvT_(ptr noundef nonnull %253, i8 noundef zeroext %255)
  %256 = getelementptr inbounds i8, ptr %246, i64 18
  call void @_ZN5tracy8MemWriteIhEEvPvT_(ptr noundef nonnull %256, i8 noundef zeroext 100)
  %257 = getelementptr inbounds i8, ptr %246, i64 19
  call void @_ZN5tracy8MemWriteIhEEvPvT_(ptr noundef nonnull %257, i8 noundef zeroext %.0274)
  %258 = load i64, ptr %23, align 8, !tbaa !16
  %259 = add i64 %258, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %245, i64 noundef %259, i32 noundef 3) #13
  %260 = load i64, ptr %19, align 8, !tbaa !16
  %261 = icmp ne i64 %260, 0
  %262 = load i32, ptr %20, align 4
  %263 = icmp ne i32 %262, 0
  %or.cond = select i1 %261, i1 %263, i1 false
  br i1 %or.cond, label %264, label %293

264:                                              ; preds = %247
  %265 = call noundef zeroext i1 @_ZN5tracyL21CurrentProcOwnsThreadEj(i32 noundef %262)
  br i1 %265, label %266, label %293

266:                                              ; preds = %264
  %267 = load i64, ptr %19, align 8, !tbaa !16
  %268 = invoke noundef ptr @_ZN5tracyL17GetCallstackBlockEmRNS_10RingBufferEm(i64 noundef %267, ptr noundef nonnull align 8 dereferenceable(52) %205, i64 noundef %217)
          to label %269 unwind label %286

269:                                              ; preds = %266
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #13
  %270 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %271 unwind label %288

271:                                              ; preds = %269
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %270)
  %273 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %270, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %274 unwind label %290

274:                                              ; preds = %271
  call void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %273, i8 noundef zeroext 13)
  %275 = getelementptr inbounds i8, ptr %273, i64 1
  call void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef nonnull %275, i64 noundef %210)
  %276 = getelementptr inbounds i8, ptr %273, i64 9
  %277 = load i32, ptr %20, align 4, !tbaa !5
  call void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef nonnull %276, i32 noundef %277)
  %278 = getelementptr inbounds i8, ptr %273, i64 13
  %279 = ptrtoint ptr %268 to i64
  call void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef nonnull %278, i64 noundef %279)
  %280 = load i64, ptr %24, align 8, !tbaa !16
  %281 = add i64 %280, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %272, i64 noundef %281, i32 noundef 3) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #13
  br label %293

282:                                              ; preds = %242
  %283 = landingpad { ptr, i32 }
          cleanup
  br label %294

284:                                              ; preds = %244
  %285 = landingpad { ptr, i32 }
          cleanup
  br label %294

286:                                              ; preds = %266
  %287 = landingpad { ptr, i32 }
          cleanup
  br label %294

288:                                              ; preds = %269
  %289 = landingpad { ptr, i32 }
          cleanup
  br label %292

290:                                              ; preds = %271
  %291 = landingpad { ptr, i32 }
          cleanup
  br label %292

292:                                              ; preds = %290, %288
  %.pn308 = phi { ptr, i32 } [ %291, %290 ], [ %289, %288 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #13
  br label %294

293:                                              ; preds = %274, %264, %247
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #13
  br label %332

294:                                              ; preds = %284, %292, %286, %282
  %.pn308.pn.pn.pn = phi { ptr, i32 } [ %283, %282 ], [ %285, %284 ], [ %.pn308, %292 ], [ %287, %286 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #13
  br label %350

295:                                              ; preds = %202
  %296 = add i32 %208, 44
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #13
  %297 = zext i32 %296 to i64
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %205, ptr noundef nonnull %25, i64 noundef %297, i64 noundef 4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #13
  %298 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %299 unwind label %308

299:                                              ; preds = %295
  %300 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %298)
  %301 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %298, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %302 unwind label %310

302:                                              ; preds = %299
  call void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %301, i8 noundef zeroext 47)
  %303 = getelementptr inbounds i8, ptr %301, i64 1
  call void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef nonnull %303, i64 noundef %210)
  %304 = getelementptr inbounds i8, ptr %301, i64 9
  %305 = load i32, ptr %25, align 4, !tbaa !5
  call void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef nonnull %304, i32 noundef %305)
  %306 = load i64, ptr %26, align 8, !tbaa !16
  %307 = add i64 %306, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %300, i64 noundef %307, i32 noundef 3) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #13
  br label %332

308:                                              ; preds = %295
  %309 = landingpad { ptr, i32 }
          cleanup
  br label %312

310:                                              ; preds = %299
  %311 = landingpad { ptr, i32 }
          cleanup
  br label %312

312:                                              ; preds = %310, %308
  %.pn298 = phi { ptr, i32 } [ %311, %310 ], [ %309, %308 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #13
  br label %350

313:                                              ; preds = %202
  call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.12, i32 noundef 1478, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5tracy14SysTraceWorkerEPv) #15
  unreachable

314:                                              ; preds = %202
  %315 = add i32 %208, 28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #13
  %316 = zext i32 %315 to i64
  call void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52) %205, ptr noundef nonnull %27, i64 noundef %316, i64 noundef 4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #13
  %317 = invoke noundef ptr @_ZN5tracy8GetTokenEv()
          to label %318 unwind label %327

318:                                              ; preds = %314
  %319 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136) %317)
  %320 = invoke noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136) %317, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %321 unwind label %329

321:                                              ; preds = %318
  call void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef %320, i8 noundef zeroext 70)
  %322 = getelementptr inbounds i8, ptr %320, i64 1
  %323 = getelementptr inbounds i8, ptr %320, i64 9
  %324 = load i32, ptr %27, align 4, !tbaa !5
  call void @_ZN5tracy8MemWriteIiEEvPvT_(ptr noundef nonnull %323, i32 noundef %324)
  call void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef nonnull %322, i64 noundef %210)
  %325 = load i64, ptr %28, align 8, !tbaa !16
  %326 = add i64 %325, 1
  call void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8) %319, i64 noundef %326, i32 noundef 3) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #13
  br label %332

327:                                              ; preds = %314
  %328 = landingpad { ptr, i32 }
          cleanup
  br label %331

329:                                              ; preds = %318
  %330 = landingpad { ptr, i32 }
          cleanup
  br label %331

331:                                              ; preds = %329, %327
  %.pn = phi { ptr, i32 } [ %330, %329 ], [ %328, %327 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #13
  br label %350

332:                                              ; preds = %302, %321, %293
  %333 = load i16, ptr %47, align 2, !tbaa !18
  %334 = zext i16 %333 to i32
  %335 = add i32 %208, %334
  %336 = getelementptr inbounds [512 x i32], ptr %14, i64 0, i64 %206
  %337 = load i32, ptr %336, align 4, !tbaa !5
  %338 = icmp eq i32 %335, %337
  br i1 %338, label %339, label %348

339:                                              ; preds = %332
  %340 = sext i32 %.4270 to i64
  %341 = getelementptr inbounds i16, ptr %13, i64 %340
  %342 = getelementptr inbounds i8, ptr %341, i64 2
  %343 = xor i32 %.4270, -1
  %344 = add i32 %.4259, %343
  %345 = sext i32 %344 to i64
  %346 = shl nsw i64 %345, 1
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 2 %341, ptr nonnull align 2 %342, i64 %346, i1 false)
  %347 = add nsw i32 %.4259, -1
  br label %349

348:                                              ; preds = %332
  store i32 %335, ptr %207, align 4, !tbaa !5
  br label %349

349:                                              ; preds = %348, %339
  %.5260 = phi i32 [ %347, %339 ], [ %.4259, %348 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #13
  br label %351

350:                                              ; preds = %331, %312, %294
  %.pn308.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn308.pn.pn.pn, %294 ], [ %.pn298, %312 ], [ %.pn, %331 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #13
  br label %360

351:                                              ; preds = %349, %160
  %.6261 = phi i32 [ %.5260, %349 ], [ %.4259, %160 ]
  %352 = icmp sgt i32 %.6261, 0
  br i1 %352, label %.preheader332, label %.preheader330, !llvm.loop !25

.lr.ph392:                                        ; preds = %.preheader330, %359
  %indvars.iv420 = phi i64 [ %indvars.iv.next421, %359 ], [ 0, %.preheader330 ]
  %353 = getelementptr inbounds [512 x i32], ptr %14, i64 0, i64 %indvars.iv420
  %354 = load i32, ptr %353, align 4, !tbaa !5
  %.not296 = icmp eq i32 %354, 0
  br i1 %.not296, label %359, label %355

355:                                              ; preds = %.lr.ph392
  %gep446 = getelementptr %"class.tracy::RingBuffer", ptr %invariant.gep445, i64 %indvars.iv420
  %356 = zext i32 %354 to i64
  invoke void @_ZN5tracy10RingBuffer7AdvanceEm(ptr noundef nonnull align 8 dereferenceable(52) %gep446, i64 noundef %356)
          to label %359 unwind label %357

357:                                              ; preds = %355
  %358 = landingpad { ptr, i32 }
          cleanup
  br label %360

359:                                              ; preds = %.lr.ph392, %355
  %indvars.iv.next421 = add nuw nsw i64 %indvars.iv420, 1
  %exitcond424.not = icmp eq i64 %indvars.iv.next421, %wide.trip.count423
  br i1 %exitcond424.not, label %.loopexit331, label %.lr.ph392, !llvm.loop !26

.loopexit331:                                     ; preds = %359, %145, %.preheader330, %._crit_edge382
  %.5271 = phi i32 [ %.0266, %._crit_edge382 ], [ %.4270, %.preheader330 ], [ %.0266, %145 ], [ %.4270, %359 ]
  %.2247 = phi i1 [ %.0245.lcssa, %._crit_edge382 ], [ true, %.preheader330 ], [ %.0245.lcssa, %145 ], [ true, %359 ]
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %15) #13
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %14) #13
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %13) #13
  br label %361

360:                                              ; preds = %357, %350
  %.pn308.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn308.pn.pn.pn.pn, %350 ], [ %358, %357 ]
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %15) #13
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %14) #13
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %13) #13
  br label %368

361:                                              ; preds = %.loopexit331, %144
  %.6272 = phi i32 [ %.5271, %.loopexit331 ], [ %.0266, %144 ]
  %.3248 = phi i1 [ %.2247, %.loopexit331 ], [ %.0245.lcssa, %144 ]
  %362 = call noundef zeroext i1 @_ZNKSt6atomicIbE4loadESt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) @_ZN5tracyL11traceActiveE, i32 noundef 0) #13
  %.not326 = xor i1 %362, true
  %brmerge = select i1 %.not326, i1 true, i1 %.3248
  br i1 %brmerge, label %367, label %363

363:                                              ; preds = %361
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #13
  store i32 1, ptr %30, align 4, !tbaa !5
  call void @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000EEEC2IivEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30)
  invoke void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %364 unwind label %365

364:                                              ; preds = %363
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #13
  br label %.backedge.backedge

365:                                              ; preds = %363
  %366 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #13
  br label %368

367:                                              ; preds = %361
  br i1 %362, label %.backedge.backedge, label %.preheader

.backedge.backedge:                               ; preds = %367, %364
  br label %.backedge

.preheader:                                       ; preds = %._crit_edge, %367
  br i1 %38, label %.lr.ph394.preheader, label %._crit_edge395

.lr.ph394.preheader:                              ; preds = %.preheader
  %wide.trip.count428 = zext nneg i32 %37 to i64
  br label %.lr.ph394

368:                                              ; preds = %101, %131, %141, %365, %360
  %.pn320.pn.pn.pn = phi { ptr, i32 } [ %.pn308.pn.pn.pn.pn.pn, %360 ], [ %366, %365 ], [ %.pn320.pn, %101 ], [ %142, %141 ], [ %.pn317, %131 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #13
  br label %370

._crit_edge395:                                   ; preds = %.lr.ph394, %.preheader
  call void @_ZN5tracyL15tracy_free_fastEPv(ptr noundef %36)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #13
  call void @_ZN5tracy17ThreadExitHandlerD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #13
  ret void

.lr.ph394:                                        ; preds = %.lr.ph394.preheader, %.lr.ph394
  %indvars.iv425 = phi i64 [ 0, %.lr.ph394.preheader ], [ %indvars.iv.next426, %.lr.ph394 ]
  %369 = getelementptr inbounds %"class.tracy::RingBuffer", ptr %36, i64 %indvars.iv425
  call void @_ZN5tracy10RingBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(52) %369) #13
  %indvars.iv.next426 = add nuw nsw i64 %indvars.iv425, 1
  %exitcond429.not = icmp eq i64 %indvars.iv.next426, %wide.trip.count428
  br i1 %exitcond429.not, label %._crit_edge395, label %.lr.ph394, !llvm.loop !27

370:                                              ; preds = %368, %39
  %.pn320.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn320.pn.pn.pn, %368 ], [ %40, %39 ]
  call void @_ZN5tracy17ThreadExitHandlerD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #13
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #13
  resume { ptr, i32 } %.pn320.pn.pn.pn.pn
}

declare void @_ZN5tracy13SetThreadNameEPKc(ptr noundef) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN5tracyL12InitRpmallocEv() local_unnamed_addr #3

; Function Attrs: nounwind
declare i32 @pthread_setschedparam(i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare i64 @pthread_self() local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy10RingBuffer6EnableEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK5tracy10RingBuffer8LoadHeadEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK5tracy10RingBuffer7GetTailEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #6 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5tracy10RingBuffer5GetIdEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy10RingBuffer4ReadEPvmm(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK5tracy10RingBuffer16ConvertTimeToTscEl(ptr noundef nonnull align 8 dereferenceable(52), i64 noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN5tracyL17GetCallstackBlockEmRNS_10RingBufferEm(i64 noundef, ptr noundef nonnull align 8 dereferenceable(52), i64 noundef) local_unnamed_addr #1

declare noundef ptr @_ZN5tracy8GetTokenEv() local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer14get_tail_indexEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN5tracy10moodycamel15ConcurrentQueueINS_9QueueItemENS0_28ConcurrentQueueDefaultTraitsEE16ExplicitProducer13enqueue_beginERm(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #9 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteINS_9QueueTypeEEEvPvT_(ptr noundef, i8 noundef zeroext) local_unnamed_addr #8

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteImEEvPvT_(ptr noundef, i64 noundef) local_unnamed_addr #8

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteIjEEvPvT_(ptr noundef, i32 noundef) local_unnamed_addr #8

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNSt13__atomic_baseImE5storeEmSt12memory_order(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) local_unnamed_addr #8 align 2

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5tracy10RingBuffer7AdvanceEm(ptr noundef nonnull align 8 dereferenceable(52), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsIlE3maxEv() local_unnamed_addr #6 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteIlEEvPvT_(ptr noundef, i64 noundef) local_unnamed_addr #8

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteIhEEvPvT_(ptr noundef, i8 noundef zeroext) local_unnamed_addr #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5tracy10RingBuffer6GetCpuEv(ptr noundef nonnull align 8 dereferenceable(52)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN5tracyL21CurrentProcOwnsThreadEj(i32 noundef) local_unnamed_addr #6

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy8MemWriteIiEEvPvT_(ptr noundef, i32 noundef) local_unnamed_addr #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000EEEEvRKNSt6chrono8durationIT_T0_EE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #11

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6chrono8durationIlSt5ratioILl1ELl1000EEEC2IivEERKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy10RingBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN5tracyL15tracy_free_fastEPv(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5tracy17ThreadExitHandlerD2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #12

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 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 #7 = { noreturn 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 #8 = { alwaysinline 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 #9 = { alwaysinline 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 #10 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #11 = { inlinehint 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 #12 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #13 = { nounwind }
attributes #14 = { nounwind willreturn memory(none) }
attributes #15 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS17perf_event_header", !6, i64 0, !15, i64 4, !15, i64 6}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!14, !15, i64 6}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = !{!15, !15, i64 0}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass