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

; 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.Message = type { ptr, i32, i64, i64, i64, i64, i64, i64, double, double, double, double, double, double, double }

@g_node_id = external global i32, align 4
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Message14create_messageE10RemReqType = external hidden unnamed_addr constant [52 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #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
define dso_local noundef ptr @_ZN7Message14create_messageE10RemReqType(i32 noundef %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %6 = load i32, ptr %2, align 4, !tbaa !5
  switch i32 %6, label %56 [
    i32 0, label %7
    i32 4, label %9
    i32 5, label %9
    i32 6, label %20
    i32 9, label %22
    i32 21, label %24
    i32 22, label %26
    i32 23, label %28
    i32 24, label %30
    i32 11, label %30
    i32 12, label %30
    i32 3, label %37
    i32 13, label %37
    i32 14, label %37
    i32 16, label %48
    i32 18, label %50
    i32 19, label %52
    i32 20, label %54
  ]

7:                                                ; preds = %1
  %8 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 120) #8
  call void @_ZN15InitDoneMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %8) #7
  store ptr %8, ptr %3, align 8, !tbaa !9
  br label %57

9:                                                ; preds = %1, %1
  %10 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 160) #8
  invoke void @_ZN16YCSBQueryMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(160) %10)
          to label %11 unwind label %16

11:                                               ; preds = %9
  store ptr %10, ptr %3, align 8, !tbaa !9
  %12 = load ptr, ptr %3, align 8, !tbaa !9
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = getelementptr inbounds ptr, ptr %13, i64 7
  %15 = load ptr, ptr %14, align 8
  call void %15(ptr noundef nonnull align 8 dereferenceable(120) %12)
  br label %57

16:                                               ; preds = %9
  %17 = landingpad { ptr, i32 }
          cleanup
  %18 = extractvalue { ptr, i32 } %17, 0
  store ptr %18, ptr %4, align 8
  %19 = extractvalue { ptr, i32 } %17, 1
  store i32 %19, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %10, i64 noundef 160) #9
  br label %96

20:                                               ; preds = %1
  %21 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #8
  call void @_ZN13FinishMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(133) %21) #7
  store ptr %21, ptr %3, align 8, !tbaa !9
  br label %57

22:                                               ; preds = %1
  %23 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #8
  call void @_ZN20QueryResponseMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %23) #7
  store ptr %23, ptr %3, align 8, !tbaa !9
  br label %57

24:                                               ; preds = %1
  %25 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #8
  call void @_ZN10LogMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(176) %25) #7
  store ptr %25, ptr %3, align 8, !tbaa !9
  br label %57

26:                                               ; preds = %1
  %27 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 120) #8
  call void @_ZN13LogRspMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %27) #7
  store ptr %27, ptr %3, align 8, !tbaa !9
  br label %57

28:                                               ; preds = %1
  %29 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 120) #8
  call void @_ZN17LogFlushedMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %29) #7
  store ptr %29, ptr %3, align 8, !tbaa !9
  br label %57

30:                                               ; preds = %1, %1, %1
  %31 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 152) #8
  invoke void @_ZN10AckMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(152) %31)
          to label %32 unwind label %33

32:                                               ; preds = %30
  store ptr %31, ptr %3, align 8, !tbaa !9
  br label %57

33:                                               ; preds = %30
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %4, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %31, i64 noundef 152) #9
  br label %96

37:                                               ; preds = %1, %1, %1
  %38 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 200) #8
  invoke void @_ZN22YCSBClientQueryMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %38)
          to label %39 unwind label %44

39:                                               ; preds = %37
  store ptr %38, ptr %3, align 8, !tbaa !9
  %40 = load ptr, ptr %3, align 8, !tbaa !9
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds ptr, ptr %41, i64 7
  %43 = load ptr, ptr %42, align 8
  call void %43(ptr noundef nonnull align 8 dereferenceable(120) %40)
  br label %57

44:                                               ; preds = %37
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %4, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %5, align 4
  call void @_ZdlPvm(ptr noundef %38, i64 noundef 200) #9
  br label %96

48:                                               ; preds = %1
  %49 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 144) #8
  call void @_ZN14PrepareMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(144) %49) #7
  store ptr %49, ptr %3, align 8, !tbaa !9
  br label %57

50:                                               ; preds = %1
  %51 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 128) #8
  call void @_ZN14ForwardMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(124) %51) #7
  store ptr %51, ptr %3, align 8, !tbaa !9
  br label %57

52:                                               ; preds = %1
  %53 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 128) #8
  call void @_ZN11DoneMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %53) #7
  store ptr %53, ptr %3, align 8, !tbaa !9
  br label %57

54:                                               ; preds = %1
  %55 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 136) #8
  call void @_ZN21ClientResponseMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %55) #7
  store ptr %55, ptr %3, align 8, !tbaa !9
  br label %57

56:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 173, ptr noundef @__PRETTY_FUNCTION__._ZN7Message14create_messageE10RemReqType) #10
  unreachable

57:                                               ; preds = %54, %52, %50, %48, %39, %32, %28, %26, %24, %22, %20, %11, %7
  %58 = load ptr, ptr %3, align 8, !tbaa !9
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  br label %63

61:                                               ; preds = %57
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 175, ptr noundef @__PRETTY_FUNCTION__._ZN7Message14create_messageE10RemReqType) #10
  unreachable

62:                                               ; No predecessors!
  br label %63

63:                                               ; preds = %62, %60
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = load ptr, ptr %3, align 8, !tbaa !9
  %66 = getelementptr inbounds %class.Message, ptr %65, i32 0, i32 1
  store i32 %64, ptr %66, align 8, !tbaa !13
  %67 = load ptr, ptr %3, align 8, !tbaa !9
  %68 = getelementptr inbounds %class.Message, ptr %67, i32 0, i32 2
  store i64 -1, ptr %68, align 8, !tbaa !17
  %69 = load ptr, ptr %3, align 8, !tbaa !9
  %70 = getelementptr inbounds %class.Message, ptr %69, i32 0, i32 3
  store i64 -1, ptr %70, align 8, !tbaa !18
  %71 = load i32, ptr @g_node_id, align 4, !tbaa !19
  %72 = zext i32 %71 to i64
  %73 = load ptr, ptr %3, align 8, !tbaa !9
  %74 = getelementptr inbounds %class.Message, ptr %73, i32 0, i32 4
  store i64 %72, ptr %74, align 8, !tbaa !21
  %75 = load ptr, ptr %3, align 8, !tbaa !9
  %76 = getelementptr inbounds %class.Message, ptr %75, i32 0, i32 5
  store i64 0, ptr %76, align 8, !tbaa !22
  %77 = load ptr, ptr %3, align 8, !tbaa !9
  %78 = getelementptr inbounds %class.Message, ptr %77, i32 0, i32 6
  store i64 0, ptr %78, align 8, !tbaa !23
  %79 = load ptr, ptr %3, align 8, !tbaa !9
  %80 = getelementptr inbounds %class.Message, ptr %79, i32 0, i32 7
  store i64 0, ptr %80, align 8, !tbaa !24
  %81 = load ptr, ptr %3, align 8, !tbaa !9
  %82 = getelementptr inbounds %class.Message, ptr %81, i32 0, i32 8
  store double 0.000000e+00, ptr %82, align 8, !tbaa !25
  %83 = load ptr, ptr %3, align 8, !tbaa !9
  %84 = getelementptr inbounds %class.Message, ptr %83, i32 0, i32 9
  store double 0.000000e+00, ptr %84, align 8, !tbaa !26
  %85 = load ptr, ptr %3, align 8, !tbaa !9
  %86 = getelementptr inbounds %class.Message, ptr %85, i32 0, i32 10
  store double 0.000000e+00, ptr %86, align 8, !tbaa !27
  %87 = load ptr, ptr %3, align 8, !tbaa !9
  %88 = getelementptr inbounds %class.Message, ptr %87, i32 0, i32 11
  store double 0.000000e+00, ptr %88, align 8, !tbaa !28
  %89 = load ptr, ptr %3, align 8, !tbaa !9
  %90 = getelementptr inbounds %class.Message, ptr %89, i32 0, i32 12
  store double 0.000000e+00, ptr %90, align 8, !tbaa !29
  %91 = load ptr, ptr %3, align 8, !tbaa !9
  %92 = getelementptr inbounds %class.Message, ptr %91, i32 0, i32 13
  store double 0.000000e+00, ptr %92, align 8, !tbaa !30
  %93 = load ptr, ptr %3, align 8, !tbaa !9
  %94 = getelementptr inbounds %class.Message, ptr %93, i32 0, i32 14
  store double 0.000000e+00, ptr %94, align 8, !tbaa !31
  %95 = load ptr, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret ptr %95

96:                                               ; preds = %44, %33, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %97

97:                                               ; preds = %96
  %98 = load ptr, ptr %4, align 8
  %99 = load i32, ptr %5, align 4
  %100 = insertvalue { ptr, i32 } poison, ptr %98, 0
  %101 = insertvalue { ptr, i32 } %100, i32 %99, 1
  resume { ptr, i32 } %101
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN15InitDoneMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16YCSBQueryMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #5 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13FinishMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(133)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10LogMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(176)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13LogRspMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN17LogFlushedMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10AckMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN22YCSBClientQueryMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14PrepareMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14ForwardMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(124)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11DoneMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 = { 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 = { inlinehint 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 = { inlinehint 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 #6 = { nobuiltin 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin nounwind }
attributes #10 = { 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 = !{!"_ZTS10RemReqType", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTS7Message", !6, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112}
!15 = !{!"long", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!14, !15, i64 16}
!18 = !{!14, !15, i64 24}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!14, !15, i64 32}
!22 = !{!14, !15, i64 40}
!23 = !{!14, !15, i64 48}
!24 = !{!14, !15, i64 56}
!25 = !{!14, !16, i64 64}
!26 = !{!14, !16, i64 72}
!27 = !{!14, !16, i64 80}
!28 = !{!14, !16, i64 88}
!29 = !{!14, !16, i64 96}
!30 = !{!14, !16, i64 104}
!31 = !{!14, !16, i64 112}


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

@g_node_id = external local_unnamed_addr global i32, align 4
@.str.1 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN7Message14create_messageE10RemReqType = external hidden unnamed_addr constant [52 x i8], align 1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #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
define dso_local noundef ptr @_ZN7Message14create_messageE10RemReqType(i32 noundef %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  switch i32 %0, label %42 [
    i32 0, label %2
    i32 4, label %4
    i32 5, label %4
    i32 6, label %12
    i32 9, label %14
    i32 21, label %16
    i32 22, label %18
    i32 23, label %20
    i32 24, label %22
    i32 11, label %22
    i32 12, label %22
    i32 3, label %26
    i32 13, label %26
    i32 14, label %26
    i32 16, label %34
    i32 18, label %36
    i32 19, label %38
    i32 20, label %40
  ]

2:                                                ; preds = %1
  %3 = tail call noalias noundef nonnull dereferenceable(120) ptr @_Znwm(i64 noundef 120) #7
  tail call void @_ZN15InitDoneMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %3) #8
  br label %43

4:                                                ; preds = %1, %1
  %5 = tail call noalias noundef nonnull dereferenceable(160) ptr @_Znwm(i64 noundef 160) #7
  invoke void @_ZN16YCSBQueryMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(160) %5)
          to label %6 unwind label %10

6:                                                ; preds = %4
  %7 = load ptr, ptr %5, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 56
  %9 = load ptr, ptr %8, align 8
  tail call void %9(ptr noundef nonnull align 8 dereferenceable(120) %5)
  br label %43

10:                                               ; preds = %4
  %11 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %5, i64 noundef 160) #9
  br label %50

12:                                               ; preds = %1
  %13 = tail call noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #7
  tail call void @_ZN13FinishMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(133) %13) #8
  br label %43

14:                                               ; preds = %1
  %15 = tail call noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #7
  tail call void @_ZN20QueryResponseMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %15) #8
  br label %43

16:                                               ; preds = %1
  %17 = tail call noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #7
  tail call void @_ZN10LogMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(176) %17) #8
  br label %43

18:                                               ; preds = %1
  %19 = tail call noalias noundef nonnull dereferenceable(120) ptr @_Znwm(i64 noundef 120) #7
  tail call void @_ZN13LogRspMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %19) #8
  br label %43

20:                                               ; preds = %1
  %21 = tail call noalias noundef nonnull dereferenceable(120) ptr @_Znwm(i64 noundef 120) #7
  tail call void @_ZN17LogFlushedMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %21) #8
  br label %43

22:                                               ; preds = %1, %1, %1
  %23 = tail call noalias noundef nonnull dereferenceable(152) ptr @_Znwm(i64 noundef 152) #7
  invoke void @_ZN10AckMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(152) %23)
          to label %43 unwind label %24

24:                                               ; preds = %22
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %23, i64 noundef 152) #9
  br label %50

26:                                               ; preds = %1, %1, %1
  %27 = tail call noalias noundef nonnull dereferenceable(200) ptr @_Znwm(i64 noundef 200) #7
  invoke void @_ZN22YCSBClientQueryMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %27)
          to label %28 unwind label %32

28:                                               ; preds = %26
  %29 = load ptr, ptr %27, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 56
  %31 = load ptr, ptr %30, align 8
  tail call void %31(ptr noundef nonnull align 8 dereferenceable(120) %27)
  br label %43

32:                                               ; preds = %26
  %33 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %27, i64 noundef 200) #9
  br label %50

34:                                               ; preds = %1
  %35 = tail call noalias noundef nonnull dereferenceable(144) ptr @_Znwm(i64 noundef 144) #7
  tail call void @_ZN14PrepareMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(144) %35) #8
  br label %43

36:                                               ; preds = %1
  %37 = tail call noalias noundef nonnull dereferenceable(128) ptr @_Znwm(i64 noundef 128) #7
  tail call void @_ZN14ForwardMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(124) %37) #8
  br label %43

38:                                               ; preds = %1
  %39 = tail call noalias noundef nonnull dereferenceable(128) ptr @_Znwm(i64 noundef 128) #7
  tail call void @_ZN11DoneMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %39) #8
  br label %43

40:                                               ; preds = %1
  %41 = tail call noalias noundef nonnull dereferenceable(136) ptr @_Znwm(i64 noundef 136) #7
  tail call void @_ZN21ClientResponseMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %41) #8
  br label %43

42:                                               ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 173, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7Message14create_messageE10RemReqType) #10
  unreachable

43:                                               ; preds = %2, %6, %12, %14, %16, %18, %20, %28, %34, %36, %38, %40, %22
  %.022 = phi ptr [ %41, %40 ], [ %39, %38 ], [ %37, %36 ], [ %35, %34 ], [ %27, %28 ], [ %21, %20 ], [ %19, %18 ], [ %17, %16 ], [ %15, %14 ], [ %13, %12 ], [ %5, %6 ], [ %3, %2 ], [ %23, %22 ]
  %44 = getelementptr inbounds i8, ptr %.022, i64 8
  store i32 %0, ptr %44, align 8, !tbaa !8
  %45 = getelementptr inbounds i8, ptr %.022, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %45, i8 -1, i64 16, i1 false)
  %46 = load i32, ptr @g_node_id, align 4, !tbaa !14
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr %.022, i64 32
  store i64 %47, ptr %48, align 8, !tbaa !16
  %49 = getelementptr inbounds i8, ptr %.022, i64 40
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %49, i8 0, i64 80, i1 false)
  ret ptr %.022

50:                                               ; preds = %32, %24, %10
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %25, %24 ], [ %11, %10 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN15InitDoneMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN16YCSBQueryMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13FinishMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(133)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN13LogRspMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN17LogFlushedMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10AckMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN22YCSBClientQueryMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14PrepareMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN14ForwardMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(124)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11DoneMessageC2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { nobuiltin allocsize(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 = { inlinehint 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 = { inlinehint 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 = { nobuiltin 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { builtin nounwind }
attributes #10 = { 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 = !{!9, !10, i64 8}
!9 = !{!"_ZTS7Message", !10, 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}
!10 = !{!"_ZTS10RemReqType", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"long", !11, i64 0}
!13 = !{!"double", !11, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !11, i64 0}
!16 = !{!9, !12, i64 32}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass