; LLVM IR from mitdbg/deneva :: system/work_queue.ll (ZN10QWorkQueue17sequencer_enqueueEmP7Message)

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

%class.mem_alloc = type { i8 }
%class.Stats = type { ptr, ptr, i64, i64, i64, i64 }
%struct.work_queue_entry = type { ptr, i64, i64, i32, i64 }
%class.Message = type { ptr, i32, i64, i64, i64, i64, i64, i64, double, double, double, double, double, double, double }
%class.QWorkQueue = type { ptr, ptr, ptr, ptr, i64, ptr, i64 }
%class.Stats_thd = type { [64 x i8], ptr, ptr, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, double, i64, double, i64, double, i64, i64, double, double, double, double, double, double, double, double, i64, double, double, double, double, double, double, double, double, i64, i64, double, i64, double, i64, double, double, double, i64, i64, i64, double, double, double, double, double, double, double, double, double, i64, ptr, ptr, double, i64, i64, double, double, double, i64, i64, i64, i64, i64, i64, i64, double, double, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, double, double, double, double, double, i64, i64, double, double, i64, i64, i64, double, double, i64, i64, double, double, double, double, i64, i64, double, double, double, i64, i64, double, double, double, double, double, i64, double, double, double, double, double, double, double, double, i64, i64, i64, double, i64, double, double, i64, i64, i64, i64, i64, double, i64, i64, double, i64, double, double, i64, i64, i64, i64, i64, double, double, double, %class.StatsArr, %class.StatsArr, %class.StatsArr, %class.StatsArr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, [64 x i8] }
%class.StatsArr = type { ptr, i64, i64, i32, %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }

@g_node_cnt = external global i32, align 4
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__._ZN10QWorkQueue17sequencer_enqueueEmP7Message = external hidden unnamed_addr constant [56 x i8], align 1
@mem_allocator = external global %class.mem_alloc, align 1
@g_node_id = external global i32, align 4
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@simulation = external global ptr, align 8
@stats = external global %class.Stats, align 8

; 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: mustprogress uwtable
define dso_local void @_ZN10QWorkQueue17sequencer_enqueueEmP7Message(ptr noundef nonnull align 8 dereferenceable(56) %0, i64 noundef %1, ptr noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %9 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %10 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %10, ptr %7, align 8, !tbaa !9
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  br label %16

14:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 40, ptr noundef @__PRETTY_FUNCTION__._ZN10QWorkQueue17sequencer_enqueueEmP7Message) #5
  unreachable

15:                                               ; No predecessors!
  br label %16

16:                                               ; preds = %15, %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %17 = call noundef ptr @_ZN9mem_alloc11align_allocEm(ptr noundef nonnull align 1 dereferenceable(1) @mem_allocator, i64 noundef 40)
  store ptr %17, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.work_queue_entry, ptr %19, i32 0, i32 0
  store ptr %18, ptr %20, align 8, !tbaa !11
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.Message, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 8, !tbaa !14
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.work_queue_entry, ptr %24, i32 0, i32 3
  store i32 %23, ptr %25, align 8, !tbaa !17
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %class.Message, ptr %26, i32 0, i32 2
  %28 = load i64, ptr %27, align 8, !tbaa !18
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.work_queue_entry, ptr %29, i32 0, i32 2
  store i64 %28, ptr %30, align 8, !tbaa !19
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %class.Message, ptr %31, i32 0, i32 3
  %33 = load i64, ptr %32, align 8, !tbaa !20
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.work_queue_entry, ptr %34, i32 0, i32 1
  store i64 %33, ptr %35, align 8, !tbaa !21
  %36 = call noundef i64 @_Z13get_sys_clockv()
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.work_queue_entry, ptr %37, i32 0, i32 4
  store i64 %36, ptr %38, align 8, !tbaa !22
  %39 = load i32, ptr @g_node_id, align 4, !tbaa !23
  %40 = load i32, ptr @g_node_cnt, align 4, !tbaa !23
  %41 = icmp ult i32 %39, %40
  br i1 %41, label %42, label %43

42:                                               ; preds = %16
  br label %45

43:                                               ; preds = %16
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 48, ptr noundef @__PRETTY_FUNCTION__._ZN10QWorkQueue17sequencer_enqueueEmP7Message) #5
  unreachable

44:                                               ; No predecessors!
  br label %45

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

46:                                               ; preds = %56, %45
  %47 = getelementptr inbounds %class.QWorkQueue, ptr %9, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !25
  %49 = call noundef zeroext i1 @_ZN5boost8lockfree5queueIP16work_queue_entryJEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(136) %48, ptr noundef nonnull align 8 dereferenceable(8) %8)
  br i1 %49, label %54, label %50

50:                                               ; preds = %46
  %51 = load ptr, ptr @simulation, align 8, !tbaa !5
  %52 = call noundef zeroext i1 @_ZN10SimManager7is_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %51)
  %53 = xor i1 %52, true
  br label %54

54:                                               ; preds = %50, %46
  %55 = phi i1 [ false, %46 ], [ %53, %50 ]
  br i1 %55, label %56, label %57

56:                                               ; preds = %54
  br label %46, !llvm.loop !27

57:                                               ; preds = %54
  %58 = load ptr, ptr @simulation, align 8, !tbaa !5
  %59 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %58)
  br i1 %59, label %60, label %72

60:                                               ; preds = %57
  %61 = call noundef i64 @_Z13get_sys_clockv()
  %62 = load i64, ptr %7, align 8, !tbaa !9
  %63 = sub i64 %61, %62
  %64 = uitofp i64 %63 to double
  %65 = load ptr, ptr @stats, align 8, !tbaa !29
  %66 = load i64, ptr %5, align 8, !tbaa !9
  %67 = getelementptr inbounds ptr, ptr %65, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.Stats_thd, ptr %68, i32 0, i32 111
  %70 = load double, ptr %69, align 8, !tbaa !31
  %71 = fadd double %70, %64
  store double %71, ptr %69, align 8, !tbaa !31
  br label %72

72:                                               ; preds = %60, %57
  %73 = load ptr, ptr @simulation, align 8, !tbaa !5
  %74 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %73)
  br i1 %74, label %75, label %83

75:                                               ; preds = %72
  %76 = load ptr, ptr @stats, align 8, !tbaa !29
  %77 = load i64, ptr %5, align 8, !tbaa !9
  %78 = getelementptr inbounds ptr, ptr %76, i64 %77
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds %class.Stats_thd, ptr %79, i32 0, i32 110
  %81 = load i64, ptr %80, align 8, !tbaa !35
  %82 = add i64 %81, 1
  store i64 %82, ptr %80, align 8, !tbaa !35
  br label %83

83:                                               ; preds = %75, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret void
}

declare noundef i64 @_Z13get_sys_clockv() #2

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

declare noundef ptr @_ZN9mem_alloc11align_allocEm(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5boost8lockfree5queueIP16work_queue_entryJEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare noundef zeroext i1 @_ZN10SimManager7is_doneEv(ptr noundef nonnull align 8 dereferenceable(96)) #2

declare noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96)) #2

attributes #0 = { 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 = { 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 #4 = { nounwind }
attributes #5 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS16work_queue_entry", !6, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !10, i64 32}
!13 = !{!"_ZTS10RemReqType", !7, i64 0}
!14 = !{!15, !13, i64 8}
!15 = !{!"_ZTS7Message", !13, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112}
!16 = !{!"double", !7, i64 0}
!17 = !{!12, !13, i64 24}
!18 = !{!15, !10, i64 16}
!19 = !{!12, !10, i64 16}
!20 = !{!15, !10, i64 24}
!21 = !{!12, !10, i64 8}
!22 = !{!12, !10, i64 32}
!23 = !{!24, !24, i64 0}
!24 = !{!"int", !7, i64 0}
!25 = !{!26, !6, i64 16}
!26 = !{!"_ZTS10QWorkQueue", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !10, i64 48}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !6, i64 0}
!30 = !{!"_ZTS5Stats", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!31 = !{!32, !16, i64 944}
!32 = !{!"_ZTS9Stats_thd", !7, i64 0, !6, i64 64, !6, i64 72, !16, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !16, i64 184, !10, i64 192, !16, i64 200, !10, i64 208, !16, i64 216, !10, i64 224, !10, i64 232, !16, i64 240, !16, i64 248, !16, i64 256, !16, i64 264, !16, i64 272, !16, i64 280, !16, i64 288, !16, i64 296, !10, i64 304, !16, i64 312, !16, i64 320, !16, i64 328, !16, i64 336, !16, i64 344, !16, i64 352, !16, i64 360, !16, i64 368, !10, i64 376, !10, i64 384, !16, i64 392, !10, i64 400, !16, i64 408, !10, i64 416, !16, i64 424, !16, i64 432, !16, i64 440, !10, i64 448, !10, i64 456, !10, i64 464, !16, i64 472, !16, i64 480, !16, i64 488, !16, i64 496, !16, i64 504, !16, i64 512, !16, i64 520, !16, i64 528, !16, i64 536, !10, i64 544, !6, i64 552, !6, i64 560, !16, i64 568, !10, i64 576, !10, i64 584, !16, i64 592, !16, i64 600, !16, i64 608, !10, i64 616, !10, i64 624, !10, i64 632, !10, i64 640, !10, i64 648, !10, i64 656, !10, i64 664, !16, i64 672, !16, i64 680, !16, i64 688, !10, i64 696, !10, i64 704, !10, i64 712, !10, i64 720, !10, i64 728, !10, i64 736, !10, i64 744, !10, i64 752, !10, i64 760, !16, i64 768, !16, i64 776, !16, i64 784, !16, i64 792, !16, i64 800, !10, i64 808, !10, i64 816, !16, i64 824, !16, i64 832, !10, i64 840, !10, i64 848, !10, i64 856, !16, i64 864, !16, i64 872, !10, i64 880, !10, i64 888, !16, i64 896, !16, i64 904, !16, i64 912, !16, i64 920, !10, i64 928, !10, i64 936, !16, i64 944, !16, i64 952, !16, i64 960, !10, i64 968, !10, i64 976, !16, i64 984, !16, i64 992, !16, i64 1000, !16, i64 1008, !16, i64 1016, !10, i64 1024, !16, i64 1032, !16, i64 1040, !16, i64 1048, !16, i64 1056, !16, i64 1064, !16, i64 1072, !16, i64 1080, !16, i64 1088, !10, i64 1096, !10, i64 1104, !10, i64 1112, !16, i64 1120, !10, i64 1128, !16, i64 1136, !16, i64 1144, !10, i64 1152, !10, i64 1160, !10, i64 1168, !10, i64 1176, !10, i64 1184, !16, i64 1192, !10, i64 1200, !10, i64 1208, !16, i64 1216, !10, i64 1224, !16, i64 1232, !16, i64 1240, !10, i64 1248, !10, i64 1256, !10, i64 1264, !10, i64 1272, !10, i64 1280, !16, i64 1288, !16, i64 1296, !16, i64 1304, !33, i64 1312, !33, i64 1384, !33, i64 1456, !33, i64 1528, !16, i64 1600, !16, i64 1608, !16, i64 1616, !16, i64 1624, !16, i64 1632, !16, i64 1640, !16, i64 1648, !16, i64 1656, !16, i64 1664, !16, i64 1672, !16, i64 1680, !16, i64 1688, !16, i64 1696, !16, i64 1704, !16, i64 1712, !16, i64 1720, !16, i64 1728, !16, i64 1736, !16, i64 1744, !16, i64 1752, !16, i64 1760, !16, i64 1768, !16, i64 1776, !16, i64 1784, !16, i64 1792, !16, i64 1800, !16, i64 1808, !16, i64 1816, !16, i64 1824, !16, i64 1832, !16, i64 1840, !16, i64 1848, !16, i64 1856, !16, i64 1864, !16, i64 1872, !16, i64 1880, !6, i64 1888, !7, i64 1896}
!33 = !{!"_ZTS8StatsArr", !6, i64 0, !10, i64 8, !10, i64 16, !34, i64 24, !7, i64 32}
!34 = !{!"_ZTS12StatsArrType", !7, i64 0}
!35 = !{!32, !10, i64 936}


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

%class.mem_alloc = type { i8 }
%class.Stats = type { ptr, ptr, i64, i64, i64, i64 }

@g_node_cnt = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__._ZN10QWorkQueue17sequencer_enqueueEmP7Message = external hidden unnamed_addr constant [56 x i8], align 1
@mem_allocator = external global %class.mem_alloc, align 1
@g_node_id = external local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@simulation = external local_unnamed_addr global ptr, align 8
@stats = external local_unnamed_addr global %class.Stats, align 8

; 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 @_ZN10QWorkQueue17sequencer_enqueueEmP7Message(ptr nocapture noundef nonnull readonly align 8 dereferenceable(56) %0, i64 noundef %1, ptr noundef %2) local_unnamed_addr #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = tail call noundef i64 @_Z13get_sys_clockv()
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %6, label %7

6:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 40, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN10QWorkQueue17sequencer_enqueueEmP7Message) #4
  unreachable

7:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %8 = tail call noundef ptr @_ZN9mem_alloc11align_allocEm(ptr noundef nonnull align 1 dereferenceable(1) @mem_allocator, i64 noundef 40)
  store ptr %8, ptr %4, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !9
  %9 = getelementptr inbounds i8, ptr %2, i64 8
  %10 = load i32, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %8, i64 24
  store i32 %10, ptr %11, align 8, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %2, i64 16
  %13 = getelementptr inbounds i8, ptr %8, i64 8
  %14 = load <2 x i64>, ptr %12, align 8, !tbaa !17
  %15 = shufflevector <2 x i64> %14, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  store <2 x i64> %15, ptr %13, align 8, !tbaa !17
  %16 = tail call noundef i64 @_Z13get_sys_clockv()
  %17 = getelementptr inbounds i8, ptr %8, i64 32
  store i64 %16, ptr %17, align 8, !tbaa !18
  %18 = load i32, ptr @g_node_id, align 4, !tbaa !19
  %19 = load i32, ptr @g_node_cnt, align 4, !tbaa !19
  %20 = icmp ult i32 %18, %19
  br i1 %20, label %.preheader, label %22

.preheader:                                       ; preds = %7
  %21 = getelementptr inbounds i8, ptr %0, i64 16
  br label %23

22:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 48, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN10QWorkQueue17sequencer_enqueueEmP7Message) #4
  unreachable

23:                                               ; preds = %.preheader, %26
  %24 = load ptr, ptr %21, align 8, !tbaa !21
  %25 = call noundef zeroext i1 @_ZN5boost8lockfree5queueIP16work_queue_entryJEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(136) %24, ptr noundef nonnull align 8 dereferenceable(8) %4)
  br i1 %25, label %.critedge, label %26

26:                                               ; preds = %23
  %27 = load ptr, ptr @simulation, align 8, !tbaa !5
  %28 = call noundef zeroext i1 @_ZN10SimManager7is_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %27)
  br i1 %28, label %.critedge, label %23, !llvm.loop !23

.critedge:                                        ; preds = %23, %26
  %29 = load ptr, ptr @simulation, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %29)
  br i1 %30, label %31, label %41

31:                                               ; preds = %.critedge
  %32 = call noundef i64 @_Z13get_sys_clockv()
  %33 = sub i64 %32, %5
  %34 = uitofp i64 %33 to double
  %35 = load ptr, ptr @stats, align 8, !tbaa !25
  %36 = getelementptr inbounds ptr, ptr %35, i64 %1
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 944
  %39 = load double, ptr %38, align 8, !tbaa !27
  %40 = fadd double %39, %34
  store double %40, ptr %38, align 8, !tbaa !27
  br label %41

41:                                               ; preds = %31, %.critedge
  %42 = load ptr, ptr @simulation, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %42)
  br i1 %43, label %44, label %51

44:                                               ; preds = %41
  %45 = load ptr, ptr @stats, align 8, !tbaa !25
  %46 = getelementptr inbounds ptr, ptr %45, i64 %1
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 936
  %49 = load i64, ptr %48, align 8, !tbaa !31
  %50 = add i64 %49, 1
  store i64 %50, ptr %48, align 8, !tbaa !31
  br label %51

51:                                               ; preds = %44, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret void
}

declare noundef i64 @_Z13get_sys_clockv() local_unnamed_addr #2

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

declare noundef ptr @_ZN9mem_alloc11align_allocEm(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5boost8lockfree5queueIP16work_queue_entryJEE4pushERKS3_(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN10SimManager7is_doneEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #2

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 = { 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 #4 = { noreturn nounwind }
attributes #5 = { 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, !6, i64 0}
!10 = !{!"_ZTS16work_queue_entry", !6, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !11, i64 32}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTS10RemReqType", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"_ZTS7Message", !12, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112}
!15 = !{!"double", !7, i64 0}
!16 = !{!10, !12, i64 24}
!17 = !{!11, !11, i64 0}
!18 = !{!10, !11, i64 32}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !6, i64 16}
!22 = !{!"_ZTS10QWorkQueue", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !11, i64 48}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !6, i64 0}
!26 = !{!"_ZTS5Stats", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40}
!27 = !{!28, !15, i64 944}
!28 = !{!"_ZTS9Stats_thd", !7, i64 0, !6, i64 64, !6, i64 72, !15, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !15, i64 184, !11, i64 192, !15, i64 200, !11, i64 208, !15, i64 216, !11, i64 224, !11, i64 232, !15, i64 240, !15, i64 248, !15, i64 256, !15, i64 264, !15, i64 272, !15, i64 280, !15, i64 288, !15, i64 296, !11, i64 304, !15, i64 312, !15, i64 320, !15, i64 328, !15, i64 336, !15, i64 344, !15, i64 352, !15, i64 360, !15, i64 368, !11, i64 376, !11, i64 384, !15, i64 392, !11, i64 400, !15, i64 408, !11, i64 416, !15, i64 424, !15, i64 432, !15, i64 440, !11, i64 448, !11, i64 456, !11, i64 464, !15, i64 472, !15, i64 480, !15, i64 488, !15, i64 496, !15, i64 504, !15, i64 512, !15, i64 520, !15, i64 528, !15, i64 536, !11, i64 544, !6, i64 552, !6, i64 560, !15, i64 568, !11, i64 576, !11, i64 584, !15, i64 592, !15, i64 600, !15, i64 608, !11, i64 616, !11, i64 624, !11, i64 632, !11, i64 640, !11, i64 648, !11, i64 656, !11, i64 664, !15, i64 672, !15, i64 680, !15, i64 688, !11, i64 696, !11, i64 704, !11, i64 712, !11, i64 720, !11, i64 728, !11, i64 736, !11, i64 744, !11, i64 752, !11, i64 760, !15, i64 768, !15, i64 776, !15, i64 784, !15, i64 792, !15, i64 800, !11, i64 808, !11, i64 816, !15, i64 824, !15, i64 832, !11, i64 840, !11, i64 848, !11, i64 856, !15, i64 864, !15, i64 872, !11, i64 880, !11, i64 888, !15, i64 896, !15, i64 904, !15, i64 912, !15, i64 920, !11, i64 928, !11, i64 936, !15, i64 944, !15, i64 952, !15, i64 960, !11, i64 968, !11, i64 976, !15, i64 984, !15, i64 992, !15, i64 1000, !15, i64 1008, !15, i64 1016, !11, i64 1024, !15, i64 1032, !15, i64 1040, !15, i64 1048, !15, i64 1056, !15, i64 1064, !15, i64 1072, !15, i64 1080, !15, i64 1088, !11, i64 1096, !11, i64 1104, !11, i64 1112, !15, i64 1120, !11, i64 1128, !15, i64 1136, !15, i64 1144, !11, i64 1152, !11, i64 1160, !11, i64 1168, !11, i64 1176, !11, i64 1184, !15, i64 1192, !11, i64 1200, !11, i64 1208, !15, i64 1216, !11, i64 1224, !15, i64 1232, !15, i64 1240, !11, i64 1248, !11, i64 1256, !11, i64 1264, !11, i64 1272, !11, i64 1280, !15, i64 1288, !15, i64 1296, !15, i64 1304, !29, i64 1312, !29, i64 1384, !29, i64 1456, !29, i64 1528, !15, i64 1600, !15, i64 1608, !15, i64 1616, !15, i64 1624, !15, i64 1632, !15, i64 1640, !15, i64 1648, !15, i64 1656, !15, i64 1664, !15, i64 1672, !15, i64 1680, !15, i64 1688, !15, i64 1696, !15, i64 1704, !15, i64 1712, !15, i64 1720, !15, i64 1728, !15, i64 1736, !15, i64 1744, !15, i64 1752, !15, i64 1760, !15, i64 1768, !15, i64 1776, !15, i64 1784, !15, i64 1792, !15, i64 1800, !15, i64 1808, !15, i64 1816, !15, i64 1824, !15, i64 1832, !15, i64 1840, !15, i64 1848, !15, i64 1856, !15, i64 1864, !15, i64 1872, !15, i64 1880, !6, i64 1888, !7, i64 1896}
!29 = !{!"_ZTS8StatsArr", !6, i64 0, !11, i64 8, !11, i64 16, !30, i64 24, !7, i64 32}
!30 = !{!"_ZTS12StatsArrType", !7, i64 0}
!31 = !{!28, !11, i64 936}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass