; LLVM IR from mitdbg/deneva :: concurrency_control/row_lock.ll (ZN8Row_lock12lock_releaseEP10TxnManager)

; 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.Manager = type { %union.pthread_mutex_t, i64, [31 x %union.pthread_mutex_t], ptr, ptr, i64, i64 }
%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.TxnTable = type { i64, ptr }
%class.Row_lock = type { ptr, i8, ptr, i32, i32, i32, ptr, i64, ptr, ptr, 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 }
%struct.LockEntry = type { i32, i64, ptr, 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] }

@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@simulation = external global ptr, align 8
@stats = external global %class.Stats, align 8
@g_central_man = external global i8, align 1
@glob_manager = external global %class.Manager, align 8
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN8Row_lock12lock_releaseEP10TxnManager = external hidden unnamed_addr constant [40 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@txn_table = external global %class.TxnTable, 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

declare noundef i64 @_Z13get_sys_clockv() #2

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

declare noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544)) #2

declare void @_ZN7Manager11release_rowEP5row_t(ptr noundef nonnull align 8 dereferenceable(1320), ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8Row_lock12lock_releaseEP10TxnManager(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %14 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %14, ptr %5, align 8, !tbaa !9
  %15 = load i8, ptr @g_central_man, align 1, !tbaa !11, !range !13, !noundef !14
  %16 = trunc i8 %15 to i1
  br i1 %16, label %17, label %20

17:                                               ; preds = %2
  %18 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 2
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  call void @_ZN7Manager8lock_rowEP5row_t(ptr noundef nonnull align 8 dereferenceable(1320) @glob_manager, ptr noundef %19)
  br label %43

20:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %21 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %21, ptr %6, align 8, !tbaa !9
  %22 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !19
  %24 = call i32 @pthread_mutex_lock(ptr noundef %23) #6
  %25 = load ptr, ptr @simulation, align 8, !tbaa !5
  %26 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %25)
  br i1 %26, label %27, label %42

27:                                               ; preds = %20
  %28 = call noundef i64 @_Z13get_sys_clockv()
  %29 = load i64, ptr %6, align 8, !tbaa !9
  %30 = sub i64 %28, %29
  %31 = uitofp i64 %30 to double
  %32 = load ptr, ptr @stats, align 8, !tbaa !20
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %33)
  %35 = getelementptr inbounds ptr, ptr %32, i64 %34
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds %class.Stats_thd, ptr %36, i32 0, i32 197
  %38 = load ptr, ptr %37, align 8, !tbaa !22
  %39 = getelementptr inbounds double, ptr %38, i64 18
  %40 = load double, ptr %39, align 8, !tbaa !27
  %41 = fadd double %40, %31
  store double %41, ptr %39, align 8, !tbaa !27
  br label %42

42:                                               ; preds = %27, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %43

43:                                               ; preds = %42, %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %44 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 6
  %45 = load ptr, ptr %44, align 8, !tbaa !28
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %46)
  %48 = call noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88) %13, i64 noundef %47)
  %49 = getelementptr inbounds ptr, ptr %45, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !5
  store ptr %50, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %62, %43
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %60

54:                                               ; preds = %51
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.LockEntry, ptr %55, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !29
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = icmp ne ptr %57, %58
  br label %60

60:                                               ; preds = %54, %51
  %61 = phi i1 [ false, %51 ], [ %59, %54 ]
  br i1 %61, label %62, label %67

62:                                               ; preds = %60
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %63, ptr %8, align 8, !tbaa !5
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.LockEntry, ptr %64, i32 0, i32 3
  %66 = load ptr, ptr %65, align 8, !tbaa !31
  store ptr %66, ptr %7, align 8, !tbaa !5
  br label %51, !llvm.loop !32

67:                                               ; preds = %60
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %194

70:                                               ; preds = %67
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %79

73:                                               ; preds = %70
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.LockEntry, ptr %74, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !31
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.LockEntry, ptr %77, i32 0, i32 3
  store ptr %76, ptr %78, align 8, !tbaa !31
  br label %89

79:                                               ; preds = %70
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.LockEntry, ptr %80, i32 0, i32 3
  %82 = load ptr, ptr %81, align 8, !tbaa !31
  %83 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 6
  %84 = load ptr, ptr %83, align 8, !tbaa !28
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %85)
  %87 = call noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88) %13, i64 noundef %86)
  %88 = getelementptr inbounds ptr, ptr %84, i64 %87
  store ptr %82, ptr %88, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %79, %73
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN8Row_lock12return_entryEP9LockEntry(ptr noundef nonnull align 8 dereferenceable(88) %13, ptr noundef %90)
  %91 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 4
  %92 = load i32, ptr %91, align 4, !tbaa !34
  %93 = add i32 %92, -1
  store i32 %93, ptr %91, align 4, !tbaa !34
  %94 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 4
  %95 = load i32, ptr %94, align 4, !tbaa !34
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %193

97:                                               ; preds = %89
  %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 %109

100:                                              ; preds = %97
  %101 = load ptr, ptr @stats, align 8, !tbaa !20
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %102)
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = getelementptr inbounds %class.Stats_thd, ptr %105, i32 0, i32 84
  %107 = load i64, ptr %106, align 8, !tbaa !35
  %108 = add i64 %107, 1
  store i64 %108, ptr %106, align 8, !tbaa !35
  br label %109

109:                                              ; preds = %100, %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %110 = call noundef i64 @_Z13get_sys_clockv()
  store i64 %110, ptr %9, align 8, !tbaa !9
  %111 = load ptr, ptr @simulation, align 8, !tbaa !5
  %112 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %111)
  br i1 %112, label %113, label %127

113:                                              ; preds = %109
  %114 = load i64, ptr %9, align 8, !tbaa !9
  %115 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 11
  %116 = load i64, ptr %115, align 8, !tbaa !36
  %117 = sub i64 %114, %116
  %118 = uitofp i64 %117 to double
  %119 = load ptr, ptr @stats, align 8, !tbaa !20
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %120)
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = getelementptr inbounds %class.Stats_thd, ptr %123, i32 0, i32 89
  %125 = load double, ptr %124, align 8, !tbaa !37
  %126 = fadd double %125, %118
  store double %126, ptr %124, align 8, !tbaa !37
  br label %127

