; LLVM IR from mitdbg/deneva :: concurrency_control/row_mvcc.ll (ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager)

; 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.Row_mvcc = type { ptr, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64 }
%struct.MVReqEntry = type { ptr, i64, i64, ptr }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef ptr @_ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1, ptr noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store ptr null, ptr %8, align 8, !tbaa !5
  %14 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %14, label %19 [
    i32 0, label %15
    i32 2, label %17
  ]

15:                                               ; preds = %3
  %16 = getelementptr inbounds %class.Row_mvcc, ptr %13, i32 0, i32 3
  store ptr %16, ptr %7, align 8, !tbaa !5
  br label %20

17:                                               ; preds = %3
  %18 = getelementptr inbounds %class.Row_mvcc, ptr %13, i32 0, i32 4
  store ptr %18, ptr %7, align 8, !tbaa !5
  br label %20

19:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 121, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #4
  unreachable

20:                                               ; preds = %17, %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %22, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store ptr null, ptr %10, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %84

25:                                               ; preds = %20
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = icmp eq i32 %26, 2
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  br label %31

29:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 127, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #4
  unreachable

30:                                               ; No predecessors!
  br label %31

31:                                               ; preds = %30, %28
  br label %32

32:                                               ; preds = %43, %31
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %41

35:                                               ; preds = %32
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.MVReqEntry, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = icmp ne ptr %38, %39
  br label %41

41:                                               ; preds = %35, %32
  %42 = phi i1 [ false, %32 ], [ %40, %35 ]
  br i1 %42, label %43, label %48

43:                                               ; preds = %41
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %44, ptr %10, align 8, !tbaa !5
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.MVReqEntry, ptr %45, i32 0, i32 3
  %47 = load ptr, ptr %46, align 8, !tbaa !14
  store ptr %47, ptr %9, align 8, !tbaa !5
  br label %32, !llvm.loop !15

48:                                               ; preds = %41
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  br label %54

52:                                               ; preds = %48
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 132, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #4
  unreachable

53:                                               ; No predecessors!
  br label %54

54:                                               ; preds = %53, %51
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %63

57:                                               ; preds = %54
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.MVReqEntry, ptr %58, i32 0, i32 3
  %60 = load ptr, ptr %59, align 8, !tbaa !14
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MVReqEntry, ptr %61, i32 0, i32 3
  store ptr %60, ptr %62, align 8, !tbaa !14
  br label %76

63:                                               ; preds = %54
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  %67 = icmp eq ptr %64, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  br label %71

69:                                               ; preds = %63
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 136, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #4
  unreachable

70:                                               ; No predecessors!
  br label %71

71:                                               ; preds = %70, %68
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.MVReqEntry, ptr %72, i32 0, i32 3
  %74 = load ptr, ptr %73, align 8, !tbaa !14
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %74, ptr %75, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %71, %57
  %77 = getelementptr inbounds %class.Row_mvcc, ptr %13, i32 0, i32 12
  %78 = load i64, ptr %77, align 8, !tbaa !17
  %79 = add i64 %78, -1
  store i64 %79, ptr %77, align 8, !tbaa !17
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.MVReqEntry, ptr %81, i32 0, i32 3
  store ptr %80, ptr %82, align 8, !tbaa !14
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %83, ptr %8, align 8, !tbaa !5
  br label %171

84:                                               ; preds = %20
  %85 = load i32, ptr %5, align 4, !tbaa !9
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %84
  br label %90

88:                                               ; preds = %84
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 143, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #4
  unreachable

89:                                               ; No predecessors!
  br label %90

90:                                               ; preds = %89, %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 -1, ptr %11, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %91 = getelementptr inbounds %class.Row_mvcc, ptr %13, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  store ptr %92, ptr %12, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %108, %90
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = icmp ne ptr %94, null
  br i1 %95, label %97, label %96

96:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %112

97:                                               ; preds = %93
  %98 = load ptr, ptr %12, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.MVReqEntry, ptr %98, i32 0, i32 1
  %100 = load i64, ptr %99, align 8, !tbaa !22
  %101 = load i64, ptr %11, align 8, !tbaa !20
  %102 = icmp ult i64 %100, %101
  br i1 %102, label %103, label %107

103:                                              ; preds = %97
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.MVReqEntry, ptr %104, i32 0, i32 1
  %106 = load i64, ptr %105, align 8, !tbaa !22
  store i64 %106, ptr %11, align 8, !tbaa !20
  br label %107

107:                                              ; preds = %103, %97
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.MVReqEntry, ptr %109, i32 0, i32 3
  %111 = load ptr, ptr %110, align 8, !tbaa !14
  store ptr %111, ptr %12, align 8, !tbaa !5
  br label %93, !llvm.loop !23

112:                                              ; preds = %96
  br label %113

113:                                              ; preds = %169, %112
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %170

116:                                              ; preds = %113
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.MVReqEntry, ptr %117, i32 0, i32 1
  %119 = load i64, ptr %118, align 8, !tbaa !22
  %120 = load i64, ptr %11, align 8, !tbaa !20
  %121 = icmp ule i64 %119, %120
  br i1 %121, label %122, label %164

122:                                              ; preds = %116
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = icmp eq ptr %123, null
  br i1 %124, label %125, label %139

125:                                              ; preds = %122
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = icmp eq ptr %126, %128
  br i1 %129, label %130, label %131

130:                                              ; preds = %125
  br label %133

131:                                              ; preds = %125
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 155, ptr noundef @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #4
  unreachable

132:                                              ; No predecessors!
  br label %133

133:                                              ; preds = %132, %130
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.MVReqEntry, ptr %135, i32 0, i32 3
  %137 = load ptr, ptr %136, align 8, !tbaa !14
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %137, ptr %138, align 8, !tbaa !5
  br label %145

139:                                              ; preds = %122
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.MVReqEntry, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %141, align 8, !tbaa !14
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.MVReqEntry, ptr %143, i32 0, i32 3
  store ptr %142, ptr %144, align 8, !tbaa !14
  br label %145

145:                                              ; preds = %139, %133
  %146 = getelementptr inbounds %class.Row_mvcc, ptr %13, i32 0, i32 11
  %147 = load i64, ptr %146, align 8, !tbaa !24
  %148 = add i64 %147, -1
  store i64 %148, ptr %146, align 8, !tbaa !24
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.MVReqEntry, ptr %150, i32 0, i32 3
  store ptr %149, ptr %151, align 8, !tbaa !14
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %152, ptr %8, align 8, !tbaa !5
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = icmp eq ptr %153, null
  br i1 %154, label %155, label %158

155:                                              ; preds = %145
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  br label %162

158:                                              ; preds = %145
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.MVReqEntry, ptr %159, i32 0, i32 3
  %161 = load ptr, ptr %160, align 8, !tbaa !14
  br label %162

162:                                              ; preds = %158, %155
  %163 = phi ptr [ %157, %155 ], [ %161, %158 ]
  store ptr %163, ptr %9, align 8, !tbaa !5
  br label %169

164:                                              ; preds = %116
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %165, ptr %10, align 8, !tbaa !5
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.MVReqEntry, ptr %166, i32 0, i32 3
  %168 = load ptr, ptr %167, align 8, !tbaa !14
  store ptr %168, ptr %9, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %164, %162
  br label %113, !llvm.loop !25

170:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %171

171:                                              ; preds = %170, %76
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret ptr %172
}

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }
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, !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 = !{!"_ZTS6TsType", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS10MVReqEntry", !6, i64 0, !13, i64 8, !13, i64 16, !6, i64 24}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 24}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !13, i64 96}
!18 = !{!"_ZTS8Row_mvcc", !6, i64 0, !19, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96}
!19 = !{!"bool", !7, i64 0}
!20 = !{!13, !13, i64 0}
!21 = !{!18, !6, i64 32}
!22 = !{!12, !13, i64 8}
!23 = distinct !{!23, !16}
!24 = !{!18, !13, i64 88}
!25 = distinct !{!25, !16}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef ptr @_ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager(ptr nocapture noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %1, ptr noundef readnone %2) local_unnamed_addr #1 align 2 {
  switch i32 %1, label %4 [
    i32 0, label %.thread
    i32 2, label %5
  ]

4:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 121, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #3
  unreachable

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 32
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %29, label %.preheader74

.thread:                                          ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %.not66 = icmp eq ptr %2, null
  br i1 %.not66, label %.thread71, label %.thread69

.preheader74:                                     ; preds = %5
  %.not6178 = icmp eq ptr %7, null
  br i1 %.not6178, label %.critedge64, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader74
  %10 = load ptr, ptr %7, align 8, !tbaa !9
  %.not6298 = icmp eq ptr %10, %2
  br i1 %.not6298, label %.critedge, label %.lr.ph100

.thread69:                                        ; preds = %.thread
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 127, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #3
  unreachable

.lr.ph:                                           ; preds = %.lr.ph100
  %11 = load ptr, ptr %13, align 8, !tbaa !9
  %.not62 = icmp eq ptr %11, %2
  br i1 %.not62, label %.critedge, label %.lr.ph100, !llvm.loop !12

.lr.ph100:                                        ; preds = %.lr.ph.preheader, %.lr.ph
  %.0487999 = phi ptr [ %13, %.lr.ph ], [ %7, %.lr.ph.preheader ]
  %12 = getelementptr inbounds i8, ptr %.0487999, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %.not61 = icmp eq ptr %13, null
  br i1 %.not61, label %.critedge64, label %.lr.ph, !llvm.loop !12

.critedge64:                                      ; preds = %.lr.ph100, %.preheader74
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 132, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #3
  unreachable

.critedge:                                        ; preds = %.lr.ph, %.lr.ph.preheader
  %.04680.lcssa = phi ptr [ null, %.lr.ph.preheader ], [ %.0487999, %.lr.ph ]
  %.04879.lcssa = phi ptr [ %7, %.lr.ph.preheader ], [ %13, %.lr.ph ]
  %.not63 = icmp eq ptr %.04680.lcssa, null
  br i1 %.not63, label %18, label %14

14:                                               ; preds = %.critedge
  %15 = getelementptr inbounds i8, ptr %.04879.lcssa, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %.04680.lcssa, i64 24
  store ptr %16, ptr %17, align 8, !tbaa !14
  br label %24

18:                                               ; preds = %.critedge
  %19 = icmp eq ptr %.04879.lcssa, %7
  br i1 %19, label %21, label %20

20:                                               ; preds = %18
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 136, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #3
  unreachable

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %.04879.lcssa, i64 24
  %23 = load ptr, ptr %22, align 8, !tbaa !14
  store ptr %23, ptr %6, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %21, %14
  %25 = getelementptr inbounds i8, ptr %0, i64 96
  %26 = load i64, ptr %25, align 8, !tbaa !15
  %27 = add i64 %26, -1
  store i64 %27, ptr %25, align 8, !tbaa !15
  %28 = getelementptr inbounds i8, ptr %.04879.lcssa, i64 24
  store ptr null, ptr %28, align 8, !tbaa !14
  br label %.loopexit

29:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 143, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #3
  unreachable

.thread71:                                        ; preds = %.thread
  %30 = getelementptr inbounds i8, ptr %0, i64 32
  %.081 = load ptr, ptr %30, align 8, !tbaa !5
  %.not5882 = icmp eq ptr %.081, null
  br i1 %.not5882, label %.preheader, label %.lr.ph85

.preheader:                                       ; preds = %.lr.ph85, %.thread71
  %.045.lcssa = phi i64 [ -1, %.thread71 ], [ %spec.select, %.lr.ph85 ]
  %.not5986 = icmp eq ptr %9, null
  br i1 %.not5986, label %.loopexit, label %.lr.ph90

.lr.ph90:                                         ; preds = %.preheader
  %31 = getelementptr inbounds i8, ptr %0, i64 88
  %.promoted = load i64, ptr %31, align 8, !tbaa !18
  br label %35

.lr.ph85:                                         ; preds = %.thread71, %.lr.ph85
  %.084 = phi ptr [ %.0, %.lr.ph85 ], [ %.081, %.thread71 ]
  %.04583 = phi i64 [ %spec.select, %.lr.ph85 ], [ -1, %.thread71 ]
  %32 = getelementptr inbounds i8, ptr %.084, i64 8
  %33 = load i64, ptr %32, align 8, !tbaa !19
  %spec.select = tail call i64 @llvm.umin.i64(i64 %33, i64 %.04583)
  %34 = getelementptr inbounds i8, ptr %.084, i64 24
  %.0 = load ptr, ptr %34, align 8, !tbaa !5
  %.not58 = icmp eq ptr %.0, null
  br i1 %.not58, label %.preheader, label %.lr.ph85, !llvm.loop !20

35:                                               ; preds = %.lr.ph90, %58
  %36 = phi i64 [ %.promoted, %.lr.ph90 ], [ %59, %58 ]
  %.14789 = phi ptr [ null, %.lr.ph90 ], [ %.2, %58 ]
  %.14988 = phi ptr [ %9, %.lr.ph90 ], [ %.250, %58 ]
  %.05187 = phi ptr [ null, %.lr.ph90 ], [ %.152, %58 ]
  %37 = getelementptr inbounds i8, ptr %.14988, i64 8
  %38 = load i64, ptr %37, align 8, !tbaa !19
  %.not60 = icmp ugt i64 %38, %.045.lcssa
  br i1 %.not60, label %56, label %39

39:                                               ; preds = %35
  %40 = icmp eq ptr %.14789, null
  br i1 %40, label %41, label %48

41:                                               ; preds = %39
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = icmp eq ptr %.14988, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 155, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Row_mvcc12debuffer_reqE6TsTypeP10TxnManager) #3
  unreachable

45:                                               ; preds = %41
  %46 = getelementptr inbounds i8, ptr %42, i64 24
  %47 = load ptr, ptr %46, align 8, !tbaa !14
  store ptr %47, ptr %8, align 8, !tbaa !5
  br label %52

48:                                               ; preds = %39
  %49 = getelementptr inbounds i8, ptr %.14988, i64 24
  %50 = load ptr, ptr %49, align 8, !tbaa !14
  %51 = getelementptr inbounds i8, ptr %.14789, i64 24
  store ptr %50, ptr %51, align 8, !tbaa !14
  br label %52

52:                                               ; preds = %48, %45
  %53 = add i64 %36, -1
  store i64 %53, ptr %31, align 8, !tbaa !18
  %54 = getelementptr inbounds i8, ptr %.14988, i64 24
  store ptr %.05187, ptr %54, align 8, !tbaa !14
  %55 = getelementptr inbounds i8, ptr %.14789, i64 24
  %.in = select i1 %40, ptr %8, ptr %55
  br label %58

56:                                               ; preds = %35
  %57 = getelementptr inbounds i8, ptr %.14988, i64 24
  br label %58

58:                                               ; preds = %56, %52
  %59 = phi i64 [ %53, %52 ], [ %36, %56 ]
  %.152 = phi ptr [ %.14988, %52 ], [ %.05187, %56 ]
  %.250.in = phi ptr [ %.in, %52 ], [ %57, %56 ]
  %.2 = phi ptr [ %.14789, %52 ], [ %.14988, %56 ]
  %.250 = load ptr, ptr %.250.in, align 8, !tbaa !5
  %.not59 = icmp eq ptr %.250, null
  br i1 %.not59, label %.loopexit, label %35, !llvm.loop !21

.loopexit:                                        ; preds = %58, %.preheader, %24
  %.253 = phi ptr [ %.04879.lcssa, %24 ], [ null, %.preheader ], [ %.152, %58 ]
  ret ptr %.253
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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, !6, i64 0}
!10 = !{!"_ZTS10MVReqEntry", !6, i64 0, !11, i64 8, !11, i64 16, !6, i64 24}
!11 = !{!"long", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!10, !6, i64 24}
!15 = !{!16, !11, i64 96}
!16 = !{!"_ZTS8Row_mvcc", !6, i64 0, !17, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96}
!17 = !{!"bool", !7, i64 0}
!18 = !{!16, !11, i64 88}
!19 = !{!10, !11, i64 8}
!20 = distinct !{!20, !13}
!21 = distinct !{!21, !13}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass