; LLVM IR from mitdbg/deneva :: benchmarks/pps_query.ll (ZN8PPSQuery12participantsERPbP8Workload)

; 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.PPSQuery = type { %class.BaseQuery, i32, i64, i64, i64, i64, %class.Array }
%class.BaseQuery = type { ptr, i64, %class.Array, %class.Array, %class.Array, %class.Array }
%class.Array = type { ptr, i64, i64 }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@g_node_cnt = external global i32, align 4
@__PRETTY_FUNCTION__._ZN8PPSQuery12participantsERPbP8Workload = external hidden unnamed_addr constant [53 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

declare noundef i64 @_Z18parts_to_partitionm(i64 noundef) #2

declare noundef i64 @_Z21products_to_partitionm(i64 noundef) #2

declare noundef i64 @_Z22suppliers_to_partitionm(i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN8PPSQuery12participantsERPbP8Workload(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %11

11:                                               ; preds = %22, %3
  %12 = load i64, ptr %8, align 8, !tbaa !11
  %13 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %14 = zext i32 %13 to i64
  %15 = icmp ult i64 %12, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %25

17:                                               ; preds = %11
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = load i64, ptr %8, align 8, !tbaa !11
  %21 = getelementptr inbounds i8, ptr %19, i64 %20
  store i8 0, ptr %21, align 1, !tbaa !13
  br label %22

22:                                               ; preds = %17
  %23 = load i64, ptr %8, align 8, !tbaa !11
  %24 = add i64 %23, 1
  store i64 %24, ptr %8, align 8, !tbaa !11
  br label %11, !llvm.loop !15

25:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %26 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 1
  %27 = load i32, ptr %26, align 8, !tbaa !17
  switch i32 %27, label %214 [
    i32 1, label %28
    i32 3, label %49
    i32 2, label %70
    i32 4, label %91
    i32 5, label %132
    i32 6, label %173
  ]

28:                                               ; preds = %25
  %29 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 3
  %30 = load i64, ptr %29, align 8, !tbaa !22
  %31 = call noundef i64 @_Z18parts_to_partitionm(i64 noundef %30)
  %32 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %33 = zext i32 %32 to i64
  %34 = urem i64 %31, %33
  store i64 %34, ptr %9, align 8, !tbaa !11
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = load i64, ptr %9, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %36, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !13, !range !23, !noundef !24
  %40 = trunc i8 %39 to i1
  br i1 %40, label %48, label %41

41:                                               ; preds = %28
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = load i64, ptr %9, align 8, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %43, i64 %44
  store i8 1, ptr %45, align 1, !tbaa !13
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %7, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %41, %28
  br label %215

49:                                               ; preds = %25
  %50 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 5
  %51 = load i64, ptr %50, align 8, !tbaa !25
  %52 = call noundef i64 @_Z21products_to_partitionm(i64 noundef %51)
  %53 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = urem i64 %52, %54
  store i64 %55, ptr %9, align 8, !tbaa !11
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = load i64, ptr %9, align 8, !tbaa !11
  %59 = getelementptr inbounds i8, ptr %57, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !13, !range !23, !noundef !24
  %61 = trunc i8 %60 to i1
  br i1 %61, label %69, label %62

62:                                               ; preds = %49
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = load i64, ptr %9, align 8, !tbaa !11
  %66 = getelementptr inbounds i8, ptr %64, i64 %65
  store i8 1, ptr %66, align 1, !tbaa !13
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %7, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %62, %49
  br label %215

70:                                               ; preds = %25
  %71 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 4
  %72 = load i64, ptr %71, align 8, !tbaa !26
  %73 = call noundef i64 @_Z22suppliers_to_partitionm(i64 noundef %72)
  %74 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %75 = zext i32 %74 to i64
  %76 = urem i64 %73, %75
  store i64 %76, ptr %9, align 8, !tbaa !11
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = load i64, ptr %9, align 8, !tbaa !11
  %80 = getelementptr inbounds i8, ptr %78, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !13, !range !23, !noundef !24
  %82 = trunc i8 %81 to i1
  br i1 %82, label %90, label %83

83:                                               ; preds = %70
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = load i64, ptr %9, align 8, !tbaa !11
  %87 = getelementptr inbounds i8, ptr %85, i64 %86
  store i8 1, ptr %87, align 1, !tbaa !13
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %7, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %83, %70
  br label %215

91:                                               ; preds = %25
  %92 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 4
  %93 = load i64, ptr %92, align 8, !tbaa !26
  %94 = call noundef i64 @_Z22suppliers_to_partitionm(i64 noundef %93)
  %95 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = urem i64 %94, %96
  store i64 %97, ptr %9, align 8, !tbaa !11
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = load i64, ptr %9, align 8, !tbaa !11
  %101 = getelementptr inbounds i8, ptr %99, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !13, !range !23, !noundef !24
  %103 = trunc i8 %102 to i1
  br i1 %103, label %111, label %104

104:                                              ; preds = %91
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = load i64, ptr %9, align 8, !tbaa !11
  %108 = getelementptr inbounds i8, ptr %106, i64 %107
  store i8 1, ptr %108, align 1, !tbaa !13
  %109 = load i32, ptr %7, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %7, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %104, %91
  %112 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 3
  %113 = load i64, ptr %112, align 8, !tbaa !22
  %114 = call noundef i64 @_Z18parts_to_partitionm(i64 noundef %113)
  %115 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = urem i64 %114, %116
  store i64 %117, ptr %9, align 8, !tbaa !11
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i64, ptr %9, align 8, !tbaa !11
  %121 = getelementptr inbounds i8, ptr %119, i64 %120
  %122 = load i8, ptr %121, align 1, !tbaa !13, !range !23, !noundef !24
  %123 = trunc i8 %122 to i1
  br i1 %123, label %131, label %124

124:                                              ; preds = %111
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = load ptr, ptr %125, align 8, !tbaa !5
  %127 = load i64, ptr %9, align 8, !tbaa !11
  %128 = getelementptr inbounds i8, ptr %126, i64 %127
  store i8 1, ptr %128, align 1, !tbaa !13
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %7, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %124, %111
  br label %215

132:                                              ; preds = %25
  %133 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 5
  %134 = load i64, ptr %133, align 8, !tbaa !25
  %135 = call noundef i64 @_Z21products_to_partitionm(i64 noundef %134)
  %136 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = urem i64 %135, %137
  store i64 %138, ptr %9, align 8, !tbaa !11
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = load i64, ptr %9, align 8, !tbaa !11
  %142 = getelementptr inbounds i8, ptr %140, i64 %141
  %143 = load i8, ptr %142, align 1, !tbaa !13, !range !23, !noundef !24
  %144 = trunc i8 %143 to i1
  br i1 %144, label %152, label %145

145:                                              ; preds = %132
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = load i64, ptr %9, align 8, !tbaa !11
  %149 = getelementptr inbounds i8, ptr %147, i64 %148
  store i8 1, ptr %149, align 1, !tbaa !13
  %150 = load i32, ptr %7, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %7, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %145, %132
  %153 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 3
  %154 = load i64, ptr %153, align 8, !tbaa !22
  %155 = call noundef i64 @_Z18parts_to_partitionm(i64 noundef %154)
  %156 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = urem i64 %155, %157
  store i64 %158, ptr %9, align 8, !tbaa !11
  %159 = load ptr, ptr %5, align 8, !tbaa !5
  %160 = load ptr, ptr %159, align 8, !tbaa !5
  %161 = load i64, ptr %9, align 8, !tbaa !11
  %162 = getelementptr inbounds i8, ptr %160, i64 %161
  %163 = load i8, ptr %162, align 1, !tbaa !13, !range !23, !noundef !24
  %164 = trunc i8 %163 to i1
  br i1 %164, label %172, label %165

165:                                              ; preds = %152
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = load i64, ptr %9, align 8, !tbaa !11
  %169 = getelementptr inbounds i8, ptr %167, i64 %168
  store i8 1, ptr %169, align 1, !tbaa !13
  %170 = load i32, ptr %7, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %7, align 4, !tbaa !9
  br label %172

172:                                              ; preds = %165, %152
  br label %215

173:                                              ; preds = %25
  %174 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 5
  %175 = load i64, ptr %174, align 8, !tbaa !25
  %176 = call noundef i64 @_Z21products_to_partitionm(i64 noundef %175)
  %177 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = urem i64 %176, %178
  store i64 %179, ptr %9, align 8, !tbaa !11
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = load ptr, ptr %180, align 8, !tbaa !5
  %182 = load i64, ptr %9, align 8, !tbaa !11
  %183 = getelementptr inbounds i8, ptr %181, i64 %182
  %184 = load i8, ptr %183, align 1, !tbaa !13, !range !23, !noundef !24
  %185 = trunc i8 %184 to i1
  br i1 %185, label %193, label %186

186:                                              ; preds = %173
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  %189 = load i64, ptr %9, align 8, !tbaa !11
  %190 = getelementptr inbounds i8, ptr %188, i64 %189
  store i8 1, ptr %190, align 1, !tbaa !13
  %191 = load i32, ptr %7, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %7, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %186, %173
  %194 = getelementptr inbounds %class.PPSQuery, ptr %10, i32 0, i32 3
  %195 = load i64, ptr %194, align 8, !tbaa !22
  %196 = call noundef i64 @_Z18parts_to_partitionm(i64 noundef %195)
  %197 = load i32, ptr @g_node_cnt, align 4, !tbaa !9
  %198 = zext i32 %197 to i64
  %199 = urem i64 %196, %198
  store i64 %199, ptr %9, align 8, !tbaa !11
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = load ptr, ptr %200, align 8, !tbaa !5
  %202 = load i64, ptr %9, align 8, !tbaa !11
  %203 = getelementptr inbounds i8, ptr %201, i64 %202
  %204 = load i8, ptr %203, align 1, !tbaa !13, !range !23, !noundef !24
  %205 = trunc i8 %204 to i1
  br i1 %205, label %213, label %206

206:                                              ; preds = %193
  %207 = load ptr, ptr %5, align 8, !tbaa !5
  %208 = load ptr, ptr %207, align 8, !tbaa !5
  %209 = load i64, ptr %9, align 8, !tbaa !11
  %210 = getelementptr inbounds i8, ptr %208, i64 %209
  store i8 1, ptr %210, align 1, !tbaa !13
  %211 = load i32, ptr %7, align 4, !tbaa !9
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %7, align 4, !tbaa !9
  br label %213

213:                                              ; preds = %206, %193
  br label %215

214:                                              ; preds = %25
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 201, ptr noundef @__PRETTY_FUNCTION__._ZN8PPSQuery12participantsERPbP8Workload) #5
  unreachable

215:                                              ; preds = %213, %172, %131, %90, %69, %48
  %216 = load i32, ptr %7, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i64 %217
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 = { "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 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 }
attributes #5 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !21, i64 112}
!18 = !{!"_ZTS8PPSQuery", !19, i64 0, !21, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !20, i64 152}
!19 = !{!"_ZTS9BaseQuery", !12, i64 8, !20, i64 16, !20, i64 40, !20, i64 64, !20, i64 88}
!20 = !{!"_ZTS5ArrayImE", !6, i64 0, !12, i64 8, !12, i64 16}
!21 = !{!"_ZTS10PPSTxnType", !7, i64 0}
!22 = !{!18, !12, i64 128}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!18, !12, i64 144}
!26 = !{!18, !12, i64 136}


; 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"

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@g_node_cnt = external local_unnamed_addr global i32, align 4
@__PRETTY_FUNCTION__._ZN8PPSQuery12participantsERPbP8Workload = external hidden unnamed_addr constant [53 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare noundef i64 @_Z18parts_to_partitionm(i64 noundef) local_unnamed_addr #1

declare noundef i64 @_Z21products_to_partitionm(i64 noundef) local_unnamed_addr #1

declare noundef i64 @_Z22suppliers_to_partitionm(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i64 0, 3) i64 @_ZN8PPSQuery12participantsERPbP8Workload(ptr nocapture noundef nonnull readonly align 8 dereferenceable(176) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %1, ptr nocapture noundef readnone %2) local_unnamed_addr #2 align 2 {
  %4 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %5 = zext i32 %4 to i64
  %6 = load ptr, ptr %1, align 8, !tbaa !9
  tail call void @llvm.memset.p0.i64(ptr align 1 %6, i8 0, i64 %5, i1 false), !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %3
  %7 = getelementptr inbounds i8, ptr %0, i64 112
  %8 = load i32, ptr %7, align 8, !tbaa !13
  switch i32 %8, label %120 [
    i32 1, label %9
    i32 3, label %21
    i32 2, label %33
    i32 4, label %45
    i32 5, label %70
    i32 6, label %95
  ]

9:                                                ; preds = %._crit_edge
  %10 = getelementptr inbounds i8, ptr %0, i64 128
  %11 = load i64, ptr %10, align 8, !tbaa !19
  %12 = tail call noundef i64 @_Z18parts_to_partitionm(i64 noundef %11)
  %13 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %14 = zext i32 %13 to i64
  %15 = urem i64 %12, %14
  %16 = load ptr, ptr %1, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %16, i64 %15
  %18 = load i8, ptr %17, align 1, !tbaa !11, !range !20, !noundef !21
  %19 = trunc nuw i8 %18 to i1
  br i1 %19, label %121, label %20

20:                                               ; preds = %9
  store i8 1, ptr %17, align 1, !tbaa !11
  br label %121

21:                                               ; preds = %._crit_edge
  %22 = getelementptr inbounds i8, ptr %0, i64 144
  %23 = load i64, ptr %22, align 8, !tbaa !22
  %24 = tail call noundef i64 @_Z21products_to_partitionm(i64 noundef %23)
  %25 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %26 = zext i32 %25 to i64
  %27 = urem i64 %24, %26
  %28 = load ptr, ptr %1, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %28, i64 %27
  %30 = load i8, ptr %29, align 1, !tbaa !11, !range !20, !noundef !21
  %31 = trunc nuw i8 %30 to i1
  br i1 %31, label %121, label %32

32:                                               ; preds = %21
  store i8 1, ptr %29, align 1, !tbaa !11
  br label %121

33:                                               ; preds = %._crit_edge
  %34 = getelementptr inbounds i8, ptr %0, i64 136
  %35 = load i64, ptr %34, align 8, !tbaa !23
  %36 = tail call noundef i64 @_Z22suppliers_to_partitionm(i64 noundef %35)
  %37 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %38 = zext i32 %37 to i64
  %39 = urem i64 %36, %38
  %40 = load ptr, ptr %1, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %40, i64 %39
  %42 = load i8, ptr %41, align 1, !tbaa !11, !range !20, !noundef !21
  %43 = trunc nuw i8 %42 to i1
  br i1 %43, label %121, label %44

44:                                               ; preds = %33
  store i8 1, ptr %41, align 1, !tbaa !11
  br label %121

45:                                               ; preds = %._crit_edge
  %46 = getelementptr inbounds i8, ptr %0, i64 136
  %47 = load i64, ptr %46, align 8, !tbaa !23
  %48 = tail call noundef i64 @_Z22suppliers_to_partitionm(i64 noundef %47)
  %49 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %50 = zext i32 %49 to i64
  %51 = urem i64 %48, %50
  %52 = load ptr, ptr %1, align 8, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %52, i64 %51
  %54 = load i8, ptr %53, align 1, !tbaa !11, !range !20, !noundef !21
  %55 = trunc nuw i8 %54 to i1
  br i1 %55, label %57, label %56

56:                                               ; preds = %45
  store i8 1, ptr %53, align 1, !tbaa !11
  br label %57

57:                                               ; preds = %56, %45
  %.050 = phi i32 [ 0, %45 ], [ 1, %56 ]
  %58 = getelementptr inbounds i8, ptr %0, i64 128
  %59 = load i64, ptr %58, align 8, !tbaa !19
  %60 = tail call noundef i64 @_Z18parts_to_partitionm(i64 noundef %59)
  %61 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %62 = zext i32 %61 to i64
  %63 = urem i64 %60, %62
  %64 = load ptr, ptr %1, align 8, !tbaa !9
  %65 = getelementptr inbounds i8, ptr %64, i64 %63
  %66 = load i8, ptr %65, align 1, !tbaa !11, !range !20, !noundef !21
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %121, label %68

68:                                               ; preds = %57
  store i8 1, ptr %65, align 1, !tbaa !11
  %69 = add nuw nsw i32 %.050, 1
  br label %121

70:                                               ; preds = %._crit_edge
  %71 = getelementptr inbounds i8, ptr %0, i64 144
  %72 = load i64, ptr %71, align 8, !tbaa !22
  %73 = tail call noundef i64 @_Z21products_to_partitionm(i64 noundef %72)
  %74 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %75 = zext i32 %74 to i64
  %76 = urem i64 %73, %75
  %77 = load ptr, ptr %1, align 8, !tbaa !9
  %78 = getelementptr inbounds i8, ptr %77, i64 %76
  %79 = load i8, ptr %78, align 1, !tbaa !11, !range !20, !noundef !21
  %80 = trunc nuw i8 %79 to i1
  br i1 %80, label %82, label %81

81:                                               ; preds = %70
  store i8 1, ptr %78, align 1, !tbaa !11
  br label %82

82:                                               ; preds = %81, %70
  %.1 = phi i32 [ 0, %70 ], [ 1, %81 ]
  %83 = getelementptr inbounds i8, ptr %0, i64 128
  %84 = load i64, ptr %83, align 8, !tbaa !19
  %85 = tail call noundef i64 @_Z18parts_to_partitionm(i64 noundef %84)
  %86 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %87 = zext i32 %86 to i64
  %88 = urem i64 %85, %87
  %89 = load ptr, ptr %1, align 8, !tbaa !9
  %90 = getelementptr inbounds i8, ptr %89, i64 %88
  %91 = load i8, ptr %90, align 1, !tbaa !11, !range !20, !noundef !21
  %92 = trunc nuw i8 %91 to i1
  br i1 %92, label %121, label %93

93:                                               ; preds = %82
  store i8 1, ptr %90, align 1, !tbaa !11
  %94 = add nuw nsw i32 %.1, 1
  br label %121

95:                                               ; preds = %._crit_edge
  %96 = getelementptr inbounds i8, ptr %0, i64 144
  %97 = load i64, ptr %96, align 8, !tbaa !22
  %98 = tail call noundef i64 @_Z21products_to_partitionm(i64 noundef %97)
  %99 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %100 = zext i32 %99 to i64
  %101 = urem i64 %98, %100
  %102 = load ptr, ptr %1, align 8, !tbaa !9
  %103 = getelementptr inbounds i8, ptr %102, i64 %101
  %104 = load i8, ptr %103, align 1, !tbaa !11, !range !20, !noundef !21
  %105 = trunc nuw i8 %104 to i1
  br i1 %105, label %107, label %106

106:                                              ; preds = %95
  store i8 1, ptr %103, align 1, !tbaa !11
  br label %107

107:                                              ; preds = %106, %95
  %.2 = phi i32 [ 0, %95 ], [ 1, %106 ]
  %108 = getelementptr inbounds i8, ptr %0, i64 128
  %109 = load i64, ptr %108, align 8, !tbaa !19
  %110 = tail call noundef i64 @_Z18parts_to_partitionm(i64 noundef %109)
  %111 = load i32, ptr @g_node_cnt, align 4, !tbaa !5
  %112 = zext i32 %111 to i64
  %113 = urem i64 %110, %112
  %114 = load ptr, ptr %1, align 8, !tbaa !9
  %115 = getelementptr inbounds i8, ptr %114, i64 %113
  %116 = load i8, ptr %115, align 1, !tbaa !11, !range !20, !noundef !21
  %117 = trunc nuw i8 %116 to i1
  br i1 %117, label %121, label %118

118:                                              ; preds = %107
  store i8 1, ptr %115, align 1, !tbaa !11
  %119 = add nuw nsw i32 %.2, 1
  br label %121

120:                                              ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 201, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8PPSQuery12participantsERPbP8Workload) #4
  unreachable

121:                                              ; preds = %107, %118, %82, %93, %57, %68, %33, %44, %21, %32, %9, %20
  %.3 = phi i32 [ %.2, %107 ], [ %119, %118 ], [ %.1, %82 ], [ %94, %93 ], [ %.050, %57 ], [ %69, %68 ], [ 0, %33 ], [ 1, %44 ], [ 0, %21 ], [ 1, %32 ], [ 0, %9 ], [ 1, %20 ]
  %122 = zext nneg i32 %.3 to i64
  ret i64 %122
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !18, i64 112}
!14 = !{!"_ZTS8PPSQuery", !15, i64 0, !18, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !17, i64 152}
!15 = !{!"_ZTS9BaseQuery", !16, i64 8, !17, i64 16, !17, i64 40, !17, i64 64, !17, i64 88}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTS5ArrayImE", !10, i64 0, !16, i64 8, !16, i64 16}
!18 = !{!"_ZTS10PPSTxnType", !7, i64 0}
!19 = !{!14, !16, i64 128}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!14, !16, i64 144}
!23 = !{!14, !16, i64 136}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass