; LLVM IR from mitdbg/deneva :: system/txn.ll (ZN10TxnManager7get_rowEP5row_t8access_tRS1_)

; 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.AccessPool = type { ptr, ptr }
%class.TxnManager = type { ptr, ptr, ptr, i8, ptr, i32, i8, i32, i32, i8, i64, i64, i64, i64, ptr, ptr, ptr, i64, i8, i8, ptr, ptr, i64, i64, i64, %class.TxnStats, i32, i32, i32, i8, i32, %class.Array.0, i32, ptr, ptr, i32, %union.sem_t }
%class.TxnStats = type { i64, i64, i64, i64, i64, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i64, i64, double, double, double, double, double, double, double, double }
%class.Array.0 = type { ptr, i64, i64 }
%union.sem_t = type { i64, [24 x i8] }
%class.Access = type { i32, ptr, 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 }
%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.Transaction = type <{ %class.Array, i64, i64, i64, i64, i64, i32, [4 x i8], %class.Array.0, i64, i64, i32, [4 x i8] }>
%class.Array = type { ptr, i64, i64 }

@simulation = external global ptr, align 8
@stats = external global %class.Stats, align 8
@access_pool = external global %class.AccessPool, align 8

declare noundef i64 @_Z13get_sys_clockv() #0

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

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

declare void @_ZN10AccessPool3putEmP6Access(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN10TxnManager7get_rowEP5row_t8access_tRS1_(ptr noundef nonnull align 8 dereferenceable(544) %0, ptr noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #2 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %16 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %16, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %17 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %15)
  call void @_ZN10AccessPool3getEmRP6Access(ptr noundef nonnull align 8 dereferenceable(16) @access_pool, i64 noundef %17, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %class.TxnManager, ptr %15, i32 0, i32 33
  store ptr %18, ptr %19, align 8, !tbaa !15
  %20 = load i32, ptr %8, align 4, !tbaa !9
  %21 = getelementptr inbounds %class.TxnManager, ptr %15, i32 0, i32 35
  store i32 %20, ptr %21, align 8, !tbaa !23
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = load i32, ptr %8, align 4, !tbaa !9
  %24 = load ptr, ptr %13, align 8, !tbaa !5
  %25 = getelementptr inbounds %class.Access, ptr %24, i32 0, i32 2
  %26 = call noundef i32 @_ZN5row_t7get_rowE8access_tP10TxnManagerRPS_(ptr noundef nonnull align 8 dereferenceable(64) %22, i32 noundef %23, ptr noundef %15, ptr noundef nonnull align 8 dereferenceable(8) %25)
  store i32 %26, ptr %12, align 4, !tbaa !13
  %27 = load i32, ptr %12, align 4, !tbaa !13
  %28 = icmp eq i32 %27, 2
  br i1 %28, label %32, label %29

29:                                               ; preds = %4
  %30 = load i32, ptr %12, align 4, !tbaa !13
  %31 = icmp eq i32 %30, 3
  br i1 %31, label %32, label %64

32:                                               ; preds = %29, %4
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %33, align 8, !tbaa !5
  %34 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %15)
  %35 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN10AccessPool3putEmP6Access(ptr noundef nonnull align 8 dereferenceable(16) @access_pool, i64 noundef %34, ptr noundef %35)
  %36 = call noundef i64 @_Z13get_sys_clockv()
  %37 = load i64, ptr %10, align 8, !tbaa !11
  %38 = sub i64 %36, %37
  store i64 %38, ptr %11, align 8, !tbaa !11
  %39 = load ptr, ptr @simulation, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %39)
  br i1 %40, label %41, label %51

41:                                               ; preds = %32
  %42 = load i64, ptr %11, align 8, !tbaa !11
  %43 = uitofp i64 %42 to double
  %44 = load ptr, ptr @stats, align 8, !tbaa !24
  %45 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %15)
  %46 = getelementptr inbounds ptr, ptr %44, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.Stats_thd, ptr %47, i32 0, i32 35
  %49 = load double, ptr %48, align 8, !tbaa !26
  %50 = fadd double %49, %43
  store double %50, ptr %48, align 8, !tbaa !26
  br label %51

51:                                               ; preds = %41, %32
  %52 = load ptr, ptr @simulation, align 8, !tbaa !5
  %53 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %52)
  br i1 %53, label %54, label %62

54:                                               ; preds = %51
  %55 = load ptr, ptr @stats, align 8, !tbaa !24
  %56 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %15)
  %57 = getelementptr inbounds ptr, ptr %55, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.Stats_thd, ptr %58, i32 0, i32 82
  %60 = load i64, ptr %59, align 8, !tbaa !30
  %61 = add i64 %60, 1
  store i64 %61, ptr %59, align 8, !tbaa !30
  br label %62

62:                                               ; preds = %54, %51
  %63 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %63, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %110

64:                                               ; preds = %29
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = getelementptr inbounds %class.Access, ptr %66, i32 0, i32 0
  store i32 %65, ptr %67, align 8, !tbaa !31
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds %class.Access, ptr %69, i32 0, i32 1
  store ptr %68, ptr %70, align 8, !tbaa !33
  %71 = getelementptr inbounds %class.TxnManager, ptr %15, i32 0, i32 20
  %72 = load ptr, ptr %71, align 8, !tbaa !34
  %73 = getelementptr inbounds %class.Transaction, ptr %72, i32 0, i32 5
  %74 = load i64, ptr %73, align 8, !tbaa !35
  %75 = add i64 %74, 1
  store i64 %75, ptr %73, align 8, !tbaa !35
  %76 = load i32, ptr %8, align 4, !tbaa !9
  %77 = icmp eq i32 %76, 1
  br i1 %77, label %78, label %84

78:                                               ; preds = %64
  %79 = getelementptr inbounds %class.TxnManager, ptr %15, i32 0, i32 20
  %80 = load ptr, ptr %79, align 8, !tbaa !34
  %81 = getelementptr inbounds %class.Transaction, ptr %80, i32 0, i32 4
  %82 = load i64, ptr %81, align 8, !tbaa !39
  %83 = add i64 %82, 1
  store i64 %83, ptr %81, align 8, !tbaa !39
  br label %84

84:                                               ; preds = %78, %64
  %85 = getelementptr inbounds %class.TxnManager, ptr %15, i32 0, i32 20
  %86 = load ptr, ptr %85, align 8, !tbaa !34
  %87 = getelementptr inbounds %class.Transaction, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN5ArrayIP6AccessE3addES1_(ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef %88)
  %89 = call noundef i64 @_Z13get_sys_clockv()
  %90 = load i64, ptr %10, align 8, !tbaa !11
  %91 = sub i64 %89, %90
  store i64 %91, ptr %11, align 8, !tbaa !11
  %92 = load ptr, ptr @simulation, align 8, !tbaa !5
  %93 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %92)
  br i1 %93, label %94, label %104

94:                                               ; preds = %84
  %95 = load i64, ptr %11, align 8, !tbaa !11
  %96 = uitofp i64 %95 to double
  %97 = load ptr, ptr @stats, align 8, !tbaa !24
  %98 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %15)
  %99 = getelementptr inbounds ptr, ptr %97, i64 %98
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = getelementptr inbounds %class.Stats_thd, ptr %100, i32 0, i32 35
  %102 = load double, ptr %101, align 8, !tbaa !26
  %103 = fadd double %102, %96
  store double %103, ptr %101, align 8, !tbaa !26
  br label %104

104:                                              ; preds = %94, %84
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = getelementptr inbounds %class.Access, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !40
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %107, ptr %108, align 8, !tbaa !5
  %109 = load i32, ptr %12, align 4, !tbaa !13
  store i32 %109, ptr %5, align 4
  store i32 1, ptr %14, align 4
  br label %110

110:                                              ; preds = %104, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %111 = load i32, ptr %5, align 4
  ret i32 %111
}

declare void @_ZN10AccessPool3getEmRP6Access(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #0

declare noundef i32 @_ZN5row_t7get_rowE8access_tP10TxnManagerRPS_(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5ArrayIP6AccessE3addES1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #3 align 2

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 = { nocallback nofree nosync 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 = { 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 }

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


; 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.AccessPool = type { ptr, ptr }

@simulation = external local_unnamed_addr global ptr, align 8
@stats = external local_unnamed_addr global %class.Stats, align 8
@access_pool = external global %class.AccessPool, align 8

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

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

declare void @_ZN10AccessPool3putEmP6Access(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN10TxnManager7get_rowEP5row_t8access_tRS1_(ptr noundef nonnull align 8 dereferenceable(544) %0, ptr noundef %1, i32 noundef %2, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %3) local_unnamed_addr #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = tail call noundef i64 @_Z13get_sys_clockv()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %7 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  call void @_ZN10AccessPool3getEmRP6Access(ptr noundef nonnull align 8 dereferenceable(16) @access_pool, i64 noundef %7, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %8 = getelementptr inbounds i8, ptr %0, i64 488
  store ptr %1, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 504
  store i32 %2, ptr %9, align 8, !tbaa !18
  %10 = load ptr, ptr %5, align 8, !tbaa !19
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = call noundef i32 @_ZN5row_t7get_rowE8access_tP10TxnManagerRPS_(ptr noundef nonnull align 8 dereferenceable(64) %1, i32 noundef %2, ptr noundef nonnull %0, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %13 = and i32 %12, -2
  %or.cond = icmp eq i32 %13, 2
  br i1 %or.cond, label %14, label %41

14:                                               ; preds = %4
  store ptr null, ptr %3, align 8, !tbaa !19
  %15 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %16 = load ptr, ptr %5, align 8, !tbaa !19
  call void @_ZN10AccessPool3putEmP6Access(ptr noundef nonnull align 8 dereferenceable(16) @access_pool, i64 noundef %15, ptr noundef %16)
  %17 = call noundef i64 @_Z13get_sys_clockv()
  %18 = load ptr, ptr @simulation, align 8, !tbaa !19
  %19 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %18)
  br i1 %19, label %20, label %30

20:                                               ; preds = %14
  %21 = sub i64 %17, %6
  %22 = uitofp i64 %21 to double
  %23 = load ptr, ptr @stats, align 8, !tbaa !20
  %24 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %25 = getelementptr inbounds ptr, ptr %23, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !19
  %27 = getelementptr inbounds i8, ptr %26, i64 336
  %28 = load double, ptr %27, align 8, !tbaa !22
  %29 = fadd double %28, %22
  store double %29, ptr %27, align 8, !tbaa !22
  br label %30

30:                                               ; preds = %20, %14
  %31 = load ptr, ptr @simulation, align 8, !tbaa !19
  %32 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %31)
  br i1 %32, label %33, label %72

33:                                               ; preds = %30
  %34 = load ptr, ptr @stats, align 8, !tbaa !20
  %35 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %36 = getelementptr inbounds ptr, ptr %34, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !19
  %38 = getelementptr inbounds i8, ptr %37, i64 712
  %39 = load i64, ptr %38, align 8, !tbaa !26
  %40 = add i64 %39, 1
  store i64 %40, ptr %38, align 8, !tbaa !26
  br label %72

41:                                               ; preds = %4
  %42 = load ptr, ptr %5, align 8, !tbaa !19
  store i32 %2, ptr %42, align 8, !tbaa !27
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  store ptr %1, ptr %43, align 8, !tbaa !29
  %44 = getelementptr inbounds i8, ptr %0, i64 136
  %45 = load ptr, ptr %44, align 8, !tbaa !30
  %46 = getelementptr inbounds i8, ptr %45, i64 56
  %47 = load i64, ptr %46, align 8, !tbaa !31
  %48 = add i64 %47, 1
  store i64 %48, ptr %46, align 8, !tbaa !31
  %49 = icmp eq i32 %2, 1
  br i1 %49, label %50, label %54

50:                                               ; preds = %41
  %51 = getelementptr inbounds i8, ptr %45, i64 48
  %52 = load i64, ptr %51, align 8, !tbaa !36
  %53 = add i64 %52, 1
  store i64 %53, ptr %51, align 8, !tbaa !36
  br label %54

54:                                               ; preds = %50, %41
  call void @_ZN5ArrayIP6AccessE3addES1_(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr noundef nonnull %42)
  %55 = call noundef i64 @_Z13get_sys_clockv()
  %56 = load ptr, ptr @simulation, align 8, !tbaa !19
  %57 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %56)
  br i1 %57, label %58, label %68

58:                                               ; preds = %54
  %59 = sub i64 %55, %6
  %60 = uitofp i64 %59 to double
  %61 = load ptr, ptr @stats, align 8, !tbaa !20
  %62 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %63 = getelementptr inbounds ptr, ptr %61, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !19
  %65 = getelementptr inbounds i8, ptr %64, i64 336
  %66 = load double, ptr %65, align 8, !tbaa !22
  %67 = fadd double %66, %60
  store double %67, ptr %65, align 8, !tbaa !22
  br label %68

68:                                               ; preds = %58, %54
  %69 = load ptr, ptr %5, align 8, !tbaa !19
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %71 = load ptr, ptr %70, align 8, !tbaa !37
  store ptr %71, ptr %3, align 8, !tbaa !19
  br label %72

72:                                               ; preds = %30, %33, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret i32 %12
}

declare void @_ZN10AccessPool3getEmRP6Access(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

declare noundef i32 @_ZN5row_t7get_rowE8access_tP10TxnManagerRPS_(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5ArrayIP6AccessE3addES1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #3 align 2

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 nocallback nofree nosync 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 = { 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 }

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass