; LLVM IR from sfu-dis/mosaicdb :: benchmarks/egen (CETxnInputGenerator)

; 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.TPCE::CCETxnInputGenerator" = type { %"class.TPCE::CRandom", %"class.TPCE::CPerson", %"class.TPCE::CCustomerSelection", %"class.TPCE::CCustomerAccountsAndPermissionsTable", %"class.TPCE::CHoldingsAndTradesTable", %"class.TPCE::CBrokersTable", ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i32, i32, i64, %"class.TPCE::CDateTime", %"class.TPCE::CDateTime", i32, i32 }
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CPerson" = type { ptr, ptr, ptr, %"class.TPCE::CRandom", i8, i32, i64, ptr, ptr }
%"class.TPCE::CCustomerSelection" = type { ptr, i64, i64, i8, i32, i64, i64 }
%"class.TPCE::CCustomerAccountsAndPermissionsTable" = type { %"class.TPCE::TableTemplate", ptr, ptr, i64, i64, i64, i32, i32, %"class.TPCE::CCustomerTable", %"class.TPCE::CPerson", i32, i64, %"class.TPCE::CAddressTable", i32, %"class.TPCE::CCustomerSelection", i8, i32, i64, ptr, i32, i64, ptr }
%"class.TPCE::TableTemplate" = type { ptr, %"struct.TPCE::CUSTOMER_ACCOUNT_AND_PERMISSION_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::CUSTOMER_ACCOUNT_AND_PERMISSION_ROW" = type { %"struct.TPCE::CUSTOMER_ACCOUNT_ROW", [4 x %"struct.TPCE::ACCOUNT_PERMISSION_ROW"] }
%"struct.TPCE::CUSTOMER_ACCOUNT_ROW" = type { i64, i64, i64, [51 x i8], i8, double }
%"struct.TPCE::ACCOUNT_PERMISSION_ROW" = type { i64, [5 x i8], [21 x i8], [26 x i8], [21 x i8] }
%"class.TPCE::CCustomerTable" = type { %"class.TPCE::TableTemplate.0", i64, %"class.TPCE::CPerson", ptr, i64, i64, i64, i32, ptr, %"class.TPCE::CCustomerSelection" }
%"class.TPCE::TableTemplate.0" = type { ptr, %"struct.TPCE::CUSTOMER_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::CUSTOMER_ROW" = type <{ i64, [21 x i8], [5 x i8], [26 x i8], [21 x i8], [2 x i8], i8, i8, [3 x i8], %"class.TPCE::CDateTime", i64, [4 x i8], [4 x i8], [11 x i8], [6 x i8], [4 x i8], [4 x i8], [11 x i8], [6 x i8], [4 x i8], [4 x i8], [11 x i8], [6 x i8], [51 x i8], [51 x i8], [7 x i8] }>
%"class.TPCE::CAddressTable" = type { %"class.TPCE::TableTemplate.1", %"class.TPCE::CDateTime", ptr, ptr, ptr, ptr, i64, i64, i8, i8, i64, i32, i64, i8, i32, i64, ptr }
%"class.TPCE::TableTemplate.1" = type { ptr, %"struct.TPCE::ADDRESS_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::ADDRESS_ROW" = type { i64, [81 x i8], [81 x i8], [13 x i8], [81 x i8] }
%"class.TPCE::CHoldingsAndTradesTable" = type { %"class.TPCE::CRandom", %"class.TPCE::CCustomerAccountsAndPermissionsTable", i64, i32, [18 x i64], i8, i64, i32, ptr, i64, i32, ptr }
%"class.TPCE::CBrokersTable" = type { %"class.TPCE::TableTemplate.2", i64, i64, i64, %"class.TPCE::CPerson", ptr, ptr, ptr }
%"class.TPCE::TableTemplate.2" = type { ptr, %"struct.TPCE::BROKER_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::BROKER_ROW" = type { i64, [5 x i8], [50 x i8], i32, double }
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"struct.TPCE::TDriverCETxnSettings" = type { %"class.TPCE::CBrokerVolumeSettings", %"class.TPCE::CCustomerPositionSettings", %"class.TPCE::CMarketWatchSettings", %"class.TPCE::CSecurityDetailSettings", %"class.TPCE::CTradeLookupSettings", %"class.TPCE::CTradeOrderSettings", %"class.TPCE::CTradeUpdateSettings", %"class.TPCE::CTxnMixGeneratorSettings" }
%"class.TPCE::CBrokerVolumeSettings" = type { %"class.TPCE::CParametersWithDefaults.base", [5 x i8] }
%"class.TPCE::CParametersWithDefaults.base" = type <{ ptr, [3 x i8] }>
%"class.TPCE::CCustomerPositionSettings" = type { %"class.TPCE::CParametersWithDefaults.base.16", [4 x i8] }
%"class.TPCE::CParametersWithDefaults.base.16" = type <{ ptr, %"struct.TPCE::TCustomerPositionSettings", %"struct.TPCE::TCustomerPositionSettingsState", i8, %"struct.TPCE::TCustomerPositionSettings" }>
%"struct.TPCE::TCustomerPositionSettingsState" = type { i8, i8, i8 }
%"struct.TPCE::TCustomerPositionSettings" = type { i32, i32, i32 }
%"class.TPCE::CMarketWatchSettings" = type { %"class.TPCE::CParametersWithDefaults.base.18", [4 x i8] }
%"class.TPCE::CParametersWithDefaults.base.18" = type <{ ptr, %"struct.TPCE::TMarketWatchSettings", %"struct.TPCE::TMarketWatchSettingsState", i8, %"struct.TPCE::TMarketWatchSettings" }>
%"struct.TPCE::TMarketWatchSettingsState" = type { i8, i8, i8 }
%"struct.TPCE::TMarketWatchSettings" = type { i32, i32, i32 }
%"class.TPCE::CSecurityDetailSettings" = type { %"class.TPCE::CParametersWithDefaults.base.20", [4 x i8] }
%"class.TPCE::CParametersWithDefaults.base.20" = type <{ ptr, %"struct.TPCE::TSecurityDetailSettings", %"struct.TPCE::TSecurityDetailSettingsState", [3 x i8], %"struct.TPCE::TSecurityDetailSettings" }>
%"struct.TPCE::TSecurityDetailSettingsState" = type { i8 }
%"struct.TPCE::TSecurityDetailSettings" = type { i32 }
%"class.TPCE::CTradeLookupSettings" = type { %"class.TPCE::CParametersWithDefaults.base.22", [4 x i8] }
%"class.TPCE::CParametersWithDefaults.base.22" = type <{ ptr, %"struct.TPCE::TTradeLookupSettings", %"struct.TPCE::TTradeLookupSettingsState", i8, %"struct.TPCE::TTradeLookupSettings" }>
%"struct.TPCE::TTradeLookupSettingsState" = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%"struct.TPCE::TTradeLookupSettings" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.TPCE::CTradeOrderSettings" = type { %"class.TPCE::CParametersWithDefaults.base.24", [4 x i8] }
%"class.TPCE::CParametersWithDefaults.base.24" = type <{ ptr, %"struct.TPCE::TTradeOrderSettings", %"struct.TPCE::TTradeOrderSettingsState", i8, %"struct.TPCE::TTradeOrderSettings" }>
%"struct.TPCE::TTradeOrderSettingsState" = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%"struct.TPCE::TTradeOrderSettings" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.TPCE::CTradeUpdateSettings" = type { %"class.TPCE::CParametersWithDefaults.base.26", [4 x i8] }
%"class.TPCE::CParametersWithDefaults.base.26" = type <{ ptr, %"struct.TPCE::TTradeUpdateSettings", %"struct.TPCE::TTradeUpdateSettingsState", i8, %"struct.TPCE::TTradeUpdateSettings" }>
%"struct.TPCE::TTradeUpdateSettingsState" = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%"struct.TPCE::TTradeUpdateSettings" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.TPCE::CTxnMixGeneratorSettings" = type { %"class.TPCE::CParametersWithDefaults.base.28", [4 x i8] }
%"class.TPCE::CParametersWithDefaults.base.28" = type <{ ptr, %"struct.TPCE::TTxnMixGeneratorSettings", %"struct.TPCE::TTxnMixGeneratorSettingsState", [3 x i8], %"struct.TPCE::TTxnMixGeneratorSettings" }>
%"struct.TPCE::TTxnMixGeneratorSettingsState" = type { i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%"struct.TPCE::TTxnMixGeneratorSettings" = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%"class.TPCE::CParametersWithDefaults.15" = type <{ ptr, %"struct.TPCE::TCustomerPositionSettings", %"struct.TPCE::TCustomerPositionSettingsState", i8, %"struct.TPCE::TCustomerPositionSettings", [4 x i8] }>
%"struct.TPCE::TCustomerPositionTxnInput" = type { i64, i64, i8, [21 x i8] }

; 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 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TPCE20CCETxnInputGenerator29GenerateCustomerPositionInputERNS_25TCustomerPositionTxnInputE(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %7 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @_ZN4TPCE20CCETxnInputGenerator34GenerateNonUniformRandomCustomerIdERxRNS_13eCustomerTierE(ptr noundef nonnull align 8 dereferenceable(4032) %7, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %8 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %7, i32 0, i32 0
  %9 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %7, i32 0, i32 12
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %10, i32 0, i32 1
  %12 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.15", ptr %11, i32 0, i32 4
  %13 = getelementptr inbounds %"struct.TPCE::TCustomerPositionSettings", ptr %12, i32 0, i32 1
  %14 = load i32, ptr %13, align 4, !tbaa !33
  %15 = call noundef zeroext i1 @_ZN4TPCE7CRandom10RndPercentEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef %14)
  br i1 %15, label %16, label %24

16:                                               ; preds = %2
  %17 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %7, i32 0, i32 1
  %18 = load i64, ptr %5, align 8, !tbaa !37
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.TPCE::TCustomerPositionTxnInput", ptr %19, i32 0, i32 3
  %21 = getelementptr inbounds [21 x i8], ptr %20, i64 0, i64 0
  call void @_ZN4TPCE7CPerson8GetTaxIDExPc(ptr noundef nonnull align 8 dereferenceable(64) %17, i64 noundef %18, ptr noundef %21)
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.TPCE::TCustomerPositionTxnInput", ptr %22, i32 0, i32 1
  store i64 0, ptr %23, align 8, !tbaa !38
  br label %31

24:                                               ; preds = %2
  %25 = load i64, ptr %5, align 8, !tbaa !37
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.TPCE::TCustomerPositionTxnInput", ptr %26, i32 0, i32 1
  store i64 %25, ptr %27, align 8, !tbaa !38
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.TPCE::TCustomerPositionTxnInput", ptr %28, i32 0, i32 3
  %30 = getelementptr inbounds [21 x i8], ptr %29, i64 0, i64 0
  store i8 0, ptr %30, align 1, !tbaa !40
  br label %31

31:                                               ; preds = %24, %16
  %32 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %7, i32 0, i32 0
  %33 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %7, i32 0, i32 12
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %34, i32 0, i32 1
  %36 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.15", ptr %35, i32 0, i32 4
  %37 = getelementptr inbounds %"struct.TPCE::TCustomerPositionSettings", ptr %36, i32 0, i32 2
  %38 = load i32, ptr %37, align 8, !tbaa !41
  %39 = call noundef zeroext i1 @_ZN4TPCE7CRandom10RndPercentEi(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %38)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.TPCE::TCustomerPositionTxnInput", ptr %40, i32 0, i32 2
  %42 = zext i1 %39 to i8
  store i8 %42, ptr %41, align 8, !tbaa !42
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.TPCE::TCustomerPositionTxnInput", ptr %43, i32 0, i32 2
  %45 = load i8, ptr %44, align 8, !tbaa !42, !range !43, !noundef !44
  %46 = trunc i8 %45 to i1
  br i1 %46, label %47, label %58

47:                                               ; preds = %31
  %48 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %7, i32 0, i32 0
  %49 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %7, i32 0, i32 3
  %50 = load i64, ptr %5, align 8, !tbaa !37
  %51 = load i32, ptr %6, align 4, !tbaa !45
  %52 = call noundef i32 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable19GetNumberOfAccountsExNS_13eCustomerTierE(ptr noundef nonnull align 8 dereferenceable(1616) %49, i64 noundef %50, i32 noundef %51)
  %53 = sub i32 %52, 1
  %54 = call noundef i32 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8) %48, i32 noundef 0, i32 noundef %53)
  %55 = sext i32 %54 to i64
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.TPCE::TCustomerPositionTxnInput", ptr %56, i32 0, i32 0
  store i64 %55, ptr %57, align 8, !tbaa !47
  br label %61

58:                                               ; preds = %31
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.TPCE::TCustomerPositionTxnInput", ptr %59, i32 0, i32 0
  store i64 -1, ptr %60, align 8, !tbaa !47
  br label %61

61:                                               ; preds = %58, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TPCE20CCETxnInputGenerator34GenerateNonUniformRandomCustomerIdERxRNS_13eCustomerTierE(ptr noundef nonnull align 8 dereferenceable(4032), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4TPCE7CRandom10RndPercentEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3 align 2

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

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

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 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 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, !6, i64 3848}
!10 = !{!"_ZTSN4TPCE20CCETxnInputGeneratorE", !11, i64 0, !13, i64 8, !16, i64 72, !17, i64 120, !29, i64 1736, !30, i64 3576, !6, i64 3800, !6, i64 3808, !6, i64 3816, !6, i64 3824, !6, i64 3832, !6, i64 3840, !6, i64 3848, !6, i64 3856, !12, i64 3864, !12, i64 3872, !12, i64 3880, !12, i64 3888, !15, i64 3896, !15, i64 3900, !15, i64 3904, !12, i64 3912, !12, i64 3920, !12, i64 3928, !12, i64 3936, !12, i64 3944, !12, i64 3952, !12, i64 3960, !12, i64 3968, !15, i64 3976, !15, i64 3980, !12, i64 3984, !25, i64 3992, !25, i64 4008, !15, i64 4024, !15, i64 4028}
!11 = !{!"_ZTSN4TPCE7CRandomE", !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"_ZTSN4TPCE7CPersonE", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !14, i64 32, !15, i64 36, !12, i64 40, !6, i64 48, !6, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN4TPCE18CCustomerSelectionE", !6, i64 0, !12, i64 8, !12, i64 16, !14, i64 24, !15, i64 28, !12, i64 32, !12, i64 40}
!17 = !{!"_ZTSN4TPCE36CCustomerAccountsAndPermissionsTableE", !18, i64 0, !6, i64 472, !6, i64 480, !12, i64 488, !12, i64 496, !12, i64 504, !15, i64 512, !15, i64 516, !22, i64 520, !13, i64 1016, !15, i64 1080, !12, i64 1088, !26, i64 1096, !15, i64 1512, !16, i64 1520, !14, i64 1568, !15, i64 1572, !12, i64 1576, !6, i64 1584, !15, i64 1592, !12, i64 1600, !6, i64 1608}
!18 = !{!"_ZTSN4TPCE13TableTemplateINS_35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWEEE", !19, i64 8, !12, i64 448, !14, i64 456, !11, i64 464}
!19 = !{!"_ZTSN4TPCE35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWE", !20, i64 0, !7, i64 88}
!20 = !{!"_ZTSN4TPCE20CUSTOMER_ACCOUNT_ROWE", !12, i64 0, !12, i64 8, !12, i64 16, !7, i64 24, !7, i64 75, !21, i64 80}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSN4TPCE14CCustomerTableE", !23, i64 0, !12, i64 328, !13, i64 336, !6, i64 400, !12, i64 408, !12, i64 416, !12, i64 424, !15, i64 432, !6, i64 440, !16, i64 448}
!23 = !{!"_ZTSN4TPCE13TableTemplateINS_12CUSTOMER_ROWEEE", !24, i64 8, !12, i64 304, !14, i64 312, !11, i64 320}
!24 = !{!"_ZTSN4TPCE12CUSTOMER_ROWE", !12, i64 0, !7, i64 8, !7, i64 29, !7, i64 34, !7, i64 60, !7, i64 81, !7, i64 83, !7, i64 84, !25, i64 88, !12, i64 104, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 131, !7, i64 137, !7, i64 141, !7, i64 145, !7, i64 156, !7, i64 162, !7, i64 166, !7, i64 170, !7, i64 181, !7, i64 187, !7, i64 238}
!25 = !{!"_ZTSN4TPCE9CDateTimeE", !15, i64 0, !15, i64 4, !6, i64 8}
!26 = !{!"_ZTSN4TPCE13CAddressTableE", !27, i64 0, !25, i64 296, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !12, i64 344, !12, i64 352, !14, i64 360, !14, i64 361, !12, i64 368, !15, i64 376, !12, i64 384, !14, i64 392, !15, i64 396, !12, i64 400, !6, i64 408}
!27 = !{!"_ZTSN4TPCE13TableTemplateINS_11ADDRESS_ROWEEE", !28, i64 8, !12, i64 272, !14, i64 280, !11, i64 288}
!28 = !{!"_ZTSN4TPCE11ADDRESS_ROWE", !12, i64 0, !7, i64 8, !7, i64 89, !7, i64 170, !7, i64 183}
!29 = !{!"_ZTSN4TPCE23CHoldingsAndTradesTableE", !11, i64 0, !17, i64 8, !12, i64 1624, !15, i64 1632, !7, i64 1640, !14, i64 1784, !12, i64 1792, !15, i64 1800, !6, i64 1808, !12, i64 1816, !15, i64 1824, !6, i64 1832}
!30 = !{!"_ZTSN4TPCE13CBrokersTableE", !31, i64 0, !12, i64 112, !12, i64 120, !12, i64 128, !13, i64 136, !6, i64 200, !6, i64 208, !6, i64 216}
!31 = !{!"_ZTSN4TPCE13TableTemplateINS_10BROKER_ROWEEE", !32, i64 8, !12, i64 88, !14, i64 96, !11, i64 104}
!32 = !{!"_ZTSN4TPCE10BROKER_ROWE", !12, i64 0, !7, i64 8, !7, i64 13, !15, i64 64, !21, i64 72}
!33 = !{!34, !15, i64 28}
!34 = !{!"_ZTSN4TPCE23CParametersWithDefaultsINS_25TCustomerPositionSettingsENS_30TCustomerPositionSettingsStateEEE", !35, i64 8, !36, i64 20, !35, i64 24}
!35 = !{!"_ZTSN4TPCE25TCustomerPositionSettingsE", !15, i64 0, !15, i64 4, !15, i64 8}
!36 = !{!"_ZTSN4TPCE30TCustomerPositionSettingsStateE", !14, i64 0, !14, i64 1, !14, i64 2}
!37 = !{!12, !12, i64 0}
!38 = !{!39, !12, i64 8}
!39 = !{!"_ZTSN4TPCE25TCustomerPositionTxnInputE", !12, i64 0, !12, i64 8, !14, i64 16, !7, i64 17}
!40 = !{!7, !7, i64 0}
!41 = !{!34, !15, i64 32}
!42 = !{!39, !14, i64 16}
!43 = !{i8 0, i8 2}
!44 = !{}
!45 = !{!46, !46, i64 0}
!46 = !{!"_ZTSN4TPCE13eCustomerTierE", !7, i64 0}
!47 = !{!39, !12, i64 0}


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

; 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 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TPCE20CCETxnInputGenerator29GenerateCustomerPositionInputERNS_25TCustomerPositionTxnInputE(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #2 align 2 {
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @_ZN4TPCE20CCETxnInputGenerator34GenerateNonUniformRandomCustomerIdERxRNS_13eCustomerTierE(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %5 = getelementptr inbounds i8, ptr %0, i64 3848
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 44
  %8 = load i32, ptr %7, align 4, !tbaa !32
  %9 = call noundef zeroext i1 @_ZN4TPCE7CRandom10RndPercentEi(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef %8)
  br i1 %9, label %10, label %14

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i64, ptr %3, align 8, !tbaa !36
  %13 = getelementptr inbounds i8, ptr %1, i64 17
  call void @_ZN4TPCE7CPerson8GetTaxIDExPc(ptr noundef nonnull align 8 dereferenceable(64) %11, i64 noundef %12, ptr noundef nonnull %13)
  br label %17

14:                                               ; preds = %2
  %15 = load i64, ptr %3, align 8, !tbaa !36
  %16 = getelementptr inbounds i8, ptr %1, i64 17
  store i8 0, ptr %16, align 1, !tbaa !37
  br label %17

17:                                               ; preds = %14, %10
  %.sink = phi i64 [ 0, %10 ], [ %15, %14 ]
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %.sink, ptr %18, align 8
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 48
  %21 = load i32, ptr %20, align 8, !tbaa !38
  %22 = call noundef zeroext i1 @_ZN4TPCE7CRandom10RndPercentEi(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef %21)
  %23 = getelementptr inbounds i8, ptr %1, i64 16
  %24 = zext i1 %22 to i8
  store i8 %24, ptr %23, align 8, !tbaa !39
  br i1 %22, label %25, label %33

25:                                               ; preds = %17
  %26 = getelementptr inbounds i8, ptr %0, i64 120
  %27 = load i64, ptr %3, align 8, !tbaa !36
  %28 = load i32, ptr %4, align 4, !tbaa !41
  %29 = call noundef i32 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable19GetNumberOfAccountsExNS_13eCustomerTierE(ptr noundef nonnull align 8 dereferenceable(1616) %26, i64 noundef %27, i32 noundef %28)
  %30 = add i32 %29, -1
  %31 = call noundef i32 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef %30)
  %32 = sext i32 %31 to i64
  br label %33

33:                                               ; preds = %17, %25
  %storemerge = phi i64 [ %32, %25 ], [ -1, %17 ]
  store i64 %storemerge, ptr %1, align 8, !tbaa !43
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4TPCE20CCETxnInputGenerator34GenerateNonUniformRandomCustomerIdERxRNS_13eCustomerTierE(ptr noundef nonnull align 8 dereferenceable(4032), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4TPCE7CRandom10RndPercentEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3 align 2

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

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

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 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 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, !12, i64 3848}
!6 = !{!"_ZTSN4TPCE20CCETxnInputGeneratorE", !7, i64 0, !11, i64 8, !15, i64 72, !16, i64 120, !28, i64 1736, !29, i64 3576, !12, i64 3800, !12, i64 3808, !12, i64 3816, !12, i64 3824, !12, i64 3832, !12, i64 3840, !12, i64 3848, !12, i64 3856, !8, i64 3864, !8, i64 3872, !8, i64 3880, !8, i64 3888, !14, i64 3896, !14, i64 3900, !14, i64 3904, !8, i64 3912, !8, i64 3920, !8, i64 3928, !8, i64 3936, !8, i64 3944, !8, i64 3952, !8, i64 3960, !8, i64 3968, !14, i64 3976, !14, i64 3980, !8, i64 3984, !24, i64 3992, !24, i64 4008, !14, i64 4024, !14, i64 4028}
!7 = !{!"_ZTSN4TPCE7CRandomE", !8, i64 0}
!8 = !{!"long long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN4TPCE7CPersonE", !12, i64 0, !12, i64 8, !12, i64 16, !7, i64 24, !13, i64 32, !14, i64 36, !8, i64 40, !12, i64 48, !12, i64 56}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"bool", !9, i64 0}
!14 = !{!"int", !9, i64 0}
!15 = !{!"_ZTSN4TPCE18CCustomerSelectionE", !12, i64 0, !8, i64 8, !8, i64 16, !13, i64 24, !14, i64 28, !8, i64 32, !8, i64 40}
!16 = !{!"_ZTSN4TPCE36CCustomerAccountsAndPermissionsTableE", !17, i64 0, !12, i64 472, !12, i64 480, !8, i64 488, !8, i64 496, !8, i64 504, !14, i64 512, !14, i64 516, !21, i64 520, !11, i64 1016, !14, i64 1080, !8, i64 1088, !25, i64 1096, !14, i64 1512, !15, i64 1520, !13, i64 1568, !14, i64 1572, !8, i64 1576, !12, i64 1584, !14, i64 1592, !8, i64 1600, !12, i64 1608}
!17 = !{!"_ZTSN4TPCE13TableTemplateINS_35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWEEE", !18, i64 8, !8, i64 448, !13, i64 456, !7, i64 464}
!18 = !{!"_ZTSN4TPCE35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWE", !19, i64 0, !9, i64 88}
!19 = !{!"_ZTSN4TPCE20CUSTOMER_ACCOUNT_ROWE", !8, i64 0, !8, i64 8, !8, i64 16, !9, i64 24, !9, i64 75, !20, i64 80}
!20 = !{!"double", !9, i64 0}
!21 = !{!"_ZTSN4TPCE14CCustomerTableE", !22, i64 0, !8, i64 328, !11, i64 336, !12, i64 400, !8, i64 408, !8, i64 416, !8, i64 424, !14, i64 432, !12, i64 440, !15, i64 448}
!22 = !{!"_ZTSN4TPCE13TableTemplateINS_12CUSTOMER_ROWEEE", !23, i64 8, !8, i64 304, !13, i64 312, !7, i64 320}
!23 = !{!"_ZTSN4TPCE12CUSTOMER_ROWE", !8, i64 0, !9, i64 8, !9, i64 29, !9, i64 34, !9, i64 60, !9, i64 81, !9, i64 83, !9, i64 84, !24, i64 88, !8, i64 104, !9, i64 112, !9, i64 116, !9, i64 120, !9, i64 131, !9, i64 137, !9, i64 141, !9, i64 145, !9, i64 156, !9, i64 162, !9, i64 166, !9, i64 170, !9, i64 181, !9, i64 187, !9, i64 238}
!24 = !{!"_ZTSN4TPCE9CDateTimeE", !14, i64 0, !14, i64 4, !12, i64 8}
!25 = !{!"_ZTSN4TPCE13CAddressTableE", !26, i64 0, !24, i64 296, !12, i64 312, !12, i64 320, !12, i64 328, !12, i64 336, !8, i64 344, !8, i64 352, !13, i64 360, !13, i64 361, !8, i64 368, !14, i64 376, !8, i64 384, !13, i64 392, !14, i64 396, !8, i64 400, !12, i64 408}
!26 = !{!"_ZTSN4TPCE13TableTemplateINS_11ADDRESS_ROWEEE", !27, i64 8, !8, i64 272, !13, i64 280, !7, i64 288}
!27 = !{!"_ZTSN4TPCE11ADDRESS_ROWE", !8, i64 0, !9, i64 8, !9, i64 89, !9, i64 170, !9, i64 183}
!28 = !{!"_ZTSN4TPCE23CHoldingsAndTradesTableE", !7, i64 0, !16, i64 8, !8, i64 1624, !14, i64 1632, !9, i64 1640, !13, i64 1784, !8, i64 1792, !14, i64 1800, !12, i64 1808, !8, i64 1816, !14, i64 1824, !12, i64 1832}
!29 = !{!"_ZTSN4TPCE13CBrokersTableE", !30, i64 0, !8, i64 112, !8, i64 120, !8, i64 128, !11, i64 136, !12, i64 200, !12, i64 208, !12, i64 216}
!30 = !{!"_ZTSN4TPCE13TableTemplateINS_10BROKER_ROWEEE", !31, i64 8, !8, i64 88, !13, i64 96, !7, i64 104}
!31 = !{!"_ZTSN4TPCE10BROKER_ROWE", !8, i64 0, !9, i64 8, !9, i64 13, !14, i64 64, !20, i64 72}
!32 = !{!33, !14, i64 28}
!33 = !{!"_ZTSN4TPCE23CParametersWithDefaultsINS_25TCustomerPositionSettingsENS_30TCustomerPositionSettingsStateEEE", !34, i64 8, !35, i64 20, !34, i64 24}
!34 = !{!"_ZTSN4TPCE25TCustomerPositionSettingsE", !14, i64 0, !14, i64 4, !14, i64 8}
!35 = !{!"_ZTSN4TPCE30TCustomerPositionSettingsStateE", !13, i64 0, !13, i64 1, !13, i64 2}
!36 = !{!8, !8, i64 0}
!37 = !{!9, !9, i64 0}
!38 = !{!33, !14, i64 32}
!39 = !{!40, !13, i64 16}
!40 = !{!"_ZTSN4TPCE25TCustomerPositionTxnInputE", !8, i64 0, !8, i64 8, !13, i64 16, !9, i64 17}
!41 = !{!42, !42, i64 0}
!42 = !{!"_ZTSN4TPCE13eCustomerTierE", !9, i64 0}
!43 = !{!40, !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MergedLoadStoreMotionPass,SROAPass,SimplifyCFGPass