; 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::CCustomerAccountsAndPermissionsTable" = type { %"class.TPCE::TableTemplate.11", ptr, ptr, i64, i64, i64, i32, i32, %"class.TPCE::CCustomerTable", %"class.TPCE::CPerson", i32, i64, %"class.TPCE::CAddressTable", i32, %"class.TPCE::CCustomerSelection", i8, i32, i64, ptr, i32, i64, ptr }
%"class.TPCE::TableTemplate.11" = type { ptr, %"struct.TPCE::CUSTOMER_ACCOUNT_AND_PERMISSION_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::CUSTOMER_ACCOUNT_AND_PERMISSION_ROW" = type { %"struct.TPCE::CUSTOMER_ACCOUNT_ROW", [4 x %"struct.TPCE::ACCOUNT_PERMISSION_ROW"] }
%"struct.TPCE::CUSTOMER_ACCOUNT_ROW" = type { i64, i64, i64, [51 x i8], i8, double }
%"struct.TPCE::ACCOUNT_PERMISSION_ROW" = type { i64, [5 x i8], [21 x i8], [26 x i8], [21 x i8] }
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CCustomerTable" = type { %"class.TPCE::TableTemplate.9", i64, %"class.TPCE::CPerson", ptr, i64, i64, i64, i32, ptr, %"class.TPCE::CCustomerSelection" }
%"class.TPCE::TableTemplate.9" = type { ptr, %"struct.TPCE::CUSTOMER_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::CUSTOMER_ROW" = type <{ i64, [21 x i8], [5 x i8], [26 x i8], [21 x i8], [2 x i8], i8, i8, [3 x i8], %"class.TPCE::CDateTime", i64, [4 x i8], [4 x i8], [11 x i8], [6 x i8], [4 x i8], [4 x i8], [11 x i8], [6 x i8], [4 x i8], [4 x i8], [11 x i8], [6 x i8], [51 x i8], [51 x i8], [7 x i8] }>
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"class.TPCE::CPerson" = type { ptr, ptr, ptr, %"class.TPCE::CRandom", i8, i32, i64, ptr, ptr }
%"class.TPCE::CAddressTable" = type { %"class.TPCE::TableTemplate", %"class.TPCE::CDateTime", ptr, ptr, ptr, ptr, i64, i64, i8, i8, i64, i32, i64, i8, i32, i64, ptr }
%"class.TPCE::TableTemplate" = type { ptr, %"struct.TPCE::ADDRESS_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::ADDRESS_ROW" = type { i64, [81 x i8], [81 x i8], [13 x i8], [81 x i8] }
%"class.TPCE::CCustomerSelection" = type { ptr, i64, i64, i8, i32, i64, i64 }
%"class.TPCE::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.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [66 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 @_ZN4TPCE16CGenerateAndLoad50GenerateAndLoadCustomerAccountAndAccountPermissionEv(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::CCustomerAccountsAndPermissionsTable", 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 ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 1616, ptr %4) #4
  %19 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %19, i64 184, i1 false), !tbaa.struct !9
  %20 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 4
  %21 = load i32, ptr %20, align 8, !tbaa !10
  %22 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 2
  %23 = load i64, ptr %22, align 8, !tbaa !20
  %24 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 1
  %25 = load i64, ptr %24, align 8, !tbaa !21
  invoke void @_ZN4TPCE36CCustomerAccountsAndPermissionsTableC2ENS_11CInputFilesEjxxb(ptr noundef nonnull align 8 dereferenceable(1616) %4, ptr noundef %5, i32 noundef %21, i64 noundef %23, i64 noundef %25, i1 noundef zeroext false)
          to label %26 unwind label %86

26:                                               ; preds = %1
  call void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %27 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 7
  %28 = load ptr, ptr %27, align 8, !tbaa !22
  %29 = load ptr, ptr %28, align 8, !tbaa !23
  %30 = getelementptr inbounds ptr, ptr %29, i64 10
  %31 = load ptr, ptr %30, align 8
  %32 = invoke noundef ptr %31(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %33 unwind label %90

33:                                               ; preds = %26
  store ptr %32, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %34 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 7
  %35 = load ptr, ptr %34, align 8, !tbaa !22
  %36 = load ptr, ptr %35, align 8, !tbaa !23
  %37 = getelementptr inbounds ptr, ptr %36, i64 2
  %38 = load ptr, ptr %37, align 8
  %39 = invoke noundef ptr %38(ptr noundef nonnull align 8 dereferenceable(8) %35)
          to label %40 unwind label %94

40:                                               ; preds = %33
  store ptr %39, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %41 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 8
  %42 = load ptr, ptr %41, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %43 unwind label %98

43:                                               ; preds = %40
  %44 = load ptr, ptr %42, align 8, !tbaa !23
  %45 = getelementptr inbounds ptr, ptr %44, i64 2
  %46 = load ptr, ptr %45, align 8
  invoke void %46(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef %12)
          to label %47 unwind label %102

47:                                               ; preds = %43
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  %50 = getelementptr inbounds ptr, ptr %49, i64 2
  %51 = load ptr, ptr %50, align 8
  invoke void %51(ptr noundef nonnull align 8 dereferenceable(8) %48)
          to label %52 unwind label %107

52:                                               ; preds = %47
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = getelementptr inbounds ptr, ptr %54, i64 2
  %56 = load ptr, ptr %55, align 8
  invoke void %56(ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %57 unwind label %107

57:                                               ; preds = %52
  br label %58

58:                                               ; preds = %149, %57
  %59 = invoke noundef zeroext i1 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable18GenerateNextRecordEv(ptr noundef nonnull align 8 dereferenceable(1616) %4)
          to label %60 unwind label %107

60:                                               ; preds = %58
  %61 = zext i1 %59 to i8
  store i8 %61, ptr %3, align 1, !tbaa !27
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = invoke noundef ptr @_ZN4TPCE36CCustomerAccountsAndPermissionsTable8GetCARowEv(ptr noundef nonnull align 8 dereferenceable(1616) %4)
          to label %64 unwind label %107

64:                                               ; preds = %60
  %65 = load ptr, ptr %62, align 8, !tbaa !23
  %66 = getelementptr inbounds ptr, ptr %65, i64 3
  %67 = load ptr, ptr %66, align 8
  invoke void %67(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef %63)
          to label %68 unwind label %107

68:                                               ; preds = %64
  store i32 0, ptr %11, align 4, !tbaa !28
  br label %69

69:                                               ; preds = %83, %68
  %70 = load i32, ptr %11, align 4, !tbaa !28
  %71 = invoke noundef i32 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable15GetCAPermsCountEv(ptr noundef nonnull align 8 dereferenceable(1616) %4)
          to label %72 unwind label %107

72:                                               ; preds = %69
  %73 = icmp ult i32 %70, %71
  br i1 %73, label %74, label %111

74:                                               ; preds = %72
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load i32, ptr %11, align 4, !tbaa !28
  %77 = invoke noundef ptr @_ZN4TPCE36CCustomerAccountsAndPermissionsTable8GetAPRowEj(ptr noundef nonnull align 8 dereferenceable(1616) %4, i32 noundef %76)
          to label %78 unwind label %107

78:                                               ; preds = %74
  %79 = load ptr, ptr %75, align 8, !tbaa !23
  %80 = getelementptr inbounds ptr, ptr %79, i64 3
  %81 = load ptr, ptr %80, align 8
  invoke void %81(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef %77)
          to label %82 unwind label %107

82:                                               ; preds = %78
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %11, align 4, !tbaa !28
  %85 = add i32 %84, 1
  store i32 %85, ptr %11, align 4, !tbaa !28
  br label %69, !llvm.loop !29

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

90:                                               ; preds = %26
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %6, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %7, align 4
  br label %207

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

98:                                               ; preds = %40
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %6, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %7, align 4
  br label %106

102:                                              ; preds = %43
  %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
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %106

106:                                              ; preds = %102, %98
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  br label %205

107:                                              ; preds = %189, %183, %157, %152, %142, %137, %78, %74, %69, %64, %60, %58, %52, %47
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %6, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %7, align 4
  br label %205

111:                                              ; preds = %72
  %112 = load i64, ptr %10, align 8, !tbaa !25
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %10, align 8, !tbaa !25
  %114 = srem i64 %113, 10000
  %115 = icmp eq i64 %114, 0
  br i1 %115, label %116, label %133

116:                                              ; preds = %111
  %117 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 8
  %118 = load ptr, ptr %117, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %119 unwind label %124

119:                                              ; preds = %116
  %120 = load ptr, ptr %118, align 8, !tbaa !23
  %121 = getelementptr inbounds ptr, ptr %120, i64 3
  %122 = load ptr, ptr %121, align 8
  invoke void %122(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef %14)
          to label %123 unwind label %128

123:                                              ; preds = %119
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %133

124:                                              ; preds = %116
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %6, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %7, align 4
  br label %132

128:                                              ; preds = %119
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %6, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br label %132

132:                                              ; preds = %128, %124
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %205

133:                                              ; preds = %123, %111
  %134 = load i64, ptr %10, align 8, !tbaa !25
  %135 = srem i64 %134, 10000
  %136 = icmp eq i64 %135, 0
  br i1 %136, label %137, label %148

137:                                              ; preds = %133
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = load ptr, ptr %138, align 8, !tbaa !23
  %140 = getelementptr inbounds ptr, ptr %139, i64 4
  %141 = load ptr, ptr %140, align 8
  invoke void %141(ptr noundef nonnull align 8 dereferenceable(8) %138)
          to label %142 unwind label %107

142:                                              ; preds = %137
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = load ptr, ptr %143, align 8, !tbaa !23
  %145 = getelementptr inbounds ptr, ptr %144, i64 4
  %146 = load ptr, ptr %145, align 8
  invoke void %146(ptr noundef nonnull align 8 dereferenceable(8) %143)
          to label %147 unwind label %107

147:                                              ; preds = %142
  br label %148

148:                                              ; preds = %147, %133
  br label %149

149:                                              ; preds = %148
  %150 = load i8, ptr %3, align 1, !tbaa !27, !range !31, !noundef !32
  %151 = trunc i8 %150 to i1
  br i1 %151, label %58, label %152, !llvm.loop !33

152:                                              ; preds = %149
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = load ptr, ptr %153, align 8, !tbaa !23
  %155 = getelementptr inbounds ptr, ptr %154, i64 5
  %156 = load ptr, ptr %155, align 8
  invoke void %156(ptr noundef nonnull align 8 dereferenceable(8) %153)
          to label %157 unwind label %107

157:                                              ; preds = %152
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = load ptr, ptr %158, align 8, !tbaa !23
  %160 = getelementptr inbounds ptr, ptr %159, i64 5
  %161 = load ptr, ptr %160, align 8
  invoke void %161(ptr noundef nonnull align 8 dereferenceable(8) %158)
          to label %162 unwind label %107

162:                                              ; preds = %157
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = icmp eq ptr %163, null
  br i1 %164, label %169, label %165

165:                                              ; preds = %162
  %166 = load ptr, ptr %163, align 8, !tbaa !23
  %167 = getelementptr inbounds ptr, ptr %166, i64 1
  %168 = load ptr, ptr %167, align 8
  call void %168(ptr noundef nonnull align 8 dereferenceable(8) %163) #4
  br label %169

169:                                              ; preds = %165, %162
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = icmp eq ptr %170, null
  br i1 %171, label %176, label %172

172:                                              ; preds = %169
  %173 = load ptr, ptr %170, align 8, !tbaa !23
  %174 = getelementptr inbounds ptr, ptr %173, i64 1
  %175 = load ptr, ptr %174, align 8
  call void %175(ptr noundef nonnull align 8 dereferenceable(8) %170) #4
  br label %176

176:                                              ; preds = %172, %169
  %177 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 8
  %178 = load ptr, ptr %177, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %179 unwind label %196

179:                                              ; preds = %176
  %180 = load ptr, ptr %178, align 8, !tbaa !23
  %181 = getelementptr inbounds ptr, ptr %180, i64 4
  %182 = load ptr, ptr %181, align 8
  invoke void %182(ptr noundef nonnull align 8 dereferenceable(8) %178, ptr noundef %16)
          to label %183 unwind label %200

183:                                              ; preds = %179
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  %184 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 8
  %185 = load ptr, ptr %184, align 8, !tbaa !26
  %186 = load ptr, ptr %185, align 8, !tbaa !23
  %187 = getelementptr inbounds ptr, ptr %186, i64 5
  %188 = load ptr, ptr %187, align 8
  invoke void %188(ptr noundef nonnull align 8 dereferenceable(8) %185)
          to label %189 unwind label %107

189:                                              ; preds = %183
  %190 = getelementptr inbounds %"class.TPCE::CGenerateAndLoad", ptr %18, i32 0, i32 8
  %191 = load ptr, ptr %190, align 8, !tbaa !26
  %192 = load ptr, ptr %191, align 8, !tbaa !23
  %193 = getelementptr inbounds ptr, ptr %192, i64 5
  %194 = load ptr, ptr %193, align 8
  invoke void %194(ptr noundef nonnull align 8 dereferenceable(8) %191)
          to label %195 unwind label %107

195:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @_ZN4TPCE36CCustomerAccountsAndPermissionsTableD2Ev(ptr noundef nonnull align 8 dereferenceable(1616) %4) #4
  call void @llvm.lifetime.end.p0(i64 1616, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  ret void

196:                                              ; preds = %176
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %6, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %7, align 4
  br label %204

200:                                              ; preds = %179
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %6, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %204

204:                                              ; preds = %200, %196
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  br label %205

205:                                              ; preds = %204, %132, %107, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %206

206:                                              ; preds = %205, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %207

207:                                              ; preds = %206, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @_ZN4TPCE36CCustomerAccountsAndPermissionsTableD2Ev(ptr noundef nonnull align 8 dereferenceable(1616) %4) #4
  br label %208

208:                                              ; preds = %207, %86
  call void @llvm.lifetime.end.p0(i64 1616, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %6, align 8
  %211 = load i32, ptr %7, align 4
  %212 = insertvalue { ptr, i32 } poison, ptr %210, 0
  %213 = insertvalue { ptr, i32 } %212, i32 %211, 1
  resume { ptr, i32 } %213
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4TPCE36CCustomerAccountsAndPermissionsTable8GetAPRowEj(ptr noundef nonnull align 8 dereferenceable(1616), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE36CCustomerAccountsAndPermissionsTableD2Ev(ptr noundef nonnull align 8 dereferenceable(1616)) unnamed_addr #1 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 = { 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, !14, i64 208}
!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 192}
!21 = !{!11, !13, i64 184}
!22 = !{!11, !6, i64 224}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = !{!13, !13, i64 0}
!26 = !{!11, !6, i64 232}
!27 = !{!19, !19, i64 0}
!28 = !{!14, !14, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = distinct !{!33, !30}


; 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::CCustomerAccountsAndPermissionsTable" = type { %"class.TPCE::TableTemplate.11", ptr, ptr, i64, i64, i64, i32, i32, %"class.TPCE::CCustomerTable", %"class.TPCE::CPerson", i32, i64, %"class.TPCE::CAddressTable", i32, %"class.TPCE::CCustomerSelection", i8, i32, i64, ptr, i32, i64, ptr }
%"class.TPCE::TableTemplate.11" = type { ptr, %"struct.TPCE::CUSTOMER_ACCOUNT_AND_PERMISSION_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::CUSTOMER_ACCOUNT_AND_PERMISSION_ROW" = type { %"struct.TPCE::CUSTOMER_ACCOUNT_ROW", [4 x %"struct.TPCE::ACCOUNT_PERMISSION_ROW"] }
%"struct.TPCE::CUSTOMER_ACCOUNT_ROW" = type { i64, i64, i64, [51 x i8], i8, double }
%"struct.TPCE::ACCOUNT_PERMISSION_ROW" = type { i64, [5 x i8], [21 x i8], [26 x i8], [21 x i8] }
%"class.TPCE::CRandom" = type { i64 }
%"class.TPCE::CCustomerTable" = type { %"class.TPCE::TableTemplate.9", i64, %"class.TPCE::CPerson", ptr, i64, i64, i64, i32, ptr, %"class.TPCE::CCustomerSelection" }
%"class.TPCE::TableTemplate.9" = type { ptr, %"struct.TPCE::CUSTOMER_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::CUSTOMER_ROW" = type <{ i64, [21 x i8], [5 x i8], [26 x i8], [21 x i8], [2 x i8], i8, i8, [3 x i8], %"class.TPCE::CDateTime", i64, [4 x i8], [4 x i8], [11 x i8], [6 x i8], [4 x i8], [4 x i8], [11 x i8], [6 x i8], [4 x i8], [4 x i8], [11 x i8], [6 x i8], [51 x i8], [51 x i8], [7 x i8] }>
%"class.TPCE::CDateTime" = type { i32, i32, ptr }
%"class.TPCE::CPerson" = type { ptr, ptr, ptr, %"class.TPCE::CRandom", i8, i32, i64, ptr, ptr }
%"class.TPCE::CAddressTable" = type { %"class.TPCE::TableTemplate", %"class.TPCE::CDateTime", ptr, ptr, ptr, ptr, i64, i64, i8, i8, i64, i32, i64, i8, i32, i64, ptr }
%"class.TPCE::TableTemplate" = type { ptr, %"struct.TPCE::ADDRESS_ROW", i64, i8, %"class.TPCE::CRandom" }
%"struct.TPCE::ADDRESS_ROW" = type { i64, [81 x i8], [81 x i8], [13 x i8], [81 x i8] }
%"class.TPCE::CCustomerSelection" = type { ptr, i64, i64, i8, i32, i64, i64 }
%"class.TPCE::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.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [66 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 @_ZN4TPCE16CGenerateAndLoad50GenerateAndLoadCustomerAccountAndAccountPermissionEv(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::CCustomerAccountsAndPermissionsTable", 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
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 1616, ptr nonnull %2) #4
  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
  %10 = getelementptr inbounds i8, ptr %0, i64 208
  %11 = load i32, ptr %10, align 8, !tbaa !10
  %12 = getelementptr inbounds i8, ptr %0, i64 192
  %13 = load i64, ptr %12, align 8, !tbaa !20
  %14 = getelementptr inbounds i8, ptr %0, i64 184
  %15 = load i64, ptr %14, align 8, !tbaa !21
  invoke void @_ZN4TPCE36CCustomerAccountsAndPermissionsTableC2ENS_11CInputFilesEjxxb(ptr noundef nonnull align 8 dereferenceable(1616) %2, ptr noundef nonnull %3, i32 noundef %11, i64 noundef %13, i64 noundef %15, i1 noundef zeroext false)
          to label %16 unwind label %59

16:                                               ; preds = %1
  call void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %3) #4
  %17 = getelementptr inbounds i8, ptr %0, i64 224
  %18 = load ptr, ptr %17, align 8, !tbaa !22
  %19 = load ptr, ptr %18, align 8, !tbaa !23
  %20 = getelementptr inbounds i8, ptr %19, i64 80
  %21 = load ptr, ptr %20, align 8
  %22 = invoke noundef ptr %21(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %23 unwind label %61

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

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

32:                                               ; preds = %29
  %33 = load ptr, ptr %31, align 8, !tbaa !23
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load ptr, ptr %34, align 8
  invoke void %35(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull %4)
          to label %36 unwind label %67

36:                                               ; preds = %32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  %37 = load ptr, ptr %22, align 8, !tbaa !23
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %39 = load ptr, ptr %38, align 8
  invoke void %39(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %40 unwind label %.loopexit.split-lp.loopexit.split-lp

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

.preheader37:                                     ; preds = %40, %.critedge
  %.018 = phi i64 [ %70, %.critedge ], [ 0, %40 ]
  %44 = invoke noundef zeroext i1 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable18GenerateNextRecordEv(ptr noundef nonnull align 8 dereferenceable(1616) %2)
          to label %45 unwind label %.loopexit.split-lp.loopexit

45:                                               ; preds = %.preheader37
  %46 = call noundef ptr @_ZN4TPCE36CCustomerAccountsAndPermissionsTable8GetCARowEv(ptr noundef nonnull align 8 dereferenceable(1616) %2)
  %47 = load ptr, ptr %22, align 8, !tbaa !23
  %48 = getelementptr inbounds i8, ptr %47, i64 24
  %49 = load ptr, ptr %48, align 8
  invoke void %49(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef %46)
          to label %.preheader unwind label %.loopexit.split-lp.loopexit

.preheader:                                       ; preds = %45
  %50 = call noundef i32 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable15GetCAPermsCountEv(ptr noundef nonnull align 8 dereferenceable(1616) %2)
  %.not = icmp eq i32 %50, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %55
  %.041 = phi i32 [ %56, %55 ], [ 0, %.preheader ]
  %51 = call noundef ptr @_ZN4TPCE36CCustomerAccountsAndPermissionsTable8GetAPRowEj(ptr noundef nonnull align 8 dereferenceable(1616) %2, i32 noundef %.041)
  %52 = load ptr, ptr %28, align 8, !tbaa !23
  %53 = getelementptr inbounds i8, ptr %52, i64 24
  %54 = load ptr, ptr %53, align 8
  invoke void %54(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef %51)
          to label %55 unwind label %.loopexit

55:                                               ; preds = %.lr.ph
  %56 = add nuw i32 %.041, 1
  %57 = call noundef i32 @_ZN4TPCE36CCustomerAccountsAndPermissionsTable15GetCAPermsCountEv(ptr noundef nonnull align 8 dereferenceable(1616) %2)
  %58 = icmp ult i32 %56, %57
  br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !26

59:                                               ; preds = %1
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4TPCE11CInputFilesD2Ev(ptr noundef nonnull align 8 dereferenceable(184) %3) #4
  br label %128

61:                                               ; preds = %16
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

63:                                               ; preds = %23
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

67:                                               ; preds = %32
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  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) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  br label %.loopexit.split-lp

.loopexit:                                        ; preds = %.lr.ph
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %88, %84, %45, %.preheader37
  %lpad.loopexit38 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %117, %112, %96, %92, %40, %36
  %lpad.loopexit.split-lp39 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

._crit_edge:                                      ; preds = %55, %.preheader
  %70 = add nuw nsw i64 %.018, 1
  %71 = urem i64 %70, 10000
  %72 = icmp eq i64 %71, 0
  br i1 %72, label %73, label %.critedge

73:                                               ; preds = %._crit_edge
  %74 = load ptr, ptr %30, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %75 unwind label %79

75:                                               ; preds = %73
  %76 = load ptr, ptr %74, align 8, !tbaa !23
  %77 = getelementptr inbounds i8, ptr %76, i64 24
  %78 = load ptr, ptr %77, align 8
  invoke void %78(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull %6)
          to label %84 unwind label %81

79:                                               ; preds = %73
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %83

81:                                               ; preds = %75
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %83

83:                                               ; preds = %81, %79
  %.pn28 = phi { ptr, i32 } [ %82, %81 ], [ %80, %79 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  br label %.loopexit.split-lp

84:                                               ; preds = %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  %85 = load ptr, ptr %22, align 8, !tbaa !23
  %86 = getelementptr inbounds i8, ptr %85, i64 32
  %87 = load ptr, ptr %86, align 8
  invoke void %87(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %88 unwind label %.loopexit.split-lp.loopexit

88:                                               ; preds = %84
  %89 = load ptr, ptr %28, align 8, !tbaa !23
  %90 = getelementptr inbounds i8, ptr %89, i64 32
  %91 = load ptr, ptr %90, align 8
  invoke void %91(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %.critedge unwind label %.loopexit.split-lp.loopexit

.critedge:                                        ; preds = %._crit_edge, %88
  br i1 %44, label %.preheader37, label %92, !llvm.loop !28

92:                                               ; preds = %.critedge
  %93 = load ptr, ptr %22, align 8, !tbaa !23
  %94 = getelementptr inbounds i8, ptr %93, i64 40
  %95 = load ptr, ptr %94, align 8
  invoke void %95(ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %96 unwind label %.loopexit.split-lp.loopexit.split-lp

96:                                               ; preds = %92
  %97 = load ptr, ptr %28, align 8, !tbaa !23
  %98 = getelementptr inbounds i8, ptr %97, i64 40
  %99 = load ptr, ptr %98, align 8
  invoke void %99(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %100 unwind label %.loopexit.split-lp.loopexit.split-lp

100:                                              ; preds = %96
  %101 = load ptr, ptr %22, align 8, !tbaa !23
  %102 = getelementptr inbounds i8, ptr %101, i64 8
  %103 = load ptr, ptr %102, align 8
  call void %103(ptr noundef nonnull align 8 dereferenceable(8) %22) #4
  %104 = load ptr, ptr %28, align 8, !tbaa !23
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  %106 = load ptr, ptr %105, align 8
  call void %106(ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  %107 = load ptr, ptr %30, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %108 unwind label %123

108:                                              ; preds = %100
  %109 = load ptr, ptr %107, align 8, !tbaa !23
  %110 = getelementptr inbounds i8, ptr %109, i64 32
  %111 = load ptr, ptr %110, align 8
  invoke void %111(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull %8)
          to label %112 unwind label %125

112:                                              ; preds = %108
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  %113 = load ptr, ptr %30, align 8, !tbaa !25
  %114 = load ptr, ptr %113, align 8, !tbaa !23
  %115 = getelementptr inbounds i8, ptr %114, i64 40
  %116 = load ptr, ptr %115, align 8
  invoke void %116(ptr noundef nonnull align 8 dereferenceable(8) %113)
          to label %117 unwind label %.loopexit.split-lp.loopexit.split-lp

117:                                              ; preds = %112
  %118 = load ptr, ptr %30, align 8, !tbaa !25
  %119 = load ptr, ptr %118, align 8, !tbaa !23
  %120 = getelementptr inbounds i8, ptr %119, i64 40
  %121 = load ptr, ptr %120, align 8
  invoke void %121(ptr noundef nonnull align 8 dereferenceable(8) %118)
          to label %122 unwind label %.loopexit.split-lp.loopexit.split-lp

122:                                              ; preds = %117
  call void @_ZN4TPCE36CCustomerAccountsAndPermissionsTableD2Ev(ptr noundef nonnull align 8 dereferenceable(1616) %2) #4
  call void @llvm.lifetime.end.p0(i64 1616, ptr nonnull %2) #4
  ret void

123:                                              ; preds = %100
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %127

125:                                              ; preds = %108
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %127

127:                                              ; preds = %125, %123
  %.pn30 = phi { ptr, i32 } [ %126, %125 ], [ %124, %123 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %63, %127, %83, %69, %61
  %.pn32.pn.pn = phi { ptr, i32 } [ %62, %61 ], [ %64, %63 ], [ %.pn30, %127 ], [ %.pn28, %83 ], [ %.pn, %69 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit38, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp39, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN4TPCE36CCustomerAccountsAndPermissionsTableD2Ev(ptr noundef nonnull align 8 dereferenceable(1616) %2) #4
  br label %128

128:                                              ; preds = %.loopexit.split-lp, %59
  %.pn32.pn.pn.pn = phi { ptr, i32 } [ %.pn32.pn.pn, %.loopexit.split-lp ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 1616, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn32.pn.pn.pn
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4TPCE36CCustomerAccountsAndPermissionsTableD2Ev(ptr noundef nonnull align 8 dereferenceable(1616)) unnamed_addr #1 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 = { 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, !14, i64 208}
!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 192}
!21 = !{!11, !13, i64 184}
!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"}
!28 = distinct !{!28, !27}


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