; 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.21" = type <{ ptr, %"struct.TPCE::TTradeLookupSettings", %"struct.TPCE::TTradeLookupSettingsState", i8, %"struct.TPCE::TTradeLookupSettings", [4 x i8] }>
%"struct.TPCE::TTradeLookupTxnInput" = type { [20 x i64], i64, i64, i32, i32, %"struct.TPCE::tagTIMESTAMP_STRUCT", %"struct.TPCE::tagTIMESTAMP_STRUCT", [16 x i8] }
%"struct.TPCE::tagTIMESTAMP_STRUCT" = type { i16, i16, i16, i16, i16, i16, i32 }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN4TPCE20CCETxnInputGenerator31GenerateRandomCustomerAccountIdEv(ptr noundef nonnull align 8 dereferenceable(4032)) #1 align 2

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

declare noundef i64 @_ZN4TPCE7CRandom5NURndExxii(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i64 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE20CCETxnInputGenerator26GenerateNonUniformTradeDTSERNS_19tagTIMESTAMP_STRUCTExii(ptr noundef nonnull align 8 dereferenceable(4032), ptr noundef nonnull align 4 dereferenceable(16), i64 noundef, i32 noundef, i32 noundef) #1 align 2

declare void @_ZN4TPCE9CDateTime12GetTimeStampEPNS_19tagTIMESTAMP_STRUCTE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE13CSecurityFile12CreateSymbolExPcm(ptr noundef nonnull align 8 dereferenceable(161), i64 noundef, ptr noundef, i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TPCE20CCETxnInputGenerator24GenerateTradeLookupInputERNS_20TTradeLookupTxnInputE(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 8 dereferenceable(232) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %11 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 0
  %12 = call noundef i32 @_ZN4TPCE7CRandom28RndGenerateIntegerPercentageEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  store i32 %12, ptr %5, align 4, !tbaa !9
  %13 = load i32, ptr %5, align 4, !tbaa !9
  %14 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %15, i32 0, i32 4
  %17 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %16, i32 0, i32 4
  %18 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !34
  %20 = icmp sle i32 %13, %19
  br i1 %20, label %21, label %91

21:                                               ; preds = %2
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %22, i32 0, i32 3
  store i32 1, ptr %23, align 8, !tbaa !38
  %24 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %25, i32 0, i32 4
  %27 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %26, i32 0, i32 4
  %28 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %27, i32 0, i32 4
  %29 = load i32, ptr %28, align 8, !tbaa !42
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %30, i32 0, i32 4
  store i32 %29, ptr %31, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %76, %21
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %34, i32 0, i32 4
  %36 = load i32, ptr %35, align 4, !tbaa !43
  %37 = icmp slt i32 %33, %36
  br i1 %37, label %38, label %79

38:                                               ; preds = %32
  store i8 0, ptr %8, align 1, !tbaa !44
  br label %39

39:                                               ; preds = %74, %38
  %40 = load i8, ptr %8, align 1, !tbaa !44, !range !45, !noundef !46
  %41 = trunc i8 %40 to i1
  %42 = xor i1 %41, true
  br i1 %42, label %43, label %75

43:                                               ; preds = %39
  %44 = call noundef i64 @_ZN4TPCE20CCETxnInputGenerator25GenerateNonUniformTradeIDEii(ptr noundef nonnull align 8 dereferenceable(4032) %10, i32 noundef 65535, i32 noundef 7)
  store i64 %44, ptr %9, align 8, !tbaa !47
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %60, %43
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %58

49:                                               ; preds = %45
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %50, i32 0, i32 0
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [20 x i64], ptr %51, i64 0, i64 %53
  %55 = load i64, ptr %54, align 8, !tbaa !47
  %56 = load i64, ptr %9, align 8, !tbaa !47
  %57 = icmp ne i64 %55, %56
  br label %58

58:                                               ; preds = %49, %45
  %59 = phi i1 [ false, %45 ], [ %57, %49 ]
  br i1 %59, label %60, label %63

60:                                               ; preds = %58
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %7, align 4, !tbaa !9
  br label %45, !llvm.loop !48

63:                                               ; preds = %58
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = icmp eq i32 %64, %65
  br i1 %66, label %67, label %74

67:                                               ; preds = %63
  %68 = load i64, ptr %9, align 8, !tbaa !47
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %69, i32 0, i32 0
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [20 x i64], ptr %70, i64 0, i64 %72
  store i64 %68, ptr %73, align 8, !tbaa !47
  store i8 1, ptr %8, align 1, !tbaa !44
  br label %74

74:                                               ; preds = %67, %63
  br label %39, !llvm.loop !50

75:                                               ; preds = %39
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %6, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %6, align 4, !tbaa !9
  br label %32, !llvm.loop !51

79:                                               ; preds = %32
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %80, i32 0, i32 1
  store i64 0, ptr %81, align 8, !tbaa !52
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %82, i32 0, i32 2
  store i64 0, ptr %83, align 8, !tbaa !53
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %84, i32 0, i32 7
  %86 = getelementptr inbounds [16 x i8], ptr %85, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %86, i8 0, i64 16, i1 false)
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %87, i32 0, i32 6
  call void @llvm.memset.p0.i64(ptr align 8 %88, i8 0, i64 16, i1 false)
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %89, i32 0, i32 5
  call void @llvm.memset.p0.i64(ptr align 8 %90, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %220

91:                                               ; preds = %2
  %92 = load i32, ptr %5, align 4, !tbaa !9
  %93 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  %95 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %94, i32 0, i32 4
  %96 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %95, i32 0, i32 4
  %97 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !34
  %99 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %100 = load ptr, ptr %99, align 8, !tbaa !11
  %101 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %100, i32 0, i32 4
  %102 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %101, i32 0, i32 4
  %103 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %102, i32 0, i32 1
  %104 = load i32, ptr %103, align 4, !tbaa !54
  %105 = add nsw i32 %98, %104
  %106 = icmp sle i32 %92, %105
  br i1 %106, label %107, label %136

107:                                              ; preds = %91
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %108, i32 0, i32 3
  store i32 2, ptr %109, align 8, !tbaa !38
  %110 = call noundef i64 @_ZN4TPCE20CCETxnInputGenerator31GenerateRandomCustomerAccountIdEv(ptr noundef nonnull align 8 dereferenceable(4032) %10)
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %111, i32 0, i32 1
  store i64 %110, ptr %112, align 8, !tbaa !52
  %113 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %114 = load ptr, ptr %113, align 8, !tbaa !11
  %115 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %114, i32 0, i32 4
  %116 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %115, i32 0, i32 4
  %117 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %116, i32 0, i32 6
  %118 = load i32, ptr %117, align 8, !tbaa !55
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %119, i32 0, i32 4
  store i32 %118, ptr %120, align 4, !tbaa !43
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %121, i32 0, i32 6
  %123 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 22
  %124 = load i64, ptr %123, align 8, !tbaa !56
  call void @_ZN4TPCE20CCETxnInputGenerator26GenerateNonUniformTradeDTSERNS_19tagTIMESTAMP_STRUCTExii(ptr noundef nonnull align 8 dereferenceable(4032) %10, ptr noundef nonnull align 4 dereferenceable(16) %122, i64 noundef %124, i32 noundef 4095, i32 noundef 16)
  %125 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 33
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %126, i32 0, i32 5
  call void @_ZN4TPCE9CDateTime12GetTimeStampEPNS_19tagTIMESTAMP_STRUCTE(ptr noundef nonnull align 8 dereferenceable(16) %125, ptr noundef %127)
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %128, i32 0, i32 2
  store i64 0, ptr %129, align 8, !tbaa !53
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %130, i32 0, i32 7
  %132 = getelementptr inbounds [16 x i8], ptr %131, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %132, i8 0, i64 16, i1 false)
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds [20 x i64], ptr %134, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %135, i8 0, i64 160, i1 false)
  br label %219

136:                                              ; preds = %91
  %137 = load i32, ptr %5, align 4, !tbaa !9
  %138 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  %140 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %139, i32 0, i32 4
  %141 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %140, i32 0, i32 4
  %142 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %141, i32 0, i32 0
  %143 = load i32, ptr %142, align 8, !tbaa !34
  %144 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %145 = load ptr, ptr %144, align 8, !tbaa !11
  %146 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %145, i32 0, i32 4
  %147 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %146, i32 0, i32 4
  %148 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %147, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !54
  %150 = add nsw i32 %143, %149
  %151 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %152 = load ptr, ptr %151, align 8, !tbaa !11
  %153 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %152, i32 0, i32 4
  %154 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %153, i32 0, i32 4
  %155 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %154, i32 0, i32 2
  %156 = load i32, ptr %155, align 8, !tbaa !57
  %157 = add nsw i32 %150, %156
  %158 = icmp sle i32 %137, %157
  br i1 %158, label %159, label %198

159:                                              ; preds = %136
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %160, i32 0, i32 3
  store i32 3, ptr %161, align 8, !tbaa !38
  %162 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 12
  %163 = load ptr, ptr %162, align 8, !tbaa !11
  %164 = getelementptr inbounds %"struct.TPCE::TDriverCETxnSettings", ptr %163, i32 0, i32 4
  %165 = getelementptr inbounds %"class.TPCE::CParametersWithDefaults.21", ptr %164, i32 0, i32 4
  %166 = getelementptr inbounds %"struct.TPCE::TTradeLookupSettings", ptr %165, i32 0, i32 8
  %167 = load i32, ptr %166, align 8, !tbaa !58
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %168, i32 0, i32 4
  store i32 %167, ptr %169, align 4, !tbaa !43
  %170 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 7
  %171 = load ptr, ptr %170, align 8, !tbaa !59
  %172 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 0
  %173 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 27
  %174 = load i64, ptr %173, align 8, !tbaa !60
  %175 = sub nsw i64 %174, 1
  %176 = call noundef i64 @_ZN4TPCE7CRandom5NURndExxii(ptr noundef nonnull align 8 dereferenceable(8) %172, i64 noundef 0, i64 noundef %175, i32 noundef 0, i32 noundef 0)
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %177, i32 0, i32 7
  %179 = getelementptr inbounds [16 x i8], ptr %178, i64 0, i64 0
  call void @_ZN4TPCE13CSecurityFile12CreateSymbolExPcm(ptr noundef nonnull align 8 dereferenceable(161) %171, i64 noundef %176, ptr noundef %179, i64 noundef 16)
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %180, i32 0, i32 6
  %182 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 23
  %183 = load i64, ptr %182, align 8, !tbaa !61
  call void @_ZN4TPCE20CCETxnInputGenerator26GenerateNonUniformTradeDTSERNS_19tagTIMESTAMP_STRUCTExii(ptr noundef nonnull align 8 dereferenceable(4032) %10, ptr noundef nonnull align 4 dereferenceable(16) %181, i64 noundef %183, i32 noundef 4095, i32 noundef 16)
  %184 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 33
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %185, i32 0, i32 5
  call void @_ZN4TPCE9CDateTime12GetTimeStampEPNS_19tagTIMESTAMP_STRUCTE(ptr noundef nonnull align 8 dereferenceable(16) %184, ptr noundef %186)
  %187 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 3
  %188 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 15
  %189 = load i64, ptr %188, align 8, !tbaa !62
  %190 = call noundef i64 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable14GetEndingCA_IDEx(ptr noundef nonnull align 8 dereferenceable(1616) %187, i64 noundef %189)
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %191, i32 0, i32 2
  store i64 %190, ptr %192, align 8, !tbaa !53
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %193, i32 0, i32 1
  store i64 0, ptr %194, align 8, !tbaa !52
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds [20 x i64], ptr %196, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %197, i8 0, i64 160, i1 false)
  br label %218

198:                                              ; preds = %136
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %199, i32 0, i32 3
  store i32 4, ptr %200, align 8, !tbaa !38
  %201 = call noundef i64 @_ZN4TPCE20CCETxnInputGenerator31GenerateRandomCustomerAccountIdEv(ptr noundef nonnull align 8 dereferenceable(4032) %10)
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %202, i32 0, i32 1
  store i64 %201, ptr %203, align 8, !tbaa !52
  %204 = load ptr, ptr %4, align 8, !tbaa !5
  %205 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %204, i32 0, i32 6
  %206 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 24
  %207 = load i64, ptr %206, align 8, !tbaa !63
  call void @_ZN4TPCE20CCETxnInputGenerator26GenerateNonUniformTradeDTSERNS_19tagTIMESTAMP_STRUCTExii(ptr noundef nonnull align 8 dereferenceable(4032) %10, ptr noundef nonnull align 4 dereferenceable(16) %205, i64 noundef %207, i32 noundef 4095, i32 noundef 16)
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %208, i32 0, i32 4
  store i32 0, ptr %209, align 4, !tbaa !43
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %210, i32 0, i32 2
  store i64 0, ptr %211, align 8, !tbaa !53
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %212, i32 0, i32 7
  %214 = getelementptr inbounds [16 x i8], ptr %213, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %214, i8 0, i64 16, i1 false)
  %215 = load ptr, ptr %4, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.TPCE::TTradeLookupTxnInput", ptr %215, i32 0, i32 0
  %217 = getelementptr inbounds [20 x i64], ptr %216, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 8 %217, i8 0, i64 160, i1 false)
  br label %218

218:                                              ; preds = %198, %159
  br label %219

219:                                              ; preds = %218, %107
  br label %220

220:                                              ; preds = %219, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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, !6, i64 3848}
!12 = !{!"_ZTSN4TPCE20CCETxnInputGeneratorE", !13, i64 0, !15, i64 8, !17, i64 72, !18, i64 120, !30, i64 1736, !31, 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, !14, i64 3864, !14, i64 3872, !14, i64 3880, !14, i64 3888, !10, i64 3896, !10, i64 3900, !10, i64 3904, !14, i64 3912, !14, i64 3920, !14, i64 3928, !14, i64 3936, !14, i64 3944, !14, i64 3952, !14, i64 3960, !14, i64 3968, !10, i64 3976, !10, i64 3980, !14, i64 3984, !26, i64 3992, !26, i64 4008, !10, i64 4024, !10, i64 4028}
!13 = !{!"_ZTSN4TPCE7CRandomE", !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = !{!"_ZTSN4TPCE7CPersonE", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !16, i64 32, !10, i64 36, !14, i64 40, !6, i64 48, !6, i64 56}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN4TPCE18CCustomerSelectionE", !6, i64 0, !14, i64 8, !14, i64 16, !16, i64 24, !10, i64 28, !14, i64 32, !14, i64 40}
!18 = !{!"_ZTSN4TPCE36CCustomerAccountsAndPermissionsTableE", !19, i64 0, !6, i64 472, !6, i64 480, !14, i64 488, !14, i64 496, !14, i64 504, !10, i64 512, !10, i64 516, !23, i64 520, !15, i64 1016, !10, i64 1080, !14, i64 1088, !27, i64 1096, !10, i64 1512, !17, i64 1520, !16, i64 1568, !10, i64 1572, !14, i64 1576, !6, i64 1584, !10, i64 1592, !14, i64 1600, !6, i64 1608}
!19 = !{!"_ZTSN4TPCE13TableTemplateINS_35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWEEE", !20, i64 8, !14, i64 448, !16, i64 456, !13, i64 464}
!20 = !{!"_ZTSN4TPCE35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWE", !21, i64 0, !7, i64 88}
!21 = !{!"_ZTSN4TPCE20CUSTOMER_ACCOUNT_ROWE", !14, i64 0, !14, i64 8, !14, i64 16, !7, i64 24, !7, i64 75, !22, i64 80}
!22 = !{!"double", !7, i64 0}
!23 = !{!"_ZTSN4TPCE14CCustomerTableE", !24, i64 0, !14, i64 328, !15, i64 336, !6, i64 400, !14, i64 408, !14, i64 416, !14, i64 424, !10, i64 432, !6, i64 440, !17, i64 448}
!24 = !{!"_ZTSN4TPCE13TableTemplateINS_12CUSTOMER_ROWEEE", !25, i64 8, !14, i64 304, !16, i64 312, !13, i64 320}
!25 = !{!"_ZTSN4TPCE12CUSTOMER_ROWE", !14, i64 0, !7, i64 8, !7, i64 29, !7, i64 34, !7, i64 60, !7, i64 81, !7, i64 83, !7, i64 84, !26, i64 88, !14, 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}
!26 = !{!"_ZTSN4TPCE9CDateTimeE", !10, i64 0, !10, i64 4, !6, i64 8}
!27 = !{!"_ZTSN4TPCE13CAddressTableE", !28, i64 0, !26, i64 296, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !14, i64 344, !14, i64 352, !16, i64 360, !16, i64 361, !14, i64 368, !10, i64 376, !14, i64 384, !16, i64 392, !10, i64 396, !14, i64 400, !6, i64 408}
!28 = !{!"_ZTSN4TPCE13TableTemplateINS_11ADDRESS_ROWEEE", !29, i64 8, !14, i64 272, !16, i64 280, !13, i64 288}
!29 = !{!"_ZTSN4TPCE11ADDRESS_ROWE", !14, i64 0, !7, i64 8, !7, i64 89, !7, i64 170, !7, i64 183}
!30 = !{!"_ZTSN4TPCE23CHoldingsAndTradesTableE", !13, i64 0, !18, i64 8, !14, i64 1624, !10, i64 1632, !7, i64 1640, !16, i64 1784, !14, i64 1792, !10, i64 1800, !6, i64 1808, !14, i64 1816, !10, i64 1824, !6, i64 1832}
!31 = !{!"_ZTSN4TPCE13CBrokersTableE", !32, i64 0, !14, i64 112, !14, i64 120, !14, i64 128, !15, i64 136, !6, i64 200, !6, i64 208, !6, i64 216}
!32 = !{!"_ZTSN4TPCE13TableTemplateINS_10BROKER_ROWEEE", !33, i64 8, !14, i64 88, !16, i64 96, !13, i64 104}
!33 = !{!"_ZTSN4TPCE10BROKER_ROWE", !14, i64 0, !7, i64 8, !7, i64 13, !10, i64 64, !22, i64 72}
!34 = !{!35, !10, i64 64}
!35 = !{!"_ZTSN4TPCE23CParametersWithDefaultsINS_20TTradeLookupSettingsENS_25TTradeLookupSettingsStateEEE", !36, i64 8, !37, i64 52, !36, i64 64}
!36 = !{!"_ZTSN4TPCE20TTradeLookupSettingsE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40}
!37 = !{!"_ZTSN4TPCE25TTradeLookupSettingsStateE", !16, i64 0, !16, i64 1, !16, i64 2, !16, i64 3, !16, i64 4, !16, i64 5, !16, i64 6, !16, i64 7, !16, i64 8, !16, i64 9, !16, i64 10}
!38 = !{!39, !10, i64 176}
!39 = !{!"_ZTSN4TPCE20TTradeLookupTxnInputE", !7, i64 0, !14, i64 160, !14, i64 168, !10, i64 176, !10, i64 180, !40, i64 184, !40, i64 200, !7, i64 216}
!40 = !{!"_ZTSN4TPCE19tagTIMESTAMP_STRUCTE", !41, i64 0, !41, i64 2, !41, i64 4, !41, i64 6, !41, i64 8, !41, i64 10, !10, i64 12}
!41 = !{!"short", !7, i64 0}
!42 = !{!35, !10, i64 80}
!43 = !{!39, !10, i64 180}
!44 = !{!16, !16, i64 0}
!45 = !{i8 0, i8 2}
!46 = !{}
!47 = !{!14, !14, i64 0}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}
!50 = distinct !{!50, !49}
!51 = distinct !{!51, !49}
!52 = !{!39, !14, i64 160}
!53 = !{!39, !14, i64 168}
!54 = !{!35, !10, i64 68}
!55 = !{!35, !10, i64 88}
!56 = !{!12, !14, i64 3920}
!57 = !{!35, !10, i64 72}
!58 = !{!35, !10, i64 96}
!59 = !{!12, !6, i64 3808}
!60 = !{!12, !14, i64 3960}
!61 = !{!12, !14, i64 3928}
!62 = !{!12, !14, i64 3872}
!63 = !{!12, !14, i64 3936}


; 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 uwtable
declare dso_local noundef i64 @_ZN4TPCE20CCETxnInputGenerator31GenerateRandomCustomerAccountIdEv(ptr noundef nonnull align 8 dereferenceable(4032)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE20CCETxnInputGenerator26GenerateNonUniformTradeDTSERNS_19tagTIMESTAMP_STRUCTExii(ptr noundef nonnull align 8 dereferenceable(4032), ptr noundef nonnull align 4 dereferenceable(16), i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

declare void @_ZN4TPCE9CDateTime12GetTimeStampEPNS_19tagTIMESTAMP_STRUCTE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE13CSecurityFile12CreateSymbolExPcm(ptr noundef nonnull align 8 dereferenceable(161), i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TPCE20CCETxnInputGenerator24GenerateTradeLookupInputERNS_20TTradeLookupTxnInputE(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 8 dereferenceable(232) %1) local_unnamed_addr #0 align 2 {
  %3 = tail call noundef i32 @_ZN4TPCE7CRandom28RndGenerateIntegerPercentageEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %4 = getelementptr inbounds i8, ptr %0, i64 3848
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 184
  %7 = load i32, ptr %6, align 8, !tbaa !32
  %.not = icmp sgt i32 %3, %7
  br i1 %.not, label %28, label %8

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %1, i64 176
  store i32 1, ptr %9, align 8, !tbaa !36
  %10 = getelementptr inbounds i8, ptr %5, i64 200
  %11 = load i32, ptr %10, align 8, !tbaa !40
  %12 = getelementptr inbounds i8, ptr %1, i64 180
  store i32 %11, ptr %12, align 4, !tbaa !41
  %13 = icmp sgt i32 %11, 0
  br i1 %13, label %.preheader, label %._crit_edge

.preheader:                                       ; preds = %8, %.split.us
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.split.us ], [ 0, %8 ]
  %.not65 = icmp eq i64 %indvars.iv67, 0
  %14 = getelementptr inbounds [20 x i64], ptr %1, i64 0, i64 %indvars.iv67
  br i1 %.not65, label %.critedge.us60, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.preheader, %.critedge.us
  %15 = tail call noundef i64 @_ZN4TPCE20CCETxnInputGenerator25GenerateNonUniformTradeIDEii(ptr noundef nonnull align 8 dereferenceable(4032) %0, i32 noundef 65535, i32 noundef 7)
  br label %16

16:                                               ; preds = %.lr.ph.us, %19
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %19 ]
  %17 = getelementptr inbounds [20 x i64], ptr %1, i64 0, i64 %indvars.iv
  %18 = load i64, ptr %17, align 8, !tbaa !42
  %.not55.us = icmp eq i64 %18, %15
  br i1 %.not55.us, label %.critedge.us, label %19

19:                                               ; preds = %16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv67
  br i1 %exitcond.not, label %.critedge.us, label %16, !llvm.loop !43

.critedge.us:                                     ; preds = %16, %19
  %.049.lcssa.us.in = phi i64 [ %indvars.iv67, %19 ], [ %indvars.iv, %16 ]
  %20 = and i64 %.049.lcssa.us.in, 4294967295
  %21 = icmp eq i64 %20, %indvars.iv67
  br i1 %21, label %.split.us, label %.lr.ph.us

.critedge.us60:                                   ; preds = %.preheader
  %22 = tail call noundef i64 @_ZN4TPCE20CCETxnInputGenerator25GenerateNonUniformTradeIDEii(ptr noundef nonnull align 8 dereferenceable(4032) %0, i32 noundef 65535, i32 noundef 7)
  br label %.split.us

.split.us:                                        ; preds = %.critedge.us, %.critedge.us60
  %.lcssa.sink = phi i64 [ %22, %.critedge.us60 ], [ %15, %.critedge.us ]
  store i64 %.lcssa.sink, ptr %14, align 8, !tbaa !42
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %23 = load i32, ptr %12, align 4, !tbaa !41
  %24 = sext i32 %23 to i64
  %25 = icmp slt i64 %indvars.iv.next68, %24
  br i1 %25, label %.preheader, label %._crit_edge, !llvm.loop !45

._crit_edge:                                      ; preds = %.split.us, %8
  %26 = getelementptr inbounds i8, ptr %1, i64 160
  %27 = getelementptr inbounds i8, ptr %1, i64 184
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %26, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %27, i8 0, i64 48, i1 false)
  br label %82

28:                                               ; preds = %2
  %29 = getelementptr inbounds i8, ptr %5, i64 188
  %30 = load i32, ptr %29, align 4, !tbaa !46
  %31 = add nsw i32 %30, %7
  %.not53 = icmp sgt i32 %3, %31
  br i1 %.not53, label %47, label %32

32:                                               ; preds = %28
  %33 = getelementptr inbounds i8, ptr %1, i64 176
  store i32 2, ptr %33, align 8, !tbaa !36
  %34 = tail call noundef i64 @_ZN4TPCE20CCETxnInputGenerator31GenerateRandomCustomerAccountIdEv(ptr noundef nonnull align 8 dereferenceable(4032) %0)
  %35 = getelementptr inbounds i8, ptr %1, i64 160
  store i64 %34, ptr %35, align 8, !tbaa !47
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 208
  %38 = load i32, ptr %37, align 8, !tbaa !48
  %39 = getelementptr inbounds i8, ptr %1, i64 180
  store i32 %38, ptr %39, align 4, !tbaa !41
  %40 = getelementptr inbounds i8, ptr %1, i64 200
  %41 = getelementptr inbounds i8, ptr %0, i64 3920
  %42 = load i64, ptr %41, align 8, !tbaa !49
  tail call void @_ZN4TPCE20CCETxnInputGenerator26GenerateNonUniformTradeDTSERNS_19tagTIMESTAMP_STRUCTExii(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 4 dereferenceable(16) %40, i64 noundef %42, i32 noundef 4095, i32 noundef 16)
  %43 = getelementptr inbounds i8, ptr %0, i64 4008
  %44 = getelementptr inbounds i8, ptr %1, i64 184
  tail call void @_ZN4TPCE9CDateTime12GetTimeStampEPNS_19tagTIMESTAMP_STRUCTE(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull %44)
  %45 = getelementptr inbounds i8, ptr %1, i64 168
  store i64 0, ptr %45, align 8, !tbaa !50
  %46 = getelementptr inbounds i8, ptr %1, i64 216
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %46, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %1, i8 0, i64 160, i1 false)
  br label %82

47:                                               ; preds = %28
  %48 = getelementptr inbounds i8, ptr %5, i64 192
  %49 = load i32, ptr %48, align 8, !tbaa !51
  %50 = add nsw i32 %49, %31
  %.not54 = icmp sgt i32 %3, %50
  %51 = getelementptr inbounds i8, ptr %1, i64 176
  br i1 %.not54, label %73, label %52

52:                                               ; preds = %47
  store i32 3, ptr %51, align 8, !tbaa !36
  %53 = getelementptr inbounds i8, ptr %5, i64 216
  %54 = load i32, ptr %53, align 8, !tbaa !52
  %55 = getelementptr inbounds i8, ptr %1, i64 180
  store i32 %54, ptr %55, align 4, !tbaa !41
  %56 = getelementptr inbounds i8, ptr %0, i64 3808
  %57 = load ptr, ptr %56, align 8, !tbaa !53
  %58 = getelementptr inbounds i8, ptr %0, i64 3960
  %59 = load i64, ptr %58, align 8, !tbaa !54
  %60 = add nsw i64 %59, -1
  %61 = tail call noundef i64 @_ZN4TPCE7CRandom5NURndExxii(ptr noundef nonnull align 8 dereferenceable(8) %0, i64 noundef 0, i64 noundef %60, i32 noundef 0, i32 noundef 0)
  %62 = getelementptr inbounds i8, ptr %1, i64 216
  tail call void @_ZN4TPCE13CSecurityFile12CreateSymbolExPcm(ptr noundef nonnull align 8 dereferenceable(161) %57, i64 noundef %61, ptr noundef nonnull %62, i64 noundef 16)
  %63 = getelementptr inbounds i8, ptr %1, i64 200
  %64 = getelementptr inbounds i8, ptr %0, i64 3928
  %65 = load i64, ptr %64, align 8, !tbaa !55
  tail call void @_ZN4TPCE20CCETxnInputGenerator26GenerateNonUniformTradeDTSERNS_19tagTIMESTAMP_STRUCTExii(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 4 dereferenceable(16) %63, i64 noundef %65, i32 noundef 4095, i32 noundef 16)
  %66 = getelementptr inbounds i8, ptr %0, i64 4008
  %67 = getelementptr inbounds i8, ptr %1, i64 184
  tail call void @_ZN4TPCE9CDateTime12GetTimeStampEPNS_19tagTIMESTAMP_STRUCTE(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull %67)
  %68 = getelementptr inbounds i8, ptr %0, i64 120
  %69 = getelementptr inbounds i8, ptr %0, i64 3872
  %70 = load i64, ptr %69, align 8, !tbaa !56
  %71 = tail call noundef i64 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable14GetEndingCA_IDEx(ptr noundef nonnull align 8 dereferenceable(1616) %68, i64 noundef %70)
  %72 = getelementptr inbounds i8, ptr %1, i64 168
  store i64 %71, ptr %72, align 8, !tbaa !50
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(168) %1, i8 0, i64 168, i1 false)
  br label %82

73:                                               ; preds = %47
  store i32 4, ptr %51, align 8, !tbaa !36
  %74 = tail call noundef i64 @_ZN4TPCE20CCETxnInputGenerator31GenerateRandomCustomerAccountIdEv(ptr noundef nonnull align 8 dereferenceable(4032) %0)
  %75 = getelementptr inbounds i8, ptr %1, i64 160
  store i64 %74, ptr %75, align 8, !tbaa !47
  %76 = getelementptr inbounds i8, ptr %1, i64 200
  %77 = getelementptr inbounds i8, ptr %0, i64 3936
  %78 = load i64, ptr %77, align 8, !tbaa !57
  tail call void @_ZN4TPCE20CCETxnInputGenerator26GenerateNonUniformTradeDTSERNS_19tagTIMESTAMP_STRUCTExii(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 4 dereferenceable(16) %76, i64 noundef %78, i32 noundef 4095, i32 noundef 16)
  %79 = getelementptr inbounds i8, ptr %1, i64 180
  store i32 0, ptr %79, align 4, !tbaa !41
  %80 = getelementptr inbounds i8, ptr %1, i64 168
  store i64 0, ptr %80, align 8, !tbaa !50
  %81 = getelementptr inbounds i8, ptr %1, i64 216
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %81, i8 0, i64 16, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %1, i8 0, i64 160, i1 false)
  br label %82

82:                                               ; preds = %32, %73, %52, %._crit_edge
  ret void
}

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

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

attributes #0 = { 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 #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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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" }

!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 64}
!33 = !{!"_ZTSN4TPCE23CParametersWithDefaultsINS_20TTradeLookupSettingsENS_25TTradeLookupSettingsStateEEE", !34, i64 8, !35, i64 52, !34, i64 64}
!34 = !{!"_ZTSN4TPCE20TTradeLookupSettingsE", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40}
!35 = !{!"_ZTSN4TPCE25TTradeLookupSettingsStateE", !13, i64 0, !13, i64 1, !13, i64 2, !13, i64 3, !13, i64 4, !13, i64 5, !13, i64 6, !13, i64 7, !13, i64 8, !13, i64 9, !13, i64 10}
!36 = !{!37, !14, i64 176}
!37 = !{!"_ZTSN4TPCE20TTradeLookupTxnInputE", !9, i64 0, !8, i64 160, !8, i64 168, !14, i64 176, !14, i64 180, !38, i64 184, !38, i64 200, !9, i64 216}
!38 = !{!"_ZTSN4TPCE19tagTIMESTAMP_STRUCTE", !39, i64 0, !39, i64 2, !39, i64 4, !39, i64 6, !39, i64 8, !39, i64 10, !14, i64 12}
!39 = !{!"short", !9, i64 0}
!40 = !{!33, !14, i64 80}
!41 = !{!37, !14, i64 180}
!42 = !{!8, !8, i64 0}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = distinct !{!45, !44}
!46 = !{!33, !14, i64 68}
!47 = !{!37, !8, i64 160}
!48 = !{!33, !14, i64 88}
!49 = !{!6, !8, i64 3920}
!50 = !{!37, !8, i64 168}
!51 = !{!33, !14, i64 72}
!52 = !{!33, !14, i64 96}
!53 = !{!6, !12, i64 3808}
!54 = !{!6, !8, i64 3960}
!55 = !{!6, !8, i64 3928}
!56 = !{!6, !8, i64 3872}
!57 = !{!6, !8, i64 3936}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass