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

; 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.TxnManager = type { ptr, ptr, ptr, i8, ptr, i32, i8, i32, i32, i8, i64, i64, i64, i64, ptr, ptr, ptr, i64, i8, i8, ptr, ptr, i64, i64, i64, %class.TxnStats, i32, i32, i32, i8, i32, %class.Array.0, i32, ptr, ptr, i32, %union.sem_t }
%class.TxnStats = type { i64, i64, i64, i64, i64, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i64, i64, double, double, double, double, double, double, double, double }
%class.Array.0 = type { ptr, i64, i64 }
%union.sem_t = type { i64, [24 x i8] }
%class.Stats_thd = type { [64 x i8], ptr, ptr, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, double, i64, double, i64, double, i64, i64, double, double, double, double, double, double, double, double, i64, double, double, double, double, double, double, double, double, i64, i64, double, i64, double, i64, double, double, double, i64, i64, i64, double, double, double, double, double, double, double, double, double, i64, ptr, ptr, double, i64, i64, double, double, double, i64, i64, i64, i64, i64, i64, i64, double, double, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, double, double, double, double, double, i64, i64, double, double, i64, i64, i64, double, double, i64, i64, double, double, double, double, i64, i64, double, double, double, i64, i64, double, double, double, double, double, i64, double, double, double, double, double, double, double, double, i64, i64, i64, double, i64, double, double, i64, i64, i64, i64, i64, double, i64, i64, double, i64, double, double, i64, i64, i64, i64, i64, double, double, double, %class.StatsArr, %class.StatsArr, %class.StatsArr, %class.StatsArr, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ptr, [64 x i8] }
%class.StatsArr = type { ptr, i64, i64, i32, %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%class.BaseQuery = type { ptr, i64, %class.Array.1, %class.Array.1, %class.Array.1, %class.Array.1 }
%class.Array.1 = type { ptr, i64, i64 }

@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@simulation = external global ptr, align 8
@stats = external global %class.Stats, align 8
@g_node_cnt = external global i32, align 4
@g_node_id = external global i32, align 4
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__._ZN10TxnManager12commit_statsEv = external hidden unnamed_addr constant [32 x i8], align 1

declare noundef i64 @_Z13get_sys_clockv() #0

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

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

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

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

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

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

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

22:                                               ; preds = %1
  %23 = load ptr, ptr @stats, align 8, !tbaa !21
  %24 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %25 = getelementptr inbounds ptr, ptr %23, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds %class.Stats_thd, ptr %26, i32 0, i32 9
  %28 = load i64, ptr %27, align 8, !tbaa !23
  %29 = add i64 %28, 1
  store i64 %29, ptr %27, align 8, !tbaa !23
  br label %30

30:                                               ; preds = %22, %1
  %31 = call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %32 = load i32, ptr @g_node_cnt, align 4, !tbaa !27
  %33 = zext i32 %32 to i64
  %34 = urem i64 %31, %33
  %35 = load i32, ptr @g_node_id, align 4, !tbaa !27
  %36 = zext i32 %35 to i64
  %37 = icmp eq i64 %34, %36
  br i1 %37, label %56, label %38

38:                                               ; preds = %30
  %39 = load ptr, ptr @simulation, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %39)
  br i1 %40, label %41, label %49

41:                                               ; preds = %38
  %42 = load ptr, ptr @stats, align 8, !tbaa !21
  %43 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %44 = getelementptr inbounds ptr, ptr %42, i64 %43
  %45 = load ptr, ptr %44, align 8, !tbaa !5
  %46 = getelementptr inbounds %class.Stats_thd, ptr %45, i32 0, i32 11
  %47 = load i64, ptr %46, align 8, !tbaa !28
  %48 = add i64 %47, 1
  store i64 %48, ptr %46, align 8, !tbaa !28
  br label %49

49:                                               ; preds = %41, %38
  %50 = getelementptr inbounds %class.TxnManager, ptr %8, i32 0, i32 25
  %51 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %52 = call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %53 = call noundef i64 @_ZN10TxnManager12get_batch_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %54 = load i64, ptr %5, align 8, !tbaa !9
  %55 = load i64, ptr %4, align 8, !tbaa !9
  call void @_ZN8TxnStats12commit_statsEmmmmm(ptr noundef nonnull align 8 dereferenceable(256) %50, i64 noundef %51, i64 noundef %52, i64 noundef %53, i64 noundef %54, i64 noundef %55)
  store i32 1, ptr %6, align 4
  br label %257

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

59:                                               ; preds = %56
  %60 = load ptr, ptr @stats, align 8, !tbaa !21
  %61 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %62 = getelementptr inbounds ptr, ptr %60, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = getelementptr inbounds %class.Stats_thd, ptr %63, i32 0, i32 5
  %65 = load i64, ptr %64, align 8, !tbaa !29
  %66 = add i64 %65, 1
  store i64 %66, ptr %64, align 8, !tbaa !29
  br label %67

67:                                               ; preds = %59, %56
  %68 = load ptr, ptr @simulation, align 8, !tbaa !5
  %69 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %68)
  br i1 %69, label %70, label %78

70:                                               ; preds = %67
  %71 = load ptr, ptr @stats, align 8, !tbaa !21
  %72 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %73 = getelementptr inbounds ptr, ptr %71, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds %class.Stats_thd, ptr %74, i32 0, i32 10
  %76 = load i64, ptr %75, align 8, !tbaa !30
  %77 = add i64 %76, 1
  store i64 %77, ptr %75, align 8, !tbaa !30
  br label %78

78:                                               ; preds = %70, %67
  %79 = load ptr, ptr @simulation, align 8, !tbaa !5
  %80 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %79)
  br i1 %80, label %81, label %91

81:                                               ; preds = %78
  %82 = load i64, ptr %5, align 8, !tbaa !9
  %83 = uitofp i64 %82 to double
  %84 = load ptr, ptr @stats, align 8, !tbaa !21
  %85 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %86 = getelementptr inbounds ptr, ptr %84, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.Stats_thd, ptr %87, i32 0, i32 16
  %89 = load double, ptr %88, align 8, !tbaa !31
  %90 = fadd double %89, %83
  store double %90, ptr %88, align 8, !tbaa !31
  br label %91

91:                                               ; preds = %81, %78
  %92 = getelementptr inbounds %class.TxnManager, ptr %8, i32 0, i32 21
  %93 = load ptr, ptr %92, align 8, !tbaa !32
  %94 = getelementptr inbounds %class.BaseQuery, ptr %93, i32 0, i32 3
  %95 = call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %94)
  %96 = icmp ugt i64 %95, 1
  br i1 %96, label %97, label %122

97:                                               ; preds = %91
  %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 %108

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

108:                                              ; preds = %100, %97
  %109 = load ptr, ptr @simulation, align 8, !tbaa !5
  %110 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %109)
  br i1 %110, label %111, label %121

111:                                              ; preds = %108
  %112 = load i64, ptr %5, align 8, !tbaa !9
  %113 = uitofp i64 %112 to double
  %114 = load ptr, ptr @stats, align 8, !tbaa !21
  %115 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %116 = getelementptr inbounds ptr, ptr %114, i64 %115
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.Stats_thd, ptr %117, i32 0, i32 18
  %119 = load double, ptr %118, align 8, !tbaa !34
  %120 = fadd double %119, %113
  store double %120, ptr %118, align 8, !tbaa !34
  br label %121

121:                                              ; preds = %111, %108
  br label %147

122:                                              ; preds = %91
  %123 = load ptr, ptr @simulation, align 8, !tbaa !5
  %124 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %123)
  br i1 %124, label %125, label %133

125:                                              ; preds = %122
  %126 = load ptr, ptr @stats, align 8, !tbaa !21
  %127 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %128 = getelementptr inbounds ptr, ptr %126, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds %class.Stats_thd, ptr %129, i32 0, i32 19
  %131 = load i64, ptr %130, align 8, !tbaa !35
  %132 = add i64 %131, 1
  store i64 %132, ptr %130, align 8, !tbaa !35
  br label %133

133:                                              ; preds = %125, %122
  %134 = load ptr, ptr @simulation, align 8, !tbaa !5
  %135 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %134)
  br i1 %135, label %136, label %146

136:                                              ; preds = %133
  %137 = load i64, ptr %5, align 8, !tbaa !9
  %138 = uitofp i64 %137 to double
  %139 = load ptr, ptr @stats, align 8, !tbaa !21
  %140 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %141 = getelementptr inbounds ptr, ptr %139, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = getelementptr inbounds %class.Stats_thd, ptr %142, i32 0, i32 20
  %144 = load double, ptr %143, align 8, !tbaa !36
  %145 = fadd double %144, %138
  store double %145, ptr %143, align 8, !tbaa !36
  br label %146

146:                                              ; preds = %136, %133
  br label %147

147:                                              ; preds = %146, %121
  %148 = getelementptr inbounds %class.TxnManager, ptr %8, i32 0, i32 25
  %149 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %150 = call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %151 = call noundef i64 @_ZN10TxnManager12get_batch_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %152 = load i64, ptr %5, align 8, !tbaa !9
  %153 = load i64, ptr %4, align 8, !tbaa !9
  call void @_ZN8TxnStats12commit_statsEmmmmm(ptr noundef nonnull align 8 dereferenceable(256) %148, i64 noundef %149, i64 noundef %150, i64 noundef %151, i64 noundef %152, i64 noundef %153)
  %154 = load ptr, ptr @simulation, align 8, !tbaa !5
  %155 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %154)
  br i1 %155, label %156, label %163

156:                                              ; preds = %147
  %157 = load ptr, ptr @stats, align 8, !tbaa !21
  %158 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %159 = getelementptr inbounds ptr, ptr %157, i64 %158
  %160 = load ptr, ptr %159, align 8, !tbaa !5
  %161 = getelementptr inbounds %class.Stats_thd, ptr %160, i32 0, i32 160
  %162 = load i64, ptr %4, align 8, !tbaa !9
  call void @_ZN8StatsArr6insertEm(ptr noundef nonnull align 8 dereferenceable(72) %161, i64 noundef %162)
  br label %163

163:                                              ; preds = %156, %147
  %164 = load ptr, ptr @simulation, align 8, !tbaa !5
  %165 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %164)
  br i1 %165, label %166, label %173

166:                                              ; preds = %163
  %167 = load ptr, ptr @stats, align 8, !tbaa !21
  %168 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %169 = getelementptr inbounds ptr, ptr %167, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !5
  %171 = getelementptr inbounds %class.Stats_thd, ptr %170, i32 0, i32 159
  %172 = load i64, ptr %4, align 8, !tbaa !9
  call void @_ZN8StatsArr6insertEm(ptr noundef nonnull align 8 dereferenceable(72) %171, i64 noundef %172)
  br label %173

173:                                              ; preds = %166, %163
  %174 = load ptr, ptr @simulation, align 8, !tbaa !5
  %175 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %174)
  br i1 %175, label %176, label %183

176:                                              ; preds = %173
  %177 = load ptr, ptr @stats, align 8, !tbaa !21
  %178 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %179 = getelementptr inbounds ptr, ptr %177, i64 %178
  %180 = load ptr, ptr %179, align 8, !tbaa !5
  %181 = getelementptr inbounds %class.Stats_thd, ptr %180, i32 0, i32 158
  %182 = load i64, ptr %5, align 8, !tbaa !9
  call void @_ZN8StatsArr6insertEm(ptr noundef nonnull align 8 dereferenceable(72) %181, i64 noundef %182)
  br label %183

183:                                              ; preds = %176, %173
  %184 = getelementptr inbounds %class.TxnManager, ptr %8, i32 0, i32 21
  %185 = load ptr, ptr %184, align 8, !tbaa !32
  %186 = getelementptr inbounds %class.BaseQuery, ptr %185, i32 0, i32 3
  %187 = call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %186)
  %188 = icmp ugt i64 %187, 0
  br i1 %188, label %189, label %190

189:                                              ; preds = %183
  br label %192

190:                                              ; preds = %183
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 600, ptr noundef @__PRETTY_FUNCTION__._ZN10TxnManager12commit_statsEv) #6
  unreachable

191:                                              ; No predecessors!
  br label %192

192:                                              ; preds = %191, %189
  %193 = load ptr, ptr @simulation, align 8, !tbaa !5
  %194 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %193)
  br i1 %194, label %195, label %207

195:                                              ; preds = %192
  %196 = getelementptr inbounds %class.TxnManager, ptr %8, i32 0, i32 21
  %197 = load ptr, ptr %196, align 8, !tbaa !32
  %198 = getelementptr inbounds %class.BaseQuery, ptr %197, i32 0, i32 3
  %199 = call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %198)
  %200 = load ptr, ptr @stats, align 8, !tbaa !21
  %201 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %202 = getelementptr inbounds ptr, ptr %200, i64 %201
  %203 = load ptr, ptr %202, align 8, !tbaa !5
  %204 = getelementptr inbounds %class.Stats_thd, ptr %203, i32 0, i32 4
  %205 = load i64, ptr %204, align 8, !tbaa !37
  %206 = add i64 %205, %199
  store i64 %206, ptr %204, align 8, !tbaa !37
  br label %207

207:                                              ; preds = %195, %192
  %208 = load ptr, ptr @simulation, align 8, !tbaa !5
  %209 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %208)
  br i1 %209, label %210, label %225

210:                                              ; preds = %207
  %211 = load ptr, ptr @stats, align 8, !tbaa !21
  %212 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %213 = getelementptr inbounds ptr, ptr %211, i64 %212
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = getelementptr inbounds %class.Stats_thd, ptr %214, i32 0, i32 1
  %216 = load ptr, ptr %215, align 8, !tbaa !38
  %217 = getelementptr inbounds %class.TxnManager, ptr %8, i32 0, i32 21
  %218 = load ptr, ptr %217, align 8, !tbaa !32
  %219 = getelementptr inbounds %class.BaseQuery, ptr %218, i32 0, i32 3
  %220 = call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %219)
  %221 = sub i64 %220, 1
  %222 = getelementptr inbounds i64, ptr %216, i64 %221
  %223 = load i64, ptr %222, align 8, !tbaa !9
  %224 = add i64 %223, 1
  store i64 %224, ptr %222, align 8, !tbaa !9
  br label %225

225:                                              ; preds = %210, %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %226

226:                                              ; preds = %253, %225
  %227 = load i64, ptr %7, align 8, !tbaa !9
  %228 = getelementptr inbounds %class.TxnManager, ptr %8, i32 0, i32 21
  %229 = load ptr, ptr %228, align 8, !tbaa !32
  %230 = getelementptr inbounds %class.BaseQuery, ptr %229, i32 0, i32 3
  %231 = call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %230)
  %232 = icmp ult i64 %227, %231
  br i1 %232, label %234, label %233

233:                                              ; preds = %226
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %256

234:                                              ; preds = %226
  %235 = load ptr, ptr @simulation, align 8, !tbaa !5
  %236 = call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %235)
  br i1 %236, label %237, label %252

237:                                              ; preds = %234
  %238 = load ptr, ptr @stats, align 8, !tbaa !21
  %239 = call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %8)
  %240 = getelementptr inbounds ptr, ptr %238, i64 %239
  %241 = load ptr, ptr %240, align 8, !tbaa !5
  %242 = getelementptr inbounds %class.Stats_thd, ptr %241, i32 0, i32 2
  %243 = load ptr, ptr %242, align 8, !tbaa !39
  %244 = getelementptr inbounds %class.TxnManager, ptr %8, i32 0, i32 21
  %245 = load ptr, ptr %244, align 8, !tbaa !32
  %246 = getelementptr inbounds %class.BaseQuery, ptr %245, i32 0, i32 3
  %247 = load i64, ptr %7, align 8, !tbaa !9
  %248 = call noundef i64 @_ZN5ArrayImEixEm(ptr noundef nonnull align 8 dereferenceable(24) %246, i64 noundef %247)
  %249 = getelementptr inbounds i64, ptr %243, i64 %248
  %250 = load i64, ptr %249, align 8, !tbaa !9
  %251 = add i64 %250, 1
  store i64 %251, ptr %249, align 8, !tbaa !9
  br label %252

252:                                              ; preds = %237, %234
  br label %253

253:                                              ; preds = %252
  %254 = load i64, ptr %7, align 8, !tbaa !9
  %255 = add i64 %254, 1
  store i64 %255, ptr %7, align 8, !tbaa !9
  br label %226, !llvm.loop !40

256:                                              ; preds = %233
  store i32 0, ptr %6, align 4
  br label %257

257:                                              ; preds = %256, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %258 = load i32, ptr %6, align 4
  switch i32 %258, label %260 [
    i32 0, label %259
    i32 1, label %259
  ]

259:                                              ; preds = %257, %257
  ret void

260:                                              ; preds = %257
  unreachable
}

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

declare void @_ZN8StatsArr6insertEm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) #0

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

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

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

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


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

@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@simulation = external local_unnamed_addr global ptr, align 8
@stats = external local_unnamed_addr global %class.Stats, align 8
@g_node_cnt = external local_unnamed_addr global i32, align 4
@g_node_id = external local_unnamed_addr global i32, align 4
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__._ZN10TxnManager12commit_statsEv = external hidden unnamed_addr constant [32 x i8], align 1

declare noundef i64 @_Z13get_sys_clockv() local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8TxnStats12commit_statsEmmmmm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10TxnManager12commit_statsEv(ptr noundef nonnull align 8 dereferenceable(544) %0) local_unnamed_addr #2 align 2 {
  %2 = tail call noundef i64 @_Z13get_sys_clockv()
  %3 = getelementptr inbounds i8, ptr %0, i64 176
  %4 = getelementptr inbounds i8, ptr %0, i64 184
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = sub i64 %2, %5
  %7 = load i64, ptr %3, align 8, !tbaa !18
  %8 = sub i64 %2, %7
  %9 = load ptr, ptr @simulation, align 8, !tbaa !19
  %10 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %9)
  br i1 %10, label %11, label %19

11:                                               ; preds = %1
  %12 = load ptr, ptr @stats, align 8, !tbaa !20
  %13 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %14 = getelementptr inbounds ptr, ptr %12, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !19
  %16 = getelementptr inbounds i8, ptr %15, i64 128
  %17 = load i64, ptr %16, align 8, !tbaa !22
  %18 = add i64 %17, 1
  store i64 %18, ptr %16, align 8, !tbaa !22
  br label %19

19:                                               ; preds = %11, %1
  %20 = tail call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %21 = load i32, ptr @g_node_cnt, align 4, !tbaa !26
  %22 = zext i32 %21 to i64
  %23 = urem i64 %20, %22
  %24 = load i32, ptr @g_node_id, align 4, !tbaa !26
  %25 = zext i32 %24 to i64
  %26 = icmp eq i64 %23, %25
  %27 = load ptr, ptr @simulation, align 8, !tbaa !19
  %28 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %27)
  br i1 %26, label %42, label %29

29:                                               ; preds = %19
  br i1 %28, label %30, label %38

30:                                               ; preds = %29
  %31 = load ptr, ptr @stats, align 8, !tbaa !20
  %32 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %33 = getelementptr inbounds ptr, ptr %31, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !19
  %35 = getelementptr inbounds i8, ptr %34, i64 144
  %36 = load i64, ptr %35, align 8, !tbaa !27
  %37 = add i64 %36, 1
  store i64 %37, ptr %35, align 8, !tbaa !27
  br label %38

38:                                               ; preds = %30, %29
  %39 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %40 = tail call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %41 = tail call noundef i64 @_ZN10TxnManager12get_batch_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  tail call void @_ZN8TxnStats12commit_statsEmmmmm(ptr noundef nonnull align 8 dereferenceable(256) %3, i64 noundef %39, i64 noundef %40, i64 noundef %41, i64 noundef %8, i64 noundef %6)
  br label %.loopexit

42:                                               ; preds = %19
  br i1 %28, label %43, label %51

43:                                               ; preds = %42
  %44 = load ptr, ptr @stats, align 8, !tbaa !20
  %45 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %46 = getelementptr inbounds ptr, ptr %44, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !19
  %48 = getelementptr inbounds i8, ptr %47, i64 96
  %49 = load i64, ptr %48, align 8, !tbaa !28
  %50 = add i64 %49, 1
  store i64 %50, ptr %48, align 8, !tbaa !28
  br label %51

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

54:                                               ; preds = %51
  %55 = load ptr, ptr @stats, align 8, !tbaa !20
  %56 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %57 = getelementptr inbounds ptr, ptr %55, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !19
  %59 = getelementptr inbounds i8, ptr %58, i64 136
  %60 = load i64, ptr %59, align 8, !tbaa !29
  %61 = add i64 %60, 1
  store i64 %61, ptr %59, align 8, !tbaa !29
  br label %62

62:                                               ; preds = %54, %51
  %63 = load ptr, ptr @simulation, align 8, !tbaa !19
  %64 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %63)
  br i1 %64, label %65, label %74

65:                                               ; preds = %62
  %66 = uitofp i64 %8 to double
  %67 = load ptr, ptr @stats, align 8, !tbaa !20
  %68 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %69 = getelementptr inbounds ptr, ptr %67, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !19
  %71 = getelementptr inbounds i8, ptr %70, i64 184
  %72 = load double, ptr %71, align 8, !tbaa !30
  %73 = fadd double %72, %66
  store double %73, ptr %71, align 8, !tbaa !30
  br label %74

74:                                               ; preds = %65, %62
  %75 = getelementptr inbounds i8, ptr %0, i64 144
  %76 = load ptr, ptr %75, align 8, !tbaa !31
  %77 = getelementptr inbounds i8, ptr %76, i64 40
  %78 = tail call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %77)
  %79 = icmp ugt i64 %78, 1
  %80 = load ptr, ptr @simulation, align 8, !tbaa !19
  %81 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %80)
  br i1 %79, label %82, label %94

82:                                               ; preds = %74
  br i1 %81, label %83, label %91

83:                                               ; preds = %82
  %84 = load ptr, ptr @stats, align 8, !tbaa !20
  %85 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %86 = getelementptr inbounds ptr, ptr %84, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !19
  %88 = getelementptr inbounds i8, ptr %87, i64 192
  %89 = load i64, ptr %88, align 8, !tbaa !32
  %90 = add i64 %89, 1
  store i64 %90, ptr %88, align 8, !tbaa !32
  br label %91

91:                                               ; preds = %83, %82
  %92 = load ptr, ptr @simulation, align 8, !tbaa !19
  %93 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %92)
  br i1 %93, label %.sink.split, label %114

94:                                               ; preds = %74
  br i1 %81, label %95, label %103

95:                                               ; preds = %94
  %96 = load ptr, ptr @stats, align 8, !tbaa !20
  %97 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %98 = getelementptr inbounds ptr, ptr %96, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  %100 = getelementptr inbounds i8, ptr %99, i64 208
  %101 = load i64, ptr %100, align 8, !tbaa !33
  %102 = add i64 %101, 1
  store i64 %102, ptr %100, align 8, !tbaa !33
  br label %103

103:                                              ; preds = %95, %94
  %104 = load ptr, ptr @simulation, align 8, !tbaa !19
  %105 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %104)
  br i1 %105, label %.sink.split, label %114

.sink.split:                                      ; preds = %103, %91
  %.sink21 = phi i64 [ 200, %91 ], [ 216, %103 ]
  %106 = uitofp i64 %8 to double
  %107 = load ptr, ptr @stats, align 8, !tbaa !20
  %108 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %109 = getelementptr inbounds ptr, ptr %107, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !19
  %111 = getelementptr inbounds i8, ptr %110, i64 %.sink21
  %112 = load double, ptr %111, align 8, !tbaa !34
  %113 = fadd double %112, %106
  store double %113, ptr %111, align 8, !tbaa !34
  br label %114

114:                                              ; preds = %.sink.split, %103, %91
  %115 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %116 = tail call noundef i64 @_ZN10TxnManager10get_txn_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %117 = tail call noundef i64 @_ZN10TxnManager12get_batch_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  tail call void @_ZN8TxnStats12commit_statsEmmmmm(ptr noundef nonnull align 8 dereferenceable(256) %3, i64 noundef %115, i64 noundef %116, i64 noundef %117, i64 noundef %8, i64 noundef %6)
  %118 = load ptr, ptr @simulation, align 8, !tbaa !19
  %119 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %118)
  br i1 %119, label %120, label %126

120:                                              ; preds = %114
  %121 = load ptr, ptr @stats, align 8, !tbaa !20
  %122 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %123 = getelementptr inbounds ptr, ptr %121, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !19
  %125 = getelementptr inbounds i8, ptr %124, i64 1528
  tail call void @_ZN8StatsArr6insertEm(ptr noundef nonnull align 8 dereferenceable(72) %125, i64 noundef %6)
  br label %126

126:                                              ; preds = %120, %114
  %127 = load ptr, ptr @simulation, align 8, !tbaa !19
  %128 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %127)
  br i1 %128, label %129, label %135

129:                                              ; preds = %126
  %130 = load ptr, ptr @stats, align 8, !tbaa !20
  %131 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %132 = getelementptr inbounds ptr, ptr %130, i64 %131
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = getelementptr inbounds i8, ptr %133, i64 1456
  tail call void @_ZN8StatsArr6insertEm(ptr noundef nonnull align 8 dereferenceable(72) %134, i64 noundef %6)
  br label %135

135:                                              ; preds = %129, %126
  %136 = load ptr, ptr @simulation, align 8, !tbaa !19
  %137 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %136)
  br i1 %137, label %138, label %144

138:                                              ; preds = %135
  %139 = load ptr, ptr @stats, align 8, !tbaa !20
  %140 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %141 = getelementptr inbounds ptr, ptr %139, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !19
  %143 = getelementptr inbounds i8, ptr %142, i64 1384
  tail call void @_ZN8StatsArr6insertEm(ptr noundef nonnull align 8 dereferenceable(72) %143, i64 noundef %8)
  br label %144

144:                                              ; preds = %138, %135
  %145 = load ptr, ptr %75, align 8, !tbaa !31
  %146 = getelementptr inbounds i8, ptr %145, i64 40
  %147 = tail call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %146)
  %.not = icmp eq i64 %147, 0
  br i1 %.not, label %148, label %149

148:                                              ; preds = %144
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 600, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN10TxnManager12commit_statsEv) #4
  unreachable

149:                                              ; preds = %144
  %150 = load ptr, ptr @simulation, align 8, !tbaa !19
  %151 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %150)
  br i1 %151, label %152, label %163

