; LLVM IR from mitdbg/deneva :: transport/message.ll (ZN16TPCCQueryMessage11copy_to_bufEPc)

; 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.TPCCQueryMessage = type { %class.QueryMessage, i64, i64, i64, i64, i64, i64, i64, i64, [16 x i8], i64, i8, %class.Array.2, i8, i8, i64, i64 }
%class.QueryMessage = type { %class.Message, i64, i64 }
%class.Message = type { ptr, i32, i64, i64, i64, i64, i64, i64, double, double, double, double, double, double, double }
%class.Array.2 = type { ptr, i64, i64 }

@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN16TPCCQueryMessage11copy_to_bufEPc = external hidden unnamed_addr constant [51 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; 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
declare dso_local noundef i64 @_ZN12QueryMessage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16TPCCQueryMessage11copy_to_bufEPc(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef %1) unnamed_addr #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 i64, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN12QueryMessage11copy_to_bufEPc(ptr noundef nonnull align 8 dereferenceable(136) %9, ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %11 = call noundef i64 @_ZN12QueryMessage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(136) %9)
  store i64 %11, ptr %5, align 8, !tbaa !9
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = load i64, ptr %5, align 8, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %12, i64 %13
  %15 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %14, ptr align 8 %15, i64 8, i1 false)
  %16 = load i64, ptr %5, align 8, !tbaa !9
  %17 = add i64 %16, 8
  store i64 %17, ptr %5, align 8, !tbaa !9
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = load i64, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %18, i64 %19
  %21 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %20, ptr align 8 %21, i64 8, i1 false)
  %22 = load i64, ptr %5, align 8, !tbaa !9
  %23 = add i64 %22, 8
  store i64 %23, ptr %5, align 8, !tbaa !9
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = load i64, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %24, i64 %25
  %27 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %26, ptr align 8 %27, i64 8, i1 false)
  %28 = load i64, ptr %5, align 8, !tbaa !9
  %29 = add i64 %28, 8
  store i64 %29, ptr %5, align 8, !tbaa !9
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = load i64, ptr %5, align 8, !tbaa !9
  %32 = getelementptr inbounds i8, ptr %30, i64 %31
  %33 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %32, ptr align 8 %33, i64 8, i1 false)
  %34 = load i64, ptr %5, align 8, !tbaa !9
  %35 = add i64 %34, 8
  store i64 %35, ptr %5, align 8, !tbaa !9
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = load i64, ptr %5, align 8, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %36, i64 %37
  %39 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %38, ptr align 8 %39, i64 8, i1 false)
  %40 = load i64, ptr %5, align 8, !tbaa !9
  %41 = add i64 %40, 8
  store i64 %41, ptr %5, align 8, !tbaa !9
  %42 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 1
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = icmp eq i64 %43, 1
  br i1 %44, label %45, label %82

45:                                               ; preds = %2
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = load i64, ptr %5, align 8, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %46, i64 %47
  %49 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %48, ptr align 8 %49, i64 8, i1 false)
  %50 = load i64, ptr %5, align 8, !tbaa !9
  %51 = add i64 %50, 8
  store i64 %51, ptr %5, align 8, !tbaa !9
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = load i64, ptr %5, align 8, !tbaa !9
  %54 = getelementptr inbounds i8, ptr %52, i64 %53
  %55 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %54, ptr align 8 %55, i64 8, i1 false)
  %56 = load i64, ptr %5, align 8, !tbaa !9
  %57 = add i64 %56, 8
  store i64 %57, ptr %5, align 8, !tbaa !9
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load i64, ptr %5, align 8, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %58, i64 %59
  %61 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %60, ptr align 8 %61, i64 8, i1 false)
  %62 = load i64, ptr %5, align 8, !tbaa !9
  %63 = add i64 %62, 8
  store i64 %63, ptr %5, align 8, !tbaa !9
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = load i64, ptr %5, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %64, i64 %65
  %67 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %66, ptr align 8 %67, i64 16, i1 false)
  %68 = load i64, ptr %5, align 8, !tbaa !9
  %69 = add i64 %68, 16
  store i64 %69, ptr %5, align 8, !tbaa !9
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load i64, ptr %5, align 8, !tbaa !9
  %72 = getelementptr inbounds i8, ptr %70, i64 %71
  %73 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %72, ptr align 8 %73, i64 8, i1 false)
  %74 = load i64, ptr %5, align 8, !tbaa !9
  %75 = add i64 %74, 8
  store i64 %75, ptr %5, align 8, !tbaa !9
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = load i64, ptr %5, align 8, !tbaa !9
  %78 = getelementptr inbounds i8, ptr %76, i64 %77
  %79 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %78, ptr align 8 %79, i64 1, i1 false)
  %80 = load i64, ptr %5, align 8, !tbaa !9
  %81 = add i64 %80, 1
  store i64 %81, ptr %5, align 8, !tbaa !9
  br label %82

82:                                               ; preds = %45, %2
  %83 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 1
  %84 = load i64, ptr %83, align 8, !tbaa !11
  %85 = icmp eq i64 %84, 2
  br i1 %85, label %86, label %138

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %87 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 12
  %88 = call noundef i64 @_ZN5ArrayIP7Item_noE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %87)
  store i64 %88, ptr %6, align 8, !tbaa !9
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load i64, ptr %5, align 8, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %89, i64 %90
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %91, ptr align 8 %6, i64 8, i1 false)
  %92 = load i64, ptr %5, align 8, !tbaa !9
  %93 = add i64 %92, 8
  store i64 %93, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %94

94:                                               ; preds = %110, %86
  %95 = load i64, ptr %7, align 8, !tbaa !9
  %96 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 12
  %97 = call noundef i64 @_ZN5ArrayIP7Item_noE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %96)
  %98 = icmp ult i64 %95, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %113

100:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %101 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 12
  %102 = load i64, ptr %7, align 8, !tbaa !9
  %103 = call noundef ptr @_ZN5ArrayIP7Item_noEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %102)
  store ptr %103, ptr %8, align 8, !tbaa !5
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = load i64, ptr %5, align 8, !tbaa !9
  %106 = getelementptr inbounds i8, ptr %104, i64 %105
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %106, ptr align 1 %107, i64 24, i1 false)
  %108 = load i64, ptr %5, align 8, !tbaa !9
  %109 = add i64 %108, 24
  store i64 %109, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %110

110:                                              ; preds = %100
  %111 = load i64, ptr %7, align 8, !tbaa !9
  %112 = add i64 %111, 1
  store i64 %112, ptr %7, align 8, !tbaa !9
  br label %94, !llvm.loop !19

113:                                              ; preds = %99
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = load i64, ptr %5, align 8, !tbaa !9
  %116 = getelementptr inbounds i8, ptr %114, i64 %115
  %117 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %116, ptr align 8 %117, i64 1, i1 false)
  %118 = load i64, ptr %5, align 8, !tbaa !9
  %119 = add i64 %118, 1
  store i64 %119, ptr %5, align 8, !tbaa !9
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = load i64, ptr %5, align 8, !tbaa !9
  %122 = getelementptr inbounds i8, ptr %120, i64 %121
  %123 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 14
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %122, ptr align 1 %123, i64 1, i1 false)
  %124 = load i64, ptr %5, align 8, !tbaa !9
  %125 = add i64 %124, 1
  store i64 %125, ptr %5, align 8, !tbaa !9
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = load i64, ptr %5, align 8, !tbaa !9
  %128 = getelementptr inbounds i8, ptr %126, i64 %127
  %129 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 15
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %128, ptr align 8 %129, i64 8, i1 false)
  %130 = load i64, ptr %5, align 8, !tbaa !9
  %131 = add i64 %130, 8
  store i64 %131, ptr %5, align 8, !tbaa !9
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = load i64, ptr %5, align 8, !tbaa !9
  %134 = getelementptr inbounds i8, ptr %132, i64 %133
  %135 = getelementptr inbounds %class.TPCCQueryMessage, ptr %9, i32 0, i32 16
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %134, ptr align 8 %135, i64 8, i1 false)
  %136 = load i64, ptr %5, align 8, !tbaa !9
  %137 = add i64 %136, 8
  store i64 %137, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %138

138:                                              ; preds = %113, %82
  %139 = load i64, ptr %5, align 8, !tbaa !9
  %140 = load ptr, ptr %9, align 8, !tbaa !21
  %141 = getelementptr inbounds ptr, ptr %140, i64 2
  %142 = load ptr, ptr %141, align 8
  %143 = call noundef i64 %142(ptr noundef nonnull align 8 dereferenceable(280) %9)
  %144 = icmp eq i64 %139, %143
  br i1 %144, label %145, label %146

145:                                              ; preds = %138
  br label %148

146:                                              ; preds = %138
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 1573, ptr noundef @__PRETTY_FUNCTION__._ZN16TPCCQueryMessage11copy_to_bufEPc) #6
  unreachable

147:                                              ; No predecessors!
  br label %148

148:                                              ; preds = %147, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 = { 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 136}
!12 = !{!"_ZTS16TPCCQueryMessage", !13, i64 0, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !7, i64 200, !10, i64 216, !17, i64 224, !18, i64 232, !17, i64 256, !17, i64 257, !10, i64 264, !10, i64 272}
!13 = !{!"_ZTS12QueryMessage", !14, i64 0, !10, i64 120, !10, i64 128}
!14 = !{!"_ZTS7Message", !15, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112}
!15 = !{!"_ZTS10RemReqType", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS5ArrayIP7Item_noE", !6, i64 0, !10, i64 8, !10, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}


; 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.1 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN16TPCCQueryMessage11copy_to_bufEPc = external hidden unnamed_addr constant [51 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN12QueryMessage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12QueryMessage11copy_to_bufEPc(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16TPCCQueryMessage11copy_to_bufEPc(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef %1) unnamed_addr #3 align 2 {
  tail call void @_ZN12QueryMessage11copy_to_bufEPc(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef %1)
  %3 = tail call noundef i64 @_ZN12QueryMessage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(136) %0)
  %4 = getelementptr inbounds i8, ptr %1, i64 %3
  %5 = getelementptr inbounds i8, ptr %0, i64 136
  %6 = load i64, ptr %5, align 8
  store i64 %6, ptr %4, align 1
  %7 = getelementptr i8, ptr %4, i64 8
  %8 = getelementptr inbounds i8, ptr %0, i64 144
  %9 = load i64, ptr %8, align 8
  store i64 %9, ptr %7, align 1
  %10 = getelementptr i8, ptr %4, i64 16
  %11 = getelementptr inbounds i8, ptr %0, i64 152
  %12 = load i64, ptr %11, align 8
  store i64 %12, ptr %10, align 1
  %13 = getelementptr i8, ptr %4, i64 24
  %14 = getelementptr inbounds i8, ptr %0, i64 160
  %15 = load i64, ptr %14, align 8
  store i64 %15, ptr %13, align 1
  %16 = getelementptr i8, ptr %4, i64 32
  %17 = getelementptr inbounds i8, ptr %0, i64 168
  %18 = load i64, ptr %17, align 8
  store i64 %18, ptr %16, align 1
  %19 = add i64 %3, 40
  %20 = load i64, ptr %5, align 8, !tbaa !5
  %21 = icmp eq i64 %20, 1
  br i1 %21, label %22, label %41

22:                                               ; preds = %2
  %23 = getelementptr inbounds i8, ptr %1, i64 %19
  %24 = getelementptr inbounds i8, ptr %0, i64 176
  %25 = load i64, ptr %24, align 8
  store i64 %25, ptr %23, align 1
  %26 = getelementptr i8, ptr %4, i64 48
  %27 = getelementptr inbounds i8, ptr %0, i64 184
  %28 = load i64, ptr %27, align 8
  store i64 %28, ptr %26, align 1
  %29 = getelementptr i8, ptr %4, i64 56
  %30 = getelementptr inbounds i8, ptr %0, i64 192
  %31 = load i64, ptr %30, align 8
  store i64 %31, ptr %29, align 1
  %32 = getelementptr i8, ptr %4, i64 64
  %33 = getelementptr inbounds i8, ptr %0, i64 200
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %33, i64 16, i1 false)
  %34 = getelementptr i8, ptr %4, i64 80
  %35 = getelementptr inbounds i8, ptr %0, i64 216
  %36 = load i64, ptr %35, align 8
  store i64 %36, ptr %34, align 1
  %37 = getelementptr i8, ptr %4, i64 88
  %38 = getelementptr inbounds i8, ptr %0, i64 224
  %39 = load i8, ptr %38, align 8
  store i8 %39, ptr %37, align 1
  %40 = add i64 %3, 89
  %.pr = load i64, ptr %5, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %22, %2
  %42 = phi i64 [ %.pr, %22 ], [ %20, %2 ]
  %.0 = phi i64 [ %40, %22 ], [ %19, %2 ]
  %43 = icmp eq i64 %42, 2
  br i1 %43, label %44, label %69

44:                                               ; preds = %41
  %45 = getelementptr inbounds i8, ptr %0, i64 232
  %46 = tail call noundef i64 @_ZN5ArrayIP7Item_noE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %45)
  %47 = getelementptr inbounds i8, ptr %1, i64 %.0
  store i64 %46, ptr %47, align 1
  %48 = add i64 %.0, 8
  %49 = tail call noundef i64 @_ZN5ArrayIP7Item_noE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %45)
  %.not = icmp eq i64 %49, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %44
  %.1.lcssa = phi i64 [ %48, %44 ], [ %65, %.lr.ph ]
  %50 = getelementptr inbounds i8, ptr %1, i64 %.1.lcssa
  %51 = getelementptr inbounds i8, ptr %0, i64 256
  %52 = load i8, ptr %51, align 8
  store i8 %52, ptr %50, align 1
  %53 = getelementptr i8, ptr %50, i64 1
  %54 = getelementptr inbounds i8, ptr %0, i64 257
  %55 = load i8, ptr %54, align 1
  store i8 %55, ptr %53, align 1
  %56 = getelementptr i8, ptr %50, i64 2
  %57 = getelementptr inbounds i8, ptr %0, i64 264
  %58 = load i64, ptr %57, align 8
  store i64 %58, ptr %56, align 1
  %59 = getelementptr i8, ptr %50, i64 10
  %60 = getelementptr inbounds i8, ptr %0, i64 272
  %61 = load i64, ptr %60, align 8
  store i64 %61, ptr %59, align 1
  %62 = add i64 %.1.lcssa, 18
  br label %69

.lr.ph:                                           ; preds = %44, %.lr.ph
  %.159 = phi i64 [ %65, %.lr.ph ], [ %48, %44 ]
  %.05758 = phi i64 [ %66, %.lr.ph ], [ 0, %44 ]
  %63 = tail call noundef ptr @_ZN5ArrayIP7Item_noEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %.05758)
  %64 = getelementptr inbounds i8, ptr %1, i64 %.159
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(24) %64, ptr noundef nonnull align 1 dereferenceable(24) %63, i64 24, i1 false)
  %65 = add i64 %.159, 24
  %66 = add nuw i64 %.05758, 1
  %67 = tail call noundef i64 @_ZN5ArrayIP7Item_noE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %45)
  %68 = icmp ult i64 %66, %67
  br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !17

69:                                               ; preds = %._crit_edge, %41
  %.2 = phi i64 [ %62, %._crit_edge ], [ %.0, %41 ]
  %70 = load ptr, ptr %0, align 8, !tbaa !19
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %72 = load ptr, ptr %71, align 8
  %73 = tail call noundef i64 %72(ptr noundef nonnull align 8 dereferenceable(280) %0)
  %74 = icmp eq i64 %.2, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %69
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 1573, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16TPCCQueryMessage11copy_to_bufEPc) #4
  unreachable

76:                                               ; preds = %69
  ret void
}

attributes #0 = { mustprogress nocallback nofree 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 = { 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 = { 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 136}
!6 = !{!"_ZTS16TPCCQueryMessage", !7, i64 0, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !10, i64 200, !12, i64 216, !14, i64 224, !15, i64 232, !14, i64 256, !14, i64 257, !12, i64 264, !12, i64 272}
!7 = !{!"_ZTS12QueryMessage", !8, i64 0, !12, i64 120, !12, i64 128}
!8 = !{!"_ZTS7Message", !9, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112}
!9 = !{!"_ZTS10RemReqType", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"double", !10, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = !{!"_ZTS5ArrayIP7Item_noE", !16, i64 0, !12, i64 8, !12, i64 16}
!16 = !{!"any pointer", !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !11, i64 0}


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