; LLVM IR from stan-dev/math :: lib/tbb_2020.3/src/test/test_malloc_pools.ll (Z19TestFixedBufferPoolv)

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

%"struct.rml::MemPoolPolicy" = type { ptr, ptr, i64, i32, i32 }
%class.FixedPoolHead = type { %class.FixedPoolHeadBase }
%class.FixedPoolHeadBase = type { i64, i64, ptr }
%class.FixedPoolUse = type <{ ptr, i64, i32, [4 x i8] }>
%"class.Harness::SpinBarrier" = type <{ i32, %"struct.tbb::atomic.0", %"struct.tbb::atomic.0", i8, [3 x i8] }>
%"struct.tbb::atomic.0" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic.1" }
%"struct.tbb::internal::atomic_impl_with_arithmetic.1" = type { %"struct.tbb::internal::atomic_impl.2" }
%"struct.tbb::internal::atomic_impl.2" = type { %"struct.tbb::internal::aligned_storage.3" }
%"struct.tbb::internal::aligned_storage.3" = type { i32 }
%class.FixedPoolNomem = type { ptr, ptr }
%class.FixedPoolSomeMem = type { ptr, ptr }

@.str.20 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL9MaxThread = external hidden global i32, align 4
@_ZL9MinThread = external hidden global i32, align 4
@.str.37 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [9 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3rml13MemPoolPolicyC2EPFPvlRmEPFilS1_mEmbb(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #2 align 2

declare noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef, ptr noundef, ptr noundef) #3

declare noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef, i64 noundef) #3

declare noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness11SpinBarrierC2Ejb(ptr noundef nonnull align 4 dereferenceable(13), i32 noundef, i1 noundef zeroext) unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef, ptr noundef) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z15haveEnoughSpacePN3rml10MemoryPoolEm(ptr noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19TestFixedBufferPoolv() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca [7 x ptr], align 16
  %4 = alloca %"struct.rml::MemPoolPolicy", align 8
  %5 = alloca ptr, align 8
  %6 = alloca %class.FixedPoolHead, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.FixedPoolUse, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %class.FixedPoolUse, align 8
  %13 = alloca i32, align 4
  %14 = alloca %class.FixedPoolUse, align 8
  %15 = alloca i32, align 4
  %16 = alloca %class.FixedPoolUse, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.Harness::SpinBarrier", align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca %class.FixedPoolNomem, align 8
  %26 = alloca %class.FixedPoolSomeMem, align 8
  %27 = alloca i8, align 1
  %28 = alloca %class.FixedPoolHead, align 8
  %29 = alloca i32, align 4
  %30 = alloca %class.FixedPoolUse, align 8
  %31 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 7, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  store i64 7340032, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #4
  call void @_ZN3rml13MemPoolPolicyC2EPFPvlRmEPFilS1_mEmbb(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @_ZL14fixedBufGetMemlRm, ptr noundef null, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  call void @_ZN13FixedPoolHeadILm8388608EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %32 = ptrtoint ptr %6 to i64
  %33 = invoke noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef %32, ptr noundef %4, ptr noundef %5)
          to label %34 unwind label %42

34:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #4
  %35 = load ptr, ptr %5, align 8, !tbaa !11
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %9, i32 noundef 1, ptr noundef %35, i64 noundef 7340032, i32 noundef 2)
          to label %36 unwind label %46

36:                                               ; preds = %34
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(20) %9)
          to label %37 unwind label %46

37:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %66, %37
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 7
  br i1 %40, label %50, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %73

42:                                               ; preds = %0
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %8, align 4
  br label %285

46:                                               ; preds = %36, %34
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %7, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  br label %285

50:                                               ; preds = %38
  %51 = load ptr, ptr %5, align 8, !tbaa !11
  %52 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %51, i64 noundef 1048576)
          to label %53 unwind label %69

53:                                               ; preds = %50
  %54 = load i32, ptr %10, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [7 x ptr], ptr %3, i64 0, i64 %55
  store ptr %52, ptr %56, align 8, !tbaa !11
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [7 x ptr], ptr %3, i64 0, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !11
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %63

62:                                               ; preds = %53
  br label %65

63:                                               ; preds = %53
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 405, ptr noundef @.str.37, ptr noundef null)
          to label %64 unwind label %69

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64, %62
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %10, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %10, align 4, !tbaa !5
  br label %38, !llvm.loop !13

69:                                               ; preds = %63, %50
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %285

73:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %86, %73
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = icmp slt i32 %75, 7
  br i1 %76, label %78, label %77

77:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %93

78:                                               ; preds = %74
  %79 = load ptr, ptr %5, align 8, !tbaa !11
  %80 = load i32, ptr %11, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [7 x ptr], ptr %3, i64 0, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %79, ptr noundef %83)
          to label %85 unwind label %89

85:                                               ; preds = %78
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %11, align 4, !tbaa !5
  br label %74, !llvm.loop !15

89:                                               ; preds = %78
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %7, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %285

93:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  %94 = load ptr, ptr %5, align 8, !tbaa !11
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %12, i32 noundef 1, ptr noundef %94, i64 noundef 7340032, i32 noundef 1)
          to label %95 unwind label %103

95:                                               ; preds = %93
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(20) %12)
          to label %96 unwind label %103

96:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %97 = load i32, ptr @_ZL9MinThread, align 4, !tbaa !5
  store i32 %97, ptr %13, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %117, %96
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !5
  %101 = icmp sle i32 %99, %100
  br i1 %101, label %107, label %102

102:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %124

103:                                              ; preds = %95, %93
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  br label %285

107:                                              ; preds = %98
  %108 = load i32, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  %109 = load i32, ptr %13, align 4, !tbaa !5
  %110 = load ptr, ptr %5, align 8, !tbaa !11
  %111 = load i32, ptr %13, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = udiv i64 7340032, %112
  %114 = udiv i64 %113, 2
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %14, i32 noundef %109, ptr noundef %110, i64 noundef %114, i32 noundef 10000)
          to label %115 unwind label %120

115:                                              ; preds = %107
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef %108, ptr noundef nonnull align 8 dereferenceable(20) %14)
          to label %116 unwind label %120

116:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %13, align 4, !tbaa !5
  br label %98, !llvm.loop !16

120:                                              ; preds = %115, %107
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %7, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %285

124:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 128, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %125 = load ptr, ptr %5, align 8, !tbaa !11
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %16, i32 noundef 128, ptr noundef %125, i64 noundef 28672, i32 noundef 1)
          to label %126 unwind label %152

126:                                              ; preds = %124
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef 128, ptr noundef nonnull align 8 dereferenceable(20) %16)
          to label %127 unwind label %152

127:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 512, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  invoke void @_ZN7Harness11SpinBarrierC2Ejb(ptr noundef nonnull align 4 dereferenceable(13) %19, i32 noundef 512, i1 noundef zeroext false)
          to label %128 unwind label %156

128:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %129 = load ptr, ptr %5, align 8, !tbaa !11
  %130 = invoke noundef zeroext i1 @_Z15haveEnoughSpacePN3rml10MemoryPoolEm(ptr noundef %129, i64 noundef 3670016)
          to label %131 unwind label %160

131:                                              ; preds = %128
  br i1 %130, label %132, label %133

132:                                              ; preds = %131
  br label %135

133:                                              ; preds = %131
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 429, ptr noundef @.str.38, ptr noundef null)
          to label %134 unwind label %160

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134, %132
  store i64 3670016, ptr %20, align 8, !tbaa !9
  store i64 8388608, ptr %21, align 8, !tbaa !9
  br label %136

136:                                              ; preds = %170, %135
  %137 = load i64, ptr %20, align 8, !tbaa !9
  %138 = load i64, ptr %21, align 8, !tbaa !9
  %139 = sub i64 %138, 1
  %140 = icmp ult i64 %137, %139
  br i1 %140, label %141, label %171

141:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %142 = load i64, ptr %20, align 8, !tbaa !9
  %143 = load i64, ptr %21, align 8, !tbaa !9
  %144 = add i64 %142, %143
  %145 = udiv i64 %144, 2
  store i64 %145, ptr %22, align 8, !tbaa !9
  %146 = load ptr, ptr %5, align 8, !tbaa !11
  %147 = load i64, ptr %22, align 8, !tbaa !9
  %148 = invoke noundef zeroext i1 @_Z15haveEnoughSpacePN3rml10MemoryPoolEm(ptr noundef %146, i64 noundef %147)
          to label %149 unwind label %164

149:                                              ; preds = %141
  br i1 %148, label %150, label %168

150:                                              ; preds = %149
  %151 = load i64, ptr %22, align 8, !tbaa !9
  store i64 %151, ptr %20, align 8, !tbaa !9
  br label %170

152:                                              ; preds = %126, %124
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %7, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %285

156:                                              ; preds = %127
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %7, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %8, align 4
  br label %280

160:                                              ; preds = %179, %171, %133, %128
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %7, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %8, align 4
  br label %279

164:                                              ; preds = %141
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %7, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %279

168:                                              ; preds = %149
  %169 = load i64, ptr %22, align 8, !tbaa !9
  store i64 %169, ptr %21, align 8, !tbaa !9
  br label %170

170:                                              ; preds = %168, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %136, !llvm.loop !17

171:                                              ; preds = %136
  %172 = load i64, ptr %20, align 8, !tbaa !9
  store i64 %172, ptr %17, align 8, !tbaa !9
  %173 = load ptr, ptr %5, align 8, !tbaa !11
  %174 = load i64, ptr %17, align 8, !tbaa !9
  %175 = add i64 %174, 1
  %176 = invoke noundef zeroext i1 @_Z15haveEnoughSpacePN3rml10MemoryPoolEm(ptr noundef %173, i64 noundef %175)
          to label %177 unwind label %160

177:                                              ; preds = %171
  br i1 %176, label %179, label %178

178:                                              ; preds = %177
  br label %181

179:                                              ; preds = %177
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 438, ptr noundef @.str.39, ptr noundef @.str.40)
          to label %180 unwind label %160

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180, %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %182 = load ptr, ptr %5, align 8, !tbaa !11
  %183 = load i64, ptr %17, align 8, !tbaa !9
  %184 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %182, i64 noundef %183)
          to label %185 unwind label %202

185:                                              ; preds = %181
  store ptr %184, ptr %23, align 8, !tbaa !11
  %186 = load ptr, ptr %23, align 8, !tbaa !11
  %187 = icmp ne ptr %186, null
  br i1 %187, label %188, label %189

188:                                              ; preds = %185
  br label %191

189:                                              ; preds = %185
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 441, ptr noundef @.str.41, ptr noundef null)
          to label %190 unwind label %202

190:                                              ; preds = %189
  br label %191

191:                                              ; preds = %190, %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %192 = load ptr, ptr %5, align 8, !tbaa !11
  %193 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %192, i64 noundef 64)
          to label %194 unwind label %206

194:                                              ; preds = %191
  store ptr %193, ptr %24, align 8, !tbaa !11
  %195 = load ptr, ptr %24, align 8, !tbaa !11
  %196 = icmp ne ptr %195, null
  br i1 %196, label %197, label %210

197:                                              ; preds = %194
  %198 = load ptr, ptr %5, align 8, !tbaa !11
  %199 = load ptr, ptr %24, align 8, !tbaa !11
  %200 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %198, ptr noundef %199)
          to label %201 unwind label %206

201:                                              ; preds = %197
  br label %218

202:                                              ; preds = %189, %181
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %7, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %8, align 4
  br label %278

206:                                              ; preds = %236, %231, %222, %218, %197, %191
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %7, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %8, align 4
  br label %277

210:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #4
  %211 = load ptr, ptr %5, align 8, !tbaa !11
  invoke void @_ZN14FixedPoolNomemC2EPN7Harness11SpinBarrierEPN3rml10MemoryPoolE(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef %19, ptr noundef %211)
          to label %212 unwind label %214

212:                                              ; preds = %210
  invoke void @_Z17NativeParallelForIi14FixedPoolNomemEvT_RKT0_(i32 noundef 512, ptr noundef nonnull align 8 dereferenceable(16) %25)
          to label %213 unwind label %214

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

214:                                              ; preds = %212, %210
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %7, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #4
  br label %277

218:                                              ; preds = %213, %201
  %219 = load ptr, ptr %5, align 8, !tbaa !11
  %220 = load ptr, ptr %23, align 8, !tbaa !11
  %221 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %219, ptr noundef %220)
          to label %222 unwind label %206

222:                                              ; preds = %218
  %223 = load ptr, ptr %5, align 8, !tbaa !11
  %224 = load i64, ptr %17, align 8, !tbaa !9
  %225 = sub i64 %224, 524288
  %226 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %223, i64 noundef %225)
          to label %227 unwind label %206

227:                                              ; preds = %222
  store ptr %226, ptr %23, align 8, !tbaa !11
  %228 = load ptr, ptr %23, align 8, !tbaa !11
  %229 = icmp ne ptr %228, null
  br i1 %229, label %230, label %231

230:                                              ; preds = %227
  br label %233

231:                                              ; preds = %227
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 450, ptr noundef @.str.41, ptr noundef null)
          to label %232 unwind label %206

232:                                              ; preds = %231
  br label %233

233:                                              ; preds = %232, %230
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #4
  %234 = load ptr, ptr %5, align 8, !tbaa !11
  invoke void @_ZN16FixedPoolSomeMemC2EPN7Harness11SpinBarrierEPN3rml10MemoryPoolE(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef %19, ptr noundef %234)
          to label %235 unwind label %273

235:                                              ; preds = %233
  invoke void @_Z17NativeParallelForIi16FixedPoolSomeMemEvT_RKT0_(i32 noundef 512, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %236 unwind label %273

236:                                              ; preds = %235
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #4
  %237 = load ptr, ptr %5, align 8, !tbaa !11
  %238 = load ptr, ptr %23, align 8, !tbaa !11
  %239 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %237, ptr noundef %238)
          to label %240 unwind label %206

240:                                              ; preds = %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #4
  %241 = load ptr, ptr %5, align 8, !tbaa !11
  %242 = invoke noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %241)
          to label %243 unwind label %281

243:                                              ; preds = %240
  %244 = zext i1 %242 to i8
  store i8 %244, ptr %27, align 1, !tbaa !18
  %245 = load i8, ptr %27, align 1, !tbaa !18, !range !20, !noundef !21
  %246 = trunc i8 %245 to i1
  br i1 %246, label %247, label %248

247:                                              ; preds = %243
  br label %250

248:                                              ; preds = %243
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 455, ptr noundef @.str.23, ptr noundef null)
          to label %249 unwind label %281

249:                                              ; preds = %248
  br label %250

250:                                              ; preds = %249, %247
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  call void @_ZN17FixedPoolHeadBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #4
  call void @_ZN13FixedPoolHeadILm8388608EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %251 = ptrtoint ptr %28 to i64
  %252 = invoke noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef %251, ptr noundef %4, ptr noundef %5)
          to label %253 unwind label %286

253:                                              ; preds = %250
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  store i32 128, ptr %29, align 4, !tbaa !5
  %254 = load i32, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #4
  %255 = load i32, ptr %29, align 4, !tbaa !5
  %256 = load ptr, ptr %5, align 8, !tbaa !11
  %257 = load i32, ptr %29, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = udiv i64 7340032, %258
  %260 = udiv i64 %259, 2
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %30, i32 noundef %255, ptr noundef %256, i64 noundef %260, i32 noundef 1)
          to label %261 unwind label %290

261:                                              ; preds = %253
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef %254, ptr noundef nonnull align 8 dereferenceable(20) %30)
          to label %262 unwind label %290

262:                                              ; preds = %261
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #4
  %263 = load ptr, ptr %5, align 8, !tbaa !11
  %264 = invoke noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %263)
          to label %265 unwind label %294

265:                                              ; preds = %262
  %266 = zext i1 %264 to i8
  store i8 %266, ptr %31, align 1, !tbaa !18
  %267 = load i8, ptr %31, align 1, !tbaa !18, !range !20, !noundef !21
  %268 = trunc i8 %267 to i1
  br i1 %268, label %269, label %270

269:                                              ; preds = %265
  br label %272

270:                                              ; preds = %265
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.20, i32 noundef 464, ptr noundef @.str.23, ptr noundef null)
          to label %271 unwind label %294

271:                                              ; preds = %270
  br label %272

272:                                              ; preds = %271, %269
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @_ZN17FixedPoolHeadBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void

273:                                              ; preds = %235, %233
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %7, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #4
  br label %277

277:                                              ; preds = %273, %214, %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %278

278:                                              ; preds = %277, %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %279

279:                                              ; preds = %278, %164, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %280

280:                                              ; preds = %279, %156
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %285

281:                                              ; preds = %248, %240
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %7, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  br label %285

285:                                              ; preds = %281, %280, %152, %120, %103, %89, %69, %46, %42
  call void @_ZN17FixedPoolHeadBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  br label %300

286:                                              ; preds = %250
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %7, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %8, align 4
  br label %299

290:                                              ; preds = %261, %253
  %291 = landingpad { ptr, i32 }
          cleanup
  %292 = extractvalue { ptr, i32 } %291, 0
  store ptr %292, ptr %7, align 8
  %293 = extractvalue { ptr, i32 } %291, 1
  store i32 %293, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #4
  br label %298

294:                                              ; preds = %270, %262
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %7, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #4
  br label %298

298:                                              ; preds = %294, %290
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %299

299:                                              ; preds = %298, %286
  call void @_ZN17FixedPoolHeadBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #4
  br label %300

300:                                              ; preds = %299, %285
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  br label %301

301:                                              ; preds = %300
  %302 = load ptr, ptr %7, align 8
  %303 = load i32, ptr %8, align 4
  %304 = insertvalue { ptr, i32 } poison, ptr %302, 0
  %305 = insertvalue { ptr, i32 } %304, i32 %303, 1
  resume { ptr, i32 } %305
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL14fixedBufGetMemlRm(i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(20)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi14FixedPoolNomemEvT_RKT0_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14FixedPoolNomemC2EPN7Harness11SpinBarrierEPN3rml10MemoryPoolE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi16FixedPoolSomeMemEvT_RKT0_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16FixedPoolSomeMemC2EPN7Harness11SpinBarrierEPN3rml10MemoryPoolE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 = !{!"int", !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, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}


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

%"struct.rml::MemPoolPolicy" = type { ptr, ptr, i64, i32, i32 }
%class.FixedPoolHead = type { %class.FixedPoolHeadBase }
%class.FixedPoolHeadBase = type { i64, i64, ptr }
%class.FixedPoolUse = type <{ ptr, i64, i32, [4 x i8] }>
%"class.Harness::SpinBarrier" = type <{ i32, %"struct.tbb::atomic.0", %"struct.tbb::atomic.0", i8, [3 x i8] }>
%"struct.tbb::atomic.0" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic.1" }
%"struct.tbb::internal::atomic_impl_with_arithmetic.1" = type { %"struct.tbb::internal::atomic_impl.2" }
%"struct.tbb::internal::atomic_impl.2" = type { %"struct.tbb::internal::aligned_storage.3" }
%"struct.tbb::internal::aligned_storage.3" = type { i32 }
%class.FixedPoolNomem = type { ptr, ptr }
%class.FixedPoolSomeMem = type { ptr, ptr }

@.str.20 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL9MaxThread = external hidden local_unnamed_addr global i32, align 4
@_ZL9MinThread = external hidden local_unnamed_addr global i32, align 4
@.str.37 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [9 x i8], align 1

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

; 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 uwtable
declare dso_local void @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3rml13MemPoolPolicyC2EPFPvlRmEPFilS1_mEmbb(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #2 align 2

declare noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef, i64 noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness11SpinBarrierC2Ejb(ptr noundef nonnull align 4 dereferenceable(13), i32 noundef, i1 noundef zeroext) unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z15haveEnoughSpacePN3rml10MemoryPoolEm(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z19TestFixedBufferPoolv() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"struct.rml::MemPoolPolicy", align 8
  %2 = alloca ptr, align 8
  %3 = alloca %class.FixedPoolHead, align 8
  %4 = alloca %class.FixedPoolUse, align 8
  %5 = alloca %class.FixedPoolUse, align 8
  %6 = alloca %class.FixedPoolUse, align 8
  %7 = alloca %class.FixedPoolUse, align 8
  %8 = alloca %"class.Harness::SpinBarrier", align 4
  %9 = alloca %class.FixedPoolNomem, align 8
  %10 = alloca %class.FixedPoolSomeMem, align 8
  %11 = alloca %class.FixedPoolHead, align 8
  %12 = alloca %class.FixedPoolUse, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #4
  call void @_ZN3rml13MemPoolPolicyC2EPFPvlRmEPFilS1_mEmbb(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @_ZL14fixedBufGetMemlRm, ptr noundef null, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN13FixedPoolHeadILm8388608EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %13 = ptrtoint ptr %3 to i64
  %14 = invoke noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef %13, ptr noundef nonnull %1, ptr noundef nonnull %2)
          to label %15 unwind label %21

15:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %4, i32 noundef 1, ptr noundef %16, i64 noundef 7340032, i32 noundef 2)
          to label %17 unwind label %23

17:                                               ; preds = %15
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(20) %4)
          to label %18 unwind label %23

18:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %19, i64 noundef 1048576)
          to label %25 unwind label %59

21:                                               ; preds = %0
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %181

23:                                               ; preds = %17, %15
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br label %181

25:                                               ; preds = %18
  %.not62 = icmp eq ptr %20, null
  br i1 %.not62, label %26, label %27

26:                                               ; preds = %25
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 405, ptr noundef nonnull @.str.37, ptr noundef null)
          to label %27 unwind label %59

27:                                               ; preds = %25, %26
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %28, i64 noundef 1048576)
          to label %30 unwind label %59

30:                                               ; preds = %27
  %.not62.1 = icmp eq ptr %29, null
  br i1 %.not62.1, label %31, label %32

31:                                               ; preds = %30
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 405, ptr noundef nonnull @.str.37, ptr noundef null)
          to label %32 unwind label %59

32:                                               ; preds = %31, %30
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %33, i64 noundef 1048576)
          to label %35 unwind label %59

35:                                               ; preds = %32
  %.not62.2 = icmp eq ptr %34, null
  br i1 %.not62.2, label %36, label %37

36:                                               ; preds = %35
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 405, ptr noundef nonnull @.str.37, ptr noundef null)
          to label %37 unwind label %59

37:                                               ; preds = %36, %35
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %38, i64 noundef 1048576)
          to label %40 unwind label %59

40:                                               ; preds = %37
  %.not62.3 = icmp eq ptr %39, null
  br i1 %.not62.3, label %41, label %42

41:                                               ; preds = %40
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 405, ptr noundef nonnull @.str.37, ptr noundef null)
          to label %42 unwind label %59

42:                                               ; preds = %41, %40
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %43, i64 noundef 1048576)
          to label %45 unwind label %59

45:                                               ; preds = %42
  %.not62.4 = icmp eq ptr %44, null
  br i1 %.not62.4, label %46, label %47

46:                                               ; preds = %45
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 405, ptr noundef nonnull @.str.37, ptr noundef null)
          to label %47 unwind label %59

47:                                               ; preds = %46, %45
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %48, i64 noundef 1048576)
          to label %50 unwind label %59

50:                                               ; preds = %47
  %.not62.5 = icmp eq ptr %49, null
  br i1 %.not62.5, label %51, label %52

51:                                               ; preds = %50
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 405, ptr noundef nonnull @.str.37, ptr noundef null)
          to label %52 unwind label %59

52:                                               ; preds = %51, %50
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %53, i64 noundef 1048576)
          to label %55 unwind label %59

55:                                               ; preds = %52
  %.not62.6 = icmp eq ptr %54, null
  br i1 %.not62.6, label %56, label %.preheader.preheader

56:                                               ; preds = %55
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 405, ptr noundef nonnull @.str.37, ptr noundef null)
          to label %.preheader.preheader unwind label %59

.preheader.preheader:                             ; preds = %56, %55
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %57, ptr noundef %20)
          to label %.preheader.1 unwind label %75

59:                                               ; preds = %56, %52, %51, %47, %46, %42, %41, %37, %36, %32, %31, %27, %26, %18
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %181

.preheader.1:                                     ; preds = %.preheader.preheader
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %61, ptr noundef %29)
          to label %.preheader.2 unwind label %75

.preheader.2:                                     ; preds = %.preheader.1
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %63, ptr noundef %34)
          to label %.preheader.3 unwind label %75

.preheader.3:                                     ; preds = %.preheader.2
  %65 = load ptr, ptr %2, align 8, !tbaa !5
  %66 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %65, ptr noundef %39)
          to label %.preheader.4 unwind label %75

.preheader.4:                                     ; preds = %.preheader.3
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %67, ptr noundef %44)
          to label %.preheader.5 unwind label %75

.preheader.5:                                     ; preds = %.preheader.4
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %69, ptr noundef %49)
          to label %.preheader.6 unwind label %75

.preheader.6:                                     ; preds = %.preheader.5
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %71, ptr noundef %54)
          to label %73 unwind label %75

73:                                               ; preds = %.preheader.6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %5, i32 noundef 1, ptr noundef %74, i64 noundef 7340032, i32 noundef 1)
          to label %77 unwind label %83

75:                                               ; preds = %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %181

77:                                               ; preds = %73
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(20) %5)
          to label %78 unwind label %83

78:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  %79 = load i32, ptr @_ZL9MinThread, align 4, !tbaa !9
  %80 = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !9
  %.not69 = icmp sgt i32 %79, %80
  br i1 %.not69, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %78
  %81 = sext i32 %79 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %90, %78
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %7, i32 noundef 128, ptr noundef %82, i64 noundef 28672, i32 noundef 1)
          to label %95 unwind label %110

83:                                               ; preds = %77, %73
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  br label %181

.lr.ph:                                           ; preds = %.lr.ph.preheader, %90
  %indvars.iv = phi i64 [ %81, %.lr.ph.preheader ], [ %indvars.iv.next, %90 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = udiv i64 7340032, %indvars.iv
  %87 = lshr i64 %86, 1
  %88 = trunc nsw i64 %indvars.iv to i32
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %6, i32 noundef %88, ptr noundef %85, i64 noundef %87, i32 noundef 10000)
          to label %89 unwind label %93

89:                                               ; preds = %.lr.ph
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef %88, ptr noundef nonnull align 8 dereferenceable(20) %6)
          to label %90 unwind label %93

90:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %91 = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %.not.not = icmp slt i64 %indvars.iv, %92
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

93:                                               ; preds = %89, %.lr.ph
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %181

95:                                               ; preds = %._crit_edge
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef 128, ptr noundef nonnull align 8 dereferenceable(20) %7)
          to label %96 unwind label %110

96:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  invoke void @_ZN7Harness11SpinBarrierC2Ejb(ptr noundef nonnull align 4 dereferenceable(13) %8, i32 noundef 512, i1 noundef zeroext false)
          to label %97 unwind label %112

97:                                               ; preds = %96
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = invoke noundef zeroext i1 @_Z15haveEnoughSpacePN3rml10MemoryPoolEm(ptr noundef %98, i64 noundef 3670016)
          to label %100 unwind label %114

100:                                              ; preds = %97
  br i1 %99, label %.preheader, label %101

101:                                              ; preds = %100
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 429, ptr noundef nonnull @.str.38, ptr noundef null)
          to label %.preheader unwind label %114

.preheader:                                       ; preds = %101, %100
  br label %102

102:                                              ; preds = %.preheader, %107
  %.04672 = phi i64 [ %.046., %107 ], [ 8388608, %.preheader ]
  %.04871 = phi i64 [ %..048, %107 ], [ 3670016, %.preheader ]
  %103 = add i64 %.04672, %.04871
  %104 = lshr i64 %103, 1
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = invoke noundef zeroext i1 @_Z15haveEnoughSpacePN3rml10MemoryPoolEm(ptr noundef %105, i64 noundef %104)
          to label %107 unwind label %116

107:                                              ; preds = %102
  %..048 = select i1 %106, i64 %104, i64 %.04871
  %.046. = select i1 %106, i64 %.04672, i64 %104
  %108 = add i64 %.046., -1
  %109 = icmp ult i64 %..048, %108
  br i1 %109, label %102, label %118, !llvm.loop !13

110:                                              ; preds = %95, %._crit_edge
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %181

112:                                              ; preds = %96
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %178

114:                                              ; preds = %123, %118, %101, %97
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %178

116:                                              ; preds = %102
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %178

118:                                              ; preds = %107
  %119 = load ptr, ptr %2, align 8, !tbaa !5
  %120 = add nuw i64 %..048, 1
  %121 = invoke noundef zeroext i1 @_Z15haveEnoughSpacePN3rml10MemoryPoolEm(ptr noundef %119, i64 noundef %120)
          to label %122 unwind label %114

122:                                              ; preds = %118
  br i1 %121, label %123, label %124

123:                                              ; preds = %122
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 438, ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.40)
          to label %124 unwind label %114

124:                                              ; preds = %123, %122
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %125, i64 noundef %..048)
          to label %127 unwind label %136

127:                                              ; preds = %124
  %.not51 = icmp eq ptr %126, null
  br i1 %.not51, label %128, label %129

128:                                              ; preds = %127
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 441, ptr noundef nonnull @.str.41, ptr noundef null)
          to label %129 unwind label %136

129:                                              ; preds = %128, %127
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  %131 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %130, i64 noundef 64)
          to label %132 unwind label %138

132:                                              ; preds = %129
  %.not52 = icmp eq ptr %131, null
  br i1 %.not52, label %140, label %133

133:                                              ; preds = %132
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %134, ptr noundef nonnull %131)
          to label %145 unwind label %138

136:                                              ; preds = %128, %124
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %178

138:                                              ; preds = %156, %153, %148, %145, %133, %129
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %178

140:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN14FixedPoolNomemC2EPN7Harness11SpinBarrierEPN3rml10MemoryPoolE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull %8, ptr noundef %141)
  invoke void @_Z17NativeParallelForIi14FixedPoolNomemEvT_RKT0_(i32 noundef 512, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %142 unwind label %143

142:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  br label %145

143:                                              ; preds = %140
  %144 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  br label %178

145:                                              ; preds = %133, %142
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  %147 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %146, ptr noundef %126)
          to label %148 unwind label %138

148:                                              ; preds = %145
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = add i64 %..048, -524288
  %151 = invoke noundef ptr @_ZN3rml11pool_mallocEPNS_10MemoryPoolEm(ptr noundef %149, i64 noundef %150)
          to label %152 unwind label %138

152:                                              ; preds = %148
  %.not53 = icmp eq ptr %151, null
  br i1 %.not53, label %153, label %154

153:                                              ; preds = %152
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 450, ptr noundef nonnull @.str.41, ptr noundef null)
          to label %154 unwind label %138

154:                                              ; preds = %153, %152
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #4
  %155 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN16FixedPoolSomeMemC2EPN7Harness11SpinBarrierEPN3rml10MemoryPoolE(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull %8, ptr noundef %155)
  invoke void @_Z17NativeParallelForIi16FixedPoolSomeMemEvT_RKT0_(i32 noundef 512, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %156 unwind label %176

156:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  %157 = load ptr, ptr %2, align 8, !tbaa !5
  %158 = invoke noundef zeroext i1 @_ZN3rml9pool_freeEPNS_10MemoryPoolEPv(ptr noundef %157, ptr noundef %151)
          to label %159 unwind label %138

159:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  %160 = load ptr, ptr %2, align 8, !tbaa !5
  %161 = invoke noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %160)
          to label %162 unwind label %179

162:                                              ; preds = %159
  br i1 %161, label %164, label %163

163:                                              ; preds = %162
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 455, ptr noundef nonnull @.str.23, ptr noundef null)
          to label %164 unwind label %179

164:                                              ; preds = %163, %162
  call void @_ZN17FixedPoolHeadBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @_ZN13FixedPoolHeadILm8388608EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %165 = ptrtoint ptr %11 to i64
  %166 = invoke noundef i32 @_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE(i64 noundef %165, ptr noundef nonnull %1, ptr noundef nonnull %2)
          to label %167 unwind label %182

167:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  invoke void @_ZN12FixedPoolUseC2EjPN3rml10MemoryPoolEmi(ptr noundef nonnull align 8 dereferenceable(20) %12, i32 noundef 128, ptr noundef %168, i64 noundef 28672, i32 noundef 1)
          to label %169 unwind label %184

169:                                              ; preds = %167
  invoke void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef 128, ptr noundef nonnull align 8 dereferenceable(20) %12)
          to label %170 unwind label %184

170:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  %171 = load ptr, ptr %2, align 8, !tbaa !5
  %172 = invoke noundef zeroext i1 @_ZN3rml12pool_destroyEPNS_10MemoryPoolE(ptr noundef %171)
          to label %173 unwind label %186

173:                                              ; preds = %170
  br i1 %172, label %175, label %174

174:                                              ; preds = %173
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.20, i32 noundef 464, ptr noundef nonnull @.str.23, ptr noundef null)
          to label %175 unwind label %186

175:                                              ; preds = %174, %173
  call void @_ZN17FixedPoolHeadBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  ret void

176:                                              ; preds = %154
  %177 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  br label %178

178:                                              ; preds = %114, %116, %138, %143, %176, %136, %112
  %.pn59.pn = phi { ptr, i32 } [ %113, %112 ], [ %117, %116 ], [ %115, %114 ], [ %137, %136 ], [ %139, %138 ], [ %177, %176 ], [ %144, %143 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br label %181

179:                                              ; preds = %163, %159
  %180 = landingpad { ptr, i32 }
          cleanup
  br label %181

181:                                              ; preds = %179, %178, %110, %93, %83, %75, %59, %23, %21
  %.pn63 = phi { ptr, i32 } [ %60, %59 ], [ %76, %75 ], [ %94, %93 ], [ %.pn59.pn, %178 ], [ %180, %179 ], [ %111, %110 ], [ %84, %83 ], [ %24, %23 ], [ %22, %21 ]
  call void @_ZN17FixedPoolHeadBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %189

182:                                              ; preds = %164
  %183 = landingpad { ptr, i32 }
          cleanup
  br label %188

184:                                              ; preds = %169, %167
  %185 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  br label %188

186:                                              ; preds = %174, %170
  %187 = landingpad { ptr, i32 }
          cleanup
  br label %188

188:                                              ; preds = %184, %186, %182
  %.pn56.pn = phi { ptr, i32 } [ %183, %182 ], [ %187, %186 ], [ %185, %184 ]
  call void @_ZN17FixedPoolHeadBaseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %189

189:                                              ; preds = %188, %181
  %.pn63.pn = phi { ptr, i32 } [ %.pn63, %181 ], [ %.pn56.pn, %188 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn63.pn
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL14fixedBufGetMemlRm(i64 noundef, ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi12FixedPoolUseEvT_RKT0_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi14FixedPoolNomemEvT_RKT0_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN14FixedPoolNomemC2EPN7Harness11SpinBarrierEPN3rml10MemoryPoolE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi16FixedPoolSomeMemEvT_RKT0_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN16FixedPoolSomeMemC2EPN7Harness11SpinBarrierEPN3rml10MemoryPoolE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass