; LLVM IR from mitdbg/deneva :: system/txn_table.ll (ZN8TxnTable23get_transaction_managerEmmm)

; 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.TxnTablePool = type { ptr, ptr }
%class.TxnManPool = type { ptr, ptr }
%class.TxnTable = type { i64, ptr }
%struct.pool_node = type { ptr, ptr, i8, i64, 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 }
%struct.txn_node = type { ptr, i64, i64, i64, 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, 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 = type { ptr, i64, i64 }
%union.sem_t = type { i64, [24 x i8] }

@simulation = external global ptr, align 8
@stats = external global %class.Stats, align 8
@txn_table_pool = external global %class.TxnTablePool, align 8
@txn_man_pool = external global %class.TxnManPool, 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
declare dso_local noundef zeroext i1 @_ZN8TxnTable20is_matching_txn_nodeEP8txn_nodemm(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef, i64 noundef) #1 align 2

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

22:                                               ; preds = %32, %4
  %23 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  %25 = load i64, ptr %10, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %24, i64 %25
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.pool_node, ptr %27, i32 0, i32 2
  %29 = cmpxchg ptr %28, i8 0, i8 1 seq_cst seq_cst, align 8
  %30 = extractvalue { i8, i1 } %29, 1
  %31 = xor i1 %30, true
  br i1 %31, label %32, label %33

32:                                               ; preds = %22
  br label %22, !llvm.loop !14

33:                                               ; preds = %22
  %34 = load ptr, ptr @simulation, align 8, !tbaa !5
  %35 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %34)
  br i1 %35, label %36, label %50

36:                                               ; preds = %33
  %37 = call noundef i64 @_Z13get_sys_clockv()
  %38 = load i64, ptr %11, align 8, !tbaa !9
  %39 = sub i64 %37, %38
  %40 = uitofp i64 %39 to double
  %41 = load ptr, ptr @stats, align 8, !tbaa !16
  %42 = load i64, ptr %6, align 8, !tbaa !9
  %43 = getelementptr inbounds ptr, ptr %41, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds %class.Stats_thd, ptr %44, i32 0, i32 197
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = getelementptr inbounds double, ptr %46, i64 7
  %48 = load double, ptr %47, align 8, !tbaa !23
  %49 = fadd double %48, %40
  store double %49, ptr %47, align 8, !tbaa !23
  br label %50

50:                                               ; preds = %36, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %51 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  %53 = load i64, ptr %10, align 8, !tbaa !9
  %54 = getelementptr inbounds ptr, ptr %52, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.pool_node, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !24
  store ptr %57, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %58 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %58, ptr %14, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %71, %50
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %75

62:                                               ; preds = %59
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = load i64, ptr %7, align 8, !tbaa !9
  %65 = load i64, ptr %8, align 8, !tbaa !9
  %66 = call noundef zeroext i1 @_ZN8TxnTable20is_matching_txn_nodeEP8txn_nodemm(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef %63, i64 noundef %64, i64 noundef %65)
  br i1 %66, label %67, label %71

67:                                               ; preds = %62
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.txn_node, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !27
  store ptr %70, ptr %13, align 8, !tbaa !5
  br label %75

71:                                               ; preds = %62
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.txn_node, ptr %72, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !29
  store ptr %74, ptr %12, align 8, !tbaa !5
  br label %59, !llvm.loop !30

75:                                               ; preds = %67, %59
  %76 = load ptr, ptr @simulation, align 8, !tbaa !5
  %77 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %76)
  br i1 %77, label %78, label %92

78:                                               ; preds = %75
  %79 = call noundef i64 @_Z13get_sys_clockv()
  %80 = load i64, ptr %14, align 8, !tbaa !9
  %81 = sub i64 %79, %80
  %82 = uitofp i64 %81 to double
  %83 = load ptr, ptr @stats, align 8, !tbaa !16
  %84 = load i64, ptr %6, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %83, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = getelementptr inbounds %class.Stats_thd, ptr %86, i32 0, i32 197
  %88 = load ptr, ptr %87, align 8, !tbaa !18
  %89 = getelementptr inbounds double, ptr %88, i64 20
  %90 = load double, ptr %89, align 8, !tbaa !23
  %91 = fadd double %90, %82
  store double %91, ptr %89, align 8, !tbaa !23
  br label %92

92:                                               ; preds = %78, %75
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %301, label %95

95:                                               ; preds = %92
  %96 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %96, ptr %14, align 8, !tbaa !9
  %97 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN12TxnTablePool3getEmRP8txn_node(ptr noundef nonnull align 8 dereferenceable(16) @txn_table_pool, i64 noundef %97, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %98 = load ptr, ptr @simulation, align 8, !tbaa !5
  %99 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %98)
  br i1 %99, label %100, label %114

100:                                              ; preds = %95
  %101 = call noundef i64 @_Z13get_sys_clockv()
  %102 = load i64, ptr %14, align 8, !tbaa !9
  %103 = sub i64 %101, %102
  %104 = uitofp i64 %103 to double
  %105 = load ptr, ptr @stats, align 8, !tbaa !16
  %106 = load i64, ptr %6, align 8, !tbaa !9
  %107 = getelementptr inbounds ptr, ptr %105, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  %109 = getelementptr inbounds %class.Stats_thd, ptr %108, i32 0, i32 197
  %110 = load ptr, ptr %109, align 8, !tbaa !18
  %111 = getelementptr inbounds double, ptr %110, i64 21
  %112 = load double, ptr %111, align 8, !tbaa !23
  %113 = fadd double %112, %104
  store double %113, ptr %111, align 8, !tbaa !23
  br label %114

114:                                              ; preds = %100, %95
  %115 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %115, ptr %14, align 8, !tbaa !9
  %116 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN10TxnManPool3getEmRP10TxnManager(ptr noundef nonnull align 8 dereferenceable(16) @txn_man_pool, i64 noundef %116, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %117 = load ptr, ptr @simulation, align 8, !tbaa !5
  %118 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %117)
  br i1 %118, label %119, label %133

119:                                              ; preds = %114
  %120 = call noundef i64 @_Z13get_sys_clockv()
  %121 = load i64, ptr %14, align 8, !tbaa !9
  %122 = sub i64 %120, %121
  %123 = uitofp i64 %122 to double
  %124 = load ptr, ptr @stats, align 8, !tbaa !16
  %125 = load i64, ptr %6, align 8, !tbaa !9
  %126 = getelementptr inbounds ptr, ptr %124, i64 %125
  %127 = load ptr, ptr %126, align 8, !tbaa !5
  %128 = getelementptr inbounds %class.Stats_thd, ptr %127, i32 0, i32 197
  %129 = load ptr, ptr %128, align 8, !tbaa !18
  %130 = getelementptr inbounds double, ptr %129, i64 22
  %131 = load double, ptr %130, align 8, !tbaa !23
  %132 = fadd double %131, %123
  store double %132, ptr %130, align 8, !tbaa !23
  br label %133

133:                                              ; preds = %119, %114
  %134 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %134, ptr %14, align 8, !tbaa !9
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = load i64, ptr %7, align 8, !tbaa !9
  call void @_ZN10TxnManager10set_txn_idEm(ptr noundef nonnull align 8 dereferenceable(544) %135, i64 noundef %136)
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = load i64, ptr %8, align 8, !tbaa !9
  call void @_ZN10TxnManager12set_batch_idEm(ptr noundef nonnull align 8 dereferenceable(544) %137, i64 noundef %138)
  %139 = load ptr, ptr %13, align 8, !tbaa !5
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.txn_node, ptr %140, i32 0, i32 0
  store ptr %139, ptr %141, align 8, !tbaa !27
  %142 = call noundef i64 @_Z13get_sys_clockv()
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = getelementptr inbounds %class.TxnManager, ptr %143, i32 0, i32 25
  %145 = getelementptr inbounds %class.TxnStats, ptr %144, i32 0, i32 0
  store i64 %142, ptr %145, align 8, !tbaa !31
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  %147 = getelementptr inbounds %class.TxnManager, ptr %146, i32 0, i32 25
  %148 = getelementptr inbounds %class.TxnStats, ptr %147, i32 0, i32 0
  %149 = load i64, ptr %148, align 8, !tbaa !31
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = getelementptr inbounds %class.TxnManager, ptr %150, i32 0, i32 25
  %152 = getelementptr inbounds %class.TxnStats, ptr %151, i32 0, i32 1
  store i64 %149, ptr %152, align 8, !tbaa !38
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.txn_node, ptr %153, i32 0, i32 4
  store ptr null, ptr %154, align 8, !tbaa !29
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.txn_node, ptr %155, i32 0, i32 5
  store ptr null, ptr %156, align 8, !tbaa !39
  %157 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8, !tbaa !13
  %159 = load i64, ptr %10, align 8, !tbaa !9
  %160 = getelementptr inbounds ptr, ptr %158, i64 %159
  %161 = load ptr, ptr %160, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.pool_node, ptr %161, i32 0, i32 1
  %163 = load ptr, ptr %162, align 8, !tbaa !40
  %164 = icmp ne ptr %163, null
  br i1 %164, label %165, label %191

165:                                              ; preds = %133
  %166 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %167 = load ptr, ptr %166, align 8, !tbaa !13
  %168 = load i64, ptr %10, align 8, !tbaa !9
  %169 = getelementptr inbounds ptr, ptr %167, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.pool_node, ptr %170, i32 0, i32 1
  %172 = load ptr, ptr %171, align 8, !tbaa !40
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.txn_node, ptr %173, i32 0, i32 5
  store ptr %172, ptr %174, align 8, !tbaa !39
  %175 = load ptr, ptr %12, align 8, !tbaa !5
  %176 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %177 = load ptr, ptr %176, align 8, !tbaa !13
  %178 = load i64, ptr %10, align 8, !tbaa !9
  %179 = getelementptr inbounds ptr, ptr %177, i64 %178
  %180 = load ptr, ptr %179, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.pool_node, ptr %180, i32 0, i32 1
  %182 = load ptr, ptr %181, align 8, !tbaa !40
  %183 = getelementptr inbounds %struct.txn_node, ptr %182, i32 0, i32 4
  store ptr %175, ptr %183, align 8, !tbaa !29
  %184 = load ptr, ptr %12, align 8, !tbaa !5
  %185 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %186 = load ptr, ptr %185, align 8, !tbaa !13
  %187 = load i64, ptr %10, align 8, !tbaa !9
  %188 = getelementptr inbounds ptr, ptr %186, i64 %187
  %189 = load ptr, ptr %188, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.pool_node, ptr %189, i32 0, i32 1
  store ptr %184, ptr %190, align 8, !tbaa !40
  br label %206

191:                                              ; preds = %133
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  %193 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %194 = load ptr, ptr %193, align 8, !tbaa !13
  %195 = load i64, ptr %10, align 8, !tbaa !9
  %196 = getelementptr inbounds ptr, ptr %194, i64 %195
  %197 = load ptr, ptr %196, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.pool_node, ptr %197, i32 0, i32 0
  store ptr %192, ptr %198, align 8, !tbaa !24
  %199 = load ptr, ptr %12, align 8, !tbaa !5
  %200 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %201 = load ptr, ptr %200, align 8, !tbaa !13
  %202 = load i64, ptr %10, align 8, !tbaa !9
  %203 = getelementptr inbounds ptr, ptr %201, i64 %202
  %204 = load ptr, ptr %203, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.pool_node, ptr %204, i32 0, i32 1
  store ptr %199, ptr %205, align 8, !tbaa !40
  br label %206

206:                                              ; preds = %191, %165
  %207 = load ptr, ptr @simulation, align 8, !tbaa !5
  %208 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %207)
  br i1 %208, label %209, label %223

209:                                              ; preds = %206
  %210 = call noundef i64 @_Z13get_sys_clockv()
  %211 = load i64, ptr %14, align 8, !tbaa !9
  %212 = sub i64 %210, %211
  %213 = uitofp i64 %212 to double
  %214 = load ptr, ptr @stats, align 8, !tbaa !16
  %215 = load i64, ptr %6, align 8, !tbaa !9
  %216 = getelementptr inbounds ptr, ptr %214, i64 %215
  %217 = load ptr, ptr %216, align 8, !tbaa !5
  %218 = getelementptr inbounds %class.Stats_thd, ptr %217, i32 0, i32 197
  %219 = load ptr, ptr %218, align 8, !tbaa !18
  %220 = getelementptr inbounds double, ptr %219, i64 23
  %221 = load double, ptr %220, align 8, !tbaa !23
  %222 = fadd double %221, %213
  store double %222, ptr %220, align 8, !tbaa !23
  br label %223

223:                                              ; preds = %209, %206
  %224 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %224, ptr %14, align 8, !tbaa !9
  %225 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %226 = load ptr, ptr %225, align 8, !tbaa !13
  %227 = load i64, ptr %10, align 8, !tbaa !9
  %228 = getelementptr inbounds ptr, ptr %226, i64 %227
  %229 = load ptr, ptr %228, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.pool_node, ptr %229, i32 0, i32 3
  %231 = load i64, ptr %230, align 8, !tbaa !41
  %232 = add i64 %231, 1
  store i64 %232, ptr %230, align 8, !tbaa !41
  %233 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %234 = load ptr, ptr %233, align 8, !tbaa !13
  %235 = load i64, ptr %10, align 8, !tbaa !9
  %236 = getelementptr inbounds ptr, ptr %234, i64 %235
  %237 = load ptr, ptr %236, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.pool_node, ptr %237, i32 0, i32 3
  %239 = load i64, ptr %238, align 8, !tbaa !41
  %240 = icmp ugt i64 %239, 1
  br i1 %240, label %241, label %272

241:                                              ; preds = %223
  %242 = load ptr, ptr @simulation, align 8, !tbaa !5
  %243 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %242)
  br i1 %243, label %244, label %252

244:                                              ; preds = %241
  %245 = load ptr, ptr @stats, align 8, !tbaa !16
  %246 = load i64, ptr %6, align 8, !tbaa !9
  %247 = getelementptr inbounds ptr, ptr %245, i64 %246
  %248 = load ptr, ptr %247, align 8, !tbaa !5
  %249 = getelementptr inbounds %class.Stats_thd, ptr %248, i32 0, i32 152
  %250 = load i64, ptr %249, align 8, !tbaa !42
  %251 = add i64 %250, 1
  store i64 %251, ptr %249, align 8, !tbaa !42
  br label %252

252:                                              ; preds = %244, %241
  %253 = load ptr, ptr @simulation, align 8, !tbaa !5
  %254 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %253)
  br i1 %254, label %255, label %271

255:                                              ; preds = %252
  %256 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %257 = load ptr, ptr %256, align 8, !tbaa !13
  %258 = load i64, ptr %10, align 8, !tbaa !9
  %259 = getelementptr inbounds ptr, ptr %257, i64 %258
  %260 = load ptr, ptr %259, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.pool_node, ptr %260, i32 0, i32 3
  %262 = load i64, ptr %261, align 8, !tbaa !41
  %263 = sub i64 %262, 1
  %264 = load ptr, ptr @stats, align 8, !tbaa !16
  %265 = load i64, ptr %6, align 8, !tbaa !9
  %266 = getelementptr inbounds ptr, ptr %264, i64 %265
  %267 = load ptr, ptr %266, align 8, !tbaa !5
  %268 = getelementptr inbounds %class.Stats_thd, ptr %267, i32 0, i32 153
  %269 = load i64, ptr %268, align 8, !tbaa !43
  %270 = add i64 %269, %263
  store i64 %270, ptr %268, align 8, !tbaa !43
  br label %271

271:                                              ; preds = %255, %252
  br label %272

272:                                              ; preds = %271, %223
  %273 = load ptr, ptr @simulation, align 8, !tbaa !5
  %274 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %273)
  br i1 %274, label %275, label %283

275:                                              ; preds = %272
  %276 = load ptr, ptr @stats, align 8, !tbaa !16
  %277 = load i64, ptr %6, align 8, !tbaa !9
  %278 = getelementptr inbounds ptr, ptr %276, i64 %277
  %279 = load ptr, ptr %278, align 8, !tbaa !5
  %280 = getelementptr inbounds %class.Stats_thd, ptr %279, i32 0, i32 149
  %281 = load i64, ptr %280, align 8, !tbaa !44
  %282 = add i64 %281, 1
  store i64 %282, ptr %280, align 8, !tbaa !44
  br label %283

283:                                              ; preds = %275, %272
  %284 = load ptr, ptr @simulation, align 8, !tbaa !5
  %285 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %284)
  br i1 %285, label %286, label %300

286:                                              ; preds = %283
  %287 = call noundef i64 @_Z13get_sys_clockv()
  %288 = load i64, ptr %14, align 8, !tbaa !9
  %289 = sub i64 %287, %288
  %290 = uitofp i64 %289 to double
  %291 = load ptr, ptr @stats, align 8, !tbaa !16
  %292 = load i64, ptr %6, align 8, !tbaa !9
  %293 = getelementptr inbounds ptr, ptr %291, i64 %292
  %294 = load ptr, ptr %293, align 8, !tbaa !5
  %295 = getelementptr inbounds %class.Stats_thd, ptr %294, i32 0, i32 197
  %296 = load ptr, ptr %295, align 8, !tbaa !18
  %297 = getelementptr inbounds double, ptr %296, i64 24
  %298 = load double, ptr %297, align 8, !tbaa !23
  %299 = fadd double %298, %290
  store double %299, ptr %297, align 8, !tbaa !23
  br label %300

300:                                              ; preds = %286, %283
  br label %301

301:                                              ; preds = %300, %92
  %302 = getelementptr inbounds %class.TxnTable, ptr %15, i32 0, i32 1
  %303 = load ptr, ptr %302, align 8, !tbaa !13
  %304 = load i64, ptr %10, align 8, !tbaa !9
  %305 = getelementptr inbounds ptr, ptr %303, i64 %304
  %306 = load ptr, ptr %305, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.pool_node, ptr %306, i32 0, i32 2
  %308 = cmpxchg ptr %307, i8 1, i8 0 seq_cst seq_cst, align 8
  %309 = extractvalue { i8, i1 } %308, 1
  %310 = load ptr, ptr @simulation, align 8, !tbaa !5
  %311 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %310)
  br i1 %311, label %312, label %324

312:                                              ; preds = %301
  %313 = call noundef i64 @_Z13get_sys_clockv()
  %314 = load i64, ptr %9, align 8, !tbaa !9
  %315 = sub i64 %313, %314
  %316 = uitofp i64 %315 to double
  %317 = load ptr, ptr @stats, align 8, !tbaa !16
  %318 = load i64, ptr %6, align 8, !tbaa !9
  %319 = getelementptr inbounds ptr, ptr %317, i64 %318
  %320 = load ptr, ptr %319, align 8, !tbaa !5
  %321 = getelementptr inbounds %class.Stats_thd, ptr %320, i32 0, i32 154
  %322 = load double, ptr %321, align 8, !tbaa !45
  %323 = fadd double %322, %316
  store double %323, ptr %321, align 8, !tbaa !45
  br label %324

324:                                              ; preds = %312, %301
  %325 = load ptr, ptr @simulation, align 8, !tbaa !5
  %326 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %325)
  br i1 %326, label %327, label %335

327:                                              ; preds = %324
  %328 = load ptr, ptr @stats, align 8, !tbaa !16
  %329 = load i64, ptr %6, align 8, !tbaa !9
  %330 = getelementptr inbounds ptr, ptr %328, i64 %329
  %331 = load ptr, ptr %330, align 8, !tbaa !5
  %332 = getelementptr inbounds %class.Stats_thd, ptr %331, i32 0, i32 150
  %333 = load i64, ptr %332, align 8, !tbaa !46
  %334 = add i64 %333, 1
  store i64 %334, ptr %332, align 8, !tbaa !46
  br label %335

335:                                              ; preds = %327, %324
  %336 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret ptr %336
}

declare noundef i64 @_Z13get_sys_clockv() #2

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

declare void @_ZN12TxnTablePool3getEmRP8txn_node(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN10TxnManPool3getEmRP10TxnManager(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN10TxnManager10set_txn_idEm(ptr noundef nonnull align 8 dereferenceable(544), i64 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10TxnManager12set_batch_idEm(ptr noundef nonnull align 8 dereferenceable(544), i64 noundef) #3 align 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS8TxnTable", !10, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS5Stats", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!18 = !{!19, !6, i64 1888}
!19 = !{!"_ZTS9Stats_thd", !7, i64 0, !6, i64 64, !6, i64 72, !20, 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, !20, i64 184, !10, i64 192, !20, i64 200, !10, i64 208, !20, i64 216, !10, i64 224, !10, 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, !10, 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, !10, i64 376, !10, i64 384, !20, i64 392, !10, i64 400, !20, i64 408, !10, i64 416, !20, i64 424, !20, i64 432, !20, i64 440, !10, i64 448, !10, i64 456, !10, 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, !10, i64 544, !6, i64 552, !6, i64 560, !20, i64 568, !10, i64 576, !10, i64 584, !20, i64 592, !20, i64 600, !20, i64 608, !10, i64 616, !10, i64 624, !10, i64 632, !10, i64 640, !10, i64 648, !10, i64 656, !10, i64 664, !20, i64 672, !20, i64 680, !20, 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, !20, i64 768, !20, i64 776, !20, i64 784, !20, i64 792, !20, i64 800, !10, i64 808, !10, i64 816, !20, i64 824, !20, i64 832, !10, i64 840, !10, i64 848, !10, i64 856, !20, i64 864, !20, i64 872, !10, i64 880, !10, i64 888, !20, i64 896, !20, i64 904, !20, i64 912, !20, i64 920, !10, i64 928, !10, i64 936, !20, i64 944, !20, i64 952, !20, i64 960, !10, i64 968, !10, i64 976, !20, i64 984, !20, i64 992, !20, i64 1000, !20, i64 1008, !20, i64 1016, !10, 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, !10, i64 1096, !10, i64 1104, !10, i64 1112, !20, i64 1120, !10, i64 1128, !20, i64 1136, !20, i64 1144, !10, i64 1152, !10, i64 1160, !10, i64 1168, !10, i64 1176, !10, i64 1184, !20, i64 1192, !10, i64 1200, !10, i64 1208, !20, i64 1216, !10, i64 1224, !20, i64 1232, !20, i64 1240, !10, i64 1248, !10, i64 1256, !10, i64 1264, !10, i64 1272, !10, i64 1280, !20, i64 1288, !20, i64 1296, !20, i64 1304, !21, i64 1312, !21, i64 1384, !21, i64 1456, !21, 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}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTS8StatsArr", !6, i64 0, !10, i64 8, !10, i64 16, !22, i64 24, !7, i64 32}
!22 = !{!"_ZTS12StatsArrType", !7, i64 0}
!23 = !{!20, !20, i64 0}
!24 = !{!25, !6, i64 0}
!25 = !{!"_ZTS9pool_node", !6, i64 0, !6, i64 8, !26, i64 16, !10, i64 24, !10, i64 32}
!26 = !{!"bool", !7, i64 0}
!27 = !{!28, !6, i64 0}
!28 = !{!"_ZTS8txn_node", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 40}
!29 = !{!28, !6, i64 32}
!30 = distinct !{!30, !15}
!31 = !{!32, !10, i64 176}
!32 = !{!"_ZTS10TxnManager", !6, i64 8, !6, i64 16, !26, i64 24, !6, i64 32, !33, i64 40, !26, i64 44, !33, i64 48, !33, i64 52, !26, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !10, i64 120, !26, i64 128, !26, i64 129, !6, i64 136, !6, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !34, i64 176, !33, i64 432, !33, i64 436, !33, i64 440, !26, i64 444, !35, i64 448, !36, i64 456, !33, i64 480, !6, i64 488, !6, i64 496, !37, i64 504, !7, i64 512}
!33 = !{!"int", !7, i64 0}
!34 = !{!"_ZTS8TxnStats", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, 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, !10, i64 176, !10, 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}
!35 = !{!"_ZTS12CALVIN_PHASE", !7, i64 0}
!36 = !{!"_ZTS5ArrayIP5row_tE", !6, i64 0, !10, i64 8, !10, i64 16}
!37 = !{!"_ZTS8access_t", !7, i64 0}
!38 = !{!32, !10, i64 184}
!39 = !{!28, !6, i64 40}
!40 = !{!25, !6, i64 8}
!41 = !{!25, !10, i64 24}
!42 = !{!19, !10, i64 1272}
!43 = !{!19, !10, i64 1280}
!44 = !{!19, !10, i64 1248}
!45 = !{!19, !20, i64 1288}
!46 = !{!19, !10, i64 1256}


; 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.TxnTablePool = type { ptr, ptr }
%class.TxnManPool = type { ptr, ptr }

@simulation = external local_unnamed_addr global ptr, align 8
@stats = external local_unnamed_addr global %class.Stats, align 8
@txn_table_pool = external global %class.TxnTablePool, align 8
@txn_man_pool = external global %class.TxnManPool, 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
declare dso_local noundef zeroext i1 @_ZN8TxnTable20is_matching_txn_nodeEP8txn_nodemm(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN8TxnTable23get_transaction_managerEmmm(ptr noundef nonnull align 8 dereferenceable(16) %0, i64 noundef %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #1 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = tail call noundef i64 @_Z13get_sys_clockv()
  %8 = load i64, ptr %0, align 8, !tbaa !5
  %9 = urem i64 %2, %8
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  br label %11

11:                                               ; preds = %11, %4
  %12 = load ptr, ptr %10, align 8, !tbaa !11
  %13 = getelementptr inbounds ptr, ptr %12, i64 %9
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = cmpxchg ptr %15, i8 0, i8 1 seq_cst seq_cst, align 8
  %17 = extractvalue { i8, i1 } %16, 1
  br i1 %17, label %18, label %11, !llvm.loop !13

18:                                               ; preds = %11
  %19 = load ptr, ptr @simulation, align 8, !tbaa !12
  %20 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %19)
  br i1 %20, label %21, label %33

21:                                               ; preds = %18
  %22 = tail call noundef i64 @_Z13get_sys_clockv()
  %23 = sub i64 %22, %7
  %24 = uitofp i64 %23 to double
  %25 = load ptr, ptr @stats, align 8, !tbaa !15
  %26 = getelementptr inbounds ptr, ptr %25, i64 %1
  %27 = load ptr, ptr %26, align 8, !tbaa !12
  %28 = getelementptr inbounds i8, ptr %27, i64 1888
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %29, i64 56
  %31 = load double, ptr %30, align 8, !tbaa !22
  %32 = fadd double %31, %24
  store double %32, ptr %30, align 8, !tbaa !22
  br label %33

33:                                               ; preds = %21, %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %34 = load ptr, ptr %10, align 8, !tbaa !11
  %35 = getelementptr inbounds ptr, ptr %34, i64 %9
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store ptr null, ptr %6, align 8, !tbaa !12
  %38 = tail call noundef i64 @_Z13get_sys_clockv()
  %.not42 = icmp eq ptr %37, null
  br i1 %.not42, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %33, %44
  %39 = phi ptr [ %46, %44 ], [ %37, %33 ]
  %40 = tail call noundef zeroext i1 @_ZN8TxnTable20is_matching_txn_nodeEP8txn_nodemm(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %39, i64 noundef %2, i64 noundef %3)
  br i1 %40, label %41, label %44

41:                                               ; preds = %.lr.ph
  store ptr %39, ptr %5, align 8, !tbaa !12
  %42 = load ptr, ptr %39, align 8, !tbaa !26
  store ptr %42, ptr %6, align 8, !tbaa !12
  %43 = icmp eq ptr %42, null
  br label %47

44:                                               ; preds = %.lr.ph
  %45 = getelementptr inbounds i8, ptr %39, i64 32
  %46 = load ptr, ptr %45, align 8, !tbaa !28
  %.not = icmp eq ptr %46, null
  br i1 %.not, label %.loopexit, label %.lr.ph, !llvm.loop !29

.loopexit:                                        ; preds = %44, %33
  store ptr null, ptr %5, align 8, !tbaa !12
  br label %47

47:                                               ; preds = %.loopexit, %41
  %.not39 = phi i1 [ true, %.loopexit ], [ %43, %41 ]
  %48 = load ptr, ptr @simulation, align 8, !tbaa !12
  %49 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %48)
  br i1 %49, label %50, label %62

50:                                               ; preds = %47
  %51 = tail call noundef i64 @_Z13get_sys_clockv()
  %52 = sub i64 %51, %38
  %53 = uitofp i64 %52 to double
  %54 = load ptr, ptr @stats, align 8, !tbaa !15
  %55 = getelementptr inbounds ptr, ptr %54, i64 %1
  %56 = load ptr, ptr %55, align 8, !tbaa !12
  %57 = getelementptr inbounds i8, ptr %56, i64 1888
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = getelementptr inbounds i8, ptr %58, i64 160
  %60 = load double, ptr %59, align 8, !tbaa !22
  %61 = fadd double %60, %53
  store double %61, ptr %59, align 8, !tbaa !22
  br label %62

62:                                               ; preds = %50, %47
  br i1 %.not39, label %63, label %197

63:                                               ; preds = %62
  %64 = tail call noundef i64 @_Z13get_sys_clockv()
  call void @_ZN12TxnTablePool3getEmRP8txn_node(ptr noundef nonnull align 8 dereferenceable(16) @txn_table_pool, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %65 = load ptr, ptr @simulation, align 8, !tbaa !12
  %66 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %65)
  br i1 %66, label %67, label %79

67:                                               ; preds = %63
  %68 = call noundef i64 @_Z13get_sys_clockv()
  %69 = sub i64 %68, %64
  %70 = uitofp i64 %69 to double
  %71 = load ptr, ptr @stats, align 8, !tbaa !15
  %72 = getelementptr inbounds ptr, ptr %71, i64 %1
  %73 = load ptr, ptr %72, align 8, !tbaa !12
  %74 = getelementptr inbounds i8, ptr %73, i64 1888
  %75 = load ptr, ptr %74, align 8, !tbaa !17
  %76 = getelementptr inbounds i8, ptr %75, i64 168
  %77 = load double, ptr %76, align 8, !tbaa !22
  %78 = fadd double %77, %70
  store double %78, ptr %76, align 8, !tbaa !22
  br label %79

79:                                               ; preds = %67, %63
  %80 = call noundef i64 @_Z13get_sys_clockv()
  call void @_ZN10TxnManPool3getEmRP10TxnManager(ptr noundef nonnull align 8 dereferenceable(16) @txn_man_pool, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %81 = load ptr, ptr @simulation, align 8, !tbaa !12
  %82 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %81)
  br i1 %82, label %83, label %95

83:                                               ; preds = %79
  %84 = call noundef i64 @_Z13get_sys_clockv()
  %85 = sub i64 %84, %80
  %86 = uitofp i64 %85 to double
  %87 = load ptr, ptr @stats, align 8, !tbaa !15
  %88 = getelementptr inbounds ptr, ptr %87, i64 %1
  %89 = load ptr, ptr %88, align 8, !tbaa !12
  %90 = getelementptr inbounds i8, ptr %89, i64 1888
  %91 = load ptr, ptr %90, align 8, !tbaa !17
  %92 = getelementptr inbounds i8, ptr %91, i64 176
  %93 = load double, ptr %92, align 8, !tbaa !22
  %94 = fadd double %93, %86
  store double %94, ptr %92, align 8, !tbaa !22
  br label %95

95:                                               ; preds = %83, %79
  %96 = call noundef i64 @_Z13get_sys_clockv()
  %97 = load ptr, ptr %6, align 8, !tbaa !12
  call void @_ZN10TxnManager10set_txn_idEm(ptr noundef nonnull align 8 dereferenceable(544) %97, i64 noundef %2)
  %98 = load ptr, ptr %6, align 8, !tbaa !12
  call void @_ZN10TxnManager12set_batch_idEm(ptr noundef nonnull align 8 dereferenceable(544) %98, i64 noundef %3)
  %99 = load ptr, ptr %6, align 8, !tbaa !12
  %100 = load ptr, ptr %5, align 8, !tbaa !12
  store ptr %99, ptr %100, align 8, !tbaa !26
  %101 = call noundef i64 @_Z13get_sys_clockv()
  %102 = load ptr, ptr %6, align 8, !tbaa !12
  %103 = getelementptr inbounds i8, ptr %102, i64 176
  store i64 %101, ptr %103, align 8, !tbaa !30
  %104 = getelementptr inbounds i8, ptr %102, i64 184
  store i64 %101, ptr %104, align 8, !tbaa !37
  %105 = load ptr, ptr %5, align 8, !tbaa !12
  %106 = getelementptr inbounds i8, ptr %105, i64 32
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %106, i8 0, i64 16, i1 false)
  %107 = load ptr, ptr %10, align 8, !tbaa !11
  %108 = getelementptr inbounds ptr, ptr %107, i64 %9
  %109 = load ptr, ptr %108, align 8, !tbaa !12
  %110 = getelementptr inbounds i8, ptr %109, i64 8
  %111 = load ptr, ptr %110, align 8, !tbaa !38
  %.not40 = icmp eq ptr %111, null
  br i1 %.not40, label %118, label %112

112:                                              ; preds = %95
  %113 = getelementptr inbounds i8, ptr %105, i64 40
  store ptr %111, ptr %113, align 8, !tbaa !39
  %114 = load ptr, ptr %108, align 8, !tbaa !12
  %115 = getelementptr inbounds i8, ptr %114, i64 8
  %116 = load ptr, ptr %115, align 8, !tbaa !38
  %117 = getelementptr inbounds i8, ptr %116, i64 32
  store ptr %105, ptr %117, align 8, !tbaa !28
  br label %120

118:                                              ; preds = %95
  store ptr %105, ptr %109, align 8, !tbaa !23
  %119 = load ptr, ptr %5, align 8, !tbaa !12
  br label %120

120:                                              ; preds = %118, %112
  %.sink = phi ptr [ %119, %118 ], [ %105, %112 ]
  %121 = load ptr, ptr %108, align 8, !tbaa !12
  %122 = getelementptr inbounds i8, ptr %121, i64 8
  store ptr %.sink, ptr %122, align 8, !tbaa !38
  %123 = load ptr, ptr @simulation, align 8, !tbaa !12
  %124 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %123)
  br i1 %124, label %125, label %137

125:                                              ; preds = %120
  %126 = call noundef i64 @_Z13get_sys_clockv()
  %127 = sub i64 %126, %96
  %128 = uitofp i64 %127 to double
  %129 = load ptr, ptr @stats, align 8, !tbaa !15
  %130 = getelementptr inbounds ptr, ptr %129, i64 %1
  %131 = load ptr, ptr %130, align 8, !tbaa !12
  %132 = getelementptr inbounds i8, ptr %131, i64 1888
  %133 = load ptr, ptr %132, align 8, !tbaa !17
  %134 = getelementptr inbounds i8, ptr %133, i64 184
  %135 = load double, ptr %134, align 8, !tbaa !22
  %136 = fadd double %135, %128
  store double %136, ptr %134, align 8, !tbaa !22
  br label %137

137:                                              ; preds = %125, %120
  %138 = call noundef i64 @_Z13get_sys_clockv()
  %139 = load ptr, ptr %10, align 8, !tbaa !11
  %140 = getelementptr inbounds ptr, ptr %139, i64 %9
  %141 = load ptr, ptr %140, align 8, !tbaa !12
  %142 = getelementptr inbounds i8, ptr %141, i64 24
  %143 = load i64, ptr %142, align 8, !tbaa !40
  %144 = add i64 %143, 1
  store i64 %144, ptr %142, align 8, !tbaa !40
  %145 = icmp ugt i64 %144, 1
  br i1 %145, label %146, label %172

146:                                              ; preds = %137
  %147 = load ptr, ptr @simulation, align 8, !tbaa !12
  %148 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %147)
  br i1 %148, label %149, label %156

149:                                              ; preds = %146
  %150 = load ptr, ptr @stats, align 8, !tbaa !15
  %151 = getelementptr inbounds ptr, ptr %150, i64 %1
  %152 = load ptr, ptr %151, align 8, !tbaa !12
  %153 = getelementptr inbounds i8, ptr %152, i64 1272
  %154 = load i64, ptr %153, align 8, !tbaa !41
  %155 = add i64 %154, 1
  store i64 %155, ptr %153, align 8, !tbaa !41
  br label %156

156:                                              ; preds = %149, %146
  %157 = load ptr, ptr @simulation, align 8, !tbaa !12
  %158 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %157)
  br i1 %158, label %159, label %172

159:                                              ; preds = %156
  %160 = load ptr, ptr %10, align 8, !tbaa !11
  %161 = getelementptr inbounds ptr, ptr %160, i64 %9
  %162 = load ptr, ptr %161, align 8, !tbaa !12
  %163 = getelementptr inbounds i8, ptr %162, i64 24
  %164 = load i64, ptr %163, align 8, !tbaa !40
  %165 = add i64 %164, -1
  %166 = load ptr, ptr @stats, align 8, !tbaa !15
  %167 = getelementptr inbounds ptr, ptr %166, i64 %1
  %168 = load ptr, ptr %167, align 8, !tbaa !12
  %169 = getelementptr inbounds i8, ptr %168, i64 1280
  %170 = load i64, ptr %169, align 8, !tbaa !42
  %171 = add i64 %165, %170
  store i64 %171, ptr %169, align 8, !tbaa !42
  br label %172

172:                                              ; preds = %156, %159, %137
  %173 = load ptr, ptr @simulation, align 8, !tbaa !12
  %174 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %173)
  br i1 %174, label %175, label %182

175:                                              ; preds = %172
  %176 = load ptr, ptr @stats, align 8, !tbaa !15
  %177 = getelementptr inbounds ptr, ptr %176, i64 %1
  %178 = load ptr, ptr %177, align 8, !tbaa !12
  %179 = getelementptr inbounds i8, ptr %178, i64 1248
  %180 = load i64, ptr %179, align 8, !tbaa !43
  %181 = add i64 %180, 1
  store i64 %181, ptr %179, align 8, !tbaa !43
  br label %182

182:                                              ; preds = %175, %172
  %183 = load ptr, ptr @simulation, align 8, !tbaa !12
  %184 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %183)
  br i1 %184, label %185, label %197

185:                                              ; preds = %182
  %186 = call noundef i64 @_Z13get_sys_clockv()
  %187 = sub i64 %186, %138
  %188 = uitofp i64 %187 to double
  %189 = load ptr, ptr @stats, align 8, !tbaa !15
  %190 = getelementptr inbounds ptr, ptr %189, i64 %1
  %191 = load ptr, ptr %190, align 8, !tbaa !12
  %192 = getelementptr inbounds i8, ptr %191, i64 1888
  %193 = load ptr, ptr %192, align 8, !tbaa !17
  %194 = getelementptr inbounds i8, ptr %193, i64 192
  %195 = load double, ptr %194, align 8, !tbaa !22
  %196 = fadd double %195, %188
  store double %196, ptr %194, align 8, !tbaa !22
  br label %197

197:                                              ; preds = %182, %185, %62
  %198 = load ptr, ptr %10, align 8, !tbaa !11
  %199 = getelementptr inbounds ptr, ptr %198, i64 %9
  %200 = load ptr, ptr %199, align 8, !tbaa !12
  %201 = getelementptr inbounds i8, ptr %200, i64 16
  %202 = cmpxchg ptr %201, i8 1, i8 0 seq_cst seq_cst, align 8
  %203 = load ptr, ptr @simulation, align 8, !tbaa !12
  %204 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %203)
  br i1 %204, label %205, label %215

205:                                              ; preds = %197
  %206 = call noundef i64 @_Z13get_sys_clockv()
  %207 = sub i64 %206, %7
  %208 = uitofp i64 %207 to double
  %209 = load ptr, ptr @stats, align 8, !tbaa !15
  %210 = getelementptr inbounds ptr, ptr %209, i64 %1
  %211 = load ptr, ptr %210, align 8, !tbaa !12
  %212 = getelementptr inbounds i8, ptr %211, i64 1288
  %213 = load double, ptr %212, align 8, !tbaa !44
  %214 = fadd double %213, %208
  store double %214, ptr %212, align 8, !tbaa !44
  br label %215

215:                                              ; preds = %205, %197
  %216 = load ptr, ptr @simulation, align 8, !tbaa !12
  %217 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %216)
  br i1 %217, label %218, label %225

218:                                              ; preds = %215
  %219 = load ptr, ptr @stats, align 8, !tbaa !15
  %220 = getelementptr inbounds ptr, ptr %219, i64 %1
  %221 = load ptr, ptr %220, align 8, !tbaa !12
  %222 = getelementptr inbounds i8, ptr %221, i64 1256
  %223 = load i64, ptr %222, align 8, !tbaa !45
  %224 = add i64 %223, 1
  store i64 %224, ptr %222, align 8, !tbaa !45
  br label %225

225:                                              ; preds = %218, %215
  %226 = load ptr, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  ret ptr %226
}

declare noundef i64 @_Z13get_sys_clockv() local_unnamed_addr #2

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

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

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

declare void @_ZN10TxnManager10set_txn_idEm(ptr noundef nonnull align 8 dereferenceable(544), i64 noundef) local_unnamed_addr #2

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

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass