; LLVM IR from sfu-dis/mosaicdb :: benchmarks/egen/TradeGen.ll (ZN4TPCE9CTradeGen17GenerateNextTradeEv)

; 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.std::_List_iterator" = type { ptr }
%"class.TPCE::CTradeGen" = type <{ %"class.TPCE::CRandom", %"class.TPCE::CAddressTable", %"class.TPCE::CCustomerSelection", %"class.TPCE::CCustomerTable", %"class.TPCE::CCustomerTaxratesTable", %"class.TPCE::CCustomerAccountsAndPermissionsTable", %"class.TPCE::CHoldingsAndTradesTable", %"class.TPCE::CBrokersTable", %"class.TPCE::CSecurityTable", %"class.TPCE::CPerson", ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i32, i32, i32, i32, double, double, %"class.TPCE::CDateTime", double, %"class.std::priority_queue", i64, i64, i64, i32, [4 x i8], ptr, %"struct.TPCE::TTradeInfo", %"struct.TPCE::TAdditionalTradeInfo", %"struct.TPCE::TTradeRow", %"struct.TPCE::HOLDING_ROW", %"struct.TPCE::HOLDING_SUMMARY_ROW", i32, i32, i32, i32, %"class.TPCE::CMEESecurity", i32, i32, %"struct.std::_List_iterator", i32, i32, i64, i32, [4 x i8] }>
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CAddressTable" = type { %"class.TPCE::TableTemplate", %"class.TPCE::CDateTime", ptr, ptr, ptr, ptr, i64, i64, i8, i8, i64, i32, i64, i8, i32, i64, ptr }
%"class.TPCE::TableTemplate" = 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::CCustomerSelection" = type { ptr, i64, i64, i8, i32, i64, i64 }
%"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::CCustomerTaxratesTable" = type { %"class.TPCE::TableTemplate.1", %"class.TPCE::CCustomerTable", %"class.TPCE::CAddressTable", ptr, ptr }
%"class.TPCE::TableTemplate.1" = type { ptr, %"struct.TPCE::CUSTOMER_TAXRATE_ROWS", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::CUSTOMER_TAXRATE_ROWS" = type { [2 x %"struct.TPCE::CUSTOMER_TAXRATE_ROW"] }
%"struct.TPCE::CUSTOMER_TAXRATE_ROW" = type { [5 x i8], i64 }
%"class.TPCE::CCustomerAccountsAndPermissionsTable" = type { %"class.TPCE::TableTemplate.2", 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.2" = 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::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.3", i64, i64, i64, %"class.TPCE::CPerson", ptr, ptr, ptr }
%"class.TPCE::TableTemplate.3" = 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::CSecurityTable" = type { %"class.TPCE::TableTemplate.4", i64, i64, ptr, ptr, %"class.TPCE::CDateTime", i32, i32, i32, i64 }
%"class.TPCE::TableTemplate.4" = type { ptr, %"struct.TPCE::SECURITY_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::SECURITY_ROW" = type { [16 x i8], [7 x i8], [5 x i8], [71 x i8], [7 x i8], i64, i64, %"class.TPCE::CDateTime", %"class.TPCE::CDateTime", double, float, %"class.TPCE::CDateTime", float, %"class.TPCE::CDateTime", double, double }
%"class.TPCE::CPerson" = type { ptr, ptr, ptr, %"class.TPCE::CRandom", i8, i32, i64, ptr, ptr }
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<TPCE::TTradeInfo, std::allocator<TPCE::TTradeInfo>>::_Vector_impl" }
%"struct.std::_Vector_base<TPCE::TTradeInfo, std::allocator<TPCE::TTradeInfo>>::_Vector_impl" = type { %"struct.std::_Vector_base<TPCE::TTradeInfo, std::allocator<TPCE::TTradeInfo>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TPCE::TTradeInfo, std::allocator<TPCE::TTradeInfo>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.TPCE::TTradeInfo" = type <{ i64, i32, i32, double, double, double, i64, i32, i32, %"class.TPCE::CMoney", %"class.TPCE::CMoney", i64, i32, [4 x i8], i64, i8, [7 x i8] }>
%"class.TPCE::CMoney" = type { i64 }
%"struct.TPCE::TAdditionalTradeInfo" = type { %"class.TPCE::CMoney", %"class.TPCE::CMoney", i64, i32, %"class.TPCE::CMoney", %"class.TPCE::CMoney", %"class.TPCE::CMoney", %"class.TPCE::CMoney" }
%"struct.TPCE::TTradeRow" = type { %"struct.TPCE::TRADE_ROW", %"struct.TPCE::TRADE_REQUEST_ROW", [3 x %"struct.TPCE::TRADE_HISTORY_ROW"], %"struct.TPCE::SETTLEMENT_ROW", %"struct.TPCE::CASH_TRANSACTION_ROW", [8 x %"struct.TPCE::HOLDING_HISTORY_ROW"] }
%"struct.TPCE::TRADE_ROW" = type <{ i64, %"class.TPCE::CDateTime", [5 x i8], [4 x i8], i8, [16 x i8], [2 x i8], i32, double, i64, [50 x i8], [6 x i8], double, double, double, double, i8, [7 x i8] }>
%"struct.TPCE::TRADE_REQUEST_ROW" = type { i64, [4 x i8], [16 x i8], i32, double, i64 }
%"struct.TPCE::TRADE_HISTORY_ROW" = type <{ i64, %"class.TPCE::CDateTime", [5 x i8], [3 x i8] }>
%"struct.TPCE::SETTLEMENT_ROW" = type { i64, [41 x i8], %"class.TPCE::CDateTime", double }
%"struct.TPCE::CASH_TRANSACTION_ROW" = type <{ i64, %"class.TPCE::CDateTime", double, [101 x i8], [3 x i8] }>
%"struct.TPCE::HOLDING_HISTORY_ROW" = type { i64, i64, i32, i32 }
%"struct.TPCE::HOLDING_ROW" = type <{ i64, i64, [16 x i8], %"class.TPCE::CDateTime", double, i32, [4 x i8] }>
%"struct.TPCE::HOLDING_SUMMARY_ROW" = type { i64, [16 x i8], i32 }
%"class.TPCE::CMEESecurity" = type { %"class.TPCE::CRandom", %"class.TPCE::CMoney", %"class.TPCE::CMoney", %"class.TPCE::CMoney", i32, i32, ptr, ptr, double }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<TPCE::THoldingInfo, std::allocator<TPCE::THoldingInfo>>::_List_impl" }
%"struct.std::__cxx11::_List_base<TPCE::THoldingInfo, std::allocator<TPCE::THoldingInfo>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__._ZN4TPCE9CTradeGen17GenerateNextTradeEv = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4TPCE9CTradeGen17GenerateNextTradeEv(ptr noundef nonnull align 8 dereferenceable(7356) %0) #2 align 2 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_List_iterator", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %7 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #7
  %8 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 30
  %9 = load i64, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 31
  %11 = load i64, ptr %10, align 8, !tbaa !62
  %12 = icmp slt i64 %9, %11
  br i1 %12, label %13, label %81

13:                                               ; preds = %1
  br label %14

14:                                               ; preds = %67, %66, %13
  %15 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 30
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 29
  %18 = call noundef i64 @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %17)
  %19 = trunc i64 %18 to i32
  %20 = sext i32 %19 to i64
  %21 = add nsw i64 %16, %20
  %22 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 31
  %23 = load i64, ptr %22, align 8, !tbaa !62
  %24 = icmp slt i64 %21, %23
  br i1 %24, label %25, label %38

25:                                               ; preds = %14
  %26 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 29
  %27 = call noundef zeroext i1 @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %26)
  br i1 %27, label %36, label %28

28:                                               ; preds = %25
  %29 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 28
  %30 = load double, ptr %29, align 8, !tbaa !63
  %31 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 29
  %32 = call noundef nonnull align 8 dereferenceable(97) ptr @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %31)
  %33 = getelementptr inbounds %"struct.TPCE::TTradeInfo", ptr %32, i32 0, i32 5
  %34 = load double, ptr %33, align 8, !tbaa !64
  %35 = fcmp olt double %30, %34
  br label %36

36:                                               ; preds = %28, %25
  %37 = phi i1 [ true, %25 ], [ %35, %28 ]
  br label %38

38:                                               ; preds = %36, %14
  %39 = phi i1 [ false, %14 ], [ %37, %36 ]
  br i1 %39, label %40, label %70

40:                                               ; preds = %38
  %41 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 32
  %42 = load i64, ptr %41, align 8, !tbaa !65
  %43 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 33
  %44 = load i32, ptr %43, align 8, !tbaa !66
  %45 = sext i32 %44 to i64
  %46 = sdiv i64 %42, %45
  %47 = mul nsw i64 %46, 86400
  %48 = sitofp i64 %47 to double
  %49 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 32
  %50 = load i64, ptr %49, align 8, !tbaa !65
  %51 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 33
  %52 = load i32, ptr %51, align 8, !tbaa !66
  %53 = sext i32 %52 to i64
  %54 = srem i64 %50, %53
  %55 = sitofp i64 %54 to double
  %56 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 25
  %57 = load double, ptr %56, align 8, !tbaa !67
  %58 = call double @llvm.fmuladd.f64(double %55, double %57, double %48)
  %59 = call noundef double @_ZN4TPCE9CTradeGen26GenerateDelayBetweenTradesEv(ptr noundef nonnull align 8 dereferenceable(7356) %7)
  %60 = fadd double %58, %59
  %61 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 28
  store double %60, ptr %61, align 8, !tbaa !63
  call void @_ZN4TPCE9CTradeGen16GenerateNewTradeEv(ptr noundef nonnull align 8 dereferenceable(7356) %7)
  %62 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 6
  %63 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 32
  %64 = load i64, ptr %63, align 8, !tbaa !65
  %65 = call noundef zeroext i1 @_ZN4TPCE23CHoldingsAndTradesTable14IsAbortedTradeEx(ptr noundef nonnull align 8 dereferenceable(1840) %62, i64 noundef %64)
  br i1 %65, label %66, label %67

66:                                               ; preds = %40
  br label %14, !llvm.loop !68

67:                                               ; preds = %40
  %68 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 29
  %69 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 36
  call void @_ZNSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(25) %68, ptr noundef nonnull align 8 dereferenceable(97) %69)
  br label %14, !llvm.loop !68

70:                                               ; preds = %38
  %71 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 29
  %72 = call noundef nonnull align 8 dereferenceable(97) ptr @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %71)
  %73 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 36
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %73, ptr align 8 %72, i64 97, i1 false), !tbaa.struct !70
  %74 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 29
  call void @_ZNSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %74)
  call void @_ZN4TPCE9CTradeGen14UpdateHoldingsEv(ptr noundef nonnull align 8 dereferenceable(7356) %7)
  call void @_ZN4TPCE9CTradeGen21GenerateCompleteTradeEv(ptr noundef nonnull align 8 dereferenceable(7356) %7)
  %75 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 30
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 31
  %78 = load i64, ptr %77, align 8, !tbaa !62
  %79 = icmp slt i64 %76, %78
  %80 = zext i1 %79 to i8
  store i8 %80, ptr %4, align 1, !tbaa !77
  br label %82

81:                                               ; preds = %1
  store i8 0, ptr %4, align 1, !tbaa !77
  br label %82

82:                                               ; preds = %81, %70
  %83 = load i8, ptr %4, align 1, !tbaa !77, !range !78, !noundef !79
  %84 = trunc i8 %83 to i1
  br i1 %84, label %85, label %86

85:                                               ; preds = %82
  store i1 true, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %109

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %87 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 35
  %88 = load ptr, ptr %87, align 8, !tbaa !80
  %89 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 46
  %90 = load i32, ptr %89, align 8, !tbaa !81
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [18 x %"class.std::__cxx11::list"], ptr %88, i64 %91
  %93 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 47
  %94 = load i32, ptr %93, align 4, !tbaa !82
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [18 x %"class.std::__cxx11::list"], ptr %92, i64 0, i64 %95
  %97 = call ptr @_ZNSt7__cxx114listIN4TPCE12THoldingInfoESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #7
  %98 = getelementptr inbounds %"struct.std::_List_iterator", ptr %6, i32 0, i32 0
  store ptr %97, ptr %98, align 8
  %99 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 48
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %99, ptr align 8 %6, i64 8, i1 false), !tbaa.struct !83
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  %100 = call noundef zeroext i1 @_ZN4TPCE9CTradeGen15FindNextHoldingEv(ptr noundef nonnull align 8 dereferenceable(7356) %7)
  %101 = call noundef zeroext i1 @_ZN4TPCE9CTradeGen19FindNextHoldingListEv(ptr noundef nonnull align 8 dereferenceable(7356) %7)
  %102 = getelementptr inbounds %"class.TPCE::CTradeGen", ptr %7, i32 0, i32 29
  %103 = call noundef i64 @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %102)
  %104 = icmp eq i64 %103, 0
  br i1 %104, label %105, label %106

105:                                              ; preds = %86
  br label %108

106:                                              ; preds = %86
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 344, ptr noundef @__PRETTY_FUNCTION__._ZN4TPCE9CTradeGen17GenerateNextTradeEv) #8
  unreachable

107:                                              ; No predecessors!
  br label %108

108:                                              ; preds = %107, %105
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %109

109:                                              ; preds = %108, %85
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  %110 = load i1, ptr %2, align 1
  ret i1 %110
}

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN4TPCE9CTradeGen26GenerateDelayBetweenTradesEv(ptr noundef nonnull align 8 dereferenceable(7356)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE9CTradeGen16GenerateNewTradeEv(ptr noundef nonnull align 8 dereferenceable(7356)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(97)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE9CTradeGen14UpdateHoldingsEv(ptr noundef nonnull align 8 dereferenceable(7356)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE9CTradeGen21GenerateCompleteTradeEv(ptr noundef nonnull align 8 dereferenceable(7356)) #2 align 2

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

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

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

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

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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, !12, i64 6216}
!10 = !{!"_ZTSN4TPCE9CTradeGenE", !11, i64 0, !13, i64 8, !19, i64 424, !20, i64 472, !24, i64 968, !27, i64 1960, !32, i64 3576, !33, i64 5416, !36, i64 5640, !23, i64 5976, !6, i64 6040, !6, i64 6048, !6, i64 6056, !6, i64 6064, !6, i64 6072, !6, i64 6080, !6, i64 6088, !12, i64 6096, !12, i64 6104, !12, i64 6112, !12, i64 6120, !18, i64 6128, !18, i64 6132, !18, i64 6136, !18, i64 6140, !31, i64 6144, !31, i64 6152, !17, i64 6160, !31, i64 6176, !40, i64 6184, !12, i64 6216, !12, i64 6224, !12, i64 6232, !18, i64 6240, !6, i64 6248, !46, i64 6256, !51, i64 6360, !53, i64 6424, !58, i64 7144, !59, i64 7208, !18, i64 7240, !18, i64 7244, !18, i64 7248, !18, i64 7252, !60, i64 7256, !18, i64 7320, !18, i64 7324, !61, i64 7328, !18, i64 7336, !18, i64 7340, !12, i64 7344, !18, i64 7352}
!11 = !{!"_ZTSN4TPCE7CRandomE", !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"_ZTSN4TPCE13CAddressTableE", !14, i64 0, !17, i64 296, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !12, i64 344, !12, i64 352, !16, i64 360, !16, i64 361, !12, i64 368, !18, i64 376, !12, i64 384, !16, i64 392, !18, i64 396, !12, i64 400, !6, i64 408}
!14 = !{!"_ZTSN4TPCE13TableTemplateINS_11ADDRESS_ROWEEE", !15, i64 8, !12, i64 272, !16, i64 280, !11, i64 288}
!15 = !{!"_ZTSN4TPCE11ADDRESS_ROWE", !12, i64 0, !7, i64 8, !7, i64 89, !7, i64 170, !7, i64 183}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN4TPCE9CDateTimeE", !18, i64 0, !18, i64 4, !6, i64 8}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN4TPCE18CCustomerSelectionE", !6, i64 0, !12, i64 8, !12, i64 16, !16, i64 24, !18, i64 28, !12, i64 32, !12, i64 40}
!20 = !{!"_ZTSN4TPCE14CCustomerTableE", !21, i64 0, !12, i64 328, !23, i64 336, !6, i64 400, !12, i64 408, !12, i64 416, !12, i64 424, !18, i64 432, !6, i64 440, !19, i64 448}
!21 = !{!"_ZTSN4TPCE13TableTemplateINS_12CUSTOMER_ROWEEE", !22, i64 8, !12, i64 304, !16, i64 312, !11, i64 320}
!22 = !{!"_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, !17, 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}
!23 = !{!"_ZTSN4TPCE7CPersonE", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !16, i64 32, !18, i64 36, !12, i64 40, !6, i64 48, !6, i64 56}
!24 = !{!"_ZTSN4TPCE22CCustomerTaxratesTableE", !25, i64 0, !20, i64 64, !13, i64 560, !6, i64 976, !6, i64 984}
!25 = !{!"_ZTSN4TPCE13TableTemplateINS_21CUSTOMER_TAXRATE_ROWSEEE", !26, i64 8, !12, i64 40, !16, i64 48, !11, i64 56}
!26 = !{!"_ZTSN4TPCE21CUSTOMER_TAXRATE_ROWSE", !7, i64 0}
!27 = !{!"_ZTSN4TPCE36CCustomerAccountsAndPermissionsTableE", !28, i64 0, !6, i64 472, !6, i64 480, !12, i64 488, !12, i64 496, !12, i64 504, !18, i64 512, !18, i64 516, !20, i64 520, !23, i64 1016, !18, i64 1080, !12, i64 1088, !13, i64 1096, !18, i64 1512, !19, i64 1520, !16, i64 1568, !18, i64 1572, !12, i64 1576, !6, i64 1584, !18, i64 1592, !12, i64 1600, !6, i64 1608}
!28 = !{!"_ZTSN4TPCE13TableTemplateINS_35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWEEE", !29, i64 8, !12, i64 448, !16, i64 456, !11, i64 464}
!29 = !{!"_ZTSN4TPCE35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWE", !30, i64 0, !7, i64 88}
!30 = !{!"_ZTSN4TPCE20CUSTOMER_ACCOUNT_ROWE", !12, i64 0, !12, i64 8, !12, i64 16, !7, i64 24, !7, i64 75, !31, i64 80}
!31 = !{!"double", !7, i64 0}
!32 = !{!"_ZTSN4TPCE23CHoldingsAndTradesTableE", !11, i64 0, !27, i64 8, !12, i64 1624, !18, i64 1632, !7, i64 1640, !16, i64 1784, !12, i64 1792, !18, i64 1800, !6, i64 1808, !12, i64 1816, !18, i64 1824, !6, i64 1832}
!33 = !{!"_ZTSN4TPCE13CBrokersTableE", !34, i64 0, !12, i64 112, !12, i64 120, !12, i64 128, !23, i64 136, !6, i64 200, !6, i64 208, !6, i64 216}
!34 = !{!"_ZTSN4TPCE13TableTemplateINS_10BROKER_ROWEEE", !35, i64 8, !12, i64 88, !16, i64 96, !11, i64 104}
!35 = !{!"_ZTSN4TPCE10BROKER_ROWE", !12, i64 0, !7, i64 8, !7, i64 13, !18, i64 64, !31, i64 72}
!36 = !{!"_ZTSN4TPCE14CSecurityTableE", !37, i64 0, !12, i64 264, !12, i64 272, !6, i64 280, !6, i64 288, !17, i64 296, !18, i64 312, !18, i64 316, !18, i64 320, !12, i64 328}
!37 = !{!"_ZTSN4TPCE13TableTemplateINS_12SECURITY_ROWEEE", !38, i64 8, !12, i64 240, !16, i64 248, !11, i64 256}
!38 = !{!"_ZTSN4TPCE12SECURITY_ROWE", !7, i64 0, !7, i64 16, !7, i64 23, !7, i64 28, !7, i64 99, !12, i64 112, !12, i64 120, !17, i64 128, !17, i64 144, !31, i64 160, !39, i64 168, !17, i64 176, !39, i64 192, !17, i64 200, !31, i64 216, !31, i64 224}
!39 = !{!"float", !7, i64 0}
!40 = !{!"_ZTSSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE", !41, i64 0, !45, i64 24}
!41 = !{!"_ZTSSt6vectorIN4TPCE10TTradeInfoESaIS1_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseIN4TPCE10TTradeInfoESaIS1_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIN4TPCE10TTradeInfoESaIS1_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIN4TPCE10TTradeInfoESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = !{!"_ZTSSt7greaterIN4TPCE10TTradeInfoEE"}
!46 = !{!"_ZTSN4TPCE10TTradeInfoE", !12, i64 0, !47, i64 8, !48, i64 12, !31, i64 16, !31, i64 24, !31, i64 32, !12, i64 40, !18, i64 48, !18, i64 52, !49, i64 56, !49, i64 64, !12, i64 72, !50, i64 80, !12, i64 88, !16, i64 96}
!47 = !{!"_ZTSN4TPCE12eTradeTypeIDE", !7, i64 0}
!48 = !{!"_ZTSN4TPCE13eStatusTypeIDE", !7, i64 0}
!49 = !{!"_ZTSN4TPCE6CMoneyE", !12, i64 0}
!50 = !{!"_ZTSN4TPCE13eCustomerTierE", !7, i64 0}
!51 = !{!"_ZTSN4TPCE20TAdditionalTradeInfoE", !49, i64 0, !49, i64 8, !12, i64 16, !52, i64 24, !49, i64 32, !49, i64 40, !49, i64 48, !49, i64 56}
!52 = !{!"_ZTSN4TPCE10eTaxStatusE", !7, i64 0}
!53 = !{!"_ZTSN4TPCE9TTradeRowE", !54, i64 0, !55, i64 168, !7, i64 216, !56, i64 312, !57, i64 392, !7, i64 528}
!54 = !{!"_ZTSN4TPCE9TRADE_ROWE", !12, i64 0, !17, i64 8, !7, i64 24, !7, i64 29, !16, i64 33, !7, i64 34, !18, i64 52, !31, i64 56, !12, i64 64, !7, i64 72, !31, i64 128, !31, i64 136, !31, i64 144, !31, i64 152, !16, i64 160}
!55 = !{!"_ZTSN4TPCE17TRADE_REQUEST_ROWE", !12, i64 0, !7, i64 8, !7, i64 12, !18, i64 28, !31, i64 32, !12, i64 40}
!56 = !{!"_ZTSN4TPCE14SETTLEMENT_ROWE", !12, i64 0, !7, i64 8, !17, i64 56, !31, i64 72}
!57 = !{!"_ZTSN4TPCE20CASH_TRANSACTION_ROWE", !12, i64 0, !17, i64 8, !31, i64 24, !7, i64 32}
!58 = !{!"_ZTSN4TPCE11HOLDING_ROWE", !12, i64 0, !12, i64 8, !7, i64 16, !17, i64 32, !31, i64 48, !18, i64 56}
!59 = !{!"_ZTSN4TPCE19HOLDING_SUMMARY_ROWE", !12, i64 0, !7, i64 8, !18, i64 24}
!60 = !{!"_ZTSN4TPCE12CMEESecurityE", !11, i64 0, !49, i64 8, !49, i64 16, !49, i64 24, !18, i64 32, !18, i64 36, !6, i64 40, !6, i64 48, !31, i64 56}
!61 = !{!"_ZTSSt14_List_iteratorIN4TPCE12THoldingInfoEE", !6, i64 0}
!62 = !{!10, !12, i64 6224}
!63 = !{!10, !31, i64 6176}
!64 = !{!46, !31, i64 32}
!65 = !{!10, !12, i64 6232}
!66 = !{!10, !18, i64 6240}
!67 = !{!10, !31, i64 6144}
!68 = distinct !{!68, !69}
!69 = !{!"llvm.loop.mustprogress"}
!70 = !{i64 0, i64 8, !71, i64 8, i64 4, !72, i64 12, i64 4, !73, i64 16, i64 8, !74, i64 24, i64 8, !74, i64 32, i64 8, !74, i64 40, i64 8, !71, i64 48, i64 4, !75, i64 52, i64 4, !75, i64 56, i64 8, !71, i64 64, i64 8, !71, i64 72, i64 8, !71, i64 80, i64 4, !76, i64 88, i64 8, !71, i64 96, i64 1, !77}
!71 = !{!12, !12, i64 0}
!72 = !{!47, !47, i64 0}
!73 = !{!48, !48, i64 0}
!74 = !{!31, !31, i64 0}
!75 = !{!18, !18, i64 0}
!76 = !{!50, !50, i64 0}
!77 = !{!16, !16, i64 0}
!78 = !{i8 0, i8 2}
!79 = !{}
!80 = !{!10, !6, i64 6248}
!81 = !{!10, !18, i64 7320}
!82 = !{!10, !18, i64 7324}
!83 = !{i64 0, i64 8, !5}


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

%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<TPCE::THoldingInfo, std::allocator<TPCE::THoldingInfo>>::_List_impl" }
%"struct.std::__cxx11::_List_base<TPCE::THoldingInfo, std::allocator<TPCE::THoldingInfo>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__._ZN4TPCE9CTradeGen17GenerateNextTradeEv = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4TPCE9CTradeGen17GenerateNextTradeEv(ptr noundef nonnull align 8 dereferenceable(7356) %0) local_unnamed_addr #1 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 6216
  %3 = load i64, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 6224
  %5 = load i64, ptr %4, align 8, !tbaa !61
  %6 = icmp slt i64 %3, %5
  br i1 %6, label %.preheader, label %.thread

.preheader:                                       ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 6176
  %8 = getelementptr inbounds i8, ptr %0, i64 6184
  %9 = tail call noundef i64 @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  %sext8 = shl i64 %9, 32
  %10 = ashr exact i64 %sext8, 32
  %11 = add nsw i64 %10, %3
  %12 = load i64, ptr %4, align 8, !tbaa !61
  %13 = icmp slt i64 %11, %12
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %14 = getelementptr inbounds i8, ptr %0, i64 6232
  %15 = getelementptr inbounds i8, ptr %0, i64 6240
  %16 = getelementptr inbounds i8, ptr %0, i64 6144
  %17 = getelementptr inbounds i8, ptr %0, i64 3576
  %18 = getelementptr inbounds i8, ptr %0, i64 6256
  br label %19

19:                                               ; preds = %.lr.ph, %.backedge
  %20 = tail call noundef zeroext i1 @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  br i1 %20, label %.critedge2, label %21

21:                                               ; preds = %19
  %22 = load double, ptr %7, align 8, !tbaa !62
  %23 = tail call noundef nonnull align 8 dereferenceable(97) ptr @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  %24 = getelementptr inbounds i8, ptr %23, i64 32
  %25 = load double, ptr %24, align 8, !tbaa !63
  %26 = fcmp olt double %22, %25
  br i1 %26, label %.critedge2, label %._crit_edge

.critedge2:                                       ; preds = %19, %21
  %27 = load i64, ptr %14, align 8, !tbaa !64
  %28 = load i32, ptr %15, align 8, !tbaa !65
  %29 = sext i32 %28 to i64
  %30 = sdiv i64 %27, %29
  %31 = mul nsw i64 %30, 86400
  %32 = sitofp i64 %31 to double
  %33 = srem i64 %27, %29
  %34 = sitofp i64 %33 to double
  %35 = load double, ptr %16, align 8, !tbaa !66
  %36 = tail call double @llvm.fmuladd.f64(double %34, double %35, double %32)
  %37 = tail call noundef double @_ZN4TPCE9CTradeGen26GenerateDelayBetweenTradesEv(ptr noundef nonnull align 8 dereferenceable(7356) %0)
  %38 = fadd double %36, %37
  store double %38, ptr %7, align 8, !tbaa !62
  tail call void @_ZN4TPCE9CTradeGen16GenerateNewTradeEv(ptr noundef nonnull align 8 dereferenceable(7356) %0)
  %39 = load i64, ptr %14, align 8, !tbaa !64
  %40 = tail call noundef zeroext i1 @_ZN4TPCE23CHoldingsAndTradesTable14IsAbortedTradeEx(ptr noundef nonnull align 8 dereferenceable(1840) %17, i64 noundef %39)
  br i1 %40, label %.backedge, label %41

41:                                               ; preds = %.critedge2
  tail call void @_ZNSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(25) %8, ptr noundef nonnull align 8 dereferenceable(97) %18)
  br label %.backedge

.backedge:                                        ; preds = %41, %.critedge2
  %42 = load i64, ptr %2, align 8, !tbaa !5
  %43 = tail call noundef i64 @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  %sext = shl i64 %43, 32
  %44 = ashr exact i64 %sext, 32
  %45 = add nsw i64 %44, %42
  %46 = load i64, ptr %4, align 8, !tbaa !61
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %19, label %._crit_edge, !llvm.loop !67

._crit_edge:                                      ; preds = %.backedge, %21, %.preheader
  %48 = tail call noundef nonnull align 8 dereferenceable(97) ptr @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  %49 = getelementptr inbounds i8, ptr %0, i64 6256
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(97) %49, ptr noundef nonnull align 8 dereferenceable(97) %48, i64 97, i1 false), !tbaa.struct !69
  tail call void @_ZNSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  tail call void @_ZN4TPCE9CTradeGen14UpdateHoldingsEv(ptr noundef nonnull align 8 dereferenceable(7356) %0)
  tail call void @_ZN4TPCE9CTradeGen21GenerateCompleteTradeEv(ptr noundef nonnull align 8 dereferenceable(7356) %0)
  %50 = load i64, ptr %2, align 8, !tbaa !5
  %51 = load i64, ptr %4, align 8, !tbaa !61
  %52 = icmp slt i64 %50, %51
  br i1 %52, label %70, label %.thread

.thread:                                          ; preds = %1, %._crit_edge
  %53 = getelementptr inbounds i8, ptr %0, i64 6248
  %54 = load ptr, ptr %53, align 8, !tbaa !77
  %55 = getelementptr inbounds i8, ptr %0, i64 7320
  %56 = load i32, ptr %55, align 8, !tbaa !78
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %0, i64 7324
  %59 = load i32, ptr %58, align 4, !tbaa !79
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [18 x %"class.std::__cxx11::list"], ptr %54, i64 %57, i64 %60
  %62 = tail call ptr @_ZNSt7__cxx114listIN4TPCE12THoldingInfoESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  %63 = getelementptr inbounds i8, ptr %0, i64 7328
  store ptr %62, ptr %63, align 8, !tbaa !80
  %64 = tail call noundef zeroext i1 @_ZN4TPCE9CTradeGen15FindNextHoldingEv(ptr noundef nonnull align 8 dereferenceable(7356) %0)
  %65 = tail call noundef zeroext i1 @_ZN4TPCE9CTradeGen19FindNextHoldingListEv(ptr noundef nonnull align 8 dereferenceable(7356) %0)
  %66 = getelementptr inbounds i8, ptr %0, i64 6184
  %67 = tail call noundef i64 @_ZNKSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %66)
  %68 = icmp eq i64 %67, 0
  br i1 %68, label %70, label %69

69:                                               ; preds = %.thread
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 344, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4TPCE9CTradeGen17GenerateNextTradeEv) #7
  unreachable

70:                                               ; preds = %.thread, %._crit_edge
  %.047 = phi i1 [ false, %.thread ], [ true, %._crit_edge ]
  ret i1 %.047
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN4TPCE9CTradeGen26GenerateDelayBetweenTradesEv(ptr noundef nonnull align 8 dereferenceable(7356)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE9CTradeGen16GenerateNewTradeEv(ptr noundef nonnull align 8 dereferenceable(7356)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(97)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE9CTradeGen14UpdateHoldingsEv(ptr noundef nonnull align 8 dereferenceable(7356)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE9CTradeGen21GenerateCompleteTradeEv(ptr noundef nonnull align 8 dereferenceable(7356)) local_unnamed_addr #1 align 2

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

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

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

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

attributes #0 = { mustprogress nocallback nofree 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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, !8, i64 6216}
!6 = !{!"_ZTSN4TPCE9CTradeGenE", !7, i64 0, !11, i64 8, !18, i64 424, !19, i64 472, !23, i64 968, !26, i64 1960, !31, i64 3576, !32, i64 5416, !35, i64 5640, !22, i64 5976, !17, i64 6040, !17, i64 6048, !17, i64 6056, !17, i64 6064, !17, i64 6072, !17, i64 6080, !17, i64 6088, !8, i64 6096, !8, i64 6104, !8, i64 6112, !8, i64 6120, !16, i64 6128, !16, i64 6132, !16, i64 6136, !16, i64 6140, !30, i64 6144, !30, i64 6152, !15, i64 6160, !30, i64 6176, !39, i64 6184, !8, i64 6216, !8, i64 6224, !8, i64 6232, !16, i64 6240, !17, i64 6248, !45, i64 6256, !50, i64 6360, !52, i64 6424, !57, i64 7144, !58, i64 7208, !16, i64 7240, !16, i64 7244, !16, i64 7248, !16, i64 7252, !59, i64 7256, !16, i64 7320, !16, i64 7324, !60, i64 7328, !16, i64 7336, !16, i64 7340, !8, i64 7344, !16, i64 7352}
!7 = !{!"_ZTSN4TPCE7CRandomE", !8, i64 0}
!8 = !{!"long long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN4TPCE13CAddressTableE", !12, i64 0, !15, i64 296, !17, i64 312, !17, i64 320, !17, i64 328, !17, i64 336, !8, i64 344, !8, i64 352, !14, i64 360, !14, i64 361, !8, i64 368, !16, i64 376, !8, i64 384, !14, i64 392, !16, i64 396, !8, i64 400, !17, i64 408}
!12 = !{!"_ZTSN4TPCE13TableTemplateINS_11ADDRESS_ROWEEE", !13, i64 8, !8, i64 272, !14, i64 280, !7, i64 288}
!13 = !{!"_ZTSN4TPCE11ADDRESS_ROWE", !8, i64 0, !9, i64 8, !9, i64 89, !9, i64 170, !9, i64 183}
!14 = !{!"bool", !9, i64 0}
!15 = !{!"_ZTSN4TPCE9CDateTimeE", !16, i64 0, !16, i64 4, !17, i64 8}
!16 = !{!"int", !9, i64 0}
!17 = !{!"any pointer", !9, i64 0}
!18 = !{!"_ZTSN4TPCE18CCustomerSelectionE", !17, i64 0, !8, i64 8, !8, i64 16, !14, i64 24, !16, i64 28, !8, i64 32, !8, i64 40}
!19 = !{!"_ZTSN4TPCE14CCustomerTableE", !20, i64 0, !8, i64 328, !22, i64 336, !17, i64 400, !8, i64 408, !8, i64 416, !8, i64 424, !16, i64 432, !17, i64 440, !18, i64 448}
!20 = !{!"_ZTSN4TPCE13TableTemplateINS_12CUSTOMER_ROWEEE", !21, i64 8, !8, i64 304, !14, i64 312, !7, i64 320}
!21 = !{!"_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, !15, 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}
!22 = !{!"_ZTSN4TPCE7CPersonE", !17, i64 0, !17, i64 8, !17, i64 16, !7, i64 24, !14, i64 32, !16, i64 36, !8, i64 40, !17, i64 48, !17, i64 56}
!23 = !{!"_ZTSN4TPCE22CCustomerTaxratesTableE", !24, i64 0, !19, i64 64, !11, i64 560, !17, i64 976, !17, i64 984}
!24 = !{!"_ZTSN4TPCE13TableTemplateINS_21CUSTOMER_TAXRATE_ROWSEEE", !25, i64 8, !8, i64 40, !14, i64 48, !7, i64 56}
!25 = !{!"_ZTSN4TPCE21CUSTOMER_TAXRATE_ROWSE", !9, i64 0}
!26 = !{!"_ZTSN4TPCE36CCustomerAccountsAndPermissionsTableE", !27, i64 0, !17, i64 472, !17, i64 480, !8, i64 488, !8, i64 496, !8, i64 504, !16, i64 512, !16, i64 516, !19, i64 520, !22, i64 1016, !16, i64 1080, !8, i64 1088, !11, i64 1096, !16, i64 1512, !18, i64 1520, !14, i64 1568, !16, i64 1572, !8, i64 1576, !17, i64 1584, !16, i64 1592, !8, i64 1600, !17, i64 1608}
!27 = !{!"_ZTSN4TPCE13TableTemplateINS_35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWEEE", !28, i64 8, !8, i64 448, !14, i64 456, !7, i64 464}
!28 = !{!"_ZTSN4TPCE35CUSTOMER_ACCOUNT_AND_PERMISSION_ROWE", !29, i64 0, !9, i64 88}
!29 = !{!"_ZTSN4TPCE20CUSTOMER_ACCOUNT_ROWE", !8, i64 0, !8, i64 8, !8, i64 16, !9, i64 24, !9, i64 75, !30, i64 80}
!30 = !{!"double", !9, i64 0}
!31 = !{!"_ZTSN4TPCE23CHoldingsAndTradesTableE", !7, i64 0, !26, i64 8, !8, i64 1624, !16, i64 1632, !9, i64 1640, !14, i64 1784, !8, i64 1792, !16, i64 1800, !17, i64 1808, !8, i64 1816, !16, i64 1824, !17, i64 1832}
!32 = !{!"_ZTSN4TPCE13CBrokersTableE", !33, i64 0, !8, i64 112, !8, i64 120, !8, i64 128, !22, i64 136, !17, i64 200, !17, i64 208, !17, i64 216}
!33 = !{!"_ZTSN4TPCE13TableTemplateINS_10BROKER_ROWEEE", !34, i64 8, !8, i64 88, !14, i64 96, !7, i64 104}
!34 = !{!"_ZTSN4TPCE10BROKER_ROWE", !8, i64 0, !9, i64 8, !9, i64 13, !16, i64 64, !30, i64 72}
!35 = !{!"_ZTSN4TPCE14CSecurityTableE", !36, i64 0, !8, i64 264, !8, i64 272, !17, i64 280, !17, i64 288, !15, i64 296, !16, i64 312, !16, i64 316, !16, i64 320, !8, i64 328}
!36 = !{!"_ZTSN4TPCE13TableTemplateINS_12SECURITY_ROWEEE", !37, i64 8, !8, i64 240, !14, i64 248, !7, i64 256}
!37 = !{!"_ZTSN4TPCE12SECURITY_ROWE", !9, i64 0, !9, i64 16, !9, i64 23, !9, i64 28, !9, i64 99, !8, i64 112, !8, i64 120, !15, i64 128, !15, i64 144, !30, i64 160, !38, i64 168, !15, i64 176, !38, i64 192, !15, i64 200, !30, i64 216, !30, i64 224}
!38 = !{!"float", !9, i64 0}
!39 = !{!"_ZTSSt14priority_queueIN4TPCE10TTradeInfoESt6vectorIS1_SaIS1_EESt7greaterIS1_EE", !40, i64 0, !44, i64 24}
!40 = !{!"_ZTSSt6vectorIN4TPCE10TTradeInfoESaIS1_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseIN4TPCE10TTradeInfoESaIS1_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIN4TPCE10TTradeInfoESaIS1_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIN4TPCE10TTradeInfoESaIS1_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!44 = !{!"_ZTSSt7greaterIN4TPCE10TTradeInfoEE"}
!45 = !{!"_ZTSN4TPCE10TTradeInfoE", !8, i64 0, !46, i64 8, !47, i64 12, !30, i64 16, !30, i64 24, !30, i64 32, !8, i64 40, !16, i64 48, !16, i64 52, !48, i64 56, !48, i64 64, !8, i64 72, !49, i64 80, !8, i64 88, !14, i64 96}
!46 = !{!"_ZTSN4TPCE12eTradeTypeIDE", !9, i64 0}
!47 = !{!"_ZTSN4TPCE13eStatusTypeIDE", !9, i64 0}
!48 = !{!"_ZTSN4TPCE6CMoneyE", !8, i64 0}
!49 = !{!"_ZTSN4TPCE13eCustomerTierE", !9, i64 0}
!50 = !{!"_ZTSN4TPCE20TAdditionalTradeInfoE", !48, i64 0, !48, i64 8, !8, i64 16, !51, i64 24, !48, i64 32, !48, i64 40, !48, i64 48, !48, i64 56}
!51 = !{!"_ZTSN4TPCE10eTaxStatusE", !9, i64 0}
!52 = !{!"_ZTSN4TPCE9TTradeRowE", !53, i64 0, !54, i64 168, !9, i64 216, !55, i64 312, !56, i64 392, !9, i64 528}
!53 = !{!"_ZTSN4TPCE9TRADE_ROWE", !8, i64 0, !15, i64 8, !9, i64 24, !9, i64 29, !14, i64 33, !9, i64 34, !16, i64 52, !30, i64 56, !8, i64 64, !9, i64 72, !30, i64 128, !30, i64 136, !30, i64 144, !30, i64 152, !14, i64 160}
!54 = !{!"_ZTSN4TPCE17TRADE_REQUEST_ROWE", !8, i64 0, !9, i64 8, !9, i64 12, !16, i64 28, !30, i64 32, !8, i64 40}
!55 = !{!"_ZTSN4TPCE14SETTLEMENT_ROWE", !8, i64 0, !9, i64 8, !15, i64 56, !30, i64 72}
!56 = !{!"_ZTSN4TPCE20CASH_TRANSACTION_ROWE", !8, i64 0, !15, i64 8, !30, i64 24, !9, i64 32}
!57 = !{!"_ZTSN4TPCE11HOLDING_ROWE", !8, i64 0, !8, i64 8, !9, i64 16, !15, i64 32, !30, i64 48, !16, i64 56}
!58 = !{!"_ZTSN4TPCE19HOLDING_SUMMARY_ROWE", !8, i64 0, !9, i64 8, !16, i64 24}
!59 = !{!"_ZTSN4TPCE12CMEESecurityE", !7, i64 0, !48, i64 8, !48, i64 16, !48, i64 24, !16, i64 32, !16, i64 36, !17, i64 40, !17, i64 48, !30, i64 56}
!60 = !{!"_ZTSSt14_List_iteratorIN4TPCE12THoldingInfoEE", !17, i64 0}
!61 = !{!6, !8, i64 6224}
!62 = !{!6, !30, i64 6176}
!63 = !{!45, !30, i64 32}
!64 = !{!6, !8, i64 6232}
!65 = !{!6, !16, i64 6240}
!66 = !{!6, !30, i64 6144}
!67 = distinct !{!67, !68}
!68 = !{!"llvm.loop.mustprogress"}
!69 = !{i64 0, i64 8, !70, i64 8, i64 4, !71, i64 12, i64 4, !72, i64 16, i64 8, !73, i64 24, i64 8, !73, i64 32, i64 8, !73, i64 40, i64 8, !70, i64 48, i64 4, !74, i64 52, i64 4, !74, i64 56, i64 8, !70, i64 64, i64 8, !70, i64 72, i64 8, !70, i64 80, i64 4, !75, i64 88, i64 8, !70, i64 96, i64 1, !76}
!70 = !{!8, !8, i64 0}
!71 = !{!46, !46, i64 0}
!72 = !{!47, !47, i64 0}
!73 = !{!30, !30, i64 0}
!74 = !{!16, !16, i64 0}
!75 = !{!49, !49, i64 0}
!76 = !{!14, !14, i64 0}
!77 = !{!6, !17, i64 6248}
!78 = !{!6, !16, i64 7320}
!79 = !{!6, !16, i64 7324}
!80 = !{!17, !17, i64 0}


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