; LLVM IR from mitdbg/deneva :: benchmarks/tpcc_query.ll (ZN18TPCCQueryGenerator11gen_paymentEm)

; 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.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%class.TPCCQuery = type { %class.BaseQuery, i32, i64, i64, i64, i64, i64, i64, [16 x i8], double, i8, %class.Array.0, i8, i8, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%class.BaseQuery = type { ptr, i64, %class.Array, %class.Array, %class.Array, %class.Array }
%class.Array = type { ptr, i64, i64 }
%class.Array.0 = type { ptr, i64, i64 }

@g_num_wh = external global i32, align 4
@g_dist_per_wh = external global i32, align 4
@g_cust_per_dist = external global i32, align 4

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

; Function Attrs: nounwind
declare i32 @rand() #1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN18TPCCQueryGenerator11gen_paymentEm(ptr noundef nonnull align 8 dereferenceable(16) %0, i64 noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::set", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %18 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %19 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 320) #9
  invoke void @_ZN9TPCCQueryC2Ev(ptr noundef nonnull align 8 dereferenceable(320) %19)
          to label %20 unwind label %33

20:                                               ; preds = %2
  store ptr %19, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #8
  call void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.TPCCQuery, ptr %21, i32 0, i32 1
  store i32 1, ptr %22, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  br label %23

23:                                               ; preds = %32, %20
  %24 = load i32, ptr @g_num_wh, align 4, !tbaa !19
  %25 = zext i32 %24 to i64
  %26 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %25)
          to label %27 unwind label %37

27:                                               ; preds = %23
  store i64 %26, ptr %9, align 8, !tbaa !9
  %28 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %26)
          to label %29 unwind label %37

29:                                               ; preds = %27
  %30 = load i64, ptr %4, align 8, !tbaa !9
  %31 = icmp ne i64 %28, %30
  br i1 %31, label %32, label %41

32:                                               ; preds = %29
  br label %23, !llvm.loop !21

33:                                               ; preds = %2
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %6, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %19, i64 noundef 320) #10
  br label %208

37:                                               ; preds = %62, %54, %27, %23
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %6, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %7, align 4
  br label %207

41:                                               ; preds = %29
  %42 = load i64, ptr %9, align 8, !tbaa !9
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %class.TPCCQuery, ptr %43, i32 0, i32 2
  store i64 %42, ptr %44, align 8, !tbaa !23
  %45 = load i64, ptr %9, align 8, !tbaa !9
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %class.TPCCQuery, ptr %46, i32 0, i32 5
  store i64 %45, ptr %47, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %class.TPCCQuery, ptr %48, i32 0, i32 2
  %50 = load i64, ptr %49, align 8, !tbaa !23
  %51 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %50)
          to label %52 unwind label %92

52:                                               ; preds = %41
  store i64 %51, ptr %10, align 8, !tbaa !9
  %53 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %54 unwind label %92

54:                                               ; preds = %52
  %55 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %56 = extractvalue { ptr, i8 } %53, 0
  store ptr %56, ptr %55, align 8
  %57 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %58 = extractvalue { ptr, i8 } %53, 1
  store i8 %58, ptr %57, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  %59 = load i32, ptr @g_dist_per_wh, align 4, !tbaa !19
  %60 = zext i32 %59 to i64
  %61 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %60)
          to label %62 unwind label %37

62:                                               ; preds = %54
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %class.TPCCQuery, ptr %63, i32 0, i32 3
  store i64 %61, ptr %64, align 8, !tbaa !25
  %65 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef 5000)
          to label %66 unwind label %37

66:                                               ; preds = %62
  %67 = uitofp i64 %65 to double
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.TPCCQuery, ptr %68, i32 0, i32 9
  store double %67, ptr %69, align 8, !tbaa !26
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %class.TPCCQuery, ptr %70, i32 0, i32 12
  store i8 0, ptr %71, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %72 = call i32 @rand() #8
  %73 = srem i32 %72, 10000
  %74 = sitofp i32 %73 to double
  %75 = fdiv double %74, 1.000000e+04
  store double %75, ptr %12, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %76 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef 100)
          to label %77 unwind label %96

77:                                               ; preds = %66
  %78 = trunc i64 %76 to i32
  store i32 %78, ptr %13, align 4, !tbaa !19
  %79 = load double, ptr %12, align 8, !tbaa !28
  %80 = fcmp ogt double %79, 1.500000e-01
  br i1 %80, label %81, label %100

81:                                               ; preds = %77
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %class.TPCCQuery, ptr %82, i32 0, i32 3
  %84 = load i64, ptr %83, align 8, !tbaa !25
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %class.TPCCQuery, ptr %85, i32 0, i32 7
  store i64 %84, ptr %86, align 8, !tbaa !29
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.TPCCQuery, ptr %87, i32 0, i32 2
  %89 = load i64, ptr %88, align 8, !tbaa !23
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %class.TPCCQuery, ptr %90, i32 0, i32 6
  store i64 %89, ptr %91, align 8, !tbaa !30
  br label %158

92:                                               ; preds = %52, %41
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %6, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %207

96:                                               ; preds = %180, %171, %165, %161, %127, %122, %110, %100, %66
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %6, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %7, align 4
  br label %206

100:                                              ; preds = %77
  %101 = load i32, ptr @g_dist_per_wh, align 4, !tbaa !19
  %102 = zext i32 %101 to i64
  %103 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %102)
          to label %104 unwind label %96

104:                                              ; preds = %100
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %class.TPCCQuery, ptr %105, i32 0, i32 7
  store i64 %103, ptr %106, align 8, !tbaa !29
  %107 = load i32, ptr @g_num_wh, align 4, !tbaa !19
  %108 = icmp ugt i32 %107, 1
  br i1 %108, label %109, label %151

109:                                              ; preds = %104
  br label %110

110:                                              ; preds = %121, %109
  %111 = load i32, ptr @g_num_wh, align 4, !tbaa !19
  %112 = zext i32 %111 to i64
  %113 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %112)
          to label %114 unwind label %96

114:                                              ; preds = %110
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %class.TPCCQuery, ptr %115, i32 0, i32 6
  store i64 %113, ptr %116, align 8, !tbaa !30
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.TPCCQuery, ptr %117, i32 0, i32 2
  %119 = load i64, ptr %118, align 8, !tbaa !23
  %120 = icmp eq i64 %113, %119
  br i1 %120, label %121, label %122

121:                                              ; preds = %114
  br label %110, !llvm.loop !31

122:                                              ; preds = %114
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %class.TPCCQuery, ptr %123, i32 0, i32 2
  %125 = load i64, ptr %124, align 8, !tbaa !23
  %126 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %125)
          to label %127 unwind label %96

127:                                              ; preds = %122
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %class.TPCCQuery, ptr %128, i32 0, i32 6
  %130 = load i64, ptr %129, align 8, !tbaa !30
  %131 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %130)
          to label %132 unwind label %96

132:                                              ; preds = %127
  %133 = icmp ne i64 %126, %131
  br i1 %133, label %134, label %150

134:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %class.TPCCQuery, ptr %135, i32 0, i32 6
  %137 = load i64, ptr %136, align 8, !tbaa !30
  %138 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %137)
          to label %139 unwind label %146

139:                                              ; preds = %134
  store i64 %138, ptr %14, align 8, !tbaa !9
  %140 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %141 unwind label %146

141:                                              ; preds = %139
  %142 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %143 = extractvalue { ptr, i8 } %140, 0
  store ptr %143, ptr %142, align 8
  %144 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %145 = extractvalue { ptr, i8 } %140, 1
  store i8 %145, ptr %144, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %150

146:                                              ; preds = %139, %134
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %6, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %206

150:                                              ; preds = %141, %132
  br label %157

151:                                              ; preds = %104
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %class.TPCCQuery, ptr %152, i32 0, i32 2
  %154 = load i64, ptr %153, align 8, !tbaa !23
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %class.TPCCQuery, ptr %155, i32 0, i32 6
  store i64 %154, ptr %156, align 8, !tbaa !30
  br label %157

157:                                              ; preds = %151, %150
  br label %158

158:                                              ; preds = %157, %81
  %159 = load i32, ptr %13, align 4, !tbaa !19
  %160 = icmp sle i32 %159, 60
  br i1 %160, label %161, label %171

161:                                              ; preds = %158
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = getelementptr inbounds %class.TPCCQuery, ptr %162, i32 0, i32 10
  store i8 1, ptr %163, align 8, !tbaa !32
  %164 = invoke noundef i64 @_Z6NURandmmm(i64 noundef 255, i64 noundef 0, i64 noundef 999)
          to label %165 unwind label %96

165:                                              ; preds = %161
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds %class.TPCCQuery, ptr %166, i32 0, i32 8
  %168 = getelementptr inbounds [16 x i8], ptr %167, i64 0, i64 0
  %169 = invoke noundef i64 @_Z8LastnamemPc(i64 noundef %164, ptr noundef %168)
          to label %170 unwind label %96

170:                                              ; preds = %165
  br label %180

171:                                              ; preds = %158
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %class.TPCCQuery, ptr %172, i32 0, i32 10
  store i8 0, ptr %173, align 8, !tbaa !32
  %174 = load i32, ptr @g_cust_per_dist, align 4, !tbaa !19
  %175 = zext i32 %174 to i64
  %176 = invoke noundef i64 @_Z6NURandmmm(i64 noundef 1023, i64 noundef 1, i64 noundef %175)
          to label %177 unwind label %96

177:                                              ; preds = %171
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %class.TPCCQuery, ptr %178, i32 0, i32 4
  store i64 %176, ptr %179, align 8, !tbaa !33
  br label %180

180:                                              ; preds = %177, %170
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = getelementptr inbounds %class.BaseQuery, ptr %181, i32 0, i32 2
  %183 = call noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  invoke void @_ZN5ArrayImE4initEm(ptr noundef nonnull align 8 dereferenceable(24) %182, i64 noundef %183)
          to label %184 unwind label %96

184:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %185 = call ptr @_ZNKSt3setImSt4lessImESaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  %186 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %185, ptr %186, align 8
  br label %187

187:                                              ; preds = %198, %184
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %188 = call ptr @_ZNKSt3setImSt4lessImESaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  %189 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %188, ptr %189, align 8
  %190 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br i1 %190, label %192, label %191

191:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %204

192:                                              ; preds = %187
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %class.BaseQuery, ptr %193, i32 0, i32 2
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorImEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  %196 = load i64, ptr %195, align 8, !tbaa !9
  invoke void @_ZN5ArrayImE3addEm(ptr noundef nonnull align 8 dereferenceable(24) %194, i64 noundef %196)
          to label %197 unwind label %200

197:                                              ; preds = %192
  br label %198

198:                                              ; preds = %197
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorImEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  br label %187, !llvm.loop !34

200:                                              ; preds = %192
  %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 @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %206

204:                                              ; preds = %191
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret ptr %205

206:                                              ; preds = %200, %146, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %207

207:                                              ; preds = %206, %92, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #8
  br label %208

208:                                              ; preds = %207, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

declare noundef i64 @_Z10wh_to_partm(i64 noundef) #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9TPCCQueryC2Ev(ptr noundef nonnull align 8 dereferenceable(320)) unnamed_addr #6 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

declare noundef i64 @_Z5URandmm(i64 noundef, i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

declare noundef i64 @_Z8LastnamemPc(i64 noundef, ptr noundef) #4

declare noundef i64 @_Z6NURandmmm(i64 noundef, i64 noundef, i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ArrayImE4initEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !15, i64 112}
!12 = !{!"_ZTS9TPCCQuery", !13, i64 0, !15, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !7, i64 168, !16, i64 184, !17, i64 192, !18, i64 200, !17, i64 224, !17, i64 225, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312}
!13 = !{!"_ZTS9BaseQuery", !10, i64 8, !14, i64 16, !14, i64 40, !14, i64 64, !14, i64 88}
!14 = !{!"_ZTS5ArrayImE", !6, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!"_ZTS11TPCCTxnType", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTS5ArrayIP7Item_noE", !6, i64 0, !10, i64 8, !10, i64 16}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!12, !10, i64 120}
!24 = !{!12, !10, i64 144}
!25 = !{!12, !10, i64 128}
!26 = !{!12, !16, i64 184}
!27 = !{!12, !17, i64 224}
!28 = !{!16, !16, i64 0}
!29 = !{!12, !10, i64 160}
!30 = !{!12, !10, i64 152}
!31 = distinct !{!31, !22}
!32 = !{!12, !17, i64 192}
!33 = !{!12, !10, i64 136}
!34 = distinct !{!34, !22}


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

%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@g_num_wh = external local_unnamed_addr global i32, align 4
@g_dist_per_wh = external local_unnamed_addr global i32, align 4
@g_cust_per_dist = external local_unnamed_addr global i32, align 4

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull ptr @_ZN18TPCCQueryGenerator11gen_paymentEm(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0, i64 noundef %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::set", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = tail call noalias noundef nonnull dereferenceable(320) ptr @_Znwm(i64 noundef 320) #8
  invoke void @_ZN9TPCCQueryC2Ev(ptr noundef nonnull align 8 dereferenceable(320) %8)
          to label %9 unwind label %18

9:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #9
  call void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  %10 = getelementptr inbounds i8, ptr %8, i64 112
  store i32 1, ptr %10, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %17, %9
  %12 = load i32, ptr @g_num_wh, align 4, !tbaa !17
  %13 = zext i32 %12 to i64
  %14 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %13)
          to label %15 unwind label %.loopexit43

15:                                               ; preds = %11
  %16 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %14)
          to label %17 unwind label %.loopexit43

17:                                               ; preds = %15
  %.not = icmp eq i64 %16, %1
  br i1 %.not, label %20, label %11, !llvm.loop !19

18:                                               ; preds = %2
  %19 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %8, i64 noundef 320) #10
  br label %110

.loopexit43:                                      ; preds = %11, %15
  %lpad.loopexit45 = landingpad { ptr, i32 }
          cleanup
  br label %109

.loopexit.split-lp44:                             ; preds = %26, %30
  %lpad.loopexit.split-lp46 = landingpad { ptr, i32 }
          cleanup
  br label %109

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %8, i64 120
  store i64 %14, ptr %21, align 8, !tbaa !21
  %22 = getelementptr inbounds i8, ptr %8, i64 144
  store i64 %14, ptr %22, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %23 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %14)
          to label %24 unwind label %48

24:                                               ; preds = %20
  store i64 %23, ptr %4, align 8, !tbaa !23
  %25 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %26 unwind label %48

26:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  %27 = load i32, ptr @g_dist_per_wh, align 4, !tbaa !17
  %28 = zext i32 %27 to i64
  %29 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %28)
          to label %30 unwind label %.loopexit.split-lp44

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %8, i64 128
  store i64 %29, ptr %31, align 8, !tbaa !24
  %32 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef 5000)
          to label %33 unwind label %.loopexit.split-lp44

33:                                               ; preds = %30
  %34 = uitofp i64 %32 to double
  %35 = getelementptr inbounds i8, ptr %8, i64 184
  store double %34, ptr %35, align 8, !tbaa !25
  %36 = getelementptr inbounds i8, ptr %8, i64 224
  store i8 0, ptr %36, align 8, !tbaa !26
  %37 = call i32 @rand() #9
  %38 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef 100)
          to label %39 unwind label %.loopexit.split-lp

39:                                               ; preds = %33
  %40 = srem i32 %37, 10000
  %41 = sitofp i32 %40 to double
  %42 = fdiv double %41, 1.000000e+04
  %43 = trunc i64 %38 to i32
  %44 = fcmp ogt double %42, 1.500000e-01
  br i1 %44, label %45, label %50

45:                                               ; preds = %39
  %46 = getelementptr inbounds i8, ptr %8, i64 152
  %47 = load <2 x i64>, ptr %21, align 8, !tbaa !23
  store <2 x i64> %47, ptr %46, align 8, !tbaa !23
  br label %83

48:                                               ; preds = %24, %20
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  br label %109

.loopexit:                                        ; preds = %59
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %109

.loopexit.split-lp:                               ; preds = %33, %50, %66, %68, %86, %88, %91, %97
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %109

50:                                               ; preds = %39
  %51 = load i32, ptr @g_dist_per_wh, align 4, !tbaa !17
  %52 = zext i32 %51 to i64
  %53 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %52)
          to label %54 unwind label %.loopexit.split-lp

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %8, i64 160
  store i64 %53, ptr %55, align 8, !tbaa !27
  %56 = load i32, ptr @g_num_wh, align 4, !tbaa !17
  %57 = icmp ugt i32 %56, 1
  br i1 %57, label %.preheader, label %80

.preheader:                                       ; preds = %54
  %58 = getelementptr inbounds i8, ptr %8, i64 152
  br label %59

59:                                               ; preds = %.preheader, %63
  %60 = load i32, ptr @g_num_wh, align 4, !tbaa !17
  %61 = zext i32 %60 to i64
  %62 = invoke noundef i64 @_Z5URandmm(i64 noundef 1, i64 noundef %61)
          to label %63 unwind label %.loopexit

63:                                               ; preds = %59
  store i64 %62, ptr %58, align 8, !tbaa !28
  %64 = load i64, ptr %21, align 8, !tbaa !21
  %65 = icmp eq i64 %62, %64
  br i1 %65, label %59, label %66, !llvm.loop !29

66:                                               ; preds = %63
  %67 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %64)
          to label %68 unwind label %.loopexit.split-lp

68:                                               ; preds = %66
  %69 = load i64, ptr %58, align 8, !tbaa !28
  %70 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %69)
          to label %71 unwind label %.loopexit.split-lp

71:                                               ; preds = %68
  %.not39 = icmp eq i64 %67, %70
  br i1 %.not39, label %83, label %72

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %73 = load i64, ptr %58, align 8, !tbaa !28
  %74 = invoke noundef i64 @_Z10wh_to_partm(i64 noundef %73)
          to label %75 unwind label %78

75:                                               ; preds = %72
  store i64 %74, ptr %5, align 8, !tbaa !23
  %76 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %77 unwind label %78

77:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %83

78:                                               ; preds = %75, %72
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  br label %109

80:                                               ; preds = %54
  %81 = load i64, ptr %21, align 8, !tbaa !21
  %82 = getelementptr inbounds i8, ptr %8, i64 152
  store i64 %81, ptr %82, align 8, !tbaa !28
  br label %83

83:                                               ; preds = %80, %77, %71, %45
  %84 = icmp slt i32 %43, 61
  %85 = getelementptr inbounds i8, ptr %8, i64 192
  br i1 %84, label %86, label %91

86:                                               ; preds = %83
  store i8 1, ptr %85, align 8, !tbaa !30
  %87 = invoke noundef i64 @_Z6NURandmmm(i64 noundef 255, i64 noundef 0, i64 noundef 999)
          to label %88 unwind label %.loopexit.split-lp

88:                                               ; preds = %86
  %89 = getelementptr inbounds i8, ptr %8, i64 168
  %90 = invoke noundef i64 @_Z8LastnamemPc(i64 noundef %87, ptr noundef nonnull %89)
          to label %97 unwind label %.loopexit.split-lp

91:                                               ; preds = %83
  store i8 0, ptr %85, align 8, !tbaa !30
  %92 = load i32, ptr @g_cust_per_dist, align 4, !tbaa !17
  %93 = zext i32 %92 to i64
  %94 = invoke noundef i64 @_Z6NURandmmm(i64 noundef 1023, i64 noundef 1, i64 noundef %93)
          to label %95 unwind label %.loopexit.split-lp

95:                                               ; preds = %91
  %96 = getelementptr inbounds i8, ptr %8, i64 136
  store i64 %94, ptr %96, align 8, !tbaa !31
  br label %97

97:                                               ; preds = %88, %95
  %98 = getelementptr inbounds i8, ptr %8, i64 16
  %99 = call noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  invoke void @_ZN5ArrayImE4initEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %99)
          to label %100 unwind label %.loopexit.split-lp

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %101 = call ptr @_ZNKSt3setImSt4lessImESaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  store ptr %101, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %102 = call ptr @_ZNKSt3setImSt4lessImESaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  store ptr %102, ptr %7, align 8
  %103 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br i1 %103, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #9
  ret ptr %8

.lr.ph:                                           ; preds = %100, %.lr.ph
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorImEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  %105 = load i64, ptr %104, align 8, !tbaa !23
  call void @_ZN5ArrayImE3addEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %105)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorImEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %107 = call ptr @_ZNKSt3setImSt4lessImESaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  store ptr %107, ptr %7, align 8
  %108 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br i1 %108, label %.lr.ph, label %._crit_edge, !llvm.loop !32

109:                                              ; preds = %.loopexit, %.loopexit.split-lp, %.loopexit43, %.loopexit.split-lp44, %78, %48
  %.pn.pn = phi { ptr, i32 } [ %49, %48 ], [ %79, %78 ], [ %lpad.loopexit45, %.loopexit43 ], [ %lpad.loopexit.split-lp46, %.loopexit.split-lp44 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #9
  br label %110

110:                                              ; preds = %109, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %109 ], [ %19, %18 ]
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setImSt4lessImESaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

declare noundef i64 @_Z10wh_to_partm(i64 noundef) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN9TPCCQueryC2Ev(ptr noundef nonnull align 8 dereferenceable(320)) unnamed_addr #6 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #7

declare noundef i64 @_Z5URandmm(i64 noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

declare noundef i64 @_Z8LastnamemPc(i64 noundef, ptr noundef) local_unnamed_addr #4

declare noundef i64 @_Z6NURandmmm(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ArrayImE4initEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5ArrayImE3addEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { builtin 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, !13, i64 112}
!6 = !{!"_ZTS9TPCCQuery", !7, i64 0, !13, i64 112, !8, i64 120, !8, i64 128, !8, i64 136, !8, i64 144, !8, i64 152, !8, i64 160, !9, i64 168, !14, i64 184, !15, i64 192, !16, i64 200, !15, i64 224, !15, i64 225, !8, i64 232, !8, i64 240, !8, i64 248, !8, i64 256, !8, i64 264, !8, i64 272, !8, i64 280, !8, i64 288, !8, i64 296, !8, i64 304, !8, i64 312}
!7 = !{!"_ZTS9BaseQuery", !8, i64 8, !11, i64 16, !11, i64 40, !11, i64 64, !11, i64 88}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTS5ArrayImE", !12, i64 0, !8, i64 8, !8, i64 16}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"_ZTS11TPCCTxnType", !9, i64 0}
!14 = !{!"double", !9, i64 0}
!15 = !{!"bool", !9, i64 0}
!16 = !{!"_ZTS5ArrayIP7Item_noE", !12, i64 0, !8, i64 8, !8, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !9, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !8, i64 120}
!22 = !{!6, !8, i64 144}
!23 = !{!8, !8, i64 0}
!24 = !{!6, !8, i64 128}
!25 = !{!6, !14, i64 184}
!26 = !{!6, !15, i64 224}
!27 = !{!6, !8, i64 160}
!28 = !{!6, !8, i64 152}
!29 = distinct !{!29, !20}
!30 = !{!6, !15, i64 192}
!31 = !{!6, !8, i64 136}
!32 = distinct !{!32, !20}


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