; LLVM IR from mitdbg/deneva :: benchmarks/pps_wl.ll (ZN11PPSWorkload13init_tab_usesEv)

; 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.8" }
%"class.std::_Rb_tree.8" = 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.PPSWorkload = type { %class.Workload, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%class.Workload = type { ptr, %"class.std::map", %"class.std::map.0", i64, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, table_t *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, table_t *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, table_t *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, table_t *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, IndexHash *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, IndexHash *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, IndexHash *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, IndexHash *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

@g_max_part_key = external global i32, align 4
@g_max_product_key = external global i32, align 4
@g_max_parts_per = external global i32, align 4

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef i32 @_ZN7table_t11get_new_rowERP5row_tmRm(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5row_t15set_primary_keyEm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) #2 align 2

declare void @_ZN5row_t9set_valueEij(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i32 noundef) #1

declare noundef i64 @_Z21products_to_partitionm(i64 noundef) #1

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

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

declare noundef i64 @_Z5URandmm(i64 noundef, i64 noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

declare void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i64 noundef) #1

declare void @_ZN8Workload22index_insert_nonuniqueEP9IndexHashmP5row_tl(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, i64 noundef, ptr noundef, i64 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt23_Rb_tree_const_iteratorImEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11PPSWorkload13init_tab_usesEv(ptr noundef nonnull align 8 dereferenceable(200) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::set", align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %90, %1
  %19 = load i32, ptr %3, align 4, !tbaa !9
  %20 = load i32, ptr @g_max_product_key, align 4, !tbaa !9
  %21 = icmp ule i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %94

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 48, ptr %5) #4
  call void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %40, %23
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = load i32, ptr @g_max_parts_per, align 4, !tbaa !9
  %27 = icmp ult i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %47

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %30 = load i32, ptr @g_max_part_key, align 4, !tbaa !9
  %31 = zext i32 %30 to i64
  %32 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %31)
          to label %33 unwind label %43

33:                                               ; preds = %29
  store i64 %32, ptr %7, align 8, !tbaa !11
  %34 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %35 unwind label %43

35:                                               ; preds = %33
  %36 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %37 = extractvalue { ptr, i8 } %34, 0
  store ptr %37, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %39 = extractvalue { ptr, i8 } %34, 1
  store i8 %39, ptr %38, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %40

40:                                               ; preds = %35
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = add i32 %41, 1
  store i32 %42, ptr %6, align 4, !tbaa !9
  br label %24, !llvm.loop !13

43:                                               ; preds = %33, %29
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %8, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %93

47:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %48 = call ptr @_ZNKSt3setImSt4lessImESaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  %49 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  br label %50

50:                                               ; preds = %82, %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %51 = call ptr @_ZNKSt3setImSt4lessImESaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  %52 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  %53 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %89

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorImEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  %57 = load i64, ptr %56, align 8, !tbaa !11
  store i64 %57, ptr %15, align 8, !tbaa !11
  %58 = getelementptr inbounds %class.PPSWorkload, ptr %17, i32 0, i32 5
  %59 = load ptr, ptr %58, align 8, !tbaa !15
  %60 = invoke noundef i32 @_ZN7table_t11get_new_rowERP5row_tmRm(ptr noundef nonnull align 8 dereferenceable(68) %59, ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %61 unwind label %85

61:                                               ; preds = %55
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  invoke void @_ZN5row_t15set_primary_keyEm(ptr noundef nonnull align 8 dereferenceable(64) %62, i64 noundef %64)
          to label %65 unwind label %85

65:                                               ; preds = %61
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = load i32, ptr %3, align 4, !tbaa !9
  invoke void @_ZN5row_t9set_valueEij(ptr noundef nonnull align 8 dereferenceable(64) %66, i32 noundef 0, i32 noundef %67)
          to label %68 unwind label %85

68:                                               ; preds = %65
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = load i64, ptr %15, align 8, !tbaa !11
  invoke void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64) %69, i32 noundef 1, i64 noundef %70)
          to label %71 unwind label %85

71:                                               ; preds = %68
  %72 = getelementptr inbounds %class.PPSWorkload, ptr %17, i32 0, i32 10
  %73 = load ptr, ptr %72, align 8, !tbaa !29
  %74 = load i32, ptr %3, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load i32, ptr %3, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = invoke noundef i64 @_Z21products_to_partitionm(i64 noundef %78)
          to label %80 unwind label %85

80:                                               ; preds = %71
  invoke void @_ZN8Workload22index_insert_nonuniqueEP9IndexHashmP5row_tl(ptr noundef nonnull align 8 dereferenceable(120) %17, ptr noundef %73, i64 noundef %75, ptr noundef %76, i64 noundef %79)
          to label %81 unwind label %85

81:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %82

82:                                               ; preds = %81
  %83 = call ptr @_ZNSt23_Rb_tree_const_iteratorImEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #4
  %84 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  br label %50, !llvm.loop !30

85:                                               ; preds = %80, %71, %68, %65, %61, %55
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %8, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %93

89:                                               ; preds = %54
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #4
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %3, align 4, !tbaa !9
  %92 = add i32 %91, 1
  store i32 %92, ptr %3, align 4, !tbaa !9
  br label %18, !llvm.loop !31

93:                                               ; preds = %85, %43
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %95

94:                                               ; preds = %22
  ret void

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !6, i64 152}
!16 = !{!"_ZTS11PPSWorkload", !17, i64 0, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192}
!17 = !{!"_ZTS8Workload", !18, i64 8, !26, i64 56, !12, i64 104, !12, i64 112}
!18 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7table_tSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !19, i64 0}
!19 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7table_tESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !20, i64 0}
!20 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7table_tESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !21, i64 0, !23, i64 8}
!21 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !22, i64 0}
!22 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!23 = !{!"_ZTSSt15_Rb_tree_header", !24, i64 0, !12, i64 32}
!24 = !{!"_ZTSSt18_Rb_tree_node_base", !25, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!26 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9IndexHashSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9IndexHashESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9IndexHashESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !21, i64 0, !23, i64 8}
!29 = !{!16, !6, i64 192}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}


; 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.8" }
%"class.std::_Rb_tree.8" = 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::_Rb_tree_const_iterator" = type { ptr }

@g_max_part_key = external local_unnamed_addr global i32, align 4
@g_max_product_key = external local_unnamed_addr global i32, align 4
@g_max_parts_per = external local_unnamed_addr global i32, align 4

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef i32 @_ZN7table_t11get_new_rowERP5row_tmRm(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

declare void @_ZN5row_t9set_valueEij(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i32 noundef) local_unnamed_addr #1

declare noundef i64 @_Z21products_to_partitionm(i64 noundef) local_unnamed_addr #1

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

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

declare noundef i64 @_Z5URandmm(i64 noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

declare void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i64 noundef) local_unnamed_addr #1

declare void @_ZN8Workload22index_insert_nonuniqueEP9IndexHashmP5row_tl(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11PPSWorkload13init_tab_usesEv(ptr noundef nonnull align 8 dereferenceable(200) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::set", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = load i32, ptr @g_max_product_key, align 4, !tbaa !5
  %.not20 = icmp eq i32 %8, 0
  br i1 %.not20, label %._crit_edge24, label %.lr.ph23

.lr.ph23:                                         ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 152
  %10 = getelementptr inbounds i8, ptr %0, i64 192
  br label %11

._crit_edge24:                                    ; preds = %._crit_edge19, %1
  ret void

11:                                               ; preds = %.lr.ph23, %._crit_edge19
  %.021 = phi i32 [ 1, %.lr.ph23 ], [ %28, %._crit_edge19 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #4
  call void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  %12 = load i32, ptr @g_max_parts_per, align 4, !tbaa !5
  %.not25 = icmp eq i32 %12, 0
  br i1 %.not25, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %22, %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %13 = call ptr @_ZNKSt3setImSt4lessImESaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  store ptr %13, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %14 = call ptr @_ZNKSt3setImSt4lessImESaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  store ptr %14, ptr %5, align 8
  %15 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br i1 %15, label %.lr.ph18, label %._crit_edge19

.lr.ph18:                                         ; preds = %._crit_edge
  %16 = zext i32 %.021 to i64
  br label %30

.lr.ph:                                           ; preds = %11, %22
  %.01216 = phi i32 [ %23, %22 ], [ 0, %11 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %17 = load i32, ptr @g_max_part_key, align 4, !tbaa !5
  %18 = zext i32 %17 to i64
  %19 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %18)
          to label %20 unwind label %26

20:                                               ; preds = %.lr.ph
  store i64 %19, ptr %3, align 8, !tbaa !9
  %21 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %22 unwind label %26

22:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %23 = add nuw i32 %.01216, 1
  %24 = load i32, ptr @g_max_parts_per, align 4, !tbaa !5
  %25 = icmp ult i32 %23, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !11

26:                                               ; preds = %20, %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  br label %51

._crit_edge19:                                    ; preds = %45, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  %28 = add i32 %.021, 1
  %29 = load i32, ptr @g_max_product_key, align 4, !tbaa !5
  %.not = icmp ugt i32 %28, %29
  br i1 %.not, label %._crit_edge24, label %11, !llvm.loop !13

30:                                               ; preds = %.lr.ph18, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorImEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = load ptr, ptr %9, align 8, !tbaa !14
  %34 = invoke noundef i32 @_ZN7table_t11get_new_rowERP5row_tmRm(ptr noundef nonnull align 8 dereferenceable(68) %33, ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %35 unwind label %49

35:                                               ; preds = %30
  %36 = load ptr, ptr %6, align 8, !tbaa !29
  call void @_ZN5row_t15set_primary_keyEm(ptr noundef nonnull align 8 dereferenceable(64) %36, i64 noundef %16)
  %37 = load ptr, ptr %6, align 8, !tbaa !29
  invoke void @_ZN5row_t9set_valueEij(ptr noundef nonnull align 8 dereferenceable(64) %37, i32 noundef 0, i32 noundef %.021)
          to label %38 unwind label %49

38:                                               ; preds = %35
  %39 = load ptr, ptr %6, align 8, !tbaa !29
  invoke void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64) %39, i32 noundef 1, i64 noundef %32)
          to label %40 unwind label %49

40:                                               ; preds = %38
  %41 = load ptr, ptr %10, align 8, !tbaa !30
  %42 = load ptr, ptr %6, align 8, !tbaa !29
  %43 = invoke noundef i64 @_Z21products_to_partitionm(i64 noundef %16)
          to label %44 unwind label %49

44:                                               ; preds = %40
  invoke void @_ZN8Workload22index_insert_nonuniqueEP9IndexHashmP5row_tl(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %41, i64 noundef %16, ptr noundef %42, i64 noundef %43)
          to label %45 unwind label %49

45:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %46 = call ptr @_ZNSt23_Rb_tree_const_iteratorImEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %47 = call ptr @_ZNKSt3setImSt4lessImESaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  store ptr %47, ptr %5, align 8
  %48 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br i1 %48, label %30, label %._crit_edge19, !llvm.loop !31

49:                                               ; preds = %44, %40, %38, %35, %30
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %51

51:                                               ; preds = %49, %26
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %50, %49 ]
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = !{!"int", !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 = distinct !{!13, !12}
!14 = !{!15, !25, i64 152}
!15 = !{!"_ZTS11PPSWorkload", !16, i64 0, !25, i64 120, !25, i64 128, !25, i64 136, !25, i64 144, !25, i64 152, !25, i64 160, !25, i64 168, !25, i64 176, !25, i64 184, !25, i64 192}
!16 = !{!"_ZTS8Workload", !17, i64 8, !26, i64 56, !10, i64 104, !10, i64 112}
!17 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7table_tSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !18, i64 0}
!18 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7table_tESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !19, i64 0}
!19 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7table_tESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !21, i64 0}
!21 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!22 = !{!"_ZTSSt15_Rb_tree_header", !23, i64 0, !10, i64 32}
!23 = !{!"_ZTSSt18_Rb_tree_node_base", !24, i64 0, !25, i64 8, !25, i64 16, !25, i64 24}
!24 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!25 = !{!"any pointer", !7, i64 0}
!26 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9IndexHashSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9IndexHashESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9IndexHashESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !20, i64 0, !22, i64 8}
!29 = !{!25, !25, i64 0}
!30 = !{!15, !25, i64 192}
!31 = distinct !{!31, !12}


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