; LLVM IR from mitdbg/deneva :: transport/message.ll (ZN22TPCCClientQueryMessage13copy_from_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.mem_alloc = type { i8 }
%class.TPCCClientQueryMessage = type { %class.ClientQueryMessage, i64, i64, i64, i64, i64, i64, i64, [16 x i8], i64, i8, %class.Array.2, i8, i8, i64, i64 }
%class.ClientQueryMessage = type { %class.Message, i64, i64, i64, i64, %class.Array.0 }
%class.Message = type { ptr, i32, i64, i64, i64, i64, i64, i64, double, double, double, double, double, double, double }
%class.Array.0 = type { ptr, i64, i64 }
%class.Array.2 = type { ptr, i64, i64 }

@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@mem_allocator = external global %class.mem_alloc, align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN22TPCCClientQueryMessage13copy_from_bufEPc = external hidden unnamed_addr constant [59 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 uwtable
declare dso_local noundef i64 @_ZN18ClientQueryMessage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #3 align 2

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

declare noundef ptr @_ZN9mem_alloc5allocEm(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN22TPCCClientQueryMessage13copy_from_bufEPc(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %1) unnamed_addr #3 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 @_ZN18ClientQueryMessage13copy_from_bufEPc(ptr noundef nonnull align 8 dereferenceable(176) %9, ptr noundef %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %11 = call noundef i64 @_ZN18ClientQueryMessage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(176) %9)
  store i64 %11, ptr %5, align 8, !tbaa !9
  %12 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 1
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = load i64, ptr %5, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %13, i64 %14
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 1 %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 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 2
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load i64, ptr %5, align 8, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %19, i64 %20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 1 %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 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 3
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load i64, ptr %5, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %25, i64 %26
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 1 %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 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 4
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = load i64, ptr %5, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %31, i64 %32
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %30, ptr align 1 %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 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = load i64, ptr %5, align 8, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %37, i64 %38
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 1 %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.TPCCClientQueryMessage, ptr %9, i32 0, i32 6
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load i64, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %43, i64 %44
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 1 %45, i64 8, i1 false)
  %46 = load i64, ptr %5, align 8, !tbaa !9
  %47 = add i64 %46, 8
  store i64 %47, ptr %5, align 8, !tbaa !9
  %48 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 7
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = load i64, ptr %5, align 8, !tbaa !9
  %51 = getelementptr inbounds i8, ptr %49, i64 %50
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %48, ptr align 1 %51, i64 8, i1 false)
  %52 = load i64, ptr %5, align 8, !tbaa !9
  %53 = add i64 %52, 8
  store i64 %53, ptr %5, align 8, !tbaa !9
  %54 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 8
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i64, ptr %5, align 8, !tbaa !9
  %57 = getelementptr inbounds i8, ptr %55, i64 %56
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %54, ptr align 1 %57, i64 16, i1 false)
  %58 = load i64, ptr %5, align 8, !tbaa !9
  %59 = add i64 %58, 16
  store i64 %59, ptr %5, align 8, !tbaa !9
  %60 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 9
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = load i64, ptr %5, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %61, i64 %62
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %60, ptr align 1 %63, i64 8, i1 false)
  %64 = load i64, ptr %5, align 8, !tbaa !9
  %65 = add i64 %64, 8
  store i64 %65, ptr %5, align 8, !tbaa !9
  %66 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 10
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = load i64, ptr %5, align 8, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %67, i64 %68
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %66, ptr align 1 %69, i64 1, i1 false)
  %70 = load i64, ptr %5, align 8, !tbaa !9
  %71 = add i64 %70, 1
  store i64 %71, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = load i64, ptr %5, align 8, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %72, i64 %73
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 1 %74, i64 8, i1 false)
  %75 = load i64, ptr %5, align 8, !tbaa !9
  %76 = add i64 %75, 8
  store i64 %76, ptr %5, align 8, !tbaa !9
  %77 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 11
  %78 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN5ArrayIP7Item_noE4initEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %78)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %79

79:                                               ; preds = %94, %2
  %80 = load i64, ptr %7, align 8, !tbaa !9
  %81 = load i64, ptr %6, align 8, !tbaa !9
  %82 = icmp ult i64 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %97

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %85 = call noundef ptr @_ZN9mem_alloc5allocEm(ptr noundef nonnull align 1 dereferenceable(1) @mem_allocator, i64 noundef 24)
  store ptr %85, ptr %8, align 8, !tbaa !5
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = load i64, ptr %5, align 8, !tbaa !9
  %89 = getelementptr inbounds i8, ptr %87, i64 %88
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %86, ptr align 1 %89, i64 24, i1 false)
  %90 = load i64, ptr %5, align 8, !tbaa !9
  %91 = add i64 %90, 24
  store i64 %91, ptr %5, align 8, !tbaa !9
  %92 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 11
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN5ArrayIP7Item_noE3addES1_(ptr noundef nonnull align 8 dereferenceable(24) %92, ptr noundef %93)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %94

94:                                               ; preds = %84
  %95 = load i64, ptr %7, align 8, !tbaa !9
  %96 = add i64 %95, 1
  store i64 %96, ptr %7, align 8, !tbaa !9
  br label %79, !llvm.loop !11

97:                                               ; preds = %83
  %98 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 12
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = load i64, ptr %5, align 8, !tbaa !9
  %101 = getelementptr inbounds i8, ptr %99, i64 %100
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %98, ptr align 1 %101, i64 1, i1 false)
  %102 = load i64, ptr %5, align 8, !tbaa !9
  %103 = add i64 %102, 1
  store i64 %103, ptr %5, align 8, !tbaa !9
  %104 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 13
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = load i64, ptr %5, align 8, !tbaa !9
  %107 = getelementptr inbounds i8, ptr %105, i64 %106
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %104, ptr align 1 %107, i64 1, i1 false)
  %108 = load i64, ptr %5, align 8, !tbaa !9
  %109 = add i64 %108, 1
  store i64 %109, ptr %5, align 8, !tbaa !9
  %110 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 14
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = load i64, ptr %5, align 8, !tbaa !9
  %113 = getelementptr inbounds i8, ptr %111, i64 %112
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %110, ptr align 1 %113, i64 8, i1 false)
  %114 = load i64, ptr %5, align 8, !tbaa !9
  %115 = add i64 %114, 8
  store i64 %115, ptr %5, align 8, !tbaa !9
  %116 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %9, i32 0, i32 15
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = load i64, ptr %5, align 8, !tbaa !9
  %119 = getelementptr inbounds i8, ptr %117, i64 %118
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %116, ptr align 1 %119, i64 8, i1 false)
  %120 = load i64, ptr %5, align 8, !tbaa !9
  %121 = add i64 %120, 8
  store i64 %121, ptr %5, align 8, !tbaa !9
  %122 = load i64, ptr %5, align 8, !tbaa !9
  %123 = load ptr, ptr %9, align 8, !tbaa !13
  %124 = getelementptr inbounds ptr, ptr %123, i64 2
  %125 = load ptr, ptr %124, align 8
  %126 = call noundef i64 %125(ptr noundef nonnull align 8 dereferenceable(312) %9)
  %127 = icmp eq i64 %122, %126
  br i1 %127, label %128, label %129

128:                                              ; preds = %97
  br label %131

129:                                              ; preds = %97
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 654, ptr noundef @__PRETTY_FUNCTION__._ZN22TPCCClientQueryMessage13copy_from_bufEPc) #7
  unreachable

130:                                              ; No predecessors!
  br label %131

131:                                              ; preds = %130, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5ArrayIP7Item_noE3addES1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"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"

%class.mem_alloc = type { i8 }

@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@mem_allocator = external global %class.mem_alloc, align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN22TPCCClientQueryMessage13copy_from_bufEPc = external hidden unnamed_addr constant [59 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 uwtable
declare dso_local noundef i64 @_ZN18ClientQueryMessage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #2 align 2

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

declare noundef ptr @_ZN9mem_alloc5allocEm(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN22TPCCClientQueryMessage13copy_from_bufEPc(ptr noundef nonnull align 8 dereferenceable(312) %0, ptr noundef %1) unnamed_addr #2 align 2 {
  tail call void @_ZN18ClientQueryMessage13copy_from_bufEPc(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef %1)
  %3 = tail call noundef i64 @_ZN18ClientQueryMessage8get_sizeEv(ptr noundef nonnull align 8 dereferenceable(176) %0)
  %4 = getelementptr inbounds i8, ptr %0, i64 176
  %5 = getelementptr inbounds i8, ptr %1, i64 %3
  %6 = load i64, ptr %5, align 1
  store i64 %6, ptr %4, align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 184
  %8 = getelementptr i8, ptr %5, i64 8
  %9 = load i64, ptr %8, align 1
  store i64 %9, ptr %7, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 192
  %11 = getelementptr i8, ptr %5, i64 16
  %12 = load i64, ptr %11, align 1
  store i64 %12, ptr %10, align 8
  %13 = getelementptr inbounds i8, ptr %0, i64 200
  %14 = getelementptr i8, ptr %5, i64 24
  %15 = load i64, ptr %14, align 1
  store i64 %15, ptr %13, align 8
  %16 = getelementptr inbounds i8, ptr %0, i64 208
  %17 = getelementptr i8, ptr %5, i64 32
  %18 = load i64, ptr %17, align 1
  store i64 %18, ptr %16, align 8
  %19 = getelementptr inbounds i8, ptr %0, i64 216
  %20 = getelementptr i8, ptr %5, i64 40
  %21 = load i64, ptr %20, align 1
  store i64 %21, ptr %19, align 8
  %22 = getelementptr inbounds i8, ptr %0, i64 224
  %23 = getelementptr i8, ptr %5, i64 48
  %24 = load i64, ptr %23, align 1
  store i64 %24, ptr %22, align 8
  %25 = getelementptr inbounds i8, ptr %0, i64 232
  %26 = getelementptr i8, ptr %5, i64 56
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 1 dereferenceable(16) %26, i64 16, i1 false)
  %27 = getelementptr inbounds i8, ptr %0, i64 248
  %28 = getelementptr i8, ptr %5, i64 72
  %29 = load i64, ptr %28, align 1
  store i64 %29, ptr %27, align 8
  %30 = getelementptr inbounds i8, ptr %0, i64 256
  %31 = getelementptr i8, ptr %5, i64 80
  %32 = load i8, ptr %31, align 1
  store i8 %32, ptr %30, align 8
  %33 = getelementptr i8, ptr %5, i64 81
  %.0.copyload = load i64, ptr %33, align 1
  %34 = add i64 %3, 89
  %35 = getelementptr inbounds i8, ptr %0, i64 264
  tail call void @_ZN5ArrayIP7Item_noE4initEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %.0.copyload)
  %.not = icmp eq i64 %.0.copyload, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %2
  %.0.lcssa = phi i64 [ %34, %2 ], [ %56, %.lr.ph ]
  %36 = getelementptr inbounds i8, ptr %0, i64 288
  %37 = getelementptr inbounds i8, ptr %1, i64 %.0.lcssa
  %38 = load i8, ptr %37, align 1
  store i8 %38, ptr %36, align 8
  %39 = getelementptr inbounds i8, ptr %0, i64 289
  %40 = getelementptr i8, ptr %37, i64 1
  %41 = load i8, ptr %40, align 1
  store i8 %41, ptr %39, align 1
  %42 = getelementptr inbounds i8, ptr %0, i64 296
  %43 = getelementptr i8, ptr %37, i64 2
  %44 = load i64, ptr %43, align 1
  store i64 %44, ptr %42, align 8
  %45 = getelementptr inbounds i8, ptr %0, i64 304
  %46 = getelementptr i8, ptr %37, i64 10
  %47 = load i64, ptr %46, align 1
  store i64 %47, ptr %45, align 8
  %48 = add i64 %.0.lcssa, 18
  %49 = load ptr, ptr %0, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %51 = load ptr, ptr %50, align 8
  %52 = tail call noundef i64 %51(ptr noundef nonnull align 8 dereferenceable(312) %0)
  %53 = icmp eq i64 %48, %52
  br i1 %53, label %59, label %58

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.058 = phi i64 [ %56, %.lr.ph ], [ %34, %2 ]
  %.05657 = phi i64 [ %57, %.lr.ph ], [ 0, %2 ]
  %54 = tail call noundef ptr @_ZN9mem_alloc5allocEm(ptr noundef nonnull align 1 dereferenceable(1) @mem_allocator, i64 noundef 24)
  %55 = getelementptr inbounds i8, ptr %1, i64 %.058
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %54, ptr noundef nonnull align 1 dereferenceable(24) %55, i64 24, i1 false)
  %56 = add i64 %.058, 24
  tail call void @_ZN5ArrayIP7Item_noE3addES1_(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef %54)
  %57 = add nuw i64 %.05657, 1
  %exitcond.not = icmp eq i64 %57, %.0.copyload
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !8

58:                                               ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 654, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN22TPCCClientQueryMessage13copy_from_bufEPc) #5
  unreachable

59:                                               ; preds = %._crit_edge
  ret void
}

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

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

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 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


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