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

; 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::CMoney" = type { i64 }
%"struct.TPCE::TTradeRequest" = type { double, i64, i32, i32, [16 x i8], [4 x i8] }
%"struct.TPCE::TTickerEntry" = type { double, i32, [16 x i8] }
%"class.TPCE::CMEETickerTape" = type { ptr, ptr, %"struct.TPCE::TMarketFeedTxnInput", i32, i32, %"class.TPCE::CRandom", i8, ptr, ptr, %"class.TPCE::CTimerWheel", %"class.std::queue", ptr, ptr }
%"struct.TPCE::TMarketFeedTxnInput" = type { i32, [4 x i8], %"struct.TPCE::TStatusAndTradeType", [4 x i8], [20 x %"struct.TPCE::TTickerEntry"] }
%"struct.TPCE::TStatusAndTradeType" = type { [5 x i8], [4 x i8], [4 x i8], [4 x i8] }
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CTimerWheel" = type <{ %"class.TPCE::CDateTime", %"class.TPCE::CWheelTime", %"class.TPCE::CWheelTime", %"class.TPCE::CWheelTime", %"struct.TPCE::TWheelConfig", [900 x %"class.std::__cxx11::list"], i32, [4 x i8] }>
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"class.TPCE::CWheelTime" = type { ptr, i32, i32 }
%"struct.TPCE::TWheelConfig" = type { i32, i32 }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<TPCE::CTimerWheelTimer<TPCE::TTickerEntry, TPCE::CMEETickerTape> *, std::allocator<TPCE::CTimerWheelTimer<TPCE::TTickerEntry, TPCE::CMEETickerTape> *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<TPCE::CTimerWheelTimer<TPCE::TTickerEntry, TPCE::CMEETickerTape> *, std::allocator<TPCE::CTimerWheelTimer<TPCE::TTickerEntry, TPCE::CMEETickerTape> *>>::_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 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<TPCE::TTickerEntry *, std::allocator<TPCE::TTickerEntry *>>::_Deque_impl" }
%"struct.std::_Deque_base<TPCE::TTickerEntry *, std::allocator<TPCE::TTickerEntry *>>::_Deque_impl" = type { %"struct.std::_Deque_base<TPCE::TTickerEntry *, std::allocator<TPCE::TTickerEntry *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<TPCE::TTickerEntry *, std::allocator<TPCE::TTickerEntry *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TPCE14CMEETickerTape14PostLimitOrderEPNS_13TTradeRequestE(ptr noundef nonnull align 8 dereferenceable(22504) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.TPCE::CMoney", align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca %"class.TPCE::CMoney", align 8
  %12 = alloca { i64, i64 }, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store double -1.000000e+00, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %14 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #7
  store ptr %14, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.TPCE::TTradeRequest", ptr %15, i32 0, i32 5
  %17 = getelementptr inbounds [4 x i8], ptr %16, i64 0, i64 0
  %18 = call noundef i32 @_ZN4TPCE14CMEETickerTape24ConvertTradeTypeIdToEnumEPc(ptr noundef nonnull align 8 dereferenceable(22504) %13, ptr noundef %17)
  store i32 %18, ptr %5, align 4, !tbaa !11
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.TPCE::TTradeRequest", ptr %19, i32 0, i32 0
  %21 = load double, ptr %20, align 8, !tbaa !13
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.TPCE::TTickerEntry", ptr %22, i32 0, i32 0
  store double %21, ptr %23, align 8, !tbaa !18
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.TPCE::TTickerEntry", ptr %24, i32 0, i32 2
  %26 = getelementptr inbounds [16 x i8], ptr %25, i64 0, i64 0
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.TPCE::TTradeRequest", ptr %27, i32 0, i32 4
  %29 = getelementptr inbounds [16 x i8], ptr %28, i64 0, i64 0
  %30 = call ptr @strncpy(ptr noundef %26, ptr noundef %29, i64 noundef 16) #6
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.TPCE::TTickerEntry", ptr %31, i32 0, i32 1
  store i32 375, ptr %32, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %33 = getelementptr inbounds %"class.TPCE::CMEETickerTape", ptr %13, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !21
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.TPCE::TTradeRequest", ptr %35, i32 0, i32 4
  %37 = getelementptr inbounds [16 x i8], ptr %36, i64 0, i64 0
  %38 = call i64 @_ZN4TPCE14CMEEPriceBoard15GetCurrentPriceEPc(ptr noundef nonnull align 8 dereferenceable(88) %34, ptr noundef %37)
  %39 = getelementptr inbounds %"class.TPCE::CMoney", ptr %8, i32 0, i32 0
  store i64 %38, ptr %39, align 8
  %40 = call noundef double @_ZN4TPCE6CMoney12DollarAmountEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  store double %40, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %41 = load i32, ptr %5, align 4, !tbaa !11
  %42 = icmp eq i32 %41, 4
  br i1 %42, label %46, label %43

43:                                               ; preds = %2
  %44 = load i32, ptr %5, align 4, !tbaa !11
  %45 = icmp eq i32 %44, 2
  br i1 %45, label %46, label %52

46:                                               ; preds = %43, %2
  %47 = load double, ptr %6, align 8, !tbaa !9
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.TPCE::TTradeRequest", ptr %48, i32 0, i32 0
  %50 = load double, ptr %49, align 8, !tbaa !13
  %51 = fcmp ole double %47, %50
  br i1 %51, label %61, label %52

52:                                               ; preds = %46, %43
  %53 = load i32, ptr %5, align 4, !tbaa !11
  %54 = icmp eq i32 %53, 3
  br i1 %54, label %55, label %68

55:                                               ; preds = %52
  %56 = load double, ptr %6, align 8, !tbaa !9
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.TPCE::TTradeRequest", ptr %57, i32 0, i32 0
  %59 = load double, ptr %58, align 8, !tbaa !13
  %60 = fcmp oge double %56, %59
  br i1 %60, label %61, label %68

61:                                               ; preds = %55, %46
  %62 = load double, ptr %6, align 8, !tbaa !9
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.TPCE::TTickerEntry", ptr %63, i32 0, i32 0
  store double %62, ptr %64, align 8, !tbaa !18
  %65 = getelementptr inbounds %"class.TPCE::CMEETickerTape", ptr %13, i32 0, i32 9
  %66 = call noundef i32 @_ZN4TPCE11CTimerWheelINS_12TTickerEntryENS_14CMEETickerTapeELi900ELi1000EE20ProcessExpiredTimersEv(ptr noundef nonnull align 8 dereferenceable(21676) %65)
  %67 = getelementptr inbounds %"class.TPCE::CMEETickerTape", ptr %13, i32 0, i32 10
  call void @_ZNSt5queueIPN4TPCE12TTickerEntryESt5dequeIS2_SaIS2_EEE4pushERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %67, ptr noundef nonnull align 8 dereferenceable(8) %7)
  br label %102

68:                                               ; preds = %55, %52
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.TPCE::TTradeRequest", ptr %69, i32 0, i32 0
  %71 = load double, ptr %70, align 8, !tbaa !13
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.TPCE::TTickerEntry", ptr %72, i32 0, i32 0
  store double %71, ptr %73, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %74 = getelementptr inbounds %"class.TPCE::CMEETickerTape", ptr %13, i32 0, i32 12
  %75 = load ptr, ptr %74, align 8, !tbaa !38
  %76 = getelementptr inbounds %"class.TPCE::CMEETickerTape", ptr %13, i32 0, i32 11
  %77 = load ptr, ptr %76, align 8, !tbaa !39
  %78 = call noundef double @_ZN4TPCE9CDateTimemiERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %75, ptr noundef nonnull align 8 dereferenceable(16) %77)
  store double %78, ptr %10, align 8, !tbaa !9
  %79 = getelementptr inbounds %"class.TPCE::CMEETickerTape", ptr %13, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !21
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.TPCE::TTickerEntry", ptr %81, i32 0, i32 2
  %83 = getelementptr inbounds [16 x i8], ptr %82, i64 0, i64 0
  %84 = load double, ptr %10, align 8, !tbaa !9
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.TPCE::TTickerEntry", ptr %85, i32 0, i32 0
  %87 = load double, ptr %86, align 8, !tbaa !18
  call void @_ZN4TPCE6CMoneyC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %11, double noundef %87)
  %88 = load i32, ptr %5, align 4, !tbaa !11
  %89 = getelementptr inbounds %"class.TPCE::CMoney", ptr %11, i32 0, i32 0
  %90 = load i64, ptr %89, align 8
  %91 = call noundef double @_ZN4TPCE14CMEEPriceBoard17GetSubmissionTimeEPcdNS_6CMoneyENS_12eTradeTypeIDE(ptr noundef nonnull align 8 dereferenceable(88) %80, ptr noundef %83, double noundef %84, i64 %90, i32 noundef %88)
  %92 = load double, ptr %10, align 8, !tbaa !9
  %93 = fsub double %91, %92
  store double %93, ptr %9, align 8, !tbaa !9
  %94 = getelementptr inbounds %"class.TPCE::CMEETickerTape", ptr %13, i32 0, i32 9
  %95 = load double, ptr %9, align 8, !tbaa !9
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  store { i64, i64 } { i64 ptrtoint (ptr @_ZN4TPCE14CMEETickerTape15AddLimitTriggerEPNS_12TTickerEntryE to i64), i64 0 }, ptr %12, align 8, !tbaa !40
  %97 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %98 = load i64, ptr %97, align 8
  %99 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %100 = load i64, ptr %99, align 8
  %101 = call noundef i32 @_ZN4TPCE11CTimerWheelINS_12TTickerEntryENS_14CMEETickerTapeELi900ELi1000EE10StartTimerEdPS2_MS2_FvPS1_ES5_(ptr noundef nonnull align 8 dereferenceable(21676) %94, double noundef %95, ptr noundef %13, i64 %98, i64 %100, ptr noundef %96)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %102

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4TPCE14CMEETickerTape24ConvertTradeTypeIdToEnumEPc(ptr noundef nonnull align 8 dereferenceable(22504), ptr noundef) #4 align 2

declare i64 @_ZN4TPCE14CMEEPriceBoard15GetCurrentPriceEPc(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN4TPCE6CMoney12DollarAmountEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4TPCE11CTimerWheelINS_12TTickerEntryENS_14CMEETickerTapeELi900ELi1000EE20ProcessExpiredTimersEv(ptr noundef nonnull align 8 dereferenceable(21676)) #1 align 2

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

declare noundef double @_ZN4TPCE9CDateTimemiERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5

declare noundef double @_ZN4TPCE14CMEEPriceBoard17GetSubmissionTimeEPcdNS_6CMoneyENS_12eTradeTypeIDE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef, double noundef, i64, i32 noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE6CMoneyC2Ed(ptr noundef nonnull align 8 dereferenceable(8), double noundef) unnamed_addr #4 align 2

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

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 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 #5 = { "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 = { builtin allocsize(0) }

!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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN4TPCE12eTradeTypeIDE", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN4TPCE13TTradeRequestE", !10, i64 0, !15, i64 8, !16, i64 16, !17, i64 20, !7, i64 24, !7, i64 40}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN4TPCE22eMEETradeRequestActionE", !7, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSN4TPCE12TTickerEntryE", !10, i64 0, !16, i64 8, !7, i64 12}
!20 = !{!19, !16, i64 8}
!21 = !{!22, !6, i64 8}
!22 = !{!"_ZTSN4TPCE14CMEETickerTapeE", !6, i64 0, !6, i64 8, !23, i64 16, !16, i64 688, !16, i64 692, !25, i64 696, !26, i64 704, !6, i64 712, !6, i64 720, !27, i64 728, !31, i64 22408, !6, i64 22488, !6, i64 22496}
!23 = !{!"_ZTSN4TPCE19TMarketFeedTxnInputE", !16, i64 0, !7, i64 4, !24, i64 8, !7, i64 25, !7, i64 32}
!24 = !{!"_ZTSN4TPCE19TStatusAndTradeTypeE", !7, i64 0, !7, i64 5, !7, i64 9, !7, i64 13}
!25 = !{!"_ZTSN4TPCE7CRandomE", !15, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTSN4TPCE11CTimerWheelINS_12TTickerEntryENS_14CMEETickerTapeELi900ELi1000EEE", !28, i64 0, !29, i64 16, !29, i64 32, !29, i64 48, !30, i64 64, !7, i64 72, !16, i64 21672}
!28 = !{!"_ZTSN4TPCE9CDateTimeE", !16, i64 0, !16, i64 4, !6, i64 8}
!29 = !{!"_ZTSN4TPCE10CWheelTimeE", !6, i64 0, !16, i64 8, !16, i64 12}
!30 = !{!"_ZTSN4TPCE12TWheelConfigE", !16, i64 0, !16, i64 4}
!31 = !{!"_ZTSSt5queueIPN4TPCE12TTickerEntryESt5dequeIS2_SaIS2_EEE", !32, i64 0}
!32 = !{!"_ZTSSt5dequeIPN4TPCE12TTickerEntryESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSSt11_Deque_baseIPN4TPCE12TTickerEntryESaIS2_EE", !34, i64 0}
!34 = !{!"_ZTSNSt11_Deque_baseIPN4TPCE12TTickerEntryESaIS2_EE11_Deque_implE", !35, i64 0}
!35 = !{!"_ZTSNSt11_Deque_baseIPN4TPCE12TTickerEntryESaIS2_EE16_Deque_impl_dataE", !6, i64 0, !36, i64 8, !37, i64 16, !37, i64 48}
!36 = !{!"long", !7, i64 0}
!37 = !{!"_ZTSSt15_Deque_iteratorIPN4TPCE12TTickerEntryERS2_PS2_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!38 = !{!22, !6, i64 22496}
!39 = !{!22, !6, i64 22488}
!40 = !{!7, !7, i64 0}


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

%"class.TPCE::CMoney" = type { i64 }

; 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 #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4TPCE14CMEETickerTape14PostLimitOrderEPNS_13TTradeRequestE(ptr noundef nonnull align 8 dereferenceable(22504) %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca %"class.TPCE::CMoney", align 8
  %5 = alloca %"class.TPCE::CMoney", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %6 = tail call noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #7
  store ptr %6, ptr %3, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 40
  %8 = tail call noundef i32 @_ZN4TPCE14CMEETickerTape24ConvertTradeTypeIdToEnumEPc(ptr noundef nonnull align 8 dereferenceable(22504) %0, ptr noundef nonnull %7)
  %9 = load double, ptr %1, align 8, !tbaa !9
  store double %9, ptr %6, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %6, i64 12
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  %12 = tail call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) %11, i64 noundef 16) #6
  %13 = getelementptr inbounds i8, ptr %6, i64 8
  store i32 375, ptr %13, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !18
  %16 = tail call i64 @_ZN4TPCE14CMEEPriceBoard15GetCurrentPriceEPc(ptr noundef nonnull align 8 dereferenceable(88) %15, ptr noundef nonnull %11)
  store i64 %16, ptr %4, align 8
  %17 = call noundef double @_ZN4TPCE6CMoney12DollarAmountEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  switch i32 %8, label %._crit_edge18 [
    i32 4, label %18
    i32 2, label %18
    i32 3, label %._crit_edge
  ]

._crit_edge18:                                    ; preds = %2
  %.pre19 = load double, ptr %1, align 8, !tbaa !9
  br label %30

._crit_edge:                                      ; preds = %2
  %.pre = load double, ptr %1, align 8, !tbaa !9
  br label %23

18:                                               ; preds = %2, %2
  %19 = load double, ptr %1, align 8, !tbaa !9
  %20 = fcmp ugt double %17, %19
  br i1 %20, label %21, label %26

21:                                               ; preds = %18
  %22 = icmp eq i32 %8, 3
  br i1 %22, label %23, label %30

23:                                               ; preds = %._crit_edge, %21
  %24 = phi double [ %.pre, %._crit_edge ], [ %19, %21 ]
  %25 = fcmp ult double %17, %24
  br i1 %25, label %30, label %26

26:                                               ; preds = %23, %18
  store double %17, ptr %6, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %0, i64 728
  %28 = call noundef i32 @_ZN4TPCE11CTimerWheelINS_12TTickerEntryENS_14CMEETickerTapeELi900ELi1000EE20ProcessExpiredTimersEv(ptr noundef nonnull align 8 dereferenceable(21676) %27)
  %29 = getelementptr inbounds i8, ptr %0, i64 22408
  call void @_ZNSt5queueIPN4TPCE12TTickerEntryESt5dequeIS2_SaIS2_EEE4pushERKS2_(ptr noundef nonnull align 8 dereferenceable(80) %29, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br label %44

30:                                               ; preds = %._crit_edge18, %23, %21
  %31 = phi double [ %.pre19, %._crit_edge18 ], [ %24, %23 ], [ %19, %21 ]
  store double %31, ptr %6, align 8, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %0, i64 22496
  %33 = load ptr, ptr %32, align 8, !tbaa !35
  %34 = getelementptr inbounds i8, ptr %0, i64 22488
  %35 = load ptr, ptr %34, align 8, !tbaa !36
  %36 = call noundef double @_ZN4TPCE9CDateTimemiERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %35)
  %37 = load ptr, ptr %14, align 8, !tbaa !18
  %38 = load double, ptr %6, align 8, !tbaa !15
  call void @_ZN4TPCE6CMoneyC2Ed(ptr noundef nonnull align 8 dereferenceable(8) %5, double noundef %38)
  %39 = load i64, ptr %5, align 8
  %40 = call noundef double @_ZN4TPCE14CMEEPriceBoard17GetSubmissionTimeEPcdNS_6CMoneyENS_12eTradeTypeIDE(ptr noundef nonnull align 8 dereferenceable(88) %37, ptr noundef nonnull %10, double noundef %36, i64 %39, i32 noundef %8)
  %41 = fsub double %40, %36
  %42 = getelementptr inbounds i8, ptr %0, i64 728
  %43 = call noundef i32 @_ZN4TPCE11CTimerWheelINS_12TTickerEntryENS_14CMEETickerTapeELi900ELi1000EE10StartTimerEdPS2_MS2_FvPS1_ES5_(ptr noundef nonnull align 8 dereferenceable(21676) %42, double noundef %41, ptr noundef nonnull %0, i64 ptrtoint (ptr @_ZN4TPCE14CMEETickerTape15AddLimitTriggerEPNS_12TTickerEntryE to i64), i64 0, ptr noundef nonnull %6)
  br label %44

44:                                               ; preds = %30, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret void
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4TPCE14CMEETickerTape24ConvertTradeTypeIdToEnumEPc(ptr noundef nonnull align 8 dereferenceable(22504), ptr noundef) local_unnamed_addr #4 align 2

declare i64 @_ZN4TPCE14CMEEPriceBoard15GetCurrentPriceEPc(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef) local_unnamed_addr #5

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

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

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

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

declare noundef double @_ZN4TPCE9CDateTimemiERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

declare noundef double @_ZN4TPCE14CMEEPriceBoard17GetSubmissionTimeEPcdNS_6CMoneyENS_12eTradeTypeIDE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef, double noundef, i64, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE6CMoneyC2Ed(ptr noundef nonnull align 8 dereferenceable(8), double noundef) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN4TPCE11CTimerWheelINS_12TTickerEntryENS_14CMEETickerTapeELi900ELi1000EE10StartTimerEdPS2_MS2_FvPS1_ES5_(ptr noundef nonnull align 8 dereferenceable(21676), double noundef, ptr noundef, i64, i64, ptr noundef) local_unnamed_addr #1 align 2

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

attributes #0 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 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 #5 = { "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 = { builtin allocsize(0) }

!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, !11, i64 0}
!10 = !{!"_ZTSN4TPCE13TTradeRequestE", !11, i64 0, !12, i64 8, !13, i64 16, !14, i64 20, !7, i64 24, !7, i64 40}
!11 = !{!"double", !7, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN4TPCE22eMEETradeRequestActionE", !7, i64 0}
!15 = !{!16, !11, i64 0}
!16 = !{!"_ZTSN4TPCE12TTickerEntryE", !11, i64 0, !13, i64 8, !7, i64 12}
!17 = !{!16, !13, i64 8}
!18 = !{!19, !6, i64 8}
!19 = !{!"_ZTSN4TPCE14CMEETickerTapeE", !6, i64 0, !6, i64 8, !20, i64 16, !13, i64 688, !13, i64 692, !22, i64 696, !23, i64 704, !6, i64 712, !6, i64 720, !24, i64 728, !28, i64 22408, !6, i64 22488, !6, i64 22496}
!20 = !{!"_ZTSN4TPCE19TMarketFeedTxnInputE", !13, i64 0, !7, i64 4, !21, i64 8, !7, i64 25, !7, i64 32}
!21 = !{!"_ZTSN4TPCE19TStatusAndTradeTypeE", !7, i64 0, !7, i64 5, !7, i64 9, !7, i64 13}
!22 = !{!"_ZTSN4TPCE7CRandomE", !12, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN4TPCE11CTimerWheelINS_12TTickerEntryENS_14CMEETickerTapeELi900ELi1000EEE", !25, i64 0, !26, i64 16, !26, i64 32, !26, i64 48, !27, i64 64, !7, i64 72, !13, i64 21672}
!25 = !{!"_ZTSN4TPCE9CDateTimeE", !13, i64 0, !13, i64 4, !6, i64 8}
!26 = !{!"_ZTSN4TPCE10CWheelTimeE", !6, i64 0, !13, i64 8, !13, i64 12}
!27 = !{!"_ZTSN4TPCE12TWheelConfigE", !13, i64 0, !13, i64 4}
!28 = !{!"_ZTSSt5queueIPN4TPCE12TTickerEntryESt5dequeIS2_SaIS2_EEE", !29, i64 0}
!29 = !{!"_ZTSSt5dequeIPN4TPCE12TTickerEntryESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSSt11_Deque_baseIPN4TPCE12TTickerEntryESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSNSt11_Deque_baseIPN4TPCE12TTickerEntryESaIS2_EE11_Deque_implE", !32, i64 0}
!32 = !{!"_ZTSNSt11_Deque_baseIPN4TPCE12TTickerEntryESaIS2_EE16_Deque_impl_dataE", !6, i64 0, !33, i64 8, !34, i64 16, !34, i64 48}
!33 = !{!"long", !7, i64 0}
!34 = !{!"_ZTSSt15_Deque_iteratorIPN4TPCE12TTickerEntryERS2_PS2_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!35 = !{!19, !6, i64 22496}
!36 = !{!19, !6, i64 22488}


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