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

; 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::CLastTradeTable" = type { %"class.TPCE::TableTemplate.37", i64, i64, ptr, %"class.TPCE::CDateTime", %"class.TPCE::CMEESecurity", i32, i64 }
%"class.TPCE::TableTemplate.37" = type { ptr, %"struct.TPCE::LAST_TRADE_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::LAST_TRADE_ROW" = type { [16 x i8], %"class.TPCE::CDateTime", double, double, i64 }
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"class.TPCE::CMEESecurity" = type { %"class.TPCE::CRandom", %"class.TPCE::CMoney", %"class.TPCE::CMoney", %"class.TPCE::CMoney", i32, i32, ptr, ptr, double }
%"class.TPCE::CMoney" = type { i64 }
%"class.TPCE::CInputFiles" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.TPCE::CGenerateAndLoad" = type { %"class.TPCE::CInputFiles", i64, i64, i64, i32, i32, i32, ptr, ptr, [512 x i8], ptr, %"class.TPCE::CLoaderSettings", i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.TPCE::CLoaderSettings" = type { %"class.TPCE::CParametersWithDefaults" }
%"class.TPCE::CParametersWithDefaults" = type { ptr, %"struct.TPCE::TLoaderSettings", %"struct.TPCE::TLoaderSettingsState", %"struct.TPCE::TLoaderSettings" }
%"struct.TPCE::TLoaderSettingsState" = type { i8, i8, i8, i8, i8, i8 }
%"struct.TPCE::TLoaderSettings" = type { i64, i64, i32, i32, i64, i64 }

@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [31 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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
define dso_local void @_ZN4TPCE16CGenerateAndLoad24GenerateAndLoadLastTradeEv(ptr noundef nonnull align 8 dereferenceable(1040) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca %"class.TPCE::CLastTradeTable", align 8
  %5 = alloca %"class.TPCE::CInputFiles", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %4) #5
  %14 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %14, i64 184, i1 false), !tbaa.struct !9
  %15 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 2
  %16 = load i64, ptr %15, align 8, !tbaa !10
  %17 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 1
  %18 = load i64, ptr %17, align 8, !tbaa !20
  %19 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 6
  %20 = load i32, ptr %19, align 8, !tbaa !21
  invoke void @_ZN4TPCE15CLastTradeTableC2ENS_11CInputFilesExxi(ptr noundef nonnull align 8 dereferenceable(208) %4, ptr noundef %5, i64 noundef %16, i64 noundef %18, i32 noundef %20)
          to label %21 unwind label %87

21:                                               ; preds = %1
  call void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %22 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 7
  %23 = load ptr, ptr %22, align 8, !tbaa !22
  %24 = load ptr, ptr %23, align 8, !tbaa !23
  %25 = getelementptr inbounds ptr, ptr %24, i64 20
  %26 = load ptr, ptr %25, align 8
  %27 = invoke noundef ptr %26(ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %28 unwind label %91

28:                                               ; preds = %21
  store ptr %27, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 8
  %30 = load ptr, ptr %29, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %31 unwind label %95

31:                                               ; preds = %28
  %32 = load ptr, ptr %30, align 8, !tbaa !23
  %33 = getelementptr inbounds ptr, ptr %32, i64 2
  %34 = load ptr, ptr %33, align 8
  invoke void %34(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef %9)
          to label %35 unwind label %99

35:                                               ; preds = %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  %38 = getelementptr inbounds ptr, ptr %37, i64 2
  %39 = load ptr, ptr %38, align 8
  invoke void %39(ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %40 unwind label %91

40:                                               ; preds = %35
  br label %41

41:                                               ; preds = %52, %40
  %42 = invoke noundef zeroext i1 @_ZN4TPCE15CLastTradeTable18GenerateNextRecordEv(ptr noundef nonnull align 8 dereferenceable(208) %4)
          to label %43 unwind label %91

43:                                               ; preds = %41
  %44 = zext i1 %42 to i8
  store i8 %44, ptr %3, align 1, !tbaa !26
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = invoke noundef ptr @_ZN4TPCE13TableTemplateINS_14LAST_TRADE_ROWEE6GetRowEv(ptr noundef nonnull align 8 dereferenceable(88) %4)
          to label %47 unwind label %91

47:                                               ; preds = %43
  %48 = load ptr, ptr %45, align 8, !tbaa !23
  %49 = getelementptr inbounds ptr, ptr %48, i64 3
  %50 = load ptr, ptr %49, align 8
  invoke void %50(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef %46)
          to label %51 unwind label %91

51:                                               ; preds = %47
  br label %52

52:                                               ; preds = %51
  %53 = load i8, ptr %3, align 1, !tbaa !26, !range !27, !noundef !28
  %54 = trunc i8 %53 to i1
  br i1 %54, label %41, label %55, !llvm.loop !29

55:                                               ; preds = %52
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load ptr, ptr %56, align 8, !tbaa !23
  %58 = getelementptr inbounds ptr, ptr %57, i64 5
  %59 = load ptr, ptr %58, align 8
  invoke void %59(ptr noundef nonnull align 8 dereferenceable(8) %56)
          to label %60 unwind label %91

60:                                               ; preds = %55
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %67, label %63

63:                                               ; preds = %60
  %64 = load ptr, ptr %61, align 8, !tbaa !23
  %65 = getelementptr inbounds ptr, ptr %64, i64 1
  %66 = load ptr, ptr %65, align 8
  call void %66(ptr noundef nonnull align 8 dereferenceable(8) %61) #5
  br label %67

67:                                               ; preds = %63, %60
  %68 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 8
  %69 = load ptr, ptr %68, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %70 unwind label %104

70:                                               ; preds = %67
  %71 = load ptr, ptr %69, align 8, !tbaa !23
  %72 = getelementptr inbounds ptr, ptr %71, i64 4
  %73 = load ptr, ptr %72, align 8
  invoke void %73(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef %11)
          to label %74 unwind label %108

74:                                               ; preds = %70
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  %75 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 8
  %76 = load ptr, ptr %75, align 8, !tbaa !25
  %77 = load ptr, ptr %76, align 8, !tbaa !23
  %78 = getelementptr inbounds ptr, ptr %77, i64 5
  %79 = load ptr, ptr %78, align 8
  invoke void %79(ptr noundef nonnull align 8 dereferenceable(8) %76)
          to label %80 unwind label %91

80:                                               ; preds = %74
  %81 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 8
  %82 = load ptr, ptr %81, align 8, !tbaa !25
  %83 = load ptr, ptr %82, align 8, !tbaa !23
  %84 = getelementptr inbounds ptr, ptr %83, i64 5
  %85 = load ptr, ptr %84, align 8
  invoke void %85(ptr noundef nonnull align 8 dereferenceable(8) %82)
          to label %86 unwind label %91

86:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN4TPCE15CLastTradeTableD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %4) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  ret void

87:                                               ; preds = %1
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %6, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %7, align 4
  call void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %5) #5
  br label %114

91:                                               ; preds = %80, %74, %55, %47, %43, %41, %35, %21
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %6, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %7, align 4
  br label %113

95:                                               ; preds = %28
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %6, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %7, align 4
  br label %103

99:                                               ; preds = %31
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %6, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %103

103:                                              ; preds = %99, %95
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  br label %113

104:                                              ; preds = %67
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %6, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %7, align 4
  br label %112

108:                                              ; preds = %70
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %6, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %112

112:                                              ; preds = %108, %104
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %113

113:                                              ; preds = %112, %103, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN4TPCE15CLastTradeTableD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %4) #5
  br label %114

114:                                              ; preds = %113, %87
  call void @llvm.lifetime.end.p0(i64 208, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  br label %115

115:                                              ; preds = %114
  %116 = load ptr, ptr %6, align 8
  %117 = load i32, ptr %7, align 4
  %118 = insertvalue { ptr, i32 } poison, ptr %116, 0
  %119 = insertvalue { ptr, i32 } %118, i32 %117, 1
  resume { ptr, i32 } %119
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE15CLastTradeTableC2ENS_11CInputFilesExxi(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef, i64 noundef, i64 noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4TPCE15CLastTradeTable18GenerateNextRecordEv(ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4TPCE13TableTemplateINS_14LAST_TRADE_ROWEE6GetRowEv(ptr noundef nonnull align 8 dereferenceable(88)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE15CLastTradeTableD2Ev(ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #4 align 2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint 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 = { 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 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5, i64 40, i64 8, !5, i64 48, i64 8, !5, i64 56, i64 8, !5, i64 64, i64 8, !5, i64 72, i64 8, !5, i64 80, i64 8, !5, i64 88, i64 8, !5, i64 96, i64 8, !5, i64 104, i64 8, !5, i64 112, i64 8, !5, i64 120, i64 8, !5, i64 128, i64 8, !5, i64 136, i64 8, !5, i64 144, i64 8, !5, i64 152, i64 8, !5, i64 160, i64 8, !5, i64 168, i64 8, !5, i64 176, i64 8, !5}
!10 = !{!11, !13, i64 192}
!11 = !{!"_ZTSN4TPCE16CGenerateAndLoadE", !12, i64 0, !13, i64 184, !13, i64 192, !13, i64 200, !14, i64 208, !14, i64 212, !14, i64 216, !6, i64 224, !6, i64 232, !7, i64 240, !6, i64 752, !15, i64 760, !19, i64 856, !6, i64 864, !6, i64 872, !6, i64 880, !6, i64 888, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !6, i64 984, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032}
!12 = !{!"_ZTSN4TPCE11CInputFilesE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN4TPCE15CLoaderSettingsE", !16, i64 0}
!16 = !{!"_ZTSN4TPCE23CParametersWithDefaultsINS_15TLoaderSettingsENS_20TLoaderSettingsStateEEE", !17, i64 8, !18, i64 48, !17, i64 56}
!17 = !{!"_ZTSN4TPCE15TLoaderSettingsE", !13, i64 0, !13, i64 8, !14, i64 16, !14, i64 20, !13, i64 24, !13, i64 32}
!18 = !{!"_ZTSN4TPCE20TLoaderSettingsStateE", !19, i64 0, !19, i64 1, !19, i64 2, !19, i64 3, !19, i64 4, !19, i64 5}
!19 = !{!"bool", !7, i64 0}
!20 = !{!11, !13, i64 184}
!21 = !{!11, !14, i64 216}
!22 = !{!11, !6, i64 224}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = !{!11, !6, i64 232}
!26 = !{!19, !19, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; 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::CLastTradeTable" = type { %"class.TPCE::TableTemplate.37", i64, i64, ptr, %"class.TPCE::CDateTime", %"class.TPCE::CMEESecurity", i32, i64 }
%"class.TPCE::TableTemplate.37" = type { ptr, %"struct.TPCE::LAST_TRADE_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::LAST_TRADE_ROW" = type { [16 x i8], %"class.TPCE::CDateTime", double, double, i64 }
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"class.TPCE::CMEESecurity" = type { %"class.TPCE::CRandom", %"class.TPCE::CMoney", %"class.TPCE::CMoney", %"class.TPCE::CMoney", i32, i32, ptr, ptr, double }
%"class.TPCE::CMoney" = type { i64 }
%"class.TPCE::CInputFiles" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [31 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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
define dso_local void @_ZN4TPCE16CGenerateAndLoad24GenerateAndLoadLastTradeEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(1040) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.TPCE::CLastTradeTable", align 8
  %3 = alloca %"class.TPCE::CInputFiles", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(184) %3, ptr noundef nonnull align 8 dereferenceable(184) %0, i64 184, i1 false), !tbaa.struct !5
  %8 = getelementptr inbounds i8, ptr %0, i64 192
  %9 = load i64, ptr %8, align 8, !tbaa !10
  %10 = getelementptr inbounds i8, ptr %0, i64 184
  %11 = load i64, ptr %10, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %0, i64 216
  %13 = load i32, ptr %12, align 8, !tbaa !21
  invoke void @_ZN4TPCE15CLastTradeTableC2ENS_11CInputFilesExxi(ptr noundef nonnull align 8 dereferenceable(208) %2, ptr noundef nonnull %3, i64 noundef %9, i64 noundef %11, i32 noundef %13)
          to label %14 unwind label %63

14:                                               ; preds = %1
  call void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %3) #5
  %15 = getelementptr inbounds i8, ptr %0, i64 224
  %16 = load ptr, ptr %15, align 8, !tbaa !22
  %17 = load ptr, ptr %16, align 8, !tbaa !23
  %18 = getelementptr inbounds i8, ptr %17, i64 160
  %19 = load ptr, ptr %18, align 8
  %20 = invoke noundef ptr %19(ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %21 unwind label %.loopexit.split-lp

21:                                               ; preds = %14
  %22 = getelementptr inbounds i8, ptr %0, i64 232
  %23 = load ptr, ptr %22, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %65

24:                                               ; preds = %21
  %25 = load ptr, ptr %23, align 8, !tbaa !23
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %27 = load ptr, ptr %26, align 8
  invoke void %27(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull %4)
          to label %28 unwind label %67

28:                                               ; preds = %24
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  %29 = load ptr, ptr %20, align 8, !tbaa !23
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = load ptr, ptr %30, align 8
  invoke void %31(ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %28, %38
  %32 = invoke noundef zeroext i1 @_ZN4TPCE15CLastTradeTable18GenerateNextRecordEv(ptr noundef nonnull align 8 dereferenceable(208) %2)
          to label %33 unwind label %.loopexit

33:                                               ; preds = %.preheader
  %34 = call noundef ptr @_ZN4TPCE13TableTemplateINS_14LAST_TRADE_ROWEE6GetRowEv(ptr noundef nonnull align 8 dereferenceable(88) %2)
  %35 = load ptr, ptr %20, align 8, !tbaa !23
  %36 = getelementptr inbounds i8, ptr %35, i64 24
  %37 = load ptr, ptr %36, align 8
  invoke void %37(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef %34)
          to label %38 unwind label %.loopexit

38:                                               ; preds = %33
  br i1 %32, label %.preheader, label %39, !llvm.loop !26

39:                                               ; preds = %38
  %40 = load ptr, ptr %20, align 8, !tbaa !23
  %41 = getelementptr inbounds i8, ptr %40, i64 40
  %42 = load ptr, ptr %41, align 8
  invoke void %42(ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %43 unwind label %.loopexit.split-lp

43:                                               ; preds = %39
  %44 = load ptr, ptr %20, align 8, !tbaa !23
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  %46 = load ptr, ptr %45, align 8
  call void %46(ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  %47 = load ptr, ptr %22, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %48 unwind label %70

48:                                               ; preds = %43
  %49 = load ptr, ptr %47, align 8, !tbaa !23
  %50 = getelementptr inbounds i8, ptr %49, i64 32
  %51 = load ptr, ptr %50, align 8
  invoke void %51(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull %6)
          to label %52 unwind label %72

52:                                               ; preds = %48
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  %53 = load ptr, ptr %22, align 8, !tbaa !25
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = getelementptr inbounds i8, ptr %54, i64 40
  %56 = load ptr, ptr %55, align 8
  invoke void %56(ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %57 unwind label %.loopexit.split-lp

57:                                               ; preds = %52
  %58 = load ptr, ptr %22, align 8, !tbaa !25
  %59 = load ptr, ptr %58, align 8, !tbaa !23
  %60 = getelementptr inbounds i8, ptr %59, i64 40
  %61 = load ptr, ptr %60, align 8
  invoke void %61(ptr noundef nonnull align 8 dereferenceable(8) %58)
          to label %62 unwind label %.loopexit.split-lp

62:                                               ; preds = %57
  call void @_ZN4TPCE15CLastTradeTableD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %2) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %2) #5
  ret void

63:                                               ; preds = %1
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %3) #5
  br label %76

.loopexit:                                        ; preds = %.preheader, %33
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %75

.loopexit.split-lp:                               ; preds = %14, %28, %39, %52, %57
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %75

65:                                               ; preds = %21
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %69

67:                                               ; preds = %24
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %69

69:                                               ; preds = %67, %65
  %.pn = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %75

70:                                               ; preds = %43
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %48
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %74

74:                                               ; preds = %72, %70
  %.pn12 = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  br label %75

75:                                               ; preds = %.loopexit, %.loopexit.split-lp, %74, %69
  %.pn14 = phi { ptr, i32 } [ %.pn12, %74 ], [ %.pn, %69 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN4TPCE15CLastTradeTableD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %2) #5
  br label %76

76:                                               ; preds = %75, %63
  %.pn14.pn = phi { ptr, i32 } [ %.pn14, %75 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn14.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4TPCE15CLastTradeTableC2ENS_11CInputFilesExxi(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef, i64 noundef, i64 noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4TPCE15CLastTradeTable18GenerateNextRecordEv(ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE15CLastTradeTableD2Ev(ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint 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 = { 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 = !{i64 0, i64 8, !6, i64 8, i64 8, !6, i64 16, i64 8, !6, i64 24, i64 8, !6, i64 32, i64 8, !6, i64 40, i64 8, !6, i64 48, i64 8, !6, i64 56, i64 8, !6, i64 64, i64 8, !6, i64 72, i64 8, !6, i64 80, i64 8, !6, i64 88, i64 8, !6, i64 96, i64 8, !6, i64 104, i64 8, !6, i64 112, i64 8, !6, i64 120, i64 8, !6, i64 128, i64 8, !6, i64 136, i64 8, !6, i64 144, i64 8, !6, i64 152, i64 8, !6, i64 160, i64 8, !6, i64 168, i64 8, !6, i64 176, i64 8, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !13, i64 192}
!11 = !{!"_ZTSN4TPCE16CGenerateAndLoadE", !12, i64 0, !13, i64 184, !13, i64 192, !13, i64 200, !14, i64 208, !14, i64 212, !14, i64 216, !7, i64 224, !7, i64 232, !8, i64 240, !7, i64 752, !15, i64 760, !19, i64 856, !7, i64 864, !7, i64 872, !7, i64 880, !7, i64 888, !7, i64 896, !7, i64 904, !7, i64 912, !7, i64 920, !7, i64 928, !7, i64 936, !7, i64 944, !7, i64 952, !7, i64 960, !7, i64 968, !7, i64 976, !7, i64 984, !7, i64 992, !7, i64 1000, !7, i64 1008, !7, i64 1016, !7, i64 1024, !7, i64 1032}
!12 = !{!"_ZTSN4TPCE11CInputFilesE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!"_ZTSN4TPCE15CLoaderSettingsE", !16, i64 0}
!16 = !{!"_ZTSN4TPCE23CParametersWithDefaultsINS_15TLoaderSettingsENS_20TLoaderSettingsStateEEE", !17, i64 8, !18, i64 48, !17, i64 56}
!17 = !{!"_ZTSN4TPCE15TLoaderSettingsE", !13, i64 0, !13, i64 8, !14, i64 16, !14, i64 20, !13, i64 24, !13, i64 32}
!18 = !{!"_ZTSN4TPCE20TLoaderSettingsStateE", !19, i64 0, !19, i64 1, !19, i64 2, !19, i64 3, !19, i64 4, !19, i64 5}
!19 = !{!"bool", !8, i64 0}
!20 = !{!11, !13, i64 184}
!21 = !{!11, !14, i64 216}
!22 = !{!11, !7, i64 224}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !9, i64 0}
!25 = !{!11, !7, i64 232}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass