; LLVM IR from mitdbg/deneva :: benchmarks/tpcc_wl.ll (ZN12TPCCWorkload13init_tab_custEimm)

; 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.TPCCWorkload = type { %class.Workload, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i32, 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" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"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_init_parallelism = external global i32, align 4
@g_cust_per_dist = external global i32, align 4
@.str.32 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._ZN12TPCCWorkload13init_tab_custEimm = external hidden unnamed_addr constant [58 x i8], align 1
@__const._ZN12TPCCWorkload13init_tab_custEimm.tmp = external hidden unnamed_addr constant [3 x i8], align 1
@__const._ZN12TPCCWorkload13init_tab_custEimm.tmp.34 = external hidden unnamed_addr constant [3 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

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 void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i64 noundef) #1

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

declare noundef i64 @_Z4RANDm(i64 noundef) #1

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

declare noundef i64 @_Z10wh_to_partm(i64 noundef) #1

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

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

; 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) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12TPCCWorkload13init_tab_custEimm(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %1, i64 noundef %2, i64 noundef %3) #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca [16 x i8], align 16
  %13 = alloca [3 x i8], align 1
  %14 = alloca [3 x i8], align 1
  %15 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !11
  store i64 %3, ptr %8, align 8, !tbaa !11
  %16 = load ptr, ptr %5, align 8
  %17 = load i32, ptr @g_cust_per_dist, align 4, !tbaa !9
  %18 = icmp uge i32 %17, 1000
  br i1 %18, label %19, label %20

19:                                               ; preds = %4
  br label %22

20:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.33, i32 noundef 359, ptr noundef @__PRETTY_FUNCTION__._ZN12TPCCWorkload13init_tab_custEimm) #6
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %9, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %95, %22
  %26 = load i32, ptr %9, align 4, !tbaa !9
  %27 = load i32, ptr @g_cust_per_dist, align 4, !tbaa !9
  %28 = icmp ule i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %99

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %31 = getelementptr inbounds %class.TPCCWorkload, ptr %16, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  %33 = call noundef i32 @_ZN7table_t11get_new_rowERP5row_tmRm(ptr noundef nonnull align 8 dereferenceable(68) %32, ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = zext i32 %35 to i64
  call void @_ZN5row_t15set_primary_keyEm(ptr noundef nonnull align 8 dereferenceable(64) %34, i64 noundef %36)
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN5row_t9set_valueEij(ptr noundef nonnull align 8 dereferenceable(64) %37, i32 noundef 0, i32 noundef %38)
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = load i64, ptr %7, align 8, !tbaa !11
  call void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64) %39, i32 noundef 1, i64 noundef %40)
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = load i64, ptr %8, align 8, !tbaa !11
  call void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64) %41, i32 noundef 2, i64 noundef %42)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = icmp ule i32 %43, 1000
  br i1 %44, label %45, label %51

45:                                               ; preds = %30
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = sub i32 %46, 1
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %50 = call noundef i64 @_Z8LastnamemPc(i64 noundef %48, ptr noundef %49)
  br label %55

51:                                               ; preds = %30
  %52 = call noundef i64 @_Z6NURandmmm(i64 noundef 255, i64 noundef 0, i64 noundef 999)
  %53 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %54 = call noundef i64 @_Z8LastnamemPc(i64 noundef %52, ptr noundef %53)
  br label %55

55:                                               ; preds = %51, %45
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  call void @_ZN5row_t9set_valueEiPv(ptr noundef nonnull align 8 dereferenceable(64) %56, i32 noundef 5, ptr noundef %57)
  %58 = call noundef i64 @_Z4RANDm(i64 noundef 10)
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %60, label %63

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 3, ptr %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %13, ptr align 1 @__const._ZN12TPCCWorkload13init_tab_custEimm.tmp, i64 3, i1 false)
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds [3 x i8], ptr %13, i64 0, i64 0
  call void @_ZN5row_t9set_valueEiPv(ptr noundef nonnull align 8 dereferenceable(64) %61, i32 noundef 13, ptr noundef %62)
  call void @llvm.lifetime.end.p0(i64 3, ptr %13) #7
  br label %66

63:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 3, ptr %14) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %14, ptr align 1 @__const._ZN12TPCCWorkload13init_tab_custEimm.tmp.34, i64 3, i1 false)
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds [3 x i8], ptr %14, i64 0, i64 0
  call void @_ZN5row_t9set_valueEiPv(ptr noundef nonnull align 8 dereferenceable(64) %64, i32 noundef 13, ptr noundef %65)
  call void @llvm.lifetime.end.p0(i64 3, ptr %14) #7
  br label %66

66:                                               ; preds = %63, %60
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = call noundef i64 @_Z4RANDm(i64 noundef 5000)
  %69 = uitofp i64 %68 to double
  %70 = fdiv double %69, 1.000000e+04
  call void @_ZN5row_t9set_valueEid(ptr noundef nonnull align 8 dereferenceable(64) %67, i32 noundef 15, double noundef %70)
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN5row_t9set_valueEid(ptr noundef nonnull align 8 dereferenceable(64) %71, i32 noundef 16, double noundef -1.000000e+01)
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN5row_t9set_valueEid(ptr noundef nonnull align 8 dereferenceable(64) %72, i32 noundef 17, double noundef 1.000000e+01)
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN5row_t9set_valueEii(ptr noundef nonnull align 8 dereferenceable(64) %73, i32 noundef 18, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %74 = getelementptr inbounds [16 x i8], ptr %12, i64 0, i64 0
  %75 = load i64, ptr %7, align 8, !tbaa !11
  %76 = load i64, ptr %8, align 8, !tbaa !11
  %77 = call noundef i64 @_Z9custNPKeyPcmm(ptr noundef %74, i64 noundef %75, i64 noundef %76)
  store i64 %77, ptr %15, align 8, !tbaa !11
  %78 = getelementptr inbounds %class.TPCCWorkload, ptr %16, i32 0, i32 14
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  %80 = load i64, ptr %15, align 8, !tbaa !11
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = load i64, ptr %8, align 8, !tbaa !11
  %83 = call noundef i64 @_Z10wh_to_partm(i64 noundef %82)
  call void @_ZN8Workload12index_insertEP9IndexHashmP5row_tl(ptr noundef nonnull align 8 dereferenceable(120) %16, ptr noundef %79, i64 noundef %80, ptr noundef %81, i64 noundef %83)
  %84 = load i32, ptr %9, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = load i64, ptr %7, align 8, !tbaa !11
  %87 = load i64, ptr %8, align 8, !tbaa !11
  %88 = call noundef i64 @_Z7custKeymmm(i64 noundef %85, i64 noundef %86, i64 noundef %87)
  store i64 %88, ptr %15, align 8, !tbaa !11
  %89 = getelementptr inbounds %class.TPCCWorkload, ptr %16, i32 0, i32 13
  %90 = load ptr, ptr %89, align 8, !tbaa !28
  %91 = load i64, ptr %15, align 8, !tbaa !11
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  %93 = load i64, ptr %8, align 8, !tbaa !11
  %94 = call noundef i64 @_Z10wh_to_partm(i64 noundef %93)
  call void @_ZN8Workload12index_insertEP9IndexHashmP5row_tl(ptr noundef nonnull align 8 dereferenceable(120) %16, ptr noundef %90, i64 noundef %91, ptr noundef %92, i64 noundef %94)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %95

95:                                               ; preds = %66
  %96 = load i32, ptr @g_init_parallelism, align 4, !tbaa !9
  %97 = load i32, ptr %9, align 4, !tbaa !9
  %98 = add i32 %97, %96
  store i32 %98, ptr %9, align 4, !tbaa !9
  br label %25, !llvm.loop !29

99:                                               ; preds = %29
  ret void
}

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

declare noundef i64 @_Z8LastnamemPc(i64 noundef, ptr noundef) #1

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

declare noundef i64 @_Z9custNPKeyPcmm(ptr noundef, i64 noundef, i64 noundef) #1

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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 = !{!14, !6, i64 136}
!14 = !{!"_ZTS12TPCCWorkload", !15, 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, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !12, i64 272, !10, i64 280, !6, i64 288}
!15 = !{!"_ZTS8Workload", !16, i64 8, !24, i64 56, !12, i64 104, !12, i64 112}
!16 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7table_tSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !17, i64 0}
!17 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7table_tESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !18, i64 0}
!18 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7table_tESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !19, i64 0, !21, i64 8}
!19 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !20, i64 0}
!20 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!21 = !{!"_ZTSSt15_Rb_tree_header", !22, i64 0, !12, i64 32}
!22 = !{!"_ZTSSt18_Rb_tree_node_base", !23, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!23 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!24 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9IndexHashSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !25, i64 0}
!25 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9IndexHashESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !26, i64 0}
!26 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9IndexHashESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !19, i64 0, !21, i64 8}
!27 = !{!14, !6, i64 224}
!28 = !{!14, !6, i64 216}
!29 = distinct !{!29, !30}
!30 = !{!"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"

@g_init_parallelism = external local_unnamed_addr global i32, align 4
@g_cust_per_dist = external local_unnamed_addr global i32, align 4
@.str.32 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._ZN12TPCCWorkload13init_tab_custEimm = external hidden unnamed_addr constant [58 x i8], align 1
@__const._ZN12TPCCWorkload13init_tab_custEimm.tmp = external hidden unnamed_addr constant [3 x i8], align 1
@__const._ZN12TPCCWorkload13init_tab_custEimm.tmp.34 = external hidden unnamed_addr constant [3 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

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 void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i64 noundef) local_unnamed_addr #1

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

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

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

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

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

declare void @_ZN5row_t9set_valueEii(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i32 noundef) local_unnamed_addr #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) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12TPCCWorkload13init_tab_custEimm(ptr noundef nonnull align 8 dereferenceable(296) %0, i32 noundef %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca [16 x i8], align 16
  %8 = alloca [3 x i8], align 1
  %9 = alloca [3 x i8], align 1
  %10 = load i32, ptr @g_cust_per_dist, align 4, !tbaa !5
  %11 = icmp ugt i32 %10, 999
  br i1 %11, label %13, label %12

12:                                               ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.33, i32 noundef 359, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN12TPCCWorkload13init_tab_custEimm) #6
  unreachable

13:                                               ; preds = %4
  %14 = add nsw i32 %1, 1
  %.not18 = icmp ugt i32 %14, %10
  br i1 %.not18, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %13
  %15 = getelementptr inbounds i8, ptr %0, i64 136
  %16 = getelementptr inbounds i8, ptr %0, i64 224
  %17 = getelementptr inbounds i8, ptr %0, i64 216
  br label %18

._crit_edge:                                      ; preds = %41, %13
  ret void

18:                                               ; preds = %.lr.ph, %41
  %.019 = phi i32 [ %14, %.lr.ph ], [ %58, %41 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %19 = load ptr, ptr %15, align 8, !tbaa !9
  %20 = call noundef i32 @_ZN7table_t11get_new_rowERP5row_tmRm(ptr noundef nonnull align 8 dereferenceable(68) %19, ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %21 = load ptr, ptr %5, align 8, !tbaa !25
  %22 = zext i32 %.019 to i64
  call void @_ZN5row_t15set_primary_keyEm(ptr noundef nonnull align 8 dereferenceable(64) %21, i64 noundef %22)
  %23 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEij(ptr noundef nonnull align 8 dereferenceable(64) %23, i32 noundef 0, i32 noundef %.019)
  %24 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64) %24, i32 noundef 1, i64 noundef %2)
  %25 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEim(ptr noundef nonnull align 8 dereferenceable(64) %25, i32 noundef 2, i64 noundef %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %26 = icmp ult i32 %.019, 1001
  br i1 %26, label %27, label %30

27:                                               ; preds = %18
  %28 = add nsw i32 %.019, -1
  %29 = zext i32 %28 to i64
  br label %32

30:                                               ; preds = %18
  %31 = call noundef i64 @_Z6NURandmmm(i64 noundef 255, i64 noundef 0, i64 noundef 999)
  br label %32

32:                                               ; preds = %30, %27
  %.sink = phi i64 [ %31, %30 ], [ %29, %27 ]
  %33 = call noundef i64 @_Z8LastnamemPc(i64 noundef %.sink, ptr noundef nonnull %7)
  %34 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEiPv(ptr noundef nonnull align 8 dereferenceable(64) %34, i32 noundef 5, ptr noundef nonnull %7)
  %35 = call noundef i64 @_Z4RANDm(i64 noundef 10)
  %36 = icmp eq i64 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %8, ptr noundef nonnull align 1 dereferenceable(3) @__const._ZN12TPCCWorkload13init_tab_custEimm.tmp, i64 3, i1 false)
  %38 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEiPv(ptr noundef nonnull align 8 dereferenceable(64) %38, i32 noundef 13, ptr noundef nonnull %8)
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %8) #7
  br label %41

39:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %9) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %9, ptr noundef nonnull align 1 dereferenceable(3) @__const._ZN12TPCCWorkload13init_tab_custEimm.tmp.34, i64 3, i1 false)
  %40 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEiPv(ptr noundef nonnull align 8 dereferenceable(64) %40, i32 noundef 13, ptr noundef nonnull %9)
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %9) #7
  br label %41

41:                                               ; preds = %39, %37
  %42 = load ptr, ptr %5, align 8, !tbaa !25
  %43 = call noundef i64 @_Z4RANDm(i64 noundef 5000)
  %44 = uitofp i64 %43 to double
  %45 = fdiv double %44, 1.000000e+04
  call void @_ZN5row_t9set_valueEid(ptr noundef nonnull align 8 dereferenceable(64) %42, i32 noundef 15, double noundef %45)
  %46 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEid(ptr noundef nonnull align 8 dereferenceable(64) %46, i32 noundef 16, double noundef -1.000000e+01)
  %47 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEid(ptr noundef nonnull align 8 dereferenceable(64) %47, i32 noundef 17, double noundef 1.000000e+01)
  %48 = load ptr, ptr %5, align 8, !tbaa !25
  call void @_ZN5row_t9set_valueEii(ptr noundef nonnull align 8 dereferenceable(64) %48, i32 noundef 18, i32 noundef 1)
  %49 = call noundef i64 @_Z9custNPKeyPcmm(ptr noundef nonnull %7, i64 noundef %2, i64 noundef %3)
  %50 = load ptr, ptr %16, align 8, !tbaa !26
  %51 = load ptr, ptr %5, align 8, !tbaa !25
  %52 = call noundef i64 @_Z10wh_to_partm(i64 noundef %3)
  call void @_ZN8Workload12index_insertEP9IndexHashmP5row_tl(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %50, i64 noundef %49, ptr noundef %51, i64 noundef %52)
  %53 = call noundef i64 @_Z7custKeymmm(i64 noundef %22, i64 noundef %2, i64 noundef %3)
  %54 = load ptr, ptr %17, align 8, !tbaa !27
  %55 = load ptr, ptr %5, align 8, !tbaa !25
  %56 = call noundef i64 @_Z10wh_to_partm(i64 noundef %3)
  call void @_ZN8Workload12index_insertEP9IndexHashmP5row_tl(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %54, i64 noundef %53, ptr noundef %55, i64 noundef %56)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %57 = load i32, ptr @g_init_parallelism, align 4, !tbaa !5
  %58 = add i32 %57, %.019
  %59 = load i32, ptr @g_cust_per_dist, align 4, !tbaa !5
  %.not = icmp ugt i32 %58, %59
  br i1 %.not, label %._crit_edge, label %18, !llvm.loop !28
}

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

declare noundef i64 @_Z8LastnamemPc(i64 noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef i64 @_Z9custNPKeyPcmm(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

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

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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !20, i64 136}
!10 = !{!"_ZTS12TPCCWorkload", !11, i64 0, !20, i64 120, !20, i64 128, !20, i64 136, !20, i64 144, !20, i64 152, !20, i64 160, !20, i64 168, !20, i64 176, !20, i64 184, !20, i64 192, !20, i64 200, !20, i64 208, !20, i64 216, !20, i64 224, !20, i64 232, !20, i64 240, !20, i64 248, !20, i64 256, !20, i64 264, !21, i64 272, !6, i64 280, !20, i64 288}
!11 = !{!"_ZTS8Workload", !12, i64 8, !22, i64 56, !21, i64 104, !21, i64 112}
!12 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7table_tSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !13, i64 0}
!13 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7table_tESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !14, i64 0}
!14 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P7table_tESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !15, i64 0, !17, i64 8}
!15 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !16, i64 0}
!16 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!17 = !{!"_ZTSSt15_Rb_tree_header", !18, i64 0, !21, i64 32}
!18 = !{!"_ZTSSt18_Rb_tree_node_base", !19, i64 0, !20, i64 8, !20, i64 16, !20, i64 24}
!19 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9IndexHashSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !23, i64 0}
!23 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9IndexHashESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !24, i64 0}
!24 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P9IndexHashESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !15, i64 0, !17, i64 8}
!25 = !{!20, !20, i64 0}
!26 = !{!10, !20, i64 224}
!27 = !{!10, !20, i64 216}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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