152:                                              ; preds = %149
  %153 = load ptr, ptr %75, align 8, !tbaa !31
  %154 = getelementptr inbounds i8, ptr %153, i64 40
  %155 = tail call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %154)
  %156 = load ptr, ptr @stats, align 8, !tbaa !20
  %157 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %158 = getelementptr inbounds ptr, ptr %156, i64 %157
  %159 = load ptr, ptr %158, align 8, !tbaa !19
  %160 = getelementptr inbounds i8, ptr %159, i64 88
  %161 = load i64, ptr %160, align 8, !tbaa !35
  %162 = add i64 %161, %155
  store i64 %162, ptr %160, align 8, !tbaa !35
  br label %163

163:                                              ; preds = %152, %149
  %164 = load ptr, ptr @simulation, align 8, !tbaa !19
  %165 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %164)
  br i1 %165, label %166, label %180

166:                                              ; preds = %163
  %167 = load ptr, ptr @stats, align 8, !tbaa !20
  %168 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %169 = getelementptr inbounds ptr, ptr %167, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !19
  %171 = getelementptr inbounds i8, ptr %170, i64 64
  %172 = load ptr, ptr %171, align 8, !tbaa !36
  %173 = load ptr, ptr %75, align 8, !tbaa !31
  %174 = getelementptr inbounds i8, ptr %173, i64 40
  %175 = tail call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %174)
  %176 = getelementptr i64, ptr %172, i64 %175
  %177 = getelementptr i8, ptr %176, i64 -8
  %178 = load i64, ptr %177, align 8, !tbaa !37
  %179 = add i64 %178, 1
  store i64 %179, ptr %177, align 8, !tbaa !37
  br label %180

180:                                              ; preds = %166, %163
  %181 = load ptr, ptr %75, align 8, !tbaa !31
  %182 = getelementptr inbounds i8, ptr %181, i64 40
  %183 = tail call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %182)
  %.not16 = icmp eq i64 %183, 0
  br i1 %.not16, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %180, %199
  %.015 = phi i64 [ %200, %199 ], [ 0, %180 ]
  %184 = load ptr, ptr @simulation, align 8, !tbaa !19
  %185 = tail call noundef zeroext i1 @_ZN10SimManager14is_warmup_doneEv(ptr noundef nonnull align 8 dereferenceable(96) %184)
  br i1 %185, label %186, label %199

186:                                              ; preds = %.lr.ph
  %187 = load ptr, ptr @stats, align 8, !tbaa !20
  %188 = tail call noundef i64 @_ZN10TxnManager10get_thd_idEv(ptr noundef nonnull align 8 dereferenceable(544) %0)
  %189 = getelementptr inbounds ptr, ptr %187, i64 %188
  %190 = load ptr, ptr %189, align 8, !tbaa !19
  %191 = getelementptr inbounds i8, ptr %190, i64 72
  %192 = load ptr, ptr %191, align 8, !tbaa !38
  %193 = load ptr, ptr %75, align 8, !tbaa !31
  %194 = getelementptr inbounds i8, ptr %193, i64 40
  %195 = tail call noundef i64 @_ZN5ArrayImEixEm(ptr noundef nonnull align 8 dereferenceable(24) %194, i64 noundef %.015)
  %196 = getelementptr inbounds i64, ptr %192, i64 %195
  %197 = load i64, ptr %196, align 8, !tbaa !37
  %198 = add i64 %197, 1
  store i64 %198, ptr %196, align 8, !tbaa !37
  br label %199

199:                                              ; preds = %.lr.ph, %186
  %200 = add nuw i64 %.015, 1
  %201 = load ptr, ptr %75, align 8, !tbaa !31
  %202 = getelementptr inbounds i8, ptr %201, i64 40
  %203 = tail call noundef i64 @_ZN5ArrayImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %202)
  %204 = icmp ult i64 %200, %203
  br i1 %204, label %.lr.ph, label %.loopexit, !llvm.loop !39

.loopexit:                                        ; preds = %199, %180, %38
  ret void
}

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

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

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

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass