; LLVM IR from mitdbg/deneva :: concurrency_control/maat.ll (ZN9TimeTable4initEmm)

; 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.Stats = type { ptr, ptr, i64, i64, i64, i64 }
%class.mem_alloc = type { i8 }
%class.TimeTable = type { i64, ptr, %union.sem_t }
%union.sem_t = type { i64, [24 x i8] }
%struct.TimeTableNode = type { ptr, ptr, %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 }
%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 }
%struct.TimeTableEntry = type { i64, i64, i64, i32, ptr, ptr }

@simulation = external global ptr, align 8
@stats = external global %class.Stats, align 8
@mem_allocator = external global %class.mem_alloc, align 1

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

declare noundef i64 @_Z13get_sys_clockv() #1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9TimeTable4initEmm(ptr noundef nonnull align 8 dereferenceable(48) %0, i64 noundef %1, i64 noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store i64 %2, ptr %6, align 8, !tbaa !9
  %10 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %11 = load i64, ptr %6, align 8, !tbaa !9
  %12 = call noundef i64 @_ZN9TimeTable4hashEm(ptr noundef nonnull align 8 dereferenceable(48) %10, i64 noundef %11)
  store i64 %12, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %13 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %13, ptr %8, align 8, !tbaa !9
  %14 = getelementptr inbounds %class.TimeTable, ptr %10, i32 0, i32 1
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = load i64, ptr %7, align 8, !tbaa !9
  %17 = getelementptr inbounds %struct.TimeTableNode, ptr %15, i64 %16
  %18 = getelementptr inbounds %struct.TimeTableNode, ptr %17, i32 0, i32 2
  %19 = call i32 @pthread_mutex_lock(ptr noundef %18) #5
  %20 = load ptr, ptr @simulation, align 8, !tbaa !5
  %21 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %20)
  br i1 %21, label %22, label %36

22:                                               ; preds = %3
  %23 = call noundef i64 @_Z13get_sys_clockv()
  %24 = load i64, ptr %8, align 8, !tbaa !9
  %25 = sub i64 %23, %24
  %26 = uitofp i64 %25 to double
  %27 = load ptr, ptr @stats, align 8, !tbaa !13
  %28 = load i64, ptr %5, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %27, i64 %28
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = getelementptr inbounds %class.Stats_thd, ptr %30, i32 0, i32 197
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = getelementptr inbounds double, ptr %32, i64 34
  %34 = load double, ptr %33, align 8, !tbaa !20
  %35 = fadd double %34, %26
  store double %35, ptr %33, align 8, !tbaa !20
  br label %36

36:                                               ; preds = %22, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %37 = load i64, ptr %6, align 8, !tbaa !9
  %38 = call noundef ptr @_ZN9TimeTable4findEm(ptr noundef nonnull align 8 dereferenceable(48) %10, i64 noundef %37)
  store ptr %38, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %93, label %41

41:                                               ; preds = %36
  %42 = call noundef ptr @_ZN9mem_alloc5allocEm(ptr noundef nonnull align 1 dereferenceable(1) @mem_allocator, i64 noundef 48)
  store ptr %42, ptr %9, align 8, !tbaa !5
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN14TimeTableEntry4initEm(ptr noundef nonnull align 8 dereferenceable(48) %43, i64 noundef %44)
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.TimeTableEntry, ptr %45, i32 0, i32 4
  store ptr null, ptr %46, align 8, !tbaa !21
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.TimeTableEntry, ptr %47, i32 0, i32 5
  store ptr null, ptr %48, align 8, !tbaa !24
  %49 = getelementptr inbounds %class.TimeTable, ptr %10, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !11
  %51 = load i64, ptr %7, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.TimeTableNode, ptr %50, i64 %51
  %53 = getelementptr inbounds %struct.TimeTableNode, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !25
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %79

56:                                               ; preds = %41
  %57 = getelementptr inbounds %class.TimeTable, ptr %10, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load i64, ptr %7, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.TimeTableNode, ptr %58, i64 %59
  %61 = getelementptr inbounds %struct.TimeTableNode, ptr %60, i32 0, i32 1
  %62 = load ptr, ptr %61, align 8, !tbaa !25
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.TimeTableEntry, ptr %63, i32 0, i32 5
  store ptr %62, ptr %64, align 8, !tbaa !24
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %class.TimeTable, ptr %10, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = load i64, ptr %7, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.TimeTableNode, ptr %67, i64 %68
  %70 = getelementptr inbounds %struct.TimeTableNode, ptr %69, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = getelementptr inbounds %struct.TimeTableEntry, ptr %71, i32 0, i32 4
  store ptr %65, ptr %72, align 8, !tbaa !21
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %class.TimeTable, ptr %10, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = load i64, ptr %7, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.TimeTableNode, ptr %75, i64 %76
  %78 = getelementptr inbounds %struct.TimeTableNode, ptr %77, i32 0, i32 1
  store ptr %73, ptr %78, align 8, !tbaa !25
  br label %92

79:                                               ; preds = %41
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %class.TimeTable, ptr %10, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = load i64, ptr %7, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.TimeTableNode, ptr %82, i64 %83
  %85 = getelementptr inbounds %struct.TimeTableNode, ptr %84, i32 0, i32 0
  store ptr %80, ptr %85, align 8, !tbaa !27
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %class.TimeTable, ptr %10, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  %89 = load i64, ptr %7, align 8, !tbaa !9
  %90 = getelementptr inbounds %struct.TimeTableNode, ptr %88, i64 %89
  %91 = getelementptr inbounds %struct.TimeTableNode, ptr %90, i32 0, i32 1
  store ptr %86, ptr %91, align 8, !tbaa !25
  br label %92

92:                                               ; preds = %79, %56
  br label %93

93:                                               ; preds = %92, %36
  %94 = getelementptr inbounds %class.TimeTable, ptr %10, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !11
  %96 = load i64, ptr %7, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.TimeTableNode, ptr %95, i64 %96
  %98 = getelementptr inbounds %struct.TimeTableNode, ptr %97, i32 0, i32 2
  %99 = call i32 @pthread_mutex_unlock(ptr noundef %98) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { 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 #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 = { 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 8}
!12 = !{!"_ZTS9TimeTable", !10, i64 0, !6, i64 8, !7, i64 16}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS5Stats", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!15 = !{!16, !6, i64 1888}
!16 = !{!"_ZTS9Stats_thd", !7, i64 0, !6, i64 64, !6, i64 72, !17, 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, !17, i64 184, !10, i64 192, !17, i64 200, !10, i64 208, !17, i64 216, !10, i64 224, !10, i64 232, !17, i64 240, !17, i64 248, !17, i64 256, !17, i64 264, !17, i64 272, !17, i64 280, !17, i64 288, !17, i64 296, !10, i64 304, !17, i64 312, !17, i64 320, !17, i64 328, !17, i64 336, !17, i64 344, !17, i64 352, !17, i64 360, !17, i64 368, !10, i64 376, !10, i64 384, !17, i64 392, !10, i64 400, !17, i64 408, !10, i64 416, !17, i64 424, !17, i64 432, !17, i64 440, !10, i64 448, !10, i64 456, !10, i64 464, !17, i64 472, !17, i64 480, !17, i64 488, !17, i64 496, !17, i64 504, !17, i64 512, !17, i64 520, !17, i64 528, !17, i64 536, !10, i64 544, !6, i64 552, !6, i64 560, !17, i64 568, !10, i64 576, !10, i64 584, !17, i64 592, !17, i64 600, !17, i64 608, !10, i64 616, !10, i64 624, !10, i64 632, !10, i64 640, !10, i64 648, !10, i64 656, !10, i64 664, !17, i64 672, !17, i64 680, !17, 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, !17, i64 768, !17, i64 776, !17, i64 784, !17, i64 792, !17, i64 800, !10, i64 808, !10, i64 816, !17, i64 824, !17, i64 832, !10, i64 840, !10, i64 848, !10, i64 856, !17, i64 864, !17, i64 872, !10, i64 880, !10, i64 888, !17, i64 896, !17, i64 904, !17, i64 912, !17, i64 920, !10, i64 928, !10, i64 936, !17, i64 944, !17, i64 952, !17, i64 960, !10, i64 968, !10, i64 976, !17, i64 984, !17, i64 992, !17, i64 1000, !17, i64 1008, !17, i64 1016, !10, i64 1024, !17, i64 1032, !17, i64 1040, !17, i64 1048, !17, i64 1056, !17, i64 1064, !17, i64 1072, !17, i64 1080, !17, i64 1088, !10, i64 1096, !10, i64 1104, !10, i64 1112, !17, i64 1120, !10, i64 1128, !17, i64 1136, !17, i64 1144, !10, i64 1152, !10, i64 1160, !10, i64 1168, !10, i64 1176, !10, i64 1184, !17, i64 1192, !10, i64 1200, !10, i64 1208, !17, i64 1216, !10, i64 1224, !17, i64 1232, !17, i64 1240, !10, i64 1248, !10, i64 1256, !10, i64 1264, !10, i64 1272, !10, i64 1280, !17, i64 1288, !17, i64 1296, !17, i64 1304, !18, i64 1312, !18, i64 1384, !18, i64 1456, !18, i64 1528, !17, i64 1600, !17, i64 1608, !17, i64 1616, !17, i64 1624, !17, i64 1632, !17, i64 1640, !17, i64 1648, !17, i64 1656, !17, i64 1664, !17, i64 1672, !17, i64 1680, !17, i64 1688, !17, i64 1696, !17, i64 1704, !17, i64 1712, !17, i64 1720, !17, i64 1728, !17, i64 1736, !17, i64 1744, !17, i64 1752, !17, i64 1760, !17, i64 1768, !17, i64 1776, !17, i64 1784, !17, i64 1792, !17, i64 1800, !17, i64 1808, !17, i64 1816, !17, i64 1824, !17, i64 1832, !17, i64 1840, !17, i64 1848, !17, i64 1856, !17, i64 1864, !17, i64 1872, !17, i64 1880, !6, i64 1888, !7, i64 1896}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTS8StatsArr", !6, i64 0, !10, i64 8, !10, i64 16, !19, i64 24, !7, i64 32}
!19 = !{!"_ZTS12StatsArrType", !7, i64 0}
!20 = !{!17, !17, i64 0}
!21 = !{!22, !6, i64 32}
!22 = !{!"_ZTS14TimeTableEntry", !10, i64 0, !10, i64 8, !10, i64 16, !23, i64 24, !6, i64 32, !6, i64 40}
!23 = !{!"_ZTS9MAATState", !7, i64 0}
!24 = !{!22, !6, i64 40}
!25 = !{!26, !6, i64 8}
!26 = !{!"_ZTS13TimeTableNode", !6, i64 0, !6, i64 8, !7, i64 16}
!27 = !{!26, !6, i64 0}


; 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.Stats = type { ptr, ptr, i64, i64, i64, i64 }
%class.mem_alloc = type { i8 }
%struct.TimeTableNode = type { ptr, ptr, %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 }

@simulation = external local_unnamed_addr global ptr, align 8
@stats = external local_unnamed_addr global %class.Stats, align 8
@mem_allocator = external global %class.mem_alloc, align 1

declare noundef i64 @_Z13get_sys_clockv() local_unnamed_addr #0

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

declare noundef ptr @_ZN9mem_alloc5allocEm(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9TimeTable4hashEm(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN9TimeTable4findEm(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9TimeTable4initEmm(ptr noundef nonnull align 8 dereferenceable(48) %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #2 align 2 {
  %4 = tail call noundef i64 @_ZN9TimeTable4hashEm(ptr noundef nonnull align 8 dereferenceable(48) %0, i64 noundef %2)
  %5 = tail call noundef i64 @_Z13get_sys_clockv()
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.TimeTableNode, ptr %7, i64 %4, i32 2
  %9 = tail call i32 @pthread_mutex_lock(ptr noundef nonnull %8) #5
  %10 = load ptr, ptr @simulation, align 8, !tbaa !11
  %11 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %10)
  br i1 %11, label %12, label %24

12:                                               ; preds = %3
  %13 = tail call noundef i64 @_Z13get_sys_clockv()
  %14 = sub i64 %13, %5
  %15 = uitofp i64 %14 to double
  %16 = load ptr, ptr @stats, align 8, !tbaa !12
  %17 = getelementptr inbounds ptr, ptr %16, i64 %1
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %18, i64 1888
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = getelementptr inbounds i8, ptr %20, i64 272
  %22 = load double, ptr %21, align 8, !tbaa !19
  %23 = fadd double %22, %15
  store double %23, ptr %21, align 8, !tbaa !19
  br label %24

24:                                               ; preds = %12, %3
  %25 = tail call noundef ptr @_ZN9TimeTable4findEm(ptr noundef nonnull align 8 dereferenceable(48) %0, i64 noundef %2)
  %.not = icmp eq ptr %25, null
  br i1 %.not, label %26, label %._crit_edge

._crit_edge:                                      ; preds = %24
  %.pre = load ptr, ptr %6, align 8, !tbaa !5
  br label %38

26:                                               ; preds = %24
  %27 = tail call noundef ptr @_ZN9mem_alloc5allocEm(ptr noundef nonnull align 1 dereferenceable(1) @mem_allocator, i64 noundef 48)
  tail call void @_ZN14TimeTableEntry4initEm(ptr noundef nonnull align 8 dereferenceable(48) %27, i64 noundef %2)
  %28 = getelementptr inbounds i8, ptr %27, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %28, i8 0, i64 16, i1 false)
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.TimeTableNode, ptr %29, i64 %4
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  %.not22 = icmp eq ptr %32, null
  %33 = getelementptr inbounds %struct.TimeTableNode, ptr %29, i64 %4, i32 1
  br i1 %.not22, label %37, label %34

34:                                               ; preds = %26
  %35 = getelementptr inbounds i8, ptr %27, i64 40
  store ptr %32, ptr %35, align 8, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %32, i64 32
  store ptr %27, ptr %36, align 8, !tbaa !25
  store ptr %27, ptr %33, align 8, !tbaa !20
  br label %38

37:                                               ; preds = %26
  store ptr %27, ptr %30, align 8, !tbaa !26
  store ptr %27, ptr %33, align 8, !tbaa !20
  br label %38

38:                                               ; preds = %._crit_edge, %34, %37
  %39 = phi ptr [ %.pre, %._crit_edge ], [ %29, %34 ], [ %29, %37 ]
  %40 = getelementptr inbounds %struct.TimeTableNode, ptr %39, i64 %4, i32 2
  %41 = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull %40) #5
  ret void
}

; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) local_unnamed_addr #3

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !10, i64 8}
!6 = !{!"_ZTS9TimeTable", !7, i64 0, !10, i64 8, !8, i64 16}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"_ZTS5Stats", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!14 = !{!15, !10, i64 1888}
!15 = !{!"_ZTS9Stats_thd", !8, i64 0, !10, i64 64, !10, i64 72, !16, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !16, i64 184, !7, i64 192, !16, i64 200, !7, i64 208, !16, i64 216, !7, i64 224, !7, 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, !7, 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, !7, i64 376, !7, i64 384, !16, i64 392, !7, i64 400, !16, i64 408, !7, i64 416, !16, i64 424, !16, i64 432, !16, i64 440, !7, i64 448, !7, i64 456, !7, 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, !7, i64 544, !10, i64 552, !10, i64 560, !16, i64 568, !7, i64 576, !7, i64 584, !16, i64 592, !16, i64 600, !16, i64 608, !7, i64 616, !7, i64 624, !7, i64 632, !7, i64 640, !7, i64 648, !7, i64 656, !7, i64 664, !16, i64 672, !16, i64 680, !16, i64 688, !7, i64 696, !7, i64 704, !7, i64 712, !7, i64 720, !7, i64 728, !7, i64 736, !7, i64 744, !7, i64 752, !7, i64 760, !16, i64 768, !16, i64 776, !16, i64 784, !16, i64 792, !16, i64 800, !7, i64 808, !7, i64 816, !16, i64 824, !16, i64 832, !7, i64 840, !7, i64 848, !7, i64 856, !16, i64 864, !16, i64 872, !7, i64 880, !7, i64 888, !16, i64 896, !16, i64 904, !16, i64 912, !16, i64 920, !7, i64 928, !7, i64 936, !16, i64 944, !16, i64 952, !16, i64 960, !7, i64 968, !7, i64 976, !16, i64 984, !16, i64 992, !16, i64 1000, !16, i64 1008, !16, i64 1016, !7, 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, !7, i64 1096, !7, i64 1104, !7, i64 1112, !16, i64 1120, !7, i64 1128, !16, i64 1136, !16, i64 1144, !7, i64 1152, !7, i64 1160, !7, i64 1168, !7, i64 1176, !7, i64 1184, !16, i64 1192, !7, i64 1200, !7, i64 1208, !16, i64 1216, !7, i64 1224, !16, i64 1232, !16, i64 1240, !7, i64 1248, !7, i64 1256, !7, i64 1264, !7, i64 1272, !7, i64 1280, !16, i64 1288, !16, i64 1296, !16, i64 1304, !17, i64 1312, !17, i64 1384, !17, i64 1456, !17, 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, !10, i64 1888, !8, i64 1896}
!16 = !{!"double", !8, i64 0}
!17 = !{!"_ZTS8StatsArr", !10, i64 0, !7, i64 8, !7, i64 16, !18, i64 24, !8, i64 32}
!18 = !{!"_ZTS12StatsArrType", !8, i64 0}
!19 = !{!16, !16, i64 0}
!20 = !{!21, !10, i64 8}
!21 = !{!"_ZTS13TimeTableNode", !10, i64 0, !10, i64 8, !8, i64 16}
!22 = !{!23, !10, i64 40}
!23 = !{!"_ZTS14TimeTableEntry", !7, i64 0, !7, i64 8, !7, i64 16, !24, i64 24, !10, i64 32, !10, i64 40}
!24 = !{!"_ZTS9MAATState", !8, i64 0}
!25 = !{!23, !10, i64 32}
!26 = !{!21, !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass