; 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::CCompanyTable" = type { %"class.TPCE::TableTemplate.5", ptr, ptr, %"class.TPCE::CPerson", %"class.TPCE::CDateTime", i64, i32, i32, i32, i64, i64, i64 }
%"class.TPCE::TableTemplate.5" = type { ptr, %"struct.TPCE::COMPANY_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::COMPANY_ROW" = type { i64, [5 x i8], [61 x i8], [3 x i8], [5 x i8], [47 x i8], i64, [151 x i8], %"class.TPCE::CDateTime" }
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CPerson" = type { ptr, ptr, ptr, %"class.TPCE::CRandom", i8, i32, i64, ptr, ptr }
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"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.5 = external hidden unnamed_addr constant [28 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 @_ZN4TPCE16CGenerateAndLoad22GenerateAndLoadCompanyEv(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::CCompanyTable", 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 488, 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
  invoke void @_ZN4TPCE13CCompanyTableC2ENS_11CInputFilesExx(ptr noundef nonnull align 8 dereferenceable(488) %4, ptr noundef %5, i64 noundef %16, i64 noundef %18)
          to label %19 unwind label %85

19:                                               ; 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
  %20 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 7
  %21 = load ptr, ptr %20, align 8, !tbaa !21
  %22 = load ptr, ptr %21, align 8, !tbaa !22
  %23 = getelementptr inbounds ptr, ptr %22, i64 9
  %24 = load ptr, ptr %23, align 8
  %25 = invoke noundef ptr %24(ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %26 unwind label %89

26:                                               ; preds = %19
  store ptr %25, ptr %8, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 8
  %28 = load ptr, ptr %27, align 8, !tbaa !24
  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.5, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %29 unwind label %93

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

33:                                               ; preds = %29
  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
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %36 = getelementptr inbounds ptr, ptr %35, i64 2
  %37 = load ptr, ptr %36, align 8
  invoke void %37(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %38 unwind label %89

38:                                               ; preds = %33
  br label %39

39:                                               ; preds = %50, %38
  %40 = invoke noundef zeroext i1 @_ZN4TPCE13CCompanyTable18GenerateNextRecordEv(ptr noundef nonnull align 8 dereferenceable(488) %4)
          to label %41 unwind label %89

41:                                               ; preds = %39
  %42 = zext i1 %40 to i8
  store i8 %42, ptr %3, align 1, !tbaa !25
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = invoke noundef ptr @_ZN4TPCE13TableTemplateINS_11COMPANY_ROWEE6GetRowEv(ptr noundef nonnull align 8 dereferenceable(344) %4)
          to label %45 unwind label %89

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

49:                                               ; preds = %45
  br label %50

50:                                               ; preds = %49
  %51 = load i8, ptr %3, align 1, !tbaa !25, !range !26, !noundef !27
  %52 = trunc i8 %51 to i1
  br i1 %52, label %39, label %53, !llvm.loop !28

53:                                               ; preds = %50
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = load ptr, ptr %54, align 8, !tbaa !22
  %56 = getelementptr inbounds ptr, ptr %55, i64 5
  %57 = load ptr, ptr %56, align 8
  invoke void %57(ptr noundef nonnull align 8 dereferenceable(8) %54)
          to label %58 unwind label %89

58:                                               ; preds = %53
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %65, label %61

61:                                               ; preds = %58
  %62 = load ptr, ptr %59, align 8, !tbaa !22
  %63 = getelementptr inbounds ptr, ptr %62, i64 1
  %64 = load ptr, ptr %63, align 8
  call void %64(ptr noundef nonnull align 8 dereferenceable(8) %59) #5
  br label %65

65:                                               ; preds = %61, %58
  %66 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 8
  %67 = load ptr, ptr %66, align 8, !tbaa !24
  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 %68 unwind label %102

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

72:                                               ; preds = %68
  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
  %73 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 8
  %74 = load ptr, ptr %73, align 8, !tbaa !24
  %75 = load ptr, ptr %74, align 8, !tbaa !22
  %76 = getelementptr inbounds ptr, ptr %75, i64 5
  %77 = load ptr, ptr %76, align 8
  invoke void %77(ptr noundef nonnull align 8 dereferenceable(8) %74)
          to label %78 unwind label %89

78:                                               ; preds = %72
  %79 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %13, i32 0, i32 8
  %80 = load ptr, ptr %79, align 8, !tbaa !24
  %81 = load ptr, ptr %80, align 8, !tbaa !22
  %82 = getelementptr inbounds ptr, ptr %81, i64 5
  %83 = load ptr, ptr %82, align 8
  invoke void %83(ptr noundef nonnull align 8 dereferenceable(8) %80)
          to label %84 unwind label %89

84:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN4TPCE13CCompanyTableD2Ev(ptr noundef nonnull align 8 dereferenceable(488) %4) #5
  call void @llvm.lifetime.end.p0(i64 488, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  ret void

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

89:                                               ; preds = %78, %72, %53, %45, %41, %39, %33, %19
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  br label %111

93:                                               ; preds = %26
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %6, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %7, align 4
  br label %101

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

101:                                              ; preds = %97, %93
  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 %111

102:                                              ; preds = %65
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %6, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %7, align 4
  br label %110

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

110:                                              ; preds = %106, %102
  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 %111

111:                                              ; preds = %110, %101, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @_ZN4TPCE13CCompanyTableD2Ev(ptr noundef nonnull align 8 dereferenceable(488) %4) #5
  br label %112

112:                                              ; preds = %111, %85
  call void @llvm.lifetime.end.p0(i64 488, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  br label %113

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE13CCompanyTableD2Ev(ptr noundef nonnull align 8 dereferenceable(488)) 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, !6, i64 224}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !8, i64 0}
!24 = !{!11, !6, i64 232}
!25 = !{!19, !19, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = distinct !{!28, !29}
!29 = !{!"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::CCompanyTable" = type { %"class.TPCE::TableTemplate.5", ptr, ptr, %"class.TPCE::CPerson", %"class.TPCE::CDateTime", i64, i32, i32, i32, i64, i64, i64 }
%"class.TPCE::TableTemplate.5" = type { ptr, %"struct.TPCE::COMPANY_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::COMPANY_ROW" = type { i64, [5 x i8], [61 x i8], [3 x i8], [5 x i8], [47 x i8], i64, [151 x i8], %"class.TPCE::CDateTime" }
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CPerson" = type { ptr, ptr, ptr, %"class.TPCE::CRandom", i8, i32, i64, ptr, ptr }
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"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.5 = external hidden unnamed_addr constant [28 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 @_ZN4TPCE16CGenerateAndLoad22GenerateAndLoadCompanyEv(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::CCompanyTable", 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 488, 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
  invoke void @_ZN4TPCE13CCompanyTableC2ENS_11CInputFilesExx(ptr noundef nonnull align 8 dereferenceable(488) %2, ptr noundef nonnull %3, i64 noundef %9, i64 noundef %11)
          to label %12 unwind label %61

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

19:                                               ; preds = %12
  %20 = getelementptr inbounds i8, ptr %0, i64 232
  %21 = load ptr, ptr %20, align 8, !tbaa !24
  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.5, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %63

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

26:                                               ; preds = %22
  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
  %27 = load ptr, ptr %18, align 8, !tbaa !22
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %29 = load ptr, ptr %28, align 8
  invoke void %29(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %26, %36
  %30 = invoke noundef zeroext i1 @_ZN4TPCE13CCompanyTable18GenerateNextRecordEv(ptr noundef nonnull align 8 dereferenceable(488) %2)
          to label %31 unwind label %.loopexit

31:                                               ; preds = %.preheader
  %32 = call noundef ptr @_ZN4TPCE13TableTemplateINS_11COMPANY_ROWEE6GetRowEv(ptr noundef nonnull align 8 dereferenceable(344) %2)
  %33 = load ptr, ptr %18, align 8, !tbaa !22
  %34 = getelementptr inbounds i8, ptr %33, i64 24
  %35 = load ptr, ptr %34, align 8
  invoke void %35(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef %32)
          to label %36 unwind label %.loopexit

36:                                               ; preds = %31
  br i1 %30, label %.preheader, label %37, !llvm.loop !25

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

41:                                               ; preds = %37
  %42 = load ptr, ptr %18, align 8, !tbaa !22
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  %44 = load ptr, ptr %43, align 8
  call void %44(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  %45 = load ptr, ptr %20, align 8, !tbaa !24
  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 %46 unwind label %68

46:                                               ; preds = %41
  %47 = load ptr, ptr %45, align 8, !tbaa !22
  %48 = getelementptr inbounds i8, ptr %47, i64 32
  %49 = load ptr, ptr %48, align 8
  invoke void %49(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull %6)
          to label %50 unwind label %70

50:                                               ; preds = %46
  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
  %51 = load ptr, ptr %20, align 8, !tbaa !24
  %52 = load ptr, ptr %51, align 8, !tbaa !22
  %53 = getelementptr inbounds i8, ptr %52, i64 40
  %54 = load ptr, ptr %53, align 8
  invoke void %54(ptr noundef nonnull align 8 dereferenceable(8) %51)
          to label %55 unwind label %.loopexit.split-lp

55:                                               ; preds = %50
  %56 = load ptr, ptr %20, align 8, !tbaa !24
  %57 = load ptr, ptr %56, align 8, !tbaa !22
  %58 = getelementptr inbounds i8, ptr %57, i64 40
  %59 = load ptr, ptr %58, align 8
  invoke void %59(ptr noundef nonnull align 8 dereferenceable(8) %56)
          to label %60 unwind label %.loopexit.split-lp

60:                                               ; preds = %55
  call void @_ZN4TPCE13CCompanyTableD2Ev(ptr noundef nonnull align 8 dereferenceable(488) %2) #5
  call void @llvm.lifetime.end.p0(i64 488, ptr nonnull %2) #5
  ret void

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

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

.loopexit.split-lp:                               ; preds = %12, %26, %37, %50, %55
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %73

63:                                               ; preds = %19
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %67

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

67:                                               ; preds = %65, %63
  %.pn = phi { ptr, i32 } [ %66, %65 ], [ %64, %63 ]
  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 %73

68:                                               ; preds = %41
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %72

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

72:                                               ; preds = %70, %68
  %.pn12 = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  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 %73

73:                                               ; preds = %.loopexit, %.loopexit.split-lp, %72, %67
  %.pn14 = phi { ptr, i32 } [ %.pn12, %72 ], [ %.pn, %67 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN4TPCE13CCompanyTableD2Ev(ptr noundef nonnull align 8 dereferenceable(488) %2) #5
  br label %74

74:                                               ; preds = %73, %61
  %.pn14.pn = phi { ptr, i32 } [ %.pn14, %73 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 488, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn14.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE13CCompanyTableD2Ev(ptr noundef nonnull align 8 dereferenceable(488)) 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, !7, i64 224}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !9, i64 0}
!24 = !{!11, !7, i64 232}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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