; LLVM IR from mitdbg/deneva :: benchmarks/tpcc_query.ll (ZN9TPCCQuery12participantsEP7MessageP8Workload)

; 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.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%class.TPCCClientQueryMessage = type { %class.ClientQueryMessage, i64, i64, i64, i64, i64, i64, i64, [16 x i8], i64, i8, %class.Array.0, i8, i8, i64, i64 }
%class.ClientQueryMessage = type { %class.Message, i64, i64, i64, i64, %class.Array }
%class.Message = type { ptr, i32, i64, i64, i64, i64, i64, i64, double, double, double, double, double, double, double }
%class.Array = type { ptr, i64, i64 }
%class.Array.0 = type { ptr, i64, i64 }
%struct.Item_no = type { i64, i64, i64 }

@g_node_cnt = external global i32, align 4
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__._ZN9TPCCQuery12participantsEP7MessageP8Workload = external hidden unnamed_addr constant [73 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 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 ptr @_ZN5ArrayIP7Item_noEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9TPCCQuery12participantsEP7MessageP8Workload(ptr dead_on_unwind noalias writable sret(%"class.std::set") align 8 %0, ptr noundef %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"struct.std::pair", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store i1 false, ptr %7, align 1
  call void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %17, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %18, i32 0, i32 2
  %20 = load i64, ptr %19, align 8, !tbaa !9
  %21 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %20)
          to label %22 unwind label %35

22:                                               ; preds = %3
  %23 = load i32, ptr @g_node_cnt, align 4, !tbaa !19
  %24 = zext i32 %23 to i64
  %25 = urem i64 %21, %24
  store i64 %25, ptr %9, align 8, !tbaa !21
  %26 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %27 unwind label %35

27:                                               ; preds = %22
  %28 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %29 = extractvalue { ptr, i8 } %26, 0
  store ptr %29, ptr %28, align 8
  %30 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %31 = extractvalue { ptr, i8 } %26, 1
  store i8 %31, ptr %30, align 8
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %32, i32 0, i32 1
  %34 = load i64, ptr %33, align 8, !tbaa !22
  switch i64 %34, label %89 [
    i64 1, label %39
    i64 2, label %54
  ]

35:                                               ; preds = %44, %39, %22, %3
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %10, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %11, align 4
  br label %92

39:                                               ; preds = %27
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %40, i32 0, i32 6
  %42 = load i64, ptr %41, align 8, !tbaa !23
  %43 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %42)
          to label %44 unwind label %35

44:                                               ; preds = %39
  %45 = load i32, ptr @g_node_cnt, align 4, !tbaa !19
  %46 = zext i32 %45 to i64
  %47 = urem i64 %43, %46
  store i64 %47, ptr %9, align 8, !tbaa !21
  %48 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %49 unwind label %35

49:                                               ; preds = %44
  %50 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 0
  %51 = extractvalue { ptr, i8 } %48, 0
  store ptr %51, ptr %50, align 8
  %52 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 1
  %53 = extractvalue { ptr, i8 } %48, 1
  store i8 %53, ptr %52, align 8
  br label %90

54:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !21
  br label %55

55:                                               ; preds = %81, %54
  %56 = load i64, ptr %14, align 8, !tbaa !21
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %57, i32 0, i32 14
  %59 = load i64, ptr %58, align 8, !tbaa !24
  %60 = icmp ult i64 %56, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %88

62:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %class.TPCCClientQueryMessage, ptr %63, i32 0, i32 11
  %65 = load i64, ptr %14, align 8, !tbaa !21
  %66 = invoke noundef ptr @_ZN5ArrayIP7Item_noEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %65)
          to label %67 unwind label %84

67:                                               ; preds = %62
  %68 = getelementptr inbounds %struct.Item_no, ptr %66, i32 0, i32 1
  %69 = load i64, ptr %68, align 8, !tbaa !25
  %70 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %69)
          to label %71 unwind label %84

71:                                               ; preds = %67
  %72 = load i32, ptr @g_node_cnt, align 4, !tbaa !19
  %73 = zext i32 %72 to i64
  %74 = urem i64 %70, %73
  store i64 %74, ptr %15, align 8, !tbaa !21
  %75 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %76 unwind label %84

76:                                               ; preds = %71
  %77 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 0
  %78 = extractvalue { ptr, i8 } %75, 0
  store ptr %78, ptr %77, align 8
  %79 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 1
  %80 = extractvalue { ptr, i8 } %75, 1
  store i8 %80, ptr %79, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %81

81:                                               ; preds = %76
  %82 = load i64, ptr %14, align 8, !tbaa !21
  %83 = add i64 %82, 1
  store i64 %83, ptr %14, align 8, !tbaa !21
  br label %55, !llvm.loop !27

84:                                               ; preds = %71, %67, %62
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %10, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %92

88:                                               ; preds = %61
  br label %90

89:                                               ; preds = %27
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.5, i32 noundef 86, ptr noundef @__PRETTY_FUNCTION__._ZN9TPCCQuery12participantsEP7MessageP8Workload) #6
  unreachable

90:                                               ; preds = %88, %49
  store i1 true, ptr %7, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %91 = load i1, ptr %7, align 1
  br i1 %91, label %94, label %93

92:                                               ; preds = %84, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  br label %95

93:                                               ; preds = %90
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  br label %94

94:                                               ; preds = %93, %90
  ret void

95:                                               ; preds = %92
  %96 = load ptr, ptr %10, align 8
  %97 = load i32, ptr %11, align 4
  %98 = insertvalue { ptr, i32 } poison, ptr %96, 0
  %99 = insertvalue { ptr, i32 } %98, i32 %97, 1
  resume { ptr, i32 } %99
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

declare noundef i64 @_Z10wh_to_partm(i64 noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #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, !14, i64 184}
!10 = !{!"_ZTS22TPCCClientQueryMessage", !11, i64 0, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224, !7, i64 232, !14, i64 248, !17, i64 256, !18, i64 264, !17, i64 288, !17, i64 289, !14, i64 296, !14, i64 304}
!11 = !{!"_ZTS18ClientQueryMessage", !12, i64 0, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !16, i64 152}
!12 = !{!"_ZTS7Message", !13, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112}
!13 = !{!"_ZTS10RemReqType", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTS5ArrayImE", !6, i64 0, !14, i64 8, !14, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS5ArrayIP7Item_noE", !6, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!14, !14, i64 0}
!22 = !{!10, !14, i64 176}
!23 = !{!10, !14, i64 216}
!24 = !{!10, !14, i64 296}
!25 = !{!26, !14, i64 8}
!26 = !{!"_ZTS7Item_no", !14, i64 0, !14, i64 8, !14, i64 16}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@g_node_cnt = external local_unnamed_addr global i32, align 4
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__._ZN9TPCCQuery12participantsEP7MessageP8Workload = external hidden unnamed_addr constant [73 x i8], align 1

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

; Function Attrs: mustprogress 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 ptr @_ZN5ArrayIP7Item_noEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9TPCCQuery12participantsEP7MessageP8Workload(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::set") align 8 %0, ptr noundef %1, ptr nocapture noundef readnone %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  tail call void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %6 = getelementptr inbounds i8, ptr %1, i64 184
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %8 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %7)
          to label %9 unwind label %20

9:                                                ; preds = %3
  %10 = load i32, ptr @g_node_cnt, align 4, !tbaa !18
  %11 = zext i32 %10 to i64
  %12 = urem i64 %8, %11
  store i64 %12, ptr %4, align 8, !tbaa !20
  %13 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %14 unwind label %20

14:                                               ; preds = %9
  %15 = getelementptr inbounds i8, ptr %1, i64 176
  %16 = load i64, ptr %15, align 8, !tbaa !21
  switch i64 %16, label %47 [
    i64 1, label %22
    i64 2, label %.preheader
  ]

.preheader:                                       ; preds = %14
  %17 = getelementptr inbounds i8, ptr %1, i64 296
  %18 = load i64, ptr %17, align 8, !tbaa !22
  %.not = icmp eq i64 %18, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %19 = getelementptr inbounds i8, ptr %1, i64 264
  br label %31

20:                                               ; preds = %26, %22, %9, %3
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %48

22:                                               ; preds = %14
  %23 = getelementptr inbounds i8, ptr %1, i64 216
  %24 = load i64, ptr %23, align 8, !tbaa !23
  %25 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %24)
          to label %26 unwind label %20

26:                                               ; preds = %22
  %27 = load i32, ptr @g_node_cnt, align 4, !tbaa !18
  %28 = zext i32 %27 to i64
  %29 = urem i64 %25, %28
  store i64 %29, ptr %4, align 8, !tbaa !20
  %30 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %.loopexit unwind label %20

31:                                               ; preds = %.lr.ph, %41
  %.01518 = phi i64 [ 0, %.lr.ph ], [ %42, %41 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %32 = call noundef ptr @_ZN5ArrayIP7Item_noEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %.01518)
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = load i64, ptr %33, align 8, !tbaa !24
  %35 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %34)
          to label %36 unwind label %45

36:                                               ; preds = %31
  %37 = load i32, ptr @g_node_cnt, align 4, !tbaa !18
  %38 = zext i32 %37 to i64
  %39 = urem i64 %35, %38
  store i64 %39, ptr %5, align 8, !tbaa !20
  %40 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %41 unwind label %45

41:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %42 = add nuw i64 %.01518, 1
  %43 = load i64, ptr %17, align 8, !tbaa !22
  %44 = icmp ult i64 %42, %43
  br i1 %44, label %31, label %.loopexit, !llvm.loop !26

45:                                               ; preds = %36, %31
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %48

47:                                               ; preds = %14
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, i32 noundef 86, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN9TPCCQuery12participantsEP7MessageP8Workload) #6
  unreachable

.loopexit:                                        ; preds = %41, %.preheader, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret void

48:                                               ; preds = %45, %20
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

declare noundef i64 @_Z10wh_to_partm(i64 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #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, !12, i64 184}
!6 = !{!"_ZTS22TPCCClientQueryMessage", !7, i64 0, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !10, i64 232, !12, i64 248, !16, i64 256, !17, i64 264, !16, i64 288, !16, i64 289, !12, i64 296, !12, i64 304}
!7 = !{!"_ZTS18ClientQueryMessage", !8, i64 0, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !14, i64 152}
!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 = !{!"_ZTS5ArrayImE", !15, i64 0, !12, i64 8, !12, i64 16}
!15 = !{!"any pointer", !10, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = !{!"_ZTS5ArrayIP7Item_noE", !15, i64 0, !12, i64 8, !12, i64 16}
!18 = !{!19, !19, i64 0}
!19 = !{!"int", !10, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{!6, !12, i64 176}
!22 = !{!6, !12, i64 296}
!23 = !{!6, !12, i64 216}
!24 = !{!25, !12, i64 8}
!25 = !{!"_ZTS7Item_no", !12, i64 0, !12, i64 8, !12, i64 16}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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