127:                                              ; preds = %113, %109
  %128 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 3
  %129 = load i32, ptr %128, align 8, !tbaa !38
  %130 = icmp eq i32 %129, 1
  br i1 %130, label %131, label %161

131:                                              ; preds = %127
  %132 = load ptr, ptr @simulation, align 8, !tbaa !5
  %133 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %132)
  br i1 %133, label %134, label %148

134:                                              ; preds = %131
  %135 = load i64, ptr %9, align 8, !tbaa !9
  %136 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 11
  %137 = load i64, ptr %136, align 8, !tbaa !36
  %138 = sub i64 %135, %137
  %139 = uitofp i64 %138 to double
  %140 = load ptr, ptr @stats, align 8, !tbaa !20
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %141)
  %143 = getelementptr inbounds ptr, ptr %140, i64 %142
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  %145 = getelementptr inbounds %class.Stats_thd, ptr %144, i32 0, i32 90
  %146 = load double, ptr %145, align 8, !tbaa !39
  %147 = fadd double %146, %139
  store double %147, ptr %145, align 8, !tbaa !39
  br label %148

148:                                              ; preds = %134, %131
  %149 = load ptr, ptr @simulation, align 8, !tbaa !5
  %150 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %149)
  br i1 %150, label %151, label %160

151:                                              ; preds = %148
  %152 = load ptr, ptr @stats, align 8, !tbaa !20
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %153)
  %155 = getelementptr inbounds ptr, ptr %152, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = getelementptr inbounds %class.Stats_thd, ptr %156, i32 0, i32 85
  %158 = load i64, ptr %157, align 8, !tbaa !40
  %159 = add i64 %158, 1
  store i64 %159, ptr %157, align 8, !tbaa !40
  br label %160

160:                                              ; preds = %151, %148
  br label %191

161:                                              ; preds = %127
  %162 = load ptr, ptr @simulation, align 8, !tbaa !5
  %163 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %162)
  br i1 %163, label %164, label %178

164:                                              ; preds = %161
  %165 = load i64, ptr %9, align 8, !tbaa !9
  %166 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 11
  %167 = load i64, ptr %166, align 8, !tbaa !36
  %168 = sub i64 %165, %167
  %169 = uitofp i64 %168 to double
  %170 = load ptr, ptr @stats, align 8, !tbaa !20
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %171)
  %173 = getelementptr inbounds ptr, ptr %170, i64 %172
  %174 = load ptr, ptr %173, align 8, !tbaa !5
  %175 = getelementptr inbounds %class.Stats_thd, ptr %174, i32 0, i32 91
  %176 = load double, ptr %175, align 8, !tbaa !41
  %177 = fadd double %176, %169
  store double %177, ptr %175, align 8, !tbaa !41
  br label %178

178:                                              ; preds = %164, %161
  %179 = load ptr, ptr @simulation, align 8, !tbaa !5
  %180 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %179)
  br i1 %180, label %181, label %190

181:                                              ; preds = %178
  %182 = load ptr, ptr @stats, align 8, !tbaa !20
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %183)
  %185 = getelementptr inbounds ptr, ptr %182, i64 %184
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  %187 = getelementptr inbounds %class.Stats_thd, ptr %186, i32 0, i32 86
  %188 = load i64, ptr %187, align 8, !tbaa !42
  %189 = add i64 %188, 1
  store i64 %189, ptr %187, align 8, !tbaa !42
  br label %190

190:                                              ; preds = %181, %178
  br label %191

191:                                              ; preds = %190, %160
  %192 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 3
  store i32 2, ptr %192, align 8, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %193

193:                                              ; preds = %191, %89
  br label %195

194:                                              ; preds = %67
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 290, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_lock12lock_releaseEP10TxnManager) #7
  unreachable

195:                                              ; preds = %193
  %196 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 4
  %197 = load i32, ptr %196, align 4, !tbaa !34
  %198 = icmp eq i32 %197, 0
  br i1 %198, label %199, label %207

199:                                              ; preds = %195
  %200 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 3
  %201 = load i32, ptr %200, align 8, !tbaa !38
  %202 = icmp eq i32 %201, 2
  br i1 %202, label %203, label %204

203:                                              ; preds = %199
  br label %206

204:                                              ; preds = %199
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 307, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_lock12lock_releaseEP10TxnManager) #7
  unreachable

205:                                              ; No predecessors!
  br label %206

206:                                              ; preds = %205, %203
  br label %207

207:                                              ; preds = %206, %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  br label %208

208:                                              ; preds = %376, %207
  %209 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 8
  %210 = load ptr, ptr %209, align 8, !tbaa !43
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %221

212:                                              ; preds = %208
  %213 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 3
  %214 = load i32, ptr %213, align 8, !tbaa !38
  %215 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 8
  %216 = load ptr, ptr %215, align 8, !tbaa !43
  %217 = getelementptr inbounds %struct.LockEntry, ptr %216, i32 0, i32 0
  %218 = load i32, ptr %217, align 8, !tbaa !44
  %219 = call noundef zeroext i1 @_ZN8Row_lock13conflict_lockE6lock_tS0_(ptr noundef nonnull align 8 dereferenceable(88) %13, i32 noundef %214, i32 noundef %218)
  %220 = xor i1 %219, true
  br label %221

221:                                              ; preds = %212, %208
  %222 = phi i1 [ false, %208 ], [ %220, %212 ]
  br i1 %222, label %223, label %381

223:                                              ; preds = %221
  %224 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 8
  %225 = load ptr, ptr %224, align 8, !tbaa !43
  store ptr %225, ptr %10, align 8, !tbaa !5
  %226 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 8
  %227 = load ptr, ptr %226, align 8, !tbaa !43
  %228 = icmp ne ptr %227, null
  br i1 %228, label %229, label %235

229:                                              ; preds = %223
  %230 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 8
  %231 = load ptr, ptr %230, align 8, !tbaa !43
  %232 = getelementptr inbounds %struct.LockEntry, ptr %231, i32 0, i32 3
  %233 = load ptr, ptr %232, align 8, !tbaa !31
  %234 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 8
  store ptr %233, ptr %234, align 8, !tbaa !43
  br label %235

235:                                              ; preds = %229, %223
  %236 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 8
  %237 = load ptr, ptr %236, align 8, !tbaa !43
  %238 = icmp ne ptr %237, null
  br i1 %238, label %239, label %243

239:                                              ; preds = %235
  %240 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 8
  %241 = load ptr, ptr %240, align 8, !tbaa !43
  %242 = getelementptr inbounds %struct.LockEntry, ptr %241, i32 0, i32 4
  store ptr null, ptr %242, align 8, !tbaa !45
  br label %245

243:                                              ; preds = %235
  %244 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 9
  store ptr null, ptr %244, align 8, !tbaa !46
  br label %245

245:                                              ; preds = %243, %239
  %246 = load ptr, ptr %10, align 8, !tbaa !5
  %247 = icmp ne ptr %246, null
  br i1 %247, label %248, label %251

248:                                              ; preds = %245
  %249 = load ptr, ptr %10, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.LockEntry, ptr %249, i32 0, i32 3
  store ptr null, ptr %250, align 8, !tbaa !31
  br label %251

251:                                              ; preds = %248, %245
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %252 = call noundef i64 @_Z13get_sys_clockv()
  %253 = load ptr, ptr %10, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.LockEntry, ptr %253, i32 0, i32 2
  %255 = load ptr, ptr %254, align 8, !tbaa !29
  %256 = getelementptr inbounds %class.TxnManager, ptr %255, i32 0, i32 17
  %257 = load i64, ptr %256, align 8, !tbaa !47
  %258 = sub i64 %252, %257
  store i64 %258, ptr %11, align 8, !tbaa !9
  %259 = load ptr, ptr %10, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.LockEntry, ptr %259, i32 0, i32 2
  %261 = load ptr, ptr %260, align 8, !tbaa !29
  %262 = getelementptr inbounds %class.TxnManager, ptr %261, i32 0, i32 17
  store i64 0, ptr %262, align 8, !tbaa !47
  %263 = load i64, ptr %11, align 8, !tbaa !9
  %264 = uitofp i64 %263 to double
  %265 = load ptr, ptr %10, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.LockEntry, ptr %265, i32 0, i32 2
  %267 = load ptr, ptr %266, align 8, !tbaa !29
  %268 = getelementptr inbounds %class.TxnManager, ptr %267, i32 0, i32 25
  %269 = getelementptr inbounds %class.TxnStats, ptr %268, i32 0, i32 19
  %270 = load double, ptr %269, align 8, !tbaa !53
  %271 = fadd double %270, %264
  store double %271, ptr %269, align 8, !tbaa !53
  %272 = load i64, ptr %11, align 8, !tbaa !9
  %273 = uitofp i64 %272 to double
  %274 = load ptr, ptr %10, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.LockEntry, ptr %274, i32 0, i32 2
  %276 = load ptr, ptr %275, align 8, !tbaa !29
  %277 = getelementptr inbounds %class.TxnManager, ptr %276, i32 0, i32 25
  %278 = getelementptr inbounds %class.TxnStats, ptr %277, i32 0, i32 25
  %279 = load double, ptr %278, align 8, !tbaa !54
  %280 = fadd double %279, %273
  store double %280, ptr %278, align 8, !tbaa !54
  %281 = load ptr, ptr @simulation, align 8, !tbaa !5
  %282 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %281)
  br i1 %282, label %283, label %294

283:                                              ; preds = %251
  %284 = load i64, ptr %11, align 8, !tbaa !9
  %285 = uitofp i64 %284 to double
  %286 = load ptr, ptr @stats, align 8, !tbaa !20
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  %288 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %287)
  %289 = getelementptr inbounds ptr, ptr %286, i64 %288
  %290 = load ptr, ptr %289, align 8, !tbaa !5
  %291 = getelementptr inbounds %class.Stats_thd, ptr %290, i32 0, i32 93
  %292 = load double, ptr %291, align 8, !tbaa !55
  %293 = fadd double %292, %285
  store double %293, ptr %291, align 8, !tbaa !55
  br label %294

294:                                              ; preds = %283, %251
  %295 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 6
  %296 = load ptr, ptr %295, align 8, !tbaa !28
  %297 = load ptr, ptr %10, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.LockEntry, ptr %297, i32 0, i32 2
  %299 = load ptr, ptr %298, align 8, !tbaa !29
  %300 = call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %299)
  %301 = call noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88) %13, i64 noundef %300)
  %302 = getelementptr inbounds ptr, ptr %296, i64 %301
  %303 = load ptr, ptr %302, align 8, !tbaa !5
  %304 = load ptr, ptr %10, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.LockEntry, ptr %304, i32 0, i32 3
  store ptr %303, ptr %305, align 8, !tbaa !31
  %306 = load ptr, ptr %10, align 8, !tbaa !5
  %307 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 6
  %308 = load ptr, ptr %307, align 8, !tbaa !28
  %309 = load ptr, ptr %10, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.LockEntry, ptr %309, i32 0, i32 2
  %311 = load ptr, ptr %310, align 8, !tbaa !29
  %312 = call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %311)
  %313 = call noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88) %13, i64 noundef %312)
  %314 = getelementptr inbounds ptr, ptr %308, i64 %313
  store ptr %306, ptr %314, align 8, !tbaa !5
  %315 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 4
  %316 = load i32, ptr %315, align 4, !tbaa !34
  %317 = add i32 %316, 1
  store i32 %317, ptr %315, align 4, !tbaa !34
  %318 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 5
  %319 = load i32, ptr %318, align 8, !tbaa !56
  %320 = add i32 %319, -1
  store i32 %320, ptr %318, align 8, !tbaa !56
  %321 = load ptr, ptr %10, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.LockEntry, ptr %321, i32 0, i32 2
  %323 = load ptr, ptr %322, align 8, !tbaa !29
  %324 = call noundef i64 @_ZN10TxnManager13get_timestampEv(ptr noundef nonnull align 8 dereferenceable(544) %323)
  %325 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 10
  %326 = load i64, ptr %325, align 8, !tbaa !57
  %327 = icmp ugt i64 %324, %326
  br i1 %327, label %328, label %334

328:                                              ; preds = %294
  %329 = load ptr, ptr %10, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.LockEntry, ptr %329, i32 0, i32 2
  %331 = load ptr, ptr %330, align 8, !tbaa !29
  %332 = call noundef i64 @_ZN10TxnManager13get_timestampEv(ptr noundef nonnull align 8 dereferenceable(544) %331)
  %333 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 10
  store i64 %332, ptr %333, align 8, !tbaa !57
  br label %334

334:                                              ; preds = %328, %294
  %335 = load ptr, ptr %10, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.LockEntry, ptr %335, i32 0, i32 2
  %337 = load ptr, ptr %336, align 8, !tbaa !29
  %338 = getelementptr inbounds %class.TxnManager, ptr %337, i32 0, i32 5
  %339 = load volatile i32, ptr %338, align 8, !tbaa !58
  %340 = icmp eq i32 %339, 0
  br i1 %340, label %341, label %342

341:                                              ; preds = %334
  br label %344

342:                                              ; preds = %334
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 339, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_lock12lock_releaseEP10TxnManager) #7
  unreachable

343:                                              ; No predecessors!
  br label %344

344:                                              ; preds = %343, %341
  %345 = load ptr, ptr %10, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.LockEntry, ptr %345, i32 0, i32 2
  %347 = load ptr, ptr %346, align 8, !tbaa !29
  %348 = call noundef i64 @_ZN10TxnManager7decr_lrEv(ptr noundef nonnull align 8 dereferenceable(544) %347)
  %349 = icmp eq i64 %348, 0
  br i1 %349, label %350, label %369

350:                                              ; preds = %344
  %351 = load ptr, ptr %10, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.LockEntry, ptr %351, i32 0, i32 2
  %353 = load ptr, ptr %352, align 8, !tbaa !29
  %354 = getelementptr inbounds %class.TxnManager, ptr %353, i32 0, i32 5
  %355 = cmpxchg ptr %354, i32 0, i32 1 seq_cst seq_cst, align 8
  %356 = extractvalue { i32, i1 } %355, 1
  br i1 %356, label %357, label %368

357:                                              ; preds = %350
  %358 = load ptr, ptr %4, align 8, !tbaa !5
  %359 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %358)
  %360 = load ptr, ptr %10, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.LockEntry, ptr %360, i32 0, i32 2
  %362 = load ptr, ptr %361, align 8, !tbaa !29
  %363 = call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %362)
  %364 = load ptr, ptr %10, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.LockEntry, ptr %364, i32 0, i32 2
  %366 = load ptr, ptr %365, align 8, !tbaa !29
  %367 = call noundef i64 @_ZN10TxnManager12get_batch_idEv(ptr noundef nonnull align 8 dereferenceable(544) %366)
  call void @_ZN8TxnTable11restart_txnEmmm(ptr noundef nonnull align 8 dereferenceable(16) @txn_table, i64 noundef %359, i64 noundef %363, i64 noundef %367)
  br label %368

368:                                              ; preds = %357, %350
  br label %369

369:                                              ; preds = %368, %344
  %370 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 3
  %371 = load i32, ptr %370, align 8, !tbaa !38
  %372 = icmp eq i32 %371, 2
  br i1 %372, label %373, label %376

373:                                              ; preds = %369
  %374 = call noundef i64 @_Z13get_sys_clockv()
  %375 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 11
  store i64 %374, ptr %375, align 8, !tbaa !36
  br label %376

376:                                              ; preds = %373, %369
  %377 = load ptr, ptr %10, align 8, !tbaa !5
  %378 = getelementptr inbounds %struct.LockEntry, ptr %377, i32 0, i32 0
  %379 = load i32, ptr %378, align 8, !tbaa !44
  %380 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 3
  store i32 %379, ptr %380, align 8, !tbaa !38
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %208, !llvm.loop !59

381:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %382 = call noundef i64 @_Z13get_sys_clockv()
  %383 = load i64, ptr %5, align 8, !tbaa !9
  %384 = sub i64 %382, %383
  store i64 %384, ptr %12, align 8, !tbaa !9
  %385 = load i64, ptr %12, align 8, !tbaa !9
  %386 = uitofp i64 %385 to double
  %387 = load ptr, ptr %4, align 8, !tbaa !5
  %388 = getelementptr inbounds %class.TxnManager, ptr %387, i32 0, i32 25
  %389 = getelementptr inbounds %class.TxnStats, ptr %388, i32 0, i32 21
  %390 = load double, ptr %389, align 8, !tbaa !60
  %391 = fadd double %390, %386
  store double %391, ptr %389, align 8, !tbaa !60
  %392 = load i64, ptr %12, align 8, !tbaa !9
  %393 = uitofp i64 %392 to double
  %394 = load ptr, ptr %4, align 8, !tbaa !5
  %395 = getelementptr inbounds %class.TxnManager, ptr %394, i32 0, i32 25
  %396 = getelementptr inbounds %class.TxnStats, ptr %395, i32 0, i32 26
  %397 = load double, ptr %396, align 8, !tbaa !61
  %398 = fadd double %397, %393
  store double %398, ptr %396, align 8, !tbaa !61
  %399 = load ptr, ptr @simulation, align 8, !tbaa !5
  %400 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %399)
  br i1 %400, label %401, label %412

401:                                              ; preds = %381
  %402 = load i64, ptr %12, align 8, !tbaa !9
  %403 = uitofp i64 %402 to double
  %404 = load ptr, ptr @stats, align 8, !tbaa !20
  %405 = load ptr, ptr %4, align 8, !tbaa !5
  %406 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %405)
  %407 = getelementptr inbounds ptr, ptr %404, i64 %406
  %408 = load ptr, ptr %407, align 8, !tbaa !5
  %409 = getelementptr inbounds %class.Stats_thd, ptr %408, i32 0, i32 97
  %410 = load double, ptr %409, align 8, !tbaa !62
  %411 = fadd double %410, %403
  store double %411, ptr %409, align 8, !tbaa !62
  br label %412

412:                                              ; preds = %401, %381
  %413 = load ptr, ptr @simulation, align 8, !tbaa !5
  %414 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %413)
  br i1 %414, label %415, label %424

415:                                              ; preds = %412
  %416 = load ptr, ptr @stats, align 8, !tbaa !20
  %417 = load ptr, ptr %4, align 8, !tbaa !5
  %418 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %417)
  %419 = getelementptr inbounds ptr, ptr %416, i64 %418
  %420 = load ptr, ptr %419, align 8, !tbaa !5
  %421 = getelementptr inbounds %class.Stats_thd, ptr %420, i32 0, i32 95
  %422 = load i64, ptr %421, align 8, !tbaa !63
  %423 = add i64 %422, 1
  store i64 %423, ptr %421, align 8, !tbaa !63
  br label %424

424:                                              ; preds = %415, %412
  %425 = load i8, ptr @g_central_man, align 1, !tbaa !11, !range !13, !noundef !14
  %426 = trunc i8 %425 to i1
  br i1 %426, label %427, label %430

427:                                              ; preds = %424
  %428 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 2
  %429 = load ptr, ptr %428, align 8, !tbaa !15
  call void @_ZN7Manager11release_rowEP5row_t(ptr noundef nonnull align 8 dereferenceable(1320) @glob_manager, ptr noundef %429)
  br label %434

430:                                              ; preds = %424
  %431 = getelementptr inbounds %class.Row_lock, ptr %13, i32 0, i32 0
  %432 = load ptr, ptr %431, align 8, !tbaa !19
  %433 = call i32 @pthread_mutex_unlock(ptr noundef %432) #6
  br label %434

434:                                              ; preds = %430, %427
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret i32 0
}

declare void @_ZN7Manager8lock_rowEP5row_t(ptr noundef nonnull align 8 dereferenceable(1320), ptr noundef) #2

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

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

declare noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8Row_lock12return_entryEP9LockEntry(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8Row_lock13conflict_lockE6lock_tS0_(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef) #5 align 2

declare noundef i64 @_ZN10TxnManager13get_timestampEv(ptr noundef nonnull align 8 dereferenceable(544)) #2

declare noundef i64 @_ZN10TxnManager7decr_lrEv(ptr noundef nonnull align 8 dereferenceable(544)) #2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

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


; 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.Manager = type { %union.pthread_mutex_t, i64, [31 x %union.pthread_mutex_t], ptr, ptr, i64, i64 }
%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.TxnTable = type { i64, ptr }

@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@simulation = external local_unnamed_addr global ptr, align 8
@stats = external local_unnamed_addr global %class.Stats, align 8
@g_central_man = external local_unnamed_addr global i8, align 1
@glob_manager = external global %class.Manager, align 8
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN8Row_lock12lock_releaseEP10TxnManager = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [32 x i8], align 1
@txn_table = external global %class.TxnTable, align 8

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

declare noundef i64 @_Z13get_sys_clockv() local_unnamed_addr #1

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

declare noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #1

declare void @_ZN7Manager11release_rowEP5row_t(ptr noundef nonnull align 8 dereferenceable(1320), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8Row_lock12lock_releaseEP10TxnManager(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1) local_unnamed_addr #3 align 2 {
  %3 = tail call noundef i64 @_Z13get_sys_clockv()
  %4 = load i8, ptr @g_central_man, align 1, !tbaa !5, !range !9, !noundef !10
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %9

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  tail call void @_ZN7Manager8lock_rowEP5row_t(ptr noundef nonnull align 8 dereferenceable(1320) @glob_manager, ptr noundef %8)
  br label %28

9:                                                ; preds = %2
  %10 = tail call noundef i64 @_Z13get_sys_clockv()
  %11 = load ptr, ptr %0, align 8, !tbaa !17
  %12 = tail call i32 @pthread_mutex_lock(ptr noundef %11) #5
  %13 = load ptr, ptr @simulation, align 8, !tbaa !18
  %14 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %13)
  br i1 %14, label %15, label %28

15:                                               ; preds = %9
  %16 = tail call noundef i64 @_Z13get_sys_clockv()
  %17 = sub i64 %16, %10
  %18 = uitofp i64 %17 to double
  %19 = load ptr, ptr @stats, align 8, !tbaa !19
  %20 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %21 = getelementptr inbounds ptr, ptr %19, i64 %20
  %22 = load ptr, ptr %21, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %22, i64 1888
  %24 = load ptr, ptr %23, align 8, !tbaa !21
  %25 = getelementptr inbounds i8, ptr %24, i64 144
  %26 = load double, ptr %25, align 8, !tbaa !26
  %27 = fadd double %26, %18
  store double %27, ptr %25, align 8, !tbaa !26
  br label %28

28:                                               ; preds = %9, %15, %6
  %29 = getelementptr inbounds i8, ptr %0, i64 40
  %30 = load ptr, ptr %29, align 8, !tbaa !27
  %31 = tail call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %32 = tail call noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88) %0, i64 noundef %31)
  %33 = getelementptr inbounds ptr, ptr %30, i64 %32
  %.074 = load ptr, ptr %33, align 8, !tbaa !18
  %.not75 = icmp eq ptr %.074, null
  br i1 %.not75, label %.critedge66, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %28
  %34 = getelementptr inbounds i8, ptr %.074, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !28
  %.not6199 = icmp eq ptr %35, %1
  br i1 %.not6199, label %.critedge, label %.lr.ph101

.lr.ph:                                           ; preds = %.lr.ph101
  %36 = getelementptr inbounds i8, ptr %.0, i64 16
  %37 = load ptr, ptr %36, align 8, !tbaa !28
  %.not61 = icmp eq ptr %37, %1
  br i1 %.not61, label %.critedge, label %.lr.ph101, !llvm.loop !30

.lr.ph101:                                        ; preds = %.lr.ph.preheader, %.lr.ph
  %.077100 = phi ptr [ %.0, %.lr.ph ], [ %.074, %.lr.ph.preheader ]
  %38 = getelementptr inbounds i8, ptr %.077100, i64 24
  %.0 = load ptr, ptr %38, align 8, !tbaa !18
  %.not = icmp eq ptr %.0, null
  br i1 %.not, label %.critedge66, label %.lr.ph, !llvm.loop !30

.critedge:                                        ; preds = %.lr.ph, %.lr.ph.preheader
  %.077.lcssa = phi ptr [ %.074, %.lr.ph.preheader ], [ %.0, %.lr.ph ]
  %.05776.lcssa = phi ptr [ null, %.lr.ph.preheader ], [ %.077100, %.lr.ph ]
  %.not62 = icmp eq ptr %.05776.lcssa, null
  %39 = getelementptr inbounds i8, ptr %.077.lcssa, i64 24
  %40 = load ptr, ptr %39, align 8, !tbaa !32
  br i1 %.not62, label %43, label %41

41:                                               ; preds = %.critedge
  %42 = getelementptr inbounds i8, ptr %.05776.lcssa, i64 24
  br label %48

43:                                               ; preds = %.critedge
  %44 = load ptr, ptr %29, align 8, !tbaa !27
  %45 = tail call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %46 = tail call noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88) %0, i64 noundef %45)
  %47 = getelementptr inbounds ptr, ptr %44, i64 %46
  br label %48

48:                                               ; preds = %43, %41
  %.sink = phi ptr [ %47, %43 ], [ %42, %41 ]
  store ptr %40, ptr %.sink, align 8, !tbaa !18
  tail call void @_ZN8Row_lock12return_entryEP9LockEntry(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull %.077.lcssa)
  %49 = getelementptr inbounds i8, ptr %0, i64 28
  %50 = load i32, ptr %49, align 4, !tbaa !33
  %51 = add i32 %50, -1
  store i32 %51, ptr %49, align 4, !tbaa !33
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %._crit_edge

._crit_edge:                                      ; preds = %48
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 24
  %.pre83 = load i32, ptr %.phi.trans.insert, align 8
  br label %.preheader

53:                                               ; preds = %48
  %54 = load ptr, ptr @simulation, align 8, !tbaa !18
  %55 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %54)
  br i1 %55, label %56, label %64

56:                                               ; preds = %53
  %57 = load ptr, ptr @stats, align 8, !tbaa !19
  %58 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %59 = getelementptr inbounds ptr, ptr %57, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !18
  %61 = getelementptr inbounds i8, ptr %60, i64 728
  %62 = load i64, ptr %61, align 8, !tbaa !34
  %63 = add i64 %62, 1
  store i64 %63, ptr %61, align 8, !tbaa !34
  br label %64

64:                                               ; preds = %56, %53
  %65 = tail call noundef i64 @_Z13get_sys_clockv()
  %66 = load ptr, ptr @simulation, align 8, !tbaa !18
  %67 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %66)
  br i1 %67, label %68, label %80

68:                                               ; preds = %64
  %69 = getelementptr inbounds i8, ptr %0, i64 80
  %70 = load i64, ptr %69, align 8, !tbaa !35
  %71 = sub i64 %65, %70
  %72 = uitofp i64 %71 to double
  %73 = load ptr, ptr @stats, align 8, !tbaa !19
  %74 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %75 = getelementptr inbounds ptr, ptr %73, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !18
  %77 = getelementptr inbounds i8, ptr %76, i64 768
  %78 = load double, ptr %77, align 8, !tbaa !36
  %79 = fadd double %78, %72
  store double %79, ptr %77, align 8, !tbaa !36
  br label %80

80:                                               ; preds = %68, %64
  %81 = getelementptr inbounds i8, ptr %0, i64 24
  %82 = load i32, ptr %81, align 8, !tbaa !37
  %83 = icmp eq i32 %82, 1
  %84 = load ptr, ptr @simulation, align 8, !tbaa !18
  %85 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %84)
  br i1 %83, label %86, label %102

86:                                               ; preds = %80
  br i1 %85, label %87, label %99

87:                                               ; preds = %86
  %88 = getelementptr inbounds i8, ptr %0, i64 80
  %89 = load i64, ptr %88, align 8, !tbaa !35
  %90 = sub i64 %65, %89
  %91 = uitofp i64 %90 to double
  %92 = load ptr, ptr @stats, align 8, !tbaa !19
  %93 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %94 = getelementptr inbounds ptr, ptr %92, i64 %93
  %95 = load ptr, ptr %94, align 8, !tbaa !18
  %96 = getelementptr inbounds i8, ptr %95, i64 776
  %97 = load double, ptr %96, align 8, !tbaa !38
  %98 = fadd double %97, %91
  store double %98, ptr %96, align 8, !tbaa !38
  br label %99

99:                                               ; preds = %87, %86
  %100 = load ptr, ptr @simulation, align 8, !tbaa !18
  %101 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %100)
  br i1 %101, label %.sink.split, label %125

102:                                              ; preds = %80
  br i1 %85, label %103, label %115

103:                                              ; preds = %102
  %104 = getelementptr inbounds i8, ptr %0, i64 80
  %105 = load i64, ptr %104, align 8, !tbaa !35
  %106 = sub i64 %65, %105
  %107 = uitofp i64 %106 to double
  %108 = load ptr, ptr @stats, align 8, !tbaa !19
  %109 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %110 = getelementptr inbounds ptr, ptr %108, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !18
  %112 = getelementptr inbounds i8, ptr %111, i64 784
  %113 = load double, ptr %112, align 8, !tbaa !39
  %114 = fadd double %113, %107
  store double %114, ptr %112, align 8, !tbaa !39
  br label %115

115:                                              ; preds = %103, %102
  %116 = load ptr, ptr @simulation, align 8, !tbaa !18
  %117 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %116)
  br i1 %117, label %.sink.split, label %125

.sink.split:                                      ; preds = %115, %99
  %.sink91 = phi i64 [ 736, %99 ], [ 744, %115 ]
  %118 = load ptr, ptr @stats, align 8, !tbaa !19
  %119 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %120 = getelementptr inbounds ptr, ptr %118, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !18
  %122 = getelementptr inbounds i8, ptr %121, i64 %.sink91
  %123 = load i64, ptr %122, align 8, !tbaa !40
  %124 = add i64 %123, 1
  store i64 %124, ptr %122, align 8, !tbaa !40
  br label %125

125:                                              ; preds = %.sink.split, %115, %99
  store i32 2, ptr %81, align 8, !tbaa !37
  br label %.preheader

.critedge66:                                      ; preds = %.lr.ph101, %28
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 290, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Row_lock12lock_releaseEP10TxnManager) #6
  unreachable

.preheader:                                       ; preds = %125, %._crit_edge
  %126 = phi i32 [ %.pre83, %._crit_edge ], [ 2, %125 ]
  %127 = getelementptr inbounds i8, ptr %0, i64 24
  %128 = getelementptr inbounds i8, ptr %0, i64 56
  %129 = load ptr, ptr %128, align 8, !tbaa !41
  %.not6378 = icmp eq ptr %129, null
  br i1 %.not6378, label %.critedge2, label %.lr.ph79

.lr.ph79:                                         ; preds = %.preheader
  %130 = getelementptr inbounds i8, ptr %0, i64 64
  %131 = getelementptr inbounds i8, ptr %0, i64 72
  %132 = getelementptr inbounds i8, ptr %0, i64 80
  br label %133

133:                                              ; preds = %.lr.ph79, %214
  %134 = phi i32 [ %126, %.lr.ph79 ], [ %215, %214 ]
  %135 = phi ptr [ %129, %.lr.ph79 ], [ %216, %214 ]
  %136 = load i32, ptr %135, align 8, !tbaa !42
  %137 = tail call noundef zeroext i1 @_ZN8Row_lock13conflict_lockE6lock_tS0_(ptr noundef nonnull align 8 dereferenceable(88) %0, i32 noundef %134, i32 noundef %136)
  br i1 %137, label %.critedge2, label %138

138:                                              ; preds = %133
  %139 = load ptr, ptr %128, align 8, !tbaa !41
  %.not64 = icmp eq ptr %139, null
  br i1 %.not64, label %.thread71, label %140

140:                                              ; preds = %138
  %141 = getelementptr inbounds i8, ptr %139, i64 24
  %142 = load ptr, ptr %141, align 8, !tbaa !32
  store ptr %142, ptr %128, align 8, !tbaa !41
  %.not65 = icmp eq ptr %142, null
  %143 = getelementptr inbounds i8, ptr %142, i64 32
  %.sink95 = select i1 %.not65, ptr %130, ptr %143
  store ptr null, ptr %.sink95, align 8, !tbaa !18
  br label %.thread71

.thread71:                                        ; preds = %138, %140
  %.sink96 = phi ptr [ %141, %140 ], [ %130, %138 ]
  store ptr null, ptr %.sink96, align 8, !tbaa !18
  %144 = tail call noundef i64 @_Z13get_sys_clockv()
  %145 = getelementptr inbounds i8, ptr %139, i64 16
  %146 = load ptr, ptr %145, align 8, !tbaa !28
  %147 = getelementptr inbounds i8, ptr %146, i64 120
  %148 = load i64, ptr %147, align 8, !tbaa !43
  %149 = sub i64 %144, %148
  store i64 0, ptr %147, align 8, !tbaa !43
  %150 = uitofp i64 %149 to double
  %151 = getelementptr inbounds i8, ptr %146, i64 328
  %152 = load double, ptr %151, align 8, !tbaa !49
  %153 = fadd double %152, %150
  store double %153, ptr %151, align 8, !tbaa !49
  %154 = getelementptr inbounds i8, ptr %146, i64 376
  %155 = load double, ptr %154, align 8, !tbaa !50
  %156 = fadd double %155, %150
  store double %156, ptr %154, align 8, !tbaa !50
  %157 = load ptr, ptr @simulation, align 8, !tbaa !18
  %158 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %157)
  br i1 %158, label %159, label %167

159:                                              ; preds = %.thread71
  %160 = load ptr, ptr @stats, align 8, !tbaa !19
  %161 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %162 = getelementptr inbounds ptr, ptr %160, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !18
  %164 = getelementptr inbounds i8, ptr %163, i64 800
  %165 = load double, ptr %164, align 8, !tbaa !51
  %166 = fadd double %165, %150
  store double %166, ptr %164, align 8, !tbaa !51
  br label %167

167:                                              ; preds = %159, %.thread71
  %168 = load ptr, ptr %29, align 8, !tbaa !27
  %169 = load ptr, ptr %145, align 8, !tbaa !28
  %170 = tail call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %169)
  %171 = tail call noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88) %0, i64 noundef %170)
  %172 = getelementptr inbounds ptr, ptr %168, i64 %171
  %173 = load ptr, ptr %172, align 8, !tbaa !18
  %174 = getelementptr inbounds i8, ptr %139, i64 24
  store ptr %173, ptr %174, align 8, !tbaa !32
  %175 = load ptr, ptr %29, align 8, !tbaa !27
  %176 = load ptr, ptr %145, align 8, !tbaa !28
  %177 = tail call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %176)
  %178 = tail call noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88) %0, i64 noundef %177)
  %179 = getelementptr inbounds ptr, ptr %175, i64 %178
  store ptr %139, ptr %179, align 8, !tbaa !18
  %180 = load <2 x i32>, ptr %49, align 4, !tbaa !52
  %181 = add <2 x i32> %180, <i32 1, i32 -1>
  store <2 x i32> %181, ptr %49, align 4, !tbaa !52
  %182 = load ptr, ptr %145, align 8, !tbaa !28
  %183 = tail call noundef i64 @_ZN10TxnManager13get_timestampEv(ptr noundef nonnull align 8 dereferenceable(544) %182)
  %184 = load i64, ptr %131, align 8, !tbaa !53
  %185 = icmp ugt i64 %183, %184
  br i1 %185, label %186, label %189

186:                                              ; preds = %167
  %187 = load ptr, ptr %145, align 8, !tbaa !28
  %188 = tail call noundef i64 @_ZN10TxnManager13get_timestampEv(ptr noundef nonnull align 8 dereferenceable(544) %187)
  store i64 %188, ptr %131, align 8, !tbaa !53
  br label %189

189:                                              ; preds = %186, %167
  %190 = load ptr, ptr %145, align 8, !tbaa !28
  %191 = getelementptr inbounds i8, ptr %190, i64 40
  %192 = load volatile i32, ptr %191, align 8, !tbaa !54
  %193 = icmp eq i32 %192, 0
  br i1 %193, label %195, label %194

194:                                              ; preds = %189
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 339, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Row_lock12lock_releaseEP10TxnManager) #6
  unreachable

195:                                              ; preds = %189
  %196 = tail call noundef i64 @_ZN10TxnManager7decr_lrEv(ptr noundef nonnull align 8 dereferenceable(544) %190)
  %197 = icmp eq i64 %196, 0
  br i1 %197, label %198, label %209

198:                                              ; preds = %195
  %199 = load ptr, ptr %145, align 8, !tbaa !28
  %200 = getelementptr inbounds i8, ptr %199, i64 40
  %201 = cmpxchg ptr %200, i32 0, i32 1 seq_cst seq_cst, align 8
  %202 = extractvalue { i32, i1 } %201, 1
  br i1 %202, label %203, label %209

203:                                              ; preds = %198
  %204 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %205 = load ptr, ptr %145, align 8, !tbaa !28
  %206 = tail call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %205)
  %207 = load ptr, ptr %145, align 8, !tbaa !28
  %208 = tail call noundef i64 @_ZN10TxnManager12get_batch_idEv(ptr noundef nonnull align 8 dereferenceable(544) %207)
  tail call void @_ZN8TxnTable11restart_txnEmmm(ptr noundef nonnull align 8 dereferenceable(16) @txn_table, i64 noundef %204, i64 noundef %206, i64 noundef %208)
  br label %209

209:                                              ; preds = %198, %203, %195
  %210 = load i32, ptr %127, align 8, !tbaa !37
  %211 = icmp eq i32 %210, 2
  br i1 %211, label %212, label %214

212:                                              ; preds = %209
  %213 = tail call noundef i64 @_Z13get_sys_clockv()
  store i64 %213, ptr %132, align 8, !tbaa !35
  br label %214

214:                                              ; preds = %212, %209
  %215 = load i32, ptr %139, align 8, !tbaa !42
  store i32 %215, ptr %127, align 8, !tbaa !37
  %216 = load ptr, ptr %128, align 8, !tbaa !41
  %.not63 = icmp eq ptr %216, null
  br i1 %.not63, label %.critedge2, label %133, !llvm.loop !55

.critedge2:                                       ; preds = %133, %214, %.preheader
  %217 = tail call noundef i64 @_Z13get_sys_clockv()
  %218 = sub i64 %217, %3
  %219 = uitofp i64 %218 to double
  %220 = getelementptr inbounds i8, ptr %1, i64 344
  %221 = load double, ptr %220, align 8, !tbaa !56
  %222 = fadd double %221, %219
  store double %222, ptr %220, align 8, !tbaa !56
  %223 = getelementptr inbounds i8, ptr %1, i64 384
  %224 = load double, ptr %223, align 8, !tbaa !57
  %225 = fadd double %224, %219
  store double %225, ptr %223, align 8, !tbaa !57
  %226 = load ptr, ptr @simulation, align 8, !tbaa !18
  %227 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %226)
  br i1 %227, label %228, label %236

228:                                              ; preds = %.critedge2
  %229 = load ptr, ptr @stats, align 8, !tbaa !19
  %230 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %231 = getelementptr inbounds ptr, ptr %229, i64 %230
  %232 = load ptr, ptr %231, align 8, !tbaa !18
  %233 = getelementptr inbounds i8, ptr %232, i64 832
  %234 = load double, ptr %233, align 8, !tbaa !58
  %235 = fadd double %234, %219
  store double %235, ptr %233, align 8, !tbaa !58
  br label %236

236:                                              ; preds = %228, %.critedge2
  %237 = load ptr, ptr @simulation, align 8, !tbaa !18
  %238 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %237)
  br i1 %238, label %239, label %247

239:                                              ; preds = %236
  %240 = load ptr, ptr @stats, align 8, !tbaa !19
  %241 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %1)
  %242 = getelementptr inbounds ptr, ptr %240, i64 %241
  %243 = load ptr, ptr %242, align 8, !tbaa !18
  %244 = getelementptr inbounds i8, ptr %243, i64 816
  %245 = load i64, ptr %244, align 8, !tbaa !59
  %246 = add i64 %245, 1
  store i64 %246, ptr %244, align 8, !tbaa !59
  br label %247

247:                                              ; preds = %239, %236
  %248 = load i8, ptr @g_central_man, align 1, !tbaa !5, !range !9, !noundef !10
  %249 = trunc nuw i8 %248 to i1
  br i1 %249, label %250, label %253

250:                                              ; preds = %247
  %251 = getelementptr inbounds i8, ptr %0, i64 16
  %252 = load ptr, ptr %251, align 8, !tbaa !11
  tail call void @_ZN7Manager11release_rowEP5row_t(ptr noundef nonnull align 8 dereferenceable(1320) @glob_manager, ptr noundef %252)
  br label %256

253:                                              ; preds = %247
  %254 = load ptr, ptr %0, align 8, !tbaa !17
  %255 = tail call i32 @pthread_mutex_unlock(ptr noundef %254) #5
  br label %256

256:                                              ; preds = %253, %250
  ret i32 0
}

declare void @_ZN7Manager8lock_rowEP5row_t(ptr noundef nonnull align 8 dereferenceable(1320), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN8Row_lock4hashEm(ptr noundef nonnull align 8 dereferenceable(88), i64 noundef) local_unnamed_addr #4 align 2

declare noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8Row_lock13conflict_lockE6lock_tS0_(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef, i32 noundef) local_unnamed_addr #4 align 2

declare noundef i64 @_ZN10TxnManager13get_timestampEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #1

declare noundef i64 @_ZN10TxnManager7decr_lrEv(ptr noundef nonnull align 8 dereferenceable(544)) local_unnamed_addr #1

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

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

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { 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 #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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

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


; Effective O3 passes: ADCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass