; 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"

%"struct.TPCE::TBrokerVolumeTxnInput" = type { [40 x [50 x i8]], [31 x i8] }
%"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::SECTOR_ROW" = type <{ %"struct.TPCE::TBaseInputRow", [3 x i8], [31 x i8], [6 x i8] }>
%"struct.TPCE::TBaseInputRow" = type { ptr }

; 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
define dso_local void @_ZN4TPCE20CCETxnInputGenerator25GenerateBrokerVolumeInputERNS_21TBrokerVolumeTxnInputE(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 1 dereferenceable(2031) %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 [40 x i64], align 16
  %9 = alloca i32, align 4
  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) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 320, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %11

11:                                               ; preds = %21, %2
  %12 = load i32, ptr %7, align 4, !tbaa !9
  %13 = icmp slt i32 %12, 40
  br i1 %13, label %14, label %24

14:                                               ; preds = %11
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.TPCE::TBrokerVolumeTxnInput", ptr %15, i32 0, i32 0
  %17 = load i32, ptr %7, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [40 x [50 x i8]], ptr %16, i64 0, i64 %18
  %20 = getelementptr inbounds [50 x i8], ptr %19, i64 0, i64 0
  store i8 0, ptr %20, align 1, !tbaa !11
  br label %21

21:                                               ; preds = %14
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %7, align 4, !tbaa !9
  br label %11, !llvm.loop !12

24:                                               ; preds = %11
  %25 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 0
  %26 = call noundef i32 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8) %25, i32 noundef 20, i32 noundef 40)
  store i32 %26, ptr %5, align 4, !tbaa !9
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 5
  %30 = call noundef i64 @_ZN4TPCE13CBrokersTable14GetBrokerCountEv(ptr noundef nonnull align 8 dereferenceable(224) %29)
  %31 = icmp sgt i64 %28, %30
  br i1 %31, label %32, label %36

32:                                               ; preds = %24
  %33 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 5
  %34 = call noundef i64 @_ZN4TPCE13CBrokersTable14GetBrokerCountEv(ptr noundef nonnull align 8 dereferenceable(224) %33)
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %5, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %32, %24
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %83, %36
  %38 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 5
  %39 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 0
  %40 = call noundef i64 @_ZN4TPCE13CBrokersTable22GenerateRandomBrokerIdEPNS_7CRandomE(ptr noundef nonnull align 8 dereferenceable(224) %38, ptr noundef %39)
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [40 x i64], ptr %8, i64 0, i64 %42
  store i64 %40, ptr %43, align 8, !tbaa !14
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %44

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

48:                                               ; preds = %44
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [40 x i64], ptr %8, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !14
  %53 = load i32, ptr %6, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [40 x i64], ptr %8, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !14
  %57 = icmp ne i64 %52, %56
  br label %58

58:                                               ; preds = %48, %44
  %59 = phi i1 [ false, %44 ], [ %57, %48 ]
  br i1 %59, label %60, label %64

60:                                               ; preds = %58
  br label %61

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

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

68:                                               ; preds = %64
  %69 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 5
  %70 = load i32, ptr %6, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [40 x i64], ptr %8, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !14
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.TPCE::TBrokerVolumeTxnInput", ptr %74, i32 0, i32 0
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [40 x [50 x i8]], ptr %75, i64 0, i64 %77
  %79 = getelementptr inbounds [50 x i8], ptr %78, i64 0, i64 0
  call void @_ZN4TPCE13CBrokersTable18GenerateBrokerNameExPcm(ptr noundef nonnull align 8 dereferenceable(224) %69, i64 noundef %73, ptr noundef %79, i64 noundef 50)
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %6, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %68, %64
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %6, align 4, !tbaa !9
  %85 = load i32, ptr %5, align 4, !tbaa !9
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %37, label %87, !llvm.loop !17

87:                                               ; preds = %83
  %88 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 0
  %89 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 30
  %90 = load i32, ptr %89, align 4, !tbaa !18
  %91 = sub nsw i32 %90, 1
  %92 = call noundef i32 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8) %88, i32 noundef 0, i32 noundef %91)
  store i32 %92, ptr %9, align 4, !tbaa !9
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.TPCE::TBrokerVolumeTxnInput", ptr %93, i32 0, i32 1
  %95 = getelementptr inbounds [31 x i8], ptr %94, i64 0, i64 0
  %96 = getelementptr inbounds %"class.TPCE::CCETxnInputGenerator", ptr %10, i32 0, i32 9
  %97 = load ptr, ptr %96, align 8, !tbaa !40
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = call noundef ptr @_ZN4TPCE9CFlatFileINS_10SECTOR_ROWENS_13TSectorLimitsEE9GetRecordEi(ptr noundef nonnull align 8 dereferenceable(40) %97, i32 noundef %98)
  %100 = getelementptr inbounds %"struct.TPCE::SECTOR_ROW", ptr %99, i32 0, i32 2
  %101 = getelementptr inbounds [31 x i8], ptr %100, i64 0, i64 0
  %102 = call ptr @strncpy(ptr noundef %95, ptr noundef %101, i64 noundef 31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

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

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

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

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

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4TPCE9CFlatFileINS_10SECTOR_ROWENS_13TSectorLimitsEE9GetRecordEi(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #1 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 = { 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 #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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


; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TPCE20CCETxnInputGenerator25GenerateBrokerVolumeInputERNS_21TBrokerVolumeTxnInputE(ptr noundef nonnull align 8 dereferenceable(4032) %0, ptr noundef nonnull align 1 dereferenceable(2031) %1) local_unnamed_addr #1 align 2 {
  %3 = alloca [40 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 320, ptr nonnull %3) #5
  store i8 0, ptr %1, align 1, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %1, i64 50
  store i8 0, ptr %4, align 1, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 100
  store i8 0, ptr %5, align 1, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 150
  store i8 0, ptr %6, align 1, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 200
  store i8 0, ptr %7, align 1, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 250
  store i8 0, ptr %8, align 1, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 300
  store i8 0, ptr %9, align 1, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %1, i64 350
  store i8 0, ptr %10, align 1, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %1, i64 400
  store i8 0, ptr %11, align 1, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 450
  store i8 0, ptr %12, align 1, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %1, i64 500
  store i8 0, ptr %13, align 1, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %1, i64 550
  store i8 0, ptr %14, align 1, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %1, i64 600
  store i8 0, ptr %15, align 1, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %1, i64 650
  store i8 0, ptr %16, align 1, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %1, i64 700
  store i8 0, ptr %17, align 1, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %1, i64 750
  store i8 0, ptr %18, align 1, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %1, i64 800
  store i8 0, ptr %19, align 1, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %1, i64 850
  store i8 0, ptr %20, align 1, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %1, i64 900
  store i8 0, ptr %21, align 1, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %1, i64 950
  store i8 0, ptr %22, align 1, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %1, i64 1000
  store i8 0, ptr %23, align 1, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %1, i64 1050
  store i8 0, ptr %24, align 1, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %1, i64 1100
  store i8 0, ptr %25, align 1, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %1, i64 1150
  store i8 0, ptr %26, align 1, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %1, i64 1200
  store i8 0, ptr %27, align 1, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %1, i64 1250
  store i8 0, ptr %28, align 1, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %1, i64 1300
  store i8 0, ptr %29, align 1, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %1, i64 1350
  store i8 0, ptr %30, align 1, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %1, i64 1400
  store i8 0, ptr %31, align 1, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %1, i64 1450
  store i8 0, ptr %32, align 1, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %1, i64 1500
  store i8 0, ptr %33, align 1, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %1, i64 1550
  store i8 0, ptr %34, align 1, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %1, i64 1600
  store i8 0, ptr %35, align 1, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %1, i64 1650
  store i8 0, ptr %36, align 1, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %1, i64 1700
  store i8 0, ptr %37, align 1, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %1, i64 1750
  store i8 0, ptr %38, align 1, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %1, i64 1800
  store i8 0, ptr %39, align 1, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %1, i64 1850
  store i8 0, ptr %40, align 1, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %1, i64 1900
  store i8 0, ptr %41, align 1, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %1, i64 1950
  store i8 0, ptr %42, align 1, !tbaa !5
  %43 = tail call noundef i32 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 20, i32 noundef 40)
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i8, ptr %0, i64 3576
  %46 = tail call noundef i64 @_ZN4TPCE13CBrokersTable14GetBrokerCountEv(ptr noundef nonnull align 8 dereferenceable(224) %45)
  %47 = icmp slt i64 %46, %44
  br i1 %47, label %48, label %51

48:                                               ; preds = %2
  %49 = tail call noundef i64 @_ZN4TPCE13CBrokersTable14GetBrokerCountEv(ptr noundef nonnull align 8 dereferenceable(224) %45)
  %50 = trunc i64 %49 to i32
  br label %51

51:                                               ; preds = %48, %2
  %.0 = phi i32 [ %50, %48 ], [ %43, %2 ]
  br label %52

52:                                               ; preds = %64, %51
  %.022 = phi i32 [ 0, %51 ], [ %.123, %64 ]
  %53 = tail call noundef i64 @_ZN4TPCE13CBrokersTable22GenerateRandomBrokerIdEPNS_7CRandomE(ptr noundef nonnull align 8 dereferenceable(224) %45, ptr noundef nonnull %0)
  %54 = sext i32 %.022 to i64
  %55 = getelementptr inbounds [40 x i64], ptr %3, i64 0, i64 %54
  store i64 %53, ptr %55, align 8, !tbaa !8
  %56 = icmp sgt i32 %.022, 0
  br i1 %56, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %52
  %wide.trip.count = zext nneg i32 %.022 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %59
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %59 ]
  %57 = getelementptr inbounds [40 x i64], ptr %3, i64 0, i64 %indvars.iv
  %58 = load i64, ptr %57, align 8, !tbaa !8
  %.not = icmp eq i64 %58, %53
  br i1 %.not, label %.critedge.loopexit, label %59

59:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge.thread, label %.lr.ph, !llvm.loop !10

.critedge.loopexit:                               ; preds = %.lr.ph
  %60 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %52
  %.1.lcssa = phi i32 [ 0, %52 ], [ %60, %.critedge.loopexit ]
  %61 = icmp eq i32 %.1.lcssa, %.022
  br i1 %61, label %.critedge.thread, label %64

.critedge.thread:                                 ; preds = %59, %.critedge
  %62 = getelementptr inbounds [40 x [50 x i8]], ptr %1, i64 0, i64 %54
  tail call void @_ZN4TPCE13CBrokersTable18GenerateBrokerNameExPcm(ptr noundef nonnull align 8 dereferenceable(224) %45, i64 noundef %53, ptr noundef nonnull %62, i64 noundef 50)
  %63 = add nsw i32 %.022, 1
  br label %64

64:                                               ; preds = %.critedge, %.critedge.thread
  %.123 = phi i32 [ %63, %.critedge.thread ], [ %.022, %.critedge ]
  %65 = icmp slt i32 %.123, %.0
  br i1 %65, label %52, label %66, !llvm.loop !12

66:                                               ; preds = %64
  %67 = getelementptr inbounds i8, ptr %0, i64 3980
  %68 = load i32, ptr %67, align 4, !tbaa !13
  %69 = add nsw i32 %68, -1
  %70 = tail call noundef i32 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 0, i32 noundef %69)
  %71 = getelementptr inbounds i8, ptr %1, i64 2000
  %72 = getelementptr inbounds i8, ptr %0, i64 3824
  %73 = load ptr, ptr %72, align 8, !tbaa !37
  %74 = tail call noundef ptr @_ZN4TPCE9CFlatFileINS_10SECTOR_ROWENS_13TSectorLimitsEE9GetRecordEi(ptr noundef nonnull align 8 dereferenceable(40) %73, i32 noundef %70)
  %75 = getelementptr inbounds i8, ptr %74, i64 11
  %76 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %71, ptr noundef nonnull dereferenceable(1) %75, i64 noundef 31) #5
  call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %3) #5
  ret void
}

declare noundef i32 @_ZN4TPCE7CRandom11RndIntRangeEii(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN4TPCE13CBrokersTable22GenerateRandomBrokerIdEPNS_7CRandomE(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress 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 = { 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 #4 